diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-08-22 20:42:34 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-08-22 20:42:34 +0200 |
commit | 289f61e5023758f1ca805d19be5f2c19757090e3 (patch) | |
tree | 49577f82f450d56f2962ecbfbd0237034774a2c2 /src/fig/FIG0.h | |
parent | 1f4a861853f37fccbd0aa25a9f1b6457117ee85c (diff) | |
download | dabmux-289f61e5023758f1ca805d19be5f2c19757090e3.tar.gz dabmux-289f61e5023758f1ca805d19be5f2c19757090e3.tar.bz2 dabmux-289f61e5023758f1ca805d19be5f2c19757090e3.zip |
Switch FIG0/10 to long form
The latest draft specification deprecates the short form, and most
muxes today used the long form.
Diffstat (limited to 'src/fig/FIG0.h')
-rw-r--r-- | src/fig/FIG0.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/fig/FIG0.h b/src/fig/FIG0.h index a096d57..59ed1af 100644 --- a/src/fig/FIG0.h +++ b/src/fig/FIG0.h @@ -428,9 +428,10 @@ struct FIGtype0_9 { } PACKED; -struct FIGtype0_10 { +struct FIGtype0_10_LongForm { uint8_t Length:5; uint8_t FIGtypeNumber:3; + uint8_t Extension:5; uint8_t PD:1; uint8_t OE:1; @@ -438,14 +439,23 @@ struct FIGtype0_10 { uint8_t MJD_high:7; uint8_t RFU:1; + uint8_t MJD_med; + uint8_t Hours_high:3; uint8_t UTC:1; uint8_t ConfInd:1; uint8_t LSI:1; uint8_t MJD_low:2; + uint8_t Minutes:6; uint8_t Hours_low:2; + + uint8_t Milliseconds_high:2; + uint8_t Seconds:6; + + uint8_t Milliseconds_low; + void setMJD(uint32_t date) { MJD_high = (date >> 10) & 0x7f; MJD_med = (date >> 2) & 0xff; @@ -455,6 +465,11 @@ struct FIGtype0_10 { Hours_high = (hours >> 2) & 0x07; Hours_low = hours & 0x03; } + + void setMilliseconds(uint16_t ms) { + Milliseconds_high = (ms >> 8) & 0x03; + Milliseconds_low = ms & 0xFF; + } } PACKED; |