|
|
| ADTF_IID (ICANFDCoder, "canfd_coder.axle.canfd.sdk.devicetb.adtf.iid") |
| |
|
virtual tResult | Begin (const adtf::streaming::ISampleBuffer *pData)=0 |
| |
| virtual tResult | Begin (const void *pData, int64_t nSize)=0 |
| |
|
virtual tResult | End ()=0 |
| |
| virtual tResult | SetMessageInfo (tChannelID nChannel, tMessageID nMsgID, bool bExtended, uint16_t nFlags=0)=0 |
| |
| virtual tResult | GetMessageInfo (tChannelID *pnChannel, tMessageID *pnMsgID, bool *pbExtended, uint16_t *pnFlags)=0 |
| |
| virtual tResult | Set (const char *strValueID, const void *pValue)=0 |
| |
| virtual tResult | Get (const char *strValueID, void *pValue)=0 |
| |
| virtual tResult | SetSignalValue (tSignalID nSignalID, const tSignalValue *pSignalValue)=0 |
| |
| virtual tResult | GetSignalValue (tSignalID nSignalID, tSignalValue *pSignalValue) const =0 |
| |
| virtual tResult | SetRawData (const uint8_t *pData, uint8_t nLength)=0 |
| |
| virtual tResult | GetRawData (const uint8_t **pData, uint8_t *nLength) const =0 |
| |
| virtual tResult | GetSignalID (tChannelID nChannel, const char *strValueID, tSignalID *pSignalID) const =0 |
| |
| virtual tResult | GetDatabase (tChannelID nChannel, adtf::ucom::ant::iobject_ptr< ICANFDDatabase > &pCANFDDatabase) const =0 |
| |
| virtual tResult | SetDatabase (tChannelID nChannel, const char *strFileName)=0 |
| |
◆ Begin()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::Begin |
( |
const void * | pData, |
|
|
int64_t | nSize ) |
|
pure virtual |
Creates read and write acces for writing the desired information.
- Parameters
-
| [in] | pData | pointer to data array |
| [in] | nSize | size of the desired array. Has to be sizeof(tData) |
retval ERR_POINTER pData must not be nullptr retval ERR_MEMORY The buffer area of the data given has no valid size for this message.
◆ Get()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::Get |
( |
const char * | strValueID, |
|
|
void * | pValue ) |
|
pure virtual |
Gets the value, which is defined with strValueID. This value is defined within the data area of the stream. The real data area is the buffer allocated by the given by the data pointer of Begin method. The data will be copied in the pValue.
- Attention
- : You need to allocate the memory of pValue with the right size!
- Parameters
-
| [in] | strValueID | The value ID specified in the stream (NULL terminated). |
| [out] | pValue | Pointer to the value to get, this is a reference to the memory area within the given pData by Begin. |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_MEMORY | The buffer area of the given data by Begin has no valid size. |
| ERR_INVALID_ARG | The given strValueID is not specified. |
◆ GetDatabase()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::GetDatabase |
( |
tChannelID | nChannel, |
|
|
adtf::ucom::ant::iobject_ptr< ICANFDDatabase > & | pCANFDDatabase ) const |
|
pure virtual |
Returns the CAN Database for the channel
- Parameters
-
| [in] | nChannel | CAN FD Channel number |
| [out] | pCANFDDatabase | Pointer to CAN database |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_NOT_FOUND | For the given channel no CAN database is defined |
◆ GetMessageInfo()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::GetMessageInfo |
( |
tChannelID * | pnChannel, |
|
|
tMessageID * | pnMsgID, |
|
|
bool * | pbExtended, |
|
|
uint16_t * | pnFlags ) |
|
pure virtual |
Returns information about the CAN FD message
- Parameters
-
| [in] | pnChannel | Pointer to variable to receive the CAN FD channel number |
| [in] | pnMsgID | Pointer to variable to receive the CAN FD message ID |
| [in] | pbExtended | Pointer to variable to receive the CAN FD message type |
| [in] | pnFlags | Pointer to variable to receive the CAN FD Flags like Extended Data Length and Baud Rate Switch |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_POINTER | Any of the input arguments is a nullptr |
| ERR_MEMORY | The buffer area of the data given by Begin() has no valid size for this message. |
◆ GetRawData()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::GetRawData |
( |
const uint8_t ** | pData, |
|
|
uint8_t * | nLength ) const |
|
pure virtual |
Returns the the raw data and the length of the message given by Begin()
- Parameters
-
| [out] | pData | Pointer of pointer to raw message data |
| [out] | nLength | Length of raw message data |
- Return values
-
◆ GetSignalID()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::GetSignalID |
( |
tChannelID | nChannel, |
|
|
const char * | strValueID, |
|
|
tSignalID * | pSignalID ) const |
|
pure virtual |
Returns the value ID of a given CAN FD signal name for the specified channel
- Parameters
-
| [in] | nChannel | CAN FD Channel number |
| [in] | strValueID | Name of CAN FD signal |
| [in] | pSignalID | Pointer to variable which receives the ID |
- Note
- Relevant value id strings for gettings specific signal ids within a CAN FD message. In these cases the nChannel is negligible:
-
"ui8Tag" - returns CANFD_SIGNALID_HEADER_TAG
-
"ui8Channel" - returns CANFD_SIGNALID_HEADER_CHANNEL
-
"tmTimeStamp" - returns CANFD_SIGNALID_HEADER_HWTIME *
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_NOT_FOUND | The given Name is not valid. |
◆ GetSignalValue()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::GetSignalValue |
( |
tSignalID | nSignalID, |
|
|
tSignalValue * | pSignalValue ) const |
|
pure virtual |
Returns the decoded value of one CAN FD signal from the data area given by Begin() On return the field tSignalValue::nTypeTag and the corresponding field in the union will be filled with the appropriate value. To get the signal raw value, the field tSignalValue::nTypeTag has to be set to TAG_RAW_VALUE before calling this method.
- Parameters
-
| [in] | nSignalID | Value ID |
| [in,out] | pSignalValue | Pointer to structure which receives the value |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_MEMORY | The buffer area of the data given by Begin() has no valid size for this message. |
| ERR_NOT_FOUND | The given nSignalID is not in the current CAN FD message. |
| ERR_INVALID_INDEX | The signal is not in the actual multiplexor group |
◆ Set()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::Set |
( |
const char * | strValueID, |
|
|
const void * | pValue ) |
|
pure virtual |
Sets the value, which is defined with strValueID. The content of pValue will be copied. This value is defined within the data area of the coder. The real data area is the buffer allocated by the given by the Begin method. If no data is given by Begin then the setValue failed.
- Parameters
-
| [in] | strValueID | The value ID specified in the stream (NULL terminated). |
| [in] | pValue | Pointer to the value to set. |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_MEMORY | The buffer area of the data given by Begin has no valid size for this coder. |
| ERR_NOT_FOUND | The given strValueID is not specified. |
◆ SetDatabase()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::SetDatabase |
( |
tChannelID | nChannel, |
|
|
const char * | strFileName ) |
|
pure virtual |
Loads the CAN FD database file and uses it for (de-)coding of signal values for the specified channel
- Parameters
-
| [in] | nChannel | CAN FD Channel number |
| [in] | strFileName | Name of database file to be loaded |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_FILE_NOT_FOUND | The given file is not valid. |
| ERR_INVALID_ARG | nChannel greater than CANFD_CHANNEL_MAX or not supported nFlags |
◆ SetMessageInfo()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::SetMessageInfo |
( |
tChannelID | nChannel, |
|
|
tMessageID | nMsgID, |
|
|
bool | bExtended, |
|
|
uint16_t | nFlags = 0 ) |
|
pure virtual |
Inits a new CAN FD message. The length of the CAN FD message will be set automatically. This method has to be called if a new CAN FD message has to be created.
- Parameters
-
| [in] | nChannel | CAN FD channel number |
| [in] | nMsgID | CAN FD message ID |
| [in] | bExtended | True if message has an extended CAN FD identifier |
| [in] | nFlags | Sets CAN FD Flags like Extended Data Length and Baud Rate Switch |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_MEMORY | The buffer area of the data given by Begin() has no valid size for this message. |
| ERR_INVALID_ARG | Channel not found |
| ERR_NOT_FOUND | The given nMsgID is not valid. |
◆ SetRawData()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::SetRawData |
( |
const uint8_t * | pData, |
|
|
uint8_t | nLength ) |
|
pure virtual |
Copies the given raw data to the raw data of the message given by Begin().
- Parameters
-
| [in] | pData | Point of raw message data to set |
| [in] | nLength | Length of raw message data |
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_INVALID_ARG | The specified length of the message given by Begin() and nLength does not match. |
◆ SetSignalValue()
| virtual tResult adtf::devicetb::sdk::canfd::axle::ICANFDCoder::SetSignalValue |
( |
tSignalID | nSignalID, |
|
|
const tSignalValue * | pSignalValue ) |
|
pure virtual |
Sets the value of one CAN FD signal in the data area given by ICANFDCoder::Begin To set the raw value directly, the field tSignalValue::nTypeTag has to be set to TAG_RAW_VALUE and the field tSignalValue::n64RawValue to the new raw value.
- Parameters
-
| [in] | nSignalID | Value ID |
| [in] | pSignalValue | Value to be written to CAN FD message |
- Note
- Relevant signal ids for setting specific values within a CAN FD message:
-
CANFD_SIGNALID_HEADER_TAG - specifying the hardware tag
-
CANFD_SIGNALID_HEADER_CHANNEL - specifying the hardware channel
-
CANFD_SIGNALID_HEADER_HWTIME - specifying the hardware time
- Return values
-
| ERR_NOERROR | No Error. |
| ERR_MEMORY | The buffer area of the data given by Begin() has no valid size for this message. |
| ERR_NOT_FOUND | The given nSignalID is not in the current CAN FD message. |
| ERR_INVALID_INDEX | The signal is not in the actual multiplexor group |
The documentation for this class was generated from the following file: