aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMod.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-11 23:24:20 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-11 23:24:29 +0200
commitc3aebce2ba6201a33bdc1f4f65d7ade0f42b7168 (patch)
tree165ad365bcc850627481e352c72e3c31efc099fd /src/DabMod.cpp
parentbdc87feb560d2acb5d309f7f52ec927bc2635992 (diff)
downloaddabmod-c3aebce2ba6201a33bdc1f4f65d7ade0f42b7168.tar.gz
dabmod-c3aebce2ba6201a33bdc1f4f65d7ade0f42b7168.tar.bz2
dabmod-c3aebce2ba6201a33bdc1f4f65d7ade0f42b7168.zip
Add ETI-over-TCP input
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r--src/DabMod.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 6f35e22..904c3c8 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -178,6 +178,8 @@ int launch_modulator(int argc, char* argv[])
auto inputZeroMQReader = make_shared<InputZeroMQReader>();
#endif
+ auto inputTcpReader = make_shared<InputTcpReader>();
+
struct sigaction sa;
memset(&sa, 0, sizeof(struct sigaction));
sa.sa_handler = &signalHandler;
@@ -616,6 +618,9 @@ int launch_modulator(int argc, char* argv[])
// if the name starts with zmq+XYZ://somewhere:port
inputTransport = "zeromq";
}
+ else if (inputName.substr(0, 6) == "tcp://") {
+ inputTransport = "tcp";
+ }
}
else {
inputName = "/dev/stdin";
@@ -705,6 +710,10 @@ int launch_modulator(int argc, char* argv[])
m.inputReader = inputZeroMQReader.get();
#endif
}
+ else if (inputTransport == "tcp") {
+ inputTcpReader->Open(inputName);
+ m.inputReader = inputTcpReader.get();
+ }
else
{
fprintf(stderr, "Error, invalid input transport %s selected!\n", inputTransport.c_str());
@@ -816,6 +825,11 @@ int launch_modulator(int argc, char* argv[])
m.inputReader = inputZeroMQReader.get();
#endif
}
+ else if (inputTransport == "tcp") {
+ inputTcpReader = make_shared<InputTcpReader>();
+ inputTcpReader->Open(inputName);
+ m.inputReader = inputTcpReader.get();
+ }
break;
case run_modulator_state_t::reconfigure:
etiLog.level(warn) << "Detected change in ensemble configuration.";