ADTF_DEVICE_TOOLBOX  3.12.1 (ADTF 3.18.3)
can_coder_intf.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <adtf_streaming3.h>
11 #include "can_database_intf.h"
12 
16 namespace adtf
17 {
18 
22 namespace devicetb
23 {
24 
28 namespace sdk
29 {
30 
34 namespace can
35 {
36 
40 namespace axle
41 {
42 class ICANCoder : public adtf::ucom::ant::IObject
43 {
44 public:
45  ADTF_IID(ICANCoder, "can_coder.axle.can.sdk.devicetb.adtf.iid");
46 
47 public:
48 
54  virtual tResult Begin(const adtf::streaming::ant::ISampleBuffer* pData) = 0;
55 
62  virtual tResult Begin(const void* pData, int64_t nSize) = 0;
63 
68  virtual tResult End() = 0;
69 
82  virtual tResult SetMessageInfo(tChannelID nChannel, tMessageID nMsgID, bool bExtended) = 0;
83 
95  virtual tResult GetMessageInfo(tChannelID* pnChannel, tMessageID* pnMsgID, bool* pbExtended) = 0;
96 
112  virtual tResult Set(const char* strValueID, const void* pValue) = 0;
113 
129  virtual tResult Get(const char* strValueID, void* pValue) = 0;
130 
148  virtual tResult SetSignalValue(tSignalID nSignalID, const tSignalValue* pSignalValue) = 0;
149 
165  virtual tResult GetSignalValue(tSignalID nSignalID, tSignalValue* pSignalValue) const = 0;
166 
176  virtual tResult SetRawData(const uint8_t* pData, uint8_t nLength) = 0;
177 
186  virtual tResult GetRawData(const uint8_t** pData, uint8_t* nLength) const = 0;
187 
202  virtual tResult GetSignalID(tChannelID nChannel, const char* strValueID, tSignalID* pSignalID) const = 0;
203 
213  virtual tResult GetDatabase(tChannelID nChannel,
214  adtf::ucom::ant::iobject_ptr<ICANDatabase>& pCANDatabase) const = 0;
215 
225  virtual tResult SetDatabase(tChannelID nChannel, const char* strFileName) = 0;
226 };
227 
228 } // namespace axle
229 
231 
232 } // namespace can
233 } // namespace sdk
234 } // namespace devicetb
235 } // namespace adtf
Copyright © CARIAD SE.
virtual tResult GetSignalID(tChannelID nChannel, const char *strValueID, tSignalID *pSignalID) const =0
Returns the value ID of a given CAN signal name for the specified channel.
virtual tResult SetRawData(const uint8_t *pData, uint8_t nLength)=0
Copies the given raw data to the raw data of the message given by Begin().
virtual tResult End()=0
Releases the the message which was acquired by any of the Begin() functions.
virtual tResult Begin(const adtf::streaming::ant::ISampleBuffer *pData)=0
Sets the CAN message buffer the coder operates on.
virtual tResult SetDatabase(tChannelID nChannel, const char *strFileName)=0
Loads the DBC file and uses it for (de-)coding of signal values for the specified channel.
virtual tResult SetMessageInfo(tChannelID nChannel, tMessageID nMsgID, bool bExtended)=0
Inits a new CAN message.
virtual tResult Set(const char *strValueID, const void *pValue)=0
Sets the value, which is defined with strValueID.
virtual tResult GetSignalValue(tSignalID nSignalID, tSignalValue *pSignalValue) const =0
Returns the decoded value of one CAN signal from the data area given by Begin() On return the field t...
virtual tResult GetMessageInfo(tChannelID *pnChannel, tMessageID *pnMsgID, bool *pbExtended)=0
Returns information about the CAN message.
virtual tResult SetSignalValue(tSignalID nSignalID, const tSignalValue *pSignalValue)=0
Sets the value of one CAN signal in the data area given by ICANCoder::Begin To set the raw value dire...
virtual tResult Begin(const void *pData, int64_t nSize)=0
Sets the CAN message buffer the coder operates on.
virtual tResult Get(const char *strValueID, void *pValue)=0
Gets the value, which is defined with strValueID.
virtual tResult GetDatabase(tChannelID nChannel, adtf::ucom::ant::iobject_ptr< ICANDatabase > &pCANDatabase) const =0
Returns the CAN Database for the channel.
virtual tResult GetRawData(const uint8_t **pData, uint8_t *nLength) const =0
Returns the the raw data and the length of the message given by Begin()
axle::ICANCoder ICANCoder
ADTF - Namespace.