当前位置: 首页>>代码示例>>Python>>正文


Python ConvertToHumanReadable.get方法代码示例

本文整理汇总了Python中Tools.Transponder.ConvertToHumanReadable.get方法的典型用法代码示例。如果您正苦于以下问题:Python ConvertToHumanReadable.get方法的具体用法?Python ConvertToHumanReadable.get怎么用?Python ConvertToHumanReadable.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tools.Transponder.ConvertToHumanReadable的用法示例。


在下文中一共展示了ConvertToHumanReadable.get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getText

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def getText(self):
		service = self.source.service
		info = service and service.info()
		if not info:
			return ""

		if self.type == self.XRES:
			return self.getServiceInfoString(info, iServiceInformation.sVideoWidth)
		elif self.type == self.YRES:
			return self.getServiceInfoString(info, iServiceInformation.sVideoHeight)
		elif self.type == self.APID:
			return self.getServiceInfoString(info, iServiceInformation.sAudioPID)
		elif self.type == self.VPID:
			return self.getServiceInfoString(info, iServiceInformation.sVideoPID)
		elif self.type == self.PCRPID:
			return self.getServiceInfoString(info, iServiceInformation.sPCRPID)
		elif self.type == self.PMTPID:
			return self.getServiceInfoString(info, iServiceInformation.sPMTPID)
		elif self.type == self.TXTPID:
			return self.getServiceInfoString(info, iServiceInformation.sTXTPID)
		elif self.type == self.TSID:
			return self.getServiceInfoString(info, iServiceInformation.sTSID)
		elif self.type == self.ONID:
			return self.getServiceInfoString(info, iServiceInformation.sONID)
		elif self.type == self.SID:
			return self.getServiceInfoString(info, iServiceInformation.sSID)
		elif self.type == self.FRAMERATE:
			return self.getServiceInfoString(info, iServiceInformation.sFrameRate, lambda x: "%d fps" % ((x+500)/1000))
		elif self.type == self.TRANSFERBPS:
			return self.getServiceInfoString(info, iServiceInformation.sTransferBPS, lambda x: "%d kB/s" % (x/1024))
		elif self.type == self.HAS_HBBTV:
			return info.getInfoString(iServiceInformation.sHBBTVUrl)
		elif self.type == self.FREQ_INFO:
			feinfo = service.frontendInfo()
			if feinfo is None:
				return ""
			feraw = feinfo.getAll(False)
			if feraw is None:
				return ""
			fedata = ConvertToHumanReadable(feraw)
			if fedata is None:
				return ""
			frequency = fedata.get("frequency")
			if frequency:
				frequency = str(frequency / 1000)
			sr_txt = "Sr:"
			polarization = fedata.get("polarization_abbreviation")
			if polarization is None:
				polarization = ""
			symbolrate = str(int(fedata.get("symbol_rate", 0) / 1000))
			if symbolrate == "0":
				sr_txt = ""
				symbolrate = ""
			fec = fedata.get("fec_inner")
			if fec is None:
				fec = ""
			out = "Freq: %s %s %s %s %s" % (frequency, polarization, sr_txt, symbolrate, fec)
			return out
		return ""
开发者ID:Meknes21,项目名称:dvbapp2-gui,代码行数:61,代码来源:ServiceInfo.py

示例2: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				data = ((_("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))
				if frontendData["system"] == "DVB-S2":
					data += ((_("Pilot"), frontendData.get("pilot", None), TYPE_TEXT),
						(_("Roll-off"), frontendData.get("rolloff", None), TYPE_TEXT),
						(_("Input Stream ID"), frontendData["is_id"], TYPE_VALUE_DEC),
						(_("PLS Mode"), frontendData["pls_mode"], TYPE_TEXT),
						(_("PLS Code"), frontendData["pls_code"], TYPE_VALUE_DEC))
				return data
			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" and frontendData["system"] == "DVB-T2":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Modulation"), frontendData["constellation"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"]/1000, TYPE_VALUE_DEC),
						(_("Bandwidth"), frontendData["bandwidth"], TYPE_VALUE_DEC),
						(_("FEC"), frontendData["code_rate_hp"], TYPE_TEXT),
						(_("Transmission mode"), frontendData["transmission_mode"], TYPE_TEXT),
						(_("Guard interval"), frontendData["guard_interval"], TYPE_TEXT),
						(_("PLP ID"), frontendData["plp_id"], TYPE_VALUE_DEC))
			elif frontendDataOrg["tuner_type"] == "DVB-T" and frontendData["system"] == "DVB-T":
				return ((_("NIM"), chr(ord('A') + frontendData["tuner_number"]), TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Modulation"), frontendData["constellation"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"]/1000, TYPE_VALUE_DEC),
						(_("Bandwidth"), frontendData["bandwidth"], TYPE_VALUE_DEC),
						(_("FEC HP"), frontendData["code_rate_hp"], TYPE_TEXT),
						(_("FEC LP"), frontendData["code_rate_lp"], TYPE_TEXT),
						(_("Transmission mode"), frontendData["transmission_mode"], TYPE_TEXT),
						(_("Guard interval"), frontendData["guard_interval"], TYPE_TEXT),
						(_("Hierarchy info"), frontendData["hierarchy_information"], TYPE_TEXT))
		return [ ]
开发者ID:kingvuplus,项目名称:Test-OBH,代码行数:55,代码来源:ServiceInfo.py

示例3: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	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 [ ]
开发者ID:OpenLD,项目名称:enigma2,代码行数:55,代码来源:ServiceInfo.py

示例4: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
 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 = (
                 channelnumbers.getChannelNumber(frontendDataOrg["frequency"], frontendDataOrg["tuner_number"])
                 if channelnumbers.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"), channel, 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 []
开发者ID:BlackHole,项目名称:enigma2,代码行数:51,代码来源:ServiceInfo.py

示例5: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	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"), 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))
			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":
				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 []
开发者ID:Akki01,项目名称:enigma2,代码行数:35,代码来源:ServiceInfo.py

示例6: tuningChangedTo

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def tuningChangedTo(self, tp):

		def setLowRateAdapterCount(symbolrate):
			# change the measurement time and update interval in case of low symbol rate,
			# since more time is needed for the front end in that case.
			# It is an heuristic determination without any pretence. For symbol rates
			# of 5000 the interval is multiplied by 3 until 15000 which is seen
			# as a high symbol rate. Linear interpolation elsewhere.
			return max(int(round((3 - 1) * (symbolrate - 15000) / (5000 - 15000) + 1)), 1)

		self.symbolrate = tp[1]
		self.polarisation = tp[2]
		self.MAX_LOW_RATE_ADAPTER_COUNT = setLowRateAdapterCount(self.symbolrate)
		transponderdata = ConvertToHumanReadable(self.tuner.getTransponderData(), "DVB-S")
		self["frequency_value"].setText(str(transponderdata.get("frequency")))
		self["symbolrate_value"].setText(str(transponderdata.get("symbol_rate")))
		self["fec_value"].setText(str(transponderdata.get("fec_inner")))
		self["polarisation"].setText(str(transponderdata.get("polarization")))
开发者ID:OpenESI,项目名称:Wetek-ESI,代码行数:20,代码来源:plugin.py

示例7: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	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":
				if frontendData.get("is_id", -1) > -1: # 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", -1)), TYPE_TEXT),
						(_("PLS Mode & PLS Code"), "%s - %s" % (frontendData["pls_mode"], frontendData["pls_code"]), 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),
						(_("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 []
开发者ID:sklnet,项目名称:openbh-enigma2,代码行数:45,代码来源:ServiceInfo.py

示例8: updateStatus

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def updateStatus(self):
		if self.frontend:
			self.frontend.getFrontendStatus(self.frontendStatus)
		self["snr_db"].update()
		self["snr_percentage"].update()
		self["ber_value"].update()
		self["snr_bar"].update()
		self["ber_bar"].update()
		self["lock_state"].update()
		transponderdata = ConvertToHumanReadable(self.tuner.getTransponderData(), "DVB-S")
		self["frequency_value"].setText(str(transponderdata.get("frequency")))
		self["symbolrate_value"].setText(str(transponderdata.get("symbol_rate")))
		self["fec_value"].setText(str(transponderdata.get("fec_inner")))
		if self.frontendStatus.get("tuner_locked", 0) == 1 and self.isMoving and self.stopOnLock:
			self.diseqccommand("stop")
			self.isMoving = False
			self.stopOnLock = False
			self.updateColors(self.getCurrentConfigPath())
		self.statusTimer.start(50, True)
开发者ID:BananaSamurai,项目名称:Enigma2,代码行数:21,代码来源:plugin.py

示例9: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				return ((_("NIM"), ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H')[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"), ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H')[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":
				data = ((_("NIM"), ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H')[frontendData["tuner_number"]], TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("System"), frontendData["system"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], 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))
				if frontendData.has_key("plp_id"):
					data += ((_("PLP ID"), frontendData["plp_id"], TYPE_VALUE_DEC), )
				return data

		return [ ]
开发者ID:st7TEAM,项目名称:bh-gui,代码行数:44,代码来源:ServiceInfo.py

示例10: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
 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 []
开发者ID:sodo13,项目名称:EG-gui,代码行数:41,代码来源:ServiceInfo.py

示例11: updateStatus

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def updateStatus(self):
		self.statusTimer.start(self.UPDATE_INTERVAL, True)
		if self.frontend:
			self.frontend.getFrontendStatus(self.frontendStatus)
		self["snr_db"].update()
		self["snr_percentage"].update()
		self["ber_value"].update()
		self["snr_bar"].update()
		self["ber_bar"].update()
		self["lock_state"].update()
		transponderdata = ConvertToHumanReadable(self.tuner.getTransponderData(), "DVB-S")
		self["frequency_value"].setText(str(transponderdata.get("frequency") / 1000))
		self["symbolrate_value"].setText(str(transponderdata.get("symbol_rate") / 1000))
		self["fec_value"].setText(str(transponderdata.get("fec_inner")))
		self["polarisation"].setText(str(transponderdata.get("polarization")))
		if self.statusMsgBlinking:
			self.statusMsgBlinkCount += 1
			if self.statusMsgBlinkCount == self.statusMsgBlinkRate:
				self.statusMsgBlinkCount = 0
				self["status_bar"].visible = not self["status_bar"].visible
		if self.statusMsgTimeoutTicks > 0:
			self.statusMsgTimeoutTicks -= 1
			if self.statusMsgTimeoutTicks == 0:
				self["status_bar"].setText("")
				self.statusMsgBlinking = False
				self["status_bar"].visible = True
		if self.isLocked() and self.isMoving and self.stopOnLock:
			self.stopMoving()
			self.updateColors(self.getCurrentConfigPath())
		if self.collectingStatistics:
			self.snr_percentage += self["snr_percentage"].getValue(TunerInfo.SNR)
			self.lock_count += self["lock_state"].getValue(TunerInfo.LOCK)
			self.stat_count += 1
			if self.stat_count == self.max_count:
				self.collectingStatistics = False
				count = float(self.stat_count)
				self.lock_count /= count
				self.snr_percentage *= 100.0 / 0x10000 / count
				self.dataAvailable.set()
开发者ID:FFTEAM,项目名称:evolux-spark-sh4,代码行数:41,代码来源:plugin.py

示例12: getTunerInfo

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def getTunerInfo(self, service):
		tunerinfo = ""
		info = (service and service.info())
		Ret_Text = ""
		xresol = info.getInfo(iServiceInformation.sVideoWidth)
		yresol = info.getInfo(iServiceInformation.sVideoHeight)
		if info:
			try:
				Ret_Text = str(xresol) + "x" + str(yresol)
				transponderData = ConvertToHumanReadable(info.getInfoObject(iServiceInformation.sTransponderData))
				tunerType = transponderData.get("tuner_type")
				symbolRate = transponderData.get("symbol_rate", "")
				frequency = transponderData.get("frequency", "")
				polarization = transponderData.get("polarization", "").replace(_("Horizontal"), "H").replace(_("Vertical"), "V").replace(_("Circular left"), "CL").replace(_("Circular right"), "CR")
				fec = transponderData.get("fec_inner", "")
				if (tunerType == _("Satellite")):
					frequency = (str((int(frequency) / 1000)) + " MHz")
					symbolRate = (str((int(symbolRate) / 1000)))
					tunerinfo = (((((((Ret_Text + " ") + frequency + " ") + polarization) + " ") + fec) + " ") + symbolRate)
				return tunerinfo
			except:
				return ""
开发者ID:FFTEAM,项目名称:evolux-spark-sh4,代码行数:24,代码来源:PPInfoBar.py

示例13: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			tunerType = frontendDataOrg["tuner_type"]
			if tunerType == feSatellite:
				return ((_("NIM"), ('A', 'B', 'C', 'D')[frontendData["slot_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 tunerType == feCable:
				return ((_("NIM"), ('A', 'B', 'C', 'D')[frontendData["slot_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 tunerType == feTerrestrial:
				return ((_("NIM"), ('A', 'B', 'C', 'D')[frontendData["slot_number"]], TYPE_TEXT),
						(_("Type"), frontendData["tuner_type"], TYPE_TEXT),
						(_("Frequency"), frontendData["frequency"], 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 [ ]
开发者ID:popazerty,项目名称:12,代码行数:40,代码来源:ServiceInfo.py

示例14: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				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_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),
						(_("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_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 = channelnumbers.getChannelNumber(frontendDataOrg["frequency"], frontendDataOrg["tuner_number"]) if channelnumbers.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"), channel, 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_DEC),
						(_("Inversion"), frontendData["inversion"], TYPE_TEXT))
		return [ ]
开发者ID:openhdf,项目名称:enigma2,代码行数:54,代码来源:ServiceInfo.py

示例15: getFEData

# 需要导入模块: from Tools.Transponder import ConvertToHumanReadable [as 别名]
# 或者: from Tools.Transponder.ConvertToHumanReadable import get [as 别名]
	def getFEData(self, frontendDataOrg):
		if frontendDataOrg and len(frontendDataOrg):
			frontendData = ConvertToHumanReadable(frontendDataOrg)
			if frontendDataOrg["tuner_type"] == "DVB-S":
				return (("NIM", ('A', 'B', 'C', 'D')[frontendData["tuner_number"]], TYPE_TEXT),
							("Type", frontendData["system"], TYPE_TEXT),
							("Modulation", frontendData["modulation"], TYPE_TEXT),
							("Orbital position", frontendData["orbital_position"], TYPE_VALUE_DEC),
							("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
							("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
							("Polarization", frontendData["polarization"], TYPE_TEXT),
							("Inversion", frontendData["inversion"], TYPE_TEXT),
							("FEC inner", frontendData["fec_inner"], TYPE_TEXT),
							("Pilot", frontendData.get("pilot", None), TYPE_TEXT),
							("Rolloff", frontendData.get("rolloff", None), TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-C":
				return (("NIM", ('A', 'B', 'C', 'D')[frontendData["tuner_number"]], TYPE_TEXT),
						("Type", frontendData["tuner_type"], TYPE_TEXT),
						("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
						("Symbolrate", frontendData["symbol_rate"], TYPE_VALUE_DEC),
						("Modulation", frontendData["modulation"], TYPE_TEXT),
						("Inversion", frontendData["inversion"], TYPE_TEXT),
						("FEC inner", frontendData["fec_inner"], TYPE_TEXT))
			elif frontendDataOrg["tuner_type"] == "DVB-T":
				return (("NIM", ('A', 'B', 'C', 'D')[frontendData["tuner_number"]], TYPE_TEXT),
						("Type", frontendData["tuner_type"], TYPE_TEXT),
						("Frequency", frontendData["frequency"], TYPE_VALUE_DEC),
						("Inversion", frontendData["inversion"], TYPE_TEXT),
						("Bandwidth", frontendData["bandwidth"], TYPE_VALUE_DEC),
						("CodeRateLP", frontendData["code_rate_lp"], TYPE_TEXT),
						("CodeRateHP", 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 Inform.", frontendData["hierarchy_information"], TYPE_TEXT))
		return [ ]
开发者ID:BananaSamurai,项目名称:Enigma2,代码行数:38,代码来源:ServiceInfo.py


注:本文中的Tools.Transponder.ConvertToHumanReadable.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。