ADTF
Loading...
Searching...
No Matches
adtf::streaming::ant::sample_writer< DATA_TYPE > Class Template Reference

#include <samplewriter.h>

Inherits adtf::streaming::ant::cSampleWriter.

Public Member Functions

tResult Transmit (const DATA_TYPE &oSampleData)
 
- Public Member Functions inherited from adtf::streaming::ant::cSampleWriter
 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
 

Additional Inherited Members

- Public Types inherited from adtf::streaming::ant::sample_streamer< ISampleWriter, cOutPin >
typedef cOutPin pin_type
 
- Protected Types inherited from adtf::streaming::ant::cSampleWriter
typedef sample_streamer< ISampleWriter, cOutPinbase_type
 base 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
 
- Protected Attributes inherited from adtf::streaming::ant::cSampleWriter
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
 

Detailed Description

template<typename DATA_TYPE>
class adtf::streaming::ant::sample_writer< DATA_TYPE >

Specialized Sample Writer to write DATA of type DATA_TYPE. The operator<< will be overloaded to write data.

Member Function Documentation

◆ Transmit()

template<typename DATA_TYPE>
tResult adtf::streaming::ant::sample_writer< DATA_TYPE >::Transmit ( const DATA_TYPE & oSampleData)
inline
   The Transmit call for data transmission will create a sample and set the current time from @ref

adtf::services::ant::IReferenceClock::GetStreamTime.

Parameters
oSampleData[in] Data of type DATA_TYPE
Remarks
This is only rtsafe if you use a Sample Pool Service and a Memory Allocator Service
Note
rtsafe{using Sample Pool Service and a Memory Allocator Service}
Use as followed:
//Definition within the class header
struct tMyData
{
tMyData(int32_t nVal, float fVal)
: nValue(nVal), fValue(fVal)
{
}
int32_t nValue = 0;
float fValue = 0;
};
class cMyFilter : public adtf::streaming::cFilterBase
{
//...
//...
}
The cFilterBase class implements a basic filter that supports the ant::IFilter interfaces.
Definition filterbase.h:37
Definition samplewriter.h:499
//...
tMyData sData1 = { 1, 1.1 };
tMyData sData2 = { 2, 2.2 };
m_oWriter << sData1 << sData2 << adtf::streaming::trigger;
//...
WRITER_TYPE & trigger(WRITER_TYPE &oWriter)
Definition streaming_functions.h:35

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