STM32Cube Expansion Pack CAN Stack
|
the base class to hold a unique interface to all communication controller interface types More...
#include <ComIf.h>
Public Types | |
enum | ComInterfaceType { ComInterfaceType::ComIfUnknown = 0, ComInterfaceType::CanIf, ComInterfaceType::TwiIf, ComInterfaceType::FlexRayIf } |
naming the known interface classes More... | |
Public Member Functions | |
ComIf (ComInterfaceType ComIfType) | |
constructor to initialize the interface type value | |
ComInterfaceType | GetComIfType (void) |
get the type of communication controller interface | |
virtual Std_ReturnType | Transmit (ComStack_PduType txPduId, const ComStack_PduInfoType *ptr2PduInfo)=0 |
Requests transmission of a PDU using the Tx software Buffer. More... | |
virtual Std_ReturnType | Receive (ComStack_PduType rxPduId, const ComStack_PduInfoType *ptr2PduInfo)=0 |
poll the RxBuffer for a message More... | |
virtual ComStack_PduType | GetIfRxPduName (CanIf_UpperLayerType upperLayerName, ComStack_PduType rxPduId)=0 |
virtual ComStack_PduType | GetIfTxPduName (CanIf_UpperLayerType upperLayerName, ComStack_PduType txPduId)=0 |
virtual Std_ReturnType | ConnectUpperLayerIndication (ComStack_PduType rxPduId, const CanIfUpperLayer *p2UpperLayerObject)=0 |
we need to know the connected upper layer object for rx indication More... | |
virtual void | RxIndication (ECU_CanController Controller, REF2CONST(ComStack_CanMsgHeader, AUTOMATIC) CanMsgHeader, REF2CONST(ComStack_PduInfoType, AUTOMATIC) PduInfo)=0 |
There is a RxIndication function on every ComIf class. More... | |
Private Attributes | |
const ComInterfaceType | connectedComInterface = ComInterfaceType::ComIfUnknown |
to hold the interface type value | |
the base class to hold a unique interface to all communication controller interface types
This class declares functions that must be known by the controller objects (if exists) and the first level of protocol objects
|
strong |
|
pure virtual |
we need to know the connected upper layer object for rx indication
maybe we solve this in a static way on code generation later
[in] | rxPduId | to name the rx pdu |
[in] | p2UpperLayerObject | to give the pointer to the object |
Implemented in CanIf.
|
pure virtual |
poll the RxBuffer for a message
This function looks if there is an message inside the buffer by checking the PDU name
This is the AUTOSAR like function ReadRxPduData
[in] | rxPduId | search for the PDU by using the CanIf_RxPduIdType |
[out] | ptr2PduInfo | to return the data |
Implemented in CanIf.
|
pure virtual |
|
pure virtual |
Requests transmission of a PDU using the Tx software Buffer.
returns E_NOT_OK if SW buffer full
this function is the AUTOSAR like transmit function
[in] | txPduId | name the Pdu to transmit |
[in] | ptr2PduInfo | pointer to the data to transmit |
Implemented in CanIf.