class documentation

class MonitoringBinding(AwaitedBinding):

View In Hierarchy

A ROS2 topic read into Monitoring variables on the declaring Component.

Method __post_init__ Refuse a startup deadline nothing waits on, and a rate the server cannot keep.
Class Variable kind Undocumented
Instance Variable depth How many messages the subscription buffers. It is the slack a slow event loop gets before the oldest sample is dropped.
Instance Variable exclude Field patterns removing fields, after include has narrowed.
Instance Variable group The Machinery Monitoring sub-structure the Binding is filed in, one of Status, Health, Process and Consumption (OPC 40001-1), or None to sit directly in the Monitoring. With it the message browses as <group>/<name>/<field path>...
Instance Variable include Field patterns narrowing the message; empty means every field.
Instance Variable max_rate The most messages per second written to the variables, in hertz, or None to mirror every message. The limit is per Binding, so one message's fields stay one snapshot. The first message after a quiet spell is written at once, then at most one per ...
Instance Variable message_type The ROS2 type, package/Name or package/kind/Name, or None to take it from the graph. Declaring it gives the Binding its nodes at boot, so the address space does not depend on start-up timing. A type whose package is not installed is fatal at init...
Instance Variable name The Binding's name. The message is one complex Variable of that name, and a field browses below it as <name>/<field path>. Status, Health, Process and Consumption are reserved for the Machinery Monitoring sub-structures (OPC 40001-1).
Instance Variable path The ROS2 topic.
Instance Variable qos The QoS profile to request, or None to discover one: the most permissive request compatible with every current publisher, re-resolved once if the topic was empty when the Binding opened, and relaxed when the middleware reports a publisher it cannot accept...
Instance Variable rename New browse names by field path, such as {"pose/position/x": "East"}. A name is taken as is and must already follow the naming rule; a path that is not rendered is refused at init. Fixes a name collision without a Projection.
Instance Variable required Whether the StartupSkill waits for a publisher on this topic before Running. Presence only, never first data.
Instance Variable startup_timeout Seconds that wait lasts, or None for ~opensmi.ros2.server.config.ROS2Config.startup_timeout. Refused when the Binding is constructed without required.
Property needs_the_graph Return whether this Binding learns its shape only by watching the ROS2 graph.
Property selection Return this Binding's field selection.
def __post_init__(self):

Refuse a startup deadline nothing waits on, and a rate the server cannot keep.

Raises
RequiredDeclarationErrorWhen startup_timeout is declared without required, or is not positive.
DeclarationErrorWhen max_rate is not above zero and at most the publisher's ceiling, the name is one the Machinery Monitoring reserves, or group is not one of its four.
kind: ClassVar[str] =

Undocumented

depth: int =

How many messages the subscription buffers. It is the slack a slow event loop gets before the oldest sample is dropped.

exclude: tuple[str, ...] =

Field patterns removing fields, after include has narrowed.

group: str | None =

The Machinery Monitoring sub-structure the Binding is filed in, one of Status, Health, Process and Consumption (OPC 40001-1), or None to sit directly in the Monitoring. With it the message browses as <group>/<name>/<field path>, in a FolderType Object the Component's Bindings share.

include: tuple[str, ...] =

Field patterns narrowing the message; empty means every field.

max_rate: float | None =

The most messages per second written to the variables, in hertz, or None to mirror every message. The limit is per Binding, so one message's fields stay one snapshot. The first message after a quiet spell is written at once, then at most one per 1 / max_rate (the newest), and a message still waiting when the topic stops is written at the end of its window. Unwritten messages are not decoded. Above zero and at most ~opensmi.ros2.server.publisher.MAXIMUM_RATE.

message_type: str | None =

The ROS2 type, package/Name or package/kind/Name, or None to take it from the graph. Declaring it gives the Binding its nodes at boot, so the address space does not depend on start-up timing. A type whose package is not installed is fatal at init. Leaving it out is the graph-driven case: no nodes until the topic appears, and the only kind that makes the Machine poll the graph.

name =

The Binding's name. The message is one complex Variable of that name, and a field browses below it as <name>/<field path>. Status, Health, Process and Consumption are reserved for the Machinery Monitoring sub-structures (OPC 40001-1).

path: str =

The ROS2 topic.

qos: QoSProfile | None =

The QoS profile to request, or None to discover one: the most permissive request compatible with every current publisher, re-resolved once if the topic was empty when the Binding opened, and relaxed when the middleware reports a publisher it cannot accept. Declared, it is honoured exactly and never adapted. Neither is fatal or blocks startup.

rename: dict[str, str] =

New browse names by field path, such as {"pose/position/x": "East"}. A name is taken as is and must already follow the naming rule; a path that is not rendered is refused at init. Fixes a name collision without a Projection.

required =

Whether the StartupSkill waits for a publisher on this topic before Running. Presence only, never first data.

startup_timeout =

Seconds that wait lasts, or None for ~opensmi.ros2.server.config.ROS2Config.startup_timeout. Refused when the Binding is constructed without required.

@property
needs_the_graph: bool =

Return whether this Binding learns its shape only by watching the ROS2 graph.

A Binding with a declared type never reads the graph, so a Machine whose declarations all answer False polls zero times.

@property
selection: FieldSelection =

Return this Binding's field selection.