MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / read

Method read

java/tests/multirepo/MultiRepoWorker.java:119–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117 }
118
119 public void read() {
120 Subscriber subscriber =
121 participant.create_subscriber(SUBSCRIBER_QOS_DEFAULT.get(), null, DEFAULT_STATUS_MASK.value);
122
123 assert (subscriber != null);
124
125 TheTransportRegistry.bind_config(transportConfig, subscriber);
126
127 subscriber.create_datareader(topic, DATAREADER_QOS_DEFAULT.get(),
128 new _DataReaderListenerLocalBase () {
129
130 public void on_liveliness_changed(DataReader dr, LivelinessChangedStatus status) {}
131
132 public void on_requested_deadline_missed(DataReader dr, RequestedDeadlineMissedStatus status) {}
133
134 public void on_requested_incompatible_qos(DataReader dr, RequestedIncompatibleQosStatus status) {}
135
136 public void on_sample_lost(DataReader reader, SampleLostStatus status) {}
137
138 public void on_sample_rejected(DataReader dr, SampleRejectedStatus status) {}
139
140 public void on_subscription_matched(DataReader dr, SubscriptionMatchedStatus status) {}
141
142 public void on_data_available(DataReader dr) {
143 MessageDataReader reader = MessageDataReaderHelper.narrow(dr);
144
145 MessageHolder mh = new MessageHolder(new Message());
146
147 SampleInfo si = new SampleInfo();
148 si.source_timestamp = new DDS.Time_t();
149
150 SampleInfoHolder sih = new SampleInfoHolder(si);
151 reader.take_next_sample(mh, sih);
152
153 read = true;
154
155 if (si.valid_data) {
156 System.out.printf("[%s] read: \"%s\"\n", participant, mh.value.text);
157 }
158 }
159 }, DEFAULT_STATUS_MASK.value
160 );
161 }
162
163 public boolean isRead() {
164 return read;

Callers 8

mainMethod · 0.95
mainMethod · 0.95
testParticipantBITMethod · 0.45
testTopicBITMethod · 0.45
testSubscriptionBITMethod · 0.45
testPublicationBITMethod · 0.45
readBytesMethod · 0.45
tieMethod · 0.45

Calls 5

getMethod · 0.95
bind_configMethod · 0.95
getMethod · 0.95
create_subscriberMethod · 0.45
create_datareaderMethod · 0.45

Tested by

no test coverage detected