extend the configuration for the UI communication

This commit is contained in:
Sven Czarnian
2021-11-11 11:05:41 +01:00
parent 9c9e7dd445
commit 014ea5fa0a
2 changed files with 48 additions and 0 deletions

30
aman/com/WebUI.py Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env python
import json
from aman.config.Server import Server
from aman.types.Inbound import Inbound
class WebUI:
def __init__(self):
self.Config = None
self.Aman = None
def __del__(self):
self.release()
def acquire(self, config : Server, aman):
self.Config = config
self.Aman = aman
def release(self):
return
def sendSequence(self, airport, inbounds):
sequence = []
for inbound in inbounds:
sequence.append(str(inbound.toJSON()))
# TODO send to the server
#print(json.dumps({ 'airport': airport, 'sequence': sequence }, ensure_ascii=True))