Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Biophysics Labs
Firmware
Commits
d800b70a
Commit
d800b70a
authored
May 15, 2020
by
Your Name
Browse files
modify zmq_trigger_subscriber, add --zmq-proxy option
parent
2166a752
Changes
5
Hide whitespace changes
Inline
Side-by-side
lsldert/Makefile
View file @
d800b70a
...
...
@@ -10,7 +10,8 @@ LDLIBS+=-lzmq -lboost_program_options -lpigpio -llsl32
#INCLUDE+=RS-232
CXXFLAGS
+=
-Wall
-std
=
c++11
all
:
zmq_trigger playtone msgqueue_pubsub zmq_trigger_subscriber playsound lsldertc hwserver hwserver2 hwserver3 zmqaudio
all
:
zmq_trigger playtone msgqueue_pubsub zmq_trigger_subscriber playsound lsldertc hwserver hwserver2 hwserver3
develop
:
zmqaudio
lsldertc
:
lsldertc.c
hwserver
:
hwserver.c
...
...
lsldert/msgqueue_pubsub
View file @
d800b70a
No preview for this file type
lsldert/zmq_trigger_subscriber
View file @
d800b70a
No preview for this file type
lsldert/zmq_trigger_subscriber.cc
View file @
d800b70a
...
...
@@ -36,6 +36,9 @@ stream_outlet *outlet;
string
info_name
,
info_type
,
info_sourceid
;
std
::
mutex
lsl_mutex
;
string
proxy
;
volatile
int
run
=
1
;
void
stop
(
int
signum
)
{
...
...
@@ -52,6 +55,7 @@ void parse_options(int argc, const char *argv[]) {
po
::
options_description
desc
(
"Usage:"
);
desc
.
add_options
()(
"help,h"
,
"show this message"
)(
"channel,c"
,
po
::
value
<
char
>
(),
"select channel [L or R]"
)(
"zmq-proxy,p"
,
po
::
value
<
char
>
(),
"select zmq pub-sub proxy host and port number: tcp://hostname:port"
)(
"lsl-name"
,
po
::
value
<
string
>
(),
"set the name of the LSL stream"
)(
"lsl-type"
,
po
::
value
<
string
>
(),
"set the type of the LSL stream"
)(
"lsl-sourceid"
,
po
::
value
<
string
>
(),
...
...
@@ -71,6 +75,14 @@ void parse_options(int argc, const char *argv[]) {
verbose
=
1
;
}
if
(
vm
.
count
(
"proxy"
))
proxy
=
vm
[
"zmq-proxy"
].
as
<
string
>
();
else
proxy
=
"tcp://lsldert00:5557"
;
if
(
verbose
)
cout
<<
"ZMQ proxy is: "
<<
proxy
<<
endl
;
if
(
vm
.
count
(
"lsl-name"
))
info_name
=
vm
[
"lsl-name"
].
as
<
string
>
();
else
...
...
lsldert/zmqaudio
100755 → 100644
View file @
d800b70a
No preview for this file type
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment