aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fig/FIG0_6.cpp5
-rw-r--r--src/fig/FIG0structs.h23
2 files changed, 18 insertions, 10 deletions
diff --git a/src/fig/FIG0_6.cpp b/src/fig/FIG0_6.cpp
index 20fe78b..7c09078 100644
--- a/src/fig/FIG0_6.cpp
+++ b/src/fig/FIG0_6.cpp
@@ -87,7 +87,7 @@ FillStatus FIG0_6::fill(uint8_t *buf, size_t max_size)
fig0_6->LA = linkageSetFIG0_6->active;
fig0_6->SH = linkageSetFIG0_6->hard;
fig0_6->ILS = ILS;
- fig0_6->LSN = linkageSetFIG0_6->lsn;
+ fig0_6->setLSN(linkageSetFIG0_6->lsn);
fig0->Length += sizeof(struct FIGtype0_6);
buf += sizeof(struct FIGtype0_6);
@@ -125,7 +125,6 @@ FillStatus FIG0_6::fill(uint8_t *buf, size_t max_size)
buf += headersize;
remaining -= headersize;
- // TODO insert key service first
const std::string keyserviceuid = linkageSetFIG0_6->keyservice;
const auto& keyservice = std::find_if(
ensemble->services.begin(),
@@ -208,6 +207,8 @@ void FIG0_6::update()
{
linkageSubsets.clear();
+ // TODO check if AMSS and DRM have to be put into a single subset
+
for (const auto& linkageset : m_rti->ensemble->linkagesets) {
const auto lsn = linkageset->data.lsn;
diff --git a/src/fig/FIG0structs.h b/src/fig/FIG0structs.h
index 4b9b7e0..3b9bfbf 100644
--- a/src/fig/FIG0structs.h
+++ b/src/fig/FIG0structs.h
@@ -153,11 +153,18 @@ struct FIGtype0_5_short {
} PACKED;
struct FIGtype0_6 {
- uint16_t IdListFlag:1;
- uint16_t LA:1; // Linkage actuator
- uint16_t SH:1; // 0=Soft link / 1=Hard link
- uint16_t ILS:1; // 0=national / 1=international
- uint16_t LSN:12; // Linkage Set Number
+ 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
@@ -165,10 +172,10 @@ struct FIGtype0_6 {
#define FIG0_6_IDLQ_DRM_AMSS 0x3
struct FIGtype0_6_header {
- uint8_t rfu:1; // must be 0
- uint8_t IdLQ:2; // Identifier List Qualifier, see above defines
- uint8_t rfa:1; // must be 0
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;
struct FIGtype0_8_short {