Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
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
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
yehaojie
plugin-GUI
Commits
5028bfee
Commit
5028bfee
authored
9 years ago
by
jonaskn
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://github.com/arnefmeyer/plugin-GUI
parents
7b4e9889
310c3e60
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Resources/Python/record_control_example_client.py
+19
-8
19 additions, 8 deletions
Resources/Python/record_control_example_client.py
Source/Plugins/NetworkEvents/NetworkEvents.cpp
+16
-0
16 additions, 0 deletions
Source/Plugins/NetworkEvents/NetworkEvents.cpp
with
35 additions
and
8 deletions
Resources/Python/record_control_example_client.py
+
19
−
8
View file @
5028bfee
...
...
@@ -37,32 +37,43 @@ def run_client():
socket
.
RCVTIMEO
=
int
(
timeout
*
1000
)
# timeout in milliseconds
socket
.
connect
(
url
)
#
Finally, s
tart data acquisition
#
S
tart data acquisition
socket
.
send
(
'
StartAcquisition
'
)
answer
=
socket
.
recv
()
print
answer
print
socket
.
recv
()
time
.
sleep
(
5
)
socket
.
send
(
'
IsAcquiring
'
)
print
"
IsAcquiring:
"
,
socket
.
recv
()
print
""
for
start_cmd
in
commands
:
for
cmd
in
[
start_cmd
,
stop_cmd
]:
socket
.
send
(
cmd
)
answer
=
socket
.
recv
()
print
answer
print
socket
.
recv
()
if
'
StartRecord
'
in
cmd
:
# Record data for 5 seconds
socket
.
send
(
'
IsRecording
'
)
print
"
IsRecording:
"
,
socket
.
recv
()
socket
.
send
(
'
GetRecordingPath
'
)
print
"
Recording path:
"
,
socket
.
recv
()
time
.
sleep
(
5
)
else
:
# Stop for 1 second
socket
.
send
(
'
IsRecording
'
)
print
"
IsRecording:
"
,
socket
.
recv
()
time
.
sleep
(
1
)
# Finally, stop data acquisition; it might be a good idea to
print
""
# Finally, stop data acquisition; it might be a good idea to
# wait a little bit until all data have been written to hard drive
time
.
sleep
(
0.5
)
socket
.
send
(
'
StopAcquisition
'
)
answer
=
socket
.
recv
()
print
answer
print
socket
.
recv
()
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Source/Plugins/NetworkEvents/NetworkEvents.cpp
+
16
−
0
View file @
5028bfee
...
...
@@ -479,6 +479,22 @@ String NetworkEvents::handleSpecialMessages(StringTS msg)
return
String
(
"StoppedRecording"
);
}
}
else
if
(
cmd
.
compareIgnoreCase
(
"IsAcquiring"
)
==
0
)
{
String
status
=
CoreServices
::
getAcquisitionStatus
()
?
String
(
"1"
)
:
String
(
"0"
);
return
status
;
}
else
if
(
cmd
.
compareIgnoreCase
(
"IsRecording"
)
==
0
)
{
String
status
=
CoreServices
::
getRecordingStatus
()
?
String
(
"1"
)
:
String
(
"0"
);
return
status
;
}
else
if
(
cmd
.
compareIgnoreCase
(
"GetRecordingPath"
)
==
0
)
{
File
file
=
CoreServices
::
RecordNode
::
getRecordingPath
();
String
msg
(
file
.
getFullPathName
());
return
msg
;
}
else
{
return
String
(
"NotHandled"
);
...
...
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