STM32Cube Expansion Pack CAN Stack
|
the class to work on the CAN controller interface More...
#include <CanIf.h>
Public Member Functions | |
CanIf () | |
~CanIf () | |
Std_ReturnType | Init (void) |
init of the CanIf module More... | |
Std_ReturnType | Start (void) |
all init of the CanIf module is done More... | |
Std_ReturnType | Transmit (CanIf_TxPduIdType txPduId, const CanIf_PduInfoType *ptr2PduInfo) |
Requests transmission of a PDU using the Tx software Buffer. More... | |
Std_ReturnType | Transmit (ComStack_PduType txPduId, const ComStack_PduInfoType *ptr2PduInfo) |
Requests transmission of a PDU using the Tx software Buffer. More... | |
Std_ReturnType | Transmit (ComStack_CanMsgHeader msgHeader, const uint8_t *ptr2Data) |
Requests transmission of a PDU using the Tx software Buffer. More... | |
Std_ReturnType | Receive (CanIf_RxPduIdType rxPduId, const CanIf_PduInfoType *ptr2PduInfo) |
poll the RxBuffer for a message More... | |
Std_ReturnType | Receive (ComStack_PduType rxPduId, const ComStack_PduInfoType *ptr2PduInfo) |
poll the RxBuffer for a message More... | |
Std_ReturnType | Receive (REF2VAR(ComStack_CanMsgHeader, AUTOMATIC) msgHeader, const uint8_t *ptr2Data) |
poll the RxBuffer for a message More... | |
Std_ReturnType | ConnectUpperLayerIndication (ComStack_PduType rxPduId, const CanIfUpperLayer *p2UpperLayerObject) |
we need to know the connected upper layer object for rx indication More... | |
ComStack_PduType | GetIfRxPduName (CanIf_UpperLayerType upperLayerName, ComStack_PduType rxPduId) |
to get the CanIf_RxPduIdType name | |
ComStack_PduType | GetIfTxPduName (CanIf_UpperLayerType upperLayerName, ComStack_PduType txPduId) |
to get the CanIf_TxPduIdType name | |
void | TxTask (void) |
task function to push the tx message from software buffer to tx mailbox | |
void | RxIndication (ECU_CanController Controller, REF2CONST(ComStack_CanMsgHeader, AUTOMATIC) CanMsgHeader, REF2CONST(ComStack_PduInfoType, AUTOMATIC) PduInfo) |
![]() | |
TME_VersionInfo (uint16_t Module, uint16_t Version, uint16_t Patch) | |
constructor to set version Ids | |
TME_VersionInfo (uint16_t Vendor, uint16_t Module, uint16_t Version, uint16_t Patch) | |
constructor to set version Ids including the vendor | |
TME_VersionInfo (const TME_VersionInfo &other) | |
copy constructor | |
Std_ReturnType | GetVersionInfo (uint32_t BufferLength, const uint8_t *Ptr2Buffer) |
Copies the VersionIinfo to a 8byte buffer. More... | |
![]() | |
ComIf (ComInterfaceType ComIfType) | |
constructor to initialize the interface type value | |
ComInterfaceType | GetComIfType (void) |
get the type of communication controller interface | |
Private Attributes | |
CanIfStates | state = CanIfStates::PreInit |
STM_HAL_TxHeaderTypeDef | txHeaderList [CANIF_TXPDU_COUNT] |
we need a handle to hold the information for the bxCAN controller More... | |
ComStack_CanMsgHeader | rxHeaderList [CANIF_RXPDU_COUNT] |
We create a list with CAN message headers for fast access sorted by the CanIf_rxPduIdType. More... | |
Can *const | ptr2CanDriver |
to hold the CanDrv(s) | |
const CanIfUpperLayer * | p2UpperLayerList [CANIF_RXPDU_COUNT] |
this list will hold the pointer to the upper layers in same order like the rxHeaderList | |
Additional Inherited Members | |
![]() | |
enum | ComInterfaceType { ComInterfaceType::ComIfUnknown = 0, ComInterfaceType::CanIf, ComInterfaceType::TwiIf, ComInterfaceType::FlexRayIf } |
naming the known interface classes More... | |
the class to work on the CAN controller interface
Gemäß dem AUTOSAR Gedanken abstrahiert das CAN Interface die gesamte CAN Hardware. Es wird also später auch nur ein CanIf Objekt geben.
Genauso wird diese CanIf Objekt global angelegt sein.
CanIf::CanIf | ( | ) |
Standard constructor will do a connection to the precompile configuration
CanIf::~CanIf | ( | ) |
Destructor shouldn't called on an embedded system
|
virtual |
The service CanIf_RxIndication() is implemented in CanIf and called by CanDrv after a CAN L-PDU has been received.
Implements ComIf.
Definition at line 232 of file CanIf.cpp.
References p2UpperLayerList, and CanIfUpperLayer::RxIndication().
|
private |
|
private |
|
private |
we need a handle to hold the information for the bxCAN controller
We create a list with CAN message headers for fast access sorted by the CanIf_txPduIdType
we use the STM-CAN-Message-Headers for fast copy during tx. Maybe we change this later on pre compiled linking that could be on FLASH
Definition at line 298 of file CanIf.h.
Referenced by Init().