diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-04-22 05:18:40 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-04-22 05:18:40 +0200 |
commit | 2009dcd0494a671e2492aa865e690446388c7a5a (patch) | |
tree | 76b2da61393d8f4dbacef2d4474fdee5ea42e056 /src/fig/FIG0_2.cpp | |
parent | dd14214e1ad46b9fa323be7e7e13c55c30085a67 (diff) | |
download | dabmux-2009dcd0494a671e2492aa865e690446388c7a5a.tar.gz dabmux-2009dcd0494a671e2492aa865e690446388c7a5a.tar.bz2 dabmux-2009dcd0494a671e2492aa865e690446388c7a5a.zip |
Move all FIG structures to cpp files, fix FIG0_21 rfa
Diffstat (limited to 'src/fig/FIG0_2.cpp')
-rw-r--r-- | src/fig/FIG0_2.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/fig/FIG0_2.cpp b/src/fig/FIG0_2.cpp index 04bff60..0e5c13c 100644 --- a/src/fig/FIG0_2.cpp +++ b/src/fig/FIG0_2.cpp @@ -23,11 +23,68 @@ along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>. */ +#include "fig/FIG0structs.h" #include "fig/FIG0_2.h" #include "utils.h" namespace FIC { +struct FIGtype0_2 { + uint8_t Length:5; + uint8_t FIGtypeNumber:3; + uint8_t Extension:5; + uint8_t PD:1; + uint8_t OE:1; + uint8_t CN:1; +} PACKED; + + +struct FIGtype0_2_Service { + uint16_t SId; + uint8_t NbServiceComp:4; + uint8_t CAId:3; + uint8_t Local_flag:1; +} PACKED; + + +struct FIGtype0_2_Service_data { + uint32_t SId; + uint8_t NbServiceComp:4; + uint8_t CAId:3; + uint8_t Local_flag:1; +} PACKED; + + +struct FIGtype0_2_audio_component { + uint8_t ASCTy:6; + uint8_t TMid:2; + uint8_t CA_flag:1; + uint8_t PS:1; + uint8_t SubChId:6; +} PACKED; + + +struct FIGtype0_2_data_component { + uint8_t DSCTy:6; + uint8_t TMid:2; + uint8_t CA_flag:1; + uint8_t PS:1; + uint8_t SubChId:6; +} PACKED; + + +struct FIGtype0_2_packet_component { + uint8_t SCId_high:6; + uint8_t TMid:2; + uint8_t CA_flag:1; + uint8_t PS:1; + uint8_t SCId_low:6; + void setSCId(uint16_t SCId) { + SCId_high = SCId >> 6; + SCId_low = SCId & 0x3f; + } +} PACKED; + FIG0_2::FIG0_2(FIGRuntimeInformation *rti) : m_rti(rti), m_initialised(false), |