From e7ad2e1fab9c51189fdc8b4f2d81f625da9dd422 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 29 Oct 2016 22:09:13 +0200 Subject: Modernise PRBS generator and remove code for cmd line parser --- src/ConfigParser.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ConfigParser.cpp') diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 0ba1d78..8e5fed1 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -3,7 +3,7 @@ 2011, 2012 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2014, 2015 + Copyright (C) 2016 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -742,6 +742,12 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan, #endif // defined(HAVE_INPUT_UDP) #endif // defined(HAVE_FORMAT_BRIDGE) } + } else if (type == "data" and proto == "prbs") { + input_is_old_style = false; + + subchan->input = new DabInputPrbs(); + subchan->type = subchannel_type_t::DataDmb; + subchan->bitrate = DEFAULT_DATA_BITRATE; } else if (type == "data") { // TODO default proto should be udp:// if (0) { @@ -749,10 +755,6 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan, } else if (proto == "udp") { operations = dabInputUdpOperations; #endif -#if defined(HAVE_INPUT_PRBS) && defined(HAVE_FORMAT_RAW) - } else if (proto == "prbs") { - operations = dabInputPrbsOperations; -#endif #if defined(HAVE_INPUT_FILE) && defined(HAVE_FORMAT_RAW) } else if (proto == "file") { operations = dabInputRawFileOperations; @@ -761,7 +763,7 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan, operations = dabInputRawFifoOperations; } else { stringstream ss; - ss << "Subchannel with uid " << subchanuid << + ss << "Subchannel with uid " << subchanuid << ": Invalid protocol for data input (" << proto << ")" << endl; throw runtime_error(ss.str()); -- cgit v1.2.3