diff options
author | Jörgen Scott <jorgen.scott@gmail.com> | 2014-12-16 14:49:57 +0100 |
---|---|---|
committer | Jörgen Scott <jorgen.scott@gmail.com> | 2014-12-16 14:49:57 +0100 |
commit | 7e3e3f290e9fbbd314919474ed7bc61c3ce43041 (patch) | |
tree | 186d4a54b6d4c9aa81fd2a4774ae72b6d57a342c /src/DabMod.cpp | |
parent | f4e359f774eef5ec2a006a431a546e915b27f02b (diff) | |
download | dabmod-7e3e3f290e9fbbd314919474ed7bc61c3ce43041.tar.gz dabmod-7e3e3f290e9fbbd314919474ed7bc61c3ce43041.tar.bz2 dabmod-7e3e3f290e9fbbd314919474ed7bc61c3ce43041.zip |
added zmq controller to uhd
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r-- | src/DabMod.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp index ee21ed4..4342522 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -55,6 +55,7 @@ #include <sys/stat.h> #include <stdexcept> #include <signal.h> +#include <zmq.hpp> #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> @@ -189,6 +190,9 @@ int main(int argc, char* argv[]) OutputUHDConfig outputuhd_conf; #endif + zmq::context_t zmqCtrlContext(1); + std::string zmqCtrlEndpoint = ""; + // To handle the timestamp offset of the modulator struct modulator_offset_config modconf; modconf.use_offset_file = false; @@ -363,8 +367,8 @@ int main(int argc, char* argv[]) } } - //std::string zmqCtrlEndpoint = pt.get("remotecontrol.zmqctrlendpoint", ""); - //std::cout << "ZmqCtrlEndpoint: " << zmqCtrlEndpoint << std::endl; + zmqCtrlEndpoint = pt.get("remotecontrol.zmqctrlendpoint", ""); + std::cout << "ZmqCtrlEndpoint: " << zmqCtrlEndpoint << std::endl; // input params: if (pt.get("input.loop", 0) == 1) { @@ -701,7 +705,7 @@ int main(int argc, char* argv[]) outputuhd_conf.sampleRate = outputRate; try { - output = new OutputUHD(outputuhd_conf, logger); + output = new OutputUHD(outputuhd_conf, logger, &zmqCtrlContext, zmqCtrlEndpoint); ((OutputUHD*)output)->enrol_at(*rc); } catch (std::exception& e) { |