OpenSMI-Server 0.4.1__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/PKG-INFO +2 -2
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/pyproject.toml +1 -1
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/PKG-INFO +2 -2
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/requires.txt +1 -1
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/scm_file_list.json +2 -0
- opensmi_server-0.4.2/src/OpenSMI_Server.egg-info/scm_version.json +8 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_startup_skill.py +1 -1
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/docstrings.py +2 -1
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/skill_logic_mixins.py +2 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/ua_fsm.py +58 -4
- opensmi_server-0.4.1/src/OpenSMI_Server.egg-info/scm_version.json +0 -8
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/.github/workflows/api-docs.yml +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/.github/workflows/checks.yml +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/.github/workflows/python-publish.yml +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/.gitignore +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/.pre-commit +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/.pre-commit-config.yaml +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/LICENSE +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/LICENSES/CC0-1.0.txt +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/LICENSES/MIT.txt +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/MANIFEST.in +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/README.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/development.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/events.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/faq.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/machinery_item.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/methods.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/migration.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/skills.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/docs/variables.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/check/main.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dictionary_entries/main.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/__init__.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/composite_skill.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/config.toml +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/continuous_skill.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/continuous_skill_self_halting.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/dummy_component.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/dummy_machine.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/dummy_method.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/dummy_skill.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/dummy_skill_resources.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/dummy_skill_simple.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/main.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/resources.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/startup_skill.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/suspendable_dummy_skill.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/quick_start/main.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/rsl/main.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/structures/README.md +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/structures/client.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/structures/server.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/setup.cfg +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/SOURCES.txt +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/dependency_links.txt +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/top_level.txt +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/__init__.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/_history.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/_server.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/access_control.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_callable.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_feasibility_check.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_machine.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_machinery_item.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_method.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_precondition_check.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/base_skill.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/common.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/config.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/data_types.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/errors.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/interfaces.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/lock.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/__init__.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/description_mixin.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/lockable_mixin.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/notification_mixins.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/parent_mixin.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/requirements_mixin.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/spatial_object_mixin.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/ua_object_container_mixins.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/ua_variable_container_mixins.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/notification.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/protocols.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/resource.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/spatial_object.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/structures.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/ua_dictionary_entry.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/ua_object.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/ua_object_containers.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/ua_variable.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/ua_variable_containers.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/user.py +0 -0
- {opensmi_server-0.4.1 → opensmi_server-0.4.2}/tools/create_password.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OpenSMI-Server
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Asynchronous Python framework for building Smart Machine Interface-compliant OPC UA servers.
|
|
5
5
|
Author-email: Carsten Harms <Carsten.Harms@dfki.de>, Simon Jungbluth <Simon.Jungbluth@smartfactory.de>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
License-File: LICENSES/MIT.txt
|
|
29
29
|
Requires-Dist: OpenSMI-Core<0.9,>=0.8.1
|
|
30
30
|
Requires-Dist: asyncua<3,>=2.0.1
|
|
31
|
-
Requires-Dist: transitions<
|
|
31
|
+
Requires-Dist: transitions<0.10,>=0.9.3
|
|
32
32
|
Requires-Dist: structlog>=26
|
|
33
33
|
Requires-Dist: typing-extensions>=4.16.0
|
|
34
34
|
Provides-Extra: rich
|
|
@@ -40,7 +40,7 @@ requires-python = ">=3.11"
|
|
|
40
40
|
dependencies = [
|
|
41
41
|
"OpenSMI-Core>=0.8.1,<0.9",
|
|
42
42
|
"asyncua>=2.0.1,<3", # OPC UA, main dep; has quite a few deps
|
|
43
|
-
"transitions>=0.9, <
|
|
43
|
+
"transitions>=0.9.3, <0.10", # FSM; private hooks overridden in ua_fsm.py; TODO remove it
|
|
44
44
|
"structlog>=26", # structured logging; has no deps
|
|
45
45
|
"typing-extensions>=4.16.0", # backported type hints; already a dep of asyncua
|
|
46
46
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OpenSMI-Server
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Asynchronous Python framework for building Smart Machine Interface-compliant OPC UA servers.
|
|
5
5
|
Author-email: Carsten Harms <Carsten.Harms@dfki.de>, Simon Jungbluth <Simon.Jungbluth@smartfactory.de>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
License-File: LICENSES/MIT.txt
|
|
29
29
|
Requires-Dist: OpenSMI-Core<0.9,>=0.8.1
|
|
30
30
|
Requires-Dist: asyncua<3,>=2.0.1
|
|
31
|
-
Requires-Dist: transitions<
|
|
31
|
+
Requires-Dist: transitions<0.10,>=0.9.3
|
|
32
32
|
Requires-Dist: structlog>=26
|
|
33
33
|
Requires-Dist: typing-extensions>=4.16.0
|
|
34
34
|
Provides-Extra: rich
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/scm_file_list.json
RENAMED
|
@@ -95,11 +95,13 @@
|
|
|
95
95
|
"tests/integration/test_paths.py",
|
|
96
96
|
"tests/integration/test_skill.py",
|
|
97
97
|
"tests/integration/test_spatial_object_integration.py",
|
|
98
|
+
"tests/integration/test_startup_skill.py",
|
|
98
99
|
"tests/integration/test_structures_integration.py",
|
|
99
100
|
"tests/integration/test_variable_groups.py",
|
|
100
101
|
"tests/unit/test_access_control.py",
|
|
101
102
|
"tests/unit/test_base_machinery_item.py",
|
|
102
103
|
"tests/unit/test_docstrings.py",
|
|
104
|
+
"tests/unit/test_halt_during_custom_start_condition.py",
|
|
103
105
|
"tests/unit/test_parent_mixin.py",
|
|
104
106
|
"tests/unit/test_scrypt.py",
|
|
105
107
|
"tests/unit/test_skill_logic_mixins.py",
|
|
@@ -102,7 +102,7 @@ class BaseStartupSkill(ParentMixin["BaseMachineryItem"], BaseSkillContinuous):
|
|
|
102
102
|
# this skill is important for the machine/component to function correctly,
|
|
103
103
|
# so halt the machine/component if this skill is halted
|
|
104
104
|
await self.parent.halt_components()
|
|
105
|
-
await self.parent.halt_skills()
|
|
105
|
+
await self.parent.halt_skills([skill for skill in self.parent.skill_set if skill is not self])
|
|
106
106
|
|
|
107
107
|
@override
|
|
108
108
|
async def _get_definition(self) -> UaObjectDefinition:
|
|
@@ -15,7 +15,8 @@ def description_from_docstring(docstring: str | None) -> str | None:
|
|
|
15
15
|
|
|
16
16
|
The indentation is removed and the lines of a paragraph are joined, so docstrings can be wrapped as usual and
|
|
17
17
|
clients that show the text as is don't break it in the middle of a sentence. Paragraphs stay separated by a blank
|
|
18
|
-
line and list items (
|
|
18
|
+
line and list items (lines starting with ``-``, ``*`` or a number like ``1.``) stay on their own lines. Markup is
|
|
19
|
+
kept.
|
|
19
20
|
|
|
20
21
|
:return: The description, or ``None`` if the docstring is empty.
|
|
21
22
|
"""
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/skill_logic_mixins.py
RENAMED
|
@@ -81,6 +81,8 @@ class _SkillLogicMixin(AbstractSkill, AbstractUaLogger):
|
|
|
81
81
|
states=SkillState,
|
|
82
82
|
initial=SkillState.HALTED,
|
|
83
83
|
write_func=self._write_current_state,
|
|
84
|
+
# a Start whose conditions wait, e.g. a custom start condition, must not override a Halt that came meanwhile
|
|
85
|
+
drop_if_state_changed=("start",),
|
|
84
86
|
)
|
|
85
87
|
"""Skill Finite State Machine."""
|
|
86
88
|
self._add_transitions()
|
|
@@ -8,20 +8,63 @@ from __future__ import annotations
|
|
|
8
8
|
|
|
9
9
|
from collections.abc import Awaitable, Callable, Iterable
|
|
10
10
|
from enum import Enum
|
|
11
|
-
from typing import Generic, TypeVar
|
|
11
|
+
from typing import Generic, TypeVar, cast
|
|
12
12
|
|
|
13
13
|
import structlog
|
|
14
14
|
from asyncua import ua
|
|
15
15
|
from asyncua.common.node import Node
|
|
16
16
|
from asyncua.ua.status_codes import StatusCodes as UaStatusCodes
|
|
17
17
|
from transitions import MachineError
|
|
18
|
-
from transitions.extensions.asyncio import AsyncMachine
|
|
18
|
+
from transitions.extensions.asyncio import AsyncEventData, AsyncMachine, AsyncTransition
|
|
19
19
|
|
|
20
20
|
from opensmi.server.protocols import UserProtocol
|
|
21
21
|
|
|
22
22
|
_StateType = TypeVar("_StateType", bound=Enum)
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
class _AsyncTransition(AsyncTransition):
|
|
26
|
+
"""Transition that does not happen if the state changed while its conditions were checked.
|
|
27
|
+
|
|
28
|
+
``transitions`` determines the source state when a trigger begins and sets the destination after the conditions,
|
|
29
|
+
without checking the state again. A condition may wait, e.g. a custom start condition for the answer of a device,
|
|
30
|
+
and meanwhile another trigger may change the state, e.g. a Halt. For a trigger in
|
|
31
|
+
``_AsyncMachine.drop_if_state_changed``, the transition then does not happen.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
async def _eval_conditions(self, event_data: AsyncEventData) -> bool:
|
|
35
|
+
machine = cast("_AsyncMachine", event_data.machine)
|
|
36
|
+
state_changes = machine.state_changes
|
|
37
|
+
if not await super()._eval_conditions(event_data):
|
|
38
|
+
return False
|
|
39
|
+
if machine.state_changes != state_changes and event_data.event.name in machine.drop_if_state_changed:
|
|
40
|
+
cast("UaFiniteStateMachine[Enum]", event_data.model).logger.info(
|
|
41
|
+
"Transition dropped, the state changed while its conditions were checked",
|
|
42
|
+
trigger_func=event_data.event.name,
|
|
43
|
+
source=self.source,
|
|
44
|
+
dest=self.dest,
|
|
45
|
+
)
|
|
46
|
+
return False
|
|
47
|
+
return True
|
|
48
|
+
|
|
49
|
+
async def _change_state(self, event_data: AsyncEventData) -> None:
|
|
50
|
+
# count before the first await, so that a transition whose conditions end meanwhile sees the change
|
|
51
|
+
cast("_AsyncMachine", event_data.machine).state_changes += 1
|
|
52
|
+
await super()._change_state(event_data)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class _AsyncMachine(AsyncMachine):
|
|
56
|
+
"""``AsyncMachine`` that counts the state changes and uses ``_AsyncTransition``."""
|
|
57
|
+
|
|
58
|
+
transition_cls = _AsyncTransition
|
|
59
|
+
|
|
60
|
+
def __init__(self, *, drop_if_state_changed: Iterable[str] = (), **kwargs) -> None:
|
|
61
|
+
self.state_changes = 0
|
|
62
|
+
"""Number of state changes so far."""
|
|
63
|
+
self.drop_if_state_changed = frozenset(drop_if_state_changed)
|
|
64
|
+
"""Triggers whose transition does not happen if the state changed while its conditions were checked."""
|
|
65
|
+
super().__init__(**kwargs)
|
|
66
|
+
|
|
67
|
+
|
|
25
68
|
class UaFiniteStateMachine(Generic[_StateType]):
|
|
26
69
|
"""Finite state machine with OPC-UA representation based on ``transitions`` library."""
|
|
27
70
|
|
|
@@ -37,6 +80,7 @@ class UaFiniteStateMachine(Generic[_StateType]):
|
|
|
37
80
|
states: Iterable[_StateType],
|
|
38
81
|
initial: _StateType,
|
|
39
82
|
write_func: Callable[[_StateType], Awaitable[None]],
|
|
83
|
+
drop_if_state_changed: Iterable[str] = (),
|
|
40
84
|
) -> None:
|
|
41
85
|
"""Create a new instance.
|
|
42
86
|
|
|
@@ -44,15 +88,19 @@ class UaFiniteStateMachine(Generic[_StateType]):
|
|
|
44
88
|
:param states: States of the state machine.
|
|
45
89
|
:param initial: Initial state of the state machine.
|
|
46
90
|
:param write_func: Async callback to write the current state.
|
|
91
|
+
:param drop_if_state_changed: Triggers whose transition does not happen if the state changed while its
|
|
92
|
+
conditions were checked, e.g. by a Halt while a custom start condition waits. For these triggers,
|
|
93
|
+
``try_trigger()`` answers ``BadInvalidState`` if the transition did not happen.
|
|
47
94
|
"""
|
|
48
95
|
self.name = name
|
|
49
96
|
self.logger = structlog.getLogger("opensmi.UaFiniteStateMachine", name=name)
|
|
50
|
-
self._internal_machine =
|
|
97
|
+
self._internal_machine = _AsyncMachine(
|
|
51
98
|
model=self,
|
|
52
99
|
name=name,
|
|
53
100
|
states=tuple(states),
|
|
54
101
|
initial=initial,
|
|
55
102
|
auto_transitions=False,
|
|
103
|
+
drop_if_state_changed=drop_if_state_changed,
|
|
56
104
|
# after_state_change=self._after_state_change,
|
|
57
105
|
)
|
|
58
106
|
# Note: machine.after_state_change triggers too late, so use each state's on_enter callback
|
|
@@ -95,6 +143,7 @@ class UaFiniteStateMachine(Generic[_StateType]):
|
|
|
95
143
|
"""Try to trigger an event in the internal state machine.
|
|
96
144
|
|
|
97
145
|
Handles expected exceptions due to wrong state and UaStatusCodeError exceptions due to unsatisfied conditions.
|
|
146
|
+
For a trigger in ``drop_if_state_changed``, a transition that did not happen answers ``BadInvalidState``.
|
|
98
147
|
|
|
99
148
|
:param user: User which triggers the event.
|
|
100
149
|
:param trigger_func: Name of the trigger function.
|
|
@@ -105,7 +154,12 @@ class UaFiniteStateMachine(Generic[_StateType]):
|
|
|
105
154
|
# noinspection PyUnresolvedReferences
|
|
106
155
|
# try to call the trigger function, defined during runtime by transitions library
|
|
107
156
|
self.logger.debug("Trying to trigger...", trigger_func=trigger_func)
|
|
108
|
-
await self.trigger(trigger_func, user) # type: ignore
|
|
157
|
+
happened = await self.trigger(trigger_func, user) # type: ignore
|
|
158
|
+
if not happened and trigger_func in self._internal_machine.drop_if_state_changed:
|
|
159
|
+
# the state changed while the conditions were checked, a Halt cancelled the trigger, or a condition
|
|
160
|
+
# returned False instead of raising
|
|
161
|
+
self.logger.info("Transition did not happen", trigger_func=trigger_func)
|
|
162
|
+
return ua.StatusCode(ua.UInt32(UaStatusCodes.BadInvalidState))
|
|
109
163
|
return ua.StatusCode(ua.UInt32(UaStatusCodes.Good))
|
|
110
164
|
except MachineError as e:
|
|
111
165
|
self.logger.warning("State machine error", error=e.value, trigger_func=trigger_func)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/examples/dummy/continuous_skill_self_halting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/OpenSMI_Server.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/description_mixin.py
RENAMED
|
File without changes
|
|
File without changes
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/notification_mixins.py
RENAMED
|
File without changes
|
|
File without changes
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/requirements_mixin.py
RENAMED
|
File without changes
|
{opensmi_server-0.4.1 → opensmi_server-0.4.2}/src/opensmi/server/mixins/spatial_object_mixin.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|