ros2_snapshot.snapshot.builders.topic_builder module
Module for TopicBuilder.
*EntityBuilders, which represent ROS Entities and are responsible for allowing themselves to be populated with basic information and then further populating themselves from that information for the purpose of extracting metamodel instances
- class ros2_snapshot.snapshot.builders.topic_builder.TopicBuilder(name)
Bases:
_EntityBuilderDefine a TopicBuilder.
Represents a ROS Topic and is responsible for allowing itself to be populated with basic information relevant to a Topic and then further populating itself from that information for the purpose of extracting a metamodel instance
- add_node_name(node_name, status)
Associate this Topic with a ROS Node name.
Based on whether it was Published by or Subscribed to by the ROS Node
- Parameters:
node_name (str) – the name of the associated ROS Node
status (str) – the status or relationship (‘published’ or ‘subscribed’) between the Topic and the ROS Node
- property construct_type
Return this Topic’s ROS type.
- Returns:
this Topic’s ROS type
- Return type:
str
- property endpoint_type
Get endpoint type.
- extract_metamodel()
Extract metamodel.
Allows the TopicBuilder to create / extract a Topic instance from its internal state
- Returns:
the created / extracted metamodel instance
- Return type:
- get_verbose_info(info, gid_dict)
Add verbose information to the topic_bank.
- property gid_information
Get GID information.
- property publisher_node_names
Return the names of the ROS Nodes that have Published the Topic.
- Returns:
the names of Publisher ROS Nodes for this Topic
- Return type:
set{str}
- property qos_profile
Get QOS profile.
- set_gid_dict(gid_dict)
Set GID information.
- property subscriber_node_names
Return the names of the subscribed ROS Nodes.
- Returns:
the names of Subscriber ROS Nodes for this Topic
- Return type:
set{str}
- property topic_hash
Get topic hash.