class documentation

class KeyedBinding(AwaitedBinding):

View In Hierarchy

A ROS2 topic whose repeated field becomes one OPC UA member per key.

/diagnostics keyed by status[] on hardware_id and name is the real instance. The repeated field and the key fields are declared; membership is taken from the messages. The TF tree is keyed in the same sense but has its own declaration, TFBinding, because its members are OPC 10000-210 Locations. It renders the members only: for the fields beside the repeated one, declare a MonitoringBinding narrowed to them.

The number of members is capped by ~opensmi.ros2.server.mutation.ROS2MutationMixin.mutation_node_cap on the Component and its Machine's total. A Binding whose members stop appearing has reached one of them and reports a BindingEvent.

Method __post_init__ Refuse a contradictory declaration, and re-key the two maps to integers.
Class Variable kind Undocumented
Instance Variable depth How many messages the subscription buffers.
Instance Variable exclude Field patterns removing element fields, after include has narrowed.
Instance Variable group The Machinery Monitoring sub-structure the Binding's group is filed in, as on MonitoringBinding. A member then browses as <group>/<name>/<key>.
Instance Variable include Field patterns narrowing the element; empty means every field.
Instance Variable key The fields of one element that together name its member, in browse-name order. A sequence, since hardware_id tells two identical units apart.
Instance Variable message_type The ROS2 type, package/Name or package/kind/Name. Required, since the member shape and the aggregate come from the element type.
Instance Variable name The Binding's name, the group its members sit in. A member browses as <name>/<key> (a variable group) with each of / . < > : # ! & in the key replaced by _, shows the raw key as its DisplayName, and holds its variables below it...
Instance Variable path The ROS2 topic.
Instance Variable qos The QoS profile to request, or None to discover one, as on MonitoringBinding.
Instance Variable rename New browse names by field path, as on MonitoringBinding.
Instance Variable repeated_field The field whose elements become members. Anything but a repeated message field of message_type is fatal at init.
Instance Variable required Whether the StartupSkill waits for a publisher on this topic before Running. Presence only, never membership.
Instance Variable severities The band a transition into each state is reported at. Without it every transition is information.
Instance Variable startup_timeout Seconds that wait lasts, or None for ~opensmi.ros2.server.config.ROS2Config.startup_timeout.
Instance Variable state_field The one field of a member whose change is worth an event, or None. Declaring it gives a BindingEvent on every write that moves it, and a variable Worst<StateField> with the highest value any member holds.
Instance Variable states What each value of state_field is called, which mints the enumeration a client reads labels from. The value is the ROS2 constant's own.
Property needs_the_graph Return False: the member plan is known at init and membership comes from the messages.
Property selection Return the field selection, which narrows one element and not the message.
def __post_init__(self):

Refuse a contradictory declaration, and re-key the two maps to integers.

TOML table keys are strings, and a state value is a number.

Raises
DeclarationErrorWhen the Binding keys on nothing, names state labels or severities without a state field, takes a name the Machinery Monitoring reserves, or names a group that is not one of its four.
RequiredDeclarationErrorWhen startup_timeout is declared without required, or is not positive.
kind: ClassVar[str] =

Undocumented

depth: int =

How many messages the subscription buffers.

exclude: tuple[str, ...] =

Field patterns removing element fields, after include has narrowed.

group: str | None =

The Machinery Monitoring sub-structure the Binding's group is filed in, as on MonitoringBinding. A member then browses as <group>/<name>/<key>.

include: tuple[str, ...] =

Field patterns narrowing the element; empty means every field.

key: tuple[str, ...] =

The fields of one element that together name its member, in browse-name order. A sequence, since hardware_id tells two identical units apart.

message_type: str =

The ROS2 type, package/Name or package/kind/Name. Required, since the member shape and the aggregate come from the element type.

name =

The Binding's name, the group its members sit in. A member browses as <name>/<key> (a variable group) with each of / . < > : # ! & in the key replaced by _, shows the raw key as its DisplayName, and holds its variables below it. The names reserved on MonitoringBinding are reserved here too.

path: str =

The ROS2 topic.

qos: QoSProfile | None =

The QoS profile to request, or None to discover one, as on MonitoringBinding.

rename: dict[str, str] =

New browse names by field path, as on MonitoringBinding.

repeated_field: str =

The field whose elements become members. Anything but a repeated message field of message_type is fatal at init.

required =

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

severities: dict[int, Severity] =

The band a transition into each state is reported at. Without it every transition is information.

startup_timeout =

Seconds that wait lasts, or None for ~opensmi.ros2.server.config.ROS2Config.startup_timeout.

state_field: str | None =

The one field of a member whose change is worth an event, or None. Declaring it gives a BindingEvent on every write that moves it, and a variable Worst<StateField> with the highest value any member holds.

states: dict[int, str] =

What each value of state_field is called, which mints the enumeration a client reads labels from. The value is the ROS2 constant's own.

@property
needs_the_graph: bool =

Return False: the member plan is known at init and membership comes from the messages.

@property
selection: FieldSelection =

Return the field selection, which narrows one element and not the message.