summaryrefslogtreecommitdiffstats
path: root/lib/edi/PFT.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-06 16:22:40 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-06 16:22:40 +0100
commit2dac8f5fa6d63a71a726ec373af9bf45f22de8b7 (patch)
tree3ba060598ad471018d324dff427490ab681c57df /lib/edi/PFT.hpp
parent3633bcc99aedda5d9ea36c143fa339139c763d3e (diff)
downloaddabmod-2dac8f5fa6d63a71a726ec373af9bf45f22de8b7.tar.gz
dabmod-2dac8f5fa6d63a71a726ec373af9bf45f22de8b7.tar.bz2
dabmod-2dac8f5fa6d63a71a726ec373af9bf45f22de8b7.zip
EDI: handle pseq resync and SIGINT
Diffstat (limited to 'lib/edi/PFT.hpp')
-rw-r--r--lib/edi/PFT.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/edi/PFT.hpp b/lib/edi/PFT.hpp
index 9ab14ae..9fb96a7 100644
--- a/lib/edi/PFT.hpp
+++ b/lib/edi/PFT.hpp
@@ -1,6 +1,6 @@
/* ------------------------------------------------------------------
* Copyright (C) 2017 AVT GmbH - Fabien Vercasson
- * Copyright (C) 2016 Matthias P. Braendli
+ * Copyright (C) 2017 Matthias P. Braendli
* matthias.braendli@mpb.li
*
* http://opendigitalradio.org
@@ -22,7 +22,6 @@
#pragma once
#include <stdio.h>
-#include <cassert>
#include <vector>
#include <map>
#include <stdint.h>
@@ -84,7 +83,7 @@ class AFBuilder
no, // Not enough fragments present to permit RS
};
- AFBuilder(pseq_t Pseq, findex_t Fcount, int lifetime);
+ AFBuilder(pseq_t Pseq, findex_t Fcount, size_t lifetime);
void pushPFTFrag(const Fragment &frag);
@@ -105,7 +104,7 @@ class AFBuilder
/* The user of this instance can keep track of the lifetime of this
* builder
*/
- int lifeTime;
+ size_t lifeTime;
private:
@@ -125,7 +124,7 @@ class PFT
void pushPFTFrag(const Fragment &fragment);
/* Try to build the AF packet for the next pseq. This might
- * skip one pseq according to the maximum delay setting.
+ * skip one or more pseq according to the maximum delay setting.
*
* \return an empty vector if building the AF is not possible
*/
@@ -134,15 +133,13 @@ class PFT
/* Set the maximum delay in number of AF Packets before we
* abandon decoding a given pseq.
*/
- void setMaxDelay(int num_af_packets);
+ void setMaxDelay(size_t num_af_packets);
private:
- bool isPacketBuildable(pseq_t pseq) const;
-
void incrementNextPseq(void);
pseq_t m_next_pseq;
- int m_max_delay = 10;
+ size_t m_max_delay = 10;
// Keep one AFBuilder for each Pseq
std::map<pseq_t, AFBuilder> m_afbuilders;