beautypg.com

Findlisteners – Measurement Computing Personal488 rev.3.0 User Manual

Page 87

background image

Personal488 for Windows 95/98/Me/NT/2000

04-10-01

API Reference 6-19

FindListeners

Syntax

INT WINAPI FindListeners(DevHandleT devHandle, BYTE primary,

LPWORD listener, DWORD limit);

devHandle

refers to either an IEEE 488 interface or an external device. If

devHandle

refers to an external device, then the

FindListeners

command acts on the

hardware interface to which the external device is attached.

primary

is the primary IEEE 488 bus address to check.

listener

is a pointer to a list that contains all Listeners found on the specified interface

board. You must allocate enough memory to accommodate all of the possible Listeners
up to the limit that he specified.

limit

is the maximum number of Listeners to be entered into the Listener list.

Returns

-1

if error

otherwise, the number of Listeners found on the interface

Bus States

ATN

MTA, UNL, LAG

Example

WORD listeners[5];

errorcode = FindListeners(ieee,10,listeners,5);

See Also

CheckListener, BusAddress, Status

The

FindListeners

command finds all of the devices configured to Listen at the specified primary

address on the IEEE 488 bus. The command first identifies the primary address to check and returns the
number of Listeners found and their addresses. Then, it fills the user-supplied array with the addresses of
the Listeners found. The number of Listeners found is the value returned by the function. The returned
values include the secondary address in the upper byte, and the primary address in the lower byte. If there
is no secondary address, then the upper byte is set to

255

; hence, a device with only a primary address of

16

and no secondary address is represented as

0xFF10

or

-240

decimal.

This manual is related to the following products: