as2fm.jani_generator.ros_helpers.ros_action_handler.RosActionHandler

class as2fm.jani_generator.ros_helpers.ros_action_handler.RosActionHandler

Bases: RosCommunicationHandler

Object storing the declarations related to a ROS Action and creating an handler for them.

__init__()

Initialize the object completely empty.

Methods

__init__()

Initialize the object completely empty.

add_client(interface_name, interface_type, ...)

Set the client of the service.

get_interface_prefix()

Get the prefix used for the interface.

set_server(interface_name, interface_type, ...)

Set the server of the ROS interface.

to_scxml()

Generate the srv_handler automaton that implements the link between the server of this service and its clients.

add_client(interface_name: str, interface_type: str, automaton_name: str) None

Set the client of the service. There must be one or more.

Interface_name:

The name of the ROS interface.

Interface_type:

The type of the ROS interface (e.g. std_srvs/SetBool).

Automaton_name:

The name of the JANI automaton that implements this client.

static get_interface_prefix() str

Get the prefix used for the interface.

Returns:

The prefix used for the interface.

set_server(interface_name: str, interface_type: str, automaton_name: str) None

Set the server of the ROS interface. There must be exactly one.

Interface_name:

The name of the ROS interface.

Interface_type:

The type of the ROS interface (e.g. std_srvs/SetBool).

Automaton_name:

The name of the JANI automaton that implements this server.

to_scxml() ScxmlRoot

Generate the srv_handler automaton that implements the link between the server of this service and its clients. This ensures that only one request can be processed at the time and that the client receives only the response related to it’s request.

Returns:

Scxml object representing the necessary file content.