statusPointDefine

statusPointDefine — names a driver status point.

Synopsis

       
(statusPointDefine [point_name])
	

Parameters

point_name
The name of the status point created. The default is task_name/status.

Returns

OK or (error)

Description

This command names a special point that the driver publishes to the Cascade DataHub containing the overall status of the driver. Clients may monitor this point to determine the overall health of the driver. A value of 0 indicates no errors are being detected.

The status point is a 32-bit integer, segmented as 1 byte for each of the cards that have been initialized (up to 4, see cardInit). Card 0 corresponds to the low byte; card 3 to the high byte.

card3card2card1card0
high byte  low byte

Within each byte (card), each bit indicates the following information (see pfb_api.h):

BitValueMeaning
00x01 PFB_STATUS_MASTER_RUN_MODEMaster is scanning I/O (RUN Mode)
10x02 PFB_STATUS_MASTER_SCANNING_OKNo errors while scanning configured I/O
20x04 PFB_STATUS_SLAVE_RUN_MODESlave being scanned (RUN mode)
30x08 PFB_STATUS_SLAVE_OKSlave status: No errors
40x10reserved
50x20reserved
60x40reserved
70x80 PFB_STATUS_OKCard status: No errors

If this command is specified more than once, the name of the status point will be the one provided by the last command. Previous status point names will not be deleted from the datahub, but they will not be updated when the status data changes.

Example

(statusPointDefine drv_status)