aboutsummaryrefslogtreecommitdiffstats
path: root/src/dabOutput/edi/PFT.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-21 17:23:36 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-21 17:23:36 +0200
commitd60b36afc30460f070f25dd8ee8d52b556ea8790 (patch)
tree7b1c9674579bc5de0535ff581e1f6ed99a60a669 /src/dabOutput/edi/PFT.h
parent91aa7a5ee75298f9ded7db18f4ba0156bbfc3bb3 (diff)
downloaddabmux-d60b36afc30460f070f25dd8ee8d52b556ea8790.tar.gz
dabmux-d60b36afc30460f070f25dd8ee8d52b556ea8790.tar.bz2
dabmux-d60b36afc30460f070f25dd8ee8d52b556ea8790.zip
Add PFT Fragment header
Diffstat (limited to 'src/dabOutput/edi/PFT.h')
-rw-r--r--src/dabOutput/edi/PFT.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dabOutput/edi/PFT.h b/src/dabOutput/edi/PFT.h
index 55ca569..49bb7b7 100644
--- a/src/dabOutput/edi/PFT.h
+++ b/src/dabOutput/edi/PFT.h
@@ -41,6 +41,7 @@
#include "ReedSolomon.h"
typedef std::vector<uint8_t> RSPacket;
+typedef std::vector<uint8_t> PFTFragment;
class PFT
{
@@ -50,6 +51,7 @@ class PFT
PFT(unsigned int RSDataWordLength, unsigned int NumRecoverableFragments) :
m_k(RSDataWordLength),
m_m(NumRecoverableFragments),
+ m_pseq(0),
m_encoder(m_k + ParityBytes, m_k)
{
if (m_k > 207) {
@@ -66,6 +68,10 @@ class PFT
}
}
+ // return a list of PFT fragments with the correct
+ // PFT headers
+ std::vector< PFTFragment > Assemble(AFPacket af_packet);
+
// Apply Reed-Solomon FEC to the AF Packet
RSPacket Protect(AFPacket af_packet);
@@ -76,6 +82,8 @@ class PFT
unsigned int m_k; // length of RS data word
unsigned int m_m; // number of fragments that can be recovered if lost
+ uint16_t m_pseq;
+
size_t m_num_chunks;
ReedSolomon m_encoder;