Exemple #1
0
        /// <summary>
        /// Erzeugt die Beschreibung einer Quellgruppe aus einer SI Beschreibung eines
        /// NIT Eintrags.
        /// </summary>
        /// <param name="descriptor">Die Daten zur Quellgruppe.</param>
        /// <returns>Die Quellgruppe.</returns>
        private static CableGroup ToGroup(this EPG.Descriptors.CableDelivery descriptor)
        {
            // Create core
            CableGroup group = new CableGroup
            {
                Frequency         = descriptor.Frequency,
                SpectrumInversion = SpectrumInversions.Auto,
                SymbolRate        = descriptor.SymbolRate * 1000,
                Bandwidth         = Bandwidths.NotDefined
            };

            // Modulation
            switch (descriptor.Modulation)
            {
            case EPG.CableModulations.QAM16: group.Modulation = CableModulations.QAM16; break;

            case EPG.CableModulations.QAM32: group.Modulation = CableModulations.QAM32; break;

            case EPG.CableModulations.QAM64: group.Modulation = CableModulations.QAM64; break;

            case EPG.CableModulations.QAM128: group.Modulation = CableModulations.QAM128; break;

            case EPG.CableModulations.QAM256: group.Modulation = CableModulations.QAM256; break;
            }

            // Report
            return(group);
        }
        /// <summary>
        /// Meldet eine der Frequenzen in der natürlichen Form.
        /// </summary>
        /// <param name="index">Die 0-basierte laufende Nummer der gewünschten Frequenz.</param>
        /// <returns>Die Frequenz in Hz.</returns>
        public ulong ConvertFrequency(int index)
        {
            // Check mode
            switch (CodingType)
            {
            case CodingTypes.Satellite: return(SatelliteDelivery.ConvertFrequency(Frequencies[index]));

            case CodingTypes.Cable: return(CableDelivery.ConvertFrequency(Frequencies[index]));

            case CodingTypes.Terrestrial: return(TerrestrialDelivery.ConvertFrequency(Frequencies[index]));

            default: return(Frequencies[index]);
            }
        }