IBRSP(3)

NAME
ibrsp - read status byte / serial poll (device)

SYNOPSIS

#include <gpib/ib.h>

int ibrsp(int ud, char *result);

DESCRIPTION

ibrsp() obtains the status byte from the device specified by ud. The status byte is stored in the location specified by result.

If automatic serial polling is enabled on the board controlling the device, the status byte is automatically read and queued whenever the device requests service. If the status byte queue is not empty ibrsp() obtains the status byte information from the queue. If the queue is empty the status byte is obtained by serial polling the device. Automatic serial polling is controlled with ibconfig(). The contents of the status byte returned in result are device specific. Refer to the device manufacturer's documentation for details. For devices conforming to the IEEE488.1 or 2 specification the bits defined in the table below are available if enabled in the device's Status Byte Enable register.

Table 10. Standard IEEE.488 GPIB status byte bits
constant | value | description
IbStbRQS | 0x40 | The request service bit is set when device asserts RQS. It is cleared by serial polling the device. Supported by devices conforming to IEEE 488.1 or IEEE 488.2.
IbStbESB | 0x20 | The event-status bit is set when there are one or more bits set in the device's Standard Event Status Register. It is cleared by reading the Standard Event Status Register. For devices conforming to IEEE 488.2 only.
IbStbMAV | 0x10 | The message available bit indicates whether or not the device's data output queue is empty. Whenever the device has data available, this bit will be set. It is cleared when the output queue is empty. The queue is emptied by reading data from the device with ibrd() for example. For devices conforming to IEEE 488.2 only.

RETURN VALUE

The value of ibsta is returned.

COPYRIGHT
Copyright © 2003-2006, 2008 Frank Mori Hess