Skip to content
Snippets Groups Projects
Commit 42176580 authored by Manuela Kuhn's avatar Manuela Kuhn
Browse files

Added check for configuration of OnDA

parent eb9734c7
No related branches found
No related tags found
No related merge requests found
......@@ -136,18 +136,22 @@ def argumentParsing():
parser.add_argument("--maxQueueSize" , type=int, default=maxQueueSize,
help="Size of the queue for the live viewer (default=" + str(maxQueueSize) + ")")
arguments = parser.parse_args()
arguments = parser.parse_args()
logfilePath = str(arguments.logfilePath)
logfileName = str(arguments.logfileName)
logfileFullPath = os.path.join(logfilePath, logfileName)
verbose = arguments.verbose
onScreen = arguments.onScreen
logfilePath = str(arguments.logfilePath)
logfileName = str(arguments.logfileName)
logfileFullPath = os.path.join(logfilePath, logfileName)
verbose = arguments.verbose
onScreen = arguments.onScreen
watchDir = str(arguments.watchDir)
watchDir = str(arguments.watchDir)
monitoredSubdirs = arguments.monitoredSubdirs
cleanerTargetPath = str(arguments.cleanerTargetPath)
monitoredSubdirs = arguments.monitoredSubdirs
cleanerTargetPath = str(arguments.cleanerTargetPath)
ondaIps = arguments.ondaIps
ondaPorts = arguments.ondaPorts
parallelDataStreams = arguments.parallelDataStreams
#enable logging
helperScript.initLogging(logfileFullPath, verbose, onScreen)
......@@ -161,6 +165,9 @@ def argumentParsing():
# check if logfile is writable
helperScript.checkLogFileWritable(logfilePath, logfileName)
# check if there are enough ports specified (OnDA), corresponding to the number of streams
helperScript.checkStreamConfig(ondaIps, ondaPorts, parallelDataStreams)
return arguments
......
......@@ -200,6 +200,18 @@ def checkLogFileWritable(filepath, filename):
sys.exit(1)
def checkStreamConfig(ips, ports, numberToBe):
if len(ips) < numberToBe:
logging.error("Not enough IPs specified for OnDA, please check your configuration.")
sys.exit(1)
if len(ports) < numberToBe:
logging.error("Not enough ports specified for OnDA, please check your configuration.")
sys.exit(1)
def extractSignal(message, log):
try:
messageSplit = message.split(',')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment