![background image](http://html1.mh-extra.com/html/national-instruments/foundation-ni-fbus/foundation-ni-fbus_hardware-and-software-user-manual_709117123.webp)
Chapter 6
NI-FBUS Function Reference
©
National Instruments Corporation
6-61
NI-FBUS Hardware and Software User Manual
nifWaitAlert2
Purpose
Waits for an alert (an event or an alarm) from a specific device or from
any
device.
nifWaitAlert2
supports Standard Diagnostics Alert.
Format
nifError_t
nifWaitAlert2(
nifDesc_t ud,
nifAlertData2_t *aldata,
uint8 alertPriority)
Input
ud
The descriptor of the session, link, physical device, VFD, block,
or link the alert comes from.
alertPriority
Lowest priority of the alert coming in that you want to wait on.
Output
aldata
The information about the specific alert (supports Standard
Diagnostics Alert).
Context
Block, VFD, physical device, link, session.
Description
nifWaitAlert2
is compatible with all of the alert types of
nifWaitAlert
, and
nifWaitAlert2
is able to support Standard Diagnostics Alert. It is recommended that
you use
nifWaitAlert2
instead of
nifWaitAlert
.
ud
represents a descriptor of a session, link, a physical device, a VFD, or a block. If
ud
is a VFD descriptor, then the NI-FBUS Communications Manager waits for an alert from
any block in the Virtual Field Device. If
ud
is a block, the NI-FBUS Communications
Manager waits for an alarm or event from the block
ud
refers to. If
ud
represents a link,
nifWaitAlert2
completes when an event is received from any device connected to that link.
If the descriptor is a session descriptor, the function waits on any event from any attached link.
nifWaitAlert2
waits indefinitely until the NI-FBUS Communications Manager receives an
alert with a priority greater than or equal to the input alert priority. Your application can have
a dedicated thread which does
nifWaitAlert2
only.