as2fm.scxml_converter.scxml_entries.scxml_ros_timer.RosTimeRate

class as2fm.scxml_converter.scxml_entries.scxml_ros_timer.RosTimeRate(name: str, rate_hz: float)

Bases: RosDeclaration

Object used in the SCXML root to declare a new timer with its related tick rate.

__init__(name: str, rate_hz: float)

Constructor of ROS declaration.

Parameters:
  • interface_name – Comm. interface used by the declared ROS interface.

  • interface_type – ROS type used for communication.

  • interface_alias – Alias for the defined interface, used for ref. by the the handlers

Methods

__init__(name, rate_hz)

Constructor of ROS declaration.

as_plain_scxml(_, __)

Convert the object to its plain SCXML version.

as_xml()

Convert the object to an XML element.

check_valid_instantiation()

Check if the timer has undefined entries (i.e.

check_valid_interface_type()

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, _)

Create a RosTimeRate object from an XML tree.

get_body()

Get the body of the object.

get_communication_interface()

Which communication interface is used by the ROS declaration.

get_custom_data_types()

Get the container with custom data types.

get_id()

Get the ID of the object.

get_interface_name()

Get the name of the ROS comm.

get_interface_type()

Get the ROS type used for communication.

get_name()

Get the alias name of the ROS interface.

get_rate()

get_tag_name()

The xml tag related to the ROS declaration.

get_xml_arg_interface_name()

get_xml_origin()

Get the xml_element this object was made from.

is_plain_scxml()

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

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(_, __) List[ScxmlBase]

Convert the object to its plain SCXML version.

as_xml() _Element

Convert the object to an XML element.

check_valid_instantiation() bool

Check if the timer has undefined entries (i.e. from BT ports).

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, _: Dict[str, StructDefinition]) RosTimeRate

Create a RosTimeRate object from an XML tree.

get_body()

Get the body of the object.

classmethod get_communication_interface() str

Which communication interface is used by the ROS declaration.

Expected values: “service”, “action”

get_custom_data_types() Dict[str, StructDefinition]

Get the container with custom data types.

get_id() str

Get the ID of the object.

get_interface_name() str

Get the name of the ROS comm. interface.

get_interface_type() str

Get the ROS type used for communication.

get_name() str

Get the alias name of the ROS interface.

static get_tag_name() str

The xml tag related to the ROS declaration.

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) None

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