A ROS2 parameter is a Parameter: an operator tunes a value, and the node decides the write.
Each declared ROS2 parameter becomes one UA Parameter on the declaring Component's ParameterSet, writable unless the declaration says otherwise. A client write goes out as set_parameters and a change observed on /parameter_events comes back in, so the Parameter means the current value on the node, whoever moved it.
A client's write is decided by ROS2 before it is stored. Every Parameter carries an async write check, which opensmi awaits before storing and which answers the client with the status code it raises. A value equal to what ROS2 holds is accepted at once (this is how the inward mirror passes). The node's descriptor refuses without a round trip: BadNotWritable for a read-only parameter, BadTypeMismatch for another type, BadOutOfRange outside the declared range. Otherwise set_parameters goes to the node with a timeout below the client's own. A refusal is BadOutOfRange when the node's reason is a range and BadInvalidArgument otherwise, and no answer in time is BadTimeout. Nothing wrong is ever stored, so nothing is reverted, and writes to one Parameter are serialised.
The node is also read and followed, and faults a client did not cause are BindingEvents. A node that
does not answer sets every Parameter of the Binding to BadNoCommunication and fires
PARAMETER_UNREACHABLE. A declared name that is absent fires PARAMETER_ABSENT, and one
held at another type fires PARAMETER_TYPE_MISMATCH; both leave the Parameter
BadNoCommunication, since types are declared and never discovered.
Nothing waits at init. The Parameters exist from boot with typed zeros under BadNoCommunication, and the first read happens on a task. A name that is not confirmed is read again every retry_interval seconds, and nothing is read once every name is confirmed. This is not a liveness probe: a node that vanishes silently is not noticed here, which is the StartupSkill's and a lifecycle Binding's job.
| Class | |
Keeps a Component's ParameterSet in sync with the ROS2 nodes it declared. |
| Function | refusal |
Return the status code a node's refusal of a write is answered with. |
| Function | ros2 |
Return what a client wrote into a Parameter as the ROS2 value it stands for. |
| Function | ua |
Return the OPC UA type one declared ROS2 parameter type renders as, and its typed zero. |
| Constant | PARAMETER |
The BindingEvent code for a declared name the node does not have. |
| Constant | PARAMETER |
The BindingEvent code for a declared name the node holds at another type. |
| Constant | PARAMETER |
The BindingEvent code for a parameter call that did not happen at all. |
| Class | _ |
One declared ROS2 parameter, live: its node, what the robot last said, and what that means. |
| Class | _ |
One ROS2-parameter Binding, live: its watch, its Parameters and the tasks driving them. |
| Function | _carries |
Return whether a written value is of the declared ROS2 parameter type. |
| Function | _known |
Return whether a written value is the one ROS2 last said it holds, having said one at all. |
| Function | _refuse |
Answer the write being checked with one status code, which opensmi hands to the client. |
| Function | _same |
Return whether a written value is the value held, kind for kind. |
| Constant | _ELEMENTS |
What one element of each array parameter type is, for the local type check. |
| Constant | _RANGED |
The parameter types a node's declared range is checked against here. |
Return the status code a node's refusal of a write is answered with.
BadOutOfRange when the node's reason mentions a range, BadInvalidArgument otherwise. A Write response carries only a status code.
Return what a client wrote into a Parameter as the ROS2 value it stands for.
This is opensmi.ros2.server.projection.ros2_value over the declared field type, which
narrows OPC UA scalar types to the exact Python types the Runtime's guard tests. A value of a
kind the type cannot hold is left as it came, for the guard to refuse.
Return the OPC UA type one declared ROS2 parameter type renders as, and its typed zero.
This is opensmi.ros2.server.projection.ua_shape over the field type the parameter type
is, so a ROS2 integer renders like an int64 message field. It is not a Projection:
the declaration already chose the union member. An array's zero is a fresh list on
every call.
The BindingEvent code for a declared name the node holds at another type.
| Value |
|
Return whether a written value is of the declared ROS2 parameter type.
A scalar needs exactly its Python type, so a boolean is not an integer and an integer is not a double.
Return whether a written value is the value held, kind for kind.
Exact, so True is not 1 and 1 is not 1.0. NaN equals NaN, because a double parameter can hold one and its inward write has to pass.
What one element of each array parameter type is, for the local type check.
| Value |
|