summaryrefslogtreecommitdiffstats
path: root/src/DabMultiplexer.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-18 11:46:12 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-18 11:46:12 +0100
commitfd33dd4329b591cc72ef30f1cefd9eb05cb1e560 (patch)
treede8a74b43ac93de31c0b3f1fd3bc434efc0ffa09 /src/DabMultiplexer.h
parenteb15f7fc5e461c71a8d397d8fb34c27976876946 (diff)
downloaddabmux-fd33dd4329b591cc72ef30f1cefd9eb05cb1e560.tar.gz
dabmux-fd33dd4329b591cc72ef30f1cefd9eb05cb1e560.tar.bz2
dabmux-fd33dd4329b591cc72ef30f1cefd9eb05cb1e560.zip
Rework timestamping
* Ensure MNSC and EDI carry the same timestamp * Rename `edi_tistoffset` to `tist_offset` * Remove conditional compilation of EDI output * Reset PPS so as to align ETI frames across mux restarts
Diffstat (limited to 'src/DabMultiplexer.h')
-rw-r--r--src/DabMultiplexer.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/DabMultiplexer.h b/src/DabMultiplexer.h
index 127ecfb..7090be7 100644
--- a/src/DabMultiplexer.h
+++ b/src/DabMultiplexer.h
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2016
+ Copyright (C) 2019
Matthias P. Braendli, matthias.braendli@mpb.li
*/
/*
@@ -80,26 +80,25 @@ class DabMultiplexer : public RemoteControllable {
void prepare_subchannels(void);
void prepare_services_components(void);
void prepare_data_inputs(void);
+ void increment_timestamp(void);
boost::property_tree::ptree m_pt;
- unsigned timestamp;
- bool MNSC_increment_time;
- struct timeval mnsc_time;
- std::chrono::system_clock::time_point edi_time;
+ unsigned timestamp = 0;
+ std::time_t edi_time;
+ std::time_t edi_time_latched_for_mnsc;
edi_configuration_t edi_conf;
- uint32_t sync;
- unsigned long currentFrame;
+ uint32_t sync = 0x49C5F8;
+ unsigned long currentFrame = 0;
std::shared_ptr<dabEnsemble> ensemble;
- int m_tist_edioffset = 0;
- bool m_tai_clock_required;
+ int m_tist_offset = 0;
+ bool m_tai_clock_required = false;
ClockTAI m_clock_tai;
-#if HAVE_OUTPUT_EDI
std::ofstream edi_debug_file;
// The TagPacket will then be placed into an AFPacket
@@ -110,7 +109,6 @@ class DabMultiplexer : public RemoteControllable {
// To mitigate for burst packet loss, PFT fragments can be sent out-of-order
edi::Interleaver edi_interleaver;
-#endif // HAVE_OUTPUT_EDI
/* New FIG Carousel */
FIC::FIGCarousel fig_carousel;