aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMod.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-11-02 11:57:40 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2023-11-02 13:56:18 +0100
commit0d7550715db39408a82d268026b711f454fef2f8 (patch)
tree4ab1d5fd9d1c61d37b5d174d70d6654001b0e6e2 /src/DabMod.cpp
parentc2467d222ec08ddc4c6f79ea01773496090f809f (diff)
downloaddabmod-0d7550715db39408a82d268026b711f454fef2f8.tar.gz
dabmod-0d7550715db39408a82d268026b711f454fef2f8.tar.bz2
dabmod-0d7550715db39408a82d268026b711f454fef2f8.zip
Add edi_source RC param
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r--src/DabMod.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 0ab112b..e0e8a5b 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -114,9 +114,11 @@ class ModulatorData : public RemoteControllable {
ModulatorData() : RemoteControllable("mainloop") {
RC_ADD_PARAMETER(num_modulator_restarts, "(Read-only) Number of mod restarts");
RC_ADD_PARAMETER(most_recent_edi_decoded, "(Read-only) UNIX Timestamp of most recently decoded EDI frame");
+ RC_ADD_PARAMETER(edi_source, "(Read-only) URL of the EDI/TCP source");
RC_ADD_PARAMETER(running_since, "(Read-only) UNIX Timestamp of most recent modulator restart");
RC_ADD_PARAMETER(ensemble_label, "(Read-only) Label of the ensemble");
RC_ADD_PARAMETER(ensemble_eid, "(Read-only) Ensemble ID");
+ RC_ADD_PARAMETER(ensemble_services, "(Read-only, only JSON) Ensemble service information");
RC_ADD_PARAMETER(num_services, "(Read-only) Number of services in the ensemble");
}
@@ -165,6 +167,14 @@ class ModulatorData : public RemoteControllable {
throw ParameterError("Not available yet");
}
}
+ else if (parameter == "edi_source") {
+ if (ediInput) {
+ ss << ediInput->ediTransport.getTcpUri();
+ }
+ else {
+ throw ParameterError("Not available yet");
+ }
+ }
else if (parameter == "num_services") {
if (ediInput) {
ss << ediInput->ediReader.getSubchannels().size();
@@ -173,6 +183,9 @@ class ModulatorData : public RemoteControllable {
throw ParameterError("Not available yet");
}
}
+ else if (parameter == "ensemble_services") {
+ throw ParameterError("ensemble_services is only available through 'showjson'");
+ }
else {
ss << "Parameter '" << parameter <<
"' is not exported by controllable " << get_rc_name();
@@ -189,6 +202,7 @@ class ModulatorData : public RemoteControllable {
map["most_recent_edi_decoded"].v = most_recent_edi_decoded;
if (ediInput) {
+ map["edi_source"].v = ediInput->ediTransport.getTcpUri();
map["num_services"].v = ediInput->ediReader.getSubchannels().size();
const auto ens = ediInput->ediReader.getEnsembleInfo();