class documentation

class AbstractSkill(AbstractCallable):

View In Hierarchy

Skill interface for internal and external OPC UA access.

Async Method halt Halt (Stop) the skill. Machine internal interface.
Async Method reset Reset the skill. Machine internal interface.
Async Method start Start the skill. Machine internal interface.
Async Method suspend Suspend the skill (if the skill is suspendable). Machine internal interface.
Async Method wait_for_state Blocks until this skill either reached the given state or was unexpectedly halted.
Property current_state Current state of the skill.
Property is_finite Return True if this skill is finite.
Property name Name of the skill.
Property ua_state_machine OPC UA base node of state machine.
Async Method _condition_is_suspendable Check whether this skill is suspendable.
Async Method _get_definition Return the instantiation definition for the main OPC UA node. Is called from ua_create_node.
Async Method _ua_halt Handle the OPC UA halt method invocation.
Async Method _ua_reset Handle the OPC UA reset method invocation.
Async Method _ua_start Handle the OPC UA start method invocation.
Async Method _ua_suspend Handle the OPC UA suspend method invocation.

Inherited from AbstractCallable:

Async Method _condition_access_allowed Check if the provided user has access to this skill.
Async Method _condition_dependencies_ready Check whether ALL dependencies are ready (different meaning for different types).
Async Method _condition_startup_completed Check whether the parent component/machine startup is completed.

Inherited from AbstractUaObject (via AbstractCallable):

Method access_allowed Check whether user is currently allowed access to this UaObject.
Async Method condition_as_dependency_ready Check whether this object is ready as a dependency in composite skills, etc.
Property full_name Return the full name including the names of all parents, separated by '/'.
Property lock Lock instance protecting this UaObject.
Property logger Logger associated with the UaObject instance.
Property path Return the full path of the object.
Property server Server instance.
Property ua_node Raw OPC UA node.
@abstractmethod
async def halt(self):

Halt (Stop) the skill. Machine internal interface.

Similar to calling the OPC UA method halt(), except that exceptions are not handled.

@abstractmethod
async def reset(self):

Reset the skill. Machine internal interface.

Similar to calling the OPC UA method reset(), except that exceptions are not handled.

@abstractmethod
async def start(self):

Start the skill. Machine internal interface.

Similar to calling the OPC UA method start(), except that exceptions are not handled.

@abstractmethod
async def suspend(self):

Suspend the skill (if the skill is suspendable). Machine internal interface.

Similar to calling the OPC UA method suspend(), except that exceptions are not handled.

@abstractmethod
async def wait_for_state(self, state: SkillState):

Blocks until this skill either reached the given state or was unexpectedly halted.

Parameters
state:SkillStatethe state of this skill to wait for.
Raises
SkillHaltedErrorIf skill has unexpectedly halted.
@property
@abstractmethod
current_state: SkillState =

Current state of the skill.

@property
@abstractmethod
is_finite: bool =

Return True if this skill is finite.

This must be correct regardless where the logic is implemented (PLC, Remote, etc. vs. this Python instance).

@property
@abstractmethod
name: str =

Name of the skill.

@property
@abstractmethod
ua_state_machine: Node =

OPC UA base node of state machine.

@abstractmethod
async def _condition_is_suspendable(self, _user: UserAuthorization) -> bool:

Check whether this skill is suspendable.

Returns
boolAlways True, else an exception is raised.
Raises
UaStatusCodeErrorIf the skill is not suspendable.
@abstractmethod
async def _get_definition(self) -> UaObjectDefinition:

Return the instantiation definition for the main OPC UA node. Is called from ua_create_node.

@uamethod
@abstractmethod
async def _ua_halt(self, _parent: NodeId, session: SessionProtocol) -> ua.StatusCode:

Handle the OPC UA halt method invocation.

This callback is executed when an OPC UA client calls the halt method. Do not raise exceptions here, instead return the appropriate OPC UA status code!

Parameters
_parent:NodeIdParent OPC UA NodeId.
session:SessionProtocolOPC UA Client session that issued the method request.
Returns
ua.StatusCodeUndocumented
@uamethod
@abstractmethod
async def _ua_reset(self, _parent: NodeId, session: SessionProtocol) -> ua.StatusCode:

Handle the OPC UA reset method invocation.

This callback is executed when an OPC UA client calls the reset method. Do not raise exceptions here, instead return the appropriate OPC UA status code!

Parameters
_parent:NodeIdParent OPC UA NodeId.
session:SessionProtocolOPC UA Client session that issued the method request.
Returns
ua.StatusCodeUndocumented
@uamethod
@abstractmethod
async def _ua_start(self, _parent: NodeId, session: SessionProtocol) -> ua.StatusCode:

Handle the OPC UA start method invocation.

This callback is executed when an OPC UA client calls the start method. Do not raise exceptions here, instead return the appropriate OPC UA status code!

Parameters
_parent:NodeIdParent OPC UA NodeId.
session:SessionProtocolOPC UA Client session that issued the method request.
Returns
ua.StatusCodeUndocumented
@uamethod
@abstractmethod
async def _ua_suspend(self, _parent: NodeId, session: SessionProtocol) -> ua.StatusCode:

Handle the OPC UA suspend method invocation.

This callback is executed when an OPC UA client calls the suspend method. Do not raise exceptions here, instead return the appropriate OPC UA status code!

Parameters
_parent:NodeIdParent OPC UA NodeId.
session:SessionProtocolOPC UA Client session that issued the method request.
Returns
ua.StatusCodeUndocumented