UL for Linux
User library to access and control supported MCC hardware over the Linux platform
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
Device Discovery

Manage the MCC devices that are available to the system. More...

Functions

UlError ulGetDaqDeviceInventory (DaqDeviceInterface interfaceTypes, DaqDeviceDescriptor daqDevDescriptors[], unsigned int *numDescriptors)
 Get the list of MCC devices available to the system. More...
 
UlError ulGetNetDaqDeviceDescriptor (const char *host, unsigned short port, const char *ifcName, DaqDeviceDescriptor *daqDevDescriptor, double timeout)
 Get the descriptor of the remote network DAQ device. More...
 
DaqDeviceHandle ulCreateDaqDevice (DaqDeviceDescriptor daqDevDescriptor)
 Create a device object within the Universal Library for the DAQ device specified by the descriptor. More...
 
UlError ulGetDaqDeviceDescriptor (DaqDeviceHandle daqDeviceHandle, DaqDeviceDescriptor *daqDeviceDescriptor)
 Get descriptor information for a device. More...
 
UlError ulConnectDaqDevice (DaqDeviceHandle daqDeviceHandle)
 Establish a connection to a physical DAQ device. More...
 
UlError ulDisconnectDaqDevice (DaqDeviceHandle daqDeviceHandle)
 Disconnect from a device. More...
 
UlError ulReleaseDaqDevice (DaqDeviceHandle daqDeviceHandle)
 Remove a device from the Universal Library, and release all resources associated with that device. More...
 
UlError ulIsDaqDeviceConnected (DaqDeviceHandle daqDeviceHandle, int *connected)
 The connection status of a DAQ device. More...
 
UlError ulDaqDeviceConnectionCode (DaqDeviceHandle daqDeviceHandle, long long code)
 Specifies connection code of a DAQ device. More...
 

Detailed Description

Manage the MCC devices that are available to the system.

Function Documentation

UlError ulConnectDaqDevice ( DaqDeviceHandle  daqDeviceHandle)

Establish a connection to a physical DAQ device.

Parameters
daqDeviceHandlethe handle to the DAQ device
Returns
The UL error code.
DaqDeviceHandle ulCreateDaqDevice ( DaqDeviceDescriptor  daqDevDescriptor)

Create a device object within the Universal Library for the DAQ device specified by the descriptor.

Parameters
daqDevDescriptorDaqDeviceDescriptor struct containing fields that describe the device
Returns
The device handle.
UlError ulDaqDeviceConnectionCode ( DaqDeviceHandle  daqDeviceHandle,
long long  code 
)

Specifies connection code of a DAQ device.

This function must be invoked before ulConnectDaqDevice().

Parameters
daqDeviceHandlethe handle to the DAQ device
codethe connection code
Returns
The UL error code.
UlError ulDisconnectDaqDevice ( DaqDeviceHandle  daqDeviceHandle)

Disconnect from a device.

Parameters
daqDeviceHandlethe handle to the DAQ device
Returns
The UL error code.
UlError ulGetDaqDeviceDescriptor ( DaqDeviceHandle  daqDeviceHandle,
DaqDeviceDescriptor daqDeviceDescriptor 
)

Get descriptor information for a device.

Before calling this function, you must first run ulCreateDaqDevice() to retrieve the daqDeviceHandle argument.

Parameters
daqDeviceHandlethe handle to the DAQ device
daqDeviceDescriptora DaqDeviceDescriptor struct containing fields that describe the device
Returns
The UL error code.
UlError ulGetDaqDeviceInventory ( DaqDeviceInterface  interfaceTypes,
DaqDeviceDescriptor  daqDevDescriptors[],
unsigned int *  numDescriptors 
)

Get the list of MCC devices available to the system.

Parameters
interfaceTypesthe interface types to discover
daqDevDescriptors[]an array of DaqDeviceDescriptor structs, each of which contains fields specifying information about the DAQ device.
numDescriptorsthe size of the array. If the size is not correct, the required size is returned.
Returns
The UL error code.
UlError ulGetNetDaqDeviceDescriptor ( const char *  host,
unsigned short  port,
const char *  ifcName,
DaqDeviceDescriptor daqDevDescriptor,
double  timeout 
)

Get the descriptor of the remote network DAQ device.

Parameters
hostthe remote device host name or IP address
portthe remote device port
ifcNamenetwork interface name to be used for communication with the DAQ device (e.g. eth0, wlan0, ...); set to NULL to select the default network interface
daqDevDescriptorDaqDeviceDescriptor struct containing fields that describe the device
timeoutthe timeout value in seconds (s); set to -1 to wait indefinitely for discovery operation to end.
Returns
The UL error code.
UlError ulIsDaqDeviceConnected ( DaqDeviceHandle  daqDeviceHandle,
int *  connected 
)

The connection status of a DAQ device.

Parameters
daqDeviceHandlethe handle to the DAQ device
connectedthe connection status; a non-zero value indicates connected
Returns
The UL error code.
UlError ulReleaseDaqDevice ( DaqDeviceHandle  daqDeviceHandle)

Remove a device from the Universal Library, and release all resources associated with that device.

Parameters
daqDeviceHandlethe handle to the DAQ device
Returns
The UL error code.