![background image](http://html1.mh-extra.com/html/national-instruments/foundation-ni-fbus/foundation-ni-fbus_hardware-and-software-user-manual_709117124.webp)
Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-62
ni.com
When the NI-FBUS Communications Manager interface receives an alert, the
aldata
parameter is filled in with the information about the
aldata
. The
form of
aldata->alertData
depends on the value of
aldata->alertType
.
aldata->alarmOrEventName
is the name of the alarm parameter or event parameter that
caused the alert.
aldata->deviceTag
and
aldata->blockTag
are the tags of the device
and the block of the alarm, respectively.
nifWaitAlert2
sends a confirmation to the device, informing the alerting device that the
alert was received. Note that this is a separate step from alert acknowledgment, which must
be carried out for alarms using
nifAcknowledgeAlarm
.
If you have multiple threads waiting to receive the same alert, the NI-FBUS Communications
Manager sends a copy of the alert to all the waiting threads. Your application must ensure that
only one thread acknowledges any one alarm with a call to
nifAcknowledgeAlarm
. You can
abort a pending
nifWaitAlert2
call by closing the descriptor on which the call was made.
The
alertType
parameter can be
ALERT_ANALOG
,
ALERT_DISCRETE
,
ALERT_UPDATE
, or
or
ALERT_STANDARD_DIAGNOSTICS
.
nifAlertData2_t
is defined as follows:
typedef struct nifAlertData2_t{
uint8 alertType;
char deviceTag[TA 1];
char blockTag[TA 1];
char alarmOrEventName [TA 1];
uint8 alertKey;
uint8 standardType;
uint8 mfrType;
uint8 messageType;
uint8 priority;
uint8 reserved[3];
nifTime_t timeStamp;
union {
nifAlertAnalogData_t analog;
nifAlertDiscreteData_t discrete;
nifAlertUpdateData_t update;
nifAlertStandardDiagnosticsData_t stdDiag;
} alertData;
} nifAlertData2_t;
typedef struct nifAlertAnalogData_t {
uint16 subCode;
float value;
uint32 relativeIndex;
uint16 unitIndex;