Defines the available parameters used as search criteria for PCAN channels with the LookUpChannel method.
Type | Identifier | Value | Description |
|---|---|---|---|
"devicetype" | Searches a PCAN Channel by its device type (see TPCANDevice). | ||
"deviceid" | Searches a PCAN Channel by its device identifier. | ||
"controllernumber" | Searches a PCAN Channel by its 0-based CAN controller index. | ||
"ipaddress" | Searches a PCAN Channel by its IP address (PCAN_LAN Channels only). | ||
"deviceguid" | Searches a PCAN Channel by its device unique identifier (USB channels only). |
These values are declared as object fields in an object oriented environment (Delphi, .NET Framework) and declared as #define's in C++ (plain API).
Following rules are to be taken into account in order to construct a valid lookup parameter string:
The value for each parameter must be separated with a '='. Example: "deviceid=1".
Each pair of parameter/value must be separated with a ','. Blank spaces are allowed but are not necessary. Example: "devicetype=pcan_usb, deviceid=1,".
Non-existent parameters are ignored instead of causing the function call to fail. Example, this would work well: "devicetype=pcan_usb,unknownparam=4".
Numeric parameter values that are out of the current supported range just return no results instead of causing the function to fail. Example: "controllernumber=2500".
Repeated parameters within the string don't cause the function to fail. Only the last occurrences of repeated parameters are evaluated. Example, only PCI devices are looked up: "devicetype=pcan_usb, devicetype=pcan_pci".
When more than one channel is found, the first of them is returned. Example: "devicetype=pcan_usb" (having more than one USB device attached).
The order of evaluation is fixed, regardless of the position of the parameters within the string. The order is:
Device Type.
Device ID .
CAN Controller Number.
IP-Address .
Device GUID.
Identifier | Value Range |
|---|---|
A TPCANDevice value. The input can be numeric, in hexadecimal or decimal format, or as string denoting a TPCANDevice value name (case insensitive). Examples: "devicetype=1". "devicetype=pcan_usb". "devicetype=PCAN_USB". | |
Value in range of a double word (0 .. 4294967295), in hexadecimal or decimal format. Examples: "deviceid=10". "deviceid=Ah". "deviceid=0xA". | |
A zero-based index value in range of a double word (0 .. 4294967295), in hexadecimal or decimal format. Currently, a maximum of 6 channels per device are supported (controller index in range [0 .. 5]). Examples: "controllernumber=1". "controllernumber=1h". "controllernumber=0x1". | |
A valid Internet Protocol address string. Examples: "ipaddress=192.168.2.1". | |
A string representing a valid GUID value in 8-4-4-4-12 format, RFC 4122. Examples: "deviceguid=12345678-aaaa-bbbb-cccc-123456789abc". |