summaryrefslogtreecommitdiffstats
path: root/src/fig/FIG0_6.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-04-22 05:18:40 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-04-22 05:18:40 +0200
commit2009dcd0494a671e2492aa865e690446388c7a5a (patch)
tree76b2da61393d8f4dbacef2d4474fdee5ea42e056 /src/fig/FIG0_6.cpp
parentdd14214e1ad46b9fa323be7e7e13c55c30085a67 (diff)
downloaddabmux-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_6.cpp')
-rw-r--r--src/fig/FIG0_6.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/fig/FIG0_6.cpp b/src/fig/FIG0_6.cpp
index 5174ec2..51df05b 100644
--- a/src/fig/FIG0_6.cpp
+++ b/src/fig/FIG0_6.cpp
@@ -23,11 +23,38 @@
along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "fig/FIG0structs.h"
#include "fig/FIG0_6.h"
#include "utils.h"
namespace FIC {
+struct FIGtype0_6 {
+ uint8_t LSN_high:4; // Linkage Set Number
+ uint8_t ILS:1; // 0=national / 1=international
+ uint8_t SH:1; // 0=Soft link / 1=Hard link
+ uint8_t LA:1; // Linkage actuator
+ uint8_t IdListFlag:1; // Marks the presence of the list
+
+ uint8_t LSN_low; // Linkage Set Number
+
+ void setLSN(uint16_t LSN) {
+ LSN_high = LSN >> 8;
+ LSN_low = LSN & 0xff;
+ }
+} PACKED;
+
+#define FIG0_6_IDLQ_DAB 0x0
+#define FIG0_6_IDLQ_RDS 0x1
+#define FIG0_6_IDLQ_DRM_AMSS 0x3
+
+struct FIGtype0_6_header {
+ uint8_t num_ids:4; // number of Ids to follow in the list
+ uint8_t rfa:1; // must be 0
+ uint8_t IdLQ:2; // Identifier List Qualifier, see above defines
+ uint8_t rfu:1; // must be 0
+} PACKED;
+
FIG0_6::FIG0_6(FIGRuntimeInformation *rti) :
m_rti(rti),
m_initialised(false)