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

#include <sample.h>

Inherits adtf::ucom::catwo::object< ant::ISample, flash::ISample, hollow::ISample, ucom::ant::IClassInfo >.

Inherited by adtf::streaming::ant::cReferenceSample.

Public Member Functions

 ADTF_CLASS_ID_NAME (cSample, "sample.streaming.adtf.cid", "ADTF Default Sample")
 private d pointer
 
 cSample ()
 resolver for multiple inheritance on IObject
 
 cSample (const ucom::ant::iobject_ptr< ISampleBufferFactory > &oSampleFactory)
 
virtual ~cSample ()
 
tResult Lock (ucom::ant::iobject_ptr_shared_locked< const adtf::streaming::ant::ISampleBuffer > &oSampleBuffer) const override
 
tResult WriteLock (ucom::ant::iobject_ptr_locked< ISampleBuffer > &oSampleBuffer, size_t szPreAllocateSize) override
 
tResult Set (const ant::ISample &oSample) override
 
tResult Get (ant::ISample &oSample) const override
 
tResult Reset () override
 
tTimeStamp GetTime () const
 
tResult SetTime (tTimeStamp tmTimeStamp)
 
uint32_t GetFlags () const override
 
tResult SetFlags (uint32_t ui32Flags) override
 
tResult Set (tTimeStamp tmTime, const void *pData, size_t nSize, uint32_t ui32Flags=0) override
 
tResult GetSampleBufferFactory (ucom::ant::iobject_ptr< ISampleBufferFactory > &oFactory) const override
 
tResult GetSampleInfo (ucom::ant::iobject_ptr< const ISampleInfo > &oSampleInfo) const override
 
tResult GetSampleInfo (ucom::ant::iobject_ptr< ISampleInfo > &oSampleInfo) override
 
tResult GetSampleLog (ucom::ant::iobject_ptr< ISampleLog > &oSampleLog) const override
 
base::flash::tNanoSeconds GetTimeNs () const override
 
tResult SetTime (base::flash::tNanoSeconds tmTimeStamp) override
 
tResult Set (base::flash::tNanoSeconds tmTimeStamp, const void *pData, size_t szSize, uint32_t ui32Flags=0) override
 
uint32_t GetSubStreamId () const override
 
void SetSubStreamId (uint32_t nSubStreamId) override
 
tResult SetSampleBufferFactory (const ucom::ant::iobject_ptr< ISampleBufferFactory > &pFactory)
 
tResult SetSampleInfo (const ucom::ant::iobject_ptr< ISampleInfo > &oInfo)
 
tResult SetSampleLog (const ucom::ant::iobject_ptr< ISampleLog > &oLog)
 
- Public Member Functions inherited from adtf::ucom::catwo::object< ant::ISample, flash::ISample, hollow::ISample, ucom::ant::IClassInfo >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

The cSample class implements a basic sample which contains streaming data. A sample is a container class to write time based data on the OutPins (IOutPin) connected SampleStream (ISampleStream). The main interface too ensure binary compatibility is ISample.

Samples can have additional information through the interfaces ISampleInfo.
These interface can be retrieved through ISample::GetSampleInfo. This expansion of the sample will is to add user information on each sample which is necessary for your applictation. Keep in mind this is an option a sample can hold, but is not a must on frameworks default.
Warning
Be sure you really need this information on each sample! !!! You should not put important data (signals etc.) in this area and complain of performance problems afterwards!!! We mean it.
Samples can have additional logging and debug information through the interface ISampleLog
These interface can be retrieved through ISample::GetSampleLog. The ISampleLog interface defines an interface to trace and store the Samples data- and timing flow. If present these tracing information will be serialized. These extension is used for debugging issues only. This will effect performance on your system if enabled!
Deprecated
Please use alloc_sample() instead.

Constructor & Destructor Documentation

◆ cSample() [1/2]

adtf::streaming::ant::cSample::cSample ( )

resolver for multiple inheritance on IObject

CTOR. Default ISampleBufferFactory in this case will use new and delete !

Deprecated
Please use 'alloc_sample()' instead.

◆ cSample() [2/2]

adtf::streaming::ant::cSample::cSample ( const ucom::ant::iobject_ptr< ISampleBufferFactory > & oSampleFactory)

Construct an instance of a memory managed sample MemoryManaged BufferFactory ... see adtf::streaming::ISampleBufferFactory and adtf::services::IMemoryManager. By default this implementation of ISample uses cSampleBufferFactoryDefaultNew if no other factory is set.

Deprecated
Please use 'alloc_sample()' instead.

◆ ~cSample()

virtual adtf::streaming::ant::cSample::~cSample ( )
virtual

DTOR

Member Function Documentation

◆ ADTF_CLASS_ID_NAME()

adtf::streaming::ant::cSample::ADTF_CLASS_ID_NAME ( cSample ,
"sample.streaming.adtf.cid" ,
"ADTF Default Sample"  )

private d pointer

ClassInfo implementation for adtf::ucom::IClassInfo

◆ SetSampleBufferFactory()

tResult adtf::streaming::ant::cSample::SetSampleBufferFactory ( const ucom::ant::iobject_ptr< ISampleBufferFactory > & pFactory)

Sets the reference to the buffer factory, which will be used to create the user data content in ISampleBuffer. By default this implementation of ISample uses cSampleBufferFactoryDefaultNew if no other factory is set.

Parameters
[in]pFactoryobject_ptr reference to the sample buffer factory.
Returns
Standard Result Code.
Return values
ERR_INVALID_ARGChange is not valid.

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