iblines

Name

iblines -- monitor bus lines (board)

Synopsis

#include <gpib/ib.h>

int iblines(int ud, short *line_status);

Description

iblines() is used to obtain the status of the control and handshaking bus lines of the bus. The board used to monitor the bus is specified by the ud argument, and the status of the various bus lines are written to the location specified by line_status.

Some older chips are not capable of reporting the status of the bus lines, so each line has two corresponding bits in line_status. One bit indicates if the board can monitor the line, and the other bit indicates the line's state. The meaning of the line_status bits are as follows:

Table 1. line status bits

constantvaluedescription
ValidDAV0x1The BusDAV bit is valid.
ValidNDAC0x2The BusNDAC bit is valid.
ValidNRFD0x4The BusNRFD bit is valid.
ValidIFC0x8The BusIFC bit is valid.
ValidREN0x10The BusREN bit is valid.
ValidSRQ0x20The BusSRQ bit is valid.
ValidATN0x40The BusATN bit is valid.
ValidEOI0x80The BusEOI bit is valid.
BusDAV0x100Set/cleared if the DAV line is asserted/unasserted.
BusNDAC0x200Set/cleared if the NDAC line is asserted/unasserted.
BusNRFD0x400Set/cleared if the NRFD line is asserted/unasserted.
BusIFC0x800Set/cleared if the IFC line is asserted/unasserted.
BusREN0x1000Set/cleared if the REN line is asserted/unasserted.
BusSRQ0x2000Set/cleared if the SRQ line is asserted/unasserted.
BusATN0x4000Set/cleared if the ATN line is asserted/unasserted.
BusEOI0x8000Set/cleared if the EOI line is asserted/unasserted.

Return value

The value of ibsta is returned.