ADTF
Loading...
Searching...
No Matches
adtf::streaming::cNullReader Class Reference

#include <samplereader.h>

Inherits adtf::streaming::flash::ISampleReader.

Public Member Functions

 cNullReader ()
 
 ~cNullReader () override
 
void SetName (const char *strName) override
 
tResult GetName (base::ant::IString &&strName) override
 
tResult SetType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) override
 
tResult GetType (ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const override
 
tResult BeginStreaming (ant::ISampleStream &pStream) override
 
tResult EndStreaming () override
 
tResult SetStreamerPin (const ucom::ant::iobject_ptr< flash::IStreamerPin > &pStreamerPin) override
 
tResult GetNextSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 
tResult GetLastSample (ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 
tResult GetLastType (ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override
 
tResult SetStreamError (tResult oError) override
 
tResult ReadAllAvailableItems () override
 
void SetAcceptTypeCallback (const std::function< tResult(const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)> &fnAcceptTypeCallback)
 
void SetStreamErrorCallback (const std::function< tResult(tResult oStreamError)> &fnStreamErrorCallback)
 

Protected Attributes

std::unique_ptr< cImplementation > m_pImplementation
 

Detailed Description

A reader that does not read anything. Use this to discard all samples and stream types.

Constructor & Destructor Documentation

◆ cNullReader()

adtf::streaming::kiwi::cNullReader::cNullReader ( )

Constructor

◆ ~cNullReader()

adtf::streaming::kiwi::cNullReader::~cNullReader ( )
override

Destructor

Member Function Documentation

◆ BeginStreaming()

tResult adtf::streaming::kiwi::cNullReader::BeginStreaming ( ant::ISampleStream & pStream)
overridevirtual

Begin streaming on the given sample stream.

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

Implements adtf::streaming::flash::ISampleStreamer.

◆ EndStreaming()

tResult adtf::streaming::kiwi::cNullReader::EndStreaming ( )
overridevirtual

End streaming

Returns
Standard result.

Implements adtf::streaming::flash::ISampleStreamer.

◆ GetLastSample()

tResult adtf::streaming::kiwi::cNullReader::GetLastSample ( ucom::ant::iobject_ptr< const ant::ISample > & pSample)
overridevirtual

Reads the latest available sample from the associated sample stream.

If more than a single new sample was availablle, all but the last sample will be discarded.

If no new sample was available the last sample previously fetched will be returned again.

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

Implements adtf::streaming::flash::ISampleReader.

◆ GetLastType()

tResult adtf::streaming::kiwi::cNullReader::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 adtf::streaming::flash::ISampleReader.

◆ GetName()

tResult adtf::streaming::kiwi::cNullReader::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 adtf::streaming::flash::ISampleStreamer.

◆ GetNextSample()

tResult adtf::streaming::kiwi::cNullReader::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 adtf::streaming::flash::ISampleReader.

◆ GetType()

tResult adtf::streaming::kiwi::cNullReader::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 adtf::streaming::flash::ISampleStreamer.

◆ ReadAllAvailableItems()

tResult adtf::streaming::kiwi::cNullReader::ReadAllAvailableItems ( )
overridevirtual

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

Returns
Standard result.

Implements adtf::streaming::flash::ISampleReader.

◆ SetName()

void adtf::streaming::kiwi::cNullReader::SetName ( const char * strName)
overridevirtual

Sets the name of the streamer. This will be used when creating pins.

Parameters
[in]strNameThe name

Implements adtf::streaming::flash::ISampleStreamer.

◆ SetStreamerPin()

tResult adtf::streaming::kiwi::cNullReader::SetStreamerPin ( const ucom::ant::iobject_ptr< flash::IStreamerPin > & pStreamerPin)
overridevirtual

Sets the pin that the streamer is associated with.

Parameters
[in]pStreamerPinThe pin.
Returns
Standard result.

Implements adtf::streaming::flash::ISampleStreamer.

◆ SetStreamError()

tResult adtf::streaming::kiwi::cNullReader::SetStreamError ( tResult oError)
overridevirtual

Sets an error on the associated sample stream.

Parameters
[in]oErrorThe error.
Returns
Standard result.

Implements adtf::streaming::flash::ISampleReader.

◆ SetType()

tResult adtf::streaming::kiwi::cNullReader::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 adtf::streaming::flash::ISampleStreamer.


The documentation for this class was generated from the following file: