-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Has any thought been given to developing an idiomatic Python API for Fast DDS? The API requires a coding style that is fairly unnatural in Python.
Some examples:
Accessing instance variables on objects:
# not idiomatic
data.message()
self.topic_data_type.getName()
# idiomatic
data.message
self.topic_data_type.nameSetting instance variables on objects:
# not idiomatic
data.message("Hello World")
self.topic_data_type.setName("HelloWorld") # p.s., why does this one use "set" and other doesn't?
# idiomatic
data.message = "Hello World"
self.topic_data_type.name = "HelloWorld"Passing objects by reference to have them initialized:
# not idiomatic
info = fastdds.SampleInfo()
data = HelloWorld.HelloWorld()
reader.take_next_sample(data, info)
# idiomatic
data, info = reader.take_next_sample()
# not idiomatic
self.subscriber_qos = fastdds.SubscriberQos()
self.participant.get_default_subscriber_qos(self.subscriber_qos)
# idiomatic, kind of?
self.subscriber_qos = self.participant.create_subscriber_qos()
self.subscriber_qos = fastdds.SubscriberQos.create_from(self.participant)Manual management of resources:
# not idiomatic
factory = fastdds.DomainParticipantFactory.get_instance()
self.participant.delete_contained_entities()
factory.delete_participant(self.participant)
# idiomatic, often happens implicitly
del self.participantdohunnim
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request