mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[test] add code spell check and correct wrong spelling (#9066)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
aanother
|
||||
acount
|
||||
addrss
|
||||
aline
|
||||
anumber
|
||||
ans
|
||||
aother
|
||||
aparent
|
||||
apending
|
||||
asender
|
||||
asent
|
||||
ect
|
||||
nd
|
||||
ot
|
||||
shashes
|
||||
ue
|
||||
unknwn
|
||||
unsecure
|
||||
@@ -80,6 +80,25 @@ jobs:
|
||||
use-verbose-mode: 'yes'
|
||||
max-depth: 3
|
||||
|
||||
spell-check:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1
|
||||
with:
|
||||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
submodules: true
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install codespell
|
||||
- name: Check
|
||||
run: |
|
||||
script/code-spell check
|
||||
|
||||
cmake-version:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
||||
+2
-2
@@ -1144,7 +1144,7 @@ HTML_STYLESHEET =
|
||||
# defined cascading style sheet that is included after the standard style sheets
|
||||
# created by doxygen. Using this option one can overrule certain style aspects.
|
||||
# This is preferred over using HTML_STYLESHEET since it does not replace the
|
||||
# standard style sheet and is therefor more robust against future updates.
|
||||
# standard style sheet and is therefore more robust against future updates.
|
||||
# Doxygen will copy the style sheet file to the output directory. For an example
|
||||
# see the documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@@ -2029,7 +2029,7 @@ PREDEFINED = __attribute__(x)=
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
|
||||
# remove all refrences to function-like macros that are alone on a line, have an
|
||||
# remove all references to function-like macros that are alone on a line, have an
|
||||
# all uppercase name, and do not end with a semicolon. Such function macros are
|
||||
# typically used for boiler-plate code, and will confuse the parser if not
|
||||
# removed.
|
||||
|
||||
@@ -49,7 +49,7 @@ class LinkMetricsDataInfo : public LinkedListEntry<LinkMetricsDataInfo>, public
|
||||
|
||||
public:
|
||||
/**
|
||||
* Construtor.
|
||||
* Constructor.
|
||||
*
|
||||
*/
|
||||
LinkMetricsDataInfo(void) { Clear(); };
|
||||
|
||||
@@ -66,7 +66,7 @@ void otLinkMetricsInit(int8_t aNoiseFloor);
|
||||
* @param[in] aShortAddress The short address of the Initiator.
|
||||
* @param[in] aExtAddress A pointer to the extended address of the Initiator.
|
||||
* @param[in] aLinkMetrics Flags specifying what metrics to query (Pdu Count would be omitted). When
|
||||
* @p aLinkMetrics is eqaul to `0`, this method clears the Initiator.
|
||||
* @p aLinkMetrics is equal to `0`, this method clears the Initiator.
|
||||
*
|
||||
* @retval OT_ERROR_NONE Successfully configured the Enhanced-ACK Based Probing.
|
||||
* @retval OT_ERROR_INVALID_ARGS @p aExtAddress is `nullptr`.
|
||||
|
||||
@@ -95,7 +95,7 @@ typedef struct otDnsTxtEntry
|
||||
} otDnsTxtEntry;
|
||||
|
||||
/**
|
||||
* This structure represents an iterator for TXT record entires (key/value pairs).
|
||||
* This structure represents an iterator for TXT record entries (key/value pairs).
|
||||
*
|
||||
* The data fields in this structure are intended for use by OpenThread core and caller should not read or change them.
|
||||
*
|
||||
|
||||
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (325)
|
||||
#define OPENTHREAD_API_VERSION (326)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -895,7 +895,7 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance);
|
||||
* @param[in] aScanDuration The duration, in milliseconds, for the channel to be scanned.
|
||||
*
|
||||
* @retval OT_ERROR_NONE Successfully started scanning the channel.
|
||||
* @retval OT_ERROR_BUSY The radio is performing enery scanning.
|
||||
* @retval OT_ERROR_BUSY The radio is performing energy scanning.
|
||||
* @retval OT_ERROR_NOT_IMPLEMENTED The radio doesn't support energy scanning.
|
||||
*
|
||||
*/
|
||||
|
||||
Executable
+70
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2023, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. Neither the name of the copyright holder nor the
|
||||
# names of its contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
#
|
||||
# The script to correct or check the code spell of OpenThread.
|
||||
#
|
||||
# Correct wrong spelling:
|
||||
# script/code-spell
|
||||
#
|
||||
# Check only:
|
||||
#
|
||||
# script/code-spell check
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
OT_SPELL_CHECK_IGNORE_CONFIG_FILE='.code-spell-ignore'
|
||||
readonly OT_SPELL_CHECK_IGNORE_CONFIG_FILE
|
||||
|
||||
OT_SPELL_CHECK_DIRS=(
|
||||
'doc'
|
||||
'etc'
|
||||
'examples'
|
||||
'include'
|
||||
'script'
|
||||
'src'
|
||||
'tests'
|
||||
'tools'
|
||||
)
|
||||
readonly OT_SPELL_CHECK_DIRS
|
||||
|
||||
main()
|
||||
{
|
||||
if [ $# == 0 ]; then
|
||||
codespell "${OT_SPELL_CHECK_DIRS[@]}" -w --ignore-words="${OT_SPELL_CHECK_IGNORE_CONFIG_FILE}"
|
||||
elif [ "$1" == 'check' ]; then
|
||||
codespell "${OT_SPELL_CHECK_DIRS[@]}" --ignore-words="${OT_SPELL_CHECK_IGNORE_CONFIG_FILE}"
|
||||
else
|
||||
echo >&2 "Unsupported option: $1. Supported: check"
|
||||
# 128 for Invalid arguments
|
||||
exit 128
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -28,7 +28,7 @@
|
||||
#
|
||||
|
||||
# This script updates different make/build files (CMakeLists.txt, BUILD.gn,
|
||||
# Andriod.mk, Andriod.bp, auto-make) in OpenThread repo based on the
|
||||
# Android.mk, Android.bp, auto-make) in OpenThread repo based on the
|
||||
# current files present in `./src/core/` & `./include/openthread/`
|
||||
# folders. This script MUST be called from openthread root folder.
|
||||
|
||||
|
||||
+9
-9
@@ -1326,7 +1326,7 @@ Done
|
||||
|
||||
### dua iid
|
||||
|
||||
Get the Interface Identifier mannually specified for Thread Domain Unicast Address on Thread 1.2 device.
|
||||
Get the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device.
|
||||
|
||||
```bash
|
||||
> dua iid
|
||||
@@ -1336,7 +1336,7 @@ Done
|
||||
|
||||
### dua iid \<iid\>
|
||||
|
||||
Set the Interface Identifier mannually specified for Thread Domain Unicast Address on Thread 1.2 device.
|
||||
Set the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device.
|
||||
|
||||
```bash
|
||||
> dua iid 0004000300020001
|
||||
@@ -1345,7 +1345,7 @@ Done
|
||||
|
||||
### dua iid clear
|
||||
|
||||
Clear the Interface Identifier mannually specified for Thread Domain Unicast Address on Thread 1.2 device.
|
||||
Clear the Interface Identifier manually specified for Thread Domain Unicast Address on Thread 1.2 device.
|
||||
|
||||
```bash
|
||||
> dua iid clear
|
||||
@@ -1514,7 +1514,7 @@ fe80:0:0:0:f3d9:2a82:c8d8:fe43
|
||||
Done
|
||||
```
|
||||
|
||||
Use `-v` to get more verbose informations about the address.
|
||||
Use `-v` to get more verbose information about the address.
|
||||
|
||||
```bash
|
||||
> ipaddr -v
|
||||
@@ -1690,7 +1690,7 @@ Done
|
||||
|
||||
### keysequence guardtime \<guardtime\>
|
||||
|
||||
Set Thread Key Switch Guard Time (in hours) 0 means Thread Key Switch imediately if key index match
|
||||
Set Thread Key Switch Guard Time (in hours) 0 means Thread Key Switch immediately if key index match
|
||||
|
||||
```bash
|
||||
> keysequence guardtime 0
|
||||
@@ -2213,14 +2213,14 @@ Gets the state of NAT64 functions.
|
||||
Possible results for prefix manager are (`OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is required):
|
||||
|
||||
- `Disabled`: NAT64 prefix manager is disabled.
|
||||
- `NotRunning`: NAT64 prefix manager is enabled, but is not running, probably bacause the routing manager is disabled.
|
||||
- `NotRunning`: NAT64 prefix manager is enabled, but is not running, probably because the routing manager is disabled.
|
||||
- `Idle`: NAT64 prefix manager is enabled and is running, but is not publishing a NAT64 prefix. Usually when there is another border router publishing a NAT64 prefix with higher priority.
|
||||
- `Active`: NAT64 prefix manager is enabled, running and publishing a NAT64 prefix.
|
||||
|
||||
Possible results for NAT64 translator are (`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is required):
|
||||
|
||||
- `Disabled`: NAT64 translator is disabled.
|
||||
- `NotRunning`: NAT64 translator is enabled, but is not translating packets, probably bacause it is not configued with a NAT64 prefix or a CIDR for NAT64.
|
||||
- `NotRunning`: NAT64 translator is enabled, but is not translating packets, probably because it is not configured with a NAT64 prefix or a CIDR for NAT64.
|
||||
- `Active`: NAT64 translator is enabled and is translating packets.
|
||||
|
||||
`OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` or `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` are required.
|
||||
@@ -2696,7 +2696,7 @@ Done
|
||||
|
||||
### prefix
|
||||
|
||||
Get the prefix list in the local Network Data. Note: For the Thread 1.2 border router with backbone capability, the local Domain Prefix would be listed as well (with flag `D`), with preceeding `-` if backbone functionality is disabled.
|
||||
Get the prefix list in the local Network Data. Note: For the Thread 1.2 border router with backbone capability, the local Domain Prefix would be listed as well (with flag `D`), with preceding `-` if backbone functionality is disabled.
|
||||
|
||||
```bash
|
||||
> prefix
|
||||
@@ -3596,7 +3596,7 @@ Done
|
||||
|
||||
### macfilter addr add \<extaddr\> \[rss\]
|
||||
|
||||
Add an IEEE 802.15.4 Extended Address to the address filter, and fixed the received singal strength for the messages from the address if rss is specified.
|
||||
Add an IEEE 802.15.4 Extended Address to the address filter, and fixed the received signal strength for the messages from the address if rss is specified.
|
||||
|
||||
```bash
|
||||
> macfilter addr add 0f6127e33af6b403 -95
|
||||
|
||||
@@ -392,7 +392,7 @@ Usage: `dataset networkname [name]`
|
||||
Get network name.
|
||||
|
||||
```bash
|
||||
> datset networkname
|
||||
> dataset networkname
|
||||
OpenThread
|
||||
Done
|
||||
```
|
||||
|
||||
+13
-13
@@ -475,19 +475,19 @@ Print the latest 5 entries of the IPv6 message RX history as a list:
|
||||
```bash
|
||||
> history rx list 4
|
||||
00:00:13.368
|
||||
type:UDP len:50 cheksum:0xbd26 sec:no prio:net rss:-20 from:0x4800 radio:15.4
|
||||
type:UDP len:50 checksum:0xbd26 sec:no prio:net rss:-20 from:0x4800 radio:15.4
|
||||
src:[fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788
|
||||
dst:[ff02:0:0:0:0:0:0:1]:19788
|
||||
00:00:14.991
|
||||
type:HopOpts len:44 cheksum:0x0000 sec:yes prio:norm rss:-20 from:0x4800 radio:15.4
|
||||
type:HopOpts len:44 checksum:0x0000 sec:yes prio:norm rss:-20 from:0x4800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:0:ff:fe00:4800]:0
|
||||
dst:[ff03:0:0:0:0:0:0:2]:0
|
||||
00:00:15.030
|
||||
type:UDP len:12 cheksum:0x3f7d sec:yes prio:net rss:-20 from:0x4800 radio:15.4
|
||||
type:UDP len:12 checksum:0x3f7d sec:yes prio:net rss:-20 from:0x4800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:0:ff:fe00:4800]:61631
|
||||
dst:[fdde:ad00:beef:0:0:ff:fe00:4801]:61631
|
||||
00:00:15.032
|
||||
type:ICMP6(EchoReqst) len:16 cheksum:0x942c sec:yes prio:norm rss:-20 from:0x4800 radio:15.4
|
||||
type:ICMP6(EchoReqst) len:16 checksum:0x942c sec:yes prio:norm rss:-20 from:0x4800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:ac09:a16b:3204:dc09]:0
|
||||
dst:[fdde:ad00:beef:0:dc0e:d6b3:f180:b75b]:0
|
||||
Done
|
||||
@@ -577,23 +577,23 @@ Print the latest 5 entries of the IPv6 message RX history as a list:
|
||||
> history rxtx list 5
|
||||
|
||||
00:00:02.100
|
||||
type:UDP len:50 cheksum:0xd843 sec:no prio:net rss:-20 from:0x0800 radio:15.4
|
||||
type:UDP len:50 checksum:0xd843 sec:no prio:net rss:-20 from:0x0800 radio:15.4
|
||||
src:[fe80:0:0:0:54d9:5153:ffc6:df26]:19788
|
||||
dst:[ff02:0:0:0:0:0:0:1]:19788
|
||||
00:00:15.331
|
||||
type:HopOpts len:44 cheksum:0x0000 sec:yes prio:norm rss:-20 from:0x0800 radio:15.4
|
||||
type:HopOpts len:44 checksum:0x0000 sec:yes prio:norm rss:-20 from:0x0800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:0:ff:fe00:800]:0
|
||||
dst:[ff03:0:0:0:0:0:0:2]:0
|
||||
00:00:15.354
|
||||
type:UDP len:12 cheksum:0x6c6b sec:yes prio:net rss:-20 from:0x0800 radio:15.4
|
||||
type:UDP len:12 checksum:0x6c6b sec:yes prio:net rss:-20 from:0x0800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:0:ff:fe00:800]:61631
|
||||
dst:[fdde:ad00:beef:0:0:ff:fe00:801]:61631
|
||||
00:00:15.356
|
||||
type:ICMP6(EchoReqst) len:16 cheksum:0xc6a2 sec:yes prio:norm rss:-20 from:0x0800 radio:15.4
|
||||
type:ICMP6(EchoReqst) len:16 checksum:0xc6a2 sec:yes prio:norm rss:-20 from:0x0800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:efe8:4910:cf95:dee9]:0
|
||||
dst:[fdde:ad00:beef:0:af4c:3644:882a:3698]:0
|
||||
00:00:15.356
|
||||
type:ICMP6(EchoReply) len:16 cheksum:0xc5a2 sec:yes prio:norm tx-success:yes to:0x0800 radio:15.4
|
||||
type:ICMP6(EchoReply) len:16 checksum:0xc5a2 sec:yes prio:norm tx-success:yes to:0x0800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:af4c:3644:882a:3698]:0
|
||||
dst:[fdde:ad00:beef:0:efe8:4910:cf95:dee9]:0
|
||||
```
|
||||
@@ -633,19 +633,19 @@ Print the IPv6 message TX history as a list:
|
||||
```bash
|
||||
history tx list
|
||||
00:00:23.957
|
||||
type:ICMP6(EchoReply) len:16 cheksum:0x932c sec:yes prio:norm tx-success:yes to:0x4800 radio:15.4
|
||||
type:ICMP6(EchoReply) len:16 checksum:0x932c sec:yes prio:norm tx-success:yes to:0x4800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:dc0e:d6b3:f180:b75b]:0
|
||||
dst:[fdde:ad00:beef:0:ac09:a16b:3204:dc09]:0
|
||||
00:00:23.959
|
||||
type:UDP len:50 cheksum:0xce87 sec:yes prio:net tx-success:yes to:0x4800 radio:15.4
|
||||
type:UDP len:50 checksum:0xce87 sec:yes prio:net tx-success:yes to:0x4800 radio:15.4
|
||||
src:[fdde:ad00:beef:0:0:ff:fe00:4801]:61631
|
||||
dst:[fdde:ad00:beef:0:0:ff:fe00:4800]:61631
|
||||
00:00:44.658
|
||||
type:UDP len:64 cheksum:0xf7ba sec:no prio:net tx-success:yes to:0x4800 radio:15.4
|
||||
type:UDP len:64 checksum:0xf7ba sec:no prio:net tx-success:yes to:0x4800 radio:15.4
|
||||
src:[fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788
|
||||
dst:[fe80:0:0:0:d03d:d3e7:cc5e:7cd7]:19788
|
||||
00:00:45.415
|
||||
type:UDP len:44 cheksum:0x26d4 sec:no prio:net tx-success:yes to:0xffff radio:15.4
|
||||
type:UDP len:44 checksum:0x26d4 sec:no prio:net tx-success:yes to:0xffff radio:15.4
|
||||
src:[fe80:0:0:0:a4a5:bbac:a8e:bd07]:19788
|
||||
dst:[ff02:0:0:0:0:0:0:2]:19788
|
||||
Done
|
||||
|
||||
@@ -47,7 +47,7 @@ Border Router and service information may be stable or temporary. Stable Thread
|
||||
Done
|
||||
```
|
||||
|
||||
4. Observe IPv6 addresses assigned to the Thread inteface.
|
||||
4. Observe IPv6 addresses assigned to the Thread interface.
|
||||
|
||||
```bash
|
||||
> ipaddr
|
||||
|
||||
@@ -572,7 +572,7 @@ void History::OutputRxTxEntryListFormat(const otHistoryTrackerMessageInfo &aInfo
|
||||
otHistoryTrackerEntryAgeToString(aEntryAge, ageString, sizeof(ageString));
|
||||
|
||||
OutputLine("%s", ageString);
|
||||
OutputFormat(kIndentSize, "type:%s len:%u cheksum:0x%04x sec:%s prio:%s ", MessageTypeToString(aInfo),
|
||||
OutputFormat(kIndentSize, "type:%s len:%u checksum:0x%04x sec:%s prio:%s ", MessageTypeToString(aInfo),
|
||||
aInfo.mPayloadLength, aInfo.mChecksum, aInfo.mLinkSecurity ? "yes" : "no",
|
||||
MessagePriorityToString(aInfo.mPriority));
|
||||
if (aIsRx)
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
/**
|
||||
* This static method converts a pointer to an `otMessageSettings` to a `Settings`.
|
||||
*
|
||||
* @param[in] aSettings A pointer to `otMessageSettings` to covert from.
|
||||
* @param[in] aSettings A pointer to `otMessageSettings` to convert from.
|
||||
* If it is `nullptr`, then the default settings `GetDefault()` will be used.
|
||||
*
|
||||
* @returns A reference to the converted `Settings` or the default if @p aSettings is `nullptr`.
|
||||
|
||||
@@ -858,7 +858,7 @@ private:
|
||||
// will retry after a short interval `kTxFailureRetryInterval`
|
||||
// up to `kMaxTxFailureRetries` attempts. After this, the retry
|
||||
// wait interval will be used (which keeps growing on each failure
|
||||
// - please see bellow).
|
||||
// - please see below).
|
||||
//
|
||||
// If the update message is sent successfully but there is no
|
||||
// response from server or if server rejects the update, the
|
||||
|
||||
@@ -1994,7 +1994,7 @@ Error Server::Host::ProcessTtl(uint32_t aTtl)
|
||||
{
|
||||
// This method processes the TTL value received in a resource record.
|
||||
//
|
||||
// If no TTL value is stored, this method wil set the stored value to @p aTtl and return `kErrorNone`.
|
||||
// If no TTL value is stored, this method will set the stored value to @p aTtl and return `kErrorNone`.
|
||||
// If a TTL value is stored and @p aTtl equals the stored value, this method returns `kErrorNone`.
|
||||
// Otherwise, this method returns `kErrorRejected`.
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ Mac::TxFrame *CslTxScheduler::HandleFrameRequest(Mac::TxFrames &aTxFrames)
|
||||
// in `RescheduleCslTx()` when determining the next CSL delay to
|
||||
// schedule CSL tx with `Mac` but here we calculate the delay with
|
||||
// zero `aAheadUs`. All the timings are in usec but when passing
|
||||
// delay to `Mac` we divide by `1000` (to covert to msec) which
|
||||
// delay to `Mac` we divide by `1000` (to convert to msec) which
|
||||
// can round the value down and cause `Mac` to start operation a
|
||||
// bit (some usec) earlier. This is covered by adding the guard
|
||||
// time `kFramePreparationGuardInterval`.
|
||||
|
||||
@@ -250,7 +250,7 @@ constexpr uint8_t kCostForLinkQuality3 = 1; ///< Link Cost for
|
||||
/**
|
||||
* This function converts link quality to route cost.
|
||||
*
|
||||
* @param[in] aLinkQuality The link quality to covert.
|
||||
* @param[in] aLinkQuality The link quality to convert.
|
||||
*
|
||||
* @returns The route cost corresponding to @p aLinkQuality.
|
||||
*
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
/**
|
||||
* This constants specified no next hop.
|
||||
*
|
||||
* Used for `mNextHop` in `RouteInfo` struture.
|
||||
* Used for `mNextHop` in `RouteInfo` structure.
|
||||
*
|
||||
*/
|
||||
static constexpr uint8_t kNoNextHop = OT_HISTORY_TRACKER_NO_NEXT_HOP;
|
||||
|
||||
@@ -1047,7 +1047,7 @@ template <> otError NcpBase::HandlePropertyRemove<SPINEL_PROP_THREAD_ON_MESH_NET
|
||||
|
||||
error = otBorderRouterRemoveOnMeshPrefix(mInstance, &ip6Prefix);
|
||||
|
||||
// If prefix was not on the list, "remove" command can be considred
|
||||
// If prefix was not on the list, "remove" command can be considered
|
||||
// successful.
|
||||
|
||||
if (error == OT_ERROR_NOT_FOUND)
|
||||
|
||||
@@ -60,7 +60,7 @@ enum
|
||||
OT_PLATFORM_CONFIG_SPI_DEFAULT_MODE = 0, ///< Default SPI Mode: CPOL=0, CPHA=0.
|
||||
OT_PLATFORM_CONFIG_SPI_DEFAULT_SPEED_HZ = 1000000, ///< Default SPI speed in hertz.
|
||||
OT_PLATFORM_CONFIG_SPI_DEFAULT_CS_DELAY_US = 20, ///< Default delay after SPI C̅S̅ assertion, in µsec.
|
||||
OT_PLATFORM_CONFIG_SPI_DEFAULT_RESET_DELAY_MS = 0, ///< Default delay after R̅E̅S̅E̅T̅ assertion, in miliseconds.
|
||||
OT_PLATFORM_CONFIG_SPI_DEFAULT_RESET_DELAY_MS = 0, ///< Default delay after R̅E̅S̅E̅T̅ assertion, in milliseconds.
|
||||
OT_PLATFORM_CONFIG_SPI_DEFAULT_ALIGN_ALLOWANCE =
|
||||
16, ///< Default maximum number of 0xFF bytes to clip from start of MISO frame.
|
||||
OT_PLATFORM_CONFIG_SPI_DEFAULT_SMALL_PACKET_SIZE =
|
||||
|
||||
@@ -104,7 +104,7 @@ otError SpiInterface::HardwareReset(void)
|
||||
|
||||
// If the `INT` pin is set to low during the restart of the RCP chip, which triggers continuous invalid SPI
|
||||
// transactions by the host, it will cause the function `PushPullSpi()` to output lots of invalid warn log
|
||||
// messages. Adding the delay here is used to wait for the RCP chip starts up to avoid outputing invalid
|
||||
// messages. Adding the delay here is used to wait for the RCP chip starts up to avoid outputting invalid
|
||||
// log messages.
|
||||
usleep(static_cast<useconds_t>(mSpiResetDelay) * kUsecPerMsec);
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ class Cert_5_3_3_AddressQuery(thread_cert.TestCase):
|
||||
self.assertTrue(self.nodes[MED1].ping(router3_mleid))
|
||||
|
||||
# 3
|
||||
# Wait the finish of address resolution traffic triggerred by previous
|
||||
# Wait the finish of address resolution traffic triggered by previous
|
||||
# ping.
|
||||
self.simulator.go(5)
|
||||
|
||||
@@ -126,7 +126,7 @@ class Cert_5_3_3_AddressQuery(thread_cert.TestCase):
|
||||
self.assertTrue(self.nodes[ROUTER1].ping(med1_mleid))
|
||||
|
||||
# 4
|
||||
# Wait the finish of address resolution traffic triggerred by previous
|
||||
# Wait the finish of address resolution traffic triggered by previous
|
||||
# ping.
|
||||
self.simulator.go(5)
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class Cert_5_3_09_AddressQuery(thread_cert.TestCase):
|
||||
self.assertTrue(self.nodes[SED1].ping(router3_addr))
|
||||
self.simulator.go(1)
|
||||
|
||||
# 6 DUT_ROUTER2: Power off ROUTER3 and wait 580s to alow LEADER to
|
||||
# 6 DUT_ROUTER2: Power off ROUTER3 and wait 580s to allow LEADER to
|
||||
# expire its Router ID
|
||||
self.nodes[ROUTER3].stop()
|
||||
self.simulator.go(580)
|
||||
@@ -233,7 +233,7 @@ class Cert_5_3_09_AddressQuery(thread_cert.TestCase):
|
||||
must_next()
|
||||
|
||||
# Step 3: Router_1 sends an ICMPv6 Echo Request to SED using GUA 2001::
|
||||
# addresss
|
||||
# address
|
||||
# The DUT MUST respond to the Address Query Request with a properly
|
||||
# formatted Address Notification Message:
|
||||
# CoAP URI-Path
|
||||
|
||||
@@ -239,7 +239,7 @@ class Cert_5_3_10_AddressQuery(thread_cert.TestCase):
|
||||
must_next()
|
||||
|
||||
# Step 4: Border Router sends an ICMPv6 Echo Request to MED using GUA 2003::
|
||||
# addresss
|
||||
# address
|
||||
# The DUT MUST respond to the Address Query Request with a properly
|
||||
# formatted Address Notification Message:
|
||||
# CoAP URI-Path
|
||||
|
||||
@@ -175,7 +175,7 @@ class Cert_5_7_03_CoapDiagCommands_Base(thread_cert.TestCase):
|
||||
# TLV Type 8 – IPv6 address list
|
||||
# TLV Type 17 – Channel Pagesi
|
||||
#
|
||||
# if DUT is Router, contianing the following as well:
|
||||
# if DUT is Router, containing the following as well:
|
||||
# TLV Type 4 – Connectivity
|
||||
# TLV Type 5 – Route64
|
||||
# TLV Type 16 – Child Table
|
||||
|
||||
@@ -49,7 +49,7 @@ THREAD_NODE = 4
|
||||
# requires an External Commissioner which is currently not part of Thread
|
||||
# Certification.
|
||||
#
|
||||
# Notes: Due to the packet parsing compatiable issue for supporting Thread 1.2
|
||||
# Notes: Due to the packet parsing compatible issue for supporting Thread 1.2
|
||||
# and 1.1, the security policy values can be fetched only in the unknown
|
||||
# field.
|
||||
#
|
||||
|
||||
@@ -161,7 +161,7 @@ class BBR_5_11_01(thread_cert.TestCase):
|
||||
and ipv6.src.is_link_local
|
||||
""")
|
||||
|
||||
# Commissioner registers MA3 with deafult timeout
|
||||
# Commissioner registers MA3 with default timeout
|
||||
pkts.filter_wpan_src64(COMMISSIONER).filter_coap_request('/n/mr').must_next().must_verify(f"""
|
||||
thread_meshcop.tlv.ipv6_addr == ['{MA3}']
|
||||
and thread_bl.tlv.timeout is null
|
||||
|
||||
@@ -211,7 +211,7 @@ class TestNdProxy(thread_cert.TestCase):
|
||||
PBBR_ETH = pv.vars['PBBR_ETH']
|
||||
PBBR2_ETH = pv.vars['PBBR2_ETH']
|
||||
|
||||
# Verify that SBBR should not foward any Ping Request to the Thread network.
|
||||
# Verify that SBBR should not forward any Ping Request to the Thread network.
|
||||
# Use `ipv6.hlim == 63` to avoid false fails because SBBR might still forward Ping Request from PBBR to ROUTER1
|
||||
pkts.filter_wpan_src64(SBBR).filter_ping_request().filter('ipv6.hlim == 63').must_not_next()
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ class Nat64SingleBorderRouter(thread_cert.TestCase):
|
||||
if ready[0]:
|
||||
return sock.recv(1024)
|
||||
else:
|
||||
raise AssertionError("No data recevied")
|
||||
raise AssertionError("No data received")
|
||||
|
||||
def listen_udp(self, addr, port):
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
@@ -33,7 +33,7 @@ import config
|
||||
import thread_cert
|
||||
|
||||
# Test description:
|
||||
# This test verifies bi-directional connectivity accross multiple Thread networks.
|
||||
# This test verifies bi-directional connectivity across multiple Thread networks.
|
||||
#
|
||||
# Topology:
|
||||
# -------------(eth)----------------
|
||||
|
||||
@@ -682,7 +682,7 @@ def check_joiner_router_commissioning_messages(commissioning_messages):
|
||||
|
||||
|
||||
def check_payload_same(tp1, tp2):
|
||||
"""Verfiy two payloads are totally the same.
|
||||
"""Verify two payloads are totally the same.
|
||||
A payload is a tuple of tlvs.
|
||||
"""
|
||||
assert len(tp1) == len(tp2)
|
||||
|
||||
@@ -330,7 +330,7 @@ def create_deafult_network_tlvs_factories():
|
||||
network_layer.TlvType.XTAL_ACCURACY:
|
||||
network_layer.XtalAccuracyFactory(),
|
||||
# Routing information are distributed in a Thread network by MLE Routing TLV
|
||||
# which is in fact MLE Route64 TLV. Thread specificaton v1.1. - Chapter 5.20
|
||||
# which is in fact MLE Route64 TLV. Thread specification v1.1. - Chapter 5.20
|
||||
network_layer.TlvType.MLE_ROUTING:
|
||||
create_default_mle_tlv_route64_factory(),
|
||||
network_layer.TlvType.IPv6_ADDRESSES:
|
||||
|
||||
@@ -622,7 +622,7 @@ class FragmentHeader(ExtensionHeader):
|
||||
| Next Header | Reserved | Fragment Offset | Res | M | Identification |
|
||||
+-------------+----------+-----------------+-----+---+----------------+
|
||||
|
||||
Fragment extention header consists of:
|
||||
Fragment extension header consists of:
|
||||
- next_header type (8 bit)
|
||||
- fragment offset which is multiple of 8 (13 bit)
|
||||
- more_flag to indicate further data (1 bit)
|
||||
@@ -1010,7 +1010,7 @@ class HopByHopFactory(PacketFactory):
|
||||
hdr_ext_len = ord(data.read(1))
|
||||
|
||||
# Note! Two bytes were read (next_header and hdr_ext_len) so they must
|
||||
# be substracted from header length
|
||||
# be subtracted from header length
|
||||
hop_by_hop_length = (self._calculate_extension_header_length(hdr_ext_len) - 2)
|
||||
|
||||
hop_by_hop_data = data.read(hop_by_hop_length)
|
||||
|
||||
@@ -57,7 +57,7 @@ def if_indextoname(index):
|
||||
ifname = ctypes.create_string_buffer(32)
|
||||
ifname = libc.if_indextoname(index, ifname)
|
||||
if not ifname:
|
||||
raise RuntimeError("Inavlid Index")
|
||||
raise RuntimeError("Invalid Index")
|
||||
return ifname
|
||||
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ class LinkQualityAndRouteData(object):
|
||||
return (self.output == other.output and self.input == other.input and self.route == other.route)
|
||||
|
||||
def __repr__(self):
|
||||
return "LinkQualityAndRouteData(ouput={}, input={}, route={})".format(self.output, self.input, self.route)
|
||||
return "LinkQualityAndRouteData(output={}, input={}, route={})".format(self.output, self.input, self.route)
|
||||
|
||||
|
||||
class LinkQualityAndRouteDataFactory:
|
||||
|
||||
@@ -3173,7 +3173,7 @@ class NodeImpl:
|
||||
def _parse_linkmetrics_query_result(self, lines):
|
||||
"""Parse link metrics query result"""
|
||||
|
||||
# Exmaple of command output:
|
||||
# Example of command output:
|
||||
# ['Received Link Metrics Report from: fe80:0:0:0:146e:a00:0:1',
|
||||
# '- PDU Counter: 1 (Count/Summation)',
|
||||
# '- LQI: 0 (Exponential Moving Average)',
|
||||
|
||||
@@ -140,11 +140,11 @@ def which_mergecap() -> str:
|
||||
|
||||
|
||||
def colon_hex(hexstr, interval) -> str:
|
||||
""" Convert hexstr to colon seperated string every interval
|
||||
""" Convert hexstr to colon separated string every interval
|
||||
|
||||
:param hexstr: The hex string to convert.
|
||||
:param interval: The interval number.
|
||||
:return: The colon seperated string.
|
||||
:return: The colon separated string.
|
||||
"""
|
||||
assert len(hexstr) % interval == 0
|
||||
return ':'.join(hexstr[i:i + interval] for i in range(0, len(hexstr), interval))
|
||||
|
||||
@@ -137,7 +137,7 @@ class TestDomainUnicastAddress(thread_cert.TestCase):
|
||||
|
||||
def __check_dua_registration(self, node, iid, dp_cid):
|
||||
''' Check whether or not the specified Domain Unicast Address is registered in Address
|
||||
Registraion TLV.
|
||||
Registration TLV.
|
||||
|
||||
Args:
|
||||
node (int) : The device id
|
||||
|
||||
@@ -165,13 +165,13 @@ class TestDomainUnicastAddressRegistration(thread_cert.TestCase):
|
||||
'''
|
||||
return ''.join(ipaddress.ip_address(address).exploded.split(':')[4:])
|
||||
|
||||
def __check_dua_registration_tmf(self, node, occurences=1, ml_eid=None):
|
||||
def __check_dua_registration_tmf(self, node, occurrences=1, ml_eid=None):
|
||||
|
||||
messages = self.simulator.get_messages_sent_by(node)
|
||||
for i in range(occurences):
|
||||
for i in range(occurrences):
|
||||
msg = messages.next_coap_message('0.02', '/n/dr', False)
|
||||
assert msg, 'Expected {}, but {}th not found\n node: {}(extaddr: {})'.format(
|
||||
occurences, i + 1, node, self.nodes[node].get_addr64())
|
||||
occurrences, i + 1, node, self.nodes[node].get_addr64())
|
||||
if ml_eid:
|
||||
ml_eid_tlv = msg.get_coap_message_tlv(network_layer.MlEid)
|
||||
self.assertEqual(ml_eid, ml_eid_tlv.ml_eid.hex())
|
||||
|
||||
@@ -891,7 +891,7 @@ class TestMulticastListenerRegistration(thread_cert.TestCase):
|
||||
self.simulator.go(WAIT_REDUNDANCE)
|
||||
self.__check_send_mlr_req(parent_id, MA1, should_send=True, expect_mlr_rsp=True)
|
||||
|
||||
# Parent should not register MA1 of Child 1 because it's already registerd
|
||||
# Parent should not register MA1 of Child 1 because it's already registered
|
||||
self.flush_all()
|
||||
self.nodes[meds[0]].add_ipmaddr(MA1)
|
||||
self.simulator.go(PARENT_AGGREGATE_DELAY + WAIT_REDUNDANCE)
|
||||
|
||||
@@ -144,7 +144,7 @@ class TestMulticastRegistration(thread_cert.TestCase):
|
||||
in_address_registration=True):
|
||||
''' Check whether or not the addition of the multicast address on the specific node
|
||||
would trigger Child Update Request for multicast address registration via Address
|
||||
Registraion TLV.
|
||||
Registration TLV.
|
||||
|
||||
Args:
|
||||
node (int) : The device id
|
||||
|
||||
@@ -120,7 +120,7 @@ fed3_rloc = int(fed3.get_rloc16(), 16)
|
||||
|
||||
|
||||
def parse_nexthop(line):
|
||||
# Exmaple: "0x5000 cost:3" -> (0x5000, 3).
|
||||
# Example: "0x5000 cost:3" -> (0x5000, 3).
|
||||
items = line.strip().split(' ', 2)
|
||||
return (int(items[0], 16), int(items[1].split(':')[1]))
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ r1.cli('channel manager delay 20')
|
||||
r1.cli('channel manager change 17')
|
||||
time.sleep(5 / speedup)
|
||||
verify_within(check_channel_on_all_nodes, 10)
|
||||
channael = 18
|
||||
channel = 18
|
||||
r2.cli('channel manager change', channel)
|
||||
verify_within(check_channel_on_all_nodes, 10)
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ wpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
|
||||
slaac_addrs = [node.find_ip6_address_with_prefix(PREFIX) for node in all_nodes]
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Check recovery after reseting r1 and c1 (same SLAAC address to be added)
|
||||
# Check recovery after resetting r1 and c1 (same SLAAC address to be added)
|
||||
|
||||
r1.reset()
|
||||
wpan.verify_within(check_prefix_and_slaac_address_are_added, WAIT_INTERVAL)
|
||||
|
||||
@@ -747,7 +747,7 @@ class Node(object):
|
||||
while asyncore.socket_map:
|
||||
elapsed_time = time.time() - start_time
|
||||
if elapsed_time > timeout:
|
||||
print('Performing aysnc tx/tx took too long ({}>{} sec)'.format(elapsed_time, timeout))
|
||||
print('Performing async tx/tx took too long ({}>{} sec)'.format(elapsed_time, timeout))
|
||||
raise Node._NodeError('perform_tx_rx timed out ({}>{} sec)'.format(elapsed_time, timeout))
|
||||
# perform a single asyncore loop
|
||||
asyncore.loop(timeout=0.5, count=1)
|
||||
|
||||
@@ -234,7 +234,7 @@ void TestInPlaceAesCcmProcessing(void)
|
||||
|
||||
VerifyOrQuit(message->GetLength() == msgLength + kTagLength);
|
||||
|
||||
// Decrpt in place
|
||||
// Decrypt in place
|
||||
aesCcm.Init(kHeaderLength, msgLength - kHeaderLength, kTagLength, kNonce, sizeof(kNonce));
|
||||
aesCcm.Header(header);
|
||||
aesCcm.Payload(*message, kHeaderLength, msgLength - kHeaderLength, ot::Crypto::AesCcm::kDecrypt);
|
||||
|
||||
@@ -1258,7 +1258,7 @@ void TestDnsTxtEntry(void)
|
||||
const uint8_t kInvalidEncodedTxt1[] = {4, 'a', '=', 'b'}; // Incorrect length
|
||||
|
||||
// Special encoded txt data with zero strings and string starting
|
||||
// with '=' (missing key) whcih should be skipped over silently.
|
||||
// with '=' (missing key) which should be skipped over silently.
|
||||
const uint8_t kSpecialEncodedTxt[] = {0, 0, 3, 'A', '=', 'B', 2, '=', 'C', 3, 'D', '=', 'E', 3, '=', '1', '2'};
|
||||
|
||||
const Dns::TxtEntry kTxtEntries[] = {
|
||||
|
||||
@@ -588,7 +588,7 @@ void TestDnsClient(void)
|
||||
VerifyOrQuit(sBrowseInfo.mNumInstances == 1);
|
||||
|
||||
sBrowseInfo.Reset();
|
||||
Log("Browse() for unknwon service");
|
||||
Log("Browse() for unknown service");
|
||||
SuccessOrQuit(dnsClient->Browse("_unknown._udp.default.service.arpa.", BrowseCallback, sInstance));
|
||||
AdvanceTime(100);
|
||||
VerifyOrQuit(sBrowseInfo.mCallbackCount == 1);
|
||||
|
||||
@@ -57,7 +57,7 @@ enum
|
||||
#define MAX_RSS(_rss1, _rss2) (((_rss1) < (_rss2)) ? (_rss2) : (_rss1))
|
||||
#define ABS(value) (((value) >= 0) ? (value) : -(value))
|
||||
|
||||
// This struct contains RSS values and test data for checking link quality info calss.
|
||||
// This struct contains RSS values and test data for checking link quality info class.
|
||||
struct RssTestData
|
||||
{
|
||||
const int8_t *mRssList; // Array of RSS values.
|
||||
|
||||
@@ -277,7 +277,7 @@ static const uint8_t sTestPayloadDefault[] = {0x80, 0x00, 0x01, 0x02, 0x03, 0x04
|
||||
|
||||
static void TestFullyCompressableLongAddresses(void)
|
||||
{
|
||||
TestIphcVector testVector("Fully compressable IPv6 addresses using long MAC addresses");
|
||||
TestIphcVector testVector("Fully compressible IPv6 addresses using long MAC addresses");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultLong);
|
||||
@@ -302,7 +302,7 @@ static void TestFullyCompressableLongAddresses(void)
|
||||
|
||||
static void TestFullyCompressableShortAddresses(void)
|
||||
{
|
||||
TestIphcVector testVector("Fully compressable IPv6 addresses using short MAC addresses");
|
||||
TestIphcVector testVector("Fully compressible IPv6 addresses using short MAC addresses");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultShort);
|
||||
@@ -327,7 +327,7 @@ static void TestFullyCompressableShortAddresses(void)
|
||||
|
||||
static void TestFullyCompressableShortLongAddresses(void)
|
||||
{
|
||||
TestIphcVector testVector("Fully compressable IPv6 addresses using short and long MAC addresses");
|
||||
TestIphcVector testVector("Fully compressible IPv6 addresses using short and long MAC addresses");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultShort);
|
||||
@@ -352,7 +352,7 @@ static void TestFullyCompressableShortLongAddresses(void)
|
||||
|
||||
static void TestFullyCompressableLongShortAddresses(void)
|
||||
{
|
||||
TestIphcVector testVector("Fully compressable IPv6 addresses using long and short MAC addresses");
|
||||
TestIphcVector testVector("Fully compressible IPv6 addresses using long and short MAC addresses");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultLong);
|
||||
@@ -505,7 +505,7 @@ static void TestSource16bitDestination16bitAddresses(void)
|
||||
|
||||
static void TestSourceCompressedDestination16bitAddresses(void)
|
||||
{
|
||||
TestIphcVector testVector("Fully compressable IPv6 source and destination 16-bit using long MAC addresses");
|
||||
TestIphcVector testVector("Fully compressible IPv6 source and destination 16-bit using long MAC addresses");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultLong);
|
||||
@@ -530,7 +530,7 @@ static void TestSourceCompressedDestination16bitAddresses(void)
|
||||
|
||||
static void TestSourceCompressedDestination128bitAddresses(void)
|
||||
{
|
||||
TestIphcVector testVector("Fully compressable IPv6 source and destination inline using long MAC addresses");
|
||||
TestIphcVector testVector("Fully compressible IPv6 source and destination inline using long MAC addresses");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultLong);
|
||||
@@ -734,7 +734,7 @@ static void TestStatefulSource16bitDestination16bitContext0(void)
|
||||
|
||||
static void TestStatefulCompressableLongAddressesContext0(void)
|
||||
{
|
||||
TestIphcVector testVector("Stateful compression compressable long addresses, context 0");
|
||||
TestIphcVector testVector("Stateful compression compressible long addresses, context 0");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultLong);
|
||||
@@ -759,7 +759,7 @@ static void TestStatefulCompressableLongAddressesContext0(void)
|
||||
|
||||
static void TestStatefulCompressableShortAddressesContext0(void)
|
||||
{
|
||||
TestIphcVector testVector("Stateful compression compressable short addresses, context 0");
|
||||
TestIphcVector testVector("Stateful compression compressible short addresses, context 0");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultShort);
|
||||
@@ -784,7 +784,7 @@ static void TestStatefulCompressableShortAddressesContext0(void)
|
||||
|
||||
static void TestStatefulCompressableLongShortAddressesContext0(void)
|
||||
{
|
||||
TestIphcVector testVector("Stateful compression compressable long and short addresses, context 0");
|
||||
TestIphcVector testVector("Stateful compression compressible long and short addresses, context 0");
|
||||
|
||||
// Setup MAC addresses.
|
||||
testVector.SetMacSource(sTestMacSourceDefaultLong);
|
||||
|
||||
@@ -310,7 +310,7 @@ void TestEncoder(void)
|
||||
printf(" -- PASS\n");
|
||||
|
||||
printf("\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
|
||||
printf("\nTest 5: Test saving position and reseting back to a saved position");
|
||||
printf("\nTest 5: Test saving position and resetting back to a saved position");
|
||||
|
||||
SuccessOrQuit(encoder.BeginFrame(Spinel::Buffer::kPriorityLow));
|
||||
SuccessOrQuit(encoder.WriteUint8(kUint8));
|
||||
|
||||
@@ -507,7 +507,7 @@ template <typename TimerType> static void TenTimers(uint32_t aTimeShift)
|
||||
}
|
||||
|
||||
// given the order in which timers are started, the TimerScheduler should call otPlatAlarmMilliStartAt 2 times.
|
||||
// one for timer[0] and one for timer[5] which will supercede timer[0].
|
||||
// one for timer[0] and one for timer[5] which will supersede timer[0].
|
||||
VerifyOrQuit(sCallCount[kCallCountIndexAlarmStart] == 2, "TestTenTimer: Start CallCount Failed.");
|
||||
VerifyOrQuit(sCallCount[kCallCountIndexAlarmStop] == 0, "TestTenTimer: Stop CallCount Failed.");
|
||||
VerifyOrQuit(sCallCount[kCallCountIndexTimerHandler] == 0, "TestTenTimer: Handler CallCount Failed.");
|
||||
|
||||
@@ -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