ADTF_DEVICE_TOOLBOX  3.12.1 (ADTF 3.18.3)
ICANFDCoderabstract
Inheritance diagram for ICANFDCoder:
[legend]

Public Types

using tPduIndex = uint32_t
 

Public Member Functions

 ADTF_IID (ICANFDCoder, "canfd_coder.jack.canfd.sdk.devicetb.adtf.iid")
 
virtual tResult GetContainedPdus (const ucom::nitro::ifunction< void(const tPduInfo *pPduInfo, tPduIndex nPduIndex)> &fnCallback) const =0
 Return the contained PduInfos and the corresponding index located in a container PDU from the current data buffer. More...
 
virtual tResult AddContainedPdu (tPduIndex &nPduIndexContained, tPDUID nPduId, tPduIndex nPduIndexContainer=0)=0
 Add a PDU to the container PDU and returns the index at which the new PDU was set. More...
 
virtual tResult SelectContainedPdu (tPduIndex nPduIndex=0)=0
 Set the current index of a contained PDU within a container PDU. More...
 
- Public Member Functions inherited from ICANFDCoder
 ADTF_IID (ICANFDCoder, "canfd_coder.ignition.canfd.sdk.devicetb.adtf.iid")
 
virtual tResult SetData (const tCANFDData *pData)=0
 Set a message from an input CAN FD sample. More...
 
virtual tResult SetData (const adtf::devicetb::sdk::can::tCANData *pData)=0
 Set a message from an input CAN sample or raw data. More...
 
virtual tResult CreateMessage (const tMessageID nMsgId, const tChannelID nChannelId)=0
 Create a new message. More...
 
virtual tResult GetMessageData (tCANFDData *pMsgData)=0
 Return information about the CAN FD message. More...
 
virtual tResult GetMessageData (adtf::devicetb::sdk::can::tCANData *pMsgData)=0
 Return information about the CAN message. More...
 
virtual tResult GetMessageId (tMessageID &nMessageId) const =0
 Return the CAN FD message identifier without any flags. More...
 
virtual tResult SetRawSignalValue (tSignalID nSignalId, const tSignalValue &oRawValue)=0
 Set a raw signal value given by the signal id. More...
 
virtual tResult SetRawSignalValue (tSignalID nSignalId, const void *pRawValue, uint64_t nSize)=0
 Set a raw signal value byte array given by the signal id. More...
 
virtual tResult SetPhysicalSignalValue (tSignalID nSignalId, double nPhysValue)=0
 Set a physical value given by the signal id. More...
 
virtual tResult GetSignalValue (tSignalID nSignalId, tSignalValue &oRawValue, double &nPhysValue) const =0
 Return the decoded value of one CAN FD signal from the data area given by SetData or CreateMessage. More...
 
virtual tResult GetSignalValue (tSignalID nSignalId, void *pRawValue, uint64_t nSize) const =0
 Return the decoded value of one CAN FD signal from the data area given by SetData or CreateMessage. More...
 
virtual tResult SetRawData (const void *pData, uint8_t nLength)=0
 Copy the given CAN FD raw message payload to the payload of the message. More...
 
virtual tResult GetDatabase (tChannelID nChannelId, adtf::ucom::ant::iobject_ptr< ICANFDDatabase > &pCANFDDatabase) const =0
 Return the CAN FD Database for the channel. More...
 
virtual tResult GetAllSignalValues (const ucom::nitro::ifunction< void(tSignalID nSignalId, tSignalValue oRawValue, double nPhysValue)> &fnCallback) const =0
 Return all signal values from the current data buffer. More...
 
virtual tResult GetMultiplexSelectorFieldCode (uint32_t &nSelectorFieldCode)=0
 Return the selector field code from the current data buffer. More...
 
virtual tResult SetMultiplexSelectorFieldCode (uint32_t nSelectorFieldCode)=0
 Set the selector field code for the current data buffer. More...
 

Detailed Description

Definition at line 415 of file canfd_coder_intf.h.

Member Function Documentation

◆ AddContainedPdu()

virtual tResult AddContainedPdu ( tPduIndex &  nPduIndexContained,
tPDUID  nPduId,
tPduIndex  nPduIndexContainer = 0 
)
pure virtual

Add a PDU to the container PDU and returns the index at which the new PDU was set.

SelectContainedPdu is called automatically to increment the intern pdu offset/counter. So there is no need to use SelectContainedPdu manually together with this function.

Parameters
[out]nPduIndexContainedContained PDU index at which the new PDU was set.
[in]nPduIdIntern Id of the PDU to add.
[in]nPduIndexContainerContainer PDU index at which the PDU shall be set. Change this if you want container in container. default = 0.
Return values
ERR_INVALID_ARGInvalid nPduIndexContained.
ERR_INVALID_INDEXThe given nPduId was not found.
ERR_OUT_OF_RANGEThe container is no longer large enough to add this PDU.
ERR_MEMORYNo buffer area was set or created.

◆ GetContainedPdus()

virtual tResult GetContainedPdus ( const ucom::nitro::ifunction< void(const tPduInfo *pPduInfo, tPduIndex nPduIndex)> &  fnCallback) const
pure virtual

Return the contained PduInfos and the corresponding index located in a container PDU from the current data buffer.

Parameters
[out]fnCallbackCallback function returning pointer to the PduInfo and the index of this contained PDU in a container.
Return values
ERR_MEMORYNo buffer area was set or created.

◆ SelectContainedPdu()

virtual tResult SelectContainedPdu ( tPduIndex  nPduIndex = 0)
pure virtual

Set the current index of a contained PDU within a container PDU.

Use this function only in reading mode and not together with AddContainedPdu because AddContainedPdu calls SelectContainedPdu internally.

Parameters
[in]nPduIndexIndex to set. Starts at 0, default = 0.
Return values
ERR_INVALID_INDEXThe given nPduIndex is greater than the number of contained PDUs.
ERR_MEMORYNo buffer area was set or created.