Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hidra
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steinbac
hidra
Commits
42176580
Commit
42176580
authored
9 years ago
by
Manuela Kuhn
Browse files
Options
Downloads
Patches
Plain Diff
Added check for configuration of OnDA
parent
eb9734c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/sender.py
+16
-9
16 additions, 9 deletions
src/sender.py
src/shared/helperScript.py
+12
-0
12 additions, 0 deletions
src/shared/helperScript.py
with
28 additions
and
9 deletions
src/sender.py
+
16
−
9
View file @
42176580
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/shared/helperScript.py
+
12
−
0
View file @
42176580
...
...
@@ -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(
'
,
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment