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

Method Subscriber

tests/DCPS/Federation/Subscriber.cpp:14–174  ·  view source on GitHub ↗

* @brief Construct a test system from the command line. */

Source from the content-addressed store, hash-verified

12 * @brief Construct a test system from the command line.
13 */
14Subscriber::Subscriber( int argc, ACE_TCHAR** argv, char** envp)
15 : config_( argc, argv, envp),
16 sync_( 0)
17{
18 // Grab a local reference to the factory
19 ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) INFO: initializing the subscriber.\n")));
20 ::DDS::DomainParticipantFactory_var factory = TheParticipantFactoryWithArgs( argc, argv);
21
22 if( OpenDDS::DCPS::DCPS_debug_level > 0) {
23 ACE_DEBUG((LM_DEBUG,
24 ACE_TEXT("(%P|%t) COMMANDLINE: Verbose == %C\n")
25 ACE_TEXT("(%P|%t) COMMANDLINE: Samples == %d\n"),
26 (this->config_.verbose()? "true": "false"),
27 this->config_.samples()
28 ));
29 }
30
31#if 1
32 TheServiceParticipant->monitor_factory_->initialize();
33#endif
34
35 //
36 // Establish DomainParticipant
37 //
38 if( OpenDDS::DCPS::DCPS_debug_level > 0) {
39 ACE_DEBUG((LM_DEBUG,
40 ACE_TEXT("(%P|%t) INFO: creating subscriber participant in domain %d.\n"),
41 this->config_.domain()
42 ));
43 }
44 this->participant_ = factory->create_participant(
45 this->config_.domain(),
46 PARTICIPANT_QOS_DEFAULT,
47 ::DDS::DomainParticipantListener::_nil(),
48 ::OpenDDS::DCPS::DEFAULT_STATUS_MASK
49 );
50 if( CORBA::is_nil (this->participant_.in())) {
51 ACE_ERROR ((LM_ERROR,
52 ACE_TEXT("(%P|%t) ERROR: create_participant failed for ")
53 ACE_TEXT("subscriber in domain %d.\n"),
54 this->config_.domain()
55 ));
56 throw BadParticipantException ();
57 }
58
59 //
60 // Grab and install the transport implementation.
61 //
62
63 // Establish debug level.
64 if( this->config_.verbose()) {
65 TURN_ON_VERBOSE_DEBUG;
66 }
67
68 //
69 // Establish the listener
70 //
71

Callers

nothing calls this directly

Calls 15

topicNameMethod · 0.80
TestExceptionClass · 0.70
BadTopicExceptionClass · 0.70
BadReaderExceptionClass · 0.70
verboseMethod · 0.45
samplesMethod · 0.45
initializeMethod · 0.45
domainMethod · 0.45

Tested by

no test coverage detected