Chapter 6
NI-FBUS Function Reference
©
National Instruments Corporation
6-5
NI-FBUS Hardware and Software User Manual
nifGetBlockList
Purpose
Returns a list of information for all blocks of the specified type present in the VFD.
Format
nifError_t
nifGetBlockList(
nifDesc_t ud,
uint8 whichTypes,
nifBlockInfo_t *info,
uint16 *numBlocks)
Input
ud
The descriptor of a VFD.
whichTypes
Specifies what types of blocks to return (function, transducer,
or physical).
numBlocks
The number of buffers allocated in the
info
list.
Output
info
The list of information associated with each block.
numBlocks
The number of blocks actually in the VFD.
Context
VFD.
Description
nifGetBlockList
returns information about all the blocks in the specified VFD. A
block
can be a resource block, transducer block, or function block residing within a VFD. Only
blocks of the types specified by
whichTypes
are returned.
To determine how many list items are to be returned, call the function twice. The first time
you call the function, set the
numBlocks
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
numBlocks
. Use this new
numBlocks
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.
nifBlockInfo_t
is defined as follows:
typedef struct {
char fbTag[TA 1];
uint16 startIndex;