aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DabMultiplexer.h12
-rw-r--r--src/MuxElements.cpp16
-rw-r--r--src/MuxElements.h1
-rw-r--r--src/fig/FIG0.h1
4 files changed, 26 insertions, 4 deletions
diff --git a/src/DabMultiplexer.h b/src/DabMultiplexer.h
index f454d20..bafefff 100644
--- a/src/DabMultiplexer.h
+++ b/src/DabMultiplexer.h
@@ -381,10 +381,14 @@ struct FIGtype0_17_programme {
uint16_t SId;
uint8_t NFC:2;
uint8_t Rfa:2;
- uint8_t CC:1;
- uint8_t L:1;
- uint8_t PS:1;
- uint8_t SD:1;
+ 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 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
} PACKED;
struct FIGtype0_18 {
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp
index be0906e..adc6a60 100644
--- a/src/MuxElements.cpp
+++ b/src/MuxElements.cpp
@@ -404,6 +404,19 @@ void DabService::set_parameter(const string& parameter,
throw ParameterError(ss.str());
}
}
+ else if (parameter == "pty") {
+ int newpty = std::stoi(value); // International code, 5 bits
+
+ if (newpty >= 0 and newpty < (1<<5)) {
+ pty = newpty;
+ }
+ else {
+ stringstream ss;
+ ss << m_name << " pty is out of bounds";
+ etiLog.level(warn) << ss.str();
+ throw ParameterError(ss.str());
+ }
+ }
else {
stringstream ss;
ss << "Parameter '" << parameter <<
@@ -418,6 +431,9 @@ const string DabService::get_parameter(const string& parameter) const
if (parameter == "label") {
ss << label.long_label() << "," << label.short_label();
}
+ else if (parameter == "pty") {
+ ss << (int)pty;
+ }
else {
ss << "Parameter '" << parameter <<
"' is not exported by controllable " << get_rc_name();
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 9fe2aeb..dc84ccb 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -338,6 +338,7 @@ class DabService : public RemoteControllable
uid(uid)
{
RC_ADD_PARAMETER(label, "Label and shortlabel [label,short]");
+ RC_ADD_PARAMETER(pty, "Programme Type");
}
std::string uid;
diff --git a/src/fig/FIG0.h b/src/fig/FIG0.h
index e6101b5..2dc6483 100644
--- a/src/fig/FIG0.h
+++ b/src/fig/FIG0.h
@@ -183,6 +183,7 @@ class FIG0_13 : public IFIG
};
// FIG type 0/17
+// Programme Type (PTy)
class FIG0_17 : public IFIG
{
public: