예제 #1
0
        /// <summary>
        /// Wählt eine Quellgruppe an.
        /// </summary>
        /// <param name="group">Die Daten zur Quellgruppe.</param>
        /// <returns>Gesetzt, wenn es sich um eine DVB-T Quellgruppe handelt.</returns>
        private bool SendChannel(TerrestrialGroup group)
        {
            // Not us
            if (group == null)
            {
                return(false);
            }

            // Validate
            if (FrontendType != FrontendType.Terrestrial)
            {
                throw new DVBException("Expected " + FrontendType.ToString() + " Channel");
            }

            // Helper
            var channel =
                new Channel_T
            {
                Frequency = group.Frequency,
                Inversion = SpectrumInversion.Off,
                Scan      = false,
            };

            // Check supported modes
            switch (group.Bandwidth)
            {
            case Bandwidths.Six: channel.Bandwidth = BandwidthType.Six; break;

            case Bandwidths.Seven: channel.Bandwidth = BandwidthType.Seven; break;

            case Bandwidths.Eight: channel.Bandwidth = BandwidthType.Eight; break;

            case Bandwidths.NotDefined: channel.Bandwidth = BandwidthType.None; break;

            default: channel.Bandwidth = BandwidthType.Auto; break;
            }

            // Process
            CheckChannel(CDVBFrontend_SetChannel(m_Class.ClassPointer, channel, false));

            // Check up for synchronisation
            Channel_T rVal1, rVal2;

            // Get channel twice
            CheckChannel(CDVBFrontend_GetChannel(m_Class.ClassPointer, out rVal1));
            CheckChannel(CDVBFrontend_GetChannel(m_Class.ClassPointer, out rVal2));

            // Did it
            return(true);
        }
예제 #2
0
 private static extern DVBError CDVBFrontend_GetChannel( IntPtr pData, out Channel_T rChannel );
예제 #3
0
 private static extern DVBError CDVBFrontend_SetChannel( IntPtr pData, Channel_T rChannel, bool bPowerOnly );
예제 #4
0
        /// <summary>
        /// Wählt eine Quellgruppe an.
        /// </summary>
        /// <param name="group">Die Daten zur Quellgruppe.</param>
        /// <returns>Gesetzt, wenn es sich um eine DVB-T Quellgruppe handelt.</returns>
        private bool SendChannel( TerrestrialGroup group )
        {
            // Not us 
            if (group == null)
                return false;

            // Validate
            if (FrontendType != FrontendType.Terrestrial)
                throw new DVBException( "Expected " + FrontendType.ToString() + " Channel" );

            // Helper
            var channel =
                new Channel_T
                {
                    Frequency = group.Frequency,
                    Inversion = SpectrumInversion.Off,
                    Scan = false,
                };

            // Check supported modes
            switch (group.Bandwidth)
            {
                case Bandwidths.Six: channel.Bandwidth = BandwidthType.Six; break;
                case Bandwidths.Seven: channel.Bandwidth = BandwidthType.Seven; break;
                case Bandwidths.Eight: channel.Bandwidth = BandwidthType.Eight; break;
                case Bandwidths.NotDefined: channel.Bandwidth = BandwidthType.None; break;
                default: channel.Bandwidth = BandwidthType.Auto; break;
            }

            // Process
            CheckChannel( CDVBFrontend_SetChannel( m_Class.ClassPointer, channel, false ) );

            // Check up for synchronisation
            Channel_T rVal1, rVal2;

            // Get channel twice
            CheckChannel( CDVBFrontend_GetChannel( m_Class.ClassPointer, out rVal1 ) );
            CheckChannel( CDVBFrontend_GetChannel( m_Class.ClassPointer, out rVal2 ) );

            // Did it
            return true;
        }
예제 #5
0
 private static extern DVBError CDVBFrontend_GetChannel(IntPtr pData, out Channel_T rChannel);
예제 #6
0
 private static extern DVBError CDVBFrontend_SetChannel(IntPtr pData, Channel_T rChannel, bool bPowerOnly);