ADTF  3.14.3
ISampleStreamabstract

Interface of the SampleStream. More...

Inheritance diagram for ISampleStream:
[legend]

Classes

class  IPushReadEventSink
 

Public Member Functions

 ADTF_IID (ISampleStream, "samplestream.ant.streaming.adtf.iid")
 defintion of interface identifier
 
 UCOM_RESOLVE (adtf::ucom::ant::IObject, INamedGraphObject)
 
virtual tResult GetType (adtf::ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const =0
 Retrieves the current type of the stream. More...
 
virtual tTimeStamp GetTime () const =0
 Returns the last flush time and so the current position of the stream. More...
 
virtual tResult SetStreamError (const tResult &oError)=0
 Sets and forwards a StreamError to the readers. More...
 
virtual tResult AttachRouting (const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStreamTo)=0
 Attaches a SampleStream where to route the Write / Flush and Run calls to. More...
 
virtual tResult DetachRouting (const adtf::ucom::ant::iobject_ptr< ISampleStream > &pSampleStreamTo)=0
 Detaches a SampleStream where the routing was set by AttachRouting. More...
 
virtual tResult Open (const char *strName, adtf::ucom::ant::iobject_ptr< ISampleInStream > &pInStream, const adtf::ucom::ant::iobject_ptr< const IStreamType > &pInitialAcceptedStreamType, IPushReadEventSink *&pPushEventSink, ISampleStreamAccess::tMode ui32Mode, size_t szQueueSize)=0
 Opens The SampleStream for reading access. More...
 
virtual tResult Open (const char *strName, adtf::ucom::ant::iobject_ptr< ISampleOutStream > &pOutStream, ISampleStreamAccess::tMode ui32Mode, size_t szQueueSize)=0
 Opens The SampleStream for writing access. More...
 
- Public Member Functions inherited from ITriggerPipeItem
 ADTF_IID (ITriggerPipeItem, "trigger_pipe_item.ant.streaming.adtf.iid")
 Definition of interface ID.
 
- Public Member Functions inherited from IRunnable
 ADTF_IID (IRunnable, "runnable.ant.base.adtf.iid")
 defintion of interface id
 
virtual tResult Run (tTimeStamp tmTimeofActivation, tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize)=0
 The Run method to set the component in running state. More...
 
virtual tActivationType GetActivationType () const
 Gets the activation code of the runnable it reacts to. More...
 
- Public Member Functions inherited from ITriggerPipeSource
 ADTF_IID (ITriggerPipeSource, "trigger_pipe_source.ant.streaming.adtf.iid")
 definiton of interface id
 
virtual tResult RegisterSubItem (const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun, tPriority ui32Prio)=0
 Registers the pSubRun as SubItem of the source. More...
 
virtual tResult UnregisterSubItem (const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun)=0
 Unregisters the pSubRun from the source. More...
 
virtual tResult ChangePriority (const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun, tPriority ui32Prio)=0
 Changes the priority of the pSubRun. More...
 
virtual tResult GetSubItems (adtf::ucom::ant::iobject_enum< const ITriggerPipeItem > &lstSubItems) const =0
 Retrieves a list of the registered Items. 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...
 
- Public Member Functions inherited from INamedGraphObject
 ADTF_IID (INamedGraphObject, "namedgraphobject.ant.streaming.adtf.iid")
 defintion of interface id
 
virtual tResult GetName (base::ant::IString &&strName) const =0
 Gets the Name of the object to the IString rvalue reference strName. More...
 
virtual tResult SetName (const char *strName)=0
 Sets the Name of the object. More...
 
virtual tResult SetParent (const ucom::ant::IObject *oParentObject)=0
 Sets the Parent of the object. More...
 
virtual tResult GetParent (const ucom::ant::IObject *&poParentObject) const =0
 Retrieves the Parent of the object. More...
 

Protected Member Functions

 ~ISampleStream ()=default
 not desructable
 
- Protected Member Functions inherited from ITriggerPipeItem
 ~ITriggerPipeItem ()=default
 not destructable
 
- Protected Member Functions inherited from IRunnable
 ~IRunnable ()=default
 not destructable
 
- Protected Member Functions inherited from ITriggerPipeSource
 ~ITriggerPipeSource ()=default
 not destructable
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 
- Protected Member Functions inherited from INamedGraphObject
 ~INamedGraphObject ()=default
 not destructable
 

Additional Inherited Members

- Public Types inherited from IRunnable
enum  tActivationType : uint32_t {
  RUN_UNSPECIFIED = 0 , RUN_TIMER = 1 , RUN_SIGNAL = 2 , RUN_EXCEPTION = 3 ,
  RUN_MESSAGE = 5 , RUN_THREAD = 6 , RUN_JOB = 7 , RUN_TRIGGER = 8 ,
  RUN_PUSH = 9 , RUN_USER = 0x1000
}
 Enumeration of the possible activation types to set a component in running state. More...
 
typedef std::function< tResult(tTimeStamp)> tRunFunction
 Type defintion of the function used to implement Run.
 
- Public Types inherited from ITriggerPipeSource
enum  tPriority : uint32_t {
  Invalid = 0 , Lowest = 1 , Lower = 30 , BelowNormal = 40 ,
  Normal = 50 , AboveNormal = 60 , Higher = 70 , Highest = 100
}
 Priority used for the order of ITriggerPipeItem::Run calls. More...
 

Detailed Description

Interface of the SampleStream.

The SampleStream is to define connections between IPin.

See also
Sample Stream

Definition at line 28 of file samplestream_intf.h.

Member Function Documentation

◆ AttachRouting()

virtual tResult AttachRouting ( const adtf::ucom::ant::iobject_ptr< ISampleStream > &  pSampleStreamTo)
pure virtual

Attaches a SampleStream where to route the Write / Flush and Run calls to.

This will automatically opens one writer of pSampleStreamTo and forwards the writers queue.

Parameters
[in]pSampleStreamToSampleStream where to root the writer queue to.
Returns
Standard Result Code.

◆ DetachRouting()

virtual tResult DetachRouting ( const adtf::ucom::ant::iobject_ptr< ISampleStream > &  pSampleStreamTo)
pure virtual

Detaches a SampleStream where the routing was set by AttachRouting.

Parameters
[in]pSampleStreamToSampleStream to detach.
Returns
Standard Result Code.
Return values
ERR_NOT_FOUNDThe SampleStream given by pSampleStreamTo is not attached.

◆ GetTime()

virtual tTimeStamp GetTime ( ) const
pure virtual

Returns the last flush time and so the current position of the stream.

Returns
The current time of the stream.

◆ GetType()

virtual tResult GetType ( adtf::ucom::ant::iobject_ptr< const IStreamType > &  pStreamType) const
pure virtual

Retrieves the current type of the stream.

This is only a information interface. The current type of the stream is always part of the Queues of ISampleStreamReader or ISampleStreamWriter. It will only return the last written IStreamType.

Parameters
[in,out]pStreamTypeobject_ptr to set the type reference to.
Returns
Standard Result Code

◆ Open() [1/2]

virtual tResult Open ( const char *  strName,
adtf::ucom::ant::iobject_ptr< ISampleInStream > &  pInStream,
const adtf::ucom::ant::iobject_ptr< const IStreamType > &  pInitialAcceptedStreamType,
IPushReadEventSink *&  pPushEventSink,
ISampleStreamAccess::tMode  ui32Mode,
size_t  szQueueSize 
)
pure virtual

Opens The SampleStream for reading access.

To receive data you need to read from given pReader. See also ISampleStreamReader::Read. The pInStream will automatically closes until it is destroyed by its reference counting. Usually you should only keep your private Reader instance to make sure the Reader will safely close !

Parameters
[in]strNameName of the reader (is not yet relevant in default implementation cSampleStream but may be in future).
[in,out]pInStreamobject_ptr where to put the in stream reference to (Recommended: keep it private).
[in]pInitialAcceptedStreamTypeThe StreamType you want to receive, but this might not be the streamtype you will get from the writers!
[in]pPushEventSinkReference to a PushRead EventSink. This parameter neead to be valid only if you open in ISampleStreamAccess::tMode::PushRead. Make sure this instance exists until the the Reader closes. (so again ... Recommended: keep your Reader private)
[in]ui32ModeMode to open. see ISampleStreamAccess::tMode.
[in]szQueueSizeQueueSize of the Reader. In PushRead this should be 0 because a Reader will not have a real internal queue.
Returns
Standard Result Code.
See also
Sample Stream

Referenced by cSampleReader::BeginStreaming(), and cSampleWriter::BeginStreaming().

◆ Open() [2/2]

virtual tResult Open ( const char *  strName,
adtf::ucom::ant::iobject_ptr< ISampleOutStream > &  pOutStream,
ISampleStreamAccess::tMode  ui32Mode,
size_t  szQueueSize 
)
pure virtual

Opens The SampleStream for writing access.

To write data you need to write to the given pWriter. See also ISampleStreamWriter::Write. The pOutStream will automatically closes until it is destroyed by its reference counting. Usually you should only keep your private Writer instance to make sure the Writer will safely close !

Parameters
[in]strNameName of the reader (is not yet relevant in default implementation cSampleStream but may be in future).
[in,out]pOutStreamobject_ptr where to put the out stream reference to (Recommended: keep it private).
[in]ui32ModeMode to open. see ISampleStreamAccess::tMode.
[in]szQueueSizeQueueSize of the out stream. In PushRead this should be 0 because a Writer will have an unlimited Queue. If you set a queue size > 0 all QueueContent will be dropped if you do not flush before the maximum queue size is reached. Keep in mind Sample/StreamType/Error are part of the Queue!
Returns
Standard Result Code.
See also
Sample Stream

◆ SetStreamError()

virtual tResult SetStreamError ( const tResult &  oError)
pure virtual

Sets and forwards a StreamError to the readers.

Depending on the implementation and error type this may stop the streaming!

Parameters
[in]oErrorError to set
Returns
Standard Result Code.

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)