本文整理匯總了Python中pythonwifi.iwlibs.Wireless.rssi方法的典型用法代碼示例。如果您正苦於以下問題:Python Wireless.rssi方法的具體用法?Python Wireless.rssi怎麽用?Python Wireless.rssi使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pythonwifi.iwlibs.Wireless
的用法示例。
在下文中一共展示了Wireless.rssi方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1:
# 需要導入模塊: from pythonwifi.iwlibs import Wireless [as 別名]
# 或者: from pythonwifi.iwlibs.Wireless import rssi [as 別名]
import os
import sys
from sys import platform as _platform
import time
import types
import pythonwifi.flags
from pythonwifi.iwlibs import Wireless, WirelessInfo, Iwrange, getNICnames, getWNICnames
if _platform== 'linux' or _platform== 'linux2':
interface=Wireless('wlan1')
stat, qual, discard, missed_beacon = interface.getStatistics()
# Link Quality, Signal Level and Noise Level line
wifi_parameters= 'Interface: %s, SSID: %s, Transmit Rate: %s, Transmit Power: %s, RSSI: %s' % ('wlan1', interface.getEssid(), interface.getBitrate(), interface.getTXPower(), qual.signallevel)
print wifi_parameters
elif _platform=='darwin':
import objc
objc.loadBundle('CoreWLAN',
bundle_path='/System/Library/Frameworks/CoreWLAN.framework',
module_globals=globals())
for iname in CWInterface.interfaceNames():
interface = CWInterface.interfaceWithName_(iname)
print """
Interface: %s
SSID: %s
Transmit Rate: %s
Transmit Power: %s
RSSI: %s""" % (iname, interface.ssid(), interface.transmitRate(),
interface.transmitPower(), interface.rssi())