@property
def is_running(self):
- return self._started and not self.ns3.Simulator.IsFinished()
+ return self.is_started and not self.ns3.Simulator.IsFinished()
+
+ @property
+ def is_started(self):
+ if not self._started:
+ now = self.ns3.Simulator.Now()
+ if not now.IsZero():
+ self._started = True
+
+ return self._started
@property
def is_finished(self):
if operation == "isRunning":
result = self.is_running
+ elif operation == "isStarted":
+ result = self.is_started
+
elif operation == "isFinished":
result = self.is_finished
args = [self._condition])
self._simulator_thread.setDaemon(True)
self._simulator_thread.start()
- self._started = True
-
+
### DEBUG
self.logger.debug("START")
return realkwargs
- def _is_app_running(self, uuid):
+ def _is_app_running(self, uuid):
now = self.ns3.Simulator.Now()
if now.IsZero():
return False