Chapter 6
NI-FBUS Function Reference
©
National Instruments Corporation
6-7
NI-FBUS Hardware and Software User Manual
nifGetDeviceList
Purpose
Returns the list of information for all active devices on the network.
Format
nifError_t
nifGetDeviceList(nifDesc_t link,
nifDeviceInfo_t *devInfo,
uint16 *numDevices,
uint16 *revision)
Input
link
The link descriptor for which to return information.
numDevices
The number of allocated list entries.
revision
The revision number from the last
nifGetDeviceList
call,
or zero (refer to the
section for usage).
Output
devInfo
The list of device information.
numDevices
The number of devices present in the link.
revision
Current revision number of the live list that the NI-FBUS
Communications Manager reads from the Fieldbus interface to
the specified link.
Context
Link.
Description
nifGetDeviceList
returns a list of information describing each device on the link. A
link
is a group of Fieldbus devices connected across a single wire pair with no intervening bridges.
Before
nifGetDeviceList
returns the list of information, it waits until the revision
argument passed in differs from the live list revision number the Fieldbus interface keeps for
the specified link. The revision numbers the Fieldbus interface keeps start at one, so if you
pass in a zero for
revision
, you can force
nifGetDeviceList
to immediately return the
current device list. To use
nifGetDeviceList
most effectively, you should pass in the
revision
parameter output from the previous call to
nifGetDeviceList
in subsequent
calls to it. Using the revision parameter output from the previous call forces
nifGetDeviceList
to wait until the device list has actually changed before returning the
list of information.