21 package org.opensplice.dds.sub;
23 import java.lang.reflect.Field;
24 import java.lang.reflect.InvocationTargetException;
25 import java.lang.reflect.Method;
26 import java.util.HashSet;
27 import java.util.List;
29 import java.util.concurrent.TimeUnit;
30 import java.util.concurrent.TimeoutException;
60 import DDS.SampleInfoHolder;
61 import DDS.SampleInfoSeqHolder;
68 private final DDS.DataReader old;
69 private final Class<?> sampleSeqHolderClz;
70 private final Field sampleSeqHolderValueField;
72 private final Class<?> sampleHolderClz;
73 private final Field sampleHolderValueField;
75 private final Method
read;
76 private final Method
take;
77 private final Method readCondition;
78 private final Method takeCondition;
79 private final Method readNextSample;
80 private final Method takeNextSample;
81 private final Method readInstance;
82 private final Method takeInstance;
83 private final Method readNextInstance;
84 private final Method takeNextInstance;
85 private final Method readNextInstanceCondition;
86 private final Method takeNextInstanceCondition;
87 private final Method returnLoan;
88 private final Method getKeyValue;
89 private final Method lookupInstance;
93 this.environment = environment;
95 this.old = reader.getOld();
97 Class<?> typedReaderClz;
98 String typedReaderClzName = ddsTypeClz.getName() +
"DataReaderImpl";
101 typedReaderClz = Class.forName(typedReaderClzName);
103 this.sampleHolderClz = Class.forName(ddsTypeClz.getName() +
"Holder");
104 this.sampleHolderValueField = this.sampleHolderClz
105 .getDeclaredField(
"value");
107 this.sampleSeqHolderClz = Class.forName(ddsTypeClz.getName()
109 this.sampleSeqHolderValueField = this.sampleSeqHolderClz
110 .getDeclaredField(
"value");
112 this.read = typedReaderClz.getMethod(
"read",
113 this.sampleSeqHolderClz, SampleInfoSeqHolder.class,
114 int.class,
int.class,
int.class,
int.class);
115 this.take = typedReaderClz.getMethod(
"take",
116 this.sampleSeqHolderClz, SampleInfoSeqHolder.class,
117 int.class,
int.class,
int.class,
int.class);
119 this.readCondition = typedReaderClz.getMethod(
"read_w_condition",
120 this.sampleSeqHolderClz, SampleInfoSeqHolder.class,
121 int.class, DDS.ReadCondition.class);
122 this.takeCondition = typedReaderClz.getMethod(
"take_w_condition",
123 this.sampleSeqHolderClz, SampleInfoSeqHolder.class,
124 int.class, DDS.ReadCondition.class);
126 this.readNextSample = typedReaderClz.getMethod(
"read_next_sample",
127 this.sampleHolderClz, SampleInfoHolder.class);
128 this.takeNextSample = typedReaderClz.getMethod(
"take_next_sample",
129 this.sampleHolderClz, SampleInfoHolder.class);
131 this.readInstance = typedReaderClz.getMethod(
"read_instance",
132 this.sampleSeqHolderClz, SampleInfoSeqHolder.class,
133 int.class,
long.class,
int.class,
int.class,
int.class);
134 this.takeInstance = typedReaderClz.getMethod(
"take_instance",
135 this.sampleSeqHolderClz, SampleInfoSeqHolder.class,
136 int.class,
long.class,
int.class,
int.class,
int.class);
138 this.readNextInstance = typedReaderClz.getMethod(
139 "read_next_instance", this.sampleSeqHolderClz,
140 SampleInfoSeqHolder.class,
int.class,
long.class,
141 int.class,
int.class,
int.class);
142 this.takeNextInstance = typedReaderClz.getMethod(
143 "take_next_instance", this.sampleSeqHolderClz,
144 SampleInfoSeqHolder.class,
int.class,
long.class,
145 int.class,
int.class,
int.class);
147 this.readNextInstanceCondition = typedReaderClz.getMethod(
148 "read_next_instance_w_condition", this.sampleSeqHolderClz,
149 SampleInfoSeqHolder.class,
int.class,
long.class,
150 DDS.ReadCondition.class);
151 this.takeNextInstanceCondition = typedReaderClz.getMethod(
152 "take_next_instance_w_condition", this.sampleSeqHolderClz,
153 SampleInfoSeqHolder.class,
int.class,
long.class,
154 DDS.ReadCondition.class);
156 this.returnLoan = typedReaderClz.getMethod(
"return_loan",
157 this.sampleSeqHolderClz, SampleInfoSeqHolder.class);
159 this.getKeyValue = typedReaderClz.getMethod(
"get_key_value",
160 this.sampleHolderClz,
long.
class);
161 this.lookupInstance = typedReaderClz.getMethod(
"lookup_instance",
163 }
catch (ClassNotFoundException e) {
166 "Cannot find Typed DataReader '" 168 +
"' that should have been generated manually with the OpenSplice IDL pre-processor.(" 169 + e.getMessage() +
").");
170 }
catch (NoSuchMethodException e) {
172 "Cannot find correct methods in OpenSplice IDL pre-processor generated class: " 173 + typedReaderClzName +
" (" + e.getMessage() +
").");
174 }
catch (NoSuchFieldException e) {
177 "Cannot find 'value' field in " 178 +
"the typed sampleHolderClass " 179 +
"that should have been generated by the OpenSplice IDL pre-processor (" 180 + e.getMessage() +
").");
181 }
catch (SecurityException e) {
184 "Insufficient rights to find methods/fields in code that has been generated by the OpenSplice IDL pre-processor (" 185 + e.getMessage() +
").");
191 return this.environment;
195 DDS.DataReaderQosHolder holder =
new DDS.DataReaderQosHolder();
196 int rc = this.old.get_qos(holder);
198 "DataReader.getQos() failed.");
208 "Supplied DataReaderQos is null.");
212 }
catch (ClassCastException e) {
214 "Setting non-OpenSplice Qos not supported.");
216 int rc = this.old.set_qos(q.
convert());
218 "DataReader.setQos() failed.");
222 DDS.SampleRejectedStatusHolder holder =
new DDS.SampleRejectedStatusHolder();
224 int rc = this.old.get_sample_rejected_status(holder);
226 "DataReader.getSampleRejectedStatus() failed.");
232 DDS.LivelinessChangedStatusHolder holder =
new DDS.LivelinessChangedStatusHolder();
234 int rc = this.old.get_liveliness_changed_status(holder);
236 "DataReader.getLivelinessChangedStatus() failed.");
242 DDS.RequestedDeadlineMissedStatusHolder holder =
new DDS.RequestedDeadlineMissedStatusHolder();
244 int rc = this.old.get_requested_deadline_missed_status(holder);
246 "DataReader.getRequestedDeadlineMissedStatus() failed.");
252 DDS.RequestedIncompatibleQosStatusHolder holder =
new DDS.RequestedIncompatibleQosStatusHolder();
254 int rc = this.old.get_requested_incompatible_qos_status(holder);
256 "DataReader.getRequestedIncompatibleQosStatus() failed.");
262 DDS.SubscriptionMatchedStatusHolder holder =
new DDS.SubscriptionMatchedStatusHolder();
264 int rc = this.old.get_subscription_matched_status(holder);
266 "DataReader.getSubscriptionMatchedStatus() failed.");
272 DDS.SampleLostStatusHolder holder =
new DDS.SampleLostStatusHolder();
274 int rc = this.old.get_sample_lost_status(holder);
276 "DataReader.getSampleLostStatus() failed.");
282 int rc = this.old.wait_for_historical_data(
Utilities.
convert(
this.environment,
285 "DataReader.waitForHistoricalData() failed.");
290 throws TimeoutException {
296 List<String> filterParameters,
Time minSourceTimestamp,
298 Duration maxWait)
throws TimeoutException {
299 if (resourceLimits == null) {
301 "Invalid resourceLimits (null) supplied.");
305 if(filterParameters != null){
306 params = filterParameters.toArray(
new String[filterParameters
311 int rc = this.old.wait_for_historical_data_w_condition(
312 filterExpression, params,
318 "DataReader.waitForHistoricalData() failed.");
322 List<String> filterParameters,
Time minSourceTimestamp,
324 long maxWait, TimeUnit unit)
throws TimeoutException {
326 minSourceTimestamp, maxSourceTimestamp, resourceLimits,
327 this.environment.getSPI().newDuration(maxWait, unit));
331 DDS.InstanceHandleSeqHolder holder =
new DDS.InstanceHandleSeqHolder();
332 Set<InstanceHandle> handles;
334 int rc = this.old.get_matched_publications(holder);
336 "DataReader.getMatchedPublications() failed.");
338 handles =
new HashSet<InstanceHandle>();
340 for (
long handle : holder.value) {
348 DDS.PublicationBuiltinTopicDataHolder holder =
new DDS.PublicationBuiltinTopicDataHolder();
349 int rc = this.old.get_matched_publication_data(holder,
352 "DataReader.getMatchedPublicationData() failed.");
353 if (holder.value != null) {
358 "No data for this instanceHandle.");
364 if (keyHolder == null) {
365 throw new IllegalArgumentException(
366 "Invalid key holder (null) provided.");
370 sampleHolder = this.sampleHolderClz.newInstance();
371 this.sampleHolderValueField.set(sampleHolder, keyHolder);
372 int rc = (Integer) this.getKeyValue.invoke(
this.old, sampleHolder,
375 "DataReader.getKeyValue() failed.");
376 }
catch (InstantiationException e) {
378 + e.getMessage() +
").");
379 }
catch (IllegalAccessException e) {
381 + e.getMessage() +
").");
384 }
catch (IllegalArgumentException e) {
386 + e.getMessage() +
").");
387 }
catch (InvocationTargetException e) {
389 + e.getMessage() +
").");
390 }
catch (ClassCastException e) {
392 + e.getMessage() +
").");
397 @SuppressWarnings(
"unchecked")
403 sampleHolder = this.sampleHolderClz.newInstance();
404 int rc = (Integer) this.getKeyValue.invoke(
this.old, sampleHolder,
407 "DataReader.getKeyValue() failed.");
409 return (TYPE) this.sampleHolderValueField.get(sampleHolder);
410 }
catch (InstantiationException e) {
412 + e.getMessage() +
").");
413 }
catch (IllegalAccessException e) {
415 + e.getMessage() +
").");
418 }
catch (IllegalArgumentException e) {
420 + e.getMessage() +
").");
421 }
catch (InvocationTargetException e) {
423 + e.getMessage() +
").");
424 }
catch (ClassCastException e) {
426 + e.getMessage() +
").");
433 if (keyHolder == null) {
434 throw new IllegalArgumentException(
435 "Invalid key holder (null) provided.");
439 oldHandle = (Long) this.lookupInstance.invoke(
this.old, keyHolder);
440 }
catch (IllegalAccessException e) {
442 + e.getMessage() +
").");
445 }
catch (IllegalArgumentException e) {
447 + e.getMessage() +
").");
448 }
catch (InvocationTargetException e) {
450 + e.getMessage() +
").");
451 }
catch (ClassCastException e) {
453 + e.getMessage() +
").");
459 DDS.SampleInfoSeqHolder infoSeqHolder) {
461 int rc = (Integer) this.returnLoan.invoke(
this.old,
462 sampleSeqHolder, infoSeqHolder);
464 "Return loan failed.");
465 }
catch (IllegalAccessException e) {
467 + e.getMessage() +
").");
468 }
catch (InvocationTargetException e) {
470 + e.getMessage() +
").");
475 return this.
read(DDS.LENGTH_UNLIMITED.value);
478 @SuppressWarnings(
"unchecked")
481 DDS.SampleInfoSeqHolder info =
new DDS.SampleInfoSeqHolder();
482 Object sampleSeqHolder;
486 "Invalid Selector (null) provided.");
490 if (query.getQueryExpression() != null) {
491 condition = query.getCondition();
498 sampleSeqHolder = this.sampleSeqHolderClz.newInstance();
501 if (condition != null) {
505 if (query.retrieveNextInstance()) {
507 rc = (Integer) this.readNextInstanceCondition.invoke(
508 this.old, sampleSeqHolder, info,
509 query.getMaxSamples(), handle.
getValue(),
513 rc = (Integer) this.readCondition.invoke(
this.old,
514 sampleSeqHolder, info, query.getMaxSamples(),
519 if (query.retrieveNextInstance()) {
520 rc = (Integer) this.readNextInstance.invoke(
this.old,
521 sampleSeqHolder, info, query.getMaxSamples(),
527 if (instance.
isNil()) {
528 rc = (Integer) this.
read.invoke(
this.old,
529 sampleSeqHolder, info, query.getMaxSamples(),
536 rc = (Integer) this.readInstance.invoke(
this.old,
537 sampleSeqHolder, info, query.getMaxSamples(),
545 "DataReader.read() failed.");
546 }
catch (InstantiationException e) {
548 + e.getMessage() +
").");
549 }
catch (IllegalAccessException e) {
551 + e.getMessage() +
").");
554 }
catch (IllegalArgumentException e) {
556 + e.getMessage() +
").");
557 }
catch (InvocationTargetException e) {
559 + e.getMessage() +
").");
560 }
catch (ClassCastException e) {
563 "Reading with non-OpenSplice DataState, InstanceHandle or ReadCondition not supported");
566 sampleSeqHolder, this.sampleSeqHolderValueField, info);
569 @SuppressWarnings(
"unchecked")
571 DDS.SampleInfoSeqHolder info =
new DDS.SampleInfoSeqHolder();
572 Object sampleSeqHolder;
575 sampleSeqHolder = this.sampleSeqHolderClz.newInstance();
576 int rc = (Integer) this.
read.invoke(
this.old, sampleSeqHolder,
577 info, maxSamples, DDS.ANY_SAMPLE_STATE.value,
578 DDS.ANY_VIEW_STATE.value, DDS.ANY_INSTANCE_STATE.value);
580 "DataReader.read() failed.");
581 }
catch (InstantiationException e) {
583 + e.getMessage() +
").");
584 }
catch (IllegalAccessException e) {
586 + e.getMessage() +
").");
589 }
catch (IllegalArgumentException e) {
591 + e.getMessage() +
").");
592 }
catch (InvocationTargetException e) {
594 + e.getMessage() +
").");
597 sampleSeqHolder, this.sampleSeqHolderValueField, info);
601 return this.
take(DDS.LENGTH_UNLIMITED.value);
604 @SuppressWarnings(
"unchecked")
606 DDS.SampleInfoSeqHolder info =
new DDS.SampleInfoSeqHolder();
607 Object sampleSeqHolder;
610 sampleSeqHolder = this.sampleSeqHolderClz.newInstance();
611 int rc = (Integer) this.
take.invoke(
this.old, sampleSeqHolder,
612 info, maxSamples, DDS.ANY_SAMPLE_STATE.value,
613 DDS.ANY_VIEW_STATE.value, DDS.ANY_INSTANCE_STATE.value);
615 "DataReader.take() failed.");
616 }
catch (InstantiationException e) {
618 + e.getMessage() +
").");
619 }
catch (IllegalAccessException e) {
621 + e.getMessage() +
").");
624 }
catch (IllegalArgumentException e) {
626 + e.getMessage() +
").");
627 }
catch (InvocationTargetException e) {
629 + e.getMessage() +
").");
632 sampleSeqHolder, this.sampleSeqHolderValueField, info);
636 return this.sampleSeqHolderValueField;
639 @SuppressWarnings(
"unchecked")
642 DDS.SampleInfoSeqHolder info =
new DDS.SampleInfoSeqHolder();
643 Object sampleSeqHolder;
647 "Invalid Selector (null) provided.");
651 if (query.getQueryExpression() != null) {
652 condition = query.getCondition();
659 sampleSeqHolder = this.sampleSeqHolderClz.newInstance();
662 if (condition != null) {
666 if (query.retrieveNextInstance()) {
668 rc = (Integer) this.takeNextInstanceCondition.invoke(
669 this.old, sampleSeqHolder, info,
670 query.getMaxSamples(), handle.
getValue(),
674 rc = (Integer) this.takeCondition.invoke(
this.old,
675 sampleSeqHolder, info, query.getMaxSamples(),
680 if (query.retrieveNextInstance()) {
681 rc = (Integer) this.takeNextInstance.invoke(
this.old,
682 sampleSeqHolder, info, query.getMaxSamples(),
688 if (instance.
isNil()) {
689 rc = (Integer) this.
take.invoke(
this.old,
690 sampleSeqHolder, info, query.getMaxSamples(),
697 rc = (Integer) this.takeInstance.invoke(
this.old,
698 sampleSeqHolder, info, query.getMaxSamples(),
706 "DataReader.take() failed.");
707 }
catch (InstantiationException e) {
709 + e.getMessage() +
").");
710 }
catch (IllegalAccessException e) {
712 + e.getMessage() +
").");
715 }
catch (IllegalArgumentException e) {
717 + e.getMessage() +
").");
718 }
catch (InvocationTargetException e) {
720 + e.getMessage() +
").");
721 }
catch (ClassCastException e) {
724 "Taking with non-OpenSplice DataState, InstanceHandle or ReadCondition not supported");
727 sampleSeqHolder, this.sampleSeqHolderValueField, info);
730 @SuppressWarnings(
"unchecked")
732 DDS.SampleInfoHolder info;
736 if (sample == null) {
738 "Provided an invalid null sample.");
741 info =
new DDS.SampleInfoHolder();
742 sampleHolder = this.sampleHolderClz.newInstance();
744 this.sampleHolderValueField.set(sampleHolder, sample.getData());
745 int rc = (Integer) this.readNextSample.invoke(
this.old,
748 "DataReader.readNextSample() failed.");
750 if (rc == DDS.RETCODE_OK.value) {
752 (TYPE) this.sampleHolderValueField.get(sampleHolder),
759 }
catch (InstantiationException e) {
761 + e.getMessage() +
").");
762 }
catch (IllegalAccessException e) {
764 + e.getMessage() +
").");
767 }
catch (IllegalArgumentException e) {
769 + e.getMessage() +
").");
770 }
catch (InvocationTargetException e) {
772 + e.getMessage() +
").");
773 }
catch (ClassCastException e) {
775 + e.getMessage() +
").");
780 @SuppressWarnings(
"unchecked")
782 DDS.SampleInfoHolder info;
786 if (sample == null) {
788 "Provided an invalid null sample.");
791 info =
new DDS.SampleInfoHolder();
792 sampleHolder = this.sampleHolderClz.newInstance();
793 this.sampleHolderValueField.set(sampleHolder, sample.getData());
794 int rc = (Integer) this.takeNextSample.invoke(
this.old,
797 "DataReader.readNextSample() failed.");
799 if (rc == DDS.RETCODE_OK.value) {
801 (TYPE) this.sampleHolderValueField.get(sampleHolder),
808 }
catch (InstantiationException e) {
810 + e.getMessage() +
").");
811 }
catch (IllegalAccessException e) {
813 + e.getMessage() +
").");
816 }
catch (IllegalArgumentException e) {
818 + e.getMessage() +
").");
819 }
catch (InvocationTargetException e) {
821 + e.getMessage() +
").");
822 }
catch (ClassCastException e) {
824 + e.getMessage() +
").");
831 this.sampleSeqHolderClz, this.sampleSeqHolderValueField);
834 int rc = (Integer) this.
take.invoke(
this.old,
836 DDS.LENGTH_UNLIMITED.value, DDS.ANY_SAMPLE_STATE.value,
837 DDS.ANY_VIEW_STATE.value, DDS.ANY_INSTANCE_STATE.value);
839 "DataReader.read() failed.");
840 }
catch (IllegalAccessException e) {
842 + e.getMessage() +
").");
845 }
catch (IllegalArgumentException e) {
847 + e.getMessage() +
").");
848 }
catch (InvocationTargetException e) {
850 + e.getMessage() +
").");
859 if (selector == null) {
860 return this.
take(samples);
864 this.sampleSeqHolderClz, this.sampleSeqHolderValueField);
867 if (selector.getQueryExpression() != null) {
868 condition = selector.getCondition();
877 if (condition != null) {
881 if (selector.retrieveNextInstance()) {
883 rc = (Integer) this.takeNextInstanceCondition.invoke(
889 rc = (Integer) this.takeCondition.invoke(
this.old,
891 selector.getMaxSamples(), oldCondition);
895 if (selector.retrieveNextInstance()) {
896 rc = (Integer) this.takeNextInstance.invoke(
this.old,
898 selector.getMaxSamples(), handle.
getValue(),
903 if (instance.
isNil()) {
904 rc = (Integer) this.
take.invoke(
this.old,
906 selector.getMaxSamples(),
913 rc = (Integer) this.takeInstance.invoke(
this.old,
915 selector.getMaxSamples(), handle.
getValue(),
923 "DataReader.take() failed.");
924 }
catch (IllegalAccessException e) {
926 + e.getMessage() +
").");
929 }
catch (IllegalArgumentException e) {
931 + e.getMessage() +
").");
932 }
catch (InvocationTargetException e) {
934 + e.getMessage() +
").");
935 }
catch (ClassCastException e) {
938 "Reading with non-OpenSplice DataState, InstanceHandle or ReadCondition not supported");
948 if (selector == null) {
949 return this.
read(samples);
953 this.sampleSeqHolderClz, this.sampleSeqHolderValueField);
957 if (selector.getQueryExpression() != null) {
958 condition = selector.getCondition();
967 if (condition != null) {
971 if (selector.retrieveNextInstance()) {
973 rc = (Integer) this.readNextInstanceCondition.invoke(
979 rc = (Integer) this.readCondition.invoke(
this.old,
981 selector.getMaxSamples(), oldCondition);
985 if (selector.retrieveNextInstance()) {
986 rc = (Integer) this.readNextInstance.invoke(
this.old,
988 selector.getMaxSamples(), handle.
getValue(),
993 if (instance.
isNil()) {
994 rc = (Integer) this.
read.invoke(
this.old,
996 selector.getMaxSamples(),
1003 rc = (Integer) this.readInstance.invoke(
this.old,
1005 selector.getMaxSamples(), handle.
getValue(),
1013 "DataReader.read() failed.");
1014 }
catch (IllegalAccessException e) {
1016 + e.getMessage() +
").");
1019 }
catch (IllegalArgumentException e) {
1021 + e.getMessage() +
").");
1022 }
catch (InvocationTargetException e) {
1024 + e.getMessage() +
").");
1025 }
catch (ClassCastException e) {
1028 "Reading with non-OpenSplice DataState, InstanceHandle or ReadCondition not supported");
1037 this.sampleSeqHolderClz, this.sampleSeqHolderValueField);
1040 int rc = (Integer) this.
read.invoke(
this.old,
1042 DDS.LENGTH_UNLIMITED.value, DDS.ANY_SAMPLE_STATE.value,
1043 DDS.ANY_VIEW_STATE.value, DDS.ANY_INSTANCE_STATE.value);
1045 "DataReader.read() failed.");
1046 }
catch (IllegalAccessException e) {
1048 + e.getMessage() +
").");
1051 }
catch (IllegalArgumentException e) {
1053 + e.getMessage() +
").");
1054 }
catch (InvocationTargetException e) {
1056 + e.getMessage() +
").");
List< Sample< OUT_TYPE > > read(List< Sample< OUT_TYPE >> samples, org.omg.dds.sub.DataReader.Selector< OUT_TYPE > selector)
A sample has been lost (never received).
A DataReader allows the application (1) to declare the data it wishes to receive (i.e., make a subscription) and (2) to access the data received by the attached org.omg.dds.sub.Subscriber.
static void checkReturnCodeWithTimeout(int retCode, OsplServiceEnvironment environment, String message)
Set< InstanceHandle > getMatchedPublications()
RequestedIncompatibleQosStatus getRequestedIncompatibleQosStatus()
RequestedDeadlineMissedStatus getRequestedDeadlineMissedStatus()
A Sample represents an atom of data information (i.e., one value for one instance) as returned by a o...
Iterator< OUT_TYPE > read()
int getOldInstanceState()
SampleInfoSeqHolder getInfoSeqHolder()
Field getSampleSeqHolderValueField()
List< Sample< OUT_TYPE > > take(List< Sample< OUT_TYPE >> samples, org.omg.dds.sub.DataReader.Selector< OUT_TYPE > selector)
List< Sample< OUT_TYPE > > read(List< Sample< OUT_TYPE >> samples)
static DDS.Duration_t convert(OsplServiceEnvironment environment, Duration d)
InstanceHandle lookupInstance(TYPE keyHolder)
static QosPolicyCount [] convert(OsplServiceEnvironment env, DDS.QosPolicyCount[] old)
void setQos(DataReaderQos qos)
List< Sample< TYPE > > getSampleList()
void waitForHistoricalData(Duration maxWait)
SampleLostStatus getSampleLostStatus()
ServiceEnvironment getEnvironment()
abstract Sample.Iterator<?> createIterator(Object sampleSeqHolder, Field sampleSeqHolderValueField, DDS.SampleInfoSeqHolder info)
DDS.DataReaderQos convert()
SampleRejectedStatus getSampleRejectedStatus()
An opaque handle that can be used to refer to a local or remote entity.
static void checkReturnCode(int retCode, OsplServiceEnvironment environment, String message)
static DDS.UserDataQosPolicy convert(OsplServiceEnvironment env, UserData p)
A org.omg.dds.core.policy.QosPolicy value was incompatible with what is offered.
Iterator< OUT_TYPE > take()
void waitForHistoricalData(String filterExpression, List< String > filterParameters, Time minSourceTimestamp, Time maxSourceTimestamp, ResourceLimits resourceLimits, Duration maxWait)
PublicationBuiltinTopicData getMatchedPublicationData(InstanceHandle publicationHandle)
A supertype of all DDS classes and interfaces.
ReadCondition objects are conditions specifically dedicated to read operations and attached to one or...
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.
void waitForHistoricalData(String filterExpression, List< String > filterParameters, Time minSourceTimestamp, Time maxSourceTimestamp, ResourceLimits resourceLimits, long maxWait, TimeUnit unit)
List< Sample< OUT_TYPE > > take(List< Sample< OUT_TYPE >> samples)
LivelinessChangedStatus getLivelinessChangedStatus()
The DCPSPublication topic communicates the existence of datawriters by means of the PublicationBuilti...
The liveliness of one or more org.omg.dds.pub.DataWriters that were writing instances read through th...
void returnLoan(Object sampleSeqHolder, DDS.SampleInfoSeqHolder infoSeqHolder)
A span of elapsed time expressed with nanosecond precision.
ReflectionDataReader(OsplServiceEnvironment environment, AbstractDataReader< OUT_TYPE > reader, Class< TYPE > ddsTypeClz)
DDS implementations are rooted in this class, a concrete subclass of which can be instantiated based ...
A (received) sample has been rejected.
Specifies the resources that the Service can consume in order to meet the requested QoS...
TYPE getKeyValue(TYPE keyHolder, InstanceHandle handle)
Selector class encapsulates different ways of selecting samples from a org.omg.dds.sub.DataReader.
Object getDataSeqHolder()
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.
void waitForHistoricalData(long maxWait, TimeUnit unit)
SubscriptionMatchedStatus getSubscriptionMatchedStatus()
A moment in time expressed with nanosecond precision (though not necessarily nanosecond accuracy)...
abstract PreAllocator< TYPE > getPreAllocator(List< Sample< TYPE >> samples, Class<?> sampleSeqHolderClz, Field sampleSeqHolderValueField)