| 153 | } |
| 154 | |
| 155 | void Test::create_topic(const char* type_name, const Dri& dri) |
| 156 | { |
| 157 | topic_name_ = std::string(type_name) + " Topic"; |
| 158 | if (dri.size()) { topic_name_ += " " + to_string(dri); } |
| 159 | DDS::TopicQos qos; |
| 160 | if (participant_->get_default_topic_qos(qos) == DDS::RETCODE_OK) { |
| 161 | dr_to_qos(dri, qos.representation); |
| 162 | topic_ = participant_->create_topic(topic_name_.c_str(), type_name, qos, 0, DEFAULT_STATUS_MASK); |
| 163 | ACE_DEBUG((LM_INFO, ACE_TEXT("INFO: create_topic[%C]\n"), topic_name_.c_str())); |
| 164 | } else { ACE_ERROR((LM_ERROR, ACE_TEXT("ERROR: get_default_topic_qos failed!\n"))); } |
| 165 | } |
| 166 | |
| 167 | DDS::DataWriter* Test::create_writer(const Dri& dri) |
| 168 | { |