Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-60
ni.com
nifWaitAlert
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
nifWaitAlert
call by closing the descriptor on which the call was made.
The
alertType
parameter can be
ALERT_ANALOG
,
ALERT_DISCRETE
, or
ALERT_UPDATE
.
nifAlertData_t
is defined as follows:
typedef struct nifAlertData_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;
nifTime_t timeStamp;
uint16 subCode;
uint16 unitIndex;
union {
float floatAlarmData;
uint8 discreteAlarmData;
uint16 staticRevision;
} alertData;
} nifAlertData_t;
Return Values
E_OK
The call was successful.
E_INVALID_DESCRIPTOR
The descriptor you gave is invalid.
E_OBSOLETE_DESC
The input descriptor is no longer valid. It was closed before
nifWaitAlert
completed.
E_SERVER_CONNECTION_LOST
The session established with the NI-FBUS Communications
Manager for this descriptor has been closed or lost.