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

#include <samplewriter.h>

Inherits adtf::streaming::flash::cSampleWriter.

Public Member Functions

 sample_writer ()
 Default CTOR.
 
tResult Write (const DATA_TYPE &oSampleData)
 Writes Data of the given DATA_TYPE. The Sample Time of the created Sample is retrieved from the IReferenceClock (if any exists).
 
tResult Write (tTimeStamp tmTime, const DATA_TYPE &oSampleData)
 
tResult Write (base::flash::tNanoSeconds tmTime, const DATA_TYPE &oSampleData)
 
tResult Transmit (const DATA_TYPE &oSampleData)
 
tResult Transmit (tTimeStamp tmTime, const DATA_TYPE &oSampleData)
 Writes Data of the given DATA_TYPE. The Sample Time of the created Sample is retrieved from the IReferenceClock (if any exists).
 
tResult Transmit (base::flash::tNanoSeconds tmTime, const DATA_TYPE &oSampleData)
 Writes Data of the given DATA_TYPE. The Sample Time of the created Sample is retrieved from the IReferenceClock (if any exists).
 
- Public Member Functions inherited from adtf::streaming::flash::cSampleWriter
void SetName (const char *strName) override
 
tResult GetName (base::ant::IString &&strName) override
 
tResult SetType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) override
 
tResult GetType (ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const override
 
tResult BeginStreaming (ISampleStream &oSampleStream) override
 
tResult EndStreaming () override
 
tResult SetStreamerPin (const ucom::ant::iobject_ptr< IStreamerPin > &pStreamerPin) override
 
tResult GetStreamerPin (ucom::ant::iobject_ptr< IStreamerPin > &pStreamerPin) const
 
tResult Write (const ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 
virtual tResult Transmit (const ucom::ant::iobject_ptr< const ant::ISample > &pSample)
 
tResult ChangeType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override
 
tResult Flush () override
 
tResult SetStreamError (tResult oError) override
 
tResult ManualTrigger (base::flash::tNanoSeconds tmActivationTime=base::flash::tNanoSeconds{-1}) override
 

Protected Attributes

ucom::ant::object_ptr< services::flash::IReferenceClockm_pClock
 

Detailed Description

template<typename DATA_TYPE, typename BASE = cSampleWriter>
class adtf::streaming::flash::sample_writer< DATA_TYPE, BASE >

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

Template Parameters
DATA_TYPEthe type which is written. This sample content is created and written at Write call.
BASEthe base adtf::streaming::flash::ISampleWriter Implementation (default is adtf::streaming::flash::cSampleWriter).

Member Function Documentation

◆ Transmit() [1/2]

template<typename DATA_TYPE, typename BASE = cSampleWriter>
tResult adtf::streaming::flash::sample_writer< DATA_TYPE, BASE >::Transmit ( base::flash::tNanoSeconds tmTime,
const DATA_TYPE & oSampleData )
inline

Writes Data of the given DATA_TYPE. The Sample Time of the created Sample is retrieved from the IReferenceClock (if any exists).

Parameters
oSampleDatareference to the data of DATA_TYPE.
Returns
tResult
Deprecated
Use sample_writer<DATA_TYPE>::Write(tmTime, oSampleData) instead.

◆ Transmit() [2/2]

template<typename DATA_TYPE, typename BASE = cSampleWriter>
tResult adtf::streaming::flash::sample_writer< DATA_TYPE, BASE >::Transmit ( tTimeStamp tmTime,
const DATA_TYPE & oSampleData )
inline

Writes Data of the given DATA_TYPE. The Sample Time of the created Sample is retrieved from the IReferenceClock (if any exists).

Parameters
oSampleDatareference to the data of DATA_TYPE.
Returns
tResult
Deprecated
Use sample_writer<DATA_TYPE>::Write(tmTime, oSampleData) instead.

◆ Write() [1/3]

template<typename DATA_TYPE, typename BASE = cSampleWriter>
tResult adtf::streaming::flash::sample_writer< DATA_TYPE, BASE >::Write ( base::flash::tNanoSeconds tmTime,
const DATA_TYPE & oSampleData )
inline

Writes Data to the set stream of the given DATA_TYPE.

Parameters
tmTimethe sample time to set on the created sample
oSampleDatareference to the data of DATA_TYPE.
Returns
tResult
Return values
ERR_NOERRORif the sample was successfully written to the stream.

◆ Write() [2/3]

template<typename DATA_TYPE, typename BASE = cSampleWriter>
tResult adtf::streaming::flash::sample_writer< DATA_TYPE, BASE >::Write ( const DATA_TYPE & oSampleData)
inline

Writes Data of the given DATA_TYPE. The Sample Time of the created Sample is retrieved from the IReferenceClock (if any exists).

Parameters
oSampleDatareference to the data of DATA_TYPE.
Returns
tResult
Deprecated
Use sample_writer<DATA_TYPE>::Write(tmTime, oSampleData) instead.

◆ Write() [3/3]

template<typename DATA_TYPE, typename BASE = cSampleWriter>
tResult adtf::streaming::flash::sample_writer< DATA_TYPE, BASE >::Write ( tTimeStamp tmTime,
const DATA_TYPE & oSampleData )
inline

Writes Data to the set stream of the given DATA_TYPE.

Parameters
tmTimethe sample time to set on the created sample
oSampleDatareference to the data of DATA_TYPE.
Returns
tResult
Return values
ERR_NOERRORif the sample was successfully written to the stream.

Member Data Documentation

◆ m_pClock

template<typename DATA_TYPE, typename BASE = cSampleWriter>
ucom::ant::object_ptr<services::flash::IReferenceClock> adtf::streaming::flash::sample_writer< DATA_TYPE, BASE >::m_pClock
protected

Set clock reference to retrieve the current stream time for sample writing. The value was initialized in the constructor, but might be null if no clock service was available at construction time.


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