summaryrefslogtreecommitdiffstats
path: root/src/MuxElements.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-11 09:51:16 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-11 09:51:16 +0200
commit3e53747724c6e01bd0be17aaa9461c884fb821e7 (patch)
tree9c67b63bfa5ed992aaac6f086aeab7dc95b510c2 /src/MuxElements.h
parent7832faf05ccf5253ef27e560a8ac823446b95efc (diff)
downloaddabmux-3e53747724c6e01bd0be17aaa9461c884fb821e7.tar.gz
dabmux-3e53747724c6e01bd0be17aaa9461c884fb821e7.tar.bz2
dabmux-3e53747724c6e01bd0be17aaa9461c884fb821e7.zip
Add local-time-offset to remote control
Diffstat (limited to 'src/MuxElements.h')
-rw-r--r--src/MuxElements.h39
1 files changed, 28 insertions, 11 deletions
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 3bcc903..82e839d 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -90,17 +90,34 @@ class DabService;
class DabComponent;
struct dabSubchannel;
-struct dabEnsemble {
- uint16_t id;
- uint8_t ecc;
- DabLabel label;
- uint8_t mode;
- int lto; // local time offset in half-hours
- // range: -24 to +24
- int international_table;
- vector<DabService*> services;
- vector<DabComponent*> components;
- vector<dabSubchannel*> subchannels;
+class dabEnsemble : public RemoteControllable {
+ public:
+ dabEnsemble()
+ : RemoteControllable("ensemble")
+ {
+ RC_ADD_PARAMETER(localtimeoffset,
+ "local time offset, -24 to +24 [half-hours]");
+ }
+
+ /* Remote control */
+ virtual void set_parameter(const string& parameter,
+ const string& value);
+
+ /* Getting a parameter always returns a string. */
+ virtual const string get_parameter(const string& parameter) const;
+
+ /* all fields are public, since this was a struct before */
+ uint16_t id;
+ uint8_t ecc;
+ DabLabel label;
+ uint8_t mode;
+ int lto; // local time offset in half-hours
+ // range: -24 to +24
+ int international_table;
+
+ vector<DabService*> services;
+ vector<DabComponent*> components;
+ vector<dabSubchannel*> subchannels;
};