From c97b43fc819e1e0e963183579d1b50f26f8c6f7f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 2 Oct 2016 15:36:21 +0200 Subject: Regroup linkagesets into subsets of same type --- src/MuxElements.h | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'src/MuxElements.h') 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 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 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, -- cgit v1.2.3