ros2_snapshot.snapshot.builders.service_builder module

Module for ServiceBuilder.

*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.service_builder.ServiceBuilder(name)

Bases: _EntityBuilder

Define a ServiceBuilder.

Represents a ROS Service and is responsible for allowing itself to be populated with basic information relevant to a Service and then further populating itself from that information for the purpose of extracting a metamodel instance

add_service_provider_node_name(service_provider_node_name)

Add service provider node name.

Adds an association between a Service Provider ROS Node’s name and this Action

Parameters:

service_provider_node_name (str) – the Service Provider ROS Node name to associate with this Action

property construct_type

Return the Service’s ROS type.

Returns:

the Service’s ROS type

Return type:

str

extract_metamodel()

Extract metamodel.

Allows the ServiceBuilder to create / extract a Service instance from its internal state

Returns:

the created / extracted metamodel instance

Return type:

Service

property service_provider_node_names

Return the names of the ROS Nodes that act as Providers.

Returns:

the names of the Service Provider ROS Nodes

Return type:

set{str}