ADTF
|
Easy data access for input samples. More...
Public Member Functions | |
sample_data () | |
CTOR. | |
sample_data (const sample_data &oSampleData) | |
CTOR. | |
sample_data (sample_data &&oSampleData) | |
move CTOR More... | |
sample_data (const ucom::iobject_ptr< const ant::ISample > &pSample) | |
copy CTOR More... | |
sample_data (const ucom::iobject_ptr< const ISample > &pSample) | |
tTimeStamp | GetTime () const |
retrieves the timestamp of the data. More... | |
adtf::base::flash::tNanoSeconds | GetTimeNs () const |
retrieves the timestamp of the data. More... | |
const T * | GetDataPtr () const |
Retrieves the pointer to the datas memory. More... | |
size_t | GetDataSize () const |
const T * | operator-> () |
Retrieves the pointer to the datas memory. More... | |
const T * | operator-> () const |
Retrieves the pointer to the datas memory. More... | |
const T & | GetData () const |
Retrieves a reference to the data. More... | |
const T & | operator* () const |
Retrieves a reference to the data. More... | |
bool | IsValid () const |
Validate if sample and sample buffer is set. More... | |
operator const T & () const | |
Return the content of sample buffer as a reference. More... | |
tResult | Reset (const ucom::ant::iobject_ptr< const ant::ISample > &pSample) |
Resets the sample the sample data reference to with a new reference to a sample. More... | |
tResult | Reset () |
Resets the sample the sample data reference to. More... | |
adtf_util::cVariant | GetSampleInfo (const ISampleInfo::tHashKey &oHash, const adtf::util::cVariant oDefault=adtf::util::cVariant()) const |
Retrieves a variant value for the hash key oHash out of the samples sample information . More... | |
Private Attributes | |
ucom::object_ptr< const ant::ISample > | m_pCurrentSample |
ucom::object_ptr_shared_locked< const ISampleBuffer > | m_pBuffer |
Easy data access for input samples.
or
T | type of content of the samples sample buffer to get via GetData or sample_data::operator::T |
Definition at line 190 of file sample_data.h.
|
inline |
|
inline |
copy CTOR
pSample | Sample to get the data from |
Definition at line 219 of file sample_data.h.
References sample_data< T >::Reset().
|
inline |
Retrieves a reference to the data.
Internally it gets the buffer pointer of the sample.
T() | if not valid. |
Definition at line 322 of file sample_data.h.
References sample_data< T >::GetDataPtr(), and sample_data< T >::IsValid().
Referenced by sample_data< T >::operator const T &(), and sample_data< T >::operator*().
|
inline |
Retrieves the pointer to the datas memory.
Internally it gets the buffer pointer of the sample.
nullptr | if no buffer set |
Definition at line 271 of file sample_data.h.
Referenced by sample_data< T >::GetData(), and sample_data< T >::operator->().
|
inline |
Definition at line 286 of file sample_data.h.
|
inline |
Retrieves a variant value for the hash key oHash
out of the samples sample information .
If the value does not exists the return value is the given default oDefault
.
[in] | oHash | The hash key of the value. |
[in] | oDefault | default value if value does not exist. |
Definition at line 398 of file sample_data.h.
References adtf::streaming::ant::get_sample_info().
|
inline |
retrieves the timestamp of the data.
Internally it gets the time of the sample.
-1 | if not valid. |
Definition at line 237 of file sample_data.h.
|
inline |
retrieves the timestamp of the data.
Internally it gets the time of the sample.
-1 | if not valid. |
Definition at line 254 of file sample_data.h.
References adtf::streaming::flash::get_sample_time().
|
inline |
Validate if sample and sample buffer is set.
true | is valid |
false | is invalid |
Definition at line 348 of file sample_data.h.
Referenced by sample_data< T >::GetData().
|
inline |
Return the content of sample buffer as a reference.
T() | if no sample buffer set |
Definition at line 359 of file sample_data.h.
References sample_data< T >::GetData().
|
inline |
Retrieves a reference to the data.
Internally it gets the buffer pointer of the sample.
T() | if not valid. |
Definition at line 338 of file sample_data.h.
References sample_data< T >::GetData().
|
inline |
Retrieves the pointer to the datas memory.
Internally it gets the buffer pointer of the sample.
nullptr | if no buffer set |
Definition at line 301 of file sample_data.h.
References sample_data< T >::GetDataPtr().
|
inline |
Retrieves the pointer to the datas memory.
Internally it gets the buffer pointer of the sample.
nullptr | if no buffer set |
Definition at line 309 of file sample_data.h.
References sample_data< T >::GetDataPtr().
|
inline |
Resets the sample the sample data reference to.
The reference will be empty.
ERR_NOERROR | sample is reset |
Definition at line 384 of file sample_data.h.
References object_ptr< T >::Reset(), and RETURN_NOERROR.
Referenced by sample_data< T >::sample_data().
|
inline |
Resets the sample the sample data reference to with a new reference to a sample.
pSample | [in] Reference to the sampel the sample data will reference to |
ERR_NOERROR | sample is reset |
Definition at line 371 of file sample_data.h.
References RETURN_IF_FAILED, and RETURN_NOERROR.