aboutsummaryrefslogtreecommitdiffstats
path: root/src/TimestampDecoder.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-13 16:15:57 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-13 16:15:57 +0100
commit7c8ae25ba83fc658dfbe4cd468bb1bdfd3513c74 (patch)
tree642bf09c71e44271245d077442c3f8fd620fd18f /src/TimestampDecoder.h
parentea5594186bafa5489d6086a26d71b8f3d1ccf9cd (diff)
downloaddabmod-7c8ae25ba83fc658dfbe4cd468bb1bdfd3513c74.tar.gz
dabmod-7c8ae25ba83fc658dfbe4cd468bb1bdfd3513c74.tar.bz2
dabmod-7c8ae25ba83fc658dfbe4cd468bb1bdfd3513c74.zip
Integrate timestampdecoder into EDI input
Diffstat (limited to 'src/TimestampDecoder.h')
-rw-r--r--src/TimestampDecoder.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h
index 29e12c2..a822ee5 100644
--- a/src/TimestampDecoder.h
+++ b/src/TimestampDecoder.h
@@ -2,7 +2,7 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Her Majesty the
Queen in Right of Canada (Communications Research Center Canada)
- Copyright (C) 2014, 2015
+ Copyright (C) 2017
Matthias P. Braendli, matthias.braendli@mpb.li
http://opendigitalradio.org
@@ -24,8 +24,7 @@
along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef TIMESTAMP_DECODER_H
-#define TIMESTAMP_DECODER_H
+#pragma once
#include <queue>
#include <memory>
@@ -97,7 +96,8 @@ struct frame_timestamp
}
};
-/* This module decodes MNSC time information */
+/* This module decodes MNSC time information from an ETI source and
+ * EDI time information*/
class TimestampDecoder : public RemoteControllable
{
public:
@@ -135,13 +135,19 @@ class TimestampDecoder : public RemoteControllable
/* Calculate the timestamp for the current frame. */
void calculateTimestamp(struct frame_timestamp& ts);
- /* Update timestamp data from data in ETI */
+ /* Update timestamp data from ETI */
void updateTimestampEti(
int framephase,
uint16_t mnsc,
uint32_t pps, // In units of 1/16384000 s
int32_t fct);
+ /* Update timestamp data from EDI */
+ void updateTimestampEdi(
+ uint32_t seconds_utc,
+ uint32_t pps, // In units of 1/16384000 s
+ int32_t fct);
+
/*********** REMOTE CONTROL ***************/
/* Base function to set parameters. */
@@ -199,5 +205,4 @@ class TimestampDecoder : public RemoteControllable
};
-#endif