Beispiel #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 TerrestrialGroup ToGroup(this EPG.Descriptors.TerrestrialDelivery descriptor)
        {
            // Create core
            TerrestrialGroup group =
                new TerrestrialGroup
            {
                Frequency = descriptor.Frequency
            };

            // Bandwidth
            switch (descriptor.Bandwidth)
            {
            case EPG.TerrestrialBandwidths.Five: group.Bandwidth = Bandwidths.Five; break;

            case EPG.TerrestrialBandwidths.Six: group.Bandwidth = Bandwidths.Six; break;

            case EPG.TerrestrialBandwidths.Seven: group.Bandwidth = Bandwidths.Seven; break;

            case EPG.TerrestrialBandwidths.Eight: group.Bandwidth = Bandwidths.Eight; break;

            case EPG.TerrestrialBandwidths.Reserved100: group.Bandwidth = Bandwidths.Reserved100; break;

            case EPG.TerrestrialBandwidths.Reserved101: group.Bandwidth = Bandwidths.Reserved101; break;

            case EPG.TerrestrialBandwidths.Reserved110: group.Bandwidth = Bandwidths.Reserved110; break;

            case EPG.TerrestrialBandwidths.Reserved111: group.Bandwidth = Bandwidths.Reserved111; 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]);
            }
        }