Important
This parameter can only be configured on uninitialized Channels.
This parameter allows the user to connect to an active PCAN Channel when the bit rate used is unknown. When this mode is set, PCAN-Basic will try first to use the bit rate given as parameter in the initialization process; if the Channel has a different bit rate configured, then the new connection will use the configured bit rate and the initialization function will return a warning value, indicating that the used bit rate differs from the given one.
This is a so called “preset-only parameter", which means that it can only be set on not yet initialized Channels.
This parameter is useful, when an application wants to connect to a Channel, without knowing its bit rate.
It is available since PCAN-Basic version 4.0.0.
This parameter is read/write. It can be configured and retrieved.
This parameter can be activated or deactivated. Accepts values of type ParameterValueActivation.
The default state of the bit rate adapting mode is Off. This parameter has effect only at initialization time. It cannot be set after activating a Channel. The parameter returns to its default value after calling the Initialize method.
Get: This parameter can be used on initialized or uninitialized Channels.
Set: This parameter can be used only on uninitialized Channels.
The following code shows how to configure the bit rate adapting mode on a LAN Channel:
PcanChannel channelUsed = PcanChannel.Lan01;
if (Api.SetValue(channelUsed, PcanParameter.BitrateAdapting, ParameterValue.Activation.On) == PcanStatus.OK)
Console.WriteLine($"The bit rate adapting mode has been activated successfully for {channelUsed}.");
else
Console.WriteLine($"Error configuring the bit rate adapting mode on channel {channelUsed}.");Dim channelUsed As PcanChannel = PcanChannel.Lan01
If Api.SetValue(channelUsed, PcanParameter.BitrateAdapting, ParameterValue.Activation.On) = PcanStatus.OK Then
Console.WriteLine($"The bit rate adapting mode has been activated successfully for {channelUsed}.")
Else
Console.WriteLine($"Error configuring the bit rate adapting mode on channel {channelUsed}.")
End IfPcanChannel channelUsed = PcanChannel::Lan01;
if (Api::SetValue(channelUsed, PcanParameter::BitrateAdapting, ParameterValue::Activation::On) == PcanStatus::OK)
Console::WriteLine("The bit rate adapting mode has been activated successfully for {0}.", channelUsed);
else
Console::WriteLine("Error configuring the bit rate adapting mode on channel {0}.", channelUsed);