Wrapper class that facilitates the handling of output samples. More...
#include <sample.h>
Public Member Functions | |
output_sample_data (base::flash::tNanoSeconds tmSampleTime) | |
Initializes the data timestamp. | |
output_sample_data (tTimeStamp tmSampleTime) | |
Initializes the data timestamp. | |
output_sample_data (base::flash::tNanoSeconds tmSampleTime, const T &oValue) | |
Initializes the data timestamp and value. | |
output_sample_data (base::flash::tNanoSeconds tmSampleTime, const T &oValue, uint32_t nSubStreamId) | |
output_sample_data (tTimeStamp tmSampleTime, const T &oValue) | |
Initializes the data timestamp and value. | |
output_sample_data (const ant::ISample &oSampleToCopy) | |
Initializes the data from an existing sample. | |
output_sample_data (const ucom::ant::iobject_ptr< const ant::ISample > &pSampleToCopy) | |
Initializes the data from an existing sample. | |
output_sample_data (output_sample_data &&)=default | |
output_sample_data & | operator= (output_sample_data &&)=default |
void | SetSubStreamId (uint32_t nSubStreamId) |
Sets the Substream id of the generated sample. | |
T * | GetDataPtr () |
const T * | GetDataPtr () const |
T * | operator-> () |
const T * | operator-> () const |
T & | GetData () |
const T & | GetData () const |
T & | operator* () |
const T & | operator* () const |
output_sample_data & | operator= (const T &oValue) |
Assigns a new value to the data. | |
operator T& () | |
operator const T & () const | |
ucom::ant::object_ptr< ant::ISample > | Release () |
Returns a sample that contains the data and resets all internal data. | |
tResult | SetSampleInfo (const ISampleInfo::tHashKey &oHash, const adtf::util::cVariant oValue) |
Sets a variant value for the hash key oHash into the current samples sample information. | |
Protected Attributes | |
ucom::ant::object_ptr< ant::ISample > | m_pSample |
ucom::ant::object_ptr_locked< ant::ISampleBuffer > | m_pBuffer |
Private Member Functions | |
void | AssignValue (const T &oValue) |
output_sample_data (const output_sample_data &)=delete | |
output_sample_data & | operator= (const output_sample_data &)=delete |
Wrapper class that facilitates the handling of output samples.
Use one of its constructors to initialize the data, then update it and finally call Release() to retrieve a sample that you can write via ISampleWriter::Write().
|
inlineexplicit |
Initializes the data timestamp.
or
[in] | tmSampleTime | The timestamp. |
tResult | In case of an error. |
Definition at line 369 of file sample.h.
References adtf::streaming::flash::alloc_sample(), and THROW_IF_FAILED.
Referenced by output_sample_data(), output_sample_data(), output_sample_data(), GetDataPtr(), and operator=().
|
inlineexplicit |
Initializes the data timestamp.
[in] | tmSampleTime | The timestamp. |
tResult | In case of an error. |
Definition at line 380 of file sample.h.
References adtf::streaming::flash::alloc_sample(), and THROW_IF_FAILED.
|
inline |
Initializes the data timestamp and value.
[in] | tmSampleTime | The timestamp. |
[in] | oValue | The value of the sample data |
tResult | In case of an error. |
Definition at line 396 of file sample.h.
References output_sample_data().
|
inline |
|
inline |
Initializes the data timestamp and value.
[in] | tmSampleTime | The timestamp. |
[in] | oValue | The value of the sample data |
tResult | In case of an error. |
Definition at line 423 of file sample.h.
References output_sample_data().
|
inlineexplicit |
Initializes the data from an existing sample.
[in] | oSampleToCopy | The sample to copy. |
tResult | In case of an error. |
Definition at line 439 of file sample.h.
References adtf::streaming::flash::alloc_sample(), THROW_ERROR_DESC, and THROW_IF_FAILED.
|
inlineexplicit |
Initializes the data from an existing sample.
[in] | pSampleToCopy | The sample to copy. |
tResult | In case of an error. |
Definition at line 457 of file sample.h.
References output_sample_data().
|
inlineprivate |
|
inline |
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 520 of file sample.h.
References GetDataPtr().
Referenced by operator const T &(), operator T&(), operator*(), and operator*().
|
inline |
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 529 of file sample.h.
References GetDataPtr().
|
inline |
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 480 of file sample.h.
References output_sample_data().
Referenced by GetData(), GetData(), operator->(), and operator->().
|
inline |
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 489 of file sample.h.
References THROW_ERROR_DESC.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 503 of file sample.h.
References GetDataPtr().
|
inline |
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 511 of file sample.h.
References GetDataPtr().
|
inline |
Assigns a new value to the data.
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 554 of file sample.h.
References output_sample_data().
|
inline |
Returns a sample that contains the data and resets all internal data.
Do not call any other methods after you called this method.
ERR_INVALID_STATE | If Release() has been called. |
Definition at line 588 of file sample.h.
References THROW_ERROR_DESC.
|
inline |
Sets a variant value for the hash key oHash
into the current samples sample information.
[in] | oHash | The hash key of the value. |
[in] | oValue | value to set. |
ERR_NOERROR | value is set |
ERR_INVALID_TYPE | Type is not supported. See base::ant::IHashValueMapValue::tType |
Definition at line 609 of file sample.h.
References adtf::streaming::ant::set_sample_info().
|
inline |
Sets the Substream id of the generated sample.
[in] | nSubStreamId | The substream id. |
Definition at line 471 of file sample.h.
References adtf::streaming::hollow::set_sample_substream_id().
|
protected |
|
protected |