ChannelFeatures

This parameter is used to retrieve information about the special properties of a device. It can be used to allow enabling/disabling features in an application according to the capabilities of a device.

Availability

It is available since PCAN-BAsic version 4.0.0.

Supported By

Access Mode

This parameter can only be read. It cannot be modified.

Possible Values

The information about special features is returned as a numeric “flag” value, that matches the type PcanDeviceFeatures.

  Important

The retrieved value must be converted to the PcanDeviceFeatures type. Example (C#): PcanDeviceFeatures features = (PcanDeviceFeatures)uintBuffer;

Default Value

Does not apply.

Initialization Status

Get: This parameter can be used on both, initialized and uninitialized PCAN-Channels.

Example

The following code shows how to retrieve the capabilities of several USB Channels:

C#
uint features;
PcanChannel[] channelsToCheck = { PcanChannel.Usb01, PcanChannel.Usb02, PcanChannel.Usb03, PcanChannel.Usb04 };

Console.WriteLine("CAN-FD capable channels:");
for (int i = 0; i < 4; i++)
    if (Api.GetValue(channelsToCheck[i], PcanParameter.ChannelFeatures, out features) == PcanStatus.OK)
        Console.WriteLine($"Channel {channelsToCheck[i]}: {(PcanDeviceFeatures)features}");

See Also