|
STM32Cube Expansion Pack CAN Stack
|
a class to handle the IsoTp protocol More...
#include <IsoTP.h>


Public Member Functions | |
| IsoTp (IsoTp_ObjectConfig initConfig) | |
| constructor with connection to a communication controller interface | |
| Std_ReturnType | Init (const IsoTP_ConfigType *ptr2Config) |
| This function initializes the object according the background configuration. More... | |
| Std_ReturnType | Init (IsoTP_RxTxStatus SendOrReceive=IsoTP_RxTxStatus::IsoTP_SendIdle) |
| IsoTP_RxPduType | GetRxPduName (void) |
| Get the name of the linked rx PDU. More... | |
| IsoTP_TxPduType | GetTxPduName (void) |
| Get the name of the linked rx PDU. More... | |
| IsoTP_StatesType | GetState (void) |
| to get the module state | |
| Std_ReturnType | Transmit (const IsoTp_TxBufferType *ptr2TxBuffer) |
| the transmit function More... | |
| Std_ReturnType | Transmit (uint8_t payload[], uint16_t size) |
| the transmit function More... | |
| Std_ReturnType | RxIndication (ComStack_PduType rxPduId, const ComStack_CanMessageType *ptr2Sdu) |
| overwrite the function prototype supported by the CanIfUpperLayer class More... | |
| Std_ReturnType | Task (void) |
| to handle the protocol More... | |
Public Member Functions inherited from CanIfUpperLayer | |
| virtual Std_ReturnType | RxIndication (ComStack_PduType rxPduId, REF2CONST(ComStack_CanMsgHeader, AUTOMATIC) CanMsgHeader, REF2CONST(ComStack_PduInfoType, AUTOMATIC) PduInfo) |
| virtual function declaration to have an indication function in all upper layer classes More... | |
Private Member Functions | |
| Std_ReturnType | InitHandle (void) |
| initialize the object handle | |
| Std_ReturnType | SendFlowControl (IsoTP_FlowStatus FlowStatus) |
| the flow controll message will be send | |
| Std_ReturnType | SendSingleFrame (void) |
| this function gives the data stored inside the IsoTp object to the communication controller interface | |
| Std_ReturnType | SendFirstFrame (void) |
| this function gives the data stored inside the IsoTp object to the communication controller interface | |
| Std_ReturnType | SendConsecutiveFrame (void) |
| this function gives the data stored inside the IsoTp object to the communication controller interface | |
| Std_ReturnType | ReceiveFlowControl (const CanIsoTP_8ByteData *ptr2FlowControlFrame) |
| do the work on a flow control message | |
| Std_ReturnType | ReceiveSingleFrame (const CanIsoTP_8ByteData *ptr2SingleFrame) |
| do the work on a received single frame message | |
| Std_ReturnType | ReceiveFirstFrame (const CanIsoTP_8ByteData *ptr2FirstFrame) |
| do the work on a received first frame message | |
| Std_ReturnType | ReceiveConsecutiveFrame (const CanIsoTP_8ByteData *ptr2ConsFrame, uint8_t len) |
| do the work on a received consecutive frame message | |
| uint8_t | ms_to_st_min (uint8_t ms) |
| uint8_t | st_min_to_ms (uint8_t st_min) |
| uint32_t | GetMillisecond (void) |
Private Member Functions inherited from TME_VersionInfo | |
| 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... | |
Private Attributes | |
| IsoTP_HandlingType | objectHandle = { .ModuleState = IsoTP_StatesType::IsoTP_OFF } |
| to handle the object lifetime | |
| IsoTp_ObjectConfig | objectConfig |
| to hold the object configuration More... | |
a class to handle the IsoTp protocol
|
private |
To get the actual millisecond of the system
Definition at line 788 of file IsoTP.cpp.
References objectHandle, and IsoTP_HandlingType::TaskTicks.
| IsoTP_RxPduType IsoTp::GetRxPduName | ( | void | ) |
Get the name of the linked rx PDU.
Definition at line 88 of file IsoTP.cpp.
References objectConfig, and IsoTp_ObjectConfig::rxPduName.
| IsoTP_TxPduType IsoTp::GetTxPduName | ( | void | ) |
Get the name of the linked rx PDU.
Definition at line 92 of file IsoTP.cpp.
References objectConfig, and IsoTp_ObjectConfig::txPduName.
| Std_ReturnType IsoTp::Init | ( | const IsoTP_ConfigType * | ptr2Config | ) |
This function initializes the object according the background configuration.
returns E_NOT_OK if there is a problem on the config
| [in] | ptr2Config | pointer to hold configuration |
Definition at line 113 of file IsoTP.cpp.
References AUTOMATIC, E_NOT_OK, E_OK, ISOTP_DET_REPORTERROR, IsoTP_ON, IsoTP_HandlingType::ModuleState, NULL_PTR, objectHandle, and VAR.
|
private |
|
virtual |
overwrite the function prototype supported by the CanIfUpperLayer class
| [in] | rxPduId | naming the incoming message |
| [in] | ptr2Sdu | pointer to the data unit |
Reimplemented from CanIfUpperLayer.
Definition at line 638 of file IsoTP.cpp.
References E_NOT_OK, GetState(), ISOTP_DET_REPORTERROR, ISOTP_E_UNINIT, and IsoTP_ON.

|
private |
| Std_ReturnType IsoTp::Task | ( | void | ) |
to handle the protocol
Definition at line 567 of file IsoTP.cpp.
References E_NOT_OK, IsoTP_HandlingType::FlowControl, ISOTP_DET_REPORTERROR, ISOTP_E_UNINIT, IsoTP_ON, IsoTP_HandlingType::ModuleState, objectHandle, IsoTP_ControlType::ProtocolStatus, and IsoTP_HandlingType::TaskTicks.
| Std_ReturnType IsoTp::Transmit | ( | const IsoTp_TxBufferType * | ptr2TxBuffer | ) |
the transmit function
| [in] | ptr2TxBuffer | pointer to the data array structure including the size |
Definition at line 148 of file IsoTP.cpp.
References E_NOT_OK, IsoTP_HandlingType::FlowControl, objectHandle, and IsoTP_ControlType::ProtocolStatus.
| Std_ReturnType IsoTp::Transmit | ( | uint8_t | payload[], |
| uint16_t | size | ||
| ) |
the transmit function
| [in] | payload | pointer to the data array |
| [in] | size | byte count |
|
private |
to hold the object configuration
Definition at line 339 of file IsoTP.h.
Referenced by GetRxPduName(), GetTxPduName(), SendFirstFrame(), and SendSingleFrame().