OpenSplice Java 5 DCPS  v6.x
OpenSplice Java 5 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
StatusConverter.java
Go to the documentation of this file.
1 /*
2  * Vortex OpenSplice
3  *
4  * This software and documentation are Copyright 2006 to 2024 ADLINK
5  * Technology Limited, its affiliated companies and licensors. All rights
6  * reserved.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 package org.opensplice.dds.core.status;
22 
23 import java.util.ArrayList;
24 import java.util.Arrays;
25 import java.util.Collection;
26 import java.util.HashSet;
27 import java.util.Iterator;
28 import java.util.Set;
29 
30 import org.omg.dds.core.policy.Deadline;
35 import org.omg.dds.core.policy.History;
37 import org.omg.dds.core.policy.Lifespan;
50 import org.omg.dds.core.policy.UserData;
72 import org.omg.dds.core.status.Status;
74 
75 import DDS.SampleRejectedStatusKind;
76 
77 public class StatusConverter {
78  private static boolean stateTest(int state, int mask) {
79  return (((state) & (mask)) == mask) ? true : false;
80  }
81 
82  public static Set<Class<? extends Status>> convertMask(
83  OsplServiceEnvironment environment, int state) {
84  HashSet<Class<? extends Status>> statuses = new HashSet<Class<? extends Status>>();
85 
86  if (state == DDS.STATUS_MASK_ANY_V1_2.value) {
87  statuses.add(AllDataDisposedStatus.class);
88  statuses.add(DataAvailableStatus.class);
89  statuses.add(DataOnReadersStatus.class);
90  statuses.add(InconsistentTopicStatus.class);
91  statuses.add(LivelinessChangedStatus.class);
92  statuses.add(LivelinessLostStatus.class);
93  statuses.add(OfferedDeadlineMissedStatus.class);
94  statuses.add(OfferedIncompatibleQosStatus.class);
95  statuses.add(PublicationMatchedStatus.class);
96  statuses.add(RequestedDeadlineMissedStatus.class);
97  statuses.add(RequestedIncompatibleQosStatus.class);
98  statuses.add(SampleLostStatus.class);
99  statuses.add(SampleRejectedStatus.class);
100  statuses.add(SubscriptionMatchedStatus.class);
101  } else {
102  if (stateTest(state, DDS.ALL_DATA_DISPOSED_TOPIC_STATUS.value)) {
103  statuses.add(AllDataDisposedStatus.class);
104  }
105  if (stateTest(state, DDS.DATA_AVAILABLE_STATUS.value)) {
106  statuses.add(DataAvailableStatus.class);
107  }
108  if (stateTest(state, DDS.DATA_ON_READERS_STATUS.value)) {
109  statuses.add(DataOnReadersStatus.class);
110  }
111  if (stateTest(state, DDS.INCONSISTENT_TOPIC_STATUS.value)) {
112  statuses.add(InconsistentTopicStatus.class);
113  }
114  if (stateTest(state, DDS.LIVELINESS_CHANGED_STATUS.value)) {
115  statuses.add(LivelinessChangedStatus.class);
116  }
117  if (stateTest(state, DDS.LIVELINESS_LOST_STATUS.value)) {
118  statuses.add(LivelinessLostStatus.class);
119  }
120  if (stateTest(state, DDS.OFFERED_DEADLINE_MISSED_STATUS.value)) {
121  statuses.add(OfferedDeadlineMissedStatus.class);
122  }
123  if (stateTest(state, DDS.OFFERED_INCOMPATIBLE_QOS_STATUS.value)) {
124  statuses.add(OfferedIncompatibleQosStatus.class);
125  }
126  if (stateTest(state, DDS.PUBLICATION_MATCHED_STATUS.value)) {
127  statuses.add(PublicationMatchedStatus.class);
128  }
129  if (stateTest(state, DDS.REQUESTED_DEADLINE_MISSED_STATUS.value)) {
130  statuses.add(RequestedDeadlineMissedStatus.class);
131  }
132  if (stateTest(state, DDS.REQUESTED_INCOMPATIBLE_QOS_STATUS.value)) {
133  statuses.add(RequestedIncompatibleQosStatus.class);
134  }
135  if (stateTest(state, DDS.SAMPLE_LOST_STATUS.value)) {
136  statuses.add(SampleLostStatus.class);
137  }
138  if (stateTest(state, DDS.SAMPLE_REJECTED_STATUS.value)) {
139  statuses.add(SampleRejectedStatus.class);
140  }
141  if (stateTest(state, DDS.SUBSCRIPTION_MATCHED_STATUS.value)) {
142  statuses.add(SubscriptionMatchedStatus.class);
143  }
144  }
145  return statuses;
146  }
147 
148  public static int convertMask(OsplServiceEnvironment env,
149  Class<? extends Status>... statuses) {
150  return StatusConverter.convertMask(env, Arrays.asList(statuses));
151  }
152 
153  public static int getAnyMask() {
154  return DDS.STATUS_MASK_ANY_V1_2.value;
155  }
156 
157  public static int convertMask(OsplServiceEnvironment env,
158  Collection<Class<? extends Status>> statuses) {
159  int mask;
160 
161  if (statuses == null) {
162  return DDS.STATUS_MASK_ANY_V1_2.value;
163  } else if (statuses.size() == 0) {
164  return DDS.STATUS_MASK_NONE.value;
165  } else if (statuses.size() == 1 && statuses.iterator().next() == null) {
166  return DDS.STATUS_MASK_ANY_V1_2.value;
167  }
168  mask = DDS.STATUS_MASK_NONE.value;
169 
170  for (Class<? extends Status> clz : statuses) {
171  if (clz == null) {
172  throw new IllegalArgumentExceptionImpl(env,
173  "Passed illegal <null> status.");
174  } else if (clz.equals(DataAvailableStatus.class)) {
175  mask |= DDS.DATA_AVAILABLE_STATUS.value;
176  } else if (clz.equals(InconsistentTopicStatus.class)) {
177  mask |= DDS.INCONSISTENT_TOPIC_STATUS.value;
178  } else if (clz.equals(OfferedDeadlineMissedStatus.class)) {
179  mask |= DDS.OFFERED_DEADLINE_MISSED_STATUS.value;
180  } else if (clz.equals(RequestedDeadlineMissedStatus.class)) {
181  mask |= DDS.REQUESTED_DEADLINE_MISSED_STATUS.value;
182  } else if (clz.equals(OfferedIncompatibleQosStatus.class)) {
183  mask |= DDS.OFFERED_INCOMPATIBLE_QOS_STATUS.value;
184  } else if (clz.equals(RequestedIncompatibleQosStatus.class)) {
185  mask |= DDS.REQUESTED_INCOMPATIBLE_QOS_STATUS.value;
186  } else if (clz.equals(SampleLostStatus.class)) {
187  mask |= DDS.SAMPLE_LOST_STATUS.value;
188  } else if (clz.equals(SampleRejectedStatus.class)) {
189  mask |= DDS.SAMPLE_REJECTED_STATUS.value;
190  } else if (clz.equals(DataOnReadersStatus.class)) {
191  mask |= DDS.DATA_ON_READERS_STATUS.value;
192  } else if (clz.equals(LivelinessLostStatus.class)) {
193  mask |= DDS.LIVELINESS_LOST_STATUS.value;
194  } else if (clz.equals(LivelinessChangedStatus.class)) {
195  mask |= DDS.LIVELINESS_CHANGED_STATUS.value;
196  } else if (clz.equals(PublicationMatchedStatus.class)) {
197  mask |= DDS.PUBLICATION_MATCHED_STATUS.value;
198  } else if (clz.equals(SubscriptionMatchedStatus.class)) {
199  mask |= DDS.SUBSCRIPTION_MATCHED_STATUS.value;
200  } else if (clz.equals(AllDataDisposedStatus.class)) {
201  mask |= DDS.ALL_DATA_DISPOSED_TOPIC_STATUS.value;
202  } else if (clz.equals(Status.class)) {
203  throw new IllegalArgumentExceptionImpl(env,
204  "Provided class does not extend from the org.omg.dds.core.status.Status class.");
205  } else {
206  throw new IllegalArgumentExceptionImpl(env,
207  "Found illegal Class<? extends Status>: "
208  + clz.getName());
209  }
210  }
211  return mask;
212  }
213 
215  DDS.QosPolicyCount[] old) {
216  Class<? extends QosPolicy> policyClass;
217  ArrayList<QosPolicyCountImpl> policies = new ArrayList<QosPolicyCountImpl>();
218 
219  for (int i = 0; i < old.length; i++) {
220  policyClass = PolicyConverter.convert(env, old[i].policy_id);
221 
222  if (policyClass != null) {
223  if (old[i].count != 0) {
224  policies.add(new QosPolicyCountImpl(env, policyClass,
225  old[i].count));
226  }
227  }
228  }
229  return policies.toArray(new QosPolicyCountImpl[policies.size()]);
230  }
231 
232  public static int convert(OsplServiceEnvironment env,
233  Class<? extends QosPolicy> policy) {
234  int id;
235 
236  if (policy.equals(Deadline.class)) {
237  id = DDS.DEADLINE_QOS_POLICY_ID.value;
238  } else if (policy.equals(DestinationOrder.class)) {
239  id = DDS.DESTINATIONORDER_QOS_POLICY_ID.value;
240  } else if (policy.equals(Durability.class)) {
241  id = DDS.DURABILITYSERVICE_QOS_POLICY_ID.value;
242  } else if (policy.equals(EntityFactory.class)) {
243  id = DDS.ENTITYFACTORY_QOS_POLICY_ID.value;
244  } else if (policy.equals(GroupData.class)) {
245  id = DDS.GROUPDATA_QOS_POLICY_ID.value;
246  } else if (policy.equals(History.class)) {
247  id = DDS.HISTORY_QOS_POLICY_ID.value;
248  } else if (policy.equals(LatencyBudget.class)) {
249  id = DDS.LATENCYBUDGET_QOS_POLICY_ID.value;
250  } else if (policy.equals(Lifespan.class)) {
251  id = DDS.LIFESPAN_QOS_POLICY_ID.value;
252  } else if (policy.equals(Liveliness.class)) {
253  id = DDS.LIVELINESS_QOS_POLICY_ID.value;
254  } else if (policy.equals(Ownership.class)) {
255  id = DDS.OWNERSHIP_QOS_POLICY_ID.value;
256  } else if (policy.equals(Partition.class)) {
257  id = DDS.PARTITION_QOS_POLICY_ID.value;
258  } else if (policy.equals(Presentation.class)) {
259  id = DDS.PRESENTATION_QOS_POLICY_ID.value;
260  } else if (policy.equals(ReaderDataLifecycle.class)) {
261  id = DDS.READERDATALIFECYCLE_QOS_POLICY_ID.value;
262  } else if (policy.equals(Reliability.class)) {
263  id = DDS.RELIABILITY_QOS_POLICY_ID.value;
264  } else if (policy.equals(ResourceLimits.class)) {
265  id = DDS.RESOURCELIMITS_QOS_POLICY_ID.value;
266  } else if (policy.equals(Scheduling.class)) {
267  id = DDS.SCHEDULING_QOS_POLICY_ID.value;
268  } else if (policy.equals(TimeBasedFilter.class)) {
269  id = DDS.TIMEBASEDFILTER_QOS_POLICY_ID.value;
270  } else if (policy.equals(TopicData.class)) {
271  id = DDS.TOPICDATA_QOS_POLICY_ID.value;
272  } else if (policy.equals(TransportPriority.class)) {
273  id = DDS.TRANSPORTPRIORITY_QOS_POLICY_ID.value;
274  } else if (policy.equals(UserData.class)) {
275  id = DDS.USERDATA_QOS_POLICY_ID.value;
276  } else if (policy.equals(WriterDataLifecycle.class)) {
277  id = DDS.WRITERDATALIFECYCLE_QOS_POLICY_ID.value;
278  } else {
279  throw new IllegalArgumentExceptionImpl(env,
280  "Found illegal QoSPolicy: " + policy.getName());
281  }
282  return id;
283  }
284 
285  public static DDS.QosPolicyCount[] convert(OsplServiceEnvironment env,
286  Set<QosPolicyCount> count) {
287  DDS.QosPolicyCount[] old = new DDS.QosPolicyCount[count.size()];
288  Iterator<QosPolicyCount> iter = count.iterator();
289  QosPolicyCount current;
290 
291  for (int i = 0; i < count.size(); i++) {
292  current = iter.next();
293  old[i] = new DDS.QosPolicyCount(convert(env,
294  current.getPolicyClass()), current.getCount());
295  }
296  return old;
297  }
298 
300  DDS.InconsistentTopicStatus old) {
301  return new InconsistentTopicStatusImpl(env, old.total_count,
302  old.total_count_change);
303  }
304 
305  public static DDS.InconsistentTopicStatus convert(
307  return new DDS.InconsistentTopicStatus(status.getTotalCount(),
308  status.getTotalCountChange());
309  }
310 
312  DDS.AllDataDisposedTopicStatus old) {
313  return new AllDataDisposedStatusImpl(env, old.total_count,
314  old.total_count_change);
315  }
316 
317  public static DDS.AllDataDisposedTopicStatus convert(
319  return new DDS.AllDataDisposedTopicStatus(status.getTotalCount(),
320  status.getTotalCountChange());
321  }
322 
324  DDS.LivelinessChangedStatus old) {
325  return new LivelinessChangedStatusImpl(env, old.alive_count,
326  old.alive_count_change, old.not_alive_count,
327  old.not_alive_count_change, new InstanceHandleImpl(env,
328  old.last_publication_handle));
329  }
330 
331  public static DDS.LivelinessChangedStatus convert(
333  return new DDS.LivelinessChangedStatus(status.getAliveCount(),
334  status.getAliveCountChange(), status.getNotAliveCount(),
336  status.getLastPublicationHandle()));
337  }
338 
340  DDS.LivelinessLostStatus old) {
341  return new LivelinessLostStatusImpl(env, old.total_count,
342  old.total_count_change);
343  }
344 
345  public static DDS.LivelinessLostStatus convert(OsplServiceEnvironment env,
346  LivelinessLostStatus status) {
347  return new DDS.LivelinessLostStatus(status.getTotalCount(),
348  status.getTotalCountChange());
349  }
350 
352  OsplServiceEnvironment env, DDS.OfferedDeadlineMissedStatus old) {
353  return new OfferedDeadlineMissedStatusImpl(env, old.total_count,
354  old.total_count_change, Utilities.convert(env,
355  old.last_instance_handle));
356  }
357 
358  public static DDS.OfferedDeadlineMissedStatus convert(
360  return new DDS.OfferedDeadlineMissedStatus(status.getTotalCount(),
361  status.getTotalCountChange(), Utilities.convert(env,
362  status.getLastInstanceHandle()));
363  }
364 
366  OsplServiceEnvironment env, DDS.OfferedIncompatibleQosStatus old) {
367 
368  return new OfferedIncompatibleQosStatusImpl(env, old.total_count,
369  old.total_count_change, PolicyConverter.convert(env,
370  old.last_policy_id), convert(env, old.policies));
371  }
372 
373  public static DDS.OfferedIncompatibleQosStatus convert(
375  return new DDS.OfferedIncompatibleQosStatus(status.getTotalCount(),
376  status.getTotalCountChange(), convert(env,
377  status.getLastPolicyClass()), convert(env,
378  status.getPolicies()));
379  }
380 
382  DDS.PublicationMatchedStatus old) {
383 
384  return new PublicationMatchedStatusImpl(env, old.total_count,
385  old.total_count_change, old.current_count,
386  old.current_count_change, Utilities.convert(env,
387  old.last_subscription_handle));
388  }
389 
390  public static DDS.PublicationMatchedStatus convert(
392  return new DDS.PublicationMatchedStatus(status.getTotalCount(),
393  status.getTotalCountChange(), status.getCurrentCount(),
395  status.getLastSubscriptionHandle()));
396  }
397 
399  OsplServiceEnvironment env, DDS.RequestedDeadlineMissedStatus old) {
400  return new RequestedDeadlineMissedStatusImpl(env, old.total_count,
401  old.total_count_change, Utilities.convert(env,
402  old.last_instance_handle));
403  }
404 
405  public static DDS.RequestedDeadlineMissedStatus convert(
407  return new DDS.RequestedDeadlineMissedStatus(status.getTotalCount(),
408  status.getTotalCountChange(), Utilities.convert(env,
409  status.getLastInstanceHandle()));
410  }
411 
413  DDS.SampleRejectedStatus old) {
415 
416  switch (old.last_reason.value()) {
417  case SampleRejectedStatusKind._NOT_REJECTED:
418  kind = Kind.NOT_REJECTED;
419  break;
420  case SampleRejectedStatusKind._REJECTED_BY_INSTANCES_LIMIT:
422  break;
423  case SampleRejectedStatusKind._REJECTED_BY_SAMPLES_LIMIT:
425  break;
426  case SampleRejectedStatusKind._REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT:
428  break;
429  default:
430  throw new IllegalArgumentExceptionImpl(env,
431  "Found illegal SampleRejectedStatus.Kind "
432  + old.last_reason.value());
433  }
434  return new SampleRejectedStatusImpl(env, old.total_count,
435  old.total_count_change, kind, Utilities.convert(env,
436  old.last_instance_handle));
437  }
438 
439  public static DDS.SampleRejectedStatus convert(OsplServiceEnvironment env,
440  SampleRejectedStatus status) {
441  DDS.SampleRejectedStatusKind kind;
442 
443  switch (status.getLastReason()) {
444  case NOT_REJECTED:
445  kind = DDS.SampleRejectedStatusKind.NOT_REJECTED;
446  break;
447  case REJECTED_BY_INSTANCES_LIMIT:
448  kind = DDS.SampleRejectedStatusKind.REJECTED_BY_INSTANCES_LIMIT;
449  break;
450  case REJECTED_BY_SAMPLES_LIMIT:
451  kind = DDS.SampleRejectedStatusKind.REJECTED_BY_SAMPLES_LIMIT;
452  break;
453  case REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT:
454  kind = DDS.SampleRejectedStatusKind.REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT;
455  break;
456  default:
457  throw new IllegalArgumentExceptionImpl(env,
458  "Found illegal SampleRejectedStatus.Kind");
459  }
460  return new DDS.SampleRejectedStatus(status.getTotalCount(),
461  status.getTotalCountChange(), kind, Utilities.convert(env,
462  status.getLastInstanceHandle()));
463  }
464 
466  OsplServiceEnvironment env, DDS.RequestedIncompatibleQosStatus old) {
467 
468  return new RequestedIncompatibleQosStatusImpl(env, old.total_count,
469  old.total_count_change, PolicyConverter.convert(env,
470  old.last_policy_id), convert(env, old.policies));
471  }
472 
473  public static DDS.RequestedIncompatibleQosStatus convert(
475  return new DDS.RequestedIncompatibleQosStatus(status.getTotalCount(),
476  status.getTotalCountChange(), convert(env,
477  status.getLastPolicyClass()), convert(env,
478  status.getPolicies()));
479  }
480 
482  DDS.SubscriptionMatchedStatus old) {
483 
484  return new SubscriptionMatchedStatusImpl(env, old.total_count,
485  old.total_count_change, old.current_count,
486  old.current_count_change, Utilities.convert(env,
487  old.last_publication_handle));
488  }
489 
490  public static DDS.SubscriptionMatchedStatus convert(
492  return new DDS.SubscriptionMatchedStatus(status.getTotalCount(),
493  status.getTotalCountChange(), status.getCurrentCount(),
495  status.getLastPublicationHandle()));
496  }
497 
499  DDS.SampleLostStatus old) {
500  return new SampleLostStatusImpl(env, old.total_count,
501  old.total_count_change);
502  }
503 
504  public static DDS.SampleLostStatus convert(SampleLostStatus status) {
505  return new DDS.SampleLostStatus(status.getTotalCount(),
506  status.getTotalCountChange());
507  }
508 }
A sample has been lost (never received).
abstract int getTotalCount()
Total cumulative count the concerned org.omg.dds.sub.DataReader discovered a "match" with a org...
abstract int getTotalCountChange()
The change in totalCount since the last time the listener was called or the status was read...
This class contains the statistics about the discovered number of org.omg.dds.sub.DataReaders that are compatible with the org.omg.dds.pub.DataWriter to which the Status is attached.
static DDS.InconsistentTopicStatus convert(OsplServiceEnvironment env, InconsistentTopicStatus status)
Specifies the behavior of the org.omg.dds.sub.DataReader with regards to the life cycle of the data i...
abstract int getTotalCountChange()
The incremental number of samples rejected since the last time the listener was called or the status ...
abstract Class<? extends QosPolicy > getLastPolicyClass()
The class of one of the policies that was found to be incompatible the last time an incompatibility w...
abstract int getTotalCount()
Total cumulative number of offered deadline periods elapsed during which a DataWriter failed to provi...
abstract int getTotalCount()
Total cumulative count of samples rejected by the org.omg.dds.sub.DataReader.
abstract InstanceHandle getLastInstanceHandle()
Handle to the last instance in the org.omg.dds.pub.DataWriter for which an offered deadline was misse...
static DDS.OfferedDeadlineMissedStatus convert(OsplServiceEnvironment env, OfferedDeadlineMissedStatus status)
static DDS.QosPolicyCount [] convert(OsplServiceEnvironment env, Set< QosPolicyCount > count)
Specifies the behavior of the org.omg.dds.pub.DataWriter with regards to the life cycle of the data i...
static RequestedIncompatibleQosStatus convert(OsplServiceEnvironment env, DDS.RequestedIncompatibleQosStatus old)
Specifies the maximum acceptable delay from the time the data is written until the data is inserted i...
static int convertMask(OsplServiceEnvironment env, Collection< Class<? extends Status >> statuses)
Filter that allows a org.omg.dds.sub.DataReader to specify that it is interested only in (potentially...
abstract int getAliveCountChange()
The change in the aliveCount since the last time the listener was called or the status was read...
static InconsistentTopicStatus convert(OsplServiceEnvironment env, DDS.InconsistentTopicStatus old)
abstract int getTotalCount()
Total cumulative number of missed deadlines detected for any instance read by the org...
abstract int getTotalCount()
Total cumulative number of times the concerned org.omg.dds.sub.DataReader discovered a org...
abstract int getTotalCountChange()
The incremental number of deadlines detected since the last time the listener was called or the statu...
abstract Set< QosPolicyCount > getPolicies()
A list containing for each policy the total number of times that the concerned org.omg.dds.pub.DataWriter discovered a org.omg.dds.sub.DataReader for the same org.omg.dds.topic.Topic with a requested QoS that is incompatible with that offered by the DataWriter.
abstract int getTotalCountChange()
The incremental number of samples lost since the last time the listener was called or the status was ...
static DDS.RequestedIncompatibleQosStatus convert(OsplServiceEnvironment env, RequestedIncompatibleQosStatus status)
abstract int getCurrentCount()
The number of org.omg.dds.sub.DataReaders currently matched to the concerned org.omg.dds.pub.DataWriter.
abstract int getTotalCount()
Total cumulative count of the times all instances for the corresponding org.omg.dds.topic.Topic have been disposed.
static LivelinessLostStatus convert(OsplServiceEnvironment env, DDS.LivelinessLostStatus old)
abstract int getNotAliveCount()
The total count of currently org.omg.dds.pub.DataWriters that write the org.omg.dds.topic.Topic read by the org.omg.dds.sub.DataReader that are no longer asserting their liveliness.
static DDS.LivelinessLostStatus convert(OsplServiceEnvironment env, LivelinessLostStatus status)
static DDS.SubscriptionMatchedStatus convert(OsplServiceEnvironment env, SubscriptionMatchedStatus status)
User data not known by the middleware, but distributed by means of built-in topics.
Definition: UserData.java:48
abstract int getCurrentCountChange()
The change in currentCount since the last time the listener was called or the status was read...
static SampleLostStatus convert(OsplServiceEnvironment env, DDS.SampleLostStatus old)
abstract InstanceHandle getLastPublicationHandle()
Handle to the last org.omg.dds.pub.DataWriter whose change in liveliness caused this status to change...
static RequestedDeadlineMissedStatus convert(OsplServiceEnvironment env, DDS.RequestedDeadlineMissedStatus old)
static DDS.Duration_t convert(OsplServiceEnvironment environment, Duration d)
Definition: Utilities.java:232
abstract int getTotalCount()
Total cumulative count of the org.omg.dds.topic.Topics discovered whose name matches the Topic to whi...
abstract InstanceHandle getLastPublicationHandle()
Handle to the last org.omg.dds.pub.DataWriter that matched the org.omg.dds.sub.DataReader, causing the status to change.
abstract Kind getLastReason()
Reason for rejecting the last sample rejected.
This policy allows the introduction of a logical partition concept inside the "physical" partition in...
Definition: Partition.java:86
abstract Class<? extends QosPolicy > getLastPolicyClass()
The class of one of the policies that was found to be incompatible the last time an incompatibility w...
Class<? extends QosPolicy > getPolicyClass()
abstract InstanceHandle getLastInstanceHandle()
Handle to the instance being updated by the last sample that was rejected.
static QosPolicyCount [] convert(OsplServiceEnvironment env, DDS.QosPolicyCount[] old)
abstract int getTotalCountChange()
The change in totalCount since the last time the listener was called or the status was read...
static OfferedIncompatibleQosStatus convert(OsplServiceEnvironment env, DDS.OfferedIncompatibleQosStatus old)
static LivelinessChangedStatus convert(OsplServiceEnvironment env, DDS.LivelinessChangedStatus old)
abstract int getTotalCount()
Total cumulative count of all samples lost across all instances of data published under the org...
static SubscriptionMatchedStatus convert(OsplServiceEnvironment env, DDS.SubscriptionMatchedStatus old)
static int convertMask(OsplServiceEnvironment env, Class<? extends Status >... statuses)
static DDS.AllDataDisposedTopicStatus convert(OsplServiceEnvironment env, AllDataDisposedStatus status)
static Set< Class<? extends Status > > convertMask(OsplServiceEnvironment environment, int state)
The liveliness that the org.omg.dds.pub.DataWriter has committed through its org.omg.dds.core.policy.Liveliness was not respected; thus org.omg.dds.sub.DataReader entities will consider the DataWriter as no longer "active.".
static DDS.LivelinessChangedStatus convert(OsplServiceEnvironment env, LivelinessChangedStatus status)
static PublicationMatchedStatus convert(OsplServiceEnvironment env, DDS.PublicationMatchedStatus old)
abstract int getTotalCountChange()
The change in totalCcount since the last time the listener was called or the status was read...
Specifies how the samples representing changes to data instances are presented to the subscribing app...
User data not known by the middleware, but distributed by means of built-in topics.
Definition: GroupData.java:44
static DDS.UserDataQosPolicy convert(OsplServiceEnvironment env, UserData p)
A org.omg.dds.core.policy.QosPolicy value was incompatible with what is offered.
This QosPolicy specifies the scheduling parameters that will be used for a thread that is spawned by ...
Definition: Scheduling.java:45
abstract int getTotalCount()
Total cumulative count the concerned org.omg.dds.pub.DataWriter discovered a "match" with a org...
All instances for one or more org.omg.dds.topic.Topics have been disposed through org...
static int convert(OsplServiceEnvironment env, Class<? extends QosPolicy > policy)
static SampleRejectedStatus convert(OsplServiceEnvironment env, DDS.SampleRejectedStatus old)
abstract int getAliveCount()
The total number of currently active org.omg.dds.pub.DataWriters that write the Topic read by the org...
There is new data in one of the DataReaders of the Subscriber.
Determines the mechanism and parameters used by the application to determine whether an org...
This class contains the statistics about the discovered number of org.omg.dds.pub.DataWriters that are compatible with the org.omg.dds.sub.DataReader to which the Status is attached.
This policy is a hint to the infrastructure as to how to set the priority of the underlying transport...
abstract Set< QosPolicyCount > getPolicies()
A list containing for each policy the total number of times that the concerned org.omg.dds.sub.DataReader discovered a org.omg.dds.pub.DataWriter for the same org.omg.dds.topic.Topic with an offered QoS that is incompatible with that requested by the DataReader.
This class is the abstract root for all the QoS policies.
Definition: QosPolicy.java:118
abstract InstanceHandle getLastInstanceHandle()
Handle to the last instance in the org.omg.dds.sub.DataReader for which a deadline was detected...
static DDS.PublicationMatchedStatus convert(OsplServiceEnvironment env, PublicationMatchedStatus status)
abstract int getCurrentCountChange()
The change in currentCount since the last time the listener was called or the status was read...
abstract InstanceHandle getLastSubscriptionHandle()
Handle to the last org.omg.dds.sub.DataReader that matched the org.omg.dds.pub.DataWriter, causing the status to change.
abstract int getNotAliveCountChange()
The change in the notAliveCount since the last time the listener was called or the status was read...
static AllDataDisposedStatus convert(OsplServiceEnvironment env, DDS.AllDataDisposedTopicStatus old)
static DDS.SampleLostStatus convert(SampleLostStatus status)
abstract int getTotalCount()
Total cumulative number of times the concerned org.omg.dds.pub.DataWriter discovered a org...
abstract int getTotalCountChange()
The incremental number of inconsistent topics discovered since the last time the listener was called ...
abstract int getTotalCountChange()
The incremental number of times all instances have been disposed for the corresponding org...
A org.omg.dds.core.policy.QosPolicy value was incompatible with what was requested.
Objects of this type are immutable.
Controls the criteria used to determine the logical order among changes made by org.omg.dds.pub.Publisher entities to the same instance of data (i.e., matching Topic and key).
The liveliness of one or more org.omg.dds.pub.DataWriters that were writing instances read through th...
static DDS.SampleRejectedStatus convert(OsplServiceEnvironment env, SampleRejectedStatus status)
There is new data in the DataReader.
abstract int getTotalCountChange()
The change in totalCount since the last time the listener was called or the status was read...
static DDS.OfferedIncompatibleQosStatus convert(OsplServiceEnvironment env, OfferedIncompatibleQosStatus status)
A (received) sample has been rejected.
Specifies the resources that the Service can consume in order to meet the requested QoS...
abstract int getTotalCountChange()
The change in totalCount since the last time the listener was called or the status was read...
Controls the behavior of the org.omg.dds.core.Entity when acting as a factory for other entities...
The deadline that the org.omg.dds.sub.DataReader was expecting through its org.omg.dds.core.policy.Deadline was not respected for a specific instance.
This policy indicates the level of reliability requested by a org.omg.dds.sub.DataReader or offered b...
This policy expresses if the data should "outlive" their writing time.
The deadline that the org.omg.dds.pub.DataWriter has committed through its org.omg.dds.core.policy.Deadline was not respected for a specific instance.
org.omg.dds.sub.DataReader expects a new sample updating the value of each instance at least once eve...
Definition: Deadline.java:92
static DDS.RequestedDeadlineMissedStatus convert(OsplServiceEnvironment env, RequestedDeadlineMissedStatus status)
abstract int getCurrentCount()
The number of org.omg.dds.pub.DataWriters currently matched to the concerned org.omg.dds.sub.DataReader.
Another topic exists with the same name but different characteristics.
This QosPolicy specifies whether a DataWriter exclusively may own an instance.
Definition: Ownership.java:63
Specifies the maximum duration of validity of the data written by the org.omg.dds.pub.DataWriter.
Definition: Lifespan.java:57
static OfferedDeadlineMissedStatus convert(OsplServiceEnvironment env, DDS.OfferedDeadlineMissedStatus old)
abstract int getTotalCount()
Total cumulative number of times that a previously-alive org.omg.dds.pub.DataWriter became not alive ...
Status is the abstract root class for all communication status objects.
Definition: Status.java:41
User data not known by the middleware, but distributed by means of built-in topics.
Definition: TopicData.java:42
abstract int getTotalCountChange()
The change in totalCount since the last time the listener was called or the status was read...
Specifies the behavior of the Service in the case where the value of a sample changes (one or more ti...
Definition: History.java:76