winput(_c)
changed.i4.v = winput(title.i1a.r, top_row.i4.r, left_column.i4.r,
prompt_text.i1a.r, num_chars.i4.r, minima.r4a.r,
maxima.r4a.r, values.ga.r, num_values.i4.r,
data_types.i4a.r [,field_status.i4a.r]
[,options.u4.r] [,user_funcs.fa.r]
[,func_data.ga.r] [,term_func.f.v]
[,key_case.i4.r] [,help_info.sa.r]
[,num_lines.i4.r] [,enabl_entries.i1a.r]
[,display_color.i4a.r] [,prompt_color.i4a.r]
[,prompt_funcs.fa.r])
changed.i4.v = winput_c(title.i1a.r, top_row.i4.v, left_column.i4.v,
prompt_text.i1a.r, num_chars.i4.v, minima.r4a.r,
maxima.r4a.r, values.ga.r, num_values.i4.v,
data_types.i4a.r [,field_status.i4a.r]
[,options.u4.v] [,user_funcs.fa.r]
[,func_data.ga.r] [,term_func.f.v]
[,key_case.i4.v] [,help_info.sa.r]
[,num_lines.i4.v] [,enabl_entries.i1a.r]
[,display_color.i4a.r] [,prompt_color.i4a.r]
[,prompt_funcs.fa.r])
This routine will prompt the user to input "num_values" items which
can be a mixture of byte, short integer, integer, float, double
precision, text string, etc. values by creating a window on the
color TV and displaying a prompt. The type of each datum is
indicated by the array "data_types". The limits are always of type
float with the "maxima" value indicating the string length for a
text string datum (type INP_CHAR or INP_CHAR_OVERSTRIKE). If either
the "minima" or "maxima" argument has a value of NULL, limits checking
will be disabled for all entries in the window. If both the minimum
and maximum values for a given entry have a value of zero, limits
checking will be disabled for that entry only. If this is a "popup"
window, the routine will return the value(s) input to the caller when
the user interrupts outside of the window. The window will be
automatically deleted. If this is not a popup window, control will be
returned immediately to the caller. The window will then be closed
when the user clicks on the "Return" field on the window border.
title title of input window (Note: A null pointer may be
passed if no title is desired.)
top_row top row of window (use WMNGR_CENTER for centering
or WINDOW_xxx_COORD macros in macro for special
positioning)
left_column left column of window (use WMNGR_CENTER for centering
or WINDOW_xxx_COORD macros in macro for special
positioning)
prompt_strings prompt text string(s) ("num_values" strings)
num_chars number of characters in each prompt string
(If a value of zero is passed for this argument,
the routine will automatically determine the prompt
text length.)
minima minimum limit(s) (If a value of NULL is passed for
this argument, limit checking for numeric data types
will be disabled.)
maxima maximum limit(s) (This value serves as the string
length for character data with a maximum of
INPTXT_MAX_STRING characters.) (If a value of NULL is
passed for this argument, limit checking for numeric
data types will be disabled.)
values returned value(s) (This is specified by an array
of pointers to the values to be entered.)
num_values number of values to input
data_types data type of input value(s)
(INP_BYTE -> one byte decimal integer,
INP_SHORT -> two byte decimal integer,
INP_LONG -> four byte decimal integer,
INP_UBYTE -> one byte unsigned decimal integer,
INP_USHORT -> two byte unsigned decimal integer,
INP_ULONG -> four byte unsigned decimal integer,
INP_BYTE_HEX -> one byte hexadecimal integer,
INP_SHORT_HEX -> two byte hexadecimal integer,
INP_LONG_HEX -> four byte hexadecimal integer,
INP_FLOAT -> single precision floating point value,
INP_FLOAT_EXP -> single precision floating point value
in either normal or scientific
notation,
INP_DOUBLE -> double precision floating point value,
INP_DOUBLE_EXP -> double precision floating point
value in either normal or
scientific notation,
INP_CHAR -> simple character string (string will
not be null terminated),
(The string length should be passed in
the argument, "maxima".),
INP_CHAR_OVERSTRIKE -> simple character string entered
in overstrike mode (string will
not be null terminated)
(The string length should be
passed in the argument,
"maxima".),
INP_LOGICAL -> four byte logical integer having
values of TRUE or FALSE,
INP_BYTE_LOGICAL -> one byte logical integer having
values of FORTRAN_TRUE or FALSE,
INP_SHORT_LOGICAL -> two byte logical integer having
values of FORTRAN_TRUE or FALSE,
INP_ENUMERATED -> four byte integer containing an
enumerated value,
>= INP_ENUMERATED_BASE -> four byte integer containing
an enumerated value
(ID returned by
'set_enumerated_strings_c'),
INP_BIT_MASK -> four byte integer containing a
bit mask value,
>= INP_BIT_MASK_BASE -> four byte integer containing
a bit mask value
(ID returned by
'set_bit_mask_strings_c'),
INP_DEVICE -> four byte integer containing an
ACNET device index,
INP_DEVICE_WILD -> four byte integer containing an
ACNET device index,
INP_DEVICE_FULL_NAME -> four byte integer containing an
ACNET device index,
INP_DEVICE_FULL_NAME_WILD -> four byte integer
containing an
ACNET device index,
INP_LONG_DEVICE -> ARRAY_DEVICE_DATA structure
containing an ACNET array device
specification,
INP_C_STYLE_LONG_DEVICE -> ARRAY_DEVICE_DATA structure
containing an array device
specification,
INP_C_STYLE_DEVICE_EXT -> ARRAY_DEVICE_DATA_EXT
structure containing an
extended array device
specification,
INP_DEVICE_NAME -> DEVICE_NAME_LEN character string
containing an ACNET device name,
INP_FERMI_NAME -> four byte integer containing an ACNET
device index,
INP_DEVICE_CLASS -> four byte integer containing a
device class value,
INP_DEVICE_TYPE -> four byte integer containing a
device type value,
INP_DBPROP -> two byte integer containing a database
property value,
INP_FTD -> data request FTD value (two byte integer),
INP_READING_FTD -> reading data request FTD value
(two byte integer),
INP_COLOR -> four byte integer containing color value,
INP_GRAPHIC_COLOR -> four byte integer containing
a graphic color value,
INP_PAGE -> index page string
(PAGE_NAME_LEN characters),
INP_WINDOW -> four byte console window value,
INP_TV_WINDOW -> four byte console TV window value,
INP_GRAPHIC_WINDOW -> four byte console graphic
window value,
INP_PA_GRAPHIC_WINDOW -> four byte PA graphic
window value,
INP_ERROR -> ACNET_ERR structure containing ACNET
error code,
INP_NODE -> two byte integer containing an ACNET
node value,
INP_NODE_MENU -> two byte integer containing an ACNET
node value (menu interface),
INP_NODE_OPERATIONAL -> two byte integer containing
an operationally significant
ACNET node value,
INP_NODE_CONSOLE -> two byte integer containing a
console node value,
INP_NODE_CONSOLE_MENU -> two byte integer containing a
console node value
(menu interface),
INP_NODE_FRONTEND_ALL -> two byte integer containing a
front end node value,
INP_NODE_FRONTEND -> two byte integer containing a
CAMAC front end node value,
INP_NODE_MOOC -> two byte integer containing
a MOOC node value,
INP_NODE_IRM -> two byte integer containing
an IRM node value,
INP_NODE_DAE_FE -> two byte integer containing
a DAE front end node value,
INP_NODE_LCS -> two byte integer containing
an LCS (Local Control System)
front end node value,
INP_NODE_GPIB -> two byte integer containing a
GPIB node value,
INP_NODE_BPM -> two byte integer containing a
BPM node value,
INP_NODE_FRIG -> two byte integer containing a
frig node value,
INP_NODE_MOTION_CONTROL -> two byte integer
containing a motion
controller node value,
INP_NODE_QPM -> two byte integer containing a
QPM node value,
INP_NODE_SWIC -> two byte integer containing a
SWIC node value,
INP_NODE_VACUUM -> two byte integer containing a
vacuum node value,
INP_NODE_MADC -> two byte integer containing an
MADC node value,
INP_NODE_MADC_SUPPORT -> two byte integer containing an
MADC support node value,
INP_NODE_PSEUDO -> two byte integer containing
a pseudo node value,
INP_NODE_CENTRALVAX -> two byte integer containing a
central VAX node value,
INP_CLINKS -> four byte TIME in clinks,
INP_CLINKS_DATEONLY -> four byte TIME in clinks,
(date only),
INP_CLINKS_TIMEONLY -> four byte TIME in clinks,
(TIME only),
INP_HHMMSS -> four byte TIME in hh:mm:ss format,
INP_CTIME -> four byte TIME since January 1, 1970,
INP_CTIME_FMT_CLINKS -> four byte TIME since
January 1, 1970,
INP_GMT_TIME -> four byte GMT TIME in seconds since
January 1, 1970
(Www Mmm dd hh:mm:ss yyyy format),
INP_GMT_TIME_FMT_CLINKS -> four byte GMT TIME in
seconds since
January 1, 1970
(dd-mmm-yyyy hh:mm:ss format),
INP_RAD50 -> four byte radix 50 value (process name),
INP_USERNAME -> USER_NAME_LEN character user
name string,
INP_USER_EMAIL_ADDRESS -> USER_EMAIL_LEN character
user email string,
INP_SR_SYSTEM -> four byte integer containing a
Save/Restore system value,
INP_SR_FILE -> four byte integer containing a
Save/Restore file number,
INP_SAVE_LIST -> four byte integer containing a
Save/Restore list value,
INP_CONSOLE_NUMBER -> four byte integer containing a
console number value,
INP_CONSOLE_SLOT -> four byte integer containing a
console slot value,
INP_CONSOLE_SLOT_WILD -> four byte integer containing a
wildcarded console slot value,
INP_CONSOLE_PA_SLOT -> four byte integer containing a
console PA slot value,
INP_CONSOLE_SA_SLOT -> four byte integer containing a
console SA slot value,
INP_SHARED_LOG_FILE -> LOG_NAMLEN character string
containing a shared log file
name,
INP_LEX_DRAW_FILE -> CNV_LEX_DRAW_FILE_LEN character
string containing a Lex Draw
file name,
INP_LEX_PROG_FILE -> CNV_LEX_PROG_FILE_LEN character
string containing a Lex Prog
file name,
INP_LEX_OBJECT -> LEXT_OBJECT_NAMLEN character
string containing a Lex Object name,
INP_LJ_NODE -> two byte integer containing a
Lumberjack node value,
INP_LJ_NODE_ID -> four byte integer containing a
Lumberjack node ID value,
INP_SSDN -> LEN_SSDN byte SSDN value,
INP_EMC -> LEN_EMC byte EMC (Event Message Code) value,
INP_MACHINE -> four byte integer containing an
accelerator machine value,
INP_MACHINE_LONG -> four byte integer containing an
accelerator machine value,
INP_CNV_TYPE -> four byte integer containing a
conversion type value,
INP_INP_TYPE -> four byte integer containing an
input type value,
INP_SIMPLE_CLOCK_EVENT -> four byte integer containing
a clock event value,
INP_CLOCK_EVENT -> four byte integer containing a
clock event value,
INP_CLOCK_EVENT_LONG -> four byte integer containing a
clock event value,
INP_MIBS_EVENT -> four byte integer containing an
MIBS clock event value,
INP_MIBS_EVENT_LONG -> four byte integer containing an
MIBS clock event value,
INP_RRBS_EVENT -> four byte integer containing an
RRBS clock event value,
INP_RRBS_EVENT_LONG -> four byte integer containing an
RRBS clock event value,
INP_TVBS_EVENT -> four byte integer containing a
TVBS clock event value,
INP_SIMPLE_MDAT_FRAME -> four byte integer containing
an MDAT frame value,
INP_MDAT_FRAME -> four byte integer containing an
MDAT frame value,
INP_MDAT_FRAME_LONG -> four byte integer containing an
MDAT frame value,
INP_NOTIFY_CATEGORY -> four byte integer containing
a notify category value,
INP_NOTIFY_PRIORITY -> four byte integer containing
a notify priority value,
INP_NOTIFY_DATA_TYPE -> four byte integer containing
a notify data type value,
INP_PRIMARY_TRANSFORM -> four byte integer containing
a primary transform value,
INP_PRIMARY_TRANSFORM_LONG -> four byte integer
containing a primary
transform value,
INP_COMMON_TRANSFORM -> four byte integer containing
a common transform value,
INP_COMMON_TRANSFORM_LONG -> four byte integer
containing a common
transform value,
INP_STATE_DEVICE -> four byte integer containing a
state device index,
INP_STATE_VALUE -> STATE_VALUE structure
containing a state value
specification,
INP_DATA_EVENT -> DATA_EVENT_DATA structure
containing a data event value
specification,
INP_STATE_EVENT -> DATA_EVENT_DATA structure containing
a state data event specification,
INP_TCLK_EVENT -> DATA_EVENT_DATA structure containing
a TCLK data event specification,
INP_DATA_SOURCE -> DATA_SOURCE_DATA structure
containing a data source
specification,
INP_SDA_DIR -> four byte integer containing an
SDA directory value (obsolete),
INP_SDA_USAGE -> four byte integer containing an
SDA usage value,
INP_SDA_FILE -> SDA_FILE_VALUE structure
containing an SDA file value
specification,
INP_SDA_CASE -> four byte integer containing an
SDA case value (for Collider shot),
INP_EXT_SDA_CASE -> SDA_CASE_VALUE structure
containing an SDA case value
specification,
INP_EXT_SDA_SUBCASE -> SDA_CASE_VALUE structure
containing an SDA subcase value
specification,
INP_ALARM_LIST -> four byte integer containing an
alarm list value,
INP_ALARM_HANDLER_CODE -> four byte integer containing
an alarm handler code value,
INP_NODE_SYSTEM -> four byte integer containing a
node system type value,
INP_NODE_HARDWARE -> four byte integer containing a
node hardware type value,
INP_NODE_SOFTWARE -> four byte integer containing a
node software type value,
INP_NODE_STATUS -> four byte integer containing a
node status type value,
INP_NODE_AREA -> four byte integer containing a
node area type value,
INP_NODE_OPSYS -> four byte integer containing a
node operating system type value,
INP_STATE_FTD_INDEX -> four byte integer containing a
state FTD index value,
INP_ERROR_CATEGORY -> four byte integer containing
an error category value,
INP_LJ_USER_DIRECTORY -> a Lumberjack user
directory string,
INP_LJ_USER_FILE -> a Lumberjack user file
name string,
INP_DEVICE_VALUE -> an ACNET device value
contained in an ACNET_DEVICE_VALUE
structure,
INP_SWITCH -> CNV_SWITCH_NAME_LEN character string
containing a network switch name,
INP_CONTROL_SYSTEM_TYPE -> four byte integer containing
a control system type value,
INP_FOREIGN_SYSTEM_TYPE -> four byte integer containing
a foreign control system
type value,
INP_FOREIGN_DATA_TYPE -> FOREIGN_DATA_TYPE_INFO
structure containing
a foreign data type value,
INP_EPICS_DATA_TYPE -> four byte integer containing
an EPICS data type value,
INP_OPC_DATA_TYPE -> four byte integer containing
an OPC data type value,
INP_LABVIEW_DATA_TYPE -> four byte integer containing
a LabView data type value,
INP_APACS_DATA_TYPE -> four byte integer containing
an APACS data type value,
INP_SNMP_DATA_TYPE -> four byte integer containing
an SNMP data type value,
INP_SIEMENS_S7_DATA_TYPE -> four byte integer
containing Siemens S7
data type value,
INP_LAB_DEPARTMENT -> four byte integer containing a
lab department value,
user data type ID -> user data type defined by an
earlier call to
'create_user_data_type_c')
[field_status] field-by-field status array (default is NULL)
(FALSE -> field was not changed,
TRUE -> field was successfully changed,
CBS_RANGE -> an erroneous value was entered for
this field)
[options] dialog options (values may be OR'ed together)
(DIALOG_POPUP -> acts as popup window with all
interrupts captured until the user
chooses to exit (default),
DIALOG_PERSISTENT -> window is created and control is
returned to user (window
intercepts only those interrupts
intended for it),
DIALOG_ALLOW_EDITS -> allow the modification of
values (default),
DIALOG_DISPLAY_ONLY -> display values only
(no modification))
(default is (DIALOG_POPUP | DIALOG_ALLOW_EDITS))
[user_funcs] user-supplied callback functions
(If this is specified, the function corresponding to
a given entry is called when a successful data entry
is made in that field.)
(default is NULL)
(called as follows:
user_func(window_id.i2.v, func_data.g.v,
field_number.i4.v, changed.i4.v,
field_value.g.v)
(input field numbers start at 1))
[func_data] pointers to data to be passed to "user_funcs"
(default is NULL)
[term_func] user-supplied winput termination function
(This argument is ignored for popup windows.)
(default is NULL) (called as follows: func(wid.i2.v))
[key_case] controls case of typed characters (This argument is
only valid for popup windows.)
(WMNGR_UPPER_CASE -> only upper case displayed,
WMNGR_MIXED_CASE -> allows lower case (default))
[help_info] entry by entry help callback information
(array of HELP_CALLBACK_DATA structures)
(default is NULL)
[num_lines] number of lines of input to be displayed at a
TIME (default (CLIB_DEFAULT_ARG) is the number
of values to be input)
[enabl_entries] array of logical flags indicating which fields
are enabled for editing (default is NULL which
enables all fields)
(DIALOG_ENABLED_ENTRY -> enabled entry (default),
DIALOG_DISABLED_ENTRY -> disabled entry)
[display_color] field by field value display colors which is
only used in DIALOG_DISPLAY_ONLY mode
(constants are in 'cnsparam')
(default is NULL)
[prompt_color] field by field prompt string display colors
(constants are in 'cnsparam')
(default is NULL)
[prompt_funcs] user-supplied prompt string callback functions
(If this is specified, the function corresponding to
a given entry is called when its prompt string is
clicked upon.)
(default is NULL)
(called as follows:
prompt_func(window_d.i2.v, NULL, field_number.i4.v)
(input field numbers start at 1))
This function returns status values as follows:
TRUE value(s) have been changed
FALSE no values were changed
CBS_INVARG invalid data type or number of values
CBS_WINDOW_TOO_BIG window won't fit on screen
CBS_MEMFAIL dynamic memory allocation failure
CBS_ABORT user aborted input (no values were changed)
otherwise created window ID (nonpopup windows only)
This function requires the following include files:
cnsparam_h, cns_data_structs_h, cbslib_h, macro_h, acnet_errors_h
Related functions:
winput_update_field_c, input_array_values_c, array_edit_c,
set_enumerated_strings_c, modify_enumerated_strings_c,
get_enumerated_strings, create_user_data_type_c, set_logical_strings,
get_logical_strings, set_bit_mask_strings_c, get_bit_mask_strings_c,
wrdspi(_c), wrdspi4(_c), wrdspr(_c), wrdspr8(_c), inptxt(_c),
input_string_dialog_c, dialog_setup_c, numeric_to_ascii(_c),
ascii_to_numeric(_c), window_restore_hint_c
C/C++ usage:
char string_value[10];
static const char title[] = "Title";
static const char prompt_text[] = "Float Text Enumerated";
char *enabled_entries = (char *) NULL;
int enumerated_value;
int changed;
int top_row = WMNGR_CENTER;
int left_column = WMNGR_CENTER;
int num_chars = 0;
int num_values = NUM_WINPUT_VALUES;
int field_status[NUM_WINPUT_VALUES];
int key_case = WMNGR_MIXED_CASE;
int num_lines = NUM_WINPUT_VALUES;
static const int data_types[NUM_WINPUT_VALUES] =
{INP_FLOAT, INP_CHAR, INP_ENUMERATED};
int *display_colors = (int *) NULL;
int *prompt_colors = (int *) NULL;
unsigned int options = DIALOG_POPUP | DIALOG_ALLOW_EDITS;
float float_value = 1.0;
static const float minima[NUM_WINPUT_VALUES] = {-5.0, 0.0, 0.0};
static const float maxima[NUM_WINPUT_VALUES] = {5.0, 10.0, 0.0};
void *values[NUM_WINPUT_VALUES];
void **func_data = (void **) NULL;
void (**user_funcs)() = (void (**)()) NULL;
void (**prompt_funcs)() = (void (**)()) NULL;
void (*term_func)() = (void (*)()) NULL;
HELP_CALLBACK_DATA *help_info = (HELP_CALLBACK_DATA *) NULL;
values[0] = (void *) &float_value;
values[1] = (void *) string_value;
values[2] = (void *) &enumerated_value;
changed = winput_c(title,top_row,left_column,prompt_text,num_chars,
minima,maxima,values,num_values,data_types,
field_status,options,user_funcs,func_data,term_func,
key_case,help_info,num_lines,enabled_entries,
display_colors,prompt_colors,prompt_funcs);