14#include "sensorring/platform/SensorringExport.hpp"
26struct SENSORRING_EXPORT InterfaceParams {
27 virtual ~InterfaceParams() =
default;
33 InterfaceParams() =
default;
34 explicit InterfaceParams(std::string
name)
42struct SENSORRING_EXPORT CanParams : InterfaceParams {
69 CanParams(std::string interface_name,
bool respond_with_brs =
false,
unsigned int data_bitrate = 0,
float data_sample_point = 0.0f)
71 , respond_with_brs(respond_with_brs)
72 , data_bitrate(data_bitrate)
73 , data_sample_point(data_sample_point) {}
79 bool _send_with_brs =
false;
86struct SENSORRING_EXPORT SocketCanParams : CanParams {
88 SocketCanParams() =
default;
97struct SENSORRING_EXPORT UsbTingoParams : CanParams {
99 UsbTingoParams() =
default;
Shared parameters for a CAN interfaces.
Definition InterfaceParams.hpp:42
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...
Definition InterfaceParams.hpp:60
unsigned int data_bitrate
Data bitrate in bits per second in the range [1000000, 8000000]. Only relevant if one of the brs sett...
Definition InterfaceParams.hpp:48
bool send_with_brs() const
Get whether CAN FD bit rate switching for the data phase is enabled when the host sends messages to t...
Definition InterfaceParams.hpp:66
float data_sample_point
Data sample point in the range [0, 1]. Optional parameter for fine-tuning. Default 0 uses the CAN con...
Definition InterfaceParams.hpp:51
bool respond_with_brs
Enable CAN FD bit rate switching for the data phase when the sensor boards send messages to the host.
Definition InterfaceParams.hpp:45
Base class for interface configuration parameters.
Definition InterfaceParams.hpp:26
std::string name
Interface identifier (e.g. "can0" for SocketCAN, serial number for USBtingo).
Definition InterfaceParams.hpp:30