From 2a8e60cd761d1f3728c765d646135b2110eea576 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 9 Apr 2017 11:44:27 +0200 Subject: Add FIG0/21 work in progress --- src/MuxElements.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 5 deletions(-) (limited to 'src/MuxElements.h') diff --git a/src/MuxElements.h b/src/MuxElements.h index 98e4741..0eabb69 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -3,7 +3,7 @@ 2011, 2012 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2016 + Copyright (C) 2017 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -27,8 +27,7 @@ You should have received a copy of the GNU General Public License along with ODR-DabMux. If not, see . */ -#ifndef _MUX_ELEMENTS -#define _MUX_ELEMENTS +#pragma once #include #include @@ -192,6 +191,7 @@ class DabService; class DabComponent; class DabSubchannel; class LinkageSet; +struct FrequencyListEntry; class dabEnsemble : public RemoteControllable { public: @@ -231,6 +231,7 @@ class dabEnsemble : public RemoteControllable { std::vector > clusters; std::vector > linkagesets; + std::vector > frequency_information; }; @@ -470,6 +471,56 @@ class LinkageSet { std::string m_name; }; +// FIG 0/21 +enum class RangeModulation { + dab_ensemble = 0, + drm = 6, + fm_with_rds = 8, + amss = 14 +}; + +struct FrequencyInfoDab { + enum class ControlField_e { + adjacent_no_mode = 0, + adjacent_mode1 = 2, + disjoint_no_mode = 1, + disjoint_mode1 = 3}; + + struct ListElement { + ControlField_e control_field; + float frequency; + }; + + std::vector frequencies; +}; + +struct FrequencyInfoDrm { + uint8_t drm_service_id; + std::vector frequencies; +}; + +struct FrequencyInfoFm { + std::vector frequencies; +}; + +struct FrequencyInfoAmss { + uint8_t amss_service_id; + std::vector frequencies; +}; + +struct FrequencyListEntry { + uint16_t id; + RangeModulation rm; + bool continuity; + + // Only one of those must contain information, which + // must be consistent with RangeModulation + FrequencyInfoDab fi_dab; + FrequencyInfoDrm fi_drm; + FrequencyInfoFm fi_fm; + FrequencyInfoAmss fi_amss; +}; + std::vector::iterator getSubchannel( std::vector& subchannels, int id); @@ -486,5 +537,3 @@ std::vector >::iterator getService( DabComponent* component, std::vector >& services); -#endif - -- cgit v1.2.3