summaryrefslogtreecommitdiffstats
path: root/src/MuxElements.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-02 15:36:21 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-02 15:36:21 +0200
commitc97b43fc819e1e0e963183579d1b50f26f8c6f7f (patch)
treeb0e1570b07d83be9b1c34addc74d708dfce0e888 /src/MuxElements.h
parentc21a6828183cdcc08533a83530156e5758aca534 (diff)
downloaddabmux-c97b43fc819e1e0e963183579d1b50f26f8c6f7f.tar.gz
dabmux-c97b43fc819e1e0e963183579d1b50f26f8c6f7f.tar.bz2
dabmux-c97b43fc819e1e0e963183579d1b50f26f8c6f7f.zip
Regroup linkagesets into subsets of same type
Diffstat (limited to 'src/MuxElements.h')
-rw-r--r--src/MuxElements.h37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/MuxElements.h b/src/MuxElements.h
index 2f602ba..8efc2cb 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -432,6 +432,28 @@ struct ServiceLink {
uint8_t ecc;
};
+/* Keep the data out of LinkageSet to make it copyable */
+struct LinkageSetData {
+ 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
+
+ /* Return a LinkageSetData with id_list filtered to include
+ * only those links of a given type
+ */
+ LinkageSetData filter_type(ServiceLinkType type);
+};
+
/* 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.
@@ -440,20 +462,7 @@ 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
-
+ LinkageSetData data;
private:
/* Remote control */
virtual void set_parameter(const std::string& parameter,