Easy data access for input samples.
More...
template<typename T>
class adtf::streaming::flash::sample_data< T >
Easy data access for input samples.
Example Usage
{
}
Copyright © Audi Electronics Venture GmbH.
Easy data access for input samples.
Base object pointer to realize binary compatible reference counting in interface methods.
#define LOG_INFO(...)
Log a message with LogLevel Info.
or
struct tMyData
{
uint32_t nValue1;
uint32_t nValue2;
uint32_t nValue3;
};
{
oMyData->nValue1,
oMyData->nValue2,
oMyData->nValue3);
}
- Template Parameters
-
T | type of content of the samples sample buffer to get via GetData or sample_data::operator::T |
- See also
- output_sample_data
Definition at line 498 of file sample.h.
◆ sample_data() [1/2]
◆ sample_data() [2/2]
copy CTOR
- Parameters
-
pSample | Sample to get the data from |
Definition at line 526 of file sample.h.
◆ GetData()
const T& GetData |
( |
| ) |
const |
|
inline |
Retrieves a reference to the data.
Internally it gets the buffer pointer of the sample.
- Returns
- returns a reference to the sample data.
- Return values
-
Definition at line 629 of file sample.h.
◆ GetDataPtr()
const T* GetDataPtr |
( |
| ) |
const |
|
inline |
Retrieves the pointer to the datas memory.
Internally it gets the buffer pointer of the sample.
- Returns
- returns the pointer to the sample data.
- Return values
-
Definition at line 578 of file sample.h.
◆ GetDataSize()
size_t GetDataSize |
( |
| ) |
const |
|
inline |
- Returns
- The size of the buffer that the data resides in.
Definition at line 593 of file sample.h.
◆ GetTime()
tTimeStamp GetTime |
( |
| ) |
const |
|
inline |
retrieves the timestamp of the data.
Internally it gets the time of the sample.
- Returns
- returns the sample time
- Return values
-
Definition at line 544 of file sample.h.
◆ GetTimeNs()
◆ IsValid()
Validate if sample and sample buffer is set.
- Return values
-
true | is valid |
false | is invalid |
Definition at line 655 of file sample.h.
◆ operator const T &()
operator const T & |
( |
| ) |
const |
|
inline |
Return the content of sample buffer as a reference.
- Returns
- the value of the sample buffer as T
- Return values
-
T() | if no sample buffer set |
- See also
- IsValid
Definition at line 666 of file sample.h.
◆ operator*()
const T& operator* |
( |
| ) |
const |
|
inline |
Retrieves a reference to the data.
Internally it gets the buffer pointer of the sample.
- Returns
- returns a reference to the sample data.
- Return values
-
Definition at line 645 of file sample.h.
◆ operator->() [1/2]
Retrieves the pointer to the datas memory.
Internally it gets the buffer pointer of the sample.
- Returns
- returns the pointer to the sample data.
- Return values
-
Definition at line 608 of file sample.h.
◆ operator->() [2/2]
const T* operator-> |
( |
| ) |
const |
|
inline |
Retrieves the pointer to the datas memory.
Internally it gets the buffer pointer of the sample.
- Returns
- returns the pointer to the sample data.
- Return values
-
Definition at line 616 of file sample.h.
◆ Reset() [1/2]
Resets the sample the sample data reference to.
The reference will be empty.
- Returns
- standard result
- Return values
-
ERR_NOERROR | sample is reset |
- See also
- IsValid
Definition at line 691 of file sample.h.
References object_ptr< T >::Reset().
◆ Reset() [2/2]
Resets the sample the sample data reference to with a new reference to a sample.
- Parameters
-
pSample | [in] Reference to the sampel the sample data will reference to |
- Returns
- standard result
- Return values
-
ERR_NOERROR | sample is reset |
- See also
- IsValid
Definition at line 678 of file sample.h.
References RETURN_IF_FAILED.