mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 15:47:46 +00:00
[typos] fix typos (#4613)
This commit is contained in:
@@ -60,7 +60,7 @@ extern "C" {
|
||||
* @param[out] aOutput The diagnostics execution result.
|
||||
* @param[in] aOutputMaxLen The output buffer size.
|
||||
*
|
||||
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arugments provided.
|
||||
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided.
|
||||
* @retval OT_ERROR_NONE The command is successfully process.
|
||||
* @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported.
|
||||
*
|
||||
|
||||
@@ -113,7 +113,7 @@ typedef struct otMacCounters
|
||||
* Note that this counter is incremented for each MAC transmission request only by one,
|
||||
* regardless of the amount of CCA failures, CSMA-CA attempts, or retransmissions.
|
||||
*
|
||||
* This incrementation rule applies to the following counters:
|
||||
* This increment rule applies to the following counters:
|
||||
* @p mTxUnicast
|
||||
* @p mTxBroadcast
|
||||
* @p mTxAckRequested
|
||||
|
||||
@@ -187,7 +187,7 @@ typedef struct otServiceConfig
|
||||
} otServiceConfig;
|
||||
|
||||
/**
|
||||
* This method provides a full or stable copy of the Parition's Thread Network Data.
|
||||
* This method provides a full or stable copy of the Partition's Thread Network Data.
|
||||
*
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aStable TRUE when copying the stable version, FALSE when copying the full version.
|
||||
|
||||
@@ -65,7 +65,7 @@ extern "C" {
|
||||
* @param[out] aOutput The diagnostics execution result.
|
||||
* @param[in] aOutputMaxLen The output buffer size.
|
||||
*
|
||||
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arugments provided.
|
||||
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided.
|
||||
* @retval OT_ERROR_NONE The command is successfully process.
|
||||
* @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported.
|
||||
*
|
||||
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
/**
|
||||
* This class implements a locator for an OpenThread Instance object.
|
||||
*
|
||||
* The `InstanceLocatorInit` is similar to `InstanceLoator` but provides a default constructor (instead of a
|
||||
* The `InstanceLocatorInit` is similar to `InstanceLocator` but provides a default constructor (instead of a
|
||||
* parameterized one) and allows an inheriting class to initialize the object (set the OpenThread Instance) post
|
||||
* constructor call using the `Init()` method. This class is intended for types that require a default constructor and
|
||||
* cannot use a parameterized one. (e.g., `Neighbor`/`Child`/`Router` classes which are used as a C array element type
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
* @param[out] aOutput The diagnostics execution result.
|
||||
* @param[in] aOutputMaxLen The output buffer size.
|
||||
*
|
||||
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arugments provided.
|
||||
* @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided.
|
||||
* @retval OT_ERROR_NONE The command is successfully process.
|
||||
* @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported.
|
||||
*
|
||||
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
* This callback method requests a frame to be prepared for indirect transmission to a given sleepy child.
|
||||
*
|
||||
* @param[out] aFrame A reference to a MAC frame where the new frame would be placed.
|
||||
* @prarm[out] aContext A reference to a `FrameContext` where the context for the new frame would be placed.
|
||||
* @param[out] aContext A reference to a `FrameContext` where the context for the new frame would be placed.
|
||||
* @param[in] aChild The child for which to prepare the frame.
|
||||
*
|
||||
* @retval OT_ERROR_NONE Frame was prepared successfully
|
||||
|
||||
@@ -242,7 +242,7 @@ protected:
|
||||
void HandleTimer(void);
|
||||
|
||||
/**
|
||||
* This method re-defines template `Get<Type>()` as the `InstanceLoctaor` (base class) definition is shadowed by
|
||||
* This method re-defines template `Get<Type>()` as the `InstanceLocator` (base class) definition is shadowed by
|
||||
* the public `Get(dataset)` methods in this class.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -560,7 +560,7 @@ public:
|
||||
* A first fragment header starts at offset zero.
|
||||
*
|
||||
* @param[in] aSize The Datagram Size value.
|
||||
* @param[in] aTage The Datagram Tag value.
|
||||
* @param[in] aTag The Datagram Tag value.
|
||||
*
|
||||
*/
|
||||
void InitFirstFragment(uint16_t aSize, uint16_t aTag) { Init(aSize, aTag, 0); }
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
* The @p aOffset value will be truncated to become a multiple of 8.
|
||||
*
|
||||
* @param[in] aSize The Datagram Size value.
|
||||
* @param[in] aTage The Datagram Tag value.
|
||||
* @param[in] aTag The Datagram Tag value.
|
||||
* @param[in] aOffset The Datagram Offset value.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -88,7 +88,7 @@ void TimeSync::HandleTimeSyncMessage(const Message &aMessage)
|
||||
if (mTimeSyncSeq != OT_TIME_SYNC_INVALID_SEQ && timeSyncSeqDelta < 0)
|
||||
{
|
||||
// An older time sync sequence was received. This indicates that there is a device that still needs to be
|
||||
// synchronised with the current sequence, so forward it.
|
||||
// synchronized with the current sequence, so forward it.
|
||||
mTimeSyncRequired = true;
|
||||
|
||||
otLogInfoCore("Older time sync seq received:%u. Forwarding current seq:%u", aMessage.GetTimeSyncSeq(),
|
||||
@@ -97,7 +97,7 @@ void TimeSync::HandleTimeSyncMessage(const Message &aMessage)
|
||||
else if (Get<Mle::MleRouter>().GetRole() == OT_DEVICE_ROLE_LEADER && timeSyncSeqDelta > 0)
|
||||
{
|
||||
// Another device is forwarding a later time sync sequence, perhaps because it merged from a different
|
||||
// partition. The leader is authoritative, so ensure all devices synchronise to the time being seeded by this
|
||||
// partition. The leader is authoritative, so ensure all devices synchronize to the time being seeded by this
|
||||
// leader instead.
|
||||
mTimeSyncSeq = aMessage.GetTimeSyncSeq() + 1;
|
||||
mTimeSyncRequired = true;
|
||||
|
||||
@@ -2252,7 +2252,7 @@ const char *spinel_prop_key_to_cstr(spinel_prop_key_t prop_key)
|
||||
|
||||
const char *spinel_net_role_to_cstr(uint8_t net_role)
|
||||
{
|
||||
const char *ret = "NET_ROLE_UNKNONW";
|
||||
const char *ret = "NET_ROLE_UNKNOWN";
|
||||
|
||||
switch (net_role)
|
||||
{
|
||||
|
||||
@@ -383,9 +383,9 @@ enum
|
||||
SPINEL_STATUS_INVALID_STATE = 4, ///< This operation is invalid for the current device state.
|
||||
SPINEL_STATUS_INVALID_COMMAND = 5, ///< This command is not recognized.
|
||||
SPINEL_STATUS_INVALID_INTERFACE = 6, ///< This interface is not supported.
|
||||
SPINEL_STATUS_INTERNAL_ERROR = 7, ///< An internal runtime error has occured.
|
||||
SPINEL_STATUS_SECURITY_ERROR = 8, ///< A security/authentication error has occured.
|
||||
SPINEL_STATUS_PARSE_ERROR = 9, ///< A error has occured while parsing the command.
|
||||
SPINEL_STATUS_INTERNAL_ERROR = 7, ///< An internal runtime error has occurred.
|
||||
SPINEL_STATUS_SECURITY_ERROR = 8, ///< A security/authentication error has occurred.
|
||||
SPINEL_STATUS_PARSE_ERROR = 9, ///< A error has occurred while parsing the command.
|
||||
SPINEL_STATUS_IN_PROGRESS = 10, ///< This operation is in progress.
|
||||
SPINEL_STATUS_NOMEM = 11, ///< Operation prevented due to memory pressure.
|
||||
SPINEL_STATUS_BUSY = 12, ///< The device is currently performing a mutually exclusive operation
|
||||
@@ -3058,7 +3058,7 @@ enum
|
||||
*
|
||||
* Required capability: SPINEL_CAP_THREAD_COMMISSIONER
|
||||
*
|
||||
* The valid values are specified by SPINEL_MESHCOP_COMMISIONER_STATE_<state> enumeration.
|
||||
* The valid values are specified by SPINEL_MESHCOP_COMMISSIONER_STATE_<state> enumeration.
|
||||
*
|
||||
*/
|
||||
SPINEL_PROP_MESHCOP_COMMISSIONER_STATE = SPINEL_PROP_MESHCOP__BEGIN + 2,
|
||||
@@ -3936,7 +3936,7 @@ enum
|
||||
/// The NCP timestamp base
|
||||
/** Format: X (write-only)
|
||||
*
|
||||
* This property controls the time base value that is used for logs timestamp field calulation.
|
||||
* This property controls the time base value that is used for logs timestamp field calculation.
|
||||
*
|
||||
*/
|
||||
SPINEL_PROP_DEBUG_LOG_TIMESTAMP_BASE = SPINEL_PROP_DEBUG__BEGIN + 3,
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ NcpSpi::NcpSpi(Instance *aInstance)
|
||||
// reset flag was set.
|
||||
|
||||
otPlatSpiSlavePrepareTransaction(mEmptySendFrameZeroAccept, kSpiHeaderSize, mEmptyReceiveFrame, kSpiHeaderSize,
|
||||
/* aRequestTras */ true);
|
||||
/* aRequestTransactionFlag */ true);
|
||||
}
|
||||
|
||||
bool NcpSpi::SpiTransactionComplete(void * aContext,
|
||||
|
||||
@@ -1258,7 +1258,7 @@ otError RadioSpinel::WaitResponse(void)
|
||||
} while (mWaitingTid || !mIsReady);
|
||||
|
||||
LogIfFail("Error waiting response", mError);
|
||||
// This indicates end of waiting repsonse.
|
||||
// This indicates end of waiting response.
|
||||
mWaitingKey = SPINEL_PROP_LAST_STATUS;
|
||||
return mError;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ ROUTER = 16
|
||||
DUT_REED = 17
|
||||
ED = 18
|
||||
MESH_LOCAL_PREFIX = 'fdde:ad00:beef:0:'
|
||||
ROUTING_LACATOR = ':0:ff:fe00'
|
||||
ROUTING_LOCATOR = ':0:ff:fe00'
|
||||
REED_ADVERTISEMENT_INTERVAL = 570
|
||||
REED_ADVERTISEMENT_MAX_JITTER = 60
|
||||
ROUTER_SELECTION_JITTER = 1
|
||||
@@ -167,7 +167,7 @@ class Cert_5_2_4_REEDUpgrade(unittest.TestCase):
|
||||
mleid = None
|
||||
for addr in self.nodes[LEADER].get_addrs():
|
||||
if (addr.find(MESH_LOCAL_PREFIX) != -1 and
|
||||
addr.find(ROUTING_LACATOR) == -1):
|
||||
addr.find(ROUTING_LOCATOR) == -1):
|
||||
mleid = addr
|
||||
break
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ class Cert_9_2_02_MGMTCommissionerSet(unittest.TestCase):
|
||||
self.simulator.go(3)
|
||||
self.simulator.get_messages_sent_by(COMMISSIONER) # Skip LEAD_PET.req
|
||||
|
||||
# Get CommissionerSesssionId from LEAD_PET.rsp
|
||||
# Get CommissionerSessionId from LEAD_PET.rsp
|
||||
leader_messages = self.simulator.get_messages_sent_by(LEADER)
|
||||
msg = leader_messages.next_coap_message('2.04', assert_enabled=True)
|
||||
commissioner_session_id_tlv = command.get_sub_tlv(
|
||||
|
||||
@@ -30,7 +30,7 @@ from wpan import verify
|
||||
import wpan
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------------------
|
||||
# Test desciption: Active scan and permit-join
|
||||
# Test description: Active scan and permit-join
|
||||
|
||||
test_name = __file__[:-3] if __file__.endswith('.py') else __file__
|
||||
print('-' * 120)
|
||||
|
||||
@@ -85,7 +85,7 @@ for num in range(NUM_CHILDREN):
|
||||
children[num].whitelist_node(routers[0])
|
||||
routers[0].whitelist_node(children[num])
|
||||
|
||||
# whiltelist the end-device ed with its corresponding router
|
||||
# whitelist the end-device ed with its corresponding router
|
||||
for num in range(1, NUM_ROUTERS):
|
||||
ed[num].whitelist_node(routers[num])
|
||||
routers[num].whitelist_node(ed[num])
|
||||
|
||||
@@ -146,7 +146,7 @@ verify(r2.get(wpan.WPAN_NODE_TYPE) == wpan.NODE_TYPE_ROUTER)
|
||||
r1.un_whitelist_node(r2)
|
||||
r2.un_whitelist_node(r1)
|
||||
|
||||
# Add a prefix before r2 releaizes it can not longer talk
|
||||
# Add a prefix before r2 realizes it can not longer talk
|
||||
# to leader (r1).
|
||||
r2.add_prefix(prefix2)
|
||||
|
||||
@@ -167,11 +167,11 @@ r1.whitelist_node(r2)
|
||||
r2.whitelist_node(r1)
|
||||
|
||||
|
||||
def check_paritition_id_macth():
|
||||
def check_partition_id_match():
|
||||
verify(r1.get(wpan.WPAN_PARTITION_ID) == r2.get(wpan.WPAN_PARTITION_ID))
|
||||
|
||||
|
||||
wpan.verify_within(check_paritition_id_macth, long_wait)
|
||||
wpan.verify_within(check_partition_id_match, long_wait)
|
||||
|
||||
# Check that partitions merged successfully
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ wpan.verify_within(check_child_is_associated, WAIT_TIME)
|
||||
# child table.
|
||||
|
||||
|
||||
def check_child_addressses_on_parent():
|
||||
def check_child_addresses_on_parent():
|
||||
child_addrs = parent.get(wpan.WPAN_THREAD_CHILD_TABLE_ADDRESSES)
|
||||
verify(child_addrs.find(prefix1) > 0)
|
||||
verify(child_addrs.find(prefix2) > 0)
|
||||
@@ -170,7 +170,7 @@ def check_child_addressses_on_parent():
|
||||
verify(child_addrs.find(prefix4) > 0)
|
||||
|
||||
|
||||
wpan.verify_within(check_child_addressses_on_parent, WAIT_TIME)
|
||||
wpan.verify_within(check_child_addresses_on_parent, WAIT_TIME)
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Check the child recovery after a parent reset using quick re-attach
|
||||
@@ -194,7 +194,7 @@ child.set(wpan.WPAN_POLL_INTERVAL, '100')
|
||||
# Verify that we again see all the child addresses in the parent's child table.
|
||||
# Note that child should register its addresses using "Child Update
|
||||
# Request" exchange.
|
||||
wpan.verify_within(check_child_addressses_on_parent, WAIT_TIME)
|
||||
wpan.verify_within(check_child_addresses_on_parent, WAIT_TIME)
|
||||
|
||||
# Verify that there was no state change on child.
|
||||
verify(child_num_state_changes == len(wpan.parse_list(child.get("stat:ncp"))))
|
||||
|
||||
@@ -31,7 +31,7 @@ import wpan
|
||||
# -----------------------------------------------------------------------------------------------------------------------
|
||||
# Test description:
|
||||
#
|
||||
# This test covers a situation where a single parent exists in network with poor link quality ensuding the child
|
||||
# This test covers a situation where a single parent exists in network with poor link quality ensuring the child
|
||||
# can attach the parent.
|
||||
|
||||
test_name = __file__[:-3] if __file__.endswith('.py') else __file__
|
||||
|
||||
@@ -77,15 +77,15 @@ verify(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED) == 'false')
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_INTERVAL, '1000')
|
||||
verify(int(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_INTERVAL), 0) == 1000)
|
||||
|
||||
all_channls_mask = int('0x7fff800', 0)
|
||||
all_channels_mask = int('0x7fff800', 0)
|
||||
chan_11_mask = int('0x800', 0)
|
||||
chan_11_to_13_mask = int('0x3800', 0)
|
||||
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK,
|
||||
str(all_channls_mask))
|
||||
str(all_channels_mask))
|
||||
verify(
|
||||
int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) ==
|
||||
all_channls_mask)
|
||||
all_channels_mask)
|
||||
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(chan_11_mask))
|
||||
verify(
|
||||
@@ -98,10 +98,10 @@ verify(
|
||||
int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) ==
|
||||
chan_11_to_13_mask)
|
||||
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channls_mask))
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channels_mask))
|
||||
verify(
|
||||
int(node.get(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK), 0) ==
|
||||
all_channls_mask)
|
||||
all_channels_mask)
|
||||
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED, '1')
|
||||
verify(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED) == 'true')
|
||||
@@ -123,7 +123,7 @@ while node.get(wpan.WPAN_STATE) != wpan.STATE_ASSOCIATED:
|
||||
verify(node.get(wpan.WPAN_CHANNEL_MANAGER_AUTO_SELECT_ENABLED) == 'true')
|
||||
verify(
|
||||
int(node.get(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK), 0) ==
|
||||
all_channls_mask)
|
||||
all_channels_mask)
|
||||
verify(
|
||||
int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) ==
|
||||
chan_11_to_13_mask)
|
||||
|
||||
@@ -77,16 +77,16 @@ node.form('channel-manager', channel=24)
|
||||
# -----------------------------------------------------------------------------------------------------------------------
|
||||
# Test implementation
|
||||
|
||||
all_channls_mask = int('0x7fff800', 0)
|
||||
all_channels_mask = int('0x7fff800', 0)
|
||||
chan_12_to_15_mask = int('0x000f000', 0)
|
||||
chan_15_to_17_mask = int('0x0038000', 0)
|
||||
|
||||
# Set supported channel mask to be all channels
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK,
|
||||
str(all_channls_mask))
|
||||
str(all_channels_mask))
|
||||
verify(
|
||||
int(node.get(wpan.WPAN_CHANNEL_MANAGER_SUPPORTED_CHANNEL_MASK), 0) ==
|
||||
all_channls_mask)
|
||||
all_channels_mask)
|
||||
|
||||
# Sleep for 4.5 second with speedup factor of 10,000 this is more than 12
|
||||
# hours.
|
||||
@@ -157,7 +157,7 @@ node.set(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL,
|
||||
'12') # request a channel change to 12
|
||||
verify(int(node.get(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL), 0) == 12)
|
||||
verify_channel([node], 12)
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channls_mask))
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_FAVORED_CHANNEL_MASK, str(all_channels_mask))
|
||||
node.set(wpan.WPAN_CHANNEL_MANAGER_CHANNEL_SELECT, 'true')
|
||||
verify(int(node.get(wpan.WPAN_CHANNEL_MANAGER_NEW_CHANNEL), 0) == 12)
|
||||
verify_channel([node], 12)
|
||||
|
||||
@@ -55,7 +55,7 @@ static const uint8_t sOpenThreadText[] = "OpenThread Rocks";
|
||||
static const uint8_t sHelloText[] = "Hello there!";
|
||||
static const uint8_t sMottoText[] = "Think good thoughts, say good words, do good deeds!";
|
||||
static const uint8_t sHexText[] = "0123456789abcdef";
|
||||
static const uint8_t sHdlcSpeicals[] = {kFlagSequence, kFlagXOn, kFlagXOff,
|
||||
static const uint8_t sHdlcSpecials[] = {kFlagSequence, kFlagXOn, kFlagXOff,
|
||||
kFlagSequence, kEscapeSequence, kFlagSpecial};
|
||||
|
||||
otError WriteToBuffer(const uint8_t *aText, Hdlc::FrameWritePointer &aWritePointer)
|
||||
@@ -395,7 +395,7 @@ void TestEncoderDecoder(void)
|
||||
encoderBuffer.SaveFrame();
|
||||
|
||||
SuccessOrQuit(encoder.BeginFrame(), "Encoder::BeginFrame() failed");
|
||||
SuccessOrQuit(encoder.Encode(sHdlcSpeicals, sizeof(sHdlcSpeicals)), "Encoder::Encode() failed");
|
||||
SuccessOrQuit(encoder.Encode(sHdlcSpecials, sizeof(sHdlcSpecials)), "Encoder::Encode() failed");
|
||||
SuccessOrQuit(encoder.EndFrame(), "Encoder::EndFrame() failed");
|
||||
encoderBuffer.SaveFrame();
|
||||
|
||||
@@ -439,8 +439,8 @@ void TestEncoderDecoder(void)
|
||||
VerifyOrQuit(memcmp(frame, sMottoText, length) == 0, "Decoded frame content does not match original frame");
|
||||
|
||||
SuccessOrQuit(decoderBuffer.GetNextSavedFrame(frame, length), "Incorrect decoded frame");
|
||||
VerifyOrQuit(length == sizeof(sHdlcSpeicals), "Decoded frame length does not match original frame");
|
||||
VerifyOrQuit(memcmp(frame, sHdlcSpeicals, length) == 0, "Decoded frame content does not match original frame");
|
||||
VerifyOrQuit(length == sizeof(sHdlcSpecials), "Decoded frame length does not match original frame");
|
||||
VerifyOrQuit(memcmp(frame, sHdlcSpecials, length) == 0, "Decoded frame content does not match original frame");
|
||||
|
||||
SuccessOrQuit(decoderBuffer.GetNextSavedFrame(frame, length), "Incorrect decoded frame");
|
||||
VerifyOrQuit(length == sizeof(sHelloText) - 1, "Decoded frame length does not match original frame");
|
||||
|
||||
@@ -880,7 +880,7 @@ enum
|
||||
kLensArraySize = 500, // Size of "Lengths" array.
|
||||
kMaxFrameLen = 400, // Maximum frame length
|
||||
kReadProbability = 50, // Probability (in percent) to randomly choose to read vs write frame
|
||||
kHighPriorityProbablity = 20, // Probability (in percent) to write a high priority frame
|
||||
kHighPriorityProbability = 20, // Probability (in percent) to write a high priority frame
|
||||
kUseTrueRandomNumberGenerator = 1, // To use true random number generator or not.
|
||||
};
|
||||
|
||||
@@ -1020,7 +1020,7 @@ void TestFuzzBuffer(void)
|
||||
uint32_t len = GetRandom(kMaxFrameLen) + 1;
|
||||
Spinel::Buffer::Priority priority;
|
||||
|
||||
if (GetRandom(100) < kHighPriorityProbablity)
|
||||
if (GetRandom(100) < kHighPriorityProbability)
|
||||
{
|
||||
priority = Spinel::Buffer::kPriorityHigh;
|
||||
}
|
||||
|
||||
@@ -594,7 +594,7 @@ void TestDecoder(void)
|
||||
SuccessOrQuit(decoder.CloseStruct(), "CloseStruct() failed.");
|
||||
SuccessOrQuit(decoder.ReadUint16(u16), "ReadUint16() failed.");
|
||||
|
||||
// `ResetToSaved()` should fail sicne the enclosing struct for the saved position is closed.
|
||||
// `ResetToSaved()` should fail since the enclosing struct for the saved position is closed.
|
||||
VerifyOrQuit(decoder.ResetToSaved() == OT_ERROR_INVALID_STATE, "ResetToSaved() did not fail.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user