本文整理汇总了Python中Components.config.ConfigSubsection.useap方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigSubsection.useap方法的具体用法?Python ConfigSubsection.useap怎么用?Python ConfigSubsection.useap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Components.config.ConfigSubsection
的用法示例。
在下文中一共展示了ConfigSubsection.useap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: printDebugMsg
# 需要导入模块: from Components.config import ConfigSubsection [as 别名]
# 或者: from Components.config.ConfigSubsection import useap [as 别名]
debug_msg_on = False
def printDebugMsg(msg):
global debug_msg_on
if debug_msg_on:
print "[Wireless Access Point] ", msg
class fixedValue:
def __init__(self, value = ""):
self.value = value
ORIG_HOSTAPD_CONF = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/WirelessAccessPoint/hostapd.conf.orig")
HOSTAPD_CONF = "/etc/hostapd.conf"
HOSTAPD_CONF_BACK = "/etc/hostapd.conf.linuxap.back"
apModeConfig = ConfigSubsection()
apModeConfig.useap = ConfigYesNo(default = False)
apModeConfig.setupmode = ConfigSelection(default = "simple", choices = [ ("simple", "Simple"), ("advanced", "Advanced") ] )
#apModeConfig.wirelessdevice = fixedValue(value = "")
apModeConfig.branch = fixedValue(value = "br0")
apModeConfig.driver = fixedValue(value = "nl80211")
apModeConfig.wirelessmode = ConfigSelection(default = "g", choices = [ ("b", "802.11b"), ("a", "802.11a"), ("g", "802.11g") ] )
apModeConfig.channel = ConfigInteger(default = 1, limits = (1,13) )
apModeConfig.ssid = ConfigText(default = "Vuplus AP", visible_width = 50, fixed_size = False)
apModeConfig.beacon = ConfigInteger(default = 100, limits = (15,65535))
apModeConfig.rts_threshold = ConfigInteger(default = 2347, limits = (0,2347) )
apModeConfig.fragm_threshold = ConfigInteger(default = 2346, limits = (256,2346) )
apModeConfig.preamble = ConfigSelection(default = "0", choices = [ ("0", "Long"), ("1", "Short") ] )
apModeConfig.ignore_broadcast_ssid = ConfigSelection(default = "0", choices = [ ("0", _("disabled")), ("1", _("enabled")) ])
apModeConfig.encrypt = ConfigYesNo(default = False)
apModeConfig.method = ConfigSelection(default = "0", choices = [