IBRD(3)
β¨ 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
udis 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
udis 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 π
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
- 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