The default Sample Reader will read the incomung Stream of a IInPin. This sample reader has no internal queue! Make sure if you use this sample reader with ISampleStreamAccess::PushRead to register a external queue or to override the adtf::streaming::ant::cSampleReader::ReadNextSample and adtf::streaming::ant::cSampleReader::Push methods.
More...
#include <samplereader.h>
Inherits adtf::streaming::flash::ISampleReader.
Inherited by adtf::streaming::flash::sample_reader< ant::cDynamicSampleReaderQueue >, adtf::streaming::flash::sample_reader< ant::time_limited_sample_reader_queue< TIME_RANGE >, STORELASTSAMPLE >, adtf::streaming::flash::sample_reader< ant::size_limited_sample_reader_queue< MAX_SIZE >, STORELASTSAMPLE >, adtf::streaming::flash::sample_reader< cExternalQueuesWrapper, false >, and adtf::streaming::flash::sample_reader< INTERNAL_QUEUE, STORE_LAST_SAMPLE, ACCESS_MODE >.
|
|
std::unique_ptr< cImplementation > | m_pImplementation |
| |
The default Sample Reader will read the incomung Stream of a IInPin. This sample reader has no internal queue! Make sure if you use this sample reader with ISampleStreamAccess::PushRead to register a external queue or to override the adtf::streaming::ant::cSampleReader::ReadNextSample and adtf::streaming::ant::cSampleReader::Push methods.
◆ cSampleReader()
CTOR
- Parameters
-
| oQueue | The queue implementation to use for this sample reader. The sample reader will use this queue to store incoming samples. |
| eAccessMode | The access mode for the sample stream. |
| bStoreLastSample | Defines if the sample reader should always store the last sample received. |
◆ BeginStreaming()
◆ EndStreaming()
| tResult adtf::streaming::flash::cSampleReader::EndStreaming |
( |
| ) |
|
|
overridevirtual |
◆ GetLastSample()
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] | pSample | This will refrerence the sample. |
- Return values
-
| ERR_EMTPY | No sample available |
Implements adtf::streaming::flash::ISampleReader.
◆ GetLastType()
Returns the last stream type that was read from the sample stream.
- Parameters
-
| [out] | pType | This will reference the last stream type |
- Returns
Implements adtf::streaming::flash::ISampleReader.
◆ GetName()
◆ GetNextSample()
Reads the next available sample from the associated sample stream.
- Parameters
-
| [out] | pSample | This will refrerence the sample. |
- Return values
-
| ERR_EMTPY | No sample available |
Implements adtf::streaming::flash::ISampleReader.
◆ GetType()
Returns the initial stream type of the streamer.
- Parameters
-
| [out] | pStreamType | This will reference the initial stream type. |
- Returns
- Standard result.
Implements adtf::streaming::flash::ISampleStreamer.
◆ ReadAllAvailableItems()
| tResult adtf::streaming::flash::cSampleReader::ReadAllAvailableItems |
( |
| ) |
|
|
overridevirtual |
◆ RequestSamples()
RequestSamples of the given Substream to be generated and/or transmitted.
- Parameters
-
| [out] | pRequest | Keep this as long as you request samples to be transmitted. |
| [in] | nSubStreamId | The id of the Substream. |
| [in] | pRequestProperties | The request properties. If nullptr, then defaults will be used. |
- Returns
- Standard Result.
◆ SetAcceptTypeCallback()
Sets a callback function which is called while a Stream Type is received.
- Parameters
-
| [in] | fnAcceptTypeCallback | The 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()
| void adtf::streaming::flash::cSampleReader::SetName |
( |
const char * | strName | ) |
|
|
overridevirtual |
◆ SetStreamerPin()
◆ SetStreamError()
| tResult adtf::streaming::flash::cSampleReader::SetStreamError |
( |
tResult | oError | ) |
|
|
overridevirtual |
◆ SetStreamErrorCallback()
| void adtf::streaming::flash::cSampleReader::SetStreamErrorCallback |
( |
const std::function< tResult(tResult oStreamError)> & | fnStreamErrorCallback | ) |
|
A callback function to react on stream errors.
- Parameters
-
| [in] | fnStreamErrorCallback | The callback function which will be called on stream errors |
◆ SetSynchronousTypeUpdateCallback()
Sets a callback function which is called while a synchronous type update is receive from the stream.
- Parameters
-
| fnRequestTypeUpdateCallback | The callback function is called while a synchronous type update is received from the stream. |
◆ SetType()
The documentation for this class was generated from the following file: