Provided by: libgpib-doc_4.3.7-5_all 

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 5. ibask options
┌─────────────────────┬─────────────────────────┬─────────────────────────────┬─────────────────────────┐
│ option │ value (hexadecimal) │ result of query │ used for board/device │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaPAD │ 0x1 │ GPIB primary address │ board or device │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaSAD │ 0x2 │ GPIB secondary address │ board or device │
│ │ │ (0 for none, 0x60 to │ │
│ │ │ 0x7f for secondary │ │
│ │ │ addresses 0 to │ │
│ │ │ 31) │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaTMO │ 0x3 │ Timeout setting for io │ board or device │
│ │ │ operations (a number │ │
│ │ │ from 0 to 17). See │ │
│ │ │ ibmto(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaEOT │ 0x4 │ Nonzero if EOI is │ │
│ │ │ asserted with last │ │
│ │ │ byte on writes. │ │
│ │ │ See ibeot(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaPPC │ 0x5 │ Parallel poll │ board │
│ │ │ configuration. See │ │
│ │ │ ibppc(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaREADDR │ 0x6 │ Useless, included for │ device │
│ │ │ compatibility only. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaAUTOPOLL │ 0x7 │ Nonzero if automatic │ board │
│ │ │ serial polling is │ │
│ │ │ enabled. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaCICPROT │ 0x8 │ Useless, included for │ board │
│ │ │ compatibility only. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaSC │ 0xa │ Nonzero if board is │ board │
│ │ │ system controller. │ │
│ │ │ See ibrsc(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaSRE │ 0xb │ Nonzero if board │ board │
│ │ │ automatically asserts │ │
│ │ │ the REN line when │ │
│ │ │ it becomes the │ │
│ │ │ system controller. │ │
│ │ │ See ibrsc(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaEOSrd │ 0xc │ Nonzero if termination │ board or device │
│ │ │ of reads on reception │ │
│ │ │ of the end-of-string │ │
│ │ │ character is │ │
│ │ │ enabled. See ibeos(), │ │
│ │ │ in particular the │ │
│ │ │ REOS bit. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaEOSwrt │ 0xd │ Nonzero if EOI is │ board or device │
│ │ │ asserted whenever │ │
│ │ │ end-of-string │ │
│ │ │ character is │ │
│ │ │ sent. See │ │
│ │ │ ibeos(), in │ │
│ │ │ particular the XEOS │ │
│ │ │ bit. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaEOScmp │ 0xe │ Nonzero if all 8 bits │ board or device │
│ │ │ are used to match │ │
│ │ │ end-of-string │ │
│ │ │ character. Zero │ │
│ │ │ if only least │ │
│ │ │ significant 7 bits are │ │
│ │ │ used. See │ │
│ │ │ ibeos(), in │ │
│ │ │ particular the BIN │ │
│ │ │ bit. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaEOSchar │ 0xf │ The end-of-string │ board or device │
│ │ │ byte. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaPP2 │ 0x10 │ Nonzero if in local │ board │
│ │ │ parallel poll │ │
│ │ │ configure mode. Zero │ │
│ │ │ if in remote │ │
│ │ │ parallel poll │ │
│ │ │ configure mode. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaTIMING │ 0x11 │ Number indicating T1 │ board │
│ │ │ 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. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaReadAdjust │ 0x13 │ Nonzero if byte pairs │ board or device │
│ │ │ are automatically │ │
│ │ │ swapped during │ │
│ │ │ reads. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaWriteAdjust │ 0x14 │ Nonzero if byte pairs │ board or device │
│ │ │ are automatically │ │
│ │ │ swapped during │ │
│ │ │ writes. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaEventQueue │ 0x15 │ Nonzero if event queue │ board │
│ │ │ is enabled. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaSPollBit │ 0x16 │ Nonzero if the use of │ board │
│ │ │ the SPOLL bit in ibsta │ │
│ │ │ is enabled. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaSendLLO │ 0x17 │ Nonzero if devices │ board │
│ │ │ connected to this │ │
│ │ │ board are │ │
│ │ │ automatically put │ │
│ │ │ into local lockout │ │
│ │ │ mode when brought │ │
│ │ │ online with ibfind() │ │
│ │ │ or ibdev(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaSPollTime │ 0x18 │ Timeout for serial │ device │
│ │ │ polls. The value of │ │
│ │ │ the result is │ │
│ │ │ between 0 and 17, and │ │
│ │ │ has the same meaning │ │
│ │ │ as in ibtmo(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaPPollTime │ 0x19 │ Timeout for parallel │ board │
│ │ │ polls. The value of │ │
│ │ │ the result is │ │
│ │ │ between 0 and 17, and │ │
│ │ │ has the same meaning │ │
│ │ │ as in ibtmo(). │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaEndBitIsNormal │ 0x1a │ Nonzero if END bit of │ board or device │
│ │ │ ibsta is set on │ │
│ │ │ reception of │ │
│ │ │ end-of-string │ │
│ │ │ character or EOI. │ │
│ │ │ Zero if END bit is │ │
│ │ │ only set on EOI. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaUnAddr │ 0x1b │ Nonzero if UNT │ device │
│ │ │ (untalk) and UNL │ │
│ │ │ (unlisten) commands │ │
│ │ │ are automatically │ │
│ │ │ sent after a │ │
│ │ │ completed ibrd* or │ │
│ │ │ ibwrt* operation using │ │
│ │ │ this descriptor. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaHSCableLength │ 0x1f │ Useless, included only │ board │
│ │ │ for compatibility. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaIst │ 0x20 │ Individual status bit, │ board │
│ │ │ a.k.a. 'ist'. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaRsv │ 0x21 │ The current status │ board │
│ │ │ byte this board will │ │
│ │ │ use to respond to │ │
│ │ │ serial polls. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ IbaBNA │ 0x200 │ For a device: the │ board or device │
│ │ │ board index (minor │ │
│ │ │ number) of interface │ │
│ │ │ board through │ │
│ │ │ which the device │ │
│ │ │ is being accessed. │ │
│ │ │ For a board: the board │ │
│ │ │ index of the │ │
│ │ │ board itself. │ │
├─────────────────────┼─────────────────────────┼─────────────────────────────┼─────────────────────────┤
│ Iba7BitEOS │ 0x1000 │ Nonzero if board │ board │
│ │ │ supports 7 bit EOS │ │
│ │ │ comparisons. See │ │
│ │ │ ibeos(), in │ │
│ │ │ particular the BIN │ │
│ │ │ bit. This is a │ │
│ │ │ Linux-GPIB extension. │ │
└─────────────────────┴─────────────────────────┴─────────────────────────────┴─────────────────────────┘
RETURN VALUE
The value of ibsta is returned.
COPYRIGHT
Copyright © 2003-2006, 2008 Frank Mori Hess
linux-gpib 4.3.7 11/28/2025 IBASK(3)