as2fm.scxml_converter.scxml_entries.scxml_data_model.ScxmlDataModel
- class as2fm.scxml_converter.scxml_entries.scxml_data_model.ScxmlDataModel(data_entries: List[ScxmlData] | None = None)
Bases:
ScxmlBase
This class represents the variables defined in the model.
Methods
__init__
([data_entries])as_plain_scxml
(ros_declarations)Convert the object to its plain SCXML version.
as_xml
([type_as_attribute])Store the datamodel, containing all model's data entries, as an XML element.
Check if the object is valid.
from_xml_tree
(xml_tree)Create a ScxmlDataModel object from an XML tree.
get_body
()Get the body of the object.
get_data_entries
()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.
update_bt_ports_values
(bt_ports_handler)Update the values of potential entries making use of BT ports.
- as_xml(type_as_attribute: bool = True) Element | None
Store the datamodel, containing all model’s data entries, as an XML element.
- Parameters:
type_as_attribute – If True, store data types as arguments, if False as Comments
- check_validity() bool
Check if the object is valid.
- static from_xml_tree(xml_tree: Element) ScxmlDataModel
Create a ScxmlDataModel 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)
Update the values of potential entries making use of BT ports.