diff options
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r-- | src/DabMod.cpp | 14 |
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."; |