diff options
Diffstat (limited to 'src/fig')
-rw-r--r-- | src/fig/FIG0_13.cpp | 16 | ||||
-rw-r--r-- | src/fig/FIG0structs.h | 2 |
2 files changed, 14 insertions, 4 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; + } } } } 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 { |