table of contents
- trixie-backports 4.3.7-5~bpo13+1
- testing 4.3.7-6
- unstable 4.3.7-6
| IBSTA(3) | IBSTA(3) |
NAME¶
ibsta - holds status
SYNOPSIS¶
#include <gpib/ib.h> volatile int ibsta;
DESCRIPTION¶
ibsta is set whenever a function from the 'traditional' or 'multidevice' API is called. Each of the bits in ibsta has a different meaning, summarized in the following table:
"IBSTA BITS" bitvalue (hexadecimal)meaningused for board/deviceDCAS0x1DCAS is set when a board receives the device clear command (that is, the SDC or DCL command byte). It is cleared on the next 'traditional' or 'multidevice' function call following ibwait() (with DCAS set in the wait mask), or following a read or write (ibrd(), ibwrt(), Receive(), etc.). The DCAS and DTAS bits will only be set if the event queue is disabled. The event queue may be disabled with ibconfig().boardDTAS0x2DTAS is set when a board has received a device trigger command (that is, the GET command byte). It is cleared on the next 'traditional' or 'multidevice' function call following ibwait() (with DTAS in the wait mask). The DCAS and DTAS bits will only be set if the event queue is disabled. The event queue may be disabled with ibconfig().boardLACS0x4Board is currently addressed as a listener (IEEE listener state machine is in LACS or LADS).boardTACS0x8Board is currently addressed as talker (IEEE talker state machine is in TACS or TADS).boardATN0x10The ATN line is asserted.boardCIC0x20Board is controller-in-charge, so it is able to set the ATN line.boardREM0x40Board is in 'remote' state.boardLOK0x80Board is in 'lockout' state.boardCMPL0x100I/O operation is complete. Useful for determining when an asynchronous I/O operation (ibrda(), ibwrta(), etc) has completed.board or deviceEVENT0x200One or more clear, trigger, or interface clear events have been received, and are available in the event queue (see ibevent()). The EVENT bit will only be set if the event queue is enabled. The event queue may be enabled with ibconfig().boardSPOLL0x400If this bit is enabled (see ibconfig()), it is set when the board is serial polled. The SPOLL bit is cleared when the board requests service (see ibrsv()) or you call ibwait() on the board with SPOLL in the wait mask. boardRQS0x800RQS indicates that the device has requested service, and one or more status bytes are available for reading with ibrsp(). RQS will only be set if you have automatic serial polling enabled (see ibconfig()).deviceSRQI0x1000SRQI indicates that a device connected to the board is asserting the SRQ line. It is only set if the board is the controller-in-charge. If automatic serial polling is enabled (see ibconfig()), SRQI will generally be cleared, since when a device requests service it will be automatically polled and then unassert SRQ.boardEND0x2000END is set if the last io operation ended with the EOI line asserted, and may be set on reception of the end-of-string character. The IbcEndBitIsNormal option of ibconfig() can be used to configure whether or not END should be set on reception of the eos character. board or deviceTIMO0x4000TIMO indicates that the last io operation or ibwait() timed out.board or deviceERR0x8000ERR is set if the last 'traditional' or 'multidevice' function call failed. The global variable iberr will be set indicate the cause of the error.board or device
If you wish to avoid using a global variable, you may instead use ThreadIbsta() which returns a thread-specific value.
| 02 October 2025 |