Skip to content

Commit

Permalink
Fix HelloWorld example with TopicDataType refactored code (#183)
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso authored Aug 21, 2024
1 parent b6f66ca commit 6ca558c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ def __init__(self, domain):
self.participant = factory.create_participant(domain, self.participant_qos)

self.topic_data_type = HelloWorld.HelloWorldPubSubType()
self.topic_data_type.setName("HelloWorldDataType")
self.topic_data_type.set_name("HelloWorldDataType")
self.type_support = fastdds.TypeSupport(self.topic_data_type)
self.participant.register_type(self.type_support)

self.topic_qos = fastdds.TopicQos()
self.participant.get_default_topic_qos(self.topic_qos)
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.getName(), self.topic_qos)
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.get_name(), self.topic_qos)

self.subscriber_qos = fastdds.SubscriberQos()
self.participant.get_default_subscriber_qos(self.subscriber_qos)
Expand Down Expand Up @@ -110,13 +110,13 @@ def __init__(self, domain, machine):
self.participant = factory.create_participant(domain, self.participant_qos)

self.topic_data_type = HelloWorld.HelloWorldPubSubType()
self.topic_data_type.setName("HelloWorldDataType")
self.topic_data_type.set_name("HelloWorldDataType")
self.type_support = fastdds.TypeSupport(self.topic_data_type)
self.participant.register_type(self.type_support)

self.topic_qos = fastdds.TopicQos()
self.participant.get_default_topic_qos(self.topic_qos)
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.getName(), self.topic_qos)
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.get_name(), self.topic_qos)

self.publisher_qos = fastdds.PublisherQos()
self.participant.get_default_publisher_qos(self.publisher_qos)
Expand Down

0 comments on commit 6ca558c

Please sign in to comment.