dstatx DEPRECATED
dstatx(raw_data.g.v, pdb.s.r, status_text.sa.r [,ret_ramp_dc.i4.r])
This routine is used to generate an abbreviated 4 (or 5) character
digital status display field. It is used by the parameter program.
It operates on the status data returned by a dio_get_raw(_c) call
and returns 4 (or 5) characters (with color codes) in the
"status_text" array. The characters are returned in XCHAR format.
The unprocessed status is specified in 'raw_data'. The
Process Data Block for the device and property (PRBSTS) must be
supplied in the structure "pdb". The "status_text" array is
returned as follows:
Char Position Attribute Default Characters
1 ON/OFF green "." / red "*"
2 READY/TRIPPED green "." / red "T"
3 REMOTE/LOCAL green "." / yellow "L"
4 POS_POL/NEG_POL cyan "+" / magenta "-"
5 RAMP/DC green "R" / yellow "D" (optional)
If an attribute is not defined, a white blank is placed in the
appropriate character position. If alternate characters are defined
for an attribute, then they are used instead of the default characters.
raw_data raw basic status data
pdb Process Data Block which is the information which
is used to interpret the raw data
(structure of type PDB_STS)
status_text return status string (array of 4 XCHAR structures)
(Note: If the value of "ret_ramp_dc" is TRUE,
this will be treated as an array of five XCHAR
structures.)
[ret_ramp_dc] flag which indicates whether or not to return ramp/DC
attribute text
(TRUE -> return ramp/DC attribute text,
FALSE -> don't return ramp/DC attribute text
(default))
(default is NULL)
This function requires the following include files:
cns_data_structs_h, clib_h
Related functions:
dstatx_ext_c, dio_sts_txt, dio_sts_txt_lst, dio_status, dio_sts_lst,
dio_raw_to_status_text, dio_raw_to_status_text_ext_c, dio_get_raw(_c)
C/C++ usage:
int ret_ramp_dc = FALSE;
unsigned int raw_data;
PDB_STS pdb;
XCHAR status_text[DIO_NUM_STATUS_TYPES];
dstatx((void *) &raw_data,&pdb,status_text,&ret_ramp_dc);