as2fm.scxml_converter.scxml_entries.scxml_bt_ticks.BtTick

class as2fm.scxml_converter.scxml_entries.scxml_bt_ticks.BtTick(target: str, condition: str | None = None, body: List[ScxmlAssign | ScxmlIf | ScxmlSend] | None = None)

Bases: ScxmlTransition

Process a BT plugin/control node tick, triggering the related transition.

__init__(target: str, condition: str | None = None, body: List[ScxmlAssign | ScxmlIf | ScxmlSend] | None = None)

Generate a new transition. Currently, transitions must have a target.

Parameters:
  • target – The state transition goes to. Required (unlike in SCXML specifications)

  • events – The events that trigger this transition.

  • condition – The condition guard to enable/disable the transition

  • body – Content that is executed when the transition happens

Methods

__init__(target[, condition, body])

Generate a new transition.

add_event(event)

append_body_executable_entry(exec_entry)

as_plain_scxml(ros_declarations)

Convert the object to its plain SCXML version.

as_xml()

Convert the object to an XML element.

check_valid_ros_instantiations(ros_declarations)

Check if the ros instantiations have been declared.

check_validity()

Check if the object is valid.

from_xml_tree(xml_tree)

Create a ScxmlTransition object from an XML tree.

get_body()

Return the executable content of this transition.

get_condition()

Return the condition required to execute this transition (if any).

get_data_model()

Get the data model of the object.

get_events()

Return the events that trigger this transition (if any).

get_id()

Get the ID of the object.

get_states()

Get the states of the object.

get_tag_name()

Get the tag name of the XML element.

get_target_state_id()

Return the ID of the target state of this transition.

instantiate_bt_events(instance_id, children_ids)

Instantiate the BT events of this transition.

set_body(body)

Set the body of this transition.

set_thread_id(thread_id)

Set the thread ID for the executable entries of this transition.

update_bt_ports_values(bt_ports_handler)

Update the values of potential entries making use of BT ports.

as_plain_scxml(ros_declarations: ScxmlRosDeclarationsContainer) ScxmlTransition

Convert the object to its plain SCXML version.

as_xml() Element

Convert the object to an XML element.

check_valid_ros_instantiations(ros_declarations: ScxmlRosDeclarationsContainer) bool

Check if the ros instantiations have been declared.

check_validity() bool

Check if the object is valid.

static from_xml_tree(xml_tree: Element) BtTick

Create a ScxmlTransition object from an XML tree.

get_body() List[ScxmlAssign | ScxmlIf | ScxmlSend]

Return the executable content of this transition.

get_condition() str | None

Return the condition required to execute this transition (if any).

get_data_model()

Get the data model of the object.

get_events() List[str]

Return the events that trigger this transition (if any).

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.

get_target_state_id() str

Return the ID of the target state of this transition.

instantiate_bt_events(instance_id: int, children_ids: List[int]) List[ScxmlTransition]

Instantiate the BT events of this transition.

set_body(body: List[ScxmlAssign | ScxmlIf | ScxmlSend]) None

Set the body of this transition.

set_thread_id(thread_id: int) None

Set the thread ID for the executable entries of this transition.

update_bt_ports_values(bt_ports_handler: BtPortsHandler) None

Update the values of potential entries making use of BT ports.