diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-11-28 20:17:58 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-11-28 20:17:58 +0100 |
commit | ac6fff2d6d514c4b4d72088114c1f2e42c5968cd (patch) | |
tree | c6e7607b5090ceff1e69a1f0fff206b1a7a9c07b /src/MuxElements.h | |
parent | fedab89cd4625617b3e481f1f59ba0fc97b7305b (diff) | |
parent | 6800fb66282525542366bc58df3095b93e3bf8ca (diff) | |
download | dabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.tar.gz dabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.tar.bz2 dabmux-ac6fff2d6d514c4b4d72088114c1f2e42c5968cd.zip |
Merge branch 'servicelinking' into next
Diffstat (limited to 'src/MuxElements.h')
-rw-r--r-- | src/MuxElements.h | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/src/MuxElements.h b/src/MuxElements.h index 7324cdc..968fb14 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::vector<std::shared_ptr<LinkageSet> > linkagesets; }; @@ -421,6 +423,51 @@ 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: + LinkageSet(const std::string& name, + uint16_t lsn, + bool hard, + bool international); + + std::string get_name(void) const { return m_name; } + + 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; // TODO: Remote-controllable + bool hard; + bool international; + + std::string keyservice; // TODO replace by pointer to service + + /* Return a LinkageSet with id_list filtered to include + * only those links of a given type + */ + LinkageSet filter_type(const ServiceLinkType type); + + private: + std::string m_name; +}; + std::vector<DabSubchannel*>::iterator getSubchannel( std::vector<DabSubchannel*>& subchannels, int id); |