Skip to content
Snippets Groups Projects
Commit 33303799 authored by Moritz Maas's avatar Moritz Maas
Browse files

fix: log when taking transition

parent 308675e7
No related branches found
No related tags found
No related merge requests found
......@@ -118,11 +118,6 @@ class SystemController:
def _execute_broadcast_transition(self, transition: Transition, channel: Channel,
automaton_controller: AutomatonController):
broadcast_receiver_list: List[Tuple[Transition, AutomatonController]] = []
logger.info("Executing the broadcast transition from location %s to %s.",
transition.source.identifier, transition.target.identifier)
http_handler.update_webinterface(f"Executing the broadcast transition from location "
f"{transition.source.identifier} to "
f"{transition.target.identifier} was taken.")
for receiving_controller in self._automata_controller:
if receiving_controller == automaton_controller:
continue
......@@ -141,17 +136,17 @@ class SystemController:
receiving_controller))
break
logger.info("Executing the broadcast transition from location %s to %s.",
transition.source.identifier, transition.target.identifier)
http_handler.update_webinterface(f"Executing the broadcast transition from location "
f"{transition.source.identifier} to "
f"{transition.target.identifier} was taken.")
self._execute_transition(transition, automaton_controller)
for receiver in broadcast_receiver_list:
self._execute_transition(receiver[0], receiver[1])
def _execute_binary_transition(self, transition: Transition, channel: Channel,
automaton_controller: AutomatonController):
logger.info("Executing the binary transition from location %s to %s.",
transition.source.identifier, transition.target.identifier)
http_handler.update_webinterface(f"Executing the binary transition from location "
f"{transition.source.identifier} to "
f"{transition.target.identifier}.")
transitions: List[Transition]
if transition.synchronization.is_sending:
transitions = channel.receiving_transitions
......@@ -170,6 +165,12 @@ class SystemController:
Executor(second_frame))
if second_channel == channel:
if second_controller.can_step(second_transition, second_frame):
logger.info("Executing the binary transition from location %s to %s.",
transition.source.identifier, transition.target.identifier)
http_handler.update_webinterface(
f"Executing the binary transition from location "
f"{transition.source.identifier} to "
f"{transition.target.identifier}.")
self._execute_transition(transition, automaton_controller)
self._execute_transition(second_transition, second_controller)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment