ADTF Device Toolbox SDK
Loading...
Searching...
No Matches
adtf::devicetb::sdk::canfd::ignition::ICANFDCoder Class Referenceabstract
Inheritance diagram for adtf::devicetb::sdk::canfd::ignition::ICANFDCoder:
[legend]
Collaboration diagram for adtf::devicetb::sdk::canfd::ignition::ICANFDCoder:
[legend]

Public Member Functions

 ADTF_IID (ICANFDCoder, "canfd_coder.ignition.canfd.sdk.devicetb.adtf.iid")
 
virtual tResult SetData (const tCANFDData *pData)=0
 
virtual tResult SetData (const adtf::devicetb::sdk::can::tCANData *pData)=0
 
virtual tResult CreateMessage (const tMessageID nMsgId, const tChannelID nChannelId)=0
 
virtual tResult GetMessageData (tCANFDData *pMsgData)=0
 
virtual tResult GetMessageData (adtf::devicetb::sdk::can::tCANData *pMsgData)=0
 
virtual tResult GetMessageId (tMessageID &nMessageId) const =0
 
virtual tResult SetRawSignalValue (tSignalID nSignalId, const tSignalValue &oRawValue)=0
 
virtual tResult SetRawSignalValue (tSignalID nSignalId, const void *pRawValue, uint64_t nSize)=0
 
virtual tResult SetPhysicalSignalValue (tSignalID nSignalId, double nPhysValue)=0
 
virtual tResult GetSignalValue (tSignalID nSignalId, tSignalValue &oRawValue, double &nPhysValue) const =0
 
virtual tResult GetSignalValue (tSignalID nSignalId, void *pRawValue, uint64_t nSize) const =0
 
virtual tResult SetRawData (const void *pData, uint8_t nLength)=0
 
virtual tResult GetDatabase (tChannelID nChannelId, adtf::ucom::ant::iobject_ptr< ICANFDDatabase > &pCANFDDatabase) const =0
 
virtual tResult GetAllSignalValues (const ucom::nitro::ifunction< void(tSignalID nSignalId, tSignalValue oRawValue, double nPhysValue)> &fnCallback) const =0
 
virtual tResult GetMultiplexSelectorFieldCode (uint32_t &nSelectorFieldCode)=0
 
virtual tResult SetMultiplexSelectorFieldCode (uint32_t nSelectorFieldCode)=0
 

Member Function Documentation

◆ CreateMessage()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::CreateMessage ( const tMessageID nMsgId,
const tChannelID nChannelId )
pure virtual

Create a new message.

Parameters
[in]nMsgIdMessage Id of the new message
[in]nChannelIdChannel Id from the message database
Return values
ERR_POINTERAny of the input arguments is a nullptr

◆ GetAllSignalValues()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetAllSignalValues ( const ucom::nitro::ifunction< void(tSignalID nSignalId, tSignalValue oRawValue, double nPhysValue)> & fnCallback) const
pure virtual

Return all signal values from the current data buffer. Non active signals (for example from multiplexed frames) are skipped.

Parameters
[out]fnCallbackCallback function returning decoded and raw values for each signal
Return values
ERR_MEMORYNo buffer area was set or created

◆ GetDatabase()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetDatabase ( tChannelID nChannelId,
adtf::ucom::ant::iobject_ptr< ICANFDDatabase > & pCANFDDatabase ) const
pure virtual

Return the CAN FD Database for the channel

Parameters
[in]nChannelIdCAN FD Channel number
[out]pCANFDDatabasePointer to CAN database
Return values
ERR_OUT_OF_RANGEFor the given channel no CAN database is defined

