mirror of
https://github.com/espressif/openthread.git
synced 2026-10-05 15:27:40 +00:00
[test] add code spell check and correct wrong spelling (#9066)
This commit is contained in:
@@ -89,7 +89,7 @@ class SSHHandle(object):
|
||||
self.__stdout.channel.setblocking(0)
|
||||
|
||||
# Some commands such as `udp send <ip> -x <hex>` send binary data
|
||||
# The UDP packet recevier will output the data in binary to stdout
|
||||
# The UDP packet receiver will output the data in binary to stdout
|
||||
self.__stdout._set_mode('rb')
|
||||
|
||||
def __disconnect(self, dwCtrlType):
|
||||
|
||||
@@ -43,7 +43,7 @@ class OT_Sniffer(ISniffer):
|
||||
self.is_active = False
|
||||
|
||||
except Exception as e:
|
||||
ModuleHelper.WriteIntoDebugLogger('OT_Sniffer: [intialize] --> ' + str(e))
|
||||
ModuleHelper.WriteIntoDebugLogger('OT_Sniffer: [initialize] --> ' + str(e))
|
||||
|
||||
def discoverSniffer(self):
|
||||
sniffers = []
|
||||
@@ -148,7 +148,7 @@ class OT_Sniffer(ISniffer):
|
||||
|
||||
def getSnifferAddress(self):
|
||||
"""
|
||||
Method to retrun the current sniffer's COM/IP address
|
||||
Method to return the current sniffer's COM/IP address
|
||||
@return : string
|
||||
"""
|
||||
return self.port
|
||||
|
||||
@@ -72,7 +72,7 @@ OT11_VERSION = 'OPENTHREAD'
|
||||
OT12_VERSION = 'OPENTHREAD'
|
||||
OT13_VERSION = 'OPENTHREAD'
|
||||
|
||||
# Supported device capabilites in this THCI implementation
|
||||
# Supported device capabilities in this THCI implementation
|
||||
OT11_CAPBS = DevCapb.V1_1
|
||||
OT12_CAPBS = (DevCapb.L_AIO | DevCapb.C_FFD | DevCapb.C_RFD)
|
||||
OT12BR_CAPBS = (DevCapb.C_BBR | DevCapb.C_Host | DevCapb.C_Comm)
|
||||
@@ -225,7 +225,7 @@ class OpenThreadTHCI(object):
|
||||
**kwargs: Arbitrary keyword arguments
|
||||
Includes 'EUI' and 'SerialPort'
|
||||
"""
|
||||
self.intialize(kwargs)
|
||||
self.initialize(kwargs)
|
||||
|
||||
@abstractmethod
|
||||
def _connect(self):
|
||||
@@ -255,7 +255,7 @@ class OpenThreadTHCI(object):
|
||||
line str: data send to device
|
||||
"""
|
||||
|
||||
# Override the following empty methods in the dervied classes when needed
|
||||
# Override the following empty methods in the derived classes when needed
|
||||
def _onCommissionStart(self):
|
||||
"""Called when commissioning starts"""
|
||||
|
||||
@@ -399,7 +399,7 @@ class OpenThreadTHCI(object):
|
||||
time.sleep(duration)
|
||||
|
||||
@API
|
||||
def intialize(self, params):
|
||||
def initialize(self, params):
|
||||
"""initialize the serial port with baudrate, timeout parameters"""
|
||||
self.mac = params.get('EUI')
|
||||
self.backboneNetif = params.get('Param8') or 'eth0'
|
||||
@@ -442,7 +442,7 @@ class OpenThreadTHCI(object):
|
||||
self.UIStatusMsg)
|
||||
ModuleHelper.WriteIntoDebugLogger('Err: OpenThread device Firmware not matching..')
|
||||
|
||||
# Make this class compatible with Thread referenece 20200818
|
||||
# Make this class compatible with Thread reference 20200818
|
||||
self.__detectReference20200818()
|
||||
|
||||
def __repr__(self):
|
||||
@@ -880,7 +880,7 @@ class OpenThreadTHCI(object):
|
||||
|
||||
@API
|
||||
def setMAC(self, xEUI):
|
||||
"""set the extended addresss of Thread device
|
||||
"""set the extended address of Thread device
|
||||
|
||||
Args:
|
||||
xEUI: extended address in hex format
|
||||
@@ -2369,7 +2369,7 @@ class OpenThreadTHCI(object):
|
||||
Args:
|
||||
sAddr: IPv6 destination address for this message
|
||||
xCommissionerSessionId: commissioner session id
|
||||
listChannelMask: a channel array to indicate which channels to be scaned
|
||||
listChannelMask: a channel array to indicate which channels to be scanned
|
||||
xCount: number of IEEE 802.15.4 ED Scans (milliseconds)
|
||||
xPeriod: Period between successive IEEE802.15.4 ED Scans (milliseconds)
|
||||
xScanDuration: ScanDuration when performing an IEEE 802.15.4 ED Scan (milliseconds)
|
||||
|
||||
@@ -708,7 +708,7 @@ class OpenThread_BR(OpenThreadTHCI, IThci):
|
||||
@API
|
||||
def stopListeningToAddr(self, sAddr):
|
||||
"""
|
||||
Unsubscribe to a given IPv6 address which was subscribed earlier wiht `registerMulticast`.
|
||||
Unsubscribe to a given IPv6 address which was subscribed earlier with `registerMulticast`.
|
||||
|
||||
Args:
|
||||
sAddr : str : Multicast address to be unsubscribed. Use an empty string to unsubscribe
|
||||
|
||||
@@ -90,7 +90,7 @@ class OpenThread_WpanCtl(IThci):
|
||||
self.password = kwargs.get('Param7').strip() if kwargs.get('Param7') else None
|
||||
else:
|
||||
self.port = kwargs.get('SerialPort')
|
||||
self.intialize()
|
||||
self.initialize()
|
||||
except Exception as e:
|
||||
ModuleHelper.WriteIntoDebugLogger('initialize() Error: ' + str(e))
|
||||
|
||||
@@ -794,7 +794,7 @@ class OpenThread_WpanCtl(IThci):
|
||||
except Exception as e:
|
||||
ModuleHelper.WriteIntoDebugLogger('closeConnection() Error: ' + str(e))
|
||||
|
||||
def intialize(self):
|
||||
def initialize(self):
|
||||
"""initialize the serial port with baudrate, timeout parameters"""
|
||||
print('%s call intialize' % self.port)
|
||||
try:
|
||||
@@ -867,7 +867,7 @@ class OpenThread_WpanCtl(IThci):
|
||||
return self.__sendCommand(self.wpan_cmd_prefix + 'getprop -v NCP:Channel')[0]
|
||||
|
||||
def setMAC(self, xEUI):
|
||||
"""set the extended addresss of Thread device
|
||||
"""set the extended address of Thread device
|
||||
|
||||
Args:
|
||||
xEUI: extended address in hex format
|
||||
@@ -2180,7 +2180,7 @@ class OpenThread_WpanCtl(IThci):
|
||||
Args:
|
||||
sAddr: IPv6 destination address for this message
|
||||
xCommissionerSessionId: commissioner session id
|
||||
listChannelMask: a channel array to indicate which channels to be scaned
|
||||
listChannelMask: a channel array to indicate which channels to be scanned
|
||||
xCount: number of IEEE 802.15.4 ED Scans (milliseconds)
|
||||
xPeriod: Period between successive IEEE802.15.4 ED Scans (milliseconds)
|
||||
xScanDuration: IEEE 802.15.4 ScanDuration to use when performing an IEEE 802.15.4 ED Scan (milliseconds)
|
||||
|
||||
@@ -1975,14 +1975,14 @@ class OTCI(object):
|
||||
def enable_backbone_router(self):
|
||||
"""Enable Backbone Router Service for Thread 1.2 FTD.
|
||||
|
||||
SRV_DATA.ntf would be triggerred for attached device if there is no Backbone Router Service in Thread Network Data.
|
||||
SRV_DATA.ntf would be triggered for attached device if there is no Backbone Router Service in Thread Network Data.
|
||||
"""
|
||||
self.execute_command('bbr enable')
|
||||
|
||||
def disable_backbone_router(self):
|
||||
"""Disable Backbone Router Service for Thread 1.2 FTD.
|
||||
|
||||
SRV_DATA.ntf would be triggerred if Backbone Router is Primary state.
|
||||
SRV_DATA.ntf would be triggered if Backbone Router is Primary state.
|
||||
"""
|
||||
self.execute_command('bbr disable')
|
||||
|
||||
@@ -2036,7 +2036,7 @@ class OTCI(object):
|
||||
def register_backbone_router_dataset(self):
|
||||
"""Register Backbone Router Service for Thread 1.2 FTD.
|
||||
|
||||
SRV_DATA.ntf would be triggerred for attached device.
|
||||
SRV_DATA.ntf would be triggered for attached device.
|
||||
"""
|
||||
self.execute_command('bbr register')
|
||||
|
||||
|
||||
@@ -1416,7 +1416,7 @@ static void print_help(void)
|
||||
" --spi-mode[=mode] ............ Specify the SPI mode to use (0-3).\n"
|
||||
" --spi-speed[=hertz] .......... Specify the SPI speed in hertz.\n"
|
||||
" --spi-cs-delay[=usec] ........ Specify the delay after C̅S̅ assertion, in µsec\n"
|
||||
" --spi-reset-delay[=ms] ....... Specify the delay after R̅E̅S̅E̅T̅ assertion, in miliseconds\n"
|
||||
" --spi-reset-delay[=ms] ....... Specify the delay after R̅E̅S̅E̅T̅ assertion, in milliseconds\n"
|
||||
" --spi-align-allowance[=n] .... Specify the maximum number of 0xFF bytes to\n"
|
||||
" clip from start of MISO frame. Max value is 16.\n"
|
||||
" --spi-small-packet=[n] ....... Specify the smallest packet we can receive\n"
|
||||
|
||||
Reference in New Issue
Block a user