本文整理汇总了Python中Screens.ScanSetup.ScanSetup.createConfig方法的典型用法代码示例。如果您正苦于以下问题:Python ScanSetup.createConfig方法的具体用法?Python ScanSetup.createConfig怎么用?Python ScanSetup.createConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Screens.ScanSetup.ScanSetup
的用法示例。
在下文中一共展示了ScanSetup.createConfig方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createConfig
# 需要导入模块: from Screens.ScanSetup import ScanSetup [as 别名]
# 或者: from Screens.ScanSetup.ScanSetup import createConfig [as 别名]
def createConfig(self, foo):
self.preDefTransponders = None
self.tuning_type = ConfigSelection(choices = [("manual_transponder", _("User defined transponder")), ("predefined_transponder", _("Predefined transponder"))], default = "predefined_transponder")
self.orbital_position = 192
if self.frontendData and self.frontendData.has_key('orbital_position'):
self.orbital_position = self.frontendData['orbital_position']
ScanSetup.createConfig(self, self.frontendData)
for x in (self.tuning_type, self.scan_sat.frequency,
self.scan_sat.inversion, self.scan_sat.symbolrate,
self.scan_sat.polarization, self.scan_sat.fec, self.scan_sat.pilot,
self.scan_sat.fec_s2, self.scan_sat.fec, self.scan_sat.modulation,
self.scan_sat.rolloff, self.scan_sat.system):
x.addNotifier(self.retune, initial_call = False)
satfinder_nim_list = []
for n in nimmanager.nim_slots:
if not n.isCompatible("DVB-S"):
continue
if n.config_mode in ("loopthrough", "satposdepends", "nothing"):
continue
if n.config_mode == "advanced" and len(nimmanager.getSatListForNim(n.slot)) < 1:
continue
satfinder_nim_list.append((str(n.slot), n.friendly_full_description))
self.satfinder_scan_nims = ConfigSelection(choices = satfinder_nim_list)
self.feid = int(self.satfinder_scan_nims.value)
self.satList = []
self.scan_satselection = []
for slot in nimmanager.nim_slots:
if slot.isCompatible("DVB-S"):
self.satList.append(nimmanager.getSatListForNim(slot.slot))
self.scan_satselection.append(getConfigSatlist(self.orbital_position, self.satList[slot.slot]))
else:
self.satList.append(None)
示例2: createConfig
# 需要导入模块: from Screens.ScanSetup import ScanSetup [as 别名]
# 或者: from Screens.ScanSetup.ScanSetup import createConfig [as 别名]
def createConfig(self):
ScanSetup.createConfig(self)
for x in (
self.scan_sat.frequency,
self.scan_satselection[int(self.scan_nims.value)],
self.scan_sat.symbolrate,
self.scan_sat.is_id,
self.scan_sat.pls_mode,
self.scan_sat.pls_code,
self.scan_ter.channel,
self.scan_ter.frequency,
self.scan_ter.inversion,
self.scan_ter.bandwidth, self.scan_ter.fechigh, self.scan_ter.feclow,
self.scan_ter.modulation, self.scan_ter.transmission,
self.scan_ter.guard, self.scan_ter.hierarchy,
self.scan_ter.plp_id,
self.scan_cab.frequency, self.scan_cab.inversion, self.scan_cab.symbolrate,
self.scan_cab.modulation, self.scan_cab.fec,
self.scan_ats.frequency, self.scan_ats.modulation, self.scan_ats.inversion,
self.scan_ats.system,
):
if x is not None:
x.clearNotifiers()
x.addNotifier(self.TriggeredByConfigElement, initial_call = False)
示例3: createConfig
# 需要导入模块: from Screens.ScanSetup import ScanSetup [as 别名]
# 或者: from Screens.ScanSetup.ScanSetup import createConfig [as 别名]
def createConfig(self, foo):
self.tuning_type = ConfigSelection(default = "predefined_transponder", choices = [("single_transponder", _("User defined transponder")), ("predefined_transponder", _("Predefined transponder"))])
self.orbital_position = 192
if self.frontendData and self.frontendData.has_key('orbital_position'):
self.orbital_position = self.frontendData['orbital_position']
ScanSetup.createConfig(self, self.frontendData)
for x in (self.scan_sat.frequency,
self.scan_sat.inversion, self.scan_sat.symbolrate,
self.scan_sat.polarization, self.scan_sat.fec, self.scan_sat.pilot,
self.scan_sat.fec_s2, self.scan_sat.fec, self.scan_sat.modulation,
self.scan_sat.rolloff, self.scan_sat.system,
self.scan_ter.channel, self.scan_ter.frequency, self.scan_ter.inversion,
self.scan_ter.bandwidth, self.scan_ter.fechigh, self.scan_ter.feclow,
self.scan_ter.modulation, self.scan_ter.transmission,
self.scan_ter.guard, self.scan_ter.hierarchy, self.scan_ter.plp_id,
self.scan_cab.frequency, self.scan_cab.inversion, self.scan_cab.symbolrate,
self.scan_cab.modulation, self.scan_cab.fec):
x.addNotifier(self.retune, initial_call = False)
satfinder_nim_list = []
for n in nimmanager.nim_slots:
if not (n.isCompatible("DVB-S") or n.isCompatible("DVB-T") or n.isCompatible("DVB-C")):
continue
if n.config_mode in ("loopthrough", "satposdepends", "nothing"):
continue
if n.isCompatible("DVB-S") and len(nimmanager.getSatListForNim(n.slot)) < 1:
continue
if n.isCompatible("DVB-S") and n.isFBCTuner() and not n.isFBCRoot():
continue
satfinder_nim_list.append((str(n.slot), n.friendly_full_description))
self.satfinder_scan_nims = ConfigSelection(choices = satfinder_nim_list)
if self.frontendData is not None and len(satfinder_nim_list) > 0: # open the plugin with the currently active NIM as default
active_nim = self.frontendData.get("tuner_number", int(satfinder_nim_list[0][0]))
if not nimmanager.nim_slots[active_nim].isFBCLink():
self.satfinder_scan_nims.setValue(str(active_nim))
self.feid = int(self.satfinder_scan_nims.value)
self.satList = []
self.scan_satselection = []
for slot in nimmanager.nim_slots:
if slot.isCompatible("DVB-S"):
self.satList.append(nimmanager.getSatListForNim(slot.slot))
self.scan_satselection.append(getConfigSatlist(self.orbital_position, self.satList[slot.slot]))
else:
self.satList.append(None)
if self.frontendData:
ttype = self.frontendData.get("tuner_type", "UNKNOWN")
if ttype == "DVB-S" and self.predefinedTranspondersList(self.getSelectedSatIndex(self.feid)) is None and len(nimmanager.getTransponders(self.getSelectedSatIndex(self.feid))) > 0:
self.tuning_type.value = "single_transponder"
elif ttype == "DVB-T" and self.predefinedTerrTranspondersList() is None and len(nimmanager.getTranspondersTerrestrial(nimmanager.getTerrestrialDescription(self.feid))) > 0:
self.tuning_type.value = "single_transponder"
elif ttype == "DVB-C" and self.predefinedCabTranspondersList() is None and len(nimmanager.getTranspondersCable(self.feid)) > 0:
self.tuning_type.value = "single_transponder"
示例4: createConfig
# 需要导入模块: from Screens.ScanSetup import ScanSetup [as 别名]
# 或者: from Screens.ScanSetup.ScanSetup import createConfig [as 别名]
def createConfig(self, foo):
self.tuning_transponder = None
self.tuning_type = ConfigSelection(choices = [("manual_transponder", _("Manual transponder")), ("predefined_transponder", _("Predefined transponder"))])
self.tuning_sat = getConfigSatlist(192, nimmanager.getSatListForNim(self.feid))
ScanSetup.createConfig(self, None)
self.updateSats()
for x in (self.tuning_type, self.tuning_sat, self.scan_sat.frequency,
self.scan_sat.inversion, self.scan_sat.symbolrate,
self.scan_sat.polarization, self.scan_sat.fec, self.scan_sat.pilot,
self.scan_sat.fec_s2, self.scan_sat.fec, self.scan_sat.modulation,
self.scan_sat.rolloff, self.scan_sat.system):
x.addNotifier(self.retune, initial_call = False)
示例5: createConfig
# 需要导入模块: from Screens.ScanSetup import ScanSetup [as 别名]
# 或者: from Screens.ScanSetup.ScanSetup import createConfig [as 别名]
def createConfig(self, foo):
global tuning
if not tuning:
tuning = ConfigSubsection()
tuning.type = ConfigSelection(
default = "manual_transponder",
choices = { "manual_transponder" : _("Manual transponder"),
"predefined_transponder" : _("Predefined transponder") } )
tuning.sat = ConfigSatlist(list=nimmanager.getRotorSatListForNim(self.feid))
tuning.sat.addNotifier(self.tuningSatChanged)
self.updateTransponders()
orb_pos = self.fe_data.get("orbital_position", None)
if orb_pos is not None:
for x in nimmanager.getRotorSatListForNim(self.feid):
opos = str(orb_pos)
if x[0] == orb_pos and tuning.sat.value != opos:
tuning.sat.value = opos
del self.fe_data["orbital_position"]
ScanSetup.createConfig(self, self.fe_data)
示例6: createConfig
# 需要导入模块: from Screens.ScanSetup import ScanSetup [as 别名]
# 或者: from Screens.ScanSetup.ScanSetup import createConfig [as 别名]
def createConfig(self):
ScanSetup.createConfig(self)
for x in (self.scan_sat.frequency,
self.scan_sat.inversion, self.scan_sat.symbolrate,
self.scan_sat.polarization, self.scan_sat.fec, self.scan_sat.pilot,
self.scan_sat.fec_s2, self.scan_sat.fec, self.scan_sat.modulation,
self.scan_sat.rolloff, self.scan_sat.system,
self.scan_ter.channel,
self.scan_ter.frequency,
self.scan_ter.inversion,
self.scan_ter.bandwidth, self.scan_ter.fechigh, self.scan_ter.feclow,
self.scan_ter.modulation, self.scan_ter.transmission,
self.scan_ter.guard, self.scan_ter.hierarchy,
self.scan_ter.plp_id,
self.scan_cab.frequency, self.scan_cab.inversion, self.scan_cab.symbolrate,
self.scan_cab.modulation, self.scan_cab.fec,
self.preDefTransponders, self.CableTransponders, self.TerrestrialTransponders):
if x is not None:
x.clearNotifiers()
x.addNotifier(self.TriggeredByConfigElement, initial_call = False)