21 package org.opensplice.dds.sub;
35 private static final long serialVersionUID = 1010323161410625511L;
38 private DDS.SampleInfo info;
41 DDS.SampleInfo info) {
42 this.environment = environment;
49 return this.environment;
54 if (this.info.valid_data ==
false) {
85 this.info.sample_state);
91 this.info.view_state);
97 this.info.instance_state);
108 this.info.instance_handle);
114 this.info.publication_handle);
119 return this.info.disposed_generation_count;
124 return this.info.no_writers_generation_count;
129 return this.info.sample_rank;
134 return this.info.generation_rank;
139 return this.info.absolute_generation_rank;
145 @SuppressWarnings(
"unchecked")
147 cloned.environment = this.environment;
148 cloned.data = this.data;
149 cloned.info.absolute_generation_rank = this.info.absolute_generation_rank;
150 cloned.info.disposed_generation_count = this.info.disposed_generation_count;
151 cloned.info.generation_rank = this.info.generation_rank;
152 cloned.info.instance_handle = this.info.instance_handle;
153 cloned.info.no_writers_generation_count = this.info.no_writers_generation_count;
154 cloned.info.publication_handle = this.info.publication_handle;
155 cloned.info.reception_timestamp.sec = this.info.reception_timestamp.sec;
156 cloned.info.reception_timestamp.nanosec = this.info.reception_timestamp.nanosec;
157 cloned.info.sample_rank = this.info.sample_rank;
158 cloned.info.sample_state = this.info.sample_state;
159 cloned.info.source_timestamp.sec = this.info.source_timestamp.sec;
160 cloned.info.source_timestamp.nanosec = this.info.source_timestamp.nanosec;
161 cloned.info.valid_data = this.info.valid_data;
162 cloned.info.view_state = this.info.view_state;
165 }
catch (CloneNotSupportedException e) {
167 "Cloning of Sample not supported.");
A Sample represents an atom of data information (i.e., one value for one instance) as returned by a o...
For each instance the Data Distribution Service internally maintains an InstanceState.
ViewState getViewState()
For each instance (identified by the key), the middleware internally maintains a viewState relative t...
int getGenerationRank()
The sampleRank and generationRank available in the Sample are computed based solely on the actual sam...
For each sample, the Data Distribution Service internally maintains a SampleState specific to each Da...
static DDS.Duration_t convert(OsplServiceEnvironment environment, Duration d)
static InstanceState getInstanceStateFromOld(OsplServiceEnvironment env, int state)
Time getSourceTimestamp()
Gets the timestamp of the sample.
InstanceHandle getInstanceHandle()
Gets the InstanceHandle of the associated data Sample.
InstanceHandle getPublicationHandle()
Gets the InstanceHandle of the associated publication.
ServiceEnvironment getEnvironment()
SampleImpl< TYPE > clone()
TYPE getData()
Get the data associated with this Sample, if any.
int getDisposedGenerationCount()
For each instance the middleware internally maintains two counts: the disposedGenerationCount and noW...
An opaque handle that can be used to refer to a local or remote entity.
void setContent(TYPE data, DDS.SampleInfo info)
static SampleState getSampleStateFromOld(OsplServiceEnvironment env, int state)
InstanceState getInstanceState()
For each instance the middleware internally maintains an instanceState.
For each instance (identified by the key), the Data Distribution Service internally maintains a ViewS...
int getAbsoluteGenerationRank()
The sampleRank and generationRank available in the Sample are computed based solely on the actual sam...
SampleImpl(OsplServiceEnvironment environment, TYPE data, DDS.SampleInfo info)
int getNoWritersGenerationCount()
For each instance the middleware internally maintains two counts: the disposedGenerationCount and noW...
static ViewState getViewStateFromOld(OsplServiceEnvironment env, int state)
DDS implementations are rooted in this class, a concrete subclass of which can be instantiated based ...
SampleState getSampleState()
For each sample received, the middleware internally maintains a sampleState relative to each org...
void setInfo(DDS.SampleInfo info)
int getSampleRank()
The sampleRank and generationRank available in the Sample are computed based solely on the actual sam...
A moment in time expressed with nanosecond precision (though not necessarily nanosecond accuracy)...