FindLstn doesn't return if no devices found.
Michael K via Linux-gpib-general <[email protected]> Sun, 17 Apr 2022 00:19:10 +0000 (UTC)
| Newsgroups | gmane.linux.hardware.gpib.general |
|---|---|
| Message-ID | <[email protected]> |
I'm trying to use FindLstn to query the GPIB.
When a device is found, things work as expected but if there are no devices connected to the controller ( HP 82357b ) FindLstn hangs.
I'm using the latest SVN branch.
Is this correct behavior ?
Michael
#define MAX_PRIMARY_DEVICES 30
#define MAX_SECONDARY_DEVICES 10
Addr4882_t deviceList[ MAX_PRIMARY_DEVICES + 1 ] = {};
Addr4882_t resultList[ MAX_PRIMARY_DEVICES * MAX_SECONDARY_DEVICES ] = {};
GPIBdevice devices[] = {
{ A4882( ADDR_HP8753C, 0 ), "HP8753C", { FALSE } },
{ A4882( ADDR_HP33401A_MULTIMETER, 0 ), "HP33401A Multimeter", { FALSE } }
};
gint MAX_ENUMERATED_DEVICES = ((sizeof( devices ) / sizeof( GPIBdevice )));
for( i=0; i < MAX_PRIMARY_DEVICES + 1; i++ ) {
if( i < MAX_ENUMERATED_DEVICES )
deviceList[ i ] = devices[i].GPIBaddress;
else
deviceList[ i ] = NOADDR;
}
FindLstn( descGPIBcontroller, deviceList, resultList, MAX_PRIMARY_DEVICES * MAX_SECONDARY_DEVICES);
// Never gets here unless a device responds
_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general