Class CanInterface¶
Defined in File hi_can.hpp
Inheritance Relationships¶
Derived Type¶
public hi_can::FilteredCanInterface(Class FilteredCanInterface)
Class Documentation¶
-
class CanInterface¶
Inheritance diagram for hi_can::CanInterface:
Interface for sending and receiving packets on the CAN bus.
Subclassed by hi_can::FilteredCanInterface
Public Functions¶
-
virtual std::optional<Packet> receive(bool blocking = false) = 0¶
Pulls the next packet from the CAN bus buffer.
-
inline virtual void set_receive_callback(const packet_callback_t &callback)¶
Sets a callback to be called when a packet is received.
- Parameters:¶
- const packet_callback_t &callback¶
Callback to use
-
inline void clear_receive_callback()¶
Clears the receive callback.
Protected Attributes¶
-
packet_callback_t _receive_callback = nullptr¶
The callback to call when a packet is received.
-
virtual std::optional<Packet> receive(bool blocking = false) = 0¶