TvController_SignalLevel() публичный статический Метод

public static TvController_SignalLevel ( int cardId ) : int
cardId int
Результат int
        public override ServiceTuning GetLiveStreamTuningDetails(LiveStream liveStream)
        {
            ServiceTuning result = null;

            lock (_liveStreamsLock)
            {
                if (_liveStreams.ContainsKey(liveStream.RtspUrl))
                {
                    IUser tve3User = _liveStreamUsers[liveStream.RtspUrl];

                    IChannel channel = TvServerPlugin.TvController_CurrentChannel(tve3User);

                    var dvbSChannel = channel as TvLibrary.Channels.DVBSChannel;
                    if (dvbSChannel != null)
                    {
                        result = new ServiceTuning()
                        {
                            CardType           = ArgusTV.DataContracts.Tuning.CardType.DvbS,
                            Frequency          = (int)dvbSChannel.Frequency,
                            InnerFecRate       = (ArgusTV.DataContracts.Tuning.FecCodeRate)dvbSChannel.InnerFecRate,
                            Modulation         = (ArgusTV.DataContracts.Tuning.Modulation)dvbSChannel.ModulationType,
                            Name               = dvbSChannel.Name,
                            ONID               = dvbSChannel.NetworkId,
                            OrbitalPosition    = dvbSChannel.SatelliteIndex, // TODO: check if this is the right number
                            Pilot              = (ArgusTV.DataContracts.Tuning.Pilot)dvbSChannel.Pilot,
                            ProviderName       = dvbSChannel.Provider,
                            IsFreeToAir        = dvbSChannel.FreeToAir,
                            RollOff            = (ArgusTV.DataContracts.Tuning.RollOff)dvbSChannel.Rolloff,
                            SID                = dvbSChannel.ServiceId,
                            SignalPolarisation = (ArgusTV.DataContracts.Tuning.SignalPolarisation)dvbSChannel.Polarisation,
                            SymbolRate         = dvbSChannel.SymbolRate,
                            TSID               = dvbSChannel.TransportId
                        };
                    }
                    else
                    {
                        var dvbCChannel = channel as TvLibrary.Channels.DVBCChannel;
                        if (dvbCChannel != null)
                        {
                            result = new ServiceTuning()
                            {
                                CardType     = ArgusTV.DataContracts.Tuning.CardType.DvbC,
                                Frequency    = (int)dvbCChannel.Frequency,
                                Modulation   = (ArgusTV.DataContracts.Tuning.Modulation)dvbCChannel.ModulationType,
                                Name         = dvbCChannel.Name,
                                ONID         = dvbCChannel.NetworkId,
                                ProviderName = dvbCChannel.Provider,
                                IsFreeToAir  = dvbCChannel.FreeToAir,
                                SID          = dvbCChannel.ServiceId,
                                SymbolRate   = dvbCChannel.SymbolRate,
                                TSID         = dvbCChannel.TransportId
                            };
                        }
                        else
                        {
                            var dvbTChannel = channel as TvLibrary.Channels.DVBTChannel;
                            if (dvbTChannel != null)
                            {
                                result = new ServiceTuning()
                                {
                                    CardType     = ArgusTV.DataContracts.Tuning.CardType.DvbT,
                                    Frequency    = (int)dvbTChannel.Frequency,
                                    Bandwidth    = dvbTChannel.BandWidth,
                                    Name         = dvbTChannel.Name,
                                    ONID         = dvbTChannel.NetworkId,
                                    ProviderName = dvbTChannel.Provider,
                                    IsFreeToAir  = dvbTChannel.FreeToAir,
                                    SID          = dvbTChannel.ServiceId,
                                    TSID         = dvbTChannel.TransportId
                                };
                            }
                            else
                            {
                                var atscChannel = channel as TvLibrary.Channels.ATSCChannel;
                                if (atscChannel != null)
                                {
                                    result = new ServiceTuning()
                                    {
                                        CardType        = ArgusTV.DataContracts.Tuning.CardType.Atsc,
                                        Frequency       = (int)atscChannel.Frequency,
                                        MajorChannel    = atscChannel.MajorChannel,
                                        MinorChannel    = atscChannel.MinorChannel,
                                        Name            = atscChannel.Name,
                                        PhysicalChannel = atscChannel.PhysicalChannel,
                                        ProviderName    = atscChannel.Provider,
                                        IsFreeToAir     = atscChannel.FreeToAir,
                                        SID             = atscChannel.ServiceId,
                                        TSID            = atscChannel.TransportId
                                    };
                                }
                                else
                                {
                                    var analogChannel = channel as TvLibrary.Implementations.AnalogChannel;
                                    if (analogChannel != null)
                                    {
                                        result = new ServiceTuning()
                                        {
                                            CardType        = ArgusTV.DataContracts.Tuning.CardType.Analog,
                                            Frequency       = (int)analogChannel.Frequency,
                                            Name            = analogChannel.Name,
                                            IsFreeToAir     = analogChannel.FreeToAir,
                                            PhysicalChannel = analogChannel.ChannelNumber
                                        };
                                    }
                                    else
                                    {
                                        var dvbIPChannel = channel as TvLibrary.Channels.DVBIPChannel;
                                        if (dvbIPChannel != null)
                                        {
                                            result = new ServiceTuning()
                                            {
                                                CardType     = ArgusTV.DataContracts.Tuning.CardType.DvbIP,
                                                Url          = dvbIPChannel.Url,
                                                Name         = dvbIPChannel.Name,
                                                ProviderName = dvbIPChannel.Provider,
                                                IsFreeToAir  = dvbIPChannel.FreeToAir
                                            };
                                        }
                                    }
                                }
                            }
                        }
                    }

                    if (result != null)
                    {
                        result.SignalQuality  = TvServerPlugin.TvController_SignalQuality(tve3User.CardId);
                        result.SignalStrength = TvServerPlugin.TvController_SignalLevel(tve3User.CardId);
                    }
                }
            }

            return(result);
        }