|
@@ -1,7 +1,7 @@
|
|
|
"""
|
|
|
Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
|
|
|
|
|
|
-Date: Tue Oct 31 13:17:17 2017
|
|
|
+Date: Tue Oct 31 13:36:27 2017
|
|
|
|
|
|
Model author: Yentl Van Tendeloo
|
|
|
Model name: MvK Server
|
|
@@ -539,8 +539,6 @@ class Modelverse(RuntimeClassBase):
|
|
|
|
|
|
# state /initialized/behaviour/wait_for_action/service
|
|
|
self.states["/initialized/behaviour/wait_for_action/service"] = State(117, "/initialized/behaviour/wait_for_action/service", self)
|
|
|
- self.states["/initialized/behaviour/wait_for_action/service"].setEnter(self._initialized_behaviour_wait_for_action_service_enter)
|
|
|
- self.states["/initialized/behaviour/wait_for_action/service"].setExit(self._initialized_behaviour_wait_for_action_service_exit)
|
|
|
|
|
|
# state /initialized/behaviour/wait_for_action/modelling
|
|
|
self.states["/initialized/behaviour/wait_for_action/modelling"] = State(118, "/initialized/behaviour/wait_for_action/modelling", self)
|
|
@@ -1679,10 +1677,6 @@ class Modelverse(RuntimeClassBase):
|
|
|
_initialized_behaviour_wait_for_action_service_1.setTrigger(None)
|
|
|
_initialized_behaviour_wait_for_action_service_1.setGuard(self._initialized_behaviour_wait_for_action_service_1_guard)
|
|
|
self.states["/initialized/behaviour/wait_for_action/service"].addTransition(_initialized_behaviour_wait_for_action_service_1)
|
|
|
- _initialized_behaviour_wait_for_action_service_2 = Transition(self, self.states["/initialized/behaviour/wait_for_action/service"], [self.states["/initialized/behaviour/wait_for_action/service"]])
|
|
|
- _initialized_behaviour_wait_for_action_service_2.setAction(self._initialized_behaviour_wait_for_action_service_2_exec)
|
|
|
- _initialized_behaviour_wait_for_action_service_2.setTrigger(Event("_0after"))
|
|
|
- self.states["/initialized/behaviour/wait_for_action/service"].addTransition(_initialized_behaviour_wait_for_action_service_2)
|
|
|
|
|
|
# transition /initialized/behaviour/wait_for_action/modelling/recognized/manual
|
|
|
_initialized_behaviour_wait_for_action_modelling_recognized_manual_0 = Transition(self, self.states["/initialized/behaviour/wait_for_action/modelling/recognized/manual"], [self.states["/initialized/behaviour/leaving_manual"]])
|
|
@@ -2169,12 +2163,6 @@ class Modelverse(RuntimeClassBase):
|
|
|
def _initialized_behaviour_operations_service_stop_enter(self):
|
|
|
self.raiseInternalEvent(Event("request", None, [['service_stop']]))
|
|
|
|
|
|
- def _initialized_behaviour_wait_for_action_service_enter(self):
|
|
|
- self.addTimer(0, 1)
|
|
|
-
|
|
|
- def _initialized_behaviour_wait_for_action_service_exit(self):
|
|
|
- self.removeTimer(0)
|
|
|
-
|
|
|
def _initialized_behaviour_going_manual_init_enter(self):
|
|
|
self.context = None
|
|
|
self.current_model = self.actions[None][0]["parameters"][0]
|
|
@@ -3274,12 +3262,10 @@ class Modelverse(RuntimeClassBase):
|
|
|
return self.expect_action(None, ['element_list', 'element_list_nice', 'types', 'types_full', 'read_info', 'read_attrs', 'read_defined_attrs', 'instantiate', 'delete_element', 'attr_assign', 'attr_assign_code', 'attr_delete', 'read_outgoing', 'read_incoming', 'read_association_source', 'read_association_destination', 'connections_between', 'define_attribute', 'undefine_attribute', 'all_instances', 'attr_optional', 'attr_type', 'attr_name'])
|
|
|
|
|
|
def _initialized_behaviour_wait_for_action_service_0_exec(self, parameters):
|
|
|
- print("Starting new thread")
|
|
|
import modelverse
|
|
|
thrd = threading.Thread(target=self.service_function, args=[self.responses.pop(0)])
|
|
|
thrd.daemon = True
|
|
|
thrd.start()
|
|
|
- print("Thread diverged")
|
|
|
|
|
|
def _initialized_behaviour_wait_for_action_service_0_guard(self, parameters):
|
|
|
return self.expect_response_partial('', pop=False)
|
|
@@ -3290,9 +3276,6 @@ class Modelverse(RuntimeClassBase):
|
|
|
def _initialized_behaviour_wait_for_action_service_1_guard(self, parameters):
|
|
|
return self.expect_action(None, 'service_stop')
|
|
|
|
|
|
- def _initialized_behaviour_wait_for_action_service_2_exec(self, parameters):
|
|
|
- print("Responses: " + str(self.responses))
|
|
|
-
|
|
|
def _initialized_behaviour_wait_for_action_modelling_recognized_manual_0_guard(self, parameters):
|
|
|
return self.expect_action(self.context, 'exit')
|
|
|
|