IBASK(3)

πŸ“¦
version 4.3.7 Β· 2 versions
, in ubuntu stonking

πŸ’– 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 β€” value 0x1 Β· query gives you the GPIB primary address Β· works for board or device 🌸
  • IbaSAD β€” value 0x2 Β· query gives you the GPIB secondary address. It's 0 for none, or 0x60 to 0x7f for secondary addresses 0 to 31 Β· works for board or device ✨
  • IbaTMO β€” value 0x3 Β· query gives you the Timeout setting for io operations, which is a number from 0 to 17. Go look at ibmto() for the deets Β· works for board or device ⏳
  • IbaEOT β€” value 0x4 Β· query gives non-zero if EOI is asserted with the last byte on writes. See ibeot() Β· (no board/device note listed for this one!) πŸ¦‹
  • IbaPPC β€” value 0x5 Β· query gives you the Parallel poll configuration. See ibppc() Β· board πŸŽ€
  • IbaREADDR β€” value 0x6 Β· query gives Useless, included for compatibility only πŸ’€ like it's literally just there for the vibes. device
  • IbaAUTOPOLL β€” value 0x7 Β· query gives non-zero if automatic serial polling is enabled Β· board πŸ”₯
  • IbaCICPROT β€” value 0x8 Β· query gives Useless, included for compatibility only πŸ’€ (yeah, another one) Β· board
  • IbaSC β€” value 0xa Β· query gives non-zero if the board is system controller. See ibrsc() Β· board πŸ‘‘
  • IbaSRE β€” value 0xb Β· query gives non-zero if the board automatically asserts the REN line when it becomes the system controller. See ibrsc() Β· board ⚑
  • IbaEOSrd β€” value 0xc Β· query gives non-zero if termination of reads on reception of the end-of-string character is enabled. See ibeos(), especially the REOS bit Β· board or device πŸ“–
  • IbaEOSwrt β€” value 0xd Β· query gives non-zero if EOI is asserted whenever the end-of-string character is sent. See ibeos(), especially the XEOS bit Β· board or device ✍️
  • IbaEOScmp β€” value 0xe Β· 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. See ibeos(), especially the BIN bit Β· board or device 🧠
  • IbaEOSchar β€” value 0xf Β· query gives you the end-of-string byte Β· board or device πŸ”€
  • IbaPP2 β€” value 0x10 Β· 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 constants T1_DELAY_2000ns, T1_DELAY_500ns, and T1_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 the SPOLL bit in ibsta is enabled. Applies to: board. πŸ”
  • IbaSendLLO (0x17) β€” non-zero if devices connected to this board are automatically put into local lockout mode when brought online with ibfind() or ibdev(). Applies to: board. πŸ”’
  • IbaSPollTime (0x18) β€” timeout for serial polls. The result is between 0 and 17, and it means the same thing as in ibtmo(). Applies to: device. ⏳
  • IbaPPollTime (0x19) β€” timeout for parallel polls. The result is between 0 and 17, and it means the same thing as in ibtmo(). Applies to: board. βŒ›
  • IbaEndBitIsNormal (0x1a) β€” non-zero if the END bit of ibsta gets set on reception of the end-of-string character or EOI. Zero if the END bit is only set on EOI. Applies to: board or device. 🏁
  • IbaUnAddr (0x1b) β€” non-zero if UNT (untalk) and UNL (unlisten) commands are automatically sent after a completed ibrd* or ibwrt* 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 at ibeos(), especially the BIN bit, 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 © 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