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()); }
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); }
private int GetDvbNid(DvbTuningInfo dti) { return(dti.Nid); }
private int GetDvbFrequency(DvbTuningInfo dti) { return(dti.Frequency); }
private int GetDvbLcn(DvbTuningInfo dti) { return(dti.Lcn); }
private int GetDvbTsid(DvbTuningInfo dti) { return dti.Tsid; }
private int GetDvbOnid(DvbTuningInfo dti) { return dti.Onid; }
private int GetDvbLcn(DvbTuningInfo dti) { return dti.Lcn; }
private int GetDvbFrequency(DvbTuningInfo dti) { return dti.Frequency; }