numeric_default_length_c
status.i4.v = numeric_default_length_c(data_type.i4.v
[,data_type_info.g.v])
This routine will return the default (maximum) number of characters
required for the ASCII representation of a type of data as converted
by the 'numeric_to_ascii(_c)' routines.
data_type data type
(CNV_BYTE -> one byte decimal integer,
CNV_SHORT -> two byte decimal integer,
CNV_LONG -> four byte decimal integer,
CNV_LONG_LONG -> eight 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_ULONG_LONG -> eight 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_LONG_LONG_HEX -> eight byte hexadecimal integer,
CNV_BYTE_OCTAL -> one byte octal integer,
CNV_SHORT_OCTAL -> two byte octal integer,
CNV_LONG_OCTAL -> four byte octal integer,
CNV_LONG_LONG_OCTAL -> eight byte octal integer,
CNV_BYTE_RADIX -> one byte integer (current radix),
CNV_SHORT_RADIX -> two byte integer (current radix),
CNV_LONG_RADIX -> four byte integer (current radix),
CNV_LONG_LONG_RADIX -> eight byte integer
(current radix),
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_EXP_DOUBLE -> double precision floating point
value in scientific notation,
CNV_DOUBLE_EXP -> double precision floating point
value converted to best format,
CNV_LOGICAL -> four byte integer containing values
of TRUE or FALSE,
CNV_BYTE_LOGICAL -> one byte integer containing values
of FORTRAN_TRUE or FALSE,
CNV_SHORT_LOGICAL -> two byte integer containing values
of FORTRAN_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_MOOC -> two byte integer containing
a MOOC node value,
CNV_NODE_IRM -> two byte integer containing
an IRM node value,
CNV_NODE_DAE_FE -> two byte integer containing
a DAE front end node value,
CNV_NODE_LCS -> two byte integer containing
an LCS (Local Control System)
front end node value,
CNV_NODE_PSEUDO -> two byte integer containing
a pseudo node value,
CNV_NODE_CENTRALVAX -> two byte integer containing
a central VAX node value,
CNV_NODE_GPIB -> two byte integer containing a
GPIB node value,
CNV_NODE_BPM -> two byte integer containing a
BPM node value,
CNV_NODE_FRIG -> two byte integer containing a
frig node value,
CNV_NODE_MOTION_CONTROL -> two byte integer
containing a motion
controller node value,
CNV_NODE_QPM -> two byte integer containing a
QPM node value,
CNV_NODE_SWIC -> two byte integer containing a
SWIC node value,
CNV_NODE_VACUUM -> two byte integer containing a
vacuum node value,
CNV_NODE_MADC -> two byte integer containing a
MADC node value,
CNV_NODE_MADC_SUPPORT -> two byte integer containing a
MADC support 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_C_STYLE_LONG_DEVICE -> ARRAY_DEVICE_DATA structure
containing an array device
specification,
CNV_C_STYLE_DEVICE_EXT -> ARRAY_DEVICE_DATA_EXT
structure containing an
array device
specification,
CNV_DEVICE_NAME -> DEVICE_NAME_LEN character string
containing an ACNET device name,
CNV_FERMI_NAME -> four byte integer containing an ACNET
device index,
CNV_DEVICE_CLASS -> four byte integer containing a
device class value,
CNV_DEVICE_CLASS_LONG -> 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_DBPROP_ENGLISH -> 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 containing color value,
CNV_PACKED_TV_COLOR -> four byte integer containing
a packed TV color value,
CNV_GRAPHIC_COLOR -> four byte integer containing
a graphic 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_PA_GRAPHIC_WINDOW -> four byte PA 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
(dd-mmm-yyyy hh:mm:ss format),
CNV_CLINKS_SUPPRESS_SPECIAL_NOTATION -> four byte TIME
in clinks
without special
DST overlap
notation,
CNV_CLINKS_DATEONLY -> four byte TIME in clinks
(date only (dd-mmm-yyyy)),
CNV_CLINKS_TIMEONLY -> four byte TIME in clinks
(TIME only (hh:mm:ss)),
CNV_CLINKS_FMT_CTIME-> four byte TIME in clinks
(ctime format),
CNV_HHMMSS -> four byte TIME in hh:mm:ss format,
CNV_CTIME -> four byte TIME in seconds since
January 1, 1970
(Www Mmm dd hh:mm:ss yyyy format),
CNV_CTIME_DATEONLY -> four byte TIME in seconds since
January 1, 1970
(date only (Mmm dd yyyy)),
CNV_CTIME_TIMEONLY -> four byte TIME in seconds since
January 1, 1970
(TIME only (hh:mm:ss)),
CNV_CTIME_FMT_CLINKS -> four byte TIME in seconds since
January 1, 1970
(dd-mmm-yyyy hh:mm:ss format),
CNV_GMT_TIME -> four byte GMT TIME in seconds since
January 1, 1970
(Www Mmm dd hh:mm:ss yyyy format),
CNV_GMT_TIME_FMT_CLINKS -> four byte GMT TIME in
seconds since
January 1, 1970
(dd-mmm-yyyy hh:mm:ss format),
CNV_LABVIEW_TIME_FMT_CLINKS -> four byte TIME in
seconds since
January 1, 1904
(dd-mmm-yyyy hh:mm:ss format),
CNV_LABVIEW_TIME_FMT_CTIME -> four byte TIME in
seconds since
January 1, 1904
(Www Mmm dd hh:mm:ss yyyy format),
CNV_HOURS_TO_TOD -> floating point hours in
hh:mm:ss format,
CNV_CLINKS_TIMESTAMP -> TIMESTAMP_DATA clinks timestamp in
seconds since January 1, 1972
(dd-mmm-yyyy hh:mm:ss.fff format),
CNV_CTIME_TIMESTAMP -> TIMESTAMP_DATA local timestamp in
seconds since January 1, 1970
(dd-mmm-yyyy hh:mm:ss.fff format),
CNV_UTC_TIMESTAMP -> TIMESTAMP_DATA UTC timestamp in
seconds since January 1, 1970
(dd-mmm-yyyy hh:mm:ss.fff format),
CNV_RAD50 -> four byte radix 50 value,
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_SR_SAVE_CODE -> four byte integer containing a
Save/Restore save code value,
CNV_SR_DISPLAY_CODE -> four byte integer containing a
Save/Restore display code value,
CNV_SR_DISPLAY_SUBCODE -> four byte integer containing
a Save/Restore display
subcode value,
CNV_SSDN -> LEN_SSDN byte SSDN value,
CNV_EMC -> LEN_EMC byte EMC (Event Message Code) 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_SLOT_WILD -> four byte integer containing a
wildcarded 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_CONSOLE_CLASS -> four byte integer containing a
console class 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_LEX_OBJECT -> LEXT_OBJECT_NAMLEN character
string containing a Lex Object name,
CNV_TRIMMED_STRING -> null terminated ASCII string
with any leading or trailing
spaces removed,
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_MACHINE_LONG -> 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_HCLK_EVENT -> four byte integer containing
a HINS clock event value,
CNV_HCLK_EVENT -> four byte integer containing a
HINS clock event value,
CNV_HCLK_EVENT_LONG -> four byte integer containing a
HINS clock event value,
CNV_SIMPLE_NCLK_EVENT -> four byte integer containing
an NML clock event value,
CNV_NCLK_EVENT -> four byte integer containing
an NML clock event value,
CNV_NCLK_EVENT_LONG -> four byte integer containing
an NML clock event value,
CNV_MIBS_EVENT -> four byte integer containing an
MIBS clock event value,
CNV_MIBS_EVENT_LONG -> four byte integer containing an
MIBS clock event value,
CNV_RRBS_EVENT -> four byte integer containing an
RRBS clock event value,
CNV_RRBS_EVENT_LONG -> four byte integer containing an
RRBS clock event value,
CNV_TVBS_EVENT -> four byte integer containing a
TVBS 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,
CNV_DATA_SOURCE -> DATA_SOURCE_DATA structure
containing a data source
specification,
CNV_SDA_DIR -> four byte integer containing an
SDA directory value (obsolete),
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_CASE -> four byte integer containing an
SDA case value (for Collider shot),
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_FTP_CLASS -> four byte integer containing an
FTP class value,
CNV_SNP_CLASS -> four byte integer containing a
SNP class value,
CNV_COMPARATOR -> four byte integer containing a
comparator value,
CNV_DEVICE_DATA_TYPE -> four byte integer containing a
device data type value,
CNV_ALARM_LIST -> four byte integer containing an
alarm list value,
CNV_ALARM_HANDLER_CODE -> four byte integer containing
an alarm handler code value,
CNV_ALARM_LIMIT_TYPE -> convert a 4 byte analog alarm
limit type value,
CNV_ALARM_LIMIT_TYPE_SHORT -> convert a 4 byte
analog alarm limit type
value (short string),
CNV_ALARM_LIMIT_DATA_TYPE -> convert a 4 byte
analog alarm limit data
type value,
CNV_ALARM_LIMIT_DATA_TYPE_SHORT -> convert a 4 byte
analog alarm limit
data type value
(short string),
CNV_ALARM_POST_METHOD -> convert a 4 byte alarm
post method value,
CNV_ALARM_POST_METHOD_SHORT -> convert a 4 byte
alarm post method value
(short string),
CNV_ALARM_HI_LOW_STATUS -> convert a 4 byte analog
alarm high/low status value,
CNV_ALARM_FTD -> convert a 4 byte alarm FTD value,
CNV_NODE_SYSTEM -> four byte integer containing a
node system type value,
CNV_NODE_HARDWARE -> four byte integer containing a
node hardware type value,
CNV_NODE_SOFTWARE -> four byte integer containing a
node software type value,
CNV_NODE_STATUS -> four byte integer containing a
node status type value,
CNV_NODE_AREA -> four byte integer containing a
node area type value,
CNV_NODE_OPSYS -> four byte integer containing a
node operating system type value,
CNV_STATE_FTD_INDEX -> four byte integer containing a
state FTD index,
CNV_ERROR_CATEGORY -> four byte integer containing
an error category value,
CNV_ERROR_FACILITY -> four byte integer containing
an error facility value,
CNV_ERROR_CLASS -> error class string,
CNV_LJ_USER_DIRECTORY -> convert a Lumberjack user
directory string,
CNV_LJ_USER_FILE -> convert a Lumberjack user file
name string,
CNV_DEVICE_VALUE -> convert an ACNET device value
contained in an ACNET_DEVICE_VALUE
structure,
CNV_SWITCH -> CNV_SWITCH_NAME_LEN character string
containing a network switch name,
CNV_CONTROL_SYSTEM_TYPE -> four byte integer containing
a control system type value,
CNV_FOREIGN_SYSTEM_TYPE -> four byte integer containing
a foreign control
system type value,
CNV_EPICS_DATA_TYPE -> four byte integer containing
an EPICS data type value,
CNV_APACS_DATA_TYPE -> four byte integer containing
an APACS data type value,
CNV_LABVIEW_DATA_TYPE -> four byte integer containing
a LabView data type value,
CNV_OPC_DATA_TYPE -> four byte integer containing
an OPC data type value,
CNV_SNMP_DATA_TYPE -> four byte integer containing
an SNMP data type value,
CNV_SIEMENS_S7_DATA_TYPE -> four byte integer
containing a Siemens S7
data type value,
CNV_FOREIGN_DATA_TYPE -> FOREIGN_DATA_TYPE_INFO
structure containing
a foreign data type value,
CNV_SNAP_MANAGER_SYSTEM -> four byte integer
containing a snapshot
manager system value,
user data type id -> user data type defined by an
earlier call to
'create_user_data_type_c')
[data_type_info] supplemental data needed to specify some data types
(Uses for this argument are:
CNV_STATE_VALUE -> STATE_VALUE structure,
CNV_SDA_FILE -> SDA_FILE_VALUE structure,
CNV_EXT_SDA_CASE -> SDA_CASE_VALUE structure,
CNV_EXT_SDA_SUBCASE -> SDA_CASE_VALUE structure,
CNV_DEVICE_VALUE -> ACNET_DEVICE_VALUE structure,
CNV_FOREIGN_DATA_TYPE -> FOREIGN_DATA_TYPE_INFO
structure)
(default is NULL)
This function returns status values as follows:
CBS_INVARG invalid conversion type
otherwise default number of characters
This function requires the following include files:
cbslib_h, cns_data_structs_h, acnet_errors_h
Related functions:
numeric_data_length_c, numeric_fundamental_type_c, numeric_values_c,
numeric_to_ascii(_c), ascii_to_numeric(_c), numeric_to_float_c,
get_logical_strings, get_enumerated_strings, set_logical_strings,
set_enumerated_strings_c, get_enumerated_string_array_c,
set_enumerated_string_array_c, create_user_data_type_c,
get_bit_mask_strings_c, set_bit_mask_strings_c, clib_sprintf,
clib_vsprintf, clib_sprintfx, clib_vsprintfx, window_printf_c,
window_printf_at_c, window_printf_noscroll_c, integer_length(_c),
enum_type_menu_info_c, numeric_convert_type_id_c,
numeric_convert_tuner_c, build_sda_case_value_c
C/C++ usage:
int status;
int data_type = CNV_ENUMERATED;
void *data_type_info = (void *) NULL;
status = numeric_default_length_c(data_type,data_type_info);