summaryrefslogtreecommitdiffstats
path: root/src/DabMux.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-17 17:48:22 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-20 21:39:37 +0200
commit8a4f546b85d0887d1d5af0a428753c7d31304b72 (patch)
tree220fddd2933e3b0ab93944552d44fe904a34e2ec /src/DabMux.cpp
parent598bee55402280ff4ca6dedcbd212017a57e482e (diff)
downloaddabmux-8a4f546b85d0887d1d5af0a428753c7d31304b72.tar.gz
dabmux-8a4f546b85d0887d1d5af0a428753c7d31304b72.tar.bz2
dabmux-8a4f546b85d0887d1d5af0a428753c7d31304b72.zip
add non-working PFT layer
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r--src/DabMux.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 3859734..6003c48 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -116,6 +116,7 @@ typedef DWORD32 uint32_t;
#include "dabOutput/edi/TagItems.h"
#include "dabOutput/edi/TagPacket.h"
#include "dabOutput/edi/AFPacket.h"
+#include "dabOutput/edi/PFT.h"
#include "crc.h"
#include "UdpSocket.h"
#include "InetAddress.h"
@@ -673,7 +674,10 @@ int main(int argc, char *argv[])
TagPacket edi_tagpacket;
// The TagPacket will then be placed into an AFPacket
- AFPacketiser edi_afPacket(EDI_AFPACKET_PROTOCOLTYPE_TAGITEMS);
+ AFPacketiser edi_afPacketiser(EDI_AFPACKET_PROTOCOLTYPE_TAGITEMS);
+
+ // The AF Packet will be protected with reed-solomon and split in fragments
+ PFT edi_pft(128, 3);
edi_tagDETI.atstf = 0; // TODO add ATST support
@@ -1954,11 +1958,14 @@ int main(int argc, char *argv[])
edi_tagpacket.tag_items.push_back(&(*tag));
}
- vector<uint8_t> edi_afpacketData = edi_afPacket.Assemble(edi_tagpacket);
+ AFPacket edi_afpacket = edi_afPacketiser.Assemble(edi_tagpacket);
+
+ vector< vector<uint8_t> > edi_fragments = edi_pft.ProtectAndFragment(edi_afpacket);
#if EDI_DEBUG
std::ostream_iterator<uint8_t> debug_iterator(edi_debug_file);
- std::copy(edi_afpacketData.begin(), edi_afpacketData.end(), debug_iterator);
+ std::copy(edi_afpacket.begin(), edi_afpacket.end(), debug_iterator);
+ fprintf(stderr, "EDI number of fragments %zu\n", edi_fragments.size());
#endif
#if _DEBUG