RTI Connext Traditional C++ API
Version 6.1.2
|
A data sample and related info received from the middleware. More...
Inherits connext::details::SampleBase< T, I >.
Public Member Functions | |
Sample () | |
Creates a sample with default data and info values. More... | |
Sample (const Sample< T > &other) | |
Creates a sample making a deep copy of another sample. More... | |
Sample (SampleRef< T > sample_ref) | |
Creates a sample as a deep copy of the contents referenced by a WriteSampleRef. More... | |
SampleIdentity_t | identity () const |
Gets the identity of this sample. More... | |
SampleIdentity_t | related_identity () const |
Gets the identity of a sample that is related to this one. More... | |
T & | data () |
Gets the data this sample contains. More... | |
SampleInfo & | info () |
Gets the sample information. More... | |
const T & | data () |
Gets the data this sample contains. More... | |
const SampleInfo & | info () |
Gets the sample information. More... | |
A data sample and related info received from the middleware.
Samples contain data received from the middleware and information associated to the data.
T | The data type that this sample contains |
|
inline |
Creates a sample with default data and info values.
The data is deeply initialized using the corresponding TypeSupport
|
inline |
Creates a sample making a deep copy of another sample.
connext::Sample< T >::Sample | ( | SampleRef< T > | sample_ref | ) |
Creates a sample as a deep copy of the contents referenced by a WriteSampleRef.
|
inline |
Gets the identity of this sample.
The identity is assigned by the middleware upon reception.
Referenced by connext::WriteSample< T >::identity(), and connext::WriteSampleRef< T >::identity().
|
inline |
Gets the identity of a sample that is related to this one.
When a connext::Requester receives a reply, the reply Sample contains the identity of the related request.
References DDS_RETCODE_OUT_OF_RESOURCES.
T& connext::Sample< T >::data | ( | ) |
Gets the data this sample contains.
Referenced by connext::WriteSample< T >::identity(), connext::WriteSampleRef< T >::identity(), connext::move(), connext::WriteSampleRef< T >::set_data(), and connext::WriteSample< T >::WriteSample().
SampleInfo& connext::Sample< T >::info | ( | ) |
Gets the sample information.
Referenced by connext::WriteSample< T >::identity(), connext::WriteSampleRef< T >::identity(), connext::move(), connext::WriteSampleRef< T >::set_info(), and connext::WriteSample< T >::WriteSample().
const T& connext::Sample< T >::data | ( | ) |
Gets the data this sample contains.
const SampleInfo& connext::Sample< T >::info | ( | ) |
Gets the sample information.