BusSpeedFd

This parameter is used to retrieve information about the currently used CAN bus speed for the data phase (bit rate switch), in bits per second. It can be used to display a friendly bit rate value in an application that can be easily and quickly understood by any user.

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

This value has a resolution of Double-Word (range [0... MaxValue]).

Default Value

Does not apply.

Initialization Status

Get: The PCAN Channel must be initialized before using this parameter.

Example

The following code shows how to retrieve the friendly data bit rate value from a USB Channel:

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

if (Api.Initialize(channelUsed, (BitrateFD)BitrateFD.BitrateSaeJ2284_4) == PcanStatus.OK)
{
    if (Api.GetValue(channelUsed, PcanParameter.BusSpeedFd, out bitrate) == PcanStatus.OK)
        Console.WriteLine($"FD bit rate of channel {channelUsed} is {bitrate / 1000000.0} MB/s");
    else
        Console.WriteLine($"Error retrieving Bus Speed on channel {channelUsed}");
    Api.Uninitialize(channelUsed);
}

See Also