|
modm API documentation
|
The CAN connector to the XPCC communication. More...
#include <modm/communication/xpcc/backend/can/connector.hpp>
Classes | |
| class | ReceiveListItem |
| class | SendListItem |
Public Member Functions | |
| CanConnector (Driver *driver) | |
| virtual void | sendPacket (const Header &header, modm::SmartPointer payload) |
| Send a Message. | |
| virtual bool | isPacketAvailable () const |
| Check if a new packet was received by the backend. | |
| virtual const Header & | getPacketHeader () const |
| Access the packet. | |
| virtual const modm::SmartPointer | getPacketPayload () const |
| virtual void | dropPacket () |
| virtual void | update () |
Protected Typedefs | |
| typedef modm::LinkedList< SendListItem > | SendList |
| typedef modm::LinkedList< ReceiveListItem > | ReceiveList |
Protected Member Functions | |
| CanConnector (const CanConnector &) | |
| CanConnector & | operator= (const CanConnector &) |
| bool | sendMessage (const uint32_t &identifier, const uint8_t *data, uint8_t size) |
| Try to send a CAN message via CAN Driver. More... | |
| void | sendWaitingMessages () |
| bool | retrieveMessage () |
Static Protected Member Functions | |
| static bool | convertToHeader (const uint32_t &identifier, Header &header) |
| Convert a can identifier to a packet header. More... | |
| static uint32_t | convertToIdentifier (const Header &header, bool fragmentated) |
| Convert a packet header to a can identifier. | |
| static uint8_t | getNumberOfFragments (uint8_t messageSize) |
Calculate the number of fragments needed to send a message with a length of messageSize. | |
| static bool | isFragment (const uint32_t &identifier) |
Protected Attributes | |
| SendList | sendList |
| ReceiveList | pendingMessages |
| ReceiveList | receivedMessages |
| Driver * | canDriver |
Static Protected Attributes | |
| static uint8_t | messageCounter = 0 |
The CAN connector to the XPCC communication.
The interface of the per template parameter given driver has to provide the following static methods.

Changes in the highest 4 bits:
Every event is send with the destination identifier 0x00.
|
inheritedstatic |
Convert a can identifier to a packet header.
| [in] | identifier | 29-bit CAN identifier |
| [out] | header | Packet header |
true if the message is part of a fragmented packet, false otherwise.
|
protected |
Try to send a CAN message via CAN Driver.