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 Member Functions

 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 51 of file someip_coder_intf.h.

Member Function Documentation

◆ EnableDecoding()

virtual tResult EnableDecoding ( uint32_t  nMessageId,
bool  bEnable = true 
)
pure virtual

Enable or disable decoding for a given message type.

Parameters
[in]nMessageIdThe id of the message of interest.
[in]bEnableEnable or disable decoding.
Returns
tResult

◆ FetchOutputSample()

virtual tResult FetchOutputSample ( adtf::ucom::iobject_ptr< adtf::streaming::ISample > &  pSample)
pure virtual

Consume an output sample from the decoder.

The corresponding type description can be obtained from GetPayloadDescription().

Parameters
[out]pSampleOutput sample containing a adtf::devicetb::sdk::someip::hood::tSomeIpSampleHeader and payload in unpacked format. The message id as defined by the database is encoded in the substream id of the sample. The callee takes exclusive ownership of the returned sample.
Returns
tResult ERR_EMPTY if no more samples are currently available.

◆ GetDatabase()

virtual tResult GetDatabase ( adtf::ucom::ant::iobject_ptr< const ISomeIpDatabase > &  pDataBase) const
pure virtual

Returns a reference to the SOME/IP database instance used by the coder.

Parameters
[out]pDataBasePointer to the database instance - empty if the decoder has no database set.
Returns
tResult

◆ GetPayloadDescription()

virtual tResult GetPayloadDescription ( const uint32_t  nMessageId,
adtf::base::IString &&  strMDDefinitions,
adtf::base::IString &&  strMDStruct 
) const
pure virtual

Gets a DDL description for the payload.

Samples obtained from FetchOutputSample() are in the serialized representation of this description.

Parameters
[in]nMessageIdThe id of the message of interest.
[out]strMDDefinitionsThe DDL description for the payload, unmodified if no description is available.
[out]strMDStructThe DDL struct name for the payload, unmodified if no description is available. The payload description is constant over the life time of ISomeIpDecoder.
Returns
tResult

◆ ProcessInputSample()

virtual tResult ProcessInputSample ( const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &  pSample)
pure virtual

Feed an input sample to the decoder.

Whenever providing a new input sample, any number of output samples become available to fech with FetchOutputSample().

Parameters
[in]pSampleInput sample containing a adtf::devicetb::sdk::someip::hood::tSomeIpSampleHeader and payload in serialized network format. ISomeIpDecoder may share ownership of the input sample until related SOME/IP TP reassembly is complete.
Returns
tResult