summaryrefslogtreecommitdiffstats
path: root/src/DabMux.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-06-13 09:54:38 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-06-13 19:49:13 +0200
commit3c74432709c61a7cb914c51748eb73bbbf35af38 (patch)
tree0078ea1245829e86b24dfaa90ca51061544bcd3e /src/DabMux.cpp
parentc714196bc8e2b3d4ecead22855096753b1b46e40 (diff)
downloaddabmux-3c74432709c61a7cb914c51748eb73bbbf35af38.tar.gz
dabmux-3c74432709c61a7cb914c51748eb73bbbf35af38.tar.bz2
dabmux-3c74432709c61a7cb914c51748eb73bbbf35af38.zip
EDI PFT corrections
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r--src/DabMux.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index eb0ec99..02dadc8 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -28,7 +28,8 @@
#endif
#define EDI_DEBUG 0
-#define EDI_PFT 0
+#define EDI_DUMP 1
+#define EDI_PFT 1
#include <cstdio>
#include <stdlib.h>
@@ -664,6 +665,14 @@ int main(int argc, char *argv[])
etiLog.log(info, "EDI debug set up");
#endif
+ // The TagPacket will then be placed into an AFPacket
+ AFPacketiser edi_afPacketiser(EDI_AFPACKET_PROTOCOLTYPE_TAGITEMS);
+
+#if EDI_PFT
+ // The AF Packet will be protected with reed-solomon and split in fragments
+ PFT edi_pft(207, 3);
+#endif
+
/* Each iteration of the main loop creates one ETI frame */
for (currentFrame = 0; running; currentFrame++) {
if ((limit > 0) && (currentFrame >= limit)) {
@@ -679,17 +688,8 @@ int main(int argc, char *argv[])
// The above Tag Items will be assembled into a TAG Packet
TagPacket edi_tagpacket;
- // The TagPacket will then be placed into an AFPacket
- AFPacketiser edi_afPacketiser(EDI_AFPACKET_PROTOCOLTYPE_TAGITEMS);
-
- // The AF Packet will be protected with reed-solomon and split in fragments
-#if EDI_PFT
- PFT edi_pft(207, 3);
-#endif
-
edi_tagDETI.atstf = 0; // TODO add ATST support
-
date = getDabTime();
// Initialise the ETI frame
@@ -2033,6 +2033,11 @@ int main(int argc, char *argv[])
udppacket.addData(&(edi_frag->front()), edi_frag->size());
edi_output.send(udppacket);
+
+# if EDI_DUMP
+ std::ostream_iterator<uint8_t> debug_iterator(edi_debug_file);
+ std::copy(edi_frag->begin(), edi_frag->end(), debug_iterator);
+# endif
}
fprintf(stderr, "EDI number of PFT fragments %zu\n", edi_fragments.size());