sort the received aircraft reports into the corresponding worker thread
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user