class LifecycleBinding(AwaitedBinding):
A ROS2 lifecycle node driving the declaring Component's StartupSkill.
A managed node's state machine and the continuous-skill state machine are the same, so this lands on the StartupSkill opensmi already has. Halted, Ready and Running are unconfigured, inactive and active. The triggers reset, start and halt send configure, activate and deactivate then cleanup. halt is never shutdown, because finalized is terminal and the Skill could not be Reset. There is no suspend, since the StartupSkill is not suspendable.
The Binding is two-way. Transitions somebody else caused move the Skill, downward only, because starting is a client-driven contract. Several of these on one Component drive the one StartupSkill, with a lowest-wins aggregate: Running means every node is active.
The coordinator flavour is a ~opensmi.ros2.server.drivers.LifecycleDriver (the standard
lifecycle_msgs services, or a nav2-style manager), and the OPC UA surface is the same for each.
| Method | __post |
Refuse a declaration that names a coordinator that cannot be built. |
| Class Variable | kind |
Undocumented |
| Instance Variable | call |
Seconds to wait for an answer once the request has gone. |
| Instance Variable | depth |
The ROS2 queue depth of the transition_event subscription of each node. |
| Instance Variable | driver |
The coordinator flavour: a name in ~opensmi.ros2.server.drivers.DRIVERS (lifecycle, the ROS2 standard, or nav2) or a subclass of ~opensmi.ros2.server.drivers.LifecycleDriver. A Binding file gives a name; a machine file can give a class as ... |
| Instance Variable | name |
The Binding's name. It is not a Skill name (the Skill is the Component's StartupSkill); it keeps declarations apart, prefixes this Binding's variables and names the BindingEvent source. |
| Instance Variable | nodes |
The lifecycle nodes observed and gated on, when path is a coordinator. Empty for the standard flavour; required (fatal at init if empty) for a flavour that coordinates a set. |
| Instance Variable | path |
The ROS2 node this declaration commands through: the managed node itself for the standard flavour, the manager for a nav2-style one. |
| Instance Variable | required |
Whether the StartupSkill waits for its nodes to be on the graph before Running. A managed node is present when it publishes transition_event, so a finalized node still counts. |
| Instance Variable | server |
Seconds a question or command waits for the node's services before giving up on that attempt. A node that is off is a runtime condition and the next appearance looks again. |
| Instance Variable | startup |
Seconds that wait lasts, or None for the deployment's default. Refused when the Binding is constructed without required. |
| Property | driver |
Return the Driver class driver selects, looking a name up in the registry. |
| Property | needs |
Return False; whether a node is there comes from transition_event match events. |
| Property | observed |
Return the lifecycle nodes this Binding follows: nodes, or path when that is empty. |
Refuse a declaration that names a coordinator that cannot be built.
| Raises | |
ImplementationClassError | When driver is a class that is not a LifecycleDriver subclass. |
DeclarationError | When driver names no registered flavour, or a flavour whose path is a coordinator is given no nodes to drive. |
RequiredDeclarationError | When startup_timeout is declared without required, or is not positive. |
The coordinator flavour: a name in ~opensmi.ros2.server.drivers.DRIVERS
(lifecycle, the ROS2 standard, or nav2) or a subclass of
~opensmi.ros2.server.drivers.LifecycleDriver. A Binding file gives a name; a machine
file can give a class as driver_type, by import path. Fatal at init when it is neither.
The Binding's name. It is not a Skill name (the Skill is the Component's StartupSkill); it keeps declarations apart, prefixes this Binding's variables and names the BindingEvent source.
The lifecycle nodes observed and gated on, when path is a coordinator. Empty for the standard flavour; required (fatal at init if empty) for a flavour that coordinates a set.
The ROS2 node this declaration commands through: the managed node itself for the standard flavour, the manager for a nav2-style one.
Whether the StartupSkill waits for its nodes to be on the graph before Running. A managed node is present when it publishes transition_event, so a finalized node still counts.
Seconds a question or command waits for the node's services before giving up on that attempt. A node that is off is a runtime condition and the next appearance looks again.
Seconds that wait lasts, or None for the deployment's default. Refused when the Binding is constructed without required.