STM32Cube Expansion Pack CAN Stack
CanFT2p0 Class Reference

a class to handle the Fueltech CAN FT2.0 protocol More...

#include <CanFT2p0.h>

Inheritance diagram for CanFT2p0:
Collaboration diagram for CanFT2p0:

Public Member Functions

 CanFT2p0 (const CanIf *p2CanInterface)
 constructor to connect to communication controller interface
 
 CanFT2p0 (const CanIf *p2CanInterface, CanIf_RxPduIdType rxPduName)
 constructor to connect to communication controller interface and naming the PDUs
 
CanFT2p0_StatesType GetState (void)
 to get the module state
 
Std_ReturnType Init (const CanFT2p0_CfgType *ptr2Config=nullptr)
 
CanIfGetHwInterface (void)
 get the handle to the connected communication controller interface
 
CanIf_RxPduIdType GetRxPduName (void)
 Get the name of the linked rx PDU. More...
 
Std_ReturnType RxIndication (ComStack_PduType rxPduId, const ComStack_CanMessageType *ptr2Sdu)
 overwrite the function prototype supported by the CanIfUpperLayer class More...
 
Std_ReturnType TxIndication (CanIf_TxPduIdType txPduId, const CanIf_PduInfoType *p2TxPdu)
 overwrite the function prototype supported by the CanIfUpperLayer class 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 DataCopy (uint8_t DataLength, const uint8_t *DestPtr, const uint8_t *SourcePtr)
 byte wise copy More...
 
Std_ReturnType DataReverseCopy (uint8_t DataLength, const uint8_t *DestPtr, const uint8_t *SourcePtr)
 byte wise copy in reversed order More...
 
- 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

CanFT2p0_HandlingType Handle
 
CanFT2p0_ObjectHdlType ObjectHandle [CANFT_OBJECT_COUNT]
 
CanFT2p0_RxPduType RxPduInfo [CANFT_RXPDU_COUNT]
 
CanFT2p0_TxPduType TxPduInfo [CANFT_TXPDU_COUNT]
 
const CanIfp2CanIf = nullptr
 
CanIf_RxPduIdType rxPduName = CanIf_Rx_unknownPdu
 

Detailed Description

a class to handle the Fueltech CAN FT2.0 protocol

Definition at line 392 of file CanFT2p0.h.

Member Function Documentation

◆ DataCopy()

Std_ReturnType CanFT2p0::DataCopy ( uint8_t  DataLength,
const uint8_t *  DestPtr,
const uint8_t *  SourcePtr 
)
private

byte wise copy

the size of the destination array must be the same as it be on the source array

Definition at line 147 of file CanFT2p0.cpp.

References E_NOT_OK, E_OK, and NULL_PTR.

◆ DataReverseCopy()

Std_ReturnType CanFT2p0::DataReverseCopy ( uint8_t  DataLength,
const uint8_t *  DestPtr,
const uint8_t *  SourcePtr 
)
private

byte wise copy in reversed order

the size of the destination array must be the same as it be on the source array
The first byte of the source will be the last byte of the destination

Definition at line 168 of file CanFT2p0.cpp.

References E_NOT_OK, E_OK, and NULL_PTR.

◆ GetRxPduName()

CanIf_RxPduIdType CanFT2p0::GetRxPduName ( void  )
inline

Get the name of the linked rx PDU.

Todo:
we should add a virtual function to the CanIfUpperLayer class

Definition at line 426 of file CanFT2p0.h.

◆ Init()

Std_ReturnType CanFT2p0::Init ( const CanFT2p0_CfgType *  ptr2Config = nullptr)

This function initializes the object according the background configuration.

See also
CANFT2P0_INIT_ID
Parameters
[in]ptr2ConfigName the Type we want to be
Returns
Std_ReturnType success or failed init
Version
02.2021

Definition at line 42 of file CanFT2p0.cpp.

References AUTOMATIC, CANFT2P0_DET_REPORTERROR, CANFT2P0_INIT_ID, CANFT_OFF, CANFT_ON, E_NOT_OK, E_OK, CanFT2p0_HandlingType::ModuleState, NULL_PTR, CanFT2p0_HandlingType::ptr2Config, and VAR.

◆ RxIndication()

Std_ReturnType CanFT2p0::RxIndication ( ComStack_PduType  rxPduId,
const ComStack_CanMessageType ptr2Sdu 
)
virtual

overwrite the function prototype supported by the CanIfUpperLayer class

Parameters
[in]rxPduIdnaming the incoming message
[in]ptr2Sdupointer to the data unit

Reimplemented from CanIfUpperLayer.

Reimplemented in CanFT2p0Stream.

Definition at line 79 of file CanFT2p0.cpp.

References CANFT_ON, E_NOT_OK, GetState(), NULL_PTR, and READ_FLAG.

Here is the call graph for this function:

◆ TxIndication()

Std_ReturnType CanFT2p0::TxIndication ( CanIf_TxPduIdType  txPduId,
const CanIf_PduInfoType p2TxPdu 
)

overwrite the function prototype supported by the CanIfUpperLayer class

Definition at line 126 of file CanFT2p0.cpp.

References CANFT_ON, E_NOT_OK, CanFT2p0_HandlingType::ModuleState, and CanIf::Transmit().

Here is the call graph for this function:

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