Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-8
ni.com
If a device on the bus is unresponsive, its entry in the device information list has the tag
and device ID
unknown device
, but its address field is correct. Also, the flag bit
NIF_DEV_NO_RESPONSE
is set.
The device list includes devices in the fixed, temporary, and visitor address ranges.
If there are too few input buffers,
nifGetDeviceList
returns an error code, but the
numDevices
parameter is set to the total number of devices available. In this case, the buffers
you pass in do
not
contain valid data, but the revision number is set to the correct value.
If a device is an interface device, then the flag bit
NIF_DEV_INTERFACE
is set. You can
abort a pending
nifGetDeviceList
call by closing the link descriptor on which the call
was made.
To determine how many list items are to be returned in the call, call the function twice.
The first time you call the function, set the
numDevices
parameter to 0. The function will
return an error stating that there were not enough buffers configured, and it will return a new
number for
numDevices
. Use this new
numDevices
parameter to allocate memory for the
data. When you call the function the second time use this new parameter. By doing so you
will allocate only as much memory as necessary.
nifHseDeviceInfo_t
is defined as follows.
typedef struct {
uint32 IpAddress;
uint16 deviceIndex;
uint16 maxDeviceIndex;
uint32 hseRepeatTime;
uint8 state;
uint8 type;
uint8 deviceRedundancyState;
uint8 duplicateDetectionState;
uint16 lanRedundancyPort;
uint16 reserved;
uint32 annunciationVersionNumber;
uint32 hseDeviceVersionNumber;
uint32 numH1Ports;
uint32 *h1VersionList;
} nifHseDeviceInfo_t;
nifDeviceInfo_t
is defined as follows.
typedef struct {
char deviceID[DEV_I 1];
char pdTag[TA 1];
uint8 nodeAddress;