package documentation

The portable half: the Runtime, the sole owner of ROS2 access for one Machine.

This is the only part of the project that imports rclpy. It speaks ROS2 vocabulary, knows nothing about OPC UA and imports nothing from opensmi.ros2.server (enforced by tests/test_import_boundary.py).

The package exports what a server author touches: the Runtime handed to a Machine, the RuntimeInterface it implements, the Message base that Binding callbacks receive, the ParameterType of a parameter Binding and the QoS types. A custom lifecycle driver also needs the Subscription and ServiceTypes returned by RuntimeInterface.subscribe and RuntimeInterface.describe_service, the QoSIncompatibility and Provenance records of a Subscription's QoS, and the TypeHashMismatch records. Everything else is internal plumbing (see CONTRIBUTING.md).

Only Runtime is exported lazily. The rest imports without a ROS2 installation, which the server half and its tests rely on. Accessing Runtime without ROS2 raises ImportError.

Module errors What the Runtime raises when the thing asked for did not happen.
Module goal The Goal handle: one ROS2 goal's lifetime and its signals, in one object.
Module graph The graph facet: what is on the ROS2 graph, learned by polling because rclpy has no change event.
Module guard The type-mismatch guard: what may be put into a ROS2 message, and what aborts the process.
Module interface The seam, written down: what a Runtime is, to everything that is not one.
Package messages Message dataclasses: the payloads that cross the seam, and the ROS2 facts they carry.
Module outcomes What the Runtime returns when the thing asked for happened and went badly.
Module parameters The parameter facet: a ROS2 node's parameters, read one at a time and written non-atomically.
Module publisher The Publisher handle: one topic's outward lifetime, and the checks in front of it.
Module qos QoS: where a profile came from, and therefore how it may be treated.
Module runtime The Runtime: the sole owner of ROS2 access for one Machine.
Module selection The one field-selection mechanism: include and exclude globs over ROS2 field paths.
Module stamp Filling a message header's timestamp, so that no declaration has to hand-write a clock.
Module subscription The Subscription handle: one topic's lifetime and its signals, in one object.
Module tf The TF facet: both transform topics, held by us, in both directions.
Module _decode The Decoder: one live ROS2 message instance becomes one message dataclass.
Module _encode The Encoder: one message dataclass becomes one live ROS2 message instance.
Module _parser The Parser: a ROS2 interface definition becomes a field structure and its types.

From __init__.py:

Function __getattr__ Resolve Runtime on first use, so that importing this package needs no ROS2.
def __getattr__(name: str) -> object: ΒΆ

Resolve Runtime on first use, so that importing this package needs no ROS2.