summaryrefslogtreecommitdiffstats
path: root/src/dabOutput/edi
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/dabOutput/edi
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/dabOutput/edi')
-rw-r--r--src/dabOutput/edi/TagItems.cpp4
-rw-r--r--src/dabOutput/edi/TagItems.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dabOutput/edi/TagItems.cpp b/src/dabOutput/edi/TagItems.cpp
index 631b88d..5511efb 100644
--- a/src/dabOutput/edi/TagItems.cpp
+++ b/src/dabOutput/edi/TagItems.cpp
@@ -132,13 +132,13 @@ std::vector<uint8_t> TagDETI::Assemble()
return packet;
}
-void TagDETI::set_edi_time(const std::chrono::system_clock::time_point& t, int tai_utc_offset)
+void TagDETI::set_edi_time(const std::time_t t, int tai_utc_offset)
{
utco = tai_utc_offset - 32;
const std::time_t posix_timestamp_1_jan_2000 = 946684800;
- seconds = std::chrono::system_clock::to_time_t(t) - posix_timestamp_1_jan_2000 + utco;
+ seconds = t - posix_timestamp_1_jan_2000 + utco;
}
std::vector<uint8_t> TagESTn::Assemble()
diff --git a/src/dabOutput/edi/TagItems.h b/src/dabOutput/edi/TagItems.h
index 8666053..0559bf3 100644
--- a/src/dabOutput/edi/TagItems.h
+++ b/src/dabOutput/edi/TagItems.h
@@ -86,7 +86,7 @@ class TagDETI : public TagItem
uint8_t utco = 0;
/* Update the EDI time. t is in UTC */
- void set_edi_time(const std::chrono::system_clock::time_point &t, int tai_utc_offset);
+ void set_edi_time(const std::time_t t, int tai_utc_offset);
/* The number of SI seconds since 2000-01-01 T 00:00:00 UTC as an
* unsigned 32-bit quantity. Contrary to POSIX, this value also