本文整理汇总了Python中MobileDevice.MobileDevice.get_net_info方法的典型用法代码示例。如果您正苦于以下问题:Python MobileDevice.get_net_info方法的具体用法?Python MobileDevice.get_net_info怎么用?Python MobileDevice.get_net_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MobileDevice.MobileDevice
的用法示例。
在下文中一共展示了MobileDevice.get_net_info方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_net_info
# 需要导入模块: from MobileDevice import MobileDevice [as 别名]
# 或者: from MobileDevice.MobileDevice import get_net_info [as 别名]
def get_net_info(self):
tech_in_use, card_mode, card_domain, carrier, carrier_mode = MobileDevice.get_net_info(self)
if tech_in_use == CARD_TECH_UMTS :
res = self.send_at_command("AT^SYSINFO", accept_null_response=False)
self.dbg_msg ("SYSCFG (HSPA stuff) : %s" % res)
if res[2] == 'OK' :
tech = int(res[1][0][-1])
if tech >= 5 :
tech_in_use = CARD_TECH_HSPA
return tech_in_use, card_mode, card_domain, carrier, carrier_mode
示例2: get_net_info
# 需要导入模块: from MobileDevice import MobileDevice [as 别名]
# 或者: from MobileDevice.MobileDevice import get_net_info [as 别名]
def get_net_info(self):
tech_in_use, card_mode, card_domain, carrier, carrier_mode = MobileDevice.get_net_info(self)
if tech_in_use == CARD_TECH_UMTS :
res = self.send_at_command("AT$CNTI=0", accept_null_response=False)
self.dbg_msg ("AT$CNTI=0 (HSPA stuff) : %s" % res)
tech = res[1][0]
if res[2] == 'OK' :
if "HSDPA" in tech :
tech_in_use == CARD_TECH_HSDPA
elif "HSUPA" in tech :
tech_in_use = CARD_TECH_HSUPA
return tech_in_use, card_mode, card_domain, carrier, carrier_mode