as2fm.scxml_converter.scxml_entries.scxml_param.ScxmlParam

class as2fm.scxml_converter.scxml_entries.scxml_param.ScxmlParam(name: str, *, expr: BtGetValueInputPort | str | None = None, location: str | None = None, cb_type: CallbackType | None = None)

Bases: ScxmlBase

This class represents a single parameter.

__init__(name: str, *, expr: BtGetValueInputPort | str | None = None, location: str | None = None, cb_type: CallbackType | None = None)

Initialize the SCXML Parameter object.

The ‘location’ entry is kept for consistency, but using expr achieves the same result.

Parameters:
  • name – The name of the parameter.

  • expr – The expression to assign to the parameter. Can come from a BT port.

  • location – The expression to assign to the parameter, if that’s a data variable.

Methods

__init__(name, *[, expr, location, cb_type])

Initialize the SCXML Parameter object.

as_plain_scxml(struct_declarations, _)

Convert the object to its plain SCXML version.

as_xml()

Convert the object to an XML element.

check_validity()

Check if the object 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 ScxmlParam object from an XML tree.

get_body()

Get the body of the object.

get_custom_data_types()

Get the container with custom data types.

get_expr()

get_expr_or_location()

Return either the expr or location argument, depending on which one is None.

get_id()

Get the ID of the object.

get_name()

get_tag_name()

Get the tag name of the XML element.

get_xml_origin()

Get the xml_element this object was made from.

has_bt_blackboard_input(bt_ports_handler)

is_plain_scxml()

Check if the object is compatible with the plain SCXML standard.

set_callback_type(cb_type)

set_custom_data_types(custom_data_types)

Save container with custom data types.

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, _) List[ScxmlParam]

Convert the object to its plain SCXML version.

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]) ScxmlParam

Create a ScxmlParam 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_expr_or_location() str

Return either the expr or location argument, depending on which one is None.

Ensures that at least one is valid.

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)

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