ADTF
cLastSamplesCollector

A class that collects the last samples from multiple sample readers. More...

Public Member Functions

tResult CollectFrom (cLastSampleReader &oSampleReader)
 Adds a sample reader to the list of sample readers that data is read from. More...
 
template<typename ... T>
tResult GetLastSamples (adtf::ucom::iobject_ptr< const ISample > &pSample, T &... samples)
 Get the last samples from all sample readers if there is no new data in queue, the last sent data is used. More...
 
tResult GetLastSamples ()
 

Private Attributes

std::vector< cLastSampleReader * > m_oSampleReaders
 

Detailed Description

A class that collects the last samples from multiple sample readers.

(for more detail see sample_reader)

Definition at line 62 of file sample_collectors.h.

Member Function Documentation

◆ CollectFrom()

tResult CollectFrom ( cLastSampleReader oSampleReader)
inline

Adds a sample reader to the list of sample readers that data is read from.

Parameters
[in]oSampleReaderThe sample reader to read data from.
Return values
ERR_NOERRORStream type is valid

Definition at line 74 of file sample_collectors.h.

References RETURN_NOERROR.

◆ GetLastSamples()

tResult GetLastSamples ( adtf::ucom::iobject_ptr< const ISample > &  pSample,
T &...  samples 
)
inline

Get the last samples from all sample readers if there is no new data in queue, the last sent data is used.

Parameters
[in]pSampleSample to get from current reader
[in]samplesnext Sample to get
Return values
ERR_NOERRORdata is valid
RETURN_IF_FAILED(ERR_INVALID_ARG) more sample were requested than queues available (to many parameters)

Definition at line 89 of file sample_collectors.h.

References cLastSamplesCollector::GetLastSamples(), RETURN_ERROR, and RETURN_IF_FAILED.

Referenced by cLastSamplesCollector::GetLastSamples().