Class SoftwareFilteredCanInterface

Inheritance Relationships

Base Type

Class Documentation

class SoftwareFilteredCanInterface : public hi_can::FilteredCanInterface

Inheritance diagram for hi_can::SoftwareFilteredCanInterface:

Collaboration diagram for hi_can::SoftwareFilteredCanInterface:

A variant of FilteredCanInterface implemented in software.

Public Functions

inline SoftwareFilteredCanInterface(const std::shared_ptr<CanInterface> interface)

Constructs a new SoftwareFilteredCanInterface using the given interface for I/O.

Parameters:
const std::shared_ptr<CanInterface> interface

The interface to use for I/O

inline virtual void transmit(const Packet &packet) override

Transmits a packet on the CAN bus.

Parameters:
const Packet &packet

Packet to transmit

virtual std::optional<Packet> receive(bool blocking = false) override

Pulls the next packet from the CAN bus buffer.

Parameters:
bool blocking = false

Whether to block until a packet is received

Returns:

The next packet in the buffer, or std::nullopt if the buffer is empty