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

Method create_recorder

dds/DCPS/DomainParticipantImpl.cpp:2182–2225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2180}
2181
2182Recorder_ptr
2183DomainParticipantImpl::create_recorder(DDS::Topic_ptr a_topic,
2184 const DDS::SubscriberQos& subscriber_qos,
2185 const DDS::DataReaderQos& datareader_qos,
2186 const RecorderListener_rch& a_listener,
2187 DDS::StatusMask mask)
2188{
2189 if (CORBA::is_nil(a_topic)) {
2190 if (DCPS_debug_level > 0) {
2191 ACE_ERROR((LM_ERROR,
2192 ACE_TEXT("(%P|%t) ERROR: ")
2193 ACE_TEXT("DomainParticipantImpl::create_recorder, ")
2194 ACE_TEXT("topic desc is nil.\n")));
2195 }
2196 return 0;
2197 }
2198
2199 DDS::SubscriberQos sub_qos = subscriber_qos;
2200 DDS::DataReaderQos dr_qos;
2201
2202 if (! this->validate_subscriber_qos(sub_qos) ||
2203 ! SubscriberImpl::validate_datareader_qos(datareader_qos,
2204 TheServiceParticipant->initial_DataReaderQos(),
2205 a_topic,
2206 dr_qos, false) ) {
2207 return 0;
2208 }
2209
2210 RecorderImpl* recorder(new RecorderImpl);
2211 Recorder_var result(recorder);
2212
2213 recorder->init(dynamic_cast<TopicDescriptionImpl*>(a_topic),
2214 dr_qos, a_listener,
2215 mask, this, sub_qos);
2216
2217 if (enabled_ && qos_.entity_factory.autoenable_created_entities) {
2218 recorder->enable();
2219 }
2220
2221 ACE_Guard<ACE_Recursive_Thread_Mutex> guard(recorders_protector_);
2222 recorders_.insert(result);
2223
2224 return result._retn();
2225}
2226
2227Replayer_ptr
2228DomainParticipantImpl::create_replayer(DDS::Topic_ptr a_topic,

Callers

nothing calls this directly

Calls 5

initMethod · 0.45
enableMethod · 0.45
insertMethod · 0.45
_retnMethod · 0.45

Tested by

no test coverage detected