FINDLSTN(3)

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

πŸ’– FINDLSTN(3) β€” the find devices era πŸ’–

okay bestie, pulling up FINDLSTN(3) from the linux-gpib manual, section 3, and it's giving library function with main character energy. Let's get into it 🫢


✨ NAME ✨

FindLstn β€” find devices 🌈


πŸŽ€ SYNOPSIS πŸŽ€

#include <gpib/ib.h>

void FindLstn(int board_desc, const Addr4882_t padList[],
              Addr4882_t resultList[], int maxNumResults);

πŸ’… DESCRIPTION πŸ’…

so FindLstn() is literally the girl that goes around checking the primary addresses in the padList array to see which ones are actual devices. no cap. πŸ‘‘

Every GPIB address of every device she finds gets tucked into the resultList array, and ibcnt gets set to the number of devices found. iconic behaviour, honestly. ✨

The maxNumResults parameter is the cap β€” it limits the max number of results that will be returned, and you usually set it to however many elements are in your resultList array. And if more than maxNumResults devices show up? 🫒 an ETAB error gets returned in iberr. so keep your list big enough or she will clock you.

padList should consist of primary addresses only β€” no secondary addresses, periodt. (But lowkey, all possible secondary addresses will be checked as necessary, so she's got you covered anyway. πŸ’–)

🚨 real talk: your GPIB board must have the capability to monitor the NDAC bus line in order to use this function (see iblines).

This function has an extra side effect you should know about: it addresses the board as talker for the duration of the Find Listeners protocol. that's beyond what IEEE 488.2 specifies, which is a whole thing. 😭 The reason is that some boards cannot reliably read the state of the NDAC bus line unless they are the talker. Being the talker causes the board's gpib transceiver to configure NDAC as an input, so its state can be reliably read from the bus through the transceiver. it's giving "fine, I'll do it myself" πŸ’…


Copyright © 2003-2006, 2008 Frank Mori Hess 🌸


and that's the whole vibe check bestie β€” this was linux-gpib version 4.3.7, dated 07/06/2026. slay, go find those devices, mwah πŸ’œπŸ¦‹

πŸ“¦ where this page comes from