ibevent

Name

ibevent -- get events from event queue (board)

Synopsis

#include <gpib/ib.h>

int ibevent(int ud, short *event);

Description

ibevent() is used to obtain the oldest event stored in the event queue of the board specified by the board descriptor ud. The EVENT bit of ibsta indicates that the event queue contains 1 or more events. An event may be a clear command, a trigger command, or reception of an interface clear. The type of event is stored in the location specified by event and may be set to any of the following values:

Table 1. events

constantvaluedescription
EventNone0The board's event queue is empty
EventDevTrg1The board has received a trigger command from the controller-in-charge.
EventDevClr2The board has received a clear command from the controller-in-charge.
EventIFC3The board has received an interface clear from the system controller. Note, some models of GPIB interface board lack the ability to report interface clear events.

The event queue is disabled by default. It may be enabled by a call to ibconfig(). Each interface board has a single event queue which is shared across all processes and threads. So, only one process can retrieve any given event from the queue. Also, the queue is of finite size so events may be lost (ibevent() will return an error) if it is neglected too long.

Return value

The value of ibsta is returned.