IBRD(3)

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

✨ IBRD πŸ’…

okay bestie, gather round, because ibrd is literally the moment where you finally get to hear what the instrument has to say 🎀✨ it lives in the Traditional API Functions section, and yes she's iconic, she's been holding it down since forever.


🌸 NAME 🌸

ibrd β€” read data bytes (board or device) 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <gpib/ib.h>

int ibrd(int ud, void *buffer, long num_bytes);

πŸ’– DESCRIPTION πŸ’–

so basically, ibrd() is the function you call when you want to read data bytes from a device or a board β€” she does both, she's versatile like that πŸ‘‘ The argument ud can be either a device descriptor or a board descriptor, so you literally just hand her whichever one you've got.

She reads up to num_bytes bytes into the user-supplied array buffer. That's up to, bestie β€” don't assume she's gonna fill the whole thing. πŸ”₯

Now, the tea on how the read ends: the read may be terminated by any of these, and yes you need to know all of them:

  • a timeout occurring (check out ibtmo() for that one ⏰)
  • the talker asserting the EOI line
  • the board receiving the end-of-string character (peep ibeos() for the deets ✨)
  • receiving a device clear command
  • receiving an interface clear

Then the addressing behaves differently depending on what kind of descriptor you passed in, and this part is lowkey important:

  • If ud is a device descriptor, the library handles it for you β€” she automatically handles addressing the device as talker and the interface board as listener before performing the read. Main character energy, she's got it covered πŸ’…
  • If ud is a board descriptor, no addressing is performed, and the board must be addressed as a listener by the controller-in-charge. So that one is on you, bestie. πŸ™ˆ

And after the ibrd() call: ibcnt and ibcntl get set to the number of bytes read. Free receipts πŸ“


⭐ RETURN VALUE ⭐

The value of ibsta is returned. That's the whole vibe check right there.


Copyright Β© 2003-2006, 2008 Frank Mori Hess


so that's ibrd, she ate and left no crumbs πŸ“ this was linux-gpib version 4.3.7, dated 07/06/2026, and that's the whole page bestie β€” go read some bytes, ily, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from