Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-18
ni.com
nifOpenPhysicalDevice
Purpose
Returns a descriptor representing a physical device.
Format
nifError_t
nifOpenPhysicalDevice (
nifDesc_t ud,
uint8 tagOrDevID,
char *name,
nifDesc_t *out_ud)
Input
ud
A valid session or link descriptor on which to open the device.
tagOrDevID
How to specify the device: zero if by physical device tag, one if by
device ID.
name
The tag or device ID.
Output
out_ud
A descriptor for the device you request
Context
Link, session.
Description
nifOpenPhysicalDevice
returns a descriptor for the physical device you specify. You
must pass a valid session or link descriptor to this function. If you pass a link descriptor,
the NI-FBUS Communications Manager searches only that link for the specified device.
There are two ways you can specify the device. If the
tagOrDevID
parameter is zero, then
the
name
specifies the tag of the physical device. If
tagOrDevID
is one, then
name
is the
device ID of the device you specify. You can obtain the list of physical device tags and device
IDs of devices on the network with a call to
nifGetDeviceList
.
Return Values
E_OK
The call was successful.
E_INVALID_DESCRIPTOR
The input descriptor is invalid.
E_BAD_ARGUMENT
The
tagOrDevID
value is not valid.
E_NOT_FOUND
No attached physical device has the specified device ID or
physical device tag.