cbGetConfigString()

Returns configuration or device information as a null-terminated string.

Function Prototype

C/C++

int cbGetConfigString(int InfoType, int BoardNum, int DevNum, int ConfigItem, char *ConfigVal, int* maxConfigLen)

Visual Basic

Function cbGetConfigString(ByVal InfoType, ByVal BoardNum&, ByVal DevNum&, ByVal ConfigItem&, ByVal ConfigVal$, ByRef maxConfigLen&) As Long

Arguments

InfoType

The configuration information for each board is grouped into different categories. This argument specifies which category you want. Always set this argument to BOARDINFO.

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99.

DevNum

The purpose of the DevNum argument depends on the ConfigItem being passed. It can serve as a point at which to start the read, an index into the ConfigItem, or it can be ignored.

ConfigItem

The type of information to read from the device. Set it to one of the constants listed in the "ConfigItem argument values" section below.

ConfigVal

Pointer to a user-allocated buffer where the configuration string is copied.

maxConfigLen

Pointer to the value holding the maximum number of bytes to be read from the device into ConfigVal.

Returns

ConfigItem argument values

Note that the DevNum argument is ignored for most ConfigItems.

ConfigItemDescription
BIDEVMACADDRMAC address of an Ethernet device.
BIDEVSERIALNUMFactory serial number of a USB or Bluetooth device.

DevNum specifies either a base board (0) or an expansion board (1).
BIDEVUNIQUEIDUnique identifier of a discoverable device, such as the serial number of a USB device or MAC address of an Ethernet device.
BIDEVVERSIONFirmware version and FPGA version installed on a device.

Use this setting in conjunction with one of these DevNum settings:
  • VER_FW_MAIN (main firmware version)
  • VER_FW_MEASUREMENT (measurement firmware version)
  • VER_FW_MEASUREMENT_EXP (expansion board measurement firmware version)
  • VER_FW_RADIO (radio firmware version)
  • VER_FPGA (FPGA version)
BIUSERDEVIDUser-configured string identifier of up to maxConfigLen character/bytes from an Ethernet, Bluetooth, or USB device.