ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ISampleWriterabstract

Interface for sample writers that write to sample streams via output pins. More...

#include <samplestreamer_intf.h>

Inheritance diagram for ISampleWriter:
[legend]

Public Member Functions

virtual tResult Write (const ucom::ant::iobject_ptr< const ant::ISample > &pSample)=0
 Writes a sample to the connected sample stream.
 
virtual tResult ChangeType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pType)=0
 Communicates a type change for all following samples.
 
virtual tResult Flush ()=0
 Flushes the writer.
 
virtual tResult SetStreamError (tResult oError)=0
 Reports and handles an error via the sample stream.
 
virtual tResult ManualTrigger (base::flash::tNanoSeconds tmActivationTime=base::flash::tNanoSeconds{-1})=0
 Calls all connected runners synchronously in this call.
 
- Public Member Functions inherited from ISampleStreamer
virtual void SetName (const char *strName)=0
 Sets the name of the streamer.
 
virtual tResult GetName (base::ant::IString &&strName)=0
 Retrieves the name of the streamer.
 
virtual tResult SetType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType)=0
 Sets the initial stream type of a streamer.
 
virtual tResult GetType (ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const =0
 Returns the initial stream type of the streamer.
 
virtual tResult BeginStreaming (ant::ISampleStream &pStream)=0
 Begin streaming on the given sample stream.
 
virtual tResult EndStreaming ()=0
 End streaming.
 
virtual tResult SetStreamerPin (const ucom::ant::iobject_ptr< flash::IStreamerPin > &pStreamerPin)=0
 Sets the pin that the streamer is associated with.
 

Detailed Description

Interface for sample writers that write to sample streams via output pins.

Definition at line 233 of file samplestreamer_intf.h.

Member Function Documentation

◆ ChangeType()

virtual tResult ChangeType ( const ucom::ant::iobject_ptr< const ant::IStreamType > & pType)
pure virtual

Communicates a type change for all following samples.

Parameters
[in]pTypeThe new stream type
Returns
Standard result. Errors will be reported via the associated sample stream.

Implemented in encoding_sample_writer< WriterImplementation >, encoding_sample_writer< WriterImplementation >, encoding_sample_writer< WriterImplementation >, cSampleWriter, cSampleWriter, requestable_writer< BaseWriter >, and requestable_writer< BaseWriter >.

◆ Flush()

virtual tResult Flush ( )
pure virtual

Flushes the writer.

Returns
Standard result.

Implemented in cSampleWriter, and cSampleWriter.

◆ ManualTrigger()

virtual tResult ManualTrigger ( base::flash::tNanoSeconds tmActivationTime = base::flash::tNanoSeconds{-1})
pure virtual

Calls all connected runners synchronously in this call.

Parameters
[in]tmActivationTimeThe timestamp passed to all runners. If equals -1, the current stream time is retrieved from the reference clock.
Returns
Standard result. Errors will be reported via the associated sample stream.

Implemented in cSampleWriter, and cSampleWriter.

◆ SetStreamError()

virtual tResult SetStreamError ( tResult oError)
pure virtual

Reports and handles an error via the sample stream.

Mind that you still need to cope with the error in the best possible manner.

Parameters
[in]oErrorThe error code.
Returns
Standard result.

Implemented in cSampleWriter, and cSampleWriter.

◆ Write()

virtual tResult Write ( const ucom::ant::iobject_ptr< const ant::ISample > & pSample)
pure virtual

Writes a sample to the connected sample stream.

Parameters
[in]pSampleThe sample to write
Returns
Standard result. Errors will be reported via the associated sample stream.

Implemented in cSampleWriter, and cSampleWriter.