as2fm.scxml_converter.scxml_entries.scxml_data.ScxmlData
- class as2fm.scxml_converter.scxml_entries.scxml_data.ScxmlData(id_: str, expr: BtGetValueInputPort | str | int | float | bool, data_type: str, lower_bound: BtGetValueInputPort | str | int | float | None = None, upper_bound: BtGetValueInputPort | str | int | float | None = None)
Bases:
ScxmlBase
This class represents the variables defined in the model.
- __init__(id_: str, expr: BtGetValueInputPort | str | int | float | bool, data_type: str, lower_bound: BtGetValueInputPort | str | int | float | None = None, upper_bound: BtGetValueInputPort | str | int | float | None = None)
Methods
__init__
(id_, expr, data_type[, ...])Convert the object to its plain SCXML version.
as_xml
([type_as_attribute])Generate the XML element representing the single data entry.
check_valid_bounds
()Check if the object is valid.
from_xml_tree
(xml_tree[, comment_above])Create a ScxmlData object from an XML tree.
get_array_max_size
()get_body
()Get the body of the object.
Get the data model of the object.
get_expr
()get_id
()Get the ID of the object.
get_name
()Get the states of the object.
Get the tag name of the XML element.
get_type
()Get the type of the data as a Python type.
Get the type of the data as a string.
update_bt_ports_values
(bt_ports_handler)Update the values of potential entries making use of BT ports.
- as_plain_scxml(_)
Convert the object to its plain SCXML version.
- as_xml(type_as_attribute: bool = True) Element
Generate the XML element representing the single data entry.
- Parameters:
type_as_attribute – If True, the type of the data is added as an attribute.
- check_validity() bool
Check if the object is valid.
- static from_xml_tree(xml_tree: Element, comment_above: str | None = None) ScxmlData
Create a ScxmlData 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.
- get_type() type
Get the type of the data as a Python type.
- get_type_str() str
Get the type of the data as a string.
- update_bt_ports_values(bt_ports_handler: BtPortsHandler)
Update the values of potential entries making use of BT ports.