sort the received aircraft reports into the corresponding worker thread

This commit is contained in:
Sven Czarnian
2021-09-03 23:35:17 +02:00
parent 1561335e1b
commit 9de9b813ba
3 changed files with 28 additions and 8 deletions

View File

@@ -1,18 +1,20 @@
#!/usr/bin/env python
import threading
from threading import Thread, Lock
import time
from aman.config.Airport import Airport
class Worker(threading.Thread):
class Worker(Thread):
def __init__(self, icao : str, configuration : Airport):
threading.Thread.__init__(self)
Thread.__init__(self)
self.stopThread = None
self.icao = icao
self.configuration = configuration
self.arrivalRoutes = configuration.gngData.arrivalRoutes
self.updateLock = Lock()
self.reportQueue = {}
def stop(self):
self.stopThread = True
@@ -26,5 +28,6 @@ class Worker(threading.Thread):
if 0 != (counter % 60):
continue
# TODO handle the report queue and update internal information
# TODO execute planning, etc.
continue