as2fm.scxml_converter.scxml_entries.scxml_ros_action_server_thread.RosActionThread
- class as2fm.scxml_converter.scxml_entries.scxml_ros_action_server_thread.RosActionThread(action_server: str | RosActionServer, n_threads: int)
Bases:
ScxmlBase
SCXML declaration of a set of threads for executing the action server code.
- __init__(action_server: str | RosActionServer, n_threads: int) None
Initialize a new RosActionThread object.
- Parameters:
action_server – ActionServer declaration, or its alias name.
n_threads – Max. n. of parallel action requests that can be handled.
Methods
__init__
(action_server, n_threads)Initialize a new RosActionThread object.
add_state
(state, *[, initial])Append a state to the list of states of the thread.
as_plain_scxml
(struct_declarations, ...)Convert the ROS-specific entries to be plain SCXML.
as_xml
()Convert the object to an XML element.
check_valid_ros_instantiations
(ros_decls)Check if the object is valid.
from_scxml_file
(_)from_xml_tree
(xml_tree, custom_data_types, ...)External interface to create a ScxmlBase object from an XML tree.
from_xml_tree_impl
(xml_tree, custom_data_types)Create a RosActionThread object from an XML tree.
get_body
()Get the body of the object.
Get the container with custom data types.
get_id
()Get the ID of the object.
Get the tag name of the XML element.
Get the xml_element this object was made from.
Check if the object is compatible with the plain SCXML standard.
set_custom_data_types
(custom_data_types)Save container with custom data types.
set_data_model
(data_model)set_xml_origin
(xml_origin)Set the xml_element this object was made from.
update_bt_ports_values
(bt_ports_handler)Update the values of potential entries making use of BT ports.
- add_state(state: ScxmlState, *, initial: bool = False)
Append a state to the list of states of the thread. If initial is True, set it as the initial state.
- as_plain_scxml(struct_declarations: ScxmlStructDeclarationsContainer | None, ros_declarations: ScxmlRosDeclarationsContainer) List[ScxmlBase]
Convert the ROS-specific entries to be plain SCXML.
This returns a list of ScxmlRoot objects, using ScxmlBase to avoid circular dependencies.
- as_xml() _Element
Convert the object to an XML element.
- check_validity() bool
Check if the object is valid.
- classmethod from_xml_tree(xml_tree: _Element, custom_data_types: Dict[str, StructDefinition], **kwargs) Self
External interface to create a ScxmlBase object from an XML tree.
- classmethod from_xml_tree_impl(xml_tree: _Element, custom_data_types: Dict[str, StructDefinition]) RosActionThread
Create a RosActionThread object from an XML tree.
- get_body()
Get the body of the object.
- get_custom_data_types() Dict[str, StructDefinition]
Get the container with custom data types.
- get_id() str
Get the ID of the object.
- static get_tag_name() str
Get the tag name of the XML element.
- get_xml_origin() _Element | None
Get the xml_element this object was made from.
- is_plain_scxml() bool
Check if the object is compatible with the plain SCXML standard.
- set_custom_data_types(custom_data_types: Dict[str, StructDefinition])
Save container with custom data types.
- set_xml_origin(xml_origin: _Element)
Set the xml_element this object was made from.
- update_bt_ports_values(bt_ports_handler: BtPortsHandler) None
Update the values of potential entries making use of BT ports.