aboutsummaryrefslogtreecommitdiffstats
path: root/src/fig/FIG0_6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fig/FIG0_6.cpp')
-rw-r--r--src/fig/FIG0_6.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/fig/FIG0_6.cpp b/src/fig/FIG0_6.cpp
index b7776f4..8af8ded 100644
--- a/src/fig/FIG0_6.cpp
+++ b/src/fig/FIG0_6.cpp
@@ -80,8 +80,11 @@ FillStatus FIG0_6::fill(uint8_t *buf, size_t max_size)
const bool PD = false;
const bool ILS = linkageSetFIG0_6->international;
- // need to add key service to num_ids
- const size_t num_ids = 1 + linkageSetFIG0_6->id_list.size();
+ // need to add key service to num_ids, unless it is empty which means we
+ // send a CEI
+ const size_t num_ids = linkageSetFIG0_6->keyservice.empty() ?
+ // do not transmit list if keyservice empty, it should anyway be empty
+ 0 : (1 + linkageSetFIG0_6->id_list.size());
if (num_ids > 0x0F) {
etiLog.log(error,
@@ -117,7 +120,7 @@ FillStatus FIG0_6::fill(uint8_t *buf, size_t max_size)
FIGtype0_6 *fig0_6 = (FIGtype0_6*)buf;
- fig0_6->IdListFlag = (num_ids > 0);
+ fig0_6->IdListFlag = (num_ids > 0); // C/N=0 and IdListFlag=0 is CEI
fig0_6->LA = linkageSetFIG0_6->active;
fig0_6->SH = linkageSetFIG0_6->hard;
fig0_6->ILS = ILS;
@@ -127,6 +130,10 @@ FillStatus FIG0_6::fill(uint8_t *buf, size_t max_size)
buf += sizeof(struct FIGtype0_6);
remaining -= sizeof(struct FIGtype0_6);
+ etiLog.log(debug,
+ "Linkage set 0x%04x wrote %d",
+ linkageSetFIG0_6->lsn, fig0->Length);
+
if (num_ids > 0) {
FIGtype0_6_header *header = (FIGtype0_6_header*)buf;
header->rfu = 0;
@@ -243,7 +250,10 @@ void FIG0_6::update()
for (const auto& linkageset : m_rti->ensemble->linkagesets) {
const auto lsn = linkageset->lsn;
- for (const auto& link : linkageset->id_list) {
+ if (linkageset->keyservice.empty()) {
+ linkageSubsets.push_back(*linkageset);
+ }
+ else for (const auto& link : linkageset->id_list) {
const auto type = link.type;
const auto subset =