Device Discovery with the UL for .NET
Detecting and creating devices
The DaqDeviceManager class includes members for detecting and creating USB, Bluetooth, and Ethernet devices within the Universal Library without running InstaCal.
- GetDaqDeviceInventory() – Detects USB, Bluetooth, and Ethernet DAQ devices, and returns device descriptors of the detected devices.
- GetNetDeviceDescriptor() – Returns the DAQ device descriptor at the specified IP address or host name.
- CreateDaqDevice()
– Creates a device object within the Universal Library for the DAQ device specified by the descriptor, and assigns the specified board number to the DAQ device.
- GetBoardNumber() – Returns the board number of a DAQ device.
- IgnoreInstaCal() – Prevents the Universal Library from automatically adding a DAQ device that has been stored in the cb.cfg file by InstaCal.
- ReleaseDaqDevice() – Removes the specified DAQ device from the Universal Library, and releases all resources associated with that device.
Retrieving and setting device configuration options
The cBoardConfig Class contains members for retrieving and setting board-level configuration. You access the methods in this class using the BoardConfig property. Before calling any configuration method, you must first create an instance of an MccBoard object. If the default configuration is not adequate for your application, and you aren't using InstaCal for board configuration, then you'll need to use these features to change the configuration.
Example programs
The following example programs demonstrate how to detect USB, Bluetooth or Ethernet devices:
- DaqDevDiscovery01 – discovers DAQ devices, and assigns board numbers to the detected devices.
- DaqDevDiscovery02 – discovers network DAQ devices, and assigns board numbers to the detected devices. This example allows specification of parameters to allow detection on a different subnet than the host.
Universal Library example programs are installed by default when you install the UL software.