From 1b96d401d5091d0a80f084809f5a8ba392903ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=A4fer?= <pschaefer@ITA.AKUSTIK.RWTH-AACHEN.DE> Date: Thu, 16 Feb 2023 10:38:04 +0100 Subject: [PATCH] Launcher: now uses VAComposedIniParser to setup config for VAServer --- LaunchScript/VirtualAcousticsStarterServer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LaunchScript/VirtualAcousticsStarterServer.py b/LaunchScript/VirtualAcousticsStarterServer.py index 4208740..557686c 100644 --- a/LaunchScript/VirtualAcousticsStarterServer.py +++ b/LaunchScript/VirtualAcousticsStarterServer.py @@ -98,6 +98,7 @@ class VirtualAcousticsLauncher: def __init__(self): print("init") self.oConfig = None + self.vaIniParser = None self.oVAProcess = None self.oLauncherServerSocket = None self.oLauncherConnection = None @@ -135,6 +136,7 @@ class VirtualAcousticsLauncher: print("Using config: " + sUsedConfigFile) self.oConfig = LauncherConfig( sUsedConfigFile ) + self.vaIniParser = VAComposedIniParser(self.oConfig.lsReproductionModules) #Open network socket used for the communication def open_server_socket(self): @@ -154,6 +156,9 @@ class VirtualAcousticsLauncher: #Actually starts the launcher listening for VAServer start requests def run(self): try: + #TODO-PSC: Receive file and name from client + self.vaIniParser.sRendererIniPath = None + self.vaIniParser.prepare_inis() while True: print( "Waiting for launcher connection..." ) @@ -188,7 +193,6 @@ class VirtualAcousticsLauncher: self.oLauncherServerSocket.close() - #Checks for a message containing the ID of the VAServer instance to be started and returns the respective VAServer directory def receive_va_server_id(self): try: @@ -241,7 +245,7 @@ class VirtualAcousticsLauncher: # Create start command sConnectionParam = self.oConfig.sLocalIP + ":" + str( self.oConfig.nVAServerPort ) - sVACoreIniParam = "conf/VACore.ini" + sVACoreIniParam = self.vaIniParser.get_main_inifile() sParams = sConnectionParam + " " + sVACoreIniParam sCommand = sVAExecutableFile + " " + sParams -- GitLab