コード例 #1
0
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if self.transponder_info:
				tuner = (_("Type"), frontendData["tuner_type"], TYPE_TEXT)
			else:
				tuner = (_("NIM & Type"), chr(ord('A') + frontendData["tuner_number"]) + " - " + frontendData["tuner_type"], TYPE_TEXT)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				return (tuner,
					(_("System & Modulation"), "%s %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
					(_("Orbital position"), "%s" % frontendData["orbital_position"], TYPE_TEXT),
					(_("Frequency & Polarization"), "%s - %s" % (frontendData.get("frequency", 0), frontendData["polarization"]), TYPE_TEXT),
					(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
					(_("Inversion, Pilot & Roll-off"), "%s - %s - %s" % (frontendData["inversion"], frontendData.get("pilot", None), str(frontendData.get("rolloff", None))), TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return (tuner,
					(_("Modulation"),"%s" % frontendData["modulation"], TYPE_TEXT),
					(_("Frequency"), "%s" % frontendData.get("frequency", 0), TYPE_TEXT),
					(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
					(_("Inversion"), "%s" % frontendData["inversion"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				return (tuner,
					(_("Frequency & Channel"), "%s - Ch. %s" % (frontendData.get("frequency", 0), getChannelNumber(frontendData["frequency"], frontendData["tuner_number"])), TYPE_TEXT),
					(_("Inversion & Bandwidth"), "%s - %s" % (frontendData["inversion"], frontendData["bandwidth"]), TYPE_TEXT),
					(_("Code R. LP-HP & Guard Int"), "%s - %s - %s" % (frontendData["code_rate_lp"], frontendData["code_rate_hp"], frontendData["guard_interval"]), TYPE_TEXT),
					(_("Constellation & FFT mode"), "%s - %s" % (frontendData["constellation"], frontendData["transmission_mode"]), TYPE_TEXT),
					(_("Hierarchy info"), "%s" % frontendData["hierarchy_information"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "ATSC":
				return (tuner,
					(_("System & Modulation"), "%s - %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
					(_("Frequency"), "%s" % frontendData.get("frequency", 0), TYPE_TEXT),
					(_("Inversion"), "%s" % frontendData["inversion"], TYPE_TEXT))
		return []
コード例 #2
0
	def ch_number(self):
		for n in nimmanager.nim_slots:
			if n.isCompatible("DVB-T"):
				channel = getChannelNumber(self.freq(), n.slot)
				if channel:
					return _("CH") + "%s" % channel
		return ""
コード例 #3
0
ファイル: ServiceInfo.py プロジェクト: oostende/openblachole
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				return ((_("NIM"), chr(ord('A')+int(frontendData["tuner_number"])), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Orbital position"), frontendData["orbital_position"], TYPE_VALUE_DEC),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ),
						(_("Symbol rate"), frontendData["symbol_rate"], TYPE_VALUE_BITRATE),
						(_("Polarization"), frontendData["polarization"], TYPE_TEXT),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("FEC"), frontendData["fec_inner"], TYPE_TEXT),
						(_("Pilot"), frontendData.get("pilot", None), TYPE_TEXT),
						(_("Roll-off"), frontendData.get("rolloff", None), TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return ((_("NIM"), chr(ord('A')+int(frontendData["tuner_number"])), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ_FLOAT),
						(_("Symbol rate"), frontendData["symbol_rate"], TYPE_VALUE_BITRATE),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("FEC"), frontendData["fec_inner"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				channel = getChannelNumber(frontendDataOrg["frequency"], frontendDataOrg["tuner_number"]) if supportedChannels(frontendDataOrg["tuner_number"]) else None
				return ((_("NIM"), chr(ord('A')+int(frontendData["tuner_number"])), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ_FLOAT),
						(_("Channel"), getChannelNumber(frontendData["frequency"], frontendData["tuner_number"]), TYPE_VALUE_DEC),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("Bandwidth"), frontendData["bandwidth"], TYPE_VALUE_DEC),
						(_("Code rate LP"), frontendData["code_rate_lp"], TYPE_TEXT),
						(_("Code rate HP"), frontendData["code_rate_hp"], TYPE_TEXT),
						(_("Constellation"), frontendData["constellation"], TYPE_TEXT),
						(_("Transmission mode"), frontendData["transmission_mode"], TYPE_TEXT),
						(_("Guard interval"), frontendData["guard_interval"], TYPE_TEXT),
						(_("Hierarchy info"), frontendData["hierarchy_information"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "ATSC":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ_FLOAT),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT))
		return [ ]
コード例 #4
0
ファイル: ServiceInfo.py プロジェクト: OpenLD/enigma2
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				if frontendData["frequency"] > 11699999 :
					band = "High"
				else:
					band = "Low"
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Orbital position"), frontendData["orbital_position"], TYPE_VALUE_DEC),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ),
						(_("Symbol rate"), frontendData["symbol_rate"], TYPE_VALUE_BITRATE),
						(_("Polarization"), frontendData["polarization"], TYPE_TEXT),
						(_("Band"), band, TYPE_TEXT),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("FEC"), frontendData["fec_inner"], TYPE_TEXT),
						(_("Pilot"), frontendData.get("pilot", None), TYPE_TEXT),
						(_("Roll-off"), frontendData.get("rolloff", None), TYPE_TEXT),
						(_("Input Stream ID"), frontendData.get("is_id", 0), TYPE_VALUE_DEC),
						(_("PLS Mode"), frontendData.get("pls_mode", None), TYPE_TEXT),
						(_("PLS Code"), frontendData.get("pls_code", 0), TYPE_VALUE_DEC))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ_FLOAT),
						(_("Symbol rate"), frontendData["symbol_rate"], TYPE_VALUE_BITRATE),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("FEC"), frontendData["fec_inner"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ_FLOAT),
						(_("Channel"), getChannelNumber(frontendData["frequency"], frontendData["tuner_number"]), TYPE_VALUE_DEC),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("Bandwidth"), frontendData["bandwidth"], TYPE_VALUE_DEC),
						(_("Code rate LP"), frontendData["code_rate_lp"], TYPE_TEXT),
						(_("Code rate HP"), frontendData["code_rate_hp"], TYPE_TEXT),
						(_("Constellation"), frontendData["constellation"], TYPE_TEXT),
						(_("Transmission mode"), frontendData["transmission_mode"], TYPE_TEXT),
						(_("Guard interval"), frontendData["guard_interval"], TYPE_TEXT),
						(_("Hierarchy info"), frontendData["hierarchy_information"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "ATSC":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ_FLOAT),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT))
		return [ ]
コード例 #5
0
ファイル: ServiceInfo.py プロジェクト: takitr/enigma2-1
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Orbital position"), frontendData["orbital_position"], TYPE_VALUE_DEC),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_DEC),
						(_("Symbol rate"), frontendData["symbol_rate"], TYPE_VALUE_DEC),
						(_("Polarization"), frontendData["polarization"], TYPE_TEXT),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("FEC"), frontendData["fec_inner"], TYPE_TEXT),
						(_("Pilot"), frontendData.get("pilot", None), TYPE_TEXT),
						(_("Roll-off"), frontendData.get("rolloff", None), TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_DEC),
						(_("Symbol rate"), frontendData["symbol_rate"], TYPE_VALUE_DEC),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("FEC"), frontendData["fec_inner"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				channel = getChannelNumber(frontendDataOrg["frequency"], frontendDataOrg["tuner_number"]) if supportedChannels(frontendDataOrg["tuner_number"]) else None
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], TYPE_VALUE_DEC),
						(_("Channel"), getChannelNumber(frontendData["frequency"], frontendData["tuner_number"]), TYPE_VALUE_DEC),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT),
						(_("Bandwidth"), frontendData["bandwidth"], TYPE_VALUE_DEC),
						(_("Code rate LP"), frontendData["code_rate_lp"], TYPE_TEXT),
						(_("Code rate HP"), frontendData["code_rate_hp"], TYPE_TEXT),
						(_("Constellation"), frontendData["constellation"], TYPE_TEXT),
						(_("Transmission mode"), frontendData["transmission_mode"], TYPE_TEXT),
						(_("Guard interval"), frontendData["guard_interval"], TYPE_TEXT),
						(_("Hierarchy info"), frontendData["hierarchy_information"], TYPE_TEXT))
		return [ ]
コード例 #6
0
ファイル: ServiceInfo.py プロジェクト: sodo13/EG-gui
 def getFEData(self, frontendDataOrg):
     if frontendDataOrg and len(frontendDataOrg):
         frontendData = ConvertToHumanReadable(frontendDataOrg)
         if frontendDataOrg['tuner_type'] == 'DVB-S':
             return ((_('NIM'), chr(ord('A') + frontendData['tuner_number']), TYPE_TEXT),
              (_('Type'), frontendData['tuner_type'], TYPE_TEXT),
              (_('System'), frontendData['system'], TYPE_TEXT),
              (_('Modulation'), frontendData['modulation'], TYPE_TEXT),
              (_('Orbital position'), frontendData['orbital_position'], TYPE_VALUE_DEC),
              (_('Frequency'), frontendData['frequency'], TYPE_VALUE_DEC),
              (_('Symbol rate'), frontendData['symbol_rate'], TYPE_VALUE_DEC),
              (_('Polarization'), frontendData['polarization'], TYPE_TEXT),
              (_('Inversion'), frontendData['inversion'], TYPE_TEXT),
              (_('FEC'), frontendData['fec_inner'], TYPE_TEXT),
              (_('Pilot'), frontendData.get('pilot', None), TYPE_TEXT),
              (_('Roll-off'), frontendData.get('rolloff', None), TYPE_TEXT))
         if frontendDataOrg['tuner_type'] == 'DVB-C':
             return ((_('NIM'), chr(ord('A') + frontendData['tuner_number']), TYPE_TEXT),
              (_('Type'), frontendData['tuner_type'], TYPE_TEXT),
              (_('Modulation'), frontendData['modulation'], TYPE_TEXT),
              (_('Frequency'), frontendData['frequency'], TYPE_VALUE_DEC),
              (_('Symbol rate'), frontendData['symbol_rate'], TYPE_VALUE_DEC),
              (_('Inversion'), frontendData['inversion'], TYPE_TEXT),
              (_('FEC'), frontendData['fec_inner'], TYPE_TEXT))
         if frontendDataOrg['tuner_type'] == 'DVB-T':
             channel = getChannelNumber(frontendDataOrg['frequency'], frontendDataOrg['tuner_number']) if supportedChannels(frontendDataOrg['tuner_number']) else None
             return ((_('NIM'), chr(ord('A') + frontendData['tuner_number']), TYPE_TEXT),
              (_('Type'), frontendData['tuner_type'], TYPE_TEXT),
              (_('Frequency'), frontendData['frequency'], TYPE_VALUE_DEC),
              (_('Channel'), getChannelNumber(frontendData['frequency'], frontendData['tuner_number']), TYPE_VALUE_DEC),
              (_('Inversion'), frontendData['inversion'], TYPE_TEXT),
              (_('Bandwidth'), frontendData['bandwidth'], TYPE_VALUE_DEC),
              (_('Code rate LP'), frontendData['code_rate_lp'], TYPE_TEXT),
              (_('Code rate HP'), frontendData['code_rate_hp'], TYPE_TEXT),
              (_('Constellation'), frontendData['constellation'], TYPE_TEXT),
              (_('Transmission mode'), frontendData['transmission_mode'], TYPE_TEXT),
              (_('Guard interval'), frontendData['guard_interval'], TYPE_TEXT),
              (_('Hierarchy info'), frontendData['hierarchy_information'], TYPE_TEXT))
     return []
コード例 #7
0
ファイル: ServiceInfo.py プロジェクト: OpenViX/enigma2
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if self.transponder_info:
				tuner = (_("Type"), frontendData["tuner_type"], TYPE_TEXT)
			else:
				tuner = (_("NIM & Type"), chr(ord('A') + frontendData["tuner_number"]) + " - " + frontendData["tuner_type"], TYPE_TEXT)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				t2mi = lambda x: None if x == -1 else str(x)
				if frontendData.get("is_id", eDVBFrontendParametersSatellite.No_Stream_Id_Filter) > eDVBFrontendParametersSatellite.No_Stream_Id_Filter: # multistream
					return (tuner,
						(_("System & Modulation"), "%s %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
						(_("Orbital position"), "%s" % frontendData["orbital_position"], TYPE_TEXT),
						(_("Frequency & Polarization"), "%s - %s" % (frontendData.get("frequency", 0), frontendData["polarization"]), TYPE_TEXT),
						(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
						(_("Input Stream ID"), "%s" % (frontendData.get("is_id", eDVBFrontendParametersSatellite.No_Stream_Id_Filter)), TYPE_TEXT),
						(_("PLS Mode & PLS Code"), "%s - %s" % (frontendData["pls_mode"], frontendData["pls_code"]), TYPE_TEXT),
						(_("T2MI PLP ID"), t2mi(frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id)), TYPE_TEXT),
						(_("T2MI PID"), None if frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id) == eDVBFrontendParametersSatellite.No_T2MI_PLP_Id else str(frontendData.get("t2mi_pid", eDVBFrontendParametersSatellite.T2MI_Default_Pid)), TYPE_TEXT),
						(_("Inversion, Pilot & Roll-off"), "%s - %s - %s" % (frontendData["inversion"], frontendData.get("pilot", None), str(frontendData.get("rolloff", None))), TYPE_TEXT))
				else: # not multistream
					return (tuner,
						(_("System & Modulation"), "%s %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
						(_("Orbital position"), "%s" % frontendData["orbital_position"], TYPE_TEXT),
						(_("Frequency & Polarization"), "%s - %s" % (frontendData.get("frequency", 0), frontendData["polarization"]), TYPE_TEXT),
						(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
						(_("T2MI PLP ID"), t2mi(frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id)), TYPE_TEXT),
						(_("T2MI PID"), None if frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id) == eDVBFrontendParametersSatellite.No_T2MI_PLP_Id else str(frontendData.get("t2mi_pid", eDVBFrontendParametersSatellite.T2MI_Default_Pid)), TYPE_TEXT),
						(_("Inversion, Pilot & Roll-off"), "%s - %s - %s" % (frontendData["inversion"], frontendData.get("pilot", None), str(frontendData.get("rolloff", None))), TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return (tuner,
					(_("Modulation"),"%s" % frontendData["modulation"], TYPE_TEXT),
					(_("Frequency"), "%s" % frontendData.get("frequency", 0), TYPE_TEXT),
					(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
					(_("Inversion"), "%s" % frontendData["inversion"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				return (tuner,
					(_("Frequency & Channel"), "%s - Ch. %s" % (frontendData.get("frequency", 0), getChannelNumber(frontendData["frequency"], frontendData["tuner_number"])), TYPE_TEXT),
					(_("Inversion & Bandwidth"), "%s - %s" % (frontendData["inversion"], frontendData["bandwidth"]), TYPE_TEXT),
					(_("Code R. LP-HP & Guard Int"), "%s - %s - %s" % (frontendData["code_rate_lp"], frontendData["code_rate_hp"], frontendData["guard_interval"]), TYPE_TEXT),
					(_("Constellation & FFT mode"), "%s - %s" % (frontendData["constellation"], frontendData["transmission_mode"]), TYPE_TEXT),
					(_("Hierarchy info"), "%s" % frontendData["hierarchy_information"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "ATSC":
				return (tuner,
					(_("System & Modulation"), "%s - %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
					(_("Frequency"), "%s" % frontendData.get("frequency", 0), TYPE_TEXT),
					(_("Inversion"), "%s" % frontendData["inversion"], TYPE_TEXT))
		return []
コード例 #8
0
ファイル: ServiceInfo.py プロジェクト: linuxbox10/enigma2-obh
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if self.transponder_info:
				tuner = (_("Type"), frontendData["tuner_type"], TYPE_TEXT)
			else:
				tuner = (_("NIM & Type"), chr(ord('A') + frontendData["tuner_number"]) + " - " + frontendData["tuner_type"], TYPE_TEXT)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				t2mi = lambda x: None if x == -1 else str(x)
				if frontendData.get("is_id", eDVBFrontendParametersSatellite.No_Stream_Id_Filter) > eDVBFrontendParametersSatellite.No_Stream_Id_Filter: # multistream
					return (tuner,
						(_("System & Modulation"), "%s %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
						(_("Orbital position"), "%s" % frontendData["orbital_position"], TYPE_TEXT),
						(_("Frequency & Polarization"), "%s - %s" % (frontendData.get("frequency", 0), frontendData["polarization"]), TYPE_TEXT),
						(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
						(_("Input Stream ID"), "%s" % (frontendData.get("is_id", eDVBFrontendParametersSatellite.No_Stream_Id_Filter)), TYPE_TEXT),
						(_("PLS Mode & PLS Code"), "%s - %s" % (frontendData["pls_mode"], frontendData["pls_code"]), TYPE_TEXT),
						(_("T2MI PLP ID"), t2mi(frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id)), TYPE_TEXT),
						(_("T2MI PID"), None if frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id) == eDVBFrontendParametersSatellite.No_T2MI_PLP_Id else str(frontendData.get("t2mi_pid", eDVBFrontendParametersSatellite.T2MI_Default_Pid)), TYPE_TEXT),
						(_("Inversion, Pilot & Roll-off"), "%s - %s - %s" % (frontendData["inversion"], frontendData.get("pilot", None), str(frontendData.get("rolloff", None))), TYPE_TEXT))
				else: # not multistream
					return (tuner,
						(_("System & Modulation"), "%s %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
						(_("Orbital position"), "%s" % frontendData["orbital_position"], TYPE_TEXT),
						(_("Frequency & Polarization"), "%s - %s" % (frontendData.get("frequency", 0), frontendData["polarization"]), TYPE_TEXT),
						(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
						(_("T2MI PLP ID"), t2mi(frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id)), TYPE_TEXT),
						(_("T2MI PID"), None if frontendData.get("t2mi_plp_id", eDVBFrontendParametersSatellite.No_T2MI_PLP_Id) == eDVBFrontendParametersSatellite.No_T2MI_PLP_Id else str(frontendData.get("t2mi_pid", eDVBFrontendParametersSatellite.T2MI_Default_Pid)), TYPE_TEXT),
						(_("Inversion, Pilot & Roll-off"), "%s - %s - %s" % (frontendData["inversion"], frontendData.get("pilot", None), str(frontendData.get("rolloff", None))), TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return (tuner,
					(_("Modulation"),"%s" % frontendData["modulation"], TYPE_TEXT),
					(_("Frequency"), "%s" % frontendData.get("frequency", 0), TYPE_TEXT),
					(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
					(_("Inversion"), "%s" % frontendData["inversion"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				return (tuner,
					(_("Frequency & Channel"), "%s - Ch. %s" % (frontendData.get("frequency", 0), getChannelNumber(frontendData["frequency"], frontendData["tuner_number"])), TYPE_TEXT),
					(_("Inversion & Bandwidth"), "%s - %s" % (frontendData["inversion"], frontendData["bandwidth"]), TYPE_TEXT),
					(_("Code R. LP-HP & Guard Int"), "%s - %s - %s" % (frontendData["code_rate_lp"], frontendData["code_rate_hp"], frontendData["guard_interval"]), TYPE_TEXT),
					(_("Constellation & FFT mode"), "%s - %s" % (frontendData["constellation"], frontendData["transmission_mode"]), TYPE_TEXT),
					(_("Hierarchy info"), "%s" % frontendData["hierarchy_information"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "ATSC":
				return (tuner,
					(_("System & Modulation"), "%s - %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
					(_("Frequency"), "%s" % frontendData.get("frequency", 0), TYPE_TEXT),
					(_("Inversion"), "%s" % frontendData["inversion"], TYPE_TEXT))
		return []
コード例 #9
0
 def getFEData(self, frontendDataOrg):
     if frontendDataOrg and len(frontendDataOrg):
         frontendData = ConvertToHumanReadable(frontendDataOrg)
         if self.transponder_info:
             tuner = (_("Type"), frontendData["tuner_type"], TYPE_TEXT)
         else:
             tuner = (_("NIM & Type"),
                      chr(ord('A') + frontendData["tuner_number"]) + " - " +
                      frontendData["tuner_type"], TYPE_TEXT)
         if frontendDataOrg["tuner_type"] == "DVB-S":
             data = (
                 tuner,
                 (_("System & Modulation"),
                  frontendData["system"] + " " + frontendData["modulation"],
                  TYPE_TEXT),
                 (_("Orbital position"), frontendData["orbital_position"],
                  TYPE_VALUE_DEC),
                 (_("Frequency & Polarization"),
                  "%s MHz" % (frontendData["frequency"] / 1000) + " - " +
                  frontendData["polarization"], TYPE_TEXT),
                 (_("Symbol rate & FEC"),
                  "%s KSymb/s" % (frontendData["symbol_rate"] / 1000) +
                  " - " + frontendData["fec_inner"], TYPE_TEXT),
                 (_("Inversion, Pilot & Roll-off"),
                  frontendData["inversion"] + " - " +
                  str(frontendData.get("pilot", None)) + " - " +
                  str(frontendData.get("rolloff", None)), TYPE_TEXT),
             )
             if frontendData["system"] == "DVB-S2":
                 data += (
                     (_("Input Stream"), frontendData["is_id"],
                      TYPE_VALUE_DEC),
                     (_("PLS Mode & PLS Code"),
                      str(frontendData["pls_mode"]) + " - " +
                      str(frontendData["pls_code"]), TYPE_TEXT),
                 )
             return data
         elif frontendDataOrg["tuner_type"] == "DVB-C":
             return (tuner, (_("Modulation"), frontendData["modulation"],
                             TYPE_TEXT), (_("Frequency"),
                                          frontendData["frequency"],
                                          TYPE_VALUE_FREQ_FLOAT),
                     (_("Symbol rate & FEC"),
                      "%s KSymb/s" % (frontendData["symbol_rate"] / 1000) +
                      " - " + frontendData["fec_inner"], TYPE_TEXT),
                     (_("Inversion"), frontendData["inversion"], TYPE_TEXT))
         elif frontendDataOrg["tuner_type"] == "DVB-T" and frontendData[
                 "system"] == "DVB-T2":
             return (tuner, (_("Frequency & Channel"), "%.3f MHz" %
                             ((frontendData["frequency"] / 1000) / 1000.0) +
                             " - Ch. " +
                             getChannelNumber(frontendData["frequency"],
                                              frontendData["tuner_number"]),
                             TYPE_TEXT),
                     (_("Inversion & Bandwidth"),
                      frontendData["inversion"] + " - " +
                      str(frontendData["bandwidth"]), TYPE_TEXT),
                     (_("Code R. LP-HP & Guard Int."),
                      frontendData["code_rate_lp"] + " - " +
                      frontendData["code_rate_hp"] + " - " +
                      frontendData["guard_interval"], TYPE_TEXT),
                     (_("Constellation & FFT mode"),
                      frontendData["constellation"] + " - " +
                      frontendData["transmission_mode"], TYPE_TEXT),
                     (_("Hierarchy info"),
                      frontendData["hierarchy_information"], TYPE_TEXT))
         elif frontendDataOrg["tuner_type"] == "ATSC":
             return (tuner, (_("System & Modulation"),
                             frontendData["system"] + " " +
                             frontendData["modulation"], TYPE_TEXT),
                     (_("Frequency"), frontendData["frequency"] / 1000,
                      TYPE_VALUE_FREQ_FLOAT),
                     (_("Inversion"), frontendData["inversion"], TYPE_TEXT))
     return []
コード例 #10
0
ファイル: PliExtraInfo.py プロジェクト: OpenLD/enigma2
	def createChannelNumber(self, fedata, feraw):
		channel = getChannelNumber(feraw.get("frequency"), feraw.get("tuner_number"))
		if channel:
			return _("CH") + "%s" % channel
		return ""
コード例 #11
0
ファイル: ServiceScan.py プロジェクト: Atsilla/enigma2
	def scanStatusChanged(self):
		if self.state == self.Running:
			self.progressbar.setValue(self.scan.getProgress())
			self.lcd_summary and self.lcd_summary.updateProgress(self.scan.getProgress())
			if self.scan.isDone():
				errcode = self.scan.getError()

				if errcode == 0:
					self.state = self.Done
					self.servicelist.listAll()
				else:
					self.state = self.Error
					self.errorcode = errcode
				self.network.setText("")
				self.transponder.setText("")
			else:
				result = self.foundServices + self.scan.getNumServices()
				percentage = self.scan.getProgress()
				#TRANSLATORS: The stb is performing a channel scan, progress percentage is printed in '%d' (and '%%' will show a single '%' symbol)
				message = ngettext("Scanning - %d%% completed", "Scanning - %d%% completed", percentage) % percentage
				message += ", "
				#TRANSLATORS: Intermediate scanning result, '%d' channel(s) have been found so far
				message += ngettext("%d channel found", "%d channels found", result) % result
				self.text.setText(message)
				transponder = self.scan.getCurrentTransponder()
				network = ""
				tp_text = ""
				if transponder:
					tp_type = transponder.getSystem()
					if tp_type == iDVBFrontend.feSatellite:
						network = _("Satellite")
						tp = transponder.getDVBS()
						orb_pos = tp.orbital_position
						try:
							sat_name = str(nimmgr.getSatDescription(orb_pos))
						except KeyError:
							sat_name = ""
						if orb_pos > 1800: # west
							orb_pos = 3600 - orb_pos
							h = _("W")
						else:
							h = _("E")
						if ("%d.%d" % (orb_pos/10, orb_pos%10)) in sat_name:
							network = sat_name
						else:
							network = ("%s %d.%d %s") % (sat_name, orb_pos / 10, orb_pos % 10, h)
						tp_text = { tp.System_DVB_S : "DVB-S", tp.System_DVB_S2 : "DVB-S2" }.get(tp.system, "")
						if tp_text == "DVB-S2":
							tp_text = ("%s %s") % ( tp_text,
								{ tp.Modulation_Auto : "Auto", tp.Modulation_QPSK : "QPSK",
									tp.Modulation_8PSK : "8PSK", tp.Modulation_QAM16 : "QAM16",
									tp.Modulation_16APSK : "16APSK", tp.Modulation_32APSK : "32APSK" }.get(tp.modulation, ""))
						tp_text = ("%s %d%c / %d / %s") % ( tp_text, tp.frequency/1000,
							{ tp.Polarisation_Horizontal : 'H', tp.Polarisation_Vertical : 'V', tp.Polarisation_CircularLeft : 'L',
								tp.Polarisation_CircularRight : 'R' }.get(tp.polarisation, ' '),
							tp.symbol_rate/1000,
							{ tp.FEC_Auto : "AUTO", tp.FEC_1_2 : "1/2", tp.FEC_2_3 : "2/3",
								tp.FEC_3_4 : "3/4", tp.FEC_5_6 : "5/6", tp.FEC_7_8 : "7/8",
								tp.FEC_8_9 : "8/9", tp.FEC_3_5 : "3/5", tp.FEC_4_5 : "4/5",
								tp.FEC_9_10 : "9/10", tp.FEC_None : "NONE" }.get(tp.fec, ""))
					elif tp_type == iDVBFrontend.feCable:
						network = _("Cable")
						tp = transponder.getDVBC()
						tp_text = ("DVB-C %s %d / %d / %s") %( { tp.Modulation_Auto : "AUTO",
							tp.Modulation_QAM16 : "QAM16", tp.Modulation_QAM32 : "QAM32",
							tp.Modulation_QAM64 : "QAM64", tp.Modulation_QAM128 : "QAM128",
							tp.Modulation_QAM256 : "QAM256" }.get(tp.modulation, ""),
							tp.frequency,
							tp.symbol_rate/1000,
							{ tp.FEC_Auto : "AUTO", tp.FEC_1_2 : "1/2", tp.FEC_2_3 : "2/3",
								tp.FEC_3_4 : "3/4", tp.FEC_5_6 : "5/6", tp.FEC_7_8 : "7/8",
								tp.FEC_8_9 : "8/9", tp.FEC_3_5 : "3/5", tp.FEC_4_5 : "4/5", tp.FEC_9_10 : "9/10", tp.FEC_None : "NONE" }.get(tp.fec_inner, ""))
					elif tp_type == iDVBFrontend.feTerrestrial:
						network = _("Terrestrial")
						tp = transponder.getDVBT()
						channel = getChannelNumber(tp.frequency, self.scanList[self.run]["feid"])
						if channel:
							channel = _("CH") + "%s " % channel
						freqMHz = "%0.1f MHz" % (tp.frequency/1000000.)
						tp_text = ("%s %s %s %s") %(
							{
								tp.System_DVB_T_T2 : "DVB-T/T2",
								tp.System_DVB_T : "DVB-T",
								tp.System_DVB_T2 : "DVB-T2"
							}.get(tp.system, ""),
							{
								tp.Modulation_QPSK : "QPSK",
								tp.Modulation_QAM16 : "QAM16", tp.Modulation_QAM64 : "QAM64",
								tp.Modulation_Auto : "AUTO", tp.Modulation_QAM256 : "QAM256"
							}.get(tp.modulation, ""),
							"%s%s" % (channel, freqMHz.replace(".0","")),
							{
								tp.Bandwidth_8MHz : "Bw 8MHz", tp.Bandwidth_7MHz : "Bw 7MHz", tp.Bandwidth_6MHz : "Bw 6MHz",
								tp.Bandwidth_Auto : "Bw Auto", tp.Bandwidth_5MHz : "Bw 5MHz",
								tp.Bandwidth_1_712MHz : "Bw 1.712MHz", tp.Bandwidth_10MHz : "Bw 10MHz"
							}.get(tp.bandwidth, ""))
					else:
						print "unknown transponder type in scanStatusChanged"
				self.network.setText(network)
				self.transponder.setText(tp_text)

		if self.state == self.Done:
			result = self.foundServices + self.scan.getNumServices()
			self.text.setText(ngettext("Scanning completed, %d channel found", "Scanning completed, %d channels found", result) % result)

		if self.state == self.Error:
			self.text.setText(_("ERROR - failed to scan (%s)!") % (self.Errors[self.errorcode]) )

		if self.state == self.Done or self.state == self.Error:
			if self.run != len(self.scanList) - 1:
				self.foundServices += self.scan.getNumServices()
				self.execEnd()
				self.run += 1
				self.execBegin()
コード例 #12
0
ファイル: ServiceScan.py プロジェクト: sodo13/EG-gui
    def scanStatusChanged(self):
        if self.state == self.Running:
            self.progressbar.setValue(self.scan.getProgress())
            self.lcd_summary.updateProgress(self.scan.getProgress())
            if self.scan.isDone():
                errcode = self.scan.getError()
                if errcode == 0:
                    self.state = self.Done
                    self.servicelist.listAll()
                else:
                    self.state = self.Error
                    self.errorcode = errcode
                self.network.setText('')
                self.transponder.setText('')
            else:
                result = self.foundServices + self.scan.getNumServices()
                percentage = self.scan.getProgress()
                if percentage > 99:
                    percentage = 99
                message = ngettext('Scanning - %d%% completed', 'Scanning - %d%% completed', percentage) % percentage
                message += ', '
                message += ngettext('%d channel found', '%d channels found', result) % result
                self.text.setText(message)
                transponder = self.scan.getCurrentTransponder()
                network = ''
                tp_text = ''
                if transponder:
                    tp_type = transponder.getSystem()
                    if tp_type == iDVBFrontend.feSatellite:
                        network = _('Satellite')
                        tp = transponder.getDVBS()
                        orb_pos = tp.orbital_position
                        try:
                            sat_name = str(nimmgr.getSatDescription(orb_pos))
                        except KeyError:
                            sat_name = ''

                        if orb_pos > 1800:
                            orb_pos = 3600 - orb_pos
                            h = _('W')
                        else:
                            h = _('E')
                        if '%d.%d' % (orb_pos / 10, orb_pos % 10) in sat_name:
                            network = sat_name
                        else:
                            network = '%s %d.%d %s' % (sat_name,
                             orb_pos / 10,
                             orb_pos % 10,
                             h)
                        tp_text = {tp.System_DVB_S: 'DVB-S',
                         tp.System_DVB_S2: 'DVB-S2'}.get(tp.system, '')
                        if tp_text == 'DVB-S2':
                            tp_text = '%s %s' % (tp_text, {tp.Modulation_Auto: 'Auto',
                              tp.Modulation_QPSK: 'QPSK',
                              tp.Modulation_8PSK: '8PSK',
                              tp.Modulation_QAM16: 'QAM16'}.get(tp.modulation, ''))
                        tp_text = '%s %d%c / %d / %s' % (tp_text,
                         tp.frequency / 1000,
                         {tp.Polarisation_Horizontal: 'H',
                          tp.Polarisation_Vertical: 'V',
                          tp.Polarisation_CircularLeft: 'L',
                          tp.Polarisation_CircularRight: 'R'}.get(tp.polarisation, ' '),
                         tp.symbol_rate / 1000,
                         {tp.FEC_Auto: 'AUTO',
                          tp.FEC_1_2: '1/2',
                          tp.FEC_2_3: '2/3',
                          tp.FEC_3_4: '3/4',
                          tp.FEC_5_6: '5/6',
                          tp.FEC_7_8: '7/8',
                          tp.FEC_8_9: '8/9',
                          tp.FEC_3_5: '3/5',
                          tp.FEC_4_5: '4/5',
                          tp.FEC_9_10: '9/10',
                          tp.FEC_None: 'NONE'}.get(tp.fec, ''))
                    elif tp_type == iDVBFrontend.feCable:
                        network = _('Cable')
                        tp = transponder.getDVBC()
                        tp_text = 'DVB-C %s %d / %d / %s' % ({tp.Modulation_Auto: 'AUTO',
                          tp.Modulation_QAM16: 'QAM16',
                          tp.Modulation_QAM32: 'QAM32',
                          tp.Modulation_QAM64: 'QAM64',
                          tp.Modulation_QAM128: 'QAM128',
                          tp.Modulation_QAM256: 'QAM256'}.get(tp.modulation, ''),
                         tp.frequency,
                         tp.symbol_rate / 1000,
                         {tp.FEC_Auto: 'AUTO',
                          tp.FEC_1_2: '1/2',
                          tp.FEC_2_3: '2/3',
                          tp.FEC_3_4: '3/4',
                          tp.FEC_5_6: '5/6',
                          tp.FEC_7_8: '7/8',
                          tp.FEC_8_9: '8/9',
                          tp.FEC_3_5: '3/5',
                          tp.FEC_4_5: '4/5',
                          tp.FEC_9_10: '9/10',
                          tp.FEC_None: 'NONE'}.get(tp.fec_inner, ''))
                    elif tp_type == iDVBFrontend.feTerrestrial:
                        network = _('Terrestrial')
                        tp = transponder.getDVBT()
                        channel = getChannelNumber(tp.frequency, self.scanList[self.run]['feid'])
                        if channel:
                            channel = _('CH') + '%s ' % channel
                        freqMHz = '%0.1f MHz' % (tp.frequency / 1000000.0)
                        tp_text = '%s %s %s %s' % ({tp.System_DVB_T_T2: 'DVB-T/T2',
                          tp.System_DVB_T: 'DVB-T',
                          tp.System_DVB_T2: 'DVB-T2'}.get(tp.system, ''),
                         {tp.Modulation_QPSK: 'QPSK',
                          tp.Modulation_QAM16: 'QAM16',
                          tp.Modulation_QAM64: 'QAM64',
                          tp.Modulation_Auto: 'AUTO',
                          tp.Modulation_QAM256: 'QAM256'}.get(tp.modulation, ''),
                         '%s%s' % (channel, freqMHz.replace('.0', '')),
                         {tp.Bandwidth_8MHz: 'Bw 8MHz',
                          tp.Bandwidth_7MHz: 'Bw 7MHz',
                          tp.Bandwidth_6MHz: 'Bw 6MHz',
                          tp.Bandwidth_Auto: 'Bw Auto',
                          tp.Bandwidth_5MHz: 'Bw 5MHz',
                          tp.Bandwidth_1_712MHz: 'Bw 1.712MHz',
                          tp.Bandwidth_10MHz: 'Bw 10MHz'}.get(tp.bandwidth, ''))
                    else:
                        print 'unknown transponder type in scanStatusChanged'
                self.network.setText(network)
                self.transponder.setText(tp_text)
        if self.state == self.Done:
            result = self.foundServices + self.scan.getNumServices()
            self.text.setText(ngettext('Scanning completed, %d channel found', 'Scanning completed, %d channels found', result) % result)
        if self.state == self.Error:
            self.text.setText(_('ERROR - failed to scan (%s)!') % self.Errors[self.errorcode])
        if self.state == self.Done or self.state == self.Error:
            if self.run != len(self.scanList) - 1:
                self.foundServices += self.scan.getNumServices()
                self.execEnd()
                self.run += 1
                self.execBegin()
コード例 #13
0
    def scanStatusChanged(self):
        if self.state == self.Running:
            self.progressbar.setValue(self.scan.getProgress())
            self.lcd_summary and self.lcd_summary.updateProgress(
                self.scan.getProgress())
            if self.scan.isDone():
                errcode = self.scan.getError()

                if errcode == 0:
                    self.state = self.Done
                    self.servicelist.listAll()
                else:
                    self.state = self.Error
                    self.errorcode = errcode
                self.network.setText("")
                self.transponder.setText("")
            else:
                result = self.foundServices + self.scan.getNumServices()
                percentage = self.scan.getProgress()
                if percentage > 99:
                    percentage = 99
                # TRANSLATORS: The stb is performing a channel scan, progress percentage is printed in "%d" (and "%%" will show a single "%" symbol)
                message = ngettext("Scanning - %d%% completed.",
                                   "Scanning - %d%% completed.",
                                   percentage) % percentage
                message += "\n"
                # TRANSLATORS: Intermediate scanning result, "%d" channel(s) have been found so far
                message += ngettext("%d channel found.", "%d channels found.",
                                    result) % result
                self.text.setText(message)
                transponder = self.scan.getCurrentTransponder()
                network = ""
                tp_text = ""
                if transponder:
                    tp_type = transponder.getSystem()
                    if tp_type == iDVBFrontend.feSatellite:
                        network = _("Satellite")
                        tp = transponder.getDVBS()
                        orb_pos = tp.orbital_position
                        try:
                            sat_name = str(nimmgr.getSatDescription(orb_pos))
                        except KeyError:
                            sat_name = ""
                        if orb_pos > 1800:  # west
                            orb_pos = 3600 - orb_pos
                            h = _("W")
                        else:
                            h = _("E")
                        if ("%d.%d" %
                            (orb_pos / 10, orb_pos % 10)) in sat_name:
                            network = sat_name
                        else:
                            network = "%s %d.%d %s" % (sat_name, orb_pos / 10,
                                                       orb_pos % 10, h)
                        tp_text = {
                            tp.System_DVB_S: "DVB-S",
                            tp.System_DVB_S2: "DVB-S2"
                        }.get(tp.system, "")
                        if tp_text == "DVB-S2":
                            tp_text = "%s %s" % (tp_text, {
                                tp.Modulation_Auto: "Auto",
                                tp.Modulation_QPSK: "QPSK",
                                tp.Modulation_8PSK: "8PSK",
                                tp.Modulation_QAM16: "QAM16",
                                tp.Modulation_16APSK: "16APSK",
                                tp.Modulation_32APSK: "32APSK"
                            }.get(tp.modulation, ""))
                        tp_text = "%s %d%c / %d / %s" % (
                            tp_text, tp.frequency / 1000, {
                                tp.Polarisation_Horizontal: "H",
                                tp.Polarisation_Vertical: "V",
                                tp.Polarisation_CircularLeft: "L",
                                tp.Polarisation_CircularRight: "R"
                            }.get(tp.polarisation,
                                  " "), tp.symbol_rate / 1000, {
                                      tp.FEC_Auto: "AUTO",
                                      tp.FEC_1_2: "1/2",
                                      tp.FEC_2_3: "2/3",
                                      tp.FEC_3_4: "3/4",
                                      tp.FEC_5_6: "5/6",
                                      tp.FEC_7_8: "7/8",
                                      tp.FEC_8_9: "8/9",
                                      tp.FEC_3_5: "3/5",
                                      tp.FEC_4_5: "4/5",
                                      tp.FEC_9_10: "9/10",
                                      tp.FEC_None: "NONE"
                                  }.get(tp.fec, ""))
                        if tp.is_id > -1 and tp.system == tp.System_DVB_S2:
                            tp_text = ("%s IS %d") % (tp_text, tp.is_id)
                    elif tp_type == iDVBFrontend.feCable:
                        network = _("Cable")
                        tp = transponder.getDVBC()
                        tp_text = "DVB-C %s %d / %d / %s" % (
                            {
                                tp.Modulation_Auto: "AUTO",
                                tp.Modulation_QAM16: "QAM16",
                                tp.Modulation_QAM32: "QAM32",
                                tp.Modulation_QAM64: "QAM64",
                                tp.Modulation_QAM128: "QAM128",
                                tp.Modulation_QAM256: "QAM256"
                            }.get(tp.modulation,
                                  ""), tp.frequency, tp.symbol_rate / 1000, {
                                      tp.FEC_Auto: "AUTO",
                                      tp.FEC_1_2: "1/2",
                                      tp.FEC_2_3: "2/3",
                                      tp.FEC_3_4: "3/4",
                                      tp.FEC_5_6: "5/6",
                                      tp.FEC_7_8: "7/8",
                                      tp.FEC_8_9: "8/9",
                                      tp.FEC_3_5: "3/5",
                                      tp.FEC_4_5: "4/5",
                                      tp.FEC_9_10: "9/10",
                                      tp.FEC_None: "NONE"
                                  }.get(tp.fec_inner, ""))
                    elif tp_type == iDVBFrontend.feTerrestrial:
                        network = _("Terrestrial")
                        tp = transponder.getDVBT()
                        channel = getChannelNumber(
                            tp.frequency, self.scanList[self.run]["feid"])
                        if channel:
                            channel = _("CH") + "%s " % channel
                        freqMHz = "%1.3f MHz" % (tp.frequency / 1000000.)
                        tp_text = "%s %s %s %s" % (
                            {
                                tp.System_DVB_T_T2: "DVB-T/T2",
                                tp.System_DVB_T: "DVB-T",
                                tp.System_DVB_T2: "DVB-T2"
                            }.get(tp.system, ""), {
                                tp.Modulation_QPSK: "QPSK",
                                tp.Modulation_QAM16: "QAM16",
                                tp.Modulation_QAM64: "QAM64",
                                tp.Modulation_Auto: "AUTO",
                                tp.Modulation_QAM256: "QAM256"
                            }.get(tp.modulation, ""), "%s%s" %
                            (channel, freqMHz.replace("0.000", "")), {
                                tp.Bandwidth_8MHz: "Bw 8MHz",
                                tp.Bandwidth_7MHz: "Bw 7MHz",
                                tp.Bandwidth_6MHz: "Bw 6MHz",
                                tp.Bandwidth_Auto: "Bw Auto",
                                tp.Bandwidth_5MHz: "Bw 5MHz",
                                tp.Bandwidth_1_712MHz: "Bw 1.712MHz",
                                tp.Bandwidth_10MHz: "Bw 10MHz"
                            }.get(tp.bandwidth, ""))
                    elif tp_type == iDVBFrontend.feATSC:
                        network = _("ATSC")
                        tp = transponder.getATSC()
                        freqMHz = "%0.1f MHz" % (tp.frequency / 1000000.)
                        tp_text = ("%s %s %s %s") % (
                            {
                                tp.System_ATSC: _("ATSC"),
                                tp.System_DVB_C_ANNEX_B: _("DVB-C ANNEX B")
                            }.get(tp.system, ""), {
                                tp.Modulation_Auto: _("Auto"),
                                tp.Modulation_QAM16: "QAM16",
                                tp.Modulation_QAM32: "QAM32",
                                tp.Modulation_QAM64: "QAM64",
                                tp.Modulation_QAM128: "QAM128",
                                tp.Modulation_QAM256: "QAM256",
                                tp.Modulation_VSB_8: "8VSB",
                                tp.Modulation_VSB_16: "16VSB"
                            }.get(tp.modulation, ""), freqMHz.replace(
                                ".0", ""), {
                                    tp.Inversion_Off: _("Off"),
                                    tp.Inversion_On: _("On"),
                                    tp.Inversion_Unknown: _("Auto")
                                }.get(tp.inversion, ""))
                    else:
                        print "[ServiceScan] Unknown transponder type in scanStatusChanged"
                self.network.setText(network)
                self.transponder.setText(tp_text)

        if self.state == self.Done:
            result = self.foundServices + self.scan.getNumServices()
            self.text.setText(
                ngettext("Scanning completed.\n%d channel found.",
                         "Scanning completed.\n%d channels found.", result) %
                result)
            self.done_text.setText(
                _("Your scan is now complete.\nPlease press OK to continue."))
            self.done_text.show()

        if self.state == self.Error:
            self.text.setText(
                _("ERROR: Failed to scan (%s)!") %
                (self.Errors[self.errorcode]))
            self.done_text.setText(
                _("ERROR: Failed to scan (%s)!") %
                (self.Errors[self.errorcode]))
            self.done_text.show()

        if self.state == self.Done or self.state == self.Error:
            if self.run != len(self.scanList) - 1:
                self.foundServices += self.scan.getNumServices()
                self.execEnd()
                self.run += 1
                self.execBegin()
コード例 #14
0
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if self.transponder_info:
				tuner = (_("Type"), frontendData["tuner_type"], TYPE_TEXT)
			else:
				tuner = (_("NIM & Type"), chr(ord('A') + frontendData["tuner_number"]) + " - " + frontendData["tuner_type"], TYPE_TEXT)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				data = (tuner,
					(_("System & Modulation"), frontendData["system"] + " " + frontendData["modulation"], TYPE_TEXT),
					(_("Orbital position"), frontendData["orbital_position"], TYPE_VALUE_DEC),
					(_("Frequency & Polarization"), "%s MHz" % (frontendData["frequency"] / 1000) + " - " + frontendData["polarization"], TYPE_TEXT),
					(_("Symbol rate & FEC"), "%s KSymb/s" % (frontendData["symbol_rate"] / 1000) + " - " + frontendData["fec_inner"], TYPE_TEXT),
					(_("Inversion, Pilot & Roll-off"), frontendData["inversion"] + " - " + str(frontendData.get("pilot", None)) + " - " + str(frontendData.get("rolloff", None)), TYPE_TEXT),)
				if frontendData["system"] == "DVB-S2":
					data += ((_("Input Stream"), frontendData["is_id"], TYPE_VALUE_DEC),
						(_("PLS Mode & PLS Code"), str(frontendData["pls_mode"]) + " - " + str(frontendData["pls_code"]), TYPE_TEXT),)
				return data
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return (tuner,
					(_("Modulation"), frontendData["modulation"], TYPE_TEXT),
					(_("Frequency"), frontendData["frequency"], TYPE_VALUE_FREQ_FLOAT),
					(_("Symbol rate & FEC"), "%s KSymb/s" % (frontendData["symbol_rate"] / 1000) + " - " + frontendData["fec_inner"], TYPE_TEXT),
					(_("Inversion"), frontendData["inversion"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T" and frontendData["system"] == "DVB-T2":
				return (tuner,
					(_("Frequency & Channel"), "%.3f MHz" % ((frontendData["frequency"] / 1000) / 1000.0) + " - Ch. " + getChannelNumber(frontendData["frequency"], frontendData["tuner_number"]), TYPE_TEXT),
					(_("Inversion & Bandwidth"), frontendData["inversion"] + " - " + str(frontendData["bandwidth"]), TYPE_TEXT),
					(_("Code R. LP-HP & Guard Int."), frontendData["code_rate_lp"] + " - " + frontendData["code_rate_hp"] + " - " + frontendData["guard_interval"], TYPE_TEXT),
					(_("Constellation & FFT mode"), frontendData["constellation"] + " - " + frontendData["transmission_mode"], TYPE_TEXT),
					(_("Hierarchy info"), frontendData["hierarchy_information"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "ATSC":
				return (tuner,
					(_("System & Modulation"), frontendData["system"] + " " + frontendData["modulation"], TYPE_TEXT),
					(_("Frequency"), frontendData["frequency"] / 1000, TYPE_VALUE_FREQ_FLOAT),
					(_("Inversion"), frontendData["inversion"], TYPE_TEXT))
		return []
コード例 #15
0
ファイル: ServiceInfo.py プロジェクト: ostende/new-e2
					return (tuner,
						(_("System & Modulation"), "%s %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
						(_("Orbital position"), "%s" % frontendData["orbital_position"], TYPE_TEXT),
						(_("Frequency & Polarization"), "%s - %s" % (frontendData.get("frequency", 0), frontendData["polarization"]), TYPE_TEXT),
						(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
						(_("Inversion, Pilot & Roll-off"), "%s - %s - %s" % (frontendData["inversion"], frontendData.get("pilot", None), str(frontendData.get("rolloff", None))), TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return (tuner,
					(_("Modulation"),"%s" % frontendData["modulation"], TYPE_TEXT),
					(_("Frequency"), "%s" % frontendData.get("frequency", 0), TYPE_TEXT),
					(_("Symbol rate & FEC"), "%s - %s" % (frontendData.get("symbol_rate", 0), frontendData["fec_inner"]), TYPE_TEXT),
					(_("Inversion"), "%s" % frontendData["inversion"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				return (tuner,
<<<<<<< HEAD
					(_("Frequency & Channel"), "%s - Ch. %s" % (frontendData.get("frequency", 0), getChannelNumber(frontendData["frequency"], frontendData["tuner_number"])), TYPE_TEXT),
					(_("Inversion & Bandwidth"), "%s - %s" % (frontendData["inversion"], frontendData["bandwidth"]), TYPE_TEXT),
					(_("Code Rate LP-HP"), "%s - %s" % (frontendData["code_rate_lp"], frontendData["code_rate_hp"]), TYPE_TEXT),
					(_("Guard interval"), frontendData["guard_interval"], TYPE_TEXT),
					(_("Constellation"), frontendData["constellation"], TYPE_TEXT),
					(_("Transmission mode"), frontendData["transmission_mode"], TYPE_TEXT),
=======
					(_("Frequency & Channel"), "%.3f MHz" % ((frontendData.get("frequency", 0) / 1000) / 1000.0) + " - " + frontendData["channel"], TYPE_TEXT),
					(_("Inversion & Bandwidth"), "%s - %s" % (frontendData["inversion"], frontendData["bandwidth"]), TYPE_TEXT),
					(_("Code R. LP-HP & Guard Int"), "%s - %s - %s" % (frontendData["code_rate_lp"], frontendData["code_rate_hp"], frontendData["guard_interval"]), TYPE_TEXT),
					(_("Constellation & FFT mode"), "%s - %s" % (frontendData["constellation"], frontendData["transmission_mode"]), TYPE_TEXT),
>>>>>>> dev/Dev
					(_("Hierarchy info"), "%s" % frontendData["hierarchy_information"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "ATSC":
				return (tuner,
					(_("System & Modulation"), "%s - %s" % (frontendData["system"], frontendData["modulation"]), TYPE_TEXT),
コード例 #16
0
	def createSetup(self):
		self.list = []
		self.satfinderTunerEntry = getConfigListEntry(_("Tuner"), self.satfinder_scan_nims)
		self.list.append(self.satfinderTunerEntry)
		if nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-S"):
			self.tuning_sat = self.scan_satselection[self.getSelectedSatIndex(self.feid)]
			self.satEntry = getConfigListEntry(_('Satellite'), self.tuning_sat)
			self.list.append(self.satEntry)
			self.typeOfTuningEntry = getConfigListEntry(_('Tune'), self.tuning_type)
			if len(nimmanager.getTransponders(int(self.tuning_sat.value))) < 1: # Only offer 'predefined transponder' if some transponders exist
				self.tuning_type.value = "single_transponder"
			else:
				self.list.append(self.typeOfTuningEntry)

			nim = nimmanager.nim_slots[self.feid]

			if self.tuning_type.value == "single_transponder":
				if nim.isCompatible("DVB-S2"):
					self.systemEntry = getConfigListEntry(_('System'), self.scan_sat.system)
					self.list.append(self.systemEntry)
				else:
					# downgrade to dvb-s, in case a -s2 config was active
					self.scan_sat.system.value = eDVBFrontendParametersSatellite.System_DVB_S
				self.list.append(getConfigListEntry(_('Frequency'), self.scan_sat.frequency))
				self.list.append(getConfigListEntry(_('Polarization'), self.scan_sat.polarization))
				self.list.append(getConfigListEntry(_('Symbol rate'), self.scan_sat.symbolrate))
				self.list.append(getConfigListEntry(_('Inversion'), self.scan_sat.inversion))
				if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S:
					self.list.append(getConfigListEntry(_("FEC"), self.scan_sat.fec))
				elif self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S2:
					self.list.append(getConfigListEntry(_("FEC"), self.scan_sat.fec_s2))
					self.modulationEntry = getConfigListEntry(_('Modulation'), self.scan_sat.modulation)
					self.list.append(self.modulationEntry)
					self.list.append(getConfigListEntry(_('Roll-off'), self.scan_sat.rolloff))
					self.list.append(getConfigListEntry(_('Pilot'), self.scan_sat.pilot))
					self.list.append(getConfigListEntry(_('Input Stream ID'), self.scan_sat.is_id))
					self.list.append(getConfigListEntry(_("PLS Mode"), self.scan_sat.pls_mode))
					self.list.append(getConfigListEntry(_('PLS Code'), self.scan_sat.pls_code))
			elif self.tuning_type.value == "predefined_transponder":
				self.updatePreDefTransponders()
				self.list.append(getConfigListEntry(_("Transponder"), self.preDefTransponders))
		elif nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-C"):
			self.typeOfTuningEntry = getConfigListEntry(_('Tune'), self.tuning_type)
			if config.Nims[self.feid].cable.scan_type.value != "provider" or len(nimmanager.getTranspondersCable(int(self.satfinder_scan_nims.value))) < 1: # only show 'predefined transponder' if in provider mode and transponders exist
				self.tuning_type.value = "single_transponder"
			else:
				self.list.append(self.typeOfTuningEntry)
			if self.tuning_type.value == "single_transponder":
				self.list.append(getConfigListEntry(_("Frequency"), self.scan_cab.frequency))
				self.list.append(getConfigListEntry(_("Inversion"), self.scan_cab.inversion))
				self.list.append(getConfigListEntry(_("Symbol rate"), self.scan_cab.symbolrate))
				self.list.append(getConfigListEntry(_("Modulation"), self.scan_cab.modulation))
				self.list.append(getConfigListEntry(_("FEC"), self.scan_cab.fec))
			elif self.tuning_type.value == "predefined_transponder":
				self.scan_nims.value = self.satfinder_scan_nims.value
				self.predefinedCabTranspondersList()
				self.list.append(getConfigListEntry(_('Transponder'), self.CableTransponders))
		elif nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-T"):
			self.typeOfTuningEntry = getConfigListEntry(_('Tune'), self.tuning_type)
			region = nimmanager.getTerrestrialDescription(int(self.satfinder_scan_nims.value))
			if len(nimmanager.getTranspondersTerrestrial(region)) < 1: # Only offer 'predefined transponder' if some transponders exist
				self.tuning_type.value = "single_transponder"
			else:
				self.list.append(self.typeOfTuningEntry)
			if self.tuning_type.value == "single_transponder":
				if nimmanager.nim_slots[int(self.satfinder_scan_nims.value)].isCompatible("DVB-T2"):
					self.systemEntryTerr = getConfigListEntry(_('System'), self.scan_ter.system)
					self.list.append(self.systemEntryTerr)
				else:
					self.scan_ter.system.value = eDVBFrontendParametersTerrestrial.System_DVB_T
				self.typeOfInputEntry = getConfigListEntry(_("Use frequency or channel"), self.scan_input_as)
				if self.ter_channel_input:
					self.list.append(self.typeOfInputEntry)
				else:
					self.scan_input_as.value = self.scan_input_as.choices[0]
				if self.ter_channel_input and self.scan_input_as.value == "channel":
					channel = getChannelNumber(self.scan_ter.frequency.value*1000, self.ter_tnumber)
					if channel:
						self.scan_ter.channel.value = int(channel.replace("+","").replace("-",""))
					self.list.append(getConfigListEntry(_("Channel"), self.scan_ter.channel))
				else:
					prev_val = self.scan_ter.frequency.value
					self.scan_ter.frequency.value = channel2frequency(self.scan_ter.channel.value, self.ter_tnumber)/1000
					if self.scan_ter.frequency.value == 474000:
						self.scan_ter.frequency.value = prev_val
					self.list.append(getConfigListEntry(_("Frequency"), self.scan_ter.frequency))
				self.list.append(getConfigListEntry(_("Inversion"), self.scan_ter.inversion))
				self.list.append(getConfigListEntry(_("Bandwidth"), self.scan_ter.bandwidth))
				self.list.append(getConfigListEntry(_("Code rate HP"), self.scan_ter.fechigh))
				self.list.append(getConfigListEntry(_("Code rate LP"), self.scan_ter.feclow))
				self.list.append(getConfigListEntry(_("Modulation"), self.scan_ter.modulation))
				self.list.append(getConfigListEntry(_("Transmission mode"), self.scan_ter.transmission))
				self.list.append(getConfigListEntry(_("Guard interval"), self.scan_ter.guard))
				self.list.append(getConfigListEntry(_("Hierarchy info"), self.scan_ter.hierarchy))
				if self.scan_ter.system.value == eDVBFrontendParametersTerrestrial.System_DVB_T2:
					self.list.append(getConfigListEntry(_('PLP ID'), self.scan_ter.plp_id))
			elif self.tuning_type.value == "predefined_transponder":
				self.scan_nims.value = self.satfinder_scan_nims.value
				self.predefinedTerrTranspondersList()
				self.list.append(getConfigListEntry(_('Transponder'), self.TerrestrialTransponders))
		self.retune(None)
		self["config"].list = self.list
		self["config"].l.setList(self.list)
コード例 #17
0
ファイル: PliExtraInfo.py プロジェクト: miuipower/openLD
	def createChannelNumber(self, fedata, feraw):
		channel = getChannelNumber(feraw.get("frequency"), feraw.get("tuner_number"))
		if channel:
			return _("CH") + "%s" % channel
		return ""
コード例 #18
0
ファイル: plugin.py プロジェクト: teambluee2/stbgui
    def createSetup(self):
        self.list = []
        self.satfinderTunerEntry = getConfigListEntry(_("Tuner"),
                                                      self.satfinder_scan_nims)
        self.list.append(self.satfinderTunerEntry)
        if nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("DVB-S"):
            self.tuning_sat = self.scan_satselection[self.getSelectedSatIndex(
                self.feid)]
            if self.tuning_sat.value:
                self.satEntry = getConfigListEntry(_('Satellite'),
                                                   self.tuning_sat)
                self.list.append(self.satEntry)
                self.typeOfTuningEntry = getConfigListEntry(
                    _('Tune'), self.tuning_type)
                if len(
                        nimmanager.getTransponders(int(self.tuning_sat.value))
                ) < 1:  # Only offer 'predefined transponder' if some transponders exist
                    self.tuning_type.value = "single_transponder"
                else:
                    self.list.append(self.typeOfTuningEntry)

                nim = nimmanager.nim_slots[self.feid]

                if self.tuning_type.value == "single_transponder":
                    if nim.isCompatible("DVB-S2"):
                        self.systemEntry = getConfigListEntry(
                            _('System'), self.scan_sat.system)
                        self.list.append(self.systemEntry)
                    else:
                        # downgrade to dvb-s, in case a -s2 config was active
                        self.scan_sat.system.value = eDVBFrontendParametersSatellite.System_DVB_S
                    self.frequencyEntry = getConfigListEntry(
                        _('Frequency'), self.scan_sat.frequency)
                    self.list.append(self.frequencyEntry)
                    self.polarizationEntry = getConfigListEntry(
                        _('Polarization'), self.scan_sat.polarization)
                    self.list.append(self.polarizationEntry)
                    self.symbolrateEntry = (getConfigListEntry(
                        _('Symbol rate'), self.scan_sat.symbolrate))
                    self.list.append(self.symbolrateEntry)
                    self.inversionEntry = getConfigListEntry(
                        _('Inversion'), self.scan_sat.inversion)
                    self.list.append(self.inversionEntry)

                    if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S:
                        self.fecEntry = getConfigListEntry(
                            _("FEC"), self.scan_sat.fec)
                        self.list.append(self.fecEntry)
                    elif self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S2:
                        self.fecEntry = getConfigListEntry(
                            _("FEC"), self.scan_sat.fec_s2)
                        self.list.append(self.fecEntry)
                        self.modulationEntry = getConfigListEntry(
                            _('Modulation'), self.scan_sat.modulation)
                        self.list.append(self.modulationEntry)
                        self.rolloffEntry = getConfigListEntry(
                            _('Roll-off'), self.scan_sat.rolloff)
                        self.list.append(self.rolloffEntry)
                        self.pilotEntry = getConfigListEntry(
                            _('Pilot'), self.scan_sat.pilot)
                        self.list.append(self.pilotEntry)
                        if nim.isMultistream():
                            self.list.append(
                                getConfigListEntry(_('Input Stream ID'),
                                                   self.scan_sat.is_id))
                            self.list.append(
                                getConfigListEntry(_('PLS Mode'),
                                                   self.scan_sat.pls_mode))
                            self.list.append(
                                getConfigListEntry(_('PLS Code'),
                                                   self.scan_sat.pls_code))
                elif self.tuning_type.value == "predefined_transponder":
                    if self.preDefTransponders is None:
                        self.updatePreDefTransponders()
                    self.list.append(
                        getConfigListEntry(_("Transponder"),
                                           self.preDefTransponders))
        elif nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("DVB-C"):
            self.typeOfTuningEntry = getConfigListEntry(
                _('Tune'), self.tuning_type)
            if config.Nims[self.feid].cable.scan_type.value != "provider" or len(
                    nimmanager.getTranspondersCable(
                        int(self.satfinder_scan_nims.value))
            ) < 1:  # only show 'predefined transponder' if in provider mode and transponders exist
                self.tuning_type.value = "single_transponder"
            else:
                self.list.append(self.typeOfTuningEntry)
            if self.tuning_type.value == "single_transponder":
                self.list.append(
                    getConfigListEntry(_("Frequency"),
                                       self.scan_cab.frequency))
                self.list.append(
                    getConfigListEntry(_("Inversion"),
                                       self.scan_cab.inversion))
                self.list.append(
                    getConfigListEntry(_("Symbol rate"),
                                       self.scan_cab.symbolrate))
                self.list.append(
                    getConfigListEntry(_("Modulation"),
                                       self.scan_cab.modulation))
                self.list.append(
                    getConfigListEntry(_("FEC"), self.scan_cab.fec))
            elif self.tuning_type.value == "predefined_transponder":
                self.scan_nims.value = self.satfinder_scan_nims.value
                if self.CableTransponders is None:
                    self.predefinedCabTranspondersList()
                self.list.append(
                    getConfigListEntry(_('Transponder'),
                                       self.CableTransponders))
        elif nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("DVB-T"):
            self.typeOfTuningEntry = getConfigListEntry(
                _('Tune'), self.tuning_type)
            region = nimmanager.getTerrestrialDescription(
                int(self.satfinder_scan_nims.value))
            if len(
                    nimmanager.getTranspondersTerrestrial(region)
            ) < 1:  # Only offer 'predefined transponder' if some transponders exist
                self.tuning_type.value = "single_transponder"
            else:
                self.list.append(self.typeOfTuningEntry)
            if self.tuning_type.value == "single_transponder":
                if nimmanager.nim_slots[int(
                        self.satfinder_scan_nims.value)].isCompatible(
                            "DVB-T2"):
                    self.systemEntryTerr = getConfigListEntry(
                        _('System'), self.scan_ter.system)
                    self.list.append(self.systemEntryTerr)
                else:
                    self.scan_ter.system.value = eDVBFrontendParametersTerrestrial.System_DVB_T
                self.typeOfInputEntry = getConfigListEntry(
                    _("Use frequency or channel"), self.scan_input_as)
                if self.ter_channel_input:
                    self.list.append(self.typeOfInputEntry)
                else:
                    self.scan_input_as.value = self.scan_input_as.choices[0]
                if self.ter_channel_input and self.scan_input_as.value == "channel":
                    channel = getChannelNumber(
                        self.scan_ter.frequency.floatint * 1000,
                        self.ter_tnumber)
                    if channel:
                        self.scan_ter.channel.removeNotifier(
                            self.retuneTriggeredByConfigElement)
                        self.scan_ter.channel.value = int(
                            channel.replace("+", "").replace("-", ""))
                    self.list.append(
                        getConfigListEntry(_("Channel"),
                                           self.scan_ter.channel))
                else:
                    prev_val = self.scan_ter.frequency.floatint
                    self.scan_ter.frequency.floatint = channel2frequency(
                        self.scan_ter.channel.value, self.ter_tnumber) / 1000
                    if self.scan_ter.frequency.floatint == 474000:
                        self.scan_ter.frequency.floatint = prev_val
                    self.list.append(
                        getConfigListEntry(_("Frequency"),
                                           self.scan_ter.frequency))
                self.list.append(
                    getConfigListEntry(_("Inversion"),
                                       self.scan_ter.inversion))
                self.list.append(
                    getConfigListEntry(_("Bandwidth"),
                                       self.scan_ter.bandwidth))
                self.list.append(
                    getConfigListEntry(_("Code rate HP"),
                                       self.scan_ter.fechigh))
                self.list.append(
                    getConfigListEntry(_("Code rate LP"),
                                       self.scan_ter.feclow))
                self.list.append(
                    getConfigListEntry(_("Modulation"),
                                       self.scan_ter.modulation))
                self.list.append(
                    getConfigListEntry(_("Transmission mode"),
                                       self.scan_ter.transmission))
                self.list.append(
                    getConfigListEntry(_("Guard interval"),
                                       self.scan_ter.guard))
                self.list.append(
                    getConfigListEntry(_("Hierarchy info"),
                                       self.scan_ter.hierarchy))
                if self.scan_ter.system.value == eDVBFrontendParametersTerrestrial.System_DVB_T2:
                    self.list.append(
                        getConfigListEntry(_('PLP ID'), self.scan_ter.plp_id))
            elif self.tuning_type.value == "predefined_transponder":
                self.scan_nims.value = self.satfinder_scan_nims.value
                if self.TerrestrialTransponders is None:
                    self.predefinedTerrTranspondersList()
                self.list.append(
                    getConfigListEntry(_('Transponder'),
                                       self.TerrestrialTransponders))
        elif nimmanager.nim_slots[int(
                self.satfinder_scan_nims.value)].isCompatible("ATSC"):
            self.typeOfTuningEntry = getConfigListEntry(
                _('Tune'), self.tuning_type)
            if len(
                    nimmanager.getTranspondersATSC(
                        int(self.satfinder_scan_nims.value))
            ) < 1:  # only show 'predefined transponder' if transponders exist
                self.tuning_type.value = "single_transponder"
            else:
                self.list.append(self.typeOfTuningEntry)
            if self.tuning_type.value == "single_transponder":
                self.systemEntryATSC = getConfigListEntry(
                    _("System"), self.scan_ats.system)
                self.list.append(self.systemEntryATSC)
                self.list.append(
                    getConfigListEntry(_("Frequency"),
                                       self.scan_ats.frequency))
                self.list.append(
                    getConfigListEntry(_("Inversion"),
                                       self.scan_ats.inversion))
                self.list.append(
                    getConfigListEntry(_("Modulation"),
                                       self.scan_ats.modulation))
            elif self.tuning_type.value == "predefined_transponder":
                #FIXME add region
                self.scan_nims.value = self.satfinder_scan_nims.value
                self.predefinedATSCTranspondersList()
                self.list.append(
                    getConfigListEntry(_('Transponder'),
                                       self.ATSCTransponders))
        self["config"].list = self.list
        self["config"].l.setList(self.list)
コード例 #19
0
	def scanStatusChanged(self):
		if self.state == self.Running:
			self.progressbar.setValue(self.scan.getProgress())
			self.lcd_summary.updateProgress(self.scan.getProgress())
			if self.scan.isDone():
				errcode = self.scan.getError()

				if errcode == 0:
					self.state = self.Done
					self.servicelist.listAll()
				else:
					self.state = self.Error
					self.errorcode = errcode
				self.network.setText("")
				self.transponder.setText("")
			else:
				result = self.foundServices + self.scan.getNumServices()
				percentage = self.scan.getProgress()
				#TRANSLATORS: The stb is performing a channel scan, progress percentage is printed in '%d' (and '%%' will show a single '%' symbol)
				message = ngettext("Scanning - %d%% completed", "Scanning - %d%% completed", percentage) % percentage
				message += ", "
				#TRANSLATORS: Intermediate scanning result, '%d' channel(s) have been found so far
				message += ngettext("%d channel found", "%d channels found", result) % result
				self.text.setText(message)
				transponder = self.scan.getCurrentTransponder()
				network = ""
				tp_text = ""
				if transponder:
					tp_type = transponder.getSystem()
					if tp_type == iDVBFrontend.feSatellite:
						network = _("Satellite")
						tp = transponder.getDVBS()
						orb_pos = tp.orbital_position
						try:
							sat_name = str(nimmgr.getSatDescription(orb_pos))
						except KeyError:
							sat_name = ""
						if orb_pos > 1800: # west
							orb_pos = 3600 - orb_pos
							h = _("W")
						else:
							h = _("E")
						if ("%d.%d" % (orb_pos/10, orb_pos%10)) in sat_name:
							network = sat_name
						else:
							network = ("%s %d.%d %s") % (sat_name, orb_pos / 10, orb_pos % 10, h)
						tp_text = { tp.System_DVB_S : "DVB-S", tp.System_DVB_S2 : "DVB-S2" }.get(tp.system, "")
						if tp_text == "DVB-S2":
							tp_text = ("%s %s") % ( tp_text,
								{ tp.Modulation_Auto : "Auto", tp.Modulation_QPSK : "QPSK",
									tp.Modulation_8PSK : "8PSK", tp.Modulation_QAM16 : "QAM16" }.get(tp.modulation, ""))
						tp_text = ("%s %d%c / %d / %s") % ( tp_text, tp.frequency/1000,
							{ tp.Polarisation_Horizontal : 'H', tp.Polarisation_Vertical : 'V', tp.Polarisation_CircularLeft : 'L',
								tp.Polarisation_CircularRight : 'R' }.get(tp.polarisation, ' '),
							tp.symbol_rate/1000,
							{ tp.FEC_Auto : "AUTO", tp.FEC_1_2 : "1/2", tp.FEC_2_3 : "2/3",
								tp.FEC_3_4 : "3/4", tp.FEC_5_6 : "5/6", tp.FEC_7_8 : "7/8",
								tp.FEC_8_9 : "8/9", tp.FEC_3_5 : "3/5", tp.FEC_4_5 : "4/5",
								tp.FEC_9_10 : "9/10", tp.FEC_None : "NONE" }.get(tp.fec, ""))
					elif tp_type == iDVBFrontend.feCable:
						network = _("Cable")
						tp = transponder.getDVBC()
						tp_text = ("DVB-C/C2 %s %d MHz / SR:%d / FEC:%s") %( { tp.Modulation_Auto : "AUTO",
							tp.Modulation_QAM16 : "QAM16", tp.Modulation_QAM32 : "QAM32",
							tp.Modulation_QAM64 : "QAM64", tp.Modulation_QAM128 : "QAM128",
							tp.Modulation_QAM256 : "QAM256" }.get(tp.modulation, ""),
							tp.frequency/1000,
							tp.symbol_rate/1000,
							{ tp.FEC_Auto : "AUTO", tp.FEC_1_2 : "1/2", tp.FEC_2_3 : "2/3",
								tp.FEC_3_4 : "3/4", tp.FEC_5_6 : "5/6", tp.FEC_7_8 : "7/8",
								tp.FEC_8_9 : "8/9", tp.FEC_3_5 : "3/5", tp.FEC_4_5 : "4/5", tp.FEC_9_10 : "9/10", tp.FEC_None : "NONE" }.get(tp.fec_inner, ""))
					elif tp_type == iDVBFrontend.feTerrestrial:
						network = _("Terrestrial")
						tp = transponder.getDVBT()
						channel = getChannelNumber(tp.frequency, self.scanList[self.run]["feid"])
						if channel:
							channel = _("CH") + "%s " % channel
						freqMHz = "%0.1f MHz" % (tp.frequency/1000000.)
						tp_text = ("%s %s %s %s") %(
							{
								tp.System_DVB_T_T2 : "DVB-T/T2",
								tp.System_DVB_T : "DVB-T",
								tp.System_DVB_T2 : "DVB-T2"
							}.get(tp.system, ""),
							{
								tp.Modulation_QPSK : "QPSK",
								tp.Modulation_QAM16 : "QAM16", tp.Modulation_QAM64 : "QAM64",
								tp.Modulation_Auto : "AUTO", tp.Modulation_QAM256 : "QAM256"
							}.get(tp.modulation, ""),
							"%s%s" % (channel, freqMHz.replace(".0","")),
							{
								tp.Bandwidth_8MHz : "Bw 8MHz", tp.Bandwidth_7MHz : "Bw 7MHz", tp.Bandwidth_6MHz : "Bw 6MHz",
								tp.Bandwidth_Auto : "Bw Auto", tp.Bandwidth_5MHz : "Bw 5MHz",
								tp.Bandwidth_1_712MHz : "Bw 1.712MHz", tp.Bandwidth_10MHz : "Bw 10MHz"
							}.get(tp.bandwidth, ""))
					else:
						print "unknown transponder type in scanStatusChanged"
				self.network.setText(network)
				self.transponder.setText(tp_text)

		if self.state == self.Done:
			result = self.foundServices + self.scan.getNumServices()
			self.text.setText(ngettext("Scanning completed, %d channel found", "Scanning completed, %d channels found", result) % result)

		if self.state == self.Error:
			self.text.setText(_("ERROR - failed to scan (%s)!") % (self.Errors[self.errorcode]) )

		if self.state == self.Done or self.state == self.Error:
			if self.run != len(self.scanList) - 1:
				self.foundServices += self.scan.getNumServices()
				self.execEnd()
				self.run += 1
				self.execBegin()
コード例 #20
0
	def scanStatusChanged(self):
		if self.state == self.Running:
			self.progressbar.setValue(self.scan.getProgress())
			self.lcd_summary and self.lcd_summary.updateProgress(self.scan.getProgress())
			if self.scan.isDone():
				errcode = self.scan.getError()

				if errcode == 0:
					self.state = self.DonePartially
					self.servicelist.listAll()
				else:
					self.state = self.Error
					self.errorcode = errcode
				self.network.setText("")
				self.transponder.setText("")
			else:
				result = self.foundServices + self.scan.getNumServices()
				percentage = self.scan.getProgress()
				if percentage > 99:
					percentage = 99
				#TRANSLATORS: The stb is performing a channel scan, progress percentage is printed in '%d' (and '%%' will show a single '%' symbol)
				message = ngettext("Scanning - %d%% completed", "Scanning - %d%% completed", percentage) % percentage
				message += ", "
				#TRANSLATORS: Intermediate scanning result, '%d' channel(s) have been found so far
				message += ngettext("%d channel found", "%d channels found", result) % result
				self.text.setText(message)
				transponder = self.scan.getCurrentTransponder()
				network = ""
				tp_text = ""
				if transponder:
					tp_type = transponder.getSystem()
					if tp_type == iDVBFrontend.feSatellite:
						network = _("Satellite")
						tp = transponder.getDVBS()
						orb_pos = tp.orbital_position
						try:
							sat_name = str(nimmgr.getSatDescription(orb_pos))
						except KeyError:
							sat_name = ""
						if orb_pos > 1800: # west
							orb_pos = 3600 - orb_pos
							h = _("W")
						else:
							h = _("E")
						if ("%d.%d" % (orb_pos / 10, orb_pos % 10)) in sat_name:
							network = sat_name
						else:
							network = ("%s %d.%d %s") % (sat_name, orb_pos / 10, orb_pos % 10, h)
						tp_text = {tp.System_DVB_S: "DVB-S", tp.System_DVB_S2: "DVB-S2"}.get(tp.system, "")
						if tp_text == "DVB-S2":
							tp_text = ("%s %s") % (tp_text,
								{tp.Modulation_Auto: "Auto", tp.Modulation_QPSK: "QPSK",
									tp.Modulation_8PSK: "8PSK", tp.Modulation_QAM16: "QAM16",
									tp.Modulation_16APSK: "16APSK", tp.Modulation_32APSK: "32APSK"}.get(tp.modulation, ""))
						tp_text = ("%s %d%c / %d / %s") % (tp_text, tp.frequency / 1000,
							{tp.Polarisation_Horizontal: 'H', tp.Polarisation_Vertical: 'V', tp.Polarisation_CircularLeft: 'L',
								tp.Polarisation_CircularRight: 'R'}.get(tp.polarisation, ' '),
							tp.symbol_rate / 1000,
							{tp.FEC_Auto: "AUTO", tp.FEC_1_2: "1/2", tp.FEC_2_3: "2/3",
								tp.FEC_3_4: "3/4", tp.FEC_3_5: "3/5", tp.FEC_4_5: "4/5",
								tp.FEC_5_6: "5/6", tp.FEC_6_7: "6/7", tp.FEC_7_8: "7/8",
								tp.FEC_8_9: "8/9", tp.FEC_9_10: "9/10", tp.FEC_None: "NONE"}.get(tp.fec, ""))
						if tp.system == tp.System_DVB_S2:
							if tp.is_id > tp.No_Stream_Id_Filter:
								tp_text = ("%s MIS %d") % (tp_text, tp.is_id)
							if tp.pls_code > 0:
								tp_text = ("%s Gold %d") % (tp_text, tp.pls_code)
							if tp.t2mi_plp_id > tp.No_T2MI_PLP_Id:
								tp_text = ("%s T2MI %d PID %d") % (tp_text, tp.t2mi_plp_id, tp.t2mi_pid)
					elif tp_type == iDVBFrontend.feCable:
						network = _("Cable")
						tp = transponder.getDVBC()
						tp_text = ("DVB-C %s %d / %d / %s") % ({tp.Modulation_Auto: "AUTO",
							tp.Modulation_QAM16: "QAM16", tp.Modulation_QAM32: "QAM32",
							tp.Modulation_QAM64: "QAM64", tp.Modulation_QAM128: "QAM128",
							tp.Modulation_QAM256: "QAM256"}.get(tp.modulation, ""),
							tp.frequency,
							tp.symbol_rate / 1000,
							{tp.FEC_Auto: "AUTO", tp.FEC_1_2: "1/2", tp.FEC_2_3: "2/3",
								tp.FEC_3_4: "3/4", tp.FEC_3_5: "3/5", tp.FEC_4_5: "4/5",
								tp.FEC_5_6: "5/6", tp.FEC_6_7: "6/7", tp.FEC_7_8: "7/8",
								tp.FEC_8_9: "8/9", tp.FEC_9_10: "9/10", tp.FEC_None: "NONE"}.get(tp.fec_inner, ""))
					elif tp_type == iDVBFrontend.feTerrestrial:
						network = _("Terrestrial")
						tp = transponder.getDVBT()
						channel = getChannelNumber(tp.frequency, self.scanList[self.run]["feid"])
						if channel:
							channel = _("CH") + "%s " % channel
						freqMHz = "%0.1f MHz" % (tp.frequency / 1000000.)
						tp_text = ("%s %s %s %s") % (
							{
								tp.System_DVB_T_T2: "DVB-T/T2",
								tp.System_DVB_T: "DVB-T",
								tp.System_DVB_T2: "DVB-T2"
							}.get(tp.system, ""),
							{
								tp.Modulation_QPSK: "QPSK",
								tp.Modulation_QAM16: "QAM16", tp.Modulation_QAM64: "QAM64",
								tp.Modulation_Auto: "AUTO", tp.Modulation_QAM256: "QAM256"
							}.get(tp.modulation, ""),
							"%s%s" % (channel, freqMHz.replace(".0", "")),
							{
								tp.Bandwidth_8MHz: "Bw 8MHz", tp.Bandwidth_7MHz: "Bw 7MHz", tp.Bandwidth_6MHz: "Bw 6MHz",
								tp.Bandwidth_Auto: "Bw Auto", tp.Bandwidth_5MHz: "Bw 5MHz",
								tp.Bandwidth_1_712MHz: "Bw 1.712MHz", tp.Bandwidth_10MHz: "Bw 10MHz"
							}.get(tp.bandwidth, ""))
					elif tp_type == iDVBFrontend.feATSC:
						network = _("ATSC")
						tp = transponder.getATSC()
						freqMHz = "%0.1f MHz" % (tp.frequency / 1000000.)
						tp_text = ("%s %s %s %s") % (
							{
								tp.System_ATSC: _("ATSC"),
								tp.System_DVB_C_ANNEX_B: _("DVB-C ANNEX B")
							}.get(tp.system, ""),
							{
								tp.Modulation_Auto: _("Auto"),
								tp.Modulation_QAM16: "QAM16",
								tp.Modulation_QAM32: "QAM32",
								tp.Modulation_QAM64: "QAM64",
								tp.Modulation_QAM128: "QAM128",
								tp.Modulation_QAM256: "QAM256",
								tp.Modulation_VSB_8: "8VSB",
								tp.Modulation_VSB_16: "16VSB"
							}.get(tp.modulation, ""),
							freqMHz.replace(".0", ""),
							{
								tp.Inversion_Off: _("Off"),
								tp.Inversion_On: _("On"),
								tp.Inversion_Unknown: _("Auto")
							}.get(tp.inversion, ""))
					else:
						print("[ServiceScan] unknown transponder type in scanStatusChanged")
				self.network.setText(network)
				self.transponder.setText(tp_text)

		if self.state == self.DonePartially:
			self.foundServices += self.scan.getNumServices()
			self.text.setText(ngettext("Scanning completed, %d channel found", "Scanning completed, %d channels found", self.foundServices) % self.foundServices)

		if self.state == self.Error:
			self.text.setText(_("ERROR - failed to scan (%s)!") % (self.Errors[self.errorcode]))

		if self.state == self.DonePartially or self.state == self.Error:
			self.delaytimer.start(100, True)
コード例 #21
0
 def getFEData(self, frontendDataOrg):
     if frontendDataOrg and len(frontendDataOrg):
         frontendData = ConvertToHumanReadable(frontendDataOrg)
         if frontendDataOrg["tuner_type"] == "DVB-S":
             if frontendData["frequency"] > 11699999:
                 band = "High"
             else:
                 band = "Low"
             t2mi = lambda x: None if x == -1 else str(x)
             return ((_("NIM"),
                      chr(ord('A') + frontendData["tuner_number"]),
                      TYPE_TEXT), (_("Type"), frontendData["tuner_type"],
                                   TYPE_TEXT),
                     (_("System"), frontendData["system"],
                      TYPE_TEXT), (_("Modulation"),
                                   frontendData["modulation"], TYPE_TEXT),
                     (_("Orbital position"),
                      frontendData["orbital_position"], TYPE_VALUE_DEC),
                     (_("Frequency"), frontendData["frequency"],
                      TYPE_VALUE_FREQ), (_("Symbol rate"),
                                         frontendData["symbol_rate"],
                                         TYPE_VALUE_BITRATE),
                     (_("Polarization"), frontendData["polarization"],
                      TYPE_TEXT), (_("Band"), band, TYPE_TEXT),
                     (_("Inversion"), frontendData["inversion"], TYPE_TEXT),
                     (_("FEC"), frontendData["fec_inner"],
                      TYPE_TEXT), (_("Pilot"),
                                   frontendData.get("pilot",
                                                    None), TYPE_TEXT),
                     (_("Roll-off"), frontendData.get("rolloff", None),
                      TYPE_TEXT), (_("Input Stream ID"),
                                   frontendData.get("is_id",
                                                    0), TYPE_VALUE_DEC),
                     (_("PLS Mode"), frontendData.get("pls_mode", None),
                      TYPE_TEXT), (_("PLS Code"),
                                   frontendData.get("pls_code",
                                                    0), TYPE_VALUE_DEC),
                     (_("T2MI PLP ID"),
                      t2mi(frontendData.get("t2mi_plp_id", -1)), TYPE_TEXT),
                     (_("T2MI PID"), None
                      if frontendData.get("t2mi_plp_id", -1) == -1 else str(
                          frontendData.get(
                              "t2mi_pid", eDVBFrontendParametersSatellite.
                              T2MI_Default_Pid)), TYPE_TEXT))
         elif frontendDataOrg["tuner_type"] == "DVB-C":
             return ((_("NIM"),
                      chr(ord('A') + frontendData["tuner_number"]),
                      TYPE_TEXT), (_("Type"), frontendData["tuner_type"],
                                   TYPE_TEXT), (_("Modulation"),
                                                frontendData["modulation"],
                                                TYPE_TEXT),
                     (_("Frequency"), frontendData["frequency"],
                      TYPE_VALUE_FREQ_FLOAT), (_("Symbol rate"),
                                               frontendData["symbol_rate"],
                                               TYPE_VALUE_BITRATE),
                     (_("Inversion"), frontendData["inversion"], TYPE_TEXT),
                     (_("FEC"), frontendData["fec_inner"], TYPE_TEXT))
         elif frontendDataOrg["tuner_type"] == "DVB-T":
             return ((_("NIM"),
                      chr(ord('A') + frontendData["tuner_number"]),
                      TYPE_TEXT), (_("Type"), frontendData["tuner_type"],
                                   TYPE_TEXT), (_("Frequency"),
                                                frontendData["frequency"],
                                                TYPE_VALUE_FREQ_FLOAT),
                     (_("Channel"),
                      getChannelNumber(frontendData["frequency"],
                                       frontendData["tuner_number"]),
                      TYPE_VALUE_DEC),
                     (_("Inversion"), frontendData["inversion"], TYPE_TEXT),
                     (_("Bandwidth"), frontendData["bandwidth"],
                      TYPE_VALUE_DEC),
                     (_("Code rate LP"), frontendData["code_rate_lp"],
                      TYPE_TEXT), (_("Code rate HP"),
                                   frontendData["code_rate_hp"], TYPE_TEXT),
                     (_("Constellation"), frontendData["constellation"],
                      TYPE_TEXT), (_("Transmission mode"),
                                   frontendData["transmission_mode"],
                                   TYPE_TEXT),
                     (_("Guard interval"), frontendData["guard_interval"],
                      TYPE_TEXT), (_("Hierarchy info"),
                                   frontendData["hierarchy_information"],
                                   TYPE_TEXT))
         elif frontendDataOrg["tuner_type"] == "ATSC":
             return ((_("NIM"),
                      chr(ord('A') + frontendData["tuner_number"]),
                      TYPE_TEXT), (_("Type"), frontendData["tuner_type"],
                                   TYPE_TEXT),
                     (_("System"), frontendData["system"],
                      TYPE_TEXT), (_("Modulation"),
                                   frontendData["modulation"], TYPE_TEXT),
                     (_("Frequency"), frontendData["frequency"],
                      TYPE_VALUE_FREQ_FLOAT),
                     (_("Inversion"), frontendData["inversion"], TYPE_TEXT))
     return []