ADTF
|
Sample reader which allows the registration of external queue. More...
Public Member Functions | |
tResult | Push (const IStreamItem &oStreamItem, tTimeStamp tsTime) override |
Push a new value to the internal sample queue. More... | |
void | Clear () override |
clears the local queue of the reader either only EndStreaming or incoming event ISampleInStream::IQueueItem::RE_Flush | |
tResult | Pop (IStreamItem &) override |
Returns the next sample from the queue. More... | |
tResult | ReadAllAvailableItems () |
void | RegisterExternalQueue (ISampleReaderQueue *pExternalBuffer) |
void | UnregisterExternalQueue (ISampleReaderQueue *pExternalBuffer) |
cSampleReader () | |
Default CTOR. | |
cSampleReader (ISampleStreamAccess::tMode eAccessMode) | |
Default CTOR which defines the access method. More... | |
Public Member Functions inherited from cSampleReader | |
cSampleReader () | |
Default CTOR. | |
cSampleReader (ISampleStreamAccess::tMode eAccessMode) | |
Default CTOR which defines the access method. More... | |
virtual tResult | AcceptType (const ucom::ant::iobject_ptr< const IStreamType > &pStreamType) |
Accept or reject a new stream type - see also AcceptType and IsCompatible implementations. More... | |
tResult | BeginStreaming (ISampleStream &oSampleStream) override |
BeginStreaming will open the given Sample Stream for Reading while a connection is establishing. More... | |
tResult | EndStreaming () override |
Sample Stream disconnected. More... | |
void | SetAcceptTypeCallback (const std::function< tResult(const ucom::iobject_ptr< const IStreamType > &pStreamType)> &fnAcceptTypeCallback) |
Sets a callback function which is called while a Stream Type is received - see also AcceptType and IsCompatible implementations. More... | |
void | SetStreamErrorCallback (const std::function< tResult(tResult oStreamError)> &fnStreamErrorCallback) |
A callback function to react on stream errors. More... | |
tResult | SetStreamError (const tResult &oError) |
Forward an error to the corresponding stream. More... | |
void | GetSampleInStream (ucom::ant::iobject_ptr< ISampleInStream > &pSampleInStream) |
Returns the connected ISampleInStream. | |
void | GetLastType (ucom::ant::iobject_ptr< const IStreamType > &pType) |
Returns the connected ISampleInStream. | |
virtual tResult | GetNextSample (ucom::ant::iobject_ptr< const ISample > &pSample) |
Gets the next Sample within internal queue which not has been read. More... | |
void | Reset () override |
virtual tResult | Push (const IStreamItem &oStreamItem, tTimeStamp tmTime)=0 |
Push a new value to the internal sample queue. More... | |
virtual void | Clear ()=0 |
clears the local queue of the reader either only EndStreaming or incoming event ISampleInStream::IQueueItem::RE_Flush | |
virtual tResult | Pop (IStreamItem &oStreamItem)=0 |
Returns the next sample from the queue. More... | |
Public Member Functions inherited from sample_streamer< ISampleReader, cInPin > | |
sample_streamer ()=default | |
CTOR. | |
sample_streamer (const char *strName, const ucom::ant::iobject_ptr< const IStreamType > &pStreamType) | |
CTOR initializer. More... | |
virtual | ~sample_streamer () |
DTOR. | |
void | SetName (const char *strName) |
Sets the name of the streamer. More... | |
void | ResetPin (ucom::ant::object_ptr< cInPin > &pPin) |
Resets the pin reference This is only internaly used. More... | |
void | ResetPin () |
Resets the pin reference to nullptr. More... | |
tResult | GetName (base::ant::IString &&strName) const |
Gets the name of the streamer. More... | |
tResult | SetType (const ucom::ant::iobject_ptr< const IStreamType > &pStreamType) |
Sets the StreamType of the streamer. More... | |
tResult | GetType (ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const override |
tResult | EndStreaming () override |
Public Member Functions inherited from runnable< base::ant::IRunnable::RUN_PUSH, ISampleStream::IPushReadEventSink > | |
runnable () | |
CTOR. | |
runnable (IRunnable::tRunFunction fcRunOnceFunc) | |
Main CTOR with callable function. More... | |
virtual | ~runnable ()=default |
DTOR. | |
tResult | Run (tTimeStamp tmTimeofActivation, IRunnable::tActivationType ui32ActivationType, const void *, size_t) override |
IRunnable::Run implementation which will call m_fcRunOnceFunc if ui32ActivationType is TYPE_OF_ACTIVATION . More... | |
virtual IRunnable::tActivationType | GetActivationType () const |
Returns the type of activation implemented. More... | |
Public Member Functions inherited from object< Bases > | |
tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
Query interfaces on an object. More... | |
tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
Provides const correct interface querying. More... | |
void | Destroy () const override |
Destruct and deallocate instantiations of type IObject . More... | |
Public Member Functions inherited from IObject | |
ADTF_IID (IObject, "object.ant.ucom.adtf.iid") | |
Marks the IObject to be castable with the ucom_cast() More... | |
Private Attributes | |
std::set< ISampleReaderQueue * > | m_lstExternalQueues |
A set of other registered buffer. | |
Additional Inherited Members | |
Public Types inherited from sample_streamer< ISampleReader, cInPin > | |
typedef cInPin | pin_type |
Protected Member Functions inherited from cSampleReader | |
tResult | Push (tTimeStamp tmTimeofActivation) |
internal Push operation to implement pushread mode | |
virtual tResult | ReadNextSample (ucom::ant::iobject_ptr< const ISample > &pSample) |
This will read the stream items until a sample is reached and return it. More... | |
tResult | ProcessStreamItem (const IStreamItem &oStreamItem) |
This will process the stream items. More... | |
tResult | HandleStreamError (tResult nError) |
Protected Member Functions inherited from sample_streamer< ISampleReader, cInPin > | |
sample_streamer (const sample_streamer &)=delete | |
deleted copy CTOR | |
sample_streamer (sample_streamer &&)=delete | |
deleted move CTOR | |
sample_streamer & | operator= (const sample_streamer &)=delete |
deleted copy operator | |
sample_streamer & | operator= (sample_streamer &&)=delete |
deleted move operator | |
Protected Member Functions inherited from ISampleReader | |
~ISampleReader ()=default | |
not destructable | |
Protected Member Functions inherited from ISampleStreamer | |
~ISampleStreamer ()=default | |
not destructable | |
Protected Member Functions inherited from IObject | |
~IObject ()=default | |
Protected destructor --> Use implemented Destroy() instead of delete! | |
Protected Attributes inherited from sample_streamer< ISampleReader, cInPin > | |
adtf_util::cString | m_strName |
name of the streamer (used i.e. to create the pins name) | |
ucom::object_ptr< const IStreamType > | m_pStreamType |
stream type of the streamer | |
ucom::object_ptr< cInPin > | m_poPin |
pin reference reading/writing from | |
Protected Attributes inherited from runnable< base::ant::IRunnable::RUN_PUSH, ISampleStream::IPushReadEventSink > | |
IRunnable::tRunFunction | m_fcRunOnceFunc |
given function to call on Run | |
Sample reader which allows the registration of external queue.
Definition at line 497 of file samplereader.h.
|
inline |
Default CTOR which defines the access method.
eAccessMode | the access method. |
Definition at line 220 of file samplereader.h.
|
inlineoverridevirtual |
Returns the next sample from the queue.
[out] | oStreamItem | stream item reference to copy the references to |
Implements ISampleReaderQueue.
Definition at line 524 of file samplereader.h.
References RETURN_ERROR.
|
inlineoverridevirtual |
Push a new value to the internal sample queue.
[in] | oStreamItem | The sample to store |
[in] | tmTime | Time of storage |
Implements ISampleReaderQueue.
Definition at line 506 of file samplereader.h.
References cExternalQueueSampleReader::m_lstExternalQueues, RETURN_IF_FAILED, and RETURN_NOERROR.