ADTF  3.13.2
cSampleReader


The default Sample Reader will read the incomung Stream of a IInPin. More...

Inheritance diagram for cSampleReader:
[legend]

Public Member Functions

 cSampleReader (ant::ISampleReaderQueue &oQueue, ant::ISampleStreamAccess::tMode eAccessMode, tBool bStoreLastSample)
 
tVoid SetName (const tChar *strName) override
 Sets the name of the streamer. More...
 
tResult GetName (base::ant::IString &&strName) override
 Retrieves the name of the streamer. More...
 
tResult SetType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) override
 Sets the initial stream type of a streamer. More...
 
tResult GetType (ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const override
 Returns the initial stream type of the streamer. More...
 
tResult BeginStreaming (ISampleStream &oSampleStream) override
 Begin streaming on the given sample stream. More...
 
tResult EndStreaming () override
 End streaming. More...
 
tResult SetStreamerPin (const ucom::ant::iobject_ptr< IStreamerPin > &pStreamerPin) override
 Sets the pin that the streamer is associated with. More...
 
tVoid SetAcceptTypeCallback (const std::function< tResult(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)> &fnAcceptTypeCallback)
 Sets a callback function which is called while a Stream Type is received - see also AcceptType and IsCompatible implementations. More...
 
tVoid SetStreamErrorCallback (const std::function< tResult(tResult oStreamError)> &fnStreamErrorCallback)
 A callback function to react on stream errors. More...
 
tResult SetStreamError (tResult oError) override
 Sets an error on the associated sample stream. More...
 
tResult GetLastType (ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override
 Returns the last stream type that was read from the sample stream. More...
 
tResult GetNextSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 Reads the next available sample from the associated sample stream. More...
 
tResult GetLastSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 Reads the last available sample from the associated sample stream. More...
 
tVoid Reset ()
 
tResult ReadAllAvailableItems () override
 Reads all available items from the sample stream into internal queues. More...
 
tResult RequestSamples (ucom::ant::iobject_ptr< hollow::IStreamingRequest > &pRequest, tUInt32 nSubStreamId, const base::ant::IProperties *pRequestProperties=nullptr)
 RequestSamples of the given Substream to be generated and/or transmitted. More...
 
tVoid SetSynchronousTypeUpdateCallback (const std::function< tResult(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)> &fnRequestTypeUpdateCallback)
 

Protected Attributes

std::unique_ptr< cImplementation > m_pImplementation
 

Detailed Description


The default Sample Reader will read the incomung Stream of a IInPin.

Definition at line 963 of file samplereader.h.

Member Function Documentation

◆ BeginStreaming()

tResult BeginStreaming ( ISampleStream pStream)
overridevirtual

Begin streaming on the given sample stream.

Parameters
[in]pStreamthe sample stream.
Returns
Standard result.

Implements ISampleStreamer.

◆ EndStreaming()

tResult EndStreaming ( )
overridevirtual

End streaming.

Returns
Standard result.

Implements ISampleStreamer.

◆ GetLastSample()

tResult GetLastSample ( ucom::ant::iobject_ptr< const ant::ISample > &  pSample)
overridevirtual

Reads the last available sample from the associated sample stream.

If no new sample was available the last one will be returned.

Parameters
[out]pSampleThis will refrerence the sample.
Return values
ERR_EMTPYNo sample available

Implements ISampleReader.

◆ GetLastType()

tResult GetLastType ( ucom::ant::iobject_ptr< const ant::IStreamType > &  pType)
overridevirtual

Returns the last stream type that was read from the sample stream.

Parameters
[out]pTypeThis will reference the last stream type
Returns

Implements ISampleReader.

◆ GetName()

tResult GetName ( base::ant::IString &&  strName)
overridevirtual

Retrieves the name of the streamer.

Parameters
[out]strNameThis will be updated with the name.
Returns
Standard result.

Implements ISampleStreamer.

◆ GetNextSample()

tResult GetNextSample ( ucom::ant::iobject_ptr< const ant::ISample > &  pSample)
overridevirtual

Reads the next available sample from the associated sample stream.

Parameters
[out]pSampleThis will refrerence the sample.
Return values
ERR_EMTPYNo sample available

Implements ISampleReader.

◆ GetType()

tResult GetType ( ucom::ant::iobject_ptr< const ant::IStreamType > &  pStreamType) const
overridevirtual

Returns the initial stream type of the streamer.

Parameters
[out]pStreamTypeThis will reference the initial stream type.
Returns
Standard result.

Implements ISampleStreamer.

◆ ReadAllAvailableItems()

tResult ReadAllAvailableItems ( )
overridevirtual

Reads all available items from the sample stream into internal queues.

Returns
Standard result.

Implements ISampleReader.

◆ RequestSamples()

tResult RequestSamples ( ucom::ant::iobject_ptr< hollow::IStreamingRequest > &  pRequest,
tUInt32  nSubStreamId,
const base::ant::IProperties pRequestProperties = nullptr 
)

RequestSamples of the given Substream to be generated and/or transmitted.

Parameters
[out]pRequestKeep this as long as you request samples to be transmitted.
[in]nSubStreamIdThe id of the Substream.
[in]pRequestPropertiesThe request properties. If nullptr, then defaults will be used.
Returns
Standard Result.

◆ SetAcceptTypeCallback()

tVoid SetAcceptTypeCallback ( const std::function< tResult(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)> &  fnAcceptTypeCallback)

Sets a callback function which is called while a Stream Type is received - see also AcceptType and IsCompatible implementations.

Parameters
[in]fnAcceptTypeCallbackThe callback function is called while AcceptType is executed. It must return ERR_NOERROR to accept the type or any error to reject the new type.

◆ SetName()

tVoid SetName ( const tChar strName)
overridevirtual

Sets the name of the streamer.

This will be used when creating pins.

Parameters
[in]strNameThe name

Implements ISampleStreamer.

◆ SetStreamerPin()

tResult SetStreamerPin ( const ucom::ant::iobject_ptr< IStreamerPin > &  pStreamerPin)
overridevirtual

Sets the pin that the streamer is associated with.

Parameters
[in]pStreamerPinThe pin.
Returns
Standard result.

Implements ISampleStreamer.

◆ SetStreamError()

tResult SetStreamError ( tResult  oError)
overridevirtual

Sets an error on the associated sample stream.

Parameters
[in]oErrorThe error.
Returns
Standard result.

Implements ISampleReader.

◆ SetStreamErrorCallback()

tVoid SetStreamErrorCallback ( const std::function< tResult(tResult oStreamError)> &  fnStreamErrorCallback)

A callback function to react on stream errors.

Parameters
[in]fnStreamErrorCallbackThe callback function which will be called on stream errors

◆ SetType()

tResult SetType ( const ucom::ant::iobject_ptr< const ant::IStreamType > &  pStreamType)
overridevirtual

Sets the initial stream type of a streamer.

Parameters
[in]pStreamTypeThe stream type
Returns
Standard result.

Implements ISampleStreamer.


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Tue Nov 16 2021 by doxygen 1.8.14)