
Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-14
ni.com
nifOpenBlock
Purpose
Returns a descriptor representing a block.
Format
nifError_t
nifOpenBlock (
nifDesc_t ud,
char *blockTag,
nifDesc_t *out_ud)
nifError_t
nifOpenBlock (
nifDesc_t ud,
NIFB_ORDINAL(n),
nifDesc_t *out_ud)
Input
ud
A valid session, link, physical device, or VFD descriptor.
blockTag
The tag of the block. To access a block by ordinal number within
a VFD, use the
NIFB_ORDINAL
macro in the
nifbus.h
header
file. You can only access a block by ordinal number for VFD
descriptors.
Output
out_ud
A descriptor for the block you request.
Context
VFD, physical device, link, session.
Description
nifOpenBlock
returns a descriptor for the block you specify. You must pass a valid session,
link, physical device, or VFD descriptor to this function.
There are two ways to specify the block: by tag and by ordinal number. To open the
block by its tag, you must set
blockTag
to the current tag of the block. The NI-FBUS
Communications Manager returns an error if it finds more than one block with the
same tag. You can obtain the list of block tags within a specified VFD with a call to
nifGetBlockList
.
To open the block by its ordinal number, use the
NIFB_ORDINAL
macro. This macro is valid
only if
ud
is a VFD descriptor. The first block in a VFD has the ordinal number zero. Notice
that the first block in a VFD is always the resource block.