| 33 | #include <fstream> |
| 34 | |
| 35 | DDS::DataReader_ptr |
| 36 | create_data_reader(DDS::DomainParticipant_ptr participant, |
| 37 | DDS::Subscriber_ptr subscriber, |
| 38 | const char* type_name, |
| 39 | const char* topic_name, |
| 40 | const DDS::DataReaderQos& dr_qos, |
| 41 | DDS::DataReaderListener_ptr drl) |
| 42 | { |
| 43 | DDS::Topic_var topic = |
| 44 | participant->create_topic(topic_name, |
| 45 | type_name, |
| 46 | TOPIC_QOS_DEFAULT, |
| 47 | DDS::TopicListener::_nil(), |
| 48 | OpenDDS::DCPS::DEFAULT_STATUS_MASK); |
| 49 | if (CORBA::is_nil(topic)) { |
| 50 | ACE_DEBUG((LM_DEBUG, "create_data_reader(): Failed to create topic, name = %C\n", topic_name)); |
| 51 | } |
| 52 | DDS::DataReader_var reader = |
| 53 | subscriber->create_datareader(topic.in(), |
| 54 | dr_qos, |
| 55 | drl, |
| 56 | OpenDDS::DCPS::DEFAULT_STATUS_MASK); |
| 57 | if (CORBA::is_nil(reader)) { |
| 58 | ACE_DEBUG((LM_DEBUG, "create_data_reader(): Failed to create data reader\n")); |
| 59 | } |
| 60 | |
| 61 | return reader._retn(); |
| 62 | } |
| 63 | |
| 64 | int |
| 65 | ACE_TMAIN(int argc, ACE_TCHAR *argv[]) |
no test coverage detected