aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabModulator.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-06 11:35:35 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-06 11:35:35 +0100
commit3633bcc99aedda5d9ea36c143fa339139c763d3e (patch)
tree6c296bee8cfb6aabb292fe6fc040708c7e4d2e7a /src/DabModulator.cpp
parent67c82c97dfcfc68d4bd71f5773d21c34c8733c83 (diff)
downloaddabmod-3633bcc99aedda5d9ea36c143fa339139c763d3e.tar.gz
dabmod-3633bcc99aedda5d9ea36c143fa339139c763d3e.tar.bz2
dabmod-3633bcc99aedda5d9ea36c143fa339139c763d3e.zip
Replace EDI-to-ETI converter with a dedicated EDI source
Diffstat (limited to 'src/DabModulator.cpp')
-rw-r--r--src/DabModulator.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp
index 6c28a2e..cbe8f07 100644
--- a/src/DabModulator.cpp
+++ b/src/DabModulator.cpp
@@ -3,7 +3,7 @@
Her Majesty the Queen in Right of Canada (Communications Research
Center Canada)
- Copyright (C) 2015
+ Copyright (C) 2016
Matthias P. Braendli, matthias.braendli@mpb.li
http://opendigitalradio.org
@@ -55,21 +55,21 @@
#include "Log.h"
DabModulator::DabModulator(
- double& tist_offset_s, unsigned tist_delay_stages,
+ EtiSource& etiSource,
tii_config_t& tiiConfig,
unsigned outputRate, unsigned clockRate,
unsigned dabMode, GainMode gainMode,
float& digGain, float normalise,
const std::string& filterTapsFilename
) :
- ModCodec(),
+ ModInput(),
myOutputRate(outputRate),
myClockRate(clockRate),
myDabMode(dabMode),
myGainMode(gainMode),
myDigGain(digGain),
myNormalise(normalise),
- myEtiReader(tist_offset_s, tist_delay_stages),
+ myEtiSource(etiSource),
myFlowgraph(NULL),
myFilterTapsFilename(filterTapsFilename),
myTiiConfig(tiiConfig)
@@ -134,16 +134,14 @@ void DabModulator::setMode(unsigned mode)
}
-int DabModulator::process(Buffer* const dataIn, Buffer* dataOut)
+int DabModulator::process(Buffer* dataOut)
{
using namespace std;
- PDEBUG("DabModulator::process(dataIn: %p, dataOut: %p)\n",
- dataIn, dataOut);
+ PDEBUG("DabModulator::process(dataOut: %p)\n", dataOut);
- myEtiReader.process(dataIn);
if (myFlowgraph == NULL) {
- unsigned mode = myEtiReader.getMode();
+ unsigned mode = myEtiSource.getMode();
if (myDabMode != 0) {
mode = myDabMode;
} else if (mode == 0) {
@@ -156,10 +154,8 @@ int DabModulator::process(Buffer* const dataIn, Buffer* dataOut)
// CIF data initialisation
////////////////////////////////////////////////////////////////
auto cifPrbs = make_shared<PrbsGenerator>(864 * 8, 0x110);
- auto cifMux = make_shared<FrameMultiplexer>(
- myFicSizeOut + 864 * 8, myEtiReader.getSubchannels());
-
- auto cifPart = make_shared<BlockPartitioner>(mode, myEtiReader.getFp());
+ auto cifMux = make_shared<FrameMultiplexer>(myEtiSource);
+ auto cifPart = make_shared<BlockPartitioner>(mode, myEtiSource.getFp());
auto cifMap = make_shared<QpskSymbolMapper>(myNbCarriers);
auto cifRef = make_shared<PhaseReference>(mode);
@@ -229,7 +225,7 @@ int DabModulator::process(Buffer* const dataIn, Buffer* dataOut)
////////////////////////////////////////////////////////////////
// Processing FIC
////////////////////////////////////////////////////////////////
- shared_ptr<FicSource> fic(myEtiReader.getFic());
+ shared_ptr<FicSource> fic(myEtiSource.getFic());
////////////////////////////////////////////////////////////////
// Data initialisation
////////////////////////////////////////////////////////////////
@@ -269,7 +265,7 @@ int DabModulator::process(Buffer* const dataIn, Buffer* dataOut)
////////////////////////////////////////////////////////////////
// Configuring subchannels
////////////////////////////////////////////////////////////////
- for (const auto& subchannel : myEtiReader.getSubchannels()) {
+ for (const auto& subchannel : myEtiSource.getSubchannels()) {
////////////////////////////////////////////////////////////
// Data initialisation