This parameter allows / disallows the reception of messages (Data, Status, and Error frames) of a PCAN Channel, regardless of the value of its acceptance filter. The acceptance filter of the PCAN Channel remains unchanged (other applications working with the same hardware will not be disturbed).
This is a so called “preset parameter", which means that it can be configured before a PCAN Channel is initialized. This allow the activation or deactivation of a parameter as fast as possible, avoiding in this way problems that can appear with sensitive operations.
This parameter is useful for applications that want to discard messages for a while, without having to take modifications on the message filter, avoiding in this form disturbances that may arise when an acceptance filter is changed.
It is available since PCAN-Basic version 1.1.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 receive status is On. After switching it Off, the receiving status stays inactive until it is expressly reactivated, or the Channel is disconnected, i.e., using the Uninitialize method.
Get: This parameter can be used on initialized or uninitialized Channels.
Set: This parameter can be used on initialized or uninitialized Channels.
The following code shows how to disable receiving messages on a USB Channel:
PcanChannel channelUsed = PcanChannel.Usb01;
if (Api.SetValue(channelUsed, PcanParameter.ReceiveStatus, ParameterValue.Activation.Off) == PcanStatus.OK)
Console.WriteLine($"The {channelUsed} was successfully configured to disallow incoming messages.");
else
Console.WriteLine($"Error configuring the receive status on channel {channelUsed}.");Dim channelUsed As PcanChannel = PcanChannel.Usb01
If Api.SetValue(channelUsed, PcanParameter.ReceiveStatus, ParameterValue.Activation.Off) = PcanStatus.OK Then
Console.WriteLine($"The {channelUsed} was successfully configured to disallow incoming messages.")
Else
Console.WriteLine($"Error configuring the receive status on channel {channelUsed}.")
End IfPcanChannel channelUsed = PcanChannel::Usb01;
if (Api::SetValue(channelUsed, PcanParameter::ReceiveStatus, ParameterValue::Activation::Off) == PcanStatus::OK)
Console::WriteLine("The {0} was successfully configured to disallow incoming messages.", channelUsed);
else
Console::WriteLine("Error configuring the receive status on channel {0}.", channelUsed);