class BaseMachineryItem(UaObject, AbstractUaLogger):
Known subclasses: server.base_machinery_item.BaseComponent
Constructor: BaseMachineryItem(name, minimum_access_level, **kwargs)
Base class for both machines (BaseMachine) and components (BaseComponent).
| Method | __init__ |
Cooperative constructor. |
| Async Method | add |
Add given (sub-)component instance, initializes it and keep track of it. |
| Async Method | add |
Add the given method instance to the asset. |
| Async Method | add |
Add given sequence of method instances to the asset. |
| Async Method | add |
Add the given skill instance to the asset. |
| Async Method | add |
Add given sequence of skill instances to the asset. |
| Async Method | condition |
Undocumented |
| Async Method | condition |
Check if startup was completed. |
| Async Method | halt |
Halt the machinery item. |
| Async Method | halt |
Halt all components (None, default) of this machinery item or only specific ones. |
| Async Method | halt |
Halt all skills (None, default) of this machinery item or only specific ones. |
| Async Method | lifecycle |
Lifecycle method which calls _init for initialization and _shutdown for shutdown. |
| Async Method | reset |
Attempt to reset the machinery item. |
| Async Method | reset |
Reset given components. If None given, resets all own components. |
| Async Method | reset |
Reset all given skills. If None given, resets all own skills. |
| Async Method | set |
Set the current operation mode of this machinery item without any transition logic checks. |
| Async Method | set |
Set the current state of this machinery item without any transition logic checks. |
| Property | components |
(Untyped) subcomponents of this machinery item. |
| Property | current |
Return the current machinery operation mode. Read-only property. |
| Property | current |
Return the current machinery item state. Read-only property. |
| Property | method |
Return untyped method set UaObjectContainer. Read-only property. |
| Property | skill |
(Untyped) skill set of this machinery item. |
| Property | startup |
Return the startup skill of the machinery item. |
| Async Method | __init |
Undocumented |
| Async Method | __init |
Initialize the method set UaObjectContainer. |
| Async Method | __init |
Initialize the skill set UaObjectContainer. |
| Async Method | _condition |
Undocumented |
| Async Method | _init |
Undocumented |
| Async Method | _init |
Undocumented |
| Async Method | _shutdown |
Undocumented |
| Instance Variable | _components |
Undocumented |
| Instance Variable | _current |
Undocumented |
| Instance Variable | _current |
Undocumented |
| Instance Variable | _method |
Undocumented |
| Instance Variable | _skill |
Undocumented |
| Instance Variable | _ua |
Undocumented |
| Instance Variable | _ua |
Optional 'MachineryOperationMode' (finite state machine) OPC UA node. |
| Instance Variable | _ua |
Optional current_state OPC UA node of 'MachineryOperationMode'. |
| Instance Variable | _ua |
Optional 'MachineryItemState' (finite state machine) OPC UA node. |
| Instance Variable | _ua |
Optional current_state OPC UA node of 'MachineryItemState'. |
str | None = None, minimum_access_level: int | None = None, **kwargs):
¶
Cooperative constructor.
Check if startup was completed.
- Startup is considered completed if either the corresponding startup skill (
BaseStartupSkill) - is in
SkillState.RUNNINGor the machinery item has no such skill.
Iterable[ str] | Iterable[ BaseComponent] | None = None, skills_to_halt: Iterable[ str] | Iterable[ AbstractSkill] | None = None):
¶
Halt the machinery item.
If a "Startup" skill for this machinery item exists, halt is expected to be performed by the startup skill. Otherwise, halt all/no skills and all/no subcomponents.
Note: The startup skill should not simply call this method, it will not halt anything!
| Parameters | |
componentsIterable[ | Whether to halt all subcomponents (except Ports) (None, default) or specified ones. |
skillsIterable[ | Whether to halt all skills (None, default) or specified ones. |
Iterable[ str] | Iterable[ BaseComponent] | None = None):
¶
Halt all components (None, default) of this machinery item or only specific ones.
| Parameters | |
componentsIterable[ | All components or only specific ones. Note: components by name will only be searched for in this machinery item! |
Iterable[ str] | Iterable[ AbstractSkill] | None = None):
¶
Halt all skills (None, default) of this machinery item or only specific ones.
Note: skills by name will only be searched for in this machinery item!
AsyncGenerator[ None]:
¶
Attempt to reset the machinery item.
If the state indicates resetting is required, it is safe to call when the machinery item is most states.
If a "Startup" skill for this machinery item exists, reset is expected to be performed by the startup skill. If there is no "Startup" skill, then reset all skills and subcomponents.
| Raises | |
PyUaRuntimeError | If the machinery item is in state MachineryItemState.NOT_AVAILABLE |
dict[ str, AbstractSkill] | Iterable[ AbstractSkill] | None = None):
¶
Reset all given skills. If None given, resets all own skills.
Return the startup skill of the machinery item.
| Raises | |
KeyError | If this machinery item has no startup skill. |