Look Up Parameter Definitions

Defines the available parameters used as search criteria for PCAN channels with the LookUpChannel method.

LookUp Channel values

Type

Identifier

Value

Description

String

LOOKUP_DEVICE_TYPE

"devicetype"

Searches a PCAN Channel by its device type (see TPCANDevice).

String

LOOKUP_DEVICE_ID

"deviceid"

Searches a PCAN Channel by its device identifier.

String

LOOKUP_CONTROLLER_NUMBER

"controllernumber"

Searches a PCAN Channel by its 0-based CAN controller index.

String

LOOKUP_IP_ADDRESS

"ipaddress"

Searches a PCAN Channel by its IP address (PCAN_LAN Channels only).

String

LOOKUP_DEVICE_GUID

"deviceguid"

Searches a PCAN Channel by its device unique identifier (USB channels only).

Remarks

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:

    1. Device Type.

    2. Device ID .

    3. CAN Controller Number.

    4. IP-Address .

    5. Device GUID.

Parameters and Value Ranges

Identifier

Value Range

LOOKUP_DEVICE_TYPE

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".

LOOKUP_DEVICE_ID

Value in range of a double word (0 .. 4294967295), in hexadecimal or decimal format.

Examples:

"deviceid=10".

"deviceid=Ah".

"deviceid=0xA".

LOOKUP_CONTROLLER_NUMBER

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".

LOOKUP_IP_ADDRESS

A valid Internet Protocol address string.

Examples:

"ipaddress=192.168.2.1".

LOOKUP_DEVICE_GUID

A string representing a valid GUID value in 8-4-4-4-12 format, RFC 4122.

Examples:

"deviceguid=12345678-aaaa-bbbb-cccc-123456789abc".

See Also