ibask

Name

ibask -- query configuration (board or device)

Synopsis

#include <gpib/ib.h>

int ibask(int ud, int option, int *result);

Description

Queries various configuration settings associated with the board or device descriptor ud. The option argument specifies the particular setting you wish to query. The result of the query is written to the location specified by result. To change the descriptor's configuration, see ibconfig().

Table 1. ibask options

optionvalue (hexadecimal)result of queryused for board/device
IbaPAD0x1GPIB primary addressboard or device
IbaSAD0x2GPIB secondary address (0 for none, 0x60 to 0x7e for secondary addresses 0 to 30)board or device
IbaTMO0x3Timeout setting for io operations (a number from 0 to 17). See ibmto(). board or device
IbaEOT0x4Nonzero if EOI is asserted with last byte on writes. See ibeot().  
IbaPPC0x5Parallel poll configuration. See ibppc(). board
IbaREADDR0x6Useless, included for compatibility only.device
IbaAUTOPOLL0x7Nonzero if automatic serial polling is enabled.board
IbaCICPROT0x8Useless, included for compatibility only.board
IbaSC0xaNonzero if board is system controller. See ibrsc(). board
IbaSRE0xbNonzero if board autmatically asserts REN line when it becomes the system controller. See ibsre(). board
IbaEOSrd0xcNonzero if termination of reads on reception of the end-of-string character is enabled. See ibeos(), in particular the REOS bit. board or device
IbaEOSwrt0xdNonzero if EOI is asserted whenever end-of-string character is sent. See ibeos(), in particular the XEOS bit.board or device
IbaEOScmp0xeNonzero if all 8 bits are used to match end-of-string character. Zero if only least significant 7 bits are used. See ibeos(), in particular the BIN bit.board or device
IbaEOSchar0xfThe end-of-string byte.board or device
IbaPP20x10Nonzero if in local parallel poll configure mode. Zero if in remote parallel poll configure mode.board
IbaTIMING0x11Number indicating T1 delay. 1 for 2 microseconds, 2 for 500 nanoseconds, 3 for 350 nanoseconds. The values are declared in the header files as the constants T1_DELAY_2000ns, T1_DELAY_500ns, and T1_DELAY_350ns. board
IbaReadAdjust0x13Nonzero if byte pairs are automatically swapped during reads.board or device
IbaWriteAdjust0x14Nonzero if byte pairs are automatically swapped during writes.board or device
IbaEventQueue0x15Nonzero if event queue is enabled.board
IbaSPollBit0x16Nonzero if the use of the SPOLL bit in ibsta is enabled.board
IbaSendLLO0x17Nonzero if devices connected to this board are automatically put into local lockout mode when brought online with ibfind() or ibdev().board
IbaSPollTime0x18Timeout for serial polls. The value of the result is between 0 and 17, and has the same meaning as in ibtmo(). device
IbaPPollTime0x19Timeout for parallel polls. The value of the result is between 0 and 17, and has the same meaning as in ibtmo(). board
IbaEndBitIsNormal0x1aNonzero if END bit of ibsta is set on reception of end-of-string character or EOI. Zero if END bit is only set on EOI.board or device
IbaUnAddr0x1bNonzero if UNT (untalk) and UNL (unlisten) commands are automatically sent after a completed io operation using this descriptor.device
IbaHSCableLength0x1fUseless, included only for compatibility.board
IbaIst0x20Individual status bit, a.k.a. 'ist'.board
IbaRsv0x21The current status byte this board will use to respond to serial polls.board
IbaBNA0x200For a device: the board index (minor number) of interface board through which the device is being accessed. For a board: the board index of the board itself.board or device
Iba7BitEOS0x1000Nonzero if board supports 7 bit EOS comparisons. See ibeos(), in particular the BIN bit. This is a Linux-GPIB extension.board

Return value

The value of ibsta is returned.