implement device shutdown on deletion or lack of profiles

This commit is contained in:
Jakob Ketterl
2021-03-18 22:59:46 +01:00
parent f1619b81fe
commit c50473fea5
7 changed files with 39 additions and 12 deletions

View File

@ -56,6 +56,9 @@ class SdrSourceEventClient(object):
def onFail(self):
pass
def onShutdown(self):
pass
def onDisable(self):
pass
@ -349,6 +352,11 @@ class SdrSource(ABC):
if self.monitor:
self.monitor.join()
def shutdown(self):
self.stop()
for c in self.clients.copy():
c.onShutdown()
def getClients(self, *args):
if not args:
return self.clients