Shared parameters for a CAN interfaces.
More...
#include <InterfaceParams.hpp>
|
| void | send_with_brs (bool enable) |
| | Enable CAN FD bit rate switching for the data phase when the host sends messages to the sensor boards. The send_with_brs parameter is protected by this function to prevent accidental misuse. Be sure that the host CAN controller supports TDC (transmitter delay compensation), otherwise communication may become unreliable.
|
| bool | send_with_brs () const |
| | Get whether CAN FD bit rate switching for the data phase is enabled when the host sends messages to the sensor boards.
|
|
| CanParams (std::string interface_name, bool respond_with_brs=false, unsigned int data_bitrate=0, float data_sample_point=0.0f) |
|
|
bool | respond_with_brs = false |
| | Enable CAN FD bit rate switching for the data phase when the sensor boards send messages to the host.
|
|
unsigned int | data_bitrate = 0 |
| | Data bitrate in bits per second in the range [1000000, 8000000]. Only relevant if one of the brs settings is true. Default 0 uses the same bitrate for arbitration and data phase (1 Mbps).
|
|
float | data_sample_point = 0.0f |
| | Data sample point in the range [0, 1]. Optional parameter for fine-tuning. Default 0 uses the CAN controller's default sample point.
|
|
std::string | name |
| | Interface identifier (e.g. "can0" for SocketCAN, serial number for USBtingo).
|
|
|
| InterfaceParams (std::string name) |
Shared parameters for a CAN interfaces.
◆ send_with_brs() [1/2]
| bool eduart::sensorring::com::CanParams::send_with_brs |
( |
| ) |
const |
|
inline |
Get whether CAN FD bit rate switching for the data phase is enabled when the host sends messages to the sensor boards.
- Returns
- Whether BRS for sending messages is enabled.
◆ send_with_brs() [2/2]
| void eduart::sensorring::com::CanParams::send_with_brs |
( |
bool | enable | ) |
|
|
inline |
Enable CAN FD bit rate switching for the data phase when the host sends messages to the sensor boards. The send_with_brs parameter is protected by this function to prevent accidental misuse. Be sure that the host CAN controller supports TDC (transmitter delay compensation), otherwise communication may become unreliable.
- Parameters
-
| enable | Whether to enable BRS for sending messages. |
The documentation for this struct was generated from the following file: