| 142 | |
| 143 | |
| 144 | int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) |
| 145 | { |
| 146 | u_long mask = ACE_LOG_MSG->priority_mask(ACE_Log_Msg::PROCESS); |
| 147 | ACE_LOG_MSG->priority_mask(mask | LM_TRACE | LM_DEBUG, ACE_Log_Msg::PROCESS); |
| 148 | |
| 149 | ACE_DEBUG((LM_DEBUG,"(%P|%t) view_state test main\n")); |
| 150 | try |
| 151 | { |
| 152 | ::DDS::DomainParticipantFactory_var dpf = TheParticipantFactoryWithArgs(argc, argv); |
| 153 | if (CORBA::is_nil (dpf.in ())) |
| 154 | { |
| 155 | ACE_ERROR ((LM_ERROR, |
| 156 | ACE_TEXT("(%P|%t) creating the DomainParticipantFactory failed.\n"))); |
| 157 | return 1 ; |
| 158 | } |
| 159 | |
| 160 | // let the Service_Participant (in above line) strip out -DCPSxxx parameters |
| 161 | // and then get application specific parameters. |
| 162 | parse_args (argc, argv); |
| 163 | |
| 164 | { //xxx dp scope |
| 165 | ::DDS::DomainParticipant_var dp = |
| 166 | dpf->create_participant(MY_DOMAIN, |
| 167 | PARTICIPANT_QOS_DEFAULT, |
| 168 | ::DDS::DomainParticipantListener::_nil(), |
| 169 | ::OpenDDS::DCPS::DEFAULT_STATUS_MASK); |
| 170 | //xxx obj rc = 3 |
| 171 | if (CORBA::is_nil (dp.in ())) |
| 172 | { |
| 173 | ACE_ERROR ((LM_ERROR, |
| 174 | ACE_TEXT("(%P|%t) create_participant failed.\n"))); |
| 175 | return 1 ; |
| 176 | } |
| 177 | |
| 178 | Test::SimpleTypeSupport_var fts = new Test::SimpleTypeSupportImpl(); |
| 179 | |
| 180 | if (::DDS::RETCODE_OK != fts->register_type(dp.in (), MY_TYPE)) |
| 181 | { |
| 182 | ACE_ERROR ((LM_ERROR, |
| 183 | ACE_TEXT ("Failed to register the SimpleTypeSupport."))); |
| 184 | return 1; |
| 185 | } |
| 186 | |
| 187 | |
| 188 | ::DDS::TopicQos topic_qos; |
| 189 | dp->get_default_topic_qos(topic_qos); |
| 190 | |
| 191 | topic_qos.history.kind = ::DDS::KEEP_LAST_HISTORY_QOS; |
| 192 | topic_qos.history.depth = history_depth; |
| 193 | topic_qos.resource_limits.max_samples_per_instance = |
| 194 | max_samples_per_instance ; |
| 195 | |
| 196 | |
| 197 | ::DDS::Topic_var topic = |
| 198 | dp->create_topic (MY_TOPIC, |
| 199 | MY_TYPE, |
| 200 | topic_qos, |
| 201 | ::DDS::TopicListener::_nil(), |
nothing calls this directly
no test coverage detected