From 7c8ae25ba83fc658dfbe4cd468bb1bdfd3513c74 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 13 Jan 2017 16:15:57 +0100 Subject: Integrate timestampdecoder into EDI input --- src/TimestampDecoder.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/TimestampDecoder.h') 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 . */ -#ifndef TIMESTAMP_DECODER_H -#define TIMESTAMP_DECODER_H +#pragma once #include #include @@ -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 -- cgit v1.2.3