BitrateBtrInformation

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

Availability

It is available since PCAN-Basic version 4.0.0.

It can be read without initialization since PCAN-Basic version 4.4.0.

Supported By

Access Mode

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

Possible Values

This value has a resolution of Word (range [0... MaxValue]), which represents bit rate registers (BTR0/BTR1), for a CAN controller SJA1000. It matches the type Bitrate.

  Important

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

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 classic CAN bit rate information from a USB Channel:

C#
PcanChannel channelUsed = PcanChannel.Usb01;
uint bitrate;

if (Api.GetValue(channelUsed, PcanParameter.BitrateBtrInformation, out bitrate) == PcanStatus.OK)
    Console.WriteLine($"The channel {channelUsed} uses following bit rate: 0x{bitrate:X} ({(Bitrate)bitrate})");

See Also