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

View File

@@ -8,6 +8,9 @@ class Server():
self.Address = None
self.PortReceiver = None
self.PortNotification = None
self.WebUiUrl = None
self.WebUiSequenceNotification = None
self.WebUiConfigurationReceiver = None
# search the required sections
for key in config:
@@ -17,6 +20,12 @@ class Server():
self.PortReceiver = int(config['portreceiver'])
elif 'portnotification' == key:
self.PortNotification = int(config['portnotification'])
elif 'webuiurl' == key:
self.WebUiUrl = config['webuiurl']
elif 'sequencenotification' == key:
self.WebUiSequenceNotification = config['sequencenotification']
elif 'configurationreceiver' == key:
self.WebUiConfigurationReceiver = config['configurationreceiver']
if self.Address is None:
sys.stderr.write('No server-address configuration found!')
@@ -27,3 +36,12 @@ class Server():
if self.PortNotification is None:
sys.stderr.write('No server-port-notification configuration found!')
sys.exit(-1)
if self.WebUiUrl is None:
sys.stderr.write('No Web-UI URL configuration found!')
sys.exit(-1)
if self.WebUiSequenceNotification is None:
sys.stderr.write('No Web-UI sequence notification configuration found!')
sys.exit(-1)
if self.WebUiConfigurationReceiver is None:
sys.stderr.write('No Web-UI configuration receiver configuration found!')
sys.exit(-1)