ADTF_DEVICE_TOOLBOX  3.12.1 (ADTF 3.18.3)
ISomeIpDecoderabstract

The ISomeIpCoder interface provides convenient access to the contents of a SOME/IP sample. More...

Inheritance diagram for ISomeIpDecoder:
[legend]

Public Types

using tOutputCallback = adtf::ucom::ifunction_ptr< void(const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample)>
 
using tErrorCallback = adtf::ucom::ifunction_ptr< void(const tResult &oResult, const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample)>
 

Public Member Functions

 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. More...
 
virtual tResult SetErrorHandler (const tErrorCallback &fnErrorCallback)=0
 Set a callback for non-critical decoding errors. More...
 
virtual tResult GarbageCollection (adtf::base::flash::tNanoSeconds tmTreshold)=0
 Invalidate the SOME/IP TP reassembly cache. More...
 
virtual tResult TimeReset ()=0
 Invalidate the SOME/IP TP reassembly cache. More...
 
- Public Member Functions inherited from ISomeIpDecoder
 ADTF_IID (ISomeIpDecoder, "someip_decoder.hood.someip.sdk.devicetb.adtf.iid")
 Interface ID for the SOME/IP coder interface.
 
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. More...
 
virtual tResult GetPayloadDescription (const uint32_t nMessageId, adtf::base::IString &&strMDDefinitions, adtf::base::IString &&strMDStruct) const =0
 Gets a DDL description for the payload. More...
 
virtual tResult ProcessInputSample (const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample)=0
 Feed an input sample to the decoder. More...
 
virtual tResult FetchOutputSample (adtf::ucom::iobject_ptr< adtf::streaming::ISample > &pSample)=0
 Consume an output sample from the decoder. More...
 
virtual tResult EnableDecoding (uint32_t nMessageId, bool bEnable=true)=0
 Enable or disable decoding for a given message type. More...
 

Detailed Description

The ISomeIpCoder interface provides convenient access to the contents of a SOME/IP sample.

This includes the sample header and the individual pdu payload.

Definition at line 118 of file someip_coder_intf.h.

Member Function Documentation

◆ GarbageCollection()

virtual tResult GarbageCollection ( adtf::base::flash::tNanoSeconds  tmTreshold)
pure virtual

Invalidate the SOME/IP TP reassembly cache.

Discarded fragments are reported via error handler, if set.

Parameters
tmTresholdDiscard all incomplete fragments older than tmTreshold.
Returns
tResult

◆ SetErrorHandler()

virtual tResult SetErrorHandler ( const tErrorCallback &  fnErrorCallback)
pure virtual

Set a callback for non-critical decoding errors.

When the callback is enabled, ISomeIpDecoder will no longer log messages on its own.

Parameters
[in]fnErrorCallbackCallback for each error. Optionally references an ISample in which the error was detected. oResult == ERR_NOT_FOUND indicates database mismatch. oResult == ERR_IO_INCOMPLETE indicates SOME/IP TP faults. All other error codes indicate bitstream level corruptions.
Returns
tResult

◆ SetOutputHandler()

virtual tResult SetOutputHandler ( const tOutputCallback &  fnOutputCallback)
pure virtual

Set a callbackfor output sample.

When the callback is enabled, FetchOutputSample will no longer return any samples.

Parameters
[in]fnOutputCallbackCallback to be called on each output sample.
Returns
tResult

◆ TimeReset()

virtual tResult TimeReset ( )
pure virtual

Invalidate the SOME/IP TP reassembly cache.

All fragments are discarded silently.

Returns
tResult