From 7e3e3f290e9fbbd314919474ed7bc61c3ce43041 Mon Sep 17 00:00:00 2001 From: Jörgen Scott Date: Tue, 16 Dec 2014 14:49:57 +0100 Subject: added zmq controller to uhd --- src/DabMod.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/DabMod.cpp') 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 #include #include +#include #ifdef HAVE_NETINET_IN_H # include @@ -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) { -- cgit v1.2.3