Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-12
ni.com
nifGetVFDList
Purpose
Gathers VFD information on a specified physical device.
Format
nifError_t
nifGetVFDList(
nifDesc_t ud,
nifVFDInfo_t *info,
uint16 *numBuffers)
Input
ud
The descriptor of the physical device for which to get the VFD list.
numBuffers
The number of buffers allocated in the
info
list.
Output
numBuffers
The number of VFDs actually in the device.
info
The VFD information.
Context
Physical device.
Description
nifGetVFDList
gathers function block application VFD information from the specified
physical device.
If there are too few input buffers, or if the input buffer pointer is NULL, an error code is
returned, but the
numBuffers
parameter is set to the total number of VFDs in the device.
In this case, no buffers contain valid data on output.
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
numBuffers
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
numBuffers
. Use this new
numBuffers
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.
The
info
parameter has the following format:
typedef struct {
char vfdTag[TA1];
char vendor[TA1];
char model[TA1];