You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In previous versions, when starting a macro or loading an experiment, OPUS returned the string "OK" as well as the Macro ID. Now it does not do that any more, but returns some Chinese Unicode symbols:
defload_experiment(self) ->None:
"""Loads a new experiment in OPUS over DDE connection."""assertsys.platform=="win32"self.__connect_to_dde_opus()
experiment_path=self._CONFIG["opus"]["experiment_path"]
ifnotself.__test_dde_connection():
returnanswer=self.conversation.Request("LOAD_EXPERIMENT "+experiment_path)
logger.info(f"Loaded new OPUS experiment: {experiment_path}")
self.current_experiment=experiment_path# TODO: why does the following logic not work anymore""" if "OK" in answer: logger.info("Loaded new OPUS experiment: {}.".format(full_path)) self.current_experiment = full_path else: logger.info("Could not load OPUS experiment as expected.") """defstart_macro(self) ->None:
"""Starts a new macro in OPUS over DDE connection."""assertsys.platform=="win32"# perform connectself.__connect_to_dde_opus()
ifnotself.__test_dde_connection():
return# load macromacro_path=self._CONFIG["opus"]["macro_path"]
answer=self.conversation.Request(f"RUN_MACRO {macro_path}")
logger.info(f"Started OPUS macro: {macro_path}")
# TODO: why does the following logic not work anymore""" active_macro_id = str(answer[4:-1]) StateInterface.update({"active_opus_macro_id": active_macro_id}, persistent=True) if "OK" in answer: logger.info(f"Started OPUS macro: {macro_basename} with id: {active_macro_id}.") else: logger.info(f"Could not start OPUS macro with id: {active_macro_id} as expected.") """defstop_macro(self) ->None:
"""Stops the currently running macro in OPUS over DDE connection."""assertsys.platform=="win32"# perform connectself.__connect_to_dde_opus()
ifnotself.__test_dde_connection():
return# stop macromacro_path=os.path.basename(self._CONFIG["opus"]["macro_path"])
answer=self.conversation.Request("KILL_MACRO "+macro_path)
logger.info(f"Stopped OPUS macro: {macro_path}")
# TODO: why does the following logic not work anymore""" if "OK" in answer: logger.info(f"Stopped OPUS macro: {macro_basename} with id: {active_macro_id}.") StateInterface.update({"active_opus_macro_id": None}, persistent=True) else: logger.info(f"Could not stop OPUS macro with id: {active_macro_id} as expected.") """defclose_opus(self) ->None:
"""Closes OPUS via DDE call."""assertsys.platform=="win32"self.__connect_to_dde_opus()
ifnotself.__test_dde_connection():
returnanswer=self.conversation.Request("CLOSE_OPUS")
logger.info("Stopped OPUS.exe")
# TODO: why does the following logic not work anymore""" if "OK" in answer: logger.info("Stopped OPUS.exe") else: logger.info("No response for OPUS.exe close request.") """
From documentation:
In the current version, we did not figure out how to process the answers from the OPUS DDE server. When using the same conversation to start and stop a macro, we do not need a Macro ID (which should be inside the answer). But when using a different conversation (e.g. from the CLI's stop-core command), we need a Macro ID that we don't have. Hence, we currently terminate the two OPUS processes "opus.exe" and "OpusCore.exe" manually instead of sending "Stop Macro" and "Stop OPUS" commands and waiting for a graceful shutdown.
The text was updated successfully, but these errors were encountered:
In previous versions, when starting a macro or loading an experiment, OPUS returned the string "OK" as well as the Macro ID. Now it does not do that any more, but returns some Chinese Unicode symbols:
From documentation:
In the current version, we did not figure out how to process the answers from the OPUS DDE server. When using the same conversation to start and stop a macro, we do not need a Macro ID (which should be inside the answer). But when using a different conversation (e.g. from the CLI's stop-core command), we need a Macro ID that we don't have. Hence, we currently terminate the two OPUS processes "opus.exe" and "OpusCore.exe" manually instead of sending "Stop Macro" and "Stop OPUS" commands and waiting for a graceful shutdown.
The text was updated successfully, but these errors were encountered: