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

Method reader

tests/DCPS/ConfigTransports/Factory.cpp:154–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154DDS::DataReader_var
155Factory::reader(const DDS::Subscriber_var& sub, const DDS::Topic_var& topic, const DDS::DataReaderListener_var& drl) const
156{
157 // Create the data readers
158 DDS::DataReaderQos dr_qos;
159 sub->get_default_datareader_qos(dr_qos);
160
161 dr_qos.durability.kind = opts_.durability_kind;
162 dr_qos.liveliness.kind = opts_.liveliness_kind;
163 dr_qos.liveliness.lease_duration = opts_.LEASE_DURATION;
164 dr_qos.reliability.kind = opts_.reliability_kind;
165
166 DDS::DomainParticipant_var dp = sub->get_participant();
167 CORBA::String_var tn = topic->get_name();
168 DDS::TopicDescription_var description = dp->lookup_topicdescription(tn);
169 TEST_ASSERT(!CORBA::is_nil(description.in()));
170
171 DDS::DataReader_var rd(sub->create_datareader(description.in(),
172 dr_qos,
173 drl.in(),
174 ::OpenDDS::DCPS::DEFAULT_STATUS_MASK));
175
176 // Initialize the transport configuration for the appropriate entity
177 TEST_ASSERT(!opts_.configuration_str.empty());
178 if (opts_.configuration_str != "none" && opts_.entity_str == "rw")
179 {
180
181 OpenDDS::DCPS::TransportRegistry::instance()->bind_config(opts_.configuration_str,
182 rd.in());
183 if (!opts_.entity_autoenable)
184 {
185 TEST_ASSERT(DDS::RETCODE_OK == rd->enable());
186 }
187 }
188
189 return rd;
190}

Callers 3

PullerMethod · 0.45
ACE_TMAINFunction · 0.45
runMethod · 0.45

Calls 10

instanceFunction · 0.85
get_participantMethod · 0.45
get_nameMethod · 0.45
inMethod · 0.45
create_datareaderMethod · 0.45
emptyMethod · 0.45
bind_configMethod · 0.45
enableMethod · 0.45

Tested by

no test coverage detected