modm API documentation
modm_test::platform::CanDriver Class Reference

#include </tmp/tmp145hdvo_/stm32f437zit7/modm-test/src/modm-test/mock/can_driver.hpp>

Inheritance diagram for modm_test::platform::CanDriver:
modm::Can modm::PeripheralDriver

Public Member Functions

bool isMessageAvailable ()
bool getMessage (modm::can::Message &message)
bool isReadyToSend ()
bool sendMessage (const modm::can::Message &message)

Static Public Member Functions

static uint8_t getReceiveErrorCounter ()
static uint8_t getTransmitErrorCounter ()
static BusState getBusState ()
- Static Public Member Functions inherited from modm::Can
template<class... Signals>
static void connect ()
template<class SystemClock , bitrate_t bitrate = 125_kbps, percent_t tolerance = 1_pct>
static void initialize (Mode startupMode)
static bool isMessageAvailable ()
 Returns true if a message can be retrieved by calling getMessage.
static bool getMessage (can::Message &message)
 Returns true if a message was copied into the message buffer.
static bool isReadyToSend ()
static bool sendMessage (const can::Message &message)
static uint8_t getReceiveErrorCounter ()
 Get Receive Error Counter.
static uint8_t getTransmitErrorCounter ()
 Get Transmit Error Counter.
static BusState getBusState ()
- Static Public Member Functions inherited from modm::PeripheralDriver
static void initialize ()
 initializes the peripheral, must be called before use.
static void configurePurpose ()
 configures a peripheral for a specific purpose
static void setParameter ()
 sets a parameter
static void getParameter ()
 returns a parameter
static bool getInterruptFlag ()
 Read an interrupt flag.
static void acknowledgeInterruptFlag ()
template<baudrate_t available, baudrate_t requested, percent_t tolerance>
static void assertBaudrateInTolerance ()

Public Attributes

modm::LinkedList< modm::can::MessagereceiveList
 Messages which should be received.
modm::LinkedList< modm::can::MessagesendList
 List of all messages send.
uint8_t sendSlots
 number of messages which could be send

Additional Inherited Members

- Public Types inherited from modm::Can
enum  Mode : uint8_t { Mode::Normal = 0b00, Mode::ListenOnly = 0b01, Mode::LoopBack = 0b10, Mode::ListenOnlyLoopBack = 0b11 }
 Possible modes of the CAN controller. More...
enum  BusState : uint8_t { BusState::Connected = 0, BusState::ErrorWarning = 1, BusState::ErrorPassive = 2, Off = 3 }
- Static Public Attributes inherited from modm::Can
static constexpr size_t RxBufferSize = 16
 Size of the receive buffer.
static constexpr size_t TxBufferSize = 16
 Size of the transmit buffer.

Detailed Description

Mock CAN peripheral interface for unittests.

The documentation for this class was generated from the following files: