#include <can.hpp>
Public Member Functions | |
virtual int16_t | configureFilters (const CanFilterConfig *filter_configs, uint16_t num_configs)=0 |
virtual uint64_t | getErrorCount () const =0 |
virtual uint16_t | getNumFilters () const =0 |
virtual int16_t | receive (CanFrame &out_frame, MonotonicTime &out_ts_monotonic, UtcTime &out_ts_utc, CanIOFlags &out_flags)=0 |
virtual int16_t | send (const CanFrame &frame, MonotonicTime tx_deadline, CanIOFlags flags)=0 |
virtual | ~ICanIface () |
Single non-blocking CAN interface.
Definition at line 147 of file libuavcan/libuavcan/include/uavcan/driver/can.hpp.
|
inlinevirtual |
Definition at line 150 of file libuavcan/libuavcan/include/uavcan/driver/can.hpp.
|
pure virtual |
Configure the hardware CAN filters. CanFilterConfig.
Implemented in uavcan_lpc11c24::CanDriver, uavcan_kinetis::CanIface, uavcan_stm32::CanIface, uavcan_linux::SocketCanIface, CanIfaceMock, PairableCanDriver, and VirtualCanIface.
|
pure virtual |
Continuously incrementing counter of hardware errors. Arbitration lost should not be treated as a hardware error.
Implemented in uavcan_linux::SocketCanIface, VirtualCanIface, uavcan_lpc11c24::CanDriver, uavcan_kinetis::CanIface, uavcan_stm32::CanIface, CanIfaceMock, and PairableCanDriver.
|
pure virtual |
Number of available hardware filters.
Implemented in uavcan_linux::SocketCanIface, VirtualCanIface, uavcan_lpc11c24::CanDriver, CanIfaceMock, uavcan_kinetis::CanIface, PairableCanDriver, and uavcan_stm32::CanIface.
|
pure virtual |
Non-blocking reception.
Timestamps should be provided by the CAN driver, ideally by the hardware CAN controller.
Monotonic timestamp is required and can be not precise since it is needed only for protocol timing validation (transfer timeouts and inter-transfer intervals).
UTC timestamp is optional, if available it will be used for precise time synchronization; must be set to zero if not available.
Refer to ISystemClock to learn more about timestamps.
[out] | out_ts_monotonic | Monotonic timestamp, mandatory. |
[out] | out_ts_utc | UTC timestamp, optional, zero if unknown. |
|
pure virtual |
Non-blocking transmission.
If the frame wasn't transmitted upon TX deadline, the driver should discard it.
Note that it is LIKELY that the library will want to send the frames that were passed into the select() method as the next ones to transmit, but it is NOT guaranteed. The library can replace those with new frames between the calls.