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 dvn_api.h):

BitValueMeaning
00x01 DVN_STATUS_CAN_OFFLINECAN bus offline.
10x02 DVN_STATUS_CAN_BUSERRORCAN bus error.
20x04 DVN_STATUS_CAN_IDLECAN bus scan inactive.
30x08 DVN_STATUS_IO_ERRORIO exchange error.
40x10 DVN_STATUS_Q_FAULTEvent queue overflow.
50x20 DVN_STATUS_SCANNER_IDLEScanner not active.
60x40 DVN_STATUS_DEV_FAULTAt least one device not scanned.
70x80Reserved.

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)