/// <summary>
        /// Wählt eine Quellgruppe aus.
        /// </summary>
        /// <param name="group">Díe Daten der Quellgruppe.</param>
        /// <param name="location">Die Wahl des Ursprungs, über den die Quellgruppe empfangen werden kann.</param>
        public void Tune(SourceGroup group, GroupLocation location)
        {
            // May repeat some times
            for (int retryCount = 3; retryCount-- > 0; Thread.Sleep(250))
            {
                // All supported in order of importance
                if (!Tune(group as SatelliteGroup, location as SatelliteLocation).HasValue)
                {
                    if (!Tune(group as CableGroup).HasValue)
                    {
                        if (!Tune(group as TerrestrialGroup).HasValue)
                        {
                            throw new DVBException("Unsupported channel type " + group.GetType().FullName);
                        }
                    }
                }

                // Done if locked
                if (SignalStatus.Locked)
                {
                    break;
                }

                // Enforce reset
                m_lastMessage = null;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Wählt eine Quellgruppe aus.
        /// </summary>
        /// <param name="group">Díe Daten der Quellgruppe.</param>
        /// <param name="location">Die Wahl des Ursprungs, über den die Quellgruppe empfangen werden kann.</param>
        /// <returns>Gesetzt, wenn es sich um eine DVB-S Quellgruppe handelt.</returns>
        public void SetChannel(SourceGroup group, GroupLocation location)
        {
            // Stop all filters
            StopFilters();

            // May repeat some times
            for (int nRetry = 3; nRetry-- > 0;)
            {
                // Supported types in order of importance
                if (!SendChannel(group as SatelliteGroup, location as SatelliteLocation))
                {
                    if (!SendChannel(group as CableGroup))
                    {
                        if (!SendChannel(group as TerrestrialGroup))
                        {
                            throw new DVBException("Unsupported Channel Type " + group.GetType().FullName);
                        }
                    }
                }

                // Wait for the signal
                for (int n = 10; n-- > 0; Thread.Sleep(50))
                {
                    if (SignalStatus.Locked)
                    {
                        return;
                    }
                }

                // Force to resend DiSEqC command
                m_lastMessage = null;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Wählt eine Quellgruppe aus.
        /// </summary>
        /// <param name="group">Díe Daten der Quellgruppe.</param>
        /// <param name="location">Die Wahl des Ursprungs, über den die Quellgruppe empfangen werden kann.</param>
        public void Tune( SourceGroup group, GroupLocation location )
        {
            // May repeat some times
            for (int retryCount = 3; retryCount-- > 0; Thread.Sleep( 250 ))
            {
                // All supported in order of importance
                if (!Tune( group as SatelliteGroup, location as SatelliteLocation ).HasValue)
                    if (!Tune( group as CableGroup ).HasValue)
                        if (!Tune( group as TerrestrialGroup ).HasValue)
                            throw new DVBException( "Unsupported channel type " + group.GetType().FullName );

                // Done if locked
                if (SignalStatus.Locked)
                    break;

                // Enforce reset
                m_lastMessage = null;
            }
        }
        /// <summary>
        /// Wählt eine Quellgruppe aus.
        /// </summary>
        /// <param name="group">Díe Daten der Quellgruppe.</param>
        /// <param name="location">Die Wahl des Ursprungs, über den die Quellgruppe empfangen werden kann.</param>
        /// <returns>Gesetzt, wenn es sich um eine DVB-S Quellgruppe handelt.</returns>
        public void SetChannel( SourceGroup group, GroupLocation location )
        {
            // Stop all filters
            StopFilters();

            // May repeat some times
            for (int nRetry = 3; nRetry-- > 0; )
            {
                // Supported types in order of importance
                if (!SendChannel( group as SatelliteGroup, location as SatelliteLocation ))
                    if (!SendChannel( group as CableGroup ))
                        if (!SendChannel( group as TerrestrialGroup ))
                            throw new DVBException( "Unsupported Channel Type " + group.GetType().FullName );

                // Wait for the signal
                for (int n = 10; n-- > 0; Thread.Sleep( 50 ))
                    if (SignalStatus.Locked)
                        return;

                // Force to resend DiSEqC command
                m_lastMessage = null;
            }
        }