wn_display_value(_c)
status.i4.v = wn_display_value(x.r4.r, y.r4.r, value.g.v,
data_type.i4.r, num_chars.i4.r
[,fill_char.i1.r] [,justify.i4.r])
status.i4.v = wn_display_value_c(x.r4.v, y.r4.v, value.g.v,
data_type.i4.v, num_chars.i4.v
[,fill_char.i1.v] [,justify.i4.v])
This routine converts a numeric value into its ASCII representation
and displays it in the currently active graphics window. The color
of the text is determined by the most recent call to 'wn_color(_c)'.
x, y real world coordinates of lower left hand
corner of text string (If text character scaling
is selected with a call to 'wn_text_scaling_c',
the following special coordinate values are supported.
A value of WN_CENTER_IT for either coordinate will
center the text relative to the active window for that
plane. A value of WN_JUSTIFY_MIN or WN_JUSTIFY_MAX
will align the text to the minimum or maximum
respectively of the corresponding axis.)
value value to be converted
data_type data type of "value"
(CNV_BYTE -> one byte decimal integer,
CNV_SHORT -> two byte decimal integer,
CNV_LONG -> four byte decimal integer,
CNV_UBYTE -> one byte unsigned decimal integer,
CNV_USHORT -> two byte unsigned decimal integer,
CNV_ULONG -> four byte unsigned decimal integer,
CNV_BYTE_HEX -> one byte hexadecimal integer,
CNV_SHORT_HEX -> two byte hexadecimal integer,
CNV_LONG_HEX -> four byte hexadecimal integer,
CNV_SHORT_OCTAL -> two byte octal integer,
CNV_BINARY -> "num_chars" / 8 binary byte array
(little endian),
CNV_HEX_STRING -> "num_chars" / 2 hexadecimal
byte array,
CNV_HEX_BIG_ENDIAN -> "num_chars" / 2 hexadecimal
byte array,
CNV_FLOAT -> single precision floating point value,
CNV_EXP -> floating point value in scientific
notation,
CNV_FLOAT_EXP -> single precision floating point value
converted to best format,
CNV_DOUBLE -> double precision floating point value,
CNV_DOUBLE_EXP -> double precision floating point
value converted to best format,
CNV_LOGICAL -> four byte integer containing values
of TRUE or FALSE,
CNV_ENUMERATED -> four byte integer from most recent
call to 'set_enumerated_strings_c',
>= CNV_ENUMERATED_BASE -> four byte integer from a
prior call to
'set_enumerated_strings_c',
CNV_BIT_MASK -> four byte integer from most recent
call to 'set_bit_mask_strings_c',
>= CNV_BIT_MASK_BASE -> four byte integer from a
prior call to
'set_bit_mask_strings_c',
CNV_NODE -> two byte integer containing an ACNET
node value,
CNV_NODE_OPERATIONAL -> two byte integer containing
an operationally significant
ACNET node value,
CNV_NODE_CONSOLE -> two byte integer containing an
ACNET console node value,
CNV_NODE_FRONTEND -> two byte integer containing a
CAMAC front end node value,
CNV_NODE_FRONTEND_ALL -> two byte integer containing
a front end node value,
CNV_NODE_CENTRALVAX -> two byte integer containing
a central VAX node value,
CNV_DEVICE -> four byte integer containing an ACNET
device index,
CNV_LONG_DEVICE -> ARRAY_DEVICE_DATA structure
containing an array device
specification,
CNV_DEVICE_CLASS -> four byte integer containing a
device class value,
CNV_DEVICE_TYPE -> four byte integer containing a
device type value,
CNV_DEVICE_TYPE_LONG -> four byte integer containing
a device type value,
CNV_DBPROP -> two byte integer containing an
ACNET database property,
CNV_FTD -> two byte integer containing data
acquisition rate (FTD),
CNV_READING_FTD -> two byte integer containing
reading data acquisition rate (FTD),
CNV_COLOR -> four byte integer containg color value,
CNV_PAGE -> PAGE_NAME_LEN character string containing
an application index page name,
CNV_WINDOW -> four byte console window value,
CNV_TV_WINDOW -> four byte console TV window value,
CNV_GRAPHIC_WINDOW -> four byte console graphic
window value,
CNV_ERROR -> ACNET_ERR structure containing ACNET
error code,
CNV_SHORT_ERROR -> ACNET_ERR structure containing
ACNET error code (short format),
CNV_SYSTEM_ERROR -> four byte system error value,
CNV_RTL_ERROR -> four byte RTL error value,
CNV_CLINKS -> four byte TIME in clinks,
CNV_CLINKS_DATEONLY -> four byte TIME in clinks
(date only),
CNV_CLINKS_TIMEONLY -> four byte TIME in clinks
(TIME only),
CNV_HHMMSS -> four byte TIME in hh:mm:ss format,
CNV_CTIME -> four byte TIME in seconds since
January 1, 1970,
CNV_CTIME_DATEONLY -> four byte TIME in seconds since
January 1, 1970 (date only),
CNV_CTIME_TIMEONLY -> four byte TIME in seconds since
January 1, 1970 (TIME only),
CNV_RAD50 -> four byte radix 50 value,
CNV_XCHAR -> XCHAR format string,
CNV_USERNAME -> USER_NAME_LEN character string
containing a user name,
CNV_SR_SYSTEM -> four byte integer containing a
Save/Restore system value,
CNV_SR_FILE -> four byte integer containing a
Save/Restore file number,
CNV_SAVE_LIST -> four byte integer containing a
Save/Restore list value,
CNV_SDA_CASE -> four byte integer containing an
SDA case value,
CNV_SDA_USAGE -> four byte integer containing an
SDA usage value,
CNV_SDA_FILE -> SDA_FILE_VALUE structure
containing an SDA file value
specification,
CNV_SDA_DIR -> four byte integer containing an
SDA directory value,
CNV_EXT_SDA_CASE -> SDA_CASE_VALUE structure
containing an SDA case value
specification,
CNV_EXT_SDA_SUBCASE -> SDA_CASE_VALUE structure
containing an SDA subcase value
specification,
CNV_SSDN -> LEN_SSDN byte SSDN value,
CNV_DEVICE_DESCRIPTION -> four byte integer
containing an ACNET
device index,
CNV_READING_UNITS_TEXT -> four byte integer
containing an ACNET
device index,
CNV_SETTING_UNITS_TEXT -> four byte integer
containing an ACNET
device index,
CNV_CONSOLE_NUMBER -> four byte integer containing
a console number value,
CNV_CONSOLE_SLOT -> four byte integer containing a
console slot value,
CNV_CONSOLE_PA_SLOT -> four byte integer containing a
console PA slot value,
CNV_CONSOLE_SA_SLOT -> four byte integer containing a
console SA slot value,
CNV_SHARED_LOG_FILE -> LOG_NAMLEN character string
containing a shared log file
name,
CNV_LEX_DRAW_FILE -> CNV_LEX_DRAW_FILE_LEN character
string containing a Lex Draw
file name,
CNV_LEX_PROG_FILE -> CNV_LEX_PROG_FILE_LEN character
string containing a Lex Prog
file name,
CNV_LJ_NODE -> two byte integer containing a
Lumberjack node value,
CNV_LJ_NODE_ID -> four byte integer containing a
Lumberjack node ID value,
CNV_MACHINE -> four byte integer containing an
accelerator machine value,
CNV_CNV_TYPE -> four byte integer containing a
conversion type value,
CNV_INP_TYPE -> four byte integer containing an
input type value,
CNV_SIMPLE_CLOCK_EVENT -> four byte integer containing
a clock event value,
CNV_CLOCK_EVENT -> four byte integer containing a
clock event value,
CNV_CLOCK_EVENT_LONG -> four byte integer containing a
clock event value,
CNV_SIMPLE_MDAT_FRAME -> four byte integer containing
an MDAT frame value,
CNV_MDAT_FRAME -> four byte integer containing an
MDAT frame value,
CNV_MDAT_FRAME_LONG -> four byte integer containing an
MDAT frame value,
CNV_NOTIFY_CATEGORY -> four byte integer containing a
notify category value,
CNV_NOTIFY_PRIORITY -> four byte integer containing a
notify priority value,
CNV_NOTIFY_DATA_TYPE -> four byte integer containing a
notify data type value,
CNV_PRIMARY_TRANSFORM -> four byte integer containing
a primary transform value,
CNV_PRIMARY_TRANSFORM_LONG -> four byte integer
containing a primary
transform value,
CNV_COMMON_TRANSFORM -> four byte integer containing
a common transform value,
CNV_COMMON_TRANSFORM_LONG -> four byte integer
containing a common
transform value,
CNV_STATE_DEVICE -> four byte integer containing a
state device index,
CNV_STATE_VALUE -> STATE_VALUE structure containing a
state value specification,
CNV_DATA_EVENT -> DATA_EVENT_DATA structure containing
a data event specification,
CNV_STATE_EVENT -> DATA_EVENT_DATA structure containing
a state data event specification,
CNV_TCLK_EVENT -> DATA_EVENT_DATA structure containing
a TCLK data event specification,
user data type ID -> user data type defined by an
earlier call to
'create_user_data_type_c',
CNV_CHAR -> simple character array,
CNV_XCHAR -> array of XCHAR structures containing
color encoded text,
CNV_TRIMMED_STRING -> null terminated ASCII string to
have any leading or trailing
spaces removed,
user data type ID -> user data type defined by an
earlier call to
'create_user_data_type_c')
num_chars number of characters to display
minimum number of characters for certain types:
(CNV_NODE -> CNV_NODE_LEN characters,
CNV_NODE_OPERATIONAL -> CNV_NODE_LEN characters,
CNV_NODE_CONSOLE -> CNV_NODE_LEN characters,
CNV_NODE_FRONTEND -> CNV_NODE_LEN characters,
CNV_NODE_FRONTEND_ALL -> CNV_NODE_LEN characters,
CNV_NODE_CENTRALVAX -> CNV_NODE_LEN characters,
CNV_DEVICE -> DEVICE_NAME_LEN characters,
CNV_LONG_DEVICE -> LONG_DEVICE_NAME_LEN characters,
CNV_DEVICE_CLASS -> DIO_CLASS_TEXT_LEN characters,
CNV_DEVICE_TYPE -> DIO_SHORT_DEVICE_TEXT_LEN
characters,
CNV_DEVICE_TYPE_LONG -> DIO_LONG_DEVICE_TEXT_LEN
characters,
CNV_DBPROP -> CNV_DBPROP_LEN characters,
CNV_FTD -> CNV_FTD_LEN characters,
CNV_READING_FTD -> CNV_FTD_LEN characters,
CNV_COLOR -> CNV_COLOR_LEN characters,
CNV_PAGE -> PAGE_NAME_LEN characters,
CNV_WINDOW -> CNV_WINDOW_LEN characters,
CNV_TV_WINDOW -> CNV_WINDOW_LEN characters,
CNV_GRAPHIC_WINDOW -> CNV_WINDOW_LEN characters,
CNV_ERROR -> ACNET_ERROR_TEXT_LEN characters,
CNV_SHORT_ERROR -> SHORT_ACNET_ERROR_LEN characters,
CNV_CLINKS -> DATESTRING_LEN characters,
CNV_CLINKS_DATEONLY -> CNV_CLINKS_DATEONLY_LEN
characters,
CNV_CLINKS_TIMEONLY -> CNV_TIMEONLY_LEN characters,
CNV_HHMMSS -> CNV_TIMEONLY_LEN characters,
CNV_CTIME -> ASCTIME_LEN characters,
CNV_CTIME_DATEONLY -> CNV_CTIME_DATEONLY_LEN
characters,
CNV_CTIME_TIMEONLY -> CNV_TIMEONLY_LEN characters,
CNV_RAD50 -> RAD50_LEN characters,
CNV_USERNAME -> USER_NAME_LEN characters,
CNV_SR_SYSTEM -> CNV_SR_SYSTEM_LEN characters,
CNV_SAVE_LIST -> CNV_SAVE_LIST_LEN characters,
CNV_SDA_CASE -> CNV_SDA_CASE_LEN characters,
CNV_SDA_DIR -> CNV_SDA_DIR_LEN characters,
CNV_SSDN -> CNV_SSDN_LEN characters,
CNV_DEVICE_DESCRIPTION -> LEN_DEV_DESCR_TEXT
characters,
CNV_READING_UNITS_TEXT -> LEN_DEV_UNITS characters,
CNV_SETTING_UNITS_TEXT -> LEN_DEV_UNITS characters,
CNV_CONSOLE_NUMBER -> CNV_CONSOLE_NUMBER_LEN
characters,
CNV_CONSOLE_SLOT -> CNV_CONSOLE_SLOT_LEN characters,
CNV_CONSOLE_PA_SLOT -> CNV_CONSOLE_SLOT_LEN characters,
CNV_CONSOLE_SA_SLOT -> CNV_CONSOLE_SLOT_LEN characters,
CNV_SHARED_LOG_FILE -> LOG_NAMLEN characters,
CNV_LEX_DRAW_FILE -> CNV_LEX_DRAW_FILE_LEN characters,
CNV_LEX_PROG_FILE -> CNV_LEX_PROG_FILE_LEN characters,
CNV_LJ_NODE -> CNV_LJ_NAME_LEN characters,
CNV_LJ_NODE_ID -> CNV_LJ_NAME_LEN characters,
CNV_PRIMARY_TRANSFORM_LONG -> DIO_SCALING_TEXT_LEN
characters,
CNV_COMMON_TRANSFORM_LONG -> DIO_SCALING_TEXT_LEN
characters,
CNV_STATE_DEVICE -> DEVICE_NAME_LEN characters,
CNV_STATE_VALUE -> CNV_STATE_TEXT_LEN characters)
[fill_char] character to use for filling out the field
(default is BLANK)
[justify] optional justification parameter which has no
effect on types CNV_CHAR and CNV_XCHAR
(CNV_LEFT_JUSTIFY -> left justify,
CNV_LEFT_JUSTIFY_NO_PSIGN -> left justify, but don't
leave a space for sign,
CNV_RIGHT_JUSTIFY -> right justify,
CNV_CENTER_JUSTIFY -> center it,
CNV_NO_JUSTIFY -> no justification (default))
This function returns ACNET status values as follows:
CBS_OK success
CBS_INVARG invalid number of characters or conversion type
CBS_NOSETUP an active window has not been established
This function requires the following include files:
cns_data_structs_h, cbslib_h, acnet_errors_h
Related functions:
numeric_to_ascii(_c), wn_text(_c), wn_colored_text_c, wn_flush,
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,
wn_text_scaling_c, intro_graphics_windows
C/C++ usage:
char fill_char = BLANK;
int status;
int value = 42;
int data_type = CNV_LONG;
int num_chars = 4;
int justify = CNV_NO_JUSTIFY;
float x = 1.0;
float y = 1.0;
status = wn_display_value_c(x,y,(void *) &value,data_type,
num_chars,fill_char,justify);