◆ GetMessageData() [1/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetMessageData ( adtf::devicetb::sdk::can::tCANData * pMsgData)
pure virtual

Return information about the CAN message.

Parameters
[out]pMsgDataPointer to the CAN data structure
Return values
ERR_MEMORYNo buffer area was set or the size is invalid
ERR_UNKNOWN_FORMATBuffer area is not compatible for CAN

◆ GetMessageData() [2/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetMessageData ( tCANFDData * pMsgData)
pure virtual

Return information about the CAN FD message.

Parameters
[out]pMsgDataPointer to the CAN FD data structure
Return values
ERR_MEMORYNo buffer area was set or the size is invalid

◆ GetMessageId()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetMessageId ( tMessageID & nMessageId) const
pure virtual

Return the CAN FD message identifier without any flags.

Parameters
[out]nMessageIdMessage identifier without any flags
Return values
ERR_MEMORYNo buffer area was set or the size is invalid

◆ GetMultiplexSelectorFieldCode()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetMultiplexSelectorFieldCode ( uint32_t & nSelectorFieldCode)
pure virtual

Return the selector field code from the current data buffer.

Parameters
[out]nSelectorFieldCodeSelector Field Code
Return values
ERR_MEMORYNo buffer area was set or created

◆ GetSignalValue() [1/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetSignalValue ( tSignalID nSignalId,
tSignalValue & oRawValue,
double & nPhysValue ) const
pure virtual

Return the decoded value of one CAN FD signal from the data area given by SetData or CreateMessage. oRawValue contains the non modified raw value. nPhysValue contains the decoded signal value and is set to std::numeric_limits<double>::quiet_NaN() if no decoding was possible.

Parameters
[in]nSignalIdValue ID
[out]oRawValueRaw signal value
[out]nPhysValuePhysical signal value (if not possible, std::numeric_limits<double>::quiet_NaN() is returned)
Return values
ERR_MEMORYNo buffer area was set or the size is invalid
ERR_INVALID_INDEXThe given nSignalID is not in the current CAN FD message

◆ GetSignalValue() [2/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::GetSignalValue ( tSignalID nSignalId,
void * pRawValue,
uint64_t nSize ) const
pure virtual

Return the decoded value of one CAN FD signal from the data area given by SetData or CreateMessage. The pRawValue contains the non modified raw value as data array in original byte order. nSize represents the size of the raw value data array.

Parameters
[in]nSignalIdValue ID
[out]pRawValueRaw signal value
[in]nSizeSize of raw value array in bytes
Return values
ERR_MEMORYNo buffer area was set or the size is invalid
ERR_INVALID_INDEXThe given nSignalID is not in the current CAN FD message

◆ SetData() [1/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::SetData ( const adtf::devicetb::sdk::can::tCANData * pData)
pure virtual

Set a message from an input CAN sample or raw data.

Parameters
[in]pDataPointer to input message

retval ERR_POINTER pData must not be nullptr

◆ SetData() [2/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::SetData ( const tCANFDData * pData)
pure virtual

Set a message from an input CAN FD sample.

Parameters
[in]pDataPointer to input message

retval ERR_POINTER pData must not be nullptr

◆ SetMultiplexSelectorFieldCode()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::SetMultiplexSelectorFieldCode ( uint32_t nSelectorFieldCode)
pure virtual

Set the selector field code for the current data buffer.

Parameters
[in]nSelectorFieldCodeSelector Field Code
Return values
ERR_MEMORYNo buffer area was set or created

◆ SetPhysicalSignalValue()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::SetPhysicalSignalValue ( tSignalID nSignalId,
double nPhysValue )
pure virtual

Set a physical value given by the signal id.

Parameters
[in]nSignalIdValue ID
[in]nPhysValuePhysical value to be written
Return values
ERR_MEMORYNo buffer area was set or the size is invalid
ERR_INVALID_INDEXThe given nSignalID is not in the current CAN FD message
ERR_OUT_OF_RANGEThe given physical value violates the signal boundaries

◆ SetRawData()

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::SetRawData ( const void * pData,
uint8_t nLength )
pure virtual

Copy the given CAN FD raw message payload to the payload of the message.

Parameters
[in]pDataPoint of raw message payload to set
[in]nLengthLength of raw message payload
Return values
ERR_MEMORYNo buffer area was set or the size is invalid
ERR_POINTERAny of the input arguments is a nullptr
ERR_INVALID_ARGThe specified length exceeds the message length

◆ SetRawSignalValue() [1/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::SetRawSignalValue ( tSignalID nSignalId,
const tSignalValue & oRawValue )
pure virtual

Set a raw signal value given by the signal id.

Parameters
[in]nSignalIdValue ID
[in]oRawValueRaw value to be written to CAN FD message
Return values
ERR_MEMORYNo buffer area was set or the size is invalid
ERR_INVALID_INDEXThe given nSignalID is not in the current CAN FD message

◆ SetRawSignalValue() [2/2]

virtual tResult adtf::devicetb::sdk::canfd::ignition::ICANFDCoder::SetRawSignalValue ( tSignalID nSignalId,
const void * pRawValue,
uint64_t nSize )
pure virtual

Set a raw signal value byte array given by the signal id.

Parameters
[in]nSignalIdValue ID
[in]pRawValueRaw data byte array (byte array was allocated from the caller and set in original byte order)
[in]nSizeSize of the raw value byte array in bytes
Return values
ERR_MEMORYNo buffer area was set or the size is invalid
ERR_INVALID_INDEXThe given nSignalID is not in the current CAN FD message

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