Mixins for UaObject and its subclasses.
Mixins add functionality to a component, skill, method, etc. by inheriting from them alongside the base class. They are grouped by how essential they are.
Note: Inheritance order matters: mixins come first, the base class comes last.
Required functionality
Every BaseComponent needs to implement the AbstractUaLogger interface. Use one of these mixins (never both) or
implement the interface yourself:
NotificationMixin: The component owns aNotificationchild node and logs through it.NotificationForwarderMixin: The component forwards notifications to the parent, which must implementAbstractUaLogger. The root parentBaseMachinealways fulfils this requirement.
Optional functionality
These mixins are only needed if your class uses the corresponding feature. For example, not every component has attributes, but if yours does, add the matching mixin.
LockableMixin(BaseComponent): Adds aLockfor the component and its children. Without it, the lock of the parent is used. The root parentBaseMachinealways provides aLock.RequirementsMixin(BaseSkill,BaseMethod): Declare dependencies on other skills, etc. Only needed if your logic depends on them.SpatialObjectListMixin(BaseMachine): If your machine has a spatial object list.SpatialObjectMixin(BaseComponent): If your component has a spatial object.
Containers
If your object has variables (UaVariable) or resources (Resource) in one of the standard containers,
add the mixin for that container:
AttributesMixin: For theAttributesvariable container.FinalResultDataMixin: For theFinalResultDatavariable container.MonitoringMixin: For theMonitoringvariable container.ParameterSetMixin: For theParameterSetvariable container.ResourcesMixin: For theResourcesresource container.
Optional typing
These mixins add type hints and runtime type checking for child objects of BaseComponent and BaseMachine.
Nothing depends on them, but we highly recommend them for a better developer experience.
ComponentsMixin: Typed components property.MethodSetMixin: Typed method_set property.SkillSetMixin: Typed skill_set property.
| Module | description |
Mixin for initializing the OPC UA description of UaObject using their Python docstrings. |
| Module | lockable |
Mixin for providing a Lock to an UaObject. |
| Module | notification |
Mixins providing standard AbstractUaLogger implementations for BaseMachineryItem. Use at most one. |
| Module | parent |
(Optional) Mixin for typing the parent of an UaObject. |
| Module | requirements |
Mixin providing requirement/dependency management capabilities for UaObject. |
| Module | skill |
State machine logic for both finite & continuous skills. |
| Module | spatial |
Mixins related to OPC UA spatial objects (Relative Spatial Location information model). |
| Module | ua |
Mixins for various UaObjectContainer containing UaObject. |
| Module | ua |
Generic mixins for providing an UaObject with Attributes, Monitoring, ParameterSet and FinalResultData. |