Commit d800b70a authored by Your Name's avatar Your Name
Browse files

modify zmq_trigger_subscriber, add --zmq-proxy option

parent 2166a752
......@@ -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
......
No preview for this file type
......@@ -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
......
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment