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
(ros_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)Create a RosActionThread object from an XML tree.
get_body
()Get the body of the object.
Get the data model of the object.
get_id
()Get the ID of the object.
Get the states of the object.
Get the tag name of the XML element.
set_data_model
(data_model)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(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.
- static from_xml_tree(xml_tree: Element) RosActionThread
Create a RosActionThread object from an XML tree.
- get_body()
Get the body of the object.
- get_data_model()
Get the data model of the object.
- get_id() str
Get the ID of the object.
- get_states()
Get the states of the object.
- static get_tag_name() str
Get the tag name of the XML element.
- update_bt_ports_values(bt_ports_handler: BtPortsHandler) None
Update the values of potential entries making use of BT ports.