From 2009dcd0494a671e2492aa865e690446388c7a5a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 22 Apr 2017 05:18:40 +0200 Subject: Move all FIG structures to cpp files, fix FIG0_21 rfa --- src/fig/FIG0_8.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/fig/FIG0_8.cpp') diff --git a/src/fig/FIG0_8.cpp b/src/fig/FIG0_8.cpp index 2d25547..8d69a1d 100644 --- a/src/fig/FIG0_8.cpp +++ b/src/fig/FIG0_8.cpp @@ -23,11 +23,40 @@ along with ODR-DabMux. If not, see . */ +#include "fig/FIG0structs.h" #include "fig/FIG0_8.h" #include "utils.h" namespace FIC { +struct FIGtype0_8_short { + uint8_t SCIdS:4; + uint8_t rfa_1:3; + uint8_t ext:1; + uint8_t Id:6; + uint8_t MscFic:1; + uint8_t LS:1; + uint8_t rfa_2; +} PACKED; + +struct FIGtype0_8_long { + uint8_t SCIdS:4; + uint8_t rfa_1:3; + uint8_t ext:1; + uint8_t SCId_high:4; + uint8_t rfa:3; + uint8_t LS:1; + uint8_t SCId_low; + uint8_t rfa_2; + void setSCId(uint16_t id) { + SCId_high = id >> 8; + SCId_low = id & 0xff; + } + uint16_t getSCid() { + return (SCId_high << 8) | SCId_low; + } +} PACKED; + FIG0_8::FIG0_8(FIGRuntimeInformation *rti) : m_rti(rti), m_initialised(false), -- cgit v1.2.3