class documentation
class ROS2IntrospectionComponent(ROS2ComponentMixin, BaseComponent):
Constructor: ROS2IntrospectionComponent(*args, **kwargs)
The Component every Machine with a Runtime carries, and the ad-hoc Bindings it holds.
It declares no Bindings of its own, so its Monitoring is empty at boot and fills with whatever
an operator binds through BindTopic. A Machine may replace it through
~opensmi.ros2.server.machine.ROS2MachineMixin.introspection_component_type.
| Method | __init__ |
Start out holding no ad-hoc Bindings and nothing sampled. |
| Async Method | bind |
Bind one topic on behalf of an operator, and remember that it was theirs. |
| Method | binding |
Return one report row per Binding on this Machine, sampling the clock as it goes. |
| Method | recent |
Return the BindingEvents this Machine has kept, oldest first. |
| Property | ad |
Return the names of the Bindings an operator created, rather than a deployment. |
| Property | machine |
Return the Machine this Component reports for, which is the one it hangs under. |
| Async Method | _init |
Build the mirror with no Bindings, add the nine Methods, then start sampling. |
| Async Method | _sample |
Sample every Binding's satisfaction on a slow timer. A failure is logged and the loop continues. |
| Async Method | _shutdown |
Stop sampling, then let the Component release its ad-hoc subscriptions. |
| Async Method | _write |
Identify this Component as part of the Machine: its manufacturer, and its serial with the asset id. |
| Instance Variable | _ad |
Undocumented |
| Instance Variable | _clock |
Undocumented |
| Instance Variable | _resolved |
Undocumented |
| Instance Variable | _sampler |
Undocumented |
Bind one topic on behalf of an operator, and remember that it was theirs.
| Returns | |
bool | Whether it happened; False means a mutation cap refused the nodes. |
| Raises | |
DuplicateBindingNameError | When the name is taken on this Component. |
ROS2RuntimeError | When the type cannot be resolved or the subscription cannot be opened. |
Build the mirror with no Bindings, add the nine Methods, then start sampling.
The empty mirror still gives the Component its Runtime and Projection registry, which an ad-hoc bind needs. Nothing is subscribed yet.