Skip to content

Commit 6ca558c

Browse files
Fix HelloWorld example with TopicDataType refactored code (#183)
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
1 parent b6f66ca commit 6ca558c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

fastdds_python_examples/HelloWorldExample/HelloWorldExample.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ def __init__(self, domain):
7070
self.participant = factory.create_participant(domain, self.participant_qos)
7171

7272
self.topic_data_type = HelloWorld.HelloWorldPubSubType()
73-
self.topic_data_type.setName("HelloWorldDataType")
73+
self.topic_data_type.set_name("HelloWorldDataType")
7474
self.type_support = fastdds.TypeSupport(self.topic_data_type)
7575
self.participant.register_type(self.type_support)
7676

7777
self.topic_qos = fastdds.TopicQos()
7878
self.participant.get_default_topic_qos(self.topic_qos)
79-
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.getName(), self.topic_qos)
79+
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.get_name(), self.topic_qos)
8080

8181
self.subscriber_qos = fastdds.SubscriberQos()
8282
self.participant.get_default_subscriber_qos(self.subscriber_qos)
@@ -110,13 +110,13 @@ def __init__(self, domain, machine):
110110
self.participant = factory.create_participant(domain, self.participant_qos)
111111

112112
self.topic_data_type = HelloWorld.HelloWorldPubSubType()
113-
self.topic_data_type.setName("HelloWorldDataType")
113+
self.topic_data_type.set_name("HelloWorldDataType")
114114
self.type_support = fastdds.TypeSupport(self.topic_data_type)
115115
self.participant.register_type(self.type_support)
116116

117117
self.topic_qos = fastdds.TopicQos()
118118
self.participant.get_default_topic_qos(self.topic_qos)
119-
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.getName(), self.topic_qos)
119+
self.topic = self.participant.create_topic("myTopic", self.topic_data_type.get_name(), self.topic_qos)
120120

121121
self.publisher_qos = fastdds.PublisherQos()
122122
self.participant.get_default_publisher_qos(self.publisher_qos)

0 commit comments

Comments
 (0)