* @brief Construct a test system from the command line. */
| 14 | * @brief Construct a test system from the command line. |
| 15 | */ |
| 16 | TestSystem::TestSystem( int argc, ACE_TCHAR** argv, char** envp) |
| 17 | : config_( argc, argv, envp) |
| 18 | , subscriberParticipant_(0) |
| 19 | , publisherParticipant_(0) |
| 20 | , subscriber_(0) |
| 21 | , publisher_(0) |
| 22 | , readerTopic_(0) |
| 23 | , writerTopic_(0) |
| 24 | , dataReader_(0) |
| 25 | , dataWriter_(0) |
| 26 | , listener_(0) |
| 27 | , transport_() |
| 28 | { |
| 29 | // Grab a local reference to the factory to ensure that we perform the |
| 30 | // operations - they should not get optimized away! Note that this |
| 31 | // passes the arguments to the ORB initialization first, then strips |
| 32 | // the DCPS arguments. |
| 33 | ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) %T INFO: initializing the service.%d\n"), this->config_.infoRepoIorSize())); |
| 34 | ::DDS::DomainParticipantFactory_var factory = TheParticipantFactoryWithArgs( argc, argv); |
| 35 | |
| 36 | // We only need to do loading and binding if we receive InfoRepo IOR |
| 37 | // values on the command line - otherwise this is done during |
| 38 | // configuration file processing. |
| 39 | if( this->config_.infoRepoIorSize() > 0) { |
| 40 | |
| 41 | ACE_DEBUG((LM_DEBUG, |
| 42 | ACE_TEXT("(%P|%t) %T INFO: loading repository %C.\n"), |
| 43 | OpenDDS::DCPS::Discovery::DEFAULT_REPO |
| 44 | )); |
| 45 | TheServiceParticipant->set_repo_ior( this->config_.infoRepoIor().c_str()); |
| 46 | |
| 47 | ACE_DEBUG((LM_DEBUG, |
| 48 | ACE_TEXT("(%P|%t) %T INFO: binding subscriber domain to repository %C.\n"), |
| 49 | OpenDDS::DCPS::Discovery::DEFAULT_REPO |
| 50 | )); |
| 51 | TheServiceParticipant->set_repo_domain( |
| 52 | this->config_.subscriberDomain(), |
| 53 | OpenDDS::DCPS::Discovery::DEFAULT_REPO |
| 54 | ); |
| 55 | |
| 56 | ACE_DEBUG((LM_DEBUG, |
| 57 | ACE_TEXT("(%P|%t) %T INFO: binding publisher domain to repository %C.\n"), |
| 58 | OpenDDS::DCPS::Discovery::DEFAULT_REPO |
| 59 | )); |
| 60 | TheServiceParticipant->set_repo_domain( |
| 61 | this->config_.publisherDomain(), |
| 62 | OpenDDS::DCPS::Discovery::DEFAULT_REPO |
| 63 | ); |
| 64 | |
| 65 | #if 1 |
| 66 | TheServiceParticipant->monitor_factory_->initialize(); |
| 67 | #endif |
| 68 | } |
| 69 | |
| 70 | // |
| 71 | // Establish a DomainParticipant for the subscription domain. |
| 72 | // |
| 73 |
nothing calls this directly
no test coverage detected