summaryrefslogtreecommitdiffstats
path: root/src/SubchannelSource.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/SubchannelSource.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/SubchannelSource.cpp')
-rw-r--r--src/SubchannelSource.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/SubchannelSource.cpp b/src/SubchannelSource.cpp
index 7632de5..82636f9 100644
--- a/src/SubchannelSource.cpp
+++ b/src/SubchannelSource.cpp
@@ -65,11 +65,15 @@ const std::vector<PuncturingRule>& SubchannelSource::get_rules() const
}
-SubchannelSource::SubchannelSource(eti_STC &stc) :
+SubchannelSource::SubchannelSource(
+ uint8_t sad,
+ uint16_t stl,
+ uint8_t tpl
+ ) :
ModInput(),
- d_start_address(stc.getStartAddress()),
- d_framesize(stc.getSTL() * 8),
- d_protection(stc.TPL)
+ d_start_address(sad),
+ d_framesize(stl * 8),
+ d_protection(tpl)
{
PDEBUG("SubchannelSource::SubchannelSource(...) @ %p\n", this);
PDEBUG(" Start address: %zu\n", d_start_address);
@@ -109,7 +113,7 @@ SubchannelSource::SubchannelSource(eti_STC &stc) :
fprintf(stderr,
"Protection form(%zu), option(%zu) and level(%zu)\n",
protectionForm(), protectionOption(), protectionLevel());
- fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", stc.TPL, stc.TPL);
+ fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", tpl, tpl);
throw std::runtime_error("SubchannelSource::SubchannelSource "
"unknown protection level!");
}
@@ -143,7 +147,7 @@ SubchannelSource::SubchannelSource(eti_STC &stc) :
fprintf(stderr,
"Protection form(%zu), option(%zu) and level(%zu)\n",
protectionForm(), protectionOption(), protectionLevel());
- fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", stc.TPL, stc.TPL);
+ fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", tpl, tpl);
throw std::runtime_error("SubchannelSource::SubchannelSource "
"unknown protection level!");
}
@@ -151,7 +155,7 @@ SubchannelSource::SubchannelSource(eti_STC &stc) :
fprintf(stderr,
"Protection form(%zu), option(%zu) and level(%zu)\n",
protectionForm(), protectionOption(), protectionLevel());
- fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", stc.TPL, stc.TPL);
+ fprintf(stderr, "Subchannel TPL: 0x%x (%u)\n", tpl, tpl);
throw std::runtime_error("SubchannelSource::SubchannelSource "
"unknown protection option!");
}