ADTF  3.18.2
ISampleWriterabstract

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

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

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 >, cSampleWriter, and requestable_writer< BaseWriter >.

◆ Flush()

virtual tResult Flush ( )
pure virtual

Flushes the writer.

Returns
Standard result.

Implemented in 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.

◆ 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.

◆ 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.