From 54c9069e0fd0755ec077cf3f4eb00682a651f939 Mon Sep 17 00:00:00 2001 From: Eike Broda Date: Wed, 12 Apr 2023 16:32:57 +0200 Subject: [PATCH] Add function to check if simulation is running, taken from tmdt-buw/python-plantsim@33b88ea5b327b147c70238b0f9b8e61fa9f6deff --- plantsim/plantsim.py | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 plantsim/plantsim.py diff --git a/plantsim/plantsim.py b/plantsim/plantsim.py old mode 100644 new mode 100755 index 4735592..cb488fc --- a/plantsim/plantsim.py +++ b/plantsim/plantsim.py @@ -77,6 +77,10 @@ def start_simulation(self): self.plantsim.StartSimulation(self.event_controller) + def is_simulation_running(self): + + return self.plantsim.IsSimulationRunning() + def get_object(self, object_name): # "Smart" getter that has some limited ability to decide which kind of object to return