aboutsummaryrefslogtreecommitdiffstats
path: root/src/fig/FIG0_13.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-02-21 16:32:45 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-02-21 16:32:45 +0100
commit12f38eb6c66ea34fd062fb3b639f3359a55284fb (patch)
tree73f83cc00be4b4bac3879472126db0447e0f8996 /src/fig/FIG0_13.cpp
parent78b4f04de2975da7b6240983fe1c6a496289a067 (diff)
downloaddabmux-12f38eb6c66ea34fd062fb3b639f3359a55284fb.tar.gz
dabmux-12f38eb6c66ea34fd062fb3b639f3359a55284fb.tar.bz2
dabmux-12f38eb6c66ea34fd062fb3b639f3359a55284fb.zip
Add uatype journaline to config
Diffstat (limited to 'src/fig/FIG0_13.cpp')
-rw-r--r--src/fig/FIG0_13.cpp16
1 files changed, 13 insertions, 3 deletions
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;
+ }
}
}
}