package documentation

Binding declarations: what a Component exposes, written down rather than assembled.

A Binding connects one ROS2 noun (a topic, service, action or node path) to one OPC UA object. It is a frozen dataclass listed on a Component's bindings class attribute; no lifecycle hook is overridden to add a variable. The class attribute is the instance default, so a constructor may compute the list from injected configuration. Every kind that names a ROS2 path says path=. A TOML source unions with the class attribute and a name collision is fatal; neither source may change a Binding the other wrote.

Kinds are named for their OPC UA target, or for the ROS2 side where two kinds share one: MonitoringBinding (topic read into Monitoring variables), KeyedBinding (one member per key of a repeated field), MethodBinding (service), ActionBinding (action as a finite Skill), PublisherBinding (topic published from a Skill), ROS2ParameterBinding (node parameters), LifecycleBinding (lifecycle node behind the StartupSkill) and TFBinding (TF tree as RSL Locations).

A TOML Binding file has one table per kind: monitoring, keyed, method, ros2_parameter, action, tf, publisher and lifecycle. A Component picks the file up through bindings_toml. A name may be declared only once across Python and TOML.

[[monitoring]]
name = "Chatter"
path = "/chatter"
message_type = "std_msgs/msg/String"

[[method]]
name = "AddTwoInts"
path = "/add_two_ints"
service_type = "example_interfaces/srv/AddTwoInts"

A Binding's name becomes a browse name, so an empty name or one that breaks opensmi's browse-name rule ^[A-Z][A-Za-z0-9]*$ is refused with ~opensmi.ros2.server.errors.BindingNameError (a / in a field path stays legal).

Keywords that name Python objects (implementation classes, callables) are Python-only. The loader refuses a TOML value for any field a TOML file cannot produce (opensmi.ros2.server.config.from_dict).

required=True makes the StartupSkill of the declaring item wait until the Binding is satisfied, and halt if its deadline passes first. Every Binding is optional otherwise.

A topic's qos= is a contract. Declared, it is honoured exactly for the life of the endpoint, even when provably incompatible with a publisher (reported, never fatal). Left out on a MonitoringBinding, a profile is discovered: the most permissive one compatible with every publisher. Depth is a separate keyword (opensmi.ros2.runtime.qos). A Monitoring Binding without message_type is the graph-driven case.

Module action A ROS2 action run as a finite Skill.
Module keyed A repeated message field rendered as one member per key.
Module lifecycle A ROS2 lifecycle node behind the StartupSkill.
Module method A ROS2 service called as a Method.
Module monitoring A ROS2 topic read into Monitoring variables.
Module parameter The parameters of a ROS2 node.
Module publisher A ROS2 topic published from a Skill.
Module registry Every Binding kind, the TOML kinds table and the loaders.
Module tf The TF tree as RSL Locations.
Module _base What every Binding kind repeats: the name, the wait, and the checks on both.