aboutsummaryrefslogtreecommitdiffstats
path: root/src/EtiReader.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-09-14 00:08:53 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-09-14 00:08:53 +0200
commit685095418bc8fd27dcd0b1d73ad1741114aeda6a (patch)
tree5d959800a98b294cdc08278c8eaf181730190e07 /src/EtiReader.cpp
parent0b7bc4a405ea4d6f24fade9420e9919420c64d8e (diff)
downloaddabmod-685095418bc8fd27dcd0b1d73ad1741114aeda6a.tar.gz
dabmod-685095418bc8fd27dcd0b1d73ad1741114aeda6a.tar.bz2
dabmod-685095418bc8fd27dcd0b1d73ad1741114aeda6a.zip
SFN: carry FCT along with timestamps
This is the first step to fix issue #6. The goal is to enable the OutputUHD to check for FCT consistency. Once it can do that, it will also be able to reset the UHD streamer if necessary.
Diffstat (limited to 'src/EtiReader.cpp')
-rw-r--r--src/EtiReader.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp
index b61481c..f7376cc 100644
--- a/src/EtiReader.cpp
+++ b/src/EtiReader.cpp
@@ -2,8 +2,10 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty
the Queen in Right of Canada (Communications Research Center Canada)
- Includes modifications for which no copyright is claimed
- 2012, Matthias P. Braendli, matthias.braendli@mpb.li
+ Copyright (C) 2014
+ Matthias P. Braendli, matthias.braendli@mpb.li
+
+ http://opendigitalradio.org
*/
/*
This file is part of ODR-DabMod.
@@ -269,18 +271,17 @@ int EtiReader::process(Buffer* dataIn)
}
break;
default:
- // throw std::runtime_error("Invalid state!");
+ // throw std::runtime_error("Invalid state!");
PDEBUG("Invalid state (%i)!", state);
input_size = 0;
}
}
-
+
// Update timestamps
myTimestampDecoder.updateTimestampEti(eti_fc.FP & 0x3,
- eti_eoh.MNSC,
- getPPSOffset());
+ eti_eoh.MNSC, getPPSOffset(), eti_fc.FCT);
- if (getFCT() % 125 == 0) //every 3 seconds is fine enough
+ if (eti_fc.FCT % 125 == 0) //every 3 seconds is fine enough
{
myTimestampDecoder.updateModulatorOffset();
}
@@ -306,7 +307,3 @@ double EtiReader::getPPSOffset()
return pps;
}
-uint32_t EtiReader::getFCT()
-{
- return eti_fc.FCT;
-}