BitrateXlInformation

This parameter is used to obtain information about the bit rate of a Channel, that was initialized to work with CAN XL communication.

Availability

It is available since PCAN-Basic version 5.0.0.

Supported By

Access Mode

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

Possible Values

Possible values are strings representing the nominal, flexible data rate and extended data field length bit rate used by a CAN XL capable hardware.

  Important

The retrieved value can be converted to the BitrateXL type. Example (C#): BitrateXL bitrate = stringBuffer;

Default Value

Does not apply.

Initialization Status

Get: It can be read on initialized or uninitialized PCAN-Channels.

Example

The following code shows how to retrieve CAN XL bit rate information from a USB Channel:

C#
PcanChannel channelUsed = PcanChannel.Usb01;
string buffer;

if (Api.GetValue(channelUsed, PcanParameter.BitrateXlInformation, out buffer) == PcanStatus.OK)
{
    BitrateXL bitrateXL = (BitrateXL)buffer;
    Console.WriteLine($"The channel {channelUsed} uses following bit rate:");
    Console.WriteLine($"  Frequency: {bitrateXL.Frequency}");
    Console.WriteLine($"  Nominal: {bitrateXL.Nominal}");
    Console.WriteLine($"  FD: {bitrateXL.FlexibleData}");
    Console.WriteLine($"  XL: {bitrateXL.ExtendedDataLength}");
    Console.WriteLine($"  Error Signaling: {bitrateXL.ErrorSignaling}");
    Console.WriteLine($"  Transceiver Mode Switch: {bitrateXL.TransceiverModeSwitch}");
}

See Also