class _SkillLogicMixin(AbstractSkill, AbstractUaLogger):
Known subclasses: server.mixins.skill_logic_mixins.ContinuousSkillLogicMixin, server.mixins.skill_logic_mixins.FiniteSkillLogicMixin
Constructor: _SkillLogicMixin(**kwargs)
Base class for all python-native skills (with state machine logic).
| Method | __init__ |
Cooperative constructor. |
| Async Method | halt |
Undocumented |
| Async Method | lifecycle |
Initialize the skill state machine. |
| Async Method | reset |
Undocumented |
| Async Method | start |
Undocumented |
| Async Method | suspend |
Undocumented |
| Method | _add |
Undocumented |
| Async Method | _after |
Is called by the finite state machine after the SkillState.HALTING state is entered. |
| Async Method | _after |
Is called by the finite state machine after the SkillState.RESETTING state is entered. |
| Async Method | _after |
Undocumented |
| Async Method | _after |
Is called by the finite state machine after the SkillState.STARTING state is entered. |
| Async Method | _after |
Is called by the finite state machine after the SkillState.SUSPENDING state is entered. |
| Async Method | _condition |
Implement additional custom conditions checked before resetting the skill. |
| Async Method | _condition |
Implement additional custom conditions checked before starting the skill. |
| Async Method | _condition |
Implement additional custom conditions checked before suspending the skill. |
| Async Method | _handle |
Handle user-specific logic during the SkillState.HALTING state. |
| Async Method | _handle |
Handle user-specific logic during SkillState.RESETTING state. |
| Async Method | _handle |
Handle user-specific logic during the SkillState.RUNNING state. |
| Async Method | _handle |
Handle user-specific logic during the SkillState.STARTING state. |
| Async Method | _handle |
Handle user-specific logic during the SkillState.SUSPENDING state. |
| Async Method | _suspend |
Blocks if current_state is SkillState.SUSPENDING and allow advance to SkillState.SUSPENDED. |
| Async Method | _ua |
Undocumented |
| Async Method | _ua |
Undocumented |
| Async Method | _ua |
Undocumented |
| Async Method | _ua |
Undocumented |
| Async Method | _wrap |
Undocumented |
| Instance Variable | __tasks |
Keeps track of tasks related to skill execution and their name. These tasks will get canceled and emptied before handle_halting() is called. |
| Instance Variable | _machine |
Skill Finite State Machine. |
| Instance Variable | _paused |
Undocumented |
| Instance Variable | _resume |
Undocumented |
AsyncGenerator[ None]:
¶
Initialize the skill state machine.
server.mixins.skill_logic_mixins.ContinuousSkillLogicMixin, server.mixins.skill_logic_mixins.FiniteSkillLogicMixinUndocumented
Implement additional custom conditions checked before resetting the skill.
| Returns | |
bool | Always True, else an exception is raised. |
| Raises | |
UaStatusCodeError | If the skill is not allowed to reset. |
Implement additional custom conditions checked before starting the skill.
| Returns | |
bool | Always True, else an exception is raised. |
| Raises | |
UaStatusCodeError | If the skill is not allowed to start. |
Implement additional custom conditions checked before suspending the skill.
| Returns | |
bool | Always True, else an exception is raised. |
| Raises | |
UaStatusCodeError | If the skill is not allowed to suspend. |
Handle user-specific logic during the SkillState.HALTING state.
After this function is done, the skill will automatically advance to the SkillState.HALTED state.
Handle user-specific logic during SkillState.RESETTING state.
After this function is done, the skill will automatically advance to the SkillState.READY state.
Handle user-specific logic during the SkillState.RUNNING state.
After this function is done, the skill will automatically advance to the SkillState.COMPLETED state
if it is finite. Continuous skills stay in SkillState.RUNNING.
Note: This continues to be executed during SkillState.SUSPENDING state. Use _suspend_point method to
block the task executing this function and advance to SkillState.SUSPENDED state.
Handle user-specific logic during the SkillState.STARTING state.
After this function is done, the skill will automatically advance to the SkillState.RUNNING state.
Handle user-specific logic during the SkillState.SUSPENDING state.
After this function is returns, the skill will automatically advance to the SkillState.SUSPENDED state.
Blocks if current_state is SkillState.SUSPENDING and allow advance to SkillState.SUSPENDED.
Call from _handle_running at any point where it's safe to pause.
@override
NodeId, session: SessionProtocol) -> StatusCode:
¶
Undocumented
@override
NodeId, session: SessionProtocol) -> StatusCode:
¶
Undocumented
@override
NodeId, session: SessionProtocol) -> StatusCode:
¶
Undocumented
@override
NodeId, session: SessionProtocol) -> StatusCode:
¶
Undocumented
Callable[ [], Awaitable], success_trigger: TRIGGER | None, fail_trigger: TRIGGER = 'halt', cancel_others: bool = False):
¶
Undocumented