RTI Connext Traditional C++ API Version 7.3.0
|
A sample for writing data. More...
Inherits connext::details::SampleBase< T, I >.
Public Member Functions | |
WriteSample () | |
Creates a sample with default data and info values. More... | |
WriteSample (const WriteSample< T > &other) | |
Creates a sample making a deep copy of another sample. More... | |
WriteSample (const T &data) | |
Creates a sample making a deep copy of another sample. More... | |
WriteSample (WriteSampleRef< T > wsref) | |
Creates a sample deep copying the data and info the source references. More... | |
T & | data () |
Gets the data this sample contains. More... | |
WriteParams_t & | info () |
Gets the write parameters. More... | |
const T & | data () |
Gets the data this sample contains. More... | |
const WriteParams_t & | info () |
Gets the write parameters. More... | |
SampleIdentity_t | identity () const |
Gets the identity of this sample. More... | |
A sample for writing data.
WriteSamples are value types containing data that can be sent and optional parameters that configure how the data is written.
The data is automatically initialized using the corresponding TypeSupport for type T
, and the memory is released in the destructor.
When the data already exists and allocating a new instance is not required, connext::WriteSampleRef can be used instead.
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::WriteSample< T >::WriteSample | ( | const T & | data | ) |
Creates a sample making a deep copy of another sample.
|
inline |
Creates a sample deep copying the data and info the source references.
T & connext::WriteSample< T >::data | ( | ) |
Gets the data this sample contains.
WriteParams_t & connext::WriteSample< T >::info | ( | ) |
Gets the write parameters.
The parameters are input and output to write operations. They can be set to configure the write operation (e.g. setting a specific publication timestamp) or they can be looked up afterward (e.g. what was the actual timestamp the sample was written with).
Referenced by connext::WriteSample< T >::identity().
const T & connext::WriteSample< T >::data | ( | ) |
Gets the data this sample contains.
const WriteParams_t & connext::WriteSample< T >::info | ( | ) |
Gets the write parameters.
The parameters are input and output to write operations. They can be set to configure the write operation (e.g. setting a specific publication timestamp) or they can be looked up afterward (e.g. what was the actual timestamp the sample was written with).
|
inline |
Gets the identity of this sample.
The identity is assigned by the middleware after writing.
References DDS_WriteParams_t::identity, and connext::WriteSample< T >::info().