IBASK(3)
π IBASK(3) β Traditional API Functions π
okay bestie, pull up a chair π«Ά this is ibask from section 3 of the manual, living under the Traditional API Functions umbrella, and it's literally your little spyglass into how a GPIB board or device is currently set up π
β¨ NAME β¨
ibask β the "hey, what's your configuration rn?" function, for a board or a device πΈ
β¨ SYNOPSIS β¨
#include <gpib/ib.h>
int ibask(int ud, int option, int *result);
β¨ DESCRIPTION β¨
So here's the vibe: ibask() goes and interrogates all the different configuration settings that belong to the board or device descriptor you hand it in ud πβ¨
The option argument is you telling it which specific setting you want to peek at π β it's the little label on the drawer you're opening.
Then the answer? It gets written straight into the location that result points at π¬ so make sure that pointer is somewhere real, bestie, no cap.
and if you want to actually change the descriptor's configuration instead of just asking about it, that's a whole different function β go look at ibconfig() π
π The Options Table, bestie β every single one π
Okay so this is Table 5. ibask options β¨ Every row = one option, its hex value, what you get back when you query it, and whether it's a board thing, a device thing, or both. No skipping, we're doing all of them π«Ά
IbaPADβ value0x1Β· query gives you the GPIB primary address Β· works for board or device πΈIbaSADβ value0x2Β· query gives you the GPIB secondary address. It's0for none, or0x60to0x7ffor secondary addresses0to31Β· works for board or device β¨IbaTMOβ value0x3Β· query gives you the Timeout setting for io operations, which is a number from0to17. Go look atibmto()for the deets Β· works for board or device β³IbaEOTβ value0x4Β· query gives non-zero if EOI is asserted with the last byte on writes. Seeibeot()Β· (no board/device note listed for this one!) π¦IbaPPCβ value0x5Β· query gives you the Parallel poll configuration. Seeibppc()Β· board πIbaREADDRβ value0x6Β· query gives Useless, included for compatibility only π like it's literally just there for the vibes. deviceIbaAUTOPOLLβ value0x7Β· query gives non-zero if automatic serial polling is enabled Β· board π₯IbaCICPROTβ value0x8Β· query gives Useless, included for compatibility only π (yeah, another one) Β· boardIbaSCβ value0xaΒ· query gives non-zero if the board is system controller. Seeibrsc()Β· board πIbaSREβ value0xbΒ· query gives non-zero if the board automatically asserts the REN line when it becomes the system controller. Seeibrsc()Β· board β‘IbaEOSrdβ value0xcΒ· query gives non-zero if termination of reads on reception of the end-of-string character is enabled. Seeibeos(), especially theREOSbit Β· board or device πIbaEOSwrtβ value0xdΒ· query gives non-zero if EOI is asserted whenever the end-of-string character is sent. Seeibeos(), especially theXEOSbit Β· board or device βοΈIbaEOScmpβ value0xeΒ· query gives non-zero if all 8 bits are used to match the end-of-string character, and zero if only the least significant 7 bits are used. Seeibeos(), especially theBINbit Β· board or device π§IbaEOScharβ value0xfΒ· query gives you the end-of-string byte Β· board or device π€IbaPP2β value0x10Β· query gives non-zero if in
local parallel poll configure mode. Zero if in remote parallel poll configure mode. β¨
IbaTIMING(0x11) β a number that tells you the T1 delay.1= 2 microseconds,2= 500 nanoseconds,3= 350 nanoseconds. The header files declare these as the constantsT1_DELAY_2000ns,T1_DELAY_500ns, andT1_DELAY_350ns. Applies to: board. π°οΈIbaReadAdjust(0x13) β non-zero if byte pairs are automatically swapped during reads. Applies to: board or device. πIbaWriteAdjust(0x14) β non-zero if byte pairs are automatically swapped during writes. Applies to: board or device. βοΈIbaEventQueue(0x15) β non-zero if the event queue is enabled. Applies to: board. ποΈIbaSPollBit(0x16) β non-zero if using theSPOLLbit inibstais enabled. Applies to: board. πIbaSendLLO(0x17) β non-zero if devices connected to this board are automatically put into local lockout mode when brought online withibfind()oribdev(). Applies to: board. πIbaSPollTime(0x18) β timeout for serial polls. The result is between0and17, and it means the same thing as inibtmo(). Applies to: device. β³IbaPPollTime(0x19) β timeout for parallel polls. The result is between0and17, and it means the same thing as inibtmo(). Applies to: board. βIbaEndBitIsNormal(0x1a) β non-zero if theENDbit ofibstagets set on reception of the end-of-string character orEOI. Zero if theENDbit is only set onEOI. Applies to: board or device. πIbaUnAddr(0x1b) β non-zero ifUNT(untalk) andUNL(unlisten) commands are automatically sent after a completedibrd*oribwrt*operation using this descriptor. Applies to: device. π£οΈIbaHSCableLength(0x1f) β literally useless, included only for compatibility. Applies to: board. πIbaIst(0x20) β individual status bit, a.k.a.'ist'. Applies to: board. πIbaRsv(0x21) β the current status byte this board will use to respond to serial polls. Applies to: board. π¬IbaBNAβ0x200β bestie, for a device this is the board index (aka the minor number π ) of the interface board you're reaching that device through. For a board? It's the board index of that board itself, no middleman β¨ β board or device vibes, so it plays for both.Iba7BitEOSβ0x1000β nonzero if the board supports 7 bit EOS comparisons π go peek atibeos(), especially theBINbit, iykyk. This one is a Linux-GPIB extension β β board-only, so don't come looking for it on a device πΈ
π RETURN VALUE π
The value of ibsta is returned. That's it, that's the whole tea π«Ά the status word comes back to you and you go read your flags off it, periodt π
π COPYRIGHT π
Copyright Β© 2003-2006, 2008 Frank Mori Hess π
and that's a wrap on IBASK(3), bestie π¦ this one shipped in linux-gpib 4.3.7, dated 07/06/2026. go forth and interrogate your boards, mwah πβ¨
π¦ where this page comes from
- ubuntu stonking: libgpib-doc 4.3.7-6 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms