summaryrefslogtreecommitdiffstats
path: root/src/MuxElements.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/MuxElements.h')
-rw-r--r--src/MuxElements.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 7056121..2f602ba 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -191,8 +191,9 @@ class DabLabel
class DabService;
class DabComponent;
-
class DabSubchannel;
+class LinkageSet;
+
class dabEnsemble : public RemoteControllable {
public:
dabEnsemble()
@@ -228,6 +229,7 @@ class dabEnsemble : public RemoteControllable {
std::vector<DabSubchannel*> subchannels;
std::vector<std::shared_ptr<AnnouncementCluster> > clusters;
+ std::list<std::shared_ptr<LinkageSet> > linkagesets;
};
@@ -421,6 +423,46 @@ class DabService : public RemoteControllable
DabService(const DabService& other);
};
+enum class ServiceLinkType {DAB, FM, DRM, AMSS};
+
+/* Represent one link inside a linkage set */
+struct ServiceLink {
+ ServiceLinkType type;
+ uint16_t id;
+ uint8_t ecc;
+};
+
+/* Represents a linkage set linkage sets according to
+ * TS 103 176 Clause 5.2.3 "Linkage sets". This information will
+ * be encoded in FIG 0/6.
+ */
+class LinkageSet : public RemoteControllable {
+ public:
+ LinkageSet(std::string name, uint16_t lsn, bool hard, bool international);
+
+ std::list<ServiceLink> id_list;
+
+ /* Linkage Set Number is a 12-bit number that identifies the linkage
+ * set in a country (requires coordination between multiplex operators
+ * in a country)
+ */
+ uint16_t lsn;
+
+ bool active; // Remote-controllable
+ bool hard;
+ bool international;
+
+ std::string keyservice; // TODO replace by pointer to service
+
+ private:
+ /* Remote control */
+ virtual void set_parameter(const std::string& parameter,
+ const std::string& value);
+
+ /* Getting a parameter always returns a string. */
+ virtual const std::string get_parameter(const std::string& parameter) const;
+};
+
std::vector<DabSubchannel*>::iterator getSubchannel(
std::vector<DabSubchannel*>& subchannels, int id);