as2fm.scxml_converter.scxml_entries.type_utils.ScxmlStructDeclarationsContainer
- class as2fm.scxml_converter.scxml_entries.type_utils.ScxmlStructDeclarationsContainer(automaton_name: str, data_model, struct_definitions: Dict[str, StructDefinition])
Bases:
object
Object containing all the type-related information needed when generating the plain-SCXML model.
In this class, we hold all the information about: * Data variables and related type * Events and related types * ROS Services and Actions * Timer callbacks
- __init__(automaton_name: str, data_model, struct_definitions: Dict[str, StructDefinition])
Methods
__init__
(automaton_name, data_model, ...)get_data_type
(variable_name, elem)Retrieve the type of a variable.
- get_data_type(variable_name: str, elem) Tuple[StructDefinition | str, ArrayInfo | None]
Retrieve the type of a variable.
Used, when trying to assign to it.
e.g. x => (‘int32’, None)` <– retrieve from dict e.g. xs => (‘int32’, ArrayInfo)` <– retrieve from dict e.g. xs[1] => (‘int32’, None)` <- handle specially
e.g. a_point => (StructDefinition(Point2D), None)` <– retrieve from dict e.g. polygon.points => (StructDefinition(Point2D), ArrayInfo) <- ??? e.g. polygon.points[1] => (StructDefinition(Point2D), None) <- ??? e.g. polygon.points[1].x => (int32, None) <- ???