diff --git a/simgear/io/SGDataDistributionService.cxx b/simgear/io/SGDataDistributionService.cxx index 7a2339a2..bc79ab41 100644 --- a/simgear/io/SGDataDistributionService.cxx +++ b/simgear/io/SGDataDistributionService.cxx @@ -53,6 +53,14 @@ SG_DDS::setup( const char *topic, const dds_topic_descriptor_t *desc, const size packet_size = size; } +void +SG_DDS::setup(const dds_topic_descriptor_t *desc, const size_t size) +{ + topic_name = desc->m_typename; + descriptor = desc; + packet_size = size; +} + // If specified as a server (in direction) create a subscriber. // If specified as a client (out direction), create a publisher. bool diff --git a/simgear/io/SGDataDistributionService.hxx b/simgear/io/SGDataDistributionService.hxx index c570d9f6..4e2afad8 100644 --- a/simgear/io/SGDataDistributionService.hxx +++ b/simgear/io/SGDataDistributionService.hxx @@ -60,7 +60,12 @@ public: /** Destructor */ ~SG_DDS(); - // Set the paramaters which weren't available at creation time. + // Set the paramaters which weren't available at creation time and use + // the descrtors typename as topic name. + void setup(const dds_topic_descriptor_t *desc, size_t size); + + // Set the paramaters which weren't available at creation time and use + // a custom topic name. void setup(const char* topic, const dds_topic_descriptor_t *desc, size_t size); // If specified as a server start a publishing participant.