Expand description
UTC time and duration codecs for DVB wire fields.
DVB carries wall-clock time as a 16-bit Modified Julian Date plus 24-bit BCD
HHMMSS (EN 300 468 Annex C), and event durations as 24-bit BCD HHMMSS. The
duration codec is dependency-free; the MJD↔calendar conversion needs a date
library and so lives behind the chrono feature.
Functions§
- decode_
bcd_ duration - Decode a 24-bit BCD
HHMMSSduration ([HH, MM, SS]) to aDuration. - decode_
mjd_ bcd_ utc chrono - Decode a 5-byte DVB UTC time (16-bit MJD + 24-bit BCD
HHMMSS) to achrono::DateTime<chrono::Utc>. - encode_
bcd_ duration - Encode a whole-second
Durationto a 24-bit BCDHHMMSS([HH, MM, SS]). - encode_
mjd_ bcd_ utc chrono - Encode a
chrono::DateTime<chrono::Utc>to a 5-byte DVB UTC time (16-bit MJD + 24-bit BCDHHMMSS). - mjd_
to_ ymd chrono - Convert a 16-bit Modified Julian Date to
(year, month, day). - ymd_
to_ mjd chrono - Convert a
(year, month, day)date to a 16-bit Modified Julian Date.