class ROS2ModelChangeMixin(SpatialObjectListMixin, MonitoringMixin, ROS2EventsMixin):
Constructor: ROS2ModelChangeMixin(*args, **kwargs)
Adds the standard model-change event, on the node the companion specification names.
For the Machine only: OPC 10000-210 marks the spatial-object list with GeneratesEvent GeneralModelChangeEventType, and there is one per Machine. It brings opensmi's spatial-object list and Monitoring container and builds the list as the Machine comes up.
| Method | __init__ |
Start out with no model-change generator, and pass everything to opensmi. |
| Async Method | emit |
Announce that the address space moved, with every change of one mutation batched. |
| Async Method | lifecycle |
Build the spatial-object list, and generate model-change events on it. |
| Property | node |
Return how many times this Machine's spatial-object list has been re-versioned. |
| Async Method | _bump |
Write the next node version, before the event that says why it moved. |
| Method | _specified |
Return the node OPC 10000-210 names as the source of GeneralModelChangeEvent. |
| Async Method | _specified |
Return the NodeVersion OPC 10000-210 makes mandatory on the spatial-object list. |
| Instance Variable | _model |
Undocumented |
| Instance Variable | _model |
Undocumented |
| Instance Variable | _node |
Undocumented |
| Instance Variable | _node |
Undocumented |
Inherited from ROS2EventsMixin:
| Async Method | emit |
Fire one BindingEvent from this machinery item. |
| Async Method | lifecycle |
Import this project's namespace and build the BindingEvent generator on the Notification. |
| Method | note |
Add one fired BindingEvent to this Machine's ring. Called by every item on it. |
| Property | ros2 |
Return the index this server imported NAMESPACE_URI at. |
| Property | ros2 |
Return the BindingEvents the Machine and its Components fired, oldest first, at most RECENT_EVENTS. |
| Property | ros2 |
Return the Machine this item reports to, which for a Machine is itself. |
| Method | _house |
Return the node opensmi fires its own machinery-item messages on. |
| Method | _keep |
Record one fired BindingEvent on this Machine's ring, after the trigger succeeded. |
| Instance Variable | _binding |
Undocumented |
| Instance Variable | _binding |
Undocumented |
| Instance Variable | _recent |
Undocumented |
| Instance Variable | _ros2 |
Undocumented |
Announce that the address space moved, with every change of one mutation batched.
One event per call and none at init. An empty batch is not announced.
| Parameters | |
changes:Sequence[ | What moved, one entry per node, as OPC UA models a model change. |
| Raises | |
DeclarationError | When this Machine's model-change generator was never built, so there is nothing to fire from. |
AsyncGenerator[ None]:
¶
Build the spatial-object list, and generate model-change events on it.
Write the next node version, before the event that says why it moved.
Written inside the same lock, so a client woken by the event reads a version that already counts it. The value is an opaque counter as text (OPC UA Part 3); only its changing means anything. It moves for every runtime mutation on the Machine, not only those under the list: a client re-browses once too often but never misses a change.
Return the node OPC 10000-210 names as the source of GeneralModelChangeEvent.
| Raises | |
DeclarationError | When the Machine has no spatial-object list. |
Return the NodeVersion OPC 10000-210 makes mandatory on the spatial-object list.
An event says the address space moved; the node version is what a client that was not listening compares against. None (with a warning) when the nodeset has none, since the model change is the notification that matters.