as2fm.scxml_converter.scxml_entries.scxml_transition_target.ScxmlTransitionTarget

class as2fm.scxml_converter.scxml_entries.scxml_transition_target.ScxmlTransitionTarget(target_id: str, probability: float | None = None, body: List[ScxmlAssign | ScxmlIf | ScxmlSend] | None = None)

Bases: ScxmlBase

This class represents a single scxml transition target.

__init__(target_id: str, probability: float | None = None, body: List[ScxmlAssign | ScxmlIf | ScxmlSend] | None = None)

Generate a new transition target, including its execution body and probability.

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

  • probability – The likelihood of taking this target what the transition is selected.

  • body – Content that is executed when the transition happens.

Methods

__init__(target_id[, probability, body])

Generate a new transition target, including its execution body and probability.

append_body_executable_entry(exec_entry)

as_plain_scxml(struct_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()

Make sure the object content is valid.

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 ScxmlTransitionTarget object from an XML tree.

get_body()

Return the executable content of this transition.

get_custom_data_types()

Get the container with custom data types.

get_id()

Get the ID of the object.

get_probability()

Return the probability of the target state of this transition.

get_tag_name()

Get the tag name of the XML element.

get_target_id()

Return the ID of the target state of this transition.

get_xml_origin()

Get the xml_element this object was made from.

has_bt_blackboard_input(bt_ports_handler)

instantiate_bt_events(instance_id, children_ids)

Instantiate the BT events in the object's body.

is_plain_scxml()

Check if the transition is a plain scxml entry and contains only plain scxml.

set_body(body)

Set the body of this transition.

set_callback_type(cb_type)

Configure the callback type associated to this transition_target instance.

set_custom_data_types(custom_data_types)

Save container with custom data types.

set_probability(probability)

Set the probability of the target state of this transition.

set_target_id(state_id)

Set the ID of the target state of this transition.

set_thread_id(thread_id)

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

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.

as_plain_scxml(struct_declarations: ScxmlStructDeclarationsContainer, ros_declarations: ScxmlRosDeclarationsContainer) List[ScxmlTransitionTarget]

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

Make sure the object content 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]) ScxmlTransitionTarget

Create a ScxmlTransitionTarget object from an XML tree.

get_body() List[ScxmlAssign | ScxmlIf | ScxmlSend]

Return the executable content of this transition.

get_custom_data_types() Dict[str, StructDefinition]

Get the container with custom data types.

get_id() str

Get the ID of the object.

get_probability() float | None

Return the probability of the target state of this transition.

static get_tag_name() str

Get the tag name of the XML element.

get_target_id() str

Return the ID of the target state of this transition.

get_xml_origin() _Element | None

Get the xml_element this object was made from.

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

Instantiate the BT events in the object’s body.

is_plain_scxml() bool

Check if the transition is a plain scxml entry and contains only plain scxml.

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

Set the body of this transition.

set_callback_type(cb_type: CallbackType)

Configure the callback type associated to this transition_target instance.

set_custom_data_types(custom_data_types: Dict[str, StructDefinition])

Save container with custom data types.

set_probability(probability: float)

Set the probability of the target state of this transition.

set_target_id(state_id: str)

Set the ID of the target state of this transition.

set_thread_id(thread_id: int) None

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

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.