From 685095418bc8fd27dcd0b1d73ad1741114aeda6a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 14 Sep 2014 00:08:53 +0200 Subject: 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. --- src/TimestampDecoder.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/TimestampDecoder.cpp') diff --git a/src/TimestampDecoder.cpp b/src/TimestampDecoder.cpp index d6c627f..1bb4dd2 100644 --- a/src/TimestampDecoder.cpp +++ b/src/TimestampDecoder.cpp @@ -2,8 +2,10 @@ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 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. @@ -45,6 +47,7 @@ void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts) ts_queued->timestamp_valid = full_timestamp_received_mnsc; ts_queued->timestamp_sec = time_secs; ts_queued->timestamp_pps_offset = time_pps; + ts_queued->fct = latestFCT; ts_queued->timestamp_refresh = offset_changed; offset_changed = false; @@ -65,6 +68,7 @@ void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts) ts.timestamp_sec = 0; ts.timestamp_pps_offset = 0; ts.timestamp_refresh = false; + ts.fct = 0; } else { //fprintf(stderr, ". %zu ", queue_timestamps.size()); @@ -179,13 +183,17 @@ void TimestampDecoder::updateTimestampPPS(double pps) } time_pps = pps; - } -void TimestampDecoder::updateTimestampEti(int framephase, uint16_t mnsc, double pps) +void TimestampDecoder::updateTimestampEti( + int framephase, + uint16_t mnsc, + double pps, + uint32_t fct) { updateTimestampPPS(pps); pushMNSCData(framephase, mnsc); + latestFCT = fct; } -- cgit v1.2.3