aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/advanced.mux3
-rw-r--r--src/ConfigParser.cpp4
-rw-r--r--src/fig/FIG0_13.cpp16
-rw-r--r--src/fig/FIG0structs.h2
4 files changed, 21 insertions, 4 deletions
diff --git a/doc/advanced.mux b/doc/advanced.mux
index 61328d7..95e6902 100644
--- a/doc/advanced.mux
+++ b/doc/advanced.mux
@@ -332,6 +332,9 @@ components {
; 0xFF "unrestricted profile"
; Only for packet-mode, not X-PAD.
userapp "website"
+
+ ; Journaline, adds uaType 0x44a and user application data 0x00 0x00 (TS 102 979 Clause 8.1.2)
+ userapp "journaline"
}
; Deprecated figtype setting:
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index a845bef..74e627b 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -833,6 +833,10 @@ void parse_ptree(
ua.uaType = FIG0_13_APPTYPE_WEBSITE;
ua.xpadAppType = 12;
}
+ else if (ua_value == "journaline") {
+ ua.uaType = FIG0_13_APPTYPE_JOURNALINE;
+ ua.xpadAppType = 12;
+ }
if (component->isPacketComponent(ensemble->subchannels)) {
component->packet.uaTypes.push_back(ua);
diff --git a/src/fig/FIG0_13.cpp b/src/fig/FIG0_13.cpp
index 4233302..097b2ae 100644
--- a/src/fig/FIG0_13.cpp
+++ b/src/fig/FIG0_13.cpp
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2022
+ Copyright (C) 2024
Matthias P. Braendli, matthias.braendli@mpb.li
*/
/*
@@ -122,7 +122,8 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size)
if (ua.uaType == FIG0_13_APPTYPE_SPI) {
required_size += 1;
}
- else if (ua.uaType == FIG0_13_APPTYPE_WEBSITE) {
+ else if (ua.uaType == FIG0_13_APPTYPE_WEBSITE ||
+ ua.uaType == FIG0_13_APPTYPE_JOURNALINE) {
required_size += 2;
}
}
@@ -171,7 +172,8 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size)
if (ua.uaType == FIG0_13_APPTYPE_SPI) {
app->length += 1;
}
- else if (ua.uaType == FIG0_13_APPTYPE_WEBSITE) {
+ else if (ua.uaType == FIG0_13_APPTYPE_WEBSITE ||
+ ua.uaType == FIG0_13_APPTYPE_JOURNALINE) {
app->length += 2;
}
@@ -211,6 +213,14 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size)
remaining -= 2;
fig0->Length += 2;
}
+ else if (ua.uaType == FIG0_13_APPTYPE_JOURNALINE) {
+ // According to ETSI TS 102 979 Clause 8.1.2
+ buf[0] = 0x00;
+ buf[1] = 0x00;
+ buf += 2;
+ remaining -= 2;
+ fig0->Length += 2;
+ }
}
}
}
diff --git a/src/fig/FIG0structs.h b/src/fig/FIG0structs.h
index a82e59e..eb77df4 100644
--- a/src/fig/FIG0structs.h
+++ b/src/fig/FIG0structs.h
@@ -38,7 +38,7 @@
#define FIG0_13_APPTYPE_TMC 0x6
#define FIG0_13_APPTYPE_SPI 0x7
#define FIG0_13_APPTYPE_DABJAVA 0x8
-#define FIG0_13_APPTYPE_JOURNALINE 0x441
+#define FIG0_13_APPTYPE_JOURNALINE 0x44a
struct FIGtype0 {