summaryrefslogtreecommitdiffstats
path: root/src/fig
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-23 15:52:01 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-23 15:52:01 +0200
commitd6c06c688a7e2843b46156509baa8112442f74e1 (patch)
treea9e1a55dcefd2b006cc560e5141f573c4b71c718 /src/fig
parent02128c92b1cbe5a7c12739872e477e95f0ccf8f5 (diff)
downloaddabmux-d6c06c688a7e2843b46156509baa8112442f74e1.tar.gz
dabmux-d6c06c688a7e2843b46156509baa8112442f74e1.tar.bz2
dabmux-d6c06c688a7e2843b46156509baa8112442f74e1.zip
Update FIG0/17 to EN 300 401 V2.1.1
Diffstat (limited to 'src/fig')
-rw-r--r--src/fig/FIG0.cpp41
-rw-r--r--src/fig/FIG0.h19
2 files changed, 25 insertions, 35 deletions
diff --git a/src/fig/FIG0.cpp b/src/fig/FIG0.cpp
index c9e57dd..9c3509b 100644
--- a/src/fig/FIG0.cpp
+++ b/src/fig/FIG0.cpp
@@ -1014,7 +1014,7 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size)
return fs;
}
-//=========== FIG 0/17 ===========
+//=========== FIG 0/17 PTy ===========
FIG0_17::FIG0_17(FIGRuntimeInformation *rti) :
m_rti(rti),
@@ -1039,12 +1039,11 @@ FillStatus FIG0_17::fill(uint8_t *buf, size_t max_size)
for (; serviceFIG0_17 != ensemble->services.end();
++serviceFIG0_17) {
- if ( (*serviceFIG0_17)->pty == 0 &&
- (*serviceFIG0_17)->language == 0) {
+ if ((*serviceFIG0_17)->pty == 0) {
continue;
}
- const int required_size = (*serviceFIG0_17)->language == 0 ? 4 : 5;
+ const int required_size = 4;
if (fig0 == NULL) {
@@ -1065,27 +1064,19 @@ FillStatus FIG0_17::fill(uint8_t *buf, size_t max_size)
break;
}
- auto programme = (FIGtype0_17_programme*)buf;
- programme->SId = htons((*serviceFIG0_17)->id);
- programme->SD = 1;
- programme->PS = 0;
- programme->L = (*serviceFIG0_17)->language != 0;
- programme->CC = 0;
- programme->Rfa = 0;
- programme->NFC = 0;
- if ((*serviceFIG0_17)->language == 0) {
- buf[3] = (*serviceFIG0_17)->pty;
- fig0->Length += 4;
- buf += 4;
- remaining -= 4;
- }
- else {
- buf[3] = (*serviceFIG0_17)->language;
- buf[4] = (*serviceFIG0_17)->pty;
- fig0->Length += 5;
- buf += 5;
- remaining -= 5;
- }
+ auto fig0_17 = (FIGtype0_17*)buf;
+ fig0_17->SId = htons((*serviceFIG0_17)->id);
+ fig0_17->SD = 1; // We only transmit dynamic PTy
+ fig0_17->rfa1 = 0;
+ fig0_17->rfu1 = 0;
+ fig0_17->rfa2_low = 0;
+ fig0_17->rfa2_high = 0;
+ fig0_17->rfu2 = 0;
+ fig0_17->IntCode = (*serviceFIG0_17)->pty;
+
+ fig0->Length += 4;
+ buf += 4;
+ remaining -= 4;
}
if (serviceFIG0_17 == ensemble->services.end()) {
diff --git a/src/fig/FIG0.h b/src/fig/FIG0.h
index dcd0df1..bd86791 100644
--- a/src/fig/FIG0.h
+++ b/src/fig/FIG0.h
@@ -473,18 +473,17 @@ struct FIGtype0_10_LongForm {
} PACKED;
-struct FIGtype0_17_programme {
+struct FIGtype0_17 {
uint16_t SId;
- uint8_t NFC:2;
- uint8_t Rfa:2;
- uint8_t CC:1; // Complimentary code
- uint8_t L:1; // Signals presence of language field
- uint8_t PS:1; // Primary/Secondary
- // PS==0: language refers to primary service component
- // PS==1: language refers to secondary service component
+
+ uint8_t rfa2_high:4;
+ uint8_t rfu1:2;
+ uint8_t rfa1:1;
uint8_t SD:1; // Static/Dynamic
- // SD==0: PTy and language may not represent the current programme contents
- // SD==1: PTy and language represent the current programme contents
+
+ uint8_t IntCode:5;
+ uint8_t rfu2:1;
+ uint8_t rfa2_low:2;
} PACKED;
struct FIGtype0_18 {