Add a setup function which takes the topic name from the descriptors typename
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user