Asynchronous Event Notification Overview
NI-488.2 applications can asynchronously receive event notifications using the ibnotify function. This function is useful if you want your application to be notified asynchronously about the occurrence of one or more GPIB events. For example, you might choose to use ibnotify if your application only needs to interact with your GPIB device when it is requesting service. After calling ibnotify, your application does not need to check the status of your GPIB device. Then, when your GPIB device requests service, the NI-488.2 driver automatically notifies your application that the event has occurred by invoking a callback function. The callback function is registered with the NI-488.2 driver when the ibnotify call is made.
Both board-level and device-level ibnotify calls are supported by the NI-488.2 driver. If you are using device-level calls, you call ibnotify with a device handle for ud and a mask of RQS, CMPL, END, or TIMO. If you are using board-level calls, you call ibnotify with a board handle for ud and a mask of any value except RQS. Note that the ibnotify mask bits are identical to the ibwait mask bits. In the example of waiting for your GPIB device to request service, you might choose to pass ibnotify a mask with RQS (for device-level) or SRQI (for board-level). The callback function that you register with the ibnotify call is invoked by the NI-488.2 driver when one or more of the mask bits passed to ibnotify is true.
For more information about usage, please refer to either the ibnotify Usage or the GpibNotify Usage section. For more specific information about ibnotify, refer to the ibnotify function definition. For more information about the GpibNotify OLE control, refer to the GpibNotify function definition.