コード例 #1
0
        public static string GetTuningParamsAsString(TuningInfo tuning_info)
        {
            ChannelTuningInfo channel_tuning_info = tuning_info as ChannelTuningInfo;
            DvbTuningInfo     dvb_tuning_info     = tuning_info as DvbTuningInfo;
            StringTuningInfo  string_tuning_info  = tuning_info as StringTuningInfo;

            if (channel_tuning_info != null)
            {
                if (channel_tuning_info.SubNumber != -1)
                {
                    return(string.Format("{0}.{1} ModulationType: {2}", channel_tuning_info.PhysicalNumber, channel_tuning_info.SubNumber, channel_tuning_info.ModulationType));
                }
                else
                {
                    return(string.Format("{0} ModulationType: {1}", channel_tuning_info.PhysicalNumber, channel_tuning_info.ModulationType));
                }
            }
            else if (dvb_tuning_info != null)
            {
                return(string.Format("Freq: {0} Lcn: {1} Nid: {2} ONid: {3}, Sid: {4}, TSid: {5} SignalQuality: {6}", dvb_tuning_info.Frequency, dvb_tuning_info.Lcn, dvb_tuning_info.Nid, dvb_tuning_info.Onid, dvb_tuning_info.Sid, dvb_tuning_info.Tsid, dvb_tuning_info.SignalQuality));
            }
            else if (string_tuning_info != null)
            {
                return(string.Format("TuningString: {0}", string_tuning_info.TuningString));
            }
            return(tuning_info.ToString());
        }
コード例 #2
0
        private static List <TuningInfo> CreateDvbTuningInfosForChannel(
            int onid, int tsid, int sid, int nid, int frequency, int lcn,
            IEnumerable <Device> devices)
        {
            List <TuningInfo> tuning_infos = new List <TuningInfo>();

            foreach (Device d in devices)
            {
                DvbTuningInfo dvb_tuning_info = new DvbTuningInfo(d, onid, tsid, sid, nid, frequency, lcn);
                tuning_infos.Add(dvb_tuning_info);
            }
            return(tuning_infos);
        }
コード例 #3
0
 private int GetDvbNid(DvbTuningInfo dti)
 {
     return(dti.Nid);
 }
コード例 #4
0
 private int GetDvbFrequency(DvbTuningInfo dti)
 {
     return(dti.Frequency);
 }
コード例 #5
0
 private int GetDvbLcn(DvbTuningInfo dti)
 {
     return(dti.Lcn);
 }
コード例 #6
0
 private int GetDvbTsid(DvbTuningInfo dti)
 {
     return dti.Tsid;
 }
コード例 #7
0
 private int GetDvbOnid(DvbTuningInfo dti)
 {
     return dti.Onid;
 }
コード例 #8
0
 private int GetDvbLcn(DvbTuningInfo dti)
 {
     return dti.Lcn;
 }
コード例 #9
0
 private int GetDvbFrequency(DvbTuningInfo dti)
 {
     return dti.Frequency;
 }