ADTF
Loading...
Searching...
No Matches
adtf::streaming::ant::cSampleWriter Class Reference

#include <samplewriter.h>

Inherits adtf::streaming::ant::sample_streamer< ISampleWriter, cOutPin >.

Inherited by adtf::streaming::ant::sample_writer< DATA_TYPE >, and adtf::streaming::testing::ant::cSampleWriterTester.

Public Member Functions

 cSampleWriter ()
 CTOR.
 
virtual ~cSampleWriter ()
 DTOR.
 
 cSampleWriter (const char *strName, const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
 
tResult BeginStreaming (ISampleStream &oSampleStream) override
 
tResult EndStreaming () override
 
virtual tResult Transmit (const ucom::ant::iobject_ptr< const ISample > &pSample)
 
virtual tResult ChangeType (const ucom::ant::iobject_ptr< const IStreamType > &pType)
 
virtual tResult Flush ()
 
virtual tResult SetStreamError (tResult oErr)
 
tResult ManualTrigger ()
 
- Public Member Functions inherited from adtf::streaming::ant::sample_streamer< ISampleWriter, cOutPin >
 sample_streamer ()=default
 CTOR.
 
 sample_streamer (const char *strName, const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
 
virtual ~sample_streamer ()
 DTOR.
 
void SetName (const char *strName)
 
void ResetPin (ucom::ant::object_ptr< cOutPin > &pPin)
 
void ResetPin ()
 
tResult GetName (base::ant::IString &&strName) const
 
tResult SetType (const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
 
tResult GetType (ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const override
 
tResult EndStreaming () override
 
 sample_streamer ()=default
 CTOR.
 
 sample_streamer (const char *strName, const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
 
virtual ~sample_streamer ()
 DTOR.
 
void SetName (const char *strName)
 
void ResetPin (ucom::ant::object_ptr< cOutPin > &pPin)
 
void ResetPin ()
 
tResult GetName (base::ant::IString &&strName) const
 
tResult SetType (const ucom::ant::iobject_ptr< const IStreamType > &pStreamType)
 
tResult GetType (ucom::ant::iobject_ptr< const IStreamType > &pStreamType) const override
 
tResult EndStreaming () override
 

Protected Types

typedef sample_streamer< ISampleWriter, cOutPinbase_type
 base type
 

Protected Attributes

ucom::object_ptr< ISampleOutStreamm_pOutStream
 The SampleOutStream which is opened while BeginStreaming.
 
ucom::object_ptr< adtf::services::IReferenceClock_clock
 
- Protected Attributes inherited from adtf::streaming::ant::sample_streamer< ISampleWriter, cOutPin >
adtf_util::cString m_strName
 name of the streamer (used i.e. to create the pins name)
 
ucom::object_ptr< const IStreamTypem_pStreamType
 stream type of the streamer
 
ucom::object_ptr< cOutPinm_poPin
 pin reference reading/writing from
 
adtf_util::cString m_strName
 name of the streamer (used i.e. to create the pins name)
 
ucom::object_ptr< const IStreamTypem_pStreamType
 stream type of the streamer
 
ucom::object_ptr< cOutPinm_poPin
 pin reference reading/writing from
 

Additional Inherited Members

- Public Types inherited from adtf::streaming::ant::sample_streamer< ISampleWriter, cOutPin >
typedef cOutPin pin_type
 
- Protected Member Functions inherited from adtf::streaming::ant::sample_streamer< ISampleWriter, cOutPin >
 sample_streamer (const sample_streamer &)=delete
 deleted copy CTOR
 
 sample_streamer (sample_streamer &&)=delete
 deleted move CTOR
 
sample_streameroperator= (const sample_streamer &)=delete
 deleted copy operator
 
sample_streameroperator= (sample_streamer &&)=delete
 deleted move operator
 
 sample_streamer (const sample_streamer &)=delete
 deleted copy CTOR
 
 sample_streamer (sample_streamer &&)=delete
 deleted move CTOR
 
sample_streameroperator= (const sample_streamer &)=delete
 deleted copy operator
 
sample_streameroperator= (sample_streamer &&)=delete
 deleted move operator
 
- Protected Member Functions inherited from adtf::streaming::ant::ISampleWriter
 ~ISampleWriter ()=default
 not destructable
 
- Protected Member Functions inherited from adtf::streaming::ant::ISampleStreamer
 ~ISampleStreamer ()=default
 not destructable
 

Detailed Description

This base implementation of a sample writer is able to write to one sample stream which is connected to ONE cOutPin.

The cOutPin it is registered to will call ISampleWriter::BeginStreaming while connecting.

Constructor & Destructor Documentation

◆ cSampleWriter()

adtf::streaming::ant::cSampleWriter::cSampleWriter ( const char * strName,
const ucom::ant::iobject_ptr< const IStreamType > & pStreamType )
inline

CTOR with name and type

Parameters
[in]strNameName to set
[in]pStreamTypeStream to set on the writer (deep copy is created)

Member Function Documentation

◆ BeginStreaming()

tResult adtf::streaming::ant::cSampleWriter::BeginStreaming ( ISampleStream & pStream)
inlineoverridevirtual

BeginStreaming will open the given Sample Stream for Writing while a connection is establishing.

Parameters
pStream[in] Sample Stream to open
Returns
Result Code depends on the implementation

Implements adtf::streaming::ant::ISampleWriter.

◆ ChangeType()

virtual tResult adtf::streaming::ant::cSampleWriter::ChangeType ( const ucom::ant::iobject_ptr< const IStreamType > & pType)
inlinevirtual

Changes and writes a stream type reference to the opened ISampleOutStream.

Parameters
[in]pTypestream type reference to change and write
Returns
Standard Result Code

◆ EndStreaming()

tResult adtf::streaming::ant::cSampleWriter::EndStreaming ( )
inlineoverridevirtual

Sample Stream disconnected. Streaming ends.

Returns
Standard Result Code. Depends on implmentation.

Implements adtf::streaming::ant::ISampleStreamer.

◆ Flush()

virtual tResult adtf::streaming::ant::cSampleWriter::Flush ( )
inlinevirtual

Flushes a the opened ISampleOutStream.

Returns
Standard Result Code

◆ ManualTrigger()

tResult adtf::streaming::ant::cSampleWriter::ManualTrigger ( )
inline

This is to Run a trigger call manually. A Trigger to the trigger pipe on the Pin will be forwarded.

Warning
do not call this within a filter! You will destroy the runtimebehaviour provided by a the trigger pipe.
Returns
Standard Result of the adtf::base::IRunnable::Run
Return values
ERR_NOT_INITIALIZEDThe Pin is not set. use create_pin to make sure the pin is set

◆ SetStreamError()

virtual tResult adtf::streaming::ant::cSampleWriter::SetStreamError ( tResult oErr)
inlinevirtual

Writes an error to the opened ISampleOutStream.

Parameters
[in]oErrerrror to write to the stream
Returns
Standard Result Code

◆ Transmit()

virtual tResult adtf::streaming::ant::cSampleWriter::Transmit ( const ucom::ant::iobject_ptr< const ISample > & pSample)
inlinevirtual

Transmits and writes a sample reference to the opened ISampleOutStream.

Parameters
[in]pSamplesample reference to transmit
Returns
Standard Result Code

The documentation for this class was generated from the following file: