diff options
author | Matthias (think) <matthias@mpb.li> | 2012-07-11 12:00:56 +0200 |
---|---|---|
committer | Matthias (think) <matthias@mpb.li> | 2012-07-11 12:00:56 +0200 |
commit | 4b814d92fe9787bf72ed3a9632e0866f4cedd27f (patch) | |
tree | feb407e9f2c0658dda896c332864fe6d265aaece /src/EtiReader.h | |
parent | e92f9c408634810828e75d4ad6da408e1c142195 (diff) | |
download | dabmod-4b814d92fe9787bf72ed3a9632e0866f4cedd27f.tar.gz dabmod-4b814d92fe9787bf72ed3a9632e0866f4cedd27f.tar.bz2 dabmod-4b814d92fe9787bf72ed3a9632e0866f4cedd27f.zip |
added crc-dabmod patch
Diffstat (limited to 'src/EtiReader.h')
-rw-r--r-- | src/EtiReader.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/EtiReader.h b/src/EtiReader.h index 7e172db..5f4897b 100644 --- a/src/EtiReader.h +++ b/src/EtiReader.h @@ -1,6 +1,9 @@ /* 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 */ /* This file is part of CRC-DADMOD. @@ -30,6 +33,7 @@ #include "Eti.h" #include "FicSource.h" #include "SubchannelSource.h" +#include "TimestampDecoder.h" #include <vector> #include <stdint.h> @@ -51,21 +55,39 @@ protected: eti_TIST eti_tist; FicSource* myFicSource; std::vector<SubchannelSource*> mySources; + TimestampDecoder* myTimestampDecoder; public: - EtiReader(); + EtiReader(struct modulator_offset_config& modconf); virtual ~EtiReader(); EtiReader(const EtiReader&); EtiReader& operator=(const EtiReader&); FicSource* getFic(); unsigned getMode(); - unsigned getFct(); + unsigned getFp(); const std::vector<SubchannelSource*>& getSubchannels(); int process(Buffer* dataIn); + void calculateTimestamp(struct frame_timestamp& ts) + { + myTimestampDecoder->calculateTimestamp(ts); + } + + /* Return the frame counter */ + uint32_t getFCT(); + + /* Returns true if we have valid time stamps in the ETI*/ + bool sourceContainsTimestamp(); + +protected: + /* Transform the ETI TIST to a PPS offset in ms */ + double getPPSOffset(); + private: size_t myCurrentFrame; + bool time_ext_enabled; + unsigned long timestamp_seconds; }; |