ADTF
|
Wrapper class that facilitates the handling of output samples. More...
Public Member Functions | |
output_sample_data (base::flash::tNanoSeconds tmSampleTime) | |
Initializes the data timestamp. More... | |
output_sample_data (tTimeStamp tmSampleTime) | |
Initializes the data timestamp. More... | |
output_sample_data (base::flash::tNanoSeconds tmSampleTime, const T &oValue) | |
Initializes the data timestamp and value. More... | |
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. More... | |
output_sample_data (const ant::ISample &oSampleToCopy) | |
Initializes the data from an existing sample. More... | |
output_sample_data (const ucom::ant::iobject_ptr< const ant::ISample > &pSampleToCopy) | |
Initializes the data from an existing sample. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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::ant::alloc_sample(), and THROW_IF_FAILED.
|
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::ant::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. |
|
inline |
|
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::ant::alloc_sample(), THROW_ERROR_DESC, and THROW_IF_FAILED.
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
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 |
|
inline |
|
inline |
|
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().