ADTF_DEVICE_TOOLBOX  3.12.1 (ADTF 3.18.3)
someip_coder_intf.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include "someip_database_intf.h"
11 #include "someip_types.h"
12 #include <adtf_utils.h>
13 #include <adtf_ucom3.h>
14 #include <adtf_streaming3.h>
15 
16 
20 namespace adtf
21 {
22 
26 namespace devicetb
27 {
28 
32 namespace sdk
33 {
34 
38 namespace someip
39 {
40 
44 namespace hood
45 {
46 
51  class ISomeIpDecoder : public adtf::ucom::ant::IObject
52  {
53  public:
55  ADTF_IID(ISomeIpDecoder, "someip_decoder.hood.someip.sdk.devicetb.adtf.iid");
56 
63  virtual tResult GetDatabase(adtf::ucom::ant::iobject_ptr<const ISomeIpDatabase>& pDataBase) const = 0;
64 
76  virtual tResult GetPayloadDescription(const uint32_t nMessageId, adtf::base::IString&& strMDDefinitions, adtf::base::IString&& strMDStruct) const = 0;
77 
87  virtual tResult ProcessInputSample(const adtf::ucom::iobject_ptr<const adtf::streaming::ISample>& pSample) = 0;
88 
99  virtual tResult FetchOutputSample(adtf::ucom::iobject_ptr<adtf::streaming::ISample>& pSample) = 0;
100 
108  virtual tResult EnableDecoding(uint32_t nMessageId, bool bEnable = true) = 0;
109  };
110 
111 } // namespace hood
112 
116 namespace key {
119  {
120  public:
122  ADTF_IID(ISomeIpDecoder, "someip_decoder.key.someip.sdk.devicetb.adtf.iid");
123 
124  using tOutputCallback = adtf::ucom::ifunction_ptr<void(const adtf::ucom::iobject_ptr<const adtf::streaming::ISample>& pSample)>;
131  virtual tResult SetOutputHandler(const tOutputCallback& fnOutputCallback) = 0;
132 
133  using tErrorCallback = adtf::ucom::ifunction_ptr<void(const tResult& oResult, const adtf::ucom::iobject_ptr<const adtf::streaming::ISample>& pSample)>;
142  virtual tResult SetErrorHandler(const tErrorCallback& fnErrorCallback) = 0;
143 
150  virtual tResult GarbageCollection(adtf::base::flash::tNanoSeconds tmTreshold) = 0;
151 
156  virtual tResult TimeReset() = 0;
157 
158  };
159 } // namespace key
160 
163 
164 } // namespace someip
165 } // namespace sdk
166 } // namespace devicetb
167 } // namespace adtf
The ISomeIpCoder interface provides convenient access to the contents of a SOME/IP sample.
virtual tResult FetchOutputSample(adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample)=0
Consume an output sample from the decoder.
virtual tResult EnableDecoding(uint32_t nMessageId, bool bEnable=true)=0
Enable or disable decoding for a given message type.
virtual tResult GetPayloadDescription(const uint32_t nMessageId, adtf::base::IString &&strMDDefinitions, adtf::base::IString &&strMDStruct) const =0
Gets a DDL description for the payload.
virtual tResult ProcessInputSample(const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample)=0
Feed an input sample to the decoder.
virtual tResult GetDatabase(adtf::ucom::ant::iobject_ptr< const ISomeIpDatabase > &pDataBase) const =0
Returns a reference to the SOME/IP database instance used by the coder.
ADTF_IID(ISomeIpDecoder, "someip_decoder.hood.someip.sdk.devicetb.adtf.iid")
Interface ID for the SOME/IP coder interface.
The ISomeIpCoder interface provides convenient access to the contents of a SOME/IP sample.
virtual tResult GarbageCollection(adtf::base::flash::tNanoSeconds tmTreshold)=0
Invalidate the SOME/IP TP reassembly cache.
virtual tResult SetErrorHandler(const tErrorCallback &fnErrorCallback)=0
Set a callback for non-critical decoding errors.
virtual tResult TimeReset()=0
Invalidate the SOME/IP TP reassembly cache.
ADTF_IID(ISomeIpDecoder, "someip_decoder.key.someip.sdk.devicetb.adtf.iid")
Interface ID for the SOME/IP coder interface.
virtual tResult SetOutputHandler(const tOutputCallback &fnOutputCallback)=0
Set a callbackfor output sample.
key::ISomeIpDecoder ISomeIpDecoder
The ISomeIpCoder interface provides convenient access to the contents of a SOME/IP sample.
ADTF - Namespace.
Copyright © CARIAD SE.
Copyright 2024 CARIAD SE.