From 0c003844b07e78c2a4f0472867dbdb03a25cf21d Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 31 Mar 2021 17:05:10 -0700 Subject: [PATCH] [docs] fix typos in documentations/comments and small style changes (#6374) --- include/openthread/backbone_router_ftd.h | 2 +- include/openthread/coap_secure.h | 2 +- include/openthread/dns_client.h | 2 +- include/openthread/icmp6.h | 2 +- include/openthread/instance.h | 2 +- include/openthread/ip6.h | 8 ++-- include/openthread/link_raw.h | 2 +- include/openthread/srp_server.h | 4 +- src/cli/README.md | 2 +- src/core/backbone_router/backbone_tmf.hpp | 8 ++-- src/core/backbone_router/bbr_local.hpp | 4 +- src/core/backbone_router/ndproxy_table.hpp | 16 +++---- src/core/border_router/routing_manager.hpp | 54 +++++++++++----------- src/core/coap/coap.hpp | 6 +-- src/core/common/settings.hpp | 2 +- src/core/net/dhcp6.hpp | 24 +++++----- src/core/net/dhcp6_server.hpp | 2 +- src/core/net/dns_client.hpp | 2 +- src/core/net/netif.hpp | 8 ++-- src/core/net/srp_client.cpp | 2 +- src/core/net/srp_server.hpp | 4 +- src/core/radio/max_power_table.hpp | 6 +-- src/core/thread/dua_manager.hpp | 2 +- src/core/thread/link_metrics.hpp | 4 +- src/core/thread/link_metrics_tlvs.hpp | 2 +- src/core/thread/mle_router.cpp | 4 +- src/core/thread/mlr_manager.hpp | 9 ++-- src/core/thread/network_data_leader.hpp | 6 +-- src/core/thread/network_data_local.hpp | 2 +- src/core/thread/thread_tlvs.hpp | 2 +- src/core/thread/topology.hpp | 32 ++++++------- src/core/utils/heap.hpp | 2 +- src/core/utils/otns.hpp | 2 +- src/lib/spinel/radio_spinel.hpp | 12 ++--- src/lib/spinel/spinel.h | 2 +- src/lib/url/url.hpp | 2 +- tools/otci/otci/otci.py | 4 +- 37 files changed, 123 insertions(+), 128 deletions(-) diff --git a/include/openthread/backbone_router_ftd.h b/include/openthread/backbone_router_ftd.h index 401568ef4..741aade2c 100644 --- a/include/openthread/backbone_router_ftd.h +++ b/include/openthread/backbone_router_ftd.h @@ -220,7 +220,7 @@ typedef enum * * @param[in] aContext The user context pointer. * @param[in] aEvent The Multicast Listener event. - * @param[in] aAddress The Ip6 multicast address of the Multicast Listener. + * @param[in] aAddress The IPv6 multicast address of the Multicast Listener. * */ typedef void (*otBackboneRouterMulticastListenerCallback)(void * aContext, diff --git a/include/openthread/coap_secure.h b/include/openthread/coap_secure.h index ee17716d7..b30d22846 100644 --- a/include/openthread/coap_secure.h +++ b/include/openthread/coap_secure.h @@ -186,7 +186,7 @@ void otCoapSecureSetCaCertificateChain(otInstance * aInstance, * This method initializes DTLS session with a peer. * * @param[in] aInstance A pointer to an OpenThread instance. - * @param[in] aSockAddr A pointer to the remote sockaddr. + * @param[in] aSockAddr A pointer to the remote socket address. * @param[in] aHandler A pointer to a function that will be called when the DTLS connection * state changes. * @param[in] aContext A pointer to arbitrary context information. diff --git a/include/openthread/dns_client.h b/include/openthread/dns_client.h index 04450ce1c..11c3ec517 100644 --- a/include/openthread/dns_client.h +++ b/include/openthread/dns_client.h @@ -86,7 +86,7 @@ typedef struct otDnsQueryConfig * * When OpenThread stack starts, the default DNS query config is determined from a set of OT config options such as * `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_IP6_ADDRESS`, `_DEFAULT_SERVER_PORT`, `_DEFAULT_RESPONSE_TIMEOUT`, etc. - * (see `config/dns_clinet.h` for all related config options). + * (see `config/dns_client.h` for all related config options). * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/icmp6.h b/include/openthread/icmp6.h index 5a02c7601..cefe596e4 100644 --- a/include/openthread/icmp6.h +++ b/include/openthread/icmp6.h @@ -29,7 +29,7 @@ /** * @file * @brief - * This file defines the top-level icmp6 functions for the OpenThread library. + * This file defines the top-level ICMPv6 functions for the OpenThread library. */ #ifndef OPENTHREAD_ICMP6_H_ diff --git a/include/openthread/instance.h b/include/openthread/instance.h index 259eb8855..330bda2de 100644 --- a/include/openthread/instance.h +++ b/include/openthread/instance.h @@ -53,7 +53,7 @@ extern "C" { * @note This number versions both OpenThread platform and user APIs. * */ -#define OPENTHREAD_API_VERSION (90) +#define OPENTHREAD_API_VERSION (91) /** * @addtogroup api-instance diff --git a/include/openthread/ip6.h b/include/openthread/ip6.h index beb01ad4d..95f748b0a 100644 --- a/include/openthread/ip6.h +++ b/include/openthread/ip6.h @@ -223,7 +223,7 @@ typedef struct otMessageInfo ///< Otherwise, specifies the IPv6 Hop Limit. bool mIsHostInterface : 1; ///< TRUE if packets sent/received via host interface, FALSE otherwise. bool mAllowZeroHopLimit : 1; ///< TRUE to allow IPv6 Hop Limit 0 in `mHopLimit`, FALSE otherwise. - bool mMulticastLoop : 1; ///< TRUE to allow looping back mutlicast, FALSE otherwise. + bool mMulticastLoop : 1; ///< TRUE to allow looping back multicast, FALSE otherwise. } otMessageInfo; /** @@ -492,7 +492,7 @@ void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled); * rules. * @retval OT_ERROR_NO_BUFS Could not allocate necessary message buffers when processing the datagram. * @retval OT_ERROR_NO_ROUTE No route to host. - * @retval OT_ERROR_INVALID_SOURCE_ADDRESS Source addresss is invalid, e.g. an anycast address or a multicast address. + * @retval OT_ERROR_INVALID_SOURCE_ADDRESS Source address is invalid, e.g. an anycast address or a multicast address. * @retval OT_ERROR_PARSE Encountered a malformed header when processing the message. * */ @@ -674,8 +674,8 @@ void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFi * OT_ERROR_RESPONSE_TIMEOUT when failed to receive MLR.rsp, * OT_ERROR_PARSE when failed to parse MLR.rsp. * @param[in] aMlrStatus The Multicast Listener Registration status when @p aError is OT_ERROR_NONE. - * @param[in] aFailedAddresses A pointer to the failed Ip6 addresses when @p aError is OT_ERROR_NONE. - * @param[in] aFailedAddressNum The number of failed Ip6 addresses when @p aError is OT_ERROR_NONE. + * @param[in] aFailedAddresses A pointer to the failed IPv6 addresses when @p aError is OT_ERROR_NONE. + * @param[in] aFailedAddressNum The number of failed IPv6 addresses when @p aError is OT_ERROR_NONE. * * @sa otIp6RegisterMulticastListeners * diff --git a/include/openthread/link_raw.h b/include/openthread/link_raw.h index 24626d272..116fea654 100644 --- a/include/openthread/link_raw.h +++ b/include/openthread/link_raw.h @@ -70,7 +70,7 @@ typedef void (*otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame * raw-link layer. * * @retval OT_ERROR_FAILED The radio could not be enabled/disabled. - * @retval OT_ERROR_INVALID_STATE If the OpenThread Ip6 interface is already enabled. + * @retval OT_ERROR_INVALID_STATE If the OpenThread IPv6 interface is already enabled. * @retval OT_ERROR_NONE If the enable state was successfully set. * */ diff --git a/include/openthread/srp_server.h b/include/openthread/srp_server.h index 0105621d8..8fdedd708 100644 --- a/include/openthread/srp_server.h +++ b/include/openthread/srp_server.h @@ -87,7 +87,7 @@ const char *otSrpServerGetDomain(otInstance *aInstance); * This method should only be called before the SRP server is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. - * @param[in] aDomain The domain to be set. MUST NOT be nullptr. + * @param[in] aDomain The domain to be set. MUST NOT be NULL. * * @retval OT_ERROR_NONE Successfully set the domain to @p aDomain. * @retval OT_ERROR_INVALID_STATE The SRP server is already enabled and the Domain cannot be changed. @@ -134,7 +134,7 @@ otError otSrpServerSetLeaseRange(otInstance *aInstance, * This method handles SRP service updates. * * This function is called by the SRP server to notify that a SRP host and possibly SRP services - * are being updated. It is important that the SRP updates are not commited until the handler + * are being updated. It is important that the SRP updates are not committed until the handler * returns the result by calling otSrpServerHandleServiceUpdateResult or times out after @p aTimeout. * * A SRP service observer should always call otSrpServerHandleServiceUpdateResult with error code diff --git a/src/cli/README.md b/src/cli/README.md index f9c0321f7..7ab5bea7f 100644 --- a/src/cli/README.md +++ b/src/cli/README.md @@ -168,7 +168,7 @@ Done ### bbr mgmt mlr listener add \ \[\\] -Add a Multicast Listener with a given Ip6 multicast address and timeout (in seconds). +Add a Multicast Listener with a given IPv6 multicast address and timeout (in seconds). Only for testing/reference Backbone Router device. diff --git a/src/core/backbone_router/backbone_tmf.hpp b/src/core/backbone_router/backbone_tmf.hpp index dddf14fd8..cfa1bdae0 100644 --- a/src/core/backbone_router/backbone_tmf.hpp +++ b/src/core/backbone_router/backbone_tmf.hpp @@ -82,17 +82,17 @@ public: bool IsBackboneTmfMessage(const Ip6::MessageInfo &aMessageInfo) const; /** - * This method subscribes the Backbone TMF socket to a given Ip6 multicast group on the Backbone network. + * This method subscribes the Backbone TMF socket to a given IPv6 multicast group on the Backbone network. * - * @param[in] aAddress The Ip6 multicast group address. + * @param[in] aAddress The IPv6 multicast group address. * */ void SubscribeMulticast(const Ip6::Address &aAddress); /** - * This method unsubscribes the Backbone TMF socket from a given Ip6 multicast group on the Backbone network. + * This method unsubscribes the Backbone TMF socket from a given IPv6 multicast group on the Backbone network. * - * @param[in] aAddress The Ip6 multicast group address. + * @param[in] aAddress The IPv6 multicast group address. * */ void UnsubscribeMulticast(const Ip6::Address &aAddress); diff --git a/src/core/backbone_router/bbr_local.hpp b/src/core/backbone_router/bbr_local.hpp index ba6d27472..4e8b47f95 100644 --- a/src/core/backbone_router/bbr_local.hpp +++ b/src/core/backbone_router/bbr_local.hpp @@ -77,7 +77,7 @@ public: explicit Local(Instance &aInstance); /** - * This methhod enables/disables Backbone function. + * This method enables/disables Backbone function. * * @param[in] aEnable TRUE to enable the backbone function, FALSE otherwise. * @@ -85,7 +85,7 @@ public: void SetEnabled(bool aEnable); /** - * This methhod retrieves the Backbone Router state. + * This method retrieves the Backbone Router state. * * * @retval OT_BACKBONE_ROUTER_STATE_DISABLED Backbone function is disabled. diff --git a/src/core/backbone_router/ndproxy_table.hpp b/src/core/backbone_router/ndproxy_table.hpp index e8d28d598..15a10a139 100644 --- a/src/core/backbone_router/ndproxy_table.hpp +++ b/src/core/backbone_router/ndproxy_table.hpp @@ -140,15 +140,15 @@ public: } /** - * This method registers a given Ip6 address IID with related information to the NdProxy table. + * This method registers a given IPv6 address IID with related information to the NdProxy table. * - * @param[in] aAddressIid The Ip6 address IID. + * @param[in] aAddressIid The IPv6 address IID. * @param[in] aMeshLocalIid The Mesh-Local IID. * @param[in] aRloc16 The RLOC16. * @param[in] aTimeSinceLastTransaction Time since last transaction (in seconds). * * @retval kErrorNone If registered successfully. - * @retval kErrorDuplicated If the Ip6 address IID is a duplicate. + * @retval kErrorDuplicated If the IPv6 address IID is a duplicate. * @retval kErrorNoBufs Insufficient buffer space available to register. * */ @@ -158,12 +158,12 @@ public: const uint32_t * aTimeSinceLastTransaction); /** - * This method checks if a given Ip6 address IID was registered. + * This method checks if a given IPv6 address IID was registered. * - * @param[in] aAddressIid The Ip6 address IID. + * @param[in] aAddressIid The IPv6 address IID. * - * @retval TRUE If the Ip6 address IID was registered. - * @retval FALSE If the Ip6 address IID was not registered. + * @retval TRUE If the IPv6 address IID was registered. + * @retval FALSE If the IPv6 address IID was not registered. * */ bool IsRegistered(const Ip6::InterfaceIdentifier &aAddressIid) { return FindByAddressIid(aAddressIid) != nullptr; } @@ -185,7 +185,7 @@ public: /** * This method gets the ND Proxy info for a given Domain Unicast Address. * - * @param[in] aDua The Domain Unicaste Address. + * @param[in] aDua The Domain Unicast Address. * * @returns The `NdProxy` instance matching the specified @p aDua, or nullptr if not found. * diff --git a/src/core/border_router/routing_manager.hpp b/src/core/border_router/routing_manager.hpp index f7b20174b..96f942d67 100644 --- a/src/core/border_router/routing_manager.hpp +++ b/src/core/border_router/routing_manager.hpp @@ -63,12 +63,10 @@ namespace ot { namespace BorderRouter { /** - * This class implements bi-directional routing between Thread and - * Infrastructure networks. + * This class implements bi-directional routing between Thread and Infrastructure networks. * - * The Border Routing manager works on both Thread interface and - * infrastructure interface. All ICMPv6 messages are sent/recv - * on the infrastructure interface. + * The Border Routing manager works on both Thread interface and infrastructure interface. All ICMPv6 messages are + * sent/received on the infrastructure interface. * */ class RoutingManager : public InstanceLocator @@ -250,48 +248,48 @@ private: // Indicates whether the Routing Manager is running (started). bool mIsRunning; - // Indicates whether the Routing manager is enabled. - // The Routing Manager will be stopped if we are - // disabled. + // Indicates whether the Routing manager is enabled. The Routing + // Manager will be stopped if we are disabled. bool mIsEnabled; - // Indicates whether the infra interface is running. - // The Routing Manager will be stopped when the - // Infra interface is not running. + // Indicates whether the infra interface is running. The Routing + // Manager will be stopped when the Infra interface is not running. bool mInfraIfIsRunning; - // The index of the infra interface on which Router - // Advertisement messages will be sent. + // The index of the infra interface on which Router Advertisement + // messages will be sent. uint32_t mInfraIfIndex; - // The IPv6 link-local address of the infra interface. - // It's UNSPECIFIED if no valid IPv6 link-local address - // is associated with the infra interface and the Routing - // Manager will be stopped. + // The IPv6 link-local address of the infra interface. It's + // UNSPECIFIED if no valid IPv6 link-local address is associated + // with the infra interface and the Routing Manager will be + // stopped. Ip6::Address mInfraIfLinkLocalAddress; - // The OMR prefix loaded from local persistent storage or randomly generated - // if non is found in persistent storage. + // The OMR prefix loaded from local persistent storage or randomly + // generated if non is found in persistent storage. Ip6::Prefix mLocalOmrPrefix; // The advertised OMR prefixes. For a stable Thread network without - // manually configured OMR prefixes, there should be a single OMR prefix - // that is being advertised because each BRs will converge to the smallest - // OMR prefix sorted by method IsPrefixSmallerThan. If manually configured - // OMR prefixes exist, they will also be advertised on infra link. + // manually configured OMR prefixes, there should be a single OMR + // prefix that is being advertised because each BRs will converge to + // the smallest OMR prefix sorted by method IsPrefixSmallerThan. If + // manually configured OMR prefixes exist, they will also be + // advertised on infra link. Ip6::Prefix mAdvertisedOmrPrefixes[kMaxOmrPrefixNum]; uint8_t mAdvertisedOmrPrefixNum; - // The on-link prefix loaded from local persistent storage or randomly generated - // if non is found in persistent storage. + // The on-link prefix loaded from local persistent storage or + // randomly generated if non is found in persistent storage. Ip6::Prefix mLocalOnLinkPrefix; // Could only be nullptr or a pointer to mLocalOnLinkPrefix. const Ip6::Prefix *mAdvertisedOnLinkPrefix; - // The array of prefixes discovered on the infra link. Those prefixes consist of - // on-link prefix(es) and OMR prefixes advertised by BRs in another Thread Network - // which is connected to the same infra link. + // The array of prefixes discovered on the infra link. Those + // prefixes consist of on-link prefix(es) and OMR prefixes + // advertised by BRs in another Thread Network which is connected to + // the same infra link. ExternalPrefix mDiscoveredPrefixes[kMaxDiscoveredPrefixNum]; uint8_t mDiscoveredPrefixNum; diff --git a/src/core/coap/coap.hpp b/src/core/coap/coap.hpp index 2092f3c5f..faa47d433 100644 --- a/src/core/coap/coap.hpp +++ b/src/core/coap/coap.hpp @@ -720,10 +720,8 @@ private: bool mObserve : 1; // Information that this request involves Observations. #endif #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE - otCoapBlockwiseReceiveHook mBlockwiseReceiveHook; // A function pointer that is called on Block2 - // response reception. - otCoapBlockwiseTransmitHook mBlockwiseTransmitHook; // A function pointer that is called on Block1 - // response reception. + otCoapBlockwiseReceiveHook mBlockwiseReceiveHook; // Function pointer called on Block2 response reception. + otCoapBlockwiseTransmitHook mBlockwiseTransmitHook; // Function pointer called on Block1 response reception. #endif }; diff --git a/src/core/common/settings.hpp b/src/core/common/settings.hpp index 929fef453..e9b098cd1 100644 --- a/src/core/common/settings.hpp +++ b/src/core/common/settings.hpp @@ -152,7 +152,7 @@ public: Error Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength); /** - * This method remves all values. + * This method removes all values. * */ void Wipe(void); diff --git a/src/core/net/dhcp6.hpp b/src/core/net/dhcp6.hpp index ac4bf82d4..6ea4e3110 100644 --- a/src/core/net/dhcp6.hpp +++ b/src/core/net/dhcp6.hpp @@ -278,17 +278,17 @@ public: } /** - * This method returns the client Duid Type. + * This method returns the client DUID Type. * - * @returns The client Duid Type. + * @returns The client DUID Type. * */ DuidType GetDuidType(void) const { return static_cast(HostSwap16(mDuidType)); } /** - * This method sets the client Duid Type. + * This method sets the client DUID Type. * - * @param[in] aDuidType The client Duid Type. + * @param[in] aDuidType The client DUID Type. * */ void SetDuidType(DuidType aDuidType) { mDuidType = HostSwap16(static_cast(aDuidType)); } @@ -349,33 +349,33 @@ public: } /** - * This method returns the server Duid Type. + * This method returns the server DUID Type. * - * @returns The server Duid Type. + * @returns The server DUID Type. * */ DuidType GetDuidType(void) const { return static_cast(HostSwap16(mDuidType)); } /** - * This method sets the server Duid Type. + * This method sets the server DUID Type. * - * @param[in] aDuidType The server Duid Type. + * @param[in] aDuidType The server DUID Type. * */ void SetDuidType(DuidType aDuidType) { mDuidType = HostSwap16(static_cast(aDuidType)); } /** - * This method returns the server Duid HardwareType. + * This method returns the server DUID HardwareType. * - * @returns The server Duid HardwareType. + * @returns The server DUID HardwareType. * */ uint16_t GetDuidHardwareType(void) const { return HostSwap16(mDuidHardwareType); } /** - * This method sets the server Duid HardwareType. + * This method sets the server DUID HardwareType. * - * @param[in] aDuidHardwareType The server Duid HardwareType. + * @param[in] aDuidHardwareType The server DUID HardwareType. * */ void SetDuidHardwareType(uint16_t aDuidHardwareType) { mDuidHardwareType = HostSwap16(aDuidHardwareType); } diff --git a/src/core/net/dhcp6_server.hpp b/src/core/net/dhcp6_server.hpp index e8f36ea4f..a7ab47079 100644 --- a/src/core/net/dhcp6_server.hpp +++ b/src/core/net/dhcp6_server.hpp @@ -75,7 +75,7 @@ public: explicit Server(Instance &aInstance); /** - * This method updates DHCP Agents and DHCP Alocs. + * This method updates DHCP Agents and DHCP ALOCs. * */ Error UpdateService(void); diff --git a/src/core/net/dns_client.hpp b/src/core/net/dns_client.hpp index 3fd4f95b6..0b5227aef 100644 --- a/src/core/net/dns_client.hpp +++ b/src/core/net/dns_client.hpp @@ -529,7 +529,7 @@ public: * * When OpenThread stack starts, the default DNS query config is determined from a set of OT config options such as * `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_IP6_ADDRESS`, `_DEFAULT_SERVER_PORT`, or `_DEFAULT_RESPONSE_TIMEOUT` - * etc. (see `config/dns_clinet.h` for all related config options). + * etc. (see `config/dns_client.h` for all related config options). * */ void ResetDefaultConfig(void); diff --git a/src/core/net/netif.hpp b/src/core/net/netif.hpp index ca0448fd3..a3fd12559 100644 --- a/src/core/net/netif.hpp +++ b/src/core/net/netif.hpp @@ -282,10 +282,10 @@ public: public: /** * This constructor initializes an `ExternalMulticastAddressIterator` instance to start from the first external - * multicast address that matches a given Ip6 address type filter. + * multicast address that matches a given IPv6 address type filter. * * @param[in] aNetif A reference to the Netif instance. - * @param[in] aFilter The Ip6 address type filter. + * @param[in] aFilter The IPv6 address type filter. * */ explicit ExternalMulticastAddressIterator(const Netif &aNetif, Address::TypeFilter aFilter = Address::kTypeAny) @@ -561,7 +561,7 @@ public: /** * This method enables range-based `for` loop iteration over external multicast addresses on the Netif that matches - * a given Ip6 address type filter. + * a given IPv6 address type filter. * * This method should be used like follows: to iterate over all external multicast addresses * @@ -573,7 +573,7 @@ public: * for (Ip6::ExternalNetifMulticastAddress &addr : * Get().IterateExternalMulticastAddresses(Ip6::Address::kTypeMulticastLargerThanRealmLocal)) { ... } * - * @param[in] aFilter The Ip6 address type filter. + * @param[in] aFilter The IPv6 address type filter. * * @returns An `ExternalMulticastAddressIteratorBuilder` instance. * diff --git a/src/core/net/srp_client.cpp b/src/core/net/srp_client.cpp index a32da3ed1..27f69aaf3 100644 --- a/src/core/net/srp_client.cpp +++ b/src/core/net/srp_client.cpp @@ -1163,7 +1163,7 @@ void Client::ProcessResponse(Message &aMessage) exit: if (error != kErrorNone) { - otLogInfoSrp("[clinet] Failed to process response %s", ErrorToString(error)); + otLogInfoSrp("[client] Failed to process response %s", ErrorToString(error)); } } diff --git a/src/core/net/srp_server.hpp b/src/core/net/srp_server.hpp index 6efb04d3d..453fcb131 100644 --- a/src/core/net/srp_server.hpp +++ b/src/core/net/srp_server.hpp @@ -199,7 +199,7 @@ public: * * @param[in] aFullName The full name. * - * @returns TRUE if the servce matches the full name, FALSE if doesn't match. + * @returns TRUE if the service matches the full name, FALSE if doesn't match. * */ bool Matches(const char *aFullName) const; @@ -282,7 +282,7 @@ public: const char *GetFullName(void) const { return mFullName; } /** - * This method returns adrersses of the host. + * This method returns addresses of the host. * * @param[out] aAddressesNum The number of the addresses. * diff --git a/src/core/radio/max_power_table.hpp b/src/core/radio/max_power_table.hpp index 2bd27a4e9..2204859e9 100644 --- a/src/core/radio/max_power_table.hpp +++ b/src/core/radio/max_power_table.hpp @@ -44,7 +44,7 @@ public: /** * This method gets the max allowed transmit power of channel @p aChannel. * - * @params[in] aChannel The radio channel number. + * @param[in] aChannel The radio channel number. * * @returns The max supported transmit power in dBm. * @@ -54,8 +54,8 @@ public: /** * This method sets the max allowed transmit power of channel @p aChannel. * - * @params[in] aChannel The radio channel number. - * @params[in] aPower The max supported transmit power in dBm. + * @param[in] aChannel The radio channel number. + * @param[in] aPower The max supported transmit power in dBm. * */ void SetTransmitPower(uint8_t aChannel, int8_t aPower) { mPowerTable[aChannel - Radio::kChannelMin] = aPower; } diff --git a/src/core/thread/dua_manager.hpp b/src/core/thread/dua_manager.hpp index db83d3b0b..a1056350e 100644 --- a/src/core/thread/dua_manager.hpp +++ b/src/core/thread/dua_manager.hpp @@ -227,7 +227,7 @@ private: #if OPENTHREAD_CONFIG_DUA_ENABLE enum DuaState { - kNotExist, ///< DUA is not avaiable. + kNotExist, ///< DUA is not available. kToRegister, ///< DUA is to be registered. kRegistering, ///< DUA is being registered. kRegistered, ///< DUA is registered. diff --git a/src/core/thread/link_metrics.hpp b/src/core/thread/link_metrics.hpp index 128a2cefd..84c47983c 100644 --- a/src/core/thread/link_metrics.hpp +++ b/src/core/thread/link_metrics.hpp @@ -138,7 +138,7 @@ public: * * @param[in] aFrameType The type of the frame. * @param[in] aLqi The LQI value. - * @param[in] aRss Ths RSS value. + * @param[in] aRss The RSS value. * */ void AggregateLinkMetrics(uint8_t aFrameType, uint8_t aLqi, int8_t aRss); @@ -350,7 +350,7 @@ public: void ProcessEnhAckIeData(const uint8_t *aData, uint8_t aLen, const Neighbor &aNeighbor); private: - /** + /* * TypeIdFlagPdu: 0x0_1_000_000 -> 0x40 ==> L bit set, type = 0 (count/summation), metric-enum = 0 (PDU rxed). * TypeIdFlagLqi: 0x0_0_001_001 -> 0x00 ==> L bit not set, type = 1 (exp ave), metric-enum = 1 (LQI). * TypeIdFlagLinkMargin: 0x0_0_001_010 -> 0x00 ==> L bit not set, type = 1 (exp ave), metric-enum = 2 (Link Margin). diff --git a/src/core/thread/link_metrics_tlvs.hpp b/src/core/thread/link_metrics_tlvs.hpp index 084e9282a..696a52c83 100644 --- a/src/core/thread/link_metrics_tlvs.hpp +++ b/src/core/thread/link_metrics_tlvs.hpp @@ -114,7 +114,7 @@ public: } /** - * This method init the Type Id value + * This method initializes the Type ID value * */ void Init(void) { mTypeIdFlags = 0; } diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 06853d4a8..7bd03696f 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -2388,7 +2388,7 @@ void MleRouter::HandleChildUpdateRequest(const Message & aMessage, tlvs[tlvslength++] = Tlv::kLinkFrameCounter; } - // Ip6 Address TLV + // IPv6 Address TLV if (Tlv::FindTlvOffset(aMessage, Tlv::kAddressRegistration, addressRegistrationOffset) == kErrorNone) { SuccessOrExit(error = UpdateChildAddresses(aMessage, addressRegistrationOffset, *child)); @@ -2624,7 +2624,7 @@ void MleRouter::HandleChildUpdateResponse(const Message & aMessage, ExitNow(error = kErrorParse); } - // Ip6 Address + // IPv6 Address if (Tlv::FindTlvOffset(aMessage, Tlv::kAddressRegistration, addressRegistrationOffset) == kErrorNone) { SuccessOrExit(error = UpdateChildAddresses(aMessage, addressRegistrationOffset, *child)); diff --git a/src/core/thread/mlr_manager.hpp b/src/core/thread/mlr_manager.hpp index 65abceaf6..4bd77a8f2 100644 --- a/src/core/thread/mlr_manager.hpp +++ b/src/core/thread/mlr_manager.hpp @@ -102,9 +102,8 @@ public: * This method updates the Multicast Subscription Table according to the Child information. * * @param[in] aChild A reference to the child information. - * @param[in] aOldMlrRegisteredAddresses A pointer to an array of the Child's previously registered Ip6 - * addresses. - * @param[in] aOldMlrRegisteredAddressNum The number of previously registered Ip6 addresses. + * @param[in] aOldMlrRegisteredAddresses Pointer to an array of the Child's previously registered IPv6 addresses. + * @param[in] aOldMlrRegisteredAddressNum The number of previously registered IPv6 addresses. * */ void UpdateProxiedSubscriptions(Child & aChild, @@ -119,8 +118,8 @@ public: * Note: only available when both `(OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE)` and * `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE` are enabled) * - * @param aAddresses A pointer to Ip6 multicast addresses to register. - * @param aAddressNum The number of Ip6 multicast addresses. + * @param aAddresses A pointer to IPv6 multicast addresses to register. + * @param aAddressNum The number of IPv6 multicast addresses. * @param aTimeout A pointer to the timeout (in seconds), or nullptr to use the default MLR timeout. * A timeout of 0 seconds removes the Multicast Listener addresses. * @param aCallback A callback function. diff --git a/src/core/thread/network_data_leader.hpp b/src/core/thread/network_data_leader.hpp index baf93d67a..3735ad010 100644 --- a/src/core/thread/network_data_leader.hpp +++ b/src/core/thread/network_data_leader.hpp @@ -255,12 +255,12 @@ public: Error SteeringDataCheckJoiner(const MeshCoP::JoinerDiscerner &aDiscerner) const; /** - * This method gets the Rloc of Dhcp Agent of specified contextId. + * This method gets the RLOC of DHCP Agent of specified contextId. * * @param[in] aContextId A pointer to the Commissioning Data value. - * @param[out] aRloc16 The reference of which for output the Rloc16. + * @param[out] aRloc16 The reference of which for output the RLOC16. * - * @retval kErrorNone Successfully get the Rloc of Dhcp Agent. + * @retval kErrorNone Successfully get the RLOC of DHCP Agent. * @retval kErrorNotFound The specified @p aContextId could not be found. * */ diff --git a/src/core/thread/network_data_local.hpp b/src/core/thread/network_data_local.hpp index 71facfb7b..a0985f143 100644 --- a/src/core/thread/network_data_local.hpp +++ b/src/core/thread/network_data_local.hpp @@ -74,7 +74,7 @@ public: /** * This method adds a Border Router entry to the Thread Network Data. * - * @param[in] aConfig A reference to the on mesh perfix configuration. + * @param[in] aConfig A reference to the on mesh prefix configuration. * * @retval kErrorNone Successfully added the Border Router entry. * @retval kErrorNoBufs Insufficient space to add the Border Router entry. diff --git a/src/core/thread/thread_tlvs.hpp b/src/core/thread/thread_tlvs.hpp index f4c349b47..cc2db86e5 100644 --- a/src/core/thread/thread_tlvs.hpp +++ b/src/core/thread/thread_tlvs.hpp @@ -198,7 +198,7 @@ public: kDuaDuplicate = 3, ///< Registration rejected (Fatal): DUA is already in use by another device. kDuaNoResources = 4, ///< Registration rejected (Non-fatal): Backbone Router Resource shortage. kDuaNotPrimary = 5, ///< Registration rejected (Non-fatal): Backbone Router is not primary at this moment. - kDuaGeneralFailure = 6, ///< Registration failure (Non-fatal): Reason(s) not futher specified. + kDuaGeneralFailure = 6, ///< Registration failure (Non-fatal): Reason(s) not further specified. }; }; diff --git a/src/core/thread/topology.hpp b/src/core/thread/topology.hpp index bc6aa1ff4..0120c5200 100644 --- a/src/core/thread/topology.hpp +++ b/src/core/thread/topology.hpp @@ -668,7 +668,7 @@ public: /** * This method aggregates the Link Metrics data into all the series that is running for this neighbor. * - * If a series wants to account frames of @p aFrameType, it would add count by 1 and aggregrate @p aLqi and + * If a series wants to account frames of @p aFrameType, it would add count by 1 and aggregate @p aLqi and * @p aRss into its averagers. * * @param[in] aSeriesId Series ID for Link Probe. Should be `0` if this method is not called by Link Probe. @@ -1203,53 +1203,53 @@ public: #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE /** - * This method returns MLR state of an Ip6 multicast address. + * This method returns MLR state of an IPv6 multicast address. * * @note The @p aAdddress reference MUST be from `IterateIp6Addresses()` or `AddressIterator`. * - * @param[in] aAddress The Ip6 multicast address. + * @param[in] aAddress The IPv6 multicast address. * - * @returns MLR state of the Ip6 multicast address. + * @returns MLR state of the IPv6 multicast address. * */ MlrState GetAddressMlrState(const Ip6::Address &aAddress) const; /** - * This method sets MLR state of an Ip6 multicast address. + * This method sets MLR state of an IPv6 multicast address. * * @note The @p aAdddress reference MUST be from `IterateIp6Addresses()` or `AddressIterator`. * - * @param[in] aAddress The Ip6 multicast address. + * @param[in] aAddress The IPv6 multicast address. * @param[in] aState The target MLR state. * */ void SetAddressMlrState(const Ip6::Address &aAddress, MlrState aState); /** - * This method returns if the Child has Ip6 address @p aAddress of MLR state `kMlrStateRegistered`. + * This method returns if the Child has IPv6 address @p aAddress of MLR state `kMlrStateRegistered`. * - * @param[in] aAddress The Ip6 address. + * @param[in] aAddress The IPv6 address. * - * @retval true If the Child has Ip6 address @p aAddress of MLR state `kMlrStateRegistered`. - * @retval false If the Child does not have Ip6 address @p aAddress of MLR state `kMlrStateRegistered`. + * @retval true If the Child has IPv6 address @p aAddress of MLR state `kMlrStateRegistered`. + * @retval false If the Child does not have IPv6 address @p aAddress of MLR state `kMlrStateRegistered`. * */ bool HasMlrRegisteredAddress(const Ip6::Address &aAddress) const; /** - * This method returns if the Child has any Ip6 address of MLR state `kMlrStateRegistered`. + * This method returns if the Child has any IPv6 address of MLR state `kMlrStateRegistered`. * - * @retval true If the Child has any Ip6 address of MLR state `kMlrStateRegistered`. - * @retval false If the Child does not have any Ip6 address of MLR state `kMlrStateRegistered`. + * @retval true If the Child has any IPv6 address of MLR state `kMlrStateRegistered`. + * @retval false If the Child does not have any IPv6 address of MLR state `kMlrStateRegistered`. * */ bool HasAnyMlrRegisteredAddress(void) const { return mMlrRegisteredMask.HasAny(); } /** - * This method returns if the Child has any Ip6 address of MLR state `kMlrStateToRegister`. + * This method returns if the Child has any IPv6 address of MLR state `kMlrStateToRegister`. * - * @retval true If the Child has any Ip6 address of MLR state `kMlrStateToRegister`. - * @retval false If the Child does not have any Ip6 address of MLR state `kMlrStateToRegister`. + * @retval true If the Child has any IPv6 address of MLR state `kMlrStateToRegister`. + * @retval false If the Child does not have any IPv6 address of MLR state `kMlrStateToRegister`. * */ bool HasAnyMlrToRegisterAddress(void) const { return mMlrToRegisterMask.HasAny(); } diff --git a/src/core/utils/heap.hpp b/src/core/utils/heap.hpp index e0d1e666b..48502ef92 100644 --- a/src/core/utils/heap.hpp +++ b/src/core/utils/heap.hpp @@ -181,7 +181,7 @@ class Heap : private NonCopyable { public: /** - * This constructure initialize a memory heap. + * This constructor initializes a memory heap. * */ Heap(void); diff --git a/src/core/utils/otns.hpp b/src/core/utils/otns.hpp index d877b3635..ac4379b58 100644 --- a/src/core/utils/otns.hpp +++ b/src/core/utils/otns.hpp @@ -28,7 +28,7 @@ /** * @file - * This file wraps the calls to platform OTNS abstrations. + * This file wraps the calls to platform OTNS abstractions. */ #ifndef UTILS_OTNS_HPP_ diff --git a/src/lib/spinel/radio_spinel.hpp b/src/lib/spinel/radio_spinel.hpp index e21083ae4..d9df4ae3d 100644 --- a/src/lib/spinel/radio_spinel.hpp +++ b/src/lib/spinel/radio_spinel.hpp @@ -47,7 +47,7 @@ namespace Spinel { /** * The class for providing a OpenThread radio interface by talking with a radio-only - * co-procesor(RCP). The InterfaceType template parameter should provide the following + * co-processor(RCP). The InterfaceType template parameter should provide the following * methods: * * class InterfaceType { @@ -80,7 +80,7 @@ namespace Spinel { * * // This method waits for receiving part or all of spinel frame within specified interval. * - * // @param[in] aTimeout The timeout value in micrsoseconds. + * // @param[in] aTimeout The timeout value in microseconds. * * // @retval OT_ERROR_NONE Part or all of spinel frame is received. * // @retval OT_ERROR_RESPONSE_TIMEOUT No spinel frame is received within @p aTimeout. @@ -541,8 +541,8 @@ public: /** * This method indicates whether a transmit has just finished. * - * @retval TRUE The trasmission is done. - * @retval FALSE The trasmission is not done. + * @retval TRUE The transmission is done. + * @retval FALSE The transmission is not done. * */ bool IsTransmitDone(void) const { return mState == kStateTransmitDone; } @@ -735,7 +735,7 @@ public: * @param[in] aChannel The radio channel. * @param[in] aPower The max transmit power in dBm. * - * @retval OT_ERROR_NONE Succesfully set the max transmit power. + * @retval OT_ERROR_NONE Successfully set the max transmit power. * @retval OT_ERROR_INVALID_ARGS Channel is not in valid range. * */ @@ -990,7 +990,7 @@ private: bool mCcaEnergyDetectThresholdSet : 1; ///< Whether CCA energy detect threshold has been set. bool mTransmitPowerSet : 1; ///< Whether transmit power has been set. bool mCoexEnabledSet : 1; ///< Whether coex enabled has been set. - bool mFemLnaGainSet : 1; ///< Whether FEM LNA gain has benn set. + bool mFemLnaGainSet : 1; ///< Whether FEM LNA gain has been set. bool mRcpFailed : 1; ///< RCP failure happened, should recover and retry operation. bool mEnergyScanning : 1; ///< If fails while scanning, restarts scanning. diff --git a/src/lib/spinel/spinel.h b/src/lib/spinel/spinel.h index 473256964..3658e3e5d 100644 --- a/src/lib/spinel/spinel.h +++ b/src/lib/spinel/spinel.h @@ -262,7 +262,7 @@ * the second struct is defined by the PHY layer. Because of the use of * structures, we know exactly what part comes from that layer. * Additionally, we can add fields to each structure without introducing - * backward compatability problems: Data encoded as "Lt(ESU)t(6C)" + * backward compatibility problems: Data encoded as "Lt(ESU)t(6C)" * (Notice the extra "U") will decode just fine as "Lt(ES)t(6C)". * Additionally, if we don't care about the MAC layer and only care * about the network layer, we could parse as "Lt()t(6C)". diff --git a/src/lib/url/url.hpp b/src/lib/url/url.hpp index 64dce12b4..fbcff4a72 100644 --- a/src/lib/url/url.hpp +++ b/src/lib/url/url.hpp @@ -69,7 +69,7 @@ public: /** * This method gets the path in URL. * - * @returns The path in url. + * @returns The path in URL. * */ const char *GetPath(void) const { return mPath; } diff --git a/tools/otci/otci/otci.py b/tools/otci/otci/otci.py index 361162b6a..84c143bf7 100644 --- a/tools/otci/otci/otci.py +++ b/tools/otci/otci/otci.py @@ -1404,7 +1404,7 @@ class OTCI(object): return tuple(map(Ip6Addr, self.execute_command('ipaddr'))) def has_ipaddr(self, ip: Union[str, ipaddress.IPv6Address]): - """Check if a Ip6 address was added to the Thread interface.""" + """Check if a IPv6 address was added to the Thread interface.""" return ip in self.get_ipaddrs() def get_ipaddr_mleid(self) -> Ip6Addr: @@ -1436,7 +1436,7 @@ class OTCI(object): return tuple(map(Ip6Addr, self.execute_command('ipmaddr'))) def has_ipmaddr(self, ip: Union[str, ipaddress.IPv6Address]): - """Check if a Ip6 multicast address was subscribed by the Thread interface.""" + """Check if a IPv6 multicast address was subscribed by the Thread interface.""" return ip in self.get_ipmaddrs() def get_ipmaddr_promiscuous(self) -> bool: