| 65 | } |
| 66 | |
| 67 | DDS::Publisher* |
| 68 | OpenDDS::Model::Delegate::createPublisher( |
| 69 | DDS::DomainParticipant* participant, |
| 70 | const DDS::PublisherQos& publisherQos, |
| 71 | DDS::StatusMask mask, |
| 72 | const OPENDDS_STRING& transportConfig) |
| 73 | { |
| 74 | DDS::Publisher* publisher |
| 75 | = participant->create_publisher( |
| 76 | publisherQos, |
| 77 | DDS::PublisherListener::_nil(), |
| 78 | mask |
| 79 | ); |
| 80 | if( !publisher) { |
| 81 | return 0; |
| 82 | } |
| 83 | |
| 84 | // If the modeler specified a transport config, bind to it |
| 85 | if (!transportConfig.empty()) { |
| 86 | try { |
| 87 | TheTransportRegistry->bind_config(transportConfig, publisher); |
| 88 | } catch (OpenDDS::DCPS::Transport::Exception&) { |
| 89 | participant->delete_publisher(publisher); |
| 90 | return 0; |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | return publisher; |
| 95 | } |
| 96 | |
| 97 | DDS::Subscriber* |
| 98 | OpenDDS::Model::Delegate::createSubscriber( |
no test coverage detected