Struct hal::mock::can
Mock can implementation for use in unit tests and simulations.
#include <can.hpp>
Inherits the following classes: hal::can
Public Types inherited from hal::can
See hal::can
Type | Name |
---|---|
typedef void(const message_t &p_message) | handler Receive handler for can messages. |
typedef uint32_t | id_t Can message ID type trait. |
Public Attributes
Type | Name |
---|---|
spy_handler< bool > | spy_bus_on Spy handler for hal::can::bus_on() will always have content of "true". |
spy_handler< settings > | spy_configure Spy handler for hal::can::configure() __ |
spy_handler< hal::callback< handler > > | spy_on_receive Spy handler for hal::can::on_receive() __ |
spy_handler< message_t > | spy_send Spy handler for hal::can::send() __ |
Public Functions
Type | Name |
---|---|
void | reset () Reset spy information for functions. |
Public Functions inherited from hal::can
See hal::can
Type | Name |
---|---|
status | bus_on () Transition the CAN device from "bus-off" to "bus-on". |
status | configure (const settings & p_settings) Configure this can bus port to match the settings supplied. |
void | on_receive (hal::callback< handler > p_handler) Set the message reception handler. |
result< send_t > | send (const message_t & p_message) Send a can message. |
virtual | ~can () = default |
Public Attributes Documentation
variable spy_bus_on
spy_handler<bool> hal::mock::can::spy_bus_on;
variable spy_configure
spy_handler<settings> hal::mock::can::spy_configure;
variable spy_on_receive
spy_handler<hal::callback<handler> > hal::mock::can::spy_on_receive;
variable spy_send
spy_handler<message_t> hal::mock::can::spy_send;
Public Functions Documentation
function reset
inline void hal::mock::can::reset ()
The documentation for this class was generated from the following file libraries/include/libhal-mock/can.hpp