diff --git a/examples/apps/cli/main.c b/examples/apps/cli/main.c index cc52d9ab7..461d987c1 100644 --- a/examples/apps/cli/main.c +++ b/examples/apps/cli/main.c @@ -42,7 +42,7 @@ #include "lib/platform/reset_util.h" /** - * This function initializes the CLI app. + * Initializes the CLI app. * * @param[in] aInstance The OpenThread instance structure. * diff --git a/examples/apps/ncp/main.c b/examples/apps/ncp/main.c index 9c21c57bb..0f3889511 100644 --- a/examples/apps/ncp/main.c +++ b/examples/apps/ncp/main.c @@ -38,7 +38,7 @@ #include "lib/platform/reset_util.h" /** - * This function initializes the NCP app. + * Initializes the NCP app. * * @param[in] aInstance The OpenThread instance structure. * diff --git a/examples/platforms/openthread-system.h b/examples/platforms/openthread-system.h index de8b2d13b..90503ecd3 100644 --- a/examples/platforms/openthread-system.h +++ b/examples/platforms/openthread-system.h @@ -42,7 +42,7 @@ extern "C" { #endif /** - * This function performs all platform-specific initialization of OpenThread's drivers. + * Performs all platform-specific initialization of OpenThread's drivers. * * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function * when initialization of OpenThread's drivers is most appropriate. @@ -54,7 +54,7 @@ extern "C" { void otSysInit(int argc, char *argv[]); /** - * This function performs all platform-specific deinitialization for OpenThread's drivers. + * Performs all platform-specific deinitialization for OpenThread's drivers. * * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function * when deinitialization of OpenThread's drivers is most appropriate. @@ -63,7 +63,7 @@ void otSysInit(int argc, char *argv[]); void otSysDeinit(void); /** - * This function returns true if a pseudo-reset was requested. + * Returns true if a pseudo-reset was requested. * * In such a case, the main loop should shut down and re-initialize the OpenThread instance. * @@ -74,7 +74,7 @@ void otSysDeinit(void); bool otSysPseudoResetWasRequested(void); /** - * This function performs all platform-specific processing for OpenThread's example applications. + * Performs all platform-specific processing for OpenThread's example applications. * * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function * in the main loop when processing OpenThread's drivers is most appropriate. @@ -85,7 +85,7 @@ bool otSysPseudoResetWasRequested(void); void otSysProcessDrivers(otInstance *aInstance); /** - * This function is called whenever platform drivers needs processing. + * Is called whenever platform drivers needs processing. * * @note This function is not handled by the OpenThread library. Instead, the system/RTOS should handle this function * and schedule a call to `otSysProcessDrivers()`. diff --git a/examples/platforms/simulation/platform-simulation.h b/examples/platforms/simulation/platform-simulation.h index 0fa32fddc..0592b1429 100644 --- a/examples/platforms/simulation/platform-simulation.h +++ b/examples/platforms/simulation/platform-simulation.h @@ -91,13 +91,13 @@ enum extern uint32_t gNodeId; /** - * This function initializes the alarm service used by OpenThread. + * Initializes the alarm service used by OpenThread. * */ void platformAlarmInit(uint32_t aSpeedUpFactor); /** - * This function retrieves the time remaining until the alarm fires. + * Retrieves the time remaining until the alarm fires. * * @param[out] aTimeout A pointer to the timeval struct. * @@ -105,7 +105,7 @@ void platformAlarmInit(uint32_t aSpeedUpFactor); void platformAlarmUpdateTimeout(struct timeval *aTimeout); /** - * This function performs alarm driver processing. + * Performs alarm driver processing. * * @param[in] aInstance The OpenThread instance structure. * @@ -113,7 +113,7 @@ void platformAlarmUpdateTimeout(struct timeval *aTimeout); void platformAlarmProcess(otInstance *aInstance); /** - * This function returns the duration to the next alarm event time (in micro seconds) + * Returns the duration to the next alarm event time (in micro seconds) * * @returns The duration (in micro seconds) to the next alarm event. * @@ -121,7 +121,7 @@ void platformAlarmProcess(otInstance *aInstance); uint64_t platformAlarmGetNext(void); /** - * This function returns the current alarm time. + * Returns the current alarm time. * * @returns The current alarm time. * @@ -129,7 +129,7 @@ uint64_t platformAlarmGetNext(void); uint64_t platformAlarmGetNow(void); /** - * This function advances the alarm time by @p aDelta. + * Advances the alarm time by @p aDelta. * * @param[in] aDelta The amount of time to advance. * @@ -137,19 +137,19 @@ uint64_t platformAlarmGetNow(void); void platformAlarmAdvanceNow(uint64_t aDelta); /** - * This function initializes the radio service used by OpenThread. + * Initializes the radio service used by OpenThread. * */ void platformRadioInit(void); /** - * This function shuts down the radio service used by OpenThread. + * Shuts down the radio service used by OpenThread. * */ void platformRadioDeinit(void); /** - * This function inputs a received radio frame. + * Inputs a received radio frame. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aBuf A pointer to the received radio frame. @@ -159,7 +159,7 @@ void platformRadioDeinit(void); void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLength); /** - * This function updates the file descriptor sets with file descriptors used by the radio driver. + * Updates the file descriptor sets with file descriptors used by the radio driver. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. @@ -170,7 +170,7 @@ void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLen void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd); /** - * This function performs radio driver processing. + * Performs radio driver processing. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aReadFdSet A pointer to the read file descriptors. @@ -180,7 +180,7 @@ void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct ti void platformRadioProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet); /** - * This function initializes the random number service used by OpenThread. + * Initializes the random number service used by OpenThread. * */ void platformRandomInit(void); @@ -194,7 +194,7 @@ void platformRandomInit(void); void platformLoggingSetFileName(const char *aName); /** - * This function initializes the platform logging service. + * Initializes the platform logging service. * * @param[in] aName The log module name to set with syslog. * @@ -202,13 +202,13 @@ void platformLoggingSetFileName(const char *aName); void platformLoggingInit(const char *aName); /** - * This function finalizes the platform logging service. + * Finalizes the platform logging service. * */ void platformLoggingDeinit(void); /** - * This function updates the file descriptor sets with file descriptors used by the UART driver. + * Updates the file descriptor sets with file descriptors used by the UART driver. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. @@ -218,19 +218,19 @@ void platformLoggingDeinit(void); void platformUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aErrorFdSet, int *aMaxFd); /** - * This function performs radio driver processing. + * Performs radio driver processing. * */ void platformUartProcess(void); /** - * This function restores the Uart. + * Restores the Uart. * */ void platformUartRestore(void); /** - * This function sends a simulation event. + * Sends a simulation event. * * @param[in] aEvent A pointer to the simulation event to send * @@ -238,7 +238,7 @@ void platformUartRestore(void); void otSimSendEvent(const struct Event *aEvent); /** - * This function sends Uart data through simulation. + * Sends Uart data through simulation. * * @param[in] aData A pointer to the UART data. * @param[in] aLength Length of UART data. @@ -247,7 +247,7 @@ void otSimSendEvent(const struct Event *aEvent); void otSimSendUartWriteEvent(const uint8_t *aData, uint16_t aLength); /** - * This function checks if radio transmitting is pending. + * Checks if radio transmitting is pending. * * @returns Whether radio transmitting is pending. * @@ -255,7 +255,7 @@ void otSimSendUartWriteEvent(const uint8_t *aData, uint16_t aLength); bool platformRadioIsTransmitPending(void); /** - * This function parses an environment variable as an unsigned 16-bit integer. + * Parses an environment variable as an unsigned 16-bit integer. * * If the environment variable does not exist, this function does nothing. * If it is not a valid integer, this function will terminate the process with an error message. @@ -269,7 +269,7 @@ void parseFromEnvAsUint16(const char *aEnvName, uint16_t *aValue); #if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This function initializes the TREL service. + * Initializes the TREL service. * * @param[in] aSpeedUpFactor The time speed-up factor. * @@ -277,13 +277,13 @@ void parseFromEnvAsUint16(const char *aEnvName, uint16_t *aValue); void platformTrelInit(uint32_t aSpeedUpFactor); /** - * This function shuts down the TREL service. + * Shuts down the TREL service. * */ void platformTrelDeinit(void); /** - * This function updates the file descriptor sets with file descriptors used by the TREL. + * Updates the file descriptor sets with file descriptors used by the TREL. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. @@ -294,7 +294,7 @@ void platformTrelDeinit(void); void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd); /** - * This function performs TREL processing. + * Performs TREL processing. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aReadFdSet A pointer to the read file descriptors. diff --git a/examples/platforms/simulation/system.c b/examples/platforms/simulation/system.c index 0e86aaae4..535cb1cac 100644 --- a/examples/platforms/simulation/system.c +++ b/examples/platforms/simulation/system.c @@ -64,7 +64,7 @@ static void handleSignal(int aSignal) } /** - * This enumeration defines the argument return values. + * Defines the argument return values. * */ enum diff --git a/examples/platforms/utils/code_utils.h b/examples/platforms/utils/code_utils.h index 90c4827e0..d9ed6a2ee 100644 --- a/examples/platforms/utils/code_utils.h +++ b/examples/platforms/utils/code_utils.h @@ -72,7 +72,7 @@ } while (0) /** - * This macro calculates the number of elements in an array. + * Calculates the number of elements in an array. * * @param[in] aArray Name of the array variable. * diff --git a/examples/platforms/utils/link_metrics.cpp b/examples/platforms/utils/link_metrics.cpp index 333313b76..301fc08c5 100644 --- a/examples/platforms/utils/link_metrics.cpp +++ b/examples/platforms/utils/link_metrics.cpp @@ -71,7 +71,7 @@ public: } /** - * This method gets Link Metrics data stored in this object. + * Gets Link Metrics data stored in this object. * * TODO: Currently the order of Link Metircs data is fixed. Will update it to follow the order specified in TLV. * @@ -114,7 +114,7 @@ public: } /** - * This method gets the length of Link Metrics Data. + * Gets the length of Link Metrics Data. * * @returns The number of bytes for the data. * @@ -126,7 +126,7 @@ public: } /** - * This method gets the metrics configured for the Enhanced-ACK Based Probing. + * Gets the metrics configured for the Enhanced-ACK Based Probing. * * @returns The metrics configured. * diff --git a/examples/platforms/utils/link_metrics.h b/examples/platforms/utils/link_metrics.h index 9eee11487..1cde18b9f 100644 --- a/examples/platforms/utils/link_metrics.h +++ b/examples/platforms/utils/link_metrics.h @@ -48,7 +48,7 @@ extern "C" { #endif /** - * This method initializes the Link Metrics util module. + * Initializes the Link Metrics util module. * * @param[in] aNoiseFloor The noise floor used by Link Metrics. It should be set to the platform's * noise floor (measured noise floor, receiver sensitivity or a constant). @@ -57,9 +57,9 @@ extern "C" { void otLinkMetricsInit(int8_t aNoiseFloor); /** - * This method sets/clears Enhanced-ACK Based Probing for a specific Initiator. + * Sets/clears Enhanced-ACK Based Probing for a specific Initiator. * - * This method can start/stop Enhanced-ACK Based Probing for a neighbor that has the address @p aShortAddress and + * Can start/stop Enhanced-ACK Based Probing for a neighbor that has the address @p aShortAddress and * @p aExtAddress. Once the Probing is started, the device would record the Link Metrics data of link layer frames * sent from that neighbor and include the data into header IE in Enhanced-ACK sent to that neighbor. * @@ -79,10 +79,10 @@ otError otLinkMetricsConfigureEnhAckProbing(otShortAddress aShortAddress, otLinkMetrics aLinkMetrics); /** - * This method generates the Link Metrics data (assessed for the acknowledged frame) bytes that would be included in + * Generates the Link Metrics data (assessed for the acknowledged frame) bytes that would be included in * Vendor-Specific IE. * - * This method first checks what Link Metrics are specified by the Initiator indicated by @p aMacAddress. And then + * First checks what Link Metrics are specified by the Initiator indicated by @p aMacAddress. And then * write the values to @p aData. * * @param[in] aMacAddress The Mac address of the Initiator. @@ -98,7 +98,7 @@ otError otLinkMetricsConfigureEnhAckProbing(otShortAddress aShortAddress, uint8_t otLinkMetricsEnhAckGenData(const otMacAddress *aMacAddress, uint8_t aLqi, int8_t aRssi, uint8_t *aData); /** - * This method returns the data length of Enhanced-ACK Based Probing for a specific Initiator. + * Returns the data length of Enhanced-ACK Based Probing for a specific Initiator. * * @param[in] aMacAddress The Mac address of the Initiator. * diff --git a/examples/platforms/utils/logging_rtt.h b/examples/platforms/utils/logging_rtt.h index 19f6babc7..ea8b380ec 100644 --- a/examples/platforms/utils/logging_rtt.h +++ b/examples/platforms/utils/logging_rtt.h @@ -124,7 +124,7 @@ void utilsLogRttInit(void); void utilsLogRttDeinit(void); /** - * This function outputs logs to SEGGER RTT. + * Outputs logs to SEGGER RTT. * * @param[in] aLogLevel The log level. * @param[in] aLogRegion The log region. diff --git a/examples/platforms/utils/mac_frame.h b/examples/platforms/utils/mac_frame.h index 1853ed1a1..5fba6ecea 100644 --- a/examples/platforms/utils/mac_frame.h +++ b/examples/platforms/utils/mac_frame.h @@ -43,7 +43,7 @@ extern "C" { #endif /** - * This enumeration specifies the IEEE 802.15.4 Address type. + * Specifies the IEEE 802.15.4 Address type. * */ typedef enum @@ -54,7 +54,7 @@ typedef enum } otMacAddressType; /** - * This structure represents an IEEE 802.15.4 short or extended Address. + * Represents an IEEE 802.15.4 short or extended Address. * */ typedef struct otMacAddress @@ -176,7 +176,7 @@ otError otMacFrameGetDstAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddre uint8_t otMacFrameGetSequence(const otRadioFrame *aFrame); /** - * This function performs AES CCM on the frame which is going to be sent. + * Performs AES CCM on the frame which is going to be sent. * * @param[in] aFrame A pointer to the MAC frame buffer that is going to be sent. * @param[in] aExtAddress A pointer to the extended address, which will be used to generate nonce diff --git a/include/openthread/backbone_router.h b/include/openthread/backbone_router.h index 23cb4d426..a057dc4ed 100644 --- a/include/openthread/backbone_router.h +++ b/include/openthread/backbone_router.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This structure represents Backbone Router configuration. + * Represents Backbone Router configuration. * */ typedef struct otBackboneRouterConfig @@ -64,7 +64,7 @@ typedef struct otBackboneRouterConfig } otBackboneRouterConfig; /** - * This function gets the Primary Backbone Router information in the Thread Network. + * Gets the Primary Backbone Router information in the Thread Network. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aConfig A pointer to where to put Primary Backbone Router information. diff --git a/include/openthread/backbone_router_ftd.h b/include/openthread/backbone_router_ftd.h index d4041d68a..88cfe0a38 100644 --- a/include/openthread/backbone_router_ftd.h +++ b/include/openthread/backbone_router_ftd.h @@ -161,7 +161,7 @@ otError otBackboneRouterSetConfig(otInstance *aInstance, const otBackboneRouterC otError otBackboneRouterRegister(otInstance *aInstance); /** - * This method returns the Backbone Router registration jitter value. + * Returns the Backbone Router registration jitter value. * * @returns The Backbone Router registration jitter value. * @@ -171,7 +171,7 @@ otError otBackboneRouterRegister(otInstance *aInstance); uint8_t otBackboneRouterGetRegistrationJitter(otInstance *aInstance); /** - * This method sets the Backbone Router registration jitter value. + * Sets the Backbone Router registration jitter value. * * @param[in] aJitter the Backbone Router registration jitter value to set. * @@ -181,7 +181,7 @@ uint8_t otBackboneRouterGetRegistrationJitter(otInstance *aInstance); void otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitter); /** - * This method gets the local Domain Prefix configuration. + * Gets the local Domain Prefix configuration. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aConfig A pointer to the Domain Prefix configuration. @@ -193,7 +193,7 @@ void otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitte otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterConfig *aConfig); /** - * This method configures response status for next DUA registration. + * Configures response status for next DUA registration. * * Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * Only used for test and certification. @@ -235,7 +235,7 @@ typedef enum } otBackboneRouterMulticastListenerEvent; /** - * This function pointer is called whenever the Multicast Listeners change. + * Pointer is called whenever the Multicast Listeners change. * * @param[in] aContext The user context pointer. * @param[in] aEvent The Multicast Listener event. @@ -247,7 +247,7 @@ typedef void (*otBackboneRouterMulticastListenerCallback)(void const otIp6Address *aAddress); /** - * This method sets the Backbone Router Multicast Listener callback. + * Sets the Backbone Router Multicast Listener callback. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to the Multicast Listener callback. @@ -302,7 +302,7 @@ otError otBackboneRouterMulticastListenerAdd(otInstance *aInstance, const otIp6A typedef uint16_t otBackboneRouterMulticastListenerIterator; ///< Used to iterate through Multicast Listeners. /** - * This structure represents a Backbone Router Multicast Listener info. + * Represents a Backbone Router Multicast Listener info. * */ typedef struct otBackboneRouterMulticastListenerInfo @@ -312,7 +312,7 @@ typedef struct otBackboneRouterMulticastListenerInfo } otBackboneRouterMulticastListenerInfo; /** - * This function gets the next Multicast Listener info (using an iterator). + * Gets the next Multicast Listener info (using an iterator). * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in,out] aIterator A pointer to the iterator. On success the iterator will be updated to point to next @@ -346,7 +346,7 @@ typedef enum } otBackboneRouterNdProxyEvent; /** - * This function pointer is called whenever the Nd Proxy changed. + * Pointer is called whenever the Nd Proxy changed. * * @param[in] aContext The user context pointer. * @param[in] aEvent The ND Proxy event. @@ -359,7 +359,7 @@ typedef void (*otBackboneRouterNdProxyCallback)(void *aCo const otIp6Address *aDua); /** - * This method sets the Backbone Router ND Proxy callback. + * Sets the Backbone Router ND Proxy callback. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to the ND Proxy callback. @@ -382,7 +382,7 @@ typedef struct otBackboneRouterNdProxyInfo } otBackboneRouterNdProxyInfo; /** - * This method gets the Backbone Router ND Proxy info. + * Gets the Backbone Router ND Proxy info. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aDua The Domain Unicast Address. @@ -408,7 +408,7 @@ typedef enum } otBackboneRouterDomainPrefixEvent; /** - * This function pointer is called whenever the Domain Prefix changed. + * Pointer is called whenever the Domain Prefix changed. * * @param[in] aContext The user context pointer. * @param[in] aEvent The Domain Prefix event. @@ -419,7 +419,7 @@ typedef void (*otBackboneRouterDomainPrefixCallback)(void otBackboneRouterDomainPrefixEvent aEvent, const otIp6Prefix *aDomainPrefix); /** - * This method sets the Backbone Router Domain Prefix callback. + * Sets the Backbone Router Domain Prefix callback. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to the Domain Prefix callback. diff --git a/include/openthread/border_agent.h b/include/openthread/border_agent.h index cfbcb5646..4ffbc9c6c 100644 --- a/include/openthread/border_agent.h +++ b/include/openthread/border_agent.h @@ -60,7 +60,7 @@ extern "C" { /** * @struct otBorderAgentId * - * This structure represents a Border Agent ID. + * Represents a Border Agent ID. * */ OT_TOOL_PACKED_BEGIN @@ -70,7 +70,7 @@ struct otBorderAgentId } OT_TOOL_PACKED_END; /** - * This enumeration defines the Border Agent state. + * Defines the Border Agent state. * */ typedef enum otBorderAgentState diff --git a/include/openthread/border_router.h b/include/openthread/border_router.h index a945f91fb..c26fc6bf7 100644 --- a/include/openthread/border_router.h +++ b/include/openthread/border_router.h @@ -54,7 +54,7 @@ extern "C" { */ /** - * This method provides a full or stable copy of the local Thread Network Data. + * Provides a full or stable copy of the local 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. @@ -94,7 +94,7 @@ otError otBorderRouterAddOnMeshPrefix(otInstance *aInstance, const otBorderRoute otError otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix); /** - * This function gets the next On Mesh Prefix in the local Network Data. + * Gets the next On Mesh Prefix in the local Network Data. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in,out] aIterator A pointer to the Network Data iterator context. To get the first on-mesh entry @@ -139,7 +139,7 @@ otError otBorderRouterAddRoute(otInstance *aInstance, const otExternalRouteConfi otError otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPrefix); /** - * This function gets the next external route in the local Network Data. + * Gets the next external route in the local Network Data. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in,out] aIterator A pointer to the Network Data iterator context. To get the first external route entry diff --git a/include/openthread/border_routing.h b/include/openthread/border_routing.h index 961554ea5..f6384a8f8 100644 --- a/include/openthread/border_routing.h +++ b/include/openthread/border_routing.h @@ -73,7 +73,7 @@ extern "C" { */ /** - * This structure represents an iterator to iterate through the Border Router's discovered prefix table. + * Represents an iterator to iterate through the Border Router's discovered prefix table. * * The fields in this type are opaque (intended for use by OpenThread core only) and therefore should not be * accessed or used by caller. @@ -89,7 +89,7 @@ typedef struct otBorderRoutingPrefixTableIterator } otBorderRoutingPrefixTableIterator; /** - * This structure represents an entry from the discovered prefix table. + * Represents an entry from the discovered prefix table. * * The entries in the discovered table track the Prefix/Route Info Options in the received Router Advertisement messages * from other routers on infrastructure link. @@ -107,7 +107,7 @@ typedef struct otBorderRoutingPrefixTableEntry } otBorderRoutingPrefixTableEntry; /** - * This enumeration represents the state of Border Routing Manager. + * Represents the state of Border Routing Manager. * */ typedef enum @@ -119,7 +119,7 @@ typedef enum } otBorderRoutingState; /** - * This method initializes the Border Routing Manager on given infrastructure interface. + * Initializes the Border Routing Manager on given infrastructure interface. * * @note This method MUST be called before any other otBorderRouting* APIs. * @@ -163,7 +163,7 @@ otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled); otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance); /** - * This function gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement + * Gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement * messages sent over the infrastructure link. * * The RIO preference is determined as follows: @@ -179,7 +179,7 @@ otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance); otRoutePreference otBorderRoutingGetRouteInfoOptionPreference(otInstance *aInstance); /** - * This function explicitly sets the preference to use when advertising Route Info Options (RIO) in Router + * Explicitly sets the preference to use when advertising Route Info Options (RIO) in Router * Advertisement messages sent over the infrastructure link. * * After a call to this function, BR will use the given preference for all its advertised RIOs. The preference can be @@ -192,7 +192,7 @@ otRoutePreference otBorderRoutingGetRouteInfoOptionPreference(otInstance *aInsta void otBorderRoutingSetRouteInfoOptionPreference(otInstance *aInstance, otRoutePreference aPreference); /** - * This function clears a previously set preference value for advertised Route Info Options. + * Clears a previously set preference value for advertised Route Info Options. * * After a call to this function, BR will use device's role to determine the RIO preference: Medium preference when * in router/leader role and low preference when in child role. @@ -296,7 +296,7 @@ otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance, otRoutePreference *aPreference); /** - * This function initializes an `otBorderRoutingPrefixTableIterator`. + * Initializes an `otBorderRoutingPrefixTableIterator`. * * An iterator MUST be initialized before it is used. * @@ -312,7 +312,7 @@ otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance, void otBorderRoutingPrefixTableInitIterator(otInstance *aInstance, otBorderRoutingPrefixTableIterator *aIterator); /** - * This function iterates over the entries in the Border Router's discovered prefix table. + * Iterates over the entries in the Border Router's discovered prefix table. * * @param[in] aInstance The OpenThread instance. * @param[in,out] aIterator A pointer to the iterator. diff --git a/include/openthread/channel_manager.h b/include/openthread/channel_manager.h index 730745806..6afe3a4aa 100644 --- a/include/openthread/channel_manager.h +++ b/include/openthread/channel_manager.h @@ -69,7 +69,7 @@ extern "C" { void otChannelManagerRequestChannelChange(otInstance *aInstance, uint8_t aChannel); /** - * This function gets the channel from the last successful call to `otChannelManagerRequestChannelChange()` + * Gets the channel from the last successful call to `otChannelManagerRequestChannelChange()` * * @returns The last requested channel or zero if there has been no channel change request yet. * @@ -77,7 +77,7 @@ void otChannelManagerRequestChannelChange(otInstance *aInstance, uint8_t aChanne uint8_t otChannelManagerGetRequestedChannel(otInstance *aInstance); /** - * This function gets the delay (in seconds) used by Channel Manager for a channel change. + * Gets the delay (in seconds) used by Channel Manager for a channel change. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -102,7 +102,7 @@ uint16_t otChannelManagerGetDelay(otInstance *aInstance); otError otChannelManagerSetDelay(otInstance *aInstance, uint16_t aDelay); /** - * This function requests that `ChannelManager` checks and selects a new channel and starts a channel change. + * Requests that `ChannelManager` checks and selects a new channel and starts a channel change. * * Unlike the `otChannelManagerRequestChannelChange()` where the channel must be given as a parameter, this function * asks the `ChannelManager` to select a channel by itself (based on collected channel quality info). @@ -144,7 +144,7 @@ otError otChannelManagerRequestChannelSelect(otInstance *aInstance, bool aSkipQu void otChannelManagerSetAutoChannelSelectionEnabled(otInstance *aInstance, bool aEnabled); /** - * This function indicates whether the auto-channel-selection functionality is enabled or not. + * Indicates whether the auto-channel-selection functionality is enabled or not. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -166,7 +166,7 @@ bool otChannelManagerGetAutoChannelSelectionEnabled(otInstance *aInstance); otError otChannelManagerSetAutoChannelSelectionInterval(otInstance *aInstance, uint32_t aInterval); /** - * This function gets the period interval (in seconds) used by auto-channel-selection functionality. + * Gets the period interval (in seconds) used by auto-channel-selection functionality. * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/channel_monitor.h b/include/openthread/channel_monitor.h index 12fa92af1..d69033ad1 100644 --- a/include/openthread/channel_monitor.h +++ b/include/openthread/channel_monitor.h @@ -82,7 +82,7 @@ extern "C" { otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled); /** - * This function indicates whether the Channel Monitoring operation is enabled and running. + * Indicates whether the Channel Monitoring operation is enabled and running. * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/cli.h b/include/openthread/cli.h index 8d9a5f3c2..07bd92a37 100644 --- a/include/openthread/cli.h +++ b/include/openthread/cli.h @@ -46,7 +46,7 @@ extern "C" { #endif /** - * This structure represents a CLI command. + * Represents a CLI command. * */ typedef struct otCliCommand @@ -68,7 +68,7 @@ typedef struct otCliCommand */ /** - * This function pointer is called to notify about Console output. + * Pointer is called to notify about Console output. * * @param[out] aContext A user context pointer. * @param[in] aFormat The format string. @@ -90,7 +90,7 @@ typedef int (*otCliOutputCallback)(void *aContext, const char *aFormat, va_list void otCliInit(otInstance *aInstance, otCliOutputCallback aCallback, void *aContext); /** - * This method is called to feed in a console input line. + * Is called to feed in a console input line. * * @param[in] aBuf A pointer to a null-terminated string. * diff --git a/include/openthread/coap.h b/include/openthread/coap.h index 30faca6f8..e494c3c6a 100644 --- a/include/openthread/coap.h +++ b/include/openthread/coap.h @@ -151,7 +151,7 @@ typedef enum otCoapOptionType } otCoapOptionType; /** - * This structure represents a CoAP option. + * Represents a CoAP option. * */ typedef struct otCoapOption @@ -161,7 +161,7 @@ typedef struct otCoapOption } otCoapOption; /** - * This structure acts as an iterator for CoAP options + * Acts as an iterator for CoAP options * */ typedef struct otCoapOptionIterator @@ -329,7 +329,7 @@ typedef enum otCoapBlockSzx } otCoapBlockSzx; /** - * This function pointer is called when a CoAP response is received or on the request timeout. + * Pointer is called when a CoAP response is received or on the request timeout. * * @param[in] aContext A pointer to application-specific context. * @param[in] aMessage A pointer to the message buffer containing the response. NULL if no response was received. @@ -347,7 +347,7 @@ typedef void (*otCoapResponseHandler)(void *aContext, otError aResult); /** - * This function pointer is called when a CoAP request with a given Uri-Path is received. + * Pointer is called when a CoAP request with a given Uri-Path is received. * * @param[in] aContext A pointer to arbitrary context information. * @param[in] aMessage A pointer to the message. @@ -357,9 +357,9 @@ typedef void (*otCoapResponseHandler)(void *aContext, typedef void (*otCoapRequestHandler)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo); /** - * This function pointer is called when a CoAP message with an block-wise transfer option is received. + * Pointer is called when a CoAP message with an block-wise transfer option is received. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * @param[in] aContext A pointer to application-specific context. @@ -383,9 +383,9 @@ typedef otError (*otCoapBlockwiseReceiveHook)(void *aContext, uint32_t aTotalLength); /** - * This function pointer is called before the next block in a block-wise transfer is sent. + * Pointer is called before the next block in a block-wise transfer is sent. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * @param[in] aContext A pointer to application-specific context. @@ -409,7 +409,7 @@ typedef otError (*otCoapBlockwiseTransmitHook)(void *aContext, bool *aMore); /** - * This structure represents a CoAP resource. + * Represents a CoAP resource. * */ typedef struct otCoapResource @@ -421,7 +421,7 @@ typedef struct otCoapResource } otCoapResource; /** - * This structure represents a CoAP resource with block-wise transfer. + * Represents a CoAP resource with block-wise transfer. * */ typedef struct otCoapBlockwiseResource @@ -445,7 +445,7 @@ typedef struct otCoapBlockwiseResource } otCoapBlockwiseResource; /** - * This structure represents the CoAP transmission parameters. + * Represents the CoAP transmission parameters. * * @note mAckTimeout * ((2 ** (mMaxRetransmit + 1)) - 1) * (mAckRandomFactorNumerator / mAckRandomFactorDenominator) * must not exceed what can be represented by a uint32_t (0xffffffff). This limitation allows OpenThread to @@ -483,7 +483,7 @@ typedef struct otCoapTxParameters } otCoapTxParameters; /** - * This function initializes the CoAP header. + * Initializes the CoAP header. * * @param[in,out] aMessage A pointer to the CoAP message to initialize. * @param[in] aType CoAP message type. @@ -493,7 +493,7 @@ typedef struct otCoapTxParameters void otCoapMessageInit(otMessage *aMessage, otCoapType aType, otCoapCode aCode); /** - * This function initializes a response message. + * Initializes a response message. * * @note Both message ID and token are set according to @p aRequest. * @@ -509,7 +509,7 @@ void otCoapMessageInit(otMessage *aMessage, otCoapType aType, otCoapCode aCode); otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aRequest, otCoapType aType, otCoapCode aCode); /** - * This function sets the Token value and length in a header. + * Sets the Token value and length in a header. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aToken A pointer to the Token value. @@ -522,7 +522,7 @@ otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aReques otError otCoapMessageSetToken(otMessage *aMessage, const uint8_t *aToken, uint8_t aTokenLength); /** - * This function sets the Token length and randomizes its value. + * Sets the Token length and randomizes its value. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aTokenLength The Length of a Token to set. @@ -531,7 +531,7 @@ otError otCoapMessageSetToken(otMessage *aMessage, const uint8_t *aToken, uint8_ void otCoapMessageGenerateToken(otMessage *aMessage, uint8_t aTokenLength); /** - * This function appends the Content Format CoAP option as specified in + * Appends the Content Format CoAP option as specified in * https://tools.ietf.org/html/rfc7252#page-92. This *must* be called before * setting otCoapMessageSetPayloadMarker if a payload is to be included in the * message. @@ -552,7 +552,7 @@ void otCoapMessageGenerateToken(otMessage *aMessage, uint8_t aTokenLength); otError otCoapMessageAppendContentFormatOption(otMessage *aMessage, otCoapOptionContentFormat aContentFormat); /** - * This function appends a CoAP option in a header. + * Appends a CoAP option in a header. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aNumber The CoAP Option number. @@ -567,7 +567,7 @@ otError otCoapMessageAppendContentFormatOption(otMessage *aMessage, otCoapOption otError otCoapMessageAppendOption(otMessage *aMessage, uint16_t aNumber, uint16_t aLength, const void *aValue); /** - * This function appends an unsigned integer CoAP option as specified in + * Appends an unsigned integer CoAP option as specified in * https://tools.ietf.org/html/rfc7252#section-3.2 * * @param[in,out] aMessage A pointer to the CoAP message. @@ -583,7 +583,7 @@ otError otCoapMessageAppendOption(otMessage *aMessage, uint16_t aNumber, uint16_ otError otCoapMessageAppendUintOption(otMessage *aMessage, uint16_t aNumber, uint32_t aValue); /** - * This function appends an Observe option. + * Appends an Observe option. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aObserve Observe field value. @@ -596,7 +596,7 @@ otError otCoapMessageAppendUintOption(otMessage *aMessage, uint16_t aNumber, uin otError otCoapMessageAppendObserveOption(otMessage *aMessage, uint32_t aObserve); /** - * This function appends a Uri-Path option. + * Appends a Uri-Path option. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aUriPath A pointer to a NULL-terminated string. @@ -609,7 +609,7 @@ otError otCoapMessageAppendObserveOption(otMessage *aMessage, uint32_t aObserve) otError otCoapMessageAppendUriPathOptions(otMessage *aMessage, const char *aUriPath); /** - * This function converts a CoAP Block option SZX field to the actual block size + * Converts a CoAP Block option SZX field to the actual block size * * @param[in] aSize Block size exponent. * @@ -619,7 +619,7 @@ otError otCoapMessageAppendUriPathOptions(otMessage *aMessage, const char *aUriP uint16_t otCoapBlockSizeFromExponent(otCoapBlockSzx aSize); /** - * This function appends a Block2 option + * Appends a Block2 option * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aNum Current block number. @@ -634,7 +634,7 @@ uint16_t otCoapBlockSizeFromExponent(otCoapBlockSzx aSize); otError otCoapMessageAppendBlock2Option(otMessage *aMessage, uint32_t aNum, bool aMore, otCoapBlockSzx aSize); /** - * This function appends a Block1 option + * Appends a Block1 option * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aNum Current block number. @@ -649,7 +649,7 @@ otError otCoapMessageAppendBlock2Option(otMessage *aMessage, uint32_t aNum, bool otError otCoapMessageAppendBlock1Option(otMessage *aMessage, uint32_t aNum, bool aMore, otCoapBlockSzx aSize); /** - * This function appends a Proxy-Uri option. + * Appends a Proxy-Uri option. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aUriPath A pointer to a NULL-terminated string. @@ -662,7 +662,7 @@ otError otCoapMessageAppendBlock1Option(otMessage *aMessage, uint32_t aNum, bool otError otCoapMessageAppendProxyUriOption(otMessage *aMessage, const char *aUriPath); /** - * This function appends a Max-Age option. + * Appends a Max-Age option. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aMaxAge The Max-Age value. @@ -675,7 +675,7 @@ otError otCoapMessageAppendProxyUriOption(otMessage *aMessage, const char *aUriP otError otCoapMessageAppendMaxAgeOption(otMessage *aMessage, uint32_t aMaxAge); /** - * This function appends a single Uri-Query option. + * Appends a single Uri-Query option. * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aUriQuery A pointer to NULL-terminated string, which should contain a single key=value pair. @@ -687,7 +687,7 @@ otError otCoapMessageAppendMaxAgeOption(otMessage *aMessage, uint32_t aMaxAge); otError otCoapMessageAppendUriQueryOption(otMessage *aMessage, const char *aUriQuery); /** - * This function adds Payload Marker indicating beginning of the payload to the CoAP header. + * Adds Payload Marker indicating beginning of the payload to the CoAP header. * * @param[in,out] aMessage A pointer to the CoAP message. * @@ -698,7 +698,7 @@ otError otCoapMessageAppendUriQueryOption(otMessage *aMessage, const char *aUriQ otError otCoapMessageSetPayloadMarker(otMessage *aMessage); /** - * This function returns the Type value. + * Returns the Type value. * * @param[in] aMessage A pointer to the CoAP message. * @@ -708,7 +708,7 @@ otError otCoapMessageSetPayloadMarker(otMessage *aMessage); otCoapType otCoapMessageGetType(const otMessage *aMessage); /** - * This function returns the Code value. + * Returns the Code value. * * @param[in] aMessage A pointer to the CoAP message. * @@ -718,7 +718,7 @@ otCoapType otCoapMessageGetType(const otMessage *aMessage); otCoapCode otCoapMessageGetCode(const otMessage *aMessage); /** - * This function sets the Code value. + * Sets the Code value. * * @param[in,out] aMessage A pointer to the CoAP message to initialize. * @param[in] aCode CoAP message code. @@ -727,7 +727,7 @@ otCoapCode otCoapMessageGetCode(const otMessage *aMessage); void otCoapMessageSetCode(otMessage *aMessage, otCoapCode aCode); /** - * This method returns the CoAP Code as human readable string. + * Returns the CoAP Code as human readable string. * * @param[in] aMessage A pointer to the CoAP message. * @@ -737,7 +737,7 @@ void otCoapMessageSetCode(otMessage *aMessage, otCoapCode aCode); const char *otCoapMessageCodeToString(const otMessage *aMessage); /** - * This function returns the Message ID value. + * Returns the Message ID value. * * @param[in] aMessage A pointer to the CoAP message. * @@ -747,7 +747,7 @@ const char *otCoapMessageCodeToString(const otMessage *aMessage); uint16_t otCoapMessageGetMessageId(const otMessage *aMessage); /** - * This function returns the Token length. + * Returns the Token length. * * @param[in] aMessage A pointer to the CoAP message. * @@ -757,7 +757,7 @@ uint16_t otCoapMessageGetMessageId(const otMessage *aMessage); uint8_t otCoapMessageGetTokenLength(const otMessage *aMessage); /** - * This function returns a pointer to the Token value. + * Returns a pointer to the Token value. * * @param[in] aMessage A pointer to the CoAP message. * @@ -767,7 +767,7 @@ uint8_t otCoapMessageGetTokenLength(const otMessage *aMessage); const uint8_t *otCoapMessageGetToken(const otMessage *aMessage); /** - * This function initialises an iterator for the options in the given message. + * Initialises an iterator for the options in the given message. * * @param[in,out] aIterator A pointer to the CoAP message option iterator. * @param[in] aMessage A pointer to the CoAP message. @@ -779,7 +779,7 @@ const uint8_t *otCoapMessageGetToken(const otMessage *aMessage); otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessage *aMessage); /** - * This function returns a pointer to the first option matching the specified option number. + * Returns a pointer to the first option matching the specified option number. * * @param[in] aIterator A pointer to the CoAP message option iterator. * @param[in] aOption The option number sought. @@ -790,7 +790,7 @@ otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessag const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption); /** - * This function returns a pointer to the first option. + * Returns a pointer to the first option. * * @param[in,out] aIterator A pointer to the CoAP message option iterator. * @@ -800,7 +800,7 @@ const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionItera const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIterator); /** - * This function returns a pointer to the next option matching the specified option number. + * Returns a pointer to the next option matching the specified option number. * * @param[in] aIterator A pointer to the CoAP message option iterator. * @param[in] aOption The option number sought. @@ -811,7 +811,7 @@ const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIt const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption); /** - * This function returns a pointer to the next option. + * Returns a pointer to the next option. * * @param[in,out] aIterator A pointer to the CoAP message option iterator. * @@ -821,7 +821,7 @@ const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterat const otCoapOption *otCoapOptionIteratorGetNextOption(otCoapOptionIterator *aIterator); /** - * This function fills current option value into @p aValue assuming the current value is an unsigned integer encoded + * Fills current option value into @p aValue assuming the current value is an unsigned integer encoded * according to https://tools.ietf.org/html/rfc7252#section-3.2 * * @param[in,out] aIterator A pointer to the CoAP message option iterator. @@ -836,7 +836,7 @@ const otCoapOption *otCoapOptionIteratorGetNextOption(otCoapOptionIterator *aIte otError otCoapOptionIteratorGetOptionUintValue(otCoapOptionIterator *aIterator, uint64_t *aValue); /** - * This function fills current option value into @p aValue. + * Fills current option value into @p aValue. * * @param[in,out] aIterator A pointer to the CoAP message option iterator. * @param[out] aValue A pointer to a buffer to receive the option value. @@ -848,7 +848,7 @@ otError otCoapOptionIteratorGetOptionUintValue(otCoapOptionIterator *aIterator, otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void *aValue); /** - * This function creates a new CoAP message. + * Creates a new CoAP message. * * @note If @p aSettings is 'NULL', the link layer security is enabled and the message priority is set to * OT_MESSAGE_PRIORITY_NORMAL by default. @@ -862,7 +862,7 @@ otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void otMessage *otCoapNewMessage(otInstance *aInstance, const otMessageSettings *aSettings); /** - * This function sends a CoAP request with custom transmission parameters. + * Sends a CoAP request with custom transmission parameters. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be NULL pointers. @@ -891,9 +891,9 @@ otError otCoapSendRequestWithParameters(otInstance *aInstance, const otCoapTxParameters *aTxParameters); /** - * This function sends a CoAP request block-wise with custom transmission parameters. + * Sends a CoAP request block-wise with custom transmission parameters. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * If a response for a request is expected, respective function and context information should be provided. @@ -923,9 +923,9 @@ otError otCoapSendRequestBlockWiseWithParameters(otInstance *aIn otCoapBlockwiseReceiveHook aReceiveHook); /** - * This function sends a CoAP request block-wise. + * Sends a CoAP request block-wise. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * If a response for a request is expected, respective function and context information should be provided. @@ -958,7 +958,7 @@ static inline otError otCoapSendRequestBlockWise(otInstance *aIn } /** - * This function sends a CoAP request. + * Sends a CoAP request. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be NULL pointers. @@ -984,7 +984,7 @@ static inline otError otCoapSendRequest(otInstance *aInstance, } /** - * This function starts the CoAP server. + * Starts the CoAP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPort The local UDP port to bind to. @@ -996,7 +996,7 @@ static inline otError otCoapSendRequest(otInstance *aInstance, otError otCoapStart(otInstance *aInstance, uint16_t aPort); /** - * This function stops the CoAP server. + * Stops the CoAP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -1006,7 +1006,7 @@ otError otCoapStart(otInstance *aInstance, uint16_t aPort); otError otCoapStop(otInstance *aInstance); /** - * This function adds a resource to the CoAP server. + * Adds a resource to the CoAP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -1015,7 +1015,7 @@ otError otCoapStop(otInstance *aInstance); void otCoapAddResource(otInstance *aInstance, otCoapResource *aResource); /** - * This function removes a resource from the CoAP server. + * Removes a resource from the CoAP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -1024,7 +1024,7 @@ void otCoapAddResource(otInstance *aInstance, otCoapResource *aResource); void otCoapRemoveResource(otInstance *aInstance, otCoapResource *aResource); /** - * This function adds a block-wise resource to the CoAP server. + * Adds a block-wise resource to the CoAP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -1033,7 +1033,7 @@ void otCoapRemoveResource(otInstance *aInstance, otCoapResource *aResource); void otCoapAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); /** - * This function removes a block-wise resource from the CoAP server. + * Removes a block-wise resource from the CoAP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -1042,7 +1042,7 @@ void otCoapAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource * void otCoapRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); /** - * This function sets the default handler for unhandled CoAP requests. + * Sets the default handler for unhandled CoAP requests. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aHandler A function pointer that shall be called when an unhandled request arrives. @@ -1052,7 +1052,7 @@ void otCoapRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResourc void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandler, void *aContext); /** - * This function sends a CoAP response from the server with custom transmission parameters. + * Sends a CoAP response from the server with custom transmission parameters. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMessage A pointer to the CoAP response to send. @@ -1069,9 +1069,9 @@ otError otCoapSendResponseWithParameters(otInstance *aInstance, const otCoapTxParameters *aTxParameters); /** - * This function sends a CoAP response block-wise from the server with custom transmission parameters. + * Sends a CoAP response block-wise from the server with custom transmission parameters. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -1093,9 +1093,9 @@ otError otCoapSendResponseBlockWiseWithParameters(otInstance *aI otCoapBlockwiseTransmitHook aTransmitHook); /** - * This function sends a CoAP response block-wise from the server. + * Sends a CoAP response block-wise from the server. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -1119,7 +1119,7 @@ static inline otError otCoapSendResponseBlockWise(otInstance *aI } /** - * This function sends a CoAP response from the server. + * Sends a CoAP response from the server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMessage A pointer to the CoAP response to send. diff --git a/include/openthread/coap_secure.h b/include/openthread/coap_secure.h index 6f424096a..6a96ea3d7 100644 --- a/include/openthread/coap_secure.h +++ b/include/openthread/coap_secure.h @@ -68,7 +68,7 @@ extern "C" { #define OT_DEFAULT_COAP_SECURE_PORT 5684 ///< Default CoAP Secure port, as specified in RFC 7252 /** - * This function pointer is called when the DTLS connection state changes. + * Pointer is called when the DTLS connection state changes. * * @param[in] aConnected true, if a connection was established, false otherwise. * @param[in] aContext A pointer to arbitrary context information. @@ -77,7 +77,7 @@ extern "C" { typedef void (*otHandleCoapSecureClientConnect)(bool aConnected, void *aContext); /** - * This function starts the CoAP Secure service. + * Starts the CoAP Secure service. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPort The local UDP port to bind to. @@ -88,7 +88,7 @@ typedef void (*otHandleCoapSecureClientConnect)(bool aConnected, void *aContext) otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort); /** - * This function stops the CoAP Secure server. + * Stops the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -96,7 +96,7 @@ otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort); void otCoapSecureStop(otInstance *aInstance); /** - * This method sets the Pre-Shared Key (PSK) and cipher suite + * Sets the Pre-Shared Key (PSK) and cipher suite * DTLS_PSK_WITH_AES_128_CCM_8. * * @note This function requires the build-time feature `MBEDTLS_KEY_EXCHANGE_PSK_ENABLED` to be enabled. @@ -115,7 +115,7 @@ void otCoapSecureSetPsk(otInstance *aInstance, uint16_t aPskIdLength); /** - * This method returns the peer x509 certificate base64 encoded. + * Returns the peer x509 certificate base64 encoded. * * @note This function requires the build-time features `MBEDTLS_BASE64_C` and * `MBEDTLS_SSL_KEEP_PEER_CERTIFICATE` to be enabled. @@ -136,7 +136,7 @@ otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance, size_t aCertBufferSize); /** - * This method sets the authentication mode for the coap secure connection. + * Sets the authentication mode for the coap secure connection. * * Disable or enable the verification of peer certificate. * Must be called before start. @@ -148,7 +148,7 @@ otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance, void otCoapSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertificate); /** - * This method sets the local device's X509 certificate with corresponding private key for + * Sets the local device's X509 certificate with corresponding private key for * DTLS session with DTLS_ECDHE_ECDSA_WITH_AES_128_CCM_8. * * @note This function requires `MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED=1`. @@ -167,7 +167,7 @@ void otCoapSecureSetCertificate(otInstance *aInstance, uint32_t aPrivateKeyLength); /** - * This method sets the trusted top level CAs. It is needed for validating the + * Sets the trusted top level CAs. It is needed for validating the * certificate of the peer. * * DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS. @@ -184,7 +184,7 @@ void otCoapSecureSetCaCertificateChain(otInstance *aInstance, uint32_t aX509CaCertChainLength); /** - * This method initializes DTLS session with a peer. + * Initializes DTLS session with a peer. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aSockAddr A pointer to the remote socket address. @@ -201,7 +201,7 @@ otError otCoapSecureConnect(otInstance *aInstance, void *aContext); /** - * This method stops the DTLS connection. + * Stops the DTLS connection. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -209,7 +209,7 @@ otError otCoapSecureConnect(otInstance *aInstance, void otCoapSecureDisconnect(otInstance *aInstance); /** - * This method indicates whether or not the DTLS session is connected. + * Indicates whether or not the DTLS session is connected. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -220,7 +220,7 @@ void otCoapSecureDisconnect(otInstance *aInstance); bool otCoapSecureIsConnected(otInstance *aInstance); /** - * This method indicates whether or not the DTLS session is active. + * Indicates whether or not the DTLS session is active. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -231,9 +231,9 @@ bool otCoapSecureIsConnected(otInstance *aInstance); bool otCoapSecureIsConnectionActive(otInstance *aInstance); /** - * This method sends a CoAP request block-wise over secure DTLS connection. + * Sends a CoAP request block-wise over secure DTLS connection. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * If a response for a request is expected, respective function and context information should be provided. @@ -260,7 +260,7 @@ otError otCoapSecureSendRequestBlockWise(otInstance *aInstance, otCoapBlockwiseReceiveHook aReceiveHook); /** - * This method sends a CoAP request over secure DTLS connection. + * Sends a CoAP request over secure DTLS connection. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be NULL pointers. @@ -282,7 +282,7 @@ otError otCoapSecureSendRequest(otInstance *aInstance, void *aContext); /** - * This function adds a resource to the CoAP Secure server. + * Adds a resource to the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -291,7 +291,7 @@ otError otCoapSecureSendRequest(otInstance *aInstance, void otCoapSecureAddResource(otInstance *aInstance, otCoapResource *aResource); /** - * This function removes a resource from the CoAP Secure server. + * Removes a resource from the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -300,7 +300,7 @@ void otCoapSecureAddResource(otInstance *aInstance, otCoapResource *aResource); void otCoapSecureRemoveResource(otInstance *aInstance, otCoapResource *aResource); /** - * This function adds a block-wise resource to the CoAP Secure server. + * Adds a block-wise resource to the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -309,7 +309,7 @@ void otCoapSecureRemoveResource(otInstance *aInstance, otCoapResource *aResource void otCoapSecureAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); /** - * This function removes a block-wise resource from the CoAP Secure server. + * Removes a block-wise resource from the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. @@ -318,7 +318,7 @@ void otCoapSecureAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseReso void otCoapSecureRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); /** - * This function sets the default handler for unhandled CoAP Secure requests. + * Sets the default handler for unhandled CoAP Secure requests. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aHandler A function pointer that shall be called when an unhandled request arrives. @@ -328,7 +328,7 @@ void otCoapSecureRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseR void otCoapSecureSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandler, void *aContext); /** - * This method sets the connected callback to indicate, when + * Sets the connected callback to indicate, when * a Client connect to the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -341,9 +341,9 @@ void otCoapSecureSetClientConnectedCallback(otInstance *aIns void *aContext); /** - * This function sends a CoAP response block-wise from the CoAP Secure server. + * Sends a CoAP response block-wise from the CoAP Secure server. * - * This function is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration + * Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration * is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -363,7 +363,7 @@ otError otCoapSecureSendResponseBlockWise(otInstance *aInstance, otCoapBlockwiseTransmitHook aTransmitHook); /** - * This function sends a CoAP response from the CoAP Secure server. + * Sends a CoAP response from the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMessage A pointer to the CoAP response to send. diff --git a/include/openthread/commissioner.h b/include/openthread/commissioner.h index 9bf09b814..9f714b389 100644 --- a/include/openthread/commissioner.h +++ b/include/openthread/commissioner.h @@ -56,7 +56,7 @@ extern "C" { */ /** - * This enumeration defines the Commissioner State. + * Defines the Commissioner State. * */ typedef enum otCommissionerState @@ -67,7 +67,7 @@ typedef enum otCommissionerState } otCommissionerState; /** - * This enumeration defines a Joiner Event on the Commissioner. + * Defines a Joiner Event on the Commissioner. * */ typedef enum otCommissionerJoinerEvent @@ -87,7 +87,7 @@ typedef enum otCommissionerJoinerEvent #define OT_STEERING_DATA_MAX_LENGTH 16 ///< Max steering data length (bytes) /** - * This structure represents the steering data. + * Represents the steering data. * */ typedef struct otSteeringData @@ -97,7 +97,7 @@ typedef struct otSteeringData } otSteeringData; /** - * This structure represents a Commissioning Dataset. + * Represents a Commissioning Dataset. * */ typedef struct otCommissioningDataset @@ -116,7 +116,7 @@ typedef struct otCommissioningDataset #define OT_JOINER_MAX_PSKD_LENGTH 32 ///< Maximum string length of a Joiner PSKd (does not include null char). /** - * This structure represents a Joiner PSKd. + * Represents a Joiner PSKd. * */ typedef struct otJoinerPskd @@ -125,7 +125,7 @@ typedef struct otJoinerPskd } otJoinerPskd; /** - * This enumeration defines a Joiner Info Type. + * Defines a Joiner Info Type. * */ typedef enum otJoinerInfoType @@ -136,7 +136,7 @@ typedef enum otJoinerInfoType } otJoinerInfoType; /** - * This structure represents a Joiner Info. + * Represents a Joiner Info. * */ typedef struct otJoinerInfo @@ -152,7 +152,7 @@ typedef struct otJoinerInfo } otJoinerInfo; /** - * This function pointer is called whenever the commissioner state changes. + * Pointer is called whenever the commissioner state changes. * * @param[in] aState The Commissioner state. * @param[in] aContext A pointer to application-specific context. @@ -161,7 +161,7 @@ typedef struct otJoinerInfo typedef void (*otCommissionerStateCallback)(otCommissionerState aState, void *aContext); /** - * This function pointer is called whenever the joiner state changes. + * Pointer is called whenever the joiner state changes. * * @param[in] aEvent The joiner event type. * @param[in] aJoinerInfo A pointer to the Joiner Info. @@ -175,7 +175,7 @@ typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent, void *aContext); /** - * This function enables the Thread Commissioner role. + * Enables the Thread Commissioner role. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aStateCallback A pointer to a function that is called when the commissioner state changes. @@ -193,7 +193,7 @@ otError otCommissionerStart(otInstance *aInstance, void *aCallbackContext); /** - * This function disables the Thread Commissioner role. + * Disables the Thread Commissioner role. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -204,7 +204,7 @@ otError otCommissionerStart(otInstance *aInstance, otError otCommissionerStop(otInstance *aInstance); /** - * This function returns the Commissioner Id. + * Returns the Commissioner Id. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -214,7 +214,7 @@ otError otCommissionerStop(otInstance *aInstance); const char *otCommissionerGetId(otInstance *aInstance); /** - * This function sets the Commissioner Id. + * Sets the Commissioner Id. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aId A pointer to a string character array. Must be null terminated. @@ -227,7 +227,7 @@ const char *otCommissionerGetId(otInstance *aInstance); otError otCommissionerSetId(otInstance *aInstance, const char *aId); /** - * This function adds a Joiner entry. + * Adds a Joiner entry. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEui64 A pointer to the Joiner's IEEE EUI-64 or NULL for any Joiner. @@ -248,7 +248,7 @@ otError otCommissionerAddJoiner(otInstance *aInstance, uint32_t aTimeout); /** - * This function adds a Joiner entry with a given Joiner Discerner value. + * Adds a Joiner entry with a given Joiner Discerner value. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aDiscerner A pointer to the Joiner Discerner. @@ -269,7 +269,7 @@ otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance, uint32_t aTimeout); /** - * This method get joiner info at aIterator position. + * Get joiner info at aIterator position. * * @param[in] aInstance A pointer to instance. * @param[in,out] aIterator A pointer to the Joiner Info iterator context. @@ -282,7 +282,7 @@ otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance, otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner); /** - * This function removes a Joiner entry. + * Removes a Joiner entry. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEui64 A pointer to the Joiner's IEEE EUI-64 or NULL for any Joiner. @@ -298,7 +298,7 @@ otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterat otError otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aEui64); /** - * This function removes a Joiner entry. + * Removes a Joiner entry. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aDiscerner A pointer to the Joiner Discerner. @@ -314,7 +314,7 @@ otError otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aE otError otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner); /** - * This function gets the Provisioning URL. + * Gets the Provisioning URL. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -324,7 +324,7 @@ otError otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJ const char *otCommissionerGetProvisioningUrl(otInstance *aInstance); /** - * This function sets the Provisioning URL. + * Sets the Provisioning URL. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aProvisioningUrl A pointer to the Provisioning URL (may be NULL to set as empty string). @@ -336,7 +336,7 @@ const char *otCommissionerGetProvisioningUrl(otInstance *aInstance); otError otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aProvisioningUrl); /** - * This function sends an Announce Begin message. + * Sends an Announce Begin message. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aChannelMask The channel mask value. @@ -358,7 +358,7 @@ otError otCommissionerAnnounceBegin(otInstance *aInstance, const otIp6Address *aAddress); /** - * This function pointer is called when the Commissioner receives an Energy Report. + * Pointer is called when the Commissioner receives an Energy Report. * * @param[in] aChannelMask The channel mask value. * @param[in] aEnergyList A pointer to the energy measurement list. @@ -372,7 +372,7 @@ typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask, void *aContext); /** - * This function sends an Energy Scan Query message. + * Sends an Energy Scan Query message. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aChannelMask The channel mask value. @@ -400,7 +400,7 @@ otError otCommissionerEnergyScan(otInstance *aInstance, void *aContext); /** - * This function pointer is called when the Commissioner receives a PAN ID Conflict message. + * Pointer is called when the Commissioner receives a PAN ID Conflict message. * * @param[in] aPanId The PAN ID value. * @param[in] aChannelMask The channel mask value. @@ -410,7 +410,7 @@ otError otCommissionerEnergyScan(otInstance *aInstance, typedef void (*otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext); /** - * This function sends a PAN ID Query message. + * Sends a PAN ID Query message. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPanId The PAN ID to query. @@ -434,7 +434,7 @@ otError otCommissionerPanIdQuery(otInstance *aInstance, void *aContext); /** - * This function sends MGMT_COMMISSIONER_GET. + * Sends MGMT_COMMISSIONER_GET. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aTlvs A pointer to TLVs. @@ -448,7 +448,7 @@ otError otCommissionerPanIdQuery(otInstance *aInstance, otError otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, uint8_t aLength); /** - * This function sends MGMT_COMMISSIONER_SET. + * Sends MGMT_COMMISSIONER_SET. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aDataset A pointer to commissioning dataset. @@ -466,7 +466,7 @@ otError otCommissionerSendMgmtSet(otInstance *aInstance, uint8_t aLength); /** - * This function returns the Commissioner Session ID. + * Returns the Commissioner Session ID. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -476,7 +476,7 @@ otError otCommissionerSendMgmtSet(otInstance *aInstance, uint16_t otCommissionerGetSessionId(otInstance *aInstance); /** - * This function returns the Commissioner State. + * Returns the Commissioner State. * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/crypto.h b/include/openthread/crypto.h index b2629267e..112d3bd35 100644 --- a/include/openthread/crypto.h +++ b/include/openthread/crypto.h @@ -58,13 +58,13 @@ extern "C" { /** * @struct otCryptoSha256Hash * - * This structure represents a SHA-256 hash. + * Represents a SHA-256 hash. * */ typedef otPlatCryptoSha256Hash otCryptoSha256Hash; /** - * This function performs HMAC computation. + * Performs HMAC computation. * * @param[in] aKey A pointer to the key. * @param[in] aBuf A pointer to the input buffer. @@ -75,7 +75,7 @@ typedef otPlatCryptoSha256Hash otCryptoSha256Hash; void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash); /** - * This method performs AES CCM computation. + * Performs AES CCM computation. * * @param[in] aKey A pointer to the key. * @param[in] aTagLength Length of tag in bytes. diff --git a/include/openthread/dataset.h b/include/openthread/dataset.h index efd18bc4b..8be3be98f 100644 --- a/include/openthread/dataset.h +++ b/include/openthread/dataset.h @@ -58,7 +58,7 @@ extern "C" { /** * @struct otNetworkKey * - * This structure represents a Thread Network Key. + * Represents a Thread Network Key. * */ OT_TOOL_PACKED_BEGIN @@ -68,7 +68,7 @@ struct otNetworkKey } OT_TOOL_PACKED_END; /** - * This structure represents a Thread Network Key. + * Represents a Thread Network Key. * */ typedef struct otNetworkKey otNetworkKey; @@ -82,7 +82,7 @@ typedef otCryptoKeyRef otNetworkKeyRef; ///< Reference to Key #define OT_NETWORK_NAME_MAX_SIZE 16 ///< Maximum size of the Thread Network Name field (bytes) /** - * This structure represents a Network Name. + * Represents a Network Name. * * The `otNetworkName` is a null terminated C string (i.e., `m8` char array MUST end with null char `\0`). * @@ -95,7 +95,7 @@ typedef struct otNetworkName #define OT_EXT_PAN_ID_SIZE 8 ///< Size of a Thread PAN ID (bytes) /** - * This structure represents an Extended PAN ID. + * Represents an Extended PAN ID. * */ OT_TOOL_PACKED_BEGIN @@ -105,7 +105,7 @@ struct otExtendedPanId } OT_TOOL_PACKED_END; /** - * This structure represents an Extended PAN ID. + * Represents an Extended PAN ID. * */ typedef struct otExtendedPanId otExtendedPanId; @@ -113,7 +113,7 @@ typedef struct otExtendedPanId otExtendedPanId; #define OT_MESH_LOCAL_PREFIX_SIZE OT_IP6_PREFIX_SIZE ///< Size of the Mesh Local Prefix (bytes) /** - * This structure represents a Mesh Local Prefix. + * Represents a Mesh Local Prefix. * */ typedef otIp6NetworkPrefix otMeshLocalPrefix; @@ -121,7 +121,7 @@ typedef otIp6NetworkPrefix otMeshLocalPrefix; #define OT_PSKC_MAX_SIZE 16 ///< Maximum size of the PSKc (bytes) /** - * This structure represents PSKc. + * Represents PSKc. * */ OT_TOOL_PACKED_BEGIN @@ -131,7 +131,7 @@ struct otPskc } OT_TOOL_PACKED_END; /** - * This structure represents a PSKc. + * Represents a PSKc. * */ typedef struct otPskc otPskc; @@ -143,7 +143,7 @@ typedef struct otPskc otPskc; typedef otCryptoKeyRef otPskcRef; ///< Reference to Key /** - * This structure represent Security Policy. + * Represent Security Policy. * */ typedef struct otSecurityPolicy @@ -163,7 +163,7 @@ typedef struct otSecurityPolicy } otSecurityPolicy; /** - * This type represents Channel Mask. + * Represents Channel Mask. * */ typedef uint32_t otChannelMask; @@ -196,7 +196,7 @@ typedef uint32_t otChannelMask; #define OT_CHANNEL_26_MASK (1 << 26) ///< Channel 26 /** - * This structure represents presence of different components in Active or Pending Operational Dataset. + * Represents presence of different components in Active or Pending Operational Dataset. * */ typedef struct otOperationalDatasetComponents @@ -216,7 +216,7 @@ typedef struct otOperationalDatasetComponents } otOperationalDatasetComponents; /** - * This structure represents a Thread Dataset timestamp component. + * Represents a Thread Dataset timestamp component. * */ typedef struct otTimestamp @@ -227,7 +227,7 @@ typedef struct otTimestamp } otTimestamp; /** - * This structure represents an Active or Pending Operational Dataset. + * Represents an Active or Pending Operational Dataset. * * Components in Dataset are optional. `mComponents` structure specifies which components are present in the Dataset. * @@ -256,7 +256,7 @@ typedef struct otOperationalDataset #define OT_OPERATIONAL_DATASET_MAX_LENGTH 254 /** - * This structure represents an Active or Pending Operational Dataset. + * Represents an Active or Pending Operational Dataset. * * The Operational Dataset is TLV encoded as specified by Thread. * @@ -268,7 +268,7 @@ typedef struct otOperationalDatasetTlvs } otOperationalDatasetTlvs; /** - * This enumeration represents meshcop TLV types. + * Represents meshcop TLV types. * */ typedef enum otMeshcopTlvType @@ -316,7 +316,7 @@ typedef enum otMeshcopTlvType } otMeshcopTlvType; /** - * This function pointer is called when a response to a MGMT_SET request is received or times out. + * Pointer is called when a response to a MGMT_SET request is received or times out. * * @param[in] aResult A result of the operation. * @param[in] aContext A pointer to application-specific context. @@ -331,7 +331,7 @@ typedef enum otMeshcopTlvType typedef void (*otDatasetMgmtSetCallback)(otError aResult, void *aContext); /** - * This function indicates whether a valid network is present in the Active Operational Dataset or not. + * Indicates whether a valid network is present in the Active Operational Dataset or not. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -353,7 +353,7 @@ bool otDatasetIsCommissioned(otInstance *aInstance); otError otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset); /** - * This function gets the Active Operational Dataset. + * Gets the Active Operational Dataset. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aDataset A pointer to where the Active Operational Dataset will be placed. @@ -391,7 +391,7 @@ otError otDatasetGetActiveTlvs(otInstance *aInstance, otOperationalDatasetTlvs * otError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aDataset); /** - * This function sets the Active Operational Dataset. + * Sets the Active Operational Dataset. * * If the dataset does not include an Active Timestamp, the dataset is only partially complete. * @@ -417,7 +417,7 @@ otError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aD otError otDatasetSetActiveTlvs(otInstance *aInstance, const otOperationalDatasetTlvs *aDataset); /** - * This function gets the Pending Operational Dataset. + * Gets the Pending Operational Dataset. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aDataset A pointer to where the Pending Operational Dataset will be placed. @@ -429,7 +429,7 @@ otError otDatasetSetActiveTlvs(otInstance *aInstance, const otOperationalDataset otError otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDataset); /** - * This function gets the Pending Operational Dataset. + * Gets the Pending Operational Dataset. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aDataset A pointer to where the Pending Operational Dataset will be placed. @@ -454,7 +454,7 @@ otError otDatasetGetPendingTlvs(otInstance *aInstance, otOperationalDatasetTlvs otError otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *aDataset); /** - * This function sets the Pending Operational Dataset. + * Sets the Pending Operational Dataset. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aDataset A pointer to the Pending Operational Dataset. @@ -549,7 +549,7 @@ otError otDatasetSendMgmtPendingSet(otInstance *aInstance, void *aContext); /** - * This function generates PSKc from a given pass-phrase, network name, and extended PAN ID. + * Generates PSKc from a given pass-phrase, network name, and extended PAN ID. * * PSKc is used to establish the Commissioner Session. * diff --git a/include/openthread/dataset_updater.h b/include/openthread/dataset_updater.h index cb16c33ac..f9b7f64ae 100644 --- a/include/openthread/dataset_updater.h +++ b/include/openthread/dataset_updater.h @@ -69,7 +69,7 @@ extern "C" { typedef void (*otDatasetUpdaterCallback)(otError aError, void *aContext); /** - * This function requests an update to Operational Dataset. + * Requests an update to Operational Dataset. * * Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled. * @@ -94,7 +94,7 @@ otError otDatasetUpdaterRequestUpdate(otInstance *aInstance, void *aContext); /** - * This function cancels an ongoing (if any) Operational Dataset update request. + * Cancels an ongoing (if any) Operational Dataset update request. * * Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled. * @@ -104,7 +104,7 @@ otError otDatasetUpdaterRequestUpdate(otInstance *aInstance, void otDatasetUpdaterCancelUpdate(otInstance *aInstance); /** - * This function indicates whether there is an ongoing Operation Dataset update request. + * Indicates whether there is an ongoing Operation Dataset update request. * * Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled. * diff --git a/include/openthread/diag.h b/include/openthread/diag.h index 98c708e34..217abf6cb 100644 --- a/include/openthread/diag.h +++ b/include/openthread/diag.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This function processes a factory diagnostics command line. + * Processes a factory diagnostics command line. * * The output of this function (the content written to @p aOutput) MUST terminate with `\0` and the `\0` is within the * output buffer. @@ -75,7 +75,7 @@ otError otDiagProcessCmd(otInstance *aInstance, size_t aOutputMaxLen); /** - * This function processes a factory diagnostics command line. + * Processes a factory diagnostics command line. * * The output of this function (the content written to @p aOutput) MUST terminate with `\0` and the `\0` is within the * output buffer. @@ -94,7 +94,7 @@ otError otDiagProcessCmd(otInstance *aInstance, otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOutputMaxLen); /** - * This function indicates whether or not the factory diagnostics mode is enabled. + * Indicates whether or not the factory diagnostics mode is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/dns.h b/include/openthread/dns.h index e11855f04..d57a0f4c1 100644 --- a/include/openthread/dns.h +++ b/include/openthread/dns.h @@ -63,7 +63,7 @@ extern "C" { #define OT_DNS_TXT_KEY_MAX_LENGTH 9 ///< Recommended maximum length of TXT record key string (RFC 6763 - section 6.4). /** - * This structure represents a TXT record entry representing a key/value pair (RFC 6763 - section 6.3). + * Represents a TXT record entry representing a key/value pair (RFC 6763 - section 6.3). * * The string buffers pointed to by `mKey` and `mValue` MUST persist and remain unchanged after an instance of such * structure is passed to OpenThread (as part of `otSrpClientService` instance). @@ -95,7 +95,7 @@ typedef struct otDnsTxtEntry } otDnsTxtEntry; /** - * This structure represents an iterator for TXT record entries (key/value pairs). + * 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. * @@ -108,7 +108,7 @@ typedef struct otDnsTxtEntryIterator } otDnsTxtEntryIterator; /** - * This function initializes a TXT record iterator. + * Initializes a TXT record iterator. * * The buffer pointer @p aTxtData and its content MUST persist and remain unchanged while @p aIterator object * is being used. @@ -121,7 +121,7 @@ typedef struct otDnsTxtEntryIterator void otDnsInitTxtEntryIterator(otDnsTxtEntryIterator *aIterator, const uint8_t *aTxtData, uint16_t aTxtDataLength); /** - * This function parses the TXT data from an iterator and gets the next TXT record entry (key/value pair). + * Parses the TXT data from an iterator and gets the next TXT record entry (key/value pair). * * The @p aIterator MUST be initialized using `otDnsInitTxtEntryIterator()` before calling this function and the TXT * data buffer used to initialize the iterator MUST persist and remain unchanged. Otherwise the behavior of this @@ -142,7 +142,7 @@ void otDnsInitTxtEntryIterator(otDnsTxtEntryIterator *aIterator, const uint8_t * otError otDnsGetNextTxtEntry(otDnsTxtEntryIterator *aIterator, otDnsTxtEntry *aEntry); /** - * This function enables/disables the "DNS name compression" mode. + * Enables/disables the "DNS name compression" mode. * * By default DNS name compression is enabled. When disabled, DNS names are appended as full and never compressed. This * is applicable to OpenThread's DNS and SRP client/server modules. @@ -158,7 +158,7 @@ otError otDnsGetNextTxtEntry(otDnsTxtEntryIterator *aIterator, otDnsTxtEntry *aE void otDnsSetNameCompressionEnabled(bool aEnabled); /** - * This function indicates whether the "DNS name compression" mode is enabled or not. + * Indicates whether the "DNS name compression" mode is enabled or not. * * This is intended for testing only and available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` config is enabled. * diff --git a/include/openthread/dns_client.h b/include/openthread/dns_client.h index 6c9f5d1bb..0fd345804 100644 --- a/include/openthread/dns_client.h +++ b/include/openthread/dns_client.h @@ -56,7 +56,7 @@ extern "C" { */ /** - * This enumeration type represents the "Recursion Desired" (RD) flag in an `otDnsQueryConfig`. + * Type represents the "Recursion Desired" (RD) flag in an `otDnsQueryConfig`. * */ typedef enum @@ -67,7 +67,7 @@ typedef enum } otDnsRecursionFlag; /** - * This enumeration type represents the NAT64 mode in an `otDnsQueryConfig`. + * Type represents the NAT64 mode in an `otDnsQueryConfig`. * * The NAT64 mode indicates whether to allow or disallow NAT64 address translation during DNS client address resolution. * This mode is only used when `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE` is enabled. @@ -81,7 +81,7 @@ typedef enum } otDnsNat64Mode; /** - * This enumeration type represents the service resolution mode in an `otDnsQueryConfig`. + * Type represents the service resolution mode in an `otDnsQueryConfig`. * * This is only used during DNS client service resolution `otDnsClientResolveService()`. It determines which * record types to query. @@ -98,7 +98,7 @@ typedef enum } otDnsServiceMode; /** - * This enumeration type represents the DNS transport protocol in an `otDnsQueryConfig`. + * Type represents the DNS transport protocol in an `otDnsQueryConfig`. * * This `OT_DNS_TRANSPORT_TCP` is only supported when `OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE` is enabled. * @@ -111,7 +111,7 @@ typedef enum } otDnsTransportProto; /** - * This structure represents a DNS query configuration. + * Represents a DNS query configuration. * * Any of the fields in this structure can be set to zero to indicate that it is not specified. How the unspecified * fields are treated is determined by the function which uses the instance of `otDnsQueryConfig`. @@ -129,7 +129,7 @@ typedef struct otDnsQueryConfig } otDnsQueryConfig; /** - * This function gets the current default query config used by DNS client. + * Gets the current default query config used by DNS client. * * 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. @@ -143,7 +143,7 @@ typedef struct otDnsQueryConfig const otDnsQueryConfig *otDnsClientGetDefaultConfig(otInstance *aInstance); /** - * This function sets the default query config on DNS client. + * Sets the default query config on DNS client. * * @note Any ongoing query will continue to use the config from when it was started. The new default config will be * used for any future DNS queries. @@ -169,7 +169,7 @@ const otDnsQueryConfig *otDnsClientGetDefaultConfig(otInstance *aInstance); void otDnsClientSetDefaultConfig(otInstance *aInstance, const otDnsQueryConfig *aConfig); /** - * This type is an opaque representation of a response to an address resolution DNS query. + * An opaque representation of a response to an address resolution DNS query. * * Pointers to instance of this type are provided from callback `otDnsAddressCallback`. * @@ -177,7 +177,7 @@ void otDnsClientSetDefaultConfig(otInstance *aInstance, const otDnsQueryConfig * typedef struct otDnsAddressResponse otDnsAddressResponse; /** - * This function pointer is called when a DNS response is received for an address resolution query. + * Pointer is called when a DNS response is received for an address resolution query. * * Within this callback the user can use `otDnsAddressResponseGet{Item}()` functions along with the @p aResponse * pointer to get more info about the response. @@ -217,7 +217,7 @@ typedef struct otDnsAddressResponse otDnsAddressResponse; typedef void (*otDnsAddressCallback)(otError aError, const otDnsAddressResponse *aResponse, void *aContext); /** - * This function sends an address resolution DNS query for AAAA (IPv6) record(s) for a given host name. + * Sends an address resolution DNS query for AAAA (IPv6) record(s) for a given host name. * * The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as * the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The @@ -242,9 +242,9 @@ otError otDnsClientResolveAddress(otInstance *aInstance, const otDnsQueryConfig *aConfig); /** - * This function sends an address resolution DNS query for A (IPv4) record(s) for a given host name. + * Sends an address resolution DNS query for A (IPv4) record(s) for a given host name. * - * This function requires and is available when `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE` is enabled. + * Requires and is available when `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE` is enabled. * * When a successful response is received, the addresses are returned from @p aCallback as NAT64 IPv6 translated * versions of the IPv4 addresses from the query response. @@ -272,9 +272,9 @@ otError otDnsClientResolveIp4Address(otInstance *aInstance, const otDnsQueryConfig *aConfig); /** - * This function gets the full host name associated with an address resolution DNS response. + * Gets the full host name associated with an address resolution DNS response. * - * This function MUST only be used from `otDnsAddressCallback`. + * MUST only be used from `otDnsAddressCallback`. * * @param[in] aResponse A pointer to the response. * @param[out] aNameBuffer A buffer to char array to output the full host name (MUST NOT be NULL). @@ -289,9 +289,9 @@ otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse, uint16_t aNameBufferSize); /** - * This function gets an IPv6 address associated with an address resolution DNS response. + * Gets an IPv6 address associated with an address resolution DNS response. * - * This function MUST only be used from `otDnsAddressCallback`. + * MUST only be used from `otDnsAddressCallback`. * * The response may include multiple IPv6 address records. @p aIndex can be used to iterate through the list of * addresses. Index zero gets the first address and so on. When we reach end of the list, `OT_ERROR_NOT_FOUND` is @@ -315,7 +315,7 @@ otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse, uint32_t *aTtl); /** - * This type is an opaque representation of a response to a browse (service instance enumeration) DNS query. + * An opaque representation of a response to a browse (service instance enumeration) DNS query. * * Pointers to instance of this type are provided from callback `otDnsBrowseCallback`. * @@ -323,7 +323,7 @@ otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse, typedef struct otDnsBrowseResponse otDnsBrowseResponse; /** - * This function pointer is called when a DNS response is received for a browse (service instance enumeration) query. + * Pointer is called when a DNS response is received for a browse (service instance enumeration) query. * * Within this callback the user can use `otDnsBrowseResponseGet{Item}()` functions along with the @p aResponse * pointer to get more info about the response. @@ -341,7 +341,7 @@ typedef struct otDnsBrowseResponse otDnsBrowseResponse; typedef void (*otDnsBrowseCallback)(otError aError, const otDnsBrowseResponse *aResponse, void *aContext); /** - * This structure provides info for a DNS service instance. + * Provides info for a DNS service instance. * */ typedef struct otDnsServiceInfo @@ -361,9 +361,9 @@ typedef struct otDnsServiceInfo } otDnsServiceInfo; /** - * This function sends a DNS browse (service instance enumeration) query for a given service name. + * Sends a DNS browse (service instance enumeration) query for a given service name. * - * This function is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. + * Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. * * The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as * the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The @@ -386,9 +386,9 @@ otError otDnsClientBrowse(otInstance *aInstance, const otDnsQueryConfig *aConfig); /** - * This function gets the service name associated with a DNS browse (service instance enumeration) response. + * Gets the service name associated with a DNS browse (service instance enumeration) response. * - * This function MUST only be used from `otDnsBrowseCallback`. + * MUST only be used from `otDnsBrowseCallback`. * * @param[in] aResponse A pointer to the response. * @param[out] aNameBuffer A buffer to char array to output the service name (MUST NOT be NULL). @@ -403,9 +403,9 @@ otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse, uint16_t aNameBufferSize); /** - * This function gets a service instance associated with a DNS browse (service instance enumeration) response. + * Gets a service instance associated with a DNS browse (service instance enumeration) response. * - * This function MUST only be used from `otDnsBrowseCallback`. + * MUST only be used from `otDnsBrowseCallback`. * * The response may include multiple service instance records. @p aIndex can be used to iterate through the list. Index * zero gives the the first record. When we reach end of the list, `OT_ERROR_NOT_FOUND` is returned. @@ -430,9 +430,9 @@ otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aRespon uint8_t aLabelBufferSize); /** - * This function gets info for a service instance from a DNS browse (service instance enumeration) response. + * Gets info for a service instance from a DNS browse (service instance enumeration) response. * - * This function MUST only be used from `otDnsBrowseCallback`. + * MUST only be used from `otDnsBrowseCallback`. * * A browse DNS response can include SRV, TXT, and AAAA records for the service instances that are enumerated. This is * a SHOULD and not a MUST requirement, and servers/resolvers are not required to provide this. This function attempts @@ -462,9 +462,9 @@ otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse, otDnsServiceInfo *aServiceInfo); /** - * This function gets the host IPv6 address from a DNS browse (service instance enumeration) response. + * Gets the host IPv6 address from a DNS browse (service instance enumeration) response. * - * This function MUST only be used from `otDnsBrowseCallback`. + * MUST only be used from `otDnsBrowseCallback`. * * The response can include zero or more IPv6 address records. @p aIndex can be used to iterate through the list of * addresses. Index zero gets the first address and so on. When we reach end of the list, `OT_ERROR_NOT_FOUND` is @@ -489,7 +489,7 @@ otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse, uint32_t *aTtl); /** - * This type is an opaque representation of a response to a service instance resolution DNS query. + * An opaque representation of a response to a service instance resolution DNS query. * * Pointers to instance of this type are provided from callback `otDnsAddressCallback`. * @@ -497,7 +497,7 @@ otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse, typedef struct otDnsServiceResponse otDnsServiceResponse; /** - * This function pointer is called when a DNS response is received for a service instance resolution query. + * Pointer is called when a DNS response is received for a service instance resolution query. * * Within this callback the user can use `otDnsServiceResponseGet{Item}()` functions along with the @p aResponse * pointer to get more info about the response. @@ -515,9 +515,9 @@ typedef struct otDnsServiceResponse otDnsServiceResponse; typedef void (*otDnsServiceCallback)(otError aError, const otDnsServiceResponse *aResponse, void *aContext); /** - * This function starts a DNS service instance resolution for a given service instance. + * Starts a DNS service instance resolution for a given service instance. * - * This function is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. + * Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. * * The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as * the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The @@ -555,10 +555,10 @@ otError otDnsClientResolveService(otInstance *aInstance, const otDnsQueryConfig *aConfig); /** - * This function starts a DNS service instance resolution for a given service instance, with a potential follow-up + * Starts a DNS service instance resolution for a given service instance, with a potential follow-up * address resolution for the host name discovered for the service instance. * - * This function is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. + * Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. * * The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as * the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The @@ -566,7 +566,7 @@ otError otDnsClientResolveService(otInstance *aInstance, * `mServiceMode` in DNS config set to `OT_DNS_SERVICE_MODE_TXT` (i.e., querying for TXT record only) and will return * `OT_ERROR_INVALID_ARGS`. * - * This function behaves similarly to `otDnsClientResolveService()` sending queries for SRV and TXT records. However, + * Behaves similarly to `otDnsClientResolveService()` sending queries for SRV and TXT records. However, * if the server/resolver does not provide AAAA/A records for the host name in the response to SRV query (in the * Additional Data section), it will perform host name resolution (sending an AAAA query) for the discovered host name * from the SRV record. The callback @p aCallback is invoked when responses for all queries are received (i.e., both @@ -592,9 +592,9 @@ otError otDnsClientResolveServiceAndHostAddress(otInstance *aInstanc const otDnsQueryConfig *aConfig); /** - * This function gets the service instance name associated with a DNS service instance resolution response. + * Gets the service instance name associated with a DNS service instance resolution response. * - * This function MUST only be used from `otDnsServiceCallback`. + * MUST only be used from `otDnsServiceCallback`. * * @param[in] aResponse A pointer to the response. * @param[out] aLabelBuffer A buffer to char array to output the service instance label (MUST NOT be NULL). @@ -614,9 +614,9 @@ otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse uint16_t aNameBufferSize); /** - * This function gets info for a service instance from a DNS service instance resolution response. + * Gets info for a service instance from a DNS service instance resolution response. * - * This function MUST only be used from a `otDnsServiceCallback` triggered from `otDnsClientResolveService()` or + * MUST only be used from a `otDnsServiceCallback` triggered from `otDnsClientResolveService()` or * `otDnsClientResolveServiceAndHostAddress()`. * * When this is is used from a `otDnsClientResolveService()` callback, the DNS response from server/resolver may @@ -649,9 +649,9 @@ otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse otError otDnsServiceResponseGetServiceInfo(const otDnsServiceResponse *aResponse, otDnsServiceInfo *aServiceInfo); /** - * This function gets the host IPv6 address from a DNS service instance resolution response. + * Gets the host IPv6 address from a DNS service instance resolution response. * - * This function MUST only be used from `otDnsServiceCallback`. + * MUST only be used from `otDnsServiceCallback`. * * The response can include zero or more IPv6 address records. @p aIndex can be used to iterate through the list of * addresses. Index zero gets the first address and so on. When we reach end of the list, `OT_ERROR_NOT_FOUND` is diff --git a/include/openthread/dnssd_server.h b/include/openthread/dnssd_server.h index cd6463c23..98f83d694 100644 --- a/include/openthread/dnssd_server.h +++ b/include/openthread/dnssd_server.h @@ -56,7 +56,7 @@ extern "C" { */ /** - * This function is called when a DNS-SD query subscribes one of: + * Is called when a DNS-SD query subscribes one of: * 1. a service name. * 2. a service instance name. * 3. a host name. @@ -83,7 +83,7 @@ extern "C" { typedef void (*otDnssdQuerySubscribeCallback)(void *aContext, const char *aFullName); /** - * This function is called when a DNS-SD query unsubscribes one of: + * Is called when a DNS-SD query unsubscribes one of: * 1. a service name. * 2. a service instance name. * 3. a host name. @@ -107,7 +107,7 @@ typedef void (*otDnssdQueryUnsubscribeCallback)(void *aContext, const char *aFul typedef void otDnssdQuery; /** - * This structure represents information of a discovered service instance for a DNS-SD query. + * Represents information of a discovered service instance for a DNS-SD query. * */ typedef struct otDnssdServiceInstanceInfo @@ -125,7 +125,7 @@ typedef struct otDnssdServiceInstanceInfo } otDnssdServiceInstanceInfo; /** - * This structure represents information of a discovered host for a DNS-SD query. + * Represents information of a discovered host for a DNS-SD query. * */ typedef struct otDnssdHostInfo @@ -136,7 +136,7 @@ typedef struct otDnssdHostInfo } otDnssdHostInfo; /** - * This enumeration specifies a DNS-SD query type. + * Specifies a DNS-SD query type. * */ typedef enum @@ -148,7 +148,7 @@ typedef enum } otDnssdQueryType; /** - * This structure contains the counters of DNS-SD server. + * Contains the counters of DNS-SD server. * */ typedef struct otDnssdCounters @@ -164,7 +164,7 @@ typedef struct otDnssdCounters } otDnssdCounters; /** - * This function sets DNS-SD server query callbacks. + * Sets DNS-SD server query callbacks. * * The DNS-SD server calls @p aSubscribe to subscribe to a service or service instance to resolve a DNS-SD query and @p * aUnsubscribe to unsubscribe when the query is resolved or timeout. @@ -183,7 +183,7 @@ void otDnssdQuerySetCallbacks(otInstance *aInstance, void *aContext); /** - * This function notifies a discovered service instance. + * Notifies a discovered service instance. * * The external query resolver (e.g. Discovery Proxy) should call this function to notify OpenThread core of the * subscribed services or service instances. @@ -199,7 +199,7 @@ void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aIn const char *aServiceFullName, otDnssdServiceInstanceInfo *aInstanceInfo); /** - * This function notifies a discovered host. + * Notifies a discovered host. * * The external query resolver (e.g. Discovery Proxy) should call this function to notify OpenThread core of the * subscribed hosts. @@ -214,7 +214,7 @@ void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aIn void otDnssdQueryHandleDiscoveredHost(otInstance *aInstance, const char *aHostFullName, otDnssdHostInfo *aHostInfo); /** - * This function acquires the next query in the DNS-SD server. + * Acquires the next query in the DNS-SD server. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aQuery The query pointer. Pass NULL to get the first query. @@ -225,7 +225,7 @@ void otDnssdQueryHandleDiscoveredHost(otInstance *aInstance, const char *aHostFu const otDnssdQuery *otDnssdGetNextQuery(otInstance *aInstance, const otDnssdQuery *aQuery); /** - * This function acquires the DNS-SD query type and name for a specific query. + * Acquires the DNS-SD query type and name for a specific query. * * @param[in] aQuery The query pointer acquired from `otDnssdGetNextQuery`. * @param[out] aNameOutput The name output buffer, which should be `OT_DNS_MAX_NAME_SIZE` bytes long. @@ -236,7 +236,7 @@ const otDnssdQuery *otDnssdGetNextQuery(otInstance *aInstance, const otDnssdQuer otDnssdQueryType otDnssdGetQueryTypeAndName(const otDnssdQuery *aQuery, char (*aNameOutput)[OT_DNS_MAX_NAME_SIZE]); /** - * This function returns the counters of the DNS-SD server. + * Returns the counters of the DNS-SD server. * * @param[in] aInstance The OpenThread instance structure. * diff --git a/include/openthread/error.h b/include/openthread/error.h index 66cb3c5b5..d54d7bac6 100644 --- a/include/openthread/error.h +++ b/include/openthread/error.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This enumeration represents error codes used throughout OpenThread. + * Represents error codes used throughout OpenThread. * */ typedef enum OT_MUST_USE_RESULT otError @@ -251,7 +251,7 @@ typedef enum OT_MUST_USE_RESULT otError } otError; /** - * This function converts an otError enum into a string. + * Converts an otError enum into a string. * * @param[in] aError An otError enum. * diff --git a/include/openthread/history_tracker.h b/include/openthread/history_tracker.h index 79a255a77..08dc8d9c2 100644 --- a/include/openthread/history_tracker.h +++ b/include/openthread/history_tracker.h @@ -60,7 +60,7 @@ extern "C" { #define OT_HISTORY_TRACKER_ENTRY_AGE_STRING_SIZE 21 ///< Recommended size for string representation of an entry age. /** - * This type represents an iterator to iterate through a history list. + * Represents an iterator to iterate through a history list. * * The fields in this type are opaque (intended for use by OpenThread core) and therefore should not be accessed/used * by caller. @@ -75,7 +75,7 @@ typedef struct otHistoryTrackerIterator } otHistoryTrackerIterator; /** - * This structure represents Thread network info. + * Represents Thread network info. * */ typedef struct otHistoryTrackerNetworkInfo @@ -87,7 +87,7 @@ typedef struct otHistoryTrackerNetworkInfo } otHistoryTrackerNetworkInfo; /** - * This enumeration defines the events for an IPv6 (unicast or multicast) address info (i.e., whether address is added + * Defines the events for an IPv6 (unicast or multicast) address info (i.e., whether address is added * or removed). * */ @@ -98,7 +98,7 @@ typedef enum } otHistoryTrackerAddressEvent; /** - * This structure represent a unicast IPv6 address info. + * Represent a unicast IPv6 address info. * */ typedef struct otHistoryTrackerUnicastAddressInfo @@ -114,7 +114,7 @@ typedef struct otHistoryTrackerUnicastAddressInfo } otHistoryTrackerUnicastAddressInfo; /** - * This structure represent an IPv6 multicast address info. + * Represent an IPv6 multicast address info. * */ typedef struct otHistoryTrackerMulticastAddressInfo @@ -137,7 +137,7 @@ enum }; /** - * This structure represents a RX/TX IPv6 message info. + * Represents a RX/TX IPv6 message info. * * Some of the fields in this struct are applicable to a RX message or a TX message only, e.g., `mAveRxRss` is the * average RSS of all fragment frames that form a received message and is only applicable for a RX message. @@ -161,7 +161,7 @@ typedef struct otHistoryTrackerMessageInfo } otHistoryTrackerMessageInfo; /** - * This enumeration defines the events in a neighbor info (i.e. whether neighbor is added, removed, or changed). + * Defines the events in a neighbor info (i.e. whether neighbor is added, removed, or changed). * * Event `OT_HISTORY_TRACKER_NEIGHBOR_EVENT_RESTORING` is applicable to child neighbors only. It is triggered after * the device (re)starts and when the previous children list is retrieved from non-volatile settings and the device @@ -177,7 +177,7 @@ typedef enum } otHistoryTrackerNeighborEvent; /** - * This structure represents a neighbor info. + * Represents a neighbor info. * */ typedef struct otHistoryTrackerNeighborInfo @@ -193,7 +193,7 @@ typedef struct otHistoryTrackerNeighborInfo } otHistoryTrackerNeighborInfo; /** - * This enumeration defines the events in a router info (i.e. whether router is added, removed, or changed). + * Defines the events in a router info (i.e. whether router is added, removed, or changed). * */ typedef enum @@ -209,7 +209,7 @@ typedef enum #define OT_HISTORY_TRACKER_INFINITE_PATH_COST 0 ///< Infinite path cost - used in `otHistoryTrackerRouterInfo`. /** - * This structure represents a router table entry event. + * Represents a router table entry event. * */ typedef struct otHistoryTrackerRouterInfo @@ -222,7 +222,7 @@ typedef struct otHistoryTrackerRouterInfo } otHistoryTrackerRouterInfo; /** - * This enumeration defines the events for a Network Data entry (i.e., whether an entry is added or removed). + * Defines the events for a Network Data entry (i.e., whether an entry is added or removed). * */ typedef enum @@ -232,7 +232,7 @@ typedef enum } otHistoryTrackerNetDataEvent; /** - * This structure represent a Network Data on mesh prefix info. + * Represent a Network Data on mesh prefix info. * */ typedef struct otHistoryTrackerOnMeshPrefixInfo @@ -242,7 +242,7 @@ typedef struct otHistoryTrackerOnMeshPrefixInfo } otHistoryTrackerOnMeshPrefixInfo; /** - * This structure represent a Network Data extern route info. + * Represent a Network Data extern route info. * */ typedef struct otHistoryTrackerExternalRouteInfo @@ -252,7 +252,7 @@ typedef struct otHistoryTrackerExternalRouteInfo } otHistoryTrackerExternalRouteInfo; /** - * This function initializes an `otHistoryTrackerIterator`. + * Initializes an `otHistoryTrackerIterator`. * * An iterator MUST be initialized before it is used. * @@ -268,7 +268,7 @@ typedef struct otHistoryTrackerExternalRouteInfo void otHistoryTrackerInitIterator(otHistoryTrackerIterator *aIterator); /** - * This function iterates over the entries in the network info history list. + * Iterates over the entries in the network info history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -285,7 +285,7 @@ const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInsta uint32_t *aEntryAge); /** - * This function iterates over the entries in the unicast address history list. + * Iterates over the entries in the unicast address history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -303,7 +303,7 @@ const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressH uint32_t *aEntryAge); /** - * This function iterates over the entries in the multicast address history list. + * Iterates over the entries in the multicast address history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -321,7 +321,7 @@ const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddr uint32_t *aEntryAge); /** - * This function iterates over the entries in the RX message history list. + * Iterates over the entries in the RX message history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -338,7 +338,7 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance uint32_t *aEntryAge); /** - * This function iterates over the entries in the TX message history list. + * Iterates over the entries in the TX message history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -355,7 +355,7 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance uint32_t *aEntryAge); /** - * This function iterates over the entries in the neighbor history list. + * Iterates over the entries in the neighbor history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -372,7 +372,7 @@ const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otIns uint32_t *aEntryAge); /** - * This function iterates over the entries in the router history list. + * Iterates over the entries in the router history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -389,7 +389,7 @@ const otHistoryTrackerRouterInfo *otHistoryTrackerIterateRouterHistory(otInstanc uint32_t *aEntryAge); /** - * This function iterates over the entries in the Network Data on mesh prefix entry history list. + * Iterates over the entries in the Network Data on mesh prefix entry history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -406,7 +406,7 @@ const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHisto uint32_t *aEntryAge); /** - * This function iterates over the entries in the Network Data external route entry history list. + * Iterates over the entries in the Network Data external route entry history list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in,out] aIterator A pointer to an iterator. MUST be initialized or the behavior is undefined. @@ -424,7 +424,7 @@ const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHis uint32_t *aEntryAge); /** - * This function converts a given entry age to a human-readable string. + * Converts a given entry age to a human-readable string. * * The entry age string follows the format "::." for hours, minutes, seconds and millisecond (if * shorter than one day) or "
days ::." (if longer than one day). diff --git a/include/openthread/icmp6.h b/include/openthread/icmp6.h index 38bd6a6a1..3a5733c2b 100644 --- a/include/openthread/icmp6.h +++ b/include/openthread/icmp6.h @@ -85,7 +85,7 @@ typedef enum otIcmp6Code /** * @struct otIcmp6Header * - * This structure represents an ICMPv6 header. + * Represents an ICMPv6 header. * */ OT_TOOL_PACKED_BEGIN @@ -103,7 +103,7 @@ struct otIcmp6Header } OT_TOOL_PACKED_END; /** - * This type represents an ICMPv6 header. + * Represents an ICMPv6 header. * */ typedef struct otIcmp6Header otIcmp6Header; @@ -123,7 +123,7 @@ typedef void (*otIcmp6ReceiveCallback)(void *aContext, const otIcmp6Header *aIcmpHeader); /** - * This structure implements ICMPv6 message handler. + * Implements ICMPv6 message handler. * */ typedef struct otIcmp6Handler @@ -146,7 +146,7 @@ typedef enum otIcmp6EchoMode } otIcmp6EchoMode; /** - * This function indicates whether or not ICMPv6 Echo processing is enabled. + * Indicates whether or not ICMPv6 Echo processing is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -159,7 +159,7 @@ typedef enum otIcmp6EchoMode otIcmp6EchoMode otIcmp6GetEchoMode(otInstance *aInstance); /** - * This function sets whether or not ICMPv6 Echo processing is enabled. + * Sets whether or not ICMPv6 Echo processing is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMode The ICMPv6 Echo processing mode. @@ -168,7 +168,7 @@ otIcmp6EchoMode otIcmp6GetEchoMode(otInstance *aInstance); void otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode); /** - * This function registers a handler to provide received ICMPv6 messages. + * Registers a handler to provide received ICMPv6 messages. * * @note A handler structure @p aHandler has to be stored in persistent (static) memory. * OpenThread does not make a copy of handler structure. @@ -181,7 +181,7 @@ void otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode); otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler); /** - * This function sends an ICMPv6 Echo Request via the Thread interface. + * Sends an ICMPv6 Echo Request via the Thread interface. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMessage A pointer to the message buffer containing the ICMPv6 payload. diff --git a/include/openthread/instance.h b/include/openthread/instance.h index e317b9a16..64ff53588 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 (327) +#define OPENTHREAD_API_VERSION (328) /** * @addtogroup api-instance @@ -66,17 +66,17 @@ extern "C" { */ /** - * This structure represents the OpenThread instance structure. + * Represents the OpenThread instance structure. */ typedef struct otInstance otInstance; /** - * This function initializes the OpenThread library. + * Initializes the OpenThread library. * - * This function initializes OpenThread and prepares it for subsequent OpenThread API calls. This function must be + * Initializes OpenThread and prepares it for subsequent OpenThread API calls. This function must be * called before any other calls to OpenThread. * - * This function is available and can only be used when support for multiple OpenThread instances is enabled. + * Is available and can only be used when support for multiple OpenThread instances is enabled. * * @param[in] aInstanceBuffer The buffer for OpenThread to use for allocating the otInstance structure. * @param[in,out] aInstanceBufferSize On input, the size of aInstanceBuffer. On output, if not enough space for @@ -90,12 +90,12 @@ typedef struct otInstance otInstance; otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize); /** - * This function initializes the static single instance of the OpenThread library. + * Initializes the static single instance of the OpenThread library. * - * This function initializes OpenThread and prepares it for subsequent OpenThread API calls. This function must be + * Initializes OpenThread and prepares it for subsequent OpenThread API calls. This function must be * called before any other calls to OpenThread. * - * This function is available and can only be used when support for multiple OpenThread instances is disabled. + * Is available and can only be used when support for multiple OpenThread instances is disabled. * * @returns A pointer to the single OpenThread instance. * @@ -114,7 +114,7 @@ otInstance *otInstanceInitSingle(void); uint32_t otInstanceGetId(otInstance *aInstance); /** - * This function indicates whether or not the instance is valid/initialized. + * Indicates whether or not the instance is valid/initialized. * * The instance is considered valid if it is acquired and initialized using either `otInstanceInitSingle()` (in single * instance case) or `otInstanceInit()` (in multi instance case). A subsequent call to `otInstanceFinalize()` causes @@ -128,7 +128,7 @@ uint32_t otInstanceGetId(otInstance *aInstance); bool otInstanceIsInitialized(otInstance *aInstance); /** - * This function disables the OpenThread library. + * Disables the OpenThread library. * * Call this function when OpenThread is no longer in use. * @@ -138,9 +138,9 @@ bool otInstanceIsInitialized(otInstance *aInstance); void otInstanceFinalize(otInstance *aInstance); /** - * This function returns the current instance uptime (in msec). + * Returns the current instance uptime (in msec). * - * This function requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. + * Requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. * * The uptime is given as number of milliseconds since OpenThread instance was initialized. * @@ -154,9 +154,9 @@ uint64_t otInstanceGetUptime(otInstance *aInstance); #define OT_UPTIME_STRING_SIZE 24 ///< Recommended size for string representation of uptime. /** - * This function returns the current instance uptime as a human-readable string. + * Returns the current instance uptime as a human-readable string. * - * This function requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. + * Requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. * * The string follows the format "::." for hours, minutes, seconds and millisecond (if uptime is * shorter than one day) or "
d.::." (if longer than a day). @@ -172,7 +172,7 @@ uint64_t otInstanceGetUptime(otInstance *aInstance); void otInstanceGetUptimeAsString(otInstance *aInstance, char *aBuffer, uint16_t aSize); /** - * This enumeration defines flags that are passed as part of `otStateChangedCallback`. + * Defines flags that are passed as part of `otStateChangedCallback`. * */ enum @@ -211,14 +211,14 @@ enum }; /** - * This type represents a bit-field indicating specific state/configuration that has changed. See `OT_CHANGED_*` + * Represents a bit-field indicating specific state/configuration that has changed. See `OT_CHANGED_*` * definitions. * */ typedef uint32_t otChangedFlags; /** - * This function pointer is called to notify certain configuration or state changes within OpenThread. + * Pointer is called to notify certain configuration or state changes within OpenThread. * * @param[in] aFlags A bit-field indicating specific state that has changed. See `OT_CHANGED_*` definitions. * @param[in] aContext A pointer to application-specific context. @@ -227,7 +227,7 @@ typedef uint32_t otChangedFlags; typedef void (*otStateChangedCallback)(otChangedFlags aFlags, void *aContext); /** - * This function registers a callback to indicate when certain configuration or state changes within OpenThread. + * Registers a callback to indicate when certain configuration or state changes within OpenThread. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to a function that is called with certain configuration or state changes. @@ -241,7 +241,7 @@ typedef void (*otStateChangedCallback)(otChangedFlags aFlags, void *aContext); otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aContext); /** - * This function removes a callback to indicate when certain configuration or state changes within OpenThread. + * Removes a callback to indicate when certain configuration or state changes within OpenThread. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to a function that is called with certain configuration or state changes. @@ -251,7 +251,7 @@ otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback void otRemoveStateChangeCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aContext); /** - * This method triggers a platform reset. + * Triggers a platform reset. * * The reset process ensures that all the OpenThread state/info (stored in volatile memory) is erased. Note that the * `otPlatformReset` does not erase any persistent state/info saved in non-volatile memory. @@ -270,7 +270,7 @@ void otInstanceReset(otInstance *aInstance); void otInstanceFactoryReset(otInstance *aInstance); /** - * This method resets the internal states of the OpenThread radio stack. + * Resets the internal states of the OpenThread radio stack. * * Callbacks and configurations are preserved. * @@ -282,7 +282,7 @@ void otInstanceFactoryReset(otInstance *aInstance); void otInstanceResetRadioStack(otInstance *aInstance); /** - * This function erases all the OpenThread persistent info (network settings) stored on non-volatile memory. + * Erases all the OpenThread persistent info (network settings) stored on non-volatile memory. * Erase is successful only if the device is in `disabled` state/role. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -294,7 +294,7 @@ void otInstanceResetRadioStack(otInstance *aInstance); otError otInstanceErasePersistentInfo(otInstance *aInstance); /** - * This function gets the OpenThread version string. + * Gets the OpenThread version string. * * @returns A pointer to the OpenThread version. * @@ -302,7 +302,7 @@ otError otInstanceErasePersistentInfo(otInstance *aInstance); const char *otGetVersionString(void); /** - * This function gets the OpenThread radio version string. + * Gets the OpenThread radio version string. * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/ip6.h b/include/openthread/ip6.h index c04bdc2ca..dba568537 100644 --- a/include/openthread/ip6.h +++ b/include/openthread/ip6.h @@ -60,7 +60,7 @@ extern "C" { /** * @struct otIp6InterfaceIdentifier * - * This structure represents the Interface Identifier of an IPv6 address. + * Represents the Interface Identifier of an IPv6 address. * */ OT_TOOL_PACKED_BEGIN @@ -75,7 +75,7 @@ struct otIp6InterfaceIdentifier } OT_TOOL_PACKED_END; /** - * This structure represents the Interface Identifier of an IPv6 address. + * Represents the Interface Identifier of an IPv6 address. * */ typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier; @@ -83,7 +83,7 @@ typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier; /** * @struct otIp6NetworkPrefix * - * This structure represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). + * Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). * */ OT_TOOL_PACKED_BEGIN @@ -93,7 +93,7 @@ struct otIp6NetworkPrefix } OT_TOOL_PACKED_END; /** - * This structure represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). + * Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). * */ typedef struct otIp6NetworkPrefix otIp6NetworkPrefix; @@ -101,7 +101,7 @@ typedef struct otIp6NetworkPrefix otIp6NetworkPrefix; /** * @struct otIp6AddressComponents * - * This structure represents the components of an IPv6 address. + * Represents the components of an IPv6 address. * */ OT_TOOL_PACKED_BEGIN @@ -112,7 +112,7 @@ struct otIp6AddressComponents } OT_TOOL_PACKED_END; /** - * This structure represents the components of an IPv6 address. + * Represents the components of an IPv6 address. * */ typedef struct otIp6AddressComponents otIp6AddressComponents; @@ -120,7 +120,7 @@ typedef struct otIp6AddressComponents otIp6AddressComponents; /** * @struct otIp6Address * - * This structure represents an IPv6 address. + * Represents an IPv6 address. * */ OT_TOOL_PACKED_BEGIN @@ -136,13 +136,13 @@ struct otIp6Address } OT_TOOL_PACKED_END; /** - * This structure represents an IPv6 address. + * Represents an IPv6 address. * */ typedef struct otIp6Address otIp6Address; /** - * This structure represents an IPv6 prefix. + * Represents an IPv6 prefix. * */ OT_TOOL_PACKED_BEGIN @@ -153,7 +153,7 @@ struct otIp6Prefix } OT_TOOL_PACKED_END; /** - * This structure represents an IPv6 prefix. + * Represents an IPv6 prefix. * */ typedef struct otIp6Prefix otIp6Prefix; @@ -171,7 +171,7 @@ enum }; /** - * This structure represents an IPv6 network interface unicast address. + * Represents an IPv6 network interface unicast address. * */ typedef struct otNetifAddress @@ -188,7 +188,7 @@ typedef struct otNetifAddress } otNetifAddress; /** - * This structure represents an IPv6 network interface multicast address. + * Represents an IPv6 network interface multicast address. * */ typedef struct otNetifMulticastAddress @@ -198,7 +198,7 @@ typedef struct otNetifMulticastAddress } otNetifMulticastAddress; /** - * This structure represents an IPv6 socket address. + * Represents an IPv6 socket address. * */ typedef struct otSockAddr @@ -220,7 +220,7 @@ enum }; /** - * This structure represents the local and peer IPv6 socket addresses. + * Represents the local and peer IPv6 socket addresses. * */ typedef struct otMessageInfo @@ -420,7 +420,7 @@ otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance, const otMessageSettings *aSettings); /** - * This function pointer is called when an IPv6 datagram is received. + * Pointer is called when an IPv6 datagram is received. * * @param[in] aMessage A pointer to the message buffer containing the received IPv6 datagram. This function transfers * the ownership of the @p aMessage to the receiver of the callback. The message should be @@ -431,7 +431,7 @@ otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance, typedef void (*otIp6ReceiveCallback)(otMessage *aMessage, void *aContext); /** - * This function registers a callback to provide received IPv6 datagrams. + * Registers a callback to provide received IPv6 datagrams. * * By default, this callback does not pass Thread control traffic. See otIp6SetReceiveFilterEnabled() to * change the Thread control traffic filter setting. @@ -450,7 +450,7 @@ void otIp6SetReceiveCallback(otInstance *aInstance, otIp6ReceiveCallback aCallba /** * @struct otIp6AddressInfo * - * This structure represents IPv6 address information. + * Represents IPv6 address information. * */ typedef struct otIp6AddressInfo @@ -462,7 +462,7 @@ typedef struct otIp6AddressInfo } otIp6AddressInfo; /** - * This function pointer is called when an internal IPv6 address is added or removed. + * Pointer is called when an internal IPv6 address is added or removed. * * @param[in] aAddressInfo A pointer to the IPv6 address information. * @param[in] aIsAdded TRUE if the @p aAddress was added, FALSE if @p aAddress was removed. @@ -472,7 +472,7 @@ typedef struct otIp6AddressInfo typedef void (*otIp6AddressCallback)(const otIp6AddressInfo *aAddressInfo, bool aIsAdded, void *aContext); /** - * This function registers a callback to notify internal IPv6 address changes. + * Registers a callback to notify internal IPv6 address changes. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to a function that is called when an internal IPv6 address is added or @@ -483,7 +483,7 @@ typedef void (*otIp6AddressCallback)(const otIp6AddressInfo *aAddressInfo, bool void otIp6SetAddressCallback(otInstance *aInstance, otIp6AddressCallback aCallback, void *aCallbackContext); /** - * This function indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams + * Indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams * via the callback specified in otIp6SetReceiveCallback(). * * @param[in] aInstance A pointer to an OpenThread instance. @@ -497,7 +497,7 @@ void otIp6SetAddressCallback(otInstance *aInstance, otIp6AddressCallback aCallba bool otIp6IsReceiveFilterEnabled(otInstance *aInstance); /** - * This function sets whether or not Thread control traffic is filtered out when delivering IPv6 datagrams + * Sets whether or not Thread control traffic is filtered out when delivering IPv6 datagrams * via the callback specified in otIp6SetReceiveCallback(). * * @param[in] aInstance A pointer to an OpenThread instance. @@ -510,7 +510,7 @@ bool otIp6IsReceiveFilterEnabled(otInstance *aInstance); void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled); /** - * This function sends an IPv6 datagram via the Thread interface. + * Sends an IPv6 datagram via the Thread interface. * * The caller transfers ownership of @p aMessage when making this call. OpenThread will free @p aMessage when * processing is complete, including when a value other than `OT_ERROR_NONE` is returned. @@ -530,7 +530,7 @@ void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled); otError otIp6Send(otInstance *aInstance, otMessage *aMessage); /** - * This function adds a port to the allowed unsecured port list. + * Adds a port to the allowed unsecured port list. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPort The port value. @@ -543,7 +543,7 @@ otError otIp6Send(otInstance *aInstance, otMessage *aMessage); otError otIp6AddUnsecurePort(otInstance *aInstance, uint16_t aPort); /** - * This function removes a port from the allowed unsecure port list. + * Removes a port from the allowed unsecure port list. * * @note This function removes @p aPort by overwriting @p aPort with the element after @p aPort in the internal port * list. Be careful when calling otIp6GetUnsecurePorts() followed by otIp6RemoveUnsecurePort() to remove unsecure @@ -560,7 +560,7 @@ otError otIp6AddUnsecurePort(otInstance *aInstance, uint16_t aPort); otError otIp6RemoveUnsecurePort(otInstance *aInstance, uint16_t aPort); /** - * This function removes all ports from the allowed unsecure port list. + * Removes all ports from the allowed unsecure port list. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -568,7 +568,7 @@ otError otIp6RemoveUnsecurePort(otInstance *aInstance, uint16_t aPort); void otIp6RemoveAllUnsecurePorts(otInstance *aInstance); /** - * This function returns a pointer to the unsecure port list. + * Returns a pointer to the unsecure port list. * * @note Port value 0 is used to indicate an invalid entry. * @@ -605,7 +605,7 @@ bool otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond bool otIp6ArePrefixesEqual(const otIp6Prefix *aFirst, const otIp6Prefix *aSecond); /** - * This function converts a human-readable IPv6 address string into a binary representation. + * Converts a human-readable IPv6 address string into a binary representation. * * @param[in] aString A pointer to a NULL-terminated string. * @param[out] aAddress A pointer to an IPv6 address. @@ -617,7 +617,7 @@ bool otIp6ArePrefixesEqual(const otIp6Prefix *aFirst, const otIp6Prefix *aSecond otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress); /** - * This function converts a human-readable IPv6 prefix string into a binary representation. + * Converts a human-readable IPv6 prefix string into a binary representation. * * The @p aString parameter should be a string in the format "
/", where `
` is an IPv6 * address and `` is a prefix length. @@ -634,7 +634,7 @@ otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix); #define OT_IP6_ADDRESS_STRING_SIZE 40 ///< Recommended size for string representation of an IPv6 address. /** - * This function converts a given IPv6 address to a human-readable string. + * Converts a given IPv6 address to a human-readable string. * * The IPv6 address string is formatted as 16 hex values separated by ':' (i.e., "%x:%x:%x:...:%x"). * @@ -651,7 +651,7 @@ void otIp6AddressToString(const otIp6Address *aAddress, char *aBuffer, uint16_t #define OT_IP6_SOCK_ADDR_STRING_SIZE 48 ///< Recommended size for string representation of an IPv6 socket address. /** - * This function converts a given IPv6 socket address to a human-readable string. + * Converts a given IPv6 socket address to a human-readable string. * * The IPv6 socket address string is formatted as [`address`]:`port` where `address` is shown * as 16 hex values separated by `:` and `port` is the port number in decimal format, @@ -670,7 +670,7 @@ void otIp6SockAddrToString(const otSockAddr *aSockAddr, char *aBuffer, uint16_t #define OT_IP6_PREFIX_STRING_SIZE 45 ///< Recommended size for string representation of an IPv6 prefix. /** - * This function converts a given IPv6 prefix to a human-readable string. + * Converts a given IPv6 prefix to a human-readable string. * * The IPv6 address string is formatted as "%x:%x:%x:...[::]/plen". * @@ -685,7 +685,7 @@ void otIp6SockAddrToString(const otSockAddr *aSockAddr, char *aBuffer, uint16_t void otIp6PrefixToString(const otIp6Prefix *aPrefix, char *aBuffer, uint16_t aSize); /** - * This function returns the prefix match length (bits) for two IPv6 addresses. + * Returns the prefix match length (bits) for two IPv6 addresses. * * @param[in] aFirst A pointer to the first IPv6 address. * @param[in] aSecond A pointer to the second IPv6 address. @@ -696,7 +696,7 @@ void otIp6PrefixToString(const otIp6Prefix *aPrefix, char *aBuffer, uint16_t aSi uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond); /** - * This method gets a prefix with @p aLength from @p aAddress. + * Gets a prefix with @p aLength from @p aAddress. * * @param[in] aAddress A pointer to an IPv6 address. * @param[in] aLength The length of prefix in bits. @@ -706,7 +706,7 @@ uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond void otIp6GetPrefix(const otIp6Address *aAddress, uint8_t aLength, otIp6Prefix *aPrefix); /** - * This function indicates whether or not a given IPv6 address is the Unspecified Address. + * Indicates whether or not a given IPv6 address is the Unspecified Address. * * @param[in] aAddress A pointer to an IPv6 address. * @@ -717,7 +717,7 @@ void otIp6GetPrefix(const otIp6Address *aAddress, uint8_t aLength, otIp6Prefix * bool otIp6IsAddressUnspecified(const otIp6Address *aAddress); /** - * This function perform OpenThread source address selection. + * Perform OpenThread source address selection. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in,out] aMessageInfo A pointer to the message information. @@ -729,9 +729,9 @@ bool otIp6IsAddressUnspecified(const otIp6Address *aAddress); otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageInfo); /** - * This function indicates whether the SLAAC module is enabled or not. + * Indicates whether the SLAAC module is enabled or not. * - * This function requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled. * * @retval TRUE SLAAC module is enabled. * @retval FALSE SLAAC module is disabled. @@ -740,9 +740,9 @@ otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageI bool otIp6IsSlaacEnabled(otInstance *aInstance); /** - * This function enables/disables the SLAAC module. + * Enables/disables the SLAAC module. * - * This function requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled. * * When SLAAC module is enabled, SLAAC addresses (based on on-mesh prefixes in Network Data) are added to the interface. * When SLAAC module is disabled any previously added SLAAC address is removed. @@ -754,7 +754,7 @@ bool otIp6IsSlaacEnabled(otInstance *aInstance); void otIp6SetSlaacEnabled(otInstance *aInstance, bool aEnabled); /** - * This function pointer allows user to filter prefixes and not allow an SLAAC address based on a prefix to be added. + * Pointer allows user to filter prefixes and not allow an SLAAC address based on a prefix to be added. * * `otIp6SetSlaacPrefixFilter()` can be used to set the filter handler. The filter handler is invoked by SLAAC module * when it is about to add a SLAAC address based on a prefix. Its boolean return value determines whether the address @@ -770,9 +770,9 @@ void otIp6SetSlaacEnabled(otInstance *aInstance, bool aEnabled); typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix *aPrefix); /** - * This function sets the SLAAC module filter handler. + * Sets the SLAAC module filter handler. * - * This function requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` to be enabled. * * The filter handler is called by SLAAC module when it is about to add a SLAAC address based on a prefix to decide * whether the address should be added or not. @@ -788,7 +788,7 @@ typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFilter); /** - * This function pointer is called with results of `otIp6RegisterMulticastListeners`. + * Pointer is called with results of `otIp6RegisterMulticastListeners`. * * @param[in] aContext A pointer to the user context. * @param[in] aError OT_ERROR_NONE when successfully sent MLR.req and received MLR.rsp, @@ -810,7 +810,7 @@ typedef void (*otIp6RegisterMulticastListenersCallback)(void *aCon #define OT_IP6_MAX_MLR_ADDRESSES 15 ///< Max number of IPv6 addresses supported by Multicast Listener Registration. /** - * This function registers Multicast Listeners to Primary Backbone Router. + * Registers Multicast Listeners to Primary Backbone Router. * * Note: only available when both `OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE` and * `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE` are enabled) @@ -843,7 +843,7 @@ otError otIp6RegisterMulticastListeners(otInstance * void *aContext); /** - * This function sets the Mesh Local IID (for test purpose). + * Sets the Mesh Local IID (for test purpose). * * Only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * @@ -857,7 +857,7 @@ otError otIp6RegisterMulticastListeners(otInstance * otError otIp6SetMeshLocalIid(otInstance *aInstance, const otIp6InterfaceIdentifier *aIid); /** - * This function converts a given IP protocol number to a human-readable string. + * Converts a given IP protocol number to a human-readable string. * * @param[in] aIpProto An IP protocol number (`OT_IP6_PROTO_*` enumeration). * @@ -867,7 +867,7 @@ otError otIp6SetMeshLocalIid(otInstance *aInstance, const otIp6InterfaceIdentifi const char *otIp6ProtoToString(uint8_t aIpProto); /** - * This structure represents the counters for packets and bytes. + * Represents the counters for packets and bytes. * */ typedef struct otPacketsAndBytes @@ -877,7 +877,7 @@ typedef struct otPacketsAndBytes } otPacketsAndBytes; /** - * This structure represents the counters of packets forwarded via Border Routing. + * Represents the counters of packets forwarded via Border Routing. * */ typedef struct otBorderRoutingCounters @@ -897,7 +897,7 @@ typedef struct otBorderRoutingCounters /** * Gets the Border Routing counters. * - * This function requires the build-time feature `OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/jam_detection.h b/include/openthread/jam_detection.h index f27669ce0..e49f8b430 100644 --- a/include/openthread/jam_detection.h +++ b/include/openthread/jam_detection.h @@ -55,7 +55,7 @@ extern "C" { */ /** - * This function pointer is called if signal jam detection is enabled and a jam is detected. + * Pointer is called if signal jam detection is enabled and a jam is detected. * * @param[in] aJamState Current jam state (`true` if jam is detected, `false` otherwise). * @param[in] aContext A pointer to application-specific context. diff --git a/include/openthread/joiner.h b/include/openthread/joiner.h index 586e88f54..dc4b09c82 100644 --- a/include/openthread/joiner.h +++ b/include/openthread/joiner.h @@ -56,7 +56,7 @@ extern "C" { */ /** - * This enumeration defines the Joiner State. + * Defines the Joiner State. * */ typedef enum otJoinerState @@ -72,7 +72,7 @@ typedef enum otJoinerState #define OT_JOINER_MAX_DISCERNER_LENGTH 64 ///< Maximum length of a Joiner Discerner in bits. /** - * This structure represents a Joiner Discerner. + * Represents a Joiner Discerner. * */ typedef struct otJoinerDiscerner @@ -82,7 +82,7 @@ typedef struct otJoinerDiscerner } otJoinerDiscerner; /** - * This function pointer is called to notify the completion of a join operation. + * Pointer is called to notify the completion of a join operation. * * @param[in] aError OT_ERROR_NONE if the join process succeeded. * OT_ERROR_SECURITY if the join process failed due to security credentials. @@ -188,7 +188,7 @@ otError otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerne const otJoinerDiscerner *otJoinerGetDiscerner(otInstance *aInstance); /** - * This function converts a given joiner state enumeration value to a human-readable string. + * Converts a given joiner state enumeration value to a human-readable string. * * @param[in] aState The joiner state. * diff --git a/include/openthread/link.h b/include/openthread/link.h index 289cf858b..1aa1c4804 100644 --- a/include/openthread/link.h +++ b/include/openthread/link.h @@ -55,7 +55,7 @@ extern "C" { #define OT_US_PER_TEN_SYMBOLS OT_RADIO_TEN_SYMBOLS_TIME ///< Time for 10 symbols in units of microseconds /** - * This structure represents link-specific information for messages received from the Thread radio. + * Represents link-specific information for messages received from the Thread radio. * */ typedef struct otThreadLinkInfo @@ -97,7 +97,7 @@ typedef enum otMacFilterAddressMode } otMacFilterAddressMode; /** - * This structure represents a Mac Filter entry. + * Represents a Mac Filter entry. * */ typedef struct otMacFilterEntry @@ -107,7 +107,7 @@ typedef struct otMacFilterEntry } otMacFilterEntry; /** - * This structure represents the MAC layer counters. + * Represents the MAC layer counters. * */ typedef struct otMacCounters @@ -374,7 +374,7 @@ typedef struct otMacCounters } otMacCounters; /** - * This structure represents a received IEEE 802.15.4 Beacon. + * Represents a received IEEE 802.15.4 Beacon. * */ typedef struct otActiveScanResult @@ -398,7 +398,7 @@ typedef struct otActiveScanResult } otActiveScanResult; /** - * This structure represents an energy scan result. + * Represents an energy scan result. * */ typedef struct otEnergyScanResult @@ -408,7 +408,7 @@ typedef struct otEnergyScanResult } otEnergyScanResult; /** - * This function pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or + * Pointer is called during an IEEE 802.15.4 Active Scan when an IEEE 802.15.4 Beacon is received or * the scan completes. * * @param[in] aResult A valid pointer to the beacon information or NULL when the active scan completes. @@ -418,7 +418,7 @@ typedef struct otEnergyScanResult typedef void (*otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext); /** - * This function starts an IEEE 802.15.4 Active Scan + * Starts an IEEE 802.15.4 Active Scan * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aScanChannels A bit vector indicating which channels to scan (e.g. OT_CHANNEL_11_MASK). @@ -437,7 +437,7 @@ otError otLinkActiveScan(otInstance *aInstance, void *aCallbackContext); /** - * This function indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress. + * Indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -446,7 +446,7 @@ otError otLinkActiveScan(otInstance *aInstance, bool otLinkIsActiveScanInProgress(otInstance *aInstance); /** - * This function pointer is called during an IEEE 802.15.4 Energy Scan when the result for a channel is ready or the + * Pointer is called during an IEEE 802.15.4 Energy Scan when the result for a channel is ready or the * scan completes. * * @param[in] aResult A valid pointer to the energy scan result information or NULL when the energy scan completes. @@ -456,7 +456,7 @@ bool otLinkIsActiveScanInProgress(otInstance *aInstance); typedef void (*otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aContext); /** - * This function starts an IEEE 802.15.4 Energy Scan + * Starts an IEEE 802.15.4 Energy Scan * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aScanChannels A bit vector indicating on which channels to perform energy scan. @@ -475,7 +475,7 @@ otError otLinkEnergyScan(otInstance *aInstance, void *aCallbackContext); /** - * This function indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress. + * Indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -485,7 +485,7 @@ otError otLinkEnergyScan(otInstance *aInstance, bool otLinkIsEnergyScanInProgress(otInstance *aInstance); /** - * This function enqueues an IEEE 802.15.4 Data Request message for transmission. + * Enqueues an IEEE 802.15.4 Data Request message for transmission. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -497,7 +497,7 @@ bool otLinkIsEnergyScanInProgress(otInstance *aInstance); otError otLinkSendDataRequest(otInstance *aInstance); /** - * This function indicates whether or not an IEEE 802.15.4 MAC is in the transmit state. + * Indicates whether or not an IEEE 802.15.4 MAC is in the transmit state. * * MAC module is in the transmit state during CSMA/CA procedure, CCA, Data, Beacon or Data Request frame transmission * and receiving an ACK of a transmitted frame. MAC module is not in the transmit state during transmission of an ACK @@ -525,7 +525,7 @@ uint8_t otLinkGetChannel(otInstance *aInstance); /** * Set the IEEE 802.15.4 channel * - * This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the + * Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the * Active and Pending Operational Datasets in non-volatile memory. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -553,7 +553,7 @@ uint32_t otLinkGetSupportedChannelMask(otInstance *aInstance); /** * Set the supported channel mask of MAC layer. * - * This function succeeds only when Thread protocols are disabled. + * Succeeds only when Thread protocols are disabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aChannelMask The supported channel mask (bit 0 or lsb mapping to channel 0, and so on). @@ -613,7 +613,7 @@ otPanId otLinkGetPanId(otInstance *aInstance); /** * Set the IEEE 802.15.4 PAN ID. * - * This function succeeds only when Thread protocols are disabled. A successful call to this function also invalidates + * Succeeds only when Thread protocols are disabled. A successful call to this function also invalidates * the Active and Pending Operational Datasets in non-volatile memory. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -674,7 +674,7 @@ otError otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPeriod); otShortAddress otLinkGetShortAddress(otInstance *aInstance); /** - * This method returns the maximum number of frame retries during direct transmission. + * Returns the maximum number of frame retries during direct transmission. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -684,7 +684,7 @@ otShortAddress otLinkGetShortAddress(otInstance *aInstance); uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance); /** - * This method sets the maximum number of frame retries during direct transmission. + * Sets the maximum number of frame retries during direct transmission. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMaxFrameRetriesDirect The maximum number of retries during direct transmission. @@ -693,7 +693,7 @@ uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance); void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetriesDirect); /** - * This method returns the maximum number of frame retries during indirect transmission. + * Returns the maximum number of frame retries during indirect transmission. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -703,7 +703,7 @@ void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetr uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance); /** - * This method sets the maximum number of frame retries during indirect transmission. + * Sets the maximum number of frame retries during indirect transmission. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMaxFrameRetriesIndirect The maximum number of retries during indirect transmission. @@ -712,9 +712,9 @@ uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance); void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect); /** - * This function gets the address mode of MAC filter. + * Gets the address mode of MAC filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -724,9 +724,9 @@ void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRe otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance); /** - * This function sets the address mode of MAC filter. + * Sets the address mode of MAC filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMode The address mode to set. @@ -735,9 +735,9 @@ otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance); void otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aMode); /** - * This method adds an Extended Address to MAC filter. + * Adds an Extended Address to MAC filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aExtAddress A pointer to the Extended Address (MUST NOT be NULL). @@ -749,9 +749,9 @@ void otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aM otError otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAddress); /** - * This method removes an Extended Address from MAC filter. + * Removes an Extended Address from MAC filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * No action is performed if there is no existing entry in Filter matching the given Extended Address. * @@ -762,9 +762,9 @@ otError otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAd void otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAddress); /** - * This method clears all the Extended Addresses from MAC filter. + * Clears all the Extended Addresses from MAC filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -772,9 +772,9 @@ void otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAd void otLinkFilterClearAddresses(otInstance *aInstance); /** - * This method gets an in-use address filter entry. + * Gets an in-use address filter entry. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in,out] aIterator A pointer to the MAC filter iterator context. To get the first in-use address filter @@ -788,10 +788,10 @@ void otLinkFilterClearAddresses(otInstance *aInstance); otError otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry); /** - * This method adds a fixed received signal strength (in dBm) entry for the messages from a given Extended Address in + * Adds a fixed received signal strength (in dBm) entry for the messages from a given Extended Address in * MAC Filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aExtAddress A pointer to the IEEE 802.15.4 Extended Address. MUST NOT be NULL. @@ -804,9 +804,9 @@ otError otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *a otError otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddress, int8_t aRss); /** - * This method removes a MAC Filter entry for fixed received signal strength setting for a given Extended Address. + * Removes a MAC Filter entry for fixed received signal strength setting for a given Extended Address. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * No action is performed if there is no existing entry in Filter matching the given Extended Address. * @@ -817,9 +817,9 @@ otError otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddr void otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddress); /** - * This method sets the default received signal strength (in dBm) on MAC Filter. + * Sets the default received signal strength (in dBm) on MAC Filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * The default RSS value is used for all received frames from addresses for which there is no explicit RSS-IN entry * in the Filter list (added using `otLinkFilterAddRssIn()`). @@ -831,9 +831,9 @@ void otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddr void otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss); /** - * This method clears any previously set default received signal strength (in dBm) on MAC Filter. + * Clears any previously set default received signal strength (in dBm) on MAC Filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -841,9 +841,9 @@ void otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss); void otLinkFilterClearDefaultRssIn(otInstance *aInstance); /** - * This method clears all the received signal strength entries (including default RSS-in) on MAC Filter. + * Clears all the received signal strength entries (including default RSS-in) on MAC Filter. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -851,9 +851,9 @@ void otLinkFilterClearDefaultRssIn(otInstance *aInstance); void otLinkFilterClearAllRssIn(otInstance *aInstance); /** - * This method gets an in-use RssIn filter entry. + * Gets an in-use RssIn filter entry. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in,out] aIterator A pointer to the MAC filter iterator context. MUST NOT be NULL. @@ -869,9 +869,9 @@ void otLinkFilterClearAllRssIn(otInstance *aInstance); otError otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry); /** - * This function enables/disables IEEE 802.15.4 radio filter mode. + * Enables/disables IEEE 802.15.4 radio filter mode. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * The radio filter is mainly intended for testing. It can be used to temporarily block all tx/rx on the 802.15.4 radio. * When radio filter is enabled, radio is put to sleep instead of receive (to ensure device does not receive any frame @@ -885,9 +885,9 @@ otError otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIt void otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled); /** - * This function indicates whether the IEEE 802.15.4 radio filter is enabled or not. + * Indicates whether the IEEE 802.15.4 radio filter is enabled or not. * - * This function is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. + * Is available when OPENTHREAD_CONFIG_MAC_FILTER_ENABLE configuration is enabled. * * @retval TRUE If the radio filter is enabled. * @retval FALSE If the radio filter is disabled. @@ -896,7 +896,7 @@ void otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled); bool otLinkIsRadioFilterEnabled(otInstance *aInstance); /** - * This method converts received signal strength to link quality. + * Converts received signal strength to link quality. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aRss The received signal strength value to be converted. @@ -907,7 +907,7 @@ bool otLinkIsRadioFilterEnabled(otInstance *aInstance); uint8_t otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss); /** - * This method converts link quality to typical received signal strength. + * Converts link quality to typical received signal strength. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aLinkQuality LinkQuality value, should be in range [0,3]. @@ -918,9 +918,9 @@ uint8_t otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss); int8_t otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality); /** - * This method gets histogram of retries for a single direct packet until success. + * Gets histogram of retries for a single direct packet until success. * - * This function is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled. + * Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aNumberOfEntries A pointer to where the size of returned histogram array is placed. @@ -931,9 +931,9 @@ int8_t otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality const uint32_t *otLinkGetTxDirectRetrySuccessHistogram(otInstance *aInstance, uint8_t *aNumberOfEntries); /** - * This method gets histogram of retries for a single indirect packet until success. + * Gets histogram of retries for a single indirect packet until success. * - * This function is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled. + * Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aNumberOfEntries A pointer to where the size of returned histogram array is placed. @@ -945,9 +945,9 @@ const uint32_t *otLinkGetTxDirectRetrySuccessHistogram(otInstance *aInstance, ui const uint32_t *otLinkGetTxIndirectRetrySuccessHistogram(otInstance *aInstance, uint8_t *aNumberOfEntries); /** - * This method clears histogram statistics for direct and indirect transmissions. + * Clears histogram statistics for direct and indirect transmissions. * - * This function is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled. + * Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -973,7 +973,7 @@ const otMacCounters *otLinkGetCounters(otInstance *aInstance); void otLinkResetCounters(otInstance *aInstance); /** - * This function pointer is called when an IEEE 802.15.4 frame is received. + * Pointer is called when an IEEE 802.15.4 frame is received. * * @note This callback is called after FCS processing and @p aFrame may not contain the actual FCS that was received. * @@ -987,7 +987,7 @@ void otLinkResetCounters(otInstance *aInstance); typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void *aContext); /** - * This function registers a callback to provide received raw IEEE 802.15.4 frames. + * Registers a callback to provide received raw IEEE 802.15.4 frames. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPcapCallback A pointer to a function that is called when receiving an IEEE 802.15.4 link frame or @@ -998,7 +998,7 @@ typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallback, void *aCallbackContext); /** - * This function indicates whether or not promiscuous mode is enabled at the link layer. + * Indicates whether or not promiscuous mode is enabled at the link layer. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -1009,7 +1009,7 @@ void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallba bool otLinkIsPromiscuous(otInstance *aInstance); /** - * This function enables or disables the link layer promiscuous mode. + * Enables or disables the link layer promiscuous mode. * * @note Promiscuous mode may only be enabled when the Thread interface is disabled. * @@ -1024,7 +1024,7 @@ bool otLinkIsPromiscuous(otInstance *aInstance); otError otLinkSetPromiscuous(otInstance *aInstance, bool aPromiscuous); /** - * This function gets the CSL channel. + * Gets the CSL channel. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -1047,7 +1047,7 @@ uint8_t otLinkCslGetChannel(otInstance *aInstance); otError otLinkCslSetChannel(otInstance *aInstance, uint8_t aChannel); /** - * This function gets the CSL period. + * Gets the CSL period. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -1069,7 +1069,7 @@ uint16_t otLinkCslGetPeriod(otInstance *aInstance); otError otLinkCslSetPeriod(otInstance *aInstance, uint16_t aPeriod); /** - * This function gets the CSL timeout. + * Gets the CSL timeout. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -1091,7 +1091,7 @@ uint32_t otLinkCslGetTimeout(otInstance *aInstance); otError otLinkCslSetTimeout(otInstance *aInstance, uint32_t aTimeout); /** - * This function returns the current CCA (Clear Channel Assessment) failure rate. + * Returns the current CCA (Clear Channel Assessment) failure rate. * * The rate is maintained over a window of (roughly) last `OPENTHREAD_CONFIG_CCA_FAILURE_RATE_AVERAGING_WINDOW` * frame transmissions. @@ -1102,7 +1102,7 @@ otError otLinkCslSetTimeout(otInstance *aInstance, uint32_t aTimeout); uint16_t otLinkGetCcaFailureRate(otInstance *aInstance); /** - * This function enables or disables the link layer. + * Enables or disables the link layer. * * @note The link layer may only be enabled / disabled when the Thread Interface is disabled. * @@ -1117,7 +1117,7 @@ uint16_t otLinkGetCcaFailureRate(otInstance *aInstance); otError otLinkSetEnabled(otInstance *aInstance, bool aEnable); /** - * This function indicates whether or not the link layer is enabled. + * Indicates whether or not the link layer is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -1128,9 +1128,9 @@ otError otLinkSetEnabled(otInstance *aInstance, bool aEnable); bool otLinkIsEnabled(otInstance *aInstance); /** - * This function instructs the device to send an empty IEEE 802.15.4 data frame. + * Instructs the device to send an empty IEEE 802.15.4 data frame. * - * This function is only supported on an Rx-Off-When-Idle device to send an empty data frame to its parent. + * Is only supported on an Rx-Off-When-Idle device to send an empty data frame to its parent. * Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. diff --git a/include/openthread/link_metrics.h b/include/openthread/link_metrics.h index fc9a7f009..f5813fc9d 100644 --- a/include/openthread/link_metrics.h +++ b/include/openthread/link_metrics.h @@ -56,7 +56,7 @@ extern "C" { */ /** - * This structure represents the result (value) for a Link Metrics query. + * Represents the result (value) for a Link Metrics query. * */ typedef struct otLinkMetricsValues @@ -70,7 +70,7 @@ typedef struct otLinkMetricsValues } otLinkMetricsValues; /** - * This structure represents which frames are accounted in a Forward Tracking Series. + * Represents which frames are accounted in a Forward Tracking Series. * */ typedef struct otLinkMetricsSeriesFlags @@ -108,7 +108,7 @@ typedef enum otLinkMetricsStatus } otLinkMetricsStatus; /** - * This function pointer is called when a Link Metrics report is received. + * Pointer is called when a Link Metrics report is received. * * @param[in] aSource A pointer to the source address. * @param[in] aMetricsValues A pointer to the Link Metrics values (the query result). @@ -121,7 +121,7 @@ typedef void (*otLinkMetricsReportCallback)(const otIp6Address *aSource, uint8_t aStatus, void *aContext); /** - * This function pointer is called when a Link Metrics Management Response is received. + * Pointer is called when a Link Metrics Management Response is received. * * @param[in] aSource A pointer to the source address. * @param[in] aStatus The status code in the response. @@ -131,7 +131,7 @@ typedef void (*otLinkMetricsReportCallback)(const otIp6Address *aSource, typedef void (*otLinkMetricsMgmtResponseCallback)(const otIp6Address *aSource, uint8_t aStatus, void *aContext); /** - * This function pointer is called when Enh-ACK Probing IE is received. + * Pointer is called when Enh-ACK Probing IE is received. * * @param[in] aShortAddress The Mac short address of the Probing Subject. * @param[in] aExtAddress A pointer to the Mac extended address of the Probing Subject. @@ -145,7 +145,7 @@ typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress void *aContext); /** - * This function sends an MLE Data Request to query Link Metrics. + * Sends an MLE Data Request to query Link Metrics. * * It could be either Single Probe or Forward Tracking Series. * @@ -198,7 +198,7 @@ otError otLinkMetricsConfigForwardTrackingSeries(otInstance void *aCallbackContext); /** - * This function sends an MLE Link Metrics Management Request to configure/clear an Enhanced-ACK Based Probing. + * Sends an MLE Link Metrics Management Request to configure/clear an Enhanced-ACK Based Probing. * This functionality requires OT_LINK_METRICS_INITIATOR feature enabled. * * @param[in] aInstance A pointer to an OpenThread instance. diff --git a/include/openthread/link_raw.h b/include/openthread/link_raw.h index 1f43a0578..c5ba5adba 100644 --- a/include/openthread/link_raw.h +++ b/include/openthread/link_raw.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This function pointer on receipt of a IEEE 802.15.4 frame. + * Pointer on receipt of a IEEE 802.15.4 frame. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aFrame A pointer to the received frame or NULL if the receive operation was aborted. @@ -63,7 +63,7 @@ extern "C" { typedef void (*otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError); /** - * This function enables/disables the raw link-layer. + * Enables/disables the raw link-layer. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to a function called on receipt of a IEEE 802.15.4 frame. NULL to disable the @@ -77,7 +77,7 @@ typedef void (*otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame otError otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCallback); /** - * This function indicates whether or not the raw link-layer is enabled. + * Indicates whether or not the raw link-layer is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -88,7 +88,7 @@ otError otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCal bool otLinkRawIsEnabled(otInstance *aInstance); /** - * This function gets the status of promiscuous mode. + * Gets the status of promiscuous mode. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -99,7 +99,7 @@ bool otLinkRawIsEnabled(otInstance *aInstance); bool otLinkRawGetPromiscuous(otInstance *aInstance); /** - * This function enables or disables promiscuous mode. + * Enables or disables promiscuous mode. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnable A value to enable or disable promiscuous mode. @@ -149,7 +149,7 @@ otError otLinkRawReceive(otInstance *aInstance); /** * The radio transitions from Transmit to Receive. - * This method returns a pointer to the transmit buffer. + * Returns a pointer to the transmit buffer. * * The caller forms the IEEE 802.15.4 frame in this buffer then calls otLinkRawTransmit() * to request transmission. @@ -162,7 +162,7 @@ otError otLinkRawReceive(otInstance *aInstance); otRadioFrame *otLinkRawGetTransmitBuffer(otInstance *aInstance); /** - * This function pointer on receipt of a IEEE 802.15.4 frame. + * Pointer on receipt of a IEEE 802.15.4 frame. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aFrame A pointer to the frame that was transmitted. @@ -180,7 +180,7 @@ typedef void (*otLinkRawTransmitDone)(otInstance *aInstance, otError aError); /** - * This method begins the transmit sequence on the radio. + * Begins the transmit sequence on the radio. * * The caller must form the IEEE 802.15.4 frame in the buffer provided by otLinkRawGetTransmitBuffer() before * requesting transmission. The channel and transmit power are also included in the otRadioFrame structure. @@ -219,7 +219,7 @@ int8_t otLinkRawGetRssi(otInstance *aInstance); otRadioCaps otLinkRawGetCaps(otInstance *aInstance); /** - * This function pointer on receipt of a IEEE 802.15.4 frame. + * Pointer on receipt of a IEEE 802.15.4 frame. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnergyScanMaxRssi The maximum RSSI encountered on the scanned channel. @@ -228,7 +228,7 @@ otRadioCaps otLinkRawGetCaps(otInstance *aInstance); typedef void (*otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi); /** - * This method begins the energy scan sequence on the radio. + * Begins the energy scan sequence on the radio. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aScanChannel The channel to perform the energy scan on. @@ -356,7 +356,7 @@ otError otLinkRawSetMacKey(otInstance *aInstance, /** * Sets the current MAC frame counter value. * - * This function always sets the MAC counter to the new given value @p aMacFrameCounter independent of the current + * Always sets the MAC counter to the new given value @p aMacFrameCounter independent of the current * value. * * @param[in] aInstance A pointer to an OpenThread instance. diff --git a/include/openthread/logging.h b/include/openthread/logging.h index b581b2702..143a0d511 100644 --- a/include/openthread/logging.h +++ b/include/openthread/logging.h @@ -53,7 +53,7 @@ extern "C" { */ /** - * This function returns the current log level. + * Returns the current log level. * * If dynamic log level feature `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE` is enabled, this function returns the * currently set dynamic log level. Otherwise, this function returns the build-time configured log level. @@ -64,7 +64,7 @@ extern "C" { otLogLevel otLoggingGetLevel(void); /** - * This function sets the log level. + * Sets the log level. * * @note This function requires `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1`. * @@ -77,9 +77,9 @@ otLogLevel otLoggingGetLevel(void); otError otLoggingSetLevel(otLogLevel aLogLevel); /** - * This function emits a log message at critical log level. + * Emits a log message at critical log level. * - * This function is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log + * Is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log * level is below critical, this function does not emit any log message. * * @param[in] aFormat The format string. @@ -89,9 +89,9 @@ otError otLoggingSetLevel(otLogLevel aLogLevel); void otLogCritPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); /** - * This function emits a log message at warning log level. + * Emits a log message at warning log level. * - * This function is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log + * Is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log * level is below warning, this function does not emit any log message. * * @param[in] aFormat The format string. @@ -101,9 +101,9 @@ void otLogCritPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE void otLogWarnPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); /** - * This function emits a log message at note log level. + * Emits a log message at note log level. * - * This function is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log + * Is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log * level is below note, this function does not emit any log message. * * @param[in] aFormat The format string. @@ -113,9 +113,9 @@ void otLogWarnPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE void otLogNotePlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); /** - * This function emits a log message at info log level. + * Emits a log message at info log level. * - * This function is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log + * Is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log * level is below info, this function does not emit any log message. * * @param[in] aFormat The format string. @@ -125,9 +125,9 @@ void otLogNotePlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE void otLogInfoPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); /** - * This function emits a log message at debug log level. + * Emits a log message at debug log level. * - * This function is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log + * Is intended for use by platform. If `OPENTHREAD_CONFIG_LOG_PLATFORM` is not set or the current log * level is below debug, this function does not emit any log message. * * @param[in] aFormat The format string. @@ -137,7 +137,7 @@ void otLogInfoPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE void otLogDebgPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); /** - * This function generates a memory dump at critical log level. + * Generates a memory dump at critical log level. * * If `OPENTHREAD_CONFIG_LOG_PLATFORM` or `OPENTHREAD_CONFIG_LOG_PKT_DUMP` is not set or the current log level is below * critical this function does not emit any log message. @@ -150,7 +150,7 @@ void otLogDebgPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE void otDumpCritPlat(const char *aText, const void *aData, uint16_t aDataLength); /** - * This function generates a memory dump at warning log level. + * Generates a memory dump at warning log level. * * If `OPENTHREAD_CONFIG_LOG_PLATFORM` or `OPENTHREAD_CONFIG_LOG_PKT_DUMP` is not set or the current log level is below * warning this function does not emit any log message. @@ -163,7 +163,7 @@ void otDumpCritPlat(const char *aText, const void *aData, uint16_t aDataLength); void otDumpWarnPlat(const char *aText, const void *aData, uint16_t aDataLength); /** - * This function generates a memory dump at note log level. + * Generates a memory dump at note log level. * * If `OPENTHREAD_CONFIG_LOG_PLATFORM` or `OPENTHREAD_CONFIG_LOG_PKT_DUMP` is not set or the current log level is below * note this function does not emit any log message. @@ -176,7 +176,7 @@ void otDumpWarnPlat(const char *aText, const void *aData, uint16_t aDataLength); void otDumpNotePlat(const char *aText, const void *aData, uint16_t aDataLength); /** - * This function generates a memory dump at info log level. + * Generates a memory dump at info log level. * * If `OPENTHREAD_CONFIG_LOG_PLATFORM` or `OPENTHREAD_CONFIG_LOG_PKT_DUMP` is not set or the current log level is below * info this function does not emit any log message. @@ -189,7 +189,7 @@ void otDumpNotePlat(const char *aText, const void *aData, uint16_t aDataLength); void otDumpInfoPlat(const char *aText, const void *aData, uint16_t aDataLength); /** - * This function generates a memory dump at debug log level. + * Generates a memory dump at debug log level. * * If `OPENTHREAD_CONFIG_LOG_PLATFORM` or `OPENTHREAD_CONFIG_LOG_PKT_DUMP` is not set or the current log level is below * debug this function does not emit any log message. @@ -202,9 +202,9 @@ void otDumpInfoPlat(const char *aText, const void *aData, uint16_t aDataLength); void otDumpDebgPlat(const char *aText, const void *aData, uint16_t aDataLength); /** - * This function emits a log message at a given log level. + * Emits a log message at a given log level. * - * This function is intended for use by CLI only. If `OPENTHREAD_CONFIG_LOG_CLI` is not set or the current log + * Is intended for use by CLI only. If `OPENTHREAD_CONFIG_LOG_CLI` is not set or the current log * level is below the given log level, this function does not emit any log message. * * @param[in] aLogLevel The log level. diff --git a/include/openthread/mesh_diag.h b/include/openthread/mesh_diag.h index dd613d1fa..cd9cb3509 100644 --- a/include/openthread/mesh_diag.h +++ b/include/openthread/mesh_diag.h @@ -55,7 +55,7 @@ extern "C" { */ /** - * This structure represents the set of configurations used when discovering mesh topology indicating which items to + * Represents the set of configurations used when discovering mesh topology indicating which items to * discover. * */ @@ -66,7 +66,7 @@ typedef struct otMeshDiagDiscoverConfig } otMeshDiagDiscoverConfig; /** - * This type is an opaque iterator to iterate over list of IPv6 addresses of a router. + * An opaque iterator to iterate over list of IPv6 addresses of a router. * * Pointers to instance of this type are provided in `otMeshDiagRouterInfo`. * @@ -74,7 +74,7 @@ typedef struct otMeshDiagDiscoverConfig typedef struct otMeshDiagIp6AddrIterator otMeshDiagIp6AddrIterator; /** - * This type is an opaque iterator to iterate over list of children of a router. + * An opaque iterator to iterate over list of children of a router. * * Pointers to instance of this type are provided in `otMeshDiagRouterInfo`. * @@ -91,7 +91,7 @@ typedef struct otMeshDiagChildIterator otMeshDiagChildIterator; #define OT_MESH_DIAG_VERSION_UNKNOWN 0xffff /** - * This type represents information about a router in Thread mesh. + * Represents information about a router in Thread mesh. * */ typedef struct otMeshDiagRouterInfo @@ -142,7 +142,7 @@ typedef struct otMeshDiagRouterInfo } otMeshDiagRouterInfo; /** - * This type represents information about a discovered child in Thread mesh. + * Represents information about a discovered child in Thread mesh. * */ typedef struct otMeshDiagChildInfo @@ -155,7 +155,7 @@ typedef struct otMeshDiagChildInfo } otMeshDiagChildInfo; /** - * This function pointer type represents the callback used by `otMeshDiagDiscoverTopology()` to provide information + * Pointer type represents the callback used by `otMeshDiagDiscoverTopology()` to provide information * about a discovered router. * * When @p aError is `OT_ERROR_PENDING`, it indicates that the discovery is not yet finished and there will be more @@ -171,7 +171,7 @@ typedef struct otMeshDiagChildInfo typedef void (*otMeshDiagDiscoverCallback)(otError aError, otMeshDiagRouterInfo *aRouterInfo, void *aContext); /** - * This function starts network topology discovery. + * Starts network topology discovery. * * @param[in] aInstance The OpenThread instance. * @param[in] aConfig The configuration to use for discovery (e.g., which items to discover). @@ -190,7 +190,7 @@ otError otMeshDiagDiscoverTopology(otInstance *aInstance, void *aContext); /** - * This function cancels an ongoing topology discovery if there is one, otherwise no action. + * Cancels an ongoing topology discovery if there is one, otherwise no action. * * When ongoing discovery is cancelled, the callback from `otMeshDiagDiscoverTopology()` will not be called anymore. * @@ -198,7 +198,7 @@ otError otMeshDiagDiscoverTopology(otInstance *aInstance, void otMeshDiagCancel(otInstance *aInstance); /** - * This function iterates through the discovered IPv6 address of a router. + * Iterates through the discovered IPv6 address of a router. * * @param[in,out] aIterator The address iterator to use. * @param[out] aIp6Address A pointer to return the next IPv6 address (if any). @@ -210,7 +210,7 @@ void otMeshDiagCancel(otInstance *aInstance); otError otMeshDiagGetNextIp6Address(otMeshDiagIp6AddrIterator *aIterator, otIp6Address *aIp6Address); /** - * This function iterates through the discovered children of a router. + * Iterates through the discovered children of a router. * * @param[in,out] aIterator The address iterator to use. * @param[out] aChildInfo A pointer to return the child info (if any). diff --git a/include/openthread/message.h b/include/openthread/message.h index 0826ddb31..6bdf5f1be 100644 --- a/include/openthread/message.h +++ b/include/openthread/message.h @@ -53,13 +53,13 @@ extern "C" { */ /** - * This type is an opaque representation of an OpenThread message buffer. + * An opaque representation of an OpenThread message buffer. * */ typedef struct otMessage otMessage; /** - * This enumeration defines the OpenThread message priority levels. + * Defines the OpenThread message priority levels. * */ typedef enum otMessagePriority @@ -70,7 +70,7 @@ typedef enum otMessagePriority } otMessagePriority; /** - * This structure represents a message settings. + * Represents a message settings. * */ typedef struct otMessageSettings @@ -170,7 +170,7 @@ uint16_t otMessageGetOffset(const otMessage *aMessage); void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset); /** - * This function indicates whether or not link security is enabled for the message. + * Indicates whether or not link security is enabled for the message. * * @param[in] aMessage A pointer to a message buffer. * @@ -181,7 +181,7 @@ void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset); bool otMessageIsLinkSecurityEnabled(const otMessage *aMessage); /** - * This function sets/forces the message to be forwarded using direct transmission. + * Sets/forces the message to be forwarded using direct transmission. * Default setting for a new message is `false`. * * @param[in] aMessage A pointer to a message buffer. @@ -192,7 +192,7 @@ bool otMessageIsLinkSecurityEnabled(const otMessage *aMessage); void otMessageSetDirectTransmission(otMessage *aMessage, bool aEnabled); /** - * This function returns the average RSS (received signal strength) associated with the message. + * Returns the average RSS (received signal strength) associated with the message. * * @returns The average RSS value (in dBm) or OT_RADIO_RSSI_INVALID if no average RSS is available. * @@ -263,7 +263,7 @@ uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, int otMessageWrite(otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength); /** - * This structure represents an OpenThread message queue. + * Represents an OpenThread message queue. */ typedef struct { @@ -271,7 +271,7 @@ typedef struct } otMessageQueue; /** - * This structure represents information about a message queue. + * Represents information about a message queue. * */ typedef struct otMessageQueueInfo @@ -282,7 +282,7 @@ typedef struct otMessageQueueInfo } otMessageQueueInfo; /** - * This structure represents the message buffer information for different queues used by OpenThread stack. + * Represents the message buffer information for different queues used by OpenThread stack. * */ typedef struct otBufferInfo @@ -310,7 +310,7 @@ typedef struct otBufferInfo /** * Initialize the message queue. * - * This function MUST be called once and only once for a `otMessageQueue` instance before any other `otMessageQueue` + * MUST be called once and only once for a `otMessageQueue` instance before any other `otMessageQueue` * functions. The behavior is undefined if other queue APIs are used with an `otMessageQueue` before it being * initialized or if it is initialized more than once. * @@ -320,7 +320,7 @@ typedef struct otBufferInfo void otMessageQueueInit(otMessageQueue *aQueue); /** - * This function adds a message to the end of the given message queue. + * Adds a message to the end of the given message queue. * * @param[in] aQueue A pointer to the message queue. * @param[in] aMessage The message to add. @@ -329,7 +329,7 @@ void otMessageQueueInit(otMessageQueue *aQueue); void otMessageQueueEnqueue(otMessageQueue *aQueue, otMessage *aMessage); /** - * This function adds a message at the head/front of the given message queue. + * Adds a message at the head/front of the given message queue. * * @param[in] aQueue A pointer to the message queue. * @param[in] aMessage The message to add. @@ -338,7 +338,7 @@ void otMessageQueueEnqueue(otMessageQueue *aQueue, otMessage *aMessage); void otMessageQueueEnqueueAtHead(otMessageQueue *aQueue, otMessage *aMessage); /** - * This function removes a message from the given message queue. + * Removes a message from the given message queue. * * @param[in] aQueue A pointer to the message queue. * @param[in] aMessage The message to remove. @@ -347,7 +347,7 @@ void otMessageQueueEnqueueAtHead(otMessageQueue *aQueue, otMessage *aMessage); void otMessageQueueDequeue(otMessageQueue *aQueue, otMessage *aMessage); /** - * This function returns a pointer to the message at the head of the queue. + * Returns a pointer to the message at the head of the queue. * * @param[in] aQueue A pointer to a message queue. * @@ -357,7 +357,7 @@ void otMessageQueueDequeue(otMessageQueue *aQueue, otMessage *aMessage); otMessage *otMessageQueueGetHead(otMessageQueue *aQueue); /** - * This function returns a pointer to the next message in the queue by iterating forward (from head to tail). + * Returns a pointer to the next message in the queue by iterating forward (from head to tail). * * @param[in] aQueue A pointer to a message queue. * @param[in] aMessage A pointer to current message buffer. diff --git a/include/openthread/multi_radio.h b/include/openthread/multi_radio.h index 13930f58c..48a19aa36 100644 --- a/include/openthread/multi_radio.h +++ b/include/openthread/multi_radio.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This type represents information associated with a radio link. + * Represents information associated with a radio link. * */ typedef struct otRadioLinkInfo @@ -61,7 +61,7 @@ typedef struct otRadioLinkInfo } otRadioLinkInfo; /** - * This type represents multi radio link information associated with a neighbor. + * Represents multi radio link information associated with a neighbor. * */ typedef struct otMultiRadioNeighborInfo @@ -73,9 +73,9 @@ typedef struct otMultiRadioNeighborInfo } otMultiRadioNeighborInfo; /** - * This function gets the multi radio link information associated with a neighbor with a given Extended Address. + * Gets the multi radio link information associated with a neighbor with a given Extended Address. * - * This function requires the multi radio link feature to be enabled (please see `config/radio_link.h`). + * Requires the multi radio link feature to be enabled (please see `config/radio_link.h`). * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aExtAddress The Extended Address of neighbor. diff --git a/include/openthread/nat64.h b/include/openthread/nat64.h index cd1eec299..1e69da6e8 100644 --- a/include/openthread/nat64.h +++ b/include/openthread/nat64.h @@ -57,7 +57,7 @@ extern "C" { /** * @struct otIp4Address * - * This structure represents an IPv4 address. + * Represents an IPv4 address. * */ OT_TOOL_PACKED_BEGIN @@ -71,7 +71,7 @@ struct otIp4Address } OT_TOOL_PACKED_END; /** - * This structure represents an IPv4 address. + * Represents an IPv4 address. * */ typedef struct otIp4Address otIp4Address; @@ -79,7 +79,7 @@ typedef struct otIp4Address otIp4Address; /** * @struct otIp4Cidr * - * This structure represents an IPv4 CIDR block. + * Represents an IPv4 CIDR block. * */ typedef struct otIp4Cidr @@ -317,7 +317,7 @@ otMessage *otIp4NewMessage(otInstance *aInstance, const otMessageSettings *aSett /** * Sets the CIDR used when setting the source address of the outgoing translated IPv4 packets. * - * This function is available only when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE is enabled. + * Is available only when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE is enabled. * * @note A valid CIDR must have a non-zero prefix length. The actual addresses pool is limited by the size of the * mapping pool and the number of addresses available in the CIDR block. @@ -358,7 +358,7 @@ otError otNat64SetIp4Cidr(otInstance *aInstance, const otIp4Cidr *aCidr); otError otNat64Send(otInstance *aInstance, otMessage *aMessage); /** - * This function pointer is called when an IPv4 datagram (translated by NAT64 translator) is received. + * Pointer is called when an IPv4 datagram (translated by NAT64 translator) is received. * * @param[in] aMessage A pointer to the message buffer containing the received IPv6 datagram. This function transfers * the ownership of the @p aMessage to the receiver of the callback. The message should be @@ -436,7 +436,7 @@ void otIp4AddressToString(const otIp4Address *aAddress, char *aBuffer, uint16_t #define OT_IP4_CIDR_STRING_SIZE 20 ///< Length of 000.000.000.000/00 plus a suffix NUL /** - * This function converts a human-readable IPv4 CIDR string into a binary representation. + * Converts a human-readable IPv4 CIDR string into a binary representation. * * @param[in] aString A pointer to a NULL-terminated string. * @param[out] aCidr A pointer to an IPv4 CIDR. diff --git a/include/openthread/ncp.h b/include/openthread/ncp.h index 4576c7fd3..7e07fa290 100644 --- a/include/openthread/ncp.h +++ b/include/openthread/ncp.h @@ -55,7 +55,7 @@ extern "C" { */ /** - * This function pointer is called to send HDLC encoded NCP data. + * Pointer is called to send HDLC encoded NCP data. * * @param[in] aBuf A pointer to a buffer with an output. * @param[in] aBufLength A length of the output data stored in the buffer. @@ -66,13 +66,13 @@ extern "C" { typedef int (*otNcpHdlcSendCallback)(const uint8_t *aBuf, uint16_t aBufLength); /** - * This function is called after NCP send finished. + * Is called after NCP send finished. * */ void otNcpHdlcSendDone(void); /** - * This function is called after HDLC encoded NCP data received. + * Is called after HDLC encoded NCP data received. * * @param[in] aBuf A pointer to a buffer. * @param[in] aBufLength The length of the data stored in the buffer. @@ -100,7 +100,7 @@ void otNcpSpiInit(otInstance *aInstance); /** * @brief Send data to the host via a specific stream. * - * This function attempts to send the given data to the host + * Attempts to send the given data to the host * using the given aStreamId. This is useful for reporting * error messages, implementing debug/diagnostic consoles, * and potentially other types of datastreams. @@ -149,7 +149,7 @@ void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFo typedef bool (*otNcpDelegateAllowPeekPoke)(uint32_t aAddress, uint16_t aCount); /** - * This method registers peek/poke delegate functions with NCP module. + * Registers peek/poke delegate functions with NCP module. * * The delegate functions are called by NCP module to decide whether to allow peek or poke of a specific memory region. * If the delegate pointer is set to NULL, it allows peek/poke operation for any address. diff --git a/include/openthread/netdata.h b/include/openthread/netdata.h index ba9992114..ea1791e90 100644 --- a/include/openthread/netdata.h +++ b/include/openthread/netdata.h @@ -53,7 +53,7 @@ extern "C" { typedef uint32_t otNetworkDataIterator; ///< Used to iterate through Network Data information. /** - * This structure represents a Border Router configuration. + * Represents a Border Router configuration. */ typedef struct otBorderRouterConfig { @@ -72,7 +72,7 @@ typedef struct otBorderRouterConfig } otBorderRouterConfig; /** - * This structure represents 6LoWPAN Context ID information associated with a prefix in Network Data. + * Represents 6LoWPAN Context ID information associated with a prefix in Network Data. * */ typedef struct otLowpanContextInfo @@ -83,7 +83,7 @@ typedef struct otLowpanContextInfo } otLowpanContextInfo; /** - * This structure represents an External Route configuration. + * Represents an External Route configuration. * */ typedef struct otExternalRouteConfig @@ -111,7 +111,7 @@ typedef enum otRoutePreference #define OT_SERVER_DATA_MAX_SIZE 248 ///< Max size of Server Data in bytes. Theoretical limit, practically much lower. /** - * This structure represents a Server configuration. + * Represents a Server configuration. * */ typedef struct otServerConfig @@ -123,7 +123,7 @@ typedef struct otServerConfig } otServerConfig; /** - * This structure represents a Service configuration. + * Represents a Service configuration. * */ typedef struct otServiceConfig diff --git a/include/openthread/netdata_publisher.h b/include/openthread/netdata_publisher.h index 10346c254..60df1f658 100644 --- a/include/openthread/netdata_publisher.h +++ b/include/openthread/netdata_publisher.h @@ -55,7 +55,7 @@ extern "C" { */ /** - * This enumeration represents the events reported from the Publisher callbacks. + * Represents the events reported from the Publisher callbacks. * */ typedef enum otNetDataPublisherEvent @@ -65,7 +65,7 @@ typedef enum otNetDataPublisherEvent } otNetDataPublisherEvent; /** - * This function pointer type defines the callback used to notify when a "DNS/SRP Service" entry is added to or removed + * Pointer type defines the callback used to notify when a "DNS/SRP Service" entry is added to or removed * from the Thread Network Data. * * On remove the callback is invoked independent of whether the entry is removed by `Publisher` (e.g., when there are @@ -79,7 +79,7 @@ typedef enum otNetDataPublisherEvent typedef void (*otNetDataDnsSrpServicePublisherCallback)(otNetDataPublisherEvent aEvent, void *aContext); /** - * This function pointer type defines the callback used to notify when a prefix (on-mesh or external route) entry is + * Pointer type defines the callback used to notify when a prefix (on-mesh or external route) entry is * added to or removed from the Thread Network Data. * * On remove the callback is invoked independent of whether the entry is removed by `Publisher` (e.g., when there are @@ -95,9 +95,9 @@ typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent, void *aContext); /** - * This function requests "DNS/SRP Service Anycast Address" to be published in the Thread Network Data. + * Requests "DNS/SRP Service Anycast Address" to be published in the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. * * A call to this function will remove and replace any previous "DNS/SRP Service" entry that was being published (from * earlier call to any of `otNetDataPublishDnsSrpService{Type}()` functions). @@ -109,14 +109,14 @@ typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent, void otNetDataPublishDnsSrpServiceAnycast(otInstance *aInstance, uint8_t aSequenceNUmber); /** - * This function requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. + * Requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. * * A call to this function will remove and replace any previous "DNS/SRP Service" entry that was being published (from * earlier call to any of `otNetDataPublishDnsSrpService{Type}()` functions). * - * This function publishes the "DNS/SRP Service Unicast Address" by including the address and port info in the Service + * Publishes the "DNS/SRP Service Unicast Address" by including the address and port info in the Service * TLV data. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -127,9 +127,9 @@ void otNetDataPublishDnsSrpServiceAnycast(otInstance *aInstance, uint8_t aSequen void otNetDataPublishDnsSrpServiceUnicast(otInstance *aInstance, const otIp6Address *aAddress, uint16_t aPort); /** - * This function requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. + * Requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. * * A call to this function will remove and replace any previous "DNS/SRP Service" entry that was being published (from * earlier call to any of `otNetDataPublishDnsSrpService{Type}()` functions). @@ -145,9 +145,9 @@ void otNetDataPublishDnsSrpServiceUnicast(otInstance *aInstance, const otIp6Addr void otNetDataPublishDnsSrpServiceUnicastMeshLocalEid(otInstance *aInstance, uint16_t aPort); /** - * This function indicates whether or not currently the "DNS/SRP Service" entry is added to the Thread Network Data. + * Indicates whether or not currently the "DNS/SRP Service" entry is added to the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -158,12 +158,12 @@ void otNetDataPublishDnsSrpServiceUnicastMeshLocalEid(otInstance *aInstance, uin bool otNetDataIsDnsSrpServiceAdded(otInstance *aInstance); /** - * This function sets a callback for notifying when a published "DNS/SRP Service" is actually added to or removed from + * Sets a callback for notifying when a published "DNS/SRP Service" is actually added to or removed from * the Thread Network Data. * * A subsequent call to this function replaces any previously set callback function. * - * This function requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback The callback function pointer (can be NULL if not needed). @@ -186,9 +186,9 @@ void otNetDataSetDnsSrpServicePublisherCallback(otInstance void otNetDataUnpublishDnsSrpService(otInstance *aInstance); /** - * This function requests an on-mesh prefix to be published in the Thread Network Data. + * Requests an on-mesh prefix to be published in the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. * * Only stable entries can be published (i.e.,`aConfig.mStable` MUST be TRUE). * @@ -213,9 +213,9 @@ void otNetDataUnpublishDnsSrpService(otInstance *aInstance); otError otNetDataPublishOnMeshPrefix(otInstance *aInstance, const otBorderRouterConfig *aConfig); /** - * This function requests an external route prefix to be published in the Thread Network Data. + * Requests an external route prefix to be published in the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. * * Only stable entries can be published (i.e.,`aConfig.mStable` MUST be TRUE). * @@ -238,9 +238,9 @@ otError otNetDataPublishOnMeshPrefix(otInstance *aInstance, const otBorderRouter otError otNetDataPublishExternalRoute(otInstance *aInstance, const otExternalRouteConfig *aConfig); /** - * This function replaces a previously published external route in the Thread Network Data. + * Replaces a previously published external route in the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. * * If there is no previously published external route matching @p aPrefix, this function behaves similarly to * `otNetDataPublishExternalRoute()`, i.e., it will start the process of publishing @a aConfig as an external route in @@ -274,10 +274,10 @@ otError otNetDataReplacePublishedExternalRoute(otInstance *aIns const otExternalRouteConfig *aConfig); /** - * This function indicates whether or not currently a published prefix entry (on-mesh or external route) is added to + * Indicates whether or not currently a published prefix entry (on-mesh or external route) is added to * the Thread Network Data. * - * This function requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPrefix A pointer to the prefix (MUST NOT be NULL). @@ -289,12 +289,12 @@ otError otNetDataReplacePublishedExternalRoute(otInstance *aIns bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix); /** - * This function sets a callback for notifying when a published prefix entry is actually added to or removed from + * Sets a callback for notifying when a published prefix entry is actually added to or removed from * the Thread Network Data. * * A subsequent call to this function replaces any previously set callback function. * - * This function requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. + * Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback The callback function pointer (can be NULL if not needed). diff --git a/include/openthread/netdiag.h b/include/openthread/netdiag.h index 76e523bcd..03563eaa5 100644 --- a/include/openthread/netdiag.h +++ b/include/openthread/netdiag.h @@ -97,7 +97,7 @@ enum typedef uint16_t otNetworkDiagIterator; ///< Used to iterate through Network Diagnostic TLV. /** - * This structure represents a Network Diagnostic Connectivity value. + * Represents a Network Diagnostic Connectivity value. * */ typedef struct otNetworkDiagConnectivity @@ -149,7 +149,7 @@ typedef struct otNetworkDiagConnectivity } otNetworkDiagConnectivity; /** - * This structure represents a Network Diagnostic Route data. + * Represents a Network Diagnostic Route data. * */ typedef struct otNetworkDiagRouteData @@ -161,7 +161,7 @@ typedef struct otNetworkDiagRouteData } otNetworkDiagRouteData; /** - * This structure represents a Network Diagnostic Route TLV value. + * Represents a Network Diagnostic Route TLV value. * */ typedef struct otNetworkDiagRoute @@ -183,7 +183,7 @@ typedef struct otNetworkDiagRoute } otNetworkDiagRoute; /** - * This structure represents a Network Diagnostic Mac Counters value. + * Represents a Network Diagnostic Mac Counters value. * * See RFC 2863 for definitions of member fields. * @@ -202,7 +202,7 @@ typedef struct otNetworkDiagMacCounters } otNetworkDiagMacCounters; /** - * This structure represents a Network Diagnostic Child Table Entry. + * Represents a Network Diagnostic Child Table Entry. * */ typedef struct otNetworkDiagChildEntry @@ -232,7 +232,7 @@ typedef struct otNetworkDiagChildEntry } otNetworkDiagChildEntry; /** - * This structure represents a Network Diagnostic TLV. + * Represents a Network Diagnostic TLV. * */ typedef struct otNetworkDiagTlv @@ -285,7 +285,7 @@ typedef struct otNetworkDiagTlv } otNetworkDiagTlv; /** - * This function gets the next Network Diagnostic TLV in the message. + * Gets the next Network Diagnostic TLV in the message. * * Requires `OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE`. * @@ -306,7 +306,7 @@ otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage, otNetworkDiagTlv *aNetworkDiagTlv); /** - * This function pointer is called when Network Diagnostic Get response is received. + * Pointer is called when Network Diagnostic Get response is received. * * @param[in] aError The error when failed to get the response. * @param[in] aMessage A pointer to the message buffer containing the received Network Diagnostic diff --git a/include/openthread/network_time.h b/include/openthread/network_time.h index e20a9d5a3..7d5d153c5 100644 --- a/include/openthread/network_time.h +++ b/include/openthread/network_time.h @@ -53,7 +53,7 @@ extern "C" { */ /** - * This enumeration represents OpenThread time synchronization status. + * Represents OpenThread time synchronization status. * */ typedef enum otNetworkTimeStatus @@ -64,7 +64,7 @@ typedef enum otNetworkTimeStatus } otNetworkTimeStatus; /** - * This function pointer is called when a network time sync or status change occurs. + * Pointer is called when a network time sync or status change occurs. * */ typedef void (*otNetworkTimeSyncCallbackFn)(void *aCallbackContext); @@ -89,7 +89,7 @@ otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTi /** * Set the time synchronization period. * - * This function can only be called while Thread protocols are disabled. + * Can only be called while Thread protocols are disabled. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aTimeSyncPeriod The time synchronization period, in seconds. @@ -113,7 +113,7 @@ uint16_t otNetworkTimeGetSyncPeriod(otInstance *aInstance); /** * Set the time synchronization XTAL accuracy threshold for Router-Capable device. * - * This function can only be called while Thread protocols are disabled. + * Can only be called while Thread protocols are disabled. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aXTALThreshold The XTAL accuracy threshold for Router, in PPM. diff --git a/include/openthread/ping_sender.h b/include/openthread/ping_sender.h index a0e30ca9a..174cccc25 100644 --- a/include/openthread/ping_sender.h +++ b/include/openthread/ping_sender.h @@ -56,7 +56,7 @@ extern "C" { */ /** - * This structure represents a ping reply. + * Represents a ping reply. * */ typedef struct otPingSenderReply @@ -69,7 +69,7 @@ typedef struct otPingSenderReply } otPingSenderReply; /** - * This structure represents statistics of a ping request. + * Represents statistics of a ping request. * */ typedef struct otPingSenderStatistics @@ -83,7 +83,7 @@ typedef struct otPingSenderStatistics } otPingSenderStatistics; /** - * This function pointer type specifies the callback to notify receipt of a ping reply. + * Pointer type specifies the callback to notify receipt of a ping reply. * * @param[in] aReply A pointer to a `otPingSenderReply` containing info about the received ping reply. * @param[in] aContext A pointer to application-specific context. @@ -92,7 +92,7 @@ typedef struct otPingSenderStatistics typedef void (*otPingSenderReplyCallback)(const otPingSenderReply *aReply, void *aContext); /** - * This function pointer type specifies the callback to report the ping statistics. + * Pointer type specifies the callback to report the ping statistics. * * @param[in] aStatistics A pointer to a `otPingSenderStatistics` containing info about the received ping * statistics. @@ -102,7 +102,7 @@ typedef void (*otPingSenderReplyCallback)(const otPingSenderReply *aReply, void typedef void (*otPingSenderStatisticsCallback)(const otPingSenderStatistics *aStatistics, void *aContext); /** - * This structure represents a ping request configuration. + * Represents a ping request configuration. * */ typedef struct otPingSenderConfig @@ -123,7 +123,7 @@ typedef struct otPingSenderConfig } otPingSenderConfig; /** - * This function starts a ping. + * Starts a ping. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aConfig The ping config to use. @@ -137,7 +137,7 @@ typedef struct otPingSenderConfig otError otPingSenderPing(otInstance *aInstance, const otPingSenderConfig *aConfig); /** - * This function stops an ongoing ping. + * Stops an ongoing ping. * * @param[in] aInstance A pointer to an OpenThread instance. * diff --git a/include/openthread/platform/crypto.h b/include/openthread/platform/crypto.h index 0bccc38b8..8762fc2ce 100644 --- a/include/openthread/platform/crypto.h +++ b/include/openthread/platform/crypto.h @@ -55,7 +55,7 @@ extern "C" { */ /** - * This enumeration defines the key types. + * Defines the key types. * */ typedef enum @@ -67,7 +67,7 @@ typedef enum } otCryptoKeyType; /** - * This enumeration defines the key algorithms. + * Defines the key algorithms. * */ typedef enum @@ -79,7 +79,7 @@ typedef enum } otCryptoKeyAlgorithm; /** - * This enumeration defines the key usage flags. + * Defines the key usage flags. * */ enum @@ -93,7 +93,7 @@ enum }; /** - * This enumeration defines the key storage types. + * Defines the key storage types. * */ typedef enum @@ -111,7 +111,7 @@ typedef uint32_t otCryptoKeyRef; /** * @struct otCryptoKey * - * This structure represents the Key Material required for Crypto operations. + * Represents the Key Material required for Crypto operations. * */ typedef struct otCryptoKey @@ -124,7 +124,7 @@ typedef struct otCryptoKey /** * @struct otCryptoContext * - * This structure stores the context object for platform APIs. + * Stores the context object for platform APIs. * */ typedef struct otCryptoContext @@ -142,7 +142,7 @@ typedef struct otCryptoContext /** * @struct otPlatCryptoSha256Hash * - * This structure represents a SHA-256 hash. + * Represents a SHA-256 hash. * */ OT_TOOL_PACKED_BEGIN @@ -152,7 +152,7 @@ struct otPlatCryptoSha256Hash } OT_TOOL_PACKED_END; /** - * This structure represents a SHA-256 hash. + * Represents a SHA-256 hash. * */ typedef struct otPlatCryptoSha256Hash otPlatCryptoSha256Hash; @@ -166,7 +166,7 @@ typedef struct otPlatCryptoSha256Hash otPlatCryptoSha256Hash; /** * @struct otPlatCryptoEcdsaKeyPair * - * This structure represents an ECDSA key pair (public and private keys). + * Represents an ECDSA key pair (public and private keys). * * The key pair is stored using Distinguished Encoding Rules (DER) format (per RFC 5915). * @@ -186,7 +186,7 @@ typedef struct otPlatCryptoEcdsaKeyPair /** * @struct otPlatCryptoEcdsaPublicKey * - * This struct represents a ECDSA public key. + * Represents a ECDSA public key. * * The public key is stored as a byte sequence representation of an uncompressed curve point (RFC 6605 - sec 4). * @@ -208,7 +208,7 @@ typedef struct otPlatCryptoEcdsaPublicKey otPlatCryptoEcdsaPublicKey; /** * @struct otPlatCryptoEcdsaSignature * - * This struct represents an ECDSA signature. + * Represents an ECDSA signature. * * The signature is encoded as the concatenated binary representation of two MPIs `r` and `s` which are calculated * during signing (RFC 6605 - section 4). @@ -616,7 +616,7 @@ otError otPlatCryptoEcdsaGetPublicKey(const otPlatCryptoEcdsaKeyPair *aKeyPair, /** * Calculate the ECDSA signature for a hashed message using the private key from the input context. * - * This method uses the deterministic digital signature generation procedure from RFC 6979. + * Uses the deterministic digital signature generation procedure from RFC 6979. * * @param[in] aKeyPair A pointer to an ECDSA key-pair structure where the key-pair is stored. * @param[in] aHash A pointer to a SHA-256 hash structure where the hash value for signature calculation @@ -656,7 +656,7 @@ otError otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey, /** * Calculate the ECDSA signature for a hashed message using the Key reference passed. * - * This method uses the deterministic digital signature generation procedure from RFC 6979. + * Uses the deterministic digital signature generation procedure from RFC 6979. * * @param[in] aKeyRef Key Reference to the slot where the key-pair is stored. * @param[in] aHash A pointer to a SHA-256 hash structure where the hash value for signature calculation diff --git a/include/openthread/platform/debug_uart.h b/include/openthread/platform/debug_uart.h index b0410aff5..a2643d68e 100644 --- a/include/openthread/platform/debug_uart.h +++ b/include/openthread/platform/debug_uart.h @@ -104,7 +104,7 @@ void otPlatDebugUart_vprintf(const char *fmt, va_list ap); * Platform specific write single byte to Debug Uart * This should not perform CR/LF mapping. * - * This function MUST be implemented by the platform + * MUST be implemented by the platform * * @param[in] c what to transmit */ @@ -114,7 +114,7 @@ void otPlatDebugUart_putchar_raw(int c); * Poll/test debug uart if a key has been pressed. * It would be common to a stub function that returns 0. * - * This function MUST be implemented by the platform + * MUST be implemented by the platform * * @retval zero - nothing ready * @retval nonzero - otPlatDebugUart_getc() will succeed. @@ -124,7 +124,7 @@ int otPlatDebugUart_kbhit(void); /** * Poll/Read a byte from the debug uart * - * This function MUST be implemented by the platform + * MUST be implemented by the platform * * @retval (negative) no data available, see otPlatDebugUart_kbhit() * @retval (0x00..0x0ff) data byte value diff --git a/include/openthread/platform/diag.h b/include/openthread/platform/diag.h index 6f65f8234..7bc229946 100644 --- a/include/openthread/platform/diag.h +++ b/include/openthread/platform/diag.h @@ -57,7 +57,7 @@ extern "C" { */ /** - * This enumeration defines the gpio modes. + * Defines the gpio modes. * */ typedef enum @@ -67,7 +67,7 @@ typedef enum } otGpioMode; /** - * This function processes a factory diagnostics command line. + * Processes a factory diagnostics command line. * * The output of this function (the content written to @p aOutput) MUST terminate with `\0` and the `\0` is within the * output buffer. @@ -90,7 +90,7 @@ otError otPlatDiagProcess(otInstance *aInstance, size_t aOutputMaxLen); /** - * This function enables/disables the factory diagnostics mode. + * Enables/disables the factory diagnostics mode. * * @param[in] aMode TRUE to enable diagnostics mode, FALSE otherwise. * @@ -98,7 +98,7 @@ otError otPlatDiagProcess(otInstance *aInstance, void otPlatDiagModeSet(bool aMode); /** - * This function indicates whether or not factory diagnostics mode is enabled. + * Indicates whether or not factory diagnostics mode is enabled. * * @returns TRUE if factory diagnostics mode is enabled, FALSE otherwise. * @@ -106,7 +106,7 @@ void otPlatDiagModeSet(bool aMode); bool otPlatDiagModeGet(void); /** - * This function sets the channel to use for factory diagnostics. + * Sets the channel to use for factory diagnostics. * * @param[in] aChannel The channel value. * @@ -114,7 +114,7 @@ bool otPlatDiagModeGet(void); void otPlatDiagChannelSet(uint8_t aChannel); /** - * This function sets the transmit power to use for factory diagnostics. + * Sets the transmit power to use for factory diagnostics. * * @param[in] aTxPower The transmit power value. * @@ -122,7 +122,7 @@ void otPlatDiagChannelSet(uint8_t aChannel); void otPlatDiagTxPowerSet(int8_t aTxPower); /** - * This function processes the received radio frame. + * Processes the received radio frame. * * @param[in] aInstance The OpenThread instance for current request. * @param[in] aFrame The received radio frame. @@ -132,7 +132,7 @@ void otPlatDiagTxPowerSet(int8_t aTxPower); void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError); /** - * This function processes the alarm event. + * Processes the alarm event. * * @param[in] aInstance The OpenThread instance for current request. * @@ -140,7 +140,7 @@ void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otErro void otPlatDiagAlarmCallback(otInstance *aInstance); /** - * This function sets the gpio value. + * Sets the gpio value. * * @param[in] aGpio The gpio number. * @param[in] aValue true to set the gpio to high level, or false otherwise. @@ -155,7 +155,7 @@ void otPlatDiagAlarmCallback(otInstance *aInstance); otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue); /** - * This function gets the gpio value. + * Gets the gpio value. * * @param[in] aGpio The gpio number. * @param[out] aValue A pointer where to put gpio value. @@ -170,7 +170,7 @@ otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue); otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue); /** - * This function sets the gpio mode. + * Sets the gpio mode. * * @param[in] aGpio The gpio number. * @param[out] aMode The gpio mode. @@ -185,7 +185,7 @@ otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue); otError otPlatDiagGpioSetMode(uint32_t aGpio, otGpioMode aMode); /** - * This function gets the gpio mode. + * Gets the gpio mode. * * @param[in] aGpio The gpio number. * @param[out] aMode A pointer where to put gpio mode. diff --git a/include/openthread/platform/dso_transport.h b/include/openthread/platform/dso_transport.h index 348ee828a..4e005895c 100644 --- a/include/openthread/platform/dso_transport.h +++ b/include/openthread/platform/dso_transport.h @@ -47,7 +47,7 @@ extern "C" { #endif /** - * This structure represents a DSO connection. + * Represents a DSO connection. * * It is an opaque struct (the platform implementation only deals with pointers to this struct). * @@ -55,7 +55,7 @@ extern "C" { typedef struct otPlatDsoConnection otPlatDsoConnection; /** - * This function can be used by DSO platform implementation to get the the OpenThread instance associated with a + * Can be used by DSO platform implementation to get the the OpenThread instance associated with a * connection instance. * * @param[in] aConnection A pointer to the DSO connection. @@ -66,7 +66,7 @@ typedef struct otPlatDsoConnection otPlatDsoConnection; extern otInstance *otPlatDsoGetInstance(otPlatDsoConnection *aConnection); /** - * This function starts or stops listening for incoming connection requests on transport layer. + * Starts or stops listening for incoming connection requests on transport layer. * * For DNS-over-TLS, the transport layer MUST listen on port 853 and follow RFC 7858. * @@ -79,10 +79,10 @@ extern otInstance *otPlatDsoGetInstance(otPlatDsoConnection *aConnection); void otPlatDsoEnableListening(otInstance *aInstance, bool aEnable); /** - * This function is a callback from the DSO platform to indicate an incoming connection request when listening is + * Is a callback from the DSO platform to indicate an incoming connection request when listening is * enabled. * - * This function determines whether or not to accept the connection request. It returns a non-null `otPlatDsoConnection` + * Determines whether or not to accept the connection request. It returns a non-null `otPlatDsoConnection` * pointer if the request is to be accepted, or `NULL` if the request is to be rejected. * * If a non-null connection pointer is returned, the platform layer MUST continue establishing the connection with the @@ -98,7 +98,7 @@ void otPlatDsoEnableListening(otInstance *aInstance, bool aEnable); extern otPlatDsoConnection *otPlatDsoAccept(otInstance *aInstance, const otSockAddr *aPeerSockAddr); /** - * This function requests the platform layer to initiate establishing a connection with a peer. + * Requests the platform layer to initiate establishing a connection with a peer. * * The platform reports the outcome by invoking `otPlatDsoHandleConnected()` callback on success or * `otPlatDsoHandleDisconnected()` callback (on failure). @@ -110,7 +110,7 @@ extern otPlatDsoConnection *otPlatDsoAccept(otInstance *aInstance, const otSockA void otPlatDsoConnect(otPlatDsoConnection *aConnection, const otSockAddr *aPeerSockAddr); /** - * This function is a callback from the platform layer to indicate that a connection is successfully established. + * Is a callback from the platform layer to indicate that a connection is successfully established. * * It MUST be called either after accepting an incoming connection (`otPlatDsoAccept`) or after a `otPlatDsoConnect()` * call. @@ -123,12 +123,12 @@ void otPlatDsoConnect(otPlatDsoConnection *aConnection, const otSockAddr *aPeerS extern void otPlatDsoHandleConnected(otPlatDsoConnection *aConnection); /** - * This function sends a DSO message to the peer on a connection. + * Sends a DSO message to the peer on a connection. * - * This function is used only after the connection is successfully established (after `otPlatDsoHandleConnected()` + * Is used only after the connection is successfully established (after `otPlatDsoHandleConnected()` * callback). * - * This function passes the ownership of the @p aMessage to the DSO platform layer, and the platform implementation is + * Passes the ownership of the @p aMessage to the DSO platform layer, and the platform implementation is * expected to free the message once it is no longer needed. * * The @p aMessage contains the DNS message (starting with DNS header). Note that it does not contain the the length @@ -142,12 +142,12 @@ extern void otPlatDsoHandleConnected(otPlatDsoConnection *aConnection); void otPlatDsoSend(otPlatDsoConnection *aConnection, otMessage *aMessage); /** - * This function is a callback from the platform layer to indicate that a DNS message was received over a connection. + * Is a callback from the platform layer to indicate that a DNS message was received over a connection. * * The platform MUST call this function only after the connection is successfully established (after callback * `otPlatDsoHandleConnected()` is invoked). * - * This function passes the ownership of the @p aMessage from the DSO platform layer to OpenThread. OpenThread will + * Passes the ownership of the @p aMessage from the DSO platform layer to OpenThread. OpenThread will * free the message when no longer needed. * * The @p aMessage MUST contain the DNS message (starting with DNS header) and not include the length field that may @@ -160,7 +160,7 @@ void otPlatDsoSend(otPlatDsoConnection *aConnection, otMessage *aMessage); extern void otPlatDsoHandleReceive(otPlatDsoConnection *aConnection, otMessage *aMessage); /** - * This enumeration defines disconnect modes. + * Defines disconnect modes. * */ typedef enum @@ -170,7 +170,7 @@ typedef enum } otPlatDsoDisconnectMode; /** - * This function requests a connection to be disconnected. + * Requests a connection to be disconnected. * * After calling this function, the DSO platform implementation MUST NOT maintain `aConnection` pointer (platform * MUST NOT call any callbacks using this `Connection` pointer anymore). In particular, calling `otPlatDsoDisconnect()` @@ -183,7 +183,7 @@ typedef enum void otPlatDsoDisconnect(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMode aMode); /** - * This function is a callback from the platform layer to indicate that peer closed/aborted the connection or the + * Is a callback from the platform layer to indicate that peer closed/aborted the connection or the * connection establishment failed (e.g., peer rejected a connection request). * * After calling this function, the DSO platform implementation MUST NOT maintain `aConnection` pointer (platform diff --git a/include/openthread/platform/entropy.h b/include/openthread/platform/entropy.h index 0271d1bac..f86ced7b3 100644 --- a/include/openthread/platform/entropy.h +++ b/include/openthread/platform/entropy.h @@ -56,7 +56,7 @@ extern "C" { /** * Fill buffer with entropy. * - * This function MUST be implemented using a true random number generator (TRNG). + * MUST be implemented using a true random number generator (TRNG). * * @param[out] aOutput A pointer to where the true random values are placed. Must not be NULL. * @param[in] aOutputLength Size of @p aBuffer. diff --git a/include/openthread/platform/flash.h b/include/openthread/platform/flash.h index bbb7f3e70..64fc86093 100644 --- a/include/openthread/platform/flash.h +++ b/include/openthread/platform/flash.h @@ -38,7 +38,7 @@ extern "C" { #endif /** - * This function initializes the flash driver. + * Initializes the flash driver. * * @param[in] aInstance The OpenThread instance structure. * @@ -46,7 +46,7 @@ extern "C" { void otPlatFlashInit(otInstance *aInstance); /** - * This function gets the size of the swap space. + * Gets the size of the swap space. * * @param[in] aInstance The OpenThread instance structure. * @@ -56,7 +56,7 @@ void otPlatFlashInit(otInstance *aInstance); uint32_t otPlatFlashGetSwapSize(otInstance *aInstance); /** - * This function erases the swap space indicated by @p aSwapIndex. + * Erases the swap space indicated by @p aSwapIndex. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aSwapIndex A value in [0, 1] that indicates the swap space. @@ -65,7 +65,7 @@ uint32_t otPlatFlashGetSwapSize(otInstance *aInstance); void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex); /** - * This function reads @p aSize bytes into @p aData. + * Reads @p aSize bytes into @p aData. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aSwapIndex A value in [0, 1] that indicates the swap space. @@ -77,7 +77,7 @@ void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex); void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, void *aData, uint32_t aSize); /** - * This function writes @p aSize bytes from @p aData. + * Writes @p aSize bytes from @p aData. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aSwapIndex A value in [0, 1] that indicates the swap space. diff --git a/include/openthread/platform/infra_if.h b/include/openthread/platform/infra_if.h index 5d2c50f15..4241efd06 100644 --- a/include/openthread/platform/infra_if.h +++ b/include/openthread/platform/infra_if.h @@ -57,7 +57,7 @@ extern "C" { */ /** - * This method tells whether an infra interface has the given IPv6 address assigned. + * Tells whether an infra interface has the given IPv6 address assigned. * * @param[in] aInfraIfIndex The index of the infra interface. * @param[in] aAddress The IPv6 address. @@ -68,7 +68,7 @@ extern "C" { bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddress); /** - * This method sends an ICMPv6 Neighbor Discovery message on given infrastructure interface. + * Sends an ICMPv6 Neighbor Discovery message on given infrastructure interface. * * See RFC 4861: https://tools.ietf.org/html/rfc4861. * @@ -150,7 +150,7 @@ otError otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex); * The infra interface driver calls this method to notify OpenThread that * the discovery of NAT64 prefix is done. * - * This method is expected to be invoked after calling otPlatInfraIfDiscoverNat64Prefix. + * Is expected to be invoked after calling otPlatInfraIfDiscoverNat64Prefix. * If no NAT64 prefix is discovered, @p aIp6Prefix shall point to an empty prefix with zero length. * * @param[in] aInstance The OpenThread instance structure. diff --git a/include/openthread/platform/logging.h b/include/openthread/platform/logging.h index adf123f44..20235dfe2 100644 --- a/include/openthread/platform/logging.h +++ b/include/openthread/platform/logging.h @@ -107,13 +107,13 @@ extern "C" { #define OT_LOG_LEVEL_DEBG 5 /** - * This type represents the log level. + * Represents the log level. * */ typedef int otLogLevel; /** - * This enumeration represents log regions. + * Represents log regions. * * The support for log region is removed and instead each core module can define its own name to appended to the logs. * However, the `otLogRegion` enumeration is still defined as before to help with platforms which we may be using it @@ -148,7 +148,7 @@ typedef enum otLogRegion } otLogRegion; /** - * This function outputs logs. + * Outputs logs. * * Note that the support for log region is removed. The OT core will always emit all logs with `OT_LOG_REGION_CORE` * as @p aLogRegion. @@ -162,7 +162,7 @@ typedef enum otLogRegion void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...); /** - * This function handles OpenThread log level changes. + * Handles OpenThread log level changes. * * This platform function is called whenever the OpenThread log level changes. * This platform function is optional since an empty weak implementation has been provided. diff --git a/include/openthread/platform/memory.h b/include/openthread/platform/memory.h index 39b9e87e5..1f0e4227a 100644 --- a/include/openthread/platform/memory.h +++ b/include/openthread/platform/memory.h @@ -63,7 +63,7 @@ extern "C" { * memory each and returns a pointer to the allocated memory. The allocated memory is filled with bytes * of value zero." * - * This function is required for OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE. + * Is required for OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE. * * @param[in] aNum The number of blocks to allocate * @param[in] aSize The size of each block to allocate @@ -76,7 +76,7 @@ void *otPlatCAlloc(size_t aNum, size_t aSize); /** * Frees memory that was dynamically allocated. * - * This function is required for OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE. + * Is required for OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE. * * @param[in] aPtr A pointer the memory blocks to free. The pointer may be NULL. */ diff --git a/include/openthread/platform/messagepool.h b/include/openthread/platform/messagepool.h index 6f369c721..5058871df 100644 --- a/include/openthread/platform/messagepool.h +++ b/include/openthread/platform/messagepool.h @@ -54,7 +54,7 @@ extern "C" { #endif /** - * This struct represents an OpenThread message buffer. + * Represents an OpenThread message buffer. * */ typedef struct otMessageBuffer @@ -65,7 +65,7 @@ typedef struct otMessageBuffer /** * Initialize the platform implemented message pool. * - * This function is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. + * Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aMinNumFreeBuffers An uint16 containing the minimum number of free buffers desired by OpenThread. @@ -77,7 +77,7 @@ void otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, s /** * Allocate a buffer from the platform managed buffer pool. * - * This function is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. + * Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. * * The returned buffer instance MUST have at least `aBufferSize` bytes (as specified in `otPlatMessagePoolInit()`). * @@ -89,9 +89,9 @@ void otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, s otMessageBuffer *otPlatMessagePoolNew(otInstance *aInstance); /** - * This function is used to free a buffer back to the platform managed buffer pool. + * Is used to free a buffer back to the platform managed buffer pool. * - * This function is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. + * Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aBuffer The buffer to free. @@ -102,7 +102,7 @@ void otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer); /** * Get the number of free buffers. * - * This function is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. + * Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. * * @param[in] aInstance A pointer to the OpenThread instance. * diff --git a/include/openthread/platform/misc.h b/include/openthread/platform/misc.h index 99c3ed3f5..7fbee54b1 100644 --- a/include/openthread/platform/misc.h +++ b/include/openthread/platform/misc.h @@ -54,7 +54,7 @@ extern "C" { */ /** - * This function performs a software reset on the platform, if supported. + * Performs a software reset on the platform, if supported. * * @param[in] aInstance The OpenThread instance structure. * @@ -83,7 +83,7 @@ typedef enum } otPlatResetReason; /** - * This function returns the reason for the last platform reset. + * Returns the reason for the last platform reset. * * @param[in] aInstance The OpenThread instance structure. * @@ -91,7 +91,7 @@ typedef enum otPlatResetReason otPlatGetResetReason(otInstance *aInstance); /** - * This function provides a platform specific implementation for assert. + * Provides a platform specific implementation for assert. * * @param[in] aFilename The name of the file where the assert occurred. * @param[in] aLineNumber The line number in the file where the assert occurred. @@ -100,7 +100,7 @@ otPlatResetReason otPlatGetResetReason(otInstance *aInstance); void otPlatAssertFail(const char *aFilename, int aLineNumber); /** - * This function performs a platform specific operation to wake the host MCU. + * Performs a platform specific operation to wake the host MCU. * This is used only for NCP configurations. * */ @@ -163,7 +163,7 @@ typedef enum } otPlatMcuPowerState; /** - * This function sets the desired MCU power state. + * Sets the desired MCU power state. * * This is only applicable and used for NCP configuration when `OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL` * is enabled. @@ -178,7 +178,7 @@ typedef enum otError otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState); /** - * This function gets the current desired MCU power state. + * Gets the current desired MCU power state. * * This is only applicable and used for NCP configuration when `OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL` * is enabled. diff --git a/include/openthread/platform/otns.h b/include/openthread/platform/otns.h index 6d862e24c..19b206b2e 100644 --- a/include/openthread/platform/otns.h +++ b/include/openthread/platform/otns.h @@ -54,7 +54,7 @@ extern "C" { */ /** - * This function exports status information to OTNS. + * Exports status information to OTNS. * * The status information is represented by a null-terminated string with format recognizable by OTNS. * Each call to `otPlatOtnsStatus` can send multiple statuses, separated by ';', e.x. "parid=577fbc37;lrid=5". diff --git a/include/openthread/platform/radio.h b/include/openthread/platform/radio.h index 963f6ee31..bb7ef0c3d 100644 --- a/include/openthread/platform/radio.h +++ b/include/openthread/platform/radio.h @@ -88,7 +88,7 @@ enum }; /** - * This enumeration defines the channel page. + * Defines the channel page. * */ enum @@ -100,7 +100,7 @@ enum }; /** - * This enumeration defines the frequency band channel range. + * Defines the frequency band channel range. * */ enum @@ -114,7 +114,7 @@ enum }; /** - * This type represents radio capabilities. + * Represents radio capabilities. * * The value is a bit-field indicating the capabilities supported by the radio. See `OT_RADIO_CAPS_*` definitions. * @@ -122,7 +122,7 @@ enum typedef uint8_t otRadioCaps; /** - * This enumeration defines constants that are used to indicate different radio capabilities. See `otRadioCaps`. + * Defines constants that are used to indicate different radio capabilities. See `otRadioCaps`. * */ enum @@ -141,13 +141,13 @@ enum #define OT_PANID_BROADCAST 0xffff ///< IEEE 802.15.4 Broadcast PAN ID /** - * This type represents the IEEE 802.15.4 PAN ID. + * Represents the IEEE 802.15.4 PAN ID. * */ typedef uint16_t otPanId; /** - * This type represents the IEEE 802.15.4 Short Address. + * Represents the IEEE 802.15.4 Short Address. * */ typedef uint16_t otShortAddress; @@ -155,7 +155,7 @@ typedef uint16_t otShortAddress; #define OT_EXT_ADDRESS_SIZE 8 ///< Size of an IEEE 802.15.4 Extended Address (bytes) /** - * This enumeration defines constants about size of header IE in ACK. + * Defines constants about size of header IE in ACK. * */ enum @@ -172,7 +172,7 @@ enum /** * @struct otExtAddress * - * This structure represents the IEEE 802.15.4 Extended Address. + * Represents the IEEE 802.15.4 Extended Address. * */ OT_TOOL_PACKED_BEGIN @@ -182,7 +182,7 @@ struct otExtAddress } OT_TOOL_PACKED_END; /** - * This structure represents the IEEE 802.15.4 Extended Address. + * Represents the IEEE 802.15.4 Extended Address. * */ typedef struct otExtAddress otExtAddress; @@ -192,7 +192,7 @@ typedef struct otExtAddress otExtAddress; /** * @struct otMacKey * - * This structure represents a MAC Key. + * Represents a MAC Key. * */ OT_TOOL_PACKED_BEGIN @@ -202,13 +202,13 @@ struct otMacKey } OT_TOOL_PACKED_END; /** - * This structure represents a MAC Key. + * Represents a MAC Key. * */ typedef struct otMacKey otMacKey; /** - * This type represents a MAC Key Ref used by PSA. + * Represents a MAC Key Ref used by PSA. * */ typedef otCryptoKeyRef otMacKeyRef; @@ -216,7 +216,7 @@ typedef otCryptoKeyRef otMacKeyRef; /** * @struct otMacKeyMaterial * - * This structure represents a MAC Key. + * Represents a MAC Key. * */ typedef struct otMacKeyMaterial @@ -229,7 +229,7 @@ typedef struct otMacKeyMaterial } otMacKeyMaterial; /** - * This enumeration defines constants about key types. + * Defines constants about key types. * */ typedef enum @@ -239,7 +239,7 @@ typedef enum } otRadioKeyType; /** - * This structure represents the IEEE 802.15.4 Header IE (Information Element) related information of a radio frame. + * Represents the IEEE 802.15.4 Header IE (Information Element) related information of a radio frame. */ typedef struct otRadioIeInfo { @@ -249,7 +249,7 @@ typedef struct otRadioIeInfo } otRadioIeInfo; /** - * This structure represents an IEEE 802.15.4 radio frame. + * Represents an IEEE 802.15.4 radio frame. */ typedef struct otRadioFrame { @@ -352,7 +352,7 @@ typedef struct otRadioFrame } otRadioFrame; /** - * This structure represents the state of a radio. + * Represents the state of a radio. * Initially, a radio is in the Disabled state. */ typedef enum otRadioState @@ -382,7 +382,7 @@ typedef enum otRadioState */ /** - * This structure represents radio coexistence metrics. + * Represents radio coexistence metrics. */ typedef struct otRadioCoexMetrics { @@ -408,7 +408,7 @@ typedef struct otRadioCoexMetrics } otRadioCoexMetrics; /** - * This structure represents what metrics are specified to query. + * Represents what metrics are specified to query. * */ typedef struct otLinkMetrics @@ -610,7 +610,7 @@ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable); /** * Update MAC keys and key index * - * This function is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC capability. + * Is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC capability. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aKeyIdMode The key ID mode. @@ -630,9 +630,9 @@ void otPlatRadioSetMacKey(otInstance *aInstance, otRadioKeyType aKeyType); /** - * This method sets the current MAC frame counter value. + * Sets the current MAC frame counter value. * - * This function is used when radio provides `OT_RADIO_CAPS_TRANSMIT_SEC` capability. + * Is used when radio provides `OT_RADIO_CAPS_TRANSMIT_SEC` capability. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMacFrameCounter The MAC frame counter value. @@ -641,9 +641,9 @@ void otPlatRadioSetMacKey(otInstance *aInstance, void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter); /** - * This method sets the current MAC frame counter value only if the new given value is larger than the current value. + * Sets the current MAC frame counter value only if the new given value is larger than the current value. * - * This function is used when radio provides `OT_RADIO_CAPS_TRANSMIT_SEC` capability. + * Is used when radio provides `OT_RADIO_CAPS_TRANSMIT_SEC` capability. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMacFrameCounter The MAC frame counter value. @@ -693,7 +693,7 @@ uint32_t otPlatRadioGetBusSpeed(otInstance *aInstance); /** * Get current state of the radio. * - * This function is not required by OpenThread. It may be used for debugging and/or application-specific purposes. + * Is not required by OpenThread. It may be used for debugging and/or application-specific purposes. * * @note This function may be not implemented. It does not affect OpenThread. * @@ -787,7 +787,7 @@ extern void otPlatRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, /** * The radio driver calls this method to notify OpenThread diagnostics module of a received frame. * - * This function is used when diagnostics is enabled. + * Is used when diagnostics is enabled. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aFrame A pointer to the received frame or NULL if the receive operation failed. @@ -864,7 +864,7 @@ extern void otPlatRadioTxDone(otInstance *aInstance, otRadioFrame *aFrame, otRad /** * The radio driver calls this method to notify OpenThread diagnostics module that the transmission has completed. * - * This function is used when diagnostics is enabled. + * Is used when diagnostics is enabled. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aFrame A pointer to the frame that was transmitted. @@ -888,7 +888,7 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance); /** * Begin the energy scan sequence on the radio. * - * This function is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. + * Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aScanChannel The channel to perform the energy scan on. @@ -904,7 +904,7 @@ otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint1 /** * The radio driver calls this method to notify OpenThread that the energy scan is complete. * - * This function is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. + * Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aEnergyScanMaxRssi The maximum RSSI encountered on the scanned channel. @@ -1019,7 +1019,7 @@ uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance); /** * Enable the radio coex. * - * This function is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled. + * Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aEnabled TRUE to enable the radio coex, FALSE otherwise. @@ -1033,7 +1033,7 @@ otError otPlatRadioSetCoexEnabled(otInstance *aInstance, bool aEnabled); /** * Check whether radio coex is enabled or not. * - * This function is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled. + * Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled. * * @param[in] aInstance The OpenThread instance structure. * @@ -1045,7 +1045,7 @@ bool otPlatRadioIsCoexEnabled(otInstance *aInstance); /** * Get the radio coexistence metrics. * - * This function is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled. + * Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled. * * @param[in] aInstance The OpenThread instance structure. * @param[out] aCoexMetrics A pointer to the coexistence metrics structure. diff --git a/include/openthread/platform/settings.h b/include/openthread/platform/settings.h index a9ca05de4..5a1783c54 100644 --- a/include/openthread/platform/settings.h +++ b/include/openthread/platform/settings.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This enumeration defines the keys of settings. + * Defines the keys of settings. * * Note: When adding a new settings key, if the settings corresponding to the key contains security sensitive * information, the developer MUST add the key to the array `aSensitiveKeys` which is passed in @@ -90,7 +90,7 @@ enum /** * Performs any initialization for the settings subsystem, if necessary. * - * This function also sets the sensitive keys that should be stored in the secure area. + * Also sets the sensitive keys that should be stored in the secure area. * * Note that the memory pointed by @p aSensitiveKeys MUST not be released before @p aInstance is destroyed. * @@ -113,13 +113,13 @@ void otPlatSettingsDeinit(otInstance *aInstance); /** * Fetches the value of a setting. * - * This function fetches the value of the setting identified + * Fetches the value of the setting identified * by @p aKey and write it to the memory pointed to by aValue. * It then writes the length to the integer pointed to by * @p aValueLength. The initial value of @p aValueLength is the * maximum number of bytes to be written to @p aValue. * - * This function can be used to check for the existence of + * Can be used to check for the existence of * a key without fetching the value by setting @p aValue and * @p aValueLength to NULL. You can also check the length of * the setting without fetching it by setting only aValue @@ -149,7 +149,7 @@ otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint /** * Sets or replaces the value of a setting. * - * This function sets or replaces the value of a setting + * Sets or replaces the value of a setting * identified by @p aKey. * * Calling this function successfully may cause unrelated @@ -178,7 +178,7 @@ otError otPlatSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *a /** * Adds a value to a setting. * - * This function adds the value to a setting + * Adds the value to a setting * identified by @p aKey, without replacing any existing * values. * @@ -214,7 +214,7 @@ otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *a /** * Removes a setting from the setting store. * - * This function deletes a specific value from the + * Deletes a specific value from the * setting identified by aKey from the settings store. * * Note that the underlying implementation is not required @@ -235,7 +235,7 @@ otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex); /** * Removes all settings from the setting store. * - * This function deletes all settings from the settings + * Deletes all settings from the settings * store, resetting it to its initial factory state. * * @param[in] aInstance The OpenThread instance structure. diff --git a/include/openthread/platform/spi-slave.h b/include/openthread/platform/spi-slave.h index 551d70163..c3e4cb8fc 100644 --- a/include/openthread/platform/spi-slave.h +++ b/include/openthread/platform/spi-slave.h @@ -126,7 +126,7 @@ void otPlatSpiSlaveDisable(void); * Prepare data for the next SPI transaction. Data pointers MUST remain valid until the transaction complete callback * is called by the SPI slave driver, or until after the next call to `otPlatSpiSlavePrepareTransaction()`. * - * This function may be called more than once before the SPI master initiates the transaction. Each *successful* call + * May be called more than once before the SPI master initiates the transaction. Each *successful* call * to this function will cause the previous values from earlier calls to be discarded. * * Not calling this function after a completed transaction is the same as if this function was previously called with diff --git a/include/openthread/platform/toolchain.h b/include/openthread/platform/toolchain.h index d8b0308ef..383aefbb3 100644 --- a/include/openthread/platform/toolchain.h +++ b/include/openthread/platform/toolchain.h @@ -113,10 +113,10 @@ extern "C" { /** * @def OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK * - * This macro specifies that a function or method takes `printf` style arguments and should be type-checked against + * Specifies that a function or method takes `printf` style arguments and should be type-checked against * a format string. * - * This macro must be added after the function/method declaration. For example: + * Must be added after the function/method declaration. For example: * * `void MyPrintf(void *aObject, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3);` * diff --git a/include/openthread/platform/trel.h b/include/openthread/platform/trel.h index 6515b98d5..b372fded5 100644 --- a/include/openthread/platform/trel.h +++ b/include/openthread/platform/trel.h @@ -58,7 +58,7 @@ extern "C" { */ /** - * This function initializes and enables TREL platform layer. + * Initializes and enables TREL platform layer. * * Upon this call, the platform layer MUST perform the following: * @@ -87,7 +87,7 @@ extern "C" { void otPlatTrelEnable(otInstance *aInstance, uint16_t *aUdpPort); /** - * This function disables TREL platform layer. + * Disables TREL platform layer. * * After this call, the platform layer MUST stop DNS-SD browse on the service name "_trel._udp", stop advertising the * TREL DNS-SD service (from `otPlatTrelRegisterService()`) and MUST close the UDP socket used to receive TREL messages. @@ -98,7 +98,7 @@ void otPlatTrelEnable(otInstance *aInstance, uint16_t *aUdpPort); void otPlatTrelDisable(otInstance *aInstance); /** - * This structure represents a TREL peer info discovered using DNS-SD browse on the service name "_trel._udp". + * Represents a TREL peer info discovered using DNS-SD browse on the service name "_trel._udp". * */ typedef struct otPlatTrelPeerInfo @@ -145,7 +145,7 @@ typedef struct otPlatTrelPeerInfo extern void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPlatTrelPeerInfo *aInfo); /** - * This function registers a new service to be advertised using DNS-SD [RFC6763]. + * Registers a new service to be advertised using DNS-SD [RFC6763]. * * The service name is "_trel._udp". The platform should use its own hostname, which when combined with the service * name and the local DNS-SD domain name will produce the full service instance name, for example @@ -170,7 +170,7 @@ extern void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPl void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint8_t *aTxtData, uint8_t aTxtLength); /** - * This function requests a TREL UDP packet to be sent to a given destination. + * Requests a TREL UDP packet to be sent to a given destination. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aUdpPayload A pointer to UDP payload. @@ -184,7 +184,7 @@ void otPlatTrelSend(otInstance *aInstance, const otSockAddr *aDestSockAddr); /** - * This function is a callback from platform to notify of a received TREL UDP packet. + * Is a callback from platform to notify of a received TREL UDP packet. * * @note The buffer content (up to its specified length) may get changed during processing by OpenThread core (e.g., * decrypted in place), so the platform implementation should expect that after returning from this function the diff --git a/include/openthread/platform/udp.h b/include/openthread/platform/udp.h index b1dae45c7..59d1fc7e4 100644 --- a/include/openthread/platform/udp.h +++ b/include/openthread/platform/udp.h @@ -42,7 +42,7 @@ extern "C" { #endif /** - * This function initializes the UDP socket by platform. + * Initializes the UDP socket by platform. * * @param[in] aUdpSocket A pointer to the UDP socket. * @@ -53,7 +53,7 @@ extern "C" { otError otPlatUdpSocket(otUdpSocket *aUdpSocket); /** - * This function closes the UDP socket by platform. + * Closes the UDP socket by platform. * * @param[in] aUdpSocket A pointer to the UDP socket. * @@ -64,7 +64,7 @@ otError otPlatUdpSocket(otUdpSocket *aUdpSocket); otError otPlatUdpClose(otUdpSocket *aUdpSocket); /** - * This function binds the UDP socket by platform. + * Binds the UDP socket by platform. * * @param[in] aUdpSocket A pointer to the UDP socket. * @@ -75,7 +75,7 @@ otError otPlatUdpClose(otUdpSocket *aUdpSocket); otError otPlatUdpBind(otUdpSocket *aUdpSocket); /** - * This function binds the UDP socket to a platform network interface. + * Binds the UDP socket to a platform network interface. * * Note: only available when `OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE` is used. * @@ -89,7 +89,7 @@ otError otPlatUdpBind(otUdpSocket *aUdpSocket); otError otPlatUdpBindToNetif(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifIdentifier); /** - * This function connects UDP socket by platform. + * Connects UDP socket by platform. * * @param[in] aUdpSocket A pointer to the UDP socket. * @@ -100,7 +100,7 @@ otError otPlatUdpBindToNetif(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifId otError otPlatUdpConnect(otUdpSocket *aUdpSocket); /** - * This function sends UDP payload by platform. + * Sends UDP payload by platform. * * @param[in] aUdpSocket A pointer to the UDP socket. * @param[in] aMessage A pointer to the message to send. @@ -113,7 +113,7 @@ otError otPlatUdpConnect(otUdpSocket *aUdpSocket); otError otPlatUdpSend(otUdpSocket *aUdpSocket, otMessage *aMessage, const otMessageInfo *aMessageInfo); /** - * This function configures the UDP socket to join a UDP multicast group. + * Configures the UDP socket to join a UDP multicast group. * * Note: only available when `OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE` is used. * @@ -130,7 +130,7 @@ otError otPlatUdpJoinMulticastGroup(otUdpSocket *aUdpSocket, const otIp6Address *aAddress); /** - * This function configures the UDP socket to leave a UDP multicast group. + * Configures the UDP socket to leave a UDP multicast group. * * Note: only available when `OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE` is used. * diff --git a/include/openthread/random_crypto.h b/include/openthread/random_crypto.h index 937136a78..0c9dc5823 100644 --- a/include/openthread/random_crypto.h +++ b/include/openthread/random_crypto.h @@ -55,7 +55,7 @@ extern "C" { */ /** - * This function fills a given buffer with cryptographically secure random bytes. + * Fills a given buffer with cryptographically secure random bytes. * * @param[out] aBuffer A pointer to a buffer to fill with the random bytes. * @param[in] aSize Size of buffer (number of bytes to fill). diff --git a/include/openthread/random_noncrypto.h b/include/openthread/random_noncrypto.h index 40bb2600e..0b353ca78 100644 --- a/include/openthread/random_noncrypto.h +++ b/include/openthread/random_noncrypto.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This function generates and returns a random `uint32_t` value. + * Generates and returns a random `uint32_t` value. * * @returns A random `uint32_t` value. * @@ -60,7 +60,7 @@ extern "C" { uint32_t otRandomNonCryptoGetUint32(void); /** - * This function generates and returns a random byte. + * Generates and returns a random byte. * * @returns A random `uint8_t` value. * @@ -68,7 +68,7 @@ uint32_t otRandomNonCryptoGetUint32(void); uint8_t otRandomNonCryptoGetUint8(void); /** - * This function generates and returns a random `uint16_t` value. + * Generates and returns a random `uint16_t` value. * * @returns A random `uint16_t` value. * @@ -76,7 +76,7 @@ uint8_t otRandomNonCryptoGetUint8(void); uint16_t otRandomNonCryptoGetUint16(void); /** - * This function generates and returns a random `uint8_t` value within a given range `[aMin, aMax)`. + * Generates and returns a random `uint8_t` value within a given range `[aMin, aMax)`. * * @param[in] aMin A minimum value (this value can be included in returned random result). * @param[in] aMax A maximum value (this value is excluded from returned random result). @@ -86,7 +86,7 @@ uint16_t otRandomNonCryptoGetUint16(void); uint8_t otRandomNonCryptoGetUint8InRange(uint8_t aMin, uint8_t aMax); /** - * This function generates and returns a random `uint16_t` value within a given range `[aMin, aMax)`. + * Generates and returns a random `uint16_t` value within a given range `[aMin, aMax)`. * * @note The returned random value can include the @p aMin value but excludes the @p aMax. * @@ -98,7 +98,7 @@ uint8_t otRandomNonCryptoGetUint8InRange(uint8_t aMin, uint8_t aMax); uint16_t otRandomNonCryptoGetUint16InRange(uint16_t aMin, uint16_t aMax); /** - * This function generates and returns a random `uint32_t` value within a given range `[aMin, aMax)`. + * Generates and returns a random `uint32_t` value within a given range `[aMin, aMax)`. * * @note The returned random value can include the @p aMin value but excludes the @p aMax. * @@ -111,7 +111,7 @@ uint16_t otRandomNonCryptoGetUint16InRange(uint16_t aMin, uint16_t aMax); uint32_t otRandomNonCryptoGetUint32InRange(uint32_t aMin, uint32_t aMax); /** - * This function fills a given buffer with random bytes. + * Fills a given buffer with random bytes. * * @param[out] aBuffer A pointer to a buffer to fill with the random bytes. * @param[in] aSize Size of buffer (number of bytes to fill). @@ -120,7 +120,7 @@ uint32_t otRandomNonCryptoGetUint32InRange(uint32_t aMin, uint32_t aMax); void otRandomNonCryptoFillBuffer(uint8_t *aBuffer, uint16_t aSize); /** - * This function adds a random jitter within a given range to a given value. + * Adds a random jitter within a given range to a given value. * * @param[in] aValue A value to which the random jitter is added. * @param[in] aJitter Maximum jitter. Random jitter is selected from the range `[-aJitter, aJitter]`. diff --git a/include/openthread/server.h b/include/openthread/server.h index 3ce111705..28cb56325 100644 --- a/include/openthread/server.h +++ b/include/openthread/server.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This method provides a full or stable copy of the local Thread Network Data. + * Provides a full or stable copy of the local 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. @@ -100,7 +100,7 @@ otError otServerRemoveService(otInstance *aInstance, uint8_t aServiceDataLength); /** - * This function gets the next service in the local Network Data. + * Gets the next service in the local Network Data. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in,out] aIterator A pointer to the Network Data iterator context. To get the first service entry diff --git a/include/openthread/sntp.h b/include/openthread/sntp.h index 34b26c28c..98f9e86a5 100644 --- a/include/openthread/sntp.h +++ b/include/openthread/sntp.h @@ -57,7 +57,7 @@ extern "C" { #define OT_SNTP_DEFAULT_SERVER_PORT 123 ///< Defines default SNTP Server port. /** - * This structure implements SNTP Query parameters. + * Implements SNTP Query parameters. * */ typedef struct otSntpQuery @@ -66,7 +66,7 @@ typedef struct otSntpQuery } otSntpQuery; /** - * This function pointer is called when a SNTP response is received. + * Pointer is called when a SNTP response is received. * * @param[in] aContext A pointer to application-specific context. * @param[in] aTime Specifies the time at the server when the response left for the client, in UNIX time. @@ -83,9 +83,9 @@ typedef struct otSntpQuery typedef void (*otSntpResponseHandler)(void *aContext, uint64_t aTime, otError aResult); /** - * This function sends a SNTP query. + * Sends a SNTP query. * - * This function is available only if feature `OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE` is enabled. + * Is available only if feature `OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE` is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aQuery A pointer to specify SNTP query parameters. @@ -99,7 +99,7 @@ otError otSntpClientQuery(otInstance *aInstance, void *aContext); /** - * This function sets the unix era number. + * Sets the unix era number. * * The default value of unix era is set to 0. The subsequent eras start after year 2106. * diff --git a/include/openthread/srp_client.h b/include/openthread/srp_client.h index beaa06225..6eac2b1a8 100644 --- a/include/openthread/srp_client.h +++ b/include/openthread/srp_client.h @@ -53,7 +53,7 @@ extern "C" { */ /** - * This enumeration specifies an SRP client item (service or host info) state. + * Specifies an SRP client item (service or host info) state. * */ typedef enum @@ -69,7 +69,7 @@ typedef enum } otSrpClientItemState; /** - * This structure represents an SRP client host info. + * Represents an SRP client host info. * */ typedef struct otSrpClientHostInfo @@ -82,7 +82,7 @@ typedef struct otSrpClientHostInfo } otSrpClientHostInfo; /** - * This structure represents an SRP client service. + * Represents an SRP client service. * * The values in this structure, including the string buffers for the names and the TXT record entries, MUST persist * and stay constant after an instance of this structure is passed to OpenThread from `otSrpClientAddService()` or @@ -119,7 +119,7 @@ typedef struct otSrpClientService } otSrpClientService; /** - * This function pointer type defines the callback used by SRP client to notify user of changes/events/errors. + * Pointer type defines the callback used by SRP client to notify user of changes/events/errors. * * This callback is invoked on a successful registration of an update (i.e., add/remove of host-info and/or some * service(s)) with the SRP server, or if there is a failure or error (e.g., server rejects a update request or client @@ -180,7 +180,7 @@ typedef void (*otSrpClientCallback)(otError aError, void *aContext); /** - * This function pointer type defines the callback used by SRP client to notify user when it is auto-started or stopped. + * Pointer type defines the callback used by SRP client to notify user when it is auto-started or stopped. * * This is only used when auto-start feature `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` is enabled. * @@ -195,7 +195,7 @@ typedef void (*otSrpClientCallback)(otError aError, typedef void (*otSrpClientAutoStartCallback)(const otSockAddr *aServerSockAddr, void *aContext); /** - * This function starts the SRP client operation. + * Starts the SRP client operation. * * SRP client will prepare and send "SRP Update" message to the SRP server once all the following conditions are met: * @@ -222,9 +222,9 @@ typedef void (*otSrpClientAutoStartCallback)(const otSockAddr *aServerSockAddr, otError otSrpClientStart(otInstance *aInstance, const otSockAddr *aServerSockAddr); /** - * This function stops the SRP client operation. + * Stops the SRP client operation. * - * This function stops any further interactions with the SRP server. Note that it does not remove or clear host info + * Stops any further interactions with the SRP server. Note that it does not remove or clear host info * and/or list of services. It marks all services to be added/removed again once the client is (re)started. * * @param[in] aInstance A pointer to the OpenThread instance. @@ -233,7 +233,7 @@ otError otSrpClientStart(otInstance *aInstance, const otSockAddr *aServerSockAdd void otSrpClientStop(otInstance *aInstance); /** - * This function indicates whether the SRP client is running or not. + * Indicates whether the SRP client is running or not. * * @param[in] aInstance A pointer to the OpenThread instance. * @@ -243,7 +243,7 @@ void otSrpClientStop(otInstance *aInstance); bool otSrpClientIsRunning(otInstance *aInstance); /** - * This function gets the socket address (IPv6 address and port number) of the SRP server which is being used by SRP + * Gets the socket address (IPv6 address and port number) of the SRP server which is being used by SRP * client. * * If the client is not running, the address is unspecified (all zero) with zero port number. @@ -256,7 +256,7 @@ bool otSrpClientIsRunning(otInstance *aInstance); const otSockAddr *otSrpClientGetServerAddress(otInstance *aInstance); /** - * This function sets the callback to notify caller of events/changes from SRP client. + * Sets the callback to notify caller of events/changes from SRP client. * * The SRP client allows a single callback to be registered. So consecutive calls to this function will overwrite any * previously set callback functions. @@ -269,7 +269,7 @@ const otSockAddr *otSrpClientGetServerAddress(otInstance *aInstance); void otSrpClientSetCallback(otInstance *aInstance, otSrpClientCallback aCallback, void *aContext); /** - * This function enables the auto-start mode. + * Enables the auto-start mode. * * This is only available when auto-start feature `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` is enabled. * @@ -310,7 +310,7 @@ void otSrpClientSetCallback(otInstance *aInstance, otSrpClientCallback aCallback void otSrpClientEnableAutoStartMode(otInstance *aInstance, otSrpClientAutoStartCallback aCallback, void *aContext); /** - * This function disables the auto-start mode. + * Disables the auto-start mode. * * This is only available when auto-start feature `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` is enabled. * @@ -325,7 +325,7 @@ void otSrpClientEnableAutoStartMode(otInstance *aInstance, otSrpClientAutoStartC void otSrpClientDisableAutoStartMode(otInstance *aInstance); /** - * This function indicates the current state of auto-start mode (enabled or disabled). + * Indicates the current state of auto-start mode (enabled or disabled). * * This is only available when auto-start feature `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` is enabled. * @@ -337,7 +337,7 @@ void otSrpClientDisableAutoStartMode(otInstance *aInstance); bool otSrpClientIsAutoStartModeEnabled(otInstance *aInstance); /** - * This function gets the TTL value in every record included in SRP update requests. + * Gets the TTL value in every record included in SRP update requests. * * Note that this is the TTL requested by the SRP client. The server may choose to accept a different TTL. * @@ -352,7 +352,7 @@ bool otSrpClientIsAutoStartModeEnabled(otInstance *aInstance); uint32_t otSrpClientGetTtl(otInstance *aInstance); /** - * This function sets the TTL value in every record included in SRP update requests. + * Sets the TTL value in every record included in SRP update requests. * * Changing the TTL does not impact the TTL of already registered services/host-info. * It only affects future SRP update messages (i.e., adding new services and/or refreshes of the existing services). @@ -365,7 +365,7 @@ uint32_t otSrpClientGetTtl(otInstance *aInstance); void otSrpClientSetTtl(otInstance *aInstance, uint32_t aTtl); /** - * This function gets the default lease interval used in SRP update requests. + * Gets the default lease interval used in SRP update requests. * * The default interval is used only for `otSrpClientService` instances with `mLease` set to zero. * @@ -380,7 +380,7 @@ void otSrpClientSetTtl(otInstance *aInstance, uint32_t aTtl); uint32_t otSrpClientGetLeaseInterval(otInstance *aInstance); /** - * This function sets the default lease interval used in SRP update requests. + * Sets the default lease interval used in SRP update requests. * * The default interval is used only for `otSrpClientService` instances with `mLease` set to zero. * @@ -395,7 +395,7 @@ uint32_t otSrpClientGetLeaseInterval(otInstance *aInstance); void otSrpClientSetLeaseInterval(otInstance *aInstance, uint32_t aInterval); /** - * This function gets the default key lease interval used in SRP update requests. + * Gets the default key lease interval used in SRP update requests. * * The default interval is used only for `otSrpClientService` instances with `mKeyLease` set to zero. * @@ -410,7 +410,7 @@ void otSrpClientSetLeaseInterval(otInstance *aInstance, uint32_t aInterval); uint32_t otSrpClientGetKeyLeaseInterval(otInstance *aInstance); /** - * This function sets the default key lease interval used in SRP update requests. + * Sets the default key lease interval used in SRP update requests. * * The default interval is used only for `otSrpClientService` instances with `mKeyLease` set to zero. * @@ -425,7 +425,7 @@ uint32_t otSrpClientGetKeyLeaseInterval(otInstance *aInstance); void otSrpClientSetKeyLeaseInterval(otInstance *aInstance, uint32_t aInterval); /** - * This function gets the host info. + * Gets the host info. * * @param[in] aInstance A pointer to the OpenThread instance. * @@ -435,7 +435,7 @@ void otSrpClientSetKeyLeaseInterval(otInstance *aInstance, uint32_t aInterval); const otSrpClientHostInfo *otSrpClientGetHostInfo(otInstance *aInstance); /** - * This function sets the host name label. + * Sets the host name label. * * After a successful call to this function, `otSrpClientCallback` will be called to report the status of host info * registration with SRP server. @@ -458,7 +458,7 @@ const otSrpClientHostInfo *otSrpClientGetHostInfo(otInstance *aInstance); otError otSrpClientSetHostName(otInstance *aInstance, const char *aName); /** - * This function enables auto host address mode. + * Enables auto host address mode. * * When enabled host IPv6 addresses are automatically set by SRP client using all the unicast addresses on Thread netif * excluding all link-local and mesh-local addresses. If there is no valid address, then Mesh Local EID address is @@ -479,7 +479,7 @@ otError otSrpClientSetHostName(otInstance *aInstance, const char *aName); otError otSrpClientEnableAutoHostAddress(otInstance *aInstance); /** - * This function sets/updates the list of host IPv6 address. + * Sets/updates the list of host IPv6 address. * * Host IPv6 addresses can be set/changed before start or during operation of SRP client (e.g. to add/remove or change * a previously registered host address), except when the host info is being removed (client is busy handling a remove @@ -508,7 +508,7 @@ otError otSrpClientEnableAutoHostAddress(otInstance *aInstance); otError otSrpClientSetHostAddresses(otInstance *aInstance, const otIp6Address *aIp6Addresses, uint8_t aNumAddresses); /** - * This function adds a service to be registered with server. + * Adds a service to be registered with server. * * After a successful call to this function, `otSrpClientCallback` will be called to report the status of the service * addition/registration with SRP server. @@ -535,7 +535,7 @@ otError otSrpClientSetHostAddresses(otInstance *aInstance, const otIp6Address *a otError otSrpClientAddService(otInstance *aInstance, otSrpClientService *aService); /** - * This function requests a service to be unregistered with server. + * Requests a service to be unregistered with server. * * After a successful call to this function, `otSrpClientCallback` will be called to report the status of remove * request with SRP server. @@ -556,14 +556,14 @@ otError otSrpClientAddService(otInstance *aInstance, otSrpClientService *aServic otError otSrpClientRemoveService(otInstance *aInstance, otSrpClientService *aService); /** - * This function clears a service, immediately removing it from the client service list. + * Clears a service, immediately removing it from the client service list. * * Unlike `otSrpClientRemoveService()` which sends an update message to the server to remove the service, this function * clears the service from the client's service list without any interaction with the server. On a successful call to * this function, the `otSrpClientCallback` will NOT be called and the @p aService entry can be reclaimed and re-used * by the caller immediately. * - * This function can be used along with a subsequent call to `otSrpClientAddService()` (potentially reusing the same @p + * Can be used along with a subsequent call to `otSrpClientAddService()` (potentially reusing the same @p * aService entry with the same service and instance names) to update some of the parameters in an existing service. * * @param[in] aInstance A pointer to the OpenThread instance. @@ -576,7 +576,7 @@ otError otSrpClientRemoveService(otInstance *aInstance, otSrpClientService *aSer otError otSrpClientClearService(otInstance *aInstance, otSrpClientService *aService); /** - * This function gets the list of services being managed by client. + * Gets the list of services being managed by client. * * @param[in] aInstance A pointer to the OpenThread instance. * @@ -586,7 +586,7 @@ otError otSrpClientClearService(otInstance *aInstance, otSrpClientService *aServ const otSrpClientService *otSrpClientGetServices(otInstance *aInstance); /** - * This function starts the remove process of the host info and all services. + * Starts the remove process of the host info and all services. * * After returning from this function, `otSrpClientCallback` will be called to report the status of remove request with * SRP server. @@ -619,7 +619,7 @@ const otSrpClientService *otSrpClientGetServices(otInstance *aInstance); otError otSrpClientRemoveHostAndServices(otInstance *aInstance, bool aRemoveKeyLease, bool aSendUnregToServer); /** - * This function clears all host info and all the services. + * Clears all host info and all the services. * * Unlike `otSrpClientRemoveHostAndServices()` which sends an update message to the server to remove all the info, this * function clears all the info immediately without any interaction with the server. @@ -630,9 +630,9 @@ otError otSrpClientRemoveHostAndServices(otInstance *aInstance, bool aRemoveKeyL void otSrpClientClearHostAndServices(otInstance *aInstance); /** - * This function gets the domain name being used by SRP client. + * Gets the domain name being used by SRP client. * - * This function requires `OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE` to be enabled. + * Requires `OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE` to be enabled. * * If domain name is not set, "default.service.arpa" will be used. * @@ -644,9 +644,9 @@ void otSrpClientClearHostAndServices(otInstance *aInstance); const char *otSrpClientGetDomainName(otInstance *aInstance); /** - * This function sets the domain name to be used by SRP client. + * Sets the domain name to be used by SRP client. * - * This function requires `OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE` to be enabled. + * Requires `OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE` to be enabled. * * If not set "default.service.arpa" will be used. * @@ -666,7 +666,7 @@ const char *otSrpClientGetDomainName(otInstance *aInstance); otError otSrpClientSetDomainName(otInstance *aInstance, const char *aName); /** - * This function converts a `otSrpClientItemState` to a string. + * Converts a `otSrpClientItemState` to a string. * * @param[in] aItemState An item state. * @@ -676,12 +676,12 @@ otError otSrpClientSetDomainName(otInstance *aInstance, const char *aName); const char *otSrpClientItemStateToString(otSrpClientItemState aItemState); /** - * This function enables/disables "service key record inclusion" mode. + * Enables/disables "service key record inclusion" mode. * * When enabled, SRP client will include KEY record in Service Description Instructions in the SRP update messages * that it sends. * - * This function is available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` configuration is enabled. + * Is available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` configuration is enabled. * * @note KEY record is optional in Service Description Instruction (it is required and always included in the Host * Description Instruction). The default behavior of SRP client is to not include it. This function is intended to @@ -694,9 +694,9 @@ const char *otSrpClientItemStateToString(otSrpClientItemState aItemState); void otSrpClientSetServiceKeyRecordEnabled(otInstance *aInstance, bool aEnabled); /** - * This method indicates whether the "service key record inclusion" mode is enabled or disabled. + * Indicates whether the "service key record inclusion" mode is enabled or disabled. * - * This function is available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` configuration is enabled. + * Is available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` configuration is enabled. * * @param[in] aInstance A pointer to the OpenThread instance. * diff --git a/include/openthread/srp_client_buffers.h b/include/openthread/srp_client_buffers.h index 1f8c457c8..974da0d56 100644 --- a/include/openthread/srp_client_buffers.h +++ b/include/openthread/srp_client_buffers.h @@ -55,7 +55,7 @@ extern "C" { */ /** - * This struct represents a SRP client service pool entry. + * Represents a SRP client service pool entry. * */ typedef struct otSrpClientBuffersServiceEntry @@ -65,7 +65,7 @@ typedef struct otSrpClientBuffersServiceEntry } otSrpClientBuffersServiceEntry; /** - * This function gets the string buffer to use for SRP client host name. + * Gets the string buffer to use for SRP client host name. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[out] aSize Pointer to a variable to return the size (number of bytes) of the string buffer (MUST NOT be @@ -77,7 +77,7 @@ typedef struct otSrpClientBuffersServiceEntry char *otSrpClientBuffersGetHostNameString(otInstance *aInstance, uint16_t *aSize); /** - * This function gets the array of IPv6 address entries to use as SRP client host address list. + * Gets the array of IPv6 address entries to use as SRP client host address list. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[out] aArrayLength Pointer to a variable to return the array length i.e., number of IPv6 address entries in @@ -89,7 +89,7 @@ char *otSrpClientBuffersGetHostNameString(otInstance *aInstance, uint16_t *aSize otIp6Address *otSrpClientBuffersGetHostAddressesArray(otInstance *aInstance, uint8_t *aArrayLength); /** - * This function allocates a new service entry from the pool. + * Allocates a new service entry from the pool. * * The returned service entry instance will be initialized as follows: * @@ -115,7 +115,7 @@ otIp6Address *otSrpClientBuffersGetHostAddressesArray(otInstance *aInstance, uin otSrpClientBuffersServiceEntry *otSrpClientBuffersAllocateService(otInstance *aInstance); /** - * This function frees a previously allocated service entry. + * Frees a previously allocated service entry. * * The @p aService MUST be previously allocated using `otSrpClientBuffersAllocateService()` and not yet freed. Otherwise * the behavior of this function is undefined. @@ -127,7 +127,7 @@ otSrpClientBuffersServiceEntry *otSrpClientBuffersAllocateService(otInstance *aI void otSrpClientBuffersFreeService(otInstance *aInstance, otSrpClientBuffersServiceEntry *aService); /** - * This function frees all previously allocated service entries. + * Frees all previously allocated service entries. * * @param[in] aInstance A pointer to the OpenThread instance. * @@ -135,7 +135,7 @@ void otSrpClientBuffersFreeService(otInstance *aInstance, otSrpClientBuffersServ void otSrpClientBuffersFreeAllServices(otInstance *aInstance); /** - * This function gets the string buffer for service name from a service entry. + * Gets the string buffer for service name from a service entry. * * @param[in] aEntry A pointer to a previously allocated service entry (MUST NOT be NULL). * @param[out] aSize A pointer to a variable to return the size (number of bytes) of the string buffer (MUST NOT be @@ -147,7 +147,7 @@ void otSrpClientBuffersFreeAllServices(otInstance *aInstance); char *otSrpClientBuffersGetServiceEntryServiceNameString(otSrpClientBuffersServiceEntry *aEntry, uint16_t *aSize); /** - * This function gets the string buffer for service instance name from a service entry. + * Gets the string buffer for service instance name from a service entry. * * @param[in] aEntry A pointer to a previously allocated service entry (MUST NOT be NULL). * @param[out] aSize A pointer to a variable to return the size (number of bytes) of the string buffer (MUST NOT be @@ -159,7 +159,7 @@ char *otSrpClientBuffersGetServiceEntryServiceNameString(otSrpClientBuffersServi char *otSrpClientBuffersGetServiceEntryInstanceNameString(otSrpClientBuffersServiceEntry *aEntry, uint16_t *aSize); /** - * This function gets the buffer for TXT record from a service entry. + * Gets the buffer for TXT record from a service entry. * * @param[in] aEntry A pointer to a previously allocated service entry (MUST NOT be NULL). * @param[out] aSize A pointer to a variable to return the size (number of bytes) of the buffer (MUST NOT be NULL). @@ -170,7 +170,7 @@ char *otSrpClientBuffersGetServiceEntryInstanceNameString(otSrpClientBuffersServ uint8_t *otSrpClientBuffersGetServiceEntryTxtBuffer(otSrpClientBuffersServiceEntry *aEntry, uint16_t *aSize); /** - * This function gets the array for service subtype labels from the service entry. + * Gets the array for service subtype labels from the service entry. * * @param[in] aEntry A pointer to a previously allocated service entry (MUST NOT be NULL). * @param[out] aArrayLength A pointer to a variable to return the array length (MUST NOT be NULL). diff --git a/include/openthread/srp_server.h b/include/openthread/srp_server.h index c3dd36b2f..4a37b4614 100644 --- a/include/openthread/srp_server.h +++ b/include/openthread/srp_server.h @@ -132,7 +132,7 @@ enum }; /** - * This enumeration represents the state of the SRP server. + * Represents the state of the SRP server. * */ typedef enum @@ -143,7 +143,7 @@ typedef enum } otSrpServerState; /** - * This enumeration represents the address mode used by the SRP server. + * Represents the address mode used by the SRP server. * * Address mode specifies how the address and port number are determined by the SRP server and how this info is * published in the Thread Network Data. @@ -156,7 +156,7 @@ typedef enum otSrpServerAddressMode } otSrpServerAddressMode; /** - * This structure includes SRP server TTL configurations. + * Includes SRP server TTL configurations. * */ typedef struct otSrpServerTtlConfig @@ -166,7 +166,7 @@ typedef struct otSrpServerTtlConfig } otSrpServerTtlConfig; /** - * This structure includes SRP server LEASE and KEY-LEASE configurations. + * Includes SRP server LEASE and KEY-LEASE configurations. * */ typedef struct otSrpServerLeaseConfig @@ -178,7 +178,7 @@ typedef struct otSrpServerLeaseConfig } otSrpServerLeaseConfig; /** - * This structure includes SRP server lease information of a host/service. + * Includes SRP server lease information of a host/service. * */ typedef struct otSrpServerLeaseInfo @@ -190,7 +190,7 @@ typedef struct otSrpServerLeaseInfo } otSrpServerLeaseInfo; /** - * This structure includes the statistics of SRP server responses. + * Includes the statistics of SRP server responses. * */ typedef struct otSrpServerResponseCounters @@ -204,7 +204,7 @@ typedef struct otSrpServerResponseCounters } otSrpServerResponseCounters; /** - * This function returns the domain authorized to the SRP server. + * Returns the domain authorized to the SRP server. * * If the domain if not set by SetDomain, "default.service.arpa." will be returned. * A trailing dot is always appended even if the domain is set without it. @@ -217,10 +217,10 @@ typedef struct otSrpServerResponseCounters const char *otSrpServerGetDomain(otInstance *aInstance); /** - * This function sets the domain on the SRP server. + * Sets the domain on the SRP server. * * A trailing dot will be appended to @p aDomain if it is not already there. - * This function should only be called before the SRP server is enabled. + * 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 NULL. @@ -234,7 +234,7 @@ const char *otSrpServerGetDomain(otInstance *aInstance); otError otSrpServerSetDomain(otInstance *aInstance, const char *aDomain); /** - * This function returns the state of the SRP server. + * Returns the state of the SRP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -244,7 +244,7 @@ otError otSrpServerSetDomain(otInstance *aInstance, const char *aDomain); otSrpServerState otSrpServerGetState(otInstance *aInstance); /** - * This function returns the port the SRP server is listening to. + * Returns the port the SRP server is listening to. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -254,7 +254,7 @@ otSrpServerState otSrpServerGetState(otInstance *aInstance); uint16_t otSrpServerGetPort(otInstance *aInstance); /** - * This function returns the address mode being used by the SRP server. + * Returns the address mode being used by the SRP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -264,7 +264,7 @@ uint16_t otSrpServerGetPort(otInstance *aInstance); otSrpServerAddressMode otSrpServerGetAddressMode(otInstance *aInstance); /** - * This function sets the address mode to be used by the SRP server. + * Sets the address mode to be used by the SRP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMode The address mode to use. @@ -276,7 +276,7 @@ otSrpServerAddressMode otSrpServerGetAddressMode(otInstance *aInstance); otError otSrpServerSetAddressMode(otInstance *aInstance, otSrpServerAddressMode aMode); /** - * This function returns the sequence number used with anycast address mode. + * Returns the sequence number used with anycast address mode. * * The sequence number is included in "DNS/SRP Service Anycast Address" entry published in the Network Data. * @@ -288,7 +288,7 @@ otError otSrpServerSetAddressMode(otInstance *aInstance, otSrpServerAddressMode uint8_t otSrpServerGetAnycastModeSequenceNumber(otInstance *aInstance); /** - * This function sets the sequence number used with anycast address mode. + * Sets the sequence number used with anycast address mode. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aSequenceNumber The sequence number to use. @@ -300,7 +300,7 @@ uint8_t otSrpServerGetAnycastModeSequenceNumber(otInstance *aInstance); otError otSrpServerSetAnycastModeSequenceNumber(otInstance *aInstance, uint8_t aSequenceNumber); /** - * This function enables/disables the SRP server. + * Enables/disables the SRP server. * * On a Border Router, it is recommended to use `otSrpServerSetAutoEnableMode()` instead. * @@ -311,9 +311,9 @@ otError otSrpServerSetAnycastModeSequenceNumber(otInstance *aInstance, uint8_t a void otSrpServerSetEnabled(otInstance *aInstance, bool aEnabled); /** - * This function enables/disables the auto-enable mode on SRP server. + * Enables/disables the auto-enable mode on SRP server. * - * This function requires `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` feature. + * Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` feature. * * When this mode is enabled, the Border Routing Manager controls if/when to enable or disable the SRP server. * SRP sever is auto-enabled if/when Border Routing is started and it is done with the initial prefix and route @@ -333,9 +333,9 @@ void otSrpServerSetEnabled(otInstance *aInstance, bool aEnabled); void otSrpServerSetAutoEnableMode(otInstance *aInstance, bool aEnabled); /** - * This function indicates whether the auto-enable mode is enabled or disabled. + * Indicates whether the auto-enable mode is enabled or disabled. * - * This function requires `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` feature. + * Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` feature. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -346,7 +346,7 @@ void otSrpServerSetAutoEnableMode(otInstance *aInstance, bool aEnabled); bool otSrpServerIsAutoEnableMode(otInstance *aInstance); /** - * This function returns SRP server TTL configuration. + * Returns SRP server TTL configuration. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aTtlConfig A pointer to an `otSrpServerTtlConfig` instance. @@ -355,7 +355,7 @@ bool otSrpServerIsAutoEnableMode(otInstance *aInstance); void otSrpServerGetTtlConfig(otInstance *aInstance, otSrpServerTtlConfig *aTtlConfig); /** - * This function sets SRP server TTL configuration. + * Sets SRP server TTL configuration. * * The granted TTL will always be no greater than the max lease interval configured via `otSrpServerSetLeaseConfig()`, * regardless of the minimum and maximum TTL configuration. @@ -370,7 +370,7 @@ void otSrpServerGetTtlConfig(otInstance *aInstance, otSrpServerTtlConfig *aTtlCo otError otSrpServerSetTtlConfig(otInstance *aInstance, const otSrpServerTtlConfig *aTtlConfig); /** - * This function returns SRP server LEASE and KEY-LEASE configurations. + * Returns SRP server LEASE and KEY-LEASE configurations. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aLeaseConfig A pointer to an `otSrpServerLeaseConfig` instance. @@ -379,7 +379,7 @@ otError otSrpServerSetTtlConfig(otInstance *aInstance, const otSrpServerTtlConfi void otSrpServerGetLeaseConfig(otInstance *aInstance, otSrpServerLeaseConfig *aLeaseConfig); /** - * This function sets SRP server LEASE and KEY-LEASE configurations. + * Sets SRP server LEASE and KEY-LEASE configurations. * * When a non-zero LEASE time is requested from a client, the granted value will be * limited in range [aMinLease, aMaxLease]; and a non-zero KEY-LEASE will be granted @@ -396,9 +396,9 @@ void otSrpServerGetLeaseConfig(otInstance *aInstance, otSrpServerLeaseConfig *aL otError otSrpServerSetLeaseConfig(otInstance *aInstance, const otSrpServerLeaseConfig *aLeaseConfig); /** - * This function handles SRP service updates. + * Handles SRP service updates. * - * This function is called by the SRP server to notify that a SRP host and possibly SRP services + * 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 committed until the handler * returns the result by calling otSrpServerHandleServiceUpdateResult or times out after @p aTimeout. * @@ -434,7 +434,7 @@ typedef void (*otSrpServerServiceUpdateHandler)(otSrpServerServiceUpdateId aId, void *aContext); /** - * This function sets the SRP service updates handler on SRP server. + * Sets the SRP service updates handler on SRP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aServiceHandler A pointer to a service handler. Use NULL to remove the handler. @@ -447,7 +447,7 @@ void otSrpServerSetServiceUpdateHandler(otInstance *aInstanc void *aContext); /** - * This function reports the result of processing a SRP update to the SRP server. + * Reports the result of processing a SRP update to the SRP server. * * The Service Update Handler should call this function to return the result of its * processing of a SRP update. @@ -462,7 +462,7 @@ void otSrpServerSetServiceUpdateHandler(otInstance *aInstanc void otSrpServerHandleServiceUpdateResult(otInstance *aInstance, otSrpServerServiceUpdateId aId, otError aError); /** - * This function returns the next registered host on the SRP server. + * Returns the next registered host on the SRP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aHost A pointer to current host; use NULL to get the first host. @@ -473,7 +473,7 @@ void otSrpServerHandleServiceUpdateResult(otInstance *aInstance, otSrpServerServ const otSrpServerHost *otSrpServerGetNextHost(otInstance *aInstance, const otSrpServerHost *aHost); /** - * This function returns the response counters of the SRP server. + * Returns the response counters of the SRP server. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -483,7 +483,7 @@ const otSrpServerHost *otSrpServerGetNextHost(otInstance *aInstance, const otSrp const otSrpServerResponseCounters *otSrpServerGetResponseCounters(otInstance *aInstance); /** - * This function tells if the SRP service host has been deleted. + * Tells if the SRP service host has been deleted. * * A SRP service host can be deleted but retains its name for future uses. * In this case, the host instance is not removed from the SRP server/registry. @@ -496,7 +496,7 @@ const otSrpServerResponseCounters *otSrpServerGetResponseCounters(otInstance *aI bool otSrpServerHostIsDeleted(const otSrpServerHost *aHost); /** - * This function returns the full name of the host. + * Returns the full name of the host. * * @param[in] aHost A pointer to the SRP service host. * @@ -506,7 +506,7 @@ bool otSrpServerHostIsDeleted(const otSrpServerHost *aHost); const char *otSrpServerHostGetFullName(const otSrpServerHost *aHost); /** - * This function returns the addresses of given host. + * Returns the addresses of given host. * * @param[in] aHost A pointer to the SRP service host. * @param[out] aAddressesNum A pointer to where we should output the number of the addresses to. @@ -517,7 +517,7 @@ const char *otSrpServerHostGetFullName(const otSrpServerHost *aHost); const otIp6Address *otSrpServerHostGetAddresses(const otSrpServerHost *aHost, uint8_t *aAddressesNum); /** - * This function returns the LEASE and KEY-LEASE information of a given host. + * Returns the LEASE and KEY-LEASE information of a given host. * * @param[in] aHost A pointer to the SRP server host. * @param[out] aLeaseInfo A pointer to where to output the LEASE and KEY-LEASE information. @@ -526,7 +526,7 @@ const otIp6Address *otSrpServerHostGetAddresses(const otSrpServerHost *aHost, ui void otSrpServerHostGetLeaseInfo(const otSrpServerHost *aHost, otSrpServerLeaseInfo *aLeaseInfo); /** - * This function returns the next service (excluding any sub-type services) of given host. + * Returns the next service (excluding any sub-type services) of given host. * * @note This function is being deprecated and will be removed. `otSrpServerHostFindNextService()` can be used * instead. @@ -541,7 +541,7 @@ const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost const otSrpServerService *aService); /** - * This function finds the next matching service on the host. + * Finds the next matching service on the host. * * The combination of flags and service and instance names enables iterating over the full list of services and/or a * subset of them matching certain conditions, or finding a specific service. @@ -579,7 +579,7 @@ const otSrpServerService *otSrpServerHostFindNextService(const otSrpServerHost const char *aInstanceName); /** - * This function indicates whether or not the SRP service has been deleted. + * Indicates whether or not the SRP service has been deleted. * * A SRP service can be deleted but retains its name for future uses. * In this case, the service instance is not removed from the SRP server/registry. @@ -593,7 +593,7 @@ const otSrpServerService *otSrpServerHostFindNextService(const otSrpServerHost bool otSrpServerServiceIsDeleted(const otSrpServerService *aService); /** - * This function indicates whether or not the SRP service is sub-type. + * Indicates whether or not the SRP service is sub-type. * * @param[in] aService A pointer to the SRP service. * @@ -603,7 +603,7 @@ bool otSrpServerServiceIsDeleted(const otSrpServerService *aService); bool otSrpServerServiceIsSubType(const otSrpServerService *aService); /** - * This function returns the full service instance name of the service. + * Returns the full service instance name of the service. * * @note This function is being deprecated and will be removed. `otSrpServerServiceGetInstanceName()` can be used * instead. @@ -616,7 +616,7 @@ bool otSrpServerServiceIsSubType(const otSrpServerService *aService); const char *otSrpServerServiceGetFullName(const otSrpServerService *aService); /** - * This function returns the full service instance name of the service. + * Returns the full service instance name of the service. * * @param[in] aService A pointer to the SRP service. * @@ -626,7 +626,7 @@ const char *otSrpServerServiceGetFullName(const otSrpServerService *aService); const char *otSrpServerServiceGetInstanceName(const otSrpServerService *aService); /** - * This function returns the full service name of the service. + * Returns the full service name of the service. * * @param[in] aService A pointer to the SRP service. * @@ -636,9 +636,9 @@ const char *otSrpServerServiceGetInstanceName(const otSrpServerService *aService const char *otSrpServerServiceGetServiceName(const otSrpServerService *aService); /** - * This function gets the sub-type label from service name. + * Gets the sub-type label from service name. * - * This function is intended to be used when the @p aService is a sub-type, i.e., `otSrpServerServiceIsSubType()` for + * Is intended to be used when the @p aService is a sub-type, i.e., `otSrpServerServiceIsSubType()` for * the service returns TRUE. If it is not a sub-type this function returns `OT_ERROR_INVALID_ARGS`. * * The full service name for a sub-type service follows "._sub...". This function @@ -659,7 +659,7 @@ const char *otSrpServerServiceGetServiceName(const otSrpServerService *aService) otError otSrpServerServiceGetServiceSubTypeLabel(const otSrpServerService *aService, char *aLabel, uint8_t aMaxSize); /** - * This function returns the port of the service instance. + * Returns the port of the service instance. * * @param[in] aService A pointer to the SRP service. * @@ -669,7 +669,7 @@ otError otSrpServerServiceGetServiceSubTypeLabel(const otSrpServerService *aServ uint16_t otSrpServerServiceGetPort(const otSrpServerService *aService); /** - * This function returns the weight of the service instance. + * Returns the weight of the service instance. * * @param[in] aService A pointer to the SRP service. * @@ -679,7 +679,7 @@ uint16_t otSrpServerServiceGetPort(const otSrpServerService *aService); uint16_t otSrpServerServiceGetWeight(const otSrpServerService *aService); /** - * This function returns the priority of the service instance. + * Returns the priority of the service instance. * * @param[in] aService A pointer to the SRP service. * @@ -689,7 +689,7 @@ uint16_t otSrpServerServiceGetWeight(const otSrpServerService *aService); uint16_t otSrpServerServiceGetPriority(const otSrpServerService *aService); /** - * This function returns the TTL of the service instance. + * Returns the TTL of the service instance. * * @param[in] aService A pointer to the SRP service. * @@ -699,7 +699,7 @@ uint16_t otSrpServerServiceGetPriority(const otSrpServerService *aService); uint32_t otSrpServerServiceGetTtl(const otSrpServerService *aService); /** - * This function returns the TXT record data of the service instance. + * Returns the TXT record data of the service instance. * * @param[in] aService A pointer to the SRP service. * @param[out] aDataLength A pointer to return the TXT record data length. MUST NOT be NULL. @@ -710,7 +710,7 @@ uint32_t otSrpServerServiceGetTtl(const otSrpServerService *aService); const uint8_t *otSrpServerServiceGetTxtData(const otSrpServerService *aService, uint16_t *aDataLength); /** - * This function returns the host which the service instance reside on. + * Returns the host which the service instance reside on. * * @param[in] aService A pointer to the SRP service. * @@ -720,7 +720,7 @@ const uint8_t *otSrpServerServiceGetTxtData(const otSrpServerService *aService, const otSrpServerHost *otSrpServerServiceGetHost(const otSrpServerService *aService); /** - * This function returns the LEASE and KEY-LEASE information of a given service. + * Returns the LEASE and KEY-LEASE information of a given service. * * @param[in] aService A pointer to the SRP server service. * @param[out] aLeaseInfo A pointer to where to output the LEASE and KEY-LEASE information. diff --git a/include/openthread/tcp.h b/include/openthread/tcp.h index 3b63bc359..bbcd0ac07 100644 --- a/include/openthread/tcp.h +++ b/include/openthread/tcp.h @@ -229,7 +229,7 @@ typedef void (*otTcpDisconnected)(otTcpEndpoint *aEndpoint, otTcpDisconnectedRea #define OT_TCP_ENDPOINT_TCB_NUM_PTR 36 /** - * This structure represents a TCP endpoint. + * Represents a TCP endpoint. * * An TCP endpoint acts an endpoint of TCP connection. It can be used to * initiate TCP connections, and, once a TCP connection is established, send @@ -266,7 +266,7 @@ struct otTcpEndpoint }; /** - * This structure contains arguments to the otTcpEndpointInitialize() function. + * Contains arguments to the otTcpEndpointInitialize() function. * */ typedef struct otTcpEndpointInitializeArgs @@ -390,7 +390,7 @@ const otSockAddr *otTcpGetPeerAddress(const otTcpEndpoint *aEndpoint); otError otTcpBind(otTcpEndpoint *aEndpoint, const otSockAddr *aSockName); /** - * This enumeration defines flags passed to otTcpConnect(). + * Defines flags passed to otTcpConnect(). * */ enum @@ -418,7 +418,7 @@ enum otError otTcpConnect(otTcpEndpoint *aEndpoint, const otSockAddr *aSockName, uint32_t aFlags); /** - * This enumeration defines flags passed to @p otTcpSendByReference. + * Defines flags passed to @p otTcpSendByReference. * */ enum @@ -582,7 +582,7 @@ struct otTcpListener; typedef struct otTcpListener otTcpListener; /** - * This enumeration defines incoming connection actions. + * Defines incoming connection actions. * * This is used in otTcpAcceptReady() callback. * @@ -656,7 +656,7 @@ typedef void (*otTcpAcceptDone)(otTcpListener *aListener, otTcpEndpoint *aEndpoi #define OT_TCP_LISTENER_TCB_NUM_PTR 3 /** - * This structure represents a TCP listener. + * Represents a TCP listener. * * A TCP listener is used to listen for and accept incoming TCP connections. * @@ -681,7 +681,7 @@ struct otTcpListener }; /** - * This structure contains arguments to the otTcpListenerInitialize() function. + * Contains arguments to the otTcpListenerInitialize() function. * */ typedef struct otTcpListenerInitializeArgs diff --git a/include/openthread/tcp_ext.h b/include/openthread/tcp_ext.h index 0258ac28b..9ac705b9f 100644 --- a/include/openthread/tcp_ext.h +++ b/include/openthread/tcp_ext.h @@ -53,7 +53,7 @@ extern "C" { */ /** - * This structure represents a circular send buffer for use with a TCP endpoint. + * Represents a circular send buffer for use with a TCP endpoint. * * Using a circular send buffer is optional. Applications can use a TCP * endpoint to send data by managing otLinkedBuffers directly. However, some @@ -108,7 +108,7 @@ typedef struct otTcpCircularSendBuffer void otTcpCircularSendBufferInitialize(otTcpCircularSendBuffer *aSendBuffer, void *aDataBuffer, size_t aCapacity); /** - * This enumeration defines flags passed to @p otTcpCircularSendBufferWrite. + * Defines flags passed to @p otTcpCircularSendBufferWrite. * */ enum diff --git a/include/openthread/thread.h b/include/openthread/thread.h index 4bde02c14..47cd7865b 100644 --- a/include/openthread/thread.h +++ b/include/openthread/thread.h @@ -74,7 +74,7 @@ typedef enum } otDeviceRole; /** - * This structure represents an MLE Link Mode configuration. + * Represents an MLE Link Mode configuration. */ typedef struct otLinkModeConfig { @@ -84,7 +84,7 @@ typedef struct otLinkModeConfig } otLinkModeConfig; /** - * This structure holds diagnostic information for a neighboring Thread node + * Holds diagnostic information for a neighboring Thread node * */ typedef struct @@ -113,7 +113,7 @@ typedef struct typedef int16_t otNeighborInfoIterator; ///< Used to iterate through neighbor table. /** - * This structure represents the Thread Leader Data. + * Represents the Thread Leader Data. * */ typedef struct otLeaderData @@ -126,7 +126,7 @@ typedef struct otLeaderData } otLeaderData; /** - * This structure holds diagnostic information for a Thread Router + * Holds diagnostic information for a Thread Router * */ typedef struct @@ -152,7 +152,7 @@ typedef struct } otRouterInfo; /** - * This structure represents the IP level counters. + * Represents the IP level counters. * */ typedef struct otIpCounters @@ -164,7 +164,7 @@ typedef struct otIpCounters } otIpCounters; /** - * This structure represents the Thread MLE counters. + * Represents the Thread MLE counters. * */ typedef struct otMleCounters @@ -203,7 +203,7 @@ typedef struct otMleCounters } otMleCounters; /** - * This structure represents the MLE Parent Response data. + * Represents the MLE Parent Response data. * */ typedef struct otThreadParentResponseInfo @@ -227,7 +227,7 @@ typedef struct otThreadParentResponseInfo typedef void (*otDetachGracefullyCallback)(void *aContext); /** - * This function starts Thread protocol operation. + * Starts Thread protocol operation. * * The interface must be up when calling this function. * @@ -244,7 +244,7 @@ typedef void (*otDetachGracefullyCallback)(void *aContext); otError otThreadSetEnabled(otInstance *aInstance, bool aEnabled); /** - * This function gets the Thread protocol version. + * Gets the Thread protocol version. * * @returns the Thread protocol version. * @@ -252,7 +252,7 @@ otError otThreadSetEnabled(otInstance *aInstance, bool aEnabled); uint16_t otThreadGetVersion(void); /** - * This function indicates whether a node is the only router on the network. + * Indicates whether a node is the only router on the network. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -263,7 +263,7 @@ uint16_t otThreadGetVersion(void); bool otThreadIsSingleton(otInstance *aInstance); /** - * This function starts a Thread Discovery scan. + * Starts a Thread Discovery scan. * * @note A successful call to this function enables the rx-on-when-idle mode for the entire scan procedure. * @@ -291,7 +291,7 @@ otError otThreadDiscover(otInstance *aInstance, void *aCallbackContext); /** - * This function determines if an MLE Thread Discovery is currently in progress. + * Determines if an MLE Thread Discovery is currently in progress. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -299,7 +299,7 @@ otError otThreadDiscover(otInstance *aInstance, bool otThreadIsDiscoverInProgress(otInstance *aInstance); /** - * This method sets the Thread Joiner Advertisement when discovering Thread network. + * Sets the Thread Joiner Advertisement when discovering Thread network. * * Thread Joiner Advertisement is used to allow a Joiner to advertise its own application-specific information * (such as Vendor ID, Product ID, Discriminator, etc.) via a newly-proposed Joiner Advertisement TLV, @@ -376,7 +376,7 @@ const otExtendedPanId *otThreadGetExtendedPanId(otInstance *aInstance); otError otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *aExtendedPanId); /** - * This function returns a pointer to the Leader's RLOC. + * Returns a pointer to the Leader's RLOC. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aLeaderRloc A pointer to the Leader's RLOC. @@ -427,7 +427,7 @@ void otThreadGetNetworkKey(otInstance *aInstance, otNetworkKey *aNetworkKey); /** * Get the `otNetworkKeyRef` for Thread Network Key. * - * This function requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -441,7 +441,7 @@ otNetworkKeyRef otThreadGetNetworkKeyRef(otInstance *aInstance); /** * Set the Thread Network Key. * - * This function succeeds only when Thread protocols are disabled. A successful + * Succeeds only when Thread protocols are disabled. A successful * call to this function invalidates the Active and Pending Operational Datasets in * non-volatile memory. * @@ -459,11 +459,11 @@ otError otThreadSetNetworkKey(otInstance *aInstance, const otNetworkKey *aKey); /** * Set the Thread Network Key as a `otNetworkKeyRef`. * - * This function succeeds only when Thread protocols are disabled. A successful + * Succeeds only when Thread protocols are disabled. A successful * call to this function invalidates the Active and Pending Operational Datasets in * non-volatile memory. * - * This function requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aKeyRef Reference to the Thread Network Key. @@ -497,7 +497,7 @@ const otIp6Address *otThreadGetRloc(otInstance *aInstance); const otIp6Address *otThreadGetMeshLocalEid(otInstance *aInstance); /** - * This function returns a pointer to the Mesh Local Prefix. + * Returns a pointer to the Mesh Local Prefix. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -507,9 +507,9 @@ const otIp6Address *otThreadGetMeshLocalEid(otInstance *aInstance); const otMeshLocalPrefix *otThreadGetMeshLocalPrefix(otInstance *aInstance); /** - * This function sets the Mesh Local Prefix. + * Sets the Mesh Local Prefix. * - * This function succeeds only when Thread protocols are disabled. A successful + * Succeeds only when Thread protocols are disabled. A successful * call to this function invalidates the Active and Pending Operational Datasets in * non-volatile memory. * @@ -569,7 +569,7 @@ const otIp6Address *otThreadGetLinkLocalAllThreadNodesMulticastAddress(otInstanc const otIp6Address *otThreadGetRealmLocalAllThreadNodesMulticastAddress(otInstance *aInstance); /** - * This function retrieves the Service ALOC for given Service ID. + * Retrieves the Service ALOC for given Service ID. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aServiceId Service ID to get ALOC for. @@ -595,7 +595,7 @@ const char *otThreadGetNetworkName(otInstance *aInstance); /** * Set the Thread Network Name. * - * This function succeeds only when Thread protocols are disabled. A successful + * Succeeds only when Thread protocols are disabled. A successful * call to this function invalidates the Active and Pending Operational Datasets in * non-volatile memory. * @@ -751,7 +751,7 @@ otError otThreadBecomeDetached(otInstance *aInstance); otError otThreadBecomeChild(otInstance *aInstance); /** - * This function gets the next neighbor information. It is used to go through the entries of + * Gets the next neighbor information. It is used to go through the entries of * the neighbor table. * * @param[in] aInstance A pointer to an OpenThread instance. @@ -791,7 +791,7 @@ otDeviceRole otThreadGetDeviceRole(otInstance *aInstance); const char *otThreadDeviceRoleToString(otDeviceRole aRole); /** - * This function get the Thread Leader Data. + * Get the Thread Leader Data. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aLeaderData A pointer to where the leader data is placed. @@ -921,7 +921,7 @@ const otMleCounters *otThreadGetMleCounters(otInstance *aInstance); void otThreadResetMleCounters(otInstance *aInstance); /** - * This function pointer is called every time an MLE Parent Response message is received. + * Pointer is called every time an MLE Parent Response message is received. * * This is used in `otThreadRegisterParentResponseCallback()`. * @@ -932,9 +932,9 @@ void otThreadResetMleCounters(otInstance *aInstance); typedef void (*otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo, void *aContext); /** - * This function registers a callback to receive MLE Parent Response data. + * Registers a callback to receive MLE Parent Response data. * - * This function requires `OPENTHREAD_CONFIG_MLE_PARENT_RESPONSE_CALLBACK_API_ENABLE`. + * Requires `OPENTHREAD_CONFIG_MLE_PARENT_RESPONSE_CALLBACK_API_ENABLE`. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to a function that is called upon receiving an MLE Parent Response message. @@ -946,7 +946,7 @@ void otThreadRegisterParentResponseCallback(otInstance *aInst void *aContext); /** - * This structure represents the Thread Discovery Request data. + * Represents the Thread Discovery Request data. * */ typedef struct otThreadDiscoveryRequestInfo @@ -957,7 +957,7 @@ typedef struct otThreadDiscoveryRequestInfo } otThreadDiscoveryRequestInfo; /** - * This function pointer is called every time an MLE Discovery Request message is received. + * Pointer is called every time an MLE Discovery Request message is received. * * @param[in] aInfo A pointer to the Discovery Request info data. * @param[in] aContext A pointer to callback application-specific context. @@ -966,7 +966,7 @@ typedef struct otThreadDiscoveryRequestInfo typedef void (*otThreadDiscoveryRequestCallback)(const otThreadDiscoveryRequestInfo *aInfo, void *aContext); /** - * This function sets a callback to receive MLE Discovery Request data. + * Sets a callback to receive MLE Discovery Request data. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to a function that is called upon receiving an MLE Discovery Request message. @@ -978,7 +978,7 @@ void otThreadSetDiscoveryRequestCallback(otInstance *aInsta void *aContext); /** - * This function pointer type defines the callback to notify the outcome of a `otThreadLocateAnycastDestination()` + * Pointer type defines the callback to notify the outcome of a `otThreadLocateAnycastDestination()` * request. * * @param[in] aContext A pointer to an arbitrary context (provided when callback is registered). @@ -996,9 +996,9 @@ typedef void (*otThreadAnycastLocatorCallback)(void *aContext, uint16_t aRloc16); /** - * This function requests the closest destination of a given anycast address to be located. + * Requests the closest destination of a given anycast address to be located. * - * This function is only available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled. + * Is only available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled. * * If a previous request is ongoing, a subsequent call to this function will cancel and replace the earlier request. * @@ -1018,9 +1018,9 @@ otError otThreadLocateAnycastDestination(otInstance *aInstanc void *aContext); /** - * This function indicates whether an anycast locate request is currently in progress. + * Indicates whether an anycast locate request is currently in progress. * - * This function is only available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled. + * Is only available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -1030,9 +1030,9 @@ otError otThreadLocateAnycastDestination(otInstance *aInstanc bool otThreadIsAnycastLocateInProgress(otInstance *aInstance); /** - * This function sends a Proactive Address Notification (ADDR_NTF.ntf) message. + * Sends a Proactive Address Notification (ADDR_NTF.ntf) message. * - * This function is only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. + * Is only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aDestination The destination to send the ADDR_NTF.ntf message. @@ -1046,9 +1046,9 @@ void otThreadSendAddressNotification(otInstance *aInstance, otIp6InterfaceIdentifier *aMlIid); /** - * This function sends a Proactive Backbone Notification (PRO_BB.ntf) message on the Backbone link. + * Sends a Proactive Backbone Notification (PRO_BB.ntf) message on the Backbone link. * - * This function is only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. + * Is only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aTarget The target address of the PRO_BB.ntf message. @@ -1065,7 +1065,7 @@ otError otThreadSendProactiveBackboneNotification(otInstance *aIns uint32_t aTimeSinceLastTransaction); /** - * This function notifies other nodes in the network (if any) and then stops Thread protocol operation. + * Notifies other nodes in the network (if any) and then stops Thread protocol operation. * * It sends an Address Release if it's a router, or sets its child timeout to 0 if it's a child. * @@ -1082,9 +1082,9 @@ otError otThreadDetachGracefully(otInstance *aInstance, otDetachGracefullyCallba #define OT_DURATION_STRING_SIZE 21 ///< Recommended size for string representation of `uint32_t` duration in seconds. /** - * This function converts an `uint32_t` duration (in seconds) to a human-readable string. + * Converts an `uint32_t` duration (in seconds) to a human-readable string. * - * This function requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. + * Requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. * * The string follows the format "::" for hours, minutes, seconds (if duration is shorter than one day) or * "
d.::" (if longer than a day). @@ -1092,7 +1092,7 @@ otError otThreadDetachGracefully(otInstance *aInstance, otDetachGracefullyCallba * If the resulting string does not fit in @p aBuffer (within its @p aSize characters), the string will be truncated * but the outputted string is always null-terminated. * - * This function is intended for use with `mAge` or `mConnectionTime` in `otNeighborInfo` or `otChildInfo` structures. + * Is intended for use with `mAge` or `mConnectionTime` in `otNeighborInfo` or `otChildInfo` structures. * * @param[in] aDuration A duration interval in seconds. * @param[out] aBuffer A pointer to a char array to output the string. diff --git a/include/openthread/thread_ftd.h b/include/openthread/thread_ftd.h index f2b0db5d9..db7b80675 100644 --- a/include/openthread/thread_ftd.h +++ b/include/openthread/thread_ftd.h @@ -51,7 +51,7 @@ extern "C" { */ /** - * This structure holds diagnostic information for a Thread Child + * Holds diagnostic information for a Thread Child * */ typedef struct @@ -83,7 +83,7 @@ typedef struct typedef uint16_t otChildIp6AddressIterator; ///< Used to iterate through IPv6 addresses of a Thread Child entry. /** - * This enumeration defines the EID cache entry state. + * Defines the EID cache entry state. * */ typedef enum otCacheEntryState @@ -95,7 +95,7 @@ typedef enum otCacheEntryState } otCacheEntryState; /** - * This structure represents an EID cache entry. + * Represents an EID cache entry. * */ typedef struct otCacheEntryInfo @@ -112,7 +112,7 @@ typedef struct otCacheEntryInfo } otCacheEntryInfo; /** - * This type represents an iterator used for iterating through the EID cache table entries. + * Represents an iterator used for iterating through the EID cache table entries. * * To initialize the iterator and start from the first entry in the cache table, set all its fields in the structure to * zero (e.g., `memset` the iterator to zero). @@ -153,7 +153,7 @@ uint16_t otThreadGetMaxAllowedChildren(otInstance *aInstance); otError otThreadSetMaxAllowedChildren(otInstance *aInstance, uint16_t aMaxChildren); /** - * This method indicates whether or not the device is router-eligible. + * Indicates whether or not the device is router-eligible. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -164,7 +164,7 @@ otError otThreadSetMaxAllowedChildren(otInstance *aInstance, uint16_t aMaxChildr bool otThreadIsRouterEligible(otInstance *aInstance); /** - * This function sets whether or not the device is router-eligible. + * Sets whether or not the device is router-eligible. * * If @p aEligible is false and the device is currently operating as a router, this call will cause the device to * detach and attempt to reattach as a child. @@ -198,7 +198,7 @@ otError otThreadSetRouterEligible(otInstance *aInstance, bool aEligible); otError otThreadSetPreferredRouterId(otInstance *aInstance, uint8_t aRouterId); /** - * This enumeration represents the power supply property on a device. + * Represents the power supply property on a device. * * This is used as a property in `otDeviceProperties` to calculate the leader weight. * @@ -212,7 +212,7 @@ typedef enum } otPowerSupply; /** - * This structure represents the device properties which are used for calculating the local leader weight on a + * Represents the device properties which are used for calculating the local leader weight on a * device. * * The parameters are set based on device's capability, whether acting as border router, its power supply config, etc. @@ -266,7 +266,7 @@ uint8_t otThreadGetLocalLeaderWeight(otInstance *aInstance); /** * Sets the Thread Leader Weight used when operating in the Leader role. * - * This function directly sets the Leader Weight to the new value, replacing its previous value (which may have been + * Directly sets the Leader Weight to the new value, replacing its previous value (which may have been * determined from the current `otDeviceProperties`). * * @param[in] aInstance A pointer to an OpenThread instance. @@ -570,7 +570,7 @@ otError otThreadGetChildInfoById(otInstance *aInstance, uint16_t aChildId, otChi otError otThreadGetChildInfoByIndex(otInstance *aInstance, uint16_t aChildIndex, otChildInfo *aChildInfo); /** - * This function gets the next IPv6 address (using an iterator) for a given child. + * Gets the next IPv6 address (using an iterator) for a given child. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aChildIndex The child index. @@ -626,7 +626,7 @@ uint8_t otThreadGetMaxRouterId(otInstance *aInstance); otError otThreadGetRouterInfo(otInstance *aInstance, uint16_t aRouterId, otRouterInfo *aRouterInfo); /** - * This function gets the next EID cache entry (using an iterator). + * Gets the next EID cache entry (using an iterator). * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aEntryInfo A pointer to where the EID cache entry information is placed. @@ -654,7 +654,7 @@ void otThreadGetPskc(otInstance *aInstance, otPskc *aPskc); /** * Get Key Reference to Thread PSKc stored * - * This function requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -668,7 +668,7 @@ otPskcRef otThreadGetPskcRef(otInstance *aInstance); /** * Set the Thread PSKc * - * This function will only succeed when Thread protocols are disabled. A successful + * Will only succeed when Thread protocols are disabled. A successful * call to this function will also invalidate the Active and Pending Operational Datasets in * non-volatile memory. * @@ -686,9 +686,9 @@ otError otThreadSetPskc(otInstance *aInstance, const otPskc *aPskc); /** * Set the Thread PSKc * - * This function requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. + * Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. * - * This function will only succeed when Thread protocols are disabled. A successful + * Will only succeed when Thread protocols are disabled. A successful * call to this function will also invalidate the Active and Pending Operational Datasets in * non-volatile memory. * @@ -768,7 +768,7 @@ uint8_t otThreadGetMaxChildIpAddresses(otInstance *aInstance); otError otThreadSetMaxChildIpAddresses(otInstance *aInstance, uint8_t aMaxIpAddresses); /** - * This enumeration defines the constants used in `otNeighborTableCallback` to indicate changes in neighbor table. + * Defines the constants used in `otNeighborTableCallback` to indicate changes in neighbor table. * */ typedef enum @@ -781,7 +781,7 @@ typedef enum } otNeighborTableEvent; /** - * This type represent a neighbor table entry info (child or router) and is used as a parameter in the neighbor table + * Represent a neighbor table entry info (child or router) and is used as a parameter in the neighbor table * callback `otNeighborTableCallback`. * */ @@ -796,7 +796,7 @@ typedef struct } otNeighborTableEntryInfo; /** - * This function pointer is called to notify that there is a change in the neighbor table. + * Pointer is called to notify that there is a change in the neighbor table. * * @param[in] aEvent A event flag. * @param[in] aEntryInfo A pointer to table entry info. @@ -805,7 +805,7 @@ typedef struct typedef void (*otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo); /** - * This function registers a neighbor table callback function. + * Registers a neighbor table callback function. * * The provided callback (if non-NULL) will be invoked when there is a change in the neighbor table (e.g., a child or a * router neighbor entry is being added/removed or an existing child's mode is changed). @@ -820,7 +820,7 @@ typedef void (*otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNei void otThreadRegisterNeighborTableCallback(otInstance *aInstance, otNeighborTableCallback aCallback); /** - * This function sets whether the device was commissioned using CCM. + * Sets whether the device was commissioned using CCM. * * @note This API requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`, and is only used by Thread Test Harness * to indicate whether this device was commissioned using CCM. @@ -832,7 +832,7 @@ void otThreadRegisterNeighborTableCallback(otInstance *aInstance, otNeighborTabl void otThreadSetCcmEnabled(otInstance *aInstance, bool aEnabled); /** - * This function sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled. + * Sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled. * * @note This API requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`, and is only used by Thread Test Harness * to indicate that thread protocol version check VR should be skipped. @@ -844,7 +844,7 @@ void otThreadSetCcmEnabled(otInstance *aInstance, bool aEnabled); void otThreadSetThreadVersionCheckEnabled(otInstance *aInstance, bool aEnabled); /** - * This function gets the range of router IDs that are allowed to assign to nodes within the thread network. + * Gets the range of router IDs that are allowed to assign to nodes within the thread network. * * @note This API requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`, and is only used for test purpose. All the * router IDs in the range [aMinRouterId, aMaxRouterId] are allowed. @@ -859,7 +859,7 @@ void otThreadSetThreadVersionCheckEnabled(otInstance *aInstance, bool aEnabled); void otThreadGetRouterIdRange(otInstance *aInstance, uint8_t *aMinRouterId, uint8_t *aMaxRouterId); /** - * This function sets the range of router IDs that are allowed to assign to nodes within the thread network. + * Sets the range of router IDs that are allowed to assign to nodes within the thread network. * * @note This API requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`, and is only used for test purpose. All the * router IDs in the range [aMinRouterId, aMaxRouterId] are allowed. @@ -877,7 +877,7 @@ void otThreadGetRouterIdRange(otInstance *aInstance, uint8_t *aMinRouterId, uint otError otThreadSetRouterIdRange(otInstance *aInstance, uint8_t aMinRouterId, uint8_t aMaxRouterId); /** - * This function indicates whether or not a Router ID is currently allocated. + * Indicates whether or not a Router ID is currently allocated. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aRouterId The router ID to check. @@ -889,9 +889,9 @@ otError otThreadSetRouterIdRange(otInstance *aInstance, uint8_t aMinRouterId, ui bool otThreadIsRouterIdAllocated(otInstance *aInstance, uint8_t aRouterId); /** - * This function gets the next hop and path cost towards a given RLOC16 destination. + * Gets the next hop and path cost towards a given RLOC16 destination. * - * This function can be used with either @p aNextHopRloc16 or @p aPathCost being NULL indicating caller does not want + * Can be used with either @p aNextHopRloc16 or @p aPathCost being NULL indicating caller does not want * to get the value. * * @param[in] aInstance A pointer to an OpenThread instance. diff --git a/include/openthread/trel.h b/include/openthread/trel.h index 26373501c..2358ea26a 100644 --- a/include/openthread/trel.h +++ b/include/openthread/trel.h @@ -57,7 +57,7 @@ extern "C" { */ /** - * This struct represents a TREL peer. + * Represents a TREL peer. * */ typedef struct otTrelPeer @@ -68,7 +68,7 @@ typedef struct otTrelPeer } otTrelPeer; /** - * This type represents an iterator for iterating over TREL peer table entries. + * Represents an iterator for iterating over TREL peer table entries. * */ typedef uint16_t otTrelPeerIterator; @@ -93,7 +93,7 @@ typedef uint16_t otTrelPeerIterator; void otTrelSetEnabled(otInstance *aInstance, bool aEnable); /** - * This function indicates whether the TREL operation is enabled. + * Indicates whether the TREL operation is enabled. * * @param[in] aInstance The OpenThread instance. * @@ -104,7 +104,7 @@ void otTrelSetEnabled(otInstance *aInstance, bool aEnable); bool otTrelIsEnabled(otInstance *aInstance); /** - * This function initializes a peer table iterator. + * Initializes a peer table iterator. * * @param[in] aInstance The OpenThread instance. * @param[in] aIterator The iterator to initialize. @@ -113,7 +113,7 @@ bool otTrelIsEnabled(otInstance *aInstance); void otTrelInitPeerIterator(otInstance *aInstance, otTrelPeerIterator *aIterator); /** - * This function iterates over the peer table entries and get the next entry from the table + * Iterates over the peer table entries and get the next entry from the table * * @param[in] aInstance The OpenThread instance. * @param[in] aIterator The iterator. MUST be initialized. @@ -124,7 +124,7 @@ void otTrelInitPeerIterator(otInstance *aInstance, otTrelPeerIterator *aIterator const otTrelPeer *otTrelGetNextPeer(otInstance *aInstance, otTrelPeerIterator *aIterator); /** - * This function sets the filter mode (enables/disables filtering). + * Sets the filter mode (enables/disables filtering). * * When filter mode is enabled, any rx and tx traffic through TREL interface is silently dropped. This is mainly * intended for use during testing. @@ -139,7 +139,7 @@ const otTrelPeer *otTrelGetNextPeer(otInstance *aInstance, otTrelPeerIterator *a void otTrelSetFilterEnabled(otInstance *aInstance, bool aEnable); /** - * This function indicates whether or not the filter mode is enabled. + * Indicates whether or not the filter mode is enabled. * * @param[in] aInstance The OpenThread instance. * diff --git a/include/openthread/udp.h b/include/openthread/udp.h index 5a2681320..6e577c4a1 100644 --- a/include/openthread/udp.h +++ b/include/openthread/udp.h @@ -63,7 +63,7 @@ extern "C" { typedef bool (*otUdpHandler)(void *aContext, const otMessage *aMessage, const otMessageInfo *aMessageInfo); /** - * This structure represents a UDP receiver. + * Represents a UDP receiver. * */ typedef struct otUdpReceiver @@ -74,7 +74,7 @@ typedef struct otUdpReceiver } otUdpReceiver; /** - * This function adds a UDP receiver. + * Adds a UDP receiver. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aUdpReceiver A pointer to the UDP receiver. @@ -86,7 +86,7 @@ typedef struct otUdpReceiver otError otUdpAddReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver); /** - * This function removes a UDP receiver. + * Removes a UDP receiver. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aUdpReceiver A pointer to the UDP receiver. @@ -98,7 +98,7 @@ otError otUdpAddReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver); otError otUdpRemoveReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver); /** - * This function sends a UDP message without socket. + * Sends a UDP message without socket. * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMessage A pointer to a message without UDP header. @@ -117,7 +117,7 @@ otError otUdpSendDatagram(otInstance *aInstance, otMessage *aMessage, otMessageI typedef void (*otUdpReceive)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo); /** - * This structure represents a UDP socket. + * Represents a UDP socket. * */ typedef struct otUdpSocket @@ -131,7 +131,7 @@ typedef struct otUdpSocket } otUdpSocket; /** - * This enumeration defines the OpenThread network interface identifiers. + * Defines the OpenThread network interface identifiers. * */ typedef enum otNetifIdentifier @@ -241,7 +241,7 @@ otError otUdpConnect(otInstance *aInstance, otUdpSocket *aSocket, const otSockAd otError otUdpSend(otInstance *aInstance, otUdpSocket *aSocket, otMessage *aMessage, const otMessageInfo *aMessageInfo); /** - * This function gets the head of linked list of UDP Sockets. + * Gets the head of linked list of UDP Sockets. * * @param[in] aInstance A pointer to an OpenThread instance. * @@ -269,7 +269,7 @@ otUdpSocket *otUdpGetSockets(otInstance *aInstance); */ /** - * This function pointer delivers the UDP packet to host and host should send the packet through its own network stack. + * Pointer delivers the UDP packet to host and host should send the packet through its own network stack. * * @param[in] aMessage A pointer to the UDP Message. * @param[in] aPeerPort The destination UDP port. diff --git a/src/cli/cli.hpp b/src/cli/cli.hpp index 26c261447..169080819 100644 --- a/src/cli/cli.hpp +++ b/src/cli/cli.hpp @@ -101,7 +101,7 @@ extern "C" void otCliOutputBytes(const uint8_t *aBytes, uint8_t aLength); extern "C" void otCliOutputFormat(const char *aFmt, ...); /** - * This class implements the CLI interpreter. + * Implements the CLI interpreter. * */ class Interpreter : public OutputImplementer, public Output @@ -132,7 +132,7 @@ public: explicit Interpreter(Instance *aInstance, otCliOutputCallback aCallback, void *aContext); /** - * This method returns a reference to the interpreter object. + * Returns a reference to the interpreter object. * * @returns A reference to the interpreter object. * @@ -145,7 +145,7 @@ public: } /** - * This method initializes the Console interpreter. + * Initializes the Console interpreter. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aCallback A pointer to a callback method. @@ -155,7 +155,7 @@ public: static void Initialize(otInstance *aInstance, otCliOutputCallback aCallback, void *aContext); /** - * This method returns whether the interpreter is initialized. + * Returns whether the interpreter is initialized. * * @returns Whether the interpreter is initialized. * @@ -163,7 +163,7 @@ public: static bool IsInitialized(void) { return sInterpreter != nullptr; } /** - * This method interprets a CLI command. + * Interprets a CLI command. * * @param[in] aBuf A pointer to a string. * @@ -171,7 +171,7 @@ public: void ProcessLine(char *aBuf); /** - * This static method checks a given argument string against "enable" or "disable" commands. + * Checks a given argument string against "enable" or "disable" commands. * * @param[in] aArg The argument string to parse. * @param[out] aEnable Boolean variable to return outcome on success. @@ -184,7 +184,7 @@ public: static otError ParseEnableOrDisable(const Arg &aArg, bool &aEnable); /** - * This method adds commands to the user command table. + * Adds commands to the user command table. * * @param[in] aCommands A pointer to an array with user commands. * @param[in] aLength @p aUserCommands length. @@ -198,7 +198,7 @@ public: static constexpr uint8_t kLinkModeStringSize = sizeof("rdn"); ///< Size of string buffer for a MLE Link Mode. /** - * This method converts a given MLE Link Mode to flag string. + * Converts a given MLE Link Mode to flag string. * * The characters 'r', 'd', and 'n' are respectively used for `mRxOnWhenIdle`, `mDeviceType` and `mNetworkData` * flags. If all flags are `false`, then "-" is returned. @@ -212,7 +212,7 @@ public: static const char *LinkModeToString(const otLinkModeConfig &aLinkMode, char (&aStringBuffer)[kLinkModeStringSize]); /** - * This method converts an IPv6 address origin `OT_ADDRESS_ORIGIN_*` value to human-readable string. + * Converts an IPv6 address origin `OT_ADDRESS_ORIGIN_*` value to human-readable string. * * @param[in] aOrigin The IPv6 address origin to convert. * @@ -222,7 +222,7 @@ public: static const char *AddressOriginToString(uint8_t aOrigin); /** - * This static method parses a given argument string as a route preference comparing it against "high", "med", or + * Parses a given argument string as a route preference comparing it against "high", "med", or * "low". * * @param[in] aArg The argument string to parse. @@ -235,7 +235,7 @@ public: static otError ParsePreference(const Arg &aArg, otRoutePreference &aPreference); /** - * This static method converts a route preference value to human-readable string. + * Converts a route preference value to human-readable string. * * @param[in] aPreference The preference value to convert (`OT_ROUTE_PREFERENCE_*` values). * @@ -245,7 +245,7 @@ public: static const char *PreferenceToString(signed int aPreference); /** - * This method parses the argument as an IP address. + * Parses the argument as an IP address. * * If the argument string is an IPv4 address, this method will try to synthesize an IPv6 address using preferred * NAT64 prefix in the network data. diff --git a/src/cli/cli_br.hpp b/src/cli/cli_br.hpp index cd013096f..f953344e3 100644 --- a/src/cli/cli_br.hpp +++ b/src/cli/cli_br.hpp @@ -45,7 +45,7 @@ namespace ot { namespace Cli { /** - * This class implements the Border Router CLI interpreter. + * Implements the Border Router CLI interpreter. * */ class Br : private Output @@ -66,7 +66,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_coap.hpp b/src/cli/cli_coap.hpp index feb977128..f3357fcc5 100644 --- a/src/cli/cli_coap.hpp +++ b/src/cli/cli_coap.hpp @@ -46,7 +46,7 @@ namespace ot { namespace Cli { /** - * This class implements the CLI CoAP server and client. + * Implements the CLI CoAP server and client. * */ class Coap : private Output @@ -64,7 +64,7 @@ public: Coap(otInstance *aInstance, OutputImplementer &aOutputImplementer); /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_coap_secure.hpp b/src/cli/cli_coap_secure.hpp index 3b95cd723..2165642bd 100644 --- a/src/cli/cli_coap_secure.hpp +++ b/src/cli/cli_coap_secure.hpp @@ -52,7 +52,7 @@ namespace ot { namespace Cli { /** - * This class implements the CLI CoAP Secure server and client. + * Implements the CLI CoAP Secure server and client. * */ class CoapSecure : private Output @@ -70,7 +70,7 @@ public: CoapSecure(otInstance *aInstance, OutputImplementer &aOutputImplementer); /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_commissioner.hpp b/src/cli/cli_commissioner.hpp index d2c2705da..8969bd762 100644 --- a/src/cli/cli_commissioner.hpp +++ b/src/cli/cli_commissioner.hpp @@ -46,7 +46,7 @@ namespace ot { namespace Cli { /** - * This class implements the Commissioner CLI interpreter. + * Implements the Commissioner CLI interpreter. * */ class Commissioner : private Output @@ -67,7 +67,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_dataset.hpp b/src/cli/cli_dataset.hpp index 1ec231450..4663650f2 100644 --- a/src/cli/cli_dataset.hpp +++ b/src/cli/cli_dataset.hpp @@ -46,7 +46,7 @@ namespace ot { namespace Cli { /** - * This class implements the Dataset CLI interpreter. + * Implements the Dataset CLI interpreter. * */ class Dataset : private Output @@ -60,7 +60,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_dns.hpp b/src/cli/cli_dns.hpp index f746b4d79..b9f167939 100644 --- a/src/cli/cli_dns.hpp +++ b/src/cli/cli_dns.hpp @@ -60,7 +60,7 @@ namespace ot { namespace Cli { /** - * This class implements the DNS CLI interpreter. + * Implements the DNS CLI interpreter. * */ class Dns : private Output @@ -81,7 +81,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_history.hpp b/src/cli/cli_history.hpp index 42ff6e3e2..90f832fbf 100644 --- a/src/cli/cli_history.hpp +++ b/src/cli/cli_history.hpp @@ -47,7 +47,7 @@ namespace ot { namespace Cli { /** - * This class implements the History Tracker CLI interpreter. + * Implements the History Tracker CLI interpreter. * */ class History : private Output @@ -68,7 +68,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_joiner.hpp b/src/cli/cli_joiner.hpp index 677c5eb76..e45dbf8db 100644 --- a/src/cli/cli_joiner.hpp +++ b/src/cli/cli_joiner.hpp @@ -46,7 +46,7 @@ namespace ot { namespace Cli { /** - * This class implements the Joiner CLI interpreter. + * Implements the Joiner CLI interpreter. * */ class Joiner : private Output @@ -67,7 +67,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_mac_filter.hpp b/src/cli/cli_mac_filter.hpp index ac481b503..1394d4fa0 100644 --- a/src/cli/cli_mac_filter.hpp +++ b/src/cli/cli_mac_filter.hpp @@ -47,7 +47,7 @@ namespace ot { namespace Cli { /** - * This class implements the MAC Filter CLI interpreter. + * Implements the MAC Filter CLI interpreter. * */ class MacFilter : private Output @@ -68,7 +68,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_network_data.hpp b/src/cli/cli_network_data.hpp index 9b9f42626..93ffb0d2f 100644 --- a/src/cli/cli_network_data.hpp +++ b/src/cli/cli_network_data.hpp @@ -44,7 +44,7 @@ namespace ot { namespace Cli { /** - * This class implements the Network Data CLI. + * Implements the Network Data CLI. * */ class NetworkData : private Output @@ -77,7 +77,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * @@ -91,7 +91,7 @@ public: otError Process(Arg aArgs[]); /** - * This method outputs the prefix config. + * Outputs the prefix config. * * @param[in] aConfig The prefix config. * @@ -99,7 +99,7 @@ public: void OutputPrefix(const otBorderRouterConfig &aConfig); /** - * This method outputs the route config. + * Outputs the route config. * * @param[in] aConfig The route config. * @@ -107,7 +107,7 @@ public: void OutputRoute(const otExternalRouteConfig &aConfig); /** - * This method outputs the service config. + * Outputs the service config. * * @param[in] aConfig The service config. * @@ -115,7 +115,7 @@ public: void OutputService(const otServiceConfig &aConfig); /** - * This method converts the flags from a given prefix config to string. + * Converts the flags from a given prefix config to string. * * @param[in] aConfig The prefix config. * @param[out] aString The string to populate from @a Config flags. @@ -124,7 +124,7 @@ public: static void PrefixFlagsToString(const otBorderRouterConfig &aConfig, FlagsString &aString); /** - * This method converts the flags from a given route config to string. + * Converts the flags from a given route config to string. * * @param[in] aConfig The route config. * @param[out] aString The string to populate from @a Config flags. diff --git a/src/cli/cli_output.hpp b/src/cli/cli_output.hpp index 1c46935dc..8941f7e57 100644 --- a/src/cli/cli_output.hpp +++ b/src/cli/cli_output.hpp @@ -51,7 +51,7 @@ namespace ot { namespace Cli { /** - * This type represents a ID number value associated with a CLI command string. + * Represents a ID number value associated with a CLI command string. * */ typedef uint64_t CommandId; @@ -72,7 +72,7 @@ constexpr static CommandId Cmd(const char *aString) class Output; /** - * This class implements the basic output functions. + * Implements the basic output functions. * */ class OutputImplementer @@ -81,7 +81,7 @@ class OutputImplementer public: /** - * This constructor initializes the `OutputImplementer` object. + * Initializes the `OutputImplementer` object. * * @param[in] aCallback A pointer to an `otCliOutputCallback` to deliver strings to the CLI console. * @param[in] aCallbackContext An arbitrary context to pass in when invoking @p aCallback. @@ -110,7 +110,7 @@ private: }; /** - * This class provides CLI output helper methods. + * Provides CLI output helper methods. * */ class Output @@ -119,7 +119,7 @@ public: typedef Utils::CmdLineParser::Arg Arg; ///< An argument /** - * This structure represent a CLI command table entry, mapping a command with `aName` to a handler method. + * Represent a CLI command table entry, mapping a command with `aName` to a handler method. * * @tparam Cli The CLI module type. * @@ -129,7 +129,7 @@ public: typedef otError (Cli::*Handler)(Arg aArgs[]); ///< The handler method pointer type. /** - * This method compares the entry's name with a given name. + * Compares the entry's name with a given name. * * @param aName The name string to compare with. * @@ -183,7 +183,7 @@ public: } /** - * This constructor initializes the `Output` object. + * Initializes the `Output` object. * * @param[in] aInstance A pointer to OpenThread instance. * @param[in] aImplementer An `OutputImplementer`. @@ -196,7 +196,7 @@ public: } /** - * This method returns the pointer to OpenThread instance. + * Returns the pointer to OpenThread instance. * * @returns The pointer to the OpenThread instance. * @@ -204,7 +204,7 @@ public: otInstance *GetInstancePtr(void) { return mInstance; } /** - * This structure represents a buffer which is used when converting a `uint64` value to string in decimal format. + * Represents a buffer which is used when converting a `uint64` value to string in decimal format. * */ struct Uint64StringBuffer @@ -215,7 +215,7 @@ public: }; /** - * This static method converts a `uint64_t` value to a decimal format string. + * Converts a `uint64_t` value to a decimal format string. * * @param[in] aUint64 The `uint64_t` value to convert. * @param[in] aBuffer A buffer to allocate the string from. @@ -226,7 +226,7 @@ public: static const char *Uint64ToString(uint64_t aUint64, Uint64StringBuffer &aBuffer); /** - * This method delivers a formatted output string to the CLI console. + * Delivers a formatted output string to the CLI console. * * @param[in] aFormat A pointer to the format string. * @param[in] ... A variable list of arguments to format. @@ -235,7 +235,7 @@ public: void OutputFormat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3); /** - * This method delivers a formatted output string to the CLI console (to which it prepends a given number + * Delivers a formatted output string to the CLI console (to which it prepends a given number * indentation space chars). * * @param[in] aIndentSize Number of indentation space chars to prepend to the string. @@ -246,7 +246,7 @@ public: void OutputFormat(uint8_t aIndentSize, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 4); /** - * This method delivers a formatted output string to the CLI console (to which it also appends newline "\r\n"). + * Delivers a formatted output string to the CLI console (to which it also appends newline "\r\n"). * * @param[in] aFormat A pointer to the format string. * @param[in] ... A variable list of arguments to format. @@ -255,7 +255,7 @@ public: void OutputLine(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3); /** - * This method delivers a formatted output string to the CLI console (to which it prepends a given number + * Delivers a formatted output string to the CLI console (to which it prepends a given number * indentation space chars and appends newline "\r\n"). * * @param[in] aIndentSize Number of indentation space chars to prepend to the string. @@ -266,13 +266,13 @@ public: void OutputLine(uint8_t aIndentSize, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 4); /** - * This method delivered newline "\r\n" to the CLI console. + * Delivered newline "\r\n" to the CLI console. * */ void OutputNewLine(void); /** - * This method outputs a given number of space chars to the CLI console. + * Outputs a given number of space chars to the CLI console. * * @param[in] aCount Number of space chars to output. * @@ -280,7 +280,7 @@ public: void OutputSpaces(uint8_t aCount); /** - * This method outputs a number of bytes to the CLI console as a hex string. + * Outputs a number of bytes to the CLI console as a hex string. * * @param[in] aBytes A pointer to data which should be printed. * @param[in] aLength @p aBytes length. @@ -289,7 +289,7 @@ public: void OutputBytes(const uint8_t *aBytes, uint16_t aLength); /** - * This method outputs a number of bytes to the CLI console as a hex string and at the end it also outputs newline + * Outputs a number of bytes to the CLI console as a hex string and at the end it also outputs newline * "\r\n". * * @param[in] aBytes A pointer to data which should be printed. @@ -299,7 +299,7 @@ public: void OutputBytesLine(const uint8_t *aBytes, uint16_t aLength); /** - * This method outputs a number of bytes to the CLI console as a hex string. + * Outputs a number of bytes to the CLI console as a hex string. * * @tparam kBytesLength The length of @p aBytes array. * @@ -312,7 +312,7 @@ public: } /** - * This method outputs a number of bytes to the CLI console as a hex string and at the end it also outputs newline + * Outputs a number of bytes to the CLI console as a hex string and at the end it also outputs newline * "\r\n". * * @tparam kBytesLength The length of @p aBytes array. @@ -326,7 +326,7 @@ public: } /** - * This method outputs an Extended MAC Address to the CLI console. + * Outputs an Extended MAC Address to the CLI console. * * param[in] aExtAddress The Extended MAC Address to output. * @@ -334,7 +334,7 @@ public: void OutputExtAddress(const otExtAddress &aExtAddress) { OutputBytes(aExtAddress.m8); } /** - * This method outputs an Extended MAC Address to the CLI console and at the end it also outputs newline "\r\n". + * Outputs an Extended MAC Address to the CLI console and at the end it also outputs newline "\r\n". * * param[in] aExtAddress The Extended MAC Address to output. * @@ -342,7 +342,7 @@ public: void OutputExtAddressLine(const otExtAddress &aExtAddress) { OutputBytesLine(aExtAddress.m8); } /** - * This method outputs a `uint64_t` value in decimal format. + * Outputs a `uint64_t` value in decimal format. * * @param[in] aUint64 The `uint64_t` value to output. * @@ -350,7 +350,7 @@ public: void OutputUint64(uint64_t aUint64); /** - * This method outputs a `uint64_t` value in decimal format and at the end it also outputs newline "\r\n". + * Outputs a `uint64_t` value in decimal format and at the end it also outputs newline "\r\n". * * @param[in] aUint64 The `uint64_t` value to output. * @@ -358,7 +358,7 @@ public: void OutputUint64Line(uint64_t aUint64); /** - * This method outputs "Enabled" or "Disabled" status to the CLI console (it also appends newline "\r\n"). + * Outputs "Enabled" or "Disabled" status to the CLI console (it also appends newline "\r\n"). * * @param[in] aEnabled A boolean indicating the status. TRUE outputs "Enabled", FALSE outputs "Disabled". * @@ -368,7 +368,7 @@ public: #if OPENTHREAD_FTD || OPENTHREAD_MTD /** - * This method outputs an IPv6 address to the CLI console. + * Outputs an IPv6 address to the CLI console. * * @param[in] aAddress A reference to the IPv6 address. * @@ -376,7 +376,7 @@ public: void OutputIp6Address(const otIp6Address &aAddress); /** - * This method outputs an IPv6 address to the CLI console and at the end it also outputs newline "\r\n". + * Outputs an IPv6 address to the CLI console and at the end it also outputs newline "\r\n". * * @param[in] aAddress A reference to the IPv6 address. * @@ -384,7 +384,7 @@ public: void OutputIp6AddressLine(const otIp6Address &aAddress); /** - * This method outputs an IPv6 prefix to the CLI console. + * Outputs an IPv6 prefix to the CLI console. * * @param[in] aPrefix A reference to the IPv6 prefix. * @@ -392,7 +392,7 @@ public: void OutputIp6Prefix(const otIp6Prefix &aPrefix); /** - * This method outputs an IPv6 prefix to the CLI console and at the end it also outputs newline "\r\n". + * Outputs an IPv6 prefix to the CLI console and at the end it also outputs newline "\r\n". * * @param[in] aPrefix A reference to the IPv6 prefix. * @@ -400,7 +400,7 @@ public: void OutputIp6PrefixLine(const otIp6Prefix &aPrefix); /** - * This method outputs an IPv6 network prefix to the CLI console. + * Outputs an IPv6 network prefix to the CLI console. * * @param[in] aPrefix A reference to the IPv6 network prefix. * @@ -408,7 +408,7 @@ public: void OutputIp6Prefix(const otIp6NetworkPrefix &aPrefix); /** - * This method outputs an IPv6 network prefix to the CLI console and at the end it also outputs newline "\r\n". + * Outputs an IPv6 network prefix to the CLI console and at the end it also outputs newline "\r\n". * * @param[in] aPrefix A reference to the IPv6 network prefix. * @@ -416,7 +416,7 @@ public: void OutputIp6PrefixLine(const otIp6NetworkPrefix &aPrefix); /** - * This method outputs an IPv6 socket address to the CLI console. + * Outputs an IPv6 socket address to the CLI console. * * @param[in] aSockAddr A reference to the IPv6 socket address. * @@ -424,7 +424,7 @@ public: void OutputSockAddr(const otSockAddr &aSockAddr); /** - * This method outputs an IPv6 socket address to the CLI console and at the end it also outputs newline "\r\n". + * Outputs an IPv6 socket address to the CLI console and at the end it also outputs newline "\r\n". * * @param[in] aSockAddr A reference to the IPv6 socket address. * @@ -432,7 +432,7 @@ public: void OutputSockAddrLine(const otSockAddr &aSockAddr); /** - * This method outputs DNS TXT data to the CLI console. + * Outputs DNS TXT data to the CLI console. * * @param[in] aTxtData A pointer to a buffer containing the DNS TXT data. * @param[in] aTxtDataLength The length of @p aTxtData (in bytes). @@ -441,7 +441,7 @@ public: void OutputDnsTxtData(const uint8_t *aTxtData, uint16_t aTxtDataLength); /** - * This structure represents a buffer which is used when converting an encoded rate value to percentage string. + * Represents a buffer which is used when converting an encoded rate value to percentage string. * */ struct PercentageStringBuffer @@ -452,7 +452,7 @@ public: }; /** - * This static method converts an encoded value to a percentage representation. + * Converts an encoded value to a percentage representation. * * The encoded @p aValue is assumed to be linearly scaled such that `0` maps to 0% and `0xffff` maps to 100%. * @@ -469,7 +469,7 @@ public: #endif // OPENTHREAD_FTD || OPENTHREAD_MTD /** - * This method outputs a table header to the CLI console. + * Outputs a table header to the CLI console. * * An example of the table header format: * @@ -492,7 +492,7 @@ public: } /** - * This method outputs a table separator to the CLI console. + * Outputs a table separator to the CLI console. * * An example of the table separator: * @@ -511,7 +511,7 @@ public: } /** - * This method outputs the list of commands from a given command table. + * Outputs the list of commands from a given command table. * * @tparam Cli The CLI module type. * @tparam kLength The length of command table array. diff --git a/src/cli/cli_srp_client.hpp b/src/cli/cli_srp_client.hpp index 9316c4278..5d96a1366 100644 --- a/src/cli/cli_srp_client.hpp +++ b/src/cli/cli_srp_client.hpp @@ -48,7 +48,7 @@ namespace ot { namespace Cli { /** - * This class implements the SRP Client CLI interpreter. + * Implements the SRP Client CLI interpreter. * */ class SrpClient : private Output @@ -66,7 +66,7 @@ public: SrpClient(otInstance *aInstance, OutputImplementer &aOutputImplementer); /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_srp_server.hpp b/src/cli/cli_srp_server.hpp index 831327c3b..344d3c2bb 100644 --- a/src/cli/cli_srp_server.hpp +++ b/src/cli/cli_srp_server.hpp @@ -46,7 +46,7 @@ namespace ot { namespace Cli { /** - * This class implements the SRP Server CLI interpreter. + * Implements the SRP Server CLI interpreter. * */ class SrpServer : private Output @@ -67,7 +67,7 @@ public: } /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_tcp.hpp b/src/cli/cli_tcp.hpp index a10570a66..745af2be7 100644 --- a/src/cli/cli_tcp.hpp +++ b/src/cli/cli_tcp.hpp @@ -56,7 +56,7 @@ namespace ot { namespace Cli { /** - * This class implements a CLI-based TCP example. + * Implements a CLI-based TCP example. * */ class TcpExample : private Output @@ -74,7 +74,7 @@ public: TcpExample(otInstance *aInstance, OutputImplementer &aOutputImplementer); /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/cli/cli_udp.hpp b/src/cli/cli_udp.hpp index 14003e14b..0c15c8070 100644 --- a/src/cli/cli_udp.hpp +++ b/src/cli/cli_udp.hpp @@ -44,7 +44,7 @@ namespace ot { namespace Cli { /** - * This class implements a CLI-based UDP example. + * Implements a CLI-based UDP example. * */ class UdpExample : private Output @@ -62,7 +62,7 @@ public: UdpExample(otInstance *aInstance, OutputImplementer &aOutputImplementer); /** - * This method processes a CLI sub-command. + * Processes a CLI sub-command. * * @param[in] aArgs An array of command line arguments. * diff --git a/src/core/backbone_router/backbone_tmf.hpp b/src/core/backbone_router/backbone_tmf.hpp index 73b92ad1b..286a9de9b 100644 --- a/src/core/backbone_router/backbone_tmf.hpp +++ b/src/core/backbone_router/backbone_tmf.hpp @@ -47,14 +47,14 @@ namespace BackboneRouter { constexpr uint16_t kBackboneUdpPort = 61631; ///< Backbone TMF UDP Port /** - * This class implements functionality of the Backbone TMF agent. + * Implements functionality of the Backbone TMF agent. * */ class BackboneTmfAgent : public Coap::Coap { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -62,7 +62,7 @@ public: explicit BackboneTmfAgent(Instance &aInstance); /** - * This method starts the Backbone TMF agent. + * Starts the Backbone TMF agent. * * @retval kErrorNone Successfully started the CoAP service. * @retval kErrorFailed Failed to start the Backbone TMF agent. @@ -71,7 +71,7 @@ public: Error Start(void); /** - * This method returns whether @p aMessageInfo meets Backbone Thread Management Framework Addressing Rules. + * Returns whether @p aMessageInfo meets Backbone Thread Management Framework Addressing Rules. * * @retval true Thread Management Framework Addressing Rules are met. * @retval false Thread Management Framework Addressing Rules are not met. @@ -80,7 +80,7 @@ public: bool IsBackboneTmfMessage(const Ip6::MessageInfo &aMessageInfo) const; /** - * This method subscribes the Backbone TMF socket to a given IPv6 multicast group on the Backbone network. + * Subscribes the Backbone TMF socket to a given IPv6 multicast group on the Backbone network. * * @param[in] aAddress The IPv6 multicast group address. * @@ -88,7 +88,7 @@ public: void SubscribeMulticast(const Ip6::Address &aAddress); /** - * This method unsubscribes the Backbone TMF socket from a given IPv6 multicast group on the Backbone network. + * Unsubscribes the Backbone TMF socket from a given IPv6 multicast group on the Backbone network. * * @param[in] aAddress The IPv6 multicast group address. * diff --git a/src/core/backbone_router/bbr_leader.hpp b/src/core/backbone_router/bbr_leader.hpp index 605283933..7bcdb8228 100644 --- a/src/core/backbone_router/bbr_leader.hpp +++ b/src/core/backbone_router/bbr_leader.hpp @@ -55,7 +55,7 @@ namespace BackboneRouter { typedef otBackboneRouterConfig Config; /** - * This class implements the basic Primary Backbone Router service operations. + * Implements the basic Primary Backbone Router service operations. * */ class Leader : public InstanceLocator, private NonCopyable @@ -84,7 +84,7 @@ public: }; /** - * This constructor initializes the `Leader`. + * Initializes the `Leader`. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -92,19 +92,19 @@ public: explicit Leader(Instance &aInstance); /** - * This method resets the cached Primary Backbone Router. + * Resets the cached Primary Backbone Router. * */ void Reset(void); /** - * This method updates the cached Primary Backbone Router if any when new network data is available. + * Updates the cached Primary Backbone Router if any when new network data is available. * */ void Update(void); /** - * This method gets the Primary Backbone Router in the Thread Network. + * Gets the Primary Backbone Router in the Thread Network. * * @param[out] aConfig The Primary Backbone Router information. * @@ -115,7 +115,7 @@ public: Error GetConfig(Config &aConfig) const; /** - * This method gets the Backbone Router Service ID. + * Gets the Backbone Router Service ID. * * @param[out] aServiceId The reference whether to put the Backbone Router Service ID. * @@ -126,7 +126,7 @@ public: Error GetServiceId(uint8_t &aServiceId) const; /** - * This method gets the short address of the Primary Backbone Router. + * Gets the short address of the Primary Backbone Router. * * @returns short address of Primary Backbone Router, or Mac::kShortAddrInvalid if no Primary Backbone Router. * @@ -134,7 +134,7 @@ public: uint16_t GetServer16(void) const { return mConfig.mServer16; } /** - * This method indicates whether or not there is Primary Backbone Router. + * Indicates whether or not there is Primary Backbone Router. * * @retval TRUE If there is Primary Backbone Router. * @retval FALSE If there is no Primary Backbone Router. @@ -143,7 +143,7 @@ public: bool HasPrimary(void) const { return mConfig.mServer16 != Mac::kShortAddrInvalid; } /** - * This method gets the Domain Prefix in the Thread Network. + * Gets the Domain Prefix in the Thread Network. * * @retval A pointer to the Domain Prefix or nullptr if there is no Domain Prefix. * @@ -154,7 +154,7 @@ public: } /** - * This method indicates whether or not the Domain Prefix is available in the Thread Network. + * Indicates whether or not the Domain Prefix is available in the Thread Network. * * @retval TRUE If there is Domain Prefix. * @retval FALSE If there is no Domain Prefix. @@ -163,7 +163,7 @@ public: bool HasDomainPrefix(void) const { return (mDomainPrefix.GetLength() > 0); } /** - * This method indicates whether or not the address is a Domain Unicast Address. + * Indicates whether or not the address is a Domain Unicast Address. * * @param[in] aAddress A reference to the address. * diff --git a/src/core/backbone_router/bbr_local.hpp b/src/core/backbone_router/bbr_local.hpp index 42b1dd104..c5a7ab8ed 100644 --- a/src/core/backbone_router/bbr_local.hpp +++ b/src/core/backbone_router/bbr_local.hpp @@ -67,14 +67,14 @@ namespace ot { namespace BackboneRouter { /** - * This class implements the definitions for local Backbone Router service. + * Implements the definitions for local Backbone Router service. * */ class Local : public InstanceLocator, private NonCopyable { public: /** - * This enumeration represents Backbone Router state. + * Represents Backbone Router state. * */ enum State : uint8_t @@ -85,7 +85,7 @@ public: }; /** - * This constructor initializes the local Backbone Router. + * Initializes the local Backbone Router. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -93,7 +93,7 @@ public: explicit Local(Instance &aInstance); /** - * This method enables/disables Backbone function. + * Enables/disables Backbone function. * * @param[in] aEnable TRUE to enable the backbone function, FALSE otherwise. * @@ -101,7 +101,7 @@ public: void SetEnabled(bool aEnable); /** - * This method retrieves the Backbone Router state. + * Retrieves the Backbone Router state. * * * @returns The current state of Backbone Router. @@ -110,13 +110,13 @@ public: State GetState(void) const { return mState; } /** - * This method resets the local Thread Network Data. + * Resets the local Thread Network Data. * */ void Reset(void); /** - * This method gets local Backbone Router configuration. + * Gets local Backbone Router configuration. * * @param[out] aConfig The local Backbone Router configuration. * @@ -124,7 +124,7 @@ public: void GetConfig(Config &aConfig) const; /** - * This method sets local Backbone Router configuration. + * Sets local Backbone Router configuration. * * @param[in] aConfig The configuration to set. * @@ -135,7 +135,7 @@ public: Error SetConfig(const Config &aConfig); /** - * This method registers Backbone Router Dataset to Leader. + * Registers Backbone Router Dataset to Leader. * * @param[in] aForce True to force registration regardless of current state. * False to decide based on current state. @@ -149,7 +149,7 @@ public: Error AddService(bool aForce = false); /** - * This method indicates whether or not the Backbone Router is Primary. + * Indicates whether or not the Backbone Router is Primary. * * @retval True if the Backbone Router is Primary. * @retval False if the Backbone Router is not Primary. @@ -158,7 +158,7 @@ public: bool IsPrimary(void) const { return mState == kStatePrimary; } /** - * This method indicates whether or not the Backbone Router is enabled. + * Indicates whether or not the Backbone Router is enabled. * * @retval True if the Backbone Router is enabled. * @retval False if the Backbone Router is not enabled. @@ -167,7 +167,7 @@ public: bool IsEnabled(void) const { return mState != kStateDisabled; } /** - * This method sets the Backbone Router registration jitter value. + * Sets the Backbone Router registration jitter value. * * @param[in] aRegistrationJitter the Backbone Router registration jitter value to set. * @@ -175,7 +175,7 @@ public: void SetRegistrationJitter(uint8_t aRegistrationJitter) { mRegistrationJitter = aRegistrationJitter; } /** - * This method returns the Backbone Router registration jitter value. + * Returns the Backbone Router registration jitter value. * * @returns The Backbone Router registration jitter value. * @@ -183,7 +183,7 @@ public: uint8_t GetRegistrationJitter(void) const { return mRegistrationJitter; } /** - * This method notifies Primary Backbone Router status. + * Notifies Primary Backbone Router status. * * @param[in] aState The state or state change of Primary Backbone Router. * @param[in] aConfig The Primary Backbone Router service. @@ -192,7 +192,7 @@ public: void HandleBackboneRouterPrimaryUpdate(Leader::State aState, const Config &aConfig); /** - * This method gets the Domain Prefix configuration. + * Gets the Domain Prefix configuration. * * @param[out] aConfig A reference to the Domain Prefix configuration. * @@ -203,7 +203,7 @@ public: Error GetDomainPrefix(NetworkData::OnMeshPrefixConfig &aConfig); /** - * This method removes the local Domain Prefix configuration. + * Removes the local Domain Prefix configuration. * * @param[in] aPrefix A reference to the IPv6 Domain Prefix. * @@ -215,7 +215,7 @@ public: Error RemoveDomainPrefix(const Ip6::Prefix &aPrefix); /** - * This method sets the local Domain Prefix configuration. + * Sets the local Domain Prefix configuration. * * @param[in] aConfig A reference to the Domain Prefix configuration. * @@ -226,7 +226,7 @@ public: Error SetDomainPrefix(const NetworkData::OnMeshPrefixConfig &aConfig); /** - * This method returns a reference to the All Network Backbone Routers Multicast Address. + * Returns a reference to the All Network Backbone Routers Multicast Address. * * @returns A reference to the All Network Backbone Routers Multicast Address. * @@ -234,7 +234,7 @@ public: const Ip6::Address &GetAllNetworkBackboneRoutersAddress(void) const { return mAllNetworkBackboneRouters; } /** - * This method returns a reference to the All Domain Backbone Routers Multicast Address. + * Returns a reference to the All Domain Backbone Routers Multicast Address. * * @returns A reference to the All Domain Backbone Routers Multicast Address. * @@ -242,13 +242,13 @@ public: const Ip6::Address &GetAllDomainBackboneRoutersAddress(void) const { return mAllDomainBackboneRouters; } /** - * This method applies the Mesh Local Prefix. + * Applies the Mesh Local Prefix. * */ void ApplyMeshLocalPrefix(void); /** - * This method updates the subscription of All Domain Backbone Routers Multicast Address. + * Updates the subscription of All Domain Backbone Routers Multicast Address. * * @param[in] aState The Domain Prefix state or state change. * @@ -256,7 +256,7 @@ public: void HandleDomainPrefixUpdate(Leader::DomainPrefixState aState); /** - * This method sets the Domain Prefix callback. + * Sets the Domain Prefix callback. * * @param[in] aCallback The callback function. * @param[in] aContext A user context pointer. diff --git a/src/core/backbone_router/bbr_manager.hpp b/src/core/backbone_router/bbr_manager.hpp index da5434d78..ea6949f42 100644 --- a/src/core/backbone_router/bbr_manager.hpp +++ b/src/core/backbone_router/bbr_manager.hpp @@ -56,7 +56,7 @@ namespace ot { namespace BackboneRouter { /** - * This class implements the definitions for Backbone Router management. + * Implements the definitions for Backbone Router management. * */ class Manager : public InstanceLocator, private NonCopyable @@ -67,7 +67,7 @@ class Manager : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the Backbone Router manager. + * Initializes the Backbone Router manager. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -76,7 +76,7 @@ public: #if OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE /** - * This method returns the NdProxy Table. + * Returns the NdProxy Table. * * @returns The NdProxy Table. * @@ -86,7 +86,7 @@ public: #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method configures response status for next DUA registration. + * Configures response status for next DUA registration. * * Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * Only used for test and certification. @@ -100,7 +100,7 @@ public: #if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE /** - * This method configures response status for next Multicast Listener Registration. + * Configures response status for next Multicast Listener Registration. * * Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * Only used for test and certification. @@ -114,7 +114,7 @@ public: #if OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE /** - * This method gets the Multicast Listeners Table. + * Gets the Multicast Listeners Table. * * @returns The Multicast Listeners Table. * @@ -123,7 +123,7 @@ public: #endif /** - * This method returns if messages destined to a given Domain Unicast Address should be forwarded to the Backbone + * Returns if messages destined to a given Domain Unicast Address should be forwarded to the Backbone * link. * * @param aAddress The Domain Unicast Address. @@ -135,7 +135,7 @@ public: bool ShouldForwardDuaToBackbone(const Ip6::Address &aAddress); /** - * This method returns a reference to the Backbone TMF agent. + * Returns a reference to the Backbone TMF agent. * * @returns A reference to the Backbone TMF agent. * @@ -143,7 +143,7 @@ public: BackboneTmfAgent &GetBackboneTmfAgent(void) { return mBackboneTmfAgent; } /** - * This method sends BB.qry on the Backbone link. + * Sends BB.qry on the Backbone link. * * @param[in] aDua The Domain Unicast Address to query. * @param[in] aRloc16 The short address of the address resolution initiator or `Mac::kShortAddrInvalid` for @@ -157,7 +157,7 @@ public: Error SendBackboneQuery(const Ip6::Address &aDua, uint16_t aRloc16 = Mac::kShortAddrInvalid); /** - * This method send a Proactive Backbone Notification (PRO_BB.ntf) on the Backbone link. + * Send a Proactive Backbone Notification (PRO_BB.ntf) on the Backbone link. * * @param[in] aDua The Domain Unicast Address to notify. * @param[in] aMeshLocalIid The Mesh-Local IID to notify. diff --git a/src/core/backbone_router/multicast_listeners_table.hpp b/src/core/backbone_router/multicast_listeners_table.hpp index 7565f94d3..392b8185f 100644 --- a/src/core/backbone_router/multicast_listeners_table.hpp +++ b/src/core/backbone_router/multicast_listeners_table.hpp @@ -52,7 +52,7 @@ namespace ot { namespace BackboneRouter { /** - * This class implements the definitions for Multicast Listeners Table. + * Implements the definitions for Multicast Listeners Table. * */ class MulticastListenersTable : public InstanceLocator, private NonCopyable @@ -61,7 +61,7 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable public: /** - * This class represents a Multicast Listener entry. + * Represents a Multicast Listener entry. * */ class Listener : public Clearable @@ -80,13 +80,13 @@ public: }; /** - * This constructor initializes the `Listener` object. + * Initializes the `Listener` object. * */ Listener(void) { Clear(); } /** - * This method returns the Multicast Listener address. + * Returns the Multicast Listener address. * * @returns The Multicast Listener address. * @@ -94,7 +94,7 @@ public: const Ip6::Address &GetAddress(void) const { return mAddress; } /** - * This method returns the expire time of the Multicast Listener. + * Returns the expire time of the Multicast Listener. * * @returns The Multicast Listener expire time. * @@ -112,7 +112,7 @@ public: }; /** - * This constructor initializes the Multicast Listeners Table. + * Initializes the Multicast Listeners Table. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -124,7 +124,7 @@ public: } /** - * This method adds a Multicast Listener with given address and expire time. + * Adds a Multicast Listener with given address and expire time. * * @param[in] aAddress The Multicast Listener address. * @param[in] aExpireTime The Multicast Listener expire time. @@ -137,7 +137,7 @@ public: Error Add(const Ip6::Address &aAddress, TimeMilli aExpireTime); /** - * This method removes a given Multicast Listener. + * Removes a given Multicast Listener. * * @param[in] aAddress The Multicast Listener address. * @@ -145,13 +145,13 @@ public: void Remove(const Ip6::Address &aAddress); /** - * This method removes expired Multicast Listeners. + * Removes expired Multicast Listeners. * */ void Expire(void); /** - * This method counts the number of valid Multicast Listeners. + * Counts the number of valid Multicast Listeners. * * @returns The number of valid Multicast Listeners. * @@ -159,9 +159,9 @@ public: uint16_t Count(void) const { return mNumValidListeners; } /** - * This method enables range-based `for` loop iteration over all Multicast Listeners. + * Enables range-based `for` loop iteration over all Multicast Listeners. * - * This method should be used as follows: + * Should be used as follows: * * for (MulticastListenersTable::Listener &listener : Get().Iterate()) * @@ -171,13 +171,13 @@ public: IteratorBuilder Iterate(void) { return IteratorBuilder(GetInstance()); } /** - * This method removes all the Multicast Listeners. + * Removes all the Multicast Listeners. * */ void Clear(void); /** - * This method sets the Multicast Listener callback. + * Sets the Multicast Listener callback. * * @param[in] aCallback The callback function. * @param[in] aContext A user context pointer. @@ -186,7 +186,7 @@ public: void SetCallback(Listener::Callback aCallback, void *aContext); /** - * This method gets the next Multicast Listener. + * Gets the next Multicast Listener. * * @param[in] aIterator A pointer to the Multicast Listener Iterator. * @param[out] aInfo A reference to output the Multicast Listener info. diff --git a/src/core/backbone_router/ndproxy_table.hpp b/src/core/backbone_router/ndproxy_table.hpp index 8c12db1a8..87808d8d7 100644 --- a/src/core/backbone_router/ndproxy_table.hpp +++ b/src/core/backbone_router/ndproxy_table.hpp @@ -54,14 +54,14 @@ namespace ot { namespace BackboneRouter { /** - * This class implements NdProxy Table maintenance on Primary Backbone Router. + * Implements NdProxy Table maintenance on Primary Backbone Router. * */ class NdProxyTable : public InstanceLocator, private NonCopyable { public: /** - * This class represents a ND Proxy instance. + * Represents a ND Proxy instance. * */ class NdProxy : private Clearable @@ -73,7 +73,7 @@ public: typedef otBackboneRouterNdProxyCallback Callback; ///< ND Proxy callback. /** - * This type represents the ND Proxy events. + * Represents the ND Proxy events. * */ enum Event @@ -85,7 +85,7 @@ public: }; /** - * This method gets the Mesh-Local IID of the ND Proxy. + * Gets the Mesh-Local IID of the ND Proxy. * * @returns The Mesh-Local IID. * @@ -93,7 +93,7 @@ public: const Ip6::InterfaceIdentifier &GetMeshLocalIid(void) const { return mMeshLocalIid; } /** - * This method gets the time since last transaction of the ND Proxy. + * Gets the time since last transaction of the ND Proxy. * * @returns The time since last transaction in seconds. * @@ -104,7 +104,7 @@ public: } /** - * This method gets the short address of the device who sends the DUA registration. + * Gets the short address of the device who sends the DUA registration. * * @returns The RLOC16 value. * @@ -112,7 +112,7 @@ public: uint16_t GetRloc16(void) const { return mRloc16; } /** - * This method gets the DAD flag of the ND Proxy. + * Gets the DAD flag of the ND Proxy. * * @returns The DAD flag. * @@ -143,7 +143,7 @@ public: }; /** - * This constructor initializes the `NdProxyTable` object. + * Initializes the `NdProxyTable` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -155,7 +155,7 @@ public: } /** - * This method registers a given IPv6 address IID with related information to the NdProxy table. + * Registers a given IPv6 address IID with related information to the NdProxy table. * * @param[in] aAddressIid The IPv6 address IID. * @param[in] aMeshLocalIid The Mesh-Local IID. @@ -173,7 +173,7 @@ public: const uint32_t *aTimeSinceLastTransaction); /** - * This method checks if a given IPv6 address IID was registered. + * Checks if a given IPv6 address IID was registered. * * @param[in] aAddressIid The IPv6 address IID. * @@ -184,7 +184,7 @@ public: bool IsRegistered(const Ip6::InterfaceIdentifier &aAddressIid) { return FindByAddressIid(aAddressIid) != nullptr; } /** - * This method notifies Domain Prefix status. + * Notifies Domain Prefix status. * * @param[in] aState The Domain Prefix state or state change. * @@ -192,13 +192,13 @@ public: void HandleDomainPrefixUpdate(Leader::DomainPrefixState aState); /** - * This method notifies ND Proxy table of the timer tick. + * Notifies ND Proxy table of the timer tick. * */ void HandleTimer(void); /** - * This method gets the ND Proxy info for a given Domain Unicast Address. + * Gets the ND Proxy info for a given Domain Unicast Address. * * @param[in] aDua The Domain Unicast Address. * @@ -208,7 +208,7 @@ public: NdProxy *ResolveDua(const Ip6::Address &aDua); /** - * This method notifies DAD completed for a given ND Proxy. + * Notifies DAD completed for a given ND Proxy. * * @param[in] aNdProxy The ND Proxy to notify of. * @param[in] aDuplicated Whether duplicate was detected. @@ -217,7 +217,7 @@ public: static void NotifyDadComplete(NdProxy &aNdProxy, bool aDuplicated); /** - * This method removes the ND Proxy. + * Removes the ND Proxy. * * @param[in] aNdProxy The ND Proxy to remove. * @@ -225,7 +225,7 @@ public: static void Erase(NdProxy &aNdProxy); /* - * This method sets the ND Proxy callback. + * Sets the ND Proxy callback. * * @param[in] aCallback The callback function. * @param[in] aContext A user context pointer. @@ -234,7 +234,7 @@ public: void SetCallback(NdProxy::Callback aCallback, void *aContext) { mCallback.Set(aCallback, aContext); } /** - * This method retrieves the ND Proxy info of the Domain Unicast Address. + * Retrieves the ND Proxy info of the Domain Unicast Address. * * @param[in] aDua The Domain Unicast Address to get info. * @param[in] aNdProxyInfo A pointer to the ND Proxy info. @@ -256,7 +256,7 @@ private: }; /** - * This class represents an iterator for iterating through the NdProxy Table. + * Represents an iterator for iterating through the NdProxy Table. * */ class Iterator : public InstanceLocator, public ItemPtrIterator diff --git a/src/core/border_router/infra_if.hpp b/src/core/border_router/infra_if.hpp index ec4c5480d..b23bb26df 100644 --- a/src/core/border_router/infra_if.hpp +++ b/src/core/border_router/infra_if.hpp @@ -51,7 +51,7 @@ namespace ot { namespace BorderRouter { /** - * This class represents the infrastructure network interface on a border router. + * Represents the infrastructure network interface on a border router. * */ class InfraIf : public InstanceLocator @@ -63,7 +63,7 @@ public: typedef Data Icmp6Packet; ///< An IMCPv6 packet (data containing the IP payload) /** - * This constructor initializes the `InfraIf`. + * Initializes the `InfraIf`. * * @param[in] aInstance A OpenThread instance. * @@ -71,7 +71,7 @@ public: explicit InfraIf(Instance &aInstance); /** - * This method initializes the `InfraIf`. + * Initializes the `InfraIf`. * * @param[in] aIfIndex The infrastructure interface index. * @@ -83,13 +83,13 @@ public: Error Init(uint32_t aIfIndex); /** - * This method deinitilaizes the `InfraIf`. + * Deinitilaizes the `InfraIf`. * */ void Deinit(void); /** - * This method indicates whether or not the `InfraIf` is initialized. + * Indicates whether or not the `InfraIf` is initialized. * * @retval TRUE The `InfraIf` is initialized. * @retval FALSE The `InfraIf` is not initialized. @@ -98,7 +98,7 @@ public: bool IsInitialized(void) const { return mInitialized; } /** - * This method indicates whether or not the infra interface is running. + * Indicates whether or not the infra interface is running. * * @retval TRUE The infrastructure interface is running. * @retval FALSE The infrastructure interface is not running. @@ -107,7 +107,7 @@ public: bool IsRunning(void) const { return mIsRunning; } /** - * This method returns the infrastructure interface index. + * Returns the infrastructure interface index. * * @returns The interface index or zero if not initialized. * @@ -115,9 +115,9 @@ public: uint32_t GetIfIndex(void) const { return mIfIndex; } /** - * This method indicates whether or not the infra interface has the given IPv6 address assigned. + * Indicates whether or not the infra interface has the given IPv6 address assigned. * - * This method MUST be used when interface is initialized. + * MUST be used when interface is initialized. * * @param[in] aAddress The IPv6 address. * @@ -128,9 +128,9 @@ public: bool HasAddress(const Ip6::Address &aAddress) const; /** - * This method sends an ICMPv6 Neighbor Discovery packet on the infrastructure interface. + * Sends an ICMPv6 Neighbor Discovery packet on the infrastructure interface. * - * This method MUST be used when interface is initialized. + * MUST be used when interface is initialized. * * @param[in] aPacket The ICMPv6 packet to send. * @param[in] aDestination The destination address. @@ -142,7 +142,7 @@ public: Error Send(const Icmp6Packet &aPacket, const Ip6::Address &aDestination) const; /** - * This method processes a received ICMPv6 Neighbor Discovery packet from an infrastructure interface. + * Processes a received ICMPv6 Neighbor Discovery packet from an infrastructure interface. * * @param[in] aIfIndex The infrastructure interface index on which the ICMPv6 message is received. * @param[in] aSource The IPv6 source address. @@ -152,7 +152,7 @@ public: void HandledReceived(uint32_t aIfIndex, const Ip6::Address &aSource, const Icmp6Packet &aPacket); /** - * This method sends a request to discover the NAT64 prefix on the infrastructure interface. + * Sends a request to discover the NAT64 prefix on the infrastructure interface. * * @note This method MUST be used when interface is initialized. * @@ -163,7 +163,7 @@ public: Error DiscoverNat64Prefix(void) const; /** - * This method processes the discovered NAT64 prefix. + * Processes the discovered NAT64 prefix. * * @param[in] aIfIndex The infrastructure interface index on which the host address is received. * @param[in] aPrefix The NAT64 prefix on the infrastructure link. @@ -172,7 +172,7 @@ public: void DiscoverNat64PrefixDone(uint32_t aIfIndex, const Ip6::Prefix &aPrefix); /** - * This method handles infrastructure interface state changes. + * Handles infrastructure interface state changes. * * @param[in] aIfIndex The infrastructure interface index. * @param[in] aIsRunning A boolean that indicates whether the infrastructure interface is running. @@ -185,7 +185,7 @@ public: Error HandleStateChanged(uint32_t aIfIndex, bool aIsRunning); /** - * This method converts the `InfraIf` to a human-readable string. + * Converts the `InfraIf` to a human-readable string. * * @returns The string representation of `InfraIf`. * diff --git a/src/core/border_router/routing_manager.hpp b/src/core/border_router/routing_manager.hpp index 213721ca6..db73497cf 100644 --- a/src/core/border_router/routing_manager.hpp +++ b/src/core/border_router/routing_manager.hpp @@ -69,7 +69,7 @@ namespace ot { namespace BorderRouter { /** - * This class implements bi-directional routing between Thread and Infrastructure networks. + * 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/received on the infrastructure interface. @@ -100,7 +100,7 @@ public: static constexpr uint16_t kMaxPublishedPrefixes = 3; /** - * This enumeration represents the states of `RoutingManager`. + * Represents the states of `RoutingManager`. * */ enum State : uint8_t @@ -112,7 +112,7 @@ public: }; /** - * This constructor initializes the routing manager. + * Initializes the routing manager. * * @param[in] aInstance A OpenThread instance. * @@ -120,7 +120,7 @@ public: explicit RoutingManager(Instance &aInstance); /** - * This method initializes the routing manager on given infrastructure interface. + * Initializes the routing manager on given infrastructure interface. * * @param[in] aInfraIfIndex An infrastructure network interface index. * @param[in] aInfraIfIsRunning A boolean that indicates whether the infrastructure @@ -133,7 +133,7 @@ public: Error Init(uint32_t aInfraIfIndex, bool aInfraIfIsRunning); /** - * This method enables/disables the Border Routing Manager. + * Enables/disables the Border Routing Manager. * * @note The Border Routing Manager is enabled by default. * @@ -146,7 +146,7 @@ public: Error SetEnabled(bool aEnabled); /** - * This method indicates whether or not it is currently running. + * Indicates whether or not it is currently running. * * In order for the `RoutingManager` to be running it needs to be initialized and enabled, and device being * attached. @@ -158,7 +158,7 @@ public: bool IsRunning(void) const { return mIsRunning; } /** - * This method gets the state of `RoutingManager`. + * Gets the state of `RoutingManager`. * * @returns The current state of `RoutingManager`. * @@ -166,7 +166,7 @@ public: State GetState(void) const; /** - * This method requests the Border Routing Manager to stop. + * Requests the Border Routing Manager to stop. * * If Border Routing Manager is running, calling this method immediately stops it and triggers the preparation * and sending of a final Router Advertisement (RA) message on infrastructure interface which deprecates and/or @@ -181,7 +181,7 @@ public: void RequestStop(void) { Stop(); } /** - * This method gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement + * Gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement * messages sent over the infrastructure link. * * The RIO preference is determined as follows: @@ -196,7 +196,7 @@ public: RoutePreference GetRouteInfoOptionPreference(void) const { return mRioPreference; } /** - * This method explicitly sets the preference to use when advertising Route Info Options (RIO) in Router + * Explicitly sets the preference to use when advertising Route Info Options (RIO) in Router * Advertisement messages sent over the infrastructure link. * * After a call to this method, BR will use the given preference for all its advertised RIOs. The preference can be @@ -208,7 +208,7 @@ public: void SetRouteInfoOptionPreference(RoutePreference aPreference); /** - * This method clears a previously set preference value for advertised Route Info Options. + * Clears a previously set preference value for advertised Route Info Options. * * After a call to this method, BR will use device role to determine the RIO preference: Medium preference when * in router/leader role and low preference when in child role. @@ -217,7 +217,7 @@ public: void ClearRouteInfoOptionPreference(void); /** - * This method returns the local off-mesh-routable (OMR) prefix. + * Returns the local off-mesh-routable (OMR) prefix. * * The randomly generated 64-bit prefix will be added to the Thread Network Data if there isn't already an OMR * prefix. @@ -231,7 +231,7 @@ public: Error GetOmrPrefix(Ip6::Prefix &aPrefix) const; /** - * This method returns the currently favored off-mesh-routable (OMR) prefix. + * Returns the currently favored off-mesh-routable (OMR) prefix. * * The favored OMR prefix can be discovered from Network Data or can be our local OMR prefix. * @@ -248,7 +248,7 @@ public: Error GetFavoredOmrPrefix(Ip6::Prefix &aPrefix, RoutePreference &aPreference) const; /** - * This method returns the on-link prefix for the adjacent infrastructure link. + * Returns the on-link prefix for the adjacent infrastructure link. * * The randomly generated 64-bit prefix will be advertised * on the infrastructure link if there isn't already a usable @@ -263,7 +263,7 @@ public: Error GetOnLinkPrefix(Ip6::Prefix &aPrefix) const; /** - * This method returns the favored on-link prefix for the adjacent infrastructure link. + * Returns the favored on-link prefix for the adjacent infrastructure link. * * The favored prefix is either a discovered prefix on the infrastructure link or the local on-link prefix. * @@ -298,7 +298,7 @@ public: void SetNat64PrefixManagerEnabled(bool aEnabled); /** - * This method returns the local NAT64 prefix. + * Returns the local NAT64 prefix. * * @param[out] aPrefix A reference to where the prefix will be output to. * @@ -309,7 +309,7 @@ public: Error GetNat64Prefix(Ip6::Prefix &aPrefix); /** - * This method returns the currently favored NAT64 prefix. + * Returns the currently favored NAT64 prefix. * * The favored NAT64 prefix can be discovered from infrastructure link or can be the local NAT64 prefix. * @@ -323,7 +323,7 @@ public: Error GetFavoredNat64Prefix(Ip6::Prefix &aPrefix, RoutePreference &aRoutePreference); /** - * This method informs `RoutingManager` of the result of the discovery request of NAT64 prefix on infrastructure + * Informs `RoutingManager` of the result of the discovery request of NAT64 prefix on infrastructure * interface (`InfraIf::DiscoverNat64Prefix()`). * * @param[in] aPrefix The discovered NAT64 prefix on `InfraIf`. @@ -334,7 +334,7 @@ public: #endif // OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE /** - * This method processes a received ICMPv6 message from the infrastructure interface. + * Processes a received ICMPv6 message from the infrastructure interface. * * Malformed or undesired messages are dropped silently. * @@ -345,13 +345,13 @@ public: void HandleReceived(const InfraIf::Icmp6Packet &aPacket, const Ip6::Address &aSrcAddress); /** - * This method handles infrastructure interface state changes. + * Handles infrastructure interface state changes. * */ void HandleInfraIfStateChanged(void) { EvaluateState(); } /** - * This method checks whether the on-mesh prefix configuration is a valid OMR prefix. + * Checks whether the on-mesh prefix configuration is a valid OMR prefix. * * @param[in] aOnMeshPrefixConfig The on-mesh prefix configuration to check. * @@ -362,7 +362,7 @@ public: static bool IsValidOmrPrefix(const NetworkData::OnMeshPrefixConfig &aOnMeshPrefixConfig); /** - * This method checks whether a given prefix is a valid OMR prefix. + * Checks whether a given prefix is a valid OMR prefix. * * @param[in] aPrefix The prefix to check. * @@ -373,7 +373,7 @@ public: static bool IsValidOmrPrefix(const Ip6::Prefix &aPrefix); /** - * This method initializes a `PrefixTableIterator`. + * Initializes a `PrefixTableIterator`. * * An iterator can be initialized again to start from the beginning of the table. * @@ -389,7 +389,7 @@ public: } /** - * This method iterates over entries in the discovered prefix table. + * Iterates over entries in the discovered prefix table. * * @param[in,out] aIterator An iterator. * @param[out] aEntry A reference to the entry to populate. @@ -405,7 +405,7 @@ public: #if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE /** - * This method determines whether to enable/disable SRP server when the auto-enable mode is changed on SRP server. + * Determines whether to enable/disable SRP server when the auto-enable mode is changed on SRP server. * * This should be called from `Srp::Server` when auto-enable mode is changed. * diff --git a/src/core/coap/coap.hpp b/src/core/coap/coap.hpp index b5d05a669..30a98ec47 100644 --- a/src/core/coap/coap.hpp +++ b/src/core/coap/coap.hpp @@ -64,7 +64,7 @@ namespace Coap { */ /** - * This type represents a function pointer which is called when a CoAP response is received or on the request timeout. + * Represents a function pointer which is called when a CoAP response is received or on the request timeout. * * Please see otCoapResponseHandler for details. * @@ -72,7 +72,7 @@ namespace Coap { typedef otCoapResponseHandler ResponseHandler; /** - * This type represents a function pointer which is called when a CoAP request associated with a given URI path is + * Represents a function pointer which is called when a CoAP request associated with a given URI path is * received. * * Please see otCoapRequestHandler for details. @@ -81,7 +81,7 @@ typedef otCoapResponseHandler ResponseHandler; typedef otCoapRequestHandler RequestHandler; /** - * This structure represents the CoAP transmission parameters. + * Represents the CoAP transmission parameters. * */ class TxParameters : public otCoapTxParameters @@ -91,7 +91,7 @@ class TxParameters : public otCoapTxParameters public: /** - * This static method coverts a pointer to `otCoapTxParameters` to `Coap::TxParamters` + * Coverts a pointer to `otCoapTxParameters` to `Coap::TxParamters` * * If the pointer is `nullptr`, the default parameters are used instead. * @@ -107,7 +107,7 @@ public: } /** - * This method validates whether the CoAP transmission parameters are valid. + * Validates whether the CoAP transmission parameters are valid. * * @returns Whether the parameters are valid. * @@ -115,7 +115,7 @@ public: bool IsValid(void) const; /** - * This static method returns default CoAP tx parameters. + * Returns default CoAP tx parameters. * * @returns The default tx parameters. * @@ -138,7 +138,7 @@ private: }; /** - * This class implements CoAP resource handling. + * Implements CoAP resource handling. * */ class Resource : public otCoapResource, public LinkedListEntry @@ -147,7 +147,7 @@ class Resource : public otCoapResource, public LinkedListEntry public: /** - * This constructor initializes the resource. + * Initializes the resource. * * @param[in] aUriPath A pointer to a null-terminated string for the URI path. * @param[in] aHandler A function pointer that is called when receiving a CoAP message for @p aUriPath. @@ -157,7 +157,7 @@ public: Resource(const char *aUriPath, RequestHandler aHandler, void *aContext); /** - * This constructor initializes the resource. + * Initializes the resource. * * @param[in] aUri A Thread URI. * @param[in] aHandler A function pointer that is called when receiving a CoAP message for the URI. @@ -167,7 +167,7 @@ public: Resource(Uri aUri, RequestHandler aHandler, void *aContext); /** - * This method returns a pointer to the URI path. + * Returns a pointer to the URI path. * * @returns A pointer to the URI path. * @@ -183,7 +183,7 @@ protected: #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This class implements CoAP block-wise resource handling. + * Implements CoAP block-wise resource handling. * */ class ResourceBlockWise : public otCoapBlockwiseResource @@ -192,7 +192,7 @@ class ResourceBlockWise : public otCoapBlockwiseResource public: /** - * This constructor initializes the resource. + * Initializes the resource. * * @param[in] aUriPath A pointer to a NULL-terminated string for the Uri-Path. * @param[in] aHandler A function pointer that is called when receiving a CoAP message for @p aUriPath. @@ -231,7 +231,7 @@ public: } /** - * This method gets the next entry in the linked list. + * Gets the next entry in the linked list. * * @returns A pointer to the next entry in the linked list or `nullptr` if at the end of the list. * @@ -242,7 +242,7 @@ public: } /** - * This method gets the next entry in the linked list. + * Gets the next entry in the linked list. * * @returns A pointer to the next entry in the linked list or `nullptr` if at the end of the list. * @@ -253,7 +253,7 @@ public: } /** - * This method sets the next pointer on the entry. + * Sets the next pointer on the entry. * * @param[in] aNext A pointer to the next entry. * @@ -261,7 +261,7 @@ public: void SetNext(ResourceBlockWise *aNext) { static_cast(this)->mNext = aNext; } /** - * This method returns a pointer to the URI path. + * Returns a pointer to the URI path. * * @returns A pointer to the URI path. * @@ -277,7 +277,7 @@ protected: #endif /** - * This class caches CoAP responses to implement message deduplication. + * Caches CoAP responses to implement message deduplication. * */ class ResponsesQueue @@ -292,7 +292,7 @@ public: explicit ResponsesQueue(Instance &aInstance); /** - * This method adds a given response to the cache. + * Adds a given response to the cache. * * If matching response (the same Message ID, source endpoint address and port) exists in the cache given * response is not added. @@ -307,13 +307,13 @@ public: void EnqueueResponse(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, const TxParameters &aTxParameters); /** - * This method removes all responses from the cache. + * Removes all responses from the cache. * */ void DequeueAllResponses(void); /** - * This method gets a copy of CoAP response from the cache that matches a given Message ID and source endpoint. + * Gets a copy of CoAP response from the cache that matches a given Message ID and source endpoint. * * @param[in] aRequest The CoAP message containing Message ID. * @param[in] aMessageInfo The message info containing source endpoint address and port. @@ -327,7 +327,7 @@ public: Error GetMatchedResponseCopy(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo, Message **aResponse); /** - * This method gets a reference to the cached CoAP responses queue. + * Gets a reference to the cached CoAP responses queue. * * @returns A reference to the cached CoAP responses queue. * @@ -358,7 +358,7 @@ private: }; /** - * This class implements the CoAP client and server. + * Implements the CoAP client and server. * */ class CoapBase : public InstanceLocator, private NonCopyable @@ -371,7 +371,7 @@ public: #endif /** - * This function pointer is called before CoAP server processing a CoAP message. + * Pointer is called before CoAP server processing a CoAP message. * * @param[in] aMessage A reference to the message. @ @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -385,13 +385,13 @@ public: typedef Error (*Interceptor)(const Message &aMessage, const Ip6::MessageInfo &aMessageInfo, void *aContext); /** - * This method clears requests and responses used by this CoAP agent. + * Clears requests and responses used by this CoAP agent. * */ void ClearRequestsAndResponses(void); /** - * This method clears requests with specified source address used by this CoAP agent. + * Clears requests with specified source address used by this CoAP agent. * * @param[in] aAddress A reference to the specified address. * @@ -401,7 +401,7 @@ public: #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method adds a block-wise resource to the CoAP server. + * Adds a block-wise resource to the CoAP server. * * @param[in] aResource A reference to the resource. * @@ -409,7 +409,7 @@ public: void AddBlockWiseResource(ResourceBlockWise &aResource); /** - * This method removes a block-wise resource from the CoAP server. + * Removes a block-wise resource from the CoAP server. * * @param[in] aResource A reference to the resource. * @@ -418,7 +418,7 @@ public: #endif /** - * This method adds a resource to the CoAP server. + * Adds a resource to the CoAP server. * * @param[in] aResource A reference to the resource. * @@ -426,14 +426,14 @@ public: void AddResource(Resource &aResource); /** - * This method removes a resource from the CoAP server. + * Removes a resource from the CoAP server. * * @param[in] aResource A reference to the resource. * */ void RemoveResource(Resource &aResource); - /* This method sets the default handler for unhandled CoAP requests. + /* Sets the default handler for unhandled CoAP requests. * * @param[in] aHandler A function pointer that shall be called when an unhandled request arrives. * @param[in] aContext A pointer to arbitrary context information. May be `nullptr` if not used. @@ -442,7 +442,7 @@ public: void SetDefaultHandler(RequestHandler aHandler, void *aContext) { mDefaultHandler.Set(aHandler, aContext); } /** - * This method allocates a new message with a CoAP header. + * Allocates a new message with a CoAP header. * * @param[in] aSettings The message settings. * @@ -452,7 +452,7 @@ public: Message *NewMessage(const Message::Settings &aSettings); /** - * This method allocates a new message with a CoAP header with default settings. + * Allocates a new message with a CoAP header with default settings. * * @returns A pointer to the message or `nullptr` if failed to allocate message. * @@ -460,7 +460,7 @@ public: Message *NewMessage(void); /** - * This method allocates a new message with a CoAP header that has Network Control priority level. + * Allocates a new message with a CoAP header that has Network Control priority level. * * @returns A pointer to the message or `nullptr` if failed to allocate message. * @@ -468,7 +468,7 @@ public: Message *NewPriorityMessage(void); /** - * This method allocates and initializes a new CoAP Confirmable Post message with Network Control priority level. + * Allocates and initializes a new CoAP Confirmable Post message with Network Control priority level. * * The CoAP header is initialized as `kTypeConfirmable` and `kCodePost` with a given URI path and a randomly * generated token (of default length). This method also sets the payload marker (`SetPayloadMarker()` on message. @@ -483,7 +483,7 @@ public: Message *NewPriorityConfirmablePostMessage(Uri aUri); /** - * This method allocates and initializes a new CoAP Confirmable Post message with normal priority level. + * Allocates and initializes a new CoAP Confirmable Post message with normal priority level. * * The CoAP header is initialized as `kTypeConfirmable` and `kCodePost` with a given URI and a randomly * generated token (of default length). This method also sets the payload marker (calling `SetPayloadMarker()`). @@ -498,7 +498,7 @@ public: Message *NewConfirmablePostMessage(Uri aUri); /** - * This method allocates and initializes a new CoAP Non-confirmable Post message with Network Control priority + * Allocates and initializes a new CoAP Non-confirmable Post message with Network Control priority * level. * * The CoAP header is initialized as `kTypeNonConfirmable` and `kCodePost` with a given URI and a randomly @@ -514,7 +514,7 @@ public: Message *NewPriorityNonConfirmablePostMessage(Uri aUri); /** - * This method allocates and initializes a new CoAP Non-confirmable Post message with normal priority level. + * Allocates and initializes a new CoAP Non-confirmable Post message with normal priority level. * * The CoAP header is initialized as `kTypeNonConfirmable` and `kCodePost` with a given URI and a randomly * generated token (of default length). This method also sets the payload marker (calling `SetPayloadMarker()`). @@ -529,7 +529,7 @@ public: Message *NewNonConfirmablePostMessage(Uri aUri); /** - * This method allocates and initializes a new CoAP response message with Network Control priority level for a + * Allocates and initializes a new CoAP response message with Network Control priority level for a * given request message. * * The CoAP header is initialized as `kTypeAck` with `kCodeChanged`. The token and message ID is copied from @@ -543,7 +543,7 @@ public: Message *NewPriorityResponseMessage(const Message &aRequest); /** - * This method allocates and initializes a new CoAP response message with regular priority level for a given + * Allocates and initializes a new CoAP response message with regular priority level for a given * request message. * * The CoAP header is initialized as `kTypeAck` with `kCodeChanged`. The token and message ID is copied from @@ -558,7 +558,7 @@ public: #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method sends a CoAP message block-wise with custom transmission parameters. + * Sends a CoAP message block-wise with custom transmission parameters. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be NULL pointers. @@ -586,7 +586,7 @@ public: #else // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method sends a CoAP message with custom transmission parameters. + * Sends a CoAP message with custom transmission parameters. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be `nullptr` pointers. @@ -610,7 +610,7 @@ public: #endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method sends a CoAP message with custom transmission parameters. + * Sends a CoAP message with custom transmission parameters. * * If Message ID was not set in the header (equal to 0), this method will assign unique Message ID to the message. * @@ -624,7 +624,7 @@ public: */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, const TxParameters &aTxParameters); /** - * This method sends a CoAP message with default transmission parameters. + * Sends a CoAP message with default transmission parameters. * * If Message ID was not set in the header (equal to 0), this method will assign unique Message ID to the message. * @@ -643,7 +643,7 @@ public: void *aContext); /** - * This method sends a CoAP message with default transmission parameters. + * Sends a CoAP message with default transmission parameters. * * If Message ID was not set in the header (equal to 0), this method will assign unique Message ID to the message. * @@ -657,7 +657,7 @@ public: Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo); /** - * This method sends a CoAP reset message. + * Sends a CoAP reset message. * * @param[in] aRequest A reference to the CoAP Message that was used in CoAP request. * @param[in] aMessageInfo The message info corresponding to the CoAP request. @@ -670,7 +670,7 @@ public: Error SendReset(Message &aRequest, const Ip6::MessageInfo &aMessageInfo); /** - * This method sends header-only CoAP response message. + * Sends header-only CoAP response message. * * @param[in] aCode The CoAP code of this response. * @param[in] aRequest A reference to the CoAP Message that was used in CoAP request. @@ -684,7 +684,7 @@ public: Error SendHeaderResponse(Message::Code aCode, const Message &aRequest, const Ip6::MessageInfo &aMessageInfo); /** - * This method sends a CoAP ACK empty message which is used in Separate Response for confirmable requests. + * Sends a CoAP ACK empty message which is used in Separate Response for confirmable requests. * * @param[in] aRequest A reference to the CoAP Message that was used in CoAP request. * @param[in] aMessageInfo The message info corresponding to the CoAP request. @@ -697,7 +697,7 @@ public: Error SendAck(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo); /** - * This method sends a CoAP ACK message on which a dummy CoAP response is piggybacked. + * Sends a CoAP ACK message on which a dummy CoAP response is piggybacked. * * @param[in] aRequest A reference to the CoAP Message that was used in CoAP request. * @param[in] aMessageInfo The message info corresponding to the CoAP request. @@ -711,7 +711,7 @@ public: Error SendEmptyAck(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo, Code aCode); /** - * This method sends a CoAP ACK message on which a dummy CoAP response is piggybacked. + * Sends a CoAP ACK message on which a dummy CoAP response is piggybacked. * * @param[in] aRequest A reference to the CoAP Message that was used in CoAP request. * @param[in] aMessageInfo The message info corresponding to the CoAP request. @@ -724,7 +724,7 @@ public: Error SendEmptyAck(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo); /** - * This method sends a header-only CoAP message to indicate no resource matched for the request. + * Sends a header-only CoAP message to indicate no resource matched for the request. * * @param[in] aRequest A reference to the CoAP Message that was used in CoAP request. * @param[in] aMessageInfo The message info corresponding to the CoAP request. @@ -737,7 +737,7 @@ public: #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method sends a header-only CoAP message to indicate not all blocks have been sent or + * Sends a header-only CoAP message to indicate not all blocks have been sent or * were sent out of order. * * @param[in] aRequest A reference to the CoAP Message that was used in CoAP request. @@ -754,7 +754,7 @@ public: #endif /** - * This method aborts CoAP transactions associated with given handler and context. + * Aborts CoAP transactions associated with given handler and context. * * The associated response handler will be called with kErrorAbort. * @@ -768,7 +768,7 @@ public: Error AbortTransaction(ResponseHandler aHandler, void *aContext); /** - * This method sets interceptor to be called before processing a CoAP packet. + * Sets interceptor to be called before processing a CoAP packet. * * @param[in] aInterceptor A pointer to the interceptor. * @param[in] aContext A pointer to arbitrary context information. @@ -777,7 +777,7 @@ public: void SetInterceptor(Interceptor aInterceptor, void *aContext) { mInterceptor.Set(aInterceptor, aContext); } /** - * This method returns a reference to the request message list. + * Returns a reference to the request message list. * * @returns A reference to the request message list. * @@ -785,7 +785,7 @@ public: const MessageQueue &GetRequestMessages(void) const { return mPendingRequests; } /** - * This method returns a reference to the cached response list. + * Returns a reference to the cached response list. * * @returns A reference to the cached response list. * @@ -794,7 +794,7 @@ public: protected: /** - * This type defines function pointer to handle a CoAP resource. + * Defines function pointer to handle a CoAP resource. * * When processing a received request, this handler is called first with the URI path before checking the list of * added `Resource` entries to match against the URI path. @@ -814,7 +814,7 @@ protected: const Ip6::MessageInfo &aMessageInfo); /** - * This function pointer is called to send a CoAP message. + * Pointer is called to send a CoAP message. * * @param[in] aCoapBase A reference to the CoAP agent. * @param[in] aMessage A reference to the message to send. @@ -827,7 +827,7 @@ protected: typedef Error (*Sender)(CoapBase &aCoapBase, ot::Message &aMessage, const Ip6::MessageInfo &aMessageInfo); /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aSender A function pointer to send CoAP message, which SHOULD be a static @@ -837,7 +837,7 @@ protected: CoapBase(Instance &aInstance, Sender aSender); /** - * This method receives a CoAP message. + * Receives a CoAP message. * * @param[in] aMessage A reference to the received message. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -846,7 +846,7 @@ protected: void Receive(ot::Message &aMessage, const Ip6::MessageInfo &aMessageInfo); /** - * This method sets the resource handler function. + * Sets the resource handler function. * * @param[in] aResourceHandler The resource handler function pointer. * @@ -961,14 +961,14 @@ private: }; /** - * This class implements the CoAP client and server. + * Implements the CoAP client and server. * */ class Coap : public CoapBase { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -976,7 +976,7 @@ public: explicit Coap(Instance &aInstance); /** - * This method starts the CoAP service. + * Starts the CoAP service. * * @param[in] aPort The local UDP port to bind to. * @param[in] aNetifIdentifier The network interface identifier to bind. @@ -988,7 +988,7 @@ public: Error Start(uint16_t aPort, Ip6::NetifIdentifier aNetifIdentifier = Ip6::kNetifUnspecified); /** - * This method stops the CoAP service. + * Stops the CoAP service. * * @retval kErrorNone Successfully stopped the CoAP service. * @retval kErrorFailed Failed to stop CoAP agent. diff --git a/src/core/coap/coap_message.cpp b/src/core/coap/coap_message.cpp index e4ef99088..72fb6148e 100644 --- a/src/core/coap/coap_message.cpp +++ b/src/core/coap/coap_message.cpp @@ -106,7 +106,7 @@ void Message::Finish(void) uint8_t Message::WriteExtendedOptionField(uint16_t aValue, uint8_t *&aBuffer) { /* - * This method encodes a CoAP Option header field (Option Delta/Length) per + * Encodes a CoAP Option header field (Option Delta/Length) per * RFC 7252. The returned value is a 4-bit unsigned integer. Extended fields * (if needed) are written into the given buffer `aBuffer` and the pointer * would also be updated. diff --git a/src/core/coap/coap_message.hpp b/src/core/coap/coap_message.hpp index 40c9c9785..f7910663b 100644 --- a/src/core/coap/coap_message.hpp +++ b/src/core/coap/coap_message.hpp @@ -161,7 +161,7 @@ enum OptionNumber : uint16_t }; /** - * This class implements CoAP message generation and parsing. + * Implements CoAP message generation and parsing. * */ class Message : public ot::Message @@ -190,13 +190,13 @@ public: static constexpr uint8_t kBlockSzxBase = 4; /** - * This method initializes the CoAP header. + * Initializes the CoAP header. * */ void Init(void); /** - * This method initializes the CoAP header with specific Type and Code. + * Initializes the CoAP header with specific Type and Code. * * @param[in] aType The Type value. * @param[in] aCode The Code value. @@ -205,7 +205,7 @@ public: void Init(Type aType, Code aCode); /** - * This method initializes the CoAP header with specific Type and Code. + * Initializes the CoAP header with specific Type and Code. * * @param[in] aType The Type value. * @param[in] aCode The Code value. @@ -218,7 +218,7 @@ public: Error Init(Type aType, Code aCode, Uri aUri); /** - * This method initializes the CoAP header as `kCodePost` with a given URI Path with its type determined from a + * Initializes the CoAP header as `kCodePost` with a given URI Path with its type determined from a * given destination IPv6 address. * * @param[in] aDestination The message destination IPv6 address used to determine the CoAP type, @@ -232,16 +232,16 @@ public: Error InitAsPost(const Ip6::Address &aDestination, Uri aUri); /** - * This method writes header to the message. This must be called before sending the message. + * Writes header to the message. This must be called before sending the message. * - * This method also checks whether the payload marker is set (`SetPayloadMarker()`) but the message contains no + * Also checks whether the payload marker is set (`SetPayloadMarker()`) but the message contains no * payload, and if so it removes the payload marker from the message. * */ void Finish(void); /** - * This method returns the Version value. + * Returns the Version value. * * @returns The Version value. * @@ -252,7 +252,7 @@ public: } /** - * This method sets the Version value. + * Sets the Version value. * * @param[in] aVersion The Version value. * @@ -264,7 +264,7 @@ public: } /** - * This method returns the Type value. + * Returns the Type value. * * @returns The Type value. * @@ -272,7 +272,7 @@ public: uint8_t GetType(void) const { return (GetHelpData().mHeader.mVersionTypeToken & kTypeMask) >> kTypeOffset; } /** - * This method sets the Type value. + * Sets the Type value. * * @param[in] aType The Type value. * @@ -284,7 +284,7 @@ public: } /** - * This method returns the Code value. + * Returns the Code value. * * @returns The Code value. * @@ -292,7 +292,7 @@ public: uint8_t GetCode(void) const { return static_cast(GetHelpData().mHeader.mCode); } /** - * This method sets the Code value. + * Sets the Code value. * * @param[in] aCode The Code value. * @@ -301,7 +301,7 @@ public: #if OPENTHREAD_CONFIG_COAP_API_ENABLE /** - * This method returns the CoAP Code as human readable string. + * Returns the CoAP Code as human readable string. * * @ returns The CoAP Code as string. * @@ -310,7 +310,7 @@ public: #endif // OPENTHREAD_CONFIG_COAP_API_ENABLE /** - * This method returns the Message ID value. + * Returns the Message ID value. * * @returns The Message ID value. * @@ -318,7 +318,7 @@ public: uint16_t GetMessageId(void) const { return HostSwap16(GetHelpData().mHeader.mMessageId); } /** - * This method sets the Message ID value. + * Sets the Message ID value. * * @param[in] aMessageId The Message ID value. * @@ -326,7 +326,7 @@ public: void SetMessageId(uint16_t aMessageId) { GetHelpData().mHeader.mMessageId = HostSwap16(aMessageId); } /** - * This method returns the Token length. + * Returns the Token length. * * @returns The Token length. * @@ -337,7 +337,7 @@ public: } /** - * This method returns a pointer to the Token value. + * Returns a pointer to the Token value. * * @returns A pointer to the Token value. * @@ -345,7 +345,7 @@ public: const uint8_t *GetToken(void) const { return GetHelpData().mHeader.mToken; } /** - * This method sets the Token value and length. + * Sets the Token value and length. * * @param[in] aToken A pointer to the Token value. * @param[in] aTokenLength The Length of @p aToken. @@ -357,7 +357,7 @@ public: Error SetToken(const uint8_t *aToken, uint8_t aTokenLength); /** - * This method sets the Token value and length by copying it from another given message. + * Sets the Token value and length by copying it from another given message. * * @param[in] aMessage The message to copy the Token from. * @@ -368,7 +368,7 @@ public: Error SetTokenFromMessage(const Message &aMessage); /** - * This method sets the Token length and randomizes its value. + * Sets the Token length and randomizes its value. * * @param[in] aTokenLength The Length of a Token to set. * @@ -379,7 +379,7 @@ public: Error GenerateRandomToken(uint8_t aTokenLength); /** - * This method checks if Tokens in two CoAP headers are equal. + * Checks if Tokens in two CoAP headers are equal. * * @param[in] aMessage A header to compare. * @@ -390,7 +390,7 @@ public: bool IsTokenEqual(const Message &aMessage) const; /** - * This method appends a CoAP option. + * Appends a CoAP option. * * @param[in] aNumber The CoAP Option number. * @param[in] aLength The CoAP Option length. @@ -404,7 +404,7 @@ public: Error AppendOption(uint16_t aNumber, uint16_t aLength, const void *aValue); /** - * This method appends an unsigned integer CoAP option as specified in RFC-7252 section-3.2 + * Appends an unsigned integer CoAP option as specified in RFC-7252 section-3.2 * * @param[in] aNumber The CoAP Option number. * @param[in] aValue The CoAP Option unsigned integer value. @@ -417,7 +417,7 @@ public: Error AppendUintOption(uint16_t aNumber, uint32_t aValue); /** - * This method appends a string CoAP option. + * Appends a string CoAP option. * * @param[in] aNumber The CoAP Option number. * @param[in] aValue The CoAP Option string value. @@ -430,7 +430,7 @@ public: Error AppendStringOption(uint16_t aNumber, const char *aValue); /** - * This method appends an Observe option. + * Appends an Observe option. * * @param[in] aObserve Observe field value. * @@ -441,7 +441,7 @@ public: Error AppendObserveOption(uint32_t aObserve) { return AppendUintOption(kOptionObserve, aObserve & kObserveMask); } /** - * This method appends a Uri-Path option. + * Appends a Uri-Path option. * * @param[in] aUriPath A pointer to a null-terminated string. * @@ -453,7 +453,7 @@ public: Error AppendUriPathOptions(const char *aUriPath); /** - * This method reads the Uri-Path options and constructs the URI path in the buffer referenced by @p `aUriPath`. + * Reads the Uri-Path options and constructs the URI path in the buffer referenced by @p `aUriPath`. * * @param[in] aUriPath A reference to the buffer for storing URI path. * NOTE: The buffer size must be `kMaxReceivedUriPath + 1`. @@ -465,7 +465,7 @@ public: Error ReadUriPathOptions(char (&aUriPath)[kMaxReceivedUriPath + 1]) const; /** - * This method appends a Block option + * Appends a Block option * * @param[in] aType Type of block option, 1 or 2. * @param[in] aNum Current block number. @@ -480,7 +480,7 @@ public: Error AppendBlockOption(BlockType aType, uint32_t aNum, bool aMore, otCoapBlockSzx aSize); /** - * This method appends a Proxy-Uri option. + * Appends a Proxy-Uri option. * * @param[in] aProxyUri A pointer to a null-terminated string. * @@ -492,7 +492,7 @@ public: Error AppendProxyUriOption(const char *aProxyUri) { return AppendStringOption(kOptionProxyUri, aProxyUri); } /** - * This method appends a Content-Format option. + * Appends a Content-Format option. * * @param[in] aContentFormat The Content Format value. * @@ -507,7 +507,7 @@ public: } /** - * This method appends a Max-Age option. + * Appends a Max-Age option. * * @param[in] aMaxAge The Max-Age value. * @@ -518,7 +518,7 @@ public: Error AppendMaxAgeOption(uint32_t aMaxAge) { return AppendUintOption(kOptionMaxAge, aMaxAge); } /** - * This method appends a single Uri-Query option. + * Appends a single Uri-Query option. * * @param[in] aUriQuery A pointer to null-terminated string, which should contain a single key=value pair. * @@ -530,7 +530,7 @@ public: #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This function reads the information contained in a Block1 or Block2 option and set it in + * Reads the information contained in a Block1 or Block2 option and set it in * the HelpData of the message. * * @param[in] aBlockType Block1 or Block2 option value. @@ -542,7 +542,7 @@ public: Error ReadBlockOptionValues(uint16_t aBlockType); /** - * This method returns the current header length of a message. + * Returns the current header length of a message. * * @returns The length of the message header. * @@ -550,7 +550,7 @@ public: uint16_t GetHeaderLength(void) const { return GetHelpData().mHeaderLength; } /** - * This method returns the block number of a CoAP block-wise transfer message. + * Returns the block number of a CoAP block-wise transfer message. * * @returns The block number. * @@ -558,7 +558,7 @@ public: uint32_t GetBlockWiseBlockNumber(void) const { return GetHelpData().mBlockWiseData.mBlockNumber; } /** - * This method checks if the More Blocks flag is set. + * Checks if the More Blocks flag is set. * * @retval TRUE More Blocks flag is set. * @retval FALSE More Blocks flag is not set. @@ -567,7 +567,7 @@ public: bool IsMoreBlocksFlagSet(void) const { return GetHelpData().mBlockWiseData.mMoreBlocks; } /** - * This method returns the block size of a CoAP block-wise transfer message. + * Returns the block size of a CoAP block-wise transfer message. * * @returns The block size. * @@ -576,7 +576,7 @@ public: #endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This function reads and reassembles the URI path string and fills it into @p aUriPath. + * Reads and reassembles the URI path string and fills it into @p aUriPath. * * @retval kErrorNone URI path string has been reassembled. * @retval kErrorNoBufs URI path string is too long. @@ -585,7 +585,7 @@ public: Error GetUriPath(char *aUriPath) const; /** - * This method adds Payload Marker indicating beginning of the payload to the CoAP header. + * Adds Payload Marker indicating beginning of the payload to the CoAP header. * * It also set offset to the start of payload. * @@ -596,7 +596,7 @@ public: Error SetPayloadMarker(void); /** - * This method returns the offset of the first CoAP option. + * Returns the offset of the first CoAP option. * * @returns The offset of the first CoAP option. * @@ -604,7 +604,7 @@ public: uint16_t GetOptionStart(void) const { return kMinHeaderLength + GetTokenLength(); } /** - * This method parses CoAP header and moves offset end of CoAP header. + * Parses CoAP header and moves offset end of CoAP header. * * @retval kErrorNone Successfully parsed CoAP header from the message. * @retval kErrorParse Failed to parse the CoAP header. @@ -613,7 +613,7 @@ public: Error ParseHeader(void); /** - * This method sets a default response header based on request header. + * Sets a default response header based on request header. * * @param[in] aRequest The request message. * @@ -626,7 +626,7 @@ public: #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method sets the block number value in the message HelpData. + * Sets the block number value in the message HelpData. * * @param[in] aBlockNumber Block number value to set. * @@ -634,7 +634,7 @@ public: void SetBlockWiseBlockNumber(uint32_t aBlockNumber) { GetHelpData().mBlockWiseData.mBlockNumber = aBlockNumber; } /** - * This method sets the More Blocks flag in the message HelpData. + * Sets the More Blocks flag in the message HelpData. * * @param[in] aMoreBlocks TRUE or FALSE. * @@ -642,7 +642,7 @@ public: void SetMoreBlocksFlag(bool aMoreBlocks) { GetHelpData().mBlockWiseData.mMoreBlocks = aMoreBlocks; } /** - * This method sets the block size value in the message HelpData. + * Sets the block size value in the message HelpData. * * @param[in] aBlockSize Block size value to set. * @@ -651,7 +651,7 @@ public: #endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method checks if a header is an empty message header. + * Checks if a header is an empty message header. * * @retval TRUE Message is an empty message header. * @retval FALSE Message is not an empty message header. @@ -660,7 +660,7 @@ public: bool IsEmpty(void) const { return (GetCode() == kCodeEmpty); } /** - * This method checks if a header is a request header. + * Checks if a header is a request header. * * @retval TRUE Message is a request header. * @retval FALSE Message is not a request header. @@ -669,7 +669,7 @@ public: bool IsRequest(void) const { return (GetCode() >= kCodeGet) && (GetCode() <= kCodeDelete); } /** - * This method indicates whether or not the CoAP code in header is "Get" request. + * Indicates whether or not the CoAP code in header is "Get" request. * * @retval TRUE Message is a Get request. * @retval FALSE Message is not a Get request. @@ -678,7 +678,7 @@ public: bool IsGetRequest(void) const { return GetCode() == kCodeGet; } /** - * This method indicates whether or not the CoAP code in header is "Post" request. + * Indicates whether or not the CoAP code in header is "Post" request. * * @retval TRUE Message is a Post request. * @retval FALSE Message is not a Post request. @@ -687,7 +687,7 @@ public: bool IsPostRequest(void) const { return GetCode() == kCodePost; } /** - * This method indicates whether or not the CoAP code in header is "Put" request. + * Indicates whether or not the CoAP code in header is "Put" request. * * @retval TRUE Message is a Put request. * @retval FALSE Message is not a Put request. @@ -696,7 +696,7 @@ public: bool IsPutRequest(void) const { return GetCode() == kCodePut; } /** - * This method indicates whether or not the CoAP code in header is "Delete" request. + * Indicates whether or not the CoAP code in header is "Delete" request. * * @retval TRUE Message is a Delete request. * @retval FALSE Message is not a Delete request. @@ -705,7 +705,7 @@ public: bool IsDeleteRequest(void) const { return GetCode() == kCodeDelete; } /** - * This method checks if a header is a response header. + * Checks if a header is a response header. * * @retval TRUE Message is a response header. * @retval FALSE Message is not a response header. @@ -714,7 +714,7 @@ public: bool IsResponse(void) const { return GetCode() >= OT_COAP_CODE_RESPONSE_MIN; } /** - * This method checks if a header is a CON message header. + * Checks if a header is a CON message header. * * @retval TRUE Message is a CON message header. * @retval FALSE Message is not is a CON message header. @@ -723,7 +723,7 @@ public: bool IsConfirmable(void) const { return (GetType() == kTypeConfirmable); } /** - * This method checks if a header is a NON message header. + * Checks if a header is a NON message header. * * @retval TRUE Message is a NON message header. * @retval FALSE Message is not is a NON message header. @@ -732,7 +732,7 @@ public: bool IsNonConfirmable(void) const { return (GetType() == kTypeNonConfirmable); } /** - * This method checks if a header is a ACK message header. + * Checks if a header is a ACK message header. * * @retval TRUE Message is a ACK message header. * @retval FALSE Message is not is a ACK message header. @@ -741,7 +741,7 @@ public: bool IsAck(void) const { return (GetType() == kTypeAck); } /** - * This method checks if a header is a RST message header. + * Checks if a header is a RST message header. * * @retval TRUE Message is a RST message header. * @retval FALSE Message is not is a RST message header. @@ -750,7 +750,7 @@ public: bool IsReset(void) const { return (GetType() == kTypeReset); } /** - * This method indicates whether or not the header is a confirmable Put request (i.e, `kTypeConfirmable` with + * Indicates whether or not the header is a confirmable Put request (i.e, `kTypeConfirmable` with * `kCodePost`). * * @retval TRUE Message is a confirmable Post request. @@ -760,7 +760,7 @@ public: bool IsConfirmablePostRequest(void) const; /** - * This method indicates whether or not the header is a non-confirmable Put request (i.e, `kTypeNonConfirmable` with + * Indicates whether or not the header is a non-confirmable Put request (i.e, `kTypeNonConfirmable` with * `kCodePost`). * * @retval TRUE Message is a non-confirmable Post request. @@ -770,7 +770,7 @@ public: bool IsNonConfirmablePostRequest(void) const; /** - * This method creates a copy of this CoAP message. + * Creates a copy of this CoAP message. * * It allocates the new message from the same message pool as the original one and copies @p aLength octets * of the payload. The `Type`, `SubType`, `LinkSecurity`, `Offset`, `InterfaceId`, and `Priority` fields on the @@ -784,7 +784,7 @@ public: Message *Clone(uint16_t aLength) const; /** - * This method creates a copy of the message. + * Creates a copy of the message. * * It allocates the new message from the same message pool as the original one and copies the entire payload. The * `Type`, `SubType`, `LinkSecurity`, `Offset`, `InterfaceId`, and `Priority` fields on the cloned message are also @@ -796,15 +796,15 @@ public: Message *Clone(void) const { return Clone(GetLength()); } /** - * This method returns the minimal reserved bytes required for CoAP message. + * Returns the minimal reserved bytes required for CoAP message. * */ static uint16_t GetHelpDataReserved(void) { return sizeof(HelpData) + kHelpDataAlignment; } /** - * This method returns a pointer to the next message after this as a `Coap::Message`. + * Returns a pointer to the next message after this as a `Coap::Message`. * - * This method should be used when the message is in a `Coap::MessageQueue` (i.e., a queue containing only CoAP + * Should be used when the message is in a `Coap::MessageQueue` (i.e., a queue containing only CoAP * messages). * * @returns A pointer to the next message in the queue or `nullptr` if at the end of the queue. @@ -813,9 +813,9 @@ public: Message *GetNextCoapMessage(void) { return static_cast(GetNext()); } /** - * This method returns a pointer to the next message after this as a `Coap::Message`. + * Returns a pointer to the next message after this as a `Coap::Message`. * - * This method should be used when the message is in a `Coap::MessageQueue` (i.e., a queue containing only CoAP + * Should be used when the message is in a `Coap::MessageQueue` (i.e., a queue containing only CoAP * messages). * * @returns A pointer to the next message in the queue or `nullptr` if at the end of the queue. @@ -896,7 +896,7 @@ private: #endif /** - * This structure represents a CoAP header excluding CoAP options. + * Represents a CoAP header excluding CoAP options. * */ OT_TOOL_PACKED_BEGIN @@ -909,7 +909,7 @@ private: } OT_TOOL_PACKED_END; /** - * This structure represents a HelpData used by this CoAP message. + * Represents a HelpData used by this CoAP message. * */ struct HelpData : public Clearable @@ -971,20 +971,20 @@ private: }; /** - * This class implements a CoAP message queue. + * Implements a CoAP message queue. * */ class MessageQueue : public ot::MessageQueue { public: /** - * This constructor initializes the message queue. + * Initializes the message queue. * */ MessageQueue(void) = default; /** - * This method returns a pointer to the first message. + * Returns a pointer to the first message. * * @returns A pointer to the first message. * @@ -992,7 +992,7 @@ public: Message *GetHead(void) { return static_cast(ot::MessageQueue::GetHead()); } /** - * This method returns a pointer to the first message. + * Returns a pointer to the first message. * * @returns A pointer to the first message. * @@ -1000,7 +1000,7 @@ public: const Message *GetHead(void) const { return static_cast(ot::MessageQueue::GetHead()); } /** - * This method adds a message to the end of the queue. + * Adds a message to the end of the queue. * * @param[in] aMessage The message to add. * @@ -1008,7 +1008,7 @@ public: void Enqueue(Message &aMessage) { Enqueue(aMessage, kQueuePositionTail); } /** - * This method adds a message at a given position (head/tail) of the queue. + * Adds a message at a given position (head/tail) of the queue. * * @param[in] aMessage The message to add. * @param[in] aPosition The position (head or tail) where to add the message. @@ -1017,7 +1017,7 @@ public: void Enqueue(Message &aMessage, QueuePosition aPosition) { ot::MessageQueue::Enqueue(aMessage, aPosition); } /** - * This method removes a message from the queue. + * Removes a message from the queue. * * @param[in] aMessage The message to remove. * @@ -1025,7 +1025,7 @@ public: void Dequeue(Message &aMessage) { ot::MessageQueue::Dequeue(aMessage); } /** - * This method removes a message from the queue and frees it. + * Removes a message from the queue and frees it. * * @param[in] aMessage The message to remove and free. * @@ -1045,21 +1045,21 @@ public: }; /** - * This class represents a CoAP option. + * Represents a CoAP option. * */ class Option : public otCoapOption { public: /** - * This class represents an iterator for CoAP options. + * Represents an iterator for CoAP options. * */ class Iterator : public otCoapOptionIterator { public: /** - * This method initializes the iterator to iterate over CoAP Options in a CoAP message. + * Initializes the iterator to iterate over CoAP Options in a CoAP message. * * The iterator MUST be initialized before any other methods are used, otherwise its behavior is undefined. * @@ -1075,7 +1075,7 @@ public: Error Init(const Message &aMessage); /** - * This method initializes the iterator to iterate over CoAP Options in a CoAP message matching a given Option + * Initializes the iterator to iterate over CoAP Options in a CoAP message matching a given Option * Number value. * * The iterator MUST be initialized before any other methods are used, otherwise its behavior is undefined. @@ -1094,7 +1094,7 @@ public: Error Init(const Message &aMessage, uint16_t aNumber) { return InitOrAdvance(&aMessage, aNumber); } /** - * This method indicates whether or not the iterator is done (i.e., has reached the end of CoAP Option Header). + * Indicates whether or not the iterator is done (i.e., has reached the end of CoAP Option Header). * * @retval TRUE Iterator is done (reached end of Option header). * @retval FALSE Iterator is not done and currently pointing to a CoAP Option. @@ -1103,7 +1103,7 @@ public: bool IsDone(void) const { return mOption.mLength == kIteratorDoneLength; } /** - * This method indicates whether or not there was a earlier parse error (i.e., whether the iterator is valid). + * Indicates whether or not there was a earlier parse error (i.e., whether the iterator is valid). * * After a parse errors, iterator would also be marked as done. * @@ -1114,7 +1114,7 @@ public: bool HasParseErrored(void) const { return mNextOptionOffset == kNextOptionOffsetParseError; } /** - * This method advances the iterator to the next CoAP Option in the header. + * Advances the iterator to the next CoAP Option in the header. * * The iterator is updated to point to the next option or marked as done when there are no more options. * @@ -1125,7 +1125,7 @@ public: Error Advance(void); /** - * This method advances the iterator to the next CoAP Option in the header matching a given Option Number value. + * Advances the iterator to the next CoAP Option in the header matching a given Option Number value. * * The iterator is updated to point to the next matching option or marked as done when there are no more * matching options. @@ -1139,7 +1139,7 @@ public: Error Advance(uint16_t aNumber) { return InitOrAdvance(nullptr, aNumber); } /** - * This method gets the CoAP message associated with the iterator. + * Gets the CoAP message associated with the iterator. * * @returns A reference to the CoAP message. * @@ -1147,7 +1147,7 @@ public: const Message &GetMessage(void) const { return *static_cast(mMessage); } /** - * This methods gets a pointer to the current CoAP Option to which the iterator is currently pointing. + * Gets a pointer to the current CoAP Option to which the iterator is currently pointing. * * @returns A pointer to the current CoAP Option, or `nullptr` if iterator is done (or there was an earlier * parse error). @@ -1156,7 +1156,7 @@ public: const Option *GetOption(void) const { return IsDone() ? nullptr : static_cast(&mOption); } /** - * This method reads the current Option Value into a given buffer. + * Reads the current Option Value into a given buffer. * * @param[out] aValue The pointer to a buffer to copy the Option Value. The buffer is assumed to be * sufficiently large (i.e. at least `GetOption()->GetLength()` bytes). @@ -1168,7 +1168,7 @@ public: Error ReadOptionValue(void *aValue) const; /** - * This method read the current Option Value which is assumed to be an unsigned integer. + * Read the current Option Value which is assumed to be an unsigned integer. * * @param[out] aUintValue A reference to `uint64_t` to output the read Option Value. * @@ -1180,9 +1180,9 @@ public: Error ReadOptionValue(uint64_t &aUintValue) const; /** - * This method gets the offset of beginning of the CoAP message payload (after the CoAP header). + * Gets the offset of beginning of the CoAP message payload (after the CoAP header). * - * This method MUST be used after the iterator is done (i.e. iterated through all options). + * MUST be used after the iterator is done (i.e. iterated through all options). * * @returns The offset of beginning of the CoAP message payload * @@ -1205,7 +1205,7 @@ public: }; /** - * This method gets the CoAP Option Number. + * Gets the CoAP Option Number. * * @returns The CoAP Option Number. * @@ -1213,7 +1213,7 @@ public: uint16_t GetNumber(void) const { return mNumber; } /** - * This method gets the CoAP Option Length (length of Option Value in bytes). + * Gets the CoAP Option Length (length of Option Value in bytes). * * @returns The CoAP Option Length (in bytes). * @@ -1234,7 +1234,7 @@ DefineMapEnum(otCoapType, Coap::Type); DefineMapEnum(otCoapCode, Coap::Code); /** - * This method casts an `otMessage` pointer to a `Coap::Message` reference. + * Casts an `otMessage` pointer to a `Coap::Message` reference. * * @param[in] aMessage A pointer to an `otMessage`. * @@ -1244,7 +1244,7 @@ DefineMapEnum(otCoapCode, Coap::Code); inline Coap::Message &AsCoapMessage(otMessage *aMessage) { return *static_cast(aMessage); } /** - * This method casts an `otMessage` pointer to a `Coap::Message` reference. + * Casts an `otMessage` pointer to a `Coap::Message` reference. * * @param[in] aMessage A pointer to an `otMessage`. * @@ -1254,7 +1254,7 @@ inline Coap::Message &AsCoapMessage(otMessage *aMessage) { return *static_cast(aMessage); } /** - * This method casts an `otMessage` pointer to a `Coap::Message` pointer. + * Casts an `otMessage` pointer to a `Coap::Message` pointer. * * @param[in] aMessage A pointer to an `otMessage`. * @@ -1267,7 +1267,7 @@ inline const Coap::Message &AsCoapMessage(const otMessage *aMessage) } /** - * This method casts an `otMessage` pointer to a `Coap::Message` reference. + * Casts an `otMessage` pointer to a `Coap::Message` reference. * * @param[in] aMessage A pointer to an `otMessage`. * diff --git a/src/core/coap/coap_secure.hpp b/src/core/coap/coap_secure.hpp index 43b2d02ee..b24e7d0fb 100644 --- a/src/core/coap/coap_secure.hpp +++ b/src/core/coap/coap_secure.hpp @@ -53,7 +53,7 @@ class CoapSecure : public CoapBase { public: /** - * This function pointer is called once DTLS connection is established. + * Pointer is called once DTLS connection is established. * * @param[in] aConnected TRUE if a connection was established, FALSE otherwise. * @param[in] aContext A pointer to arbitrary context information. @@ -62,7 +62,7 @@ public: typedef void (*ConnectedCallback)(bool aConnected, void *aContext); /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aLayerTwoSecurity Specifies whether to use layer two security or not. @@ -71,7 +71,7 @@ public: explicit CoapSecure(Instance &aInstance, bool aLayerTwoSecurity = false); /** - * This method starts the secure CoAP agent. + * Starts the secure CoAP agent. * * @param[in] aPort The local UDP port to bind to. * @@ -82,7 +82,7 @@ public: Error Start(uint16_t aPort); /** - * This method starts the secure CoAP agent, but do not use socket to transmit/receive messages. + * Starts the secure CoAP agent, but do not use socket to transmit/receive messages. * * @param[in] aCallback A pointer to a function for sending messages. * @param[in] aContext A pointer to arbitrary context information. @@ -94,7 +94,7 @@ public: Error Start(MeshCoP::Dtls::TransportCallback aCallback, void *aContext); /** - * This method sets connected callback of this secure CoAP agent. + * Sets connected callback of this secure CoAP agent. * * @param[in] aCallback A pointer to a function to get called when connection state changes. * @param[in] aContext A pointer to arbitrary context information. @@ -106,13 +106,13 @@ public: } /** - * This method stops the secure CoAP agent. + * Stops the secure CoAP agent. * */ void Stop(void); /** - * This method initializes DTLS session with a peer. + * Initializes DTLS session with a peer. * * @param[in] aSockAddr A reference to the remote socket address, * @param[in] aCallback A pointer to a function that will be called once DTLS connection is @@ -124,7 +124,7 @@ public: Error Connect(const Ip6::SockAddr &aSockAddr, ConnectedCallback aCallback, void *aContext); /** - * This method indicates whether or not the DTLS session is active. + * Indicates whether or not the DTLS session is active. * * @retval TRUE If DTLS session is active. * @retval FALSE If DTLS session is not active. @@ -133,7 +133,7 @@ public: bool IsConnectionActive(void) const { return mDtls.IsConnectionActive(); } /** - * This method indicates whether or not the DTLS session is connected. + * Indicates whether or not the DTLS session is connected. * * @retval TRUE The DTLS session is connected. * @retval FALSE The DTLS session is not connected. @@ -142,13 +142,13 @@ public: bool IsConnected(void) const { return mDtls.IsConnected(); } /** - * This method stops the DTLS connection. + * Stops the DTLS connection. * */ void Disconnect(void) { mDtls.Disconnect(); } /** - * This method returns a reference to the DTLS object. + * Returns a reference to the DTLS object. * * @returns A reference to the DTLS object. * @@ -156,7 +156,7 @@ public: MeshCoP::Dtls &GetDtls(void) { return mDtls; } /** - * This method gets the UDP port of this agent. + * Gets the UDP port of this agent. * * @returns UDP port number. * @@ -164,7 +164,7 @@ public: uint16_t GetUdpPort(void) const { return mDtls.GetUdpPort(); } /** - * This method sets the PSK. + * Sets the PSK. * * @param[in] aPsk A pointer to the PSK. * @param[in] aPskLength The PSK length. @@ -176,7 +176,7 @@ public: Error SetPsk(const uint8_t *aPsk, uint8_t aPskLength) { return mDtls.SetPsk(aPsk, aPskLength); } /** - * This method sets the PSK. + * Sets the PSK. * * @param[in] aPskd A Joiner PSKd. * @@ -187,7 +187,7 @@ public: #ifdef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED /** - * This method sets the Pre-Shared Key (PSK) for DTLS sessions identified by a PSK. + * Sets the Pre-Shared Key (PSK) for DTLS sessions identified by a PSK. * * DTLS mode "TLS with AES 128 CCM 8" for Application CoAPS. * @@ -205,7 +205,7 @@ public: #ifdef MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED /** - * This method sets a X509 certificate with corresponding private key for DTLS session. + * Sets a X509 certificate with corresponding private key for DTLS session. * * DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS. * @@ -224,7 +224,7 @@ public: } /** - * This method sets the trusted top level CAs. It is needed for validate the certificate of the peer. + * Sets the trusted top level CAs. It is needed for validate the certificate of the peer. * * DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS. * @@ -240,7 +240,7 @@ public: #if defined(MBEDTLS_BASE64_C) && defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE) /** - * This method returns the peer x509 certificate base64 encoded. + * Returns the peer x509 certificate base64 encoded. * * DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS. * @@ -259,7 +259,7 @@ public: #endif // defined(MBEDTLS_BASE64_C) && defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE) /** - * This method sets the connected callback to indicate, when a Client connect to the CoAP Secure server. + * Sets the connected callback to indicate, when a Client connect to the CoAP Secure server. * * @param[in] aCallback A pointer to a function that will be called once DTLS connection is established. * @param[in] aContext A pointer to arbitrary context information. @@ -271,7 +271,7 @@ public: } /** - * This method sets the authentication mode for the CoAP secure connection. It disables or enables the verification + * Sets the authentication mode for the CoAP secure connection. It disables or enables the verification * of peer certificate. * * @param[in] aVerifyPeerCertificate true, if the peer certificate should be verified @@ -283,7 +283,7 @@ public: #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method sends a CoAP message over secure DTLS connection. + * Sends a CoAP message over secure DTLS connection. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be NULL pointers. @@ -307,7 +307,7 @@ public: otCoapBlockwiseReceiveHook aReceiveHook = nullptr); /** - * This method sends a CoAP message over secure DTLS connection. + * Sends a CoAP message over secure DTLS connection. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be NULL pointers. @@ -333,7 +333,7 @@ public: otCoapBlockwiseReceiveHook aReceiveHook = nullptr); #else // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method sends a CoAP message over secure DTLS connection. + * Sends a CoAP message over secure DTLS connection. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be nullptr pointers. @@ -351,7 +351,7 @@ public: Error SendMessage(Message &aMessage, ResponseHandler aHandler = nullptr, void *aContext = nullptr); /** - * This method sends a CoAP message over secure DTLS connection. + * Sends a CoAP message over secure DTLS connection. * * If a response for a request is expected, respective function and context information should be provided. * If no response is expected, these arguments should be nullptr pointers. @@ -374,7 +374,7 @@ public: #endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** - * This method is used to pass UDP messages to the secure CoAP server. + * Is used to pass UDP messages to the secure CoAP server. * * @param[in] aMessage A reference to the received message. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -386,7 +386,7 @@ public: } /** - * This method returns the DTLS session's peer address. + * Returns the DTLS session's peer address. * * @return DTLS session's message info. * diff --git a/src/core/common/appender.hpp b/src/core/common/appender.hpp index 5260ba835..8cff1b5f4 100644 --- a/src/core/common/appender.hpp +++ b/src/core/common/appender.hpp @@ -48,14 +48,14 @@ namespace ot { * The `Appender` class acts as a wrapper over either a `Message` or a data buffer and provides different flavors of * `Append()` method. * - * This class helps in construction of message content where the destination can be either a `Message` or a buffer. + * Helps in construction of message content where the destination can be either a `Message` or a buffer. * */ class Appender { public: /** - * This enumeration represent the `Appender` Type (whether appending to a `Message` or data buffer). + * Represent the `Appender` Type (whether appending to a `Message` or data buffer). * */ enum Type : uint8_t @@ -65,7 +65,7 @@ public: }; /** - * This constructor initializes the `Appender` to append to a `Message`. + * Initializes the `Appender` to append to a `Message`. * * New content is appended to the end of @p aMessage, growing its length. * @@ -75,7 +75,7 @@ public: explicit Appender(Message &aMessage); /** - * This constructor initializes the `Appender` to append in a given a buffer + * Initializes the `Appender` to append in a given a buffer * * New content is append in the buffer starting from @p aBuffer up to is size @p aSize. `Appender` does not allow * content to be appended beyond the size of the buffer. @@ -87,7 +87,7 @@ public: Appender(uint8_t *aBuffer, uint16_t aSize); /** - * This method indicates the `Appender` type (whether appending to a `Message` or data buffer). + * Indicates the `Appender` type (whether appending to a `Message` or data buffer). * * @returns The type of `Appender`. * @@ -95,7 +95,7 @@ public: Type GetType(void) const { return mType; } /** - * This method appends bytes to the `Appender` object + * Appends bytes to the `Appender` object * * @param[in] aBuffer A pointer to a data buffer (MUST NOT be `nullptr`) to append. * @param[in] aLength The number of bytes to append. @@ -107,7 +107,7 @@ public: Error AppendBytes(const void *aBuffer, uint16_t aLength); /** - * This method appends an object to the end of the `Appender` object. + * Appends an object to the end of the `Appender` object. * * @tparam ObjectType The object type to append to the message. * @@ -125,9 +125,9 @@ public: } /** - * This method returns the number of bytes appended so far using `Appender` methods. + * Returns the number of bytes appended so far using `Appender` methods. * - * This method can be used independent of the `Type` of `Appender`. + * Can be used independent of the `Type` of `Appender`. * * @returns The number of byes appended so far. * @@ -135,9 +135,9 @@ public: uint16_t GetAppendedLength(void) const; /** - * This method returns the `Message` associated with `Appender`. + * Returns the `Message` associated with `Appender`. * - * This method MUST be used when `GetType() == kMessage`. Otherwise its behavior is undefined. + * MUST be used when `GetType() == kMessage`. Otherwise its behavior is undefined. * * @returns The `Message` instance associated with `Appender`. * @@ -145,9 +145,9 @@ public: Message &GetMessage(void) const { return *mShared.mMessage.mMessage; } /** - * This method returns a pointer to the start of the data buffer associated with `Appender`. + * Returns a pointer to the start of the data buffer associated with `Appender`. * - * This method MUST be used when `GetType() == kBuffer`. Otherwise its behavior is undefined. + * MUST be used when `GetType() == kBuffer`. Otherwise its behavior is undefined. * * @returns A pointer to the start of the data buffer associated with `Appender`. * @@ -155,9 +155,9 @@ public: uint8_t *GetBufferStart(void) const { return AsNonConst(mShared.mFrameBuilder.GetBytes()); } /** - * This method gets the data buffer associated with `Appender` as a `Data`. + * Gets the data buffer associated with `Appender` as a `Data`. * - * This method MUST be used when `GetType() == kBuffer`. Otherwise its behavior is undefined. + * MUST be used when `GetType() == kBuffer`. Otherwise its behavior is undefined. * * @pram[out] aData A reference to a `Data` to output the data buffer. * diff --git a/src/core/common/arg_macros.hpp b/src/core/common/arg_macros.hpp index e832f2f30..ee54e0f0c 100644 --- a/src/core/common/arg_macros.hpp +++ b/src/core/common/arg_macros.hpp @@ -35,7 +35,7 @@ #define OT_ARG_MACROS_HPP_ /** - * This macro returns the first argument in a list of input arguments. + * Returns the first argument in a list of input arguments. * * @param[in] ... A list of arguments (MUST contain at least one). * @@ -45,7 +45,7 @@ #define OT_FIRST_ARG(...) _OT_GET_FIRST_ARG(__VA_ARGS__, JUNK) /** - * This macro returns the second argument in a list of input arguments if any. + * Returns the second argument in a list of input arguments if any. * * @note: This macro works when the list contains either one or two arguments. * @@ -57,7 +57,7 @@ #define OT_SECOND_ARG(...) _OT_GET_SECOND_ARG(_OT_HAS_ONE_ARG_OR_TWO_ARGS(__VA_ARGS__), __VA_ARGS__) /** - * This macro expands to comma separated list of arguments excluding the first one. + * Expands to comma separated list of arguments excluding the first one. * * If there is only one argument, it expands to empty. If there is more than one argument, it expands to an initial * comma followed by all the rest of arguments excluding the first one. diff --git a/src/core/common/array.hpp b/src/core/common/array.hpp index 4a65073f1..c9873e1b4 100644 --- a/src/core/common/array.hpp +++ b/src/core/common/array.hpp @@ -46,7 +46,7 @@ namespace ot { /** - * This function returns the length of a given array (number of elements in the array). + * Returns the length of a given array (number of elements in the array). * * This template function is `constexpr`. The template arguments are expected to be deduced by the compiler allowing * callers to simply use `GetArrayLength(aArray)`. @@ -63,7 +63,7 @@ template constexpr inline uint16_t GetArr } /** - * This function returns a pointer to end of a given array (pointing to the past-the-end element). + * Returns a pointer to end of a given array (pointing to the past-the-end element). * * Note that the past-the-end element is a theoretical element that would follow the last element in the array. It does * not point to an actual element in array, and thus should not be dereferenced. @@ -82,7 +82,7 @@ template inline Type *GetArrayEnd(Type (& } /** - * This function returns a pointer to end of a given array (pointing to the past-the-end element). + * Returns a pointer to end of a given array (pointing to the past-the-end element). * * Note that the past-the-end element is a theoretical element that would follow the last element in the array. It does * not point to an actual element in array, and thus should not be dereferenced. @@ -101,7 +101,7 @@ template inline const Type *GetArrayEnd(c } /** - * This template class represents an array of elements with a fixed max size. + * Represents an array of elements with a fixed max size. * * @tparam Type The array element type. * @tparam kMaxSize Specifies the max array size (maximum number of elements in the array). @@ -120,7 +120,7 @@ class Array public: /** - * This type represents the length or index in array. + * Represents the length or index in array. * * It is typically either `uint8_t` or `uint16_t` (determined based on the maximum array size (`kMaxSize`)). * @@ -128,7 +128,7 @@ public: typedef SizeType IndexType; /** - * This constructor initializes the array as empty. + * Initializes the array as empty. * */ Array(void) @@ -137,7 +137,7 @@ public: } /** - * This constructor initializes the array by copying elements from another array. + * Initializes the array by copying elements from another array. * * The method uses assignment `=` operator on `Type` to copy each element from @p aOtherArray into the elements of * the array. @@ -148,10 +148,10 @@ public: Array(const Array &aOtherArray) { *this = aOtherArray; } /** - * This constructor initializes the array as empty and initializes its elements by calling `Init(Instance &)` + * Initializes the array as empty and initializes its elements by calling `Init(Instance &)` * method on every element. * - * This constructor uses method `Init(Instance &aInstance)` on `Type`. + * Uses method `Init(Instance &aInstance)` on `Type`. * * @param[in] aInstance The OpenThread instance. * @@ -166,13 +166,13 @@ public: } /** - * This method clears the array. + * Clears the array. * */ void Clear(void) { mLength = 0; } /** - * This method indicates whether or not the array is empty. + * Indicates whether or not the array is empty. * * @retval TRUE when array is empty. * @retval FALSE when array is not empty. @@ -181,7 +181,7 @@ public: bool IsEmpty(void) const { return (mLength == 0); } /** - * This method indicates whether or not the array is full. + * Indicates whether or not the array is full. * * @retval TRUE when array is full. * @retval FALSE when array is not full. @@ -190,7 +190,7 @@ public: bool IsFull(void) const { return (mLength == GetMaxSize()); } /** - * This method returns the maximum array size (max number of elements). + * Returns the maximum array size (max number of elements). * * @returns The maximum array size (max number of elements that can be added to the array). * @@ -198,7 +198,7 @@ public: IndexType GetMaxSize(void) const { return static_cast(kMaxSize); } /** - * This method returns the current length of array (number of elements). + * Returns the current length of array (number of elements). * * @returns The current array length. * @@ -206,7 +206,7 @@ public: IndexType GetLength(void) const { return mLength; } /** - * This methods sets the current length (number of elements) of the array. + * Sets the current length (number of elements) of the array. * * @param[in] aLength The array length. * @@ -214,7 +214,7 @@ public: void SetLength(IndexType aLength) { mLength = aLength; } /** - * This method returns the pointer to the start of underlying C array buffer serving as `Array` storage. + * Returns the pointer to the start of underlying C array buffer serving as `Array` storage. * * @return The pointer to start of underlying C array buffer. * @@ -222,7 +222,7 @@ public: Type *GetArrayBuffer(void) { return mElements; } /** - * This method returns the pointer to the start of underlying C array buffer serving as `Array` storage. + * Returns the pointer to the start of underlying C array buffer serving as `Array` storage. * * @return The pointer to start of underlying C array buffer. * @@ -230,9 +230,9 @@ public: const Type *GetArrayBuffer(void) const { return mElements; } /** - * This method overloads the `[]` operator to get the element at a given index. + * Overloads the `[]` operator to get the element at a given index. * - * This method does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. + * Does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. * * @param[in] aIndex The index to get. * @@ -242,9 +242,9 @@ public: Type &operator[](IndexType aIndex) { return mElements[aIndex]; } /** - * This method overloads the `[]` operator to get the element at a given index. + * Overloads the `[]` operator to get the element at a given index. * - * This method does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. + * Does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. * * @param[in] aIndex The index to get. * @@ -254,7 +254,7 @@ public: const Type &operator[](IndexType aIndex) const { return mElements[aIndex]; } /** - * This method gets a pointer to the element at a given index. + * Gets a pointer to the element at a given index. * * Unlike `operator[]`, this method checks @p aIndex to be valid and within the current length. * @@ -266,7 +266,7 @@ public: Type *At(IndexType aIndex) { return (aIndex < mLength) ? &mElements[aIndex] : nullptr; } /** - * This method gets a pointer to the element at a given index. + * Gets a pointer to the element at a given index. * * Unlike `operator[]`, this method checks @p aIndex to be valid and within the current length. * @@ -278,7 +278,7 @@ public: const Type *At(IndexType aIndex) const { return (aIndex < mLength) ? &mElements[aIndex] : nullptr; } /** - * This method gets a pointer to the element at the front of the array (first element). + * Gets a pointer to the element at the front of the array (first element). * * @returns A pointer to the front element or `nullptr` if array is empty. * @@ -286,7 +286,7 @@ public: Type *Front(void) { return At(0); } /** - * This method gets a pointer to the element at the front of the array (first element). + * Gets a pointer to the element at the front of the array (first element). * * @returns A pointer to the front element or `nullptr` if array is empty. * @@ -294,7 +294,7 @@ public: const Type *Front(void) const { return At(0); } /** - * This method gets a pointer to the element at the back of the array (last element). + * Gets a pointer to the element at the back of the array (last element). * * @returns A pointer to the back element or `nullptr` if array is empty. * @@ -302,7 +302,7 @@ public: Type *Back(void) { return At(mLength - 1); } /** - * This method gets a pointer to the element at the back of the array (last element). + * Gets a pointer to the element at the back of the array (last element). * * @returns A pointer to the back element or `nullptr` if array is empty. * @@ -310,7 +310,7 @@ public: const Type *Back(void) const { return At(mLength - 1); } /** - * This method appends a new entry to the end of the array. + * Appends a new entry to the end of the array. * * The method uses assignment `=` operator on `Type` to copy @p aEntry into the added array element. * @@ -323,7 +323,7 @@ public: Error PushBack(const Type &aEntry) { return IsFull() ? kErrorNoBufs : (mElements[mLength++] = aEntry, kErrorNone); } /** - * This method appends a new entry to the end of the array. + * Appends a new entry to the end of the array. * * On success, this method returns a pointer to the newly appended element in the array for the caller to * initialize and use. @@ -334,7 +334,7 @@ public: Type *PushBack(void) { return IsFull() ? nullptr : &mElements[mLength++]; } /** - * This method removes the last element in the array. + * Removes the last element in the array. * * @returns A pointer to the removed element from the array, or `nullptr` if array is empty. * @@ -342,7 +342,7 @@ public: Type *PopBack(void) { return IsEmpty() ? nullptr : &mElements[--mLength]; } /** - * This method returns the index of an element in the array. + * Returns the index of an element in the array. * * The @p aElement MUST be from the array, otherwise the behavior of this method is undefined. * @@ -354,7 +354,7 @@ public: IndexType IndexOf(const Type &aElement) const { return static_cast(&aElement - &mElements[0]); } /** - * This method removes an element from the array. + * Removes an element from the array. * * The @p aElement MUST be from the array, otherwise the behavior of this method is undefined. * @@ -375,9 +375,9 @@ public: } /** - * This method finds the first match of a given entry in the array. + * Finds the first match of a given entry in the array. * - * This method uses `==` operator on `Type` to compare the array element with @p aEntry. + * Uses `==` operator on `Type` to compare the array element with @p aEntry. * * @param[in] aEntry The entry to search for within the array. * @@ -387,9 +387,9 @@ public: Type *Find(const Type &aEntry) { return AsNonConst(AsConst(this)->Find(aEntry)); } /** - * This method finds the first match of a given entry in the array. + * Finds the first match of a given entry in the array. * - * This method uses `==` operator to compare the array elements with @p aEntry. + * Uses `==` operator to compare the array elements with @p aEntry. * * @param[in] aEntry The entry to search for within the array. * @@ -413,9 +413,9 @@ public: } /** - * This method indicates whether or not a match to given entry exists in the array. + * Indicates whether or not a match to given entry exists in the array. * - * This method uses `==` operator on `Type` to compare the array elements with @p aEntry. + * Uses `==` operator on `Type` to compare the array elements with @p aEntry. * * @param[in] aEntry The entry to search for within the array. * @@ -426,7 +426,7 @@ public: bool Contains(const Type &aEntry) const { return Find(aEntry) != nullptr; } /** - * This template method finds the first element in the array matching a given indicator. + * Finds the first element in the array matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against elements * in the array. To check that an element matches the given indicator, the `Matches()` method is invoked on each @@ -445,7 +445,7 @@ public: } /** - * This template method finds the first element in the array matching a given indicator. + * Finds the first element in the array matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against elements * in the array. To check that an element matches the given indicator, the `Matches()` method is invoked on each @@ -475,7 +475,7 @@ public: } /** - * This template method indicates whether or not the array contains an element matching a given indicator. + * Indicates whether or not the array contains an element matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against elements * in the array. To check that an element matches the given indicator, the `Matches()` method is invoked on each @@ -495,9 +495,9 @@ public: } /** - * This template method removes the first element in the array matching a given indicator. + * Removes the first element in the array matching a given indicator. * - * This method behaves similar to `Remove()`, i.e., the matched element (if found) is replaced with the last element + * Behaves similar to `Remove()`, i.e., the matched element (if found) is replaced with the last element * in the array (using `=` operator on `Type`). So the order of items in the array can change after a call to this * method. * @@ -521,9 +521,9 @@ public: } /** - * This template method removes all elements in the array matching a given indicator. + * Removes all elements in the array matching a given indicator. * - * This method behaves similar to `Remove()`, i.e., a matched element is replaced with the last element in the + * Behaves similar to `Remove()`, i.e., a matched element is replaced with the last element in the * array (using `=` operator on `Type`). So the order of items in the array can change after a call to this method. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against elements @@ -557,7 +557,7 @@ public: } /** - * This method overloads assignment `=` operator to copy elements from another array into the array. + * Overloads assignment `=` operator to copy elements from another array into the array. * * The method uses assignment `=` operator on `Type` to copy each element from @p aOtherArray into the elements of * the array. @@ -578,9 +578,9 @@ public: } /** - * This method indicates whether a given entry pointer is from the array buffer. + * Indicates whether a given entry pointer is from the array buffer. * - * This method does not check the current length of array and only checks that @p aEntry is pointing to an address + * Does not check the current length of array and only checks that @p aEntry is pointing to an address * contained within underlying C array buffer. * * @param[in] aEntry A pointer to an entry to check. diff --git a/src/core/common/as_core_type.hpp b/src/core/common/as_core_type.hpp index 521cabbc4..ffe4e2931 100644 --- a/src/core/common/as_core_type.hpp +++ b/src/core/common/as_core_type.hpp @@ -41,7 +41,7 @@ namespace ot { /** - * This structure relates a given public OT type to its corresponding core C++ class/type. + * Relates a given public OT type to its corresponding core C++ class/type. * * @tparam FromType The public OT type. * @@ -54,7 +54,7 @@ namespace ot { template struct CoreType; /** - * This function converts a pointer to public OT type (C struct) to the corresponding core C++ type reference. + * Converts a pointer to public OT type (C struct) to the corresponding core C++ type reference. * * @tparam Type The public OT type to convert. * @@ -71,7 +71,7 @@ template typename CoreType::Type &AsCoreType(Type *aObject } /** - * This function converts a const pointer to public OT type (C struct) to the corresponding core C++ type reference. + * Converts a const pointer to public OT type (C struct) to the corresponding core C++ type reference. * * @tparam Type The public OT type to convert. * @@ -88,7 +88,7 @@ template const typename CoreType::Type &AsCoreType(const T } /** - * This function converts a pointer to public OT type (C struct) to the corresponding core C++ type pointer. + * Converts a pointer to public OT type (C struct) to the corresponding core C++ type pointer. * * @tparam Type The public OT type to convert. * @@ -103,7 +103,7 @@ template typename CoreType::Type *AsCoreTypePtr(Type *aObj } /** - * This function converts a const pointer to public OT type (C struct) to the corresponding core C++ type pointer. + * Converts a const pointer to public OT type (C struct) to the corresponding core C++ type pointer. * * @tparam Type The public OT type to convert. * @@ -118,7 +118,7 @@ template const typename CoreType::Type *AsCoreTypePtr(cons } /** - * This structure maps two enumeration types. + * Maps two enumeration types. * * @tparam FromEnumType The enum type. * @@ -131,7 +131,7 @@ template const typename CoreType::Type *AsCoreTypePtr(cons template struct MappedEnum; /** - * This function convert an enumeration type value to a related enumeration type value. + * Convert an enumeration type value to a related enumeration type value. * * @param[in] aValue The enumeration value to convert * diff --git a/src/core/common/binary_search.hpp b/src/core/common/binary_search.hpp index 0e05ab540..434c172c8 100644 --- a/src/core/common/binary_search.hpp +++ b/src/core/common/binary_search.hpp @@ -44,7 +44,7 @@ class BinarySearch { public: /** - * This template method performs binary search in a given sorted table array to find an entry matching a given key. + * Performs binary search in a given sorted table array to find an entry matching a given key. * * @note This method requires the array to be sorted, otherwise its behavior is undefined. * @@ -77,9 +77,9 @@ public: } /** - * This template method indicates whether a given table array is sorted based or not. + * Indicates whether a given table array is sorted based or not. * - * This method is `constexpr` and is intended for use in `static_assert`s to verify that a `constexpr` lookup table + * Is `constexpr` and is intended for use in `static_assert`s to verify that a `constexpr` lookup table * array is sorted. It is not recommended for use in other situations. * * @tparam Entry The table entry type. diff --git a/src/core/common/bit_vector.hpp b/src/core/common/bit_vector.hpp index 52b225a88..8c6962c13 100644 --- a/src/core/common/bit_vector.hpp +++ b/src/core/common/bit_vector.hpp @@ -54,7 +54,7 @@ namespace ot { */ /** - * This class represents a bit-vector. + * Represents a bit-vector. * * @tparam N Specifies the number of bits. * @@ -63,7 +63,7 @@ template class BitVector : public Equatable>, public C { public: /** - * This method indicates whether a given index is included in the mask. + * Indicates whether a given index is included in the mask. * * @param[in] aIndex The index. * @@ -78,7 +78,7 @@ public: } /** - * This method sets the mask of a given index. + * Sets the mask of a given index. * * @param[in] aIndex The index. * @param[in] aValue TRUE to set the mask, or FALSE to clear the mask. @@ -99,7 +99,7 @@ public: } /** - * This method returns if any mask is set. + * Returns if any mask is set. * * @retval TRUE If any index is set. * @retval FALSE If all indexes are clear. diff --git a/src/core/common/callback.hpp b/src/core/common/callback.hpp index 02e4cf33f..f4162203e 100644 --- a/src/core/common/callback.hpp +++ b/src/core/common/callback.hpp @@ -43,7 +43,7 @@ namespace ot { /** - * This enumeration specifies the context argument position in a callback function pointer. + * Specifies the context argument position in a callback function pointer. * */ enum CallbackContextPosition : uint8_t @@ -53,7 +53,7 @@ enum CallbackContextPosition : uint8_t }; /** - * This class is the base class for `Callback` (a function pointer handler and a `void *` context). + * Is the base class for `Callback` (a function pointer handler and a `void *` context). * * @tparam HandlerType The handler function pointer type. * @@ -62,13 +62,13 @@ template class CallbackBase { public: /** - * This method clears the `Callback` by setting the handler function pointer to `nullptr`. + * Clears the `Callback` by setting the handler function pointer to `nullptr`. * */ void Clear(void) { mHandler = nullptr; } /** - * This method sets the callback handler function pointer and its associated context. + * Sets the callback handler function pointer and its associated context. * * @param[in] aHandler The handler function pointer. * @param[in] aContext The context associated with handler. @@ -81,7 +81,7 @@ public: } /** - * This method indicates whether or not the callback is set (not `nullptr`). + * Indicates whether or not the callback is set (not `nullptr`). * * @retval TRUE The handler is set. * @retval FALSE The handler is not set. @@ -90,7 +90,7 @@ public: bool IsSet(void) const { return (mHandler != nullptr); } /** - * This method returns the handler function pointer. + * Returns the handler function pointer. * * @returns The handler function pointer. * @@ -98,7 +98,7 @@ public: HandlerType GetHandler(void) const { return mHandler; } /** - * This method returns the context associated with callback. + * Returns the context associated with callback. * * @returns The context. * @@ -106,7 +106,7 @@ public: void *GetContext(void) const { return mContext; } /** - * This method indicates whether the callback matches a given handler function pointer and context. + * Indicates whether the callback matches a given handler function pointer and context. * * @param[in] aHandler The handler function pointer to compare with. * @param[in] aContext The context associated with handler. @@ -132,7 +132,7 @@ protected: }; /** - * This class represents a `Callback` (a function pointer handler and a `void *` context). + * Represents a `Callback` (a function pointer handler and a `void *` context). * * The context is passed as one of the arguments to the function pointer handler when invoked. * @@ -168,13 +168,13 @@ public: static constexpr CallbackContextPosition kContextPosition = kContextAsLastArg; ///< Context position. /** - * This constructor initializes `Callback` as empty (`nullptr` handler function pointer). + * Initializes `Callback` as empty (`nullptr` handler function pointer). * */ Callback(void) = default; /** - * This method invokes the callback handler. + * Invokes the callback handler. * * The caller MUST ensure that callback is set (`IsSet()` returns `true`) before calling this method. * @@ -189,7 +189,7 @@ public: } /** - * This method invokes the callback handler if it is set. + * Invokes the callback handler if it is set. * * The method MUST be used when the handler function returns `void`. * diff --git a/src/core/common/clearable.hpp b/src/core/common/clearable.hpp index b47bb1960..f91c15f41 100644 --- a/src/core/common/clearable.hpp +++ b/src/core/common/clearable.hpp @@ -41,7 +41,7 @@ namespace ot { /** - * This template class defines a `Clearable` object which provides `Clear()` method. + * Defines a `Clearable` object which provides `Clear()` method. * * The `Clear` implementation simply sets all the bytes of a `Type` instance to zero. * diff --git a/src/core/common/code_utils.hpp b/src/core/common/code_utils.hpp index 379c951cd..647042a9c 100644 --- a/src/core/common/code_utils.hpp +++ b/src/core/common/code_utils.hpp @@ -41,7 +41,7 @@ #include "common/arg_macros.hpp" /** - * This macro calculates the number of elements in an array. + * Calculates the number of elements in an array. * * @param[in] aArray Name of the array variable. * @@ -51,7 +51,7 @@ #define OT_ARRAY_LENGTH(aArray) (sizeof(aArray) / sizeof(aArray[0])) /** - * This macro returns a pointer to end of a given array (pointing to the past-the-end element). + * Returns a pointer to end of a given array (pointing to the past-the-end element). * * Note that the past-the-end element is a theoretical element that would follow the last element in the array. It does * not point to an actual element in array, and thus should not be dereferenced. @@ -64,7 +64,7 @@ #define OT_ARRAY_END(aArray) (&aArray[OT_ARRAY_LENGTH(aArray)]) /** - * This macro returns a pointer aligned by @p aAlignment. + * Returns a pointer aligned by @p aAlignment. * * @param[in] aPointer A pointer to contiguous space. * @param[in] aAlignment The desired alignment. @@ -83,19 +83,19 @@ align_type name[(((size) + (sizeof(align_type) - 1)) / sizeof(align_type))] /** - * This macro returns the smaller of @p a and @p b. + * Returns the smaller of @p a and @p b. * */ #define OT_MIN(a, b) ((b) < (a) ? (b) : (a)) /** - * This macro returns the greater of @p a and @p b. + * Returns the greater of @p a and @p b. * */ #define OT_MAX(a, b) ((a) < (b) ? (b) : (a)) /** - * This macro checks for the specified status, which is expected to commonly be successful, and branches to the local + * Checks for the specified status, which is expected to commonly be successful, and branches to the local * label 'exit' if the status is unsuccessful. * * @param[in] aStatus A scalar status to be evaluated against zero (0). @@ -111,7 +111,7 @@ } while (false) /** - * This macro checks for the specified condition, which is expected to commonly be true, and both executes @a ... and + * Checks for the specified condition, which is expected to commonly be true, and both executes @a ... and * branches to the local label 'exit' if the condition is false. * * @param[in] aCondition A Boolean expression to be evaluated. @@ -129,7 +129,7 @@ } while (false) /** - * This macro unconditionally executes @a ... and branches to the local label 'exit'. + * Unconditionally executes @a ... and branches to the local label 'exit'. * * @note The use of this interface implies neither success nor failure for the overall exit status of the enclosing * function body. @@ -145,7 +145,7 @@ } while (false) /* - * This macro executes the `statement` and ignores the return value. + * Executes the `statement` and ignores the return value. * * This is primarily used to indicate the intention of developer that the return value of a function/method can be * safely ignored. @@ -162,7 +162,7 @@ } while (false) /** - * This function ignores an error explicitly. + * Ignores an error explicitly. * * This is primarily used to indicate the intention of developer that * the error can be safely ignored or there is guaranteed to be no error. diff --git a/src/core/common/const_cast.hpp b/src/core/common/const_cast.hpp index 2927df31a..e63fce812 100644 --- a/src/core/common/const_cast.hpp +++ b/src/core/common/const_cast.hpp @@ -39,7 +39,7 @@ namespace ot { /** - * This template method casts a given non-const reference to a const reference. + * Casts a given non-const reference to a const reference. * * @tparam Type The reference type. * @@ -51,7 +51,7 @@ namespace ot { template const Type &AsConst(Type &aObject) { return const_cast(aObject); } /** - * This template method casts a given non-const pointer to a const pointer. + * Casts a given non-const pointer to a const pointer. * * @tparam Type The pointer type. * @@ -63,7 +63,7 @@ template const Type &AsConst(Type &aObject) { return const_cast< template const Type *AsConst(Type *aPointer) { return const_cast(aPointer); } /** - * This template method casts a given const reference to a non-const reference. + * Casts a given const reference to a non-const reference. * * @tparam Type The reference type. * @@ -75,7 +75,7 @@ template const Type *AsConst(Type *aPointer) { return const_cast template Type &AsNonConst(const Type &aObject) { return const_cast(aObject); } /** - * This template method casts a given const pointer to a non-const pointer. + * Casts a given const pointer to a non-const pointer. * * @tparam Type The pointer type. * diff --git a/src/core/common/crc16.hpp b/src/core/common/crc16.hpp index 60f556ab3..e5a84194b 100644 --- a/src/core/common/crc16.hpp +++ b/src/core/common/crc16.hpp @@ -41,7 +41,7 @@ namespace ot { /** - * This class implements CRC16 computations. + * Implements CRC16 computations. * */ class Crc16 @@ -54,7 +54,7 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aPolynomial The polynomial value. * @@ -62,13 +62,13 @@ public: explicit Crc16(Polynomial aPolynomial); /** - * This method initializes the CRC16 computation. + * Initializes the CRC16 computation. * */ void Init(void) { mCrc = 0; } /*c* - * This method feeds a byte value into the CRC16 computation. + * Feeds a byte value into the CRC16 computation. * * @param[in] aByte The byte value. * @@ -76,7 +76,7 @@ public: void Update(uint8_t aByte); /** - * This method gets the current CRC16 value. + * Gets the current CRC16 value. * * @returns The current CRC16 value. * diff --git a/src/core/common/data.hpp b/src/core/common/data.hpp index 404e6a3f8..aa865cc14 100644 --- a/src/core/common/data.hpp +++ b/src/core/common/data.hpp @@ -50,7 +50,7 @@ namespace ot { /** - * This enumeration type is used as the template parameter in `Data` and `MutableData` to indicate the `uint` type to + * Type is used as the template parameter in `Data` and `MutableData` to indicate the `uint` type to * use for the data length. * */ @@ -61,7 +61,7 @@ enum DataLengthType : uint8_t }; /** - * This type specifies a function pointer which matches two given bytes. + * Specifies a function pointer which matches two given bytes. * * Such a function is used as a parameter in `Data::MatchesByteIn()` method. This can be used to relax the definition * of a match when comparing data bytes, e.g., can be used for case-insensitive string comparison. @@ -76,7 +76,7 @@ enum DataLengthType : uint8_t typedef bool (*ByteMatcher)(uint8_t aFirst, uint8_t aSecond); /** - * This class implements common utility methods used by `Data` and `MutableData`. + * Implements common utility methods used by `Data` and `MutableData`. * */ class DataUtils @@ -92,7 +92,7 @@ protected: template class MutableData; /** - * This type represents a generic `Data` which is simply a wrapper over a pointer to a buffer with a given data length. + * Represents a generic `Data` which is simply a wrapper over a pointer to a buffer with a given data length. * * The data length can be either `uint8_t` or `uint16_t` (determined by the template parameter `kDataLengthType`). * @@ -112,13 +112,13 @@ class Data : public Clearable>, public Unequatable::Type; /** - * This method initializes the `Data` to point to a given buffer with a given length. + * Initializes the `Data` to point to a given buffer with a given length. * * @param[in] aBuffer A pointer to a buffer containing the data. * @param[in] aLength The data length (number of bytes in @p aBuffer) @@ -131,7 +131,7 @@ public: } /** - * This method initializes the `Data` to point to a range of bytes in a given buffer. + * Initializes the `Data` to point to a range of bytes in a given buffer. * * The range is specified by the pointers to its start @p aStart and its end @p aEnd. `Data` will point to the * bytes in the buffer from @p aStart up to but excluding @p aEnd (i.e., `aStart <= bytes < aEnd`). @@ -146,7 +146,7 @@ public: } /** - * This template method initializes the `Data` to point to the content of an object. + * Initializes the `Data` to point to the content of an object. * * @tparm ObjectType The object type (MUST not be a pointer type). * @@ -160,7 +160,7 @@ public: } /** - * This method returns a pointer to the data bytes buffer. + * Returns a pointer to the data bytes buffer. * * @returns A pointer to the data bytes buffer (can be `nullptr` if `Data` is cleared). * @@ -168,7 +168,7 @@ public: const uint8_t *GetBytes(void) const { return mBuffer; } /** - * This method returns the data length. + * Returns the data length. * * @returns The data length (number of bytes). * @@ -176,7 +176,7 @@ public: LengthType GetLength(void) const { return mLength; } /** - * This method sets the data length. + * Sets the data length. * * @param[in] aLength The data length (number of bytes). * @@ -184,7 +184,7 @@ public: void SetLength(LengthType aLength) { mLength = aLength; } /** - * This method copies the `Data` bytes to a given buffer. + * Copies the `Data` bytes to a given buffer. * * It is up to the caller to ensure that @p aBuffer has enough space for the current data length. * @@ -194,7 +194,7 @@ public: void CopyBytesTo(void *aBuffer) const { memcpy(aBuffer, mBuffer, mLength); } /** - * This method compares the `Data` content with the bytes from a given buffer. + * Compares the `Data` content with the bytes from a given buffer. * * It is up to the caller to ensure that @p aBuffer has enough bytes to compare with the current data length. * @@ -207,7 +207,7 @@ public: bool MatchesBytesIn(const void *aBuffer) const { return memcmp(mBuffer, aBuffer, mLength) == 0; } /** - * This method compares the `Data` content with the bytes from a given buffer using a given `Matcher` function. + * Compares the `Data` content with the bytes from a given buffer using a given `Matcher` function. * * It is up to the caller to ensure that @p aBuffer has enough bytes to compare with the current data length. * @@ -224,7 +224,7 @@ public: } /** - * This method overloads operator `==` to compare the `Data` content with the content from another one. + * Overloads operator `==` to compare the `Data` content with the content from another one. * * @param[in] aOtherData The other `Data` to compare with. * @@ -238,9 +238,9 @@ public: } /** - * This method checks whether the `Data` starts with the same byte content as from another `Data` instance. + * Checks whether the `Data` starts with the same byte content as from another `Data` instance. * - * This method checks that the `Data` instance contains the same bytes as @p aOtherData but allows it to have + * Checks that the `Data` instance contains the same bytes as @p aOtherData but allows it to have * additional bytes at the end. * * @param[in] aOtherData The other `Data` to compare with. @@ -260,7 +260,7 @@ private: }; /** - * This type represents a generic `MutableData` which is simply a wrapper over a pointer to a buffer with a given data + * Represents a generic `MutableData` which is simply a wrapper over a pointer to a buffer with a given data * length. * * It inherits from `Data` but unlike `Data` which treats its buffer content as immutable, `MutableData` allows its @@ -279,13 +279,13 @@ template class MutableData : public Data inline uint32_t HostSwap(uint32_t aValue) { return HostSwap32(aValue template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue); } /** - * This function reads a `uint16_t` value from a given buffer assuming big-endian encoding. + * Reads a `uint16_t` value from a given buffer assuming big-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -128,7 +128,7 @@ template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue inline uint16_t ReadUint16(const uint8_t *aBuffer) { return static_cast((aBuffer[0] << 8) | aBuffer[1]); } /** - * This function reads a `uint32_t` value from a given buffer assuming big-endian encoding. + * Reads a `uint32_t` value from a given buffer assuming big-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -142,7 +142,7 @@ inline uint32_t ReadUint32(const uint8_t *aBuffer) } /** - * This function reads a 24-bit integer value from a given buffer assuming big-endian encoding. + * Reads a 24-bit integer value from a given buffer assuming big-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -156,7 +156,7 @@ inline uint32_t ReadUint24(const uint8_t *aBuffer) } /** - * This function reads a `uint64_t` value from a given buffer assuming big-endian encoding. + * Reads a `uint64_t` value from a given buffer assuming big-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -172,7 +172,7 @@ inline uint64_t ReadUint64(const uint8_t *aBuffer) } /** - * This function writes a `uint16_t` value to a given buffer using big-endian encoding. + * Writes a `uint16_t` value to a given buffer using big-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. @@ -185,7 +185,7 @@ inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) } /** - * This function writes a 24-bit integer value to a given buffer using big-endian encoding. + * Writes a 24-bit integer value to a given buffer using big-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. @@ -199,7 +199,7 @@ inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) } /** - * This function writes a `uint32_t` value to a given buffer using big-endian encoding. + * Writes a `uint32_t` value to a given buffer using big-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. @@ -214,7 +214,7 @@ inline void WriteUint32(uint32_t aValue, uint8_t *aBuffer) } /** - * This function writes a `uint64_t` value to a given buffer using big-endian encoding. + * Writes a `uint64_t` value to a given buffer using big-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. @@ -268,7 +268,7 @@ template <> inline uint32_t HostSwap(uint32_t aValue) { return HostSwap32(aValue template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue); } /** - * This function reads a `uint16_t` value from a given buffer assuming little-endian encoding. + * Reads a `uint16_t` value from a given buffer assuming little-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -278,7 +278,7 @@ template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue inline uint16_t ReadUint16(const uint8_t *aBuffer) { return static_cast(aBuffer[0] | (aBuffer[1] << 8)); } /** - * This function reads a 24-bit integer value from a given buffer assuming little-endian encoding. + * Reads a 24-bit integer value from a given buffer assuming little-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -292,7 +292,7 @@ inline uint32_t ReadUint24(const uint8_t *aBuffer) } /** - * This function reads a `uint32_t` value from a given buffer assuming little-endian encoding. + * Reads a `uint32_t` value from a given buffer assuming little-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -306,7 +306,7 @@ inline uint32_t ReadUint32(const uint8_t *aBuffer) } /** - * This function reads a `uint64_t` value from a given buffer assuming little-endian encoding. + * Reads a `uint64_t` value from a given buffer assuming little-endian encoding. * * @param[in] aBuffer Pointer to buffer to read from. * @@ -322,7 +322,7 @@ inline uint64_t ReadUint64(const uint8_t *aBuffer) } /** - * This function writes a `uint16_t` value to a given buffer using little-endian encoding. + * Writes a `uint16_t` value to a given buffer using little-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. @@ -335,7 +335,7 @@ inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) } /** - * This function writes a 24-bit integer value to a given buffer using little-endian encoding. + * Writes a 24-bit integer value to a given buffer using little-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. @@ -349,7 +349,7 @@ inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) } /** - * This function writes a `uint32_t` value to a given buffer using little-endian encoding. + * Writes a `uint32_t` value to a given buffer using little-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. @@ -364,7 +364,7 @@ inline void WriteUint32(uint32_t aValue, uint8_t *aBuffer) } /** - * This function writes a `uint64_t` value to a given buffer using little-endian encoding. + * Writes a `uint64_t` value to a given buffer using little-endian encoding. * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. diff --git a/src/core/common/equatable.hpp b/src/core/common/equatable.hpp index d9130150f..8ece3bb27 100644 --- a/src/core/common/equatable.hpp +++ b/src/core/common/equatable.hpp @@ -41,7 +41,7 @@ namespace ot { /** - * This template class defines an overload of operator `!=`. + * Defines an overload of operator `!=`. * * The `!=` implementation uses an existing `==` overload provided by the `Type` class. * @@ -53,7 +53,7 @@ template class Unequatable { public: /** - * This method overloads operator `!=` to evaluate whether or not two instances of `Type` are equal. + * Overloads operator `!=` to evaluate whether or not two instances of `Type` are equal. * * This is implemented in terms of an existing `==` overload provided by `Type` class itself. * @@ -67,7 +67,7 @@ public: }; /** - * This template class defines overloads of operators `==` and `!=`. + * Defines overloads of operators `==` and `!=`. * * The `==` implementation simply compares all the bytes of two `Type` instances to be equal (using `memcmp()`). * @@ -79,7 +79,7 @@ template class Equatable : public Unequatable { public: /** - * This method overloads operator `==` to evaluate whether or not two instances of `Type` are equal. + * Overloads operator `==` to evaluate whether or not two instances of `Type` are equal. * * @param[in] aOther The other `Type` instance to compare with. * diff --git a/src/core/common/error.hpp b/src/core/common/error.hpp index d89be292a..27caac424 100644 --- a/src/core/common/error.hpp +++ b/src/core/common/error.hpp @@ -43,7 +43,7 @@ namespace ot { /** - * This type represents error codes used by OpenThread core modules. + * Represents error codes used by OpenThread core modules. * */ typedef otError Error; @@ -94,7 +94,7 @@ constexpr Error kErrorGeneric = OT_ERROR_GENERIC; constexpr uint8_t kNumErrors = OT_NUM_ERRORS; /** - * This function converts an `Error` into a string. + * Converts an `Error` into a string. * * @param[in] aError An error. * diff --git a/src/core/common/extension.hpp b/src/core/common/extension.hpp index d88d92177..ac93e0169 100644 --- a/src/core/common/extension.hpp +++ b/src/core/common/extension.hpp @@ -59,9 +59,9 @@ namespace Extension { */ /** - * This class defines the base class for an OpenThread vendor Extension object. + * Defines the base class for an OpenThread vendor Extension object. * - * This class is used by OpenThread core to interact with the extension module. Methods in this class are expected + * Is used by OpenThread core to interact with the extension module. Methods in this class are expected * to be implemented by the vendor extension module. * * Support for vendor extension can be enabled using `OPENTHREAD_ENABLE_VENDOR_EXTENSION` configuration option. @@ -71,7 +71,7 @@ class ExtensionBase : public InstanceLocator, private NonCopyable { public: /** - * This static method initializes and gets a vendor extension instance. + * Initializes and gets a vendor extension instance. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -84,13 +84,13 @@ public: static ExtensionBase &Init(Instance &aInstance); /** - * This method notifies the extension object that OpenThread instance has been initialized. + * Notifies the extension object that OpenThread instance has been initialized. * */ void SignalInstanceInit(void); /** - * This method notifies the extension object that NCP instance has been initialized. + * Notifies the extension object that NCP instance has been initialized. * * @param[in] aNcpInstance A reference to the NCP object. * @@ -98,7 +98,7 @@ public: void SignalNcpInit(Ncp::NcpBase &aNcpInstance); /** - * This method notifies the extension object of events from OpenThread `Notifier`. + * Notifies the extension object of events from OpenThread `Notifier`. * * @param[in] aEvents The list of events emitted by `Notifier`. * @@ -107,7 +107,7 @@ public: protected: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * diff --git a/src/core/common/extension_example.cpp b/src/core/common/extension_example.cpp index 946032542..f392b31fb 100644 --- a/src/core/common/extension_example.cpp +++ b/src/core/common/extension_example.cpp @@ -44,7 +44,7 @@ namespace ot { namespace Extension { /** - * This class defines the vendor extension object. + * Defines the vendor extension object. * */ class Extension : public ExtensionBase diff --git a/src/core/common/frame_builder.hpp b/src/core/common/frame_builder.hpp index bbbb73154..5d5a98d9e 100644 --- a/src/core/common/frame_builder.hpp +++ b/src/core/common/frame_builder.hpp @@ -51,7 +51,7 @@ class FrameBuilder { public: /** - * This method initializes the `FrameBuilder` to use a given buffer. + * Initializes the `FrameBuilder` to use a given buffer. * * `FrameBuilder` MUST be initialized before its other methods are used. * @@ -62,7 +62,7 @@ public: void Init(void *aBuffer, uint16_t aLength); /** - * This method returns a pointer to the start of `FrameBuilder` buffer. + * Returns a pointer to the start of `FrameBuilder` buffer. * * @returns A pointer to the frame buffer. * @@ -70,7 +70,7 @@ public: const uint8_t *GetBytes(void) const { return mBuffer; } /** - * This method returns the current length of frame (number of bytes appended so far). + * Returns the current length of frame (number of bytes appended so far). * * @returns The current frame length. * @@ -78,7 +78,7 @@ public: uint16_t GetLength(void) const { return mLength; } /** - * This method returns the maximum length of the frame. + * Returns the maximum length of the frame. * * @returns The maximum frame length (max number of bytes in the frame buffer). * @@ -86,9 +86,9 @@ public: uint16_t GetMaxLength(void) const { return mMaxLength; } /** - * This method sets the maximum length of the frame. + * Sets the maximum length of the frame. * - * This method does not perform any checks on the new given length. The caller MUST ensure that the specified max + * Does not perform any checks on the new given length. The caller MUST ensure that the specified max * length is valid for the frame buffer. * * @param[in] aLength The maximum frame length. @@ -97,7 +97,7 @@ public: void SetMaxLength(uint16_t aLength) { mMaxLength = aLength; } /** - * This method returns the remaining length (number of bytes that can be appended) in the frame. + * Returns the remaining length (number of bytes that can be appended) in the frame. * * @returns The remaining length. * @@ -105,7 +105,7 @@ public: uint16_t GetRemainingLength(void) const { return mMaxLength - mLength; } /** - * This method indicates whether or not there are enough bytes remaining in the `FrameBuilder` buffer to append a + * Indicates whether or not there are enough bytes remaining in the `FrameBuilder` buffer to append a * given number of bytes. * * @param[in] aLength The append length. @@ -117,7 +117,7 @@ public: bool CanAppend(uint16_t aLength) const { return (static_cast(mLength) + aLength) <= mMaxLength; } /** - * This method appends an `uint8_t` value to the `FrameBuilder`. + * Appends an `uint8_t` value to the `FrameBuilder`. * * @param[in] aUint8 The `uint8_t` value to append. * @@ -128,7 +128,7 @@ public: Error AppendUint8(uint8_t aUint8); /** - * This method appends an `uint16_t` value assuming big endian encoding to the `FrameBuilder`. + * Appends an `uint16_t` value assuming big endian encoding to the `FrameBuilder`. * * @param[in] aUint16 The `uint16_t` value to append. * @@ -139,7 +139,7 @@ public: Error AppendBigEndianUint16(uint16_t aUint16); /** - * This method appends an `uint32_t` value assuming big endian encoding to the `FrameBuilder`. + * Appends an `uint32_t` value assuming big endian encoding to the `FrameBuilder`. * * @param[in] aUint32 The `uint32_t` value to append. * @@ -150,7 +150,7 @@ public: Error AppendBigEndianUint32(uint32_t aUint32); /** - * This method appends an `uint16_t` value assuming little endian encoding to the `FrameBuilder`. + * Appends an `uint16_t` value assuming little endian encoding to the `FrameBuilder`. * * @param[in] aUint16 The `uint16_t` value to append. * @@ -161,7 +161,7 @@ public: Error AppendLittleEndianUint16(uint16_t aUint16); /** - * This method appends an `uint32_t` value assuming little endian encoding to the `FrameBuilder`. + * Appends an `uint32_t` value assuming little endian encoding to the `FrameBuilder`. * * @param[in] aUint32 The `uint32_t` value to append. * @@ -172,7 +172,7 @@ public: Error AppendLittleEndianUint32(uint32_t aUint32); /** - * This method appends bytes from a given buffer to the `FrameBuilder`. + * Appends bytes from a given buffer to the `FrameBuilder`. * * @param[in] aBuffer A pointer to a data bytes to append. * @param[in] aLength Number of bytes in @p aBuffer. @@ -184,7 +184,7 @@ public: Error AppendBytes(const void *aBuffer, uint16_t aLength); /** - * This method appends a given `Mac::Address` to the `FrameBuilder`. + * Appends a given `Mac::Address` to the `FrameBuilder`. * * @param[in] aMacAddress A `Mac::Address` to append. * @@ -196,7 +196,7 @@ public: #if OPENTHREAD_FTD || OPENTHREAD_MTD /** - * This method appends bytes read from a given message to the `FrameBuilder`. + * Appends bytes read from a given message to the `FrameBuilder`. * * @param[in] aMessage The message to read the bytes from. * @param[in] aOffset The offset in @p aMessage to start reading the bytes from. @@ -211,7 +211,7 @@ public: #endif /** - * This method appends an object to the `FrameBuilder`. + * Appends an object to the `FrameBuilder`. * * @tparam ObjectType The object type to append. * @@ -229,9 +229,9 @@ public: } /** - * This method writes bytes in `FrameBuilder` at a given offset overwriting the previously appended content. + * Writes bytes in `FrameBuilder` at a given offset overwriting the previously appended content. * - * This method does not perform any bound checks. The caller MUST ensure that the given data length fits within the + * Does not perform any bound checks. The caller MUST ensure that the given data length fits within the * previously appended content. Otherwise the behavior of this method is undefined. * * @param[in] aOffset The offset to begin writing. @@ -242,9 +242,9 @@ public: void WriteBytes(uint16_t aOffset, const void *aBuffer, uint16_t aLength); /** - * This methods writes an object to the `FrameBuilder` at a given offset overwriting previously appended content. + * Writes an object to the `FrameBuilder` at a given offset overwriting previously appended content. * - * This method does not perform any bound checks. The caller MUST ensure the given data length fits within the + * Does not perform any bound checks. The caller MUST ensure the given data length fits within the * previously appended content. Otherwise the behavior of this method is undefined. * * @tparam ObjectType The object type to write. @@ -261,7 +261,7 @@ public: } /** - * This method inserts bytes in `FrameBuilder` at a given offset, moving previous content forward. + * Inserts bytes in `FrameBuilder` at a given offset, moving previous content forward. * * The caller MUST ensure that @p aOffset is within the current frame length (from 0 up to and including * `GetLength()`). Otherwise the behavior of this method is undefined. @@ -277,7 +277,7 @@ public: Error InsertBytes(uint16_t aOffset, const void *aBuffer, uint16_t aLength); /** - * This method inserts an object in `FrameBuilder` at a given offset, moving previous content forward. + * Inserts an object in `FrameBuilder` at a given offset, moving previous content forward. * * The caller MUST ensure that @p aOffset is within the current frame length (from 0 up to and including * `GetLength()`). Otherwise the behavior of this method is undefined. @@ -299,10 +299,10 @@ public: } /** - * This method removes a given number of bytes in `FrameBuilder` at a given offset, moving existing content + * Removes a given number of bytes in `FrameBuilder` at a given offset, moving existing content * after removed bytes backward. * - * This method does not perform any bound checks. The caller MUST ensure that the given length and offset fits + * Does not perform any bound checks. The caller MUST ensure that the given length and offset fits * within the previously appended content. Otherwise the behavior of this method is undefined. * * @param[in] aOffset The offset to remove bytes from. diff --git a/src/core/common/frame_data.hpp b/src/core/common/frame_data.hpp index 336a78279..7aa835933 100644 --- a/src/core/common/frame_data.hpp +++ b/src/core/common/frame_data.hpp @@ -42,7 +42,7 @@ namespace ot { /** - * This class represents a frame `Data` which is simply a wrapper over a pointer to a buffer with a given frame length. + * Represents a frame `Data` which is simply a wrapper over a pointer to a buffer with a given frame length. * * It provide helper method to parse the content. As data is parsed and read, the `FrameData` is updated to skip over * the read content. @@ -52,7 +52,7 @@ class FrameData : public Data { public: /** - * This method indicates whether or not there are enough bytes remaining in the `FrameData` to read a given number + * Indicates whether or not there are enough bytes remaining in the `FrameData` to read a given number * of bytes. * * @param[in] aLength The read length to check. @@ -64,7 +64,7 @@ public: bool CanRead(uint16_t aLength) const { return GetLength() >= aLength; } /** - * This method reads an `uint8_t` value from the `FrameData`. + * Reads an `uint8_t` value from the `FrameData`. * * If read successfully, the `FrameData` is updated to skip over the read content. * @@ -77,7 +77,7 @@ public: Error ReadUint8(uint8_t &aUint8); /** - * This method reads an `uint16_t` value assuming big endian encoding from the `FrameData`. + * Reads an `uint16_t` value assuming big endian encoding from the `FrameData`. * * If read successfully, the `FrameData` is updated to skip over the read content. * @@ -90,7 +90,7 @@ public: Error ReadBigEndianUint16(uint16_t &aUint16); /** - * This method reads an `uint32_t` value assuming big endian encoding from the `FrameData`. + * Reads an `uint32_t` value assuming big endian encoding from the `FrameData`. * * If read successfully, the `FrameData` is updated to skip over the read content. * @@ -103,7 +103,7 @@ public: Error ReadBigEndianUint32(uint32_t &aUint32); /** - * This method reads an `uint16_t` value assuming little endian encoding from the `FrameData`. + * Reads an `uint16_t` value assuming little endian encoding from the `FrameData`. * * If read successfully, the `FrameData` is updated to skip over the read content. * @@ -116,7 +116,7 @@ public: Error ReadLittleEndianUint16(uint16_t &aUint16); /** - * This method reads an `uint32_t` value assuming little endian encoding from the `FrameData`. + * Reads an `uint32_t` value assuming little endian encoding from the `FrameData`. * * If read successfully, the `FrameData` is updated to skip over the read content. * @@ -129,7 +129,7 @@ public: Error ReadLittleEndianUint32(uint32_t &aUint32); /** - * This method reads a given number of bytes from the `FrameData`. + * Reads a given number of bytes from the `FrameData`. * * If read successfully, the `FrameData` is updated to skip over the read content. * @@ -143,7 +143,7 @@ public: Error ReadBytes(void *aBuffer, uint16_t aLength); /** - * This template method reads an object from the `FrameData`. + * Reads an object from the `FrameData`. * * @tparam ObjectType The object type to read from the message. * @@ -161,7 +161,7 @@ public: } /** - * This method skips over a given number of bytes from `FrameData`. + * Skips over a given number of bytes from `FrameData`. * * The caller MUST make sure that the @p aLength is smaller than current data length. Otherwise the behavior of * this method is undefined. diff --git a/src/core/common/heap.hpp b/src/core/common/heap.hpp index 529f6f2b9..6dbe066cf 100644 --- a/src/core/common/heap.hpp +++ b/src/core/common/heap.hpp @@ -43,7 +43,7 @@ namespace ot { namespace Heap { /** - * This function allocates memory from heap for an array of given number of object of certain size. + * Allocates memory from heap for an array of given number of object of certain size. * * @param[in] aCount Number of objects. * @param[in] aSize Size of each object. @@ -54,7 +54,7 @@ namespace Heap { void *CAlloc(size_t aCount, size_t aSize); /** - * This function frees a previously heap allocated buffer. + * Frees a previously heap allocated buffer. * * A heap allocated buffer MUST be freed only once. * diff --git a/src/core/common/heap_allocatable.hpp b/src/core/common/heap_allocatable.hpp index e9073ed70..b51018d32 100644 --- a/src/core/common/heap_allocatable.hpp +++ b/src/core/common/heap_allocatable.hpp @@ -45,7 +45,7 @@ namespace ot { namespace Heap { /** - * This template class defines a `Heap::Allocatable` object. + * Defines a `Heap::Allocatable` object. * * `Heap::Allocatable` provides methods to allocate and free instances of `Type` on heap. * @@ -60,7 +60,7 @@ template class Allocatable { public: /** - * This static method allocates a new instance of `Type` on heap and initializes it using `Type` constructor. + * Allocates a new instance of `Type` on heap and initializes it using `Type` constructor. * * The `Type` class MUST have a constructor `Type(Args...)` which is invoked upon allocation of new `Type` to * initialize it. @@ -78,7 +78,7 @@ public: } /** - * This static method allocates a new instance of `Type` on heap and initializes it using `Type::Init()` method. + * Allocates a new instance of `Type` on heap and initializes it using `Type::Init()` method. * * The `Type` class MUST have a default constructor (with no arguments) which is invoked upon allocation of new * `Type` instance. It MUST also provide an `Error Init(Args...)` method to initialize the instance. If any `Error` @@ -109,7 +109,7 @@ public: } /** - * This method frees the `Type` instance. + * Frees the `Type` instance. * * The instance MUST be heap allocated using either `Allocate()` or `AllocateAndInit()`. * diff --git a/src/core/common/heap_array.hpp b/src/core/common/heap_array.hpp index 29645f6fb..a4f549a74 100644 --- a/src/core/common/heap_array.hpp +++ b/src/core/common/heap_array.hpp @@ -49,7 +49,7 @@ namespace ot { namespace Heap { /** - * This class represents a heap allocated array. + * Represents a heap allocated array. * * The buffer to store the elements is allocated from heap and is managed by the `Heap::Array` class itself. The `Array` * implementation will automatically grow the buffer when new entries are added. The `Heap::Array` destructor will @@ -69,7 +69,7 @@ public: using IndexType = uint16_t; /** - * This constructor initializes the `Array` as empty. + * Initializes the `Array` as empty. * */ Array(void) @@ -86,7 +86,7 @@ public: ~Array(void) { Free(); } /** - * This method frees any buffer allocated by the `Array`. + * Frees any buffer allocated by the `Array`. * * The `Array` destructor will automatically call `Free()`. This method allows caller to free buffer explicitly. * @@ -100,12 +100,12 @@ public: } /** - * This method clears the array. + * Clears the array. * * Note that `Clear()` method (unlike `Free()`) does not free the allocated buffer and therefore does not change * the current capacity of the array. * - * This method invokes `Type` destructor on all cleared existing elements of array. + * Invokes `Type` destructor on all cleared existing elements of array. * */ void Clear(void) @@ -119,7 +119,7 @@ public: } /** - * This method returns the current array length (number of elements in the array). + * Returns the current array length (number of elements in the array). * * @returns The array length. * @@ -127,7 +127,7 @@ public: IndexType GetLength(void) const { return mLength; } /** - * This method returns a raw pointer to the array buffer. + * Returns a raw pointer to the array buffer. * * The returned raw pointer is valid only while the `Array` remains unchanged. * @@ -137,7 +137,7 @@ public: const Type *AsCArray(void) const { return (mLength != 0) ? mArray : nullptr; } /** - * This method returns the current capacity of array (number of elements that can fit in current allocated buffer). + * Returns the current capacity of array (number of elements that can fit in current allocated buffer). * * The allocated buffer and array capacity are automatically increased (by the `Array` itself) when new elements * are added to array. Removing elements does not change the buffer and the capacity. A desired capacity can be @@ -149,7 +149,7 @@ public: IndexType GetCapacity(void) const { return mCapacity; } /** - * This method allocates buffer to reserve a given capacity for array. + * Allocates buffer to reserve a given capacity for array. * * If the requested @p aCapacity is smaller than the current length of the array, capacity remains unchanged. * @@ -162,7 +162,7 @@ public: Error ReserveCapacity(IndexType aCapacity) { return Allocate(aCapacity); } /** - * This method sets the array by taking the buffer from another given array (using move semantics). + * Sets the array by taking the buffer from another given array (using move semantics). * * @param[in] aOther The other `Heap::Array` to take from (rvalue reference). * @@ -179,9 +179,9 @@ public: } /** - * This method overloads the `[]` operator to get the element at a given index. + * Overloads the `[]` operator to get the element at a given index. * - * This method does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. + * Does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. * * @param[in] aIndex The index to get. * @@ -191,9 +191,9 @@ public: Type &operator[](IndexType aIndex) { return mArray[aIndex]; } /** - * This method overloads the `[]` operator to get the element at a given index. + * Overloads the `[]` operator to get the element at a given index. * - * This method does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. + * Does not perform index bounds checking. Behavior is undefined if @p aIndex is not valid. * * @param[in] aIndex The index to get. * @@ -203,7 +203,7 @@ public: const Type &operator[](IndexType aIndex) const { return mArray[aIndex]; } /** - * This method gets a pointer to the element at a given index. + * Gets a pointer to the element at a given index. * * Unlike `operator[]`, this method checks @p aIndex to be valid and within the current length. The returned * pointer is valid only while the `Array` remains unchanged. @@ -216,7 +216,7 @@ public: Type *At(IndexType aIndex) { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } /** - * This method gets a pointer to the element at a given index. + * Gets a pointer to the element at a given index. * * Unlike `operator[]`, this method checks @p aIndex to be valid and within the current length. The returned * pointer is valid only while the `Array` remains unchanged. @@ -229,7 +229,7 @@ public: const Type *At(IndexType aIndex) const { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } /** - * This method gets a pointer to the element at the front of the array (first element). + * Gets a pointer to the element at the front of the array (first element). * * The returned pointer is valid only while the `Array` remains unchanged. * @@ -239,7 +239,7 @@ public: Type *Front(void) { return At(0); } /** - * This method gets a pointer to the element at the front of the array (first element). + * Gets a pointer to the element at the front of the array (first element). * * The returned pointer is valid only while the `Array` remains unchanged. * @@ -249,7 +249,7 @@ public: const Type *Front(void) const { return At(0); } /** - * This method gets a pointer to the element at the back of the array (last element). + * Gets a pointer to the element at the back of the array (last element). * * The returned pointer is valid only while the `Array` remains unchanged. * @@ -259,7 +259,7 @@ public: Type *Back(void) { return (mLength > 0) ? &mArray[mLength - 1] : nullptr; } /** - * This method gets a pointer to the element at the back of the array (last element). + * Gets a pointer to the element at the back of the array (last element). * * The returned pointer is valid only while the `Array` remains unchanged. * @@ -269,9 +269,9 @@ public: const Type *Back(void) const { return (mLength > 0) ? &mArray[mLength - 1] : nullptr; } /** - * This method appends a new entry to the end of the array. + * Appends a new entry to the end of the array. * - * This method requires the `Type` to provide a copy constructor of format `Type(const Type &aOther)` to init the + * Requires the `Type` to provide a copy constructor of format `Type(const Type &aOther)` to init the * new element in the array from @p aEntry. * * @param[in] aEntry The new entry to push back. @@ -296,9 +296,9 @@ public: } /** - * This method appends a new entry to the end of the array. + * Appends a new entry to the end of the array. * - * This method requires the `Type` to provide a copy constructor of format `Type(Type &&aOther)` to init the + * Requires the `Type` to provide a copy constructor of format `Type(Type &&aOther)` to init the * new element in the array from @p aEntry. * * @param[in] aEntry The new entry to push back (an rvalue reference) @@ -323,7 +323,7 @@ public: } /** - * This method appends a new entry to the end of the array. + * Appends a new entry to the end of the array. * * On success, this method returns a pointer to the newly appended element in the array for the caller to * initialize and use. This method uses the `Type(void)` default constructor on the newly appended element (if not @@ -350,9 +350,9 @@ public: } /** - * This method removes the last element in the array. + * Removes the last element in the array. * - * This method will invoke the `Type` destructor on the removed element. + * Will invoke the `Type` destructor on the removed element. * */ void PopBack(void) @@ -365,7 +365,7 @@ public: } /** - * This method returns the index of an element in the array. + * Returns the index of an element in the array. * * The @p aElement MUST be from the array, otherwise the behavior of this method is undefined. * @@ -377,9 +377,9 @@ public: IndexType IndexOf(const Type &aElement) const { return static_cast(&aElement - mArray); } /** - * This method finds the first match of a given entry in the array. + * Finds the first match of a given entry in the array. * - * This method uses `==` operator on `Type` to compare the array element with @p aEntry. The returned pointer is + * Uses `==` operator on `Type` to compare the array element with @p aEntry. The returned pointer is * valid only while the `Array` remains unchanged. * * @param[in] aEntry The entry to search for within the array. @@ -390,9 +390,9 @@ public: Type *Find(const Type &aEntry) { return AsNonConst(AsConst(this)->Find(aEntry)); } /** - * This method finds the first match of a given entry in the array. + * Finds the first match of a given entry in the array. * - * This method uses `==` operator to compare the array elements with @p aEntry. The returned pointer is valid only + * Uses `==` operator to compare the array elements with @p aEntry. The returned pointer is valid only * while the `Array` remains unchanged. * * @param[in] aEntry The entry to search for within the array. @@ -417,9 +417,9 @@ public: } /** - * This method indicates whether or not a match to given entry exists in the array. + * Indicates whether or not a match to given entry exists in the array. * - * This method uses `==` operator on `Type` to compare the array elements with @p aEntry. + * Uses `==` operator on `Type` to compare the array elements with @p aEntry. * * @param[in] aEntry The entry to search for within the array. * @@ -430,7 +430,7 @@ public: bool Contains(const Type &aEntry) const { return Find(aEntry) != nullptr; } /** - * This template method finds the first element in the array matching a given indicator. + * Finds the first element in the array matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against elements * in the array. To check that an element matches the given indicator, the `Matches()` method is invoked on each @@ -451,7 +451,7 @@ public: } /** - * This template method finds the first element in the array matching a given indicator. + * Finds the first element in the array matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against elements * in the array. To check that an element matches the given indicator, the `Matches()` method is invoked on each @@ -483,7 +483,7 @@ public: } /** - * This template method indicates whether or not the array contains an element matching a given indicator. + * Indicates whether or not the array contains an element matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against elements * in the array. To check that an element matches the given indicator, the `Matches()` method is invoked on each diff --git a/src/core/common/heap_data.hpp b/src/core/common/heap_data.hpp index 20545dae0..9fbbe3d42 100644 --- a/src/core/common/heap_data.hpp +++ b/src/core/common/heap_data.hpp @@ -44,14 +44,14 @@ namespace ot { namespace Heap { /** - * This class represents a heap allocated data. + * Represents a heap allocated data. * */ class Data { public: /** - * This constructor initializes the `Heap::Data` as empty. + * Initializes the `Heap::Data` as empty. * */ Data(void) { mData.Init(nullptr, 0); } @@ -74,7 +74,7 @@ public: ~Data(void) { Free(); } /** - * This method indicates whether or not the `Heap::Data` is null (i.e., it was never successfully set or it was + * Indicates whether or not the `Heap::Data` is null (i.e., it was never successfully set or it was * freed). * * @retval TRUE The `Heap::Data` is null. @@ -84,7 +84,7 @@ public: bool IsNull(void) const { return (mData.GetBytes() == nullptr); } /** - * This method returns a pointer to the `Heap::Data` bytes buffer. + * Returns a pointer to the `Heap::Data` bytes buffer. * * @returns A pointer to data buffer or `nullptr` if the `Heap::Data` is null (never set or freed). * @@ -92,7 +92,7 @@ public: const uint8_t *GetBytes(void) const { return mData.GetBytes(); } /** - * This method returns the `Heap::Data` length. + * Returns the `Heap::Data` length. * * @returns The data length (number of bytes) or zero if the `HeapData` is null. * @@ -100,7 +100,7 @@ public: uint16_t GetLength(void) const { return mData.GetLength(); } /** - * This method sets the `Heap::Data` from the content of a given buffer. + * Sets the `Heap::Data` from the content of a given buffer. * * @param[in] aBuffer The buffer to copy bytes from. * @param[in] aLength The buffer length (number of bytes). @@ -112,7 +112,7 @@ public: Error SetFrom(const uint8_t *aBuffer, uint16_t aLength); /** - * This method sets the `Heap::Data` from the content of a given message. + * Sets the `Heap::Data` from the content of a given message. * * The bytes are copied from current offset in @p aMessage till the end of the message. * @@ -125,7 +125,7 @@ public: Error SetFrom(const Message &aMessage); /** - * This method sets the `Heap::Data` from the content of a given message read at a given offset up to a given + * Sets the `Heap::Data` from the content of a given message read at a given offset up to a given * length. * * @param[in] aMessage The message to read and copy bytes from. @@ -141,7 +141,7 @@ public: Error SetFrom(const Message &aMessage, uint16_t aOffset, uint16_t aLength); /** - * This method sets the `Heap::Data` from another one (move semantics). + * Sets the `Heap::Data` from another one (move semantics). * * @param[in] aData The other `Heap::Data` to set from (rvalue reference). * @@ -149,7 +149,7 @@ public: void SetFrom(Data &&aData); /** - * This method appends the bytes from `Heap::Data` to a given message. + * Appends the bytes from `Heap::Data` to a given message. * * @param[in] aMessage The message to append the bytes into. * @@ -160,7 +160,7 @@ public: Error CopyBytesTo(Message &aMessage) const { return aMessage.AppendBytes(mData.GetBytes(), mData.GetLength()); } /** - * This method copies the bytes from `Heap::Data` into a given buffer. + * Copies the bytes from `Heap::Data` into a given buffer. * * It is up to the caller to ensure that @p aBuffer has enough space for the current data length. * @@ -170,7 +170,7 @@ public: void CopyBytesTo(uint8_t *aBuffer) const { return mData.CopyBytesTo(aBuffer); } /** - * This method frees any buffer allocated by the `Heap::Data`. + * Frees any buffer allocated by the `Heap::Data`. * * The `Heap::Data` destructor will automatically call `Free()`. This method allows caller to free the buffer * explicitly. diff --git a/src/core/common/heap_string.hpp b/src/core/common/heap_string.hpp index 2f737bb15..d06c97bd5 100644 --- a/src/core/common/heap_string.hpp +++ b/src/core/common/heap_string.hpp @@ -44,7 +44,7 @@ namespace ot { namespace Heap { /** - * This class represents a heap allocated string. + * Represents a heap allocated string. * * The buffer to store the string is allocated from heap and is manged by the `Heap::String` class itself, e.g., it may * be reused and/or freed and reallocated when the string is set. The `Heap::String` destructor will always free the @@ -55,7 +55,7 @@ class String : public Unequatable { public: /** - * This constructor initializes the `String` as null (or empty). + * Initializes the `String` as null (or empty). * */ String(void) @@ -83,7 +83,7 @@ public: ~String(void) { Free(); } /** - * This method indicates whether or not the `String` is null (i.e., it was never successfully set or it was + * Indicates whether or not the `String` is null (i.e., it was never successfully set or it was * freed). * * @retval TRUE The `String` is null. @@ -93,7 +93,7 @@ public: bool IsNull(void) const { return (mStringBuffer == nullptr); } /** - * This method returns the `String` as a C string. + * Returns the `String` as a C string. * * @returns A pointer to C string buffer or `nullptr` if the `String` is null (never set or freed). * @@ -101,7 +101,7 @@ public: const char *AsCString(void) const { return mStringBuffer; } /** - * This method sets the string from a given C string. + * Sets the string from a given C string. * * @param[in] aCString A pointer to c string buffer. Can be `nullptr` which then frees the `String`. * @@ -112,7 +112,7 @@ public: Error Set(const char *aCString); /** - * This method sets the string from another `String`. + * Sets the string from another `String`. * * @param[in] aString The other `String` to set from. * @@ -123,7 +123,7 @@ public: Error Set(const String &aString) { return Set(aString.AsCString()); } /** - * This method sets the string from another `String`. + * Sets the string from another `String`. * * @param[in] aString The other `String` to set from (rvalue reference using move semantics). * @@ -134,7 +134,7 @@ public: Error Set(String &&aString); /** - * This method frees any buffer allocated by the `String`. + * Frees any buffer allocated by the `String`. * * The `String` destructor will automatically call `Free()`. This method allows caller to free buffer * explicitly. @@ -143,7 +143,7 @@ public: void Free(void); /** - * This method overloads operator `==` to evaluate whether or not the `String` is equal to a given C string. + * Overloads operator `==` to evaluate whether or not the `String` is equal to a given C string. * * @param[in] aCString A C string to compare with. Can be `nullptr` which then checks if `String` is null. * @@ -154,7 +154,7 @@ public: bool operator==(const char *aCString) const; /** - * This method overloads operator `!=` to evaluate whether or not the `String` is unequal to a given C string. + * Overloads operator `!=` to evaluate whether or not the `String` is unequal to a given C string. * * @param[in] aCString A C string to compare with. Can be `nullptr` which then checks if `String` is not null. * @@ -165,7 +165,7 @@ public: bool operator!=(const char *aCString) const { return !(*this == aCString); } /** - * This method overloads operator `==` to evaluate whether or not two `String` are equal. + * Overloads operator `==` to evaluate whether or not two `String` are equal. * * @param[in] aString The other string to compare with. * diff --git a/src/core/common/instance.hpp b/src/core/common/instance.hpp index 3a5f4fa73..a6ba52462 100644 --- a/src/core/common/instance.hpp +++ b/src/core/common/instance.hpp @@ -144,7 +144,7 @@ */ /** - * This struct represents an opaque (and empty) type corresponding to an OpenThread instance object. + * Represents an opaque (and empty) type corresponding to an OpenThread instance object. * */ typedef struct otInstance @@ -154,16 +154,16 @@ typedef struct otInstance namespace ot { /** - * This class represents an OpenThread instance. + * Represents an OpenThread instance. * - * This class contains all the components used by OpenThread. + * Contains all the components used by OpenThread. * */ class Instance : public otInstance, private NonCopyable { public: /** - * This type represents the message buffer information (number of messages/buffers in all OT stack message queues). + * Represents the message buffer information (number of messages/buffers in all OT stack message queues). * */ class BufferInfo : public otBufferInfo, public Clearable @@ -172,9 +172,9 @@ public: #if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE /** - * This static method initializes the OpenThread instance. + * Initializes the OpenThread instance. * - * This function must be called before any other calls on OpenThread instance. + * Must be called before any other calls on OpenThread instance. * * @param[in] aBuffer The buffer for OpenThread to use for allocating the Instance. * @param[in,out] aBufferSize On input, the size of `aBuffer`. On output, if not enough space for `Instance`, the @@ -188,9 +188,9 @@ public: #else // OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE /** - * This static method initializes the single OpenThread instance. + * Initializes the single OpenThread instance. * - * This method initializes OpenThread and prepares it for subsequent OpenThread API calls. This function must be + * Initializes OpenThread and prepares it for subsequent OpenThread API calls. This function must be * called before any other calls to OpenThread. * * @returns A reference to the single OpenThread instance. @@ -199,7 +199,7 @@ public: static Instance &InitSingle(void); /** - * This static method returns a reference to the single OpenThread instance. + * Returns a reference to the single OpenThread instance. * * @returns A reference to the single OpenThread instance. * @@ -219,7 +219,7 @@ public: uint32_t GetId(void) const { return mId; } /** - * This method indicates whether or not the instance is valid/initialized and not yet finalized. + * Indicates whether or not the instance is valid/initialized and not yet finalized. * * @returns TRUE if the instance is valid/initialized, FALSE otherwise. * @@ -227,7 +227,7 @@ public: bool IsInitialized(void) const { return mIsInitialized; } /** - * This method triggers a platform reset. + * Triggers a platform reset. * * The reset process ensures that all the OpenThread state/info (stored in volatile memory) is erased. Note that * this method does not erase any persistent state/info saved in non-volatile memory. @@ -237,14 +237,14 @@ public: #if OPENTHREAD_RADIO /** - * This method resets the internal states of the radio. + * Resets the internal states of the radio. * */ void ResetRadioStack(void); #endif /** - * This method returns the active log level. + * Returns the active log level. * * @returns The log level. * @@ -262,7 +262,7 @@ public: #if OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE /** - * This method sets the log level. + * Sets the log level. * * @param[in] aLogLevel A log level. * @@ -271,22 +271,22 @@ public: #endif /** - * This method finalizes the OpenThread instance. + * Finalizes the OpenThread instance. * - * This method should be called when OpenThread instance is no longer in use. + * Should be called when OpenThread instance is no longer in use. * */ void Finalize(void); #if OPENTHREAD_MTD || OPENTHREAD_FTD /** - * This method deletes all the settings stored in non-volatile memory, and then triggers a platform reset. + * Deletes all the settings stored in non-volatile memory, and then triggers a platform reset. * */ void FactoryReset(void); /** - * This method erases all the OpenThread persistent info (network settings) stored in non-volatile memory. + * Erases all the OpenThread persistent info (network settings) stored in non-volatile memory. * * Erase is successful/allowed only if the device is in `disabled` state/role. * @@ -298,7 +298,7 @@ public: #if !OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE /** - * This method returns a reference to the Heap object. + * Returns a reference to the Heap object. * * @returns A reference to the Heap object. * @@ -308,7 +308,7 @@ public: #if OPENTHREAD_CONFIG_COAP_API_ENABLE /** - * This method returns a reference to application COAP object. + * Returns a reference to application COAP object. * * @returns A reference to the application COAP object. * @@ -318,7 +318,7 @@ public: #if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE /** - * This method returns a reference to application COAP Secure object. + * Returns a reference to application COAP Secure object. * * @returns A reference to the application COAP Secure object. * @@ -328,7 +328,7 @@ public: #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method enables/disables the "DNS name compressions" mode. + * Enables/disables the "DNS name compressions" mode. * * By default DNS name compression is enabled. When disabled, DNS names are appended as full and never compressed. * This is applicable to OpenThread's DNS and SRP client/server modules. @@ -341,7 +341,7 @@ public: static void SetDnsNameCompressionEnabled(bool aEnabled) { sDnsNameCompressionEnabled = aEnabled; } /** - * This method indicates whether the "DNS name compression" mode is enabled or not. + * Indicates whether the "DNS name compression" mode is enabled or not. * * @returns TRUE if the "DNS name compressions" mode is enabled, FALSE otherwise. * @@ -350,7 +350,7 @@ public: #endif /** - * This method retrieves the the Message Buffer information. + * Retrieves the the Message Buffer information. * * @param[out] aInfo A `BufferInfo` where information is written. * @@ -358,10 +358,10 @@ public: void GetBufferInfo(BufferInfo &aInfo); /** - * This method resets the Message Buffer information counter tracking maximum number buffers in use at the same + * Resets the Message Buffer information counter tracking maximum number buffers in use at the same * time. * - * This method resets `mMaxUsedBuffers` in `BufferInfo`. + * Resets `mMaxUsedBuffers` in `BufferInfo`. * */ void ResetBufferInfo(void); @@ -369,7 +369,7 @@ public: #endif // OPENTHREAD_MTD || OPENTHREAD_FTD /** - * This template method returns a reference to a given `Type` object belonging to the OpenThread instance. + * Returns a reference to a given `Type` object belonging to the OpenThread instance. * * For example, `Get()` returns a reference to the `MeshForwarder` object of the instance. * diff --git a/src/core/common/iterator_utils.hpp b/src/core/common/iterator_utils.hpp index d6d45dedb..f0ae96ed1f 100644 --- a/src/core/common/iterator_utils.hpp +++ b/src/core/common/iterator_utils.hpp @@ -47,7 +47,7 @@ namespace ot { */ /** - * This template class is used as a base class for those item-pointer iterators. + * Is used as a base class for those item-pointer iterators. * * These iterators have common methods and operators like `Advance()` and `++` and hold a pointer to the * object. @@ -65,7 +65,7 @@ template class ItemPtrIterator { public: /** - * This method indicates whether there are no more items to be accessed (iterator has reached the end). + * Indicates whether there are no more items to be accessed (iterator has reached the end). * * @retval TRUE There are no more items to be accessed (iterator has reached the end). * @retval FALSE The current item is valid. @@ -74,7 +74,7 @@ public: bool IsDone(void) const { return mItem == nullptr; } /** - * This method overloads `++` operator (pre-increment) to advance the iterator. + * Overloads `++` operator (pre-increment) to advance the iterator. * * The iterator is moved to point to the next item using IteratorType's `Advance` method. * If there are no more items, the iterator becomes empty (i.e., `operator*` returns `nullptr` and `IsDone()` @@ -84,7 +84,7 @@ public: void operator++(void) { static_cast(this)->Advance(); } /** - * This method overloads `++` operator (post-increment) to advance the iterator. + * Overloads `++` operator (post-increment) to advance the iterator. * * The iterator is moved to point to the next item using IteratorType's `Advance` method. * If there are no more items, the iterator becomes empty (i.e., `operator*` returns `nullptr` and `IsDone()` @@ -94,10 +94,10 @@ public: void operator++(int) { static_cast(this)->Advance(); } /** - * This method overloads the `*` dereference operator and gets a reference to then item to which the iterator is + * Overloads the `*` dereference operator and gets a reference to then item to which the iterator is * currently pointing. * - * This method MUST be used when the iterator is not empty/finished (i.e., `IsDone()` returns `false`). + * MUST be used when the iterator is not empty/finished (i.e., `IsDone()` returns `false`). * * @returns A reference to the item currently pointed by the iterator. * @@ -105,7 +105,7 @@ public: ItemType &operator*(void) { return *mItem; } /** - * This method overloads the `->` dereference operator and gets a pointer to the item to which the iterator is + * Overloads the `->` dereference operator and gets a pointer to the item to which the iterator is * currently pointing. * * @returns A pointer to the item associated with the iterator, or `nullptr` if iterator is empty/done. @@ -114,7 +114,7 @@ public: ItemType *operator->(void) { return mItem; } /** - * This method overloads operator `==` to evaluate whether or not two `Iterator` instances point to the same + * Overloads operator `==` to evaluate whether or not two `Iterator` instances point to the same * item. * * @param[in] aOther The other `Iterator` to compare with. @@ -126,7 +126,7 @@ public: bool operator==(const IteratorType &aOther) const { return mItem == aOther.mItem; } /** - * This method overloads operator `!=` to evaluate whether or not two `Iterator` instances point to the same + * Overloads operator `!=` to evaluate whether or not two `Iterator` instances point to the same * child entry. * * @param[in] aOther The other `Iterator` to compare with. diff --git a/src/core/common/linked_list.hpp b/src/core/common/linked_list.hpp index f79ac91d0..3f04aef1d 100644 --- a/src/core/common/linked_list.hpp +++ b/src/core/common/linked_list.hpp @@ -55,9 +55,9 @@ namespace ot { */ /** - * This template class represents a linked list entry. + * Represents a linked list entry. * - * This class provides methods to `GetNext()` and `SetNext()` in the linked list entry. + * Provides methods to `GetNext()` and `SetNext()` in the linked list entry. * * Users of this class should follow CRTP-style inheritance, i.e., the `Type` class itself should publicly inherit * from `LinkedListEntry`. @@ -70,7 +70,7 @@ template class LinkedListEntry { public: /** - * This method gets the next entry in the linked list. + * Gets the next entry in the linked list. * * @returns A pointer to the next entry in the linked list or `nullptr` if at the end of the list. * @@ -78,7 +78,7 @@ public: const Type *GetNext(void) const { return static_cast(static_cast(this)->mNext); } /** - * This method gets the next entry in the linked list. + * Gets the next entry in the linked list. * * @returns A pointer to the next entry in the linked list or `nullptr` if at the end of the list. * @@ -86,7 +86,7 @@ public: Type *GetNext(void) { return static_cast(static_cast(this)->mNext); } /** - * This method sets the next pointer on the entry. + * Sets the next pointer on the entry. * * @param[in] aNext A pointer to the next entry. * @@ -95,7 +95,7 @@ public: }; /** - * This template class represents a singly linked list. + * Represents a singly linked list. * * The template type `Type` should provide `GetNext()` and `SetNext()` methods (which can be realized by `Type` * inheriting from `LinkedListEntry` class). @@ -108,7 +108,7 @@ template class LinkedList public: /** - * This constructor initializes the linked list. + * Initializes the linked list. * */ LinkedList(void) @@ -117,7 +117,7 @@ public: } /** - * This method returns the entry at the head of the linked list + * Returns the entry at the head of the linked list * * @returns Pointer to the entry at the head of the linked list, or `nullptr` if the list is empty. * @@ -125,7 +125,7 @@ public: Type *GetHead(void) { return mHead; } /** - * This method returns the entry at the head of the linked list. + * Returns the entry at the head of the linked list. * * @returns Pointer to the entry at the head of the linked list, or `nullptr` if the list is empty. * @@ -133,7 +133,7 @@ public: const Type *GetHead(void) const { return mHead; } /** - * This method sets the head of the linked list to a given entry. + * Sets the head of the linked list to a given entry. * * @param[in] aHead A pointer to an entry to set as the head of the linked list. * @@ -141,13 +141,13 @@ public: void SetHead(Type *aHead) { mHead = aHead; } /** - * This method clears the linked list. + * Clears the linked list. * */ void Clear(void) { mHead = nullptr; } /** - * This method indicates whether the linked list is empty or not. + * Indicates whether the linked list is empty or not. * * @retval TRUE If the linked list is empty. * @retval FALSE If the linked list is not empty. @@ -156,7 +156,7 @@ public: bool IsEmpty(void) const { return (mHead == nullptr); } /** - * This method pushes an entry at the head of the linked list. + * Pushes an entry at the head of the linked list. * * @param[in] aEntry A reference to an entry to push at the head of linked list. * @@ -168,7 +168,7 @@ public: } /** - * This method pushes an entry after a given previous existing entry in the linked list. + * Pushes an entry after a given previous existing entry in the linked list. * * @param[in] aEntry A reference to an entry to push into the list. * @param[in] aPrevEntry A reference to a previous entry (new entry @p aEntry will be pushed after this). @@ -181,7 +181,7 @@ public: } /** - * This method pops an entry from head of the linked list. + * Pops an entry from head of the linked list. * * @note This method does not change the popped entry itself, i.e., the popped entry next pointer stays as before. * @@ -201,7 +201,7 @@ public: } /** - * This method pops an entry after a given previous entry. + * Pops an entry after a given previous entry. * * @note This method does not change the popped entry itself, i.e., the popped entry next pointer stays as before. * @@ -233,7 +233,7 @@ public: } /** - * This method indicates whether the linked list contains a given entry. + * Indicates whether the linked list contains a given entry. * * @param[in] aEntry A reference to an entry. * @@ -249,7 +249,7 @@ public: } /** - * This template method indicates whether the linked list contains an entry matching a given entry indicator. + * Indicates whether the linked list contains an entry matching a given entry indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries * in the list. To check that an entry matches the given indicator, the `Matches()` method is invoked on each @@ -269,7 +269,7 @@ public: } /** - * This method adds an entry (at the head of the linked list) if it is not already in the list. + * Adds an entry (at the head of the linked list) if it is not already in the list. * * @param[in] aEntry A reference to an entry to add. * @@ -294,7 +294,7 @@ public: } /** - * This method removes an entry from the linked list. + * Removes an entry from the linked list. * * @note This method does not change the removed entry @p aEntry itself (it is `const`), i.e., the entry next * pointer of @p aEntry stays as before. @@ -319,7 +319,7 @@ public: } /** - * This template method removes an entry matching a given entry indicator from the linked list. + * Removes an entry matching a given entry indicator from the linked list. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries * in the list. To check that an entry matches the given indicator, the `Matches()` method is invoked on each @@ -351,7 +351,7 @@ public: } /** - * This template method removes all entries in the list matching a given entry indicator from the list and adds + * Removes all entries in the list matching a given entry indicator from the list and adds * them to a new list. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries @@ -390,7 +390,7 @@ public: } /** - * This method searches within the linked list to find an entry and if found returns a pointer to previous entry. + * Searches within the linked list to find an entry and if found returns a pointer to previous entry. * * @param[in] aEntry A reference to an entry to find. * @param[out] aPrevEntry A pointer to output the previous entry on success (when @p aEntry is found in the list). @@ -420,7 +420,7 @@ public: } /** - * This method searches within the linked list to find an entry and if found returns a pointer to previous entry. + * Searches within the linked list to find an entry and if found returns a pointer to previous entry. * * @param[in] aEntry A reference to an entry to find. * @param[out] aPrevEntry A pointer to output the previous entry on success (when @p aEntry is found in the list). @@ -437,7 +437,7 @@ public: } /** - * This template method searches within a given range of the linked list to find an entry matching a given + * Searches within a given range of the linked list to find an entry matching a given * indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries @@ -479,7 +479,7 @@ public: } /** - * This template method searches within a given range of the linked list to find an entry matching a given + * Searches within a given range of the linked list to find an entry matching a given * indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries @@ -506,7 +506,7 @@ public: } /** - * This template method searches within the linked list to find an entry matching a given indicator. + * Searches within the linked list to find an entry matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries * in the list. To check that an entry matches the given indicator, the `Matches()` method is invoked on each @@ -529,7 +529,7 @@ public: } /** - * This template method searches within the linked list to find an entry matching a given indicator, and if found + * Searches within the linked list to find an entry matching a given indicator, and if found * returns a pointer to its previous entry in the list. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries @@ -553,7 +553,7 @@ public: } /** - * This template method searches within the linked list to find an entry matching a given indicator. + * Searches within the linked list to find an entry matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries * in the list. To check that an entry matches the given indicator, the `Matches()` method is invoked on each @@ -574,7 +574,7 @@ public: } /** - * This template method searches within the linked list to find an entry matching a given indicator. + * Searches within the linked list to find an entry matching a given indicator. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries * in the list. To check that an entry matches the given indicator, the `Matches()` method is invoked on each @@ -593,7 +593,7 @@ public: } /** - * This method returns the tail of the linked list (i.e., the last entry in the list). + * Returns the tail of the linked list (i.e., the last entry in the list). * * @returns A pointer to the tail entry in the linked list or `nullptr` if the list is empty. * @@ -614,7 +614,7 @@ public: } /** - * This method returns the tail of the linked list (i.e., the last entry in the list). + * Returns the tail of the linked list (i.e., the last entry in the list). * * @returns A pointer to the tail entry in the linked list or `nullptr` if the list is empty. * diff --git a/src/core/common/locator.hpp b/src/core/common/locator.hpp index 7ed3625ca..b621b4c74 100644 --- a/src/core/common/locator.hpp +++ b/src/core/common/locator.hpp @@ -59,7 +59,7 @@ extern uint64_t gInstanceRaw[]; */ /** - * This template class implements `Get()` method for different `Type` objects belonging to the OpenThread + * Implements `Get()` method for different `Type` objects belonging to the OpenThread * instance. * * Users of this class MUST follow CRTP-style inheritance, i.e., the class `Class` itself should publicly inherit @@ -74,7 +74,7 @@ template class GetProvider { public: /** - * This template method returns a reference to a given `Type` object belonging to the OpenThread instance. + * Returns a reference to a given `Type` object belonging to the OpenThread instance. * * For example, `Get()` returns a reference to the `MeshForwarder` object of the instance. * @@ -91,7 +91,7 @@ protected: }; /** - * This class implements a locator for an OpenThread Instance object. + * Implements a locator for an OpenThread Instance object. * * The `InstanceLocator` is used as base class of almost all other OpenThread classes. It provides a way for an object * to get to its owning/parent OpenThread `Instance` and also any other `Type` within the `Instance` member variable @@ -107,7 +107,7 @@ class InstanceLocator : public GetProvider public: /** - * This method returns a reference to the parent OpenThread Instance. + * Returns a reference to the parent OpenThread Instance. * * @returns A reference to the parent otInstance. * @@ -120,7 +120,7 @@ public: protected: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread Instance. * @@ -142,7 +142,7 @@ private: }; /** - * This class implements a locator for an OpenThread Instance object. + * Implements a locator for an OpenThread Instance object. * * 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 diff --git a/src/core/common/log.hpp b/src/core/common/log.hpp index 90fec6c2f..6d46030db 100644 --- a/src/core/common/log.hpp +++ b/src/core/common/log.hpp @@ -51,7 +51,7 @@ namespace ot { #define OT_SHOULD_LOG (OPENTHREAD_CONFIG_LOG_OUTPUT != OPENTHREAD_CONFIG_LOG_OUTPUT_NONE) /** - * This macro indicates whether the OpenThread logging is enabled at a given log level. + * Indicates whether the OpenThread logging is enabled at a given log level. * * @param[in] aLevel The log level to check. * @@ -61,7 +61,7 @@ namespace ot { #define OT_SHOULD_LOG_AT(aLevel) (OT_SHOULD_LOG && (OPENTHREAD_CONFIG_LOG_LEVEL >= (aLevel))) /** - * This enumeration represents the log level. + * Represents the log level. * */ enum LogLevel : uint8_t @@ -78,9 +78,9 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG && (OPENTHREAD_CONFIG_LOG_LEVEL != OT_LOG_LEVEL_NONE) /** - * This macro registers log module name. + * Registers log module name. * - * This macro is used in a `cpp` file to register the log module name for that file before using any other logging + * Is used in a `cpp` file to register the log module name for that file before using any other logging * functions or macros (e.g., `LogInfo()` or `DumpInfo()`, ...) in the file. * * @param[in] aName The log module name string (MUST be shorter than `kMaxLogModuleNameLength`). @@ -102,7 +102,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_CRIT) /** - * This macro emits a log message at critical log level. + * Emits a log message at critical log level. * * @param[in] ... Arguments for the format specification. * @@ -114,7 +114,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_WARN) /** - * This macro emits a log message at warning log level. + * Emits a log message at warning log level. * * @param[in] ... Arguments for the format specification. * @@ -126,7 +126,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_NOTE) /** - * This macro emits a log message at note log level. + * Emits a log message at note log level. * * @param[in] ... Arguments for the format specification. * @@ -138,7 +138,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_INFO) /** - * This macro emits a log message at info log level. + * Emits a log message at info log level. * * @param[in] ... Arguments for the format specification. * @@ -150,7 +150,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_DEBG) /** - * This macro emits a log message at debug log level. + * Emits a log message at debug log level. * * @param[in] ... Arguments for the format specification. * @@ -162,7 +162,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG /** - * This macro emits a log message at a given log level. + * Emits a log message at a given log level. * * @param[in] aLogLevel The log level to use. * @param[in] ... Argument for the format specification. @@ -175,7 +175,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG /** - * This macro emits a log message independent of the configured log level. + * Emits a log message independent of the configured log level. * * @param[in] ... Arguments for the format specification. * @@ -187,7 +187,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG && OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This macro emit a log message for the certification test. + * Emit a log message for the certification test. * * @param[in] ... Arguments for the format specification. * @@ -199,7 +199,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_CRIT) && OPENTHREAD_CONFIG_LOG_PKT_DUMP /** - * This macro generates a memory dump at log level critical. + * Generates a memory dump at log level critical. * * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. @@ -213,7 +213,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_WARN) && OPENTHREAD_CONFIG_LOG_PKT_DUMP /** - * This macro generates a memory dump at log level warning. + * Generates a memory dump at log level warning. * * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. @@ -227,7 +227,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_NOTE) && OPENTHREAD_CONFIG_LOG_PKT_DUMP /** - * This macro generates a memory dump at log level note. + * Generates a memory dump at log level note. * * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. @@ -241,7 +241,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_INFO) && OPENTHREAD_CONFIG_LOG_PKT_DUMP /** - * This macro generates a memory dump at log level info. + * Generates a memory dump at log level info. * * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. @@ -255,7 +255,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_DEBG) && OPENTHREAD_CONFIG_LOG_PKT_DUMP /** - * This macro generates a memory dump at log level debug. + * Generates a memory dump at log level debug. * * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. @@ -269,7 +269,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG && OPENTHREAD_CONFIG_LOG_PKT_DUMP /** - * This macro generates a memory dump independent of the configured log level. + * Generates a memory dump independent of the configured log level. * * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. @@ -281,7 +281,7 @@ constexpr uint8_t kMaxLogModuleNameLength = 14; ///< Maximum module name length #if OT_SHOULD_LOG && OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE && OPENTHREAD_CONFIG_LOG_PKT_DUMP /** - * This macro generates a memory dump for certification test. + * Generates a memory dump for certification test. * * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. diff --git a/src/core/common/message.hpp b/src/core/common/message.hpp index a1bf2a87f..a40cb0503 100644 --- a/src/core/common/message.hpp +++ b/src/core/common/message.hpp @@ -60,7 +60,7 @@ #include "thread/link_quality.hpp" /** - * This struct represents an opaque (and empty) type for an OpenThread message buffer. + * Represents an opaque (and empty) type for an OpenThread message buffer. * */ struct otMessage @@ -88,9 +88,9 @@ class HmacSha256; */ /** - * This macro frees a given message buffer if not `nullptr`. + * Frees a given message buffer if not `nullptr`. * - * This macro and the ones that follow contain small but common code patterns used in many of the core modules. They + * And the ones that follow contain small but common code patterns used in many of the core modules. They * are intentionally defined as macros instead of inline methods/functions to ensure that they are fully inlined. * Note that an `inline` method/function is not necessarily always inlined by the toolchain and not inlining such * small implementations can add a rather large code-size overhead. @@ -108,7 +108,7 @@ class HmacSha256; } while (false) /** - * This macro frees a given message buffer if a given `Error` indicates an error. + * Frees a given message buffer if a given `Error` indicates an error. * * The parameter @p aMessage can be `nullptr` in which case this macro does nothing. * @@ -126,7 +126,7 @@ class HmacSha256; } while (false) /** - * This macro frees a given message buffer if a given `Error` indicates an error and sets the `aMessage` to `nullptr`. + * Frees a given message buffer if a given `Error` indicates an error and sets the `aMessage` to `nullptr`. * * @param[in] aMessage A pointer to a `Message` to free (can be `nullptr`). * @param[in] aError The `Error` to check. @@ -152,7 +152,7 @@ class PriorityQueue; class ThreadLinkInfo; /** - * This class represents a Message buffer. + * Represents a Message buffer. * */ class Buffer : public otMessageBuffer, public LinkedListEntry @@ -161,7 +161,7 @@ class Buffer : public otMessageBuffer, public LinkedListEntry public: /** - * This method returns a pointer to the next message buffer. + * Returns a pointer to the next message buffer. * * @returns A pointer to the next message buffer. * @@ -169,7 +169,7 @@ public: Buffer *GetNextBuffer(void) { return GetNext(); } /** - * This method returns a pointer to the next message buffer. + * Returns a pointer to the next message buffer. * * @returns A pointer to the next message buffer. * @@ -177,7 +177,7 @@ public: const Buffer *GetNextBuffer(void) const { return GetNext(); } /** - * This method sets the pointer to the next message buffer. + * Sets the pointer to the next message buffer. * * @param[in] aNext A pointer to the next buffer. * @@ -257,7 +257,7 @@ static_assert(sizeof(Buffer) >= kBufferSize, "Buffer size is not valid. Increase OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE."); /** - * This class represents a message. + * Represents a message. * */ class Message : public otMessage, public Buffer, public GetProvider @@ -272,7 +272,7 @@ class Message : public otMessage, public Buffer, public GetProvider public: /** - * This enumeration represents the message type. + * Represents the message type. * */ enum Type : uint8_t @@ -286,7 +286,7 @@ public: }; /** - * This enumeration represents the message sub-type. + * Represents the message sub-type. * */ enum SubType : uint8_t @@ -316,7 +316,7 @@ public: static constexpr uint8_t kNumPriorities = 4; ///< Number of priority levels. /** - * This enumeration represents the link security mode (used by `Settings` constructor). + * Represents the link security mode (used by `Settings` constructor). * */ enum LinkSecurityMode : bool @@ -326,7 +326,7 @@ public: }; /** - * This enumeration represents the message ownership model when a `Message` instance is passed to a method/function. + * Represents the message ownership model when a `Message` instance is passed to a method/function. * */ enum Ownership : uint8_t @@ -348,14 +348,14 @@ public: }; /** - * This class represents settings used for creating a new message. + * Represents settings used for creating a new message. * */ class Settings : public otMessageSettings { public: /** - * This constructor initializes the `Settings` object. + * Initializes the `Settings` object. * * @param[in] aSecurityMode A link security mode. * @param[in] aPriority A message priority. @@ -364,7 +364,7 @@ public: Settings(LinkSecurityMode aSecurityMode, Priority aPriority); /** - * This constructor initializes the `Settings` with a given message priority and link security enabled. + * Initializes the `Settings` with a given message priority and link security enabled. * * @param[in] aPriority A message priority. * @@ -375,7 +375,7 @@ public: } /** - * This method gets the message priority. + * Gets the message priority. * * @returns The message priority. * @@ -383,7 +383,7 @@ public: Priority GetPriority(void) const { return static_cast(mPriority); } /** - * This method indicates whether the link security should be enabled. + * Indicates whether the link security should be enabled. * * @returns TRUE if link security should be enabled, FALSE otherwise. * @@ -391,7 +391,7 @@ public: bool IsLinkSecurityEnabled(void) const { return mLinkSecurityEnabled; } /** - * This static method converts a pointer to an `otMessageSettings` to a `Settings`. + * Converts a pointer to an `otMessageSettings` to a `Settings`. * * @param[in] aSettings A pointer to `otMessageSettings` to convert from. * If it is `nullptr`, then the default settings `GetDefault()` will be used. @@ -402,7 +402,7 @@ public: static const Settings &From(const otMessageSettings *aSettings); /** - * This static method returns the default settings with link security enabled and `kPriorityNormal` priority. + * Returns the default settings with link security enabled and `kPriorityNormal` priority. * * @returns A reference to the default settings (link security enable and `kPriorityNormal` priority). * @@ -414,7 +414,7 @@ public: }; /** - * This method returns a reference to the OpenThread Instance which owns the `Message`. + * Returns a reference to the OpenThread Instance which owns the `Message`. * * @returns A reference to the `Instance`. * @@ -422,13 +422,13 @@ public: Instance &GetInstance(void) const; /** - * This method frees this message buffer. + * Frees this message buffer. * */ void Free(void); /** - * This method returns a pointer to the next message. + * Returns a pointer to the next message. * * @returns A pointer to the next message in the list or `nullptr` if at the end of the list. * @@ -436,7 +436,7 @@ public: Message *GetNext(void) const; /** - * This method returns the number of bytes in the message. + * Returns the number of bytes in the message. * * @returns The number of bytes in the message. * @@ -444,7 +444,7 @@ public: uint16_t GetLength(void) const { return GetMetadata().mLength; } /** - * This method sets the number of bytes in the message. + * Sets the number of bytes in the message. * * @param[in] aLength Requested number of bytes in the message. * @@ -455,13 +455,13 @@ public: Error SetLength(uint16_t aLength); /** - * This method returns the number of buffers in the message. + * Returns the number of buffers in the message. * */ uint8_t GetBufferCount(void) const; /** - * This method returns the byte offset within the message. + * Returns the byte offset within the message. * * @returns A byte offset within the message. * @@ -469,7 +469,7 @@ public: uint16_t GetOffset(void) const { return GetMetadata().mOffset; } /** - * This method moves the byte offset within the message. + * Moves the byte offset within the message. * * @param[in] aDelta The number of bytes to move the current offset, which may be positive or negative. * @@ -477,7 +477,7 @@ public: void MoveOffset(int aDelta); /** - * This method sets the byte offset within the message. + * Sets the byte offset within the message. * * @param[in] aOffset The byte offset within the message. * @@ -485,7 +485,7 @@ public: void SetOffset(uint16_t aOffset); /** - * This method returns the type of the message. + * Returns the type of the message. * * @returns The type of the message. * @@ -493,7 +493,7 @@ public: Type GetType(void) const { return static_cast(GetMetadata().mType); } /** - * This method sets the message type. + * Sets the message type. * * @param[in] aType The message type. * @@ -501,7 +501,7 @@ public: void SetType(Type aType) { GetMetadata().mType = aType; } /** - * This method returns the sub type of the message. + * Returns the sub type of the message. * * @returns The sub type of the message. * @@ -509,7 +509,7 @@ public: SubType GetSubType(void) const { return static_cast(GetMetadata().mSubType); } /** - * This method sets the message sub type. + * Sets the message sub type. * * @param[in] aSubType The message sub type. * @@ -517,7 +517,7 @@ public: void SetSubType(SubType aSubType) { GetMetadata().mSubType = aSubType; } /** - * This method returns whether or not the message is of MLE subtype. + * Returns whether or not the message is of MLE subtype. * * @retval TRUE If message is of MLE subtype. * @retval FALSE If message is not of MLE subtype. @@ -526,7 +526,7 @@ public: bool IsSubTypeMle(void) const; /** - * This method checks whether this multicast message may be looped back. + * Checks whether this multicast message may be looped back. * * @retval TRUE If message may be looped back. * @retval FALSE If message must not be looped back. @@ -535,7 +535,7 @@ public: bool GetMulticastLoop(void) const { return GetMetadata().mMulticastLoop; } /** - * This method sets whether multicast may be looped back. + * Sets whether multicast may be looped back. * * @param[in] aMulticastLoop Whether allow looping back multicast. * @@ -543,7 +543,7 @@ public: void SetMulticastLoop(bool aMulticastLoop) { GetMetadata().mMulticastLoop = aMulticastLoop; } /** - * This method returns the message priority level. + * Returns the message priority level. * * @returns The priority level associated with this message. * @@ -551,7 +551,7 @@ public: Priority GetPriority(void) const { return static_cast(GetMetadata().mPriority); } /** - * This method sets the messages priority. + * Sets the messages priority. * If the message is already queued in a priority queue, changing the priority ensures to * update the message in the associated queue. * @@ -564,7 +564,7 @@ public: Error SetPriority(Priority aPriority); /** - * This static method convert a `Priority` to a string. + * Convert a `Priority` to a string. * * @param[in] aPriority The priority level. * @@ -574,7 +574,7 @@ public: static const char *PriorityToString(Priority aPriority); /** - * This method prepends bytes to the front of the message. + * Prepends bytes to the front of the message. * * On success, this method grows the message by @p aLength bytes. * @@ -588,7 +588,7 @@ public: Error PrependBytes(const void *aBuf, uint16_t aLength); /** - * This method prepends an object to the front of the message. + * Prepends an object to the front of the message. * * On success, this method grows the message by the size of the object. * @@ -608,7 +608,7 @@ public: } /** - * This method removes header bytes from the message at start of message. + * Removes header bytes from the message at start of message. * * The caller MUST ensure that message contains the bytes to be removed, i.e. `aOffset` is smaller than the message * length. @@ -619,9 +619,9 @@ public: void RemoveHeader(uint16_t aLength); /** - * This method removes header bytes from the message at a given offset. + * Removes header bytes from the message at a given offset. * - * This method shrinks the message. The existing header bytes before @p aOffset are copied forward and replace the + * Shrinks the message. The existing header bytes before @p aOffset are copied forward and replace the * removed bytes. * * The caller MUST ensure that message contains the bytes to be removed, i.e. `aOffset + aLength` is smaller than @@ -634,9 +634,9 @@ public: void RemoveHeader(uint16_t aOffset, uint16_t aLength); /** - * This method grows the message to make space for new header bytes at a given offset. + * Grows the message to make space for new header bytes at a given offset. * - * This method grows the message header (similar to `PrependBytes()`). The existing header bytes from start to + * Grows the message header (similar to `PrependBytes()`). The existing header bytes from start to * `aOffset + aLength` are then copied backward to make room for the new header bytes. Note that this method does * not change the bytes from @p aOffset up @p aLength (the new inserted header range). Caller can write to this * range to update the bytes after successful return from this method. @@ -651,7 +651,7 @@ public: Error InsertHeader(uint16_t aOffset, uint16_t aLength); /** - * This method appends bytes to the end of the message. + * Appends bytes to the end of the message. * * On success, this method grows the message by @p aLength bytes. * @@ -665,7 +665,7 @@ public: Error AppendBytes(const void *aBuf, uint16_t aLength); /** - * This method appends bytes read from another or potentially the same message to the end of the current message. + * Appends bytes read from another or potentially the same message to the end of the current message. * * On success, this method grows the message by @p aLength bytes. * @@ -681,7 +681,7 @@ public: Error AppendBytesFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLength); /** - * This method appends an object to the end of the message. + * Appends an object to the end of the message. * * On success, this method grows the message by the size of the appended object * @@ -701,7 +701,7 @@ public: } /** - * This method appends bytes from a given `Data` instance to the end of the message. + * Appends bytes from a given `Data` instance to the end of the message. * * On success, this method grows the message by the size of the appended data. * @@ -719,7 +719,7 @@ public: } /** - * This method reads bytes from the message. + * Reads bytes from the message. * * @param[in] aOffset Byte offset within the message to begin reading. * @param[out] aBuf A pointer to a data buffer to copy the read bytes into. @@ -731,7 +731,7 @@ public: uint16_t ReadBytes(uint16_t aOffset, void *aBuf, uint16_t aLength) const; /** - * This method reads a given number of bytes from the message. + * Reads a given number of bytes from the message. * * If there are fewer bytes available in the message than the requested read length, the available bytes will be * read and copied into @p aBuf. In this case `kErrorParse` will be returned. @@ -747,7 +747,7 @@ public: Error Read(uint16_t aOffset, void *aBuf, uint16_t aLength) const; /** - * This method reads an object from the message. + * Reads an object from the message. * * If there are fewer bytes available in the message than the requested object size, the available bytes will be * read and copied into @p aObject (@p aObject will be read partially). In this case `kErrorParse` will @@ -770,7 +770,7 @@ public: } /** - * This method compares the bytes in the message at a given offset with a given byte array. + * Compares the bytes in the message at a given offset with a given byte array. * * If there are fewer bytes available in the message than the requested @p aLength, the comparison is treated as * failure (returns FALSE). @@ -788,7 +788,7 @@ public: bool CompareBytes(uint16_t aOffset, const void *aBuf, uint16_t aLength, ByteMatcher aMatcher = nullptr) const; /** - * This method compares the bytes in the message at a given offset with bytes read from another message. + * Compares the bytes in the message at a given offset with bytes read from another message. * * If either message has fewer bytes available than the requested @p aLength, the comparison is treated as failure * (returns FALSE). @@ -810,7 +810,7 @@ public: ByteMatcher aMatcher = nullptr) const; /** - * This method compares the bytes in the message at a given offset with an object. + * Compares the bytes in the message at a given offset with an object. * * The bytes in the message are compared with the bytes in @p aObject. If there are fewer bytes available in the * message than the requested object size, it is treated as failed comparison (returns FALSE). @@ -832,9 +832,9 @@ public: } /** - * This method writes bytes to the message. + * Writes bytes to the message. * - * This method will not resize the message. The given data to write (with @p aLength bytes) MUST fit within the + * Will not resize the message. The given data to write (with @p aLength bytes) MUST fit within the * existing message buffer (from the given offset @p aOffset up to the message's length). * * @param[in] aOffset Byte offset within the message to begin writing. @@ -845,12 +845,12 @@ public: void WriteBytes(uint16_t aOffset, const void *aBuf, uint16_t aLength); /** - * This method writes bytes read from another or potentially the same message to the message at a given offset. + * Writes bytes read from another or potentially the same message to the message at a given offset. * - * This method will not resize the message. The bytes to write (with @p aLength) MUST fit within the existing + * Will not resize the message. The bytes to write (with @p aLength) MUST fit within the existing * message buffer (from the given @p aWriteOffset up to the message's length). * - * This method can be used to copy bytes within the same message in either direction, i.e., copy forward where + * Can be used to copy bytes within the same message in either direction, i.e., copy forward where * `aWriteOffset > aReadOffset` or copy backward where `aWriteOffset < aReadOffset`. * * @param[in] aWriteOffset Byte offset within this message to begin writing. @@ -862,9 +862,9 @@ public: void WriteBytesFromMessage(uint16_t aWriteOffset, const Message &aMessage, uint16_t aReadOffset, uint16_t aLength); /** - * This methods writes an object to the message. + * Writes an object to the message. * - * This method will not resize the message. The entire given object (all its bytes) MUST fit within the existing + * Will not resize the message. The entire given object (all its bytes) MUST fit within the existing * message buffer (from the given offset @p aOffset up to the message's length). * * @tparam ObjectType The object type to write to the message. @@ -881,9 +881,9 @@ public: } /** - * This method writes bytes from a given `Data` instance to the message. + * Writes bytes from a given `Data` instance to the message. * - * This method will not resize the message. The given data to write MUST fit within the existing message buffer + * Will not resize the message. The given data to write MUST fit within the existing message buffer * (from the given offset @p aOffset up to the message's length). * * @tparam kDataLengthType Determines the data length type (`uint8_t` or `uint16_t`). @@ -898,7 +898,7 @@ public: } /** - * This method creates a copy of the message. + * Creates a copy of the message. * * It allocates the new message from the same message pool as the original one and copies @p aLength octets * of the payload. The `Type`, `SubType`, `LinkSecurity`, `Offset`, `InterfaceId`, and `Priority` fields on the @@ -912,7 +912,7 @@ public: Message *Clone(uint16_t aLength) const; /** - * This method creates a copy of the message. + * Creates a copy of the message. * * It allocates the new message from the same message pool as the original one and copies the entire payload. The * `Type`, `SubType`, `LinkSecurity`, `Offset`, `InterfaceId`, and `Priority` fields on the cloned message are also @@ -924,7 +924,7 @@ public: Message *Clone(void) const { return Clone(GetLength()); } /** - * This method returns the datagram tag used for 6LoWPAN fragmentation or the identification used for IPv6 + * Returns the datagram tag used for 6LoWPAN fragmentation or the identification used for IPv6 * fragmentation. * * @returns The 6LoWPAN datagram tag or the IPv6 fragment identification. @@ -933,7 +933,7 @@ public: uint32_t GetDatagramTag(void) const { return GetMetadata().mDatagramTag; } /** - * This method sets the datagram tag used for 6LoWPAN fragmentation. + * Sets the datagram tag used for 6LoWPAN fragmentation. * * @param[in] aTag The 6LoWPAN datagram tag. * @@ -941,7 +941,7 @@ public: void SetDatagramTag(uint32_t aTag) { GetMetadata().mDatagramTag = aTag; } /** - * This method returns whether or not the message forwarding is scheduled for the child. + * Returns whether or not the message forwarding is scheduled for the child. * * @param[in] aChildIndex The index into the child table. * @@ -952,7 +952,7 @@ public: bool GetChildMask(uint16_t aChildIndex) const; /** - * This method unschedules forwarding of the message to the child. + * Unschedules forwarding of the message to the child. * * @param[in] aChildIndex The index into the child table. * @@ -960,7 +960,7 @@ public: void ClearChildMask(uint16_t aChildIndex); /** - * This method schedules forwarding of the message to the child. + * Schedules forwarding of the message to the child. * * @param[in] aChildIndex The index into the child table. * @@ -968,7 +968,7 @@ public: void SetChildMask(uint16_t aChildIndex); /** - * This method returns whether or not the message forwarding is scheduled for at least one child. + * Returns whether or not the message forwarding is scheduled for at least one child. * * @retval TRUE If message forwarding is scheduled for at least one child. * @retval FALSE If message forwarding is not scheduled for any child. @@ -977,7 +977,7 @@ public: bool IsChildPending(void) const; /** - * This method returns the RLOC16 of the mesh destination. + * Returns the RLOC16 of the mesh destination. * * @note Only use this for non-link-local unicast messages. * @@ -987,7 +987,7 @@ public: uint16_t GetMeshDest(void) const { return GetMetadata().mMeshDest; } /** - * This method sets the RLOC16 of the mesh destination. + * Sets the RLOC16 of the mesh destination. * * @note Only use this when sending non-link-local unicast messages. * @@ -997,7 +997,7 @@ public: void SetMeshDest(uint16_t aMeshDest) { GetMetadata().mMeshDest = aMeshDest; } /** - * This method returns the IEEE 802.15.4 Destination PAN ID. + * Returns the IEEE 802.15.4 Destination PAN ID. * * @note Only use this when sending MLE Discover Request or Response messages. * @@ -1007,7 +1007,7 @@ public: uint16_t GetPanId(void) const { return GetMetadata().mPanId; } /** - * This method sets the IEEE 802.15.4 Destination PAN ID. + * Sets the IEEE 802.15.4 Destination PAN ID. * * @note Only use this when sending MLE Discover Request or Response messages. * @@ -1017,7 +1017,7 @@ public: void SetPanId(uint16_t aPanId) { GetMetadata().mPanId = aPanId; } /** - * This method returns the IEEE 802.15.4 Channel to use for transmission. + * Returns the IEEE 802.15.4 Channel to use for transmission. * * @note Only use this when sending MLE Announce messages. * @@ -1027,7 +1027,7 @@ public: uint8_t GetChannel(void) const { return GetMetadata().mChannel; } /** - * This method sets the IEEE 802.15.4 Channel to use for transmission. + * Sets the IEEE 802.15.4 Channel to use for transmission. * * @note Only use this when sending MLE Announce messages. * @@ -1037,7 +1037,7 @@ public: void SetChannel(uint8_t aChannel) { GetMetadata().mChannel = aChannel; } /** - * This method returns the message timestamp. + * Returns the message timestamp. * * @returns The message timestamp. * @@ -1045,7 +1045,7 @@ public: TimeMilli GetTimestamp(void) const { return GetMetadata().mTimestamp; } /** - * This method sets the message timestamp to a given time. + * Sets the message timestamp to a given time. * * @param[in] aTimestamp The timestamp value. * @@ -1053,13 +1053,13 @@ public: void SetTimestamp(TimeMilli aTimestamp) { GetMetadata().mTimestamp = aTimestamp; } /** - * This method sets the message timestamp to the current time. + * Sets the message timestamp to the current time. * */ void SetTimestampToNow(void) { SetTimestamp(TimerMilli::GetNow()); } /** - * This method returns whether or not message forwarding is scheduled for direct transmission. + * Returns whether or not message forwarding is scheduled for direct transmission. * * @retval TRUE If message forwarding is scheduled for direct transmission. * @retval FALSE If message forwarding is not scheduled for direct transmission. @@ -1068,19 +1068,19 @@ public: bool IsDirectTransmission(void) const { return GetMetadata().mDirectTx; } /** - * This method unschedules forwarding using direct transmission. + * Unschedules forwarding using direct transmission. * */ void ClearDirectTransmission(void) { GetMetadata().mDirectTx = false; } /** - * This method schedules forwarding using direct transmission. + * Schedules forwarding using direct transmission. * */ void SetDirectTransmission(void) { GetMetadata().mDirectTx = true; } /** - * This method indicates whether the direct transmission of message was successful. + * Indicates whether the direct transmission of message was successful. * * @retval TRUE If direct transmission of message was successful (all fragments were delivered and acked). * @retval FALSE If direct transmission of message failed (at least one fragment failed). @@ -1089,7 +1089,7 @@ public: bool GetTxSuccess(void) const { return GetMetadata().mTxSuccess; } /** - * This method sets whether the direct transmission of message was successful. + * Sets whether the direct transmission of message was successful. * * @param[in] aTxSuccess TRUE if the direct transmission is successful, FALSE otherwise (i.e., at least one * fragment transmission failed). @@ -1098,7 +1098,7 @@ public: void SetTxSuccess(bool aTxSuccess) { GetMetadata().mTxSuccess = aTxSuccess; } /** - * This method indicates whether the message may be evicted. + * Indicates whether the message may be evicted. * * @retval TRUE If the message must not be evicted. * @retval FALSE If the message may be evicted. @@ -1107,7 +1107,7 @@ public: bool GetDoNotEvict(void) const { return GetMetadata().mDoNotEvict; } /** - * This method sets whether the message may be evicted. + * Sets whether the message may be evicted. * * @param[in] aDoNotEvict TRUE if the message may not be evicted, FALSE otherwise. * @@ -1115,7 +1115,7 @@ public: void SetDoNotEvict(bool aDoNotEvict) { GetMetadata().mDoNotEvict = aDoNotEvict; } /** - * This method indicates whether the message is waiting for an address query resolution. + * Indicates whether the message is waiting for an address query resolution. * * @retval TRUE If the message is waiting for address query resolution. * @retval FALSE If the message is not waiting for address query resolution. @@ -1124,7 +1124,7 @@ public: bool IsResolvingAddress(void) const { return GetMetadata().mResolvingAddress; } /** - * This method sets whether the message is waiting for an address query resolution. + * Sets whether the message is waiting for an address query resolution. * * @param[in] aResolvingAddress TRUE if message is waiting for address resolution, FALSE otherwise. * @@ -1132,7 +1132,7 @@ public: void SetResolvingAddress(bool aResolvingAddress) { GetMetadata().mResolvingAddress = aResolvingAddress; } /** - * This method indicates whether or not link security is enabled for the message. + * Indicates whether or not link security is enabled for the message. * * @retval TRUE If link security is enabled. * @retval FALSE If link security is not enabled. @@ -1141,7 +1141,7 @@ public: bool IsLinkSecurityEnabled(void) const { return GetMetadata().mLinkSecurity; } /** - * This method sets whether or not link security is enabled for the message. + * Sets whether or not link security is enabled for the message. * * @param[in] aEnabled TRUE if link security is enabled, FALSE otherwise. * @@ -1149,7 +1149,7 @@ public: void SetLinkSecurityEnabled(bool aEnabled) { GetMetadata().mLinkSecurity = aEnabled; } /** - * This method updates the average RSS (Received Signal Strength) associated with the message by adding the given + * Updates the average RSS (Received Signal Strength) associated with the message by adding the given * RSS value to the average. Note that a message can be composed of multiple 802.15.4 data frame fragments each * received with a different signal strength. * @@ -1159,7 +1159,7 @@ public: void AddRss(int8_t aRss) { IgnoreError(GetMetadata().mRssAverager.Add(aRss)); } /** - * This method returns the average RSS (Received Signal Strength) associated with the message. + * Returns the average RSS (Received Signal Strength) associated with the message. * * @returns The current average RSS value (in dBm) or `Radio::kInvalidRssi` if no average is available. * @@ -1167,7 +1167,7 @@ public: int8_t GetAverageRss(void) const { return GetMetadata().mRssAverager.GetAverage(); } /** - * This method returns a const reference to RssAverager of the message. + * Returns a const reference to RssAverager of the message. * * @returns A const reference to the RssAverager of the message. * @@ -1176,7 +1176,7 @@ public: #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This method updates the average LQI (Link Quality Indicator) associated with the message. + * Updates the average LQI (Link Quality Indicator) associated with the message. * * The given LQI value would be added to the average. Note that a message can be composed of multiple 802.15.4 * frame fragments each received with a different signal strength. @@ -1187,7 +1187,7 @@ public: void AddLqi(uint8_t aLqi) { GetMetadata().mLqiAverager.Add(aLqi); } /** - * This method returns the average LQI (Link Quality Indicator) associated with the message. + * Returns the average LQI (Link Quality Indicator) associated with the message. * * @returns The current average LQI value (in dBm) or OT_RADIO_LQI_NONE if no average is available. * @@ -1195,7 +1195,7 @@ public: uint8_t GetAverageLqi(void) const { return GetMetadata().mLqiAverager.GetAverage(); } /** - * This method returns the count of frames counted so far. + * Returns the count of frames counted so far. * * @returns The count of frames that have been counted. * @@ -1204,7 +1204,7 @@ public: #endif /** - * This method sets the message's link info properties (PAN ID, link security, RSS) from a given `ThreadLinkInfo`. + * Sets the message's link info properties (PAN ID, link security, RSS) from a given `ThreadLinkInfo`. * * @param[in] aLinkInfo The `ThreadLinkInfo` instance from which to set message's related properties. * @@ -1212,7 +1212,7 @@ public: void SetLinkInfo(const ThreadLinkInfo &aLinkInfo); /** - * This method returns a pointer to the message queue (if any) where this message is queued. + * Returns a pointer to the message queue (if any) where this message is queued. * * @returns A pointer to the message queue or `nullptr` if not in any message queue. * @@ -1223,7 +1223,7 @@ public: } /** - * This method returns a pointer to the priority message queue (if any) where this message is queued. + * Returns a pointer to the priority message queue (if any) where this message is queued. * * @returns A pointer to the priority queue or `nullptr` if not in any priority queue. * @@ -1234,7 +1234,7 @@ public: } /** - * This method indicates whether or not the message is also used for time sync purpose. + * Indicates whether or not the message is also used for time sync purpose. * * When OPENTHREAD_CONFIG_TIME_SYNC_ENABLE is 0, this method always return false. * @@ -1246,7 +1246,7 @@ public: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method sets whether or not the message is also used for time sync purpose. + * Sets whether or not the message is also used for time sync purpose. * * @param[in] aEnabled TRUE if the message is also used for time sync purpose, FALSE otherwise. * @@ -1254,7 +1254,7 @@ public: void SetTimeSync(bool aEnabled) { GetMetadata().mTimeSync = aEnabled; } /** - * This method sets the offset to network time. + * Sets the offset to network time. * * @param[in] aNetworkTimeOffset The offset to network time. * @@ -1262,7 +1262,7 @@ public: void SetNetworkTimeOffset(int64_t aNetworkTimeOffset) { GetMetadata().mNetworkTimeOffset = aNetworkTimeOffset; } /** - * This method gets the offset to network time. + * Gets the offset to network time. * * @returns The offset to network time. * @@ -1270,7 +1270,7 @@ public: int64_t GetNetworkTimeOffset(void) const { return GetMetadata().mNetworkTimeOffset; } /** - * This method sets the time sync sequence. + * Sets the time sync sequence. * * @param[in] aTimeSyncSeq The time sync sequence. * @@ -1278,7 +1278,7 @@ public: void SetTimeSyncSeq(uint8_t aTimeSyncSeq) { GetMetadata().mTimeSyncSeq = aTimeSyncSeq; } /** - * This method gets the time sync sequence. + * Gets the time sync sequence. * * @returns The time sync sequence. * @@ -1288,7 +1288,7 @@ public: #if OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method indicates whether the radio type is set. + * Indicates whether the radio type is set. * * @retval TRUE If the radio type is set. * @retval FALSE If the radio type is not set. @@ -1297,9 +1297,9 @@ public: bool IsRadioTypeSet(void) const { return GetMetadata().mIsRadioTypeSet; } /** - * This method gets the radio link type the message was received on, or should be sent on. + * Gets the radio link type the message was received on, or should be sent on. * - * This method should be used only when `IsRadioTypeSet()` returns `true`. + * Should be used only when `IsRadioTypeSet()` returns `true`. * * @returns The radio link type of the message. * @@ -1307,7 +1307,7 @@ public: Mac::RadioType GetRadioType(void) const { return static_cast(GetMetadata().mRadioType); } /** - * This method sets the radio link type the message was received on, or should be sent on. + * Sets the radio link type the message was received on, or should be sent on. * * @param[in] aRadioType A radio link type of the message. * @@ -1319,7 +1319,7 @@ public: } /** - * This method clears any previously set radio type on the message. + * Clears any previously set radio type on the message. * * After calling this method, `IsRadioTypeSet()` returns false until radio type is set (`SetRadioType()`). * @@ -1419,7 +1419,7 @@ private: }; /** - * This class implements a message queue. + * Implements a message queue. * */ class MessageQueue : public otMessageQueue @@ -1431,7 +1431,7 @@ public: typedef otMessageQueueInfo Info; ///< This struct represents info (number of messages/buffers) about a queue. /** - * This enumeration represents a position (head or tail) in the queue. This is used to specify where a new message + * Represents a position (head or tail) in the queue. This is used to specify where a new message * should be added in the queue. * */ @@ -1442,13 +1442,13 @@ public: }; /** - * This constructor initializes the message queue. + * Initializes the message queue. * */ MessageQueue(void) { SetTail(nullptr); } /** - * This method returns a pointer to the first message. + * Returns a pointer to the first message. * * @returns A pointer to the first message. * @@ -1456,7 +1456,7 @@ public: Message *GetHead(void) { return Message::NextOf(GetTail()); } /** - * This method returns a pointer to the first message. + * Returns a pointer to the first message. * * @returns A pointer to the first message. * @@ -1464,7 +1464,7 @@ public: const Message *GetHead(void) const { return Message::NextOf(GetTail()); } /** - * This method adds a message to the end of the list. + * Adds a message to the end of the list. * * @param[in] aMessage The message to add. * @@ -1472,7 +1472,7 @@ public: void Enqueue(Message &aMessage) { Enqueue(aMessage, kQueuePositionTail); } /** - * This method adds a message at a given position (head/tail) of the list. + * Adds a message at a given position (head/tail) of the list. * * @param[in] aMessage The message to add. * @param[in] aPosition The position (head or tail) where to add the message. @@ -1481,7 +1481,7 @@ public: void Enqueue(Message &aMessage, QueuePosition aPosition); /** - * This method removes a message from the list. + * Removes a message from the list. * * @param[in] aMessage The message to remove. * @@ -1489,7 +1489,7 @@ public: void Dequeue(Message &aMessage); /** - * This method removes a message from the queue and frees it. + * Removes a message from the queue and frees it. * * @param[in] aMessage The message to remove and free. * @@ -1497,15 +1497,15 @@ public: void DequeueAndFree(Message &aMessage); /** - * This method removes and frees all messages from the queue. + * Removes and frees all messages from the queue. * */ void DequeueAndFreeAll(void); /** - * This method gets the information about number of messages and buffers in the queue. + * Gets the information about number of messages and buffers in the queue. * - * This method updates `aInfo` and adds number of message/buffers in the message queue to the corresponding member + * Updates `aInfo` and adds number of message/buffers in the message queue to the corresponding member * variable in `aInfo`. The caller needs to make sure `aInfo` is initialized before calling this method (e.g., * clearing `aInfo`). Same `aInfo` can be passed in multiple calls of `GetInfo(aInfo)` on different queues to add * up the number of messages/buffers on different queues. @@ -1533,7 +1533,7 @@ private: }; /** - * This class implements a priority queue. + * Implements a priority queue. * */ class PriorityQueue : private Clearable @@ -1547,13 +1547,13 @@ public: typedef otMessageQueueInfo Info; ///< This struct represents info (number of messages/buffers) about a queue. /** - * This constructor initializes the priority queue. + * Initializes the priority queue. * */ PriorityQueue(void) { Clear(); } /** - * This method returns a pointer to the first message. + * Returns a pointer to the first message. * * @returns A pointer to the first message. * @@ -1561,7 +1561,7 @@ public: Message *GetHead(void) { return AsNonConst(AsConst(this)->GetHead()); } /** - * This method returns a pointer to the first message. + * Returns a pointer to the first message. * * @returns A pointer to the first message. * @@ -1569,7 +1569,7 @@ public: const Message *GetHead(void) const; /** - * This method returns a pointer to the first message for a given priority level. + * Returns a pointer to the first message for a given priority level. * * @param[in] aPriority Priority level. * @@ -1583,7 +1583,7 @@ public: } /** - * This method returns a pointer to the first message for a given priority level. + * Returns a pointer to the first message for a given priority level. * * @param[in] aPriority Priority level. * @@ -1594,7 +1594,7 @@ public: const Message *GetHeadForPriority(Message::Priority aPriority) const; /** - * This method adds a message to the queue. + * Adds a message to the queue. * * @param[in] aMessage The message to add. * @@ -1602,7 +1602,7 @@ public: void Enqueue(Message &aMessage); /** - * This method removes a message from the list. + * Removes a message from the list. * * @param[in] aMessage The message to remove. * @@ -1610,7 +1610,7 @@ public: void Dequeue(Message &aMessage); /** - * This method removes a message from the queue and frees it. + * Removes a message from the queue and frees it. * * @param[in] aMessage The message to remove and free. * @@ -1618,13 +1618,13 @@ public: void DequeueAndFree(Message &aMessage); /** - * This method removes and frees all messages from the queue. + * Removes and frees all messages from the queue. * */ void DequeueAndFreeAll(void); /** - * This method returns the tail of the list (last message in the list). + * Returns the tail of the list (last message in the list). * * @returns A pointer to the tail of the list. * @@ -1632,7 +1632,7 @@ public: Message *GetTail(void) { return AsNonConst(AsConst(this)->GetTail()); } /** - * This method returns the tail of the list (last message in the list). + * Returns the tail of the list (last message in the list). * * @returns A pointer to the tail of the list. * @@ -1640,9 +1640,9 @@ public: const Message *GetTail(void) const; /** - * This method gets the information about number of messages and buffers in the priority queue. + * Gets the information about number of messages and buffers in the priority queue. * - * This method updates `aInfo` array and adds number of message/buffers in the message queue to the corresponding + * Updates `aInfo` array and adds number of message/buffers in the message queue to the corresponding * member variable in `aInfo`. The caller needs to make sure `aInfo` is initialized before calling this method * (e.g., clearing `aInfo`). Same `aInfo` can be passed in multiple calls of `GetInfo(aInfo)` on different queues * to add up the number of messages/buffers on different queues. @@ -1680,7 +1680,7 @@ private: }; /** - * This class represents a message pool + * Represents a message pool * */ class MessagePool : public InstanceLocator, private NonCopyable @@ -1691,13 +1691,13 @@ class MessagePool : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * */ explicit MessagePool(Instance &aInstance); /** - * This method allocates a new message with specified settings. + * Allocates a new message with specified settings. * * @param[in] aType The message type. * @param[in] aReserveHeader The number of header bytes to reserve. @@ -1709,7 +1709,7 @@ public: Message *Allocate(Message::Type aType, uint16_t aReserveHeader, const Message::Settings &aSettings); /** - * This method allocates a new message of a given type using default settings. + * Allocates a new message of a given type using default settings. * * @param[in] aType The message type. * @@ -1719,7 +1719,7 @@ public: Message *Allocate(Message::Type aType); /** - * This method allocates a new message with a given type and reserved length using default settings. + * Allocates a new message with a given type and reserved length using default settings. * * @param[in] aType The message type. * @param[in] aReserveHeader The number of header bytes to reserve. @@ -1730,7 +1730,7 @@ public: Message *Allocate(Message::Type aType, uint16_t aReserveHeader); /** - * This method is used to free a message and return all message buffers to the buffer pool. + * Is used to free a message and return all message buffers to the buffer pool. * * @param[in] aMessage The message to free. * @@ -1738,7 +1738,7 @@ public: void Free(Message *aMessage); /** - * This method returns the number of free buffers. + * Returns the number of free buffers. * * @returns The number of free buffers, or 0xffff (UINT16_MAX) if number is unknown. * @@ -1746,7 +1746,7 @@ public: uint16_t GetFreeBufferCount(void) const; /** - * This method returns the total number of buffers. + * Returns the total number of buffers. * * @returns The total number of buffers, or 0xffff (UINT16_MAX) if number is unknown. * @@ -1754,7 +1754,7 @@ public: uint16_t GetTotalBufferCount(void) const; /** - * This method returns the maximum number of buffers in use at the same time since OT stack initialization or + * Returns the maximum number of buffers in use at the same time since OT stack initialization or * since last call to `ResetMaxUsedBufferCount()`. * * @returns The maximum number of buffers in use at the same time so far (buffer allocation watermark). @@ -1763,7 +1763,7 @@ public: uint16_t GetMaxUsedBufferCount(void) const { return mMaxAllocated; } /** - * This method resets the tracked maximum number of buffers in use. + * Resets the tracked maximum number of buffers in use. * * @sa GetMaxUsedBufferCount * diff --git a/src/core/common/non_copyable.hpp b/src/core/common/non_copyable.hpp index b6e44fead..bc6fb42f8 100644 --- a/src/core/common/non_copyable.hpp +++ b/src/core/common/non_copyable.hpp @@ -37,7 +37,7 @@ namespace ot { /** - * This class makes any class that derives from it non-copyable. It is intended to be used as a private base class. + * Makes any class that derives from it non-copyable. It is intended to be used as a private base class. * */ class NonCopyable diff --git a/src/core/common/notifier.hpp b/src/core/common/notifier.hpp index cd05f2dc5..02efc21d3 100644 --- a/src/core/common/notifier.hpp +++ b/src/core/common/notifier.hpp @@ -61,7 +61,7 @@ namespace ot { */ /** - * This enumeration type represents events emitted from OpenThread Notifier. + * Type represents events emitted from OpenThread Notifier. * */ enum Event : uint32_t @@ -100,20 +100,20 @@ enum Event : uint32_t }; /** - * This type represents a list of events. + * Represents a list of events. * */ class Events { public: /** - * This type represents a bit-field indicating a list of events (with values from `Event`) + * Represents a bit-field indicating a list of events (with values from `Event`) * */ typedef otChangedFlags Flags; /** - * This constructor initializes the `Events` list (as empty). + * Initializes the `Events` list (as empty). * */ Events(void) @@ -122,13 +122,13 @@ public: } /** - * This method clears the `Events` list. + * Clears the `Events` list. * */ void Clear(void) { mEventFlags = 0; } /** - * This method indicates whether the `Events` list contains a given event. + * Indicates whether the `Events` list contains a given event. * * @param[in] aEvent The event to check. * @@ -138,7 +138,7 @@ public: bool Contains(Event aEvent) const { return (mEventFlags & aEvent) != 0; } /** - * This method indicates whether the `Events` list contains any of a given set of events. + * Indicates whether the `Events` list contains any of a given set of events. * * @param[in] aEvents The events set to check (must be a collection of `Event` constants combined using `|`). * @@ -148,7 +148,7 @@ public: bool ContainsAny(Flags aEvents) const { return (mEventFlags & aEvents) != 0; } /** - * This method indicates whether the `Events` list contains all of a given set of events. + * Indicates whether the `Events` list contains all of a given set of events. * * @param[in] aEvents The events set to check (must be collection of `Event` constants combined using `|`). * @@ -158,7 +158,7 @@ public: bool ContainsAll(Flags aEvents) const { return (mEventFlags & aEvents) == aEvents; } /** - * This method adds a given event to the `Events` list. + * Adds a given event to the `Events` list. * * @param[in] aEvent The event to add. * @@ -166,7 +166,7 @@ public: void Add(Event aEvent) { mEventFlags |= aEvent; } /** - * This method indicates whether the `Events` list is empty. + * Indicates whether the `Events` list is empty. * * @returns TRUE if the list is empty, FALSE otherwise. * @@ -174,7 +174,7 @@ public: bool IsEmpty(void) const { return (mEventFlags == 0); } /** - * This method gets the `Events` list as bit-field `Flags` value. + * Gets the `Events` list as bit-field `Flags` value. * * @returns The list as bit-field `Flags` value. * @@ -186,7 +186,7 @@ private: }; /** - * This class implements the OpenThread Notifier. + * Implements the OpenThread Notifier. * * For core internal modules, `Notifier` class emits events directly to them by invoking method `HandleNotifierEvents()` * on the module instance. @@ -200,7 +200,7 @@ class Notifier : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes a `Notifier` instance. + * Initializes a `Notifier` instance. * * @param[in] aInstance A reference to OpenThread instance. * @@ -208,7 +208,7 @@ public: explicit Notifier(Instance &aInstance); /** - * This method registers an `otStateChangedCallback` handler. + * Registers an `otStateChangedCallback` handler. * * @param[in] aCallback A pointer to the handler function that is called to notify of the changes. * @param[in] aContext A pointer to arbitrary context information. @@ -221,7 +221,7 @@ public: Error RegisterCallback(otStateChangedCallback aCallback, void *aContext); /** - * This method removes/unregisters a previously registered `otStateChangedCallback` handler. + * Removes/unregisters a previously registered `otStateChangedCallback` handler. * * @param[in] aCallback A pointer to the callback function pointer. * @param[in] aContext A pointer to arbitrary context information. @@ -230,7 +230,7 @@ public: void RemoveCallback(otStateChangedCallback aCallback, void *aContext); /** - * This method schedules signaling of an event. + * Schedules signaling of an event. * * @param[in] aEvent The event to signal. * @@ -238,7 +238,7 @@ public: void Signal(Event aEvent); /** - * This method schedules signaling of am event only if the event has not been signaled before (first time signal). + * Schedules signaling of am event only if the event has not been signaled before (first time signal). * * @param[in] aEvent The event to signal. * @@ -246,7 +246,7 @@ public: void SignalIfFirst(Event aEvent); /** - * This method indicates whether or not an event signal callback is pending/scheduled. + * Indicates whether or not an event signal callback is pending/scheduled. * * @returns TRUE if a callback is pending, FALSE otherwise. * @@ -254,7 +254,7 @@ public: bool IsPending(void) const { return !mEventsToSignal.IsEmpty(); } /** - * This method indicates whether or not an event has been signaled before. + * Indicates whether or not an event has been signaled before. * * @param[in] aEvent The event to check. * @@ -265,7 +265,7 @@ public: bool HasSignaled(Event aEvent) const { return mSignaledEvents.Contains(aEvent); } /** - * This template method updates a variable of a type `Type` with a new value and signals the given event. + * Updates a variable of a type `Type` with a new value and signals the given event. * * If the variable is already set to the same value, this method returns `kErrorAlready` and the event is * signaled using `SignalIfFirst()` (i.e., signal is scheduled only if event has not been signaled before). diff --git a/src/core/common/num_utils.hpp b/src/core/common/num_utils.hpp index dff0ce113..6e4b81e6c 100644 --- a/src/core/common/num_utils.hpp +++ b/src/core/common/num_utils.hpp @@ -182,7 +182,7 @@ template inline IntType DivideAndRoundToClosest(IntType aDivi } /** - * This function casts a given `uint32_t` to `unsigned long`. + * Casts a given `uint32_t` to `unsigned long`. * * @param[in] aUint32 A `uint32_t` value. * @@ -192,7 +192,7 @@ template inline IntType DivideAndRoundToClosest(IntType aDivi inline unsigned long ToUlong(uint32_t aUint32) { return static_cast(aUint32); } /** - * This function counts the number of `1` bits in the binary representation of a given unsigned int bit-mask value. + * Counts the number of `1` bits in the binary representation of a given unsigned int bit-mask value. * * @tparam UintType The unsigned int type (MUST be `uint8_t`, uint16_t`, uint32_t`, or `uint64_t`). * diff --git a/src/core/common/numeric_limits.hpp b/src/core/common/numeric_limits.hpp index de3fa137f..35e984394 100644 --- a/src/core/common/numeric_limits.hpp +++ b/src/core/common/numeric_limits.hpp @@ -39,7 +39,7 @@ namespace ot { /** - * This class template provides a way to query properties of arithmetic types. + * Provides a way to query properties of arithmetic types. * * There are no members if `Type` is not a supported arithmetic type. * diff --git a/src/core/common/owned_ptr.hpp b/src/core/common/owned_ptr.hpp index c1dde762b..b46c17a9d 100644 --- a/src/core/common/owned_ptr.hpp +++ b/src/core/common/owned_ptr.hpp @@ -41,7 +41,7 @@ namespace ot { /** - * This template class represents an owned smart pointer. + * Represents an owned smart pointer. * * `OwnedPtr` acts as sole owner of the object it manages. An `OwnedPtr` is non-copyable (copy constructor is deleted) * but the ownership can be transferred from one `OwnedPtr` to another using move semantics. @@ -63,7 +63,7 @@ public: OwnedPtr(void) = default; /** - * This constructor initializes the `OwnedPtr` with a given pointer. + * Initializes the `OwnedPtr` with a given pointer. * * The `OwnedPtr` takes the ownership of the object at @p aPointer. * @@ -76,7 +76,7 @@ public: } /** - * This constructor initializes the `OwnedPtr` from another `OwnedPtr` using move semantics. + * Initializes the `OwnedPtr` from another `OwnedPtr` using move semantics. * * The `OwnedPtr` takes over the ownership of the object from @p aOther. After this call, @p aOther will be null. * @@ -98,9 +98,9 @@ public: ~OwnedPtr(void) { Delete(); } /** - * This method frees the owned object (if any). + * Frees the owned object (if any). * - * This method invokes `Free()` method on the `Type` object owned by `OwnedPtr` (if any). It will also set the + * Invokes `Free()` method on the `Type` object owned by `OwnedPtr` (if any). It will also set the * `OwnedPtr` to null. * */ @@ -111,7 +111,7 @@ public: } /** - * This method frees the current object owned by `OwnedPtr` (if any) and replaces it with a new one. + * Frees the current object owned by `OwnedPtr` (if any) and replaces it with a new one. * * The method will `Free()` the current object managed by `OwnedPtr` (if different from @p aPointer) before taking * the ownership of the object at @p aPointer. The method correctly handles a self `Reset()` (i.e., @p aPointer @@ -130,7 +130,7 @@ public: } /** - * This method releases the ownership of the current object in `OwnedPtr` (if any). + * Releases the ownership of the current object in `OwnedPtr` (if any). * * After this call, the `OwnedPtr` will be null. * @@ -145,7 +145,7 @@ public: } /** - * This method allows passing of the ownership to another `OwnedPtr` using move semantics. + * Allows passing of the ownership to another `OwnedPtr` using move semantics. * * @returns An rvalue reference of the pointer to move from. * @@ -153,7 +153,7 @@ public: OwnedPtr &&PassOwnership(void) { return static_cast(*this); } /** - * This method overload the assignment operator `=` to replace the object owned by the `OwnedPtr` with another one + * Overload the assignment operator `=` to replace the object owned by the `OwnedPtr` with another one * using move semantics. * * The `OwnedPtr` first frees its current owned object (if there is any and it is different from @p aOther) before diff --git a/src/core/common/owning_list.hpp b/src/core/common/owning_list.hpp index 3b73fe6eb..583bc6859 100644 --- a/src/core/common/owning_list.hpp +++ b/src/core/common/owning_list.hpp @@ -43,7 +43,7 @@ namespace ot { /** - * This template class represents a singly linked list which owns its entries and frees them upon destruction of the + * Represents a singly linked list which owns its entries and frees them upon destruction of the * list. * */ @@ -68,7 +68,7 @@ public: ~OwningList(void) { Free(); } /** - * This method clears the list and frees all existing entries in it. + * Clears the list and frees all existing entries in it. * */ void Free(void) @@ -79,13 +79,13 @@ public: } /** - * This method clears the list and frees all existing entries in it. + * Clears the list and frees all existing entries in it. * */ void Clear(void) { Free(); } /** - * This method pops an entry from head of the linked list and return an `OwnedPtr` to it. + * Pops an entry from head of the linked list and return an `OwnedPtr` to it. * * @note This method does not change the popped entry itself, i.e., the popped entry next pointer stays as before. * @@ -95,7 +95,7 @@ public: OwnedPtr Pop(void) { return OwnedPtr(LinkedList::Pop()); } /** - * This method pops an entry after a given previous entry. + * Pops an entry after a given previous entry. * * @note This method does not change the popped entry itself, i.e., the popped entry next pointer stays as before. * @@ -108,7 +108,7 @@ public: OwnedPtr PopAfter(Type *aPrevEntry) { return OwnedPtr(LinkedList::PopAfter(aPrevEntry)); } /** - * This template method removes an entry matching a given entry indicator from the linked list. + * Removes an entry matching a given entry indicator from the linked list. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries * in the list. To check that an entry matches the given indicator, the `Matches()` method is invoked on each @@ -130,7 +130,7 @@ public: } /** - * This template method removes all entries in the list matching a given entry indicator from the list and adds + * Removes all entries in the list matching a given entry indicator from the list and adds * them to a new list. * * The template type `Indicator` specifies the type of @p aIndicator object which is used to match against entries diff --git a/src/core/common/pool.hpp b/src/core/common/pool.hpp index 4a0f0e542..926c56a15 100644 --- a/src/core/common/pool.hpp +++ b/src/core/common/pool.hpp @@ -55,7 +55,7 @@ class Instance; */ /** - * This template class represents an object pool. + * Represents an object pool. * * @tparam Type The object type. Type should provide `GetNext() and `SetNext()` so that it can be added to a * linked list. @@ -66,7 +66,7 @@ template class Pool : private NonCopyable { public: /** - * This constructor initializes the pool. + * Initializes the pool. * */ Pool(void) @@ -79,9 +79,9 @@ public: } /** - * This constructor initializes the pool. + * Initializes the pool. * - * This constructor version requires the `Type` class to provide method `void Init(Instance &)` to initialize + * Version requires the `Type` class to provide method `void Init(Instance &)` to initialize * each `Type` entry object. This can be realized by the `Type` class inheriting from `InstanceLocatorInit()`. * * @param[in] aInstance A reference to the OpenThread instance. @@ -98,7 +98,7 @@ public: } /** - * This method allocates a new object from the pool. + * Allocates a new object from the pool. * * @returns A pointer to the newly allocated object, or `nullptr` if all entries from the pool are already * allocated. @@ -107,7 +107,7 @@ public: Type *Allocate(void) { return mFreeList.Pop(); } /** - * This method frees a previously allocated object. + * Frees a previously allocated object. * * The @p aEntry MUST be an entry from the pool previously allocated using `Allocate()` method and not yet freed. * An already freed entry MUST not be freed again. @@ -118,7 +118,7 @@ public: void Free(Type &aEntry) { mFreeList.Push(aEntry); } /** - * This method frees all previously allocated objects. + * Frees all previously allocated objects. * */ void FreeAll(void) @@ -132,7 +132,7 @@ public: } /** - * This method returns the pool size. + * Returns the pool size. * * @returns The pool size (maximum number of objects in the pool). * @@ -140,7 +140,7 @@ public: uint16_t GetSize(void) const { return kPoolSize; } /** - * This method indicates whether or not a given `Type` object is from the pool. + * Indicates whether or not a given `Type` object is from the pool. * * @param[in] aObject A reference to a `Type` object. * @@ -151,7 +151,7 @@ public: bool IsPoolEntry(const Type &aObject) const { return (&mPool[0] <= &aObject) && (&aObject < GetArrayEnd(mPool)); } /** - * This method returns the associated index of a given entry from the pool. + * Returns the associated index of a given entry from the pool. * * The @p aEntry MUST be from the pool, otherwise the behavior of this method is undefined. * @@ -163,7 +163,7 @@ public: uint16_t GetIndexOf(const Type &aEntry) const { return static_cast(&aEntry - mPool); } /** - * This method retrieves a pool entry at a given index. + * Retrieves a pool entry at a given index. * * The @p aIndex MUST be from an earlier call to `GetIndexOf()`. * @@ -175,7 +175,7 @@ public: Type &GetEntryAt(uint16_t aIndex) { return mPool[aIndex]; } /** - * This method retrieves a pool entry at a given index. + * Retrieves a pool entry at a given index. * * The @p aIndex MUST be from an earlier call to `GetIndexOf()`. * diff --git a/src/core/common/preference.hpp b/src/core/common/preference.hpp index cf0657dd7..5919a8f47 100644 --- a/src/core/common/preference.hpp +++ b/src/core/common/preference.hpp @@ -42,7 +42,7 @@ namespace ot { /** - * This class provides constants and static methods to convert between `int8_t` preference and its 2-bit unsigned + * Provides constants and static methods to convert between `int8_t` preference and its 2-bit unsigned * representation. * */ @@ -54,7 +54,7 @@ public: static constexpr int8_t kLow = -1; ///< Low preference. /** - * This static method converts a signed preference value to its corresponding 2-bit `uint8_t` value. + * Converts a signed preference value to its corresponding 2-bit `uint8_t` value. * * A positive @p aPrf is mapped to "High Preference", a negative @p aPrf is mapped to "Low Preference", and * zero @p aPrf is mapped to "Medium Preference". @@ -67,7 +67,7 @@ public: static uint8_t To2BitUint(int8_t aPrf); /** - * This static method converts a 2-bit `uint8_t` value to a signed preference value `kHigh`, `kMedium`, and `kLow`. + * Converts a 2-bit `uint8_t` value to a signed preference value `kHigh`, `kMedium`, and `kLow`. * * Only the first two bits (LSB) of @p a2BitUint are used and the rest of the bits are ignored. * @@ -86,7 +86,7 @@ public: static int8_t From2BitUint(uint8_t a2BitUint); /** - * This static method indicates whether a given `int8_t` preference value is valid, i.e., whether it has of the + * Indicates whether a given `int8_t` preference value is valid, i.e., whether it has of the * three values `kHigh`, `kMedium`, or `kLow`. * * @param[in] aPrf The signed preference value to check. @@ -98,7 +98,7 @@ public: static bool IsValid(int8_t aPrf); /** - * This static method indicates whether a given 2-bit `uint8_t` preference value is valid. + * Indicates whether a given 2-bit `uint8_t` preference value is valid. * * @param[in] a2BitUint The 2-bit unsigned value to convert from. Only two LSB bits are used and the reset are * ignored. @@ -110,7 +110,7 @@ public: static bool Is2BitUintValid(uint8_t a2BitUint) { return ((a2BitUint & k2BitMask) != k2BitReserved); } /** - * This static method converts a given preference to a human-readable string. + * Converts a given preference to a human-readable string. * * @param[in] aPrf The preference to convert. * diff --git a/src/core/common/ptr_wrapper.hpp b/src/core/common/ptr_wrapper.hpp index 3704d76ce..eea318120 100644 --- a/src/core/common/ptr_wrapper.hpp +++ b/src/core/common/ptr_wrapper.hpp @@ -42,7 +42,7 @@ namespace ot { /** - * This template class represents a wrapper over a pointer. + * Represents a wrapper over a pointer. * * This is intended as base class of `OwnedPtr` or `RetainPtr` providing common simple methods. * @@ -62,7 +62,7 @@ public: } /** - * This constructor initializes the `Ptr` with a given pointer. + * Initializes the `Ptr` with a given pointer. * * @param[in] aPointer A pointer to initialize with. * @@ -73,7 +73,7 @@ public: } /** - * This method indicates whether the `Ptr` is null or not. + * Indicates whether the `Ptr` is null or not. * * @retval TRUE The `Ptr` is null. * @retval FALSE The `Ptr` is not null. @@ -82,7 +82,7 @@ public: bool IsNull(void) const { return (mPointer == nullptr); } /** - * This method gets the wrapped pointer. + * Gets the wrapped pointer. * * @returns The wrapped pointer. * @@ -90,7 +90,7 @@ public: Type *Get(void) { return mPointer; } /** - * This method gets the wrapped pointer. + * Gets the wrapped pointer. * * @returns The wrapped pointer. * @@ -98,7 +98,7 @@ public: const Type *Get(void) const { return mPointer; } /** - * This method overloads the `->` dereference operator and returns the pointer. + * Overloads the `->` dereference operator and returns the pointer. * * @returns The wrapped pointer. * @@ -106,7 +106,7 @@ public: Type *operator->(void) { return mPointer; } /** - * This method overloads the `->` dereference operator and returns the pointer. + * Overloads the `->` dereference operator and returns the pointer. * * @returns The wrapped pointer. * @@ -114,7 +114,7 @@ public: const Type *operator->(void) const { return mPointer; } /** - * This method overloads the `*` dereference operator and returns a reference to the pointed object. + * Overloads the `*` dereference operator and returns a reference to the pointed object. * * The behavior is undefined if `IsNull() == true`. * @@ -124,7 +124,7 @@ public: Type &operator*(void) { return *mPointer; } /** - * This method overloads the `*` dereference operator and returns a reference to the pointed object. + * Overloads the `*` dereference operator and returns a reference to the pointed object. * * The behavior is undefined if `IsNull() == true`. * @@ -134,7 +134,7 @@ public: const Type &operator*(void) const { return *mPointer; } /** - * This method overloads the operator `==` to compare the `Ptr` with a given pointer. + * Overloads the operator `==` to compare the `Ptr` with a given pointer. * * @param[in] aPointer The pointer to compare with. * @@ -145,7 +145,7 @@ public: bool operator==(const Type *aPointer) const { return (mPointer == aPointer); } /** - * This method overloads the operator `!=` to compare the `Ptr` with a given pointer. + * Overloads the operator `!=` to compare the `Ptr` with a given pointer. * * @param[in] aPointer The pointer to compare with. * @@ -156,7 +156,7 @@ public: bool operator!=(const Type *aPointer) const { return (mPointer != aPointer); } /** - * This method overloads the operator `==` to compare the `Ptr` with another `Ptr`. + * Overloads the operator `==` to compare the `Ptr` with another `Ptr`. * * @param[in] aOther The other `Ptr` to compare with. * @@ -167,7 +167,7 @@ public: bool operator==(const Ptr &aOther) const { return (mPointer == aOther.mPointer); } /** - * This method overloads the operator `!=` to compare the `Ptr` with another `Ptr`. + * Overloads the operator `!=` to compare the `Ptr` with another `Ptr`. * * @param[in] aOther The other `Ptr` to compare with. * diff --git a/src/core/common/random.hpp b/src/core/common/random.hpp index 01fb982bf..baf8f7d93 100644 --- a/src/core/common/random.hpp +++ b/src/core/common/random.hpp @@ -48,14 +48,14 @@ namespace ot { namespace Random { /** - * This class manages random number generator initialization/deinitialization. + * Manages random number generator initialization/deinitialization. * */ class Manager : private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * */ Manager(void); @@ -67,7 +67,7 @@ public: ~Manager(void); /** - * This static method generates and returns a random value using a non-crypto Pseudo Random Number Generator. + * Generates and returns a random value using a non-crypto Pseudo Random Number Generator. * * @returns A random `uint32_t` value. * @@ -76,7 +76,7 @@ public: #if !OPENTHREAD_RADIO /** - * This static method fills a given buffer with cryptographically secure random bytes. + * Fills a given buffer with cryptographically secure random bytes. * * @param[out] aBuffer A pointer to a buffer to fill with the random bytes. * @param[in] aSize Size of buffer (number of bytes to fill). @@ -105,7 +105,7 @@ private: namespace NonCrypto { /** - * This function generates and returns a random `uint32_t` value. + * Generates and returns a random `uint32_t` value. * * @returns A random `uint32_t` value. * @@ -113,7 +113,7 @@ namespace NonCrypto { inline uint32_t GetUint32(void) { return Manager::NonCryptoGetUint32(); } /** - * This function generates and returns a random byte. + * Generates and returns a random byte. * * @returns A random `uint8_t` value. * @@ -121,7 +121,7 @@ inline uint32_t GetUint32(void) { return Manager::NonCryptoGetUint32(); } inline uint8_t GetUint8(void) { return static_cast(GetUint32() & 0xff); } /** - * This function generates and returns a random `uint16_t` value. + * Generates and returns a random `uint16_t` value. * * @returns A random `uint16_t` value. * @@ -129,7 +129,7 @@ inline uint8_t GetUint8(void) { return static_cast(GetUint32() & 0xff); inline uint16_t GetUint16(void) { return static_cast(GetUint32() & 0xffff); } /** - * This function generates and returns a random `uint8_t` value within a given range `[aMin, aMax)`. + * Generates and returns a random `uint8_t` value within a given range `[aMin, aMax)`. * * @param[in] aMin A minimum value (this value can be included in returned random result). * @param[in] aMax A maximum value (this value is excluded from returned random result). @@ -140,7 +140,7 @@ inline uint16_t GetUint16(void) { return static_cast(GetUint32() & 0xf uint8_t GetUint8InRange(uint8_t aMin, uint8_t aMax); /** - * This function generates and returns a random `uint16_t` value within a given range `[aMin, aMax)`. + * Generates and returns a random `uint16_t` value within a given range `[aMin, aMax)`. * * @note The returned random value can include the @p aMin value but excludes the @p aMax. * @@ -153,7 +153,7 @@ uint8_t GetUint8InRange(uint8_t aMin, uint8_t aMax); uint16_t GetUint16InRange(uint16_t aMin, uint16_t aMax); /** - * This function generates and returns a random `uint32_t` value within a given range `[aMin, aMax)`. + * Generates and returns a random `uint32_t` value within a given range `[aMin, aMax)`. * * @note The returned random value can include the @p aMin value but excludes the @p aMax. * @@ -166,7 +166,7 @@ uint16_t GetUint16InRange(uint16_t aMin, uint16_t aMax); uint32_t GetUint32InRange(uint32_t aMin, uint32_t aMax); /** - * This function fills a given buffer with random bytes. + * Fills a given buffer with random bytes. * * @param[out] aBuffer A pointer to a buffer to fill with the random bytes. * @param[in] aSize Size of buffer (number of bytes to fill). @@ -175,7 +175,7 @@ uint32_t GetUint32InRange(uint32_t aMin, uint32_t aMax); void FillBuffer(uint8_t *aBuffer, uint16_t aSize); /** - * This function adds a random jitter within a given range to a given value. + * Adds a random jitter within a given range to a given value. * * @param[in] aValue A value to which the random jitter is added. * @param[in] aJitter Maximum jitter. Random jitter is selected from the range `[-aJitter, aJitter]`. @@ -192,7 +192,7 @@ uint32_t AddJitter(uint32_t aValue, uint16_t aJitter); namespace Crypto { /** - * This function fills a given buffer with cryptographically secure random bytes. + * Fills a given buffer with cryptographically secure random bytes. * * @param[out] aBuffer A pointer to a buffer to fill with the random bytes. * @param[in] aSize Size of buffer (number of bytes to fill). diff --git a/src/core/common/retain_ptr.hpp b/src/core/common/retain_ptr.hpp index 5605ced58..207f4963e 100644 --- a/src/core/common/retain_ptr.hpp +++ b/src/core/common/retain_ptr.hpp @@ -41,7 +41,7 @@ namespace ot { /** - * This template class represents a retain (reference counted) smart pointer. + * Represents a retain (reference counted) smart pointer. * * The `Type` class MUST provide mechanism to track its current retain count. It MUST provide the following three * methods: @@ -67,7 +67,7 @@ public: RetainPtr(void) = default; /** - * This constructor initializes the `RetainPtr` with a given pointer. + * Initializes the `RetainPtr` with a given pointer. * * Upon construction the `RetainPtr` will increment the retain count on @p aPointer (if not null). * @@ -81,7 +81,7 @@ public: } /** - * This constructor initializes the `RetainPtr` from another `RetainPtr`. + * Initializes the `RetainPtr` from another `RetainPtr`. * * @param[in] aOther Another `RetainPtr`. * @@ -102,7 +102,7 @@ public: ~RetainPtr(void) { DecrementRetainCount(); } /** - * This method replaces the managed object by `RetainPtr` with a new one. + * Replaces the managed object by `RetainPtr` with a new one. * * The method correctly handles a self `Reset()` (i.e., @p aPointer being the same pointer as the one currently * managed by `RetainPtr`). @@ -121,7 +121,7 @@ public: } /** - * This method releases the ownership of the current pointer in `RetainPtr` (if any) without changing its retain + * Releases the ownership of the current pointer in `RetainPtr` (if any) without changing its retain * count. * * After this call, the `RetainPtr` will be null. @@ -137,7 +137,7 @@ public: } /** - * This method overloads the assignment operator `=`. + * Overloads the assignment operator `=`. * * The `RetainPtr` first frees its current managed object (if there is any and it is different from @p aOther) * before taking over the ownership of the object from @p aOther. This method correctly handles a self assignment @@ -173,7 +173,7 @@ private: }; /** - * This class provides mechanism to track retain count. + * Provides mechanism to track retain count. * */ class RetainCountable @@ -191,7 +191,7 @@ protected: } /** - * This method returns the current retain count. + * Returns the current retain count. * * @returns The current retain count. * @@ -199,13 +199,13 @@ protected: uint16_t GetRetainCount(void) const { return mRetainCount; } /** - * This method increments the retain count. + * Increments the retain count. * */ void IncrementRetainCount(void) { ++mRetainCount; } /** - * This method decrements the retain count. + * Decrements the retain count. * * @returns The retain count value after decrementing it. * diff --git a/src/core/common/serial_number.hpp b/src/core/common/serial_number.hpp index 39f116643..07e536c3b 100644 --- a/src/core/common/serial_number.hpp +++ b/src/core/common/serial_number.hpp @@ -47,7 +47,7 @@ class SerialNumber { public: /** - * This static method indicates whether or not a first serial number is strictly less than a second serial number. + * Indicates whether or not a first serial number is strictly less than a second serial number. * * The comparison takes into account the wrapping of serial number values (similar to RFC-1982). It is semantically * equivalent to `aFirst < aSecond`. @@ -74,7 +74,7 @@ public: } /** - * This static method indicates whether or not a first serial number is strictly greater than a second serial + * Indicates whether or not a first serial number is strictly greater than a second serial * number. * * The comparison takes into account the wrapping of serial number values (similar to RFC-1982). It is semantically diff --git a/src/core/common/settings.hpp b/src/core/common/settings.hpp index ec32e2734..f7f538136 100644 --- a/src/core/common/settings.hpp +++ b/src/core/common/settings.hpp @@ -59,9 +59,9 @@ namespace ot { class Settings; /** - * This class defines the base class used by `Settings` and `Settings::ChildInfoIterator`. + * Defines the base class used by `Settings` and `Settings::ChildInfoIterator`. * - * This class provides structure definitions for different settings keys. + * Provides structure definitions for different settings keys. * */ class SettingsBase : public InstanceLocator @@ -104,7 +104,7 @@ public: */ /** - * This enumeration defines the keys of settings. + * Defines the keys of settings. * */ enum Key : uint16_t @@ -130,7 +130,7 @@ public: "Core settings keys overlap with vendor reserved keys"); /** - * This structure represents the device's own network information for settings storage. + * Represents the device's own network information for settings storage. * */ OT_TOOL_PACKED_BEGIN @@ -143,7 +143,7 @@ public: static constexpr Key kKey = kKeyNetworkInfo; ///< The associated key. /** - * This method initializes the `NetworkInfo` object. + * Initializes the `NetworkInfo` object. * */ void Init(void) @@ -153,7 +153,7 @@ public: } /** - * This method returns the Thread role. + * Returns the Thread role. * * @returns The Thread role. * @@ -161,7 +161,7 @@ public: uint8_t GetRole(void) const { return mRole; } /** - * This method sets the Thread role. + * Sets the Thread role. * * @param[in] aRole The Thread Role. * @@ -169,7 +169,7 @@ public: void SetRole(uint8_t aRole) { mRole = aRole; } /** - * This method returns the Thread device mode. + * Returns the Thread device mode. * * @returns the Thread device mode. * @@ -177,7 +177,7 @@ public: uint8_t GetDeviceMode(void) const { return mDeviceMode; } /** - * This method sets the Thread device mode. + * Sets the Thread device mode. * * @param[in] aDeviceMode The Thread device mode. * @@ -185,7 +185,7 @@ public: void SetDeviceMode(uint8_t aDeviceMode) { mDeviceMode = aDeviceMode; } /** - * This method returns the RLOC16. + * Returns the RLOC16. * * @returns The RLOC16. * @@ -193,7 +193,7 @@ public: uint16_t GetRloc16(void) const { return Encoding::LittleEndian::HostSwap16(mRloc16); } /** - * This method sets the RLOC16. + * Sets the RLOC16. * * @param[in] aRloc16 The RLOC16. * @@ -201,7 +201,7 @@ public: void SetRloc16(uint16_t aRloc16) { mRloc16 = Encoding::LittleEndian::HostSwap16(aRloc16); } /** - * This method returns the key sequence. + * Returns the key sequence. * * @returns The key sequence. * @@ -209,7 +209,7 @@ public: uint32_t GetKeySequence(void) const { return Encoding::LittleEndian::HostSwap32(mKeySequence); } /** - * This method sets the key sequence. + * Sets the key sequence. * * @param[in] aKeySequence The key sequence. * @@ -217,7 +217,7 @@ public: void SetKeySequence(uint32_t aKeySequence) { mKeySequence = Encoding::LittleEndian::HostSwap32(aKeySequence); } /** - * This method returns the MLE frame counter. + * Returns the MLE frame counter. * * @returns The MLE frame counter. * @@ -225,7 +225,7 @@ public: uint32_t GetMleFrameCounter(void) const { return Encoding::LittleEndian::HostSwap32(mMleFrameCounter); } /** - * This method sets the MLE frame counter. + * Sets the MLE frame counter. * * @param[in] aMleFrameCounter The MLE frame counter. * @@ -236,7 +236,7 @@ public: } /** - * This method returns the MAC frame counter. + * Returns the MAC frame counter. * * @returns The MAC frame counter. * @@ -244,7 +244,7 @@ public: uint32_t GetMacFrameCounter(void) const { return Encoding::LittleEndian::HostSwap32(mMacFrameCounter); } /** - * This method sets the MAC frame counter. + * Sets the MAC frame counter. * * @param[in] aMacFrameCounter The MAC frame counter. * @@ -255,7 +255,7 @@ public: } /** - * This method returns the previous partition ID. + * Returns the previous partition ID. * * @returns The previous partition ID. * @@ -263,7 +263,7 @@ public: uint32_t GetPreviousPartitionId(void) const { return Encoding::LittleEndian::HostSwap32(mPreviousPartitionId); } /** - * This method sets the previous partition id. + * Sets the previous partition id. * * @param[in] aPreviousPartitionId The previous partition ID. * @@ -274,7 +274,7 @@ public: } /** - * This method returns the extended address. + * Returns the extended address. * * @returns The extended address. * @@ -282,7 +282,7 @@ public: const Mac::ExtAddress &GetExtAddress(void) const { return mExtAddress; } /** - * This method sets the extended address. + * Sets the extended address. * * @param[in] aExtAddress The extended address. * @@ -290,7 +290,7 @@ public: void SetExtAddress(const Mac::ExtAddress &aExtAddress) { mExtAddress = aExtAddress; } /** - * This method returns the Mesh Local Interface Identifier. + * Returns the Mesh Local Interface Identifier. * * @returns The Mesh Local Interface Identifier. * @@ -298,7 +298,7 @@ public: const Ip6::InterfaceIdentifier &GetMeshLocalIid(void) const { return mMlIid; } /** - * This method sets the Mesh Local Interface Identifier. + * Sets the Mesh Local Interface Identifier. * * @param[in] aMeshLocalIid The Mesh Local Interface Identifier. * @@ -306,7 +306,7 @@ public: void SetMeshLocalIid(const Ip6::InterfaceIdentifier &aMeshLocalIid) { mMlIid = aMeshLocalIid; } /** - * This method returns the Thread version. + * Returns the Thread version. * * @returns The Thread version. * @@ -314,7 +314,7 @@ public: uint16_t GetVersion(void) const { return Encoding::LittleEndian::HostSwap16(mVersion); } /** - * This method sets the Thread version. + * Sets the Thread version. * * @param[in] aVersion The Thread version. * @@ -337,7 +337,7 @@ public: } OT_TOOL_PACKED_END; /** - * This structure represents the parent information for settings storage. + * Represents the parent information for settings storage. * */ OT_TOOL_PACKED_BEGIN @@ -350,7 +350,7 @@ public: static constexpr Key kKey = kKeyParentInfo; ///< The associated key. /** - * This method initializes the `ParentInfo` object. + * Initializes the `ParentInfo` object. * */ void Init(void) @@ -360,7 +360,7 @@ public: } /** - * This method returns the extended address. + * Returns the extended address. * * @returns The extended address. * @@ -368,7 +368,7 @@ public: const Mac::ExtAddress &GetExtAddress(void) const { return mExtAddress; } /** - * This method sets the extended address. + * Sets the extended address. * * @param[in] aExtAddress The extended address. * @@ -376,7 +376,7 @@ public: void SetExtAddress(const Mac::ExtAddress &aExtAddress) { mExtAddress = aExtAddress; } /** - * This method returns the Thread version. + * Returns the Thread version. * * @returns The Thread version. * @@ -384,7 +384,7 @@ public: uint16_t GetVersion(void) const { return Encoding::LittleEndian::HostSwap16(mVersion); } /** - * This method sets the Thread version. + * Sets the Thread version. * * @param[in] aVersion The Thread version. * @@ -400,7 +400,7 @@ public: #if OPENTHREAD_FTD /** - * This structure represents the child information for settings storage. + * Represents the child information for settings storage. * */ OT_TOOL_PACKED_BEGIN @@ -412,7 +412,7 @@ public: static constexpr Key kKey = kKeyChildInfo; ///< The associated key. /** - * This method clears the struct object (setting all the fields to zero). + * Clears the struct object (setting all the fields to zero). * */ void Init(void) @@ -422,7 +422,7 @@ public: } /** - * This method returns the extended address. + * Returns the extended address. * * @returns The extended address. * @@ -430,7 +430,7 @@ public: const Mac::ExtAddress &GetExtAddress(void) const { return mExtAddress; } /** - * This method sets the extended address. + * Sets the extended address. * * @param[in] aExtAddress The extended address. * @@ -438,7 +438,7 @@ public: void SetExtAddress(const Mac::ExtAddress &aExtAddress) { mExtAddress = aExtAddress; } /** - * This method returns the child timeout. + * Returns the child timeout. * * @returns The child timeout. * @@ -446,7 +446,7 @@ public: uint32_t GetTimeout(void) const { return Encoding::LittleEndian::HostSwap32(mTimeout); } /** - * This method sets the child timeout. + * Sets the child timeout. * * @param[in] aTimeout The child timeout. * @@ -454,7 +454,7 @@ public: void SetTimeout(uint32_t aTimeout) { mTimeout = Encoding::LittleEndian::HostSwap32(aTimeout); } /** - * This method returns the RLOC16. + * Returns the RLOC16. * * @returns The RLOC16. * @@ -462,7 +462,7 @@ public: uint16_t GetRloc16(void) const { return Encoding::LittleEndian::HostSwap16(mRloc16); } /** - * This method sets the RLOC16. + * Sets the RLOC16. * * @param[in] aRloc16 The RLOC16. * @@ -470,7 +470,7 @@ public: void SetRloc16(uint16_t aRloc16) { mRloc16 = Encoding::LittleEndian::HostSwap16(aRloc16); } /** - * This method returns the Thread device mode. + * Returns the Thread device mode. * * @returns The Thread device mode. * @@ -478,7 +478,7 @@ public: uint8_t GetMode(void) const { return mMode; } /** - * This method sets the Thread device mode. + * Sets the Thread device mode. * * @param[in] aMode The Thread device mode. * @@ -486,7 +486,7 @@ public: void SetMode(uint8_t aMode) { mMode = aMode; } /** - * This method returns the Thread version. + * Returns the Thread version. * * @returns The Thread version. * @@ -494,7 +494,7 @@ public: uint16_t GetVersion(void) const { return Encoding::LittleEndian::HostSwap16(mVersion); } /** - * This method sets the Thread version. + * Sets the Thread version. * * @param[in] aVersion The Thread version. * @@ -514,7 +514,7 @@ public: #if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE /** - * This class defines constants and types for SLAAC IID Secret key settings. + * Defines constants and types for SLAAC IID Secret key settings. * */ class SlaacIidSecretKey @@ -531,7 +531,7 @@ public: #if OPENTHREAD_CONFIG_DUA_ENABLE /** - * This structure represents the duplicate address detection information for settings storage. + * Represents the duplicate address detection information for settings storage. * */ OT_TOOL_PACKED_BEGIN @@ -544,13 +544,13 @@ public: static constexpr Key kKey = kKeyDadInfo; ///< The associated key. /** - * This method initializes the `DadInfo` object. + * Initializes the `DadInfo` object. * */ void Init(void) { Clear(); } /** - * This method returns the Dad Counter. + * Returns the Dad Counter. * * @returns The Dad Counter value. * @@ -558,7 +558,7 @@ public: uint8_t GetDadCounter(void) const { return mDadCounter; } /** - * This method sets the Dad Counter. + * Sets the Dad Counter. * * @param[in] aDadCounter The Dad Counter value. * @@ -574,7 +574,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE /** - * This class defines constants and types for BR ULA prefix settings. + * Defines constants and types for BR ULA prefix settings. * */ class BrUlaPrefix @@ -589,7 +589,7 @@ public: }; /** - * This class represents a BR on-link prefix entry for settings storage. + * Represents a BR on-link prefix entry for settings storage. * */ OT_TOOL_PACKED_BEGIN @@ -601,13 +601,13 @@ public: static constexpr Key kKey = kKeyBrOnLinkPrefixes; ///< The associated key. /** - * This method initializes the `BrOnLinkPrefix` object. + * Initializes the `BrOnLinkPrefix` object. * */ void Init(void) { Clear(); } /** - * This method gets the prefix. + * Gets the prefix. * * @returns The prefix. * @@ -615,7 +615,7 @@ public: const Ip6::Prefix &GetPrefix(void) const { return mPrefix; } /** - * This method set the prefix. + * Set the prefix. * * @param[in] aPrefix The prefix. * @@ -623,7 +623,7 @@ public: void SetPrefix(const Ip6::Prefix &aPrefix) { mPrefix = aPrefix; } /** - * This method gets the remaining prefix lifetime in seconds. + * Gets the remaining prefix lifetime in seconds. * * @returns The prefix lifetime in seconds. * @@ -631,7 +631,7 @@ public: uint32_t GetLifetime(void) const { return mLifetime; } /** - * This method sets the the prefix lifetime. + * Sets the the prefix lifetime. * * @param[in] aLifetime The prefix lifetime in seconds. * @@ -649,7 +649,7 @@ public: #if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE /** - * This class defines constants and types for SRP ECDSA key settings. + * Defines constants and types for SRP ECDSA key settings. * */ class SrpEcdsaKey @@ -665,7 +665,7 @@ public: #if OPENTHREAD_CONFIG_SRP_CLIENT_SAVE_SELECTED_SERVER_ENABLE /** - * This structure represents the SRP client info (selected server address). + * Represents the SRP client info (selected server address). * */ OT_TOOL_PACKED_BEGIN @@ -678,13 +678,13 @@ public: static constexpr Key kKey = kKeySrpClientInfo; ///< The associated key. /** - * This method initializes the `SrpClientInfo` object. + * Initializes the `SrpClientInfo` object. * */ void Init(void) { Clear(); } /** - * This method returns the server IPv6 address. + * Returns the server IPv6 address. * * @returns The server IPv6 address. * @@ -692,7 +692,7 @@ public: const Ip6::Address &GetServerAddress(void) const { return mServerAddress; } /** - * This method sets the server IPv6 address. + * Sets the server IPv6 address. * * @param[in] aAddress The server IPv6 address. * @@ -700,7 +700,7 @@ public: void SetServerAddress(const Ip6::Address &aAddress) { mServerAddress = aAddress; } /** - * This method returns the server port number. + * Returns the server port number. * * @returns The server port number. * @@ -708,7 +708,7 @@ public: uint16_t GetServerPort(void) const { return Encoding::LittleEndian::HostSwap16(mServerPort); } /** - * This method sets the server port number. + * Sets the server port number. * * @param[in] aPort The server port number. * @@ -726,7 +726,7 @@ public: #if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE && OPENTHREAD_CONFIG_SRP_SERVER_PORT_SWITCH_ENABLE /** - * This structure represents the SRP server info. + * Represents the SRP server info. * */ OT_TOOL_PACKED_BEGIN @@ -739,13 +739,13 @@ public: static constexpr Key kKey = kKeySrpServerInfo; ///< The associated key. /** - * This method initializes the `SrpServerInfo` object. + * Initializes the `SrpServerInfo` object. * */ void Init(void) { Clear(); } /** - * This method returns the server port number. + * Returns the server port number. * * @returns The server port number. * @@ -753,7 +753,7 @@ public: uint16_t GetPort(void) const { return Encoding::LittleEndian::HostSwap16(mPort); } /** - * This method sets the server port number. + * Sets the server port number. * * @param[in] aPort The server port number. * @@ -769,7 +769,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE /** - * This structure represents the Border Agent ID. + * Represents the Border Agent ID. * */ OT_TOOL_PACKED_BEGIN @@ -781,13 +781,13 @@ public: static constexpr Key kKey = kKeyBorderAgentId; ///< The associated key. /** - * This method initializes the `BorderAgentId` object. + * Initializes the `BorderAgentId` object. * */ void Init(void) { mId = {}; } /** - * This method returns the Border Agent ID. + * Returns the Border Agent ID. * * @returns The Border Agent ID. * @@ -795,7 +795,7 @@ public: const MeshCoP::BorderAgent::Id &GetId(void) const { return mId; } /** - * This method returns the Border Agent ID. + * Returns the Border Agent ID. * * @returns The Border Agent ID. * @@ -803,7 +803,7 @@ public: MeshCoP::BorderAgent::Id &GetId(void) { return mId; } /** - * This method sets the Border Agent ID. + * Sets the Border Agent ID. * */ void SetId(const MeshCoP::BorderAgent::Id &aId) { mId = aId; } @@ -834,7 +834,7 @@ protected: }; /** - * This class defines methods related to non-volatile storage of settings. + * Defines methods related to non-volatile storage of settings. * */ class Settings : public SettingsBase, private NonCopyable @@ -843,7 +843,7 @@ class Settings : public SettingsBase, private NonCopyable public: /** - * This constructor initializes a `Settings` object. + * Initializes a `Settings` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -854,7 +854,7 @@ public: } /** - * This method initializes the platform settings (non-volatile) module. + * Initializes the platform settings (non-volatile) module. * * This should be called before any other method from this class. * @@ -862,21 +862,21 @@ public: void Init(void); /** - * This method de-initializes the platform settings (non-volatile) module. + * De-initializes the platform settings (non-volatile) module. * - * This method should be called when OpenThread instance is no longer in use. + * Should be called when OpenThread instance is no longer in use. * */ void Deinit(void); /** - * This method removes all settings from the non-volatile store. + * Removes all settings from the non-volatile store. * */ void Wipe(void); /** - * This method saves the Operational Dataset (active or pending). + * Saves the Operational Dataset (active or pending). * * @param[in] aType The Dataset type (active or pending) to save. * @param[in] aDataset A reference to a `Dataset` object to be saved. @@ -888,7 +888,7 @@ public: Error SaveOperationalDataset(MeshCoP::Dataset::Type aType, const MeshCoP::Dataset &aDataset); /** - * This method reads the Operational Dataset (active or pending). + * Reads the Operational Dataset (active or pending). * * @param[in] aType The Dataset type (active or pending) to read. * @param[out] aDataset A reference to a `Dataset` object to output the read content. @@ -901,7 +901,7 @@ public: Error ReadOperationalDataset(MeshCoP::Dataset::Type aType, MeshCoP::Dataset &aDataset) const; /** - * This method deletes the Operational Dataset (active/pending) from settings. + * Deletes the Operational Dataset (active/pending) from settings. * * @param[in] aType The Dataset type (active or pending) to delete. * @@ -912,7 +912,7 @@ public: Error DeleteOperationalDataset(MeshCoP::Dataset::Type aType); /** - * This template method reads a specified settings entry. + * Reads a specified settings entry. * * The template type `EntryType` specifies the entry's value data structure. It must provide the following: * @@ -939,7 +939,7 @@ public: } /** - * This template method reads a specified settings entry. + * Reads a specified settings entry. * * The template type `EntryType` provides information about the entry's value type. It must provide the following: * @@ -964,7 +964,7 @@ public: } /** - * This template method saves a specified settings entry. + * Saves a specified settings entry. * * The template type `EntryType` specifies the entry's value data structure. It must provide the following: * @@ -989,7 +989,7 @@ public: } /** - * This template method saves a specified settings entry. + * Saves a specified settings entry. * * The template type `EntryType` provides information about the entry's value type. It must provide the following: * @@ -1015,7 +1015,7 @@ public: } /** - * This template method deletes a specified setting entry. + * Deletes a specified setting entry. * * The template type `EntryType` provides information about the entry's key. * @@ -1031,7 +1031,7 @@ public: #if OPENTHREAD_FTD /** - * This method adds a Child Info entry to settings. + * Adds a Child Info entry to settings. * * @note Child Info is a list-based settings property and can contain multiple entries. * @@ -1044,7 +1044,7 @@ public: Error AddChildInfo(const ChildInfo &aChildInfo); /** - * This method deletes all Child Info entries from the settings. + * Deletes all Child Info entries from the settings. * * @note Child Info is a list-based settings property and can contain multiple entries. * @@ -1055,9 +1055,9 @@ public: Error DeleteAllChildInfo(void); /** - * This method enables range-based `for` loop iteration over all child info entries in the `Settings`. + * Enables range-based `for` loop iteration over all child info entries in the `Settings`. * - * This method should be used as follows: + * Should be used as follows: * * for (const ChildInfo &childInfo : Get().IterateChildInfo()) { ... } * @@ -1068,7 +1068,7 @@ public: ChildInfoIteratorBuilder IterateChildInfo(void) { return ChildInfoIteratorBuilder(GetInstance()); } /** - * This class defines an iterator to access all Child Info entries in the settings. + * Defines an iterator to access all Child Info entries in the settings. * */ class ChildInfoIterator : public SettingsBase, public Unequatable @@ -1077,7 +1077,7 @@ public: public: /** - * This constructor initializes a `ChildInfoInterator` object. + * Initializes a `ChildInfoInterator` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -1085,7 +1085,7 @@ public: explicit ChildInfoIterator(Instance &aInstance); /** - * This method indicates whether there are no more Child Info entries in the list (iterator has reached end of + * Indicates whether there are no more Child Info entries in the list (iterator has reached end of * the list), or the current entry is valid. * * @retval TRUE There are no more entries in the list (reached end of the list). @@ -1095,21 +1095,21 @@ public: bool IsDone(void) const { return mIsDone; } /** - * This method overloads operator `++` (pre-increment) to advance the iterator to move to the next Child Info + * Overloads operator `++` (pre-increment) to advance the iterator to move to the next Child Info * entry in the list (if any). * */ void operator++(void) { Advance(); } /** - * This method overloads operator `++` (post-increment) to advance the iterator to move to the next Child Info + * Overloads operator `++` (post-increment) to advance the iterator to move to the next Child Info * entry in the list (if any). * */ void operator++(int) { Advance(); } /** - * This method gets the Child Info corresponding to the current iterator entry in the list. + * Gets the Child Info corresponding to the current iterator entry in the list. * * @note This method should be used only if `IsDone()` is returning FALSE indicating that the iterator is * pointing to a valid entry. @@ -1120,7 +1120,7 @@ public: const ChildInfo &GetChildInfo(void) const { return mChildInfo; } /** - * This method deletes the current Child Info entry. + * Deletes the current Child Info entry. * * @retval kErrorNone The entry was deleted successfully. * @retval kErrorInvalidState The entry is not valid (iterator has reached end of list). @@ -1130,7 +1130,7 @@ public: Error Delete(void); /** - * This method overloads the `*` dereference operator and gets a reference to `ChildInfo` entry to which the + * Overloads the `*` dereference operator and gets a reference to `ChildInfo` entry to which the * iterator is currently pointing. * * @note This method should be used only if `IsDone()` is returning FALSE indicating that the iterator is @@ -1143,7 +1143,7 @@ public: const ChildInfo &operator*(void) const { return mChildInfo; } /** - * This method overloads operator `==` to evaluate whether or not two iterator instances are equal. + * Overloads operator `==` to evaluate whether or not two iterator instances are equal. * * @param[in] aOther The other iterator to compare with. * @@ -1180,7 +1180,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE /** - * This method adds or updates an on-link prefix. + * Adds or updates an on-link prefix. * * If there is no matching entry (matching the same `GetPrefix()`) saved in `Settings`, the new entry will be added. * If there is matching entry, it will be updated to the new @p aPrefix. @@ -1194,7 +1194,7 @@ public: Error AddOrUpdateBrOnLinkPrefix(const BrOnLinkPrefix &aBrOnLinkPrefix); /** - * This method removes an on-link prefix entry matching a given prefix. + * Removes an on-link prefix entry matching a given prefix. * * @param[in] aPrefix The prefix to remove * @@ -1205,7 +1205,7 @@ public: Error RemoveBrOnLinkPrefix(const Ip6::Prefix &aPrefix); /** - * This method deletes all on-link prefix entries from the settings. + * Deletes all on-link prefix entries from the settings. * * @retval kErrorNone Successfully deleted the entries. * @retval kErrorNotImplemented The platform does not implement settings functionality. @@ -1214,7 +1214,7 @@ public: Error DeleteAllBrOnLinkPrefixes(void); /** - * This method retrieves an entry from on-link prefixes list at a given index. + * Retrieves an entry from on-link prefixes list at a given index. * * @param[in] aIndex The index to read. * @param[out] aBrOnLinkPrefix A reference to `BrOnLinkPrefix` to output the read value. diff --git a/src/core/common/settings_driver.hpp b/src/core/common/settings_driver.hpp index f7851a228..c4670897b 100644 --- a/src/core/common/settings_driver.hpp +++ b/src/core/common/settings_driver.hpp @@ -50,7 +50,7 @@ class SettingsDriver : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the `SettingsDriver`. + * Initializes the `SettingsDriver`. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -64,7 +64,7 @@ public: } /** - * This method initializes the settings storage driver. + * Initializes the settings storage driver. * * @param[in] aSensitiveKeys A pointer to an array containing the list of sensitive keys. * @param[in] aSensitiveKeysLength The number of entries in the @p aSensitiveKeys array. @@ -83,7 +83,7 @@ public: } /** - * This method deinitializes the settings driver. + * Deinitializes the settings driver. * */ void Deinit(void) @@ -94,7 +94,7 @@ public: } /** - * This method adds a value to @p aKey. + * Adds a value to @p aKey. * * @param[in] aKey The key associated with the value. * @param[in] aValue A pointer to where the new value of the setting should be read from. @@ -119,7 +119,7 @@ public: } /** - * This method removes a value from @p aKey. + * Removes a value from @p aKey. * * @param[in] aKey The key associated with the value. * @param[in] aIndex The index of the value to be removed. @@ -142,7 +142,7 @@ public: } /** - * This method fetches the value identified by @p aKey at a given @p aIndex. + * Fetches the value identified by @p aKey at a given @p aIndex. * * @param[in] aKey The key associated with the requested value. * @param[in] aIndex The index of the specific item to get. @@ -172,7 +172,7 @@ public: } /** - * This method fetches the value identified by @p aKey. + * Fetches the value identified by @p aKey. * * @param[in] aKey The key associated with the requested value. * @param[out] aValue A pointer to where the value of the setting should be written. @@ -190,7 +190,7 @@ public: Error Get(uint16_t aKey, void *aValue, uint16_t *aValueLength) const { return Get(aKey, 0, aValue, aValueLength); } /** - * This method sets or replaces the value identified by @p aKey. + * Sets or replaces the value identified by @p aKey. * * If there was more than one value previously associated with @p aKey, then they are all deleted and replaced with * this single entry. @@ -218,7 +218,7 @@ public: } /** - * This method removes all values. + * Removes all values. * */ void Wipe(void) diff --git a/src/core/common/string.hpp b/src/core/common/string.hpp index fbbaca7ee..035bc3f32 100644 --- a/src/core/common/string.hpp +++ b/src/core/common/string.hpp @@ -58,7 +58,7 @@ namespace ot { */ /** - * This enumeration represents comparison mode when matching strings. + * Represents comparison mode when matching strings. * */ enum StringMatchMode : uint8_t @@ -70,7 +70,7 @@ enum StringMatchMode : uint8_t static constexpr char kNullChar = '\0'; ///< null character. /** - * This function returns the number of characters that precede the terminating null character. + * Returns the number of characters that precede the terminating null character. * * @param[in] aString A pointer to the string. * @param[in] aMaxLength The maximum length in bytes. @@ -82,7 +82,7 @@ static constexpr char kNullChar = '\0'; ///< null character. uint16_t StringLength(const char *aString, uint16_t aMaxLength); /** - * This function finds the first occurrence of a given character in a null-terminated string. + * Finds the first occurrence of a given character in a null-terminated string. * * @param[in] aString A pointer to the string. * @param[in] aChar A char to search for in the string. @@ -93,7 +93,7 @@ uint16_t StringLength(const char *aString, uint16_t aMaxLength); const char *StringFind(const char *aString, char aChar); /** - * This function finds the first occurrence of a given sub-string in a null-terminated string. + * Finds the first occurrence of a given sub-string in a null-terminated string. * * @param[in] aString A pointer to the string. * @param[in] aSubString A sub-string to search for. @@ -106,7 +106,7 @@ const char *StringFind(const char *aString, char aChar); const char *StringFind(const char *aString, const char *aSubString, StringMatchMode aMode = kStringExactMatch); /** - * This function checks whether a null-terminated string starts with a given prefix string. + * Checks whether a null-terminated string starts with a given prefix string. * * @param[in] aString A pointer to the string. * @param[in] aPrefixString A prefix string. @@ -119,7 +119,7 @@ const char *StringFind(const char *aString, const char *aSubString, StringMatchM bool StringStartsWith(const char *aString, const char *aPrefixString, StringMatchMode aMode = kStringExactMatch); /** - * This function checks whether a null-terminated string ends with a given character. + * Checks whether a null-terminated string ends with a given character. * * @param[in] aString A pointer to the string. * @param[in] aChar A char to check. @@ -131,7 +131,7 @@ bool StringStartsWith(const char *aString, const char *aPrefixString, StringMatc bool StringEndsWith(const char *aString, char aChar); /** - * This function checks whether a null-terminated string ends with a given sub-string. + * Checks whether a null-terminated string ends with a given sub-string. * * @param[in] aString A pointer to the string. * @param[in] aSubString A sub-string to check against. @@ -144,7 +144,7 @@ bool StringEndsWith(const char *aString, char aChar); bool StringEndsWith(const char *aString, const char *aSubString, StringMatchMode aMode = kStringExactMatch); /** - * This function checks whether or not two null-terminated strings match. + * Checks whether or not two null-terminated strings match. * * @param[in] aFirstString A pointer to the first string. * @param[in] aSecondString A pointer to the second string. @@ -157,7 +157,7 @@ bool StringEndsWith(const char *aString, const char *aSubString, StringMatchMode bool StringMatch(const char *aFirstString, const char *aSecondString, StringMatchMode aMode = kStringExactMatch); /** - * This function parses a decimal number from a string as `uint8_t` and skips over the parsed characters. + * Parses a decimal number from a string as `uint8_t` and skips over the parsed characters. * * If the string does not start with a digit, `kErrorParse` is returned. * @@ -177,7 +177,7 @@ bool StringMatch(const char *aFirstString, const char *aSecondString, StringMatc Error StringParseUint8(const char *&aString, uint8_t &aUint8, uint8_t aMaxValue); /** - * This function parses a decimal number from a string as `uint8_t` and skips over the parsed characters. + * Parses a decimal number from a string as `uint8_t` and skips over the parsed characters. * * If the string does not start with a digit, `kErrorParse` is returned. * @@ -196,7 +196,7 @@ Error StringParseUint8(const char *&aString, uint8_t &aUint8, uint8_t aMaxValue) Error StringParseUint8(const char *&aString, uint8_t &aUint8); /** - * This function converts all uppercase letter characters in a given string to lowercase. + * Converts all uppercase letter characters in a given string to lowercase. * * @param[in,out] aString A pointer to the string to convert. * @@ -204,7 +204,7 @@ Error StringParseUint8(const char *&aString, uint8_t &aUint8); void StringConvertToLowercase(char *aString); /** - * This function converts all lowercase letter characters in a given string to uppercase. + * Converts all lowercase letter characters in a given string to uppercase. * * @param[in,out] aString A pointer to the string to convert. * @@ -212,7 +212,7 @@ void StringConvertToLowercase(char *aString); void StringConvertToUppercase(char *aString); /** - * This function converts an uppercase letter character to lowercase. + * Converts an uppercase letter character to lowercase. * * If @p aChar is uppercase letter it is converted lowercase. Otherwise, it remains unchanged. * @@ -224,7 +224,7 @@ void StringConvertToUppercase(char *aString); char ToLowercase(char aChar); /** - * This function converts a lowercase letter character to uppercase. + * Converts a lowercase letter character to uppercase. * * If @p aChar is lowercase letter it is converted uppercase. Otherwise, it remains unchanged. * @@ -236,7 +236,7 @@ char ToLowercase(char aChar); char ToUppercase(char aChar); /** - * This function coverts a boolean to "yes" or "no" string. + * Coverts a boolean to "yes" or "no" string. * * @param[in] aBool A boolean value to convert. * @@ -246,7 +246,7 @@ char ToUppercase(char aChar); const char *ToYesNo(bool aBool); /** - * This function validates whether a given byte sequence (string) follows UTF-8 encoding. + * Validates whether a given byte sequence (string) follows UTF-8 encoding. * Control characters are not allowed. * * @param[in] aString A null-terminated byte sequence. @@ -258,7 +258,7 @@ const char *ToYesNo(bool aBool); bool IsValidUtf8String(const char *aString); /** - * This function validates whether a given byte sequence (string) follows UTF-8 encoding. + * Validates whether a given byte sequence (string) follows UTF-8 encoding. * Control characters are not allowed. * * @param[in] aString A byte sequence. @@ -291,14 +291,14 @@ inline constexpr bool AreStringsInOrder(const char *aFirst, const char *aSecond) } /** - * This class implements writing to a string buffer. + * Implements writing to a string buffer. * */ class StringWriter { public: /** - * This constructor initializes the object as cleared on the provided buffer. + * Initializes the object as cleared on the provided buffer. * * @param[in] aBuffer A pointer to the char buffer to write into. * @param[in] aSize The size of @p aBuffer. @@ -307,7 +307,7 @@ public: StringWriter(char *aBuffer, uint16_t aSize); /** - * This method clears the string writer. + * Clears the string writer. * * @returns The string writer. * @@ -315,7 +315,7 @@ public: StringWriter &Clear(void); /** - * This method returns whether the output is truncated. + * Returns whether the output is truncated. * * @note If the output is truncated, the buffer is still null-terminated. * @@ -326,7 +326,7 @@ public: bool IsTruncated(void) const { return mLength >= mSize; } /** - * This method gets the length of the wanted string. + * Gets the length of the wanted string. * * Similar to `strlen()` the length does not include the null character at the end of the string. * @@ -336,7 +336,7 @@ public: uint16_t GetLength(void) const { return mLength; } /** - * This method returns the size (number of chars) in the buffer. + * Returns the size (number of chars) in the buffer. * * @returns The size of the buffer. * @@ -344,7 +344,7 @@ public: uint16_t GetSize(void) const { return mSize; } /** - * This method appends `printf()` style formatted data to the buffer. + * Appends `printf()` style formatted data to the buffer. * * @param[in] aFormat A pointer to the format string. * @param[in] ... Arguments for the format specification. @@ -355,7 +355,7 @@ public: StringWriter &Append(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3); /** - * This method appends `printf()` style formatted data to the buffer. + * Appends `printf()` style formatted data to the buffer. * * @param[in] aFormat A pointer to the format string. * @param[in] aArgs Arguments for the format specification (as `va_list`). @@ -366,7 +366,7 @@ public: StringWriter &AppendVarArgs(const char *aFormat, va_list aArgs); /** - * This method appends an array of bytes in hex representation (using "%02x" style) to the buffer. + * Appends an array of bytes in hex representation (using "%02x" style) to the buffer. * * @param[in] aBytes A pointer to buffer containing the bytes to append. * @param[in] aLength The length of @p aBytes buffer (in bytes). @@ -377,13 +377,13 @@ public: StringWriter &AppendHexBytes(const uint8_t *aBytes, uint16_t aLength); /** - * This method converts all uppercase letter characters in the string to lowercase. + * Converts all uppercase letter characters in the string to lowercase. * */ void ConvertToLowercase(void) { StringConvertToLowercase(mBuffer); } /** - * This method converts all lowercase letter characters in the string to uppercase. + * Converts all lowercase letter characters in the string to uppercase. * */ void ConvertToUppercase(void) { StringConvertToUppercase(mBuffer); } @@ -395,7 +395,7 @@ private: }; /** - * This class defines a fixed-size string. + * Defines a fixed-size string. * */ template class String : public StringWriter @@ -404,7 +404,7 @@ template class String : public StringWriter public: /** - * This constructor initializes the string as empty. + * Initializes the string as empty. * */ String(void) @@ -413,7 +413,7 @@ public: } /** - * This method returns the string as a null-terminated C string. + * Returns the string as a null-terminated C string. * * @returns The null-terminated C string. * @@ -425,7 +425,7 @@ private: }; /** - * This class provides helper methods to convert from a set of `uint16_t` values (e.g., a non-sequential `enum`) to + * Provides helper methods to convert from a set of `uint16_t` values (e.g., a non-sequential `enum`) to * string using binary search in a lookup table. * */ @@ -433,7 +433,7 @@ class Stringify : public BinarySearch { public: /** - * This class represents a entry in the lookup table. + * Represents a entry in the lookup table. * */ class Entry @@ -454,7 +454,7 @@ public: }; /** - * This static method looks up a key in a given sorted table array (using binary search) and return the associated + * Looks up a key in a given sorted table array (using binary search) and return the associated * strings with the key. * * @note This method requires the array to be sorted, otherwise its behavior is undefined. diff --git a/src/core/common/tasklet.hpp b/src/core/common/tasklet.hpp index 3694eab83..48a3f07af 100644 --- a/src/core/common/tasklet.hpp +++ b/src/core/common/tasklet.hpp @@ -58,14 +58,14 @@ class TaskletScheduler; */ /** - * This class is used to represent a tasklet. + * Is used to represent a tasklet. * */ class Tasklet : public InstanceLocator { public: /** - * This class implements the tasklet scheduler. + * Implements the tasklet scheduler. * */ class Scheduler : private NonCopyable @@ -74,7 +74,7 @@ public: public: /** - * This constructor initializes the object. + * Initializes the object. * */ Scheduler(void) @@ -83,7 +83,7 @@ public: } /** - * This method indicates whether or not there are tasklets pending. + * Indicates whether or not there are tasklets pending. * * @retval TRUE If there are tasklets pending. * @retval FALSE If there are no tasklets pending. @@ -92,7 +92,7 @@ public: bool AreTaskletsPending(void) const { return mTail != nullptr; } /** - * This method processes all tasklets queued when this is called. + * Processes all tasklets queued when this is called. * */ void ProcessQueuedTasklets(void); @@ -104,7 +104,7 @@ public: }; /** - * This function reference is called when the tasklet is run. + * Reference is called when the tasklet is run. * * @param[in] aTasklet A reference to the tasklet being run. * @@ -112,7 +112,7 @@ public: typedef void (&Handler)(Tasklet &aTasklet); /** - * This constructor creates a tasklet instance. + * Creates a tasklet instance. * * @param[in] aInstance A reference to the OpenThread instance object. * @param[in] aHandler A pointer to a function that is called when the tasklet is run. @@ -126,7 +126,7 @@ public: } /** - * This method puts the tasklet on the tasklet scheduler run queue. + * Puts the tasklet on the tasklet scheduler run queue. * * If the tasklet is already posted, no change is made and run queue stays as before. * @@ -134,7 +134,7 @@ public: void Post(void); /** - * This method indicates whether the tasklet is posted or not. + * Indicates whether the tasklet is posted or not. * * @retval TRUE The tasklet is posted. * @retval FALSE The tasklet is not posted. @@ -150,7 +150,7 @@ private: }; /** - * This template class defines a tasklet owned by specific type and using a method on owner type as the callback. + * Defines a tasklet owned by specific type and using a method on owner type as the callback. * * @tparam Owner The type of owner of this tasklet. * @tparam HandleTaskletPtr A pointer to a non-static member method of `Owner` to use as tasklet handler. @@ -162,7 +162,7 @@ template class TaskletIn { public: /** - * This constructor initializes the tasklet. + * Initializes the tasklet. * * @param[in] aInstance The OpenThread instance. * @@ -177,7 +177,7 @@ private: }; /** - * This class defines a tasklet that also maintains a user context pointer. + * Defines a tasklet that also maintains a user context pointer. * * In typical `Tasklet` use, in the handler callback, the owner of the tasklet is determined using `GetOwner` * method. This method works if there is a single instance of `Type` within OpenThread instance hierarchy. The @@ -189,7 +189,7 @@ class TaskletContext : public Tasklet { public: /** - * This constructor creates a tasklet instance. + * Creates a tasklet instance. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aHandler A pointer to a function that is called when the tasklet is run. @@ -203,7 +203,7 @@ public: } /** - * This method returns the pointer to the arbitrary context information. + * Returns the pointer to the arbitrary context information. * * @returns Pointer to the arbitrary context information. * diff --git a/src/core/common/time.hpp b/src/core/common/time.hpp index 6c07fa3c8..12c16f8b1 100644 --- a/src/core/common/time.hpp +++ b/src/core/common/time.hpp @@ -55,7 +55,7 @@ namespace ot { */ /** - * This class represents a time instance. + * Represents a time instance. * */ class Time : public Unequatable
d.::." (if longer than a day). @@ -91,7 +91,7 @@ public: void GetUptime(char *aBuffer, uint16_t aSize) const; /** - * This method converts an uptime value (number of milliseconds) to a human-readable string. + * Converts an uptime value (number of milliseconds) to a human-readable string. * * The string follows the format "::." for hours, minutes, seconds and millisecond (if uptime is * shorter than one day) or "
d.::." (if longer than a day). @p aIncludeMsec can be used @@ -105,7 +105,7 @@ public: static void UptimeToString(uint64_t aUptime, StringWriter &aWriter, bool aIncludeMsec); /** - * This static method converts a given uptime as number of milliseconds to number of seconds. + * Converts a given uptime as number of milliseconds to number of seconds. * * @param[in] aUptimeInMilliseconds Uptime in milliseconds (as `uint64_t`). * @@ -118,7 +118,7 @@ public: } /** - * This static method converts a given uptime as number of seconds to number of milliseconds. + * Converts a given uptime as number of seconds to number of milliseconds. * * @param[in] aUptimeInSeconds Uptime in seconds (as `uint32_t`). * diff --git a/src/core/crypto/aes_ccm.hpp b/src/core/crypto/aes_ccm.hpp index 8ae9ccc93..05bf6c555 100644 --- a/src/core/crypto/aes_ccm.hpp +++ b/src/core/crypto/aes_ccm.hpp @@ -57,7 +57,7 @@ namespace Crypto { */ /** - * This class implements AES CCM computation. + * Implements AES CCM computation. * */ class AesCcm @@ -68,7 +68,7 @@ public: static constexpr uint8_t kNonceSize = 13; ///< Size of IEEE 802.15.4 Nonce (in bytes). /** - * This enumeration type represent the encryption vs decryption mode. + * Type represent the encryption vs decryption mode. * */ enum Mode : uint8_t @@ -78,7 +78,7 @@ public: }; /** - * This method sets the key. + * Sets the key. * * @param[in] aKey Crypto Key used in AES operation * @@ -86,7 +86,7 @@ public: void SetKey(const Key &aKey) { mEcb.SetKey(aKey); } /** - * This method sets the key. + * Sets the key. * * @param[in] aKey A pointer to the key. * @param[in] aKeyLength Length of the key in bytes. @@ -95,7 +95,7 @@ public: void SetKey(const uint8_t *aKey, uint16_t aKeyLength); /** - * This method sets the key. + * Sets the key. * * @param[in] aMacKey Key Material for AES operation. * @@ -103,7 +103,7 @@ public: void SetKey(const Mac::KeyMaterial &aMacKey); /** - * This method initializes the AES CCM computation. + * Initializes the AES CCM computation. * * @param[in] aHeaderLength Length of header in bytes. * @param[in] aPlainTextLength Length of plaintext in bytes. @@ -119,7 +119,7 @@ public: uint8_t aNonceLength); /** - * This method processes the header. + * Processes the header. * * @param[in] aHeader A pointer to the header. * @param[in] aHeaderLength Length of header in bytes. @@ -128,7 +128,7 @@ public: void Header(const void *aHeader, uint32_t aHeaderLength); /** - * This method processes the header. + * Processes the header. * * @tparam ObjectType The object type. * @@ -143,7 +143,7 @@ public: } /** - * This method processes the payload. + * Processes the payload. * * @param[in,out] aPlainText A pointer to the plaintext. * @param[in,out] aCipherText A pointer to the ciphertext. @@ -155,9 +155,9 @@ public: #if !OPENTHREAD_RADIO /** - * This method processes the payload within a given message. + * Processes the payload within a given message. * - * This method encrypts/decrypts the payload content in place within the @p aMessage. + * Encrypts/decrypts the payload content in place within the @p aMessage. * * @param[in,out] aMessage The message to read from and update. * @param[in] aOffset The offset in @p aMessage to start of payload. @@ -169,7 +169,7 @@ public: #endif /** - * This method returns the tag length in bytes. + * Returns the tag length in bytes. * * @returns The tag length in bytes. * @@ -177,7 +177,7 @@ public: uint8_t GetTagLength(void) const { return mTagLength; } /** - * This method generates the tag. + * Generates the tag. * * @param[out] aTag A pointer to the tag (must have `GetTagLength()` bytes). * @@ -185,7 +185,7 @@ public: void Finalize(void *aTag); /** - * This static method generates IEEE 802.15.4 nonce byte sequence. + * Generates IEEE 802.15.4 nonce byte sequence. * * @param[in] aAddress An extended address. * @param[in] aFrameCounter A frame counter. diff --git a/src/core/crypto/aes_ecb.hpp b/src/core/crypto/aes_ecb.hpp index 61680ad2a..80fa15f63 100644 --- a/src/core/crypto/aes_ecb.hpp +++ b/src/core/crypto/aes_ecb.hpp @@ -53,7 +53,7 @@ namespace Crypto { */ /** - * This class implements AES ECB computation. + * Implements AES ECB computation. * */ class AesEcb @@ -74,7 +74,7 @@ public: ~AesEcb(void); /** - * This method sets the key. + * Sets the key. * * @param[in] aKey Crypto Key used for ECB operation * @@ -82,7 +82,7 @@ public: void SetKey(const Key &aKey); /** - * This method encrypts data. + * Encrypts data. * * @param[in] aInput A pointer to the input buffer. * @param[out] aOutput A pointer to the output buffer. diff --git a/src/core/crypto/ecdsa.hpp b/src/core/crypto/ecdsa.hpp index 41a693d7d..6fffb29bb 100644 --- a/src/core/crypto/ecdsa.hpp +++ b/src/core/crypto/ecdsa.hpp @@ -60,7 +60,7 @@ namespace Ecdsa { */ /** - * This class implements ECDSA key-generation, signing, and verification for NIST P-256 curve using SHA-256 hash. + * Implements ECDSA key-generation, signing, and verification for NIST P-256 curve using SHA-256 hash. * * NIST P-256 curve is also known as 256-bit Random ECP Group (RFC 5114 - 2.6), or secp256r1 (RFC 4492 - Appendix A). * @@ -83,7 +83,7 @@ public: #endif /** - * This class represents an ECDSA signature. + * Represents an ECDSA signature. * * The signature is encoded as the concatenated binary representation of two MPIs `r` and `s` which are calculated * during signing (RFC 6605 - section 4). @@ -102,7 +102,7 @@ public: static constexpr uint8_t kSize = OT_CRYPTO_ECDSA_SIGNATURE_SIZE; ///< Signature size in bytes. /** - * This method returns the signature as a byte array. + * Returns the signature as a byte array. * * @returns A pointer to the byte array containing the signature. * @@ -111,7 +111,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class represents a key pair (public and private keys). + * Represents a key pair (public and private keys). * * The key pair is stored using Distinguished Encoding Rules (DER) format (per RFC 5915). * @@ -126,13 +126,13 @@ public: static constexpr uint8_t kMaxDerSize = OT_CRYPTO_ECDSA_MAX_DER_SIZE; /** - * This constructor initializes a `KeyPair` as empty (no key). + * Initializes a `KeyPair` as empty (no key). * */ KeyPair(void) { mDerLength = 0; } /** - * This method generates and populates the `KeyPair` with a new public/private keys. + * Generates and populates the `KeyPair` with a new public/private keys. * * @retval kErrorNone A new key pair was generated successfully. * @retval kErrorNoBufs Failed to allocate buffer for key generation. @@ -143,7 +143,7 @@ public: Error Generate(void) { return otPlatCryptoEcdsaGenerateKey(this); } /** - * This method gets the associated public key from the `KeyPair`. + * Gets the associated public key from the `KeyPair`. * * @param[out] aPublicKey A reference to a `PublicKey` to output the value. * @@ -154,7 +154,7 @@ public: Error GetPublicKey(PublicKey &aPublicKey) const { return otPlatCryptoEcdsaGetPublicKey(this, &aPublicKey); } /** - * This method gets the pointer to start of the buffer containing the key-pair info in DER format. + * Gets the pointer to start of the buffer containing the key-pair info in DER format. * * The length (number of bytes) of DER format is given by `GetDerLength()`. * @@ -164,7 +164,7 @@ public: const uint8_t *GetDerBytes(void) const { return mDerBytes; } /** - * This method gets the length of the byte sequence representation of the key-pair in DER format. + * Gets the length of the byte sequence representation of the key-pair in DER format. * * @returns The length of byte sequence representation of the key-pair in DER format. * @@ -172,9 +172,9 @@ public: uint8_t GetDerLength(void) const { return mDerLength; } /** - * This method gets the pointer to start of the key-pair buffer in DER format. + * Gets the pointer to start of the key-pair buffer in DER format. * - * This method gives non-const pointer to the buffer and is intended for populating the buffer and setting + * Gives non-const pointer to the buffer and is intended for populating the buffer and setting * the key-pair (e.g., reading the key-pair from non-volatile settings). The buffer contains `kMaxDerSize` * bytes. After populating the buffer, `SetDerLength()` can be used to set the the number of bytes written. * @@ -184,7 +184,7 @@ public: uint8_t *GetDerBytes(void) { return mDerBytes; } /** - * This method sets the length of the byte sequence representation of the key-pair in DER format. + * Sets the length of the byte sequence representation of the key-pair in DER format. * * @param[in] aDerLength The length (number of bytes). * @@ -192,9 +192,9 @@ public: void SetDerLength(uint8_t aDerLength) { mDerLength = aDerLength; } /** - * This method calculates the ECDSA signature for a hashed message using the private key from `KeyPair`. + * Calculates the ECDSA signature for a hashed message using the private key from `KeyPair`. * - * This method uses the deterministic digital signature generation procedure from RFC 6979. + * Uses the deterministic digital signature generation procedure from RFC 6979. * * @param[in] aHash The SHA-256 hash value of the message to use for signature calculation. * @param[out] aSignature A reference to a `Signature` to output the calculated signature value. @@ -213,21 +213,21 @@ public: #if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This class represents a key pair (public and private keys) as a PSA KeyRef. + * Represents a key pair (public and private keys) as a PSA KeyRef. * */ class KeyPairAsRef { public: /** - * This constructor initializes a `KeyPairAsRef`. + * Initializes a `KeyPairAsRef`. * * @param[in] aKeyRef PSA key reference to use while using the keypair. */ explicit KeyPairAsRef(otCryptoKeyRef aKeyRef = 0) { mKeyRef = aKeyRef; } /** - * This method generates a new keypair and imports it into PSA ITS. + * Generates a new keypair and imports it into PSA ITS. * * @retval kErrorNone A new key pair was generated successfully. * @retval kErrorNoBufs Failed to allocate buffer for key generation. @@ -238,7 +238,7 @@ public: Error Generate(void) const { return otPlatCryptoEcdsaGenerateAndImportKey(mKeyRef); } /** - * This method imports a new keypair into PSA ITS. + * Imports a new keypair into PSA ITS. * * @param[in] aKeyPair KeyPair to be imported in DER format. * @@ -256,7 +256,7 @@ public: } /** - * This method gets the associated public key from the keypair referenced by mKeyRef. + * Gets the associated public key from the keypair referenced by mKeyRef. * * @param[out] aPublicKey A reference to a `PublicKey` to output the value. * @@ -270,10 +270,10 @@ public: } /** - * This method calculates the ECDSA signature for a hashed message using the private key from keypair + * Calculates the ECDSA signature for a hashed message using the private key from keypair * referenced by mKeyRef. * - * This method uses the deterministic digital signature generation procedure from RFC 6979. + * Uses the deterministic digital signature generation procedure from RFC 6979. * * @param[in] aHash The SHA-256 hash value of the message to use for signature calculation. * @param[out] aSignature A reference to a `Signature` to output the calculated signature value. @@ -290,7 +290,7 @@ public: } /** - * This method gets the Key reference for the keypair stored in the PSA. + * Gets the Key reference for the keypair stored in the PSA. * * @returns The PSA key ref. * @@ -298,7 +298,7 @@ public: otCryptoKeyRef GetKeyRef(void) const { return mKeyRef; } /** - * This method sets the Key reference. + * Sets the Key reference. * * @param[in] aKeyRef PSA key reference to use while using the keypair. * @@ -311,7 +311,7 @@ public: #endif /** - * This class represents a public key. + * Represents a public key. * * The public key is stored as a byte sequence representation of an uncompressed curve point (RFC 6605 - sec 4). * @@ -328,7 +328,7 @@ public: static constexpr uint8_t kSize = OT_CRYPTO_ECDSA_PUBLIC_KEY_SIZE; ///< Size of the public key in bytes. /** - * This method gets the pointer to the buffer containing the public key (as an uncompressed curve point). + * Gets the pointer to the buffer containing the public key (as an uncompressed curve point). * * @return The pointer to the buffer containing the public key (with `kSize` bytes). * @@ -336,7 +336,7 @@ public: const uint8_t *GetBytes(void) const { return m8; } /** - * This method uses the `PublicKey` to verify the ECDSA signature of a hashed message. + * Uses the `PublicKey` to verify the ECDSA signature of a hashed message. * * @param[in] aHash The SHA-256 hash value of a message to use for signature verification. * @param[in] aSignature The signature value to verify. diff --git a/src/core/crypto/hkdf_sha256.hpp b/src/core/crypto/hkdf_sha256.hpp index 0eb1ae7e7..a3a70f1b6 100644 --- a/src/core/crypto/hkdf_sha256.hpp +++ b/src/core/crypto/hkdf_sha256.hpp @@ -53,7 +53,7 @@ namespace Crypto { */ /** - * This class implements HMAC-based Extract-and-Expand Key Derivation Function (HKDF) [RFC5869] using SHA-256. + * Implements HMAC-based Extract-and-Expand Key Derivation Function (HKDF) [RFC5869] using SHA-256. * */ class HkdfSha256 @@ -72,7 +72,7 @@ public: ~HkdfSha256(void); /** - * This method performs the HKDF Extract step. + * Performs the HKDF Extract step. * * In the Extract step getting an input key extracts from it a pseudo-random key. * @@ -84,7 +84,7 @@ public: void Extract(const uint8_t *aSalt, uint16_t aSaltLength, const Key &aInputKey); /** - * This method performs the HKDF Expand step. + * Performs the HKDF Expand step. * * The method should be used after a previous `Extract` call, otherwise its behavior is undefined. In the Expand * stage an output key of a given length is derived from the pseudo-random key of Extract stage. diff --git a/src/core/crypto/hmac_sha256.hpp b/src/core/crypto/hmac_sha256.hpp index 37141ceef..a8b130356 100644 --- a/src/core/crypto/hmac_sha256.hpp +++ b/src/core/crypto/hmac_sha256.hpp @@ -59,14 +59,14 @@ namespace Crypto { */ /** - * This class implements HMAC SHA-256 computation. + * Implements HMAC SHA-256 computation. * */ class HmacSha256 { public: /** - * This type represents a HMAC SHA-256 hash. + * Represents a HMAC SHA-256 hash. * */ typedef Sha256::Hash Hash; @@ -84,7 +84,7 @@ public: ~HmacSha256(void); /** - * This method sets the key and starts the HMAC computation. + * Sets the key and starts the HMAC computation. * * @param[in] aKey The key to use. * @@ -92,7 +92,7 @@ public: void Start(const Key &aKey); /** - * This method inputs bytes into the HMAC computation. + * Inputs bytes into the HMAC computation. * * @param[in] aBuf A pointer to the input buffer. * @param[in] aBufLength The length of @p aBuf in bytes. @@ -101,7 +101,7 @@ public: void Update(const void *aBuf, uint16_t aBufLength); /** - * This method inputs an object (treated as a sequence of bytes) into the HMAC computation. + * Inputs an object (treated as a sequence of bytes) into the HMAC computation. * * @tparam ObjectType The object type. * @@ -115,7 +115,7 @@ public: } /** - * This method inputs the bytes read from a given message into the HMAC computation. + * Inputs the bytes read from a given message into the HMAC computation. * * @param[in] aMessage The message to read the data from. * @param[in] aOffset The offset into @p aMessage to start to read. @@ -125,7 +125,7 @@ public: void Update(const Message &aMessage, uint16_t aOffset, uint16_t aLength); /** - * This method finalizes the hash computation. + * Finalizes the hash computation. * * @param[out] aHash A reference to a `Hash` to output the calculated hash. * diff --git a/src/core/crypto/mbedtls.hpp b/src/core/crypto/mbedtls.hpp index a5fd869b6..8db6e7405 100644 --- a/src/core/crypto/mbedtls.hpp +++ b/src/core/crypto/mbedtls.hpp @@ -68,20 +68,20 @@ namespace Crypto { */ /** - * This class implements mbedTLS memory. + * Implements mbedTLS memory. * */ class MbedTls : private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * */ MbedTls(void); /** - * This method converts an mbed TLS error to OpenThread error. + * Converts an mbed TLS error to OpenThread error. * * @param[in] aMbedTlsError The mbed TLS error. * @@ -92,7 +92,7 @@ public: #if !OPENTHREAD_RADIO /** - * This function fills a given buffer with cryptographically secure random bytes. + * Fills a given buffer with cryptographically secure random bytes. * * @param[in] aContext A pointer to arbitrary context. * @param[out] aBuffer A pointer to a buffer to fill with the random bytes. diff --git a/src/core/crypto/sha256.hpp b/src/core/crypto/sha256.hpp index f895c8ec6..67b4f49fb 100644 --- a/src/core/crypto/sha256.hpp +++ b/src/core/crypto/sha256.hpp @@ -62,14 +62,14 @@ namespace Crypto { */ /** - * This class implements SHA-256 computation. + * Implements SHA-256 computation. * */ class Sha256 { public: /** - * This type represents a SHA-256 hash. + * Represents a SHA-256 hash. * */ class Hash : public otCryptoSha256Hash, public Clearable, public Equatable @@ -78,7 +78,7 @@ public: static const uint8_t kSize = OT_CRYPTO_SHA256_HASH_SIZE; ///< SHA-256 hash size (bytes) /** - * This method returns a pointer to a byte array containing the hash value. + * Returns a pointer to a byte array containing the hash value. * * @returns A pointer to a byte array containing the hash. * @@ -99,13 +99,13 @@ public: ~Sha256(void); /** - * This method starts the SHA-256 computation. + * Starts the SHA-256 computation. * */ void Start(void); /** - * This method inputs bytes into the SHA-256 computation. + * Inputs bytes into the SHA-256 computation. * * @param[in] aBuf A pointer to the input buffer. * @param[in] aBufLength The length of @p aBuf in bytes. @@ -114,7 +114,7 @@ public: void Update(const void *aBuf, uint16_t aBufLength); /** - * This method inputs an object (treated as a sequence of bytes) into the SHA-256 computation. + * Inputs an object (treated as a sequence of bytes) into the SHA-256 computation. * * @tparam ObjectType The object type. * @@ -128,7 +128,7 @@ public: } /** - * This method inputs the bytes read from a given message into the SHA-256 computation. + * Inputs the bytes read from a given message into the SHA-256 computation. * * @param[in] aMessage The message to read the data from. * @param[in] aOffset The offset into @p aMessage to start to read. @@ -138,7 +138,7 @@ public: void Update(const Message &aMessage, uint16_t aOffset, uint16_t aLength); /** - * This method finalizes the hash computation. + * Finalizes the hash computation. * * @param[out] aHash A reference to a `Hash` to output the calculated hash. * diff --git a/src/core/crypto/storage.hpp b/src/core/crypto/storage.hpp index 8193943fb..f585803d0 100644 --- a/src/core/crypto/storage.hpp +++ b/src/core/crypto/storage.hpp @@ -52,7 +52,7 @@ namespace Crypto { namespace Storage { /** - * This enumeration defines the key types. + * Defines the key types. * */ enum KeyType : uint8_t @@ -64,7 +64,7 @@ enum KeyType : uint8_t }; /** - * This enumeration defines the key algorithms. + * Defines the key algorithms. * */ enum KeyAlgorithm : uint8_t @@ -83,7 +83,7 @@ constexpr uint8_t kUsageSignHash = OT_CRYPTO_KEY_USAGE_SIGN_HASH; ///< Key U constexpr uint8_t kUsageVerifyHash = OT_CRYPTO_KEY_USAGE_VERIFY_HASH; ///< Key Usage: Verify Hash. /** - * This enumeration defines the key storage types. + * Defines the key storage types. * */ enum StorageType : uint8_t @@ -201,7 +201,7 @@ void DestroyPersistentKeys(void); #endif // OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This class represents a crypto key. + * Represents a crypto key. * * The `Key` can represent a literal key (i.e., a pointer to a byte array containing the key along with a key length) * or a `KeyRef` (if `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled). @@ -211,7 +211,7 @@ class Key : public otCryptoKey, public Clearable { public: /** - * This method sets the `Key` as a literal key from a given byte array and length. + * Sets the `Key` as a literal key from a given byte array and length. * * @param[in] aKeyBytes A pointer to buffer containing the key. * @param[in] aKeyLength The key length (number of bytes in @p aKeyBytes). @@ -224,7 +224,7 @@ public: } /** - * This method gets the pointer to the bye array containing the key. + * Gets the pointer to the bye array containing the key. * * If `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled and `IsKeyRef()` returns `true`, then this * method returns `nullptr`. @@ -235,7 +235,7 @@ public: const uint8_t *GetBytes(void) const { return mKey; } /** - * This method gets the key length (number of bytes). + * Gets the key length (number of bytes). * * If `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled and `IsKeyRef()` returns `true`, then this * method returns zero. @@ -248,7 +248,7 @@ public: #if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This method indicates whether or not the key is represented as a `KeyRef`. + * Indicates whether or not the key is represented as a `KeyRef`. * * @retval TRUE The `Key` represents a `KeyRef` * @retval FALSE The `Key` represents a literal key. @@ -257,9 +257,9 @@ public: bool IsKeyRef(void) const { return (mKey == nullptr); } /** - * This method gets the `KeyRef`. + * Gets the `KeyRef`. * - * This method MUST be used when `IsKeyRef()` returns `true`, otherwise its behavior is undefined. + * MUST be used when `IsKeyRef()` returns `true`, otherwise its behavior is undefined. * * @returns The `KeyRef` associated with `Key`. * @@ -267,7 +267,7 @@ public: Storage::KeyRef GetKeyRef(void) const { return mKeyRef; } /** - * This method sets the `Key` as a `KeyRef`. + * Sets the `Key` as a `KeyRef`. * * @param[in] aKeyRef The `KeyRef` to set from. * @@ -280,9 +280,9 @@ public: } /** - * This method extracts and return the literal key when the key is represented as a `KeyRef` + * Extracts and return the literal key when the key is represented as a `KeyRef` * - * This method MUST be used when `IsKeyRef()` returns `true`. + * MUST be used when `IsKeyRef()` returns `true`. * * @param[out] aKeyBuffer Pointer to a byte array buffer to place the extracted key. * @param[in,out] aKeyLength On input, the size of @p aKeyBuffer. @@ -297,7 +297,7 @@ public: }; /** - * This class represents a literal key derived from a `Key`. + * Represents a literal key derived from a `Key`. * */ class LiteralKey : public Clearable, private NonCopyable @@ -306,7 +306,7 @@ public: static constexpr uint16_t kMaxSize = 32; ///< Maximum size of the key. /** - * This constructor initializes the `LiteralKey` from a given `Key`. + * Initializes the `LiteralKey` from a given `Key`. * * If the @p aKey is itself represents a literal key the same key buffer pointers are used. If the @p aKey is * a `KeyRef` then the literal key is extracted. In this case, the extracted key MUST be smaller than `kMaxSize`. @@ -317,7 +317,7 @@ public: explicit LiteralKey(const Key &aKey); /* - * This method gets the pointer to the byte array containing the literal key. + * Gets the pointer to the byte array containing the literal key. * * @returns The pointer to the byte array containing the literal key. * @@ -325,7 +325,7 @@ public: const uint8_t *GetBytes(void) const { return mKey; } /** - * This method gets the key length. + * Gets the key length. * * @returns The key length (number of bytes in the byte array from `GetBytes()`). * diff --git a/src/core/diags/factory_diags.hpp b/src/core/diags/factory_diags.hpp index d7ac648f9..5d015d278 100644 --- a/src/core/diags/factory_diags.hpp +++ b/src/core/diags/factory_diags.hpp @@ -62,7 +62,7 @@ public: explicit Diags(Instance &aInstance); /** - * This method processes a factory diagnostics command line. + * Processes a factory diagnostics command line. * * @param[in] aString A null-terminated input string. * @param[out] aOutput The diagnostics execution result. @@ -72,7 +72,7 @@ public: Error ProcessLine(const char *aString, char *aOutput, size_t aOutputMaxLen); /** - * This method processes a factory diagnostics command line. + * Processes a factory diagnostics command line. * * @param[in] aArgsLength The number of args in @p aArgs. * @param[in] aArgs The arguments of diagnostics command line. @@ -87,7 +87,7 @@ public: Error ProcessCmd(uint8_t aArgsLength, char *aArgs[], char *aOutput, size_t aOutputMaxLen); /** - * This method indicates whether or not the factory diagnostics mode is enabled. + * Indicates whether or not the factory diagnostics mode is enabled. * * @retval TRUE if factory diagnostics mode is enabled * @retval FALSE if factory diagnostics mode is disabled. diff --git a/src/core/mac/channel_mask.hpp b/src/core/mac/channel_mask.hpp index 200ab5b25..36ad78d45 100644 --- a/src/core/mac/channel_mask.hpp +++ b/src/core/mac/channel_mask.hpp @@ -57,7 +57,7 @@ namespace Mac { */ /** - * This class defines a channel mask. + * Defines a channel mask. * * It is a wrapper class around a `uint32_t` bit vector representing a set of channels. * @@ -74,13 +74,13 @@ public: static constexpr uint16_t kInfoStringSize = 45; ///< Recommended buffer size to use with `ToString()`. /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This constructor initializes a `ChannelMask` instance. + * Initializes a `ChannelMask` instance. * */ ChannelMask(void) @@ -89,7 +89,7 @@ public: } /** - * This constructor initializes a `ChannelMask` instance with a given mask. + * Initializes a `ChannelMask` instance with a given mask. * * @param[in] aMask A channel mask (as a `uint32_t` bit-vector mask with bit 0 (lsb) -> channel 0, and so on). * @@ -100,13 +100,13 @@ public: } /** - * This method clears the channel mask. + * Clears the channel mask. * */ void Clear(void) { mMask = 0; } /** - * This method gets the channel mask (as a `uint32_t` bit-vector mask with bit 0 (lsb) -> channel 0, and so on). + * Gets the channel mask (as a `uint32_t` bit-vector mask with bit 0 (lsb) -> channel 0, and so on). * * @returns The channel mask. * @@ -114,7 +114,7 @@ public: uint32_t GetMask(void) const { return mMask; } /** - * This method sets the channel mask. + * Sets the channel mask. * * @param[in] aMask A channel mask (as a `uint32_t` bit-vector mask with bit 0 (lsb) -> channel 0, and so on). * @@ -122,7 +122,7 @@ public: void SetMask(uint32_t aMask) { mMask = aMask; } /** - * This method indicates if the mask is empty. + * Indicates if the mask is empty. * * @returns TRUE if the mask is empty, FALSE otherwise. * @@ -130,7 +130,7 @@ public: bool IsEmpty(void) const { return (mMask == 0); } /** - * This method indicates if the mask contains only a single channel. + * Indicates if the mask contains only a single channel. * * @returns TRUE if channel mask contains a single channel, FALSE otherwise * @@ -138,7 +138,7 @@ public: bool IsSingleChannel(void) const { return ((mMask != 0) && ((mMask & (mMask - 1)) == 0)); } /** - * This method indicates if the mask contains a given channel. + * Indicates if the mask contains a given channel. * * @param[in] aChannel A channel. * @@ -151,7 +151,7 @@ public: } /** - * This method adds a channel to the channel mask. + * Adds a channel to the channel mask. * * @param[in] aChannel A channel * @@ -165,7 +165,7 @@ public: } /** - * This method removes a channel from the channel mask. + * Removes a channel from the channel mask. * * @param[in] aChannel A channel * @@ -179,7 +179,7 @@ public: } /** - * This method updates the channel mask by intersecting it with another mask. + * Updates the channel mask by intersecting it with another mask. * * @param[in] aOtherMask Another channel mask. * @@ -187,7 +187,7 @@ public: void Intersect(const ChannelMask &aOtherMask) { mMask &= aOtherMask.mMask; } /** - * This method returns the number of channels in the mask. + * Returns the number of channels in the mask. * * @returns Number of channels in the mask. * @@ -195,9 +195,9 @@ public: uint8_t GetNumberOfChannels(void) const; /** - * This method gets the next channel in the channel mask. + * Gets the next channel in the channel mask. * - * This method can be used to iterate over all channels in the channel mask. To get the first channel (channel with + * Can be used to iterate over all channels in the channel mask. To get the first channel (channel with * lowest number) in the mask the @p aChannel should be set to `kChannelIteratorFirst`. * * @param[in,out] aChannel A reference to a `uint8_t`. @@ -211,7 +211,7 @@ public: Error GetNextChannel(uint8_t &aChannel) const; /** - * This method randomly chooses a channel from the channel mask. + * Randomly chooses a channel from the channel mask. * * @returns A randomly chosen channel from the given mask, or `kChannelIteratorFirst` if the mask is empty. * @@ -219,7 +219,7 @@ public: uint8_t ChooseRandomChannel(void) const; /** - * This method overloads `==` operator to indicate whether two masks are equal. + * Overloads `==` operator to indicate whether two masks are equal. * * @param[in] aAnother A reference to another mask to compare with the current one. * @@ -229,7 +229,7 @@ public: bool operator==(const ChannelMask &aAnother) const { return (mMask == aAnother.mMask); } /** - * This method converts the channel mask into a human-readable string. + * Converts the channel mask into a human-readable string. * * Examples of possible output: * - empty mask -> "{ }" diff --git a/src/core/mac/data_poll_handler.hpp b/src/core/mac/data_poll_handler.hpp index 11cb531bb..da7f744b7 100644 --- a/src/core/mac/data_poll_handler.hpp +++ b/src/core/mac/data_poll_handler.hpp @@ -60,7 +60,7 @@ namespace ot { class Child; /** - * This class implements the data poll (mac data request command) handler. + * Implements the data poll (mac data request command) handler. * */ class DataPollHandler : public InstanceLocator, private NonCopyable @@ -71,7 +71,7 @@ public: static constexpr uint8_t kMaxPollTriggeredTxAttempts = OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS; /** - * This enumeration defines frame change request types used as input to `RequestFrameChange()`. + * Defines frame change request types used as input to `RequestFrameChange()`. * */ enum FrameChange : uint8_t @@ -81,7 +81,7 @@ public: }; /** - * This class defines all the child info required for handling of data polls and indirect frame transmissions. + * Defines all the child info required for handling of data polls and indirect frame transmissions. * * `Child` class publicly inherits from this class. * @@ -136,7 +136,7 @@ public: }; /** - * This class defines the callbacks used by the `DataPollHandler`. + * Defines the callbacks used by the `DataPollHandler`. * */ class Callbacks : public InstanceLocator @@ -145,7 +145,7 @@ public: private: /** - * This type defines the frame context associated with a prepared frame. + * Defines the frame context associated with a prepared frame. * * Data poll handler treats `FrameContext` as an opaque data type. Data poll handler provides the buffer/object * for the context when a new frame is prepared (from the callback `PrepareFrameForChild()`). It ensures @@ -156,7 +156,7 @@ public: typedef IndirectSenderBase::FrameContext FrameContext; /** - * This constructor initializes the callbacks object. + * Initializes the callbacks object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -206,7 +206,7 @@ public: }; /** - * This constructor initializes the data poll handler object. + * Initializes the data poll handler object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -214,13 +214,13 @@ public: explicit DataPollHandler(Instance &aInstance); /** - * This method clears any state/info saved per child for indirect frame transmission. + * Clears any state/info saved per child for indirect frame transmission. * */ void Clear(void); /** - * This method informs data poll handler that there is a new frame for a given child. + * Informs data poll handler that there is a new frame for a given child. * * After this call, the data poll handler can use the `Callbacks::PrepareFrameForChild()` method to request the * frame to be prepared. A subsequent call to `Callbacks::PrepareFrameForChild()` should ensure to prepare the same @@ -234,7 +234,7 @@ public: void HandleNewFrame(Child &aChild); /** - * This method requests a frame change for a given child. + * Requests a frame change for a given child. * * Two types of frame change requests are supported: * diff --git a/src/core/mac/data_poll_sender.hpp b/src/core/mac/data_poll_sender.hpp index 2327bd9ad..edb66b806 100644 --- a/src/core/mac/data_poll_sender.hpp +++ b/src/core/mac/data_poll_sender.hpp @@ -56,7 +56,7 @@ namespace ot { */ /** - * This class implements the data poll (mac data request command) sender. + * Implements the data poll (mac data request command) sender. * */ @@ -68,7 +68,7 @@ public: static constexpr uint8_t kMaxFastPollsUsers = 63; ///< Maximum number of the users of fast poll tx allowed. /** - * This constructor initializes the data poll sender object. + * Initializes the data poll sender object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -76,19 +76,19 @@ public: explicit DataPollSender(Instance &aInstance); /** - * This method instructs the data poll sender to start sending periodic data polls. + * Instructs the data poll sender to start sending periodic data polls. * */ void StartPolling(void); /** - * This method instructs the data poll sender to stop sending periodic data polls. + * Instructs the data poll sender to stop sending periodic data polls. * */ void StopPolling(void); /** - * This method enqueues a data poll (an IEEE 802.15.4 Data Request) message. + * Enqueues a data poll (an IEEE 802.15.4 Data Request) message. * * @retval kErrorNone Successfully enqueued a data poll message * @retval kErrorAlready A data poll message is already enqueued. @@ -99,7 +99,7 @@ public: Error SendDataPoll(void); /** - * This method sets/clears a user-specified/external data poll period. + * Sets/clears a user-specified/external data poll period. * * Value of zero for `aPeriod` clears the user-specified poll period. * @@ -121,7 +121,7 @@ public: Error SetExternalPollPeriod(uint32_t aPeriod); /** - * This method gets the current user-specified/external data poll period. + * Gets the current user-specified/external data poll period. * * @returns The data poll period in milliseconds. * @@ -129,7 +129,7 @@ public: uint32_t GetExternalPollPeriod(void) const { return mExternalPollPeriod; } /** - * This method informs the data poll sender of success/error status of a previously requested poll frame + * Informs the data poll sender of success/error status of a previously requested poll frame * transmission. * * In case of transmit failure, the data poll sender may choose to send the next data poll more quickly (up to @@ -142,7 +142,7 @@ public: void HandlePollSent(Mac::TxFrame &aFrame, Error aError); /** - * This method informs the data poll sender that a data poll timeout happened, i.e., when the ack in response to + * Informs the data poll sender that a data poll timeout happened, i.e., when the ack in response to * a data request command indicated that a frame was pending, but no frame was received after timeout interval. * * Data poll sender may choose to transmit another data poll immediately (up to some fixed number of attempts). @@ -151,7 +151,7 @@ public: void HandlePollTimeout(void); /** - * This method informs the data poll sender to process a received MAC frame. + * Informs the data poll sender to process a received MAC frame. * * @param[in] aFrame A reference to the received frame to process. * @@ -160,7 +160,7 @@ public: #if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 /** - * This method informs the data poll sender to process a transmitted MAC frame. + * Informs the data poll sender to process a transmitted MAC frame. * * @param[in] aFrame A reference to the frame that was transmitted. * @param[in] aAckFrame A pointer to the ACK frame, `nullptr` if no ACK was received. @@ -174,7 +174,7 @@ public: #endif /** - * This method asks the data poll sender to recalculate the poll period. + * Asks the data poll sender to recalculate the poll period. * * This is mainly used to inform the poll sender that a parameter impacting the poll period (e.g., the child's * timeout value which is used to determine the default data poll period) is modified. @@ -183,7 +183,7 @@ public: void RecalculatePollPeriod(void); /** - * This method sets/clears the attach mode on data poll sender. + * Sets/clears the attach mode on data poll sender. * * When attach mode is enabled, the data poll sender will send data polls at a faster rate determined by * poll period configuration option `OPENTHREAD_CONFIG_MAC_ATTACH_DATA_POLL_PERIOD`. @@ -194,7 +194,7 @@ public: void SetAttachMode(bool aMode); /** - * This method asks data poll sender to send the next given number of polls at a faster rate (poll period defined + * Asks data poll sender to send the next given number of polls at a faster rate (poll period defined * by `kFastPollPeriod`). This is used by OpenThread stack when it expects a response from the parent/sender. * * If @p aNumFastPolls is zero the default value specified by `kDefaultFastPolls` is used instead. The number of @@ -212,13 +212,13 @@ public: void SendFastPolls(uint8_t aNumFastPolls = 0); /** - * This method asks data poll sender to stop fast polls when the expecting response is received. + * Asks data poll sender to stop fast polls when the expecting response is received. * */ void StopFastPolls(void); /** - * This method gets the maximum data polling period in use. + * Gets the maximum data polling period in use. * * The maximum data poll period is determined based as the minimum of the user-specified poll interval and the * default poll interval. @@ -229,13 +229,13 @@ public: uint32_t GetKeepAlivePollPeriod(void) const; /** - * This method resets the timer for sending keep-alive messages. + * Resets the timer for sending keep-alive messages. * */ void ResetKeepAliveTimer(void); /** - * This method returns the default maximum poll period. + * Returns the default maximum poll period. * * The default poll period is determined based on the child timeout interval, ensuing the child would send data poll * within the child's timeout. @@ -246,7 +246,7 @@ public: uint32_t GetDefaultPollPeriod(void) const; /** - * This method prepares and returns a data request command frame. + * Prepares and returns a data request command frame. * * @param[in] aTxFrames The set of TxFrames for all radio links. * diff --git a/src/core/mac/link_raw.hpp b/src/core/mac/link_raw.hpp index d630ebe63..07236f788 100644 --- a/src/core/mac/link_raw.hpp +++ b/src/core/mac/link_raw.hpp @@ -50,7 +50,7 @@ namespace ot { namespace Mac { /** - * This class defines the raw link-layer object. + * Defines the raw link-layer object. * */ class LinkRaw : public InstanceLocator, private NonCopyable @@ -59,7 +59,7 @@ class LinkRaw : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -67,13 +67,13 @@ public: explicit LinkRaw(Instance &aInstance); /** - * This method initializes the states of the raw link-layer. + * Initializes the states of the raw link-layer. * */ void Init(void); /** - * This method returns true if the raw link-layer is enabled. + * Returns true if the raw link-layer is enabled. * * @returns true if enabled, false otherwise. * @@ -81,7 +81,7 @@ public: bool IsEnabled(void) const { return mReceiveDoneCallback != nullptr; } /** - * This method enables/disables the raw link-layer. + * Enables/disables the raw link-layer. * * @param[in] aCallback A pointer to a function called on receipt of a IEEE 802.15.4 frame, `nullptr` to disable * raw link-layer. @@ -95,7 +95,7 @@ public: Error SetReceiveDone(otLinkRawReceiveDone aCallback); /** - * This method returns the capabilities of the raw link-layer. + * Returns the capabilities of the raw link-layer. * * @returns The radio capability bit vector. * @@ -103,7 +103,7 @@ public: otRadioCaps GetCaps(void) const { return mSubMac.GetCaps(); } /** - * This method starts a (recurring) Receive on the link-layer. + * Starts a (recurring) Receive on the link-layer. * * @retval kErrorNone Successfully transitioned to Receive. * @retval kErrorInvalidState The radio was disabled or transmitting. @@ -112,7 +112,7 @@ public: Error Receive(void); /** - * This method invokes the mReceiveDoneCallback, if set. + * Invokes the mReceiveDoneCallback, if set. * * @param[in] aFrame A pointer to the received frame or `nullptr` if the receive operation failed. * @param[in] aError kErrorNone when successfully received a frame, @@ -123,7 +123,7 @@ public: void InvokeReceiveDone(RxFrame *aFrame, Error aError); /** - * This method gets the radio transmit frame. + * Gets the radio transmit frame. * * @returns The transmit frame. * @@ -131,7 +131,7 @@ public: TxFrame &GetTransmitFrame(void) { return mSubMac.GetTransmitFrame(); } /** - * This method starts a (single) Transmit on the link-layer. + * Starts a (single) Transmit on the link-layer. * * @note The callback @p aCallback will not be called if this call does not return kErrorNone. * @@ -144,7 +144,7 @@ public: Error Transmit(otLinkRawTransmitDone aCallback); /** - * This method invokes the mTransmitDoneCallback, if set. + * Invokes the mTransmitDoneCallback, if set. * * @param[in] aFrame The transmitted frame. * @param[in] aAckFrame A pointer to the ACK frame, `nullptr` if no ACK was received. @@ -157,7 +157,7 @@ public: void InvokeTransmitDone(TxFrame &aFrame, RxFrame *aAckFrame, Error aError); /** - * This method starts a (single) Energy Scan on the link-layer. + * Starts a (single) Energy Scan on the link-layer. * * @param[in] aScanChannel The channel to perform the energy scan on. * @param[in] aScanDuration The duration, in milliseconds, for the channel to be scanned. @@ -172,7 +172,7 @@ public: Error EnergyScan(uint8_t aScanChannel, uint16_t aScanDuration, otLinkRawEnergyScanDone aCallback); /** - * This method invokes the mEnergyScanDoneCallback, if set. + * Invokes the mEnergyScanDoneCallback, if set. * * @param[in] aEnergyScanMaxRssi The max RSSI for energy scan. * @@ -180,7 +180,7 @@ public: void InvokeEnergyScanDone(int8_t aEnergyScanMaxRssi); /** - * This function returns the short address. + * Returns the short address. * * @returns short address. * @@ -188,7 +188,7 @@ public: ShortAddress GetShortAddress(void) const { return mSubMac.GetShortAddress(); } /** - * This method updates short address. + * Updates short address. * * @param[in] aShortAddress The short address. * @@ -199,7 +199,7 @@ public: Error SetShortAddress(ShortAddress aShortAddress); /** - * This function returns PANID. + * Returns PANID. * * @returns PANID. * @@ -207,7 +207,7 @@ public: PanId GetPanId(void) const { return mPanId; } /** - * This method updates PANID. + * Updates PANID. * * @param[in] aPanId The PANID. * @@ -218,7 +218,7 @@ public: Error SetPanId(PanId aPanId); /** - * This method gets the current receiving channel. + * Gets the current receiving channel. * * @returns Current receiving channel. * @@ -226,7 +226,7 @@ public: uint8_t GetChannel(void) const { return mReceiveChannel; } /** - * This method sets the receiving channel. + * Sets the receiving channel. * * @param[in] aChannel The channel to use for receiving. * @@ -234,7 +234,7 @@ public: Error SetChannel(uint8_t aChannel); /** - * This function returns the extended address. + * Returns the extended address. * * @returns A reference to the extended address. * @@ -242,7 +242,7 @@ public: const ExtAddress &GetExtAddress(void) const { return mSubMac.GetExtAddress(); } /** - * This method updates extended address. + * Updates extended address. * * @param[in] aExtAddress The extended address. * @@ -253,7 +253,7 @@ public: Error SetExtAddress(const ExtAddress &aExtAddress); /** - * This method updates MAC keys and key index. + * Updates MAC keys and key index. * * @param[in] aKeyIdMode The key ID mode. * @param[in] aKeyId The key index. @@ -269,7 +269,7 @@ public: Error SetMacKey(uint8_t aKeyIdMode, uint8_t aKeyId, const Key &aPrevKey, const Key &aCurrKey, const Key &aNextKey); /** - * This method sets the current MAC frame counter value. + * Sets the current MAC frame counter value. * * @param[in] aFrameCounter The MAC frame counter value. * @param[in] aSetIfLarger If `true`, set only if the new value @p aFrameCounter is larger than current value. @@ -283,7 +283,7 @@ public: #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_INFO) /** - * This method records the status of a frame transmission attempt and is mainly used for logging failures. + * Records the status of a frame transmission attempt and is mainly used for logging failures. * * Unlike `HandleTransmitDone` which is called after all transmission attempts of frame to indicate final status * of a frame transmission request, this method is invoked on all frame transmission attempts. diff --git a/src/core/mac/mac.hpp b/src/core/mac/mac.hpp index 356610941..cc0fd57ae 100644 --- a/src/core/mac/mac.hpp +++ b/src/core/mac/mac.hpp @@ -88,32 +88,32 @@ constexpr uint8_t kMaxFrameRetriesCsl = 0; constexpr uint8_t kTxNumBcast = OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST; ///< Num of times broadcast frame is tx. /** - * This type defines the function pointer called on receiving an IEEE 802.15.4 Beacon during an Active Scan. + * Defines the function pointer called on receiving an IEEE 802.15.4 Beacon during an Active Scan. * */ typedef otHandleActiveScanResult ActiveScanHandler; /** - * This type defines an Active Scan result. + * Defines an Active Scan result. * */ typedef otActiveScanResult ActiveScanResult; /** - * This type defines the function pointer which is called during an Energy Scan when the scan result for a channel is + * Defines the function pointer which is called during an Energy Scan when the scan result for a channel is * ready or when the scan completes. * */ typedef otHandleEnergyScanResult EnergyScanHandler; /** - * This type defines an Energy Scan result. + * Defines an Energy Scan result. * */ typedef otEnergyScanResult EnergyScanResult; /** - * This class implements the IEEE 802.15.4 MAC. + * Implements the IEEE 802.15.4 MAC. * */ class Mac : public InstanceLocator, private NonCopyable @@ -122,7 +122,7 @@ class Mac : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the MAC object. + * Initializes the MAC object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -130,7 +130,7 @@ public: explicit Mac(Instance &aInstance); /** - * This method starts an IEEE 802.15.4 Active Scan. + * Starts an IEEE 802.15.4 Active Scan. * * @param[in] aScanChannels A bit vector indicating which channels to scan. Zero is mapped to all channels. * @param[in] aScanDuration The time in milliseconds to spend scanning each channel. Zero duration maps to @@ -145,7 +145,7 @@ public: Error ActiveScan(uint32_t aScanChannels, uint16_t aScanDuration, ActiveScanHandler aHandler, void *aContext); /** - * This method starts an IEEE 802.15.4 Energy Scan. + * Starts an IEEE 802.15.4 Energy Scan. * * @param[in] aScanChannels A bit vector indicating on which channels to scan. Zero is mapped to all channels. * @param[in] aScanDuration The time in milliseconds to spend scanning each channel. If the duration is set to @@ -160,7 +160,7 @@ public: Error EnergyScan(uint32_t aScanChannels, uint16_t aScanDuration, EnergyScanHandler aHandler, void *aContext); /** - * This method indicates the energy scan for the current channel is complete. + * Indicates the energy scan for the current channel is complete. * * @param[in] aEnergyScanMaxRssi The maximum RSSI encountered on the scanned channel. * @@ -168,7 +168,7 @@ public: void EnergyScanDone(int8_t aEnergyScanMaxRssi); /** - * This method indicates whether or not IEEE 802.15.4 Beacon transmissions are enabled. + * Indicates whether or not IEEE 802.15.4 Beacon transmissions are enabled. * * @retval TRUE If IEEE 802.15.4 Beacon transmissions are enabled. * @retval FALSE If IEEE 802.15.4 Beacon transmissions are not enabled. @@ -177,7 +177,7 @@ public: bool IsBeaconEnabled(void) const { return mBeaconsEnabled; } /** - * This method enables/disables IEEE 802.15.4 Beacon transmissions. + * Enables/disables IEEE 802.15.4 Beacon transmissions. * * @param[in] aEnabled TRUE to enable IEEE 802.15.4 Beacon transmissions, FALSE otherwise. * @@ -185,7 +185,7 @@ public: void SetBeaconEnabled(bool aEnabled) { mBeaconsEnabled = aEnabled; } /** - * This method indicates whether or not rx-on-when-idle is enabled. + * Indicates whether or not rx-on-when-idle is enabled. * * @retval TRUE If rx-on-when-idle is enabled. * @retval FALSE If rx-on-when-idle is not enabled. @@ -193,7 +193,7 @@ public: bool GetRxOnWhenIdle(void) const { return mRxOnWhenIdle; } /** - * This method sets the rx-on-when-idle mode. + * Sets the rx-on-when-idle mode. * * @param[in] aRxOnWhenIdle The rx-on-when-idle mode. * @@ -201,21 +201,21 @@ public: void SetRxOnWhenIdle(bool aRxOnWhenIdle); /** - * This method requests a direct data frame transmission. + * Requests a direct data frame transmission. * */ void RequestDirectFrameTransmission(void); #if OPENTHREAD_FTD /** - * This method requests an indirect data frame transmission. + * Requests an indirect data frame transmission. * */ void RequestIndirectFrameTransmission(void); #if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE /** - * This method requests `Mac` to start a CSL tx operation after a delay of @p aDelay time. + * Requests `Mac` to start a CSL tx operation after a delay of @p aDelay time. * * @param[in] aDelay Delay time for `Mac` to start a CSL tx, in units of milliseconds. * @@ -226,7 +226,7 @@ public: #endif /** - * This method requests transmission of a data poll (MAC Data Request) frame. + * Requests transmission of a data poll (MAC Data Request) frame. * * @retval kErrorNone Data poll transmission request is scheduled successfully. * @retval kErrorInvalidState The MAC layer is not enabled. @@ -235,7 +235,7 @@ public: Error RequestDataPollTransmission(void); /** - * This method returns a reference to the IEEE 802.15.4 Extended Address. + * Returns a reference to the IEEE 802.15.4 Extended Address. * * @returns A pointer to the IEEE 802.15.4 Extended Address. * @@ -243,7 +243,7 @@ public: const ExtAddress &GetExtAddress(void) const { return mLinks.GetExtAddress(); } /** - * This method sets the IEEE 802.15.4 Extended Address. + * Sets the IEEE 802.15.4 Extended Address. * * @param[in] aExtAddress A reference to the IEEE 802.15.4 Extended Address. * @@ -251,7 +251,7 @@ public: void SetExtAddress(const ExtAddress &aExtAddress) { mLinks.SetExtAddress(aExtAddress); } /** - * This method returns the IEEE 802.15.4 Short Address. + * Returns the IEEE 802.15.4 Short Address. * * @returns The IEEE 802.15.4 Short Address. * @@ -259,7 +259,7 @@ public: ShortAddress GetShortAddress(void) const { return mLinks.GetShortAddress(); } /** - * This method sets the IEEE 802.15.4 Short Address. + * Sets the IEEE 802.15.4 Short Address. * * @param[in] aShortAddress The IEEE 802.15.4 Short Address. * @@ -267,7 +267,7 @@ public: void SetShortAddress(ShortAddress aShortAddress) { mLinks.SetShortAddress(aShortAddress); } /** - * This method returns the IEEE 802.15.4 PAN Channel. + * Returns the IEEE 802.15.4 PAN Channel. * * @returns The IEEE 802.15.4 PAN Channel. * @@ -275,7 +275,7 @@ public: uint8_t GetPanChannel(void) const { return mPanChannel; } /** - * This method sets the IEEE 802.15.4 PAN Channel. + * Sets the IEEE 802.15.4 PAN Channel. * * @param[in] aChannel The IEEE 802.15.4 PAN Channel. * @@ -286,9 +286,9 @@ public: Error SetPanChannel(uint8_t aChannel); /** - * This method sets the temporary IEEE 802.15.4 radio channel. + * Sets the temporary IEEE 802.15.4 radio channel. * - * This method allows user to temporarily change the radio channel and use a different channel (during receive) + * Allows user to temporarily change the radio channel and use a different channel (during receive) * instead of the PAN channel (from `SetPanChannel()`). A call to `ClearTemporaryChannel()` would clear the * temporary channel and adopt the PAN channel again. The `SetTemporaryChannel()` can be used multiple times in row * (before a call to `ClearTemporaryChannel()`) to change the temporary channel. @@ -302,13 +302,13 @@ public: Error SetTemporaryChannel(uint8_t aChannel); /** - * This method clears the use of a previously set temporary channel and adopts the PAN channel. + * Clears the use of a previously set temporary channel and adopts the PAN channel. * */ void ClearTemporaryChannel(void); /** - * This method returns the supported channel mask. + * Returns the supported channel mask. * * @returns The supported channel mask. * @@ -316,7 +316,7 @@ public: const ChannelMask &GetSupportedChannelMask(void) const { return mSupportedChannelMask; } /** - * This method sets the supported channel mask + * Sets the supported channel mask * * @param[in] aMask The supported channel mask. * @@ -324,7 +324,7 @@ public: void SetSupportedChannelMask(const ChannelMask &aMask); /** - * This method returns the IEEE 802.15.4 PAN ID. + * Returns the IEEE 802.15.4 PAN ID. * * @returns The IEEE 802.15.4 PAN ID. * @@ -332,7 +332,7 @@ public: PanId GetPanId(void) const { return mPanId; } /** - * This method sets the IEEE 802.15.4 PAN ID. + * Sets the IEEE 802.15.4 PAN ID. * * @param[in] aPanId The IEEE 802.15.4 PAN ID. * @@ -340,7 +340,7 @@ public: void SetPanId(PanId aPanId); /** - * This method returns the maximum number of frame retries during direct transmission. + * Returns the maximum number of frame retries during direct transmission. * * @returns The maximum number of retries during direct transmission. * @@ -348,7 +348,7 @@ public: uint8_t GetMaxFrameRetriesDirect(void) const { return mMaxFrameRetriesDirect; } /** - * This method sets the maximum number of frame retries during direct transmission. + * Sets the maximum number of frame retries during direct transmission. * * @param[in] aMaxFrameRetriesDirect The maximum number of retries during direct transmission. * @@ -357,7 +357,7 @@ public: #if OPENTHREAD_FTD /** - * This method returns the maximum number of frame retries during indirect transmission. + * Returns the maximum number of frame retries during indirect transmission. * * @returns The maximum number of retries during indirect transmission. * @@ -365,7 +365,7 @@ public: uint8_t GetMaxFrameRetriesIndirect(void) const { return mMaxFrameRetriesIndirect; } /** - * This method sets the maximum number of frame retries during indirect transmission. + * Sets the maximum number of frame retries during indirect transmission. * * @param[in] aMaxFrameRetriesIndirect The maximum number of retries during indirect transmission. * @@ -377,7 +377,7 @@ public: #endif /** - * This method is called to handle a received frame. + * Is called to handle a received frame. * * @param[in] aFrame A pointer to the received frame, or `nullptr` if the receive operation was aborted. * @param[in] aError kErrorNone when successfully received a frame, @@ -387,7 +387,7 @@ public: void HandleReceivedFrame(RxFrame *aFrame, Error aError); /** - * This method records CCA status (success/failure) for a frame transmission attempt. + * Records CCA status (success/failure) for a frame transmission attempt. * * @param[in] aCcaSuccess TRUE if the CCA succeeded, FALSE otherwise. * @param[in] aChannel The channel on which CCA was performed. @@ -396,7 +396,7 @@ public: void RecordCcaStatus(bool aCcaSuccess, uint8_t aChannel); /** - * This method records the status of a frame transmission attempt, updating MAC counters. + * Records the status of a frame transmission attempt, updating MAC counters. * * Unlike `HandleTransmitDone` which is called after all transmission attempts of frame to indicate final status * of a frame transmission request, this method is invoked on all frame transmission attempts. @@ -419,7 +419,7 @@ public: bool aWillRetx); /** - * This method is called to handle transmit events. + * Is called to handle transmit events. * * @param[in] aFrame The frame that was transmitted. * @param[in] aAckFrame A pointer to the ACK frame, `nullptr` if no ACK was received. @@ -432,20 +432,20 @@ public: void HandleTransmitDone(TxFrame &aFrame, RxFrame *aAckFrame, Error aError); /** - * This method returns if an active scan is in progress. + * Returns if an active scan is in progress. * */ bool IsActiveScanInProgress(void) const { return IsActiveOrPending(kOperationActiveScan); } /** - * This method returns if an energy scan is in progress. + * Returns if an energy scan is in progress. * */ bool IsEnergyScanInProgress(void) const { return IsActiveOrPending(kOperationEnergyScan); } #if OPENTHREAD_FTD /** - * This method indicates whether the MAC layer is performing an indirect transmission (in middle of a tx). + * Indicates whether the MAC layer is performing an indirect transmission (in middle of a tx). * * @returns TRUE if in middle of an indirect transmission, FALSE otherwise. * @@ -454,7 +454,7 @@ public: #endif /** - * This method returns if the MAC layer is in transmit state. + * Returns if the MAC layer is in transmit state. * * The MAC layer is in transmit state during CSMA/CA, CCA, transmission of Data, Beacon or Data Request frames and * receiving of ACK frames. The MAC layer is not in transmit state during transmission of ACK frames or Beacon @@ -464,7 +464,7 @@ public: bool IsInTransmitState(void) const; /** - * This method registers a callback to provide received raw IEEE 802.15.4 frames. + * Registers a callback to provide received raw IEEE 802.15.4 frames. * * @param[in] aPcapCallback A pointer to a function that is called when receiving an IEEE 802.15.4 link frame * or `nullptr` to disable the callback. @@ -477,7 +477,7 @@ public: } /** - * This method indicates whether or not promiscuous mode is enabled at the link layer. + * Indicates whether or not promiscuous mode is enabled at the link layer. * * @retval true Promiscuous mode is enabled. * @retval false Promiscuous mode is not enabled. @@ -486,7 +486,7 @@ public: bool IsPromiscuous(void) const { return mPromiscuous; } /** - * This method enables or disables the link layer promiscuous mode. + * Enables or disables the link layer promiscuous mode. * * Promiscuous mode keeps the receiver enabled, overriding the value of mRxOnWhenIdle. * @@ -496,13 +496,13 @@ public: void SetPromiscuous(bool aPromiscuous); /** - * This method resets mac counters + * Resets mac counters * */ void ResetCounters(void) { memset(&mCounters, 0, sizeof(mCounters)); } /** - * This method returns the MAC counter. + * Returns the MAC counter. * * @returns A reference to the MAC counter. * @@ -511,7 +511,7 @@ public: #if OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE /** - * This method returns the MAC retry histogram for direct transmission. + * Returns the MAC retry histogram for direct transmission. * * @param[out] aNumberOfEntries A reference to where the size of returned histogram array is placed. * @@ -523,7 +523,7 @@ public: #if OPENTHREAD_FTD /** - * This method returns the MAC retry histogram for indirect transmission. + * Returns the MAC retry histogram for indirect transmission. * * @param[out] aNumberOfEntries A reference to where the size of returned histogram array is placed. * @@ -535,14 +535,14 @@ public: #endif /** - * This method resets MAC retry histogram. + * Resets MAC retry histogram. * */ void ResetRetrySuccessHistogram(void); #endif // OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE /** - * This method returns the noise floor value (currently use the radio receive sensitivity value). + * Returns the noise floor value (currently use the radio receive sensitivity value). * * @returns The noise floor value in dBm. * @@ -550,7 +550,7 @@ public: int8_t GetNoiseFloor(void) const { return mLinks.GetNoiseFloor(); } /** - * This method computes the link margin for a given a received signal strength value using noise floor. + * Computes the link margin for a given a received signal strength value using noise floor. * * @param[in] aRss The received signal strength in dBm. * @@ -560,7 +560,7 @@ public: uint8_t ComputeLinkMargin(int8_t aRss) const; /** - * This method returns the current CCA (Clear Channel Assessment) failure rate. + * Returns the current CCA (Clear Channel Assessment) failure rate. * * The rate is maintained over a window of (roughly) last `OPENTHREAD_CONFIG_CCA_FAILURE_RATE_AVERAGING_WINDOW` * frame transmissions. @@ -571,7 +571,7 @@ public: uint16_t GetCcaFailureRate(void) const { return mCcaSuccessRateTracker.GetFailureRate(); } /** - * This method Starts/Stops the Link layer. It may only be used when the Netif Interface is down. + * Starts/Stops the Link layer. It may only be used when the Netif Interface is down. * * @param[in] aEnable The requested State for the MAC layer. true - Start, false - Stop. * @@ -579,7 +579,7 @@ public: void SetEnabled(bool aEnable) { mEnabled = aEnable; } /** - * This method indicates whether or not the link layer is enabled. + * Indicates whether or not the link layer is enabled. * * @retval true Link layer is enabled. * @retval false Link layer is not enabled. @@ -588,14 +588,14 @@ public: bool IsEnabled(void) const { return mEnabled; } /** - * This method clears the Mode2Key stored in PSA ITS. + * Clears the Mode2Key stored in PSA ITS. * */ void ClearMode2Key(void) { mMode2KeyMaterial.Clear(); } #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method gets the CSL channel. + * Gets the CSL channel. * * @returns CSL channel. * @@ -603,7 +603,7 @@ public: uint8_t GetCslChannel(void) const { return mCslChannel; } /** - * This method sets the CSL channel. + * Sets the CSL channel. * * @param[in] aChannel The CSL channel. * @@ -611,13 +611,13 @@ public: void SetCslChannel(uint8_t aChannel); /** - * This method centralizes CSL state switching conditions evaluating, configuring SubMac accordingly. + * Centralizes CSL state switching conditions evaluating, configuring SubMac accordingly. * */ void UpdateCsl(void); /** - * This method gets the CSL period. + * Gets the CSL period. * * @returns CSL period in units of 10 symbols. * @@ -625,7 +625,7 @@ public: uint16_t GetCslPeriod(void) const { return mCslPeriod; } /** - * This method gets the CSL period. + * Gets the CSL period. * * @returns CSL period in milliseconds. * @@ -633,7 +633,7 @@ public: uint32_t GetCslPeriodMs(void) const { return mCslPeriod * kUsPerTenSymbols / 1000; } /** - * This method sets the CSL period. + * Sets the CSL period. * * @param[in] aPeriod The CSL period in 10 symbols. * @@ -641,7 +641,7 @@ public: void SetCslPeriod(uint16_t aPeriod); /** - * This method indicates whether CSL is started at the moment. + * Indicates whether CSL is started at the moment. * * @retval TRUE If CSL is enabled. * @retval FALSE If CSL is not enabled. @@ -650,7 +650,7 @@ public: bool IsCslEnabled(void) const; /** - * This method indicates whether Link is capable of starting CSL. + * Indicates whether Link is capable of starting CSL. * * @retval TRUE If Link is capable of starting CSL. * @retval FALSE If link is not capable of starting CSL. @@ -659,7 +659,7 @@ public: bool IsCslCapable(void) const; /** - * This method indicates whether the device is connected to a parent which supports CSL. + * Indicates whether the device is connected to a parent which supports CSL. * * @retval TRUE If parent supports CSL. * @retval FALSE If parent does not support CSL. @@ -668,7 +668,7 @@ public: bool IsCslSupported(void) const; /** - * This method returns parent CSL accuracy (clock accuracy and uncertainty). + * Returns parent CSL accuracy (clock accuracy and uncertainty). * * @returns The parent CSL accuracy. * @@ -676,7 +676,7 @@ public: const CslAccuracy &GetCslParentAccuracy(void) const { return mLinks.GetSubMac().GetCslParentAccuracy(); } /** - * This method sets parent CSL accuracy. + * Sets parent CSL accuracy. * * @param[in] aCslAccuracy The parent CSL accuracy. * @@ -690,7 +690,7 @@ public: #if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE && OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE /** - * This method enables/disables the 802.15.4 radio filter. + * Enables/disables the 802.15.4 radio filter. * * When radio filter is enabled, radio is put to sleep instead of receive (to ensure device does not receive any * frame and/or potentially send ack). Also the frame transmission requests return immediately without sending the @@ -702,7 +702,7 @@ public: void SetRadioFilterEnabled(bool aFilterEnabled); /** - * This method indicates whether the 802.15.4 radio filter is enabled or not. + * Indicates whether the 802.15.4 radio filter is enabled or not. * * @retval TRUE If the radio filter is enabled. * @retval FALSE If the radio filter is disabled. diff --git a/src/core/mac/mac_filter.hpp b/src/core/mac/mac_filter.hpp index d5ff8bba2..85a9b8bda 100644 --- a/src/core/mac/mac_filter.hpp +++ b/src/core/mac/mac_filter.hpp @@ -59,20 +59,20 @@ namespace Mac { */ /** - * This class implements Mac Filter on IEEE 802.15.4 frames. + * Implements Mac Filter on IEEE 802.15.4 frames. * */ class Filter : private NonCopyable { public: /** - * This structure represents a Mac Filter entry (used during iteration). + * Represents a Mac Filter entry (used during iteration). * */ typedef otMacFilterEntry Entry; /** - * This type represents an iterator used to iterate through filter entries. + * Represents an iterator used to iterate through filter entries. * * See `GetNextAddress()` and `GetNextRssIn()`. * @@ -80,7 +80,7 @@ public: typedef otMacFilterIterator Iterator; /** - * This enumeration type represents the MAC Filter mode. + * Type represents the MAC Filter mode. * */ enum Mode : uint8_t @@ -93,13 +93,13 @@ public: static constexpr int8_t kFixedRssDisabled = OT_MAC_FILTER_FIXED_RSS_DISABLED; ///< Value when no fixed RSS is set. /** - * This constructor initializes the filter. + * Initializes the filter. * */ Filter(void); /** - * This method gets the MAC Filter mode. + * Gets the MAC Filter mode. * * @returns the Filter mode. * @@ -107,7 +107,7 @@ public: Mode GetMode(void) const { return mMode; } /** - * This method sets the address mode of the filter. + * Sets the address mode of the filter. * * @param[in] aMode The new Filter mode. * @@ -115,7 +115,7 @@ public: void SetMode(Mode aMode) { mMode = aMode; } /** - * This method adds an Extended Address to filter. + * Adds an Extended Address to filter. * * @param[in] aExtAddress A reference to the Extended Address. * @@ -126,7 +126,7 @@ public: Error AddAddress(const ExtAddress &aExtAddress); /** - * This method removes an Extended Address from the filter. + * Removes an Extended Address from the filter. * * No action is performed if there is no existing entry in the filter list matching the given Extended Address. * @@ -136,13 +136,13 @@ public: void RemoveAddress(const ExtAddress &aExtAddress); /** - * This method clears all Extended Addresses from the filter. + * Clears all Extended Addresses from the filter. * */ void ClearAddresses(void); /** - * This method iterates through filter entries. + * Iterates through filter entries. * * @param[in,out] aIterator A reference to the MAC filter iterator context. * To get the first in-use address filter, set it to OT_MAC_FILTER_ITERATOR_INIT. @@ -155,7 +155,7 @@ public: Error GetNextAddress(Iterator &aIterator, Entry &aEntry) const; /** - * This method adds a fixed received signal strength entry for the messages from a given Extended Address. + * Adds a fixed received signal strength entry for the messages from a given Extended Address. * * @param[in] aExtAddress An Extended Address * @param[in] aRss The received signal strength to set. @@ -167,7 +167,7 @@ public: Error AddRssIn(const ExtAddress &aExtAddress, int8_t aRss); /** - * This method removes a fixed received signal strength entry for a given Extended Address. + * Removes a fixed received signal strength entry for a given Extended Address. * * No action is performed if there is no existing entry in the filter list matching the given Extended Address. * @@ -177,7 +177,7 @@ public: void RemoveRssIn(const ExtAddress &aExtAddress); /** - * This method sets the default received signal strength. + * Sets the default received signal strength. * * The default RSS value is used for all received frames from addresses for which there is no explicit RSS-IN entry * in the Filter list (added using `AddRssIn()`). @@ -188,19 +188,19 @@ public: void SetDefaultRssIn(int8_t aRss) { mDefaultRssIn = aRss; } /** - * This method clears the default received signal strength. + * Clears the default received signal strength. * */ void ClearDefaultRssIn(void) { mDefaultRssIn = kFixedRssDisabled; } /** - * This method clears all the received signal strength settings (including the default RSS-In). + * Clears all the received signal strength settings (including the default RSS-In). * */ void ClearAllRssIn(void); /** - * This method iterates through RssIn filter entry. + * Iterates through RssIn filter entry. * * @param[in,out] aIterator A reference to the MAC filter iterator context. To get the first in-use RssIn * filter entry, it should be set to OT_MAC_FILTER_ITERATOR_INIT. @@ -215,7 +215,7 @@ public: Error GetNextRssIn(Iterator &aIterator, Entry &aEntry) const; /** - * This method applies the filter rules on a given Extended Address. + * Applies the filter rules on a given Extended Address. * * @param[in] aExtAddress A reference to the Extended Address. * @param[out] aRss A reference to where the received signal strength to be placed. @@ -227,9 +227,9 @@ public: Error Apply(const ExtAddress &aExtAddress, int8_t &aRss) const; /** - * This method applies the filter rules to a received frame from a given Extended Address. + * Applies the filter rules to a received frame from a given Extended Address. * - * This method can potentially update the signal strength value on the received frame @p aRxFrame. If @p aNeighbor + * Can potentially update the signal strength value on the received frame @p aRxFrame. If @p aNeighbor * is not `nullptr` and filter applies a fixed RSS to the @p aRxFrame, this method will also clear the current RSS * average on @p aNeighbor to ensure that the new fixed RSS takes effect quickly. * diff --git a/src/core/mac/mac_frame.hpp b/src/core/mac/mac_frame.hpp index 78924bfc2..739117a88 100644 --- a/src/core/mac/mac_frame.hpp +++ b/src/core/mac/mac_frame.hpp @@ -61,7 +61,7 @@ using ot::Encoding::LittleEndian::WriteUint24; */ /** - * This class implements IEEE 802.15.4 IE (Information Element) header generation and parsing. + * Implements IEEE 802.15.4 IE (Information Element) header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -69,13 +69,13 @@ class HeaderIe { public: /** - * This method initializes the Header IE. + * Initializes the Header IE. * */ void Init(void) { mFields.m16 = 0; } /** - * This method initializes the Header IE with Id and Length. + * Initializes the Header IE with Id and Length. * * @param[in] aId The IE Element Id. * @param[in] aLen The IE content length. @@ -84,7 +84,7 @@ public: void Init(uint16_t aId, uint8_t aLen); /** - * This method returns the IE Element Id. + * Returns the IE Element Id. * * @returns the IE Element Id. * @@ -92,7 +92,7 @@ public: uint16_t GetId(void) const { return (HostSwap16(mFields.m16) & kIdMask) >> kIdOffset; } /** - * This method sets the IE Element Id. + * Sets the IE Element Id. * * @param[in] aId The IE Element Id. * @@ -103,7 +103,7 @@ public: } /** - * This method returns the IE content length. + * Returns the IE content length. * * @returns the IE content length. * @@ -111,7 +111,7 @@ public: uint8_t GetLength(void) const { return mFields.m8[0] & kLengthMask; } /** - * This method sets the IE content length. + * Sets the IE content length. * * @param[in] aLength The IE content length. * @@ -143,7 +143,7 @@ private: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE || OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE || \ OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This class implements vendor specific Header IE generation and parsing. + * Implements vendor specific Header IE generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -154,7 +154,7 @@ public: static constexpr uint8_t kIeContentSize = sizeof(uint8_t) * 4; /** - * This method returns the Vendor OUI. + * Returns the Vendor OUI. * * @returns The Vendor OUI. * @@ -162,7 +162,7 @@ public: uint32_t GetVendorOui(void) const { return ReadUint24(mOui); } /** - * This method sets the Vendor OUI. + * Sets the Vendor OUI. * * @param[in] aVendorOui A Vendor OUI. * @@ -170,7 +170,7 @@ public: void SetVendorOui(uint32_t aVendorOui) { WriteUint24(aVendorOui, mOui); } /** - * This method returns the Vendor IE sub-type. + * Returns the Vendor IE sub-type. * * @returns The Vendor IE sub-type. * @@ -178,7 +178,7 @@ public: uint8_t GetSubType(void) const { return mSubType; } /** - * This method sets the Vendor IE sub-type. + * Sets the Vendor IE sub-type. * * @param[in] aSubType The Vendor IE sub-type. * @@ -194,7 +194,7 @@ private: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This class implements Time Header IE generation and parsing. + * Implements Time Header IE generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -207,7 +207,7 @@ public: static constexpr uint8_t kIeContentSize = VendorIeHeader::kIeContentSize + sizeof(uint8_t) + sizeof(uint64_t); /** - * This method initializes the time IE. + * Initializes the time IE. * */ void Init(void) @@ -217,7 +217,7 @@ public: } /** - * This method returns the time sync sequence. + * Returns the time sync sequence. * * @returns the time sync sequence. * @@ -225,7 +225,7 @@ public: uint8_t GetSequence(void) const { return mSequence; } /** - * This method sets the tine sync sequence. + * Sets the tine sync sequence. * * @param[in] aSequence The time sync sequence. * @@ -233,7 +233,7 @@ public: void SetSequence(uint8_t aSequence) { mSequence = aSequence; } /** - * This method returns the network time. + * Returns the network time. * * @returns the network time, in microseconds. * @@ -241,7 +241,7 @@ public: uint64_t GetTime(void) const { return HostSwap64(mTime); } /** - * This method sets the network time. + * Sets the network time. * * @param[in] aTime The network time. * @@ -269,14 +269,14 @@ public: // OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This class implements IEEE 802.15.4 MAC frame generation and parsing. + * Implements IEEE 802.15.4 MAC frame generation and parsing. * */ class Frame : public otRadioFrame { public: /** - * This enumeration represents the MAC frame type. + * Represents the MAC frame type. * * Values match the Frame Type field in Frame Control Field (FCF) as an `uint16_t`. * @@ -290,7 +290,7 @@ public: }; /** - * This enumeration represents the MAC frame version. + * Represents the MAC frame version. * * Values match the Version field in Frame Control Field (FCF) as an `uint16_t`. * @@ -303,7 +303,7 @@ public: }; /** - * This enumeration represents the MAC frame security level. + * Represents the MAC frame security level. * * Values match the Security Level field in Security Control Field as an `uint8_t`. * @@ -321,7 +321,7 @@ public: }; /** - * This enumeration represents the MAC frame security key identifier mode. + * Represents the MAC frame security key identifier mode. * * Values match the Key Identifier Mode field in Security Control Field as an `uint8_t`. * @@ -335,7 +335,7 @@ public: }; /** - * This enumeration represents a subset of MAC Command Identifiers. + * Represents a subset of MAC Command Identifiers. * */ enum CommandId : uint8_t @@ -354,13 +354,13 @@ public: static constexpr uint16_t kInfoStringSize = 128; ///< Max chars for `InfoString` (ToInfoString()). /** - * This type defines the fixed-length `String` object returned from `ToInfoString()` method. + * Defines the fixed-length `String` object returned from `ToInfoString()` method. * */ typedef String InfoString; /** - * This method indicates whether the frame is empty (no payload). + * Indicates whether the frame is empty (no payload). * * @retval TRUE The frame is empty (no PSDU payload). * @retval FALSE The frame is not empty. @@ -369,9 +369,9 @@ public: bool IsEmpty(void) const { return (mLength == 0); } /** - * This method initializes the MAC header. + * Initializes the MAC header. * - * This method determines and writes the Frame Control Field (FCF) and Security Control in the frame along with + * Determines and writes the Frame Control Field (FCF) and Security Control in the frame along with * given source and destination addresses and PAN IDs. * * The Ack Request bit in FCF is set if there is destination and it is not broadcast. The Frame Pending and IE @@ -393,7 +393,7 @@ public: KeyIdMode aKeyIdMode = kKeyIdMode0); /** - * This method validates the frame. + * Validates the frame. * * @retval kErrorNone Successfully parsed the MAC header. * @retval kErrorParse Failed to parse through the MAC header. @@ -402,7 +402,7 @@ public: Error ValidatePsdu(void) const; /** - * This method returns the IEEE 802.15.4 Frame Type. + * Returns the IEEE 802.15.4 Frame Type. * * @returns The IEEE 802.15.4 Frame Type. * @@ -410,7 +410,7 @@ public: uint8_t GetType(void) const { return GetPsdu()[0] & kFcfFrameTypeMask; } /** - * This method returns whether the frame is an Ack frame. + * Returns whether the frame is an Ack frame. * * @retval TRUE If this is an Ack. * @retval FALSE If this is not an Ack. @@ -419,7 +419,7 @@ public: bool IsAck(void) const { return GetType() == kTypeAck; } /** - * This method returns the IEEE 802.15.4 Frame Version. + * Returns the IEEE 802.15.4 Frame Version. * * @returns The IEEE 802.15.4 Frame Version. * @@ -427,7 +427,7 @@ public: uint16_t GetVersion(void) const { return GetFrameControlField() & kFcfFrameVersionMask; } /** - * This method returns if this IEEE 802.15.4 frame's version is 2015. + * Returns if this IEEE 802.15.4 frame's version is 2015. * * @returns TRUE if version is 2015, FALSE otherwise. * @@ -435,7 +435,7 @@ public: bool IsVersion2015(void) const { return IsVersion2015(GetFrameControlField()); } /** - * This method indicates whether or not security is enabled. + * Indicates whether or not security is enabled. * * @retval TRUE If security is enabled. * @retval FALSE If security is not enabled. @@ -444,7 +444,7 @@ public: bool GetSecurityEnabled(void) const { return (GetPsdu()[0] & kFcfSecurityEnabled) != 0; } /** - * This method indicates whether or not the Frame Pending bit is set. + * Indicates whether or not the Frame Pending bit is set. * * @retval TRUE If the Frame Pending bit is set. * @retval FALSE If the Frame Pending bit is not set. @@ -453,7 +453,7 @@ public: bool GetFramePending(void) const { return (GetPsdu()[0] & kFcfFramePending) != 0; } /** - * This method sets the Frame Pending bit. + * Sets the Frame Pending bit. * * @param[in] aFramePending The Frame Pending bit. * @@ -461,7 +461,7 @@ public: void SetFramePending(bool aFramePending); /** - * This method indicates whether or not the Ack Request bit is set. + * Indicates whether or not the Ack Request bit is set. * * @retval TRUE If the Ack Request bit is set. * @retval FALSE If the Ack Request bit is not set. @@ -470,7 +470,7 @@ public: bool GetAckRequest(void) const { return (GetPsdu()[0] & kFcfAckRequest) != 0; } /** - * This method sets the Ack Request bit. + * Sets the Ack Request bit. * * @param[in] aAckRequest The Ack Request bit. * @@ -478,7 +478,7 @@ public: void SetAckRequest(bool aAckRequest); /** - * This method indicates whether or not the PanId Compression bit is set. + * Indicates whether or not the PanId Compression bit is set. * * @retval TRUE If the PanId Compression bit is set. * @retval FALSE If the PanId Compression bit is not set. @@ -487,7 +487,7 @@ public: bool IsPanIdCompressed(void) const { return (GetFrameControlField() & kFcfPanidCompression) != 0; } /** - * This method indicates whether or not IEs present. + * Indicates whether or not IEs present. * * @retval TRUE If IEs present. * @retval FALSE If no IE present. @@ -496,7 +496,7 @@ public: bool IsIePresent(void) const { return (GetFrameControlField() & kFcfIePresent) != 0; } /** - * This method returns the Sequence Number value. + * Returns the Sequence Number value. * * @returns The Sequence Number value. * @@ -504,7 +504,7 @@ public: uint8_t GetSequence(void) const { return GetPsdu()[kSequenceIndex]; } /** - * This method sets the Sequence Number value. + * Sets the Sequence Number value. * * @param[in] aSequence The Sequence Number value. * @@ -512,7 +512,7 @@ public: void SetSequence(uint8_t aSequence) { GetPsdu()[kSequenceIndex] = aSequence; } /** - * This method indicates whether or not the Destination PAN ID is present. + * Indicates whether or not the Destination PAN ID is present. * * @returns TRUE if the Destination PAN ID is present, FALSE otherwise. * @@ -520,7 +520,7 @@ public: bool IsDstPanIdPresent(void) const { return IsDstPanIdPresent(GetFrameControlField()); } /** - * This method gets the Destination PAN Identifier. + * Gets the Destination PAN Identifier. * * @param[out] aPanId The Destination PAN Identifier. * @@ -531,7 +531,7 @@ public: Error GetDstPanId(PanId &aPanId) const; /** - * This method sets the Destination PAN Identifier. + * Sets the Destination PAN Identifier. * * @param[in] aPanId The Destination PAN Identifier. * @@ -539,7 +539,7 @@ public: void SetDstPanId(PanId aPanId); /** - * This method indicates whether or not the Destination Address is present for this object. + * Indicates whether or not the Destination Address is present for this object. * * @retval TRUE If the Destination Address is present. * @retval FALSE If the Destination Address is not present. @@ -548,7 +548,7 @@ public: bool IsDstAddrPresent() const { return IsDstAddrPresent(GetFrameControlField()); } /** - * This method gets the Destination Address. + * Gets the Destination Address. * * @param[out] aAddress The Destination Address. * @@ -558,7 +558,7 @@ public: Error GetDstAddr(Address &aAddress) const; /** - * This method sets the Destination Address. + * Sets the Destination Address. * * @param[in] aShortAddress The Destination Address. * @@ -566,7 +566,7 @@ public: void SetDstAddr(ShortAddress aShortAddress); /** - * This method sets the Destination Address. + * Sets the Destination Address. * * @param[in] aExtAddress The Destination Address. * @@ -574,7 +574,7 @@ public: void SetDstAddr(const ExtAddress &aExtAddress); /** - * This method sets the Destination Address. + * Sets the Destination Address. * * @param[in] aAddress The Destination Address. * @@ -582,7 +582,7 @@ public: void SetDstAddr(const Address &aAddress); /** - * This method indicates whether or not the Source Address is present for this object. + * Indicates whether or not the Source Address is present for this object. * * @retval TRUE If the Source Address is present. * @retval FALSE If the Source Address is not present. @@ -591,7 +591,7 @@ public: bool IsSrcPanIdPresent(void) const { return IsSrcPanIdPresent(GetFrameControlField()); } /** - * This method gets the Source PAN Identifier. + * Gets the Source PAN Identifier. * * @param[out] aPanId The Source PAN Identifier. * @@ -601,7 +601,7 @@ public: Error GetSrcPanId(PanId &aPanId) const; /** - * This method sets the Source PAN Identifier. + * Sets the Source PAN Identifier. * * @param[in] aPanId The Source PAN Identifier. * @@ -611,7 +611,7 @@ public: Error SetSrcPanId(PanId aPanId); /** - * This method indicates whether or not the Source Address is present for this object. + * Indicates whether or not the Source Address is present for this object. * * @retval TRUE If the Source Address is present. * @retval FALSE If the Source Address is not present. @@ -620,7 +620,7 @@ public: bool IsSrcAddrPresent(void) const { return IsSrcAddrPresent(GetFrameControlField()); } /** - * This method gets the Source Address. + * Gets the Source Address. * * @param[out] aAddress The Source Address. * @@ -630,7 +630,7 @@ public: Error GetSrcAddr(Address &aAddress) const; /** - * This method sets the Source Address. + * Sets the Source Address. * * @param[in] aShortAddress The Source Address. * @@ -638,7 +638,7 @@ public: void SetSrcAddr(ShortAddress aShortAddress); /** - * This method sets the Source Address. + * Sets the Source Address. * * @param[in] aExtAddress The Source Address. * @@ -646,7 +646,7 @@ public: void SetSrcAddr(const ExtAddress &aExtAddress); /** - * This method sets the Source Address. + * Sets the Source Address. * * @param[in] aAddress The Source Address. * @@ -654,7 +654,7 @@ public: void SetSrcAddr(const Address &aAddress); /** - * This method gets the Security Control Field. + * Gets the Security Control Field. * * @param[out] aSecurityControlField The Security Control Field. * @@ -665,7 +665,7 @@ public: Error GetSecurityControlField(uint8_t &aSecurityControlField) const; /** - * This method sets the Security Control Field. + * Sets the Security Control Field. * * @param[in] aSecurityControlField The Security Control Field. * @@ -673,7 +673,7 @@ public: void SetSecurityControlField(uint8_t aSecurityControlField); /** - * This method gets the Security Level Identifier. + * Gets the Security Level Identifier. * * @param[out] aSecurityLevel The Security Level Identifier. * @@ -683,7 +683,7 @@ public: Error GetSecurityLevel(uint8_t &aSecurityLevel) const; /** - * This method gets the Key Identifier Mode. + * Gets the Key Identifier Mode. * * @param[out] aKeyIdMode The Key Identifier Mode. * @@ -693,7 +693,7 @@ public: Error GetKeyIdMode(uint8_t &aKeyIdMode) const; /** - * This method gets the Frame Counter. + * Gets the Frame Counter. * * @param[out] aFrameCounter The Frame Counter. * @@ -703,7 +703,7 @@ public: Error GetFrameCounter(uint32_t &aFrameCounter) const; /** - * This method sets the Frame Counter. + * Sets the Frame Counter. * * @param[in] aFrameCounter The Frame Counter. * @@ -711,7 +711,7 @@ public: void SetFrameCounter(uint32_t aFrameCounter); /** - * This method returns a pointer to the Key Source. + * Returns a pointer to the Key Source. * * @returns A pointer to the Key Source. * @@ -719,7 +719,7 @@ public: const uint8_t *GetKeySource(void) const; /** - * This method sets the Key Source. + * Sets the Key Source. * * @param[in] aKeySource A pointer to the Key Source value. * @@ -727,7 +727,7 @@ public: void SetKeySource(const uint8_t *aKeySource); /** - * This method gets the Key Identifier. + * Gets the Key Identifier. * * @param[out] aKeyId The Key Identifier. * @@ -737,7 +737,7 @@ public: Error GetKeyId(uint8_t &aKeyId) const; /** - * This method sets the Key Identifier. + * Sets the Key Identifier. * * @param[in] aKeyId The Key Identifier. * @@ -745,7 +745,7 @@ public: void SetKeyId(uint8_t aKeyId); /** - * This method gets the Command ID. + * Gets the Command ID. * * @param[out] aCommandId The Command ID. * @@ -755,7 +755,7 @@ public: Error GetCommandId(uint8_t &aCommandId) const; /** - * This method sets the Command ID. + * Sets the Command ID. * * @param[in] aCommandId The Command ID. * @@ -765,7 +765,7 @@ public: Error SetCommandId(uint8_t aCommandId); /** - * This method indicates whether the frame is a MAC Data Request command (data poll). + * Indicates whether the frame is a MAC Data Request command (data poll). * * For 802.15.4-2015 and above frame, the frame should be already decrypted. * @@ -775,7 +775,7 @@ public: bool IsDataRequestCommand(void) const; /** - * This method returns the MAC Frame Length. + * Returns the MAC Frame Length. * * @returns The MAC Frame Length. * @@ -783,7 +783,7 @@ public: uint16_t GetLength(void) const { return mLength; } /** - * This method sets the MAC Frame Length. + * Sets the MAC Frame Length. * * @param[in] aLength The MAC Frame Length. * @@ -791,7 +791,7 @@ public: void SetLength(uint16_t aLength) { mLength = aLength; } /** - * This method returns the MAC header size. + * Returns the MAC header size. * * @returns The MAC header size. * @@ -799,7 +799,7 @@ public: uint8_t GetHeaderLength(void) const; /** - * This method returns the MAC footer size. + * Returns the MAC footer size. * * @returns The MAC footer size. * @@ -807,7 +807,7 @@ public: uint8_t GetFooterLength(void) const; /** - * This method returns the current MAC Payload length. + * Returns the current MAC Payload length. * * @returns The current MAC Payload length. * @@ -815,7 +815,7 @@ public: uint16_t GetPayloadLength(void) const; /** - * This method returns the maximum MAC Payload length for the given MAC header and footer. + * Returns the maximum MAC Payload length for the given MAC header and footer. * * @returns The maximum MAC Payload length for the given MAC header and footer. * @@ -823,13 +823,13 @@ public: uint16_t GetMaxPayloadLength(void) const; /** - * This method sets the MAC Payload length. + * Sets the MAC Payload length. * */ void SetPayloadLength(uint16_t aLength); /** - * This method returns the IEEE 802.15.4 channel used for transmission or reception. + * Returns the IEEE 802.15.4 channel used for transmission or reception. * * @returns The IEEE 802.15.4 channel used for transmission or reception. * @@ -837,7 +837,7 @@ public: uint8_t GetChannel(void) const { return mChannel; } /** - * This method returns the IEEE 802.15.4 PSDU length. + * Returns the IEEE 802.15.4 PSDU length. * * @returns The IEEE 802.15.4 PSDU length. * @@ -845,7 +845,7 @@ public: uint16_t GetPsduLength(void) const { return mLength; } /** - * This method returns a pointer to the PSDU. + * Returns a pointer to the PSDU. * * @returns A pointer to the PSDU. * @@ -853,7 +853,7 @@ public: uint8_t *GetPsdu(void) { return mPsdu; } /** - * This const method returns a pointer to the PSDU. + * Returns a pointer to the PSDU. * * @returns A pointer to the PSDU. * @@ -861,7 +861,7 @@ public: const uint8_t *GetPsdu(void) const { return mPsdu; } /** - * This method returns a pointer to the MAC Header. + * Returns a pointer to the MAC Header. * * @returns A pointer to the MAC Header. * @@ -869,7 +869,7 @@ public: uint8_t *GetHeader(void) { return GetPsdu(); } /** - * This const method returns a pointer to the MAC Header. + * Returns a pointer to the MAC Header. * * @returns A pointer to the MAC Header. * @@ -877,7 +877,7 @@ public: const uint8_t *GetHeader(void) const { return GetPsdu(); } /** - * This method returns a pointer to the MAC Payload. + * Returns a pointer to the MAC Payload. * * @returns A pointer to the MAC Payload. * @@ -885,7 +885,7 @@ public: uint8_t *GetPayload(void) { return AsNonConst(AsConst(this)->GetPayload()); } /** - * This const method returns a pointer to the MAC Payload. + * Returns a pointer to the MAC Payload. * * @returns A pointer to the MAC Payload. * @@ -893,7 +893,7 @@ public: const uint8_t *GetPayload(void) const; /** - * This method returns a pointer to the MAC Footer. + * Returns a pointer to the MAC Footer. * * @returns A pointer to the MAC Footer. * @@ -901,7 +901,7 @@ public: uint8_t *GetFooter(void) { return AsNonConst(AsConst(this)->GetFooter()); } /** - * This const method returns a pointer to the MAC Footer. + * Returns a pointer to the MAC Footer. * * @returns A pointer to the MAC Footer. * @@ -911,7 +911,7 @@ public: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method returns a pointer to the vendor specific Time IE. + * Returns a pointer to the vendor specific Time IE. * * @returns A pointer to the Time IE, `nullptr` if not found. * @@ -919,7 +919,7 @@ public: TimeIe *GetTimeIe(void) { return AsNonConst(AsConst(this)->GetTimeIe()); } /** - * This method returns a pointer to the vendor specific Time IE. + * Returns a pointer to the vendor specific Time IE. * * @returns A pointer to the Time IE, `nullptr` if not found. * @@ -929,9 +929,9 @@ public: #if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT /** - * This template method appends an Header IE at specified index in this frame. + * Appends an Header IE at specified index in this frame. * - * This method also sets the IE present bit in the Frame Control Field (FCF). + * Also sets the IE present bit in the Frame Control Field (FCF). * * @param[in,out] aIndex The index to append IE. If `aIndex` is `0` on input, this method finds the index * for the first IE and appends the IE at that position. If the position is not found @@ -949,7 +949,7 @@ public: template Error AppendHeaderIeAt(uint8_t &aIndex); /** - * This method returns a pointer to the Header IE. + * Returns a pointer to the Header IE. * * @param[in] aIeId The Element Id of the Header IE. * @@ -959,7 +959,7 @@ public: uint8_t *GetHeaderIe(uint8_t aIeId) { return AsNonConst(AsConst(this)->GetHeaderIe(aIeId)); } /** - * This method returns a pointer to the Header IE. + * Returns a pointer to the Header IE. * * @param[in] aIeId The Element Id of the Header IE. * @@ -969,7 +969,7 @@ public: const uint8_t *GetHeaderIe(uint8_t aIeId) const; /** - * This method returns a pointer to a specific Thread IE. + * Returns a pointer to a specific Thread IE. * * A Thread IE is a vendor specific IE with Vendor OUI as `kVendorOuiThreadCompanyId`. * @@ -981,7 +981,7 @@ public: uint8_t *GetThreadIe(uint8_t aSubType) { return AsNonConst(AsConst(this)->GetThreadIe(aSubType)); } /** - * This method returns a pointer to a specific Thread IE. + * Returns a pointer to a specific Thread IE. * * A Thread IE is a vendor specific IE with Vendor OUI as `kVendorOuiThreadCompanyId`. * @@ -994,7 +994,7 @@ public: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method finds CSL IE in the frame and modify its content. + * Finds CSL IE in the frame and modify its content. * * @param[in] aCslPeriod CSL Period in CSL IE. * @param[in] aCslPhase CSL Phase in CSL IE. @@ -1005,7 +1005,7 @@ public: #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This method finds Enhanced ACK Probing (Vendor Specific) IE and set its value. + * Finds Enhanced ACK Probing (Vendor Specific) IE and set its value. * * @param[in] aValue A pointer to the value to set. * @param[in] aLen The length of @p aValue. @@ -1018,7 +1018,7 @@ public: #if OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method gets the radio link type of the frame. + * Gets the radio link type of the frame. * * @returns Frame's radio link type. * @@ -1026,7 +1026,7 @@ public: RadioType GetRadioType(void) const { return static_cast(mRadioType); } /** - * This method sets the radio link type of the frame. + * Sets the radio link type of the frame. * * @param[in] aRadioType A radio link type. * @@ -1035,7 +1035,7 @@ public: #endif /** - * This method returns the maximum transmission unit size (MTU). + * Returns the maximum transmission unit size (MTU). * * @returns The maximum transmission unit (MTU). * @@ -1050,7 +1050,7 @@ public: #endif /** - * This method returns the FCS size. + * Returns the FCS size. * * @returns This method returns the FCS size. * @@ -1065,7 +1065,7 @@ public: #endif /** - * This method returns information about the frame object as an `InfoString` object. + * Returns information about the frame object as an `InfoString` object. * * @returns An `InfoString` containing info about the frame. * @@ -1073,7 +1073,7 @@ public: InfoString ToInfoString(void) const; /** - * This method returns the Frame Control field of the frame. + * Returns the Frame Control field of the frame. * * @returns The Frame Control field. * @@ -1155,7 +1155,7 @@ protected: }; /** - * This class supports received IEEE 802.15.4 MAC frame processing. + * Supports received IEEE 802.15.4 MAC frame processing. * */ class RxFrame : public Frame @@ -1164,7 +1164,7 @@ public: friend class TxFrame; /** - * This method returns the RSSI in dBm used for reception. + * Returns the RSSI in dBm used for reception. * * @returns The RSSI in dBm used for reception. * @@ -1172,7 +1172,7 @@ public: int8_t GetRssi(void) const { return mInfo.mRxInfo.mRssi; } /** - * This method sets the RSSI in dBm used for reception. + * Sets the RSSI in dBm used for reception. * * @param[in] aRssi The RSSI in dBm used for reception. * @@ -1180,7 +1180,7 @@ public: void SetRssi(int8_t aRssi) { mInfo.mRxInfo.mRssi = aRssi; } /** - * This method returns the receive Link Quality Indicator. + * Returns the receive Link Quality Indicator. * * @returns The receive Link Quality Indicator. * @@ -1188,7 +1188,7 @@ public: uint8_t GetLqi(void) const { return mInfo.mRxInfo.mLqi; } /** - * This method sets the receive Link Quality Indicator. + * Sets the receive Link Quality Indicator. * * @param[in] aLqi The receive Link Quality Indicator. * @@ -1196,7 +1196,7 @@ public: void SetLqi(uint8_t aLqi) { mInfo.mRxInfo.mLqi = aLqi; } /** - * This method indicates whether or not the received frame is acknowledged with frame pending set. + * Indicates whether or not the received frame is acknowledged with frame pending set. * * @retval TRUE This frame is acknowledged with frame pending set. * @retval FALSE This frame is acknowledged with frame pending not set. @@ -1205,7 +1205,7 @@ public: bool IsAckedWithFramePending(void) const { return mInfo.mRxInfo.mAckedWithFramePending; } /** - * This method returns the timestamp when the frame was received. + * Returns the timestamp when the frame was received. * The timestamp marks the frame detection time: the end of the last symbol of SFD. * * @returns The timestamp when the frame SFD was received, in microseconds. @@ -1214,7 +1214,7 @@ public: const uint64_t &GetTimestamp(void) const { return mInfo.mRxInfo.mTimestamp; } /** - * This method performs AES CCM on the frame which is received. + * Performs AES CCM on the frame which is received. * * @param[in] aExtAddress A reference to the extended address, which will be used to generate nonce * for AES CCM computation. @@ -1228,7 +1228,7 @@ public: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method gets the offset to network time. + * Gets the offset to network time. * * @returns The offset to network time. * @@ -1239,7 +1239,7 @@ public: } /** - * This method gets the time sync sequence. + * Gets the time sync sequence. * * @returns The time sync sequence. * @@ -1249,14 +1249,14 @@ public: }; /** - * This class supports IEEE 802.15.4 MAC frame generation for transmission. + * Supports IEEE 802.15.4 MAC frame generation for transmission. * */ class TxFrame : public Frame { public: /** - * This method sets the channel on which to send the frame. + * Sets the channel on which to send the frame. * * It also sets the `RxChannelAfterTxDone` to the same channel. * @@ -1270,7 +1270,7 @@ public: } /** - * This method gets the RX channel after frame TX is done. + * Gets the RX channel after frame TX is done. * * @returns The RX channel after frame TX is done. * @@ -1278,7 +1278,7 @@ public: uint8_t GetRxChannelAfterTxDone(void) const { return mInfo.mTxInfo.mRxChannelAfterTxDone; } /** - * This method sets the RX channel after frame TX is done. + * Sets the RX channel after frame TX is done. * * @param[in] aChannel The RX channel after frame TX is done. * @@ -1286,7 +1286,7 @@ public: void SetRxChannelAfterTxDone(uint8_t aChannel) { mInfo.mTxInfo.mRxChannelAfterTxDone = aChannel; } /** - * This method returns the maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel + * Returns the maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel * access failure. * * Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006. @@ -1298,7 +1298,7 @@ public: uint8_t GetMaxCsmaBackoffs(void) const { return mInfo.mTxInfo.mMaxCsmaBackoffs; } /** - * This method sets the maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel + * Sets the maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel * access failure. * * Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006. @@ -1310,7 +1310,7 @@ public: void SetMaxCsmaBackoffs(uint8_t aMaxCsmaBackoffs) { mInfo.mTxInfo.mMaxCsmaBackoffs = aMaxCsmaBackoffs; } /** - * This method returns the maximum number of retries allowed after a transmission failure. + * Returns the maximum number of retries allowed after a transmission failure. * * Equivalent to macMaxFrameRetries in IEEE 802.15.4-2006. * @@ -1320,7 +1320,7 @@ public: uint8_t GetMaxFrameRetries(void) const { return mInfo.mTxInfo.mMaxFrameRetries; } /** - * This method sets the maximum number of retries allowed after a transmission failure. + * Sets the maximum number of retries allowed after a transmission failure. * * Equivalent to macMaxFrameRetries in IEEE 802.15.4-2006. * @@ -1330,7 +1330,7 @@ public: void SetMaxFrameRetries(uint8_t aMaxFrameRetries) { mInfo.mTxInfo.mMaxFrameRetries = aMaxFrameRetries; } /** - * This method indicates whether or not the frame is a retransmission. + * Indicates whether or not the frame is a retransmission. * * @retval TRUE Frame is a retransmission * @retval FALSE This is a new frame and not a retransmission of an earlier frame. @@ -1339,7 +1339,7 @@ public: bool IsARetransmission(void) const { return mInfo.mTxInfo.mIsARetx; } /** - * This method sets the retransmission flag attribute. + * Sets the retransmission flag attribute. * * @param[in] aIsARetx TRUE if frame is a retransmission of an earlier frame, FALSE otherwise. * @@ -1347,7 +1347,7 @@ public: void SetIsARetransmission(bool aIsARetx) { mInfo.mTxInfo.mIsARetx = aIsARetx; } /** - * This method indicates whether or not CSMA-CA is enabled. + * Indicates whether or not CSMA-CA is enabled. * * @retval TRUE CSMA-CA is enabled. * @retval FALSE CSMA-CA is not enabled is not enabled. @@ -1356,7 +1356,7 @@ public: bool IsCsmaCaEnabled(void) const { return mInfo.mTxInfo.mCsmaCaEnabled; } /** - * This method sets the CSMA-CA enabled attribute. + * Sets the CSMA-CA enabled attribute. * * @param[in] aCsmaCaEnabled TRUE if CSMA-CA must be enabled for this packet, FALSE otherwise. * @@ -1364,7 +1364,7 @@ public: void SetCsmaCaEnabled(bool aCsmaCaEnabled) { mInfo.mTxInfo.mCsmaCaEnabled = aCsmaCaEnabled; } /** - * This method returns the key used for frame encryption and authentication (AES CCM). + * Returns the key used for frame encryption and authentication (AES CCM). * * @returns The pointer to the key. * @@ -1375,7 +1375,7 @@ public: } /** - * This method sets the key used for frame encryption and authentication (AES CCM). + * Sets the key used for frame encryption and authentication (AES CCM). * * @param[in] aAesKey The pointer to the key. * @@ -1383,7 +1383,7 @@ public: void SetAesKey(const Mac::KeyMaterial &aAesKey) { mInfo.mTxInfo.mAesKey = &aAesKey; } /** - * This method copies the PSDU and all attributes (except for frame link type) from another frame. + * Copies the PSDU and all attributes (except for frame link type) from another frame. * * @note This method performs a deep copy meaning the content of PSDU buffer from the given frame is copied into * the PSDU buffer of the current frame. @@ -1394,7 +1394,7 @@ public: void CopyFrom(const TxFrame &aFromFrame); /** - * This method performs AES CCM on the frame which is going to be sent. + * Performs AES CCM on the frame which is going to be sent. * * @param[in] aExtAddress A reference to the extended address, which will be used to generate nonce * for AES CCM computation. @@ -1403,7 +1403,7 @@ public: void ProcessTransmitAesCcm(const ExtAddress &aExtAddress); /** - * This method indicates whether or not the frame has security processed. + * Indicates whether or not the frame has security processed. * * @retval TRUE The frame already has security processed. * @retval FALSE The frame does not have security processed. @@ -1412,7 +1412,7 @@ public: bool IsSecurityProcessed(void) const { return mInfo.mTxInfo.mIsSecurityProcessed; } /** - * This method sets the security processed flag attribute. + * Sets the security processed flag attribute. * * @param[in] aIsSecurityProcessed TRUE if the frame already has security processed. * @@ -1423,7 +1423,7 @@ public: } /** - * This method indicates whether or not the frame header is updated. + * Indicates whether or not the frame header is updated. * * @retval TRUE The frame already has the header updated. * @retval FALSE The frame does not have the header updated. @@ -1432,7 +1432,7 @@ public: bool IsHeaderUpdated(void) const { return mInfo.mTxInfo.mIsHeaderUpdated; } /** - * This method sets the header updated flag attribute. + * Sets the header updated flag attribute. * * @param[in] aIsHeaderUpdated TRUE if the frame header is updated. * @@ -1441,7 +1441,7 @@ public: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method sets the Time IE offset. + * Sets the Time IE offset. * * @param[in] aOffset The Time IE offset, 0 means no Time IE. * @@ -1449,7 +1449,7 @@ public: void SetTimeIeOffset(uint8_t aOffset) { mInfo.mTxInfo.mIeInfo->mTimeIeOffset = aOffset; } /** - * This method gets the Time IE offset. + * Gets the Time IE offset. * * @returns The Time IE offset, 0 means no Time IE. * @@ -1457,7 +1457,7 @@ public: uint8_t GetTimeIeOffset(void) const { return mInfo.mTxInfo.mIeInfo->mTimeIeOffset; } /** - * This method sets the offset to network time. + * Sets the offset to network time. * * @param[in] aNetworkTimeOffset The offset to network time. * @@ -1468,7 +1468,7 @@ public: } /** - * This method sets the time sync sequence. + * Sets the time sync sequence. * * @param[in] aTimeSyncSeq The time sync sequence. * @@ -1525,7 +1525,7 @@ public: static constexpr uint16_t kSuperFrameSpec = 0x0fff; ///< Superframe Specification value. /** - * This method initializes the Beacon message. + * Initializes the Beacon message. * */ void Init(void) @@ -1536,7 +1536,7 @@ public: } /** - * This method indicates whether or not the beacon appears to be a valid Thread Beacon message. + * Indicates whether or not the beacon appears to be a valid Thread Beacon message. * * @retval TRUE If the beacon appears to be a valid Thread Beacon message. * @retval FALSE If the beacon does not appear to be a valid Thread Beacon message. @@ -1548,7 +1548,7 @@ public: } /** - * This method returns the pointer to the beacon payload. + * Returns the pointer to the beacon payload. * * @returns A pointer to the beacon payload. * @@ -1556,7 +1556,7 @@ public: uint8_t *GetPayload(void) { return reinterpret_cast(this) + sizeof(*this); } /** - * This method returns the pointer to the beacon payload. + * Returns the pointer to the beacon payload. * * @returns A pointer to the beacon payload. * @@ -1570,7 +1570,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements IEEE 802.15.4 Beacon Payload generation and parsing. + * Implements IEEE 802.15.4 Beacon Payload generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1585,7 +1585,7 @@ public: static constexpr uint8_t kJoiningFlag = 1 << 0; ///< Joining Permitted flag. /** - * This method initializes the Beacon Payload. + * Initializes the Beacon Payload. * */ void Init(void) @@ -1595,7 +1595,7 @@ public: } /** - * This method indicates whether or not the beacon appears to be a valid Thread Beacon Payload. + * Indicates whether or not the beacon appears to be a valid Thread Beacon Payload. * * @retval TRUE If the beacon appears to be a valid Thread Beacon Payload. * @retval FALSE If the beacon does not appear to be a valid Thread Beacon Payload. @@ -1604,7 +1604,7 @@ public: bool IsValid(void) const { return (mProtocolId == kProtocolId); } /** - * This method returns the Protocol ID value. + * Returns the Protocol ID value. * * @returns the Protocol ID value. * @@ -1612,7 +1612,7 @@ public: uint8_t GetProtocolId(void) const { return mProtocolId; } /** - * This method returns the Protocol Version value. + * Returns the Protocol Version value. * * @returns The Protocol Version value. * @@ -1620,7 +1620,7 @@ public: uint8_t GetProtocolVersion(void) const { return mFlags >> kVersionOffset; } /** - * This method indicates whether or not the Native Commissioner flag is set. + * Indicates whether or not the Native Commissioner flag is set. * * @retval TRUE If the Native Commissioner flag is set. * @retval FALSE If the Native Commissioner flag is not set. @@ -1629,19 +1629,19 @@ public: bool IsNative(void) const { return (mFlags & kNativeFlag) != 0; } /** - * This method clears the Native Commissioner flag. + * Clears the Native Commissioner flag. * */ void ClearNative(void) { mFlags &= ~kNativeFlag; } /** - * This method sets the Native Commissioner flag. + * Sets the Native Commissioner flag. * */ void SetNative(void) { mFlags |= kNativeFlag; } /** - * This method indicates whether or not the Joining Permitted flag is set. + * Indicates whether or not the Joining Permitted flag is set. * * @retval TRUE If the Joining Permitted flag is set. * @retval FALSE If the Joining Permitted flag is not set. @@ -1650,13 +1650,13 @@ public: bool IsJoiningPermitted(void) const { return (mFlags & kJoiningFlag) != 0; } /** - * This method clears the Joining Permitted flag. + * Clears the Joining Permitted flag. * */ void ClearJoiningPermitted(void) { mFlags &= ~kJoiningFlag; } /** - * This method sets the Joining Permitted flag. + * Sets the Joining Permitted flag. * */ void SetJoiningPermitted(void) @@ -1670,7 +1670,7 @@ public: } /** - * This method gets the Network Name field. + * Gets the Network Name field. * * @returns The Network Name field as `NameData`. * @@ -1678,7 +1678,7 @@ public: MeshCoP::NameData GetNetworkName(void) const { return MeshCoP::NameData(mNetworkName, sizeof(mNetworkName)); } /** - * This method sets the Network Name field. + * Sets the Network Name field. * * @param[in] aNameData The Network Name (as a `NameData`). * @@ -1686,7 +1686,7 @@ public: void SetNetworkName(const MeshCoP::NameData &aNameData) { aNameData.CopyTo(mNetworkName, sizeof(mNetworkName)); } /** - * This method returns the Extended PAN ID field. + * Returns the Extended PAN ID field. * * @returns The Extended PAN ID field. * @@ -1694,7 +1694,7 @@ public: const otExtendedPanId &GetExtendedPanId(void) const { return mExtendedPanId; } /** - * This method sets the Extended PAN ID field. + * Sets the Extended PAN ID field. * * @param[in] aExtPanId An Extended PAN ID. * @@ -1709,7 +1709,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements CSL IE data structure. + * Implements CSL IE data structure. * */ OT_TOOL_PACKED_BEGIN @@ -1720,7 +1720,7 @@ public: static constexpr uint8_t kIeContentSize = sizeof(uint16_t) * 2; /** - * This method returns the CSL Period. + * Returns the CSL Period. * * @returns the CSL Period. * @@ -1728,7 +1728,7 @@ public: uint16_t GetPeriod(void) const { return HostSwap16(mPeriod); } /** - * This method sets the CSL Period. + * Sets the CSL Period. * * @param[in] aPeriod The CSL Period. * @@ -1736,7 +1736,7 @@ public: void SetPeriod(uint16_t aPeriod) { mPeriod = HostSwap16(aPeriod); } /** - * This method returns the CSL Phase. + * Returns the CSL Phase. * * @returns the CSL Phase. * @@ -1744,7 +1744,7 @@ public: uint16_t GetPhase(void) const { return HostSwap16(mPhase); } /** - * This method sets the CSL Phase. + * Sets the CSL Phase. * * @param[in] aPhase The CSL Phase. * @@ -1757,9 +1757,9 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Termination2 IE. + * Implements Termination2 IE. * - * This class is empty for template specialization. + * Is empty for template specialization. * */ class Termination2Ie diff --git a/src/core/mac/mac_links.hpp b/src/core/mac/mac_links.hpp index cc30ef0cd..3abafd9c7 100644 --- a/src/core/mac/mac_links.hpp +++ b/src/core/mac/mac_links.hpp @@ -58,7 +58,7 @@ namespace Mac { */ /** - * This class represents tx frames for different radio link types. + * Represents tx frames for different radio link types. * */ class TxFrames : InstanceLocator @@ -68,9 +68,9 @@ class TxFrames : InstanceLocator public: #if OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method gets the `TxFrame` for a given radio link type. + * Gets the `TxFrame` for a given radio link type. * - * This method also updates the selected radio types (from `GetSelectedRadioTypes()`) to include the @p aRadioType. + * Also updates the selected radio types (from `GetSelectedRadioTypes()`) to include the @p aRadioType. * * @param[in] aRadioType A radio link type. * @@ -80,9 +80,9 @@ public: TxFrame &GetTxFrame(RadioType aRadioType); /** - * This method gets the `TxFrame` with the smallest MTU size among a given set of radio types. + * Gets the `TxFrame` with the smallest MTU size among a given set of radio types. * - * This method also updates the selected radio types (from `GetSelectedRadioTypes()`) to include the set + * Also updates the selected radio types (from `GetSelectedRadioTypes()`) to include the set * @p aRadioTypes. * * @param[in] aRadioTypes A set of radio link types. @@ -93,9 +93,9 @@ public: TxFrame &GetTxFrame(RadioTypes aRadioTypes); /** - * This method gets the `TxFrame` for sending a broadcast frame. + * Gets the `TxFrame` for sending a broadcast frame. * - * This method also updates the selected radio type (from `GetSelectedRadioTypes()`) to include all radio types + * Also updates the selected radio type (from `GetSelectedRadioTypes()`) to include all radio types * (supported by device). * * The broadcast frame is the `TxFrame` with the smallest MTU size among all radio types. @@ -106,7 +106,7 @@ public: TxFrame &GetBroadcastTxFrame(void); /** - * This method gets the selected radio types. + * Gets the selected radio types. * * This set specifies the radio links the frame should be sent over (in parallel). The set starts a empty after * method `Clear()` is called. It gets updated through calls to methods `GetTxFrame(aType)`, @@ -118,7 +118,7 @@ public: RadioTypes GetSelectedRadioTypes(void) const { return mSelectedRadioTypes; } /** - * This method gets the required radio types. + * Gets the required radio types. * * This set specifies the radio links for which we expect the frame tx to be successful to consider the overall tx * successful. If the set is empty, successful tx over any radio link is sufficient for overall tx to be considered @@ -132,7 +132,7 @@ public: RadioTypes GetRequiredRadioTypes(void) const { return mRequiredRadioTypes; } /** - * This method sets the required types. + * Sets the required types. * * Please see `GetRequiredRadioTypes()` for more details on how this set is used during tx. * @@ -145,7 +145,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE /** - * This method gets the tx frame. + * Gets the tx frame. * * @returns A reference to `TxFrame`. * @@ -153,7 +153,7 @@ public: TxFrame &GetTxFrame(void) { return mTxFrame802154; } #elif OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This method gets the tx frame. + * Gets the tx frame. * * @returns A reference to `TxFrame`. * @@ -161,7 +161,7 @@ public: TxFrame &GetTxFrame(void) { return mTxFrameTrel; } #endif /** - * This method gets a tx frame for sending a broadcast frame. + * Gets a tx frame for sending a broadcast frame. * * @returns A reference to a `TxFrame` for broadcast. * @@ -171,7 +171,7 @@ public: #endif // #if OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method clears all supported radio tx frames (sets the PSDU length to zero and clears flags). + * Clears all supported radio tx frames (sets the PSDU length to zero and clears flags). * */ void Clear(void) @@ -202,7 +202,7 @@ public: } /** - * This method sets the channel on all supported radio tx frames. + * Sets the channel on all supported radio tx frames. * * @param[in] aChannel A channel. * @@ -218,7 +218,7 @@ public: } /** - * This method sets the Sequence Number value on all supported radio tx frames. + * Sets the Sequence Number value on all supported radio tx frames. * * @param[in] aSequence The Sequence Number value. * @@ -234,7 +234,7 @@ public: } /** - * This method sets the maximum number of the CSMA-CA backoffs on all supported radio tx + * Sets the maximum number of the CSMA-CA backoffs on all supported radio tx * frames. * * @param[in] aMaxCsmaBackoffs The maximum number of CSMA-CA backoffs. @@ -251,7 +251,7 @@ public: } /** - * This method sets the maximum number of retries allowed after a transmission failure on all supported radio tx + * Sets the maximum number of retries allowed after a transmission failure on all supported radio tx * frames. * * @param[in] aMaxFrameRetries The maximum number of retries allowed after a transmission failure. @@ -284,7 +284,7 @@ private: }; /** - * This class represents MAC radio links (multi radio). + * Represents MAC radio links (multi radio). * */ class Links : public InstanceLocator @@ -293,7 +293,7 @@ class Links : public InstanceLocator public: /** - * This constructor initializes the `Links` object. + * Initializes the `Links` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -301,7 +301,7 @@ public: explicit Links(Instance &aInstance); /** - * This method sets the PAN ID. + * Sets the PAN ID. * * @param[in] aPanId The PAN ID. * @@ -317,7 +317,7 @@ public: } /** - * This method gets the MAC Short Address. + * Gets the MAC Short Address. * * @returns The MAC Short Address. * @@ -333,7 +333,7 @@ public: } /** - * This method sets the MAC Short Address. + * Sets the MAC Short Address. * * @param[in] aShortAddress A MAC Short Address. * @@ -348,7 +348,7 @@ public: } /** - * This method gets the MAC Extended Address. + * Gets the MAC Extended Address. * * @returns The MAC Extended Address. * @@ -364,7 +364,7 @@ public: } /** - * This method sets the MAC Extended Address. + * Sets the MAC Extended Address. * * @param[in] aExtAddress A MAC Extended Address. * @@ -382,7 +382,7 @@ public: } /** - * This method registers a callback to provide received packet capture for IEEE 802.15.4 frames. + * Registers a callback to provide received packet capture for IEEE 802.15.4 frames. * * @param[in] aPcapCallback A pointer to a function that is called when receiving an IEEE 802.15.4 link frame * or nullptr to disable the callback. @@ -399,7 +399,7 @@ public: } /** - * This method indicates whether radio should stay in Receive or Sleep during CSMA backoff. + * Indicates whether radio should stay in Receive or Sleep during CSMA backoff. * * @param[in] aRxOnWhenBackoff TRUE to keep radio in Receive, FALSE to put to Sleep during CSMA backoff. * @@ -413,7 +413,7 @@ public: } /** - * This method enables all radio links. + * Enables all radio links. * */ void Enable(void) @@ -427,7 +427,7 @@ public: } /** - * This method disables all radio links. + * Disables all radio links. * */ void Disable(void) @@ -441,7 +441,7 @@ public: } /** - * This method transitions all radio links to Sleep. + * Transitions all radio links to Sleep. * */ void Sleep(void) @@ -456,7 +456,7 @@ public: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method configures CSL parameters in all radios. + * Configures CSL parameters in all radios. * * @param[in] aPeriod The CSL period. * @param[in] aChannel The CSL channel. @@ -482,7 +482,7 @@ public: } /** - * This method transitions all radios link to CSL sample state, given that a non-zero CSL period is configured. + * Transitions all radios link to CSL sample state, given that a non-zero CSL period is configured. * * CSL sample state is only applicable and used for 15.4 radio link. Other link are transitioned to sleep state * when CSL period is non-zero. @@ -500,7 +500,7 @@ public: #endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method transitions all radio links to Receive. + * Transitions all radio links to Receive. * * @param[in] aChannel The channel to use for receiving. * @@ -516,7 +516,7 @@ public: } /** - * This method gets the radio transmit frames. + * Gets the radio transmit frames. * * @returns The transmit frames. * @@ -526,7 +526,7 @@ public: #if !OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method sends a prepared frame. + * Sends a prepared frame. * * The prepared frame is from `GetTxFrames()`. This method is available only in single radio link mode. * @@ -544,7 +544,7 @@ public: #else // #if !OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method sends prepared frames over a given set of radio links. + * Sends prepared frames over a given set of radio links. * * The prepared frame must be from `GetTxFrames()`. This method is available only in multi radio link mode. * @@ -557,7 +557,7 @@ public: #endif // !OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method gets the number of transmit retries for the last transmitted frame. + * Gets the number of transmit retries for the last transmitted frame. * * @returns Number of transmit retries. * @@ -573,7 +573,7 @@ public: } /** - * This method gets the most recent RSSI measurement from radio link. + * Gets the most recent RSSI measurement from radio link. * * @returns The RSSI in dBm when it is valid. `Radio::kInvalidRssi` when RSSI is invalid. * @@ -589,7 +589,7 @@ public: } /** - * This method begins energy scan. + * Begins energy scan. * * @param[in] aScanChannel The channel to perform the energy scan on. * @param[in] aScanDuration The duration, in milliseconds, for the channel to be scanned. @@ -614,7 +614,7 @@ public: } /** - * This method returns the noise floor value (currently use the radio receive sensitivity value). + * Returns the noise floor value (currently use the radio receive sensitivity value). * * @returns The noise floor value in dBm. * @@ -630,7 +630,7 @@ public: } /** - * This methods gets a reference to the `SubMac` instance. + * Gets a reference to the `SubMac` instance. * * @returns A reference to the `SubMac` instance. * @@ -638,7 +638,7 @@ public: SubMac &GetSubMac(void) { return mSubMac; } /** - * This methods gets a reference to the `SubMac` instance. + * Gets a reference to the `SubMac` instance. * * @returns A reference to the `SubMac` instance. * @@ -646,7 +646,7 @@ public: const SubMac &GetSubMac(void) const { return mSubMac; } /** - * This method returns a reference to the current MAC key (for Key Mode 1) for a given Frame. + * Returns a reference to the current MAC key (for Key Mode 1) for a given Frame. * * @param[in] aFrame The frame for which to get the MAC key. * @@ -656,7 +656,7 @@ public: const KeyMaterial *GetCurrentMacKey(const Frame &aFrame) const; /** - * This method returns a reference to the temporary MAC key (for Key Mode 1) for a given Frame based on a given + * Returns a reference to the temporary MAC key (for Key Mode 1) for a given Frame based on a given * Key Sequence. * * @param[in] aFrame The frame for which to get the MAC key. @@ -669,7 +669,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This method sets the current MAC frame counter value from the value from a `TxFrame`. + * Sets the current MAC frame counter value from the value from a `TxFrame`. * * @param[in] TxFrame The `TxFrame` from which to get the counter value. * diff --git a/src/core/mac/mac_types.hpp b/src/core/mac/mac_types.hpp index 6a73244d2..1530b7361 100644 --- a/src/core/mac/mac_types.hpp +++ b/src/core/mac/mac_types.hpp @@ -60,7 +60,7 @@ namespace Mac { */ /** - * This type represents the IEEE 802.15.4 PAN ID. + * Represents the IEEE 802.15.4 PAN ID. * */ typedef otPanId PanId; @@ -68,7 +68,7 @@ typedef otPanId PanId; constexpr PanId kPanIdBroadcast = 0xffff; ///< Broadcast PAN ID. /** - * This type represents the IEEE 802.15.4 Short Address. + * Represents the IEEE 802.15.4 Short Address. * */ typedef otShortAddress ShortAddress; @@ -77,7 +77,7 @@ constexpr ShortAddress kShortAddrBroadcast = 0xffff; ///< Broadcast Short Addres constexpr ShortAddress kShortAddrInvalid = 0xfffe; ///< Invalid Short Address. /** - * This function generates a random IEEE 802.15.4 PAN ID. + * Generates a random IEEE 802.15.4 PAN ID. * * @returns A randomly generated IEEE 802.15.4 PAN ID (excluding `kPanIdBroadcast`). * @@ -85,7 +85,7 @@ constexpr ShortAddress kShortAddrInvalid = 0xfffe; ///< Invalid Short Address. PanId GenerateRandomPanId(void); /** - * This structure represents an IEEE 802.15.4 Extended Address. + * Represents an IEEE 802.15.4 Extended Address. * */ OT_TOOL_PACKED_BEGIN @@ -95,13 +95,13 @@ public: static constexpr uint16_t kInfoStringSize = 17; ///< Max chars for the info string (`ToString()`). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This enumeration type specifies the copy byte order when Extended Address is being copied to/from a buffer. + * Type specifies the copy byte order when Extended Address is being copied to/from a buffer. * */ enum CopyByteOrder : uint8_t @@ -111,7 +111,7 @@ public: }; /** - * This method fills all bytes of address with a given byte value. + * Fills all bytes of address with a given byte value. * * @param[in] aByte A byte value to fill address with. * @@ -119,13 +119,13 @@ public: void Fill(uint8_t aByte) { memset(this, aByte, sizeof(*this)); } /** - * This method generates a random IEEE 802.15.4 Extended Address. + * Generates a random IEEE 802.15.4 Extended Address. * */ void GenerateRandom(void); /** - * This method sets the Extended Address from a given byte array. + * Sets the Extended Address from a given byte array. * * @param[in] aBuffer Pointer to an array containing the Extended Address. `OT_EXT_ADDRESS_SIZE` bytes from * buffer are copied to form the Extended Address. @@ -138,7 +138,7 @@ public: } /** - * This method indicates whether or not the Group bit is set. + * Indicates whether or not the Group bit is set. * * @retval TRUE If the group bit is set. * @retval FALSE If the group bit is not set. @@ -147,7 +147,7 @@ public: bool IsGroup(void) const { return (m8[0] & kGroupFlag) != 0; } /** - * This method sets the Group bit. + * Sets the Group bit. * * @param[in] aGroup TRUE if group address, FALSE otherwise. * @@ -165,13 +165,13 @@ public: } /** - * This method toggles the Group bit. + * Toggles the Group bit. * */ void ToggleGroup(void) { m8[0] ^= kGroupFlag; } /** - * This method indicates whether or not the Local bit is set. + * Indicates whether or not the Local bit is set. * * @retval TRUE If the local bit is set. * @retval FALSE If the local bit is not set. @@ -180,7 +180,7 @@ public: bool IsLocal(void) const { return (m8[0] & kLocalFlag) != 0; } /** - * This method sets the Local bit. + * Sets the Local bit. * * @param[in] aLocal TRUE if locally administered, FALSE otherwise. * @@ -198,13 +198,13 @@ public: } /** - * This method toggles the Local bit. + * Toggles the Local bit. * */ void ToggleLocal(void) { m8[0] ^= kLocalFlag; } /** - * This method copies the Extended Address into a given buffer. + * Copies the Extended Address into a given buffer. * * @param[out] aBuffer A pointer to a buffer to copy the Extended Address into. * @param[in] aByteOrder The byte order to copy the address. @@ -216,7 +216,7 @@ public: } /** - * This method converts an address to a string. + * Converts an address to a string. * * @returns An `InfoString` containing the string representation of the Extended Address. * @@ -231,20 +231,20 @@ private: } OT_TOOL_PACKED_END; /** - * This class represents an IEEE 802.15.4 Short or Extended Address. + * Represents an IEEE 802.15.4 Short or Extended Address. * */ class Address { public: /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef ExtAddress::InfoString InfoString; /** - * This enumeration specifies the IEEE 802.15.4 Address type. + * Specifies the IEEE 802.15.4 Address type. * */ enum Type : uint8_t @@ -255,7 +255,7 @@ public: }; /** - * This constructor initializes an Address. + * Initializes an Address. * */ Address(void) @@ -264,7 +264,7 @@ public: } /** - * This method gets the address type (Short Address, Extended Address, or none). + * Gets the address type (Short Address, Extended Address, or none). * * @returns The address type. * @@ -272,7 +272,7 @@ public: Type GetType(void) const { return mType; } /** - * This method indicates whether or not there is an address. + * Indicates whether or not there is an address. * * @returns TRUE if there is no address (i.e. address type is `kTypeNone`), FALSE otherwise. * @@ -280,7 +280,7 @@ public: bool IsNone(void) const { return (mType == kTypeNone); } /** - * This method indicates whether or not the Address is a Short Address. + * Indicates whether or not the Address is a Short Address. * * @returns TRUE if it is a Short Address, FALSE otherwise. * @@ -288,7 +288,7 @@ public: bool IsShort(void) const { return (mType == kTypeShort); } /** - * This method indicates whether or not the Address is an Extended Address. + * Indicates whether or not the Address is an Extended Address. * * @returns TRUE if it is an Extended Address, FALSE otherwise. * @@ -296,9 +296,9 @@ public: bool IsExtended(void) const { return (mType == kTypeExtended); } /** - * This method gets the address as a Short Address. + * Gets the address as a Short Address. * - * This method MUST be used only if the address type is Short Address. + * MUST be used only if the address type is Short Address. * * @returns The Short Address. * @@ -306,9 +306,9 @@ public: ShortAddress GetShort(void) const { return mShared.mShortAddress; } /** - * This method gets the address as an Extended Address. + * Gets the address as an Extended Address. * - * This method MUST be used only if the address type is Extended Address. + * MUST be used only if the address type is Extended Address. * * @returns A constant reference to the Extended Address. * @@ -316,9 +316,9 @@ public: const ExtAddress &GetExtended(void) const { return mShared.mExtAddress; } /** - * This method gets the address as an Extended Address. + * Gets the address as an Extended Address. * - * This method MUST be used only if the address type is Extended Address. + * MUST be used only if the address type is Extended Address. * * @returns A reference to the Extended Address. * @@ -326,7 +326,7 @@ public: ExtAddress &GetExtended(void) { return mShared.mExtAddress; } /** - * This method sets the address to none (i.e., clears the address). + * Sets the address to none (i.e., clears the address). * * Address type will be updated to `kTypeNone`. * @@ -334,7 +334,7 @@ public: void SetNone(void) { mType = kTypeNone; } /** - * This method sets the address with a Short Address. + * Sets the address with a Short Address. * * The type is also updated to indicate that address is Short. * @@ -348,7 +348,7 @@ public: } /** - * This method sets the address with an Extended Address. + * Sets the address with an Extended Address. * * The type is also updated to indicate that the address is Extended. * @@ -362,7 +362,7 @@ public: } /** - * This method sets the address with an Extended Address given as a byte array. + * Sets the address with an Extended Address given as a byte array. * * The type is also updated to indicate that the address is Extended. * @@ -378,7 +378,7 @@ public: } /** - * This method indicates whether or not the address is a Short Broadcast Address. + * Indicates whether or not the address is a Short Broadcast Address. * * @returns TRUE if address is Short Broadcast Address, FALSE otherwise. * @@ -386,7 +386,7 @@ public: bool IsBroadcast(void) const { return ((mType == kTypeShort) && (GetShort() == kShortAddrBroadcast)); } /** - * This method indicates whether or not the address is a Short Invalid Address. + * Indicates whether or not the address is a Short Invalid Address. * * @returns TRUE if address is Short Invalid Address, FALSE otherwise. * @@ -394,7 +394,7 @@ public: bool IsShortAddrInvalid(void) const { return ((mType == kTypeShort) && (GetShort() == kShortAddrInvalid)); } /** - * This method converts an address to a null-terminated string + * Converts an address to a null-terminated string * * @returns A `String` representing the address. * @@ -412,7 +412,7 @@ private: }; /** - * This structure represents two MAC addresses corresponding to source and destination. + * Represents two MAC addresses corresponding to source and destination. * */ struct Addresses @@ -422,7 +422,7 @@ struct Addresses }; /** - * This structure represents two PAN IDs corresponding to source and destination. + * Represents two PAN IDs corresponding to source and destination. * */ struct PanIds @@ -432,7 +432,7 @@ struct PanIds }; /** - * This class represents a MAC key. + * Represents a MAC key. * */ OT_TOOL_PACKED_BEGIN @@ -442,7 +442,7 @@ public: static constexpr uint16_t kSize = OT_MAC_KEY_SIZE; ///< Key size in bytes. /** - * This method gets a pointer to the bytes array containing the key + * Gets a pointer to the bytes array containing the key * * @returns A pointer to the byte array containing the key. * @@ -452,20 +452,20 @@ public: } OT_TOOL_PACKED_END; /** - * This type represents a MAC Key Ref used by PSA. + * Represents a MAC Key Ref used by PSA. * */ typedef otMacKeyRef KeyRef; /** - * This class represents a MAC Key Material. + * Represents a MAC Key Material. * */ class KeyMaterial : public otMacKeyMaterial, public Unequatable { public: /** - * This constructor initializes a `KeyMaterial`. + * Initializes a `KeyMaterial`. * */ KeyMaterial(void) @@ -478,7 +478,7 @@ public: #if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This method overload `=` operator to assign the `KeyMaterial` from another one. + * Overload `=` operator to assign the `KeyMaterial` from another one. * * If the `KeyMaterial` currently stores a valid and different `KeyRef`, the assignment of new value will ensure to * delete the previous one before using the new `KeyRef` from @p aOther. @@ -504,7 +504,7 @@ public: #if !OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This method gets the literal `Key`. + * Gets the literal `Key`. * * @returns The literal `Key` * @@ -513,7 +513,7 @@ public: #else /** - * This method gets the stored `KeyRef` + * Gets the stored `KeyRef` * * @returns The `KeyRef` * @@ -522,7 +522,7 @@ public: #endif /** - * This method sets the `KeyMaterial` from a given Key. + * Sets the `KeyMaterial` from a given Key. * * If the `KeyMaterial` currently stores a valid `KeyRef`, the `SetFrom()` call will ensure to delete the previous * one before creating and using a new `KeyRef` associated with the new `Key`. @@ -535,7 +535,7 @@ public: void SetFrom(const Key &aKey, bool aIsExportable = false); /** - * This method extracts the literal key from `KeyMaterial` + * Extracts the literal key from `KeyMaterial` * * @param[out] aKey A reference to the output the key. * @@ -543,7 +543,7 @@ public: void ExtractKey(Key &aKey) const; /** - * This method converts `KeyMaterial` to a `Crypto::Key`. + * Converts `KeyMaterial` to a `Crypto::Key`. * * @param[out] aCryptoKey A reference to a `Crypto::Key` to populate. * @@ -551,7 +551,7 @@ public: void ConvertToCryptoKey(Crypto::Key &aCryptoKey) const; /** - * This method overloads operator `==` to evaluate whether or not two `KeyMaterial` instances are equal. + * Overloads operator `==` to evaluate whether or not two `KeyMaterial` instances are equal. * * @param[in] aOther The other `KeyMaterial` instance to compare with. * @@ -575,7 +575,7 @@ private: #if OPENTHREAD_CONFIG_MULTI_RADIO /** - * This enumeration defines the radio link types. + * Defines the radio link types. * */ enum RadioType : uint8_t @@ -596,7 +596,7 @@ constexpr uint8_t kNumRadioTypes = (((OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4 ((OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE) ? 1 : 0)); /** - * This class represents a set of radio links. + * Represents a set of radio links. * */ class RadioTypes @@ -605,7 +605,7 @@ public: static constexpr uint16_t kInfoStringSize = 32; ///< Max chars for the info string (`ToString()`). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; @@ -617,7 +617,7 @@ public: static const RadioType kAllRadioTypes[kNumRadioTypes]; /** - * This constructor initializes a `RadioTypes` object as empty set + * Initializes a `RadioTypes` object as empty set * */ RadioTypes(void) @@ -626,7 +626,7 @@ public: } /** - * This constructor initializes a `RadioTypes` object with a given bit-mask. + * Initializes a `RadioTypes` object with a given bit-mask. * * @param[in] aMask A bit-mask representing the radio types (the first bit corresponds to radio type 0, and so on) * @@ -637,13 +637,13 @@ public: } /** - * This method clears the set. + * Clears the set. * */ void Clear(void) { mBitMask = 0; } /** - * This method indicates whether the set is empty or not + * Indicates whether the set is empty or not * * @returns TRUE if the set is empty, FALSE otherwise. * @@ -659,7 +659,7 @@ public: bool ContainsSingleRadio(void) const { return !IsEmpty() && ((mBitMask & (mBitMask - 1)) == 0); } /** - * This method indicates whether or not the set contains a given radio type. + * Indicates whether or not the set contains a given radio type. * * @param[in] aType A radio link type. * @@ -669,7 +669,7 @@ public: bool Contains(RadioType aType) const { return ((mBitMask & BitFlag(aType)) != 0); } /** - * This method adds a radio type to the set. + * Adds a radio type to the set. * * @param[in] aType A radio link type. * @@ -677,7 +677,7 @@ public: void Add(RadioType aType) { mBitMask |= BitFlag(aType); } /** - * This method adds another radio types set to the current one. + * Adds another radio types set to the current one. * * @param[in] aTypes A radio link type set to add. * @@ -685,13 +685,13 @@ public: void Add(RadioTypes aTypes) { mBitMask |= aTypes.mBitMask; } /** - * This method adds all radio types supported by device to the set. + * Adds all radio types supported by device to the set. * */ void AddAll(void); /** - * This method removes a given radio type from the set. + * Removes a given radio type from the set. * * @param[in] aType A radio link type. * @@ -699,7 +699,7 @@ public: void Remove(RadioType aType) { mBitMask &= ~BitFlag(aType); } /** - * This method gets the radio type set as a bitmask. + * Gets the radio type set as a bitmask. * * The first bit in the mask corresponds to first radio type (radio type with value zero), and so on. * @@ -709,7 +709,7 @@ public: uint8_t GetAsBitMask(void) const { return mBitMask; } /** - * This method overloads operator `-` to return a new set which is the set difference between current set and + * Overloads operator `-` to return a new set which is the set difference between current set and * a given set. * * @param[in] aOther Another radio type set. @@ -720,7 +720,7 @@ public: RadioTypes operator-(const RadioTypes &aOther) const { return RadioTypes(mBitMask & ~aOther.mBitMask); } /** - * This method converts the radio set to human-readable string. + * Converts the radio set to human-readable string. * * @return A string representation of the set of radio types. * @@ -734,7 +734,7 @@ private: }; /** - * This function converts a link type to a string + * Converts a link type to a string * * @param[in] aRadioType A link type value. * @@ -746,14 +746,14 @@ const char *RadioTypeToString(RadioType aRadioType); #endif // OPENTHREAD_CONFIG_MULTI_RADIO /** - * This class represents Link Frame Counters for all supported radio links. + * Represents Link Frame Counters for all supported radio links. * */ class LinkFrameCounters { public: /** - * This method resets all counters (set them all to zero). + * Resets all counters (set them all to zero). * */ void Reset(void) { SetAll(0); } @@ -761,7 +761,7 @@ public: #if OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method gets the link Frame Counter for a given radio link. + * Gets the link Frame Counter for a given radio link. * * @param[in] aRadioType A radio link type. * @@ -771,7 +771,7 @@ public: uint32_t Get(RadioType aRadioType) const; /** - * This method sets the Link Frame Counter for a given radio link. + * Sets the Link Frame Counter for a given radio link. * * @param[in] aRadioType A radio link type. * @param[in] aCounter The new counter value. @@ -782,7 +782,7 @@ public: #else /** - * This method gets the Link Frame Counter value. + * Gets the Link Frame Counter value. * * @return The Link Frame Counter value. * @@ -799,7 +799,7 @@ public: #endif /** - * This method sets the Link Frame Counter for a given radio link. + * Sets the Link Frame Counter for a given radio link. * * @param[in] aCounter The new counter value. * @@ -819,7 +819,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE /** - * This method gets the Link Frame Counter for 802.15.4 radio link. + * Gets the Link Frame Counter for 802.15.4 radio link. * * @returns The Link Frame Counter for 802.15.4 radio link. * @@ -827,7 +827,7 @@ public: uint32_t Get154(void) const { return m154Counter; } /** - * This method sets the Link Frame Counter for 802.15.4 radio link. + * Sets the Link Frame Counter for 802.15.4 radio link. * * @param[in] aCounter The new counter value. * @@ -837,7 +837,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This method gets the Link Frame Counter for TREL radio link. + * Gets the Link Frame Counter for TREL radio link. * * @returns The Link Frame Counter for TREL radio link. * @@ -845,14 +845,14 @@ public: uint32_t GetTrel(void) const { return mTrelCounter; } /** - * This method increments the Link Frame Counter for TREL radio link. + * Increments the Link Frame Counter for TREL radio link. * */ void IncrementTrel(void) { mTrelCounter++; } #endif /** - * This method gets the maximum Link Frame Counter among all supported radio links. + * Gets the maximum Link Frame Counter among all supported radio links. * * @return The maximum Link frame Counter among all supported radio links. * @@ -860,7 +860,7 @@ public: uint32_t GetMaximum(void) const; /** - * This method sets the Link Frame Counter value for all radio links. + * Sets the Link Frame Counter value for all radio links. * * @param[in] aCounter The Link Frame Counter value. * @@ -877,7 +877,7 @@ private: }; /** - * This class represents CSL accuracy. + * Represents CSL accuracy. * */ class CslAccuracy @@ -887,7 +887,7 @@ public: static constexpr uint8_t kWorstUncertainty = 255; ///< Worst possible uncertainty, in units of 10 microseconds. /** - * This method initializes the CSL accuracy using `kWorstClockAccuracy` and `kWorstUncertainty` values. + * Initializes the CSL accuracy using `kWorstClockAccuracy` and `kWorstUncertainty` values. * */ void Init(void) @@ -897,7 +897,7 @@ public: } /** - * This method returns the CSL clock accuracy. + * Returns the CSL clock accuracy. * * @returns The CSL clock accuracy in ± ppm. * @@ -905,7 +905,7 @@ public: uint8_t GetClockAccuracy(void) const { return mClockAccuracy; } /** - * This method sets the CSL clock accuracy. + * Sets the CSL clock accuracy. * * @param[in] aClockAccuracy The CSL clock accuracy in ± ppm. * @@ -913,7 +913,7 @@ public: void SetClockAccuracy(uint8_t aClockAccuracy) { mClockAccuracy = aClockAccuracy; } /** - * This method returns the CSL uncertainty. + * Returns the CSL uncertainty. * * @returns The uncertainty in units 10 microseconds. * @@ -921,7 +921,7 @@ public: uint8_t GetUncertainty(void) const { return mUncertainty; } /** - * This method gets the CLS uncertainty in microseconds. + * Gets the CLS uncertainty in microseconds. * * @returns the CLS uncertainty in microseconds. * @@ -929,7 +929,7 @@ public: uint16_t GetUncertaintyInMicrosec(void) const { return static_cast(mUncertainty) * kUsPerUncertUnit; } /** - * This method sets the CSL uncertainty. + * Sets the CSL uncertainty. * * @param[in] aUncertainty The CSL uncertainty in units 10 microseconds. * diff --git a/src/core/mac/sub_mac.hpp b/src/core/mac/sub_mac.hpp index a4c55de80..7074ca2fd 100644 --- a/src/core/mac/sub_mac.hpp +++ b/src/core/mac/sub_mac.hpp @@ -87,7 +87,7 @@ class LinkRaw; #endif /** - * This class implements the IEEE 802.15.4 MAC (sub-MAC). + * Implements the IEEE 802.15.4 MAC (sub-MAC). * * Sub-MAC layer implements a subset of IEEE802.15.4 MAC primitives which are shared by both MAC layer (in FTD/MTD * modes) and Raw Link (Radio only mode). @@ -110,14 +110,14 @@ class SubMac : public InstanceLocator, private NonCopyable public: /** - * This class defines the callbacks notifying `SubMac` user of changes and events. + * Defines the callbacks notifying `SubMac` user of changes and events. * */ class Callbacks : public InstanceLocator { public: /** - * This constructor initializes the `Callbacks` object. + * Initializes the `Callbacks` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -125,7 +125,7 @@ public: explicit Callbacks(Instance &aInstance); /** - * This method notifies user of `SubMac` of a received frame. + * Notifies user of `SubMac` of a received frame. * * @param[in] aFrame A pointer to the received frame or `nullptr` if the receive operation failed. * @param[in] aError kErrorNone when successfully received a frame, @@ -136,7 +136,7 @@ public: void ReceiveDone(RxFrame *aFrame, Error aError); /** - * This method notifies user of `SubMac` of CCA status (success/failure) for a frame transmission attempt. + * Notifies user of `SubMac` of CCA status (success/failure) for a frame transmission attempt. * * This is intended for updating counters, logging, and/or tracking CCA failure rate statistics. * @@ -147,7 +147,7 @@ public: void RecordCcaStatus(bool aCcaSuccess, uint8_t aChannel); /** - * This method notifies user of `SubMac` of the status of a frame transmission attempt. + * Notifies user of `SubMac` of the status of a frame transmission attempt. * * This is intended for updating counters, logging, and/or collecting statistics. * @@ -186,7 +186,7 @@ public: void TransmitDone(TxFrame &aFrame, RxFrame *aAckFrame, Error aError); /** - * This method notifies user of `SubMac` that energy scan is complete. + * Notifies user of `SubMac` that energy scan is complete. * * @param[in] aMaxRssi Maximum RSSI seen on the channel, or `Radio::kInvalidRssi` if failed. * @@ -194,7 +194,7 @@ public: void EnergyScanDone(int8_t aMaxRssi); /** - * This method notifies user of `SubMac` that a specific MAC frame counter is used for transmission. + * Notifies user of `SubMac` that a specific MAC frame counter is used for transmission. * * It is possible that this callback is invoked out of order in terms of counter values (i.e., called for a * smaller counter value after a call for a larger counter value). @@ -206,7 +206,7 @@ public: }; /** - * This constructor initializes the `SubMac` object. + * Initializes the `SubMac` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -214,7 +214,7 @@ public: explicit SubMac(Instance &aInstance); /** - * This method gets the capabilities provided by platform radio. + * Gets the capabilities provided by platform radio. * * @returns The capability bit vector (see `OT_RADIO_CAP_*` definitions). * @@ -222,7 +222,7 @@ public: otRadioCaps GetRadioCaps(void) const { return mRadioCaps; } /** - * This method gets the capabilities provided by `SubMac` layer. + * Gets the capabilities provided by `SubMac` layer. * * @returns The capability bit vector (see `OT_RADIO_CAP_*` definitions). * @@ -230,7 +230,7 @@ public: otRadioCaps GetCaps(void) const; /** - * This method sets the PAN ID. + * Sets the PAN ID. * * @param[in] aPanId The PAN ID. * @@ -238,7 +238,7 @@ public: void SetPanId(PanId aPanId); /** - * This method gets the short address. + * Gets the short address. * * @returns The short address. * @@ -246,7 +246,7 @@ public: ShortAddress GetShortAddress(void) const { return mShortAddress; } /** - * This method sets the short address. + * Sets the short address. * * @param[in] aShortAddress The short address. * @@ -254,7 +254,7 @@ public: void SetShortAddress(ShortAddress aShortAddress); /** - * This function gets the extended address. + * Gets the extended address. * * @returns A reference to the extended address. * @@ -262,7 +262,7 @@ public: const ExtAddress &GetExtAddress(void) const { return mExtAddress; } /** - * This method sets extended address. + * Sets extended address. * * @param[in] aExtAddress The extended address. * @@ -270,7 +270,7 @@ public: void SetExtAddress(const ExtAddress &aExtAddress); /** - * This method registers a callback to provide received packet capture for IEEE 802.15.4 frames. + * Registers a callback to provide received packet capture for IEEE 802.15.4 frames. * * @param[in] aPcapCallback A pointer to a function that is called when receiving an IEEE 802.15.4 link frame * or `nullptr` to disable the callback. @@ -283,7 +283,7 @@ public: } /** - * This method indicates whether radio should stay in Receive or Sleep during CSMA backoff. + * Indicates whether radio should stay in Receive or Sleep during CSMA backoff. * * @param[in] aRxOnWhenBackoff TRUE to keep radio in Receive, FALSE to put to Sleep during CSMA backoff. * @@ -291,7 +291,7 @@ public: void SetRxOnWhenBackoff(bool aRxOnWhenBackoff) { mRxOnWhenBackoff = aRxOnWhenBackoff; } /** - * This method enables the radio. + * Enables the radio. * * @retval kErrorNone Successfully enabled. * @retval kErrorFailed The radio could not be enabled. @@ -300,7 +300,7 @@ public: Error Enable(void); /** - * This method disables the radio. + * Disables the radio. * * @retval kErrorNone Successfully disabled the radio. * @@ -308,7 +308,7 @@ public: Error Disable(void); /** - * This method transitions the radio to Sleep. + * Transitions the radio to Sleep. * * @retval kErrorNone Successfully transitioned to Sleep. * @retval kErrorBusy The radio was transmitting. @@ -318,7 +318,7 @@ public: Error Sleep(void); /** - * This method indicates whether the sub-mac is busy transmitting or scanning. + * Indicates whether the sub-mac is busy transmitting or scanning. * * @retval TRUE if the sub-mac is busy transmitting or scanning. * @retval FALSE if the sub-mac is not busy transmitting or scanning. @@ -327,7 +327,7 @@ public: bool IsTransmittingOrScanning(void) const { return (mState == kStateTransmit) || (mState == kStateEnergyScan); } /** - * This method transitions the radio to Receive. + * Transitions the radio to Receive. * * @param[in] aChannel The channel to use for receiving. * @@ -338,7 +338,7 @@ public: Error Receive(uint8_t aChannel); /** - * This method gets the radio transmit frame. + * Gets the radio transmit frame. * * @returns The transmit frame. * @@ -346,7 +346,7 @@ public: TxFrame &GetTransmitFrame(void) { return mTransmitFrame; } /** - * This method sends a prepared frame. + * Sends a prepared frame. * * The frame should be placed in `GetTransmitFrame()` frame. * @@ -359,7 +359,7 @@ public: Error Send(void); /** - * This method gets the number of transmit retries of last transmitted frame. + * Gets the number of transmit retries of last transmitted frame. * * @returns Number of transmit retries. * @@ -367,7 +367,7 @@ public: uint8_t GetTransmitRetries(void) const { return mTransmitRetries; } /** - * This method gets the most recent RSSI measurement. + * Gets the most recent RSSI measurement. * * @returns The RSSI in dBm when it is valid. `Radio::kInvalidRssi` when RSSI is invalid. * @@ -375,7 +375,7 @@ public: int8_t GetRssi(void) const; /** - * This method begins energy scan. + * Begins energy scan. * * @param[in] aScanChannel The channel to perform the energy scan on. * @param[in] aScanDuration The duration, in milliseconds, for the channel to be scanned. @@ -389,7 +389,7 @@ public: Error EnergyScan(uint8_t aScanChannel, uint16_t aScanDuration); /** - * This method returns the noise floor value (currently use the radio receive sensitivity value). + * Returns the noise floor value (currently use the radio receive sensitivity value). * * @returns The noise floor value in dBm. * @@ -398,7 +398,7 @@ public: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method configures CSL parameters in 'SubMac'. + * Configures CSL parameters in 'SubMac'. * * @param[in] aPeriod The CSL period. * @param[in] aChannel The CSL channel. @@ -412,7 +412,7 @@ public: bool UpdateCsl(uint16_t aPeriod, uint8_t aChannel, otShortAddress aShortAddr, const otExtAddress *aExtAddr); /** - * This method lets `SubMac` start CSL sample mode given a configured non-zero CSL period. + * Lets `SubMac` start CSL sample mode given a configured non-zero CSL period. * * `SubMac` would switch the radio state between `Receive` and `Sleep` according the CSL timer. * @@ -420,7 +420,7 @@ public: void CslSample(void); /** - * This method returns parent CSL accuracy (clock accuracy and uncertainty). + * Returns parent CSL accuracy (clock accuracy and uncertainty). * * @returns The parent CSL accuracy. * @@ -428,7 +428,7 @@ public: const CslAccuracy &GetCslParentAccuracy(void) const { return mCslParentAccuracy; } /** - * This method sets parent CSL accuracy. + * Sets parent CSL accuracy. * * @param[in] aCslAccuracy The parent CSL accuracy. * @@ -438,7 +438,7 @@ public: #endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method sets MAC keys and key index. + * Sets MAC keys and key index. * * @param[in] aKeyIdMode MAC key ID mode. * @param[in] aKeyId The key ID. @@ -454,7 +454,7 @@ public: const KeyMaterial &aNextKey); /** - * This method returns a reference to the current MAC key. + * Returns a reference to the current MAC key. * * @returns A reference to the current MAC key. * @@ -462,7 +462,7 @@ public: const KeyMaterial &GetCurrentMacKey(void) const { return mCurrKey; } /** - * This method returns a reference to the previous MAC key. + * Returns a reference to the previous MAC key. * * @returns A reference to the previous MAC key. * @@ -470,7 +470,7 @@ public: const KeyMaterial &GetPreviousMacKey(void) const { return mPrevKey; } /** - * This method returns a reference to the next MAC key. + * Returns a reference to the next MAC key. * * @returns A reference to the next MAC key. * @@ -478,7 +478,7 @@ public: const KeyMaterial &GetNextMacKey(void) const { return mNextKey; } /** - * This method clears the stored MAC keys. + * Clears the stored MAC keys. * */ void ClearMacKeys(void) @@ -489,7 +489,7 @@ public: } /** - * This method returns the current MAC frame counter value. + * Returns the current MAC frame counter value. * * @returns The current MAC frame counter value. * @@ -497,7 +497,7 @@ public: uint32_t GetFrameCounter(void) const { return mFrameCounter; } /** - * This method sets the current MAC Frame Counter value. + * Sets the current MAC Frame Counter value. * * @param[in] aFrameCounter The MAC Frame Counter value. * @param[in] aSetIfLarger If `true`, set only if the new value @p aFrameCounter is larger than the current value. @@ -508,7 +508,7 @@ public: #if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE /** - * This method enables/disables the radio filter. + * Enables/disables the radio filter. * * When radio filter is enabled, radio is put to sleep instead of receive (to ensure device does not receive any * frame and/or potentially send ack). Also the frame transmission requests return immediately without sending the @@ -520,7 +520,7 @@ public: void SetRadioFilterEnabled(bool aFilterEnabled) { mRadioFilterEnabled = aFilterEnabled; } /** - * This method indicates whether the radio filter is enabled or not. + * Indicates whether the radio filter is enabled or not. * * @retval TRUE If the radio filter is enabled. * @retval FALSE If the radio filter is disabled. @@ -590,7 +590,7 @@ private: #endif /** - * This method initializes the states of the sub-MAC layer. + * Initializes the states of the sub-MAC layer. * */ void Init(void); diff --git a/src/core/meshcop/announce_begin_client.hpp b/src/core/meshcop/announce_begin_client.hpp index 1960a5072..8ae027a4a 100644 --- a/src/core/meshcop/announce_begin_client.hpp +++ b/src/core/meshcop/announce_begin_client.hpp @@ -46,20 +46,20 @@ namespace ot { /** - * This class implements handling Announce Begin Requests. + * Implements handling Announce Begin Requests. * */ class AnnounceBeginClient : public InstanceLocator { public: /** - * This constructor initializes the object. + * Initializes the object. * */ explicit AnnounceBeginClient(Instance &aInstance); /** - * This method sends a Announce Begin message. + * Sends a Announce Begin message. * * @param[in] aChannelMask The channel mask value. * @param[in] aCount The number of Announce messages sent per channel. diff --git a/src/core/meshcop/border_agent.hpp b/src/core/meshcop/border_agent.hpp index 58f5b51a5..c16c1c80b 100644 --- a/src/core/meshcop/border_agent.hpp +++ b/src/core/meshcop/border_agent.hpp @@ -62,7 +62,7 @@ public: typedef otBorderAgentId Id; ///< Border Agent ID. /** - * This enumeration defines the Border Agent state. + * Defines the Border Agent state. * */ enum State : uint8_t @@ -73,7 +73,7 @@ public: }; /** - * This constructor initializes the `BorderAgent` object. + * Initializes the `BorderAgent` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -113,7 +113,7 @@ public: #endif /** - * This method gets the UDP port of this service. + * Gets the UDP port of this service. * * @returns UDP port number. * @@ -121,19 +121,19 @@ public: uint16_t GetUdpPort(void) const; /** - * This method starts the Border Agent service. + * Starts the Border Agent service. * */ void Start(void); /** - * This method stops the Border Agent service. + * Stops the Border Agent service. * */ void Stop(void); /** - * This method gets the state of the Border Agent service. + * Gets the state of the Border Agent service. * * @returns The state of the Border Agent service. * @@ -141,13 +141,13 @@ public: State GetState(void) const { return mState; } /** - * This method applies the Mesh Local Prefix. + * Applies the Mesh Local Prefix. * */ void ApplyMeshLocalPrefix(void); /** - * This method returns the UDP Proxy port to which the commissioner is currently + * Returns the UDP Proxy port to which the commissioner is currently * bound. * * @returns The current UDP Proxy port or 0 if no Proxy Transmit has been received yet. diff --git a/src/core/meshcop/commissioner.hpp b/src/core/meshcop/commissioner.hpp index 22e061fb5..8a277da23 100644 --- a/src/core/meshcop/commissioner.hpp +++ b/src/core/meshcop/commissioner.hpp @@ -70,7 +70,7 @@ class Commissioner : public InstanceLocator, private NonCopyable public: /** - * This enumeration type represents the Commissioner State. + * Type represents the Commissioner State. * */ enum State : uint8_t @@ -81,7 +81,7 @@ public: }; /** - * This enumeration type represents Joiner Event. + * Type represents Joiner Event. * */ enum JoinerEvent : uint8_t @@ -97,14 +97,14 @@ public: typedef otCommissionerJoinerCallback JoinerCallback; ///< Joiner state change callback function pointer type. /** - * This type represents a Commissioning Dataset. + * Represents a Commissioning Dataset. * */ class Dataset : public otCommissioningDataset, public Clearable { public: /** - * This method indicates whether or not the Border Router RLOC16 Locator is set in the Dataset. + * Indicates whether or not the Border Router RLOC16 Locator is set in the Dataset. * * @returns TRUE if Border Router RLOC16 Locator is set, FALSE otherwise. * @@ -112,9 +112,9 @@ public: bool IsLocatorSet(void) const { return mIsLocatorSet; } /** - * This method gets the Border Router RLOC16 Locator in the Dataset. + * Gets the Border Router RLOC16 Locator in the Dataset. * - * This method MUST be used when Locator is set in the Dataset, otherwise its behavior is undefined. + * MUST be used when Locator is set in the Dataset, otherwise its behavior is undefined. * * @returns The Border Router RLOC16 Locator in the Dataset. * @@ -122,7 +122,7 @@ public: uint16_t GetLocator(void) const { return mLocator; } /** - * This method sets the Border Router RLOCG16 Locator in the Dataset. + * Sets the Border Router RLOCG16 Locator in the Dataset. * * @param[in] aLocator A Locator. * @@ -134,7 +134,7 @@ public: } /** - * This method indicates whether or not the Session ID is set in the Dataset. + * Indicates whether or not the Session ID is set in the Dataset. * * @returns TRUE if Session ID is set, FALSE otherwise. * @@ -142,9 +142,9 @@ public: bool IsSessionIdSet(void) const { return mIsSessionIdSet; } /** - * This method gets the Session ID in the Dataset. + * Gets the Session ID in the Dataset. * - * This method MUST be used when Session ID is set in the Dataset, otherwise its behavior is undefined. + * MUST be used when Session ID is set in the Dataset, otherwise its behavior is undefined. * * @returns The Session ID in the Dataset. * @@ -152,7 +152,7 @@ public: uint16_t GetSessionId(void) const { return mSessionId; } /** - * This method sets the Session ID in the Dataset. + * Sets the Session ID in the Dataset. * * @param[in] aSessionId The Session ID. * @@ -164,7 +164,7 @@ public: } /** - * This method indicates whether or not the Steering Data is set in the Dataset. + * Indicates whether or not the Steering Data is set in the Dataset. * * @returns TRUE if Steering Data is set, FALSE otherwise. * @@ -172,9 +172,9 @@ public: bool IsSteeringDataSet(void) const { return mIsSteeringDataSet; } /** - * This method gets the Steering Data in the Dataset. + * Gets the Steering Data in the Dataset. * - * This method MUST be used when Steering Data is set in the Dataset, otherwise its behavior is undefined. + * MUST be used when Steering Data is set in the Dataset, otherwise its behavior is undefined. * * @returns The Steering Data in the Dataset. * @@ -182,7 +182,7 @@ public: const SteeringData &GetSteeringData(void) const { return AsCoreType(&mSteeringData); } /** - * This method returns a reference to the Steering Data in the Dataset to be updated by caller. + * Returns a reference to the Steering Data in the Dataset to be updated by caller. * * @returns A reference to the Steering Data in the Dataset. * @@ -194,7 +194,7 @@ public: } /** - * This method indicates whether or not the Joiner UDP port is set in the Dataset. + * Indicates whether or not the Joiner UDP port is set in the Dataset. * * @returns TRUE if Joiner UDP port is set, FALSE otherwise. * @@ -202,9 +202,9 @@ public: bool IsJoinerUdpPortSet(void) const { return mIsJoinerUdpPortSet; } /** - * This method gets the Joiner UDP port in the Dataset. + * Gets the Joiner UDP port in the Dataset. * - * This method MUST be used when Joiner UDP port is set in the Dataset, otherwise its behavior is undefined. + * MUST be used when Joiner UDP port is set in the Dataset, otherwise its behavior is undefined. * * @returns The Joiner UDP port in the Dataset. * @@ -212,7 +212,7 @@ public: uint16_t GetJoinerUdpPort(void) const { return mJoinerUdpPort; } /** - * This method sets the Joiner UDP Port in the Dataset. + * Sets the Joiner UDP Port in the Dataset. * * @param[in] aJoinerUdpPort The Joiner UDP Port. * @@ -225,7 +225,7 @@ public: }; /** - * This constructor initializes the Commissioner object. + * Initializes the Commissioner object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -233,7 +233,7 @@ public: explicit Commissioner(Instance &aInstance); /** - * This method starts the Commissioner service. + * Starts the Commissioner service. * * @param[in] aStateCallback A pointer to a function that is called when the commissioner state changes. * @param[in] aJoinerCallback A pointer to a function that is called when a joiner event occurs. @@ -247,7 +247,7 @@ public: Error Start(StateCallback aStateCallback, JoinerCallback aJoinerCallback, void *aCallbackContext); /** - * This method stops the Commissioner service. + * Stops the Commissioner service. * * @retval kErrorNone Successfully stopped the Commissioner service. * @retval kErrorAlready Commissioner is already stopped. @@ -256,7 +256,7 @@ public: Error Stop(void) { return Stop(kSendKeepAliveToResign); } /** - * This method returns the Commissioner Id. + * Returns the Commissioner Id. * * @returns The Commissioner Id. * @@ -264,7 +264,7 @@ public: const char *GetId(void) const { return mCommissionerId; } /** - * This method sets the Commissioner Id. + * Sets the Commissioner Id. * * @param[in] aId A pointer to a string character array. Must be null terminated. * @@ -276,13 +276,13 @@ public: Error SetId(const char *aId); /** - * This method clears all Joiner entries. + * Clears all Joiner entries. * */ void ClearJoiners(void); /** - * This method adds a Joiner entry accepting any Joiner. + * Adds a Joiner entry accepting any Joiner. * * @param[in] aPskd A pointer to the PSKd. * @param[in] aTimeout A time after which a Joiner is automatically removed, in seconds. @@ -295,7 +295,7 @@ public: Error AddJoinerAny(const char *aPskd, uint32_t aTimeout) { return AddJoiner(nullptr, nullptr, aPskd, aTimeout); } /** - * This method adds a Joiner entry. + * Adds a Joiner entry. * * @param[in] aEui64 The Joiner's IEEE EUI-64. * @param[in] aPskd A pointer to the PSKd. @@ -312,7 +312,7 @@ public: } /** - * This method adds a Joiner entry with a Joiner Discerner. + * Adds a Joiner entry with a Joiner Discerner. * * @param[in] aDiscerner A Joiner Discerner. * @param[in] aPskd A pointer to the PSKd. @@ -329,7 +329,7 @@ public: } /** - * This method get joiner info at aIterator position. + * Get joiner info at aIterator position. * * @param[in,out] aIterator A iterator to the index of the joiner. * @param[out] aJoiner A reference to Joiner info. @@ -341,7 +341,7 @@ public: Error GetNextJoinerInfo(uint16_t &aIterator, otJoinerInfo &aJoiner) const; /** - * This method removes a Joiner entry accepting any Joiner. + * Removes a Joiner entry accepting any Joiner. * * @param[in] aDelay The delay to remove Joiner (in seconds). * @@ -353,7 +353,7 @@ public: Error RemoveJoinerAny(uint32_t aDelay) { return RemoveJoiner(nullptr, nullptr, aDelay); } /** - * This method removes a Joiner entry. + * Removes a Joiner entry. * * @param[in] aEui64 The Joiner's IEEE EUI-64. * @param[in] aDelay The delay to remove Joiner (in seconds). @@ -369,7 +369,7 @@ public: } /** - * This method removes a Joiner entry. + * Removes a Joiner entry. * * @param[in] aDiscerner A Joiner Discerner. * @param[in] aDelay The delay to remove Joiner (in seconds). @@ -385,7 +385,7 @@ public: } /** - * This method gets the Provisioning URL. + * Gets the Provisioning URL. * * @returns A pointer to char buffer containing the URL string. * @@ -393,7 +393,7 @@ public: const char *GetProvisioningUrl(void) const { return mProvisioningUrl; } /** - * This method sets the Provisioning URL. + * Sets the Provisioning URL. * * @param[in] aProvisioningUrl A pointer to the Provisioning URL (may be `nullptr` to set URL to empty string). * @@ -404,7 +404,7 @@ public: Error SetProvisioningUrl(const char *aProvisioningUrl); /** - * This method returns the Commissioner Session ID. + * Returns the Commissioner Session ID. * * @returns The Commissioner Session ID. * @@ -412,7 +412,7 @@ public: uint16_t GetSessionId(void) const { return mSessionId; } /** - * This method indicates whether or not the Commissioner role is active. + * Indicates whether or not the Commissioner role is active. * * @returns TRUE if the Commissioner role is active, FALSE otherwise. * @@ -420,7 +420,7 @@ public: bool IsActive(void) const { return mState == kStateActive; } /** - * This method indicates whether or not the Commissioner role is disabled. + * Indicates whether or not the Commissioner role is disabled. * * @returns TRUE if the Commissioner role is disabled, FALSE otherwise. * @@ -428,7 +428,7 @@ public: bool IsDisabled(void) const { return mState == kStateDisabled; } /** - * This method gets the Commissioner State. + * Gets the Commissioner State. * * @returns The Commissioner State. * @@ -436,7 +436,7 @@ public: State GetState(void) const { return mState; } /** - * This method sends MGMT_COMMISSIONER_GET. + * Sends MGMT_COMMISSIONER_GET. * * @param[in] aTlvs A pointer to Commissioning Data TLVs. * @param[in] aLength The length of requested TLVs in bytes. @@ -449,7 +449,7 @@ public: Error SendMgmtCommissionerGetRequest(const uint8_t *aTlvs, uint8_t aLength); /** - * This method sends MGMT_COMMISSIONER_SET. + * Sends MGMT_COMMISSIONER_SET. * * @param[in] aDataset A reference to Commissioning Data. * @param[in] aTlvs A pointer to user specific Commissioning Data TLVs. @@ -463,7 +463,7 @@ public: Error SendMgmtCommissionerSetRequest(const Dataset &aDataset, const uint8_t *aTlvs, uint8_t aLength); /** - * This method returns a reference to the AnnounceBeginClient instance. + * Returns a reference to the AnnounceBeginClient instance. * * @returns A reference to the AnnounceBeginClient instance. * @@ -471,7 +471,7 @@ public: AnnounceBeginClient &GetAnnounceBeginClient(void) { return mAnnounceBegin; } /** - * This method returns a reference to the EnergyScanClient instance. + * Returns a reference to the EnergyScanClient instance. * * @returns A reference to the EnergyScanClient instance. * @@ -479,7 +479,7 @@ public: EnergyScanClient &GetEnergyScanClient(void) { return mEnergyScan; } /** - * This method returns a reference to the PanIdQueryClient instance. + * Returns a reference to the PanIdQueryClient instance. * * @returns A reference to the PanIdQueryClient instance. * @@ -487,7 +487,7 @@ public: PanIdQueryClient &GetPanIdQueryClient(void) { return mPanIdQuery; } /** - * This method applies the Mesh Local Prefix. + * Applies the Mesh Local Prefix. * */ void ApplyMeshLocalPrefix(void); diff --git a/src/core/meshcop/dataset.hpp b/src/core/meshcop/dataset.hpp index d45ea0278..ac7b9acdb 100644 --- a/src/core/meshcop/dataset.hpp +++ b/src/core/meshcop/dataset.hpp @@ -53,7 +53,7 @@ namespace ot { namespace MeshCoP { /** - * This class represents MeshCop Dataset. + * Represents MeshCop Dataset. * */ class Dataset @@ -66,7 +66,7 @@ public: static constexpr uint8_t kMaxGetTypes = 64; ///< Max number of types in MGMT_GET.req /** - * This enumeration represents the Dataset type (active or pending). + * Represents the Dataset type (active or pending). * */ enum Type : uint8_t @@ -76,14 +76,14 @@ public: }; /** - * This class represents presence of different components in Active or Pending Operational Dataset. + * Represents presence of different components in Active or Pending Operational Dataset. * */ class Components : public otOperationalDatasetComponents, public Clearable { public: /** - * This method indicates whether or not the Active Timestamp is present in the Dataset. + * Indicates whether or not the Active Timestamp is present in the Dataset. * * @returns TRUE if Active Timestamp is present, FALSE otherwise. * @@ -91,7 +91,7 @@ public: bool IsActiveTimestampPresent(void) const { return mIsActiveTimestampPresent; } /** - * This method indicates whether or not the Pending Timestamp is present in the Dataset. + * Indicates whether or not the Pending Timestamp is present in the Dataset. * * @returns TRUE if Pending Timestamp is present, FALSE otherwise. * @@ -99,7 +99,7 @@ public: bool IsPendingTimestampPresent(void) const { return mIsPendingTimestampPresent; } /** - * This method indicates whether or not the Network Key is present in the Dataset. + * Indicates whether or not the Network Key is present in the Dataset. * * @returns TRUE if Network Key is present, FALSE otherwise. * @@ -107,7 +107,7 @@ public: bool IsNetworkKeyPresent(void) const { return mIsNetworkKeyPresent; } /** - * This method indicates whether or not the Network Name is present in the Dataset. + * Indicates whether or not the Network Name is present in the Dataset. * * @returns TRUE if Network Name is present, FALSE otherwise. * @@ -115,7 +115,7 @@ public: bool IsNetworkNamePresent(void) const { return mIsNetworkNamePresent; } /** - * This method indicates whether or not the Extended PAN ID is present in the Dataset. + * Indicates whether or not the Extended PAN ID is present in the Dataset. * * @returns TRUE if Extended PAN ID is present, FALSE otherwise. * @@ -123,7 +123,7 @@ public: bool IsExtendedPanIdPresent(void) const { return mIsExtendedPanIdPresent; } /** - * This method indicates whether or not the Mesh Local Prefix is present in the Dataset. + * Indicates whether or not the Mesh Local Prefix is present in the Dataset. * * @returns TRUE if Mesh Local Prefix is present, FALSE otherwise. * @@ -131,7 +131,7 @@ public: bool IsMeshLocalPrefixPresent(void) const { return mIsMeshLocalPrefixPresent; } /** - * This method indicates whether or not the Delay Timer is present in the Dataset. + * Indicates whether or not the Delay Timer is present in the Dataset. * * @returns TRUE if Delay Timer is present, FALSE otherwise. * @@ -139,7 +139,7 @@ public: bool IsDelayPresent(void) const { return mIsDelayPresent; } /** - * This method indicates whether or not the PAN ID is present in the Dataset. + * Indicates whether or not the PAN ID is present in the Dataset. * * @returns TRUE if PAN ID is present, FALSE otherwise. * @@ -147,7 +147,7 @@ public: bool IsPanIdPresent(void) const { return mIsPanIdPresent; } /** - * This method indicates whether or not the Channel is present in the Dataset. + * Indicates whether or not the Channel is present in the Dataset. * * @returns TRUE if Channel is present, FALSE otherwise. * @@ -155,7 +155,7 @@ public: bool IsChannelPresent(void) const { return mIsChannelPresent; } /** - * This method indicates whether or not the PSKc is present in the Dataset. + * Indicates whether or not the PSKc is present in the Dataset. * * @returns TRUE if PSKc is present, FALSE otherwise. * @@ -163,7 +163,7 @@ public: bool IsPskcPresent(void) const { return mIsPskcPresent; } /** - * This method indicates whether or not the Security Policy is present in the Dataset. + * Indicates whether or not the Security Policy is present in the Dataset. * * @returns TRUE if Security Policy is present, FALSE otherwise. * @@ -171,7 +171,7 @@ public: bool IsSecurityPolicyPresent(void) const { return mIsSecurityPolicyPresent; } /** - * This method indicates whether or not the Channel Mask is present in the Dataset. + * Indicates whether or not the Channel Mask is present in the Dataset. * * @returns TRUE if Channel Mask is present, FALSE otherwise. * @@ -180,14 +180,14 @@ public: }; /** - * This type represents the information about the fields contained an Active or Pending Operational Dataset. + * Represents the information about the fields contained an Active or Pending Operational Dataset. * */ class Info : public otOperationalDataset, public Clearable { public: /** - * This method indicates whether or not the Active Timestamp is present in the Dataset. + * Indicates whether or not the Active Timestamp is present in the Dataset. * * @returns TRUE if Active Timestamp is present, FALSE otherwise. * @@ -195,9 +195,9 @@ public: bool IsActiveTimestampPresent(void) const { return mComponents.mIsActiveTimestampPresent; } /** - * This method gets the Active Timestamp in the Dataset. + * Gets the Active Timestamp in the Dataset. * - * This method MUST be used when Active Timestamp component is present in the Dataset, otherwise its behavior is + * MUST be used when Active Timestamp component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The Active Timestamp in the Dataset. @@ -206,7 +206,7 @@ public: void GetActiveTimestamp(Timestamp &aTimestamp) const { aTimestamp.SetFromTimestamp(mActiveTimestamp); } /** - * This method sets the Active Timestamp in the Dataset. + * Sets the Active Timestamp in the Dataset. * * @param[in] aTimestamp A Timestamp value. * @@ -218,7 +218,7 @@ public: } /** - * This method indicates whether or not the Pending Timestamp is present in the Dataset. + * Indicates whether or not the Pending Timestamp is present in the Dataset. * * @returns TRUE if Pending Timestamp is present, FALSE otherwise. * @@ -226,9 +226,9 @@ public: bool IsPendingTimestampPresent(void) const { return mComponents.mIsPendingTimestampPresent; } /** - * This method gets the Pending Timestamp in the Dataset. + * Gets the Pending Timestamp in the Dataset. * - * This method MUST be used when Pending Timestamp component is present in the Dataset, otherwise its behavior + * MUST be used when Pending Timestamp component is present in the Dataset, otherwise its behavior * is undefined. * * @returns The Pending Timestamp in the Dataset. @@ -237,7 +237,7 @@ public: void GetPendingTimestamp(Timestamp &aTimestamp) const { aTimestamp.SetFromTimestamp(mPendingTimestamp); } /** - * This method sets the Pending Timestamp in the Dataset. + * Sets the Pending Timestamp in the Dataset. * * @param[in] aTimestamp A Timestamp value. * @@ -249,7 +249,7 @@ public: } /** - * This method indicates whether or not the Network Key is present in the Dataset. + * Indicates whether or not the Network Key is present in the Dataset. * * @returns TRUE if Network Key is present, FALSE otherwise. * @@ -257,9 +257,9 @@ public: bool IsNetworkKeyPresent(void) const { return mComponents.mIsNetworkKeyPresent; } /** - * This method gets the Network Key in the Dataset. + * Gets the Network Key in the Dataset. * - * This method MUST be used when Network Key component is present in the Dataset, otherwise its behavior + * MUST be used when Network Key component is present in the Dataset, otherwise its behavior * is undefined. * * @returns The Network Key in the Dataset. @@ -268,7 +268,7 @@ public: const NetworkKey &GetNetworkKey(void) const { return AsCoreType(&mNetworkKey); } /** - * This method sets the Network Key in the Dataset. + * Sets the Network Key in the Dataset. * * @param[in] aNetworkKey A Network Key. * @@ -280,7 +280,7 @@ public: } /** - * This method returns a reference to the Network Key in the Dataset to be updated by caller. + * Returns a reference to the Network Key in the Dataset to be updated by caller. * * @returns A reference to the Network Key in the Dataset. * @@ -292,7 +292,7 @@ public: } /** - * This method indicates whether or not the Network Name is present in the Dataset. + * Indicates whether or not the Network Name is present in the Dataset. * * @returns TRUE if Network Name is present, FALSE otherwise. * @@ -300,9 +300,9 @@ public: bool IsNetworkNamePresent(void) const { return mComponents.mIsNetworkNamePresent; } /** - * This method gets the Network Name in the Dataset. + * Gets the Network Name in the Dataset. * - * This method MUST be used when Network Name component is present in the Dataset, otherwise its behavior is + * MUST be used when Network Name component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The Network Name in the Dataset. @@ -311,7 +311,7 @@ public: const NetworkName &GetNetworkName(void) const { return AsCoreType(&mNetworkName); } /** - * This method sets the Network Name in the Dataset. + * Sets the Network Name in the Dataset. * * @param[in] aNetworkNameData A Network Name Data. * @@ -323,7 +323,7 @@ public: } /** - * This method indicates whether or not the Extended PAN ID is present in the Dataset. + * Indicates whether or not the Extended PAN ID is present in the Dataset. * * @returns TRUE if Extended PAN ID is present, FALSE otherwise. * @@ -331,9 +331,9 @@ public: bool IsExtendedPanIdPresent(void) const { return mComponents.mIsExtendedPanIdPresent; } /** - * This method gets the Extended PAN ID in the Dataset. + * Gets the Extended PAN ID in the Dataset. * - * This method MUST be used when Extended PAN ID component is present in the Dataset, otherwise its behavior is + * MUST be used when Extended PAN ID component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The Extended PAN ID in the Dataset. @@ -342,7 +342,7 @@ public: const ExtendedPanId &GetExtendedPanId(void) const { return AsCoreType(&mExtendedPanId); } /** - * This method sets the Extended PAN ID in the Dataset. + * Sets the Extended PAN ID in the Dataset. * * @param[in] aExtendedPanId An Extended PAN ID. * @@ -354,7 +354,7 @@ public: } /** - * This method indicates whether or not the Mesh Local Prefix is present in the Dataset. + * Indicates whether or not the Mesh Local Prefix is present in the Dataset. * * @returns TRUE if Mesh Local Prefix is present, FALSE otherwise. * @@ -362,9 +362,9 @@ public: bool IsMeshLocalPrefixPresent(void) const { return mComponents.mIsMeshLocalPrefixPresent; } /** - * This method gets the Mesh Local Prefix in the Dataset. + * Gets the Mesh Local Prefix in the Dataset. * - * This method MUST be used when Mesh Local Prefix component is present in the Dataset, otherwise its behavior + * MUST be used when Mesh Local Prefix component is present in the Dataset, otherwise its behavior * is undefined. * * @returns The Mesh Local Prefix in the Dataset. @@ -376,7 +376,7 @@ public: } /** - * This method sets the Mesh Local Prefix in the Dataset. + * Sets the Mesh Local Prefix in the Dataset. * * @param[in] aMeshLocalPrefix A Mesh Local Prefix. * @@ -388,7 +388,7 @@ public: } /** - * This method indicates whether or not the Delay Timer is present in the Dataset. + * Indicates whether or not the Delay Timer is present in the Dataset. * * @returns TRUE if Delay Timer is present, FALSE otherwise. * @@ -396,9 +396,9 @@ public: bool IsDelayPresent(void) const { return mComponents.mIsDelayPresent; } /** - * This method gets the Delay Timer in the Dataset. + * Gets the Delay Timer in the Dataset. * - * This method MUST be used when Delay Timer component is present in the Dataset, otherwise its behavior is + * MUST be used when Delay Timer component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The Delay Timer in the Dataset. @@ -407,7 +407,7 @@ public: uint32_t GetDelay(void) const { return mDelay; } /** - * This method sets the Delay Timer in the Dataset. + * Sets the Delay Timer in the Dataset. * * @param[in] aDelay A Delay value. * @@ -419,7 +419,7 @@ public: } /** - * This method indicates whether or not the PAN ID is present in the Dataset. + * Indicates whether or not the PAN ID is present in the Dataset. * * @returns TRUE if PAN ID is present, FALSE otherwise. * @@ -427,9 +427,9 @@ public: bool IsPanIdPresent(void) const { return mComponents.mIsPanIdPresent; } /** - * This method gets the PAN ID in the Dataset. + * Gets the PAN ID in the Dataset. * - * This method MUST be used when PAN ID component is present in the Dataset, otherwise its behavior is + * MUST be used when PAN ID component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The PAN ID in the Dataset. @@ -438,7 +438,7 @@ public: Mac::PanId GetPanId(void) const { return mPanId; } /** - * This method sets the PAN ID in the Dataset. + * Sets the PAN ID in the Dataset. * * @param[in] aPanId A PAN ID. * @@ -450,7 +450,7 @@ public: } /** - * This method indicates whether or not the Channel is present in the Dataset. + * Indicates whether or not the Channel is present in the Dataset. * * @returns TRUE if Channel is present, FALSE otherwise. * @@ -458,9 +458,9 @@ public: bool IsChannelPresent(void) const { return mComponents.mIsChannelPresent; } /** - * This method gets the Channel in the Dataset. + * Gets the Channel in the Dataset. * - * This method MUST be used when Channel component is present in the Dataset, otherwise its behavior is + * MUST be used when Channel component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The Channel in the Dataset. @@ -469,7 +469,7 @@ public: uint16_t GetChannel(void) const { return mChannel; } /** - * This method sets the Channel in the Dataset. + * Sets the Channel in the Dataset. * * @param[in] aChannel A Channel. * @@ -481,7 +481,7 @@ public: } /** - * This method indicates whether or not the PSKc is present in the Dataset. + * Indicates whether or not the PSKc is present in the Dataset. * * @returns TRUE if PSKc is present, FALSE otherwise. * @@ -489,9 +489,9 @@ public: bool IsPskcPresent(void) const { return mComponents.mIsPskcPresent; } /** - * This method gets the PSKc in the Dataset. + * Gets the PSKc in the Dataset. * - * This method MUST be used when PSKc component is present in the Dataset, otherwise its behavior is undefined. + * MUST be used when PSKc component is present in the Dataset, otherwise its behavior is undefined. * * @returns The PSKc in the Dataset. * @@ -499,7 +499,7 @@ public: const Pskc &GetPskc(void) const { return AsCoreType(&mPskc); } /** - * This method set the PSKc in the Dataset. + * Set the PSKc in the Dataset. * * @param[in] aPskc A PSKc value. * @@ -511,7 +511,7 @@ public: } /** - * This method indicates whether or not the Security Policy is present in the Dataset. + * Indicates whether or not the Security Policy is present in the Dataset. * * @returns TRUE if Security Policy is present, FALSE otherwise. * @@ -519,9 +519,9 @@ public: bool IsSecurityPolicyPresent(void) const { return mComponents.mIsSecurityPolicyPresent; } /** - * This method gets the Security Policy in the Dataset. + * Gets the Security Policy in the Dataset. * - * This method MUST be used when Security Policy component is present in the Dataset, otherwise its behavior is + * MUST be used when Security Policy component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The Security Policy in the Dataset. @@ -530,7 +530,7 @@ public: const SecurityPolicy &GetSecurityPolicy(void) const { return AsCoreType(&mSecurityPolicy); } /** - * This method sets the Security Policy in the Dataset. + * Sets the Security Policy in the Dataset. * * @param[in] aSecurityPolicy A Security Policy to set in Dataset. * @@ -542,7 +542,7 @@ public: } /** - * This method indicates whether or not the Channel Mask is present in the Dataset. + * Indicates whether or not the Channel Mask is present in the Dataset. * * @returns TRUE if Channel Mask is present, FALSE otherwise. * @@ -550,9 +550,9 @@ public: bool IsChannelMaskPresent(void) const { return mComponents.mIsChannelMaskPresent; } /** - * This method gets the Channel Mask in the Dataset. + * Gets the Channel Mask in the Dataset. * - * This method MUST be used when Channel Mask component is present in the Dataset, otherwise its behavior is + * MUST be used when Channel Mask component is present in the Dataset, otherwise its behavior is * undefined. * * @returns The Channel Mask in the Dataset. @@ -561,7 +561,7 @@ public: otChannelMask GetChannelMask(void) const { return mChannelMask; } /** - * This method sets the Channel Mask in the Dataset. + * Sets the Channel Mask in the Dataset. * * @param[in] aChannelMask A Channel Mask value. * @@ -573,7 +573,7 @@ public: } /** - * This method populates the Dataset with random fields. + * Populates the Dataset with random fields. * * The Network Key, PSKc, Mesh Local Prefix, PAN ID, and Extended PAN ID are generated randomly (crypto-secure) * with Network Name set to "OpenThread-%04x" with PAN ID appended as hex. The Channel is chosen randomly from @@ -588,7 +588,7 @@ public: Error GenerateRandom(Instance &aInstance); /** - * This method checks whether the Dataset is a subset of another one, i.e., all the components in the current + * Checks whether the Dataset is a subset of another one, i.e., all the components in the current * Dataset are also present in the @p aOther and the component values fully match. * * The matching of components in the two Datasets excludes Active/Pending Timestamp and Delay components. @@ -603,19 +603,19 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * */ Dataset(void); /** - * This method clears the Dataset. + * Clears the Dataset. * */ void Clear(void); /** - * This method indicates whether or not the dataset appears to be well-formed. + * Indicates whether or not the dataset appears to be well-formed. * * @returns TRUE if the dataset appears to be well-formed, FALSE otherwise. * @@ -623,7 +623,7 @@ public: bool IsValid(void) const; /** - * This method returns a pointer to the TLV with a given type. + * Returns a pointer to the TLV with a given type. * * @param[in] aType A TLV type. * @@ -633,7 +633,7 @@ public: Tlv *GetTlv(Tlv::Type aType) { return AsNonConst(AsConst(this)->GetTlv(aType)); } /** - * This method returns a pointer to the TLV with a given type. + * Returns a pointer to the TLV with a given type. * * @param[in] aType The TLV type. * @@ -643,7 +643,7 @@ public: const Tlv *GetTlv(Tlv::Type aType) const; /** - * This template method returns a pointer to the TLV with a given template type `TlvType` + * Returns a pointer to the TLV with a given template type `TlvType` * * @returns A pointer to the TLV or `nullptr` if none is found. * @@ -654,7 +654,7 @@ public: } /** - * This template method returns a pointer to the TLV with a given template type `TlvType` + * Returns a pointer to the TLV with a given template type `TlvType` * * @returns A pointer to the TLV or `nullptr` if none is found. * @@ -665,7 +665,7 @@ public: } /** - * This method returns a pointer to the byte representation of the Dataset. + * Returns a pointer to the byte representation of the Dataset. * * @returns A pointer to the byte representation of the Dataset. * @@ -673,7 +673,7 @@ public: uint8_t *GetBytes(void) { return mTlvs; } /** - * This method returns a pointer to the byte representation of the Dataset. + * Returns a pointer to the byte representation of the Dataset. * * @returns A pointer to the byte representation of the Dataset. * @@ -681,7 +681,7 @@ public: const uint8_t *GetBytes(void) const { return mTlvs; } /** - * This method converts the TLV representation to structure representation. + * Converts the TLV representation to structure representation. * * @param[out] aDatasetInfo A reference to `Info` object to output the Dataset. * @@ -689,7 +689,7 @@ public: void ConvertTo(Info &aDatasetInfo) const; /** - * This method converts the TLV representation to structure representation. + * Converts the TLV representation to structure representation. * * @param[out] aDataset A reference to `otOperationalDatasetTlvs` to output the Dataset. * @@ -697,7 +697,7 @@ public: void ConvertTo(otOperationalDatasetTlvs &aDataset) const; /** - * This method returns the Dataset size in bytes. + * Returns the Dataset size in bytes. * * @returns The Dataset size in bytes. * @@ -705,7 +705,7 @@ public: uint16_t GetSize(void) const { return mLength; } /** - * This method sets the Dataset size in bytes. + * Sets the Dataset size in bytes. * * @param[in] aSize The Dataset size in bytes. * @@ -713,7 +713,7 @@ public: void SetSize(uint16_t aSize) { mLength = aSize; } /** - * This method returns the local time the dataset was last updated. + * Returns the local time the dataset was last updated. * * @returns The local time the dataset was last updated. * @@ -721,7 +721,7 @@ public: TimeMilli GetUpdateTime(void) const { return mUpdateTime; } /** - * This method gets the Timestamp (Active or Pending). + * Gets the Timestamp (Active or Pending). * * @param[in] aType The type: active or pending. * @param[out] aTimestamp A reference to a `Timestamp` to output the value. @@ -733,7 +733,7 @@ public: Error GetTimestamp(Type aType, Timestamp &aTimestamp) const; /** - * This method sets the Timestamp value. + * Sets the Timestamp value. * * @param[in] aType The type: active or pending. * @param[in] aTimestamp A Timestamp. @@ -742,7 +742,7 @@ public: void SetTimestamp(Type aType, const Timestamp &aTimestamp); /** - * This method sets a TLV in the Dataset. + * Sets a TLV in the Dataset. * * @param[in] aTlv A reference to the TLV. * @@ -753,7 +753,7 @@ public: Error SetTlv(const Tlv &aTlv); /** - * This method sets a TLV with a given TLV Type and Value. + * Sets a TLV with a given TLV Type and Value. * * @param[in] aType The TLV Type. * @param[in] aValue A pointer to TLV Value. @@ -766,7 +766,7 @@ public: Error SetTlv(Tlv::Type aType, const void *aValue, uint8_t aLength); /** - * This template method sets a TLV with a given TLV Type and Value. + * Sets a TLV with a given TLV Type and Value. * * @tparam ValueType The type of TLV's Value. * @@ -785,7 +785,7 @@ public: } /** - * This method reads the Dataset from a given message and checks that it is well-formed and valid. + * Reads the Dataset from a given message and checks that it is well-formed and valid. * * @param[in] aMessage The message to read from. * @param[in] aOffset The offset in @p aMessage to start reading the Dataset TLVs. @@ -798,7 +798,7 @@ public: Error ReadFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLength); /** - * This method sets the Dataset using an existing Dataset. + * Sets the Dataset using an existing Dataset. * * If this Dataset is an Active Dataset, any Pending Timestamp and Delay Timer TLVs will be omitted in the copy * from @p aDataset. @@ -810,7 +810,7 @@ public: void Set(Type aType, const Dataset &aDataset); /** - * This method sets the Dataset from a given structure representation. + * Sets the Dataset from a given structure representation. * * @param[in] aDatasetInfo The input Dataset as `Dataset::Info`. * @@ -821,7 +821,7 @@ public: Error SetFrom(const Info &aDatasetInfo); /** - * This method sets the Dataset using @p aDataset. + * Sets the Dataset using @p aDataset. * * @param[in] aDataset The input Dataset as otOperationalDatasetTlvs. * @@ -829,7 +829,7 @@ public: void SetFrom(const otOperationalDatasetTlvs &aDataset); /** - * This method removes a TLV from the Dataset. + * Removes a TLV from the Dataset. * * @param[in] aType The type of a specific TLV. * @@ -837,7 +837,7 @@ public: void RemoveTlv(Tlv::Type aType); /** - * This method appends the MLE Dataset TLV but excluding MeshCoP Sub Timestamp TLV. + * Appends the MLE Dataset TLV but excluding MeshCoP Sub Timestamp TLV. * * @param[in] aType The type of the dataset, active or pending. * @param[in] aMessage A message to append to. @@ -849,7 +849,7 @@ public: Error AppendMleDatasetTlv(Type aType, Message &aMessage) const; /** - * This method applies the Active or Pending Dataset to the Thread interface. + * Applies the Active or Pending Dataset to the Thread interface. * * @param[in] aInstance A reference to the OpenThread instance. * @param[out] aIsNetworkKeyUpdated A pointer to where to place whether network key was updated. @@ -861,15 +861,15 @@ public: Error ApplyConfiguration(Instance &aInstance, bool *aIsNetworkKeyUpdated = nullptr) const; /** - * This method converts a Pending Dataset to an Active Dataset. + * Converts a Pending Dataset to an Active Dataset. * - * This method removes the Delay Timer and Pending Timestamp TLVs + * Removes the Delay Timer and Pending Timestamp TLVs * */ void ConvertToActive(void); /** - * This method returns a pointer to the start of Dataset TLVs sequence. + * Returns a pointer to the start of Dataset TLVs sequence. * * @return A pointer to the start of Dataset TLVs sequence. * @@ -877,7 +877,7 @@ public: Tlv *GetTlvsStart(void) { return reinterpret_cast(mTlvs); } /** - * This method returns a pointer to the start of Dataset TLVs sequence. + * Returns a pointer to the start of Dataset TLVs sequence. * * @return A pointer to start of Dataset TLVs sequence. * @@ -885,7 +885,7 @@ public: const Tlv *GetTlvsStart(void) const { return reinterpret_cast(mTlvs); } /** - * This method returns a pointer to the past-the-end of Dataset TLVs sequence. + * Returns a pointer to the past-the-end of Dataset TLVs sequence. * * Note that past-the-end points to the byte after the end of the last TLV in Dataset TLVs sequence. * @@ -895,7 +895,7 @@ public: Tlv *GetTlvsEnd(void) { return reinterpret_cast(mTlvs + mLength); } /** - * This method returns a pointer to the past-the-end of Dataset TLVs sequence. + * Returns a pointer to the past-the-end of Dataset TLVs sequence. * * Note that past-the-end points to the byte after the end of the last TLV in Dataset TLVs sequence. * @@ -905,7 +905,7 @@ public: const Tlv *GetTlvsEnd(void) const { return reinterpret_cast(mTlvs + mLength); } /** - * This static method converts a Dataset Type to a string. + * Converts a Dataset Type to a string. * * @param[in] aType A Dataset type. * diff --git a/src/core/meshcop/dataset_local.hpp b/src/core/meshcop/dataset_local.hpp index c91c11e56..2981b7c02 100644 --- a/src/core/meshcop/dataset_local.hpp +++ b/src/core/meshcop/dataset_local.hpp @@ -48,7 +48,7 @@ class DatasetLocal : public InstanceLocator { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to an OpenThread instance. * @param[in] aType The type of the dataset, active or pending. @@ -57,7 +57,7 @@ public: DatasetLocal(Instance &aInstance, Dataset::Type aType); /** - * This method indicates whether this is an Active or Pending Dataset. + * Indicates whether this is an Active or Pending Dataset. * * @returns The Dataset type. * @@ -65,13 +65,13 @@ public: Dataset::Type GetType(void) const { return mType; } /** - * This method clears the Dataset. + * Clears the Dataset. * */ void Clear(void); /** - * This method indicates whether an Active or Pending Dataset is saved in non-volatile memory. + * Indicates whether an Active or Pending Dataset is saved in non-volatile memory. * * @retval TRUE if an Active or Pending Dataset is saved in non-volatile memory. * @retval FALSE if an Active or Pending Dataset is not saved in non-volatile memory. @@ -80,7 +80,7 @@ public: bool IsSaved(void) const { return mSaved; } /** - * This method indicates whether an Active (Pending) Timestamp is present in the Active (Pending) Dataset. + * Indicates whether an Active (Pending) Timestamp is present in the Active (Pending) Dataset. * * @retval TRUE if an Active/Pending Timestamp is present. * @retval FALSE if an Active/Pending Timestamp is not present. @@ -89,7 +89,7 @@ public: bool IsTimestampPresent(void) const { return mTimestampPresent; } /** - * This method returns a pointer to the Timestamp or `nullptr` when it is not present in the Dataset. + * Returns a pointer to the Timestamp or `nullptr` when it is not present in the Dataset. * * @returns A pointer to the Timestamp or `nullptr` if timestamp is not present in the Dataset. * @@ -97,9 +97,9 @@ public: const Timestamp *GetTimestamp(void) const { return mTimestampPresent ? &mTimestamp : nullptr; } /** - * This method restores and retrieves the dataset from non-volatile memory. + * Restores and retrieves the dataset from non-volatile memory. * - * This method also sets the memory-cached timestamp for subsequent calls to `Compare()`. + * Also sets the memory-cached timestamp for subsequent calls to `Compare()`. * * @param[out] aDataset Where to place the dataset. * @@ -110,7 +110,7 @@ public: Error Restore(Dataset &aDataset); /** - * This method retrieves the dataset from non-volatile memory. + * Retrieves the dataset from non-volatile memory. * * @param[out] aDataset Where to place the dataset. * @@ -121,7 +121,7 @@ public: Error Read(Dataset &aDataset) const; /** - * This method retrieves the dataset from non-volatile memory. + * Retrieves the dataset from non-volatile memory. * * @param[out] aDatasetInfo Where to place the dataset as `Dataset::Info`. * @@ -132,7 +132,7 @@ public: Error Read(Dataset::Info &aDatasetInfo) const; /** - * This method retrieves the dataset from non-volatile memory. + * Retrieves the dataset from non-volatile memory. * * @param[out] aDataset Where to place the dataset. * @@ -143,7 +143,7 @@ public: Error Read(otOperationalDatasetTlvs &aDataset) const; /** - * This method returns the local time this dataset was last updated or restored. + * Returns the local time this dataset was last updated or restored. * * @returns The local time this dataset was last updated or restored. * @@ -151,7 +151,7 @@ public: TimeMilli GetUpdateTime(void) const { return mUpdateTime; } /** - * This method stores the dataset into non-volatile memory. + * Stores the dataset into non-volatile memory. * * @param[in] aDatasetInfo The Dataset to save as `Dataset::Info`. * @@ -162,7 +162,7 @@ public: Error Save(const Dataset::Info &aDatasetInfo); /** - * This method stores the dataset into non-volatile memory. + * Stores the dataset into non-volatile memory. * * @param[in] aDataset The Dataset to save as `otOperationalDatasetTlvs`. * @@ -173,7 +173,7 @@ public: Error Save(const otOperationalDatasetTlvs &aDataset); /** - * This method stores the dataset into non-volatile memory. + * Stores the dataset into non-volatile memory. * * @param[in] aDataset The Dataset to save. * diff --git a/src/core/meshcop/dataset_manager.hpp b/src/core/meshcop/dataset_manager.hpp index d6e1bbf7f..c1af58a67 100644 --- a/src/core/meshcop/dataset_manager.hpp +++ b/src/core/meshcop/dataset_manager.hpp @@ -55,7 +55,7 @@ class DatasetManager : public InstanceLocator { public: /** - * This method returns a pointer to the Timestamp. + * Returns a pointer to the Timestamp. * * @returns A pointer to the Timestamp. * @@ -63,7 +63,7 @@ public: const Timestamp *GetTimestamp(void) const; /** - * This method restores the Operational Dataset from non-volatile memory. + * Restores the Operational Dataset from non-volatile memory. * * @retval kErrorNone Successfully restore the dataset. * @retval kErrorNotFound There is no corresponding dataset stored in non-volatile memory. @@ -72,7 +72,7 @@ public: Error Restore(void); /** - * This method retrieves the dataset from non-volatile memory. + * Retrieves the dataset from non-volatile memory. * * @param[out] aDataset Where to place the dataset. * @@ -83,7 +83,7 @@ public: Error Read(Dataset &aDataset) const { return mLocal.Read(aDataset); } /** - * This method retrieves the dataset from non-volatile memory. + * Retrieves the dataset from non-volatile memory. * * @param[out] aDatasetInfo Where to place the dataset (as `Dataset::Info`). * @@ -94,7 +94,7 @@ public: Error Read(Dataset::Info &aDatasetInfo) const { return mLocal.Read(aDatasetInfo); } /** - * This method retrieves the dataset from non-volatile memory. + * Retrieves the dataset from non-volatile memory. * * @param[out] aDataset Where to place the dataset. * @@ -105,7 +105,7 @@ public: Error Read(otOperationalDatasetTlvs &aDataset) const { return mLocal.Read(aDataset); } /** - * This method retrieves the channel mask from local dataset. + * Retrieves the channel mask from local dataset. * * @param[out] aChannelMask A reference to the channel mask. * @@ -116,7 +116,7 @@ public: Error GetChannelMask(Mac::ChannelMask &aChannelMask) const; /** - * This method applies the Active or Pending Dataset to the Thread interface. + * Applies the Active or Pending Dataset to the Thread interface. * * @retval kErrorNone Successfully applied configuration. * @retval kErrorParse The dataset has at least one TLV with invalid format. @@ -125,7 +125,7 @@ public: Error ApplyConfiguration(void) const; /** - * This method updates the Operational Dataset when detaching from the network. + * Updates the Operational Dataset when detaching from the network. * * On detach, the Operational Dataset is restored from non-volatile memory. * @@ -133,7 +133,7 @@ public: void HandleDetach(void); /** - * This method sends a MGMT_SET request to the Leader. + * Sends a MGMT_SET request to the Leader. * * @param[in] aDatasetInfo The Operational Dataset. * @param[in] aTlvs Any additional raw TLVs to include. @@ -153,7 +153,7 @@ public: void *aContext); /** - * This method sends a MGMT_GET request. + * Sends a MGMT_GET request. * * @param[in] aDatasetComponents An Operational Dataset components structure specifying components to request. * @param[in] aTlvTypes A pointer to array containing additional raw TLV types to be requested. @@ -170,7 +170,7 @@ public: const otIp6Address *aAddress) const; #if OPENTHREAD_FTD /** - * This method appends the MLE Dataset TLV but excluding MeshCoP Sub Timestamp TLV. + * Appends the MLE Dataset TLV but excluding MeshCoP Sub Timestamp TLV. * * @param[in] aMessage The message to append the TLV to. * @@ -183,7 +183,7 @@ public: protected: /** - * This class defines a generic Dataset TLV to read from a message. + * Defines a generic Dataset TLV to read from a message. * */ OT_TOOL_PACKED_BEGIN @@ -191,7 +191,7 @@ protected: { public: /** - * This method reads the Dataset TLV from a given message at a given offset. + * Reads the Dataset TLV from a given message at a given offset. * * @param[in] aMessage A message to read the TLV from. * @param[in] aOffset An offset into the message to read from. @@ -207,7 +207,7 @@ protected: } OT_TOOL_PACKED_END; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aType Dataset type, Active or Pending. @@ -217,7 +217,7 @@ protected: DatasetManager(Instance &aInstance, Dataset::Type aType, TimerMilli::Handler aTimerHandler); /** - * This method gets the Operational Dataset type (Active or Pending). + * Gets the Operational Dataset type (Active or Pending). * * @returns The Operational Dataset type. * @@ -225,13 +225,13 @@ protected: Dataset::Type GetType(void) const { return mLocal.GetType(); } /** - * This method clears the Operational Dataset. + * Clears the Operational Dataset. * */ void Clear(void); /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * * @param[in] aDataset The Operational Dataset. * @@ -242,7 +242,7 @@ protected: Error Save(const Dataset &aDataset); /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * * @param[in] aDatasetInfo The Operational Dataset as `Dataset::Info`. * @@ -253,7 +253,7 @@ protected: Error Save(const Dataset::Info &aDatasetInfo); /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * * @param[in] aDataset The Operational Dataset. * @@ -264,9 +264,9 @@ protected: Error Save(const otOperationalDatasetTlvs &aDataset); /** - * This method sets the Operational Dataset for the partition. + * Sets the Operational Dataset for the partition. * - * This method also updates the non-volatile version if the partition's Operational Dataset is newer. + * Also updates the non-volatile version if the partition's Operational Dataset is newer. * * @param[in] aTimestamp The timestamp for the Operational Dataset. * @param[in] aMessage The message buffer. @@ -280,7 +280,7 @@ protected: Error Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength); /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * * @param[in] aDataset The Operational Dataset. * @@ -291,7 +291,7 @@ protected: Error SaveLocal(const Dataset &aDataset); /** - * This method handles a MGMT_GET request message. + * Handles a MGMT_GET request message. * * @param[in] aMessage The CoAP message buffer. * @param[in] aMessageInfo The message info. @@ -300,7 +300,7 @@ protected: void HandleGet(const Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) const; /** - * This method compares the partition's Operational Dataset with that stored in non-volatile memory. + * Compares the partition's Operational Dataset with that stored in non-volatile memory. * * If the partition's Operational Dataset is newer, the non-volatile storage is updated. * If the partition's Operational Dataset is older, the registration process is started. @@ -309,14 +309,14 @@ protected: void HandleNetworkUpdate(void); /** - * This method initiates a network data registration message with the Leader. + * Initiates a network data registration message with the Leader. * */ void HandleTimer(void); #if OPENTHREAD_FTD /** - * This method handles the MGMT_SET request message. + * Handles the MGMT_SET request message. * * @param[in] aMessage The CoAP message buffer. * @param[in] aMessageInfo The message info. @@ -369,7 +369,7 @@ class ActiveDatasetManager : public DatasetManager, private NonCopyable public: /** - * This constructor initializes the ActiveDatasetManager object. + * Initializes the ActiveDatasetManager object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -377,9 +377,9 @@ public: explicit ActiveDatasetManager(Instance &aInstance); /** - * This method indicates whether the Active Dataset is partially complete. + * Indicates whether the Active Dataset is partially complete. * - * This method is primarily used to determine whether a user has supplied a partial Active Dataset for use + * Is primarily used to determine whether a user has supplied a partial Active Dataset for use * with joining a network. * * @retval TRUE if an Active Dataset is saved but does not include an Active Timestamp. @@ -389,7 +389,7 @@ public: bool IsPartiallyComplete(void) const; /** - * This method indicates whether or not a valid network is present in the Active Operational Dataset. + * Indicates whether or not a valid network is present in the Active Operational Dataset. * * @retval TRUE if a valid network is present in the Active Dataset. * @retval FALSE if a valid network is not present in the Active Dataset. @@ -398,15 +398,15 @@ public: bool IsCommissioned(void) const; /** - * This method clears the Active Operational Dataset. + * Clears the Active Operational Dataset. * */ void Clear(void) { DatasetManager::Clear(); } /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * - * This method also reconfigures the Thread interface. + * Also reconfigures the Thread interface. * * @param[in] aDataset The Operational Dataset. * @@ -414,10 +414,10 @@ public: void Save(const Dataset &aDataset) { IgnoreError(DatasetManager::Save(aDataset)); } /** - * This method sets the Operational Dataset for the partition. + * Sets the Operational Dataset for the partition. * - * This method also reconfigures the Thread interface. - * This method also updates the non-volatile version if the partition's Operational Dataset is newer. + * Also reconfigures the Thread interface. + * Also updates the non-volatile version if the partition's Operational Dataset is newer. * * @param[in] aTimestamp The timestamp for the Operational Dataset. * @param[in] aMessage The message buffer. @@ -431,7 +431,7 @@ public: Error Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint16_t aLength); /** - * This method sets the Operational Dataset in non-volatile memory. + * Sets the Operational Dataset in non-volatile memory. * * @param[in] aDatasetInfo The Operational Dataset as `Dataset::Info`. * @@ -442,7 +442,7 @@ public: Error Save(const Dataset::Info &aDatasetInfo) { return DatasetManager::Save(aDatasetInfo); } /** - * This method sets the Operational Dataset in non-volatile memory. + * Sets the Operational Dataset in non-volatile memory. * * @param[in] aDataset The Operational Dataset. * @@ -455,7 +455,7 @@ public: #if OPENTHREAD_FTD /** - * This method creates a new Operational Dataset to use when forming a new network. + * Creates a new Operational Dataset to use when forming a new network. * * @param[out] aDatasetInfo The Operational Dataset as `Dataset::Info`. * @@ -466,13 +466,13 @@ public: Error CreateNewNetwork(Dataset::Info &aDatasetInfo) { return aDatasetInfo.GenerateRandom(GetInstance()); } /** - * This method starts the Leader functions for maintaining the Active Operational Dataset. + * Starts the Leader functions for maintaining the Active Operational Dataset. * */ void StartLeader(void); /** - * This method generate a default Active Operational Dataset. + * Generate a default Active Operational Dataset. * * @retval kErrorNone Successfully generated an Active Operational Dataset. * @retval kErrorAlready A valid Active Operational Dataset already exists. @@ -500,7 +500,7 @@ class PendingDatasetManager : public DatasetManager, private NonCopyable public: /** - * This constructor initializes the PendingDatasetManager object. + * Initializes the PendingDatasetManager object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -508,25 +508,25 @@ public: explicit PendingDatasetManager(Instance &aInstance); /** - * This method clears the Pending Operational Dataset. + * Clears the Pending Operational Dataset. * - * This method also stops the Delay Timer if it was active. + * Also stops the Delay Timer if it was active. * */ void Clear(void); /** - * This method clears the network Pending Operational Dataset. + * Clears the network Pending Operational Dataset. * - * This method also stops the Delay Timer if it was active. + * Also stops the Delay Timer if it was active. * */ void ClearNetwork(void); /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * - * This method also starts the Delay Timer. + * Also starts the Delay Timer. * * @param[in] aDatasetInfo The Operational Dataset as `Dataset::Info`. * @@ -537,9 +537,9 @@ public: Error Save(const Dataset::Info &aDatasetInfo); /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * - * This method also starts the Delay Timer. + * Also starts the Delay Timer. * * @param[in] aDataset The Operational Dataset. * @@ -550,11 +550,11 @@ public: Error Save(const otOperationalDatasetTlvs &aDataset); /** - * This method sets the Operational Dataset for the partition. + * Sets the Operational Dataset for the partition. * - * This method also updates the non-volatile version if the partition's Operational Dataset is newer. + * Also updates the non-volatile version if the partition's Operational Dataset is newer. * - * This method also starts the Delay Timer. + * Also starts the Delay Timer. * * @param[in] aTimestamp The timestamp for the Operational Dataset. * @param[in] aMessage The message buffer. @@ -565,7 +565,7 @@ public: Error Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint16_t aLength); /** - * This method saves the Operational Dataset in non-volatile memory. + * Saves the Operational Dataset in non-volatile memory. * * @param[in] aDataset The Operational Dataset. * @@ -577,13 +577,13 @@ public: #if OPENTHREAD_FTD /** - * This method starts the Leader functions for maintaining the Active Operational Dataset. + * Starts the Leader functions for maintaining the Active Operational Dataset. * */ void StartLeader(void); /** - * This method generates a Pending Dataset from an Active Dataset. + * Generates a Pending Dataset from an Active Dataset. * * @param[in] aTimestamp The Active Dataset Timestamp. * @param[in] aMessage The MGMT_SET message that contains an Active Dataset. diff --git a/src/core/meshcop/dataset_updater.hpp b/src/core/meshcop/dataset_updater.hpp index ecc998d70..7d0a93cee 100644 --- a/src/core/meshcop/dataset_updater.hpp +++ b/src/core/meshcop/dataset_updater.hpp @@ -53,7 +53,7 @@ namespace ot { namespace MeshCoP { /** - * This class implements the Dataset Updater. + * Implements the Dataset Updater. * */ class DatasetUpdater : public InstanceLocator, private NonCopyable @@ -62,7 +62,7 @@ class DatasetUpdater : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes a `DatasetUpdater` object. + * Initializes a `DatasetUpdater` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -70,7 +70,7 @@ public: explicit DatasetUpdater(Instance &aInstance); /** - * This type represents the callback function pointer which is called when a Dataset update request finishes, + * Represents the callback function pointer which is called when a Dataset update request finishes, * reporting success or failure status of the request. * * The function pointer has the syntax `void (*UpdaterCallback)(Error aError, void *aContext)`. @@ -79,7 +79,7 @@ public: typedef otDatasetUpdaterCallback UpdaterCallback; /** - * This method requests an update to Operational Dataset. + * Requests an update to Operational Dataset. * * @p aDataset should contain the fields to be updated and their new value. It must not contain Active or Pending * Timestamp fields. The Delay field is optional, if not provided a default value (`kDefaultDelay`) would be used. @@ -98,13 +98,13 @@ public: Error RequestUpdate(const Dataset::Info &aDataset, UpdaterCallback aCallback, void *aContext); /** - * This method cancels an ongoing (if any) Operational Dataset update request. + * Cancels an ongoing (if any) Operational Dataset update request. * */ void CancelUpdate(void); /** - * This method indicates whether there is an ongoing Operation Dataset update request. + * Indicates whether there is an ongoing Operation Dataset update request. * * @retval TRUE There is an ongoing update. * @retval FALSE There is no ongoing update. diff --git a/src/core/meshcop/dtls.hpp b/src/core/meshcop/dtls.hpp index 129ed3c77..1ff30e41d 100644 --- a/src/core/meshcop/dtls.hpp +++ b/src/core/meshcop/dtls.hpp @@ -71,7 +71,7 @@ public: static constexpr uint8_t kPskMaxLength = 32; ///< Maximum PSK length. /** - * This constructor initializes the DTLS object. + * Initializes the DTLS object. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aLayerTwoSecurity Specifies whether to use layer two security or not. @@ -80,7 +80,7 @@ public: explicit Dtls(Instance &aInstance, bool aLayerTwoSecurity); /** - * This function pointer is called when a connection is established or torn down. + * Pointer is called when a connection is established or torn down. * * @param[in] aContext A pointer to application-specific context. * @param[in] aConnected TRUE if a connection was established, FALSE otherwise. @@ -89,7 +89,7 @@ public: typedef void (*ConnectedHandler)(void *aContext, bool aConnected); /** - * This function pointer is called when data is received from the DTLS session. + * Pointer is called when data is received from the DTLS session. * * @param[in] aContext A pointer to application-specific context. * @param[in] aBuf A pointer to the received data buffer. @@ -99,7 +99,7 @@ public: typedef void (*ReceiveHandler)(void *aContext, uint8_t *aBuf, uint16_t aLength); /** - * This function pointer is called when secure CoAP server want to send encrypted message. + * Pointer is called when secure CoAP server want to send encrypted message. * * @param[in] aContext A pointer to arbitrary context information. * @param[in] aMessage A reference to the message to send. @@ -109,7 +109,7 @@ public: typedef Error (*TransportCallback)(void *aContext, ot::Message &aMessage, const Ip6::MessageInfo &aMessageInfo); /** - * This method opens the DTLS socket. + * Opens the DTLS socket. * * @param[in] aReceiveHandler A pointer to a function that is called to receive DTLS payload. * @param[in] aConnectedHandler A pointer to a function that is called when connected or disconnected. @@ -122,7 +122,7 @@ public: Error Open(ReceiveHandler aReceiveHandler, ConnectedHandler aConnectedHandler, void *aContext); /** - * This method binds this DTLS to a UDP port. + * Binds this DTLS to a UDP port. * * @param[in] aPort The port to bind. * @@ -134,7 +134,7 @@ public: Error Bind(uint16_t aPort); /** - * This method gets the UDP port of this session. + * Gets the UDP port of this session. * * @returns UDP port number. * @@ -142,7 +142,7 @@ public: uint16_t GetUdpPort(void) const; /** - * This method binds this DTLS with a transport callback. + * Binds this DTLS with a transport callback. * * @param[in] aCallback A pointer to a function for sending messages. * @param[in] aContext A pointer to arbitrary context information. @@ -155,7 +155,7 @@ public: Error Bind(TransportCallback aCallback, void *aContext); /** - * This method establishes a DTLS session. + * Establishes a DTLS session. * * For CoAP Secure API do first: * Set X509 Pk and Cert for use DTLS mode ECDHE ECDSA with AES 128 CCM 8 or @@ -170,7 +170,7 @@ public: Error Connect(const Ip6::SockAddr &aSockAddr); /** - * This method indicates whether or not the DTLS session is active. + * Indicates whether or not the DTLS session is active. * * @retval TRUE If DTLS session is active. * @retval FALSE If DTLS session is not active. @@ -179,7 +179,7 @@ public: bool IsConnectionActive(void) const { return mState >= kStateConnecting; } /** - * This method indicates whether or not the DTLS session is connected. + * Indicates whether or not the DTLS session is connected. * * @retval TRUE The DTLS session is connected. * @retval FALSE The DTLS session is not connected. @@ -188,19 +188,19 @@ public: bool IsConnected(void) const { return mState == kStateConnected; } /** - * This method disconnects the DTLS session. + * Disconnects the DTLS session. * */ void Disconnect(void); /** - * This method closes the DTLS socket. + * Closes the DTLS socket. * */ void Close(void); /** - * This method sets the PSK. + * Sets the PSK. * * @param[in] aPsk A pointer to the PSK. * @@ -213,7 +213,7 @@ public: #if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE #ifdef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED /** - * This method sets the Pre-Shared Key (PSK) for DTLS sessions- + * Sets the Pre-Shared Key (PSK) for DTLS sessions- * identified by a PSK. * * DTLS mode "PSK with AES 128 CCM 8" for Application CoAPS. @@ -232,7 +232,7 @@ public: #ifdef MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED /** - * This method sets a reference to the own x509 certificate with corresponding private key. + * Sets a reference to the own x509 certificate with corresponding private key. * * DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS. * @@ -248,7 +248,7 @@ public: uint32_t aPrivateKeyLength); /** - * This method sets the trusted top level CAs. It is needed for validate the + * Sets the trusted top level CAs. It is needed for validate the * certificate of the peer. * * DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS. @@ -262,7 +262,7 @@ public: #if defined(MBEDTLS_BASE64_C) && defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE) /** - * This method returns the peer x509 certificate base64 encoded. + * Returns the peer x509 certificate base64 encoded. * * DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS. * @@ -279,7 +279,7 @@ public: #endif // defined(MBEDTLS_BASE64_C) && defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE) /** - * This method set the authentication mode for a dtls connection. + * Set the authentication mode for a dtls connection. * * Disable or enable the verification of peer certificate. * Must called before start. @@ -292,7 +292,7 @@ public: #ifdef MBEDTLS_SSL_SRV_C /** - * This method sets the Client ID used for generating the Hello Cookie. + * Sets the Client ID used for generating the Hello Cookie. * * @param[in] aClientId A pointer to the Client ID. * @param[in] aLength Number of bytes in the Client ID. @@ -304,7 +304,7 @@ public: #endif /** - * This method sends data within the DTLS session. + * Sends data within the DTLS session. * * @param[in] aMessage A message to send via DTLS. * @param[in] aLength Number of bytes in the data buffer. @@ -316,7 +316,7 @@ public: Error Send(Message &aMessage, uint16_t aLength); /** - * This method provides a received DTLS message to the DTLS object. + * Provides a received DTLS message to the DTLS object. * * @param[in] aMessage A reference to the message. * @@ -324,7 +324,7 @@ public: void Receive(Message &aMessage); /** - * This method sets the default message sub-type that will be used for all messages without defined + * Sets the default message sub-type that will be used for all messages without defined * sub-type. * * @param[in] aMessageSubType The default message sub-type. @@ -333,7 +333,7 @@ public: void SetDefaultMessageSubType(Message::SubType aMessageSubType) { mMessageDefaultSubType = aMessageSubType; } /** - * This method returns the DTLS session's peer address. + * Returns the DTLS session's peer address. * * @return DTLS session's message info. * diff --git a/src/core/meshcop/energy_scan_client.hpp b/src/core/meshcop/energy_scan_client.hpp index 97d9873bb..8e40060b1 100644 --- a/src/core/meshcop/energy_scan_client.hpp +++ b/src/core/meshcop/energy_scan_client.hpp @@ -50,7 +50,7 @@ namespace ot { /** - * This class implements handling PANID Query Requests. + * Implements handling PANID Query Requests. * */ class EnergyScanClient : public InstanceLocator @@ -59,13 +59,13 @@ class EnergyScanClient : public InstanceLocator public: /** - * This constructor initializes the object. + * Initializes the object. * */ explicit EnergyScanClient(Instance &aInstance); /** - * This method sends an Energy Scan Query message. + * Sends an Energy Scan Query message. * * @param[in] aChannelMask The channel mask value. * @param[in] aCount The number of energy measurements per channel. diff --git a/src/core/meshcop/extended_panid.hpp b/src/core/meshcop/extended_panid.hpp index 9bf5cf91a..2ea04aace 100644 --- a/src/core/meshcop/extended_panid.hpp +++ b/src/core/meshcop/extended_panid.hpp @@ -50,7 +50,7 @@ namespace ot { namespace MeshCoP { /** - * This class represents an Extended PAN Identifier. + * Represents an Extended PAN Identifier. * */ OT_TOOL_PACKED_BEGIN @@ -60,13 +60,13 @@ public: static constexpr uint16_t kInfoStringSize = 17; ///< Max chars for the info string (`ToString()`). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method converts an address to a string. + * Converts an address to a string. * * @returns An `InfoString` containing the string representation of the Extended PAN Identifier. * @@ -87,7 +87,7 @@ public: explicit ExtendedPanIdManager(Instance &aInstance); /** - * This method returns the Extended PAN Identifier. + * Returns the Extended PAN Identifier. * * @returns The Extended PAN Identifier. * @@ -95,7 +95,7 @@ public: const ExtendedPanId &GetExtPanId(void) const { return mExtendedPanId; } /** - * This method sets the Extended PAN Identifier. + * Sets the Extended PAN Identifier. * * @param[in] aExtendedPanId The Extended PAN Identifier. * diff --git a/src/core/meshcop/joiner.hpp b/src/core/meshcop/joiner.hpp index 81e4b2bbb..1b42c6ad3 100644 --- a/src/core/meshcop/joiner.hpp +++ b/src/core/meshcop/joiner.hpp @@ -65,7 +65,7 @@ class Joiner : public InstanceLocator, private NonCopyable public: /** - * This enumeration type defines the Joiner State. + * Type defines the Joiner State. * */ enum State : uint8_t @@ -79,7 +79,7 @@ public: }; /** - * This constructor initializes the Joiner object. + * Initializes the Joiner object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -87,7 +87,7 @@ public: explicit Joiner(Instance &aInstance); /** - * This method starts the Joiner service. + * Starts the Joiner service. * * @param[in] aPskd A pointer to the PSKd. * @param[in] aProvisioningUrl A pointer to the Provisioning URL (may be `nullptr`). @@ -113,13 +113,13 @@ public: void *aContext); /** - * This method stops the Joiner service. + * Stops the Joiner service. * */ void Stop(void); /** - * This method gets the Joiner State. + * Gets the Joiner State. * * @returns The Joiner state (see `State`). * @@ -127,7 +127,7 @@ public: State GetState(void) const { return mState; } /** - * This method retrieves the Joiner ID. + * Retrieves the Joiner ID. * * @returns The Joiner ID. * @@ -135,7 +135,7 @@ public: const Mac::ExtAddress &GetId(void) const { return mId; } /** - * This method gets the Jointer Discerner. + * Gets the Jointer Discerner. * * @returns A pointer to the current Joiner Discerner or `nullptr` if none is set. * @@ -143,7 +143,7 @@ public: const JoinerDiscerner *GetDiscerner(void) const; /** - * This method sets the Joiner Discerner. + * Sets the Joiner Discerner. * * The Joiner Discerner is used to calculate the Joiner ID used during commissioning/joining process. * @@ -161,7 +161,7 @@ public: Error SetDiscerner(const JoinerDiscerner &aDiscerner); /** - * This method clears any previously set Joiner Discerner. + * Clears any previously set Joiner Discerner. * * When cleared, Joiner ID is derived as first 64 bits of SHA-256 of factory-assigned IEEE EUI-64. * @@ -172,7 +172,7 @@ public: Error ClearDiscerner(void); /** - * This method converts a given Joiner state to its human-readable string representation. + * Converts a given Joiner state to its human-readable string representation. * * @param[in] aState The Joiner state to convert. * diff --git a/src/core/meshcop/joiner_router.hpp b/src/core/meshcop/joiner_router.hpp index 4831c2f2b..d17c64290 100644 --- a/src/core/meshcop/joiner_router.hpp +++ b/src/core/meshcop/joiner_router.hpp @@ -61,7 +61,7 @@ class JoinerRouter : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the Joiner Router object. + * Initializes the Joiner Router object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -69,7 +69,7 @@ public: explicit JoinerRouter(Instance &aInstance); /** - * This method returns the Joiner UDP Port. + * Returns the Joiner UDP Port. * * @returns The Joiner UDP Port number . * @@ -77,7 +77,7 @@ public: uint16_t GetJoinerUdpPort(void); /** - * This method sets the Joiner UDP Port. + * Sets the Joiner UDP Port. * * @param[in] aJoinerUdpPort The Joiner UDP Port number. * diff --git a/src/core/meshcop/meshcop.hpp b/src/core/meshcop/meshcop.hpp index a1485dbca..7bf6f7806 100644 --- a/src/core/meshcop/meshcop.hpp +++ b/src/core/meshcop/meshcop.hpp @@ -60,7 +60,7 @@ class ThreadNetif; namespace MeshCoP { /** - * This type represents a Joiner PSKd. + * Represents a Joiner PSKd. * */ class JoinerPskd : public otJoinerPskd, public Clearable, public Unequatable @@ -70,7 +70,7 @@ public: static constexpr uint8_t kMaxLength = OT_JOINER_MAX_PSKD_LENGTH; ///< Max PSKd string length (excludes null char) /** - * This method indicates whether the PSKd if well-formed and valid. + * Indicates whether the PSKd if well-formed and valid. * * Per Thread specification, a Joining Device Credential is encoded as uppercase alphanumeric characters * (base32-thread: 0-9, A-Z excluding I, O, Q, and Z for readability) with a minimum length of 6 such characters @@ -82,7 +82,7 @@ public: bool IsValid(void) const { return IsPskdValid(m8); } /** - * This method sets the joiner PSKd from a given C string. + * Sets the joiner PSKd from a given C string. * * @param[in] aPskdString A pointer to the PSKd C string array. * @@ -93,9 +93,9 @@ public: Error SetFrom(const char *aPskdString); /** - * This method gets the PSKd as a null terminated C string. + * Gets the PSKd as a null terminated C string. * - * This method must be used after the PSKd is validated, otherwise its behavior is undefined. + * Must be used after the PSKd is validated, otherwise its behavior is undefined. * * @returns The PSKd as a C string. * @@ -103,9 +103,9 @@ public: const char *GetAsCString(void) const { return m8; } /** - * This method gets the PSKd string length. + * Gets the PSKd string length. * - * This method must be used after the PSKd is validated, otherwise its behavior is undefined. + * Must be used after the PSKd is validated, otherwise its behavior is undefined. * * @returns The PSKd string length. * @@ -113,7 +113,7 @@ public: uint8_t GetLength(void) const { return static_cast(StringLength(m8, kMaxLength + 1)); } /** - * This method overloads operator `==` to evaluate whether or not two PSKds are equal. + * Overloads operator `==` to evaluate whether or not two PSKds are equal. * * @param[in] aOther The other PSKd to compare with. * @@ -124,7 +124,7 @@ public: bool operator==(const JoinerPskd &aOther) const; /** - * This static method indicates whether a given PSKd string if well-formed and valid. + * Indicates whether a given PSKd string if well-formed and valid. * * @param[in] aPskdString A pointer to a PSKd string array. * @@ -137,7 +137,7 @@ public: }; /** - * This type represents a Joiner Discerner. + * Represents a Joiner Discerner. * */ class JoinerDiscerner : public otJoinerDiscerner, public Unequatable @@ -150,19 +150,19 @@ public: static constexpr uint16_t kInfoStringSize = 45; ///< Size of `InfoString` to use with `ToString() /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method clears the Joiner Discerner. + * Clears the Joiner Discerner. * */ void Clear(void) { mLength = 0; } /** - * This method indicates whether the Joiner Discerner is empty (no value set). + * Indicates whether the Joiner Discerner is empty (no value set). * * @returns TRUE if empty, FALSE otherwise. * @@ -170,7 +170,7 @@ public: bool IsEmpty(void) const { return mLength == 0; } /** - * This method gets the Joiner Discerner's value. + * Gets the Joiner Discerner's value. * * @returns The Joiner Discerner value. * @@ -178,7 +178,7 @@ public: uint64_t GetValue(void) const { return mValue; } /** - * This method gets the Joiner Discerner's length (in bits). + * Gets the Joiner Discerner's length (in bits). * * @return The Joiner Discerner length. * @@ -186,7 +186,7 @@ public: uint8_t GetLength(void) const { return mLength; } /** - * This method indicates whether the Joiner Discerner is valid (i.e. it not empty and its length is within + * Indicates whether the Joiner Discerner is valid (i.e. it not empty and its length is within * valid range). * * @returns TRUE if Joiner Discerner is valid, FALSE otherwise. @@ -195,7 +195,7 @@ public: bool IsValid(void) const { return (0 < mLength) && (mLength <= kMaxLength); } /** - * This method generates a Joiner ID from the Discerner. + * Generates a Joiner ID from the Discerner. * * @param[out] aJoinerId A reference to `Mac::ExtAddress` to output the generated Joiner ID. * @@ -203,7 +203,7 @@ public: void GenerateJoinerId(Mac::ExtAddress &aJoinerId) const; /** - * This method indicates whether a given Joiner ID matches the Discerner. + * Indicates whether a given Joiner ID matches the Discerner. * * @param[in] aJoinerId A Joiner ID to match with the Discerner. * @@ -213,7 +213,7 @@ public: bool Matches(const Mac::ExtAddress &aJoinerId) const; /** - * This method overloads operator `==` to evaluate whether or not two Joiner Discerner instances are equal. + * Overloads operator `==` to evaluate whether or not two Joiner Discerner instances are equal. * * @param[in] aOther The other Joiner Discerner to compare with. * @@ -224,7 +224,7 @@ public: bool operator==(const JoinerDiscerner &aOther) const; /** - * This method converts the Joiner Discerner to a string. + * Converts the Joiner Discerner to a string. * * @returns An `InfoString` representation of Joiner Discerner. * @@ -237,7 +237,7 @@ private: }; /** - * This type represents Steering Data (bloom filter). + * Represents Steering Data (bloom filter). * */ class SteeringData : public otSteeringData @@ -246,7 +246,7 @@ public: static constexpr uint8_t kMaxLength = OT_STEERING_DATA_MAX_LENGTH; ///< Maximum Steering Data length (in bytes). /** - * This structure represents the hash bit index values for the bloom filter calculated from a Joiner ID. + * Represents the hash bit index values for the bloom filter calculated from a Joiner ID. * * The first hash bit index is derived using CRC16-CCITT and second one using CRC16-ANSI. * @@ -259,7 +259,7 @@ public: }; /** - * This method initializes the Steering Data and clears the bloom filter. + * Initializes the Steering Data and clears the bloom filter. * * @param[in] aLength The Steering Data length (in bytes) - MUST be smaller than or equal to `kMaxLength`. * @@ -267,7 +267,7 @@ public: void Init(uint8_t aLength = kMaxLength); /** - * This method clears the bloom filter (all bits are cleared and no Joiner Id is accepted).. + * Clears the bloom filter (all bits are cleared and no Joiner Id is accepted).. * * The Steering Data length (bloom filter length) is set to one byte with all bits cleared. * @@ -275,7 +275,7 @@ public: void Clear(void) { Init(1); } /** - * This method sets the bloom filter to permit all Joiner IDs. + * Sets the bloom filter to permit all Joiner IDs. * * To permit all Joiner IDs, The Steering Data length (bloom filter length) is set to one byte with all bits set. * @@ -283,7 +283,7 @@ public: void SetToPermitAllJoiners(void); /** - * This method returns the Steering Data length (in bytes). + * Returns the Steering Data length (in bytes). * * @returns The Steering Data length (in bytes). * @@ -291,7 +291,7 @@ public: uint8_t GetLength(void) const { return mLength; } /** - * This method gets the Steering Data buffer (bloom filter). + * Gets the Steering Data buffer (bloom filter). * * @returns A pointer to the Steering Data buffer. * @@ -299,7 +299,7 @@ public: const uint8_t *GetData(void) const { return m8; } /** - * This method gets the Steering Data buffer (bloom filter). + * Gets the Steering Data buffer (bloom filter). * * @returns A pointer to the Steering Data buffer. * @@ -307,7 +307,7 @@ public: uint8_t *GetData(void) { return m8; } /** - * This method updates the bloom filter adding the given Joiner ID. + * Updates the bloom filter adding the given Joiner ID. * * @param[in] aJoinerId The Joiner ID to add to bloom filter. * @@ -315,7 +315,7 @@ public: void UpdateBloomFilter(const Mac::ExtAddress &aJoinerId); /** - * This method updates the bloom filter adding a given Joiner Discerner. + * Updates the bloom filter adding a given Joiner Discerner. * * @param[in] aDiscerner The Joiner Discerner to add to bloom filter. * @@ -323,7 +323,7 @@ public: void UpdateBloomFilter(const JoinerDiscerner &aDiscerner); /** - * This method indicates whether the bloom filter is empty (all the bits are cleared). + * Indicates whether the bloom filter is empty (all the bits are cleared). * * @returns TRUE if the bloom filter is empty, FALSE otherwise. * @@ -331,7 +331,7 @@ public: bool IsEmpty(void) const { return DoesAllMatch(0); } /** - * This method indicates whether the bloom filter permits all Joiner IDs (all the bits are set). + * Indicates whether the bloom filter permits all Joiner IDs (all the bits are set). * * @returns TRUE if the bloom filter permits all Joiners IDs, FALSE otherwise. * @@ -339,7 +339,7 @@ public: bool PermitsAllJoiners(void) const { return (mLength > 0) && DoesAllMatch(kPermitAll); } /** - * This method indicates whether the bloom filter contains a given Joiner ID. + * Indicates whether the bloom filter contains a given Joiner ID. * * @param[in] aJoinerId A Joiner ID. * @@ -349,7 +349,7 @@ public: bool Contains(const Mac::ExtAddress &aJoinerId) const; /** - * This method indicates whether the bloom filter contains a given Joiner Discerner. + * Indicates whether the bloom filter contains a given Joiner Discerner. * * @param[in] aDiscerner A Joiner Discerner. * @@ -359,7 +359,7 @@ public: bool Contains(const JoinerDiscerner &aDiscerner) const; /** - * This method indicates whether the bloom filter contains the hash bit indexes (derived from a Joiner ID). + * Indicates whether the bloom filter contains the hash bit indexes (derived from a Joiner ID). * * @param[in] aIndexes A hash bit index structure (derived from a Joiner ID). * @@ -369,7 +369,7 @@ public: bool Contains(const HashBitIndexes &aIndexes) const; /** - * This static method calculates the bloom filter hash bit indexes from a given Joiner ID. + * Calculates the bloom filter hash bit indexes from a given Joiner ID. * * The first hash bit index is derived using CRC16-CCITT and second one using CRC16-ANSI. * @@ -380,7 +380,7 @@ public: static void CalculateHashBitIndexes(const Mac::ExtAddress &aJoinerId, HashBitIndexes &aIndexes); /** - * This static method calculates the bloom filter hash bit indexes from a given Joiner Discerner. + * Calculates the bloom filter hash bit indexes from a given Joiner Discerner. * * The first hash bit index is derived using CRC16-CCITT and second one using CRC16-ANSI. * @@ -407,7 +407,7 @@ private: }; /** - * This function generates PSKc. + * Generates PSKc. * * PSKc is used to establish the Commissioner Session. * @@ -426,7 +426,7 @@ Error GeneratePskc(const char *aPassPhrase, Pskc &aPskc); /** - * This function computes the Joiner ID from a factory-assigned IEEE EUI-64. + * Computes the Joiner ID from a factory-assigned IEEE EUI-64. * * @param[in] aEui64 The factory-assigned IEEE EUI-64. * @param[out] aJoinerId The Joiner ID. @@ -435,7 +435,7 @@ Error GeneratePskc(const char *aPassPhrase, void ComputeJoinerId(const Mac::ExtAddress &aEui64, Mac::ExtAddress &aJoinerId); /** - * This function gets the border agent RLOC. + * Gets the border agent RLOC. * * @param[in] aNetIf A reference to the thread interface. * @param[out] aRloc Border agent RLOC. @@ -448,7 +448,7 @@ Error GetBorderAgentRloc(ThreadNetif &aNetIf, uint16_t &aRloc); #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_WARN) /** - * This function emits a log message indicating an error during a MeshCoP action. + * Emits a log message indicating an error during a MeshCoP action. * * Note that log message is emitted only if there is an error, i.e. @p aError is not `kErrorNone`. The log * message will have the format "Failed to {aActionText} : {ErrorString}". diff --git a/src/core/meshcop/meshcop_leader.hpp b/src/core/meshcop/meshcop_leader.hpp index fa2a288d7..7a78ff9f2 100644 --- a/src/core/meshcop/meshcop_leader.hpp +++ b/src/core/meshcop/meshcop_leader.hpp @@ -70,7 +70,7 @@ class Leader : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the Leader object. + * Initializes the Leader object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -78,7 +78,7 @@ public: explicit Leader(Instance &aInstance); /** - * This method sends a MGMT_DATASET_CHANGED message to commissioner. + * Sends a MGMT_DATASET_CHANGED message to commissioner. * * @param[in] aAddress The IPv6 address of destination. * @@ -86,7 +86,7 @@ public: void SendDatasetChanged(const Ip6::Address &aAddress); /** - * This method sets minimal delay timer. + * Sets minimal delay timer. * * @param[in] aDelayTimerMinimal The value of minimal delay timer (in ms). * @@ -97,7 +97,7 @@ public: Error SetDelayTimerMinimal(uint32_t aDelayTimerMinimal); /** - * This method gets minimal delay timer. + * Gets minimal delay timer. * * @retval the minimal delay timer (in ms). * @@ -105,7 +105,7 @@ public: uint32_t GetDelayTimerMinimal(void) const; /** - * This method sets empty Commissioner Data TLV in the Thread Network Data. + * Sets empty Commissioner Data TLV in the Thread Network Data. * */ void SetEmptyCommissionerData(void); diff --git a/src/core/meshcop/meshcop_tlvs.hpp b/src/core/meshcop/meshcop_tlvs.hpp index 1cd275505..0b04a4ff0 100644 --- a/src/core/meshcop/meshcop_tlvs.hpp +++ b/src/core/meshcop/meshcop_tlvs.hpp @@ -65,7 +65,7 @@ using ot::Encoding::BigEndian::ReadUint24; using ot::Encoding::BigEndian::WriteUint24; /** - * This class implements MeshCoP TLV generation and parsing. + * Implements MeshCoP TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -132,7 +132,7 @@ public: static constexpr uint8_t kMaxVendorDataLength = 64; ///< Max length of Vendor Data TLV. /** - * This method returns the Type value. + * Returns the Type value. * * @returns The Type value. * @@ -140,7 +140,7 @@ public: Type GetType(void) const { return static_cast(ot::Tlv::GetType()); } /** - * This method sets the Type value. + * Sets the Type value. * * @param[in] aType The Type value. * @@ -148,7 +148,7 @@ public: void SetType(Type aType) { ot::Tlv::SetType(static_cast(aType)); } /** - * This method returns a pointer to the next TLV. + * Returns a pointer to the next TLV. * * @returns A pointer to the next TLV. * @@ -156,7 +156,7 @@ public: Tlv *GetNext(void) { return As(ot::Tlv::GetNext()); } /** - * This method returns a pointer to the next TLV. + * Returns a pointer to the next TLV. * * @returns A pointer to the next TLV. * @@ -164,7 +164,7 @@ public: const Tlv *GetNext(void) const { return As(ot::Tlv::GetNext()); } /** - * This static method reads the requested TLV out of @p aMessage. + * Reads the requested TLV out of @p aMessage. * * @param[in] aMessage A reference to the message. * @param[in] aType The Type value to search for. @@ -181,9 +181,9 @@ public: } /** - * This static method reads the requested TLV out of @p aMessage. + * Reads the requested TLV out of @p aMessage. * - * This method can be used independent of whether the read TLV (from message) is an Extended TLV or not. + * Can be used independent of whether the read TLV (from message) is an Extended TLV or not. * * @tparam TlvType The TlvType to search for (must be a sub-class of `Tlv`). * @@ -201,7 +201,7 @@ public: } /** - * This static method indicates whether a TLV appears to be well-formed. + * Indicates whether a TLV appears to be well-formed. * * @param[in] aTlv A reference to the TLV. * @@ -211,7 +211,7 @@ public: static bool IsValid(const Tlv &aTlv); /** - * This static method searches in a given sequence of TLVs to find the first TLV with a given template Type. + * Searches in a given sequence of TLVs to find the first TLV with a given template Type. * * @param[in] aTlvsStart A pointer to the start of the sequence of TLVs to search within. * @param[in] aTlvsLength The length (number of bytes) in TLV sequence. @@ -226,7 +226,7 @@ public: } /** - * This static method searches in a given sequence of TLVs to find the first TLV with a given template Type. + * Searches in a given sequence of TLVs to find the first TLV with a given template Type. * * @param[in] aTlvsStart A pointer to the start of the sequence of TLVs to search within. * @param[in] aTlvsLength The length (number of bytes) in TLV sequence. @@ -270,7 +270,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements extended MeshCoP TLV generation and parsing. + * Implements extended MeshCoP TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -278,7 +278,7 @@ class ExtendedTlv : public ot::ExtendedTlv { public: /** - * This method returns the Type value. + * Returns the Type value. * * @returns The Type value. * @@ -286,7 +286,7 @@ public: MeshCoP::Tlv::Type GetType(void) const { return static_cast(ot::ExtendedTlv::GetType()); } /** - * This method sets the Type value. + * Sets the Type value. * * @param[in] aType The Type value. * @@ -295,55 +295,55 @@ public: } OT_TOOL_PACKED_END; /** - * This class defines Commissioner UDP Port TLV constants and types. + * Defines Commissioner UDP Port TLV constants and types. * */ typedef UintTlvInfo CommissionerUdpPortTlv; /** - * This class defines IPv6 Address TLV constants and types. + * Defines IPv6 Address TLV constants and types. * */ typedef SimpleTlvInfo Ip6AddressTlv; /** - * This class defines Joiner IID TLV constants and types. + * Defines Joiner IID TLV constants and types. * */ typedef SimpleTlvInfo JoinerIidTlv; /** - * This class defines Joiner Router Locator TLV constants and types. + * Defines Joiner Router Locator TLV constants and types. * */ typedef UintTlvInfo JoinerRouterLocatorTlv; /** - * This class defines Joiner Router KEK TLV constants and types. + * Defines Joiner Router KEK TLV constants and types. * */ typedef SimpleTlvInfo JoinerRouterKekTlv; /** - * This class defines Count TLV constants and types. + * Defines Count TLV constants and types. * */ typedef UintTlvInfo CountTlv; /** - * This class defines Period TLV constants and types. + * Defines Period TLV constants and types. * */ typedef UintTlvInfo PeriodTlv; /** - * This class defines Scan Duration TLV constants and types. + * Defines Scan Duration TLV constants and types. * */ typedef UintTlvInfo ScanDurationTlv; /** - * This class implements Channel TLV generation and parsing. + * Implements Channel TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -351,7 +351,7 @@ class ChannelTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -361,7 +361,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -370,7 +370,7 @@ public: bool IsValid(void) const; /** - * This method returns the ChannelPage value. + * Returns the ChannelPage value. * * @returns The ChannelPage value. * @@ -378,7 +378,7 @@ public: uint8_t GetChannelPage(void) const { return mChannelPage; } /** - * This method sets the ChannelPage value. + * Sets the ChannelPage value. * * @param[in] aChannelPage The ChannelPage value. * @@ -386,7 +386,7 @@ public: void SetChannelPage(uint8_t aChannelPage) { mChannelPage = aChannelPage; } /** - * This method returns the Channel value. + * Returns the Channel value. * * @returns The Channel value. * @@ -394,7 +394,7 @@ public: uint16_t GetChannel(void) const { return HostSwap16(mChannel); } /** - * This method sets the Channel value. + * Sets the Channel value. * Note: This method also sets the channel page according to the channel value. * * @param[in] aChannel The Channel value. @@ -408,7 +408,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements PAN ID TLV generation and parsing. + * Implements PAN ID TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -416,7 +416,7 @@ class PanIdTlv : public Tlv, public UintTlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -426,7 +426,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -435,7 +435,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the PAN ID value. + * Returns the PAN ID value. * * @returns The PAN ID value. * @@ -443,7 +443,7 @@ public: uint16_t GetPanId(void) const { return HostSwap16(mPanId); } /** - * This method sets the PAN ID value. + * Sets the PAN ID value. * * @param[in] aPanId The PAN ID value. * @@ -455,7 +455,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Extended PAN ID TLV generation and parsing. + * Implements Extended PAN ID TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -463,7 +463,7 @@ class ExtendedPanIdTlv : public Tlv, public SimpleTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Extended PAN ID value. + * Returns the Extended PAN ID value. * * @returns The Extended PAN ID value. * @@ -490,7 +490,7 @@ public: const ExtendedPanId &GetExtendedPanId(void) const { return mExtendedPanId; } /** - * This method sets the Extended PAN ID value. + * Sets the Extended PAN ID value. * * @param[in] aExtendedPanId An Extended PAN ID value. * @@ -502,7 +502,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Network Name TLV generation and parsing. + * Implements Network Name TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -510,7 +510,7 @@ class NetworkNameTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -520,7 +520,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -529,7 +529,7 @@ public: bool IsValid(void) const; /** - * This method gets the Network Name value. + * Gets the Network Name value. * * @returns The Network Name value (as `NameData`). * @@ -537,7 +537,7 @@ public: NameData GetNetworkName(void) const; /** - * This method sets the Network Name value. + * Sets the Network Name value. * * @param[in] aNameData A Network Name value (as `NameData`). * @@ -549,7 +549,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements PSKc TLV generation and parsing. + * Implements PSKc TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -557,7 +557,7 @@ class PskcTlv : public Tlv, public SimpleTlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -567,7 +567,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -576,7 +576,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the PSKc value. + * Returns the PSKc value. * * @returns The PSKc value. * @@ -584,7 +584,7 @@ public: const Pskc &GetPskc(void) const { return mPskc; } /** - * This method sets the PSKc value. + * Sets the PSKc value. * * @param[in] aPskc A pointer to the PSKc value. * @@ -596,7 +596,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Network Network Key TLV generation and parsing. + * Implements Network Network Key TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -604,7 +604,7 @@ class NetworkKeyTlv : public Tlv, public SimpleTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Network Network Key value. + * Returns the Network Network Key value. * * @returns The Network Network Key value. * @@ -631,7 +631,7 @@ public: const NetworkKey &GetNetworkKey(void) const { return mNetworkKey; } /** - * This method sets the Network Network Key value. + * Sets the Network Network Key value. * * @param[in] aNetworkKey The Network Network Key. * @@ -643,7 +643,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Network Key Sequence TLV generation and parsing. + * Implements Network Key Sequence TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -651,7 +651,7 @@ class NetworkKeySequenceTlv : public Tlv, public UintTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Network Key Sequence value. + * Returns the Network Key Sequence value. * * @returns The Network Key Sequence value. * @@ -678,7 +678,7 @@ public: uint32_t GetNetworkKeySequence(void) const { return HostSwap32(mNetworkKeySequence); } /** - * This method sets the Network Key Sequence value. + * Sets the Network Key Sequence value. * * @param[in] aNetworkKeySequence The Network Key Sequence value. * @@ -690,7 +690,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Mesh Local Prefix TLV generation and parsing. + * Implements Mesh Local Prefix TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -698,7 +698,7 @@ class MeshLocalPrefixTlv : public Tlv, public SimpleTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the size (in bytes) of the Mesh Local Prefix field. + * Returns the size (in bytes) of the Mesh Local Prefix field. * * @returns The size (in bytes) of the Mesh Local Prefix field (8 bytes). * @@ -725,7 +725,7 @@ public: uint8_t GetMeshLocalPrefixLength(void) const { return sizeof(mMeshLocalPrefix); } /** - * This method returns the Mesh Local Prefix value. + * Returns the Mesh Local Prefix value. * * @returns The Mesh Local Prefix value. * @@ -733,7 +733,7 @@ public: const Ip6::NetworkPrefix &GetMeshLocalPrefix(void) const { return mMeshLocalPrefix; } /** - * This method sets the Mesh Local Prefix value. + * Sets the Mesh Local Prefix value. * * @param[in] aMeshLocalPrefix A pointer to the Mesh Local Prefix value. * @@ -747,7 +747,7 @@ private: class SteeringData; /** - * This class implements Steering Data TLV generation and parsing. + * Implements Steering Data TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -755,7 +755,7 @@ class SteeringDataTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -766,7 +766,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -775,7 +775,7 @@ public: bool IsValid(void) const { return GetLength() > 0; } /** - * This method returns the Steering Data length. + * Returns the Steering Data length. * * @returns The Steering Data length. * @@ -786,13 +786,13 @@ public: } /** - * This method sets all bits in the Bloom Filter to zero. + * Sets all bits in the Bloom Filter to zero. * */ void Clear(void) { memset(mSteeringData, 0, GetSteeringDataLength()); } /** - * This method copies the Steering Data from the TLV into a given `SteeringData` variable. + * Copies the Steering Data from the TLV into a given `SteeringData` variable. * * @param[out] aSteeringData A reference to a `SteeringData` to copy into. * @@ -804,7 +804,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Border Agent Locator TLV generation and parsing. + * Implements Border Agent Locator TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -812,7 +812,7 @@ class BorderAgentLocatorTlv : public Tlv, public UintTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Border Agent Locator value. + * Returns the Border Agent Locator value. * * @returns The Border Agent Locator value. * @@ -839,7 +839,7 @@ public: uint16_t GetBorderAgentLocator(void) const { return HostSwap16(mLocator); } /** - * This method sets the Border Agent Locator value. + * Sets the Border Agent Locator value. * * @param[in] aLocator The Border Agent Locator value. * @@ -851,7 +851,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements the Commissioner ID TLV generation and parsing. + * Implements the Commissioner ID TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -861,7 +861,7 @@ public: static constexpr uint8_t kMaxLength = 64; ///< maximum length (bytes) /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -871,7 +871,7 @@ public: } /** - * This method returns the Commissioner ID length. + * Returns the Commissioner ID length. * * @returns The Commissioner ID length. * @@ -882,7 +882,7 @@ public: } /** - * This method returns the Commissioner ID value. + * Returns the Commissioner ID value. * * @returns The Commissioner ID value. * @@ -890,7 +890,7 @@ public: const char *GetCommissionerId(void) const { return mCommissionerId; } /** - * This method sets the Commissioner ID value. + * Sets the Commissioner ID value. * * @param[in] aCommissionerId A pointer to the Commissioner ID value. * @@ -907,7 +907,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Commissioner Session ID TLV generation and parsing. + * Implements Commissioner Session ID TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -915,7 +915,7 @@ class CommissionerSessionIdTlv : public Tlv, public UintTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Commissioner Session ID value. + * Returns the Commissioner Session ID value. * * @returns The Commissioner Session ID value. * @@ -942,7 +942,7 @@ public: uint16_t GetCommissionerSessionId(void) const { return HostSwap16(mSessionId); } /** - * This method sets the Commissioner Session ID value. + * Sets the Commissioner Session ID value. * * @param[in] aSessionId The Commissioner Session ID value. * @@ -954,7 +954,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Security Policy TLV generation and parsing. + * Implements Security Policy TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -962,7 +962,7 @@ class SecurityPolicyTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -972,7 +972,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -981,7 +981,7 @@ public: bool IsValid(void) const; /** - * This method returns the Security Policy. + * Returns the Security Policy. * * @returns The Security Policy. * @@ -989,7 +989,7 @@ public: SecurityPolicy GetSecurityPolicy(void) const; /** - * This method sets the Security Policy. + * Sets the Security Policy. * * @param[in] aSecurityPolicy The Security Policy which will be set. * @@ -1013,7 +1013,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Active Timestamp TLV generation and parsing. + * Implements Active Timestamp TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1021,7 +1021,7 @@ class ActiveTimestampTlv : public Tlv, public SimpleTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method gets the timestamp. + * Gets the timestamp. * * @returns The timestamp. * @@ -1049,7 +1049,7 @@ public: const Timestamp &GetTimestamp(void) const { return mTimestamp; } /** - * This method returns a reference to the timestamp. + * Returns a reference to the timestamp. * * @returns A reference to the timestamp. * @@ -1057,7 +1057,7 @@ public: Timestamp &GetTimestamp(void) { return mTimestamp; } /** - * This method sets the timestamp. + * Sets the timestamp. * * @param[in] aTimestamp The new timestamp. * @@ -1069,7 +1069,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements State TLV generation and parsing. + * Implements State TLV generation and parsing. * */ class StateTlv : public UintTlvInfo @@ -1090,7 +1090,7 @@ public: }; /** - * This class implements Joiner UDP Port TLV generation and parsing. + * Implements Joiner UDP Port TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1098,7 +1098,7 @@ class JoinerUdpPortTlv : public Tlv, public UintTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the UDP Port value. + * Returns the UDP Port value. * * @returns The UDP Port value. * @@ -1125,7 +1125,7 @@ public: uint16_t GetUdpPort(void) const { return HostSwap16(mUdpPort); } /** - * This method sets the UDP Port value. + * Sets the UDP Port value. * * @param[in] aUdpPort The UDP Port value. * @@ -1137,7 +1137,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Pending Timestamp TLV generation and parsing. + * Implements Pending Timestamp TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1145,7 +1145,7 @@ class PendingTimestampTlv : public Tlv, public SimpleTlvInfo= sizeof(*this) - sizeof(Tlv); } /** - * This method gets the timestamp. + * Gets the timestamp. * * @returns The timestamp. * @@ -1173,7 +1173,7 @@ public: const Timestamp &GetTimestamp(void) const { return mTimestamp; } /** - * This method returns a reference to the timestamp. + * Returns a reference to the timestamp. * * @returns A reference to the timestamp. * @@ -1181,7 +1181,7 @@ public: Timestamp &GetTimestamp(void) { return mTimestamp; } /** - * This method sets the timestamp. + * Sets the timestamp. * * @param[in] aTimestamp The new timestamp. * @@ -1193,7 +1193,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Delay Timer TLV generation and parsing. + * Implements Delay Timer TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1201,7 +1201,7 @@ class DelayTimerTlv : public Tlv, public UintTlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1211,7 +1211,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1220,7 +1220,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Delay Timer value. + * Returns the Delay Timer value. * * @returns The Delay Timer value. * @@ -1228,7 +1228,7 @@ public: uint32_t GetDelayTimer(void) const { return HostSwap32(mDelayTimer); } /** - * This method sets the Delay Timer value. + * Sets the Delay Timer value. * * @param[in] aDelayTimer The Delay Timer value. * @@ -1257,7 +1257,7 @@ private: class ChannelMaskTlv; /** - * This class implements Channel Mask Entry generation and parsing. + * Implements Channel Mask Entry generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1265,7 +1265,7 @@ class ChannelMaskEntryBase { public: /** - * This method gets the ChannelPage value. + * Gets the ChannelPage value. * * @returns The ChannelPage value. * @@ -1273,7 +1273,7 @@ public: uint8_t GetChannelPage(void) const { return mChannelPage; } /** - * This method sets the ChannelPage value. + * Sets the ChannelPage value. * * @param[in] aChannelPage The ChannelPage value. * @@ -1281,7 +1281,7 @@ public: void SetChannelPage(uint8_t aChannelPage) { mChannelPage = aChannelPage; } /** - * This method gets the MaskLength value. + * Gets the MaskLength value. * * @returns The MaskLength value. * @@ -1289,7 +1289,7 @@ public: uint8_t GetMaskLength(void) const { return mMaskLength; } /** - * This method sets the MaskLength value. + * Sets the MaskLength value. * * @param[in] aMaskLength The MaskLength value. * @@ -1297,7 +1297,7 @@ public: void SetMaskLength(uint8_t aMaskLength) { mMaskLength = aMaskLength; } /** - * This method returns the total size of this Channel Mask Entry including the mask. + * Returns the total size of this Channel Mask Entry including the mask. * * @returns The total size of this entry (number of bytes). * @@ -1305,7 +1305,7 @@ public: uint16_t GetEntrySize(void) const { return sizeof(ChannelMaskEntryBase) + mMaskLength; } /** - * This method clears the bit corresponding to @p aChannel in ChannelMask. + * Clears the bit corresponding to @p aChannel in ChannelMask. * * @param[in] aChannel The channel in ChannelMask to clear. * @@ -1317,7 +1317,7 @@ public: } /** - * This method sets the bit corresponding to @p aChannel in ChannelMask. + * Sets the bit corresponding to @p aChannel in ChannelMask. * * @param[in] aChannel The channel in ChannelMask to set. * @@ -1329,7 +1329,7 @@ public: } /** - * This method indicates whether or not the bit corresponding to @p aChannel in ChannelMask is set. + * Indicates whether or not the bit corresponding to @p aChannel in ChannelMask is set. * * @param[in] aChannel The channel in ChannelMask to get. * @@ -1341,7 +1341,7 @@ public: } /** - * This method gets the next Channel Mask Entry in a Channel Mask TLV. + * Gets the next Channel Mask Entry in a Channel Mask TLV. * * @returns A pointer to next Channel Mask Entry. * @@ -1352,7 +1352,7 @@ public: } /** - * This method gets the next Channel Mask Entry in a Channel Mask TLV. + * Gets the next Channel Mask Entry in a Channel Mask TLV. * * @returns A pointer to next Channel Mask Entry. * @@ -1365,7 +1365,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Channel Mask Entry Page 0 generation and parsing. + * Implements Channel Mask Entry Page 0 generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1373,7 +1373,7 @@ class ChannelMaskEntry : public ChannelMaskEntryBase { public: /** - * This method initializes the entry. + * Initializes the entry. * */ void Init(void) @@ -1383,7 +1383,7 @@ public: } /** - * This method indicates whether or not the entry appears to be well-formed. + * Indicates whether or not the entry appears to be well-formed. * * @retval TRUE If the entry appears to be well-formed. * @retval FALSE If the entry does not appear to be well-formed. @@ -1392,7 +1392,7 @@ public: bool IsValid(void) const { return GetMaskLength() == sizeof(mMask); } /** - * This method returns the Channel Mask value as a `uint32_t` bit mask. + * Returns the Channel Mask value as a `uint32_t` bit mask. * * @returns The Channel Mask value. * @@ -1400,7 +1400,7 @@ public: uint32_t GetMask(void) const { return Encoding::Reverse32(HostSwap32(mMask)); } /** - * This method sets the Channel Mask value. + * Sets the Channel Mask value. * * @param[in] aMask The Channel Mask value. * @@ -1412,7 +1412,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Channel Mask TLV generation and parsing. + * Implements Channel Mask TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1420,7 +1420,7 @@ class ChannelMaskBaseTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1430,7 +1430,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1439,7 +1439,7 @@ public: bool IsValid(void) const; /** - * This method gets the first Channel Mask Entry in the Channel Mask TLV. + * Gets the first Channel Mask Entry in the Channel Mask TLV. * * @returns A pointer to first Channel Mask Entry or `nullptr` if not found. * @@ -1447,7 +1447,7 @@ public: const ChannelMaskEntryBase *GetFirstEntry(void) const; /** - * This method gets the first Channel Mask Entry in the Channel Mask TLV. + * Gets the first Channel Mask Entry in the Channel Mask TLV. * * @returns A pointer to first Channel Mask Entry or `nullptr` if not found. * @@ -1456,7 +1456,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements Channel Mask TLV generation and parsing. + * Implements Channel Mask TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1464,7 +1464,7 @@ class ChannelMaskTlv : public ChannelMaskBaseTlv { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1475,7 +1475,7 @@ public: } /** - * This method sets the Channel Mask Entries. + * Sets the Channel Mask Entries. * * @param[in] aChannelMask The Channel Mask value. * @@ -1483,7 +1483,7 @@ public: void SetChannelMask(uint32_t aChannelMask); /** - * This method returns the Channel Mask value as a `uint32_t` bit mask. + * Returns the Channel Mask value as a `uint32_t` bit mask. * * @returns The Channel Mask or 0 if not found. * @@ -1491,7 +1491,7 @@ public: uint32_t GetChannelMask(void) const; /** - * This method reads message and returns the Channel Mask value as a `uint32_t` bit mask. + * Reads message and returns the Channel Mask value as a `uint32_t` bit mask. * * @param[in] aMessage A reference to the message. * @@ -1507,7 +1507,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Energy List TLV generation and parsing. + * Implements Energy List TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1515,7 +1515,7 @@ class EnergyListTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1525,7 +1525,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1534,7 +1534,7 @@ public: bool IsValid(void) const { return true; } /** - * This method returns a pointer to the start of energy measurement list. + * Returns a pointer to the start of energy measurement list. * * @returns A pointer to the start start of energy energy measurement list. * @@ -1542,7 +1542,7 @@ public: const uint8_t *GetEnergyList(void) const { return mEnergyList; } /** - * This method returns the length of energy measurement list. + * Returns the length of energy measurement list. * * @returns The length of energy measurement list. * @@ -1556,37 +1556,37 @@ private: } OT_TOOL_PACKED_END; /** - * This class defines Provisioning TLV constants and types. + * Defines Provisioning TLV constants and types. * */ typedef StringTlvInfo ProvisioningUrlTlv; /** - * This class defines Vendor Name TLV constants and types. + * Defines Vendor Name TLV constants and types. * */ typedef StringTlvInfo VendorNameTlv; /** - * This class defines Vendor Model TLV constants and types. + * Defines Vendor Model TLV constants and types. * */ typedef StringTlvInfo VendorModelTlv; /** - * This class defines Vendor SW Version TLV constants and types. + * Defines Vendor SW Version TLV constants and types. * */ typedef StringTlvInfo VendorSwVersionTlv; /** - * This class defines Vendor Data TLV constants and types. + * Defines Vendor Data TLV constants and types. * */ typedef StringTlvInfo VendorDataTlv; /** - * This class implements Vendor Stack Version TLV generation and parsing. + * Implements Vendor Stack Version TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1604,7 +1604,7 @@ public: } /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1614,7 +1614,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1623,7 +1623,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Stack Vendor OUI value. + * Returns the Stack Vendor OUI value. * * @returns The Vendor Stack Vendor OUI value. * @@ -1631,7 +1631,7 @@ public: uint32_t GetOui(void) const { return ReadUint24(mOui); } /** - * This method returns the Stack Vendor OUI value. + * Returns the Stack Vendor OUI value. * * @param[in] aOui The Vendor Stack Vendor OUI value. * @@ -1639,7 +1639,7 @@ public: void SetOui(uint32_t aOui) { WriteUint24(aOui, mOui); } /** - * This method returns the Build value. + * Returns the Build value. * * @returns The Build value. * @@ -1647,7 +1647,7 @@ public: uint16_t GetBuild(void) const { return (HostSwap16(mBuildRevision) & kBuildMask) >> kBuildOffset; } /** - * This method sets the Build value. + * Sets the Build value. * * @param[in] aBuild The Build value. * @@ -1659,7 +1659,7 @@ public: } /** - * This method returns the Revision value. + * Returns the Revision value. * * @returns The Revision value. * @@ -1667,7 +1667,7 @@ public: uint8_t GetRevision(void) const { return (HostSwap16(mBuildRevision) & kRevMask) >> kRevOffset; } /** - * This method sets the Revision value. + * Sets the Revision value. * * @param[in] aRevision The Revision value. * @@ -1678,7 +1678,7 @@ public: } /** - * This method returns the Minor value. + * Returns the Minor value. * * @returns The Minor value. * @@ -1686,7 +1686,7 @@ public: uint8_t GetMinor(void) const { return (mMinorMajor & kMinorMask) >> kMinorOffset; } /** - * This method sets the Minor value. + * Sets the Minor value. * * @param[in] aMinor The Minor value. * @@ -1697,7 +1697,7 @@ public: } /** - * This method returns the Major value. + * Returns the Major value. * * @returns The Major value. * @@ -1705,7 +1705,7 @@ public: uint8_t GetMajor(void) const { return (mMinorMajor & kMajorMask) >> kMajorOffset; } /** - * This method sets the Major value. + * Sets the Major value. * * @param[in] aMajor The Major value. * @@ -1734,13 +1734,13 @@ private: } OT_TOOL_PACKED_END; /** - * This class defines UDP Encapsulation TLV types and constants. + * Defines UDP Encapsulation TLV types and constants. * */ typedef TlvInfo UdpEncapsulationTlv; /** - * This class represents UDP Encapsulation TLV value header (source and destination ports). + * Represents UDP Encapsulation TLV value header (source and destination ports). * */ OT_TOOL_PACKED_BEGIN @@ -1748,7 +1748,7 @@ class UdpEncapsulationTlvHeader { public: /** - * This method returns the source port. + * Returns the source port. * * @returns The source port. * @@ -1756,7 +1756,7 @@ public: uint16_t GetSourcePort(void) const { return HostSwap16(mSourcePort); } /** - * This method updates the source port. + * Updates the source port. * * @param[in] aSourcePort The source port. * @@ -1764,7 +1764,7 @@ public: void SetSourcePort(uint16_t aSourcePort) { mSourcePort = HostSwap16(aSourcePort); } /** - * This method returns the destination port. + * Returns the destination port. * * @returns The destination port. * @@ -1772,7 +1772,7 @@ public: uint16_t GetDestinationPort(void) const { return HostSwap16(mDestinationPort); } /** - * This method updates the destination port. + * Updates the destination port. * * @param[in] aDestinationPort The destination port. * @@ -1786,7 +1786,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Discovery Request TLV generation and parsing. + * Implements Discovery Request TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1794,7 +1794,7 @@ class DiscoveryRequestTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1806,7 +1806,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1815,7 +1815,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Version value. + * Returns the Version value. * * @returns The Version value. * @@ -1823,7 +1823,7 @@ public: uint8_t GetVersion(void) const { return mFlags >> kVersionOffset; } /** - * This method sets the Version value. + * Sets the Version value. * * @param[in] aVersion The Version value. * @@ -1834,7 +1834,7 @@ public: } /** - * This method indicates whether or not the Joiner flag is set. + * Indicates whether or not the Joiner flag is set. * * @retval TRUE If the Joiner flag is set. * @retval FALSE If the Joiner flag is not set. @@ -1843,7 +1843,7 @@ public: bool IsJoiner(void) const { return (mFlags & kJoinerMask) != 0; } /** - * This method sets the Joiner flag. + * Sets the Joiner flag. * * @param[in] aJoiner TRUE if set, FALSE otherwise. * @@ -1871,7 +1871,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Discovery Response TLV generation and parsing. + * Implements Discovery Response TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1879,7 +1879,7 @@ class DiscoveryResponseTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1891,7 +1891,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1900,7 +1900,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Version value. + * Returns the Version value. * * @returns The Version value. * @@ -1908,7 +1908,7 @@ public: uint8_t GetVersion(void) const { return mFlags >> kVersionOffset; } /** - * This method sets the Version value. + * Sets the Version value. * * @param[in] aVersion The Version value. * @@ -1919,7 +1919,7 @@ public: } /** - * This method indicates whether or not the Native Commissioner flag is set. + * Indicates whether or not the Native Commissioner flag is set. * * @retval TRUE If the Native Commissioner flag is set. * @retval FALSE If the Native Commissioner flag is not set. @@ -1928,7 +1928,7 @@ public: bool IsNativeCommissioner(void) const { return (mFlags & kNativeMask) != 0; } /** - * This method sets the Native Commissioner flag. + * Sets the Native Commissioner flag. * * @param[in] aNativeCommissioner TRUE if set, FALSE otherwise. * @@ -1946,7 +1946,7 @@ public: } /** - * This method indicates whether or not the Commercial Commissioning Mode flag is set. + * Indicates whether or not the Commercial Commissioning Mode flag is set. * * @retval TRUE If the Commercial Commissioning Mode flag is set. * @retval FALSE If the Commercial Commissioning Mode flag is not set. @@ -1955,7 +1955,7 @@ public: bool IsCommercialCommissioningMode(void) const { return (mFlags & kCCMMask) != 0; } /** - * This method sets the Commercial Commissioning Mode flag. + * Sets the Commercial Commissioning Mode flag. * * @param[in] aCCM TRUE if set, FALSE otherwise. * @@ -1985,7 +1985,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Joiner Advertisement TLV generation and parsing. + * Implements Joiner Advertisement TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1995,7 +1995,7 @@ public: static constexpr uint8_t kAdvDataMaxLength = OT_JOINER_ADVDATA_MAX_LENGTH; ///< The Max Length of AdvData /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -2005,7 +2005,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -2014,7 +2014,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(mOui) && GetLength() <= sizeof(mOui) + sizeof(mAdvData); } /** - * This method returns the Vendor OUI value. + * Returns the Vendor OUI value. * * @returns The Vendor OUI value. * @@ -2022,7 +2022,7 @@ public: uint32_t GetOui(void) const { return ReadUint24(mOui); } /** - * This method sets the Vendor OUI value. + * Sets the Vendor OUI value. * * @param[in] aOui The Vendor OUI value. * @@ -2030,7 +2030,7 @@ public: void SetOui(uint32_t aOui) { return WriteUint24(aOui, mOui); } /** - * This method returns the Adv Data length. + * Returns the Adv Data length. * * @returns The AdvData length. * @@ -2038,7 +2038,7 @@ public: uint8_t GetAdvDataLength(void) const { return GetLength() - sizeof(mOui); } /** - * This method returns the Adv Data value. + * Returns the Adv Data value. * * @returns A pointer to the Adv Data value. * @@ -2046,7 +2046,7 @@ public: const uint8_t *GetAdvData(void) const { return mAdvData; } /** - * This method sets the Adv Data value. + * Sets the Adv Data value. * * @param[in] aAdvData A pointer to the AdvData value. * @param[in] aAdvDataLength The length of AdvData in bytes. diff --git a/src/core/meshcop/network_name.hpp b/src/core/meshcop/network_name.hpp index d376fc5cd..3e1ad3674 100644 --- a/src/core/meshcop/network_name.hpp +++ b/src/core/meshcop/network_name.hpp @@ -50,7 +50,7 @@ namespace ot { namespace MeshCoP { /** - * This class represents a name string as data (pointer to a char buffer along with a length). + * Represents a name string as data (pointer to a char buffer along with a length). * * @note The char array does NOT need to be null terminated. * @@ -61,7 +61,7 @@ class NameData : private Data public: /** - * This constructor initializes the NameData object. + * Initializes the NameData object. * * @param[in] aBuffer A pointer to a `char` buffer (does not need to be null terminated). * @param[in] aLength The length (number of chars) in the buffer. @@ -70,7 +70,7 @@ public: NameData(const char *aBuffer, uint8_t aLength) { Init(aBuffer, aLength); } /** - * This method returns the pointer to char buffer (not necessarily null terminated). + * Returns the pointer to char buffer (not necessarily null terminated). * * @returns The pointer to the char buffer. * @@ -78,7 +78,7 @@ public: const char *GetBuffer(void) const { return reinterpret_cast(GetBytes()); } /** - * This method returns the length (number of chars in buffer). + * Returns the length (number of chars in buffer). * * @returns The name length. * @@ -86,7 +86,7 @@ public: uint8_t GetLength(void) const { return Data::GetLength(); } /** - * This method copies the name data into a given char buffer with a given size. + * Copies the name data into a given char buffer with a given size. * * The given buffer is cleared (`memset` to zero) before copying the name into it. The copied string * in @p aBuffer is NOT necessarily null terminated. @@ -101,7 +101,7 @@ public: }; /** - * This structure represents an Network Name. + * Represents an Network Name. * */ class NetworkName : public otNetworkName, public Unequatable @@ -117,13 +117,13 @@ public: static constexpr uint8_t kMaxSize = OT_NETWORK_NAME_MAX_SIZE; /** - * This constructor initializes the Network Name as an empty string. + * Initializes the Network Name as an empty string. * */ NetworkName(void) { m8[0] = '\0'; } /** - * This method gets the Network Name as a null terminated C string. + * Gets the Network Name as a null terminated C string. * * @returns The Network Name as a null terminated C string array. * @@ -131,7 +131,7 @@ public: const char *GetAsCString(void) const { return m8; } /** - * This method gets the Network Name as NameData. + * Gets the Network Name as NameData. * * @returns The Network Name as NameData. * @@ -139,9 +139,9 @@ public: NameData GetAsData(void) const; /** - * This method sets the Network Name from a given null terminated C string. + * Sets the Network Name from a given null terminated C string. * - * This method also validates that the given @p aNameString follows UTF-8 encoding and can fit in `kMaxSize` + * Also validates that the given @p aNameString follows UTF-8 encoding and can fit in `kMaxSize` * chars. * * @param[in] aNameString A name C string. @@ -154,7 +154,7 @@ public: Error Set(const char *aNameString); /** - * This method sets the Network Name. + * Sets the Network Name. * * @param[in] aNameData A reference to name data. * @@ -166,7 +166,7 @@ public: Error Set(const NameData &aNameData); /** - * This method overloads operator `==` to evaluate whether or not two given `NetworkName` objects are equal. + * Overloads operator `==` to evaluate whether or not two given `NetworkName` objects are equal. * * @param[in] aOther The other `NetworkName` to compare with. * @@ -179,14 +179,14 @@ public: #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) /** - * This type represents a Thread Domain Name. + * Represents a Thread Domain Name. * */ typedef NetworkName DomainName; #endif /** - * This class manages the Network Name value. + * Manages the Network Name value. * */ class NetworkNameManager : public InstanceLocator, private NonCopyable @@ -201,7 +201,7 @@ public: explicit NetworkNameManager(Instance &aInstance); /** - * This method returns the Network Name. + * Returns the Network Name. * * @returns The Network Name. * @@ -209,7 +209,7 @@ public: const NetworkName &GetNetworkName(void) const { return mNetworkName; } /** - * This method sets the Network Name. + * Sets the Network Name. * * @param[in] aNameString A pointer to a string character array. Must be null terminated. * @@ -220,7 +220,7 @@ public: Error SetNetworkName(const char *aNameString); /** - * This method sets the Network Name. + * Sets the Network Name. * * @param[in] aNameData A name data (pointer to char buffer and length). * @@ -232,7 +232,7 @@ public: #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) /** - * This method returns the Thread Domain Name. + * Returns the Thread Domain Name. * * @returns The Thread Domain Name. * @@ -240,7 +240,7 @@ public: const DomainName &GetDomainName(void) const { return mDomainName; } /** - * This method sets the Thread Domain Name. + * Sets the Thread Domain Name. * * @param[in] aNameString A pointer to a string character array. Must be null terminated. * @@ -251,7 +251,7 @@ public: Error SetDomainName(const char *aNameString); /** - * This method sets the Thread Domain Name. + * Sets the Thread Domain Name. * * @param[in] aNameData A name data (pointer to char buffer and length). * diff --git a/src/core/meshcop/panid_query_client.hpp b/src/core/meshcop/panid_query_client.hpp index 46b1ff784..1a5d11579 100644 --- a/src/core/meshcop/panid_query_client.hpp +++ b/src/core/meshcop/panid_query_client.hpp @@ -49,7 +49,7 @@ namespace ot { /** - * This class implements handling PANID Query Requests. + * Implements handling PANID Query Requests. * */ class PanIdQueryClient : public InstanceLocator @@ -58,13 +58,13 @@ class PanIdQueryClient : public InstanceLocator public: /** - * This constructor initializes the object. + * Initializes the object. * */ explicit PanIdQueryClient(Instance &aInstance); /** - * This method sends a PAN ID Query message. + * Sends a PAN ID Query message. * * @param[in] aPanId The PAN ID to query. * @param[in] aChannelMask The channel mask value. diff --git a/src/core/meshcop/timestamp.hpp b/src/core/meshcop/timestamp.hpp index 1eace251d..5d7abb322 100644 --- a/src/core/meshcop/timestamp.hpp +++ b/src/core/meshcop/timestamp.hpp @@ -53,7 +53,7 @@ using ot::Encoding::BigEndian::HostSwap16; using ot::Encoding::BigEndian::HostSwap32; /** - * This class implements Timestamp generation and parsing. + * Implements Timestamp generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -61,19 +61,19 @@ class Timestamp : public Clearable { public: /** - * This method converts the timestamp to `otTimestamp`. + * Converts the timestamp to `otTimestamp`. * */ void ConvertTo(otTimestamp &aTimestamp) const; /** - * This method sets the timestamp from `otTimestamp`. + * Sets the timestamp from `otTimestamp`. * */ void SetFromTimestamp(const otTimestamp &aTimestamp); /** - * This method returns the Seconds value. + * Returns the Seconds value. * * @returns The Seconds value. * @@ -84,7 +84,7 @@ public: } /** - * This method sets the Seconds value. + * Sets the Seconds value. * * @param[in] aSeconds The Seconds value. * @@ -96,7 +96,7 @@ public: } /** - * This method returns the Ticks value. + * Returns the Ticks value. * * @returns The Ticks value. * @@ -104,7 +104,7 @@ public: uint16_t GetTicks(void) const { return HostSwap16(mTicks) >> kTicksOffset; } /** - * This method sets the Ticks value. + * Sets the Ticks value. * * @param[in] aTicks The Ticks value. * @@ -115,7 +115,7 @@ public: } /** - * This method returns the Authoritative value. + * Returns the Authoritative value. * * @returns The Authoritative value. * @@ -123,7 +123,7 @@ public: bool GetAuthoritative(void) const { return (HostSwap16(mTicks) & kAuthoritativeMask) != 0; } /** - * This method sets the Authoritative value. + * Sets the Authoritative value. * * @param[in] aAuthoritative The Authoritative value. * @@ -135,13 +135,13 @@ public: } /** - * This method increments the timestamp by a random number of ticks [0, 32767]. + * Increments the timestamp by a random number of ticks [0, 32767]. * */ void AdvanceRandomTicks(void); /** - * This method indicates whether the timestamp indicates an MLE Orphan Announce message. + * Indicates whether the timestamp indicates an MLE Orphan Announce message. * * @retval TRUE The timestamp indicates an Orphan Announce message. * @retval FALSE If the timestamp does not indicate an Orphan Announce message. @@ -150,7 +150,7 @@ public: bool IsOrphanTimestamp(void) const { return GetSeconds() == 0 && GetTicks() == 0 && GetAuthoritative(); } /** - * This static method compares two timestamps. + * Compares two timestamps. * * Either one or both @p aFirst or @p aSecond can be `nullptr`. A non-null timestamp is considered greater than * a null one. If both are null, they are considered as equal. @@ -166,7 +166,7 @@ public: static int Compare(const Timestamp *aFirst, const Timestamp *aSecond); /** - * This static method compares two timestamps. + * Compares two timestamps. * * @param[in] aFirst A reference to the first timestamp to compare. * @param[in] aSecond A reference to the second timestamp to compare. diff --git a/src/core/net/checksum.hpp b/src/core/net/checksum.hpp index 06d6e6901..e41b28fc0 100644 --- a/src/core/net/checksum.hpp +++ b/src/core/net/checksum.hpp @@ -47,7 +47,7 @@ namespace ot { /** - * This class implements IP checksum calculation and verification. + * Implements IP checksum calculation and verification. * */ class Checksum @@ -56,7 +56,7 @@ class Checksum public: /** - * This static method verifies the checksum in a given message (if UDP/ICMP6). + * Verifies the checksum in a given message (if UDP/ICMP6). * * @param[in] aMessage The message to verify its checksum. The `aMessage.GetOffset()` should point to start * UDP/ICMP6 header. @@ -70,7 +70,7 @@ public: static Error VerifyMessageChecksum(const Message &aMessage, const Ip6::MessageInfo &aMessageInfo, uint8_t aIpProto); /** - * This static method calculates and then updates the checksum in a given message (if TCP/UDP/ICMPv6). + * Calculates and then updates the checksum in a given message (if TCP/UDP/ICMPv6). * * @param[in,out] aMessage The message to update the checksum in. The `aMessage.GetOffset()` should point to start * of the TCP/UDP/ICMPv6 header. On exit the checksum field in TCP/UDP/ICMPv6 header in the @@ -86,7 +86,7 @@ public: uint8_t aIpProto); /** - * This static method calculates and then updates the checksum in a given IPv4 message (if TCP/UDP/ICMP(v4)). + * Calculates and then updates the checksum in a given IPv4 message (if TCP/UDP/ICMP(v4)). * * @param[in,out] aMessage The message to update the checksum in. The `aMessage.GetOffset()` should point to start * of the TCP/UDP/ICMP(v4) header. On exit the checksum field in TCP/UDP/ICMP(v4) header in @@ -102,7 +102,7 @@ public: uint8_t aIpProto); /** - * This static method calculates and then updates the checksum field in the IPv4 header. + * Calculates and then updates the checksum field in the IPv4 header. * * @param[in,out] aHeader The IPv4 header to update the checksum in. * diff --git a/src/core/net/dhcp6.hpp b/src/core/net/dhcp6.hpp index 5d65f2163..1cfa12dfa 100644 --- a/src/core/net/dhcp6.hpp +++ b/src/core/net/dhcp6.hpp @@ -91,7 +91,7 @@ enum Type : uint8_t }; /** - * This class represents a DHCP6 transaction identifier. + * Represents a DHCP6 transaction identifier. * */ OT_TOOL_PACKED_BEGIN @@ -101,7 +101,7 @@ public: static constexpr uint16_t kSize = 3; ///< Transaction Id size (in bytes). /** - * This method generates a cryptographically secure random sequence to populate the transaction identifier. + * Generates a cryptographically secure random sequence to populate the transaction identifier. * * @retval kErrorNone Successfully generated a random transaction identifier. * @retval kErrorFailed Failed to generate random sequence. @@ -114,7 +114,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements DHCPv6 header. + * Implements DHCPv6 header. * */ OT_TOOL_PACKED_BEGIN @@ -122,7 +122,7 @@ class Header : public Clearable
{ public: /** - * This method returns the DHCPv6 message type. + * Returns the DHCPv6 message type. * * @returns The DHCPv6 message type. * @@ -130,7 +130,7 @@ public: Type GetType(void) const { return mType; } /** - * This method sets the DHCPv6 message type. + * Sets the DHCPv6 message type. * * @param[in] aType The DHCPv6 message type. * @@ -138,7 +138,7 @@ public: void SetType(Type aType) { mType = aType; } /** - * This method returns the DHCPv6 message transaction identifier. + * Returns the DHCPv6 message transaction identifier. * * @returns The DHCPv6 message transaction identifier. * @@ -146,7 +146,7 @@ public: const TransactionId &GetTransactionId(void) const { return mTransactionId; } /** - * This method sets the DHCPv6 message transaction identifier. + * Sets the DHCPv6 message transaction identifier. * * @param[in] aTransactionId The DHCPv6 message transaction identifier. * @@ -189,7 +189,7 @@ enum Code : uint16_t }; /** - * This class implements DHCPv6 option. + * Implements DHCPv6 option. * */ OT_TOOL_PACKED_BEGIN @@ -197,7 +197,7 @@ class Option { public: /** - * This method initializes the DHCPv6 option to all zeros. + * Initializes the DHCPv6 option to all zeros. * */ void Init(void) @@ -207,7 +207,7 @@ public: } /** - * This method returns the DHCPv6 option code. + * Returns the DHCPv6 option code. * * @returns The DHCPv6 option code. * @@ -215,7 +215,7 @@ public: Code GetCode(void) const { return static_cast(HostSwap16(mCode)); } /** - * This method sets the DHCPv6 option code. + * Sets the DHCPv6 option code. * * @param[in] aCode The DHCPv6 option code. * @@ -223,7 +223,7 @@ public: void SetCode(Code aCode) { mCode = HostSwap16(static_cast(aCode)); } /** - * This method returns the length of DHCPv6 option. + * Returns the length of DHCPv6 option. * * @returns The length of DHCPv6 option. * @@ -231,7 +231,7 @@ public: uint16_t GetLength(void) const { return HostSwap16(mLength); } /** - * This method sets the length of DHCPv6 option. + * Sets the length of DHCPv6 option. * * @param[in] aLength The length of DHCPv6 option. * @@ -259,7 +259,7 @@ class ClientIdentifier : public Option { public: /** - * This method initializes the DHCPv6 Option. + * Initializes the DHCPv6 Option. * */ void Init(void) @@ -269,7 +269,7 @@ public: } /** - * This method returns the client DUID Type. + * Returns the client DUID Type. * * @returns The client DUID Type. * @@ -277,7 +277,7 @@ public: DuidType GetDuidType(void) const { return static_cast(HostSwap16(mDuidType)); } /** - * This method sets the client DUID Type. + * Sets the client DUID Type. * * @param[in] aDuidType The client DUID Type. * @@ -285,7 +285,7 @@ public: void SetDuidType(DuidType aDuidType) { mDuidType = HostSwap16(static_cast(aDuidType)); } /** - * This method returns the client Duid HardwareType. + * Returns the client Duid HardwareType. * * @returns The client Duid HardwareType. * @@ -293,7 +293,7 @@ public: uint16_t GetDuidHardwareType(void) const { return HostSwap16(mDuidHardwareType); } /** - * This method sets the client Duid HardwareType. + * Sets the client Duid HardwareType. * * @param[in] aDuidHardwareType The client Duid HardwareType. * @@ -301,7 +301,7 @@ public: void SetDuidHardwareType(uint16_t aDuidHardwareType) { mDuidHardwareType = HostSwap16(aDuidHardwareType); } /** - * This method returns the client LinkLayerAddress. + * Returns the client LinkLayerAddress. * * @returns The link-layer address. * @@ -309,7 +309,7 @@ public: const Mac::ExtAddress &GetDuidLinkLayerAddress(void) const { return mDuidLinkLayerAddress; } /** - * This method sets the client LinkLayerAddress. + * Sets the client LinkLayerAddress. * * @param[in] aDuidLinkLayerAddress The client LinkLayerAddress. * @@ -330,7 +330,7 @@ class ServerIdentifier : public Option { public: /** - * This method initializes the DHCPv6 Option. + * Initializes the DHCPv6 Option. * */ void Init(void) @@ -340,7 +340,7 @@ public: } /** - * This method returns the server DUID Type. + * Returns the server DUID Type. * * @returns The server DUID Type. * @@ -348,7 +348,7 @@ public: DuidType GetDuidType(void) const { return static_cast(HostSwap16(mDuidType)); } /** - * This method sets the server DUID Type. + * Sets the server DUID Type. * * @param[in] aDuidType The server DUID Type. * @@ -356,7 +356,7 @@ public: void SetDuidType(DuidType aDuidType) { mDuidType = HostSwap16(static_cast(aDuidType)); } /** - * This method returns the server DUID HardwareType. + * Returns the server DUID HardwareType. * * @returns The server DUID HardwareType. * @@ -364,7 +364,7 @@ public: uint16_t GetDuidHardwareType(void) const { return HostSwap16(mDuidHardwareType); } /** - * This method sets the server DUID HardwareType. + * Sets the server DUID HardwareType. * * @param[in] aDuidHardwareType The server DUID HardwareType. * @@ -372,7 +372,7 @@ public: void SetDuidHardwareType(uint16_t aDuidHardwareType) { mDuidHardwareType = HostSwap16(aDuidHardwareType); } /** - * This method returns the server LinkLayerAddress. + * Returns the server LinkLayerAddress. * * @returns The link-layer address. * @@ -380,7 +380,7 @@ public: const Mac::ExtAddress &GetDuidLinkLayerAddress(void) const { return mDuidLinkLayerAddress; } /** - * This method sets the server LinkLayerAddress. + * Sets the server LinkLayerAddress. * * @param[in] aDuidLinkLayerAddress The server LinkLayerAddress. * @@ -397,7 +397,7 @@ private: } OT_TOOL_PACKED_END; /** - * This type represents an Identity Association for Non-temporary Address DHCPv6 option. + * Represents an Identity Association for Non-temporary Address DHCPv6 option. * */ OT_TOOL_PACKED_BEGIN @@ -408,7 +408,7 @@ public: static constexpr uint32_t kDefaultT2 = 0xffffffffU; ///< Default T2 value. /** - * This method initializes the DHCPv6 Option. + * Initializes the DHCPv6 Option. * */ void Init(void) @@ -418,7 +418,7 @@ public: } /** - * This method returns client IAID. + * Returns client IAID. * * @returns The client IAID. * @@ -426,7 +426,7 @@ public: uint32_t GetIaid(void) const { return HostSwap32(mIaid); } /** - * This method sets the client IAID. + * Sets the client IAID. * * @param[in] aIaid The client IAID. * @@ -434,7 +434,7 @@ public: void SetIaid(uint32_t aIaid) { mIaid = HostSwap32(aIaid); } /** - * This method returns T1. + * Returns T1. * * @returns The value of T1. * @@ -442,7 +442,7 @@ public: uint32_t GetT1(void) const { return HostSwap32(mT1); } /** - * This method sets the value of T1. + * Sets the value of T1. * * @param[in] aT1 The value of T1. * @@ -450,7 +450,7 @@ public: void SetT1(uint32_t aT1) { mT1 = HostSwap32(aT1); } /** - * This method returns T2. + * Returns T2. * * @returns The value of T2. * @@ -458,7 +458,7 @@ public: uint32_t GetT2(void) const { return HostSwap32(mT2); } /** - * This method sets the value of T2. + * Sets the value of T2. * * @param[in] aT2 The value of T2. * @@ -472,7 +472,7 @@ private: } OT_TOOL_PACKED_END; /** - * This type represents an Identity Association Address DHCPv6 option. + * Represents an Identity Association Address DHCPv6 option. * */ OT_TOOL_PACKED_BEGIN @@ -483,7 +483,7 @@ public: static constexpr uint32_t kDefaultValidLifetime = 0xffffffffU; ///< Default valid lifetime. /** - * This method initializes the DHCPv6 Option. + * Initializes the DHCPv6 Option. * */ void Init(void) @@ -493,7 +493,7 @@ public: } /** - * This method returns a reference to the IPv6 address. + * Returns a reference to the IPv6 address. * * @returns A reference to the IPv6 address. * @@ -501,7 +501,7 @@ public: Ip6::Address &GetAddress(void) { return mAddress; } /** - * This method returns a reference to the IPv6 address. + * Returns a reference to the IPv6 address. * * @returns A reference to the IPv6 address. * @@ -509,7 +509,7 @@ public: const Ip6::Address &GetAddress(void) const { return mAddress; } /** - * This method sets the IPv6 address. + * Sets the IPv6 address. * * @param[in] aAddress The reference to the IPv6 address to set. * @@ -517,7 +517,7 @@ public: void SetAddress(const Ip6::Address &aAddress) { mAddress = aAddress; } /** - * This method returns the preferred lifetime of the IPv6 address. + * Returns the preferred lifetime of the IPv6 address. * * @returns The preferred lifetime of the IPv6 address. * @@ -525,7 +525,7 @@ public: uint32_t GetPreferredLifetime(void) const { return HostSwap32(mPreferredLifetime); } /** - * This method sets the preferred lifetime of the IPv6 address. + * Sets the preferred lifetime of the IPv6 address. * * @param[in] aPreferredLifetime The preferred lifetime of the IPv6 address. * @@ -533,7 +533,7 @@ public: void SetPreferredLifetime(uint32_t aPreferredLifetime) { mPreferredLifetime = HostSwap32(aPreferredLifetime); } /** - * This method returns the valid lifetime of the IPv6 address. + * Returns the valid lifetime of the IPv6 address. * * @returns The valid lifetime of the IPv6 address. * @@ -541,7 +541,7 @@ public: uint32_t GetValidLifetime(void) const { return HostSwap32(mValidLifetime); } /** - * This method sets the valid lifetime of the IPv6 address. + * Sets the valid lifetime of the IPv6 address. * * @param[in] aValidLifetime The valid lifetime of the IPv6 address. * @@ -555,7 +555,7 @@ private: } OT_TOOL_PACKED_END; /** - * This type represents an Elapsed Time DHCPv6 option. + * Represents an Elapsed Time DHCPv6 option. * */ OT_TOOL_PACKED_BEGIN @@ -563,7 +563,7 @@ class ElapsedTime : public Option { public: /** - * This method initializes the DHCPv6 Option. + * Initializes the DHCPv6 Option. * */ void Init(void) @@ -573,7 +573,7 @@ public: } /** - * This method returns the elapsed time since solicit starts. + * Returns the elapsed time since solicit starts. * * @returns The elapsed time since solicit starts. * @@ -581,7 +581,7 @@ public: uint16_t GetElapsedTime(void) const { return HostSwap16(mElapsedTime); } /** - * This method sets the elapsed time since solicit starts. + * Sets the elapsed time since solicit starts. * * @param[in] aElapsedTime The elapsed time since solicit starts. * @@ -611,7 +611,7 @@ enum Status : uint16_t }; /** - * This type represents an Status Code DHCPv6 option. + * Represents an Status Code DHCPv6 option. * */ OT_TOOL_PACKED_BEGIN @@ -619,7 +619,7 @@ class StatusCode : public Option { public: /** - * This method initializes the DHCPv6 Option. + * Initializes the DHCPv6 Option. * */ void Init(void) @@ -629,7 +629,7 @@ public: } /** - * This method returns the status code. + * Returns the status code. * * @returns The status code. * @@ -637,7 +637,7 @@ public: Status GetStatusCode(void) const { return static_cast(HostSwap16(mStatus)); } /** - * This method sets the status code. + * Sets the status code. * * @param[in] aStatus The status code. * @@ -649,7 +649,7 @@ private: } OT_TOOL_PACKED_END; /** - * This type represents an Rapid Commit DHCPv6 option. + * Represents an Rapid Commit DHCPv6 option. * */ OT_TOOL_PACKED_BEGIN @@ -657,7 +657,7 @@ class RapidCommit : public Option { public: /** - * This method initializes the DHCPv6 Option. + * Initializes the DHCPv6 Option. * */ void Init(void) diff --git a/src/core/net/dhcp6_client.hpp b/src/core/net/dhcp6_client.hpp index 533ded73f..c50b13889 100644 --- a/src/core/net/dhcp6_client.hpp +++ b/src/core/net/dhcp6_client.hpp @@ -64,14 +64,14 @@ namespace Dhcp6 { */ /** - * This class implements DHCPv6 Client. + * Implements DHCPv6 Client. * */ class Client : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -79,7 +79,7 @@ public: explicit Client(Instance &aInstance); /** - * This method update addresses that shall be automatically created using DHCP. + * Update addresses that shall be automatically created using DHCP. * * */ diff --git a/src/core/net/dhcp6_server.hpp b/src/core/net/dhcp6_server.hpp index fa14e8bd9..d38c40edc 100644 --- a/src/core/net/dhcp6_server.hpp +++ b/src/core/net/dhcp6_server.hpp @@ -67,7 +67,7 @@ class Server : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -75,13 +75,13 @@ public: explicit Server(Instance &aInstance); /** - * This method updates DHCP Agents and DHCP ALOCs. + * Updates DHCP Agents and DHCP ALOCs. * */ Error UpdateService(void); /** - * This method applies the Mesh Local Prefix. + * Applies the Mesh Local Prefix. * */ void ApplyMeshLocalPrefix(void); @@ -91,7 +91,7 @@ private: { public: /** - * This method indicates whether or not @p aAddress has a matching prefix. + * Indicates whether or not @p aAddress has a matching prefix. * * @param[in] aAddress The IPv6 address to compare. * @@ -102,7 +102,7 @@ private: bool IsPrefixMatch(const Ip6::Address &aAddress) const { return aAddress.MatchesPrefix(GetPrefix()); } /** - * This method indicates whether or not this entry is valid. + * Indicates whether or not this entry is valid. * * @retval TRUE if this entry is valid. * @retval FALSE if this entry is not valid. @@ -111,13 +111,13 @@ private: bool IsValid(void) const { return mAloc.mValid; } /** - * This method sets the entry to invalid. + * Sets the entry to invalid. * */ void Clear(void) { mAloc.mValid = false; } /** - * This method returns the 6LoWPAN context ID. + * Returns the 6LoWPAN context ID. * * @returns The 6LoWPAN context ID. * @@ -125,7 +125,7 @@ private: uint8_t GetContextId(void) const { return mAloc.mAddress.mFields.m8[15]; } /** - * This method returns the ALOC. + * Returns the ALOC. * * @returns the ALOC. * @@ -133,7 +133,7 @@ private: Ip6::Netif::UnicastAddress &GetAloc(void) { return mAloc; } /** - * This method returns the IPv6 prefix. + * Returns the IPv6 prefix. * * @returns The IPv6 prefix. * @@ -141,7 +141,7 @@ private: const Ip6::Prefix &GetPrefix(void) const { return mPrefix; } /** - * This method returns the IPv6 prefix. + * Returns the IPv6 prefix. * * @returns The IPv6 prefix. * @@ -149,7 +149,7 @@ private: Ip6::Prefix &GetPrefix(void) { return mPrefix; } /** - * This method returns the IPv6 prefix as an IPv6 address. + * Returns the IPv6 prefix as an IPv6 address. * * @returns The IPv6 prefix as an IPv6 address. * @@ -160,7 +160,7 @@ private: } /** - * This method sets the ALOC. + * Sets the ALOC. * * @param[in] aPrefix The IPv6 prefix. * @param[in] aMeshLocalPrefix The Mesh Local Prefix. diff --git a/src/core/net/dns_client.hpp b/src/core/net/dns_client.hpp index d8b7f1397..d663c91f8 100644 --- a/src/core/net/dns_client.hpp +++ b/src/core/net/dns_client.hpp @@ -66,7 +66,7 @@ #endif /** - * This struct represents an opaque (and empty) type for a response to an address resolution DNS query. + * Represents an opaque (and empty) type for a response to an address resolution DNS query. * */ struct otDnsAddressResponse @@ -76,7 +76,7 @@ struct otDnsAddressResponse #if OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE /** - * This struct represents an opaque (and empty) type for a response to browse (service instance enumeration) DNS query. + * Represents an opaque (and empty) type for a response to browse (service instance enumeration) DNS query. * */ struct otDnsBrowseResponse @@ -84,7 +84,7 @@ struct otDnsBrowseResponse }; /** - * This struct represents an opaque (and empty) type for a response to service inst resolution DNS query. + * Represents an opaque (and empty) type for a response to service inst resolution DNS query. * */ struct otDnsServiceResponse @@ -102,7 +102,7 @@ class Client; namespace Dns { /** - * This class implements DNS client. + * Implements DNS client. * */ class Client : public InstanceLocator, private NonCopyable @@ -113,7 +113,7 @@ class Client : public InstanceLocator, private NonCopyable public: /** - * This type represents a DNS query configuration (e.g., server address, response wait timeout, etc). + * Represents a DNS query configuration (e.g., server address, response wait timeout, etc). * */ class QueryConfig : public otDnsQueryConfig, public Clearable @@ -122,7 +122,7 @@ public: public: /** - * This enumeration type represents the "Recursion Desired" (RD) flag in a `otDnsQueryConfig`. + * Type represents the "Recursion Desired" (RD) flag in a `otDnsQueryConfig`. * */ enum RecursionFlag : uint8_t @@ -134,7 +134,7 @@ public: #if OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE /** - * This enumeration type represents the NAT64 mode. + * Type represents the NAT64 mode. * */ enum Nat64Mode : uint8_t @@ -146,7 +146,7 @@ public: #endif /** - * This enumeration type represents the service resolution mode. + * Type represents the service resolution mode. * */ enum ServiceMode : uint8_t @@ -160,7 +160,7 @@ public: }; /** - * This enumeration type represents the DNS transport protocol selection. + * Type represents the DNS transport protocol selection. * */ enum TransportProto : uint8_t @@ -177,7 +177,7 @@ public: QueryConfig(void) = default; /** - * This method gets the server socket address (IPv6 address and port number). + * Gets the server socket address (IPv6 address and port number). * * @returns The server socket address. * @@ -188,7 +188,7 @@ public: } /** - * This method gets the wait time to receive response from server (in msec). + * Gets the wait time to receive response from server (in msec). * * @returns The timeout interval in msec. * @@ -196,7 +196,7 @@ public: uint32_t GetResponseTimeout(void) const { return mResponseTimeout; } /** - * This method gets the maximum number of query transmit attempts before reporting failure. + * Gets the maximum number of query transmit attempts before reporting failure. * * @returns The maximum number of query transmit attempts. * @@ -204,7 +204,7 @@ public: uint8_t GetMaxTxAttempts(void) const { return mMaxTxAttempts; } /** - * This method gets the recursion flag indicating whether the server can resolve the query recursively or not. + * Gets the recursion flag indicating whether the server can resolve the query recursively or not. * * @returns The recursion flag. * @@ -213,7 +213,7 @@ public: #if OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE /** - * This method gets the NAT64 mode. + * Gets the NAT64 mode. * * @returns The NAT64 mode. * @@ -221,7 +221,7 @@ public: Nat64Mode GetNat64Mode(void) const { return static_cast(mNat64Mode); } #endif /** - * This method gets the service resolution mode. + * Gets the service resolution mode. * * @returns The service resolution mode. * @@ -229,7 +229,7 @@ public: ServiceMode GetServiceMode(void) const { return static_cast(mServiceMode); } /** - * This method gets the transport protocol. + * Gets the transport protocol. * * @returns The transport protocol. * @@ -278,14 +278,14 @@ public: #if OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE /** - * This structure provides info for a DNS service instance. + * Provides info for a DNS service instance. * */ typedef otDnsServiceInfo ServiceInfo; #endif /** - * This class represents a DNS query response. + * Represents a DNS query response. * */ class Response : public otDnsAddressResponse, @@ -343,14 +343,14 @@ public: }; /** - * This type represents the function pointer callback which is called when a DNS response for an address resolution + * Represents the function pointer callback which is called when a DNS response for an address resolution * query is received. * */ typedef otDnsAddressCallback AddressCallback; /** - * This type represents an address resolution query DNS response. + * Represents an address resolution query DNS response. * */ class AddressResponse : public Response @@ -359,9 +359,9 @@ public: public: /** - * This method gets the host name associated with an address resolution DNS response. + * Gets the host name associated with an address resolution DNS response. * - * This method MUST only be used from `AddressCallback`. + * MUST only be used from `AddressCallback`. * * @param[out] aNameBuffer A buffer to char array to output the host name. * @param[in] aNameBufferSize The size of @p aNameBuffer. @@ -376,9 +376,9 @@ public: } /** - * This method gets the IPv6 address associated with an address resolution DNS response. + * Gets the IPv6 address associated with an address resolution DNS response. * - * This method MUST only be used from `AddressCallback`. + * MUST only be used from `AddressCallback`. * * The response may include multiple IPv6 address records. @p aIndex can be used to iterate through the list of * addresses. Index zero gets the the first address and so on. When we reach end of the list, this method @@ -405,14 +405,14 @@ public: #if OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE /** - * This type represents the function pointer callback which is called when a response for a browse (service + * Represents the function pointer callback which is called when a response for a browse (service * instance enumeration) DNS query is received. * */ typedef otDnsBrowseCallback BrowseCallback; /** - * This type represents a browse (service instance enumeration) DNS response. + * Represents a browse (service instance enumeration) DNS response. * */ class BrowseResponse : public Response @@ -421,9 +421,9 @@ public: public: /** - * This method gets the service name associated with a DNS browse response. + * Gets the service name associated with a DNS browse response. * - * This method MUST only be used from `BrowseCallback`. + * MUST only be used from `BrowseCallback`. * * @param[out] aNameBuffer A buffer to char array to output the host name. * @param[in] aNameBufferSize The size of @p aNameBuffer. @@ -438,9 +438,9 @@ public: } /** - * This method gets a service instance associated with a DNS browse (service instance enumeration) response. + * Gets a service instance associated with a DNS browse (service instance enumeration) response. * - * This method MUST only be used from `BrowseCallback`. + * MUST only be used from `BrowseCallback`. * * A response may include multiple service instance records. @p aIndex can be used to iterate through the list. * Index zero gives the the first record. When we reach end of the list, `kErrorNotFound` is returned. @@ -461,9 +461,9 @@ public: Error GetServiceInstance(uint16_t aIndex, char *aLabelBuffer, uint8_t aLabelBufferSize) const; /** - * This method gets info for a service instance from a DNS browse (service instance enumeration) response. + * Gets info for a service instance from a DNS browse (service instance enumeration) response. * - * This method MUST only be used from `BrowseCallback`. + * MUST only be used from `BrowseCallback`. * * A browse DNS response should include the SRV, TXT, and AAAA records for the service instances that are * enumerated (note that it is a SHOULD and not a MUST requirement). This method tries to retrieve this info @@ -488,9 +488,9 @@ public: Error GetServiceInfo(const char *aInstanceLabel, ServiceInfo &aServiceInfo) const; /** - * This method gets the host IPv6 address from a DNS browse (service instance enumeration) response. + * Gets the host IPv6 address from a DNS browse (service instance enumeration) response. * - * This method MUST only be used from `BrowseCallback`. + * MUST only be used from `BrowseCallback`. * * The response can include zero or more IPv6 address records. @p aIndex can be used to iterate through the * list of addresses. Index zero gets the first address and so on. When we reach end of the list, this method @@ -513,14 +513,14 @@ public: }; /** - * This type represents the function pointer callback which is called when a response for a service instance + * Represents the function pointer callback which is called when a response for a service instance * resolution DNS query is received. * */ typedef otDnsServiceCallback ServiceCallback; /** - * This type represents a service instance resolution DNS response. + * Represents a service instance resolution DNS response. * */ class ServiceResponse : public Response @@ -529,9 +529,9 @@ public: public: /** - * This method gets the service instance name associated with a DNS service instance resolution response. + * Gets the service instance name associated with a DNS service instance resolution response. * - * This method MUST only be used from `ServiceCallback`. + * MUST only be used from `ServiceCallback`. * * @param[out] aLabelBuffer A buffer to char array to output the service instance label (MUST NOT be NULL). * @param[in] aLabelBufferSize The size of @p aLabelBuffer. @@ -549,9 +549,9 @@ public: uint16_t aNameBufferSize) const; /** - * This method gets info for a service instance from a DNS service instance resolution response. + * Gets info for a service instance from a DNS service instance resolution response. * - * This method MUST only be used from `ServiceCallback`. + * MUST only be used from `ServiceCallback`. * * - If no matching SRV record is found, `kErrorNotFound` is returned. * - If a matching SRV record is found, @p aServiceInfo is updated and `kErrorNone` is returned. @@ -571,9 +571,9 @@ public: Error GetServiceInfo(ServiceInfo &aServiceInfo) const; /** - * This method gets the host IPv6 address from a DNS service instance resolution response. + * Gets the host IPv6 address from a DNS service instance resolution response. * - * This method MUST only be used from `ServiceCallback`. + * MUST only be used from `ServiceCallback`. * * The response can include zero or more IPv6 address records. @p aIndex can be used to iterate through the * list of addresses. Index zero gets the first address and so on. When we reach end of the list, this method @@ -595,7 +595,7 @@ public: #endif // OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -603,7 +603,7 @@ public: explicit Client(Instance &aInstance); /** - * This method starts the DNS client. + * Starts the DNS client. * * @retval kErrorNone Successfully started the DNS client. * @retval kErrorAlready The socket is already open. @@ -612,13 +612,13 @@ public: Error Start(void); /** - * This method stops the DNS client. + * Stops the DNS client. * */ void Stop(void); /** - * This method gets the current default query config being used by DNS client. + * Gets the current default query config being used by DNS client. * * @returns The current default query config. * @@ -626,7 +626,7 @@ public: const QueryConfig &GetDefaultConfig(void) const { return mDefaultConfig; } /** - * This method sets the default query config. + * Sets the default query config. * * @param[in] aQueryConfig The new default query config. * @@ -634,7 +634,7 @@ public: void SetDefaultConfig(const QueryConfig &aQueryConfig); /** - * This method resets the default config to the config used when the OpenThread stack starts. + * Resets the default config to the config used when the OpenThread stack starts. * * 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` @@ -644,7 +644,7 @@ public: void ResetDefaultConfig(void); /** - * This method sends an address resolution DNS query for AAAA (IPv6) record for a given host name. + * Sends an address resolution DNS query for AAAA (IPv6) record for a given host name. * * The @p aConfig can be nullptr. In this case the default config (from `GetDefaultConfig()`) will be used as * the config for this query. In a non-nullptr @p aConfig, some of the fields can be left unspecified (value zero). @@ -668,7 +668,7 @@ public: #if OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE /** - * This method sends an address resolution DNS query for A (IPv4) record for a given host name. + * Sends an address resolution DNS query for A (IPv4) record for a given host name. * * When a successful response is received, the addresses are returned from @p aCallback as NAT64 IPv6 translated * versions of the IPv4 addresses from the query response. @@ -697,7 +697,7 @@ public: #if OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE /** - * This method sends a browse (service instance enumeration) DNS query for a given service name. + * Sends a browse (service instance enumeration) DNS query for a given service name. * * The @p aConfig can be nullptr. In this case the default config (from `GetDefaultConfig()`) will be used as * the config for this query. In a non-nullptr @p aConfig, some of the fields can be left unspecified (value zero). @@ -718,7 +718,7 @@ public: const QueryConfig *aConfig = nullptr); /** - * This method starts a DNS service instance resolution for a given service instance. + * Starts a DNS service instance resolution for a given service instance. * * The @p aConfig can be `nullptr`. In this case the default config (from `GetDefaultConfig()`) will be used as * the config for this query. In a non-`nullptr` @p aConfig, some of the fields can be left unspecified (value @@ -742,7 +742,7 @@ public: const QueryConfig *aConfig = nullptr); /** - * This method starts a DNS service instance resolution for a given service instance, with a potential follow-up + * Starts a DNS service instance resolution for a given service instance, with a potential follow-up * host name resolution (if the server/resolver does not provide AAAA/A records for the host name in the response * to SRV query). * diff --git a/src/core/net/dns_dso.hpp b/src/core/net/dns_dso.hpp index 6ab6800ce..447fa509a 100644 --- a/src/core/net/dns_dso.hpp +++ b/src/core/net/dns_dso.hpp @@ -70,7 +70,7 @@ extern "C" void otPlatDsoHandleReceive(otPlatDsoConnection *aConnection, otMessa extern "C" void otPlatDsoHandleDisconnected(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMode aMode); /** - * This class implements DNS Stateful Operations (DSO). + * Implements DNS Stateful Operations (DSO). * */ class Dso : public InstanceLocator, private NonCopyable @@ -126,7 +126,7 @@ public: static constexpr uint32_t kMinServerInactivityWaitTime = TimeMilli::SecToMsec(5); /** - * This class represents a DSO TLV. + * Represents a DSO TLV. * */ OT_TOOL_PACKED_BEGIN @@ -141,7 +141,7 @@ public: static constexpr Type kEncryptionPaddingType = 3; ///< Encryption Padding TLV type. /** - * This method initializes the `Tlv` instance with a given type and length. + * Initializes the `Tlv` instance with a given type and length. * * @param[in] aType The TLV type. * @param[in] aLength The TLV length. @@ -154,7 +154,7 @@ public: } /** - * This method gets the TLV type. + * Gets the TLV type. * * @returns The TLV type. * @@ -162,7 +162,7 @@ public: Type GetType(void) const { return HostSwap16(mType); } /** - * This method gets the TLV length. + * Gets the TLV length. * * @returns The TLV length (in bytes). * @@ -170,7 +170,7 @@ public: uint16_t GetLength(void) const { return HostSwap16(mLength); } /** - * This method returns the total size of the TLV (including the type and length fields). + * Returns the total size of the TLV (including the type and length fields). * * @returns The total size (number of bytes) of the TLV. * @@ -183,7 +183,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class represents a DSO connection to a peer. + * Represents a DSO connection to a peer. * */ class Connection : public otPlatDsoConnection, @@ -202,7 +202,7 @@ public: typedef uint16_t MessageId; ///< This type represents a DSO Message Identifier. /** - * This enumeration defines the `Connection` states. + * Defines the `Connection` states. * */ enum State : uint8_t @@ -215,7 +215,7 @@ public: }; /** - * This enumeration defines the disconnect modes. + * Defines the disconnect modes. * */ enum DisconnectMode : uint8_t @@ -225,7 +225,7 @@ public: }; /** - * This enumeration defines the disconnect reason. + * Defines the disconnect reason. * */ enum DisconnectReason : uint8_t @@ -243,7 +243,7 @@ public: }; /** - * This class defines the callback functions used by a `Connection`. + * Defines the callback functions used by a `Connection`. * */ class Callbacks @@ -365,7 +365,7 @@ public: Tlv::Type aResponseTlvType, Tlv::Type aRequestTlvType); /** - * This constructor initializes a `Callbacks` object setting all the callback functions. + * Initializes a `Callbacks` object setting all the callback functions. * * @param[in] aHandleConnected The `HandleConnected` callback. * @param[in] aHandleSessionEstablished The `HandleSessionEstablished` callback. @@ -400,7 +400,7 @@ public: }; /** - * This constructor initializes a `Connection` instance. + * Initializes a `Connection` instance. * * The `kDefaultTimeout` will be used for @p aInactivityTimeout and @p aKeepAliveInterval. The * @p aKeepAliveInterval MUST NOT be less than `kMinKeepAliveInterval`. @@ -419,7 +419,7 @@ public: uint32_t aKeepAliveInterval = kDefaultTimeout); /** - * This method gets the current state of the `Connection`. + * Gets the current state of the `Connection`. * * @returns The `Connection` state. * @@ -427,7 +427,7 @@ public: State GetState(void) const { return mState; } /** - * This method returns the `Connection` peer socket address. + * Returns the `Connection` peer socket address. * * @returns The peer socket address. * @@ -435,7 +435,7 @@ public: const Ip6::SockAddr &GetPeerSockAddr(void) const { return mPeerSockAddr; } /** - * This method indicates whether or not the device is acting as a DSO server on this `Connection`. + * Indicates whether or not the device is acting as a DSO server on this `Connection`. * * Server is the software entity with a listening socket, awaiting incoming connection requests. * @@ -446,7 +446,7 @@ public: bool IsServer(void) const { return mIsServer; } /** - * This method indicates whether or not the device is acting as a DSO client on this `Connection`. + * Indicates whether or not the device is acting as a DSO client on this `Connection`. * * Client is the software entity that initiates a connection to the server's listening socket. * @@ -457,7 +457,7 @@ public: bool IsClient(void) const { return !mIsServer; } /** - * This method allocates a new DSO message. + * Allocates a new DSO message. * * @returns A pointer to the allocated message or `nullptr` if out of message buffers. * @@ -465,10 +465,10 @@ public: Message *NewMessage(void); /** - * This method requests the device to initiate a connection (connect as a client) to the peer (acting as a + * Requests the device to initiate a connection (connect as a client) to the peer (acting as a * server). * - * This method MUST be called when `Connection` is `kStateDisconnected` state. + * MUST be called when `Connection` is `kStateDisconnected` state. * * After calling `Connect()`, either * - `Callbacks::HandleConnected()` is invoked when connection is successfully established, or @@ -485,7 +485,7 @@ public: void Connect(void); /** - * This method requests the connection to be disconnected. + * Requests the connection to be disconnected. * * Note that calling `Disconnect()` does not trigger the `Callbacks::HandleDisconnected()` to be invoked (as * this callback is used when DSO module itself or the peer disconnects the connections). @@ -500,7 +500,7 @@ public: void Disconnect(DisconnectMode aMode, DisconnectReason aReason); /** - * This method returns the last disconnect reason. + * Returns the last disconnect reason. * * @returns The last disconnect reason. * @@ -508,14 +508,14 @@ public: DisconnectReason GetDisconnectReason(void) const { return mDisconnectReason; } /** - * This method implicitly marks the DSO session as established (set state to `kStateSessionEstablished`). + * Implicitly marks the DSO session as established (set state to `kStateSessionEstablished`). * - * This method MUST be called when `Connection is in `kStateConnectedButSessionless` state. + * MUST be called when `Connection is in `kStateConnectedButSessionless` state. * * The DSO module itself will mark the session as established after the first successful DSO message exchange * (sending a request message from client and receiving a response from server). * - * This method is intended for implicit DSO session establishment where it may be known in advance by some + * Is intended for implicit DSO session establishment where it may be known in advance by some * external means that both client and server support DSO and then the session may be established as soon as * the connection is established. * @@ -523,9 +523,9 @@ public: void MarkSessionEstablished(void); /** - * This method sends a DSO request message. + * Sends a DSO request message. * - * This method MUST be called when `Connection` is in certain states depending on whether it is acting as a + * MUST be called when `Connection` is in certain states depending on whether it is acting as a * client or server: * - On client, a request message can be sent after connection is established (`kStateConnectedButSessionless`). * The first request is used to establish the DSO session. While in `kStateEstablishingSession` or @@ -553,9 +553,9 @@ public: uint32_t aResponseTimeout = kResponseTimeout); /** - * This method sends a DSO unidirectional message. + * Sends a DSO unidirectional message. * - * This method MUST be called when session is established (in `kStateSessionEstablished` state). + * MUST be called when session is established (in `kStateSessionEstablished` state). * * Similar to `SendRequestMessage()` method, only TLV(s) need to be included in the message. The DNS header and * Encryption Padding TLV will be added by the DSO module. @@ -572,7 +572,7 @@ public: Error SendUnidirectionalMessage(Message &aMessage); /** - * This method sends a DSO response message for a received request message. + * Sends a DSO response message for a received request message. * * Similar to `SendRequestMessage()` method, only TLV(s) need to be included in the message. The DNS header and * Encryption Padding TLV will be added by DSO module. @@ -590,7 +590,7 @@ public: Error SendResponseMessage(Message &aMessage, MessageId aResponseId); /** - * This method returns the Keep Alive timeout interval (in msec). + * Returns the Keep Alive timeout interval (in msec). * * On client, this indicates the value granted by server, on server the value to grant. * @@ -600,7 +600,7 @@ public: uint32_t GetKeepAliveInterval(void) const { return mKeepAlive.GetInterval(); } /** - * This method returns the Inactivity timeout interval (in msec). + * Returns the Inactivity timeout interval (in msec). * * On client, this indicates the value granted by server, on server the value to grant. * @@ -610,9 +610,9 @@ public: uint32_t GetInactivityTimeout(void) const { return mInactivity.GetInterval(); } /** - * This method sends a Keep Alive message. + * Sends a Keep Alive message. * - * This method MUST be called when `Connection` is in certain states depending on whether it is acting as a + * MUST be called when `Connection` is in certain states depending on whether it is acting as a * client or server: * - On client, it can be called in any state after the connection is established. Sending Keep Alive message * can be used to initiate establishing DSO session. @@ -628,13 +628,13 @@ public: Error SendKeepAliveMessage(void); /** - * This method sets the Inactivity and Keep Alive timeout intervals. + * Sets the Inactivity and Keep Alive timeout intervals. * * On client, the specified timeout intervals are used in Keep Alive request message, i.e., they are the values * that client would wish to get. On server, the given timeout intervals specify the values that server would * grant to a client upon receiving a Keep Alive request from it. * - * This method can be called in any `Connection` state. If current state allows, calling this method will also + * Can be called in any `Connection` state. If current state allows, calling this method will also * trigger sending of a Keep Alive message (as if `SendKeepAliveMessage()` is also called). For states which * trigger the tx, see `SendKeepAliveMessage()`. * @@ -653,7 +653,7 @@ public: Error SetTimeouts(uint32_t aInactivityTimeout, uint32_t aKeepAliveInterval); /** - * This method enables/disables long-lived operation on the session. + * Enables/disables long-lived operation on the session. * * When a long-lived operation is active, the Inactivity timeout is always cleared, i.e., the DSO session stays * connected even if no messages are exchanged. @@ -664,9 +664,9 @@ public: void SetLongLivedOperation(bool aLongLivedOperation); /** - * This method sends a unidirectional Retry Delay message from server to client. + * Sends a unidirectional Retry Delay message from server to client. * - * This method MUST be used on a server only and when DSO session is already established, i.e., in state + * MUST be used on a server only and when DSO session is already established, i.e., in state * `kStateSessionEstablished`. It sends a unidirectional Retry Delay message to client requesting it to close * the connection and not connect again for at least the specified delay amount. * @@ -685,9 +685,9 @@ public: Dns::Header::Response aResponseCode = Dns::Header::kResponseSuccess); /** - * This method returns the requested retry delay interval (in msec) by server. + * Returns the requested retry delay interval (in msec) by server. * - * This method MUST be used after a `HandleDisconnected()` callback with `kReasonServerRetryDelayRequest` + * MUST be used after a `HandleDisconnected()` callback with `kReasonServerRetryDelayRequest` * * @returns The retry delay interval requested by server. * @@ -695,9 +695,9 @@ public: uint32_t GetRetryDelay(void) const { return mRetryDelay; } /** - * This method returns the DNS error code in the last retry delay message received on client from server. + * Returns the DNS error code in the last retry delay message received on client from server. * - * This method MUST be used after a `HandleDisconnected()` callback with `kReasonServerRetryDelayRequest` + * MUST be used after a `HandleDisconnected()` callback with `kReasonServerRetryDelayRequest` * * @returns The DNS error code in the last Retry Delay message received on client from server. * @@ -856,13 +856,13 @@ public: typedef Connection *(*AcceptHandler)(Instance &aInstance, const Ip6::SockAddr &aPeerSockAddr); /** - * This constructor initializes the `Dso` module. + * Initializes the `Dso` module. * */ explicit Dso(Instance &aInstance); /** - * This method starts listening for DSO connection requests from peers. + * Starts listening for DSO connection requests from peers. * * Once a connection request (from a peer) is received, the `Dso` module will invoke the `AcceptHandler` to * determine whether to accept or reject the request. @@ -873,13 +873,13 @@ public: void StartListening(AcceptHandler aAcceptHandler); /** - * This method stops listening for DSO connection requests from peers. + * Stops listening for DSO connection requests from peers. * */ void StopListening(void); /** - * This method finds a client `Connection` instance (being currently managed by the `Dso` module) matching a given + * Finds a client `Connection` instance (being currently managed by the `Dso` module) matching a given * peer socket address. * * @param[in] aPeerSockAddr The peer socket address. @@ -890,7 +890,7 @@ public: Connection *FindClientConnection(const Ip6::SockAddr &aPeerSockAddr); /** - * This method finds a server `Connection` instance (being currently managed by the `Dso` module) matching a given + * Finds a server `Connection` instance (being currently managed by the `Dso` module) matching a given * peer socket address. * * @param[in] aPeerSockAddr The peer socket address. diff --git a/src/core/net/dns_types.hpp b/src/core/net/dns_types.hpp index 19b9061ea..d2b2bcf32 100644 --- a/src/core/net/dns_types.hpp +++ b/src/core/net/dns_types.hpp @@ -73,7 +73,7 @@ using ot::Encoding::BigEndian::HostSwap32; */ /** - * This class implements DNS header generation and parsing. + * Implements DNS header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -87,7 +87,7 @@ public: Header(void) { Clear(); } /** - * This method returns the Message ID. + * Returns the Message ID. * * @returns The Message ID value. * @@ -95,7 +95,7 @@ public: uint16_t GetMessageId(void) const { return HostSwap16(mMessageId); } /** - * This method sets the Message ID. + * Sets the Message ID. * * @param[in] aMessageId The Message ID value. * @@ -103,7 +103,7 @@ public: void SetMessageId(uint16_t aMessageId) { mMessageId = HostSwap16(aMessageId); } /** - * This method sets the Message ID to a crypto-secure randomly generated number. + * Sets the Message ID to a crypto-secure randomly generated number. * * @retval kErrorNone Successfully generated random Message ID. * @retval kErrorFailed Could not generate random Message ID. @@ -122,7 +122,7 @@ public: }; /** - * This method returns the type of the message. + * Returns the type of the message. * * @returns The type of the message. * @@ -130,7 +130,7 @@ public: Type GetType(void) const { return static_cast((mFlags[0] & kQrFlagMask) >> kQrFlagOffset); } /** - * This method sets the type of the message. + * Sets the type of the message. * * @param[in] aType The type of the message. * @@ -156,7 +156,7 @@ public: }; /** - * This method returns the type of the query. + * Returns the type of the query. * * @returns The type of the query. * @@ -164,7 +164,7 @@ public: QueryType GetQueryType(void) const { return static_cast((mFlags[0] & kOpCodeMask) >> kOpCodeOffset); } /** - * This method sets the type of the query. + * Sets the type of the query. * * @param[in] aType The type of the query. * @@ -176,7 +176,7 @@ public: } /** - * This method specifies in response message if the responding name server is an + * Specifies in response message if the responding name server is an * authority for the domain name in question section. * * @returns True if Authoritative Answer flag (AA) is set in the header, false otherwise. @@ -185,19 +185,19 @@ public: bool IsAuthoritativeAnswerFlagSet(void) const { return (mFlags[0] & kAaFlagMask) == kAaFlagMask; } /** - * This method clears the Authoritative Answer flag (AA) in the header. + * Clears the Authoritative Answer flag (AA) in the header. * */ void ClearAuthoritativeAnswerFlag(void) { mFlags[0] &= ~kAaFlagMask; } /** - * This method sets the Authoritative Answer flag (AA) in the header. + * Sets the Authoritative Answer flag (AA) in the header. * */ void SetAuthoritativeAnswerFlag(void) { mFlags[0] |= kAaFlagMask; } /** - * This method specifies if message is truncated. + * Specifies if message is truncated. * * @returns True if Truncation flag (TC) is set in the header, false otherwise. * @@ -205,19 +205,19 @@ public: bool IsTruncationFlagSet(void) const { return (mFlags[0] & kTcFlagMask) == kTcFlagMask; } /** - * This method clears the Truncation flag (TC) in the header. + * Clears the Truncation flag (TC) in the header. * */ void ClearTruncationFlag(void) { mFlags[0] &= ~kTcFlagMask; } /** - * This method sets the Truncation flag (TC) in the header. + * Sets the Truncation flag (TC) in the header. * */ void SetTruncationFlag(void) { mFlags[0] |= kTcFlagMask; } /** - * This method specifies if resolver wants to direct the name server to pursue + * Specifies if resolver wants to direct the name server to pursue * the query recursively. * * @returns True if Recursion Desired flag (RD) is set in the header, false otherwise. @@ -226,19 +226,19 @@ public: bool IsRecursionDesiredFlagSet(void) const { return (mFlags[0] & kRdFlagMask) == kRdFlagMask; } /** - * This method clears the Recursion Desired flag (RD) in the header. + * Clears the Recursion Desired flag (RD) in the header. * */ void ClearRecursionDesiredFlag(void) { mFlags[0] &= ~kRdFlagMask; } /** - * This method sets the Recursion Desired flag (RD) in the header. + * Sets the Recursion Desired flag (RD) in the header. * */ void SetRecursionDesiredFlag(void) { mFlags[0] |= kRdFlagMask; } /** - * This method denotes whether recursive query support is available in the name server. + * Denotes whether recursive query support is available in the name server. * * @returns True if Recursion Available flag (RA) is set in the header, false otherwise. * @@ -246,13 +246,13 @@ public: bool IsRecursionAvailableFlagSet(void) const { return (mFlags[1] & kRaFlagMask) == kRaFlagMask; } /** - * This method clears the Recursion Available flag (RA) in the header. + * Clears the Recursion Available flag (RA) in the header. * */ void ClearRecursionAvailableFlag(void) { mFlags[1] &= ~kRaFlagMask; } /** - * This method sets the Recursion Available flag (RA) in the header. + * Sets the Recursion Available flag (RA) in the header. * */ void SetRecursionAvailableFlag(void) { mFlags[1] |= kRaFlagMask; } @@ -281,7 +281,7 @@ public: }; /** - * This method returns the response code. + * Returns the response code. * * @returns The response code from the header. * @@ -289,7 +289,7 @@ public: Response GetResponseCode(void) const { return static_cast((mFlags[1] & kRCodeMask) >> kRCodeOffset); } /** - * This method sets the response code. + * Sets the response code. * * @param[in] aResponse The type of the response. * @@ -301,7 +301,7 @@ public: } /** - * This method converts a Response Code into a related `Error`. + * Converts a Response Code into a related `Error`. * * - kResponseSuccess (0) : Success (no error condition) -> kErrorNone * - kResponseFormatError (1) : Server unable to interpret due to format error -> kErrorParse @@ -326,7 +326,7 @@ public: static Error ResponseCodeToError(Response aResponse); /** - * This method returns the number of entries in question section. + * Returns the number of entries in question section. * * @returns The number of entries in question section. * @@ -334,7 +334,7 @@ public: uint16_t GetQuestionCount(void) const { return HostSwap16(mQdCount); } /** - * This method sets the number of entries in question section. + * Sets the number of entries in question section. * * @param[in] aCount The number of entries in question section. * @@ -342,7 +342,7 @@ public: void SetQuestionCount(uint16_t aCount) { mQdCount = HostSwap16(aCount); } /** - * This method returns the number of entries in answer section. + * Returns the number of entries in answer section. * * @returns The number of entries in answer section. * @@ -350,7 +350,7 @@ public: uint16_t GetAnswerCount(void) const { return HostSwap16(mAnCount); } /** - * This method sets the number of entries in answer section. + * Sets the number of entries in answer section. * * @param[in] aCount The number of entries in answer section. * @@ -358,7 +358,7 @@ public: void SetAnswerCount(uint16_t aCount) { mAnCount = HostSwap16(aCount); } /** - * This method returns the number of entries in authority records section. + * Returns the number of entries in authority records section. * * @returns The number of entries in authority records section. * @@ -366,7 +366,7 @@ public: uint16_t GetAuthorityRecordCount(void) const { return HostSwap16(mNsCount); } /** - * This method sets the number of entries in authority records section. + * Sets the number of entries in authority records section. * * @param[in] aCount The number of entries in authority records section. * @@ -374,7 +374,7 @@ public: void SetAuthorityRecordCount(uint16_t aCount) { mNsCount = HostSwap16(aCount); } /** - * This method returns the number of entries in additional records section. + * Returns the number of entries in additional records section. * * @returns The number of entries in additional records section. * @@ -382,7 +382,7 @@ public: uint16_t GetAdditionalRecordCount(void) const { return HostSwap16(mArCount); } /** - * This method sets the number of entries in additional records section. + * Sets the number of entries in additional records section. * * @param[in] aCount The number of entries in additional records section. * @@ -416,7 +416,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements DNS Update message header generation and parsing. + * Implements DNS Update message header generation and parsing. * * The DNS header specifies record counts for its four sections: Question, Answer, Authority, and Additional. A DNS * Update header uses the same fields, and the same section formats, but the naming and use of these sections differs: @@ -434,7 +434,7 @@ public: UpdateHeader(void) { SetQueryType(kQueryTypeUpdate); } /** - * This method returns the number of records in Zone section. + * Returns the number of records in Zone section. * * @returns The number of records in Zone section. * @@ -442,7 +442,7 @@ public: uint16_t GetZoneRecordCount(void) const { return GetQuestionCount(); } /** - * This method sets the number of records in Zone section. + * Sets the number of records in Zone section. * * @param[in] aCount The number of records in Zone section. * @@ -450,7 +450,7 @@ public: void SetZoneRecordCount(uint16_t aCount) { SetQuestionCount(aCount); } /** - * This method returns the number of records in Prerequisite section. + * Returns the number of records in Prerequisite section. * * @returns The number of records in Prerequisite section. * @@ -458,7 +458,7 @@ public: uint16_t GetPrerequisiteRecordCount(void) const { return GetAnswerCount(); } /** - * This method sets the number of records in Prerequisite section. + * Sets the number of records in Prerequisite section. * * @param[in] aCount The number of records in Prerequisite section. * @@ -466,7 +466,7 @@ public: void SetPrerequisiteRecordCount(uint16_t aCount) { SetAnswerCount(aCount); } /** - * This method returns the number of records in Update section. + * Returns the number of records in Update section. * * @returns The number of records in Update section. * @@ -474,7 +474,7 @@ public: uint16_t GetUpdateRecordCount(void) const { return GetAuthorityRecordCount(); } /** - * This method sets the number of records in Update section. + * Sets the number of records in Update section. * * @param[in] aCount The number of records in Update section. * @@ -484,7 +484,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class represents a DNS name and implements helper methods for encoding/decoding of DNS Names. + * Represents a DNS name and implements helper methods for encoding/decoding of DNS Names. * */ class Name : public Clearable @@ -517,7 +517,7 @@ public: static constexpr char kLabelSeparatorChar = '.'; /** - * This enumeration represents the name type. + * Represents the name type. * */ enum Type : uint8_t @@ -528,7 +528,7 @@ public: }; /** - * This constructor initializes the `Name` object as empty (not specified). + * Initializes the `Name` object as empty (not specified). * */ Name(void) @@ -537,7 +537,7 @@ public: } /** - * This constructor initializes the `Name` object with a given string. + * Initializes the `Name` object with a given string. * * @param[in] aString A C string specifying the name (dot '.' separated sequence of labels'). * @@ -548,7 +548,7 @@ public: } /** - * This constructor initializes the `Name` object from a message at a given offset. + * Initializes the `Name` object from a message at a given offset. * * @param[in] aMessage The message containing the encoded name. `aMessage.GetOffset()` MUST point to the start of * the DNS header in the message (used to parse compressed name). @@ -561,7 +561,7 @@ public: } /** - * This method indicates whether the name is empty (not specified). + * Indicates whether the name is empty (not specified). * * @returns TRUE if the name is empty, FALSE otherwise. * @@ -569,7 +569,7 @@ public: bool IsEmpty(void) const { return (mString == nullptr) && (mMessage == nullptr); } /** - * This method indicates whether the name is specified from a C string. + * Indicates whether the name is specified from a C string. * * @returns TRUE if the name is specified from a string, FALSE otherwise. * @@ -577,7 +577,7 @@ public: bool IsFromCString(void) const { return mString != nullptr; } /** - * This method indicates whether the name is specified from a message. + * Indicates whether the name is specified from a message. * * @returns TRUE if the name is specified from a message, FALSE otherwise. * @@ -585,7 +585,7 @@ public: bool IsFromMessage(void) const { return mMessage != nullptr; } /** - * This method gets the type of `Name` object indicating whether it is empty, specified by a C string or from a + * Gets the type of `Name` object indicating whether it is empty, specified by a C string or from a * message * * @returns The name type. @@ -597,7 +597,7 @@ public: } /** - * This method sets the name from a given C string. + * Sets the name from a given C string. * * @param[in] aString A C string specifying the name (dot '.' separated sequence of labels). * @@ -609,7 +609,7 @@ public: } /** - * This method sets the name from a message at a given offset. + * Sets the name from a message at a given offset. * * @param[in] aMessage The message containing the encoded name. `aMessage.GetOffset()` MUST point to the start of * the DNS header in the message (used to parse compressed name). @@ -624,9 +624,9 @@ public: } /** - * This method gets the name as a C string. + * Gets the name as a C string. * - * This method MUST be used only when the type is `kTypeString`. Otherwise its behavior is undefined. + * MUST be used only when the type is `kTypeString`. Otherwise its behavior is undefined. * * @returns A pointer to the C string. * @@ -634,9 +634,9 @@ public: const char *GetAsCString(void) const { return mString; } /** - * This method gets the name message and offset. + * Gets the name message and offset. * - * This method MUST be used only when the type is `kTypeMessage`. Otherwise its behavior is undefined. + * MUST be used only when the type is `kTypeMessage`. Otherwise its behavior is undefined. * * @param[out] aOffset A reference to a variable to output the offset of the start of the name in the message. * @@ -650,7 +650,7 @@ public: } /** - * This method encodes and appends the name to a message. + * Encodes and appends the name to a message. * * If the name is empty (not specified), then root "." is appended to @p aMessage. If the name is from a C string * then the string is checked and appended (similar to static `AppendName(const char *aName, Message &)` method). @@ -668,7 +668,7 @@ public: Error AppendTo(Message &aMessage) const; /** - * This static method encodes and appends a single name label to a message. + * Encodes and appends a single name label to a message. * * The @p aLabel is assumed to contain a single name label as a C string (null-terminated). Unlike * `AppendMultipleLabels()` which parses the label string and treats it as sequence of multiple (dot-separated) @@ -687,7 +687,7 @@ public: static Error AppendLabel(const char *aLabel, Message &aMessage); /** - * This static method encodes and appends a single name label of specified length to a message. + * Encodes and appends a single name label of specified length to a message. * * The @p aLabel is assumed to contain a single name label of given @p aLength. @p aLabel must not contain * '\0' characters within the length @p aLength. Unlike `AppendMultipleLabels()` which parses the label string @@ -707,12 +707,12 @@ public: static Error AppendLabel(const char *aLabel, uint8_t aLength, Message &aMessage); /** - * This static method encodes and appends a sequence of name labels to a given message. + * Encodes and appends a sequence of name labels to a given message. * * The @p aLabels must follow "..", i.e., a sequence of labels separated by dot '.' char. * E.g., "_http._tcp", "_http._tcp." (same as previous one), "host-1.test". * - * This method validates that the @p aLabels is a valid name format, i.e., no empty label, and labels are + * Validates that the @p aLabels is a valid name format, i.e., no empty label, and labels are * `kMaxLabelLength` (63) characters or less. * * @note This method NEVER adds a label terminator (empty label) to the message, even in the case where @p aLabels @@ -729,16 +729,16 @@ public: static Error AppendMultipleLabels(const char *aLabels, Message &aMessage); /** - * This static method encodes and appends a sequence of name labels within the specified length to a given message. - * This method stops appending labels if @p aLength characters are read or '\0' is found before @p aLength + * Encodes and appends a sequence of name labels within the specified length to a given message. + * Stops appending labels if @p aLength characters are read or '\0' is found before @p aLength * characters. * - * This method is useful for appending a number of labels of the name instead of appending all labels. + * Is useful for appending a number of labels of the name instead of appending all labels. * * The @p aLabels must follow "..", i.e., a sequence of labels separated by dot '.' char. * E.g., "_http._tcp", "_http._tcp." (same as previous one), "host-1.test". * - * This method validates that the @p aLabels is a valid name format, i.e., no empty label, and labels are + * Validates that the @p aLabels is a valid name format, i.e., no empty label, and labels are * `kMaxLabelLength` (63) characters or less. * * @note This method NEVER adds a label terminator (empty label) to the message, even in the case where @p aLabels @@ -756,7 +756,7 @@ public: static Error AppendMultipleLabels(const char *aLabels, uint8_t aLength, Message &aMessage); /** - * This static method appends a name label terminator to a message. + * Appends a name label terminator to a message. * * An encoded name is terminated by an empty label (a zero byte). * @@ -769,7 +769,7 @@ public: static Error AppendTerminator(Message &aMessage); /** - * This static method appends a pointer type name label to a message. + * Appends a pointer type name label to a message. * * Pointer label is used for name compression. It allows an entire name or a list of labels at the end of an * encoded name to be replaced with a pointer to a prior occurrence of the same name within the message. @@ -784,12 +784,12 @@ public: static Error AppendPointerLabel(uint16_t aOffset, Message &aMessage); /** - * This static method encodes and appends a full name to a message. + * Encodes and appends a full name to a message. * * The @p aName must follow "..", i.e., a sequence of labels separated by dot '.' char. * E.g., "example.com", "example.com." (same as previous one), "local.", "default.service.arpa", "." or "" (root). * - * This method validates that the @p aName is a valid name format, i.e. no empty labels, and labels are + * Validates that the @p aName is a valid name format, i.e. no empty labels, and labels are * `kMaxLabelLength` (63) characters or less, and the name is `kMaxLength` (255) characters or less. * * @param[in] aName A name string. Can be `nullptr` (then treated as "." or root). @@ -803,7 +803,7 @@ public: static Error AppendName(const char *aName, Message &aMessage); /** - * This static method parses and skips over a full name in a message. + * Parses and skips over a full name in a message. * * @param[in] aMessage The message to parse the name from. `aMessage.GetOffset()` MUST point to * the start of DNS header (this is used to handle compressed names). @@ -818,9 +818,9 @@ public: static Error ParseName(const Message &aMessage, uint16_t &aOffset); /** - * This static method reads a name label from a message. + * Reads a name label from a message. * - * This method can be used to read labels one by one in a name. After a successful label read, @p aOffset is + * Can be used to read labels one by one in a name. After a successful label read, @p aOffset is * updated to point to the start of the next label. When we reach the end of the name, kErrorNotFound is * returned. This method handles compressed names which use pointer labels. So as the labels in a name are read, * the @p aOffset may jump back in the message and at the end the @p aOffset does not necessarily point to the end @@ -848,12 +848,12 @@ public: static Error ReadLabel(const Message &aMessage, uint16_t &aOffset, char *aLabelBuffer, uint8_t &aLabelLength); /** - * This static method reads a full name from a message. + * Reads a full name from a message. * * On successful read, the read name follows "...", i.e., a sequence of labels separated by * dot '.' character. The read name will ALWAYS end with a dot. * - * This method verifies that the read labels in message do not contain any dot character, otherwise it returns + * Verifies that the read labels in message do not contain any dot character, otherwise it returns * `kErrorParse`). * * @param[in] aMessage The message to read the name from. `aMessage.GetOffset()` MUST point to @@ -872,9 +872,9 @@ public: static Error ReadName(const Message &aMessage, uint16_t &aOffset, char *aNameBuffer, uint16_t aNameBufferSize); /** - * This static method compares a single name label from a message with a given label string. + * Compares a single name label from a message with a given label string. * - * This method can be used to compare labels one by one. It checks whether the label read from @p aMessage matches + * Can be used to compare labels one by one. It checks whether the label read from @p aMessage matches * @p aLabel string (case-insensitive comparison). * * Unlike `CompareName()` which requires the labels in the the name string to contain no dot '.' character, this @@ -896,9 +896,9 @@ public: static Error CompareLabel(const Message &aMessage, uint16_t &aOffset, const char *aLabel); /** - * This static method parses and compares a full name from a message with a given name. + * Parses and compares a full name from a message with a given name. * - * This method checks whether the encoded name in a message matches a given name string (using case-insensitive + * Checks whether the encoded name in a message matches a given name string (using case-insensitive * comparison). It checks the name in the message in place and handles compressed names. If the name read from the * message does not match @p aName, it returns `kErrorNotFound`. `kErrorNone` indicates that the name matches * @p aName. @@ -924,9 +924,9 @@ public: static Error CompareName(const Message &aMessage, uint16_t &aOffset, const char *aName); /** - * This static method parses and compares a full name from a message with a name from another message. + * Parses and compares a full name from a message with a name from another message. * - * This method checks whether the encoded name in @p aMessage matches the name from @p aMessage2 (using + * Checks whether the encoded name in @p aMessage matches the name from @p aMessage2 (using * case-insensitive comparison). It compares the names in both messages in place and handles compressed names. Note * that this method works correctly even when the same message instance is used for both @p aMessage and * @p aMessage2 (e.g., at different offsets). @@ -957,7 +957,7 @@ public: static Error CompareName(const Message &aMessage, uint16_t &aOffset, const Message &aMessage2, uint16_t aOffset2); /** - * This static method parses and compares a full name from a message with a given name (using case-insensitive + * Parses and compares a full name from a message with a given name (using case-insensitive * comparison). * * If @p aName is empty (not specified), then any name in @p aMessage is considered a match to it. @@ -978,7 +978,7 @@ public: static Error CompareName(const Message &aMessage, uint16_t &aOffset, const Name &aName); /** - * This static method tests if a DNS name is a sub-domain of a given domain. + * Tests if a DNS name is a sub-domain of a given domain. * * Both @p aName and @p aDomain can end without dot ('.'). * @@ -991,7 +991,7 @@ public: static bool IsSubDomainOf(const char *aName, const char *aDomain); /** - * This static method tests if the two DNS name are the same domain. + * Tests if the two DNS name are the same domain. * * Both @p aDomain1 and @p aDomain2 can end without dot ('.'). * @@ -1062,7 +1062,7 @@ private: }; /** - * This type represents a TXT record entry representing a key/value pair (RFC 6763 - section 6.3). + * Represents a TXT record entry representing a key/value pair (RFC 6763 - section 6.3). * */ class TxtEntry : public otDnsTxtEntry @@ -1083,7 +1083,7 @@ public: static constexpr uint8_t kMaxKeyLength = OT_DNS_TXT_KEY_MAX_LENGTH; /** - * This class represents an iterator for TXT record entries (key/value pairs). + * Represents an iterator for TXT record entries (key/value pairs). * */ class Iterator : public otDnsTxtEntryIterator @@ -1092,7 +1092,7 @@ public: public: /** - * This method initializes a TXT record iterator. + * Initializes a TXT record iterator. * * The buffer pointer @p aTxtData and its content MUST persist and remain unchanged while the iterator object * is being used. @@ -1104,7 +1104,7 @@ public: void Init(const uint8_t *aTxtData, uint16_t aTxtDataLength); /** - * This method parses the TXT data from the `Iterator` and gets the next TXT record entry (key/value pair). + * Parses the TXT data from the `Iterator` and gets the next TXT record entry (key/value pair). * * The `Iterator` instance MUST be initialized using `Init()` before calling this method and the TXT data * buffer used to initialize the iterator MUST persist and remain unchanged. @@ -1144,7 +1144,7 @@ public: TxtEntry(void) = default; /** - * This constructor initializes a `TxtEntry` object. + * Initializes a `TxtEntry` object. * * @param[in] aKey A pointer to the key string. * @param[in] aValue A pointer to a buffer containing the value. @@ -1154,7 +1154,7 @@ public: TxtEntry(const char *aKey, const uint8_t *aValue, uint8_t aValueLength) { Init(aKey, aValue, aValueLength); } /** - * This method initializes a `TxtEntry` object. + * Initializes a `TxtEntry` object. * * @param[in] aKey A pointer to the key string. * @param[in] aValue A pointer to a buffer containing the value. @@ -1169,7 +1169,7 @@ public: } /** - * This method encodes and appends the `TxtEntry` to a message. + * Encodes and appends the `TxtEntry` to a message. * * @param[in] aMessage The message to append to. * @@ -1181,7 +1181,7 @@ public: Error AppendTo(Message &aMessage) const; /** - * This static method appends an array of `TxtEntry` items to a message. + * Appends an array of `TxtEntry` items to a message. * * @param[in] aEntries A pointer to array of `TxtEntry` items. * @param[in] aNumEntries The number of entries in @p aEntries array. @@ -1195,7 +1195,7 @@ public: static Error AppendEntries(const TxtEntry *aEntries, uint8_t aNumEntries, Message &aMessage); /** - * This static method appends an array of `TxtEntry` items to a `MutableData` buffer. + * Appends an array of `TxtEntry` items to a `MutableData` buffer. * * @param[in] aEntries A pointer to array of `TxtEntry` items. * @param[in] aNumEntries The number of entries in @p aEntries array. @@ -1217,7 +1217,7 @@ private: }; /** - * This class implements Resource Record (RR) body format. + * Implements Resource Record (RR) body format. * */ OT_TOOL_PACKED_BEGIN @@ -1246,9 +1246,9 @@ public: static constexpr uint16_t kClassAny = 255; ///< Class code Any (ANY). /** - * This method initializes the resource record by setting its type and class. + * Initializes the resource record by setting its type and class. * - * This method only sets the type and class fields. Other fields (TTL and length) remain unchanged/uninitialized. + * Only sets the type and class fields. Other fields (TTL and length) remain unchanged/uninitialized. * * @param[in] aType The type of the resource record. * @param[in] aClass The class of the resource record (default is `kClassInternet`). @@ -1261,7 +1261,7 @@ public: } /** - * This method indicates whether the resources records matches a given type and class code. + * Indicates whether the resources records matches a given type and class code. * * @param[in] aType The resource record type to compare with. * @param[in] aClass The resource record class code to compare with (default is `kClassInternet`). @@ -1275,7 +1275,7 @@ public: } /** - * This method returns the type of the resource record. + * Returns the type of the resource record. * * @returns The type of the resource record. * @@ -1283,7 +1283,7 @@ public: uint16_t GetType(void) const { return HostSwap16(mType); } /** - * This method sets the type of the resource record. + * Sets the type of the resource record. * * @param[in] aType The type of the resource record. * @@ -1291,7 +1291,7 @@ public: void SetType(uint16_t aType) { mType = HostSwap16(aType); } /** - * This method returns the class of the resource record. + * Returns the class of the resource record. * * @returns The class of the resource record. * @@ -1299,7 +1299,7 @@ public: uint16_t GetClass(void) const { return HostSwap16(mClass); } /** - * This method sets the class of the resource record. + * Sets the class of the resource record. * * @param[in] aClass The class of the resource record. * @@ -1307,7 +1307,7 @@ public: void SetClass(uint16_t aClass) { mClass = HostSwap16(aClass); } /** - * This method returns the time to live field of the resource record. + * Returns the time to live field of the resource record. * * @returns The time to live field of the resource record. * @@ -1315,7 +1315,7 @@ public: uint32_t GetTtl(void) const { return HostSwap32(mTtl); } /** - * This method sets the time to live field of the resource record. + * Sets the time to live field of the resource record. * * @param[in] aTtl The time to live field of the resource record. * @@ -1323,7 +1323,7 @@ public: void SetTtl(uint32_t aTtl) { mTtl = HostSwap32(aTtl); } /** - * This method returns the length of the resource record data. + * Returns the length of the resource record data. * * @returns The length of the resource record data. * @@ -1331,7 +1331,7 @@ public: uint16_t GetLength(void) const { return HostSwap16(mLength); } /** - * This method sets the length of the resource record data. + * Sets the length of the resource record data. * * @param[in] aLength The length of the resource record data. * @@ -1339,7 +1339,7 @@ public: void SetLength(uint16_t aLength) { mLength = HostSwap16(aLength); } /** - * This method returns the size of (number of bytes) in resource record and its data RDATA section (excluding the + * Returns the size of (number of bytes) in resource record and its data RDATA section (excluding the * name field). * * @returns Size (number of bytes) of resource record and its data section (excluding the name field) @@ -1348,7 +1348,7 @@ public: uint32_t GetSize(void) const { return sizeof(ResourceRecord) + GetLength(); } /** - * This static method parses and skips over a given number of resource records in a message from a given offset. + * Parses and skips over a given number of resource records in a message from a given offset. * * @param[in] aMessage The message from which to parse/read the resource records. `aMessage.GetOffset()` * MUST point to the start of DNS header. @@ -1364,7 +1364,7 @@ public: static Error ParseRecords(const Message &aMessage, uint16_t &aOffset, uint16_t aNumRecords); /** - * This static method searches in a given message to find the first resource record matching a given record name. + * Searches in a given message to find the first resource record matching a given record name. * * @param[in] aMessage The message in which to search for a matching resource record. * `aMessage.GetOffset()` MUST point to the start of DNS header. @@ -1389,7 +1389,7 @@ public: * This template static method searches in a message to find the i-th occurrence of resource records of specific * type with a given record name and if found, reads the record from the message. * - * This method searches in @p aMessage starting from @p aOffset up to maximum of @p aNumRecords, for the + * Searches in @p aMessage starting from @p aOffset up to maximum of @p aNumRecords, for the * `(aIndex+1)`th occurrence of a resource record of `RecordType` with record name @p aName. * * On success (i.e., when a matching record is found and read from the message), @p aOffset is updated to point @@ -1433,10 +1433,10 @@ public: * This template static method tries to read a resource record of a given type from a message. If the record type * does not matches the type, it skips over the record. * - * This method requires the record name to be already parsed/read from the message. On input, @p aOffset should + * Requires the record name to be already parsed/read from the message. On input, @p aOffset should * point to the start of the `ResourceRecord` fields (type, class, TTL, data length) in @p aMessage. * - * This method verifies that the record is well-formed in the message. It then reads the record type and compares + * Verifies that the record is well-formed in the message. It then reads the record type and compares * it with `RecordType::kType` and ensures that the record size is at least `sizeof(RecordType)`. If it all matches, * the record is read into @p aRecord. * @@ -1506,7 +1506,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Resource Record body format of A type. + * Implements Resource Record body format of A type. * */ OT_TOOL_PACKED_BEGIN @@ -1516,7 +1516,7 @@ public: static constexpr uint16_t kType = kTypeA; ///< The A record type. /** - * This method initializes the A Resource Record by setting its type, class, and length. + * Initializes the A Resource Record by setting its type, class, and length. * * Other record fields (TTL, address) remain unchanged/uninitialized. * @@ -1528,7 +1528,7 @@ public: } /** - * This method sets the IPv4 address of the resource record. + * Sets the IPv4 address of the resource record. * * @param[in] aAddress The IPv4 address of the resource record. * @@ -1536,7 +1536,7 @@ public: void SetAddress(const Ip4::Address &aAddress) { mAddress = aAddress; } /** - * This method returns the reference to IPv4 address of the resource record. + * Returns the reference to IPv4 address of the resource record. * * @returns The reference to IPv4 address of the resource record. * @@ -1548,7 +1548,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Resource Record body format of CNAME type. + * Implements Resource Record body format of CNAME type. * */ OT_TOOL_PACKED_BEGIN @@ -1558,7 +1558,7 @@ public: static constexpr uint16_t kType = kTypeCname; ///< The CNAME record type. /** - * This method initializes the CNAME Resource Record by setting its type and class. + * Initializes the CNAME Resource Record by setting its type and class. * * Other record fields (TTL, length) remain unchanged/uninitialized. * @@ -1568,9 +1568,9 @@ public: void Init(uint16_t aClass = kClassInternet) { ResourceRecord::Init(kTypeCname, aClass); } /** - * This method parses and reads the CNAME alias name from a message. + * Parses and reads the CNAME alias name from a message. * - * This method also verifies that the CNAME record is well-formed (e.g., the record data length `GetLength()` + * Also verifies that the CNAME record is well-formed (e.g., the record data length `GetLength()` * matches the CNAME encoded name). * * @param[in] aMessage The message to read from. `aMessage.GetOffset()` MUST point to the start of @@ -1599,7 +1599,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements Resource Record body format of PTR type. + * Implements Resource Record body format of PTR type. * */ OT_TOOL_PACKED_BEGIN @@ -1609,7 +1609,7 @@ public: static constexpr uint16_t kType = kTypePtr; ///< The PTR record type. /** - * This method initializes the PTR Resource Record by setting its type and class. + * Initializes the PTR Resource Record by setting its type and class. * * Other record fields (TTL, length) remain unchanged/uninitialized. * @@ -1619,9 +1619,9 @@ public: void Init(uint16_t aClass = kClassInternet) { ResourceRecord::Init(kTypePtr, aClass); } /** - * This method parses and reads the PTR name from a message. + * Parses and reads the PTR name from a message. * - * This method also verifies that the PTR record is well-formed (e.g., the record data length `GetLength()` matches + * Also verifies that the PTR record is well-formed (e.g., the record data length `GetLength()` matches * the PTR encoded name). * * @param[in] aMessage The message to read from. `aMessage.GetOffset()` MUST point to the start of @@ -1646,9 +1646,9 @@ public: } /** - * This method parses and reads the PTR name from a message. + * Parses and reads the PTR name from a message. * - * This method also verifies that the PTR record is well-formed (e.g., the record data length `GetLength()` matches + * Also verifies that the PTR record is well-formed (e.g., the record data length `GetLength()` matches * the PTR encoded name). * * Unlike the previous method which reads the entire PTR name into a single char buffer, this method reads the @@ -1684,7 +1684,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements Resource Record body format of TXT type. + * Implements Resource Record body format of TXT type. * */ OT_TOOL_PACKED_BEGIN @@ -1694,7 +1694,7 @@ public: static constexpr uint16_t kType = kTypeTxt; ///< The TXT record type. /** - * This method initializes the TXT Resource Record by setting its type and class. + * Initializes the TXT Resource Record by setting its type and class. * * Other record fields (TTL, length) remain unchanged/uninitialized. * @@ -1704,9 +1704,9 @@ public: void Init(uint16_t aClass = kClassInternet) { ResourceRecord::Init(kTypeTxt, aClass); } /** - * This method parses and reads the TXT record data from a message. + * Parses and reads the TXT record data from a message. * - * This method also checks if the TXT data is well-formed by calling `VerifyTxtData()` when it is successfully + * Also checks if the TXT data is well-formed by calling `VerifyTxtData()` when it is successfully * read. * * @param[in] aMessage The message to read from. @@ -1728,7 +1728,7 @@ public: Error ReadTxtData(const Message &aMessage, uint16_t &aOffset, uint8_t *aTxtBuffer, uint16_t &aTxtBufferSize) const; /** - * This static method tests if a buffer contains valid encoded TXT data. + * Tests if a buffer contains valid encoded TXT data. * * @param[in] aTxtData The TXT data buffer. * @param[in] aTxtLength The length of the TXT data buffer. @@ -1742,7 +1742,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements Resource Record body format of AAAA type. + * Implements Resource Record body format of AAAA type. * */ OT_TOOL_PACKED_BEGIN @@ -1752,7 +1752,7 @@ public: static constexpr uint16_t kType = kTypeAaaa; ///< The AAAA record type. /** - * This method initializes the AAAA Resource Record by setting its type, class, and length. + * Initializes the AAAA Resource Record by setting its type, class, and length. * * Other record fields (TTL, address) remain unchanged/uninitialized. * @@ -1764,7 +1764,7 @@ public: } /** - * This method tells whether this is a valid AAAA record. + * Tells whether this is a valid AAAA record. * * @returns A boolean indicates whether this is a valid AAAA record. * @@ -1772,7 +1772,7 @@ public: bool IsValid(void) const; /** - * This method sets the IPv6 address of the resource record. + * Sets the IPv6 address of the resource record. * * @param[in] aAddress The IPv6 address of the resource record. * @@ -1780,7 +1780,7 @@ public: void SetAddress(const Ip6::Address &aAddress) { mAddress = aAddress; } /** - * This method returns the reference to IPv6 address of the resource record. + * Returns the reference to IPv6 address of the resource record. * * @returns The reference to IPv6 address of the resource record. * @@ -1792,7 +1792,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Resource Record body format of SRV type (RFC 2782). + * Implements Resource Record body format of SRV type (RFC 2782). * */ OT_TOOL_PACKED_BEGIN @@ -1802,7 +1802,7 @@ public: static constexpr uint16_t kType = kTypeSrv; ///< The SRV record type. /** - * This method initializes the SRV Resource Record by settings its type and class. + * Initializes the SRV Resource Record by settings its type and class. * * Other record fields (TTL, length, propriety, weight, port, ...) remain unchanged/uninitialized. * @@ -1812,7 +1812,7 @@ public: void Init(uint16_t aClass = kClassInternet) { ResourceRecord::Init(kTypeSrv, aClass); } /** - * This method returns the SRV record's priority value. + * Returns the SRV record's priority value. * * @returns The priority value. * @@ -1820,7 +1820,7 @@ public: uint16_t GetPriority(void) const { return HostSwap16(mPriority); } /** - * This method sets the SRV record's priority value. + * Sets the SRV record's priority value. * * @param[in] aPriority The priority value. * @@ -1828,7 +1828,7 @@ public: void SetPriority(uint16_t aPriority) { mPriority = HostSwap16(aPriority); } /** - * This method returns the SRV record's weight value. + * Returns the SRV record's weight value. * * @returns The weight value. * @@ -1836,7 +1836,7 @@ public: uint16_t GetWeight(void) const { return HostSwap16(mWeight); } /** - * This method sets the SRV record's weight value. + * Sets the SRV record's weight value. * * @param[in] aWeight The weight value. * @@ -1844,7 +1844,7 @@ public: void SetWeight(uint16_t aWeight) { mWeight = HostSwap16(aWeight); } /** - * This method returns the SRV record's port number on the target host for this service. + * Returns the SRV record's port number on the target host for this service. * * @returns The port number. * @@ -1852,7 +1852,7 @@ public: uint16_t GetPort(void) const { return HostSwap16(mPort); } /** - * This method sets the SRV record's port number on the target host for this service. + * Sets the SRV record's port number on the target host for this service. * * @param[in] aPort The port number. * @@ -1860,9 +1860,9 @@ public: void SetPort(uint16_t aPort) { mPort = HostSwap16(aPort); } /** - * This method parses and reads the SRV target host name from a message. + * Parses and reads the SRV target host name from a message. * - * This method also verifies that the SRV record is well-formed (e.g., the record data length `GetLength()` matches + * Also verifies that the SRV record is well-formed (e.g., the record data length `GetLength()` matches * the SRV encoded name). * * @param[in] aMessage The message to read from. `aMessage.GetOffset()` MUST point to the start of @@ -1898,7 +1898,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Resource Record body format of KEY type (RFC 2535). + * Implements Resource Record body format of KEY type (RFC 2535). * */ OT_TOOL_PACKED_BEGIN @@ -1918,7 +1918,7 @@ public: static constexpr uint8_t kAlgorithmEd448 = 16; ///< ED448 algorithm. /** - * This enumeration type represents the use (or key type) flags (RFC 2535 - section 3.1.2). + * Type represents the use (or key type) flags (RFC 2535 - section 3.1.2). * */ enum UseFlags : uint8_t @@ -1930,7 +1930,7 @@ public: }; /** - * This enumeration type represents key owner (or name type) flags (RFC 2535 - section 3.1.2). + * Type represents key owner (or name type) flags (RFC 2535 - section 3.1.2). * */ enum OwnerFlags : uint8_t @@ -1970,7 +1970,7 @@ public: static constexpr uint8_t kSignatoryFlagGeneral = 1 << 0; /** - * This method initializes the KEY Resource Record by setting its type and class. + * Initializes the KEY Resource Record by setting its type and class. * * Other record fields (TTL, length, flags, protocol, algorithm) remain unchanged/uninitialized. * @@ -1980,7 +1980,7 @@ public: void Init(uint16_t aClass = kClassInternet) { ResourceRecord::Init(kTypeKey, aClass); } /** - * This method tells whether the KEY record is valid. + * Tells whether the KEY record is valid. * * @returns TRUE if this is a valid KEY record, FALSE if an invalid KEY record. * @@ -1988,7 +1988,7 @@ public: bool IsValid(void) const; /** - * This method gets the key use (or key type) flags. + * Gets the key use (or key type) flags. * * @returns The key use flags. * @@ -1996,7 +1996,7 @@ public: UseFlags GetUseFlags(void) const { return static_cast(mFlags[0] & kUseFlagsMask); } /** - * This method gets the owner (or name type) flags. + * Gets the owner (or name type) flags. * * @returns The key owner flags. * @@ -2004,7 +2004,7 @@ public: OwnerFlags GetOwnerFlags(void) const { return static_cast(mFlags[0] & kOwnerFlagsMask); } /** - * This method gets the signatory flags. + * Gets the signatory flags. * * @returns The signatory flags. * @@ -2012,7 +2012,7 @@ public: uint8_t GetSignatoryFlags(void) const { return (mFlags[1] & kSignatoryFlagsMask); } /** - * This method sets the flags field. + * Sets the flags field. * * @param[in] aUseFlags The `UseFlags` value. * @param[in] aOwnerFlags The `OwnerFlags` value. @@ -2026,7 +2026,7 @@ public: } /** - * This method returns the KEY record's protocol value. + * Returns the KEY record's protocol value. * * @returns The protocol value. * @@ -2034,7 +2034,7 @@ public: uint8_t GetProtocol(void) const { return mProtocol; } /** - * This method sets the KEY record's protocol value. + * Sets the KEY record's protocol value. * * @param[in] aProtocol The protocol value. * @@ -2042,7 +2042,7 @@ public: void SetProtocol(uint8_t aProtocol) { mProtocol = aProtocol; } /** - * This method returns the KEY record's algorithm value. + * Returns the KEY record's algorithm value. * * @returns The algorithm value. * @@ -2050,7 +2050,7 @@ public: uint8_t GetAlgorithm(void) const { return mAlgorithm; } /** - * This method sets the KEY record's algorithm value. + * Sets the KEY record's algorithm value. * * @param[in] aAlgorithm The algorithm value. * @@ -2084,7 +2084,7 @@ class Ecdsa256KeyRecord : public KeyRecord, public Clearable, { public: /** - * This method initializes the KEY Resource Record to ECDSA with curve P-256. + * Initializes the KEY Resource Record to ECDSA with curve P-256. * * Other record fields (TTL, length, flags, protocol) remain unchanged/uninitialized. * @@ -2092,7 +2092,7 @@ public: void Init(void); /** - * This method tells whether this is a valid ECDSA DNSKEY with curve P-256. + * Tells whether this is a valid ECDSA DNSKEY with curve P-256. * * @returns A boolean that indicates whether this is a valid ECDSA DNSKEY RR with curve P-256. * @@ -2100,7 +2100,7 @@ public: bool IsValid(void) const; /** - * This method returns the ECDSA P-256 public kek. + * Returns the ECDSA P-256 public kek. * * @returns A reference to the public key. * @@ -2113,7 +2113,7 @@ private: #endif // OPENTHREAD_CONFIG_SRP_SERVER_ENABLE /** - * This class implements Resource Record body format of SIG type (RFC 2535 - section-4.1). + * Implements Resource Record body format of SIG type (RFC 2535 - section-4.1). * * */ @@ -2124,7 +2124,7 @@ public: static constexpr uint16_t kType = kTypeSig; ///< The SIG record type. /** - * This method initializes the SIG Resource Record by setting its type and class. + * Initializes the SIG Resource Record by setting its type and class. * * Other record fields (TTL, length, ...) remain unchanged/uninitialized. * @@ -2136,7 +2136,7 @@ public: void Init(uint16_t aClass) { ResourceRecord::Init(kTypeSig, aClass); } /** - * This method tells whether the SIG record is valid. + * Tells whether the SIG record is valid. * * @returns TRUE if this is a valid SIG record, FALSE if not a valid SIG record. * @@ -2144,7 +2144,7 @@ public: bool IsValid(void) const; /** - * This method returns the SIG record's type-covered value. + * Returns the SIG record's type-covered value. * * @returns The type-covered value. * @@ -2152,7 +2152,7 @@ public: uint16_t GetTypeCovered(void) const { return HostSwap16(mTypeCovered); } /** - * This method sets the SIG record's type-covered value. + * Sets the SIG record's type-covered value. * * @param[in] aTypeCovered The type-covered value. * @@ -2160,7 +2160,7 @@ public: void SetTypeCovered(uint8_t aTypeCovered) { mTypeCovered = HostSwap16(aTypeCovered); } /** - * This method returns the SIG record's algorithm value. + * Returns the SIG record's algorithm value. * * @returns The algorithm value. * @@ -2168,7 +2168,7 @@ public: uint8_t GetAlgorithm(void) const { return mAlgorithm; } /** - * This method sets the SIG record's algorithm value. + * Sets the SIG record's algorithm value. * * @param[in] aAlgorithm The algorithm value. * @@ -2176,7 +2176,7 @@ public: void SetAlgorithm(uint8_t aAlgorithm) { mAlgorithm = aAlgorithm; } /** - * This method returns the SIG record's labels-count (number of labels, not counting null label, in the original + * Returns the SIG record's labels-count (number of labels, not counting null label, in the original * name of the owner). * * @returns The labels-count value. @@ -2185,7 +2185,7 @@ public: uint8_t GetLabels(void) const { return mLabels; } /** - * This method sets the SIG record's labels-count (number of labels, not counting null label, in the original + * Sets the SIG record's labels-count (number of labels, not counting null label, in the original * name of the owner). * * @param[in] aLabels The labels-count value. @@ -2194,7 +2194,7 @@ public: void SetLabels(uint8_t aLabels) { mLabels = aLabels; } /** - * This method returns the SIG record's original TTL value. + * Returns the SIG record's original TTL value. * * @returns The original TTL value. * @@ -2202,7 +2202,7 @@ public: uint32_t GetOriginalTtl(void) const { return HostSwap32(mOriginalTtl); } /** - * This method sets the SIG record's original TTL value. + * Sets the SIG record's original TTL value. * * @param[in] aOriginalTtl The original TTL value. * @@ -2210,7 +2210,7 @@ public: void SetOriginalTtl(uint32_t aOriginalTtl) { mOriginalTtl = HostSwap32(aOriginalTtl); } /** - * This method returns the SIG record's expiration time value. + * Returns the SIG record's expiration time value. * * @returns The expiration time value (seconds since Jan 1, 1970). * @@ -2218,7 +2218,7 @@ public: uint32_t GetExpiration(void) const { return HostSwap32(mExpiration); } /** - * This method sets the SIG record's expiration time value. + * Sets the SIG record's expiration time value. * * @param[in] aExpiration The expiration time value (seconds since Jan 1, 1970). * @@ -2226,7 +2226,7 @@ public: void SetExpiration(uint32_t aExpiration) { mExpiration = HostSwap32(aExpiration); } /** - * This method returns the SIG record's inception time value. + * Returns the SIG record's inception time value. * * @returns The inception time value (seconds since Jan 1, 1970). * @@ -2234,7 +2234,7 @@ public: uint32_t GetInception(void) const { return HostSwap32(mInception); } /** - * This method sets the SIG record's inception time value. + * Sets the SIG record's inception time value. * * @param[in] aInception The inception time value (seconds since Jan 1, 1970). * @@ -2242,7 +2242,7 @@ public: void SetInception(uint32_t aInception) { mInception = HostSwap32(aInception); } /** - * This method returns the SIG record's key tag value. + * Returns the SIG record's key tag value. * * @returns The key tag value. * @@ -2250,7 +2250,7 @@ public: uint16_t GetKeyTag(void) const { return HostSwap16(mKeyTag); } /** - * This method sets the SIG record's key tag value. + * Sets the SIG record's key tag value. * * @param[in] aKeyTag The key tag value. * @@ -2258,7 +2258,7 @@ public: void SetKeyTag(uint16_t aKeyTag) { mKeyTag = HostSwap16(aKeyTag); } /** - * This method returns a pointer to the start of the record data fields. + * Returns a pointer to the start of the record data fields. * * @returns A pointer to the start of the record data fields. * @@ -2266,7 +2266,7 @@ public: const uint8_t *GetRecordData(void) const { return reinterpret_cast(&mTypeCovered); } /** - * This method parses and reads the SIG signer name from a message. + * Parses and reads the SIG signer name from a message. * * @param[in] aMessage The message to read from. `aMessage.GetOffset()` MUST point to the start of DNS * header. @@ -2301,7 +2301,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements DNS OPT Pseudo Resource Record header for EDNS(0) (RFC 6891 - Section 6.1). + * Implements DNS OPT Pseudo Resource Record header for EDNS(0) (RFC 6891 - Section 6.1). * */ OT_TOOL_PACKED_BEGIN @@ -2311,7 +2311,7 @@ public: static constexpr uint16_t kType = kTypeOpt; ///< The OPT record type. /** - * This method initializes the OPT Resource Record by setting its type and clearing extended Response Code, version + * Initializes the OPT Resource Record by setting its type and clearing extended Response Code, version * and all flags. * * Other record fields (UDP payload size, length) remain unchanged/uninitialized. @@ -2324,7 +2324,7 @@ public: } /** - * This method gets the requester's UDP payload size (the number of bytes of the largest UDP payload that can be + * Gets the requester's UDP payload size (the number of bytes of the largest UDP payload that can be * delivered in the requester's network). * * The field is encoded in the CLASS field. @@ -2335,7 +2335,7 @@ public: uint16_t GetUdpPayloadSize(void) const { return GetClass(); } /** - * This method gets the requester's UDP payload size (the number of bytes of the largest UDP payload that can be + * Gets the requester's UDP payload size (the number of bytes of the largest UDP payload that can be * delivered in the requester's network). * * @param[in] aPayloadSize The UDP payload size. @@ -2344,7 +2344,7 @@ public: void SetUdpPayloadSize(uint16_t aPayloadSize) { SetClass(aPayloadSize); } /** - * This method gets the upper 8-bit of the extended 12-bit Response Code. + * Gets the upper 8-bit of the extended 12-bit Response Code. * * Value of 0 indicates that an unextended Response code is in use. * @@ -2354,7 +2354,7 @@ public: uint8_t GetExtendedResponseCode(void) const { return GetTtlByteAt(kExtRCodeByteIndex); } /** - * This method sets the upper 8-bit of the extended 12-bit Response Code. + * Sets the upper 8-bit of the extended 12-bit Response Code. * * Value of 0 indicates that an unextended Response code is in use. * @@ -2364,7 +2364,7 @@ public: void SetExtendedResponseCode(uint8_t aExtendedResponse) { GetTtlByteAt(kExtRCodeByteIndex) = aExtendedResponse; } /** - * This method gets the Version field. + * Gets the Version field. * * @returns The version. * @@ -2372,7 +2372,7 @@ public: uint8_t GetVersion(void) const { return GetTtlByteAt(kVersionByteIndex); } /** - * This method set the Version field. + * Set the Version field. * * @param[in] aVersion The version. * @@ -2380,7 +2380,7 @@ public: void SetVersion(uint8_t aVersion) { GetTtlByteAt(kVersionByteIndex) = aVersion; } /** - * This method indicates whether the DNSSEC OK flag is set or not. + * Indicates whether the DNSSEC OK flag is set or not. * * @returns True if DNSSEC OK flag is set in the header, false otherwise. * @@ -2388,13 +2388,13 @@ public: bool IsDnsSecurityFlagSet(void) const { return (GetTtlByteAt(kFlagByteIndex) & kDnsSecFlag) != 0; } /** - * This method clears the DNSSEC OK bit flag. + * Clears the DNSSEC OK bit flag. * */ void ClearDnsSecurityFlag(void) { GetTtlByteAt(kFlagByteIndex) &= ~kDnsSecFlag; } /** - * This method sets the DNSSEC OK bit flag. + * Sets the DNSSEC OK bit flag. * */ void SetDnsSecurityFlag(void) { GetTtlByteAt(kFlagByteIndex) |= kDnsSecFlag; } @@ -2425,7 +2425,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements the body of an Option in OPT Pseudo Resource Record (RFC 6981 - Section 6.1). + * Implements the body of an Option in OPT Pseudo Resource Record (RFC 6981 - Section 6.1). * */ OT_TOOL_PACKED_BEGIN @@ -2435,7 +2435,7 @@ public: static constexpr uint16_t kUpdateLease = 2; ///< Update lease option code. /** - * This method returns the option code value. + * Returns the option code value. * * @returns The option code value. * @@ -2443,7 +2443,7 @@ public: uint16_t GetOptionCode(void) const { return HostSwap16(mOptionCode); } /** - * This method sets the option code value. + * Sets the option code value. * * @param[in] aOptionCode The option code value. * @@ -2451,7 +2451,7 @@ public: void SetOptionCode(uint16_t aOptionCode) { mOptionCode = HostSwap16(aOptionCode); } /** - * This method returns the option length value. + * Returns the option length value. * * @returns The option length (size of option data in bytes). * @@ -2459,7 +2459,7 @@ public: uint16_t GetOptionLength(void) const { return HostSwap16(mOptionLength); } /** - * This method sets the option length value. + * Sets the option length value. * * @param[in] aOptionLength The option length (size of option data in bytes). * @@ -2467,7 +2467,7 @@ public: void SetOptionLength(uint16_t aOptionLength) { mOptionLength = HostSwap16(aOptionLength); } /** - * This method returns the size of (number of bytes) in the Option and its data. + * Returns the size of (number of bytes) in the Option and its data. * * @returns Size (number of bytes) of the Option its data section. * @@ -2482,7 +2482,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements an Update Lease Option body. + * Implements an Update Lease Option body. * * This implementation is intended for use in Dynamic DNS Update Lease Requests and Responses as specified in * https://tools.ietf.org/html/draft-sekar-dns-ul-02. @@ -2493,7 +2493,7 @@ class LeaseOption : public Option { public: /** - * This method initializes the Update Lease Option using the short variant format which contains lease interval + * Initializes the Update Lease Option using the short variant format which contains lease interval * only. * * @param[in] aLeaseInterval The lease interval in seconds. @@ -2502,7 +2502,7 @@ public: void InitAsShortVariant(uint32_t aLeaseInterval); /** - * This method initializes the Update Lease Option using the long variant format which contains both lease and + * Initializes the Update Lease Option using the long variant format which contains both lease and * key lease intervals. * * @param[in] aLeaseInterval The lease interval in seconds. @@ -2512,7 +2512,7 @@ public: void InitAsLongVariant(uint32_t aLeaseInterval, uint32_t aKeyLeaseInterval); /** - * This method indicates whether or not the Update Lease Option follows the short variant format which contains + * Indicates whether or not the Update Lease Option follows the short variant format which contains * only the lease interval. * * @retval TRUE The Update Lease Option follows the short variant format. @@ -2522,9 +2522,9 @@ public: bool IsShortVariant(void) const { return (GetOptionLength() == kShortLength); } /** - * This method tells whether this is a valid Lease Option. + * Tells whether this is a valid Lease Option. * - * This method validates that option follows either short or long variant format. + * Validates that option follows either short or long variant format. * * @returns TRUE if this is a valid Lease Option, FALSE if not a valid Lease Option. * @@ -2532,7 +2532,7 @@ public: bool IsValid(void) const; /** - * This method returns the Update Lease OPT record's lease interval value. + * Returns the Update Lease OPT record's lease interval value. * * @returns The lease interval value (in seconds). * @@ -2540,7 +2540,7 @@ public: uint32_t GetLeaseInterval(void) const { return HostSwap32(mLeaseInterval); } /** - * This method returns the Update Lease OPT record's key lease interval value. + * Returns the Update Lease OPT record's key lease interval value. * * If the Update Lease Option follows the short variant format the lease interval is returned as key lease interval. * @@ -2553,10 +2553,10 @@ public: } /** - * This method searches among the Options is a given message and reads and validates the Update Lease Option if + * Searches among the Options is a given message and reads and validates the Update Lease Option if * found. * - * This method reads the Update Lease Option whether it follows the short or long variant formats. + * Reads the Update Lease Option whether it follows the short or long variant formats. * * @param[in] aMessage The message to read the Option from. * @param[in] aOffset Offset in @p aMessage to the start of Options (start of OPT Record data). @@ -2581,7 +2581,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Question format. + * Implements Question format. * */ OT_TOOL_PACKED_BEGIN @@ -2605,7 +2605,7 @@ public: } /** - * This method returns the type of the question. + * Returns the type of the question. * * @returns The type of the question. * @@ -2613,7 +2613,7 @@ public: uint16_t GetType(void) const { return HostSwap16(mType); } /** - * This method sets the type of the question. + * Sets the type of the question. * * @param[in] aType The type of the question. * @@ -2621,7 +2621,7 @@ public: void SetType(uint16_t aType) { mType = HostSwap16(aType); } /** - * This method returns the class of the question. + * Returns the class of the question. * * @returns The class of the question. * @@ -2629,7 +2629,7 @@ public: uint16_t GetClass(void) const { return HostSwap16(mClass); } /** - * This method sets the class of the question. + * Sets the class of the question. * * @param[in] aClass The class of the question. * @@ -2642,7 +2642,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Zone section body for DNS Update (RFC 2136 - section 2.3). + * Implements Zone section body for DNS Update (RFC 2136 - section 2.3). * */ OT_TOOL_PACKED_BEGIN diff --git a/src/core/net/dnssd_server.hpp b/src/core/net/dnssd_server.hpp index cf708f5f2..88c737626 100644 --- a/src/core/net/dnssd_server.hpp +++ b/src/core/net/dnssd_server.hpp @@ -63,7 +63,7 @@ namespace Dns { namespace ServiceDiscovery { /** - * This class implements DNS-SD server. + * Implements DNS-SD server. * */ class Server : public InstanceLocator, private NonCopyable @@ -72,7 +72,7 @@ class Server : public InstanceLocator, private NonCopyable public: /** - * This class contains the counters of the DNS-SD server. + * Contains the counters of the DNS-SD server. * */ class Counters : public otDnssdCounters, public Clearable @@ -81,7 +81,7 @@ public: #if OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE /** - * This class represents an upstream query transaction. The methods should only be used by + * Represents an upstream query transaction. The methods should only be used by * `Dns::ServiceDiscovery::Server`. * */ @@ -89,7 +89,7 @@ public: { public: /** - * This method returns whether the transaction is valid. + * Returns whether the transaction is valid. * * @retval TRUE The transaction is valid. * @retval FALSE The transaction is not valid. @@ -98,7 +98,7 @@ public: bool IsValid(void) const { return mValid; } /** - * This method returns the time when the transaction expires. + * Returns the time when the transaction expires. * * @returns The expire time of the transaction. * @@ -106,14 +106,14 @@ public: TimeMilli GetExpireTime(void) const { return mExpireTime; } /** - * This method resets the transaction with a reason. The transaction will be invalid and can be reused for + * Resets the transaction with a reason. The transaction will be invalid and can be reused for * another upstream query after this call. * */ void Reset(void) { mValid = false; } /** - * This method initializes the transaction. + * Initializes the transaction. * * @param[in] aMessageInfo The IP message info of the query. * @@ -121,7 +121,7 @@ public: void Init(const Ip6::MessageInfo &aMessageInfo); /** - * This method returns the message info of the query. + * Returns the message info of the query. * * @returns The message info of the query. * @@ -136,7 +136,7 @@ public: #endif /** - * This enumeration specifies a DNS-SD query type. + * Specifies a DNS-SD query type. * */ enum DnsQueryType : uint8_t @@ -150,7 +150,7 @@ public: static constexpr uint16_t kPort = OPENTHREAD_CONFIG_DNSSD_SERVER_PORT; ///< The DNS-SD server port. /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -158,7 +158,7 @@ public: explicit Server(Instance &aInstance); /** - * This method starts the DNS-SD server. + * Starts the DNS-SD server. * * @retval kErrorNone Successfully started the DNS-SD server. * @retval kErrorFailed If failed to open or bind the UDP socket. @@ -167,13 +167,13 @@ public: Error Start(void); /** - * This method stops the DNS-SD server. + * Stops the DNS-SD server. * */ void Stop(void); /** - * This method sets DNS-SD query callbacks. + * Sets DNS-SD query callbacks. * * @param[in] aSubscribe A pointer to the callback function to subscribe a service or service instance. * @param[in] aUnsubscribe A pointer to the callback function to unsubscribe a service or service instance. @@ -185,7 +185,7 @@ public: void *aContext); /** - * This method notifies a discovered service instance. + * Notifies a discovered service instance. * * @param[in] aServiceFullName The null-terminated full service name. * @param[in] aInstanceInfo A reference to the discovered service instance information. @@ -195,7 +195,7 @@ public: #if OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE /** - * This method notifies an answer of an upstream DNS query. + * Notifies an answer of an upstream DNS query. * * The Transaction will be released. * @@ -207,7 +207,7 @@ public: void OnUpstreamQueryDone(UpstreamQueryTransaction &aQueryTransaction, Message *aResponseMessage); /** - * This method indicates whether the server will forward DNS queries to platform DNS upstream API. + * Indicates whether the server will forward DNS queries to platform DNS upstream API. * * @retval TRUE If the server will forward DNS queries. * @retval FALSE If the server will not forward DNS queries. @@ -216,7 +216,7 @@ public: bool IsUpstreamQueryEnabled(void) const { return mEnableUpstreamQuery; } /** - * This method enables or disables forwarding DNS queries to platform DNS upstream API. + * Enables or disables forwarding DNS queries to platform DNS upstream API. * * @param[in] aEnabled A boolean to enable/disable forwarding DNS queries to upstream. * @@ -225,7 +225,7 @@ public: #endif // OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE /** - * This method notifies a discovered host. + * Notifies a discovered host. * * @param[in] aHostFullName The null-terminated full host name. * @param[in] aHostInfo A reference to the discovered host information. @@ -234,7 +234,7 @@ public: void HandleDiscoveredHost(const char *aHostFullName, const otDnssdHostInfo &aHostInfo); /** - * This method acquires the next query in the server. + * Acquires the next query in the server. * * @param[in] aQuery The query pointer. Pass `nullptr` to get the first query. * @@ -244,7 +244,7 @@ public: const otDnssdQuery *GetNextQuery(const otDnssdQuery *aQuery) const; /** - * This method acquires the DNS-SD query type and name for a specific query. + * Acquires the DNS-SD query type and name for a specific query. * * @param[in] aQuery The query pointer. * @param[out] aName The name output buffer. @@ -255,7 +255,7 @@ public: static DnsQueryType GetQueryTypeAndName(const otDnssdQuery *aQuery, char (&aName)[Name::kMaxNameSize]); /** - * This method returns the counters of the DNS-SD server. + * Returns the counters of the DNS-SD server. * * @returns A reference to the `Counters` instance. * @@ -263,7 +263,7 @@ public: const Counters &GetCounters(void) const { return mCounters; }; /** - * This enumeration represents different test mode flags for use in `SetTestMode()`. + * Represents different test mode flags for use in `SetTestMode()`. * */ enum TestModeFlags : uint8_t @@ -275,7 +275,7 @@ public: static constexpr uint8_t kTestModeDisabled = 0; ///< Test mode is disabled (no flags). /** - * This method sets the test mode for `Server`. + * Sets the test mode for `Server`. * * The test mode flags are intended for testing the client by having server behave in certain ways, e.g., reject * messages with certain format (e.g., more than one question in query). @@ -401,7 +401,7 @@ private: }; /** - * This class contains the compress information for a dns packet. + * Contains the compress information for a dns packet. * */ class QueryTransaction : public InstanceLocatorInit diff --git a/src/core/net/icmp6.hpp b/src/core/net/icmp6.hpp index b054b5692..e24b9445c 100644 --- a/src/core/net/icmp6.hpp +++ b/src/core/net/icmp6.hpp @@ -64,14 +64,14 @@ using ot::Encoding::BigEndian::HostSwap16; class Headers; /** - * This class implements ICMPv6. + * Implements ICMPv6. * */ class Icmp : public InstanceLocator, private NonCopyable { public: /* - * This class implements ICMPv6 header generation and parsing. + * Implements ICMPv6 header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -112,7 +112,7 @@ public: static constexpr uint8_t kDataFieldOffset = 4; ///< The byte offset of Data field in ICMP6 header. /** - * This method indicates whether the ICMPv6 message is an error message. + * Indicates whether the ICMPv6 message is an error message. * * @retval TRUE if the ICMPv6 message is an error message. * @retval FALSE if the ICMPv6 message is an informational message. @@ -121,7 +121,7 @@ public: bool IsError(void) const { return mType < OT_ICMP6_TYPE_ECHO_REQUEST; } /** - * This method returns the ICMPv6 message type. + * Returns the ICMPv6 message type. * * @returns The ICMPv6 message type. * @@ -129,7 +129,7 @@ public: Type GetType(void) const { return static_cast(mType); } /** - * This method sets the ICMPv6 message type. + * Sets the ICMPv6 message type. * * @param[in] aType The ICMPv6 message type. * @@ -137,7 +137,7 @@ public: void SetType(Type aType) { mType = static_cast(aType); } /** - * This method returns the ICMPv6 message code. + * Returns the ICMPv6 message code. * * @returns The ICMPv6 message code. * @@ -145,7 +145,7 @@ public: Code GetCode(void) const { return static_cast(mCode); } /** - * This method sets the ICMPv6 message code. + * Sets the ICMPv6 message code. * * @param[in] aCode The ICMPv6 message code. * @@ -153,7 +153,7 @@ public: void SetCode(Code aCode) { mCode = static_cast(aCode); } /** - * This method returns the ICMPv6 message checksum. + * Returns the ICMPv6 message checksum. * * @returns The ICMPv6 message checksum. * @@ -161,7 +161,7 @@ public: uint16_t GetChecksum(void) const { return HostSwap16(mChecksum); } /** - * This method sets the ICMPv6 message checksum. + * Sets the ICMPv6 message checksum. * * @param[in] aChecksum The ICMPv6 message checksum. * @@ -169,7 +169,7 @@ public: void SetChecksum(uint16_t aChecksum) { mChecksum = HostSwap16(aChecksum); } /** - * This method returns the ICMPv6 message ID for Echo Requests and Replies. + * Returns the ICMPv6 message ID for Echo Requests and Replies. * * @returns The ICMPv6 message ID. * @@ -177,7 +177,7 @@ public: uint16_t GetId(void) const { return HostSwap16(mData.m16[0]); } /** - * This method sets the ICMPv6 message ID for Echo Requests and Replies. + * Sets the ICMPv6 message ID for Echo Requests and Replies. * * @param[in] aId The ICMPv6 message ID. * @@ -185,7 +185,7 @@ public: void SetId(uint16_t aId) { mData.m16[0] = HostSwap16(aId); } /** - * This method returns the ICMPv6 message sequence for Echo Requests and Replies. + * Returns the ICMPv6 message sequence for Echo Requests and Replies. * * @returns The ICMPv6 message sequence. * @@ -193,7 +193,7 @@ public: uint16_t GetSequence(void) const { return HostSwap16(mData.m16[1]); } /** - * This method sets the ICMPv6 message sequence for Echo Requests and Replies. + * Sets the ICMPv6 message sequence for Echo Requests and Replies. * * @param[in] aSequence The ICMPv6 message sequence. * @@ -202,7 +202,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements ICMPv6 message handlers. + * Implements ICMPv6 message handlers. * */ class Handler : public otIcmp6Handler, public LinkedListEntry @@ -211,7 +211,7 @@ public: public: /** - * This constructor creates an ICMPv6 message handler. + * Creates an ICMPv6 message handler. * * @param[in] aCallback A pointer to the function that is called when receiving an ICMPv6 message. * @param[in] aContext A pointer to arbitrary context information. @@ -232,7 +232,7 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -240,7 +240,7 @@ public: explicit Icmp(Instance &aInstance); /** - * This method returns a new ICMP message with sufficient header space reserved. + * Returns a new ICMP message with sufficient header space reserved. * * @returns A pointer to the message or `nullptr` if no buffers are available. * @@ -248,7 +248,7 @@ public: Message *NewMessage(void); /** - * This method registers ICMPv6 handler. + * Registers ICMPv6 handler. * * @param[in] aHandler A reference to the ICMPv6 handler. * @@ -259,7 +259,7 @@ public: Error RegisterHandler(Handler &aHandler); /** - * This method sends an ICMPv6 Echo Request message. + * Sends an ICMPv6 Echo Request message. * * @param[in] aMessage A reference to the Echo Request payload. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -273,7 +273,7 @@ public: Error SendEchoRequest(Message &aMessage, const MessageInfo &aMessageInfo, uint16_t aIdentifier); /** - * This method sends an ICMPv6 error message. + * Sends an ICMPv6 error message. * * @param[in] aType The ICMPv6 message type. * @param[in] aCode The ICMPv6 message code. @@ -287,7 +287,7 @@ public: Error SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, const Message &aMessage); /** - * This method sends an ICMPv6 error message. + * Sends an ICMPv6 error message. * * @param[in] aType The ICMPv6 message type. * @param[in] aCode The ICMPv6 message code. @@ -301,7 +301,7 @@ public: Error SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, const Headers &aHeaders); /** - * This method handles an ICMPv6 message. + * Handles an ICMPv6 message. * * @param[in] aMessage A reference to the ICMPv6 message. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -314,7 +314,7 @@ public: Error HandleMessage(Message &aMessage, MessageInfo &aMessageInfo); /** - * This method indicates whether or not ICMPv6 Echo processing is enabled. + * Indicates whether or not ICMPv6 Echo processing is enabled. * * @retval TRUE ICMPv6 Echo processing is enabled. * @retval FALSE ICMPv6 Echo processing is disabled. @@ -331,7 +331,7 @@ public: void SetEchoMode(otIcmp6EchoMode aMode) { mEchoMode = aMode; } /** - * This method indicates whether or not the ICMPv6 Echo Request should be handled. + * Indicates whether or not the ICMPv6 Echo Request should be handled. * * @retval TRUE if OpenThread should respond with an ICMPv6 Echo Reply. * @retval FALSE if OpenThread should not respond with an ICMPv6 Echo Reply. @@ -340,7 +340,7 @@ public: bool ShouldHandleEchoRequest(const MessageInfo &aMessageInfo); /** - * This method returns the ICMPv6 Echo sequence number. + * Returns the ICMPv6 Echo sequence number. * * @returns The sequence number of the next ICMPv6 Echo request. * diff --git a/src/core/net/ip4_types.hpp b/src/core/net/ip4_types.hpp index 6d2ba0c39..86d908f40 100644 --- a/src/core/net/ip4_types.hpp +++ b/src/core/net/ip4_types.hpp @@ -92,7 +92,7 @@ using Ecn = Ip6::Ecn; class Cidr; /** - * This class represents an IPv4 address. + * Represents an IPv4 address. * */ OT_TOOL_PACKED_BEGIN @@ -103,13 +103,13 @@ public: static constexpr uint16_t kAddressStringSize = 17; ///< String size used by `ToString()`. /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method gets the IPv4 address as a pointer to a byte array. + * Gets the IPv4 address as a pointer to a byte array. * * @returns A pointer to a byte array containing the IPv4 address. * @@ -117,7 +117,7 @@ public: const uint8_t *GetBytes(void) const { return mFields.m8; } /** - * This method sets the IPv4 address from a given byte array. + * Sets the IPv4 address from a given byte array. * * @param[in] aBuffer Pointer to an array containing the IPv4 address. `kSize` bytes from the buffer * are copied to form the IPv4 address. @@ -126,7 +126,7 @@ public: void SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } /** - * This method sets the IPv4 address by performing NAT64 address translation from a given IPv6 address as specified + * Sets the IPv4 address by performing NAT64 address translation from a given IPv6 address as specified * in RFC 6052. * * The NAT64 @p aPrefixLength MUST be one of the following values: 32, 40, 48, 56, 64, or 96, otherwise the behavior @@ -139,7 +139,7 @@ public: void ExtractFromIp6Address(uint8_t aPrefixLength, const Ip6::Address &aIp6Address); /** - * This method sets the IPv4 address from the given CIDR and the host field. + * Sets the IPv4 address from the given CIDR and the host field. * * @param[in] aCidr The CIDR for the IPv4 address. * @param[in] aHost The host bits of the IPv4 address in host byte order. The aHost will be masked by host mask. @@ -148,7 +148,7 @@ public: void SynthesizeFromCidrAndHost(const Cidr &aCidr, uint32_t aHost); /** - * This method parses an IPv4 address string terminated by `aTerminatorChar`. + * Parses an IPv4 address string terminated by `aTerminatorChar`. * * The string MUST follow the quad-dotted notation of four decimal values (ranging from 0 to 255 each). For * example, "127.0.0.1" @@ -162,7 +162,7 @@ public: Error FromString(const char *aString, char aTerminatorChar = kNullChar); /** - * This method converts the address to a string. + * Converts the address to a string. * * The string format uses quad-dotted notation of four bytes in the address (e.g., "127.0.0.1"). * @@ -176,7 +176,7 @@ public: void ToString(char *aBuffer, uint16_t aSize) const; /** - * This method converts the IPv4 address to a string. + * Converts the IPv4 address to a string. * * The string format uses quad-dotted notation of four bytes in the address (e.g., "127.0.0.1"). * @@ -190,7 +190,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class represents an IPv4 CIDR block. + * Represents an IPv4 CIDR block. * */ class Cidr : public otIp4Cidr, public Unequatable, public Clearable
@@ -201,13 +201,13 @@ public: static constexpr uint16_t kCidrSuffixSize = 3; ///< Suffix to represent CIDR (/dd). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method converts the IPv4 CIDR string to binary. + * Converts the IPv4 CIDR string to binary. * * The string format uses quad-dotted notation of four bytes in the address with the length of prefix (e.g., * "127.0.0.1/32"). @@ -221,7 +221,7 @@ public: Error FromString(const char *aString); /** - * This method converts the IPv4 CIDR to a string. + * Converts the IPv4 CIDR to a string. * * The string format uses quad-dotted notation of four bytes in the address with the length of prefix (e.g., * "127.0.0.1/32"). @@ -236,7 +236,7 @@ public: void ToString(char *aBuffer, uint16_t aSize) const; /** - * This method converts the IPv4 CIDR to a string. + * Converts the IPv4 CIDR to a string. * * The string format uses quad-dotted notation of four bytes in the address with the length of prefix (e.g., * "127.0.0.1/32"). @@ -247,7 +247,7 @@ public: InfoString ToString(void) const; /** - * This method gets the prefix as a pointer to a byte array. + * Gets the prefix as a pointer to a byte array. * * @returns A pointer to a byte array containing the Prefix. * @@ -255,7 +255,7 @@ public: const uint8_t *GetBytes(void) const { return mAddress.mFields.m8; } /** - * This method overloads operator `==` to evaluate whether or not two prefixes are equal. + * Overloads operator `==` to evaluate whether or not two prefixes are equal. * * @param[in] aOther The other prefix to compare with. * @@ -266,7 +266,7 @@ public: bool operator==(const Cidr &aOther) const; /** - * This method sets the CIDR. + * Sets the CIDR. * * @param[in] aAddress A pointer to buffer containing the CIDR bytes. The length of aAddress should be 4 bytes. * @param[in] aLength The length of CIDR in bits. @@ -288,7 +288,7 @@ private: }; /** - * This class implements IPv4 header generation and parsing. + * Implements IPv4 header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -307,7 +307,7 @@ public: static constexpr uint8_t kDestinationAddressOffset = 16; /** - * This method indicates whether or not the header appears to be well-formed. + * Indicates whether or not the header appears to be well-formed. * * @retval TRUE If the header appears to be well-formed. * @retval FALSE If the header does not appear to be well-formed. @@ -316,7 +316,7 @@ public: bool IsValid(void) const { return IsVersion4(); } /** - * This method initializes the Version to 4 and sets Traffic Class and Flow fields to zero. + * Initializes the Version to 4 and sets Traffic Class and Flow fields to zero. * * The other fields in the IPv4 header remain unchanged. * @@ -324,7 +324,7 @@ public: void InitVersionIhl(void) { SetVersionIhl(kVersIhlInit); } /** - * This method sets the version and Ihl of the IPv4 header. + * Sets the version and Ihl of the IPv4 header. * * @param[in] aVersionIhl The octet for the version and Ihl field. * @@ -332,7 +332,7 @@ public: void SetVersionIhl(uint8_t aVersionIhl) { mVersIhl = aVersionIhl; } /** - * This method indicates whether or not the IPv4 Version is set to 6. + * Indicates whether or not the IPv4 Version is set to 6. * * @retval TRUE If the IPv4 Version is set to 4. * @retval FALSE If the IPv4 Version is not set to 4. @@ -341,7 +341,7 @@ public: bool IsVersion4(void) const { return (mVersIhl & kVersionMask) == kVersion4; } /** - * This method returns the octet for DSCP + ECN. + * Returns the octet for DSCP + ECN. * * @retval The octet for DSCP and ECN. * @@ -349,7 +349,7 @@ public: uint8_t GetDscpEcn(void) const { return mDscpEcn; } /** - * This method gets the 6-bit Differentiated Services Code Point (DSCP) from Traffic Class field. + * Gets the 6-bit Differentiated Services Code Point (DSCP) from Traffic Class field. * * @returns The DSCP value. * @@ -357,7 +357,7 @@ public: uint8_t GetDscp(void) const { return (mDscpEcn & kDscpMask) >> kDscpOffset; } /** - * This method sets 6-bit Differentiated Services Code Point (DSCP) in IPv4 header. + * Sets 6-bit Differentiated Services Code Point (DSCP) in IPv4 header. * * @param[in] aDscp The DSCP value. * @@ -365,7 +365,7 @@ public: void SetDscp(uint8_t aDscp) { mDscpEcn = static_cast((mDscpEcn & ~kDscpMask) | (aDscp << kDscpOffset)); } /** - * This method gets the 2-bit Explicit Congestion Notification (ECN) from Traffic Class field. + * Gets the 2-bit Explicit Congestion Notification (ECN) from Traffic Class field. * * @returns The ECN value. * @@ -373,7 +373,7 @@ public: Ecn GetEcn(void) const { return static_cast(mDscpEcn & kEcnMask); } /** - * This method sets the 2-bit Explicit Congestion Notification (ECN) in IPv4 header.. + * Sets the 2-bit Explicit Congestion Notification (ECN) in IPv4 header.. * * @param[in] aEcn The ECN value. * @@ -381,7 +381,7 @@ public: void SetEcn(Ecn aEcn) { mDscpEcn = ((mDscpEcn & ~kEcnMask) | aEcn); } /** - * This method returns the IPv4 Payload Length value. + * Returns the IPv4 Payload Length value. * * @returns The IPv4 Payload Length value. * @@ -389,7 +389,7 @@ public: uint16_t GetTotalLength(void) const { return HostSwap16(mTotalLength); } /** - * This method sets the IPv4 Payload Length value. + * Sets the IPv4 Payload Length value. * * @param[in] aLength The IPv4 Payload Length value. * @@ -397,7 +397,7 @@ public: void SetTotalLength(uint16_t aLength) { mTotalLength = HostSwap16(aLength); } /** - * This method returns the IPv4 payload protocol. + * Returns the IPv4 payload protocol. * * @returns The IPv4 payload protocol value. * @@ -405,7 +405,7 @@ public: uint8_t GetProtocol(void) const { return mProtocol; } /** - * This method sets the IPv4 payload protocol. + * Sets the IPv4 payload protocol. * * @param[in] aProtocol The IPv4 payload protocol. * @@ -413,7 +413,7 @@ public: void SetProtocol(uint8_t aProtocol) { mProtocol = aProtocol; } /** - * This method returns the IPv4 header checksum, the checksum is in host endian. + * Returns the IPv4 header checksum, the checksum is in host endian. * * @returns The checksum field in the IPv4 header. * @@ -421,7 +421,7 @@ public: uint16_t GetChecksum(void) const { return HostSwap16(mHeaderChecksum); } /** - * This method sets the IPv4 header checksum, the checksum is in host endian. + * Sets the IPv4 header checksum, the checksum is in host endian. * * @param[in] aChecksum The checksum for the IPv4 header. * @@ -429,7 +429,7 @@ public: void SetChecksum(uint16_t aChecksum) { mHeaderChecksum = HostSwap16(aChecksum); } /** - * This method returns the IPv4 Identification value. + * Returns the IPv4 Identification value. * * @returns The IPv4 Identification value. * @@ -437,7 +437,7 @@ public: uint16_t GetIdentification(void) const { return HostSwap16(mIdentification); } /** - * This method sets the IPv4 Identification value. + * Sets the IPv4 Identification value. * * @param[in] aIdentification The IPv4 Identification value. * @@ -445,7 +445,7 @@ public: void SetIdentification(uint16_t aIdentification) { mIdentification = HostSwap16(aIdentification); } /** - * This method returns the IPv4 Time-to-Live value. + * Returns the IPv4 Time-to-Live value. * * @returns The IPv4 Time-to-Live value. * @@ -453,7 +453,7 @@ public: uint8_t GetTtl(void) const { return mTtl; } /** - * This method sets the IPv4 Time-to-Live value. + * Sets the IPv4 Time-to-Live value. * * @param[in] aTtl The IPv4 Time-to-Live value. * @@ -461,7 +461,7 @@ public: void SetTtl(uint8_t aTtl) { mTtl = aTtl; } /** - * This method returns the IPv4 Source address. + * Returns the IPv4 Source address. * * @returns A reference to the IPv4 Source address. * @@ -469,7 +469,7 @@ public: Address &GetSource(void) { return mSource; } /** - * This method returns the IPv4 Source address. + * Returns the IPv4 Source address. * * @returns A reference to the IPv4 Source address. * @@ -477,7 +477,7 @@ public: const Address &GetSource(void) const { return mSource; } /** - * This method sets the IPv4 Source address. + * Sets the IPv4 Source address. * * @param[in] aSource A reference to the IPv4 Source address. * @@ -485,7 +485,7 @@ public: void SetSource(const Address &aSource) { mSource = aSource; } /** - * This method returns the IPv4 Destination address. + * Returns the IPv4 Destination address. * * @returns A reference to the IPv4 Destination address. * @@ -493,7 +493,7 @@ public: Address &GetDestination(void) { return mDestination; } /** - * This method returns the IPv4 Destination address. + * Returns the IPv4 Destination address. * * @returns A reference to the IPv4 Destination address. * @@ -501,7 +501,7 @@ public: const Address &GetDestination(void) const { return mDestination; } /** - * This method sets the IPv4 Destination address. + * Sets the IPv4 Destination address. * * @param[in] aDestination A reference to the IPv4 Destination address. * @@ -509,7 +509,7 @@ public: void SetDestination(const Address &aDestination) { mDestination = aDestination; } /** - * This method parses and validates the IPv4 header from a given message. + * Parses and validates the IPv4 header from a given message. * * The header is read from @p aMessage at offset zero. * @@ -522,7 +522,7 @@ public: Error ParseFrom(const Message &aMessage); /** - * This method returns the Df flag in the IPv4 header. + * Returns the Df flag in the IPv4 header. * * @returns Whether don't fragment flag is set. * @@ -530,7 +530,7 @@ public: bool GetDf(void) const { return HostSwap16(mFlagsFragmentOffset) & kFlagsDf; } /** - * This method returns the Mf flag in the IPv4 header. + * Returns the Mf flag in the IPv4 header. * * @returns Whether more fragments flag is set. * @@ -538,7 +538,7 @@ public: bool GetMf(void) const { return HostSwap16(mFlagsFragmentOffset) & kFlagsMf; } /** - * This method returns the fragment offset in the IPv4 header. + * Returns the fragment offset in the IPv4 header. * * @returns The fragment offset of the IPv4 packet. * @@ -584,7 +584,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements ICMP(v4). + * Implements ICMP(v4). * Note: ICMP(v4) messages will only be generated / handled by NAT64. So only header definition is required. * */ @@ -592,7 +592,7 @@ class Icmp { public: /** - * This class represents an IPv4 ICMP header. + * Represents an IPv4 ICMP header. * */ OT_TOOL_PACKED_BEGIN @@ -623,7 +623,7 @@ public: }; /** - * This method returns the type of the ICMP message. + * Returns the type of the ICMP message. * * @returns The type field of the ICMP message. * @@ -631,7 +631,7 @@ public: uint8_t GetType(void) const { return mType; } /** - * This method sets the type of the ICMP message. + * Sets the type of the ICMP message. * * @param[in] aType The type of the ICMP message. * @@ -639,7 +639,7 @@ public: void SetType(uint8_t aType) { mType = aType; } /** - * This method returns the code of the ICMP message. + * Returns the code of the ICMP message. * * @returns The code field of the ICMP message. * @@ -647,7 +647,7 @@ public: uint8_t GetCode(void) const { return mCode; } /** - * This method sets the code of the ICMP message. + * Sets the code of the ICMP message. * * @param[in] aCode The code of the ICMP message. * @@ -655,7 +655,7 @@ public: void SetCode(uint8_t aCode) { mCode = aCode; } /** - * This method sets the checksum field in the ICMP message. + * Sets the checksum field in the ICMP message. * * @returns The checksum of the ICMP message. * @@ -663,7 +663,7 @@ public: uint16_t GetChecksum(void) const { return HostSwap16(mChecksum); } /** - * This method sets the checksum field in the ICMP message. + * Sets the checksum field in the ICMP message. * * @param[in] aChecksum The checksum of the ICMP message. * @@ -671,7 +671,7 @@ public: void SetChecksum(uint16_t aChecksum) { mChecksum = HostSwap16(aChecksum); } /** - * This method returns the rest of header field in the ICMP message. + * Returns the rest of header field in the ICMP message. * * @returns The rest of header field in the ICMP message. The returned buffer has 4 octets. * @@ -679,7 +679,7 @@ public: const uint8_t *GetRestOfHeader(void) const { return mRestOfHeader; } /** - * This method sets the rest of header field in the ICMP message. + * Sets the rest of header field in the ICMP message. * * @param[in] aRestOfHeader The rest of header field in the ICMP message. The buffer should have 4 octets. * diff --git a/src/core/net/ip6.hpp b/src/core/net/ip6.hpp index aafb09ce8..f3e14a8ef 100644 --- a/src/core/net/ip6.hpp +++ b/src/core/net/ip6.hpp @@ -103,7 +103,7 @@ using ot::Encoding::BigEndian::HostSwap32; */ /** - * This class implements the core IPv6 message processing. + * Implements the core IPv6 message processing. * */ class Ip6 : public InstanceLocator, private NonCopyable @@ -114,7 +114,7 @@ class Ip6 : public InstanceLocator, private NonCopyable public: /** - * This enumeration represents an IPv6 message origin. + * Represents an IPv6 message origin. * * In case the message is originating from host, it also indicates whether or not it is allowed to passed back the * message to the host. @@ -128,7 +128,7 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the otInstance object. * @@ -136,7 +136,7 @@ public: explicit Ip6(Instance &aInstance); /** - * This method allocates a new message buffer from the buffer pool with default settings (link security + * Allocates a new message buffer from the buffer pool with default settings (link security * enabled and `kPriorityMedium`). * * @returns A pointer to the message or `nullptr` if insufficient message buffers are available. @@ -145,7 +145,7 @@ public: Message *NewMessage(void); /** - * This method allocates a new message buffer from the buffer pool with default settings (link security + * Allocates a new message buffer from the buffer pool with default settings (link security * enabled and `kPriorityMedium`). * * @param[in] aReserved The number of header bytes to reserve following the IPv6 header. @@ -156,7 +156,7 @@ public: Message *NewMessage(uint16_t aReserved); /** - * This method allocates a new message buffer from the buffer pool. + * Allocates a new message buffer from the buffer pool. * * @param[in] aReserved The number of header bytes to reserve following the IPv6 header. * @param[in] aSettings The message settings. @@ -167,7 +167,7 @@ public: Message *NewMessage(uint16_t aReserved, const Message::Settings &aSettings); /** - * This method allocates a new message buffer from the buffer pool and writes the IPv6 datagram to the message. + * Allocates a new message buffer from the buffer pool and writes the IPv6 datagram to the message. * * The message priority is always determined from IPv6 message itself (@p aData) and the priority included in * @p aSetting is ignored. @@ -183,7 +183,7 @@ public: Message *NewMessageFromData(const uint8_t *aData, uint16_t aDataLength, const Message::Settings &aSettings); /** - * This method converts the IPv6 DSCP value to message priority level. + * Converts the IPv6 DSCP value to message priority level. * * @param[in] aDscp The IPv6 DSCP value. * @@ -193,7 +193,7 @@ public: static Message::Priority DscpToPriority(uint8_t aDscp); /** - * This method sends an IPv6 datagram. + * Sends an IPv6 datagram. * * @param[in] aMessage A reference to the message. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -206,7 +206,7 @@ public: Error SendDatagram(Message &aMessage, MessageInfo &aMessageInfo, uint8_t aIpProto); /** - * This method sends a raw IPv6 datagram with a fully formed IPv6 header. + * Sends a raw IPv6 datagram with a fully formed IPv6 header. * * The caller transfers ownership of @p aMessage when making this call. OpenThread will free @p aMessage when * processing is complete, including when a value other than `kErrorNone` is returned. @@ -224,7 +224,7 @@ public: Error SendRaw(Message &aMessage, bool aAllowLoopBackToHost); /** - * This method processes a received IPv6 datagram. + * Processes a received IPv6 datagram. * * @param[in] aMessage A reference to the message. * @param[in] aOrigin The message oirgin. @@ -243,7 +243,7 @@ public: bool aIsReassembled = false); /** - * This method registers a callback to provide received raw IPv6 datagrams. + * Registers a callback to provide received raw IPv6 datagrams. * * By default, this callback does not pass Thread control traffic. See SetReceiveIp6FilterEnabled() to change * the Thread control traffic filter setting. @@ -263,7 +263,7 @@ public: #if OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE /** - * This method registers a callback to provide received translated IPv4 datagrams. + * Registers a callback to provide received translated IPv4 datagrams. * * @param[in] aCallback A pointer to a function that is called when a translated IPv4 datagram is received * or `nullptr` to disable the callback. @@ -279,7 +279,7 @@ public: #endif /** - * This method indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams + * Indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams * via the callback specified in SetReceiveIp6DatagramCallback(). * * @returns TRUE if Thread control traffic is filtered out, FALSE otherwise. @@ -291,7 +291,7 @@ public: bool IsReceiveIp6FilterEnabled(void) const { return mIsReceiveIp6FilterEnabled; } /** - * This method sets whether or not Thread control traffic is filtered out when delivering IPv6 datagrams + * Sets whether or not Thread control traffic is filtered out when delivering IPv6 datagrams * via the callback specified in SetReceiveIp6DatagramCallback(). * * @param[in] aEnabled TRUE if Thread control traffic is filtered out, FALSE otherwise. @@ -303,7 +303,7 @@ public: void SetReceiveIp6FilterEnabled(bool aEnabled) { mIsReceiveIp6FilterEnabled = aEnabled; } /** - * This method performs default source address selection. + * Performs default source address selection. * * @param[in,out] aMessageInfo A reference to the message information. * @@ -314,7 +314,7 @@ public: Error SelectSourceAddress(MessageInfo &aMessageInfo) const; /** - * This method performs default source address selection. + * Performs default source address selection. * * @param[in] aDestination The destination address. * @@ -324,7 +324,7 @@ public: const Address *SelectSourceAddress(const Address &aDestination) const; /** - * This method returns a reference to the send queue. + * Returns a reference to the send queue. * * @returns A reference to the send queue. * @@ -332,7 +332,7 @@ public: const PriorityQueue &GetSendQueue(void) const { return mSendQueue; } /** - * This static method converts an IP protocol number to a string. + * Converts an IP protocol number to a string. * * @param[in] aIpProto An IP protocol number. * @@ -342,7 +342,7 @@ public: static const char *IpProtoToString(uint8_t aIpProto); /** - * This static method converts an IP header ECN value to a string. + * Converts an IP header ECN value to a string. * * @param[in] aEcn The 2-bit ECN value. * @@ -353,7 +353,7 @@ public: #if OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE /** - * This method returns a reference to the Border Routing counters. + * Returns a reference to the Border Routing counters. * * @returns A reference to the Border Routing counters. * @@ -361,7 +361,7 @@ public: const otBorderRoutingCounters &GetBorderRoutingCounters(void) const { return mBorderRoutingCounters; } /** - * This method returns a reference to the Border Routing counters. + * Returns a reference to the Border Routing counters. * * @returns A reference to the Border Routing counters. * @@ -369,7 +369,7 @@ public: otBorderRoutingCounters &GetBorderRoutingCounters(void) { return mBorderRoutingCounters; } /** - * This method resets the Border Routing counters. + * Resets the Border Routing counters. * */ void ResetBorderRoutingCounters(void) { memset(&mBorderRoutingCounters, 0, sizeof(mBorderRoutingCounters)); } @@ -453,7 +453,7 @@ private: }; /** - * This class represents parsed IPv6 header along with UDP/TCP/ICMP6 headers from a received message/frame. + * Represents parsed IPv6 header along with UDP/TCP/ICMP6 headers from a received message/frame. * */ class Headers : private Clearable @@ -462,7 +462,7 @@ class Headers : private Clearable public: /** - * This method parses the IPv6 and UDP/TCP/ICMP6 headers from a given message. + * Parses the IPv6 and UDP/TCP/ICMP6 headers from a given message. * * @param[in] aMessage The message to parse the headers from. * @@ -473,7 +473,7 @@ public: Error ParseFrom(const Message &aMessage); /** - * This method decompresses lowpan frame and parses the IPv6 and UDP/TCP/ICMP6 headers. + * Decompresses lowpan frame and parses the IPv6 and UDP/TCP/ICMP6 headers. * * @param[in] aMessage The message from which to read the lowpan frame. * @param[in] aOffset The offset in @p aMessage to start reading the frame. @@ -487,7 +487,7 @@ public: Error DecompressFrom(const Message &aMessage, uint16_t aOffset, const Mac::Addresses &aMacAddrs); /** - * This method decompresses lowpan frame and parses the IPv6 and UDP/TCP/ICMP6 headers. + * Decompresses lowpan frame and parses the IPv6 and UDP/TCP/ICMP6 headers. * * @param[in] aFrameData The lowpan frame data. * @param[in] aMacAddrs The MAC source and destination addresses. @@ -501,7 +501,7 @@ public: Error DecompressFrom(const FrameData &aFrameData, const Mac::Addresses &aMacAddrs, Instance &aInstance); /** - * This method returns the IPv6 header. + * Returns the IPv6 header. * * @returns The IPv6 header. * @@ -509,7 +509,7 @@ public: const Header &GetIp6Header(void) const { return mIp6Header; } /** - * This method returns the IP protocol number from IPv6 Next Header field. + * Returns the IP protocol number from IPv6 Next Header field. * * @returns The IP protocol number. * @@ -517,7 +517,7 @@ public: uint8_t GetIpProto(void) const { return mIp6Header.GetNextHeader(); } /** - * This method returns the 2-bit Explicit Congestion Notification (ECN) from Traffic Class field from IPv6 header. + * Returns the 2-bit Explicit Congestion Notification (ECN) from Traffic Class field from IPv6 header. * * @returns The ECN value. * @@ -525,7 +525,7 @@ public: Ecn GetEcn(void) const { return mIp6Header.GetEcn(); } /** - * This method indicates if the protocol number from IPv6 header is UDP. + * Indicates if the protocol number from IPv6 header is UDP. * * @retval TRUE If the protocol number in IPv6 header is UDP. * @retval FALSE If the protocol number in IPv6 header is not UDP. @@ -534,7 +534,7 @@ public: bool IsUdp(void) const { return GetIpProto() == kProtoUdp; } /** - * This method indicates if the protocol number from IPv6 header is TCP. + * Indicates if the protocol number from IPv6 header is TCP. * * @retval TRUE If the protocol number in IPv6 header is TCP. * @retval FALSE If the protocol number in IPv6 header is not TCP. @@ -543,7 +543,7 @@ public: bool IsTcp(void) const { return GetIpProto() == kProtoTcp; } /** - * This method indicates if the protocol number from IPv6 header is ICMPv6. + * Indicates if the protocol number from IPv6 header is ICMPv6. * * @retval TRUE If the protocol number in IPv6 header is ICMPv6. * @retval FALSE If the protocol number in IPv6 header is not ICMPv6. @@ -552,7 +552,7 @@ public: bool IsIcmp6(void) const { return GetIpProto() == kProtoIcmp6; } /** - * This method returns the source IPv6 address from IPv6 header. + * Returns the source IPv6 address from IPv6 header. * * @returns The source IPv6 address. * @@ -560,7 +560,7 @@ public: const Address &GetSourceAddress(void) const { return mIp6Header.GetSource(); } /** - * This method returns the destination IPv6 address from IPv6 header. + * Returns the destination IPv6 address from IPv6 header. * * @returns The destination IPv6 address. * @@ -568,9 +568,9 @@ public: const Address &GetDestinationAddress(void) const { return mIp6Header.GetDestination(); } /** - * This method returns the UDP header. + * Returns the UDP header. * - * This method MUST be used when `IsUdp() == true`. Otherwise its behavior is undefined + * MUST be used when `IsUdp() == true`. Otherwise its behavior is undefined * * @returns The UDP header. * @@ -578,9 +578,9 @@ public: const Udp::Header &GetUdpHeader(void) const { return mHeader.mUdp; } /** - * This method returns the TCP header. + * Returns the TCP header. * - * This method MUST be used when `IsTcp() == true`. Otherwise its behavior is undefined + * MUST be used when `IsTcp() == true`. Otherwise its behavior is undefined * * @returns The TCP header. * @@ -588,9 +588,9 @@ public: const Tcp::Header &GetTcpHeader(void) const { return mHeader.mTcp; } /** - * This method returns the ICMPv6 header. + * Returns the ICMPv6 header. * - * This method MUST be used when `IsIcmp6() == true`. Otherwise its behavior is undefined + * MUST be used when `IsIcmp6() == true`. Otherwise its behavior is undefined * * @returns The ICMPv6 header. * @@ -598,7 +598,7 @@ public: const Icmp::Header &GetIcmpHeader(void) const { return mHeader.mIcmp; } /** - * This method returns the source port number if header is UDP or TCP, or zero otherwise + * Returns the source port number if header is UDP or TCP, or zero otherwise * * @returns The source port number under UDP / TCP or zero. * @@ -606,7 +606,7 @@ public: uint16_t GetSourcePort(void) const; /** - * This method returns the destination port number if header is UDP or TCP, or zero otherwise. + * Returns the destination port number if header is UDP or TCP, or zero otherwise. * * @returns The destination port number under UDP / TCP or zero. * @@ -614,7 +614,7 @@ public: uint16_t GetDestinationPort(void) const; /** - * This method returns the checksum values from corresponding UDP, TCP, or ICMPv6 header. + * Returns the checksum values from corresponding UDP, TCP, or ICMPv6 header. * * @returns The checksum value. * diff --git a/src/core/net/ip6_address.hpp b/src/core/net/ip6_address.hpp index a2542ae5d..3e91551a5 100644 --- a/src/core/net/ip6_address.hpp +++ b/src/core/net/ip6_address.hpp @@ -66,7 +66,7 @@ namespace Ip6 { */ /** - * This class represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). + * Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). * */ OT_TOOL_PACKED_BEGIN @@ -77,7 +77,7 @@ public: static constexpr uint8_t kLength = OT_IP6_PREFIX_SIZE * CHAR_BIT; ///< Length of Network Prefix in bits. /** - * This method generates and sets the Network Prefix to a crypto-secure random Unique Local Address (ULA) based + * Generates and sets the Network Prefix to a crypto-secure random Unique Local Address (ULA) based * on the pattern `fdxx:xxxx:xxxx:` (RFC 4193). * * @retval kErrorNone Successfully generated a random ULA Network Prefix @@ -89,7 +89,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class represents an IPv6 Prefix. + * Represents an IPv6 Prefix. * */ OT_TOOL_PACKED_BEGIN @@ -102,13 +102,13 @@ public: static constexpr uint16_t kInfoStringSize = OT_IP6_PREFIX_STRING_SIZE; ///< Info string size (`ToString()`). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method gets the prefix as a pointer to a byte array. + * Gets the prefix as a pointer to a byte array. * * @returns A pointer to a byte array containing the Prefix. * @@ -116,7 +116,7 @@ public: const uint8_t *GetBytes(void) const { return mPrefix.mFields.m8; } /** - * This method gets the subnet ID of the prefix. + * Gets the subnet ID of the prefix. * * @returns The 16-bit subnet ID. * @@ -124,7 +124,7 @@ public: uint16_t GetSubnetId(void) const { return HostSwap16(mPrefix.mFields.m16[3]); } /** - * This method gets the prefix length (in bits). + * Gets the prefix length (in bits). * * @returns The prefix length (in bits). * @@ -132,7 +132,7 @@ public: uint8_t GetLength(void) const { return mLength; } /** - * This method returns the size (in bytes) of the prefix. + * Returns the size (in bytes) of the prefix. * * @returns The size (in bytes) of the prefix array. * @@ -140,7 +140,7 @@ public: uint8_t GetBytesSize(void) const { return SizeForLength(mLength); } /** - * This method sets the prefix. + * Sets the prefix. * * @param[in] aPrefix A pointer to buffer containing the prefix bytes. * @param[in] aLength The length or prefix in bits. @@ -149,7 +149,7 @@ public: void Set(const uint8_t *aPrefix, uint8_t aLength); /** - * This method sets the prefix from a given Network Prefix. + * Sets the prefix from a given Network Prefix. * * @param[in] aNetworkPrefix A Network Prefix. * @@ -157,7 +157,7 @@ public: void Set(const NetworkPrefix &aNetworkPrefix) { Set(aNetworkPrefix.m8, NetworkPrefix::kLength); } /** - * This method sets the subnet ID of the prefix. + * Sets the subnet ID of the prefix. * * @param[in] aSubnetId A 16-bit subnet ID. * @@ -165,7 +165,7 @@ public: void SetSubnetId(uint16_t aSubnetId) { mPrefix.mFields.m16[3] = HostSwap16(aSubnetId); } /** - * This method set the prefix length. + * Set the prefix length. * * @param[in] aLength The new prefix length (in bits). * @@ -173,13 +173,13 @@ public: void SetLength(uint8_t aLength) { mLength = aLength; } /** - * This method sets the bits after the prefix length to 0. + * Sets the bits after the prefix length to 0. * */ void Tidy(void); /** - * This method indicates whether prefix length is valid (smaller or equal to max length). + * Indicates whether prefix length is valid (smaller or equal to max length). * * @retval TRUE The prefix length is valid. * @retval FALSE The prefix length is not valid. @@ -188,7 +188,7 @@ public: bool IsValid(void) const { return (mLength <= kMaxLength); } /** - * This method indicates whether the prefix is a Link-Local prefix. + * Indicates whether the prefix is a Link-Local prefix. * * @retval TRUE The prefix is a Link-Local prefix. * @retval FALSE The prefix is not a Link-Local prefix. @@ -197,7 +197,7 @@ public: bool IsLinkLocal(void) const; /** - * This method indicates whether the prefix is a Multicast prefix. + * Indicates whether the prefix is a Multicast prefix. * * @retval TRUE The prefix is a Multicast prefix. * @retval FALSE The prefix is not a Multicast prefix. @@ -206,7 +206,7 @@ public: bool IsMulticast(void) const; /** - * This method indicates whether the prefix is a Unique-Local prefix. + * Indicates whether the prefix is a Unique-Local prefix. * * @retval TRUE The prefix is a Unique-Local prefix. * @retval FALSE The prefix is not a Unique-Local prefix. @@ -215,7 +215,7 @@ public: bool IsUniqueLocal(void) const; /** - * This method indicates whether the prefix is equal to a given prefix. + * Indicates whether the prefix is equal to a given prefix. * * @param[in] aPrefixBytes A pointer to buffer containing the prefix bytes to compare with. * @param[in] aPrefixLength The length of prefix (in bits) specified by @p aPrefixBytes. @@ -227,7 +227,7 @@ public: bool IsEqual(const uint8_t *aPrefixBytes, uint8_t aPrefixLength) const; /** - * This method indicates whether the prefix contains a sub-prefix. + * Indicates whether the prefix contains a sub-prefix. * * @param[in] aSubPrefix A sub-prefix. * @@ -238,7 +238,7 @@ public: bool ContainsPrefix(const Prefix &aSubPrefix) const; /** - * This method indicates whether the prefix contains a sub-prefix (given as a `NetworkPrefix`). + * Indicates whether the prefix contains a sub-prefix (given as a `NetworkPrefix`). * * @param[in] aSubPrefix A sub-prefix (as a `NetworkPrefix`). * @@ -249,7 +249,7 @@ public: bool ContainsPrefix(const NetworkPrefix &aSubPrefix) const; /** - * This method overloads operator `==` to evaluate whether or not two prefixes are equal. + * Overloads operator `==` to evaluate whether or not two prefixes are equal. * * @param[in] aOther The other prefix to compare with. * @@ -260,7 +260,7 @@ public: bool operator==(const Prefix &aOther) const; /** - * This method overloads operator `<` to compare two prefixes. + * Overloads operator `<` to compare two prefixes. * * If the two prefixes have the same length N, then the bytes are compared directly (as two big-endian N-bit * numbers). If the two prefix have different lengths, the shorter prefix is padded by `0` bit up to the longer @@ -276,7 +276,7 @@ public: bool operator<(const Prefix &aOther) const; /** - * This static method converts a prefix length (in bits) to size (number of bytes). + * Converts a prefix length (in bits) to size (number of bytes). * * @param[in] aLength A prefix length (in bits). * @@ -286,7 +286,7 @@ public: static uint8_t SizeForLength(uint8_t aLength) { return BitVectorBytes(aLength); } /** - * This static method returns the number of IPv6 prefix bits that match. + * Returns the number of IPv6 prefix bits that match. * * @param[in] aPrefixA A pointer to a byte array containing a first prefix. * @param[in] aPrefixB A pointer to a byte array containing a second prefix. @@ -298,7 +298,7 @@ public: static uint8_t MatchLength(const uint8_t *aPrefixA, const uint8_t *aPrefixB, uint8_t aMaxSize); /** - * This method indicates whether or not a given prefix length is valid for use as a NAT64 prefix. + * Indicates whether or not a given prefix length is valid for use as a NAT64 prefix. * * A NAT64 prefix must have one of the following lengths: 32, 40, 48, 56, 64, or 96 (per RFC 6052). * @@ -311,7 +311,7 @@ public: static bool IsValidNat64PrefixLength(uint8_t aLength); /** - * This method indicates whether or not the prefix has a valid length for use as a NAT64 prefix. + * Indicates whether or not the prefix has a valid length for use as a NAT64 prefix. * * A NAT64 prefix must have one of the following lengths: 32, 40, 48, 56, 64, or 96 (per RFC 6052). * @@ -322,7 +322,7 @@ public: bool IsValidNat64(void) const { return IsValidNat64PrefixLength(mLength); } /** - * This method parses a given IPv6 prefix string and sets the prefix. + * Parses a given IPv6 prefix string and sets the prefix. * * @param[in] aString A null-terminated string, with format "/" * @@ -333,7 +333,7 @@ public: Error FromString(const char *aString); /** - * This method converts the prefix to a string. + * Converts the prefix to a string. * * The IPv6 prefix string is formatted as "%x:%x:%x:...[::]/plen". * @@ -343,7 +343,7 @@ public: InfoString ToString(void) const; /** - * This method converts the prefix to a string. + * Converts the prefix to a string. * * The IPv6 prefix string is formatted as "%x:%x:%x:...[::]/plen". * @@ -362,7 +362,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class represents the Interface Identifier of an IPv6 address. + * Represents the Interface Identifier of an IPv6 address. * */ OT_TOOL_PACKED_BEGIN @@ -378,13 +378,13 @@ public: static constexpr uint16_t kInfoStringSize = 17; ///< Max chars for the info string (`ToString()`). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method indicates whether or not the Interface Identifier is unspecified. + * Indicates whether or not the Interface Identifier is unspecified. * * @retval true If the Interface Identifier is unspecified. * @retval false If the Interface Identifier is not unspecified. @@ -393,7 +393,7 @@ public: bool IsUnspecified(void) const; /** - * This method indicates whether or not the Interface Identifier is reserved (RFC 5453). + * Indicates whether or not the Interface Identifier is reserved (RFC 5453). * * @retval true If the Interface Identifier is reserved. * @retval false If the Interface Identifier is not reserved. @@ -402,7 +402,7 @@ public: bool IsReserved(void) const; /** - * This method indicates whether or not the Interface Identifier is Subnet-Router Anycast (RFC 4291). + * Indicates whether or not the Interface Identifier is Subnet-Router Anycast (RFC 4291). * * @retval TRUE If the Interface Identifier is a Subnet-Router Anycast address. * @retval FALSE If the Interface Identifier is not a Subnet-Router Anycast address. @@ -411,7 +411,7 @@ public: bool IsSubnetRouterAnycast(void) const; /** - * This method indicates whether or not the Interface Identifier is Reserved Subnet Anycast (RFC 2526). + * Indicates whether or not the Interface Identifier is Reserved Subnet Anycast (RFC 2526). * * @retval TRUE If the Interface Identifier is a Reserved Subnet Anycast address. * @retval FALSE If the Interface Identifier is not a Reserved Subnet Anycast address. @@ -420,13 +420,13 @@ public: bool IsReservedSubnetAnycast(void) const; /** - * This method generates and sets the Interface Identifier to a crypto-secure random byte sequence. + * Generates and sets the Interface Identifier to a crypto-secure random byte sequence. * */ void GenerateRandom(void); /** - * This method gets the Interface Identifier as a pointer to a byte array. + * Gets the Interface Identifier as a pointer to a byte array. * * @returns A pointer to a byte array (of size `kSize`) containing the Interface Identifier. * @@ -434,7 +434,7 @@ public: const uint8_t *GetBytes(void) const { return mFields.m8; } /** - * This method sets the Interface Identifier from a given byte array. + * Sets the Interface Identifier from a given byte array. * * @param[in] aBuffer Pointer to an array containing the Interface Identifier. `kSize` bytes from the buffer * are copied to form the Interface Identifier. @@ -443,7 +443,7 @@ public: void SetBytes(const uint8_t *aBuffer); /** - * This method sets the Interface Identifier from a given IEEE 802.15.4 Extended Address. + * Sets the Interface Identifier from a given IEEE 802.15.4 Extended Address. * * @param[in] aExtAddress An Extended Address. * @@ -451,7 +451,7 @@ public: void SetFromExtAddress(const Mac::ExtAddress &aExtAddress); /** - * This method converts the Interface Identifier to an IEEE 802.15.4 Extended Address. + * Converts the Interface Identifier to an IEEE 802.15.4 Extended Address. * * @param[out] aExtAddress A reference to an Extended Address where the converted address is placed. * @@ -459,7 +459,7 @@ public: void ConvertToExtAddress(Mac::ExtAddress &aExtAddress) const; /** - * This method converts the Interface Identifier to an IEEE 802.15.4 MAC Address. + * Converts the Interface Identifier to an IEEE 802.15.4 MAC Address. * * @param[out] aMacAddress A reference to a MAC Address where the converted address is placed. * @@ -467,7 +467,7 @@ public: void ConvertToMacAddress(Mac::Address &aMacAddress) const; /** - * This method sets the Interface Identifier to Routing/Anycast Locator pattern `0000:00ff:fe00:xxxx` with a given + * Sets the Interface Identifier to Routing/Anycast Locator pattern `0000:00ff:fe00:xxxx` with a given * locator (RLOC16 or ALOC16) value. * * @param[in] aLocator RLOC16 or ALOC16. @@ -476,7 +476,7 @@ public: void SetToLocator(uint16_t aLocator); /** - * This method indicates whether or not the Interface Identifier matches the locator pattern `0000:00ff:fe00:xxxx`. + * Indicates whether or not the Interface Identifier matches the locator pattern `0000:00ff:fe00:xxxx`. * * @retval TRUE If the IID matches the locator pattern. * @retval FALSE If the IID does not match the locator pattern. @@ -485,7 +485,7 @@ public: bool IsLocator(void) const; /** - * This method indicates whether or not the Interface Identifier (IID) matches a Routing Locator (RLOC). + * Indicates whether or not the Interface Identifier (IID) matches a Routing Locator (RLOC). * * In addition to checking that the IID matches the locator pattern (`0000:00ff:fe00:xxxx`), this method also * checks that the locator value is a valid RLOC16. @@ -497,7 +497,7 @@ public: bool IsRoutingLocator(void) const; /** - * This method indicates whether or not the Interface Identifier (IID) matches an Anycast Locator (ALOC). + * Indicates whether or not the Interface Identifier (IID) matches an Anycast Locator (ALOC). * * In addition to checking that the IID matches the locator pattern (`0000:00ff:fe00:xxxx`), this method also * checks that the locator value is any valid ALOC16 (0xfc00 - 0xfcff). @@ -509,7 +509,7 @@ public: bool IsAnycastLocator(void) const; /** - * This method indicates whether or not the Interface Identifier (IID) matches a Service Anycast Locator (ALOC). + * Indicates whether or not the Interface Identifier (IID) matches a Service Anycast Locator (ALOC). * * In addition to checking that the IID matches the locator pattern (`0000:00ff:fe00:xxxx`), this method also * checks that the locator value is a valid Service ALOC16 (0xfc10 – 0xfc2f). @@ -521,9 +521,9 @@ public: bool IsAnycastServiceLocator(void) const; /** - * This method gets the Interface Identifier (IID) address locator fields. + * Gets the Interface Identifier (IID) address locator fields. * - * This method assumes the IID to match the locator pattern `0000:00ff:fe00:xxxx` (does not explicitly check this) + * Assumes the IID to match the locator pattern `0000:00ff:fe00:xxxx` (does not explicitly check this) * and returns the last `uint16` portion of the IID. * * @returns The RLOC16 or ALOC16. @@ -532,7 +532,7 @@ public: uint16_t GetLocator(void) const { return HostSwap16(mFields.m16[3]); } /** - * This method sets the Interface Identifier (IID) address locator field. + * Sets the Interface Identifier (IID) address locator field. * * Unlike `SetToLocator()`, this method only changes the last 2 bytes of the IID and keeps the rest of the address * as before. @@ -543,7 +543,7 @@ public: void SetLocator(uint16_t aLocator) { mFields.m16[3] = HostSwap16(aLocator); } /** - * This method applies a prefix to IID. + * Applies a prefix to IID. * * If the prefix length is longer than 64 bits, the prefix bits after 64 are written into the IID. This method only * changes the bits in IID up the prefix length and keeps the rest of the bits in IID as before. @@ -554,7 +554,7 @@ public: void ApplyPrefix(const Prefix &aPrefix); /** - * This method converts an Interface Identifier to a string. + * Converts an Interface Identifier to a string. * * @returns An `InfoString` containing the string representation of the Interface Identifier. * @@ -568,7 +568,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements an IPv6 address object. + * Implements an IPv6 address object. * */ OT_TOOL_PACKED_BEGIN @@ -595,7 +595,7 @@ public: static constexpr uint8_t kGlobalScope = 14; ///< Global scope /** - * This enumeration defines IPv6 address type filter. + * Defines IPv6 address type filter. * */ enum TypeFilter : uint8_t @@ -607,13 +607,13 @@ public: }; /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method gets the IPv6 address as a pointer to a byte array. + * Gets the IPv6 address as a pointer to a byte array. * * @returns A pointer to a byte array containing the IPv6 address. * @@ -621,7 +621,7 @@ public: const uint8_t *GetBytes(void) const { return mFields.m8; } /** - * This method sets the IPv6 address from a given byte array. + * Sets the IPv6 address from a given byte array. * * @param[in] aBuffer Pointer to an array containing the IPv6 address. `kSize` bytes from the buffer * are copied to form the IPv6 address. @@ -630,7 +630,7 @@ public: void SetBytes(const uint8_t *aBuffer) { memcpy(mFields.m8, aBuffer, kSize); } /** - * This method indicates whether or not the IPv6 address is the Unspecified Address. + * Indicates whether or not the IPv6 address is the Unspecified Address. * * @retval TRUE If the IPv6 address is the Unspecified Address. * @retval FALSE If the IPv6 address is not the Unspecified Address. @@ -639,7 +639,7 @@ public: bool IsUnspecified(void) const; /** - * This method indicates whether or not the IPv6 address is the Loopback Address. + * Indicates whether or not the IPv6 address is the Loopback Address. * * @retval TRUE If the IPv6 address is the Loopback Address. * @retval FALSE If the IPv6 address is not the Loopback Address. @@ -648,7 +648,7 @@ public: bool IsLoopback(void) const; /** - * This method indicates whether or not the IPv6 address scope is Link-Local. + * Indicates whether or not the IPv6 address scope is Link-Local. * * @retval TRUE If the IPv6 address scope is Link-Local. * @retval FALSE If the IPv6 address scope is not Link-Local. @@ -657,7 +657,7 @@ public: bool IsLinkLocal(void) const; /** - * This methods sets the IPv6 address to a Link-Local address with Interface Identifier generated from a given + * Sets the IPv6 address to a Link-Local address with Interface Identifier generated from a given * MAC Extended Address. * * @param[in] aExtAddress A MAC Extended Address (used to generate the IID). @@ -666,7 +666,7 @@ public: void SetToLinkLocalAddress(const Mac::ExtAddress &aExtAddress); /** - * This methods sets the IPv6 address to a Link-Local address with a given Interface Identifier. + * Sets the IPv6 address to a Link-Local address with a given Interface Identifier. * * @param[in] aIid An Interface Identifier. * @@ -674,7 +674,7 @@ public: void SetToLinkLocalAddress(const InterfaceIdentifier &aIid); /** - * This method indicates whether or not the IPv6 address is multicast address. + * Indicates whether or not the IPv6 address is multicast address. * * @retval TRUE If the IPv6 address is a multicast address. * @retval FALSE If the IPv6 address scope is not a multicast address. @@ -683,7 +683,7 @@ public: bool IsMulticast(void) const { return mFields.m8[0] == 0xff; } /** - * This method indicates whether or not the IPv6 address is a link-local multicast address. + * Indicates whether or not the IPv6 address is a link-local multicast address. * * @retval TRUE If the IPv6 address is a link-local multicast address. * @retval FALSE If the IPv6 address scope is not a link-local multicast address. @@ -692,7 +692,7 @@ public: bool IsLinkLocalMulticast(void) const; /** - * This method indicates whether or not the IPv6 address is a link-local all nodes multicast address (ff02::01). + * Indicates whether or not the IPv6 address is a link-local all nodes multicast address (ff02::01). * * @retval TRUE If the IPv6 address is a link-local all nodes multicast address. * @retval FALSE If the IPv6 address is not a link-local all nodes multicast address. @@ -701,13 +701,13 @@ public: bool IsLinkLocalAllNodesMulticast(void) const; /** - * This method sets the IPv6 address to the link-local all nodes multicast address (ff02::01). + * Sets the IPv6 address to the link-local all nodes multicast address (ff02::01). * */ void SetToLinkLocalAllNodesMulticast(void); /** - * This method indicates whether or not the IPv6 address is a link-local all routers multicast address (ff02::02). + * Indicates whether or not the IPv6 address is a link-local all routers multicast address (ff02::02). * * @retval TRUE If the IPv6 address is a link-local all routers multicast address. * @retval FALSE If the IPv6 address is not a link-local all routers multicast address. @@ -716,13 +716,13 @@ public: bool IsLinkLocalAllRoutersMulticast(void) const; /** - * This method sets the IPv6 address to the link-local all routers multicast address (ff02::02). + * Sets the IPv6 address to the link-local all routers multicast address (ff02::02). * */ void SetToLinkLocalAllRoutersMulticast(void); /** - * This method indicates whether or not the IPv6 address is a realm-local multicast address. + * Indicates whether or not the IPv6 address is a realm-local multicast address. * * @retval TRUE If the IPv6 address is a realm-local multicast address. * @retval FALSE If the IPv6 address scope is not a realm-local multicast address. @@ -731,7 +731,7 @@ public: bool IsRealmLocalMulticast(void) const; /** - * This method indicates whether or not the IPv6 address is a realm-local all nodes multicast address (ff03::01). + * Indicates whether or not the IPv6 address is a realm-local all nodes multicast address (ff03::01). * * @retval TRUE If the IPv6 address is a realm-local all nodes multicast address. * @retval FALSE If the IPv6 address is not a realm-local all nodes multicast address. @@ -740,13 +740,13 @@ public: bool IsRealmLocalAllNodesMulticast(void) const; /** - * This method sets the IPv6 address to the realm-local all nodes multicast address (ff03::01) + * Sets the IPv6 address to the realm-local all nodes multicast address (ff03::01) * */ void SetToRealmLocalAllNodesMulticast(void); /** - * This method indicates whether or not the IPv6 address is a realm-local all routers multicast address (ff03::02). + * Indicates whether or not the IPv6 address is a realm-local all routers multicast address (ff03::02). * * @retval TRUE If the IPv6 address is a realm-local all routers multicast address. * @retval FALSE If the IPv6 address is not a realm-local all routers multicast address. @@ -755,13 +755,13 @@ public: bool IsRealmLocalAllRoutersMulticast(void) const; /** - * This method sets the IPv6 address to the realm-local all routers multicast address (ff03::02). + * Sets the IPv6 address to the realm-local all routers multicast address (ff03::02). * */ void SetToRealmLocalAllRoutersMulticast(void); /** - * This method indicates whether or not the IPv6 address is a realm-local all MPL forwarders address (ff03::fc). + * Indicates whether or not the IPv6 address is a realm-local all MPL forwarders address (ff03::fc). * * @retval TRUE If the IPv6 address is a realm-local all MPL forwarders address. * @retval FALSE If the IPv6 address is not a realm-local all MPL forwarders address. @@ -770,13 +770,13 @@ public: bool IsRealmLocalAllMplForwarders(void) const; /** - * This method sets the the IPv6 address to the realm-local all MPL forwarders address (ff03::fc). + * Sets the the IPv6 address to the realm-local all MPL forwarders address (ff03::fc). * */ void SetToRealmLocalAllMplForwarders(void); /** - * This method indicates whether or not the IPv6 address is multicast larger than realm local. + * Indicates whether or not the IPv6 address is multicast larger than realm local. * * @retval TRUE If the IPv6 address is multicast larger than realm local. * @retval FALSE If the IPv6 address is not multicast or the scope is not larger than realm local. @@ -785,7 +785,7 @@ public: bool IsMulticastLargerThanRealmLocal(void) const; /** - * This method sets the IPv6 address to a Routing Locator (RLOC) IPv6 address with a given Network Prefix and + * Sets the IPv6 address to a Routing Locator (RLOC) IPv6 address with a given Network Prefix and * RLOC16 value. * * @param[in] aNetworkPrefix A Network Prefix. @@ -798,7 +798,7 @@ public: } /** - * This method sets the IPv6 address to a Anycast Locator (ALOC) IPv6 address with a given Network Prefix and + * Sets the IPv6 address to a Anycast Locator (ALOC) IPv6 address with a given Network Prefix and * ALOC16 value. * * @param[in] aNetworkPrefix A Network Prefix. @@ -811,7 +811,7 @@ public: } /** - * This method returns the Network Prefix of the IPv6 address (most significant 64 bits of the address). + * Returns the Network Prefix of the IPv6 address (most significant 64 bits of the address). * * @returns A reference to the Network Prefix. * @@ -822,7 +822,7 @@ public: } /** - * This method gets a prefix of the IPv6 address with a given length. + * Gets a prefix of the IPv6 address with a given length. * * @param[in] aLength The length of prefix in bits. * @param[out] aPrefix A reference to a prefix to output the fetched prefix. @@ -831,7 +831,7 @@ public: void GetPrefix(uint8_t aLength, Prefix &aPrefix) const { aPrefix.Set(mFields.m8, aLength); } /** - * This method indicates whether the IPv6 address matches a given prefix. + * Indicates whether the IPv6 address matches a given prefix. * * @param[in] aPrefix An IPv6 prefix to match with. * @@ -842,7 +842,7 @@ public: bool MatchesPrefix(const Prefix &aPrefix) const; /** - * This method indicates whether the IPv6 address matches a given prefix. + * Indicates whether the IPv6 address matches a given prefix. * * @param[in] aPrefix A buffer containing the prefix. * @param[in] aPrefixLength The prefix length (in bits). @@ -854,9 +854,9 @@ public: bool MatchesPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const; /** - * This method sets the IPv6 address prefix. + * Sets the IPv6 address prefix. * - * This method only changes the first @p aPrefixLength bits of the address and keeps the rest of the bits in the + * Only changes the first @p aPrefixLength bits of the address and keeps the rest of the bits in the * address as before. * * @param[in] aPrefix A buffer containing the prefix. @@ -866,7 +866,7 @@ public: void SetPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) { CopyBits(mFields.m8, aPrefix, aPrefixLength); } /** - * This method sets the IPv6 address prefix to the given Network Prefix. + * Sets the IPv6 address prefix to the given Network Prefix. * * @param[in] aNetworkPrefix A Network Prefix. * @@ -874,9 +874,9 @@ public: void SetPrefix(const NetworkPrefix &aNetworkPrefix); /** - * This method sets the IPv6 address prefix. + * Sets the IPv6 address prefix. * - * This method only changes the initial prefix length bits of the IPv6 address and keeps the rest of the bits in + * Only changes the initial prefix length bits of the IPv6 address and keeps the rest of the bits in * the address as before. * * @param[in] aPrefix An IPv6 prefix. @@ -885,7 +885,7 @@ public: void SetPrefix(const Prefix &aPrefix); /** - * This method sets the prefix content of the Prefix-Based Multicast Address. + * Sets the prefix content of the Prefix-Based Multicast Address. * * @param[in] aPrefix A buffer containing the prefix. * @param[in] aPrefixLength The prefix length (in bits). @@ -894,7 +894,7 @@ public: void SetMulticastNetworkPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength); /** - * This method sets the prefix content of Prefix-Based Multicast Address. + * Sets the prefix content of Prefix-Based Multicast Address. * * @param[in] aNetworkPrefix A reference to a Network Prefix. * @@ -905,7 +905,7 @@ public: } /** - * This method sets the prefix content of Prefix-Based Multicast Address. + * Sets the prefix content of Prefix-Based Multicast Address. * * @param[in] aPrefix An IPv6 Prefix. * @@ -916,7 +916,7 @@ public: } /** - * This method returns the Interface Identifier of the IPv6 address. + * Returns the Interface Identifier of the IPv6 address. * * @returns A reference to the Interface Identifier. * @@ -927,7 +927,7 @@ public: } /** - * This method returns the Interface Identifier of the IPv6 address. + * Returns the Interface Identifier of the IPv6 address. * * @returns A reference to the Interface Identifier. * @@ -935,7 +935,7 @@ public: InterfaceIdentifier &GetIid(void) { return static_cast(mFields.mComponents.mIid); } /** - * This method sets the Interface Identifier. + * Sets the Interface Identifier. * * @param[in] aIid An Interface Identifier. * @@ -943,7 +943,7 @@ public: void SetIid(const InterfaceIdentifier &aIid) { GetIid() = aIid; } /** - * This method returns the IPv6 address scope. + * Returns the IPv6 address scope. * * @returns The IPv6 address scope. * @@ -951,7 +951,7 @@ public: uint8_t GetScope(void) const; /** - * This method returns the number of IPv6 prefix bits that match. + * Returns the number of IPv6 prefix bits that match. * * @param[in] aOther The IPv6 address to match against. * @@ -961,7 +961,7 @@ public: uint8_t PrefixMatch(const Address &aOther) const; /** - * This method indicates whether address matches a given type filter. + * Indicates whether address matches a given type filter. * * @param[in] aFilter An address type filter. * @@ -972,7 +972,7 @@ public: bool MatchesFilter(TypeFilter aFilter) const; /** - * This method sets the IPv6 address by performing NAT64 address translation from a given IPv4 address as specified + * Sets the IPv6 address by performing NAT64 address translation from a given IPv4 address as specified * in RFC 6052. * * The NAT64 @p aPrefix MUST have one of the following lengths: 32, 40, 48, 56, 64, or 96, otherwise the behavior @@ -985,7 +985,7 @@ public: void SynthesizeFromIp4Address(const Prefix &aPrefix, const Ip4::Address &aIp4Address); /** - * This method converts an IPv6 address string to binary. + * Converts an IPv6 address string to binary. * * @param[in] aString A pointer to the null-terminated string. * @@ -996,7 +996,7 @@ public: Error FromString(const char *aString); /** - * This method converts the IPv6 address to a string. + * Converts the IPv6 address to a string. * * The IPv6 address string is formatted as 16 hex values separated by ':' (i.e., "%x:%x:%x:...:%x"). * @@ -1006,7 +1006,7 @@ public: InfoString ToString(void) const; /** - * This method convert the IPv6 address to a C string. + * Convert the IPv6 address to a C string. * * The IPv6 address string is formatted as 16 hex values separated by ':' (i.e., "%x:%x:%x:...:%x"). * @@ -1020,7 +1020,7 @@ public: void ToString(char *aBuffer, uint16_t aSize) const; /** - * This method overloads operator `<` to compare two IPv6 addresses. + * Overloads operator `<` to compare two IPv6 addresses. * * @param[in] aOther The other IPv6 address to compare with. * diff --git a/src/core/net/ip6_filter.hpp b/src/core/net/ip6_filter.hpp index 664aa0ed1..b2ef3c29c 100644 --- a/src/core/net/ip6_filter.hpp +++ b/src/core/net/ip6_filter.hpp @@ -55,14 +55,14 @@ namespace Ip6 { */ /** - * This class implements an IPv6 datagram filter. + * Implements an IPv6 datagram filter. * */ class Filter : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the Filter object. + * Initializes the Filter object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -73,7 +73,7 @@ public: } /** - * This method indicates whether or not the IPv6 datagram passes the filter. + * Indicates whether or not the IPv6 datagram passes the filter. * * @param[in] aMessage The IPv6 datagram to process. * @@ -84,7 +84,7 @@ public: bool Accept(Message &aMessage) const; /** - * This method adds a port to the allowed unsecured port list. + * Adds a port to the allowed unsecured port list. * * @param[in] aPort The port value. * @@ -96,7 +96,7 @@ public: Error AddUnsecurePort(uint16_t aPort) { return UpdateUnsecurePorts(kAdd, aPort); } /** - * This method removes a port from the allowed unsecure port list. + * Removes a port from the allowed unsecure port list. * * @param[in] aPort The port value. * @@ -108,7 +108,7 @@ public: Error RemoveUnsecurePort(uint16_t aPort) { return UpdateUnsecurePorts(kRemove, aPort); } /** - * This method checks whether a port is in the unsecure port list. + * Checks whether a port is in the unsecure port list. * * @param[in] aPort The port value. * @@ -118,13 +118,13 @@ public: bool IsUnsecurePort(uint16_t aPort) { return mUnsecurePorts.Contains(aPort); } /** - * This method removes all ports from the allowed unsecure port list. + * Removes all ports from the allowed unsecure port list. * */ void RemoveAllUnsecurePorts(void) { mUnsecurePorts.Clear(); } /** - * This method returns a pointer to the unsecure port list. + * Returns a pointer to the unsecure port list. * * @note Port value 0 is used to indicate an invalid entry. * diff --git a/src/core/net/ip6_headers.hpp b/src/core/net/ip6_headers.hpp index bb2ba1065..2fc55c5aa 100644 --- a/src/core/net/ip6_headers.hpp +++ b/src/core/net/ip6_headers.hpp @@ -88,7 +88,7 @@ using ot::Encoding::BigEndian::HostSwap32; */ /** - * This class implements IPv6 header generation and parsing. + * Implements IPv6 header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -102,7 +102,7 @@ public: static constexpr uint8_t kDestinationFieldOffset = 24; ///< Offset of Destination Address field in IPv6 header. /** - * This method initializes the Version to 6 and sets Traffic Class and Flow fields to zero. + * Initializes the Version to 6 and sets Traffic Class and Flow fields to zero. * * The other fields in the IPv6 header remain unchanged. * @@ -110,7 +110,7 @@ public: void InitVersionTrafficClassFlow(void) { SetVerionTrafficClassFlow(kVersTcFlowInit); } /** - * This method indicates whether or not the header appears to be well-formed. + * Indicates whether or not the header appears to be well-formed. * * @retval TRUE If the header appears to be well-formed. * @retval FALSE If the header does not appear to be well-formed. @@ -119,7 +119,7 @@ public: bool IsValid(void) const; /** - * This method indicates whether or not the IPv6 Version is set to 6. + * Indicates whether or not the IPv6 Version is set to 6. * * @retval TRUE If the IPv6 Version is set to 6. * @retval FALSE If the IPv6 Version is not set to 6. @@ -128,7 +128,7 @@ public: bool IsVersion6(void) const { return (mVerTcFlow.m8[0] & kVersionMask) == kVersion6; } /** - * This method gets the combination of Version, Traffic Class, and Flow fields as a 32-bit value. + * Gets the combination of Version, Traffic Class, and Flow fields as a 32-bit value. * * @returns The Version, Traffic Class, and Flow fields as a 32-bit value. * @@ -136,7 +136,7 @@ public: uint32_t GetVerionTrafficClassFlow(void) const { return HostSwap32(mVerTcFlow.m32); } /** - * This method sets the combination of Version, Traffic Class, and Flow fields as a 32-bit value. + * Sets the combination of Version, Traffic Class, and Flow fields as a 32-bit value. * * @param[in] aVerTcFlow The Version, Traffic Class, and Flow fields as a 32-bit value. * @@ -144,7 +144,7 @@ public: void SetVerionTrafficClassFlow(uint32_t aVerTcFlow) { mVerTcFlow.m32 = HostSwap32(aVerTcFlow); } /** - * This method gets the Traffic Class field. + * Gets the Traffic Class field. * * @returns The Traffic Class field. * @@ -155,7 +155,7 @@ public: } /** - * This method sets the Traffic Class filed. + * Sets the Traffic Class filed. * * @param[in] aTc The Traffic Class value. * @@ -167,7 +167,7 @@ public: } /** - * This method gets the 6-bit Differentiated Services Code Point (DSCP) from Traffic Class field. + * Gets the 6-bit Differentiated Services Code Point (DSCP) from Traffic Class field. * * @returns The DSCP value. * @@ -178,7 +178,7 @@ public: } /** - * This method sets 6-bit Differentiated Services Code Point (DSCP) in IPv6 header. + * Sets 6-bit Differentiated Services Code Point (DSCP) in IPv6 header. * * @param[in] aDscp The DSCP value. * @@ -190,7 +190,7 @@ public: } /** - * This method gets the 2-bit Explicit Congestion Notification (ECN) from Traffic Class field. + * Gets the 2-bit Explicit Congestion Notification (ECN) from Traffic Class field. * * @returns The ECN value. * @@ -198,7 +198,7 @@ public: Ecn GetEcn(void) const { return static_cast((mVerTcFlow.m8[1] & kEcnMask) >> kEcnOffset); } /** - * This method sets the 2-bit Explicit Congestion Notification (ECN) in IPv6 header.. + * Sets the 2-bit Explicit Congestion Notification (ECN) in IPv6 header.. * * @param[in] aEcn The ECN value. * @@ -206,7 +206,7 @@ public: void SetEcn(Ecn aEcn) { mVerTcFlow.m8[1] = (mVerTcFlow.m8[1] & ~kEcnMask) | ((aEcn << kEcnOffset) & kEcnMask); } /** - * This method gets the 20-bit Flow field. + * Gets the 20-bit Flow field. * * @returns The Flow value. * @@ -214,7 +214,7 @@ public: uint32_t GetFlow(void) const { return HostSwap32(mVerTcFlow.m32) & kFlowMask; } /** - * This method sets the 20-bit Flow field in IPv6 header. + * Sets the 20-bit Flow field in IPv6 header. * * @param[in] aFlow The Flow value. * @@ -225,7 +225,7 @@ public: } /** - * This method returns the IPv6 Payload Length value. + * Returns the IPv6 Payload Length value. * * @returns The IPv6 Payload Length value. * @@ -233,7 +233,7 @@ public: uint16_t GetPayloadLength(void) const { return HostSwap16(mPayloadLength); } /** - * This method sets the IPv6 Payload Length value. + * Sets the IPv6 Payload Length value. * * @param[in] aLength The IPv6 Payload Length value. * @@ -241,7 +241,7 @@ public: void SetPayloadLength(uint16_t aLength) { mPayloadLength = HostSwap16(aLength); } /** - * This method returns the IPv6 Next Header value. + * Returns the IPv6 Next Header value. * * @returns The IPv6 Next Header value. * @@ -249,7 +249,7 @@ public: uint8_t GetNextHeader(void) const { return mNextHeader; } /** - * This method sets the IPv6 Next Header value. + * Sets the IPv6 Next Header value. * * @param[in] aNextHeader The IPv6 Next Header value. * @@ -257,7 +257,7 @@ public: void SetNextHeader(uint8_t aNextHeader) { mNextHeader = aNextHeader; } /** - * This method returns the IPv6 Hop Limit value. + * Returns the IPv6 Hop Limit value. * * @returns The IPv6 Hop Limit value. * @@ -265,7 +265,7 @@ public: uint8_t GetHopLimit(void) const { return mHopLimit; } /** - * This method sets the IPv6 Hop Limit value. + * Sets the IPv6 Hop Limit value. * * @param[in] aHopLimit The IPv6 Hop Limit value. * @@ -273,7 +273,7 @@ public: void SetHopLimit(uint8_t aHopLimit) { mHopLimit = aHopLimit; } /** - * This method returns the IPv6 Source address. + * Returns the IPv6 Source address. * * @returns A reference to the IPv6 Source address. * @@ -281,7 +281,7 @@ public: Address &GetSource(void) { return mSource; } /** - * This method returns the IPv6 Source address. + * Returns the IPv6 Source address. * * @returns A reference to the IPv6 Source address. * @@ -289,7 +289,7 @@ public: const Address &GetSource(void) const { return mSource; } /** - * This method sets the IPv6 Source address. + * Sets the IPv6 Source address. * * @param[in] aSource A reference to the IPv6 Source address. * @@ -297,7 +297,7 @@ public: void SetSource(const Address &aSource) { mSource = aSource; } /** - * This method returns the IPv6 Destination address. + * Returns the IPv6 Destination address. * * @returns A reference to the IPv6 Destination address. * @@ -305,7 +305,7 @@ public: Address &GetDestination(void) { return mDestination; } /** - * This method returns the IPv6 Destination address. + * Returns the IPv6 Destination address. * * @returns A reference to the IPv6 Destination address. * @@ -313,7 +313,7 @@ public: const Address &GetDestination(void) const { return mDestination; } /** - * This method sets the IPv6 Destination address. + * Sets the IPv6 Destination address. * * @param[in] aDestination A reference to the IPv6 Destination address. * @@ -321,7 +321,7 @@ public: void SetDestination(const Address &aDestination) { mDestination = aDestination; } /** - * This method parses and validates the IPv6 header from a given message. + * Parses and validates the IPv6 header from a given message. * * The header is read from @p aMessage at offset zero. * @@ -370,7 +370,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements IPv6 Extension Header generation and processing. + * Implements IPv6 Extension Header generation and processing. * */ OT_TOOL_PACKED_BEGIN @@ -386,7 +386,7 @@ public: static constexpr uint16_t kLengthUnitSize = 8; /** - * This method returns the IPv6 Next Header value. + * Returns the IPv6 Next Header value. * * @returns The IPv6 Next Header value. * @@ -394,7 +394,7 @@ public: uint8_t GetNextHeader(void) const { return mNextHeader; } /** - * This method sets the IPv6 Next Header value. + * Sets the IPv6 Next Header value. * * @param[in] aNextHeader The IPv6 Next Header value. * @@ -402,7 +402,7 @@ public: void SetNextHeader(uint8_t aNextHeader) { mNextHeader = aNextHeader; } /** - * This method returns the IPv6 Header Extension Length value. + * Returns the IPv6 Header Extension Length value. * * The Length is in 8-byte units and does not include the first 8 bytes. * @@ -412,7 +412,7 @@ public: uint8_t GetLength(void) const { return mLength; } /** - * This method sets the IPv6 Header Extension Length value. + * Sets the IPv6 Header Extension Length value. * * The Length is in 8-byte units and does not include the first 8 bytes. * @@ -422,7 +422,7 @@ public: void SetLength(uint8_t aLength) { mLength = aLength; } /** - * This method returns the size (number of bytes) of the Extension Header including Next Header and Length fields. + * Returns the size (number of bytes) of the Extension Header including Next Header and Length fields. * * @returns The size (number of bytes) of the Extension Header. * @@ -440,7 +440,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements IPv6 Hop-by-Hop Options Header generation and parsing. + * Implements IPv6 Hop-by-Hop Options Header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -449,7 +449,7 @@ class HopByHopHeader : public ExtensionHeader } OT_TOOL_PACKED_END; /** - * This class implements IPv6 Options generation and parsing. + * Implements IPv6 Options generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -469,7 +469,7 @@ public: }; /** - * This method returns the IPv6 Option Type value. + * Returns the IPv6 Option Type value. * * @returns The IPv6 Option Type value. * @@ -477,7 +477,7 @@ public: uint8_t GetType(void) const { return mType; } /** - * This method indicates whether IPv6 Option is padding (either Pad1 or PadN). + * Indicates whether IPv6 Option is padding (either Pad1 or PadN). * * @retval TRUE The Option is padding. * @retval FALSE The Option is not padding. @@ -486,7 +486,7 @@ public: bool IsPadding(void) const { return (mType == kTypePad1) || (mType == kTypePadN); } /** - * This method returns the IPv6 Option action for unrecognized IPv6 Options. + * Returns the IPv6 Option action for unrecognized IPv6 Options. * * @returns The IPv6 Option action for unrecognized IPv6 Options. * @@ -494,7 +494,7 @@ public: Action GetAction(void) const { return static_cast(mType & kActionMask); } /** - * This method returns the IPv6 Option Length value. + * Returns the IPv6 Option Length value. * * @returns The IPv6 Option Length value. * @@ -502,9 +502,9 @@ public: uint8_t GetLength(void) const { return mLength; } /** - * This method returns the size (number of bytes) of the IPv6 Option. + * Returns the size (number of bytes) of the IPv6 Option. * - * This method returns the proper size of the Option independent of its type, particularly if Option is Pad1 (which + * Returns the proper size of the Option independent of its type, particularly if Option is Pad1 (which * does not follow the common Option header structure and has only Type field with no Length field). For other * Option types, the returned size includes the Type and Length fields. * @@ -514,7 +514,7 @@ public: uint16_t GetSize(void) const; /** - * This method parses and validates the IPv6 Option from a given message. + * Parses and validates the IPv6 Option from a given message. * * The Option is read from @p aOffset in @p aMessage. This method then checks that the entire Option is present * in @p aMessage before the @p aEndOffset. @@ -534,7 +534,7 @@ protected: static constexpr uint8_t kTypePadN = 0x01; ///< PanN Option Type. /** - * This method sets the IPv6 Option Type value. + * Sets the IPv6 Option Type value. * * @param[in] aType The IPv6 Option Type value. * @@ -542,7 +542,7 @@ protected: void SetType(uint8_t aType) { mType = aType; } /** - * This method sets the IPv6 Option Length value. + * Sets the IPv6 Option Length value. * * @param[in] aLength The IPv6 Option Length value. * @@ -557,7 +557,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements IPv6 Pad Options (Pad1 or PadN) generation. + * Implements IPv6 Pad Options (Pad1 or PadN) generation. * */ OT_TOOL_PACKED_BEGIN @@ -567,7 +567,7 @@ class PadOption : public Option, private Clearable public: /** - * This method initializes the Pad Option for a given total Pad size. + * Initializes the Pad Option for a given total Pad size. * * The @p aPadSize MUST be from range 1-7. Otherwise the behavior of this method is undefined. * @@ -577,7 +577,7 @@ public: void InitForPadSize(uint8_t aPadSize); /** - * This method initializes the Pad Option for padding an IPv6 Extension header with a given current size. + * Initializes the Pad Option for padding an IPv6 Extension header with a given current size. * * The Extension Header Length is in 8-bytes unit, so the total size should be a multiple of 8. This method * determines the Pad Option size needed for appending to Extension Header based on it current size @p aHeaderSize @@ -599,7 +599,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements IPv6 Fragment Header generation and parsing. + * Implements IPv6 Fragment Header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -607,7 +607,7 @@ class FragmentHeader { public: /** - * This method initializes the IPv6 Fragment header. + * Initializes the IPv6 Fragment header. * */ void Init(void) @@ -618,7 +618,7 @@ public: } /** - * This method returns the IPv6 Next Header value. + * Returns the IPv6 Next Header value. * * @returns The IPv6 Next Header value. * @@ -626,7 +626,7 @@ public: uint8_t GetNextHeader(void) const { return mNextHeader; } /** - * This method sets the IPv6 Next Header value. + * Sets the IPv6 Next Header value. * * @param[in] aNextHeader The IPv6 Next Header value. * @@ -634,7 +634,7 @@ public: void SetNextHeader(uint8_t aNextHeader) { mNextHeader = aNextHeader; } /** - * This method returns the Fragment Offset value. + * Returns the Fragment Offset value. * * @returns The Fragment Offset value. * @@ -642,7 +642,7 @@ public: uint16_t GetOffset(void) const { return (HostSwap16(mOffsetMore) & kOffsetMask) >> kOffsetOffset; } /** - * This method sets the Fragment Offset value. + * Sets the Fragment Offset value. * * @param[in] aOffset The Fragment Offset value. */ @@ -654,7 +654,7 @@ public: } /** - * This method returns the M flag value. + * Returns the M flag value. * * @returns The M flag value. * @@ -662,19 +662,19 @@ public: bool IsMoreFlagSet(void) const { return HostSwap16(mOffsetMore) & kMoreFlag; } /** - * This method clears the M flag value. + * Clears the M flag value. * */ void ClearMoreFlag(void) { mOffsetMore = HostSwap16(HostSwap16(mOffsetMore) & ~kMoreFlag); } /** - * This method sets the M flag value. + * Sets the M flag value. * */ void SetMoreFlag(void) { mOffsetMore = HostSwap16(HostSwap16(mOffsetMore) | kMoreFlag); } /** - * This method returns the frame identification. + * Returns the frame identification. * * @returns The frame identification. * @@ -682,14 +682,14 @@ public: uint32_t GetIdentification(void) const { return mIdentification; } /** - * This method sets the frame identification. + * Sets the frame identification. * * @param[in] aIdentification The fragment identification value. */ void SetIdentification(uint32_t aIdentification) { mIdentification = aIdentification; } /** - * This method returns the next valid payload length for a fragment. + * Returns the next valid payload length for a fragment. * * @param[in] aLength The payload length to be validated for a fragment. * @@ -699,7 +699,7 @@ public: static inline uint16_t MakeDivisibleByEight(uint16_t aLength) { return aLength & 0xfff8; } /** - * This method converts the fragment offset of 8-octet units into bytes. + * Converts the fragment offset of 8-octet units into bytes. * * @param[in] aOffset The fragment offset in 8-octet units. * @@ -709,7 +709,7 @@ public: static inline uint16_t FragmentOffsetToBytes(uint16_t aOffset) { return static_cast(aOffset << 3); } /** - * This method converts a fragment offset in bytes into a fragment offset in 8-octet units. + * Converts a fragment offset in bytes into a fragment offset in 8-octet units. * * @param[in] aOffset The fragment offset in bytes. * diff --git a/src/core/net/ip6_mpl.hpp b/src/core/net/ip6_mpl.hpp index 60fd6686f..65f5be40d 100644 --- a/src/core/net/ip6_mpl.hpp +++ b/src/core/net/ip6_mpl.hpp @@ -57,7 +57,7 @@ namespace Ip6 { */ /** - * This class implements MPL header generation and parsing. + * Implements MPL header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -80,7 +80,7 @@ public: }; /** - * This method initializes the MPL Option. + * Initializes the MPL Option. * * The @p aSeedIdLength MUST be either `kSeedIdLength0` or `kSeedIdLength2`. Other values are not supported. * @@ -90,7 +90,7 @@ public: void Init(SeedIdLength aSeedIdLength); /** - * This method returns the MPL Seed Id Length value. + * Returns the MPL Seed Id Length value. * * @returns The MPL Seed Id Length value. * @@ -98,7 +98,7 @@ public: SeedIdLength GetSeedIdLength(void) const { return static_cast(mControl & kSeedIdLengthMask); } /** - * This method indicates whether or not the MPL M flag is set. + * Indicates whether or not the MPL M flag is set. * * @retval TRUE If the MPL M flag is set. * @retval FALSE If the MPL M flag is not set. @@ -107,19 +107,19 @@ public: bool IsMaxFlagSet(void) const { return (mControl & kMaxFlag) != 0; } /** - * This method clears the MPL M flag. + * Clears the MPL M flag. * */ void ClearMaxFlag(void) { mControl &= ~kMaxFlag; } /** - * This method sets the MPL M flag. + * Sets the MPL M flag. * */ void SetMaxFlag(void) { mControl |= kMaxFlag; } /** - * This method returns the MPL Sequence value. + * Returns the MPL Sequence value. * * @returns The MPL Sequence value. * @@ -127,7 +127,7 @@ public: uint8_t GetSequence(void) const { return mSequence; } /** - * This method sets the MPL Sequence value. + * Sets the MPL Sequence value. * * @param[in] aSequence The MPL Sequence value. * @@ -135,7 +135,7 @@ public: void SetSequence(uint8_t aSequence) { mSequence = aSequence; } /** - * This method returns the MPL Seed Id value. + * Returns the MPL Seed Id value. * * @returns The MPL Seed Id value. * @@ -143,7 +143,7 @@ public: uint16_t GetSeedId(void) const { return HostSwap16(mSeedId); } /** - * This method sets the MPL Seed Id value. + * Sets the MPL Seed Id value. * * @param[in] aSeedId The MPL Seed Id value. * @@ -160,7 +160,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements MPL message processing. + * Implements MPL message processing. * */ class Mpl : public InstanceLocator, private NonCopyable @@ -169,7 +169,7 @@ class Mpl : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the MPL object. + * Initializes the MPL object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -177,7 +177,7 @@ public: explicit Mpl(Instance &aInstance); /** - * This method initializes the MPL option. + * Initializes the MPL option. * * @param[in] aOption A reference to the MPL header to initialize. * @param[in] aAddress A reference to the IPv6 Source Address. @@ -186,7 +186,7 @@ public: void InitOption(MplOption &aOption, const Address &aAddress); /** - * This method processes an MPL option. When the MPL module acts as an MPL Forwarder + * Processes an MPL option. When the MPL module acts as an MPL Forwarder * it disseminates MPL Data Message using Trickle timer expirations. When acts as an * MPL Seed it allows to send the first MPL Data Message directly, then sets up Trickle * timer expirations for subsequent retransmissions. @@ -206,7 +206,7 @@ public: #if OPENTHREAD_FTD /** - * This method returns a reference to the buffered message set. + * Returns a reference to the buffered message set. * * @returns A reference to the buffered message set. * diff --git a/src/core/net/ip6_types.hpp b/src/core/net/ip6_types.hpp index 8e1f9c341..5d70e9192 100644 --- a/src/core/net/ip6_types.hpp +++ b/src/core/net/ip6_types.hpp @@ -99,7 +99,7 @@ enum IpDscpCs : uint8_t }; /** - * This enumeration represents the 2-bit Explicit Congestion Notification (ECN) values. + * Represents the 2-bit Explicit Congestion Notification (ECN) values. * */ enum Ecn : uint8_t diff --git a/src/core/net/nat64_translator.hpp b/src/core/net/nat64_translator.hpp index 1ec16a4a6..2335e7a9f 100644 --- a/src/core/net/nat64_translator.hpp +++ b/src/core/net/nat64_translator.hpp @@ -57,7 +57,7 @@ enum State : uint8_t }; /** - * This function converts a `State` into a string. + * Converts a `State` into a string. * * @param[in] aState A state. * @@ -69,7 +69,7 @@ const char *StateToString(State aState); #if OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE /** - * This class implements the NAT64 translator. + * Implements the NAT64 translator. * */ class Translator : public InstanceLocator, private NonCopyable @@ -153,7 +153,7 @@ public: }; /** - * This constructor initializes the NAT64 translator. + * Initializes the NAT64 translator. * */ explicit Translator(Instance &aInstance); @@ -179,7 +179,7 @@ public: State GetState(void) const { return mState; } /** - * This method translates an IPv4 datagram to an IPv6 datagram and sends it via Thread interface. + * Translates an IPv4 datagram to an IPv6 datagram and sends it via Thread interface. * * The caller transfers ownership of @p aMessage when making this call. OpenThread will free @p aMessage when * processing is complete, including when a value other than `kErrorNone` is returned. @@ -253,7 +253,7 @@ public: /** * Sets the prefix of NAT64-mapped addresses in the thread network. The address mapping table will not be cleared. - * This function equals to `ClearNat64Prefix` when an empty prefix is provided. + * Equals to `ClearNat64Prefix` when an empty prefix is provided. * * @param[in] aNat64Prefix The prefix of the NAT64-mapped addresses. * diff --git a/src/core/net/nd6.hpp b/src/core/net/nd6.hpp index 8a084a917..1f4b2e645 100644 --- a/src/core/net/nd6.hpp +++ b/src/core/net/nd6.hpp @@ -61,7 +61,7 @@ namespace Nd { typedef NetworkData::RoutePreference RoutePreference; ///< Route Preference /** - * This class represents the variable length options in Neighbor Discovery messages. + * Represents the variable length options in Neighbor Discovery messages. * * @sa PrefixInfoOption * @sa RouteInfoOption @@ -82,7 +82,7 @@ public: static constexpr uint16_t kLengthUnit = 8; ///< The unit of length in octets. /** - * This method gets the option type. + * Gets the option type. * * @returns The option type. * @@ -90,7 +90,7 @@ public: uint8_t GetType(void) const { return mType; } /** - * This method sets the option type. + * Sets the option type. * * @param[in] aType The option type. * @@ -99,7 +99,7 @@ public: void SetType(Type aType) { mType = aType; } /** - * This method sets the length based on a given total option size in bytes. + * Sets the length based on a given total option size in bytes. * * Th option must end on a 64-bit boundary, so the length is derived as `(aSize + 7) / 8 * 8`. * @@ -109,7 +109,7 @@ public: void SetSize(uint16_t aSize) { mLength = static_cast((aSize + kLengthUnit - 1) / kLengthUnit); } /** - * This method returns the size of the option in bytes. + * Returns the size of the option in bytes. * * @returns The size of the option in bytes. * @@ -117,7 +117,7 @@ public: uint16_t GetSize(void) const { return mLength * kLengthUnit; } /** - * This method sets the length of the option (in unit of 8 bytes). + * Sets the length of the option (in unit of 8 bytes). * * @param[in] aLength The length of the option in unit of 8 bytes. * @@ -125,7 +125,7 @@ public: void SetLength(uint8_t aLength) { mLength = aLength; } /** - * This method returns the length of the option (in unit of 8 bytes). + * Returns the length of the option (in unit of 8 bytes). * * @returns The length of the option in unit of 8 bytes. * @@ -133,7 +133,7 @@ public: uint16_t GetLength(void) const { return mLength; } /** - * This method indicates whether or not this option is valid. + * Indicates whether or not this option is valid. * * @retval TRUE The option is valid. * @retval FALSE The option is not valid. @@ -167,7 +167,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class represents the Prefix Information Option. + * Represents the Prefix Information Option. * * See section 4.6.2 of RFC 4861 for definition of this option [https://tools.ietf.org/html/rfc4861#section-4.6.2] * @@ -181,13 +181,13 @@ public: static constexpr Type kType = kTypePrefixInfo; ///< Prefix Information Option Type. /** - * This method initializes the Prefix Info option with proper type and length and sets all other fields to zero. + * Initializes the Prefix Info option with proper type and length and sets all other fields to zero. * */ void Init(void); /** - * This method indicates whether or not the on-link flag is set. + * Indicates whether or not the on-link flag is set. * * @retval TRUE The on-link flag is set. * @retval FALSE The on-link flag is not set. @@ -196,19 +196,19 @@ public: bool IsOnLinkFlagSet(void) const { return (mFlags & kOnLinkFlagMask) != 0; } /** - * This method sets the on-link (L) flag. + * Sets the on-link (L) flag. * */ void SetOnLinkFlag(void) { mFlags |= kOnLinkFlagMask; } /** - * This method clears the on-link (L) flag. + * Clears the on-link (L) flag. * */ void ClearOnLinkFlag(void) { mFlags &= ~kOnLinkFlagMask; } /** - * This method indicates whether or not the autonomous address-configuration (A) flag is set. + * Indicates whether or not the autonomous address-configuration (A) flag is set. * * @retval TRUE The auto address-config flag is set. * @retval FALSE The auto address-config flag is not set. @@ -217,19 +217,19 @@ public: bool IsAutoAddrConfigFlagSet(void) const { return (mFlags & kAutoConfigFlagMask) != 0; } /** - * This method sets the autonomous address-configuration (A) flag. + * Sets the autonomous address-configuration (A) flag. * */ void SetAutoAddrConfigFlag(void) { mFlags |= kAutoConfigFlagMask; } /** - * This method clears the autonomous address-configuration (A) flag. + * Clears the autonomous address-configuration (A) flag. * */ void ClearAutoAddrConfigFlag(void) { mFlags &= ~kAutoConfigFlagMask; } /** - * This method sets the valid lifetime of the prefix in seconds. + * Sets the valid lifetime of the prefix in seconds. * * @param[in] aValidLifetime The valid lifetime in seconds. * @@ -245,7 +245,7 @@ public: uint32_t GetValidLifetime(void) const { return HostSwap32(mValidLifetime); } /** - * This method sets the preferred lifetime of the prefix in seconds. + * Sets the preferred lifetime of the prefix in seconds. * * @param[in] aPreferredLifetime The preferred lifetime in seconds. * @@ -261,7 +261,7 @@ public: uint32_t GetPreferredLifetime(void) const { return HostSwap32(mPreferredLifetime); } /** - * This method sets the prefix. + * Sets the prefix. * * @param[in] aPrefix The prefix contained in this option. * @@ -269,7 +269,7 @@ public: void SetPrefix(const Prefix &aPrefix); /** - * This method gets the prefix in this option. + * Gets the prefix in this option. * * @param[out] aPrefix Reference to a `Prefix` to return the prefix. * @@ -277,7 +277,7 @@ public: void GetPrefix(Prefix &aPrefix) const; /** - * This method indicates whether or not the option is valid. + * Indicates whether or not the option is valid. * * @retval TRUE The option is valid * @retval FALSE The option is not valid. @@ -324,7 +324,7 @@ private: static_assert(sizeof(PrefixInfoOption) == 32, "invalid PrefixInfoOption structure"); /** - * This class represents the Route Information Option. + * Represents the Route Information Option. * * See section 2.3 of RFC 4191 for definition of this option. [https://tools.ietf.org/html/rfc4191#section-2.3] * @@ -339,13 +339,13 @@ public: static constexpr Type kType = kTypeRouteInfo; ///< Route Information Option Type. /** - * This method initializes the option setting the type and clearing (setting to zero) all other fields. + * Initializes the option setting the type and clearing (setting to zero) all other fields. * */ void Init(void); /** - * This method sets the route preference. + * Sets the route preference. * * @param[in] aPreference The route preference. * @@ -353,7 +353,7 @@ public: void SetPreference(RoutePreference aPreference); /** - * This method gets the route preference. + * Gets the route preference. * * @returns The route preference. * @@ -361,7 +361,7 @@ public: RoutePreference GetPreference(void) const; /** - * This method sets the lifetime of the route in seconds. + * Sets the lifetime of the route in seconds. * * @param[in] aLifetime The lifetime of the route in seconds. * @@ -369,7 +369,7 @@ public: void SetRouteLifetime(uint32_t aLifetime) { mRouteLifetime = HostSwap32(aLifetime); } /** - * This method gets Route Lifetime in seconds. + * Gets Route Lifetime in seconds. * * @returns The Route Lifetime in seconds. * @@ -377,7 +377,7 @@ public: uint32_t GetRouteLifetime(void) const { return HostSwap32(mRouteLifetime); } /** - * This method sets the prefix and adjusts the option length based on the prefix length. + * Sets the prefix and adjusts the option length based on the prefix length. * * @param[in] aPrefix The prefix contained in this option. * @@ -385,7 +385,7 @@ public: void SetPrefix(const Prefix &aPrefix); /** - * This method gets the prefix in this option. + * Gets the prefix in this option. * * @param[out] aPrefix Reference to a `Prefix` to return the prefix. * @@ -393,7 +393,7 @@ public: void GetPrefix(Prefix &aPrefix) const; /** - * This method tells whether this option is valid. + * Tells whether this option is valid. * * @returns A boolean indicates whether this option is valid. * @@ -401,7 +401,7 @@ public: bool IsValid(void) const; /** - * This static method calculates the minimum option length for a given prefix length. + * Calculates the minimum option length for a given prefix length. * * The option length (which is in unit of 8 octets) can be 1, 2, or 3 depending on the prefix length. It can be 1 * for a zero prefix length, 2 if the prefix length is not greater than 64, and 3 otherwise. @@ -414,7 +414,7 @@ public: static uint8_t OptionLengthForPrefix(uint8_t aPrefixLength); /** - * This static method calculates the minimum option size (in bytes) for a given prefix length. + * Calculates the minimum option size (in bytes) for a given prefix length. * * @param[in] aPrefixLength The prefix length (in bits). * @@ -459,14 +459,14 @@ private: static_assert(sizeof(RouteInfoOption) == 8, "invalid RouteInfoOption structure"); /** - * This class represents a Router Advertisement message. + * Represents a Router Advertisement message. * */ class RouterAdvertMessage { public: /** - * This class implements the RA message header. + * Implements the RA message header. * * See section 2.2 of RFC 4191 [https://datatracker.ietf.org/doc/html/rfc4191] * @@ -478,20 +478,20 @@ public: public: /** - * This constructor initializes the Router Advertisement message with + * Initializes the Router Advertisement message with * zero router lifetime, reachable time and retransmission timer. * */ Header(void) { SetToDefault(); } /** - * This method sets the RA message to default values. + * Sets the RA message to default values. * */ void SetToDefault(void); /** - * This method sets the checksum value. + * Sets the checksum value. * * @param[in] aChecksum The checksum value. * @@ -499,7 +499,7 @@ public: void SetChecksum(uint16_t aChecksum) { mChecksum = HostSwap16(aChecksum); } /** - * This method sets the Router Lifetime in seconds. + * Sets the Router Lifetime in seconds. * * @param[in] aRouterLifetime The router lifetime in seconds. * @@ -507,7 +507,7 @@ public: void SetRouterLifetime(uint16_t aRouterLifetime) { mRouterLifetime = HostSwap16(aRouterLifetime); } /** - * This method gets the Router Lifetime (in seconds). + * Gets the Router Lifetime (in seconds). * * Router Lifetime set to zero indicates that the sender is not a default router. * @@ -517,7 +517,7 @@ public: uint16_t GetRouterLifetime(void) const { return HostSwap16(mRouterLifetime); } /** - * This method sets the default router preference. + * Sets the default router preference. * * @param[in] aPreference The router preference. * @@ -525,7 +525,7 @@ public: void SetDefaultRouterPreference(RoutePreference aPreference); /** - * This method gets the default router preference. + * Gets the default router preference. * * @returns The router preference. * @@ -567,7 +567,7 @@ public: typedef Data Icmp6Packet; ///< A data buffer containing an ICMPv6 packet. /** - * This constructor initializes the RA message from a received packet data buffer. + * Initializes the RA message from a received packet data buffer. * * @param[in] aPacket A received packet data. * @@ -599,7 +599,7 @@ public: } /** - * This method gets the RA message as an `Icmp6Packet`. + * Gets the RA message as an `Icmp6Packet`. * * @returns The RA message as an `Icmp6Packet`. * @@ -607,7 +607,7 @@ public: const Icmp6Packet &GetAsPacket(void) const { return mData; } /** - * This method indicates whether or not the RA message is valid. + * Indicates whether or not the RA message is valid. * * @retval TRUE If the RA message is valid. * @retval FALSE If the RA message is not valid. @@ -616,7 +616,7 @@ public: bool IsValid(void) const { return (mData.GetBytes() != nullptr) && (mData.GetLength() >= sizeof(Header)); } /** - * This method gets the RA message's header. + * Gets the RA message's header. * * @returns The RA message's header. * @@ -624,7 +624,7 @@ public: const Header &GetHeader(void) const { return *reinterpret_cast(mData.GetBytes()); } /** - * This method appends a Prefix Info Option to the RA message. + * Appends a Prefix Info Option to the RA message. * * The appended Prefix Info Option will have both on-link (L) and autonomous address-configuration (A) flags set. * @@ -639,7 +639,7 @@ public: Error AppendPrefixInfoOption(const Prefix &aPrefix, uint32_t aValidLifetime, uint32_t aPreferredLifetime); /** - * This method appends a Route Info Option to the RA message. + * Appends a Route Info Option to the RA message. * * @param[in] aPrefix The prefix. * @param[in] aRouteLifetime The route lifetime in seconds. @@ -652,7 +652,7 @@ public: Error AppendRouteInfoOption(const Prefix &aPrefix, uint32_t aRouteLifetime, RoutePreference aPreference); /** - * This method indicates whether or not the RA message contains any options. + * Indicates whether or not the RA message contains any options. * * @retval TRUE If the RA message contains at least one option. * @retval FALSE If the RA message contains no options. @@ -676,7 +676,7 @@ private: }; /** - * This class implements the Router Solicitation message. + * Implements the Router Solicitation message. * * See section 4.1 of RFC 4861 for definition of this message. * https://tools.ietf.org/html/rfc4861#section-4.1 @@ -687,7 +687,7 @@ class RouterSolicitMessage { public: /** - * This constructor initializes the Router Solicitation message. + * Initializes the Router Solicitation message. * */ RouterSolicitMessage(void); @@ -699,7 +699,7 @@ private: static_assert(sizeof(RouterSolicitMessage) == 8, "invalid RouterSolicitMessage structure"); /** - * This class represents a Neighbor Solicitation (NS) message. + * Represents a Neighbor Solicitation (NS) message. * */ OT_TOOL_PACKED_BEGIN @@ -707,13 +707,13 @@ class NeighborSolicitMessage : public Clearable { public: /** - * This constructor initializes the Neighbor Solicitation message. + * Initializes the Neighbor Solicitation message. * */ NeighborSolicitMessage(void); /** - * This method indicates whether the Neighbor Solicitation message is valid (proper Type and Code). + * Indicates whether the Neighbor Solicitation message is valid (proper Type and Code). * * @retval TRUE If the message is valid. * @retval FALSE If the message is not valid. @@ -722,7 +722,7 @@ public: bool IsValid(void) const { return (mType == Icmp::Header::kTypeNeighborSolicit) && (mCode == 0); } /** - * This method gets the Target Address field. + * Gets the Target Address field. * * @returns The Target Address. * @@ -730,7 +730,7 @@ public: const Address &GetTargetAddress(void) const { return mTargetAddress; } /** - * This method sets the Target Address field. + * Sets the Target Address field. * * @param[in] aTargetAddress The Target Address. * @@ -768,7 +768,7 @@ private: static_assert(sizeof(NeighborSolicitMessage) == 24, "Invalid NeighborSolicitMessage definition"); /** - * This class represents a Neighbor Advertisement (NA) message. + * Represents a Neighbor Advertisement (NA) message. * */ OT_TOOL_PACKED_BEGIN @@ -778,7 +778,7 @@ public: NeighborAdvertMessage(void); /** - * This method indicates whether the Neighbor Advertisement message is valid (proper Type and Code). + * Indicates whether the Neighbor Advertisement message is valid (proper Type and Code). * * @retval TRUE If the message is valid. * @retval FALSE If the message is not valid. @@ -787,7 +787,7 @@ public: bool IsValid(void) const { return (mType == Icmp::Header::kTypeNeighborAdvert) && (mCode == 0); } /** - * This method indicates whether or not the Router Flag is set in the NA message. + * Indicates whether or not the Router Flag is set in the NA message. * * @retval TRUE The Router Flag is set. * @retval FALSE The Router Flag is not set. @@ -796,13 +796,13 @@ public: bool IsRouterFlagSet(void) const { return (mFlags & kRouterFlag) != 0; } /** - * This method sets the Router Flag in the NA message. + * Sets the Router Flag in the NA message. * */ void SetRouterFlag(void) { mFlags |= kRouterFlag; } /** - * This method indicates whether or not the Solicited Flag is set in the NA message. + * Indicates whether or not the Solicited Flag is set in the NA message. * * @retval TRUE The Solicited Flag is set. * @retval FALSE The Solicited Flag is not set. @@ -811,13 +811,13 @@ public: bool IsSolicitedFlagSet(void) const { return (mFlags & kSolicitedFlag) != 0; } /** - * This method sets the Solicited Flag in the NA message. + * Sets the Solicited Flag in the NA message. * */ void SetSolicitedFlag(void) { mFlags |= kSolicitedFlag; } /** - * This method indicates whether or not the Override Flag is set in the NA message. + * Indicates whether or not the Override Flag is set in the NA message. * * @retval TRUE The Override Flag is set. * @retval FALSE The Override Flag is not set. @@ -826,13 +826,13 @@ public: bool IsOverrideFlagSet(void) const { return (mFlags & kOverrideFlag) != 0; } /** - * This method sets the Override Flag in the NA message. + * Sets the Override Flag in the NA message. * */ void SetOverrideFlag(void) { mFlags |= kOverrideFlag; } /** - * This method gets the Target Address field. + * Gets the Target Address field. * * @returns The Target Address. * @@ -840,7 +840,7 @@ public: const Address &GetTargetAddress(void) const { return mTargetAddress; } /** - * This method sets the Target Address field. + * Sets the Target Address field. * * @param[in] aTargetAddress The Target Address. * diff --git a/src/core/net/nd_agent.hpp b/src/core/net/nd_agent.hpp index ae04c9714..62125b678 100644 --- a/src/core/net/nd_agent.hpp +++ b/src/core/net/nd_agent.hpp @@ -49,7 +49,7 @@ class Agent : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -61,13 +61,13 @@ public: } /** - * This method updates the Neighbor Discovery Agents using current Thread Network Data. + * Updates the Neighbor Discovery Agents using current Thread Network Data. * */ void UpdateService(void); /** - * This method updates the prefix of the Neighbor Discovery Agent Anycast Locator. + * Updates the prefix of the Neighbor Discovery Agent Anycast Locator. * */ void ApplyMeshLocalPrefix(void); diff --git a/src/core/net/netif.hpp b/src/core/net/netif.hpp index 29f3b6124..5319a8ddf 100644 --- a/src/core/net/netif.hpp +++ b/src/core/net/netif.hpp @@ -68,7 +68,7 @@ class Ip6; */ /** - * This class implements an IPv6 network interface. + * Implements an IPv6 network interface. * */ class Netif : public InstanceLocator, private NonCopyable @@ -78,7 +78,7 @@ class Netif : public InstanceLocator, private NonCopyable public: /** - * This enumeration represent an address event (added or removed) + * Represent an address event (added or removed) * * The boolean values are used for `aIsAdded` parameter in the call of `otIp6AddressCallback`. * @@ -90,7 +90,7 @@ public: }; /** - * This enumeration represents the address origin. + * Represents the address origin. * */ enum AddressOrigin : uint8_t @@ -102,7 +102,7 @@ public: }; /** - * This class implements an IPv6 network interface unicast address. + * Implements an IPv6 network interface unicast address. * */ class UnicastAddress : public otNetifAddress, @@ -113,7 +113,7 @@ public: public: /** - * This method clears and initializes the unicast address as a preferred, valid, thread-origin address with + * Clears and initializes the unicast address as a preferred, valid, thread-origin address with * 64-bit prefix length. * * @param[in] aPreferred Whether to initialize as a preferred address. @@ -122,21 +122,21 @@ public: void InitAsThreadOrigin(bool aPreferred = false); /** - * This method clears and initializes the unicast address as a valid (but not preferred), thread-origin, + * Clears and initializes the unicast address as a valid (but not preferred), thread-origin, * realm-local scope (overridden) address with 64-bit prefix length. * */ void InitAsThreadOriginRealmLocalScope(void); /** - * This method clears and initializes the unicast address as a valid (but not preferred), thread-origin, global + * Clears and initializes the unicast address as a valid (but not preferred), thread-origin, global * scope address. * */ void InitAsThreadOriginGlobalScope(void); /** - * This method clears and initializes the unicast address as a valid, SLAAC-origin address with a given + * Clears and initializes the unicast address as a valid, SLAAC-origin address with a given * preferred flag and a given prefix length. * * @param[in] aPrefixLength The prefix length (in bits). @@ -146,7 +146,7 @@ public: void InitAsSlaacOrigin(uint8_t aPrefixLength, bool aPreferred); /** - * This method returns the unicast address. + * Returns the unicast address. * * @returns The unicast address. * @@ -154,7 +154,7 @@ public: const Address &GetAddress(void) const { return AsCoreType(&mAddress); } /** - * This method returns the unicast address. + * Returns the unicast address. * * @returns The unicast address. * @@ -162,7 +162,7 @@ public: Address &GetAddress(void) { return AsCoreType(&mAddress); } /** - * This method returns the address's prefix length (in bits). + * Returns the address's prefix length (in bits). * * @returns The prefix length (in bits). * @@ -170,7 +170,7 @@ public: uint8_t GetPrefixLength(void) const { return mPrefixLength; } /** - * This method indicates whether the address has a given prefix (i.e. same prefix length and matches the + * Indicates whether the address has a given prefix (i.e. same prefix length and matches the * prefix). * * @param[in] aPrefix A prefix to check against. @@ -185,7 +185,7 @@ public: } /** - * This method returns the IPv6 scope value. + * Returns the IPv6 scope value. * * @returns The IPv6 scope value. * @@ -196,7 +196,7 @@ public: } /** - * This method sets the IPv6 scope override value. + * Sets the IPv6 scope override value. * * @param[in] aScope The IPv6 scope value. * @@ -208,7 +208,7 @@ public: } /** - * This method gets the IPv6 address origin. + * Gets the IPv6 address origin. * * @returns The address origin. * @@ -220,7 +220,7 @@ public: }; /** - * This class implements an IPv6 network interface multicast address. + * Implements an IPv6 network interface multicast address. * */ class MulticastAddress : public otNetifMulticastAddress, @@ -231,7 +231,7 @@ public: public: /** - * This method returns the multicast address. + * Returns the multicast address. * * @returns The multicast address. * @@ -239,7 +239,7 @@ public: const Address &GetAddress(void) const { return AsCoreType(&mAddress); } /** - * This method returns the multicast address. + * Returns the multicast address. * * @returns The multicast address. * @@ -247,7 +247,7 @@ public: Address &GetAddress(void) { return AsCoreType(&mAddress); } /** - * This method returns the next multicast address subscribed to the interface. + * Returns the next multicast address subscribed to the interface. * * @returns A pointer to the next multicast address. * @@ -255,7 +255,7 @@ public: const MulticastAddress *GetNext(void) const { return static_cast(mNext); } /** - * This method returns the next multicast address subscribed to the interface. + * Returns the next multicast address subscribed to the interface. * * @returns A pointer to the next multicast address. * @@ -273,7 +273,7 @@ public: public: /** - * This class represents an iterator for iterating external multicast addresses in a `Netif` instance. + * Represents an iterator for iterating external multicast addresses in a `Netif` instance. * */ class Iterator : public ItemPtrIterator @@ -283,7 +283,7 @@ public: public: /** - * This constructor initializes an `Iterator` instance to start from the first external multicast address + * Initializes an `Iterator` instance to start from the first external multicast address * that matches a given IPv6 address type filter. * * @param[in] aNetif A reference to the `Netif` instance. @@ -329,7 +329,7 @@ public: #if OPENTHREAD_CONFIG_MLR_ENABLE /** - * This method returns the current Multicast Listener Registration (MLR) state. + * Returns the current Multicast Listener Registration (MLR) state. * * @returns The current Multicast Listener Registration state. * @@ -337,7 +337,7 @@ public: MlrState GetMlrState(void) const { return mMlrState; } /** - * This method sets the Multicast Listener Registration (MLR) state. + * Sets the Multicast Listener Registration (MLR) state. * * @param[in] aState The new Multicast Listener Registration state. * @@ -354,7 +354,7 @@ public: }; /** - * This constructor initializes the network interface. + * Initializes the network interface. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -362,7 +362,7 @@ public: explicit Netif(Instance &aInstance); /** - * This method registers a callback to notify internal IPv6 address changes. + * Registers a callback to notify internal IPv6 address changes. * * @param[in] aCallback A pointer to a function that is called when an IPv6 address is added or removed. * @param[in] aCallbackContext A pointer to application-specific context. @@ -374,7 +374,7 @@ public: } /** - * This method returns the linked list of unicast addresses. + * Returns the linked list of unicast addresses. * * @returns The linked list of unicast addresses. * @@ -382,9 +382,9 @@ public: const LinkedList &GetUnicastAddresses(void) const { return mUnicastAddresses; } /** - * This method adds a unicast address to the network interface. + * Adds a unicast address to the network interface. * - * This method is intended for addresses internal to OpenThread. The @p aAddress instance is directly added in the + * Is intended for addresses internal to OpenThread. The @p aAddress instance is directly added in the * unicast address linked list. * * If @p aAddress is already added, the call to `AddUnicastAddress()` with the same address will perform no action. @@ -395,9 +395,9 @@ public: void AddUnicastAddress(UnicastAddress &aAddress); /** - * This method removes a unicast address from the network interface. + * Removes a unicast address from the network interface. * - * This method is intended for addresses internal to OpenThread. The @p aAddress instance is removed from the + * Is intended for addresses internal to OpenThread. The @p aAddress instance is removed from the * unicast address linked list. * * If @p aAddress is not in the list, the call to `RemoveUnicastAddress()` will perform no action. @@ -408,7 +408,7 @@ public: void RemoveUnicastAddress(const UnicastAddress &aAddress); /** - * This method indicates whether or not an address is assigned to the interface. + * Indicates whether or not an address is assigned to the interface. * * @param[in] aAddress A reference to the unicast address. * @@ -419,7 +419,7 @@ public: bool HasUnicastAddress(const Address &aAddress) const; /** - * This method indicates whether or not a unicast address is assigned to the network interface. + * Indicates whether or not a unicast address is assigned to the network interface. * * @param[in] aAddress A reference to the unicast address. * @@ -430,7 +430,7 @@ public: bool HasUnicastAddress(const UnicastAddress &aAddress) const { return mUnicastAddresses.Contains(aAddress); } /** - * This method indicates whether a unicast address is an external or internal address. + * Indicates whether a unicast address is an external or internal address. * * @param[in] aAddress A reference to the unicast address. * @@ -441,7 +441,7 @@ public: bool IsUnicastAddressExternal(const UnicastAddress &aAddress) const; /** - * This method adds an external (to OpenThread) unicast address to the network interface. + * Adds an external (to OpenThread) unicast address to the network interface. * * For external address, the @p aAddress instance is not directly used (i.e., it can be temporary). It is copied * into a local entry (allocated from an internal pool) before being added in the unicast address linked list. @@ -457,7 +457,7 @@ public: Error AddExternalUnicastAddress(const UnicastAddress &aAddress); /** - * This method removes a external (to OpenThread) unicast address from the network interface. + * Removes a external (to OpenThread) unicast address from the network interface. * * @param[in] aAddress A reference to the unicast address. * @@ -469,14 +469,14 @@ public: Error RemoveExternalUnicastAddress(const Address &aAddress); /** - * This method removes all the previously added external (to OpenThread) unicast addresses from the + * Removes all the previously added external (to OpenThread) unicast addresses from the * network interface. * */ void RemoveAllExternalUnicastAddresses(void); /** - * This method indicates whether or not the network interface is subscribed to a multicast address. + * Indicates whether or not the network interface is subscribed to a multicast address. * * @param[in] aAddress The multicast address to check. * @@ -487,7 +487,7 @@ public: bool IsMulticastSubscribed(const Address &aAddress) const; /** - * This method subscribes the network interface to the link-local and realm-local all routers addresses. + * Subscribes the network interface to the link-local and realm-local all routers addresses. * * @note This method MUST be called after `SubscribeAllNodesMulticast()` or its behavior is undefined. * @@ -495,13 +495,13 @@ public: void SubscribeAllRoutersMulticast(void); /** - * This method unsubscribes the network interface to the link-local and realm-local all routers address. + * Unsubscribes the network interface to the link-local and realm-local all routers address. * */ void UnsubscribeAllRoutersMulticast(void); /** - * This method returns the linked list of multicast addresses. + * Returns the linked list of multicast addresses. * * @returns The linked list of multicast addresses. * @@ -509,7 +509,7 @@ public: const LinkedList &GetMulticastAddresses(void) const { return mMulticastAddresses; } /** - * This method indicates whether a multicast address is an external or internal address. + * Indicates whether a multicast address is an external or internal address. * * @param[in] aAddress A reference to the multicast address. * @@ -520,9 +520,9 @@ public: bool IsMulticastAddressExternal(const MulticastAddress &aAddress) const; /** - * This method subscribes the network interface to a multicast address. + * Subscribes the network interface to a multicast address. * - * This method is intended for addresses internal to OpenThread. The @p aAddress instance is directly added in the + * Is intended for addresses internal to OpenThread. The @p aAddress instance is directly added in the * multicast address linked list. * * @param[in] aAddress A reference to the multicast address. @@ -531,9 +531,9 @@ public: void SubscribeMulticast(MulticastAddress &aAddress); /** - * This method unsubscribes the network interface to a multicast address. + * Unsubscribes the network interface to a multicast address. * - * This method is intended for addresses internal to OpenThread. The @p aAddress instance is directly removed from + * Is intended for addresses internal to OpenThread. The @p aAddress instance is directly removed from * the multicast address linked list. * * @param[in] aAddress A reference to the multicast address. @@ -542,7 +542,7 @@ public: void UnsubscribeMulticast(const MulticastAddress &aAddress); /** - * This method subscribes the network interface to the external (to OpenThread) multicast address. + * Subscribes the network interface to the external (to OpenThread) multicast address. * * For external address, the @p aAddress instance is not directly used (i.e., it can be temporary). It is copied * into a local entry (allocated from an internal pool) before being added in the multicast address linked list. @@ -560,7 +560,7 @@ public: Error SubscribeExternalMulticast(const Address &aAddress); /** - * This method unsubscribes the network interface to the external (to OpenThread) multicast address. + * Unsubscribes the network interface to the external (to OpenThread) multicast address. * * @param[in] aAddress A reference to the multicast address. * @@ -572,14 +572,14 @@ public: Error UnsubscribeExternalMulticast(const Address &aAddress); /** - * This method unsubscribes the network interface from all previously added external (to OpenThread) multicast + * Unsubscribes the network interface from all previously added external (to OpenThread) multicast * addresses. * */ void UnsubscribeAllExternalMulticastAddresses(void); /** - * This method checks if multicast promiscuous mode is enabled on the network interface. + * Checks if multicast promiscuous mode is enabled on the network interface. * * @retval TRUE If the multicast promiscuous mode is enabled. * @retval FALSE If the multicast promiscuous mode is disabled. @@ -588,7 +588,7 @@ public: bool IsMulticastPromiscuousEnabled(void) const { return mMulticastPromiscuous; } /** - * This method enables multicast promiscuous mode on the network interface. + * Enables multicast promiscuous mode on the network interface. * * @param[in] aEnabled TRUE if Multicast Promiscuous mode is enabled, FALSE otherwise. * @@ -596,10 +596,10 @@ public: void SetMulticastPromiscuous(bool aEnabled) { mMulticastPromiscuous = aEnabled; } /** - * This method enables range-based `for` loop iteration over external multicast addresses on the Netif that matches + * Enables range-based `for` loop iteration over external multicast addresses on the Netif that matches * a given IPv6 address type filter. * - * This method should be used like follows: to iterate over all external multicast addresses + * Should be used like follows: to iterate over all external multicast addresses * * for (Ip6::Netif::ExternalMulticastAddress &addr : Get().IterateExternalMulticastAddresses()) * { ... } @@ -622,7 +622,7 @@ public: } /** - * This method indicates whether or not the network interfaces is subscribed to any external multicast address. + * Indicates whether or not the network interfaces is subscribed to any external multicast address. * * @retval TRUE The network interface is subscribed to at least one external multicast address. * @retval FALSE The network interface is not subscribed to any external multicast address. @@ -632,14 +632,14 @@ public: protected: /** - * This method subscribes the network interface to the realm-local all MPL forwarders, link-local, and realm-local + * Subscribes the network interface to the realm-local all MPL forwarders, link-local, and realm-local * all nodes address. * */ void SubscribeAllNodesMulticast(void); /** - * This method unsubscribes the network interface from the realm-local all MPL forwarders, link-local and + * Unsubscribes the network interface from the realm-local all MPL forwarders, link-local and * realm-local all nodes address. * * @note This method MUST be called after `UnsubscribeAllRoutersMulticast()` or its behavior is undefined diff --git a/src/core/net/sntp_client.hpp b/src/core/net/sntp_client.hpp index f8338d58c..6479ac341 100644 --- a/src/core/net/sntp_client.hpp +++ b/src/core/net/sntp_client.hpp @@ -52,7 +52,7 @@ namespace Sntp { using ot::Encoding::BigEndian::HostSwap32; /** - * This class implements SNTP header generation and parsing. + * Implements SNTP header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -78,7 +78,7 @@ public: static constexpr uint8_t kKissCodeLength = 4; ///< Length of the kiss code in ASCII format /** - * This method returns the flags field value. + * Returns the flags field value. * * @returns Value of the flags field (LI, VN and Mode). * @@ -86,7 +86,7 @@ public: uint8_t GetFlags(void) const { return mFlags; } /** - * This method sets the flags field. + * Sets the flags field. * * @param[in] aFlags The value of the flags field. * @@ -94,7 +94,7 @@ public: void SetFlags(uint8_t aFlags) { mFlags = aFlags; } /** - * This method returns the SNTP operational mode. + * Returns the SNTP operational mode. * * @returns SNTP operational mode. * @@ -102,7 +102,7 @@ public: Mode GetMode(void) const { return static_cast((mFlags & kModeMask) >> kModeOffset); } /** - * This method returns the packet stratum field value. + * Returns the packet stratum field value. * * @returns Value of the packet stratum. * @@ -110,7 +110,7 @@ public: uint8_t GetStratum(void) const { return mStratum; } /** - * This method sets the packet stratum field value. + * Sets the packet stratum field value. * * @param[in] aStratum The value of the packet stratum field. * @@ -118,7 +118,7 @@ public: void SetStratum(uint8_t aStratum) { mStratum = aStratum; } /** - * This method returns the poll field value. + * Returns the poll field value. * * @returns Value of the poll field. * @@ -126,7 +126,7 @@ public: uint8_t GetPoll(void) const { return mPoll; } /** - * This method sets the poll field. + * Sets the poll field. * * @param[in] aPoll The value of the poll field. * @@ -134,7 +134,7 @@ public: void SetPoll(uint8_t aPoll) { mPoll = aPoll; } /** - * This method returns the precision field value. + * Returns the precision field value. * * @returns Value of the precision field. * @@ -142,7 +142,7 @@ public: uint8_t GetPrecision(void) const { return mPrecision; } /** - * This method sets the precision field. + * Sets the precision field. * * @param[in] aPrecision The value of the precision field. * @@ -150,7 +150,7 @@ public: void SetPrecision(uint8_t aPrecision) { mPrecision = aPrecision; } /** - * This method returns the root delay field value. + * Returns the root delay field value. * * @returns Value of the root delay field. * @@ -158,7 +158,7 @@ public: uint32_t GetRootDelay(void) const { return HostSwap32(mRootDelay); } /** - * This method sets the root delay field. + * Sets the root delay field. * * @param[in] aRootDelay The value of the root delay field. * @@ -166,7 +166,7 @@ public: void SetRootDelay(uint32_t aRootDelay) { mRootDelay = HostSwap32(aRootDelay); } /** - * This method returns the root dispersion field value. + * Returns the root dispersion field value. * * @returns Value of the root dispersion field. * @@ -174,7 +174,7 @@ public: uint32_t GetRootDispersion(void) const { return HostSwap32(mRootDispersion); } /** - * This method sets the root dispersion field. + * Sets the root dispersion field. * * @param[in] aRootDispersion The value of the root dispersion field. * @@ -182,7 +182,7 @@ public: void SetRootDispersion(uint32_t aRootDispersion) { mRootDispersion = HostSwap32(aRootDispersion); } /** - * This method returns the reference identifier field value. + * Returns the reference identifier field value. * * @returns Value of the reference identifier field. * @@ -190,7 +190,7 @@ public: uint32_t GetReferenceId(void) const { return HostSwap32(mReferenceId); } /** - * This method sets the reference identifier field. + * Sets the reference identifier field. * * @param[in] aReferenceId The value of the reference identifier field. * @@ -198,7 +198,7 @@ public: void SetReferenceId(uint32_t aReferenceId) { mReferenceId = HostSwap32(aReferenceId); } /** - * This method returns the kiss code in ASCII format. + * Returns the kiss code in ASCII format. * * @returns Value of the reference identifier field in ASCII format. * @@ -206,7 +206,7 @@ public: char *GetKissCode(void) { return reinterpret_cast(&mReferenceId); } /** - * This method returns the reference timestamp seconds field. + * Returns the reference timestamp seconds field. * * @returns Value of the reference timestamp seconds field. * @@ -214,7 +214,7 @@ public: uint32_t GetReferenceTimestampSeconds(void) const { return HostSwap32(mReferenceTimestampSeconds); } /** - * This method sets the reference timestamp seconds field. + * Sets the reference timestamp seconds field. * * @param[in] aReferenceTimestampSeconds Value of the reference timestamp seconds field. * @@ -225,7 +225,7 @@ public: } /** - * This method returns the reference timestamp fraction field. + * Returns the reference timestamp fraction field. * * @returns Value of the reference timestamp fraction field. * @@ -233,7 +233,7 @@ public: uint32_t GetReferenceTimestampFraction(void) const { return HostSwap32(mReferenceTimestampFraction); } /** - * This method sets the reference timestamp fraction field. + * Sets the reference timestamp fraction field. * * @param[in] aReferenceTimestampFraction Value of the reference timestamp fraction field. * @@ -244,7 +244,7 @@ public: } /** - * This method returns the originate timestamp seconds field. + * Returns the originate timestamp seconds field. * * @returns Value of the originate timestamp seconds field. * @@ -252,7 +252,7 @@ public: uint32_t GetOriginateTimestampSeconds(void) const { return HostSwap32(mOriginateTimestampSeconds); } /** - * This method sets the originate timestamp seconds field. + * Sets the originate timestamp seconds field. * * @param[in] aOriginateTimestampSeconds Value of the originate timestamp seconds field. * @@ -263,7 +263,7 @@ public: } /** - * This method returns the originate timestamp fraction field. + * Returns the originate timestamp fraction field. * * @returns Value of the originate timestamp fraction field. * @@ -271,7 +271,7 @@ public: uint32_t GetOriginateTimestampFraction(void) const { return HostSwap32(mOriginateTimestampFraction); } /** - * This method sets the originate timestamp fraction field. + * Sets the originate timestamp fraction field. * * @param[in] aOriginateTimestampFraction Value of the originate timestamp fraction field. * @@ -282,7 +282,7 @@ public: } /** - * This method returns the receive timestamp seconds field. + * Returns the receive timestamp seconds field. * * @returns Value of the receive timestamp seconds field. * @@ -290,7 +290,7 @@ public: uint32_t GetReceiveTimestampSeconds(void) const { return HostSwap32(mReceiveTimestampSeconds); } /** - * This method sets the receive timestamp seconds field. + * Sets the receive timestamp seconds field. * * @param[in] aReceiveTimestampSeconds Value of the receive timestamp seconds field. * @@ -301,7 +301,7 @@ public: } /** - * This method returns the receive timestamp fraction field. + * Returns the receive timestamp fraction field. * * @returns Value of the receive timestamp fraction field. * @@ -309,7 +309,7 @@ public: uint32_t GetReceiveTimestampFraction(void) const { return HostSwap32(mReceiveTimestampFraction); } /** - * This method sets the receive timestamp fraction field. + * Sets the receive timestamp fraction field. * * @param[in] aReceiveTimestampFraction Value of the receive timestamp fraction field. * @@ -320,7 +320,7 @@ public: } /** - * This method returns the transmit timestamp seconds field. + * Returns the transmit timestamp seconds field. * * @returns Value of the transmit timestamp seconds field. * @@ -328,7 +328,7 @@ public: uint32_t GetTransmitTimestampSeconds(void) const { return HostSwap32(mTransmitTimestampSeconds); } /** - * This method sets the transmit timestamp seconds field. + * Sets the transmit timestamp seconds field. * * @param[in] aTransmitTimestampSeconds Value of the transmit timestamp seconds field. * @@ -339,7 +339,7 @@ public: } /** - * This method returns the transmit timestamp fraction field. + * Returns the transmit timestamp fraction field. * * @returns Value of the transmit timestamp fraction field. * @@ -347,7 +347,7 @@ public: uint32_t GetTransmitTimestampFraction(void) const { return HostSwap32(mTransmitTimestampFraction); } /** - * This method sets the transmit timestamp fraction field. + * Sets the transmit timestamp fraction field. * * @param[in] aTransmitTimestampFraction Value of the transmit timestamp fraction field. * @@ -384,7 +384,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements metadata required for SNTP retransmission. + * Implements metadata required for SNTP retransmission. * */ class QueryMetadata @@ -399,7 +399,7 @@ public: QueryMetadata(void); /** - * This constructor initializes the object with specific values. + * Initializes the object with specific values. * * @param[in] aHandler Pointer to a handler function for the response. * @param[in] aContext Context for the handler function. @@ -408,7 +408,7 @@ public: QueryMetadata(otSntpResponseHandler aHandler, void *aContext); /** - * This method appends request data to the message. + * Appends request data to the message. * * @param[in] aMessage A reference to the message. * @@ -419,7 +419,7 @@ public: Error AppendTo(Message &aMessage) const { return aMessage.Append(*this); } /** - * This method reads request data from the message. + * Reads request data from the message. * * @param[in] aMessage A reference to the message. * @@ -430,7 +430,7 @@ public: } /** - * This method updates request data in the message. + * Updates request data in the message. * * @param[in] aMessage A reference to the message. * @@ -449,14 +449,14 @@ private: }; /** - * This class implements SNTP client. + * Implements SNTP client. * */ class Client : private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -464,7 +464,7 @@ public: explicit Client(Instance &aInstance); /** - * This method starts the SNTP client. + * Starts the SNTP client. * * @retval kErrorNone Successfully started the SNTP client. * @retval kErrorAlready The socket is already open. @@ -472,7 +472,7 @@ public: Error Start(void); /** - * This method stops the SNTP client. + * Stops the SNTP client. * * @retval kErrorNone Successfully stopped the SNTP client. * @@ -480,7 +480,7 @@ public: Error Stop(void); /** - * This method returns the unix era number. + * Returns the unix era number. * * @returns The unix era number. * @@ -488,7 +488,7 @@ public: uint32_t GetUnixEra(void) const { return mUnixEra; } /** - * This method sets the unix era number. + * Sets the unix era number. * * @param[in] aUnixEra The unix era number. * @@ -496,7 +496,7 @@ public: void SetUnixEra(uint32_t aUnixEra) { mUnixEra = aUnixEra; } /** - * This method sends an SNTP query. + * Sends an SNTP query. * * @param[in] aQuery A pointer to specify SNTP query parameters. * @param[in] aHandler A function pointer that shall be called on response reception or time-out. diff --git a/src/core/net/socket.hpp b/src/core/net/socket.hpp index fed22d198..fb4e928ff 100644 --- a/src/core/net/socket.hpp +++ b/src/core/net/socket.hpp @@ -55,20 +55,20 @@ namespace Ip6 { */ /** - * This class implements message information for an IPv6 message. + * Implements message information for an IPv6 message. * */ class MessageInfo : public otMessageInfo, public Clearable { public: /** - * This constructor initializes the object. + * Initializes the object. * */ MessageInfo(void) { Clear(); } /** - * This method returns a reference to the local socket address. + * Returns a reference to the local socket address. * * @returns A reference to the local socket address. * @@ -76,7 +76,7 @@ public: Address &GetSockAddr(void) { return AsCoreType(&mSockAddr); } /** - * This method returns a reference to the local socket address. + * Returns a reference to the local socket address. * * @returns A reference to the local socket address. * @@ -84,7 +84,7 @@ public: const Address &GetSockAddr(void) const { return AsCoreType(&mSockAddr); } /** - * This method sets the local socket address. + * Sets the local socket address. * * @param[in] aAddress The IPv6 address. * @@ -92,7 +92,7 @@ public: void SetSockAddr(const Address &aAddress) { mSockAddr = aAddress; } /** - * This method gets the local socket port. + * Gets the local socket port. * * @returns The local socket port. * @@ -100,7 +100,7 @@ public: uint16_t GetSockPort(void) const { return mSockPort; } /** - * This method gets the local socket port. + * Gets the local socket port. * * @param[in] aPort The port value. * @@ -108,7 +108,7 @@ public: void SetSockPort(uint16_t aPort) { mSockPort = aPort; } /** - * This method returns a reference to the peer socket address. + * Returns a reference to the peer socket address. * * @returns A reference to the peer socket address. * @@ -116,7 +116,7 @@ public: Address &GetPeerAddr(void) { return AsCoreType(&mPeerAddr); } /** - * This method returns a reference to the peer socket address. + * Returns a reference to the peer socket address. * * @returns A reference to the peer socket address. * @@ -124,7 +124,7 @@ public: const Address &GetPeerAddr(void) const { return AsCoreType(&mPeerAddr); } /** - * This method sets the peer's socket address. + * Sets the peer's socket address. * * @param[in] aAddress The IPv6 address. * @@ -132,7 +132,7 @@ public: void SetPeerAddr(const Address &aAddress) { mPeerAddr = aAddress; } /** - * This method gets the peer socket port. + * Gets the peer socket port. * * @returns The peer socket port. * @@ -140,7 +140,7 @@ public: uint16_t GetPeerPort(void) const { return mPeerPort; } /** - * This method gets the peer socket port. + * Gets the peer socket port. * * @param[in] aPort The port value. * @@ -148,7 +148,7 @@ public: void SetPeerPort(uint16_t aPort) { mPeerPort = aPort; } /** - * This method gets the Hop Limit. + * Gets the Hop Limit. * * @returns The Hop Limit. * @@ -156,7 +156,7 @@ public: uint8_t GetHopLimit(void) const { return mHopLimit; } /** - * This method sets the Hop Limit. + * Sets the Hop Limit. * * @param[in] aHopLimit The Hop Limit. * @@ -164,7 +164,7 @@ public: void SetHopLimit(uint8_t aHopLimit) { mHopLimit = aHopLimit; } /** - * This method returns whether multicast may be looped back. + * Returns whether multicast may be looped back. * * @retval TRUE If message may be looped back. * @retval FALSE If message must not be looped back. @@ -173,7 +173,7 @@ public: bool GetMulticastLoop(void) const { return mMulticastLoop; } /** - * This method sets whether multicast may be looped back. + * Sets whether multicast may be looped back. * * @param[in] aMulticastLoop Whether allow looping back multicast. * @@ -181,7 +181,7 @@ public: void SetMulticastLoop(bool aMulticastLoop) { mMulticastLoop = aMulticastLoop; } /** - * This method returns a pointer to the link-specific information object. + * Returns a pointer to the link-specific information object. * * @returns A pointer to the link-specific information object. * @@ -189,7 +189,7 @@ public: const void *GetLinkInfo(void) const { return mLinkInfo; } /** - * This method sets the pointer to the link-specific information object. + * Sets the pointer to the link-specific information object. * * @param[in] aLinkInfo A pointer to the link-specific information object. * @@ -197,7 +197,7 @@ public: void SetLinkInfo(const void *aLinkInfo) { mLinkInfo = aLinkInfo; } /** - * This method returns a pointer to the link-specific information as a `ThreadLinkInfo`. + * Returns a pointer to the link-specific information as a `ThreadLinkInfo`. * * @returns A pointer to to the link-specific information object as `ThreadLinkInfo`. * @@ -205,7 +205,7 @@ public: const ThreadLinkInfo *GetThreadLinkInfo(void) const { return reinterpret_cast(mLinkInfo); } /** - * This method gets the ECN status. + * Gets the ECN status. * * @returns The ECN status, as represented in the IP header. * @@ -213,7 +213,7 @@ public: Ecn GetEcn(void) const { return static_cast(mEcn); } /** - * This method sets the ECN status. + * Sets the ECN status. * * @param[in] aEcn The ECN status, as represented in the IP header. * @@ -221,7 +221,7 @@ public: void SetEcn(Ecn aEcn) { mEcn = aEcn; } /** - * This method indicates whether peer is via the host interface. + * Indicates whether peer is via the host interface. * * @retval TRUE if the peer is via the host interface. * @retval FALSE if the peer is via the Thread interface. @@ -230,7 +230,7 @@ public: bool IsHostInterface(void) const { return mIsHostInterface; } /** - * This method indicates whether or not to apply hop limit 0. + * Indicates whether or not to apply hop limit 0. * * @retval TRUE if applying hop limit 0 when `mHopLimit` field is 0. * @retval FALSE if applying default `OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT` when `mHopLimit` field is 0. @@ -239,7 +239,7 @@ public: bool ShouldAllowZeroHopLimit(void) const { return mAllowZeroHopLimit; } /** - * This method sets whether the peer is via the host interface. + * Sets whether the peer is via the host interface. * * @param[in] aIsHost TRUE if the peer is via the host interface, FALSE otherwise. * @@ -248,7 +248,7 @@ public: }; /** - * This class implements a socket address. + * Implements a socket address. * */ class SockAddr : public otSockAddr, public Clearable, public Unequatable @@ -257,19 +257,19 @@ public: static constexpr uint16_t kInfoStringSize = OT_IP6_SOCK_ADDR_STRING_SIZE; ///< Info string size (`ToString()`). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This constructor initializes the socket address (all fields are set to zero). + * Initializes the socket address (all fields are set to zero). * */ SockAddr(void) { Clear(); } /** - * This constructor initializes the socket address with a given port number. + * Initializes the socket address with a given port number. * * @param[in] aPort A port number. * @@ -281,7 +281,7 @@ public: } /** - * This constructor initializes the socket address with a given address and port number. + * Initializes the socket address with a given address and port number. * * @param[in] aAddress An IPv6 address. * @param[in] aPort A port number. @@ -294,7 +294,7 @@ public: } /** - * This method returns a reference to the IPv6 address. + * Returns a reference to the IPv6 address. * * @returns A reference to the IPv6 address. * @@ -302,7 +302,7 @@ public: Address &GetAddress(void) { return AsCoreType(&mAddress); } /** - * This method returns a reference to the IPv6 address. + * Returns a reference to the IPv6 address. * * @returns A reference to the IPv6 address. * @@ -310,7 +310,7 @@ public: const Address &GetAddress(void) const { return AsCoreType(&mAddress); } /** - * This method sets the IPv6 address. + * Sets the IPv6 address. * * @param[in] aAddress The IPv6 address. * @@ -318,7 +318,7 @@ public: void SetAddress(const Address &aAddress) { mAddress = aAddress; } /** - * This method returns the socket address port number. + * Returns the socket address port number. * * @returns The port number * @@ -326,7 +326,7 @@ public: uint16_t GetPort(void) const { return mPort; } /** - * This method sets the socket address port number. + * Sets the socket address port number. * * @param[in] aPort The port number. * @@ -334,7 +334,7 @@ public: void SetPort(uint16_t aPort) { mPort = aPort; } /** - * This method overloads operator `==` to evaluate whether or not two `SockAddr` instances are equal (same address + * Overloads operator `==` to evaluate whether or not two `SockAddr` instances are equal (same address * and port number). * * @param[in] aOther The other `SockAddr` instance to compare with. @@ -349,7 +349,7 @@ public: } /** - * This method converts the socket address to a string. + * Converts the socket address to a string. * * The string is formatted as "[]:". * @@ -359,7 +359,7 @@ public: InfoString ToString(void) const; /** - * This method converts a given IPv6 socket address to a human-readable string. + * Converts a given IPv6 socket address to a human-readable string. * * The IPv6 socket address string is formatted as "[]:". * diff --git a/src/core/net/srp_client.hpp b/src/core/net/srp_client.hpp index 0aaf632bb..5260ea6ac 100644 --- a/src/core/net/srp_client.hpp +++ b/src/core/net/srp_client.hpp @@ -65,7 +65,7 @@ namespace Srp { #endif /** - * This class implements SRP client. + * Implements SRP client. * */ class Client : public InstanceLocator, private NonCopyable @@ -77,7 +77,7 @@ class Client : public InstanceLocator, private NonCopyable public: /** - * This enumeration types represents an SRP client item (service or host info) state. + * Types represents an SRP client item (service or host info) state. * */ enum ItemState : uint8_t @@ -93,7 +93,7 @@ public: }; /** - * This function pointer type defines the callback used by SRP client to notify user of a changes/events/errors. + * Pointer type defines the callback used by SRP client to notify user of a changes/events/errors. * * Please see `otSrpClientCallback` for more details. * @@ -101,7 +101,7 @@ public: typedef otSrpClientCallback ClientCallback; /** - * This type represents an SRP client host info. + * Represents an SRP client host info. * */ class HostInfo : public otSrpClientHostInfo, private Clearable @@ -111,19 +111,19 @@ public: public: /** - * This method initializes the `HostInfo` object. + * Initializes the `HostInfo` object. * */ void Init(void); /** - * This method clears the `HostInfo` object. + * Clears the `HostInfo` object. * */ void Clear(void); /** - * This method gets the host name (label) string. + * Gets the host name (label) string. * * @returns The host name (label) string, or `nullptr` if not yet set. * @@ -131,7 +131,7 @@ public: const char *GetName(void) const { return mName; } /** - * This method indicates whether or not the host auto address mode is enabled. + * Indicates whether or not the host auto address mode is enabled. * * @retval TRUE If the auto address mode is enabled. * @retval FALSE If the auto address mode is disabled. @@ -140,7 +140,7 @@ public: bool IsAutoAddressEnabled(void) const { return mAutoAddress; } /** - * This method gets the number of host IPv6 addresses. + * Gets the number of host IPv6 addresses. * * @returns The number of host IPv6 addresses. * @@ -148,7 +148,7 @@ public: uint8_t GetNumAddresses(void) const { return mNumAddresses; } /** - * This method gets the host IPv6 address at a given index. + * Gets the host IPv6 address at a given index. * * @param[in] aIndex The index to get (MUST be smaller than `GetNumAddresses()`). * @@ -158,7 +158,7 @@ public: const Ip6::Address &GetAddress(uint8_t aIndex) const { return AsCoreType(&mAddresses[aIndex]); } /** - * This method gets the state of `HostInfo`. + * Gets the state of `HostInfo`. * * @returns The `HostInfo` state. * @@ -173,7 +173,7 @@ public: }; /** - * This type represents an SRP client service. + * Represents an SRP client service. * */ class Service : public otSrpClientService, public LinkedListEntry @@ -183,7 +183,7 @@ public: public: /** - * This method initializes and validates the `Service` object and its fields. + * Initializes and validates the `Service` object and its fields. * * @retval kErrorNone Successfully initialized and validated the `Service` object. * @retval kErrorInvalidArgs The info in `Service` object is not valid (e.g. null name or bad `TxtEntry`). @@ -192,7 +192,7 @@ public: Error Init(void); /** - * This method gets the service name labels string. + * Gets the service name labels string. * * @returns The service name label string (e.g., "_chip._udp", not the full domain name). * @@ -200,7 +200,7 @@ public: const char *GetName(void) const { return mName; } /** - * This method gets the service instance name label (not the full name). + * Gets the service instance name label (not the full name). * * @returns The service instance name label string. * @@ -208,7 +208,7 @@ public: const char *GetInstanceName(void) const { return mInstanceName; } /** - * This method indicates whether or not the service has any subtypes. + * Indicates whether or not the service has any subtypes. * * @retval TRUE The service has at least one subtype. * @retval FALSE The service does not have any subtype. @@ -217,9 +217,9 @@ public: bool HasSubType(void) const { return (mSubTypeLabels != nullptr); } /** - * This method gets the subtype label at a given index. + * Gets the subtype label at a given index. * - * This method MUST be used only after `HasSubType()` indicates that service has a subtype. + * MUST be used only after `HasSubType()` indicates that service has a subtype. * * @param[in] aIndex The index into list of subtype labels. * @@ -230,7 +230,7 @@ public: const char *GetSubTypeLabelAt(uint16_t aIndex) const { return mSubTypeLabels[aIndex]; } /** - * This method gets the service port number. + * Gets the service port number. * * @returns The service port number. * @@ -238,7 +238,7 @@ public: uint16_t GetPort(void) const { return mPort; } /** - * This method gets the service priority. + * Gets the service priority. * * @returns The service priority. * @@ -246,7 +246,7 @@ public: uint16_t GetPriority(void) const { return mPriority; } /** - * This method gets the service weight. + * Gets the service weight. * * @returns The service weight. * @@ -254,7 +254,7 @@ public: uint16_t GetWeight(void) const { return mWeight; } /** - * This method gets the array of service TXT entries. + * Gets the array of service TXT entries. * * @returns A pointer to an array of service TXT entries. * @@ -262,7 +262,7 @@ public: const Dns::TxtEntry *GetTxtEntries(void) const { return AsCoreTypePtr(mTxtEntries); } /** - * This method gets the number of entries in the service TXT entry array. + * Gets the number of entries in the service TXT entry array. * * @returns The number of entries in the service TXT entry array. * @@ -270,7 +270,7 @@ public: uint8_t GetNumTxtEntries(void) const { return mNumTxtEntries; } /** - * This method gets the state of service. + * Gets the state of service. * * @returns The service state. * @@ -278,7 +278,7 @@ public: ItemState GetState(void) const { return static_cast(mState); } /** - * This method gets the desired lease interval to request when registering this service. + * Gets the desired lease interval to request when registering this service. * * @returns The desired lease interval in sec. Zero indicates to use default. * @@ -286,7 +286,7 @@ public: uint32_t GetLease(void) const { return (mLease & kLeaseMask); } /** - * This method gets the desired key lease interval to request when registering this service. + * Gets the desired key lease interval to request when registering this service. * * @returns The desired lease interval in sec. Zero indicates to use default. * @@ -314,7 +314,7 @@ public: }; /** - * This constructor initializes the SRP `Client` object. + * Initializes the SRP `Client` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -322,7 +322,7 @@ public: explicit Client(Instance &aInstance); /** - * This method starts the SRP client operation. + * Starts the SRP client operation. * * SRP client will prepare and send "SRP Update" message to the SRP server once all the following conditions are * met: @@ -348,9 +348,9 @@ public: Error Start(const Ip6::SockAddr &aServerSockAddr) { return Start(aServerSockAddr, kRequesterUser); } /** - * This method stops the SRP client operation. + * Stops the SRP client operation. * - * This method stops any further interactions with the SRP server. Note that it does not remove or clear host info + * Stops any further interactions with the SRP server. Note that it does not remove or clear host info * and/or list of services. It marks all services to be added/removed again once the client is started again. * * If `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` (auto-start feature) is enabled, a call to this method @@ -361,14 +361,14 @@ public: #if OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE /** - * This function pointer type defines the callback used by SRP client to notify user when it is auto-started or + * Pointer type defines the callback used by SRP client to notify user when it is auto-started or * stopped. * */ typedef otSrpClientAutoStartCallback AutoStartCallback; /** - * This method enables the auto-start mode. + * Enables the auto-start mode. * * Config option `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_DEFAULT_MODE` specifies the default auto-start mode * (whether it is enabled or disabled at the start of OT stack). @@ -406,7 +406,7 @@ public: void EnableAutoStartMode(AutoStartCallback aCallback, void *aContext); /** - * This method disables the auto-start mode. + * Disables the auto-start mode. * * Disabling the auto-start mode will not stop the client if it is already running but the client stops monitoring * the Thread Network Data to verify that the selected SRP server is still present in it. @@ -417,7 +417,7 @@ public: void DisableAutoStartMode(void) { mAutoStart.SetState(AutoStart::kDisabled); } /** - * This method indicates the current state of auto-start mode (enabled or disabled). + * Indicates the current state of auto-start mode (enabled or disabled). * * @returns TRUE if the auto-start mode is enabled, FALSE otherwise. * @@ -425,7 +425,7 @@ public: bool IsAutoStartModeEnabled(void) const { return mAutoStart.GetState() != AutoStart::kDisabled; } /** - * This method indicates whether or not the current SRP server's address is selected by auto-start. + * Indicates whether or not the current SRP server's address is selected by auto-start. * * @returns TRUE if the SRP server's address is selected by auto-start, FALSE otherwise. * @@ -434,7 +434,7 @@ public: #endif // OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE /** - * This method indicates whether the SRP client is running or not. + * Indicates whether the SRP client is running or not. * * @returns TRUE if the SRP client is running, FALSE otherwise. * @@ -442,7 +442,7 @@ public: bool IsRunning(void) const { return (mState != kStateStopped); } /** - * This method gets the socket address (IPv6 address and port number) of the SRP server which is being used by SRP + * Gets the socket address (IPv6 address and port number) of the SRP server which is being used by SRP * client. * * If the client is not running, the address is unspecified (all zero) with zero port number. @@ -453,7 +453,7 @@ public: const Ip6::SockAddr &GetServerAddress(void) const { return mSocket.GetPeerName(); } /** - * This method sets the callback used to notify caller of events/changes. + * Sets the callback used to notify caller of events/changes. * * The SRP client allows a single callback to be registered. So consecutive calls to this method will overwrite any * previously set callback functions. @@ -465,7 +465,7 @@ public: void SetCallback(ClientCallback aCallback, void *aContext) { mCallback.Set(aCallback, aContext); } /** - * This method gets the TTL used in SRP update requests. + * Gets the TTL used in SRP update requests. * * Note that this is the TTL requested by the SRP client. The server may choose to accept a different TTL. * @@ -478,7 +478,7 @@ public: uint32_t GetTtl(void) const { return mTtl; } /** - * This method sets the TTL used in SRP update requests. + * Sets the TTL used in SRP update requests. * * Changing the TTL does not impact the TTL of already registered services/host-info. * It only changes any future SRP update messages (i.e adding new services and/or refreshes of existing services). @@ -490,7 +490,7 @@ public: void SetTtl(uint32_t aTtl) { mTtl = aTtl; } /** - * This method gets the lease interval used in SRP update requests. + * Gets the lease interval used in SRP update requests. * * Note that this is lease duration that would be requested by the SRP client. Server may choose to accept a * different lease interval. @@ -501,7 +501,7 @@ public: uint32_t GetLeaseInterval(void) const { return mDefaultLease; } /** - * This method sets the lease interval used in SRP update requests. + * Sets the lease interval used in SRP update requests. * * Changing the lease interval does not impact the accepted lease interval of already registered services/host-info. * It only changes any future SRP update messages (i.e adding new services and/or refreshes of existing services). @@ -512,7 +512,7 @@ public: void SetLeaseInterval(uint32_t aInterval) { mDefaultLease = DetermineLeaseInterval(aInterval, kDefaultLease); } /** - * This method gets the key lease interval used in SRP update requests. + * Gets the key lease interval used in SRP update requests. * * @returns The key lease interval (in seconds). * @@ -520,7 +520,7 @@ public: uint32_t GetKeyLeaseInterval(void) const { return mDefaultKeyLease; } /** - * This method sets the key lease interval used in SRP update requests. + * Sets the key lease interval used in SRP update requests. * * Changing the lease interval does not impact the accepted lease interval of already registered services/host-info. * It only changes any future SRP update messages (i.e adding new services and/or refreshes of existing services). @@ -535,7 +535,7 @@ public: } /** - * This method gets the host info. + * Gets the host info. * * @returns A reference to host info structure. * @@ -543,7 +543,7 @@ public: const HostInfo &GetHostInfo(void) const { return mHostInfo; } /** - * This method sets the host name label. + * Sets the host name label. * * After a successful call to this method, `Callback` will be called to report the status of host info * registration with SRP server. @@ -562,7 +562,7 @@ public: Error SetHostName(const char *aName); /** - * This method enables auto host address mode. + * Enables auto host address mode. * * When enabled host IPv6 addresses are automatically set by SRP client using all the unicast addresses on Thread * netif excluding the link-local and mesh-local addresses. If there is no valid address, then Mesh Local EID @@ -583,7 +583,7 @@ public: Error EnableAutoHostAddress(void); /** - * This method sets/updates the list of host IPv6 address. + * Sets/updates the list of host IPv6 address. * * Host IPv6 addresses can be set/changed before start or even during operation of SRP client (e.g. to add/remove * or change a previously registered host address), except when the host info is being removed (client is busy @@ -608,7 +608,7 @@ public: Error SetHostAddresses(const Ip6::Address *aAddresses, uint8_t aNumAddresses); /** - * This method adds a service to be registered with server. + * Adds a service to be registered with server. * * After a successful call to this method, `Callback` will be called to report the status of the service * addition/registration with SRP server. @@ -625,7 +625,7 @@ public: Error AddService(Service &aService); /** - * This method removes a service to be unregistered with server. + * Removes a service to be unregistered with server. * * @param[in] aService A `Service` to remove (the instance must persist and remain unchanged after * successful return from this method). @@ -639,7 +639,7 @@ public: Error RemoveService(Service &aService); /** - * This method clears a service, immediately removing it from the client service list. + * Clears a service, immediately removing it from the client service list. * * Unlike `RemoveService()` which sends an update message to the server to remove the service, this method clears * the service from the client's service list without any interaction with the server. On a successful call @@ -655,7 +655,7 @@ public: Error ClearService(Service &aService); /** - * This method gets the list of services being managed by client. + * Gets the list of services being managed by client. * * @returns The list of services. * @@ -663,7 +663,7 @@ public: const LinkedList &GetServices(void) const { return mServices; } /** - * This method starts the remove process of the host info and all services. + * Starts the remove process of the host info and all services. * * After returning from this method, `Callback` will be called to report the status of remove request with * SRP server. @@ -697,7 +697,7 @@ public: Error RemoveHostAndServices(bool aShouldRemoveKeyLease, bool aSendUnregToServer = false); /** - * This method clears all host info and all the services. + * Clears all host info and all the services. * * Unlike `RemoveHostAndServices()` which sends an update message to the server to remove all the info, this method * clears all the info immediately without any interaction with the server. @@ -707,7 +707,7 @@ public: #if OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE /** - * This method gets the domain name being used by SRP client. + * Gets the domain name being used by SRP client. * * If domain name is not set, "default.service.arpa" will be used. * @@ -717,7 +717,7 @@ public: const char *GetDomainName(void) const { return mDomainName; } /** - * This method sets the domain name to be used by SRP client. + * Sets the domain name to be used by SRP client. * * This is an optional method. If not set "default.service.arpa" will be used. * @@ -734,7 +734,7 @@ public: #endif // OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE /** - * This static method converts a `ItemState` to a string. + * Converts a `ItemState` to a string. * * @param[in] aState An `ItemState`. * @@ -745,7 +745,7 @@ public: #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method enables/disables "service key record inclusion" mode. + * Enables/disables "service key record inclusion" mode. * * When enabled, SRP client will include KEY record in Service Description Instructions in the SRP update messages * that it sends. @@ -760,7 +760,7 @@ public: void SetServiceKeyRecordEnabled(bool aEnabled) { mServiceKeyRecordEnabled = aEnabled; } /** - * This method indicates whether the "service key record inclusion" mode is enabled or disabled. + * Indicates whether the "service key record inclusion" mode is enabled or disabled. * * @returns TRUE if "service key record inclusion" mode is enabled, FALSE otherwise. * @@ -768,12 +768,12 @@ public: bool IsServiceKeyRecordEnabled(void) const { return mServiceKeyRecordEnabled; } /** - * This method enables/disables "use short Update Lease Option" behavior. + * Enables/disables "use short Update Lease Option" behavior. * * When enabled, the SRP client will use the short variant format of Update Lease Option in its message. The short * format only includes the lease interval. * - * This method is added under `REFERENCE_DEVICE` config and is intended to override the default behavior for + * Is added under `REFERENCE_DEVICE` config and is intended to override the default behavior for * testing only. * * @param[in] aUseShort TRUE to enable, FALSE to disable the "use short Update Lease Option" mode. @@ -782,7 +782,7 @@ public: void SetUseShortLeaseOption(bool aUseShort) { mUseShortLeaseOption = aUseShort; } /** - * This method gets the current "use short Update Lease Option" mode. + * Gets the current "use short Update Lease Option" mode. * * @returns TRUE if "use short Update Lease Option" mode is enabled, FALSE otherwise. * diff --git a/src/core/net/srp_server.hpp b/src/core/net/srp_server.hpp index b88b13656..f68e5da8e 100644 --- a/src/core/net/srp_server.hpp +++ b/src/core/net/srp_server.hpp @@ -102,7 +102,7 @@ class RoutingManager; namespace Srp { /** - * This class implements the SRP server. + * Implements the SRP server. * */ class Server : public InstanceLocator, private NonCopyable @@ -147,7 +147,7 @@ public: typedef otSrpServerLeaseInfo LeaseInfo; /** - * This enumeration represents the address mode used by the SRP server. + * Represents the address mode used by the SRP server. * * Address mode specifies how the address and port number are determined by the SRP server and how this info ins * published in the Thread Network Data. @@ -162,7 +162,7 @@ public: class Host; /** - * This enumeration represents the state of SRP server. + * Represents the state of SRP server. * */ enum State : uint8_t @@ -173,7 +173,7 @@ public: }; /** - * This class implements a server-side SRP service. + * Implements a server-side SRP service. * */ class Service : public otSrpServerService, @@ -188,7 +188,7 @@ public: public: /** - * This type represents the flags which indicates which services to include or exclude when searching in (or + * Represents the flags which indicates which services to include or exclude when searching in (or * iterating over) the list of SRP services. * */ @@ -219,7 +219,7 @@ public: static constexpr Flags kFlagDeleted = OT_SRP_SERVER_SERVICE_FLAG_DELETED; /** - * This method tells if the SRP service has been deleted. + * Tells if the SRP service has been deleted. * * A SRP service can be deleted but retains its name for future uses. * In this case, the service instance is not removed from the SRP server/registry. @@ -231,7 +231,7 @@ public: bool IsDeleted(void) const { return mIsDeleted; } /** - * This method indicates whether the SRP service is a sub-type. + * Indicates whether the SRP service is a sub-type. * * @retval TRUE If the service is a sub-type. * @retval FALSE If the service is not a sub-type. @@ -240,7 +240,7 @@ public: bool IsSubType(void) const { return mIsSubType; } /** - * This method gets the full service instance name of the service. + * Gets the full service instance name of the service. * * @returns A pointer service instance name (as a null-terminated C string). * @@ -248,7 +248,7 @@ public: const char *GetInstanceName(void) const { return mDescription->mInstanceName.AsCString(); } /** - * This method gets the full service name of the service. + * Gets the full service name of the service. * * @returns A pointer service name (as a null-terminated C string). * @@ -256,7 +256,7 @@ public: const char *GetServiceName(void) const { return mServiceName.AsCString(); } /** - * This method gets the sub-type label from service name. + * Gets the sub-type label from service name. * * The full service name for a sub-type service follows "._sub...". This * method copies the `` into the @p aLabel buffer. @@ -275,7 +275,7 @@ public: Error GetServiceSubTypeLabel(char *aLabel, uint8_t aMaxSize) const; /** - * This method returns the TTL of the service instance. + * Returns the TTL of the service instance. * * @returns The TTL of the service instance. * @@ -283,7 +283,7 @@ public: uint32_t GetTtl(void) const { return mDescription->mTtl; } /** - * This method returns the port of the service instance. + * Returns the port of the service instance. * * @returns The port of the service. * @@ -291,7 +291,7 @@ public: uint16_t GetPort(void) const { return mDescription->mPort; } /** - * This method returns the weight of the service instance. + * Returns the weight of the service instance. * * @returns The weight of the service. * @@ -299,7 +299,7 @@ public: uint16_t GetWeight(void) const { return mDescription->mWeight; } /** - * This method returns the priority of the service instance. + * Returns the priority of the service instance. * * @returns The priority of the service. * @@ -307,7 +307,7 @@ public: uint16_t GetPriority(void) const { return mDescription->mPriority; } /** - * This method returns the TXT record data of the service instance. + * Returns the TXT record data of the service instance. * * @returns A pointer to the buffer containing the TXT record data. * @@ -315,7 +315,7 @@ public: const uint8_t *GetTxtData(void) const { return mDescription->mTxtData.GetBytes(); } /** - * This method returns the TXT record data length of the service instance. + * Returns the TXT record data length of the service instance. * * @return The TXT record data length (number of bytes in buffer returned from `GetTxtData()`). * @@ -323,7 +323,7 @@ public: uint16_t GetTxtDataLength(void) const { return mDescription->mTxtData.GetLength(); } /** - * This method returns the host which the service instance reside on. + * Returns the host which the service instance reside on. * * @returns A reference to the host instance. * @@ -331,7 +331,7 @@ public: const Host &GetHost(void) const { return *mDescription->mHost; } /** - * This method returns the LEASE time of the service. + * Returns the LEASE time of the service. * * @returns The LEASE time in seconds. * @@ -339,7 +339,7 @@ public: uint32_t GetLease(void) const { return mDescription->mLease; } /** - * This method returns the KEY-LEASE time of the key of the service. + * Returns the KEY-LEASE time of the key of the service. * * @returns The KEY-LEASE time in seconds. * @@ -347,7 +347,7 @@ public: uint32_t GetKeyLease(void) const { return mDescription->mKeyLease; } /** - * This method returns the expire time (in milliseconds) of the service. + * Returns the expire time (in milliseconds) of the service. * * @returns The service expire time in milliseconds. * @@ -355,7 +355,7 @@ public: TimeMilli GetExpireTime(void) const; /** - * This method returns the key expire time (in milliseconds) of the service. + * Returns the key expire time (in milliseconds) of the service. * * @returns The service key expire time in milliseconds. * @@ -363,7 +363,7 @@ public: TimeMilli GetKeyExpireTime(void) const; /** - * This method gets the LEASE and KEY-LEASE information of a given service. + * Gets the LEASE and KEY-LEASE information of a given service. * * @param[out] aLeaseInfo A reference to a LeaseInfo instance. It contains the LEASE time, KEY-LEASE time, * remaining LEASE time and the remaining KEY-LEASE time. @@ -372,7 +372,7 @@ public: void GetLeaseInfo(LeaseInfo &aLeaseInfo) const; /** - * This method indicates whether this service matches a given service instance name. + * Indicates whether this service matches a given service instance name. * * @param[in] aInstanceName The service instance name. * @@ -383,7 +383,7 @@ public: bool MatchesInstanceName(const char *aInstanceName) const; /** - * This method tells whether this service matches a given service name. + * Tells whether this service matches a given service name. * * @param[in] aServiceName The full service name to match. * @@ -444,7 +444,7 @@ public: }; /** - * This class implements the Host which registers services on the SRP server. + * Implements the Host which registers services on the SRP server. * */ class Host : public otSrpServerHost, @@ -459,7 +459,7 @@ public: public: /** - * This method tells whether the Host object has been deleted. + * Tells whether the Host object has been deleted. * * The Host object retains event if the host has been deleted by the SRP client, * because the host name may retain. @@ -470,7 +470,7 @@ public: bool IsDeleted(void) const { return (mLease == 0); } /** - * This method returns the full name of the host. + * Returns the full name of the host. * * @returns A pointer to the null-terminated full host name. * @@ -478,7 +478,7 @@ public: const char *GetFullName(void) const { return mFullName.AsCString(); } /** - * This method returns addresses of the host. + * Returns addresses of the host. * * @param[out] aAddressesNum The number of the addresses. * @@ -493,7 +493,7 @@ public: } /** - * This method returns the TTL of the host. + * Returns the TTL of the host. * * @returns The TTL of the host. * @@ -501,7 +501,7 @@ public: uint32_t GetTtl(void) const { return mTtl; } /** - * This method returns the LEASE time of the host. + * Returns the LEASE time of the host. * * @returns The LEASE time in seconds. * @@ -509,7 +509,7 @@ public: uint32_t GetLease(void) const { return mLease; } /** - * This method returns the KEY-LEASE time of the key of the host. + * Returns the KEY-LEASE time of the key of the host. * * @returns The KEY-LEASE time in seconds. * @@ -517,7 +517,7 @@ public: uint32_t GetKeyLease(void) const { return mKeyLease; } /** - * This method gets the LEASE and KEY-LEASE information of a given host. + * Gets the LEASE and KEY-LEASE information of a given host. * * @param[out] aLeaseInfo A reference to a LeaseInfo instance. It contains the LEASE time, KEY-LEASE time, * remaining LEASE time and the remaining KEY-LEASE time. @@ -526,7 +526,7 @@ public: void GetLeaseInfo(LeaseInfo &aLeaseInfo) const; /** - * This method returns the KEY resource record of the host. + * Returns the KEY resource record of the host. * * @returns A pointer to the ECDSA P 256 public key resource record * if there is valid one. `nullptr` if no valid key exists. @@ -535,7 +535,7 @@ public: const Dns::Ecdsa256KeyRecord *GetKeyRecord(void) const { return mKeyRecord.IsValid() ? &mKeyRecord : nullptr; } /** - * This method returns the expire time (in milliseconds) of the host. + * Returns the expire time (in milliseconds) of the host. * * @returns The expire time in milliseconds. * @@ -543,7 +543,7 @@ public: TimeMilli GetExpireTime(void) const; /** - * This method returns the expire time (in milliseconds) of the key of the host. + * Returns the expire time (in milliseconds) of the key of the host. * * @returns The expire time of the key in milliseconds. * @@ -551,7 +551,7 @@ public: TimeMilli GetKeyExpireTime(void) const; /** - * This method returns the `Service` linked list associated with the host. + * Returns the `Service` linked list associated with the host. * * @returns The `Service` linked list. * @@ -559,7 +559,7 @@ public: const LinkedList &GetServices(void) const { return mServices; } /** - * This method finds the next matching service on the host. + * Finds the next matching service on the host. * * @param[in] aPrevService A pointer to the previous service or `nullptr` to start from beginning of the list. * @param[in] aFlags Flags indicating which services to include (base/sub-type, active/deleted). @@ -575,7 +575,7 @@ public: const char *aInstanceName = nullptr) const; /** - * This method tells whether the host matches a given full name. + * Tells whether the host matches a given full name. * * @param[in] aFullName The full name. * @@ -632,7 +632,7 @@ public: }; /** - * This class handles TTL configuration. + * Handles TTL configuration. * */ class TtlConfig : public otSrpServerTtlConfig @@ -641,7 +641,7 @@ public: public: /** - * This constructor initializes to default TTL configuration. + * Initializes to default TTL configuration. * */ TtlConfig(void); @@ -652,7 +652,7 @@ public: }; /** - * This class handles LEASE and KEY-LEASE configurations. + * Handles LEASE and KEY-LEASE configurations. * */ class LeaseConfig : public otSrpServerLeaseConfig @@ -661,7 +661,7 @@ public: public: /** - * This constructor initialize to default LEASE and KEY-LEASE configurations. + * Initialize to default LEASE and KEY-LEASE configurations. * */ LeaseConfig(void); @@ -703,7 +703,7 @@ public: static constexpr Service::Flags kFlagsAnyTypeDeletedService = OT_SRP_SERVER_FLAGS_ANY_TYPE_DELETED_SERVICE; /** - * This constructor initializes the SRP server object. + * Initializes the SRP server object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -711,7 +711,7 @@ public: explicit Server(Instance &aInstance); /** - * This method sets the SRP service events handler. + * Sets the SRP service events handler. * * @param[in] aServiceHandler A service events handler. * @param[in] aServiceHandlerContext A pointer to arbitrary context information. @@ -728,7 +728,7 @@ public: } /** - * This method returns the domain authorized to the SRP server. + * Returns the domain authorized to the SRP server. * * If the domain if not set by SetDomain, "default.service.arpa." will be returned. * A trailing dot is always appended even if the domain is set without it. @@ -739,10 +739,10 @@ public: const char *GetDomain(void) const { return mDomain.AsCString(); } /** - * This method sets the domain on the SRP server. + * Sets the domain on the SRP server. * * A trailing dot will be appended to @p aDomain if it is not already there. - * This method should only be called before the SRP server is enabled. + * Should only be called before the SRP server is enabled. * * @param[in] aDomain The domain to be set. MUST NOT be `nullptr`. * @@ -755,7 +755,7 @@ public: Error SetDomain(const char *aDomain); /** - * This method returns the address mode being used by the SRP server. + * Returns the address mode being used by the SRP server. * * @returns The SRP server's address mode. * @@ -763,7 +763,7 @@ public: AddressMode GetAddressMode(void) const { return mAddressMode; } /** - * This method sets the address mode to be used by the SRP server. + * Sets the address mode to be used by the SRP server. * * @param[in] aMode The address mode to use. * @@ -774,7 +774,7 @@ public: Error SetAddressMode(AddressMode aMode); /** - * This method gets the sequence number used with anycast address mode. + * Gets the sequence number used with anycast address mode. * * The sequence number is included in "DNS/SRP Service Anycast Address" entry published in the Network Data. * @@ -784,7 +784,7 @@ public: uint8_t GetAnycastModeSequenceNumber(void) const { return mAnycastSequenceNumber; } /** - * This method sets the sequence number used with anycast address mode. + * Sets the sequence number used with anycast address mode. * * @param[in] aSequenceNumber The sequence number to use. * @@ -795,7 +795,7 @@ public: Error SetAnycastModeSequenceNumber(uint8_t aSequenceNumber); /** - * This method returns the state of the SRP server. + * Returns the state of the SRP server. * * @returns The state of the server. * @@ -803,7 +803,7 @@ public: State GetState(void) const { return mState; } /** - * This method tells the port the SRP server is listening to. + * Tells the port the SRP server is listening to. * * @returns The port of the server or 0 if the SRP server is not running. * @@ -811,7 +811,7 @@ public: uint16_t GetPort(void) const { return (mState == kStateRunning) ? mPort : 0; } /** - * This method enables/disables the SRP server. + * Enables/disables the SRP server. * * @param[in] aEnabled A boolean to enable/disable the SRP server. * @@ -820,7 +820,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE /** - * This method enables/disables the auto-enable mode on SRP server. + * Enables/disables the auto-enable mode on SRP server. * * When this mode is enabled, the Border Routing Manager controls if/when to enable or disable the SRP server. * SRP sever is auto-enabled if/when Border Routing is started it is done with the initial prefix and route @@ -838,7 +838,7 @@ public: void SetAutoEnableMode(bool aEnabled); /** - * This method indicates whether the auto-enable mode is enabled or disabled. + * Indicates whether the auto-enable mode is enabled or disabled. * * @retval TRUE The auto-enable mode is enabled. * @retval FALSE The auto-enable mode is disabled. @@ -848,7 +848,7 @@ public: #endif /** - * This method returns the TTL configuration. + * Returns the TTL configuration. * * @param[out] aTtlConfig A reference to the `TtlConfig` instance. * @@ -856,7 +856,7 @@ public: void GetTtlConfig(TtlConfig &aTtlConfig) const { aTtlConfig = mTtlConfig; } /** - * This method sets the TTL configuration. + * Sets the TTL configuration. * * @param[in] aTtlConfig A reference to the `TtlConfig` instance. * @@ -867,7 +867,7 @@ public: Error SetTtlConfig(const TtlConfig &aTtlConfig); /** - * This method returns the LEASE and KEY-LEASE configurations. + * Returns the LEASE and KEY-LEASE configurations. * * @param[out] aLeaseConfig A reference to the `LeaseConfig` instance. * @@ -875,7 +875,7 @@ public: void GetLeaseConfig(LeaseConfig &aLeaseConfig) const { aLeaseConfig = mLeaseConfig; } /** - * This method sets the LEASE and KEY-LEASE configurations. + * Sets the LEASE and KEY-LEASE configurations. * * When a LEASE time is requested from a client, the granted value will be * limited in range [aMinLease, aMaxLease]; and a KEY-LEASE will be granted @@ -890,7 +890,7 @@ public: Error SetLeaseConfig(const LeaseConfig &aLeaseConfig); /** - * This method returns the next registered SRP host. + * Returns the next registered SRP host. * * @param[in] aHost The current SRP host; use `nullptr` to get the first SRP host. * @@ -900,7 +900,7 @@ public: const Host *GetNextHost(const Host *aHost); /** - * This method returns the response counters of the SRP server. + * Returns the response counters of the SRP server. * * @returns A pointer to the response counters of the SRP server. * @@ -908,7 +908,7 @@ public: const otSrpServerResponseCounters *GetResponseCounters(void) const { return &mResponseCounters; } /** - * This method receives the service update result from service handler set by + * Receives the service update result from service handler set by * SetServiceHandler. * * @param[in] aId The ID of the service update transaction. diff --git a/src/core/net/tcp6.hpp b/src/core/net/tcp6.hpp index ec407dead..368120645 100644 --- a/src/core/net/tcp6.hpp +++ b/src/core/net/tcp6.hpp @@ -82,14 +82,14 @@ namespace Ip6 { */ /** - * This class implements TCP message handling. + * Implements TCP message handling. * */ class Tcp : public InstanceLocator, private NonCopyable { public: /** - * This class represents an endpoint of a TCP/IPv6 connection. + * Represents an endpoint of a TCP/IPv6 connection. * */ class Endpoint : public otTcpEndpoint, public LinkedListEntry, public GetProvider @@ -408,7 +408,7 @@ public: }; /** - * This class represents a TCP/IPv6 listener. + * Represents a TCP/IPv6 listener. * */ class Listener : public otTcpListener, public LinkedListEntry, public GetProvider @@ -535,7 +535,7 @@ public: }; /** - * This class implements TCP header parsing. + * Implements TCP header parsing. * */ OT_TOOL_PACKED_BEGIN @@ -545,7 +545,7 @@ public: static constexpr uint8_t kChecksumFieldOffset = 16; ///< Byte offset of the Checksum field in the TCP header. /** - * This method returns the TCP Source Port. + * Returns the TCP Source Port. * * @returns The TCP Source Port. * @@ -553,7 +553,7 @@ public: uint16_t GetSourcePort(void) const { return HostSwap16(mSource); } /** - * This method returns the TCP Destination Port. + * Returns the TCP Destination Port. * * @returns The TCP Destination Port. * @@ -561,7 +561,7 @@ public: uint16_t GetDestinationPort(void) const { return HostSwap16(mDestination); } /** - * This method returns the TCP Sequence Number. + * Returns the TCP Sequence Number. * * @returns The TCP Sequence Number. * @@ -569,7 +569,7 @@ public: uint32_t GetSequenceNumber(void) const { return HostSwap32(mSequenceNumber); } /** - * This method returns the TCP Acknowledgment Sequence Number. + * Returns the TCP Acknowledgment Sequence Number. * * @returns The TCP Acknowledgment Sequence Number. * @@ -577,7 +577,7 @@ public: uint32_t GetAcknowledgmentNumber(void) const { return HostSwap32(mAckNumber); } /** - * This method returns the TCP Flags. + * Returns the TCP Flags. * * @returns The TCP Flags. * @@ -585,7 +585,7 @@ public: uint16_t GetFlags(void) const { return HostSwap16(mFlags); } /** - * This method returns the TCP Window. + * Returns the TCP Window. * * @returns The TCP Window. * @@ -593,7 +593,7 @@ public: uint16_t GetWindow(void) const { return HostSwap16(mWindow); } /** - * This method returns the TCP Checksum. + * Returns the TCP Checksum. * * @returns The TCP Checksum. * @@ -601,7 +601,7 @@ public: uint16_t GetChecksum(void) const { return HostSwap16(mChecksum); } /** - * This method returns the TCP Urgent Pointer. + * Returns the TCP Urgent Pointer. * * @returns The TCP Urgent Pointer. * @@ -620,7 +620,7 @@ public: } OT_TOOL_PACKED_END; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * diff --git a/src/core/net/tcp6_ext.hpp b/src/core/net/tcp6_ext.hpp index b40663aed..395576cbe 100644 --- a/src/core/net/tcp6_ext.hpp +++ b/src/core/net/tcp6_ext.hpp @@ -54,7 +54,7 @@ namespace Ip6 { */ /** - * This class represents a TCP circular send buffer. + * Represents a TCP circular send buffer. * */ class TcpCircularSendBuffer : public otTcpCircularSendBuffer diff --git a/src/core/net/udp6.hpp b/src/core/net/udp6.hpp index 6648f0072..8f7460a50 100644 --- a/src/core/net/udp6.hpp +++ b/src/core/net/udp6.hpp @@ -67,7 +67,7 @@ class Udp; #endif /** - * This enumeration defines the network interface identifiers. + * Defines the network interface identifiers. * */ enum NetifIdentifier : uint8_t @@ -78,14 +78,14 @@ enum NetifIdentifier : uint8_t }; /** - * This class implements core UDP message handling. + * Implements core UDP message handling. * */ class Udp : public InstanceLocator, private NonCopyable { public: /** - * This class implements a UDP/IPv6 socket. + * Implements a UDP/IPv6 socket. * */ class SocketHandle : public otUdpSocket, public LinkedListEntry, public Clearable @@ -95,7 +95,7 @@ public: public: /** - * This method indicates whether or not the socket is bound. + * Indicates whether or not the socket is bound. * * @retval TRUE if the socket is bound (i.e. source port is non-zero). * @retval FALSE if the socket is not bound (source port is zero). @@ -104,7 +104,7 @@ public: bool IsBound(void) const { return mSockName.mPort != 0; } /** - * This method returns the local socket address. + * Returns the local socket address. * * @returns A reference to the local socket address. * @@ -112,7 +112,7 @@ public: SockAddr &GetSockName(void) { return AsCoreType(&mSockName); } /** - * This method returns the local socket address. + * Returns the local socket address. * * @returns A reference to the local socket address. * @@ -120,7 +120,7 @@ public: const SockAddr &GetSockName(void) const { return AsCoreType(&mSockName); } /** - * This method returns the peer's socket address. + * Returns the peer's socket address. * * @returns A reference to the peer's socket address. * @@ -128,7 +128,7 @@ public: SockAddr &GetPeerName(void) { return AsCoreType(&mPeerName); } /** - * This method returns the peer's socket address. + * Returns the peer's socket address. * * @returns A reference to the peer's socket address. * @@ -145,7 +145,7 @@ public: }; /** - * This class implements a UDP/IPv6 socket. + * Implements a UDP/IPv6 socket. * */ class Socket : public InstanceLocator, public SocketHandle @@ -154,7 +154,7 @@ public: public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to OpenThread instance. * @@ -162,7 +162,7 @@ public: explicit Socket(Instance &aInstance); /** - * This method returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) + * Returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) * * @returns A pointer to the message or `nullptr` if no buffers are available. * @@ -170,7 +170,7 @@ public: Message *NewMessage(void); /** - * This method returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) + * Returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) * * @param[in] aReserved The number of header bytes to reserve after the UDP header. * @@ -180,7 +180,7 @@ public: Message *NewMessage(uint16_t aReserved); /** - * This method returns a new UDP message with sufficient header space reserved. + * Returns a new UDP message with sufficient header space reserved. * * @param[in] aReserved The number of header bytes to reserve after the UDP header. * @param[in] aSettings The message settings (default is used if not provided). @@ -191,7 +191,7 @@ public: Message *NewMessage(uint16_t aReserved, const Message::Settings &aSettings); /** - * This method opens the UDP socket. + * Opens the UDP socket. * * @param[in] aHandler A pointer to a function that is called when receiving UDP messages. * @param[in] aContext A pointer to arbitrary context information. @@ -203,7 +203,7 @@ public: Error Open(otUdpReceive aHandler, void *aContext); /** - * This method returns if the UDP socket is open. + * Returns if the UDP socket is open. * * @returns If the UDP socket is open. * @@ -211,7 +211,7 @@ public: bool IsOpen(void) const; /** - * This method binds the UDP socket. + * Binds the UDP socket. * * @param[in] aSockAddr A reference to the socket address. * @param[in] aNetifIdentifier The network interface identifier. @@ -224,7 +224,7 @@ public: Error Bind(const SockAddr &aSockAddr, NetifIdentifier aNetifIdentifier = kNetifThread); /** - * This method binds the UDP socket. + * Binds the UDP socket. * * @param[in] aPort A port number. * @param[in] aNetifIdentifier The network interface identifier. @@ -236,7 +236,7 @@ public: Error Bind(uint16_t aPort, NetifIdentifier aNetifIdentifier = kNetifThread); /** - * This method binds the UDP socket. + * Binds the UDP socket. * * @retval kErrorNone Successfully bound the socket. * @retval kErrorFailed Failed to bind UDP Socket. @@ -245,7 +245,7 @@ public: Error Bind(void) { return Bind(0); } /** - * This method connects the UDP socket. + * Connects the UDP socket. * * @param[in] aSockAddr A reference to the socket address. * @@ -256,7 +256,7 @@ public: Error Connect(const SockAddr &aSockAddr); /** - * This method connects the UDP socket. + * Connects the UDP socket. * * @param[in] aPort A port number. * @@ -267,7 +267,7 @@ public: Error Connect(uint16_t aPort); /** - * This method connects the UDP socket. + * Connects the UDP socket. * * @retval kErrorNone Successfully connected the socket. * @retval kErrorFailed Failed to connect UDP Socket. @@ -276,7 +276,7 @@ public: Error Connect(void) { return Connect(0); } /** - * This method closes the UDP socket. + * Closes the UDP socket. * * @retval kErrorNone Successfully closed the UDP socket. * @retval kErrorFailed Failed to close UDP Socket. @@ -285,7 +285,7 @@ public: Error Close(void); /** - * This method sends a UDP message. + * Sends a UDP message. * * @param[in] aMessage The message to send. * @param[in] aMessageInfo The message info associated with @p aMessage. @@ -299,7 +299,7 @@ public: #if OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE /** - * This method configures the UDP socket to join a multicast group on a Host network interface. + * Configures the UDP socket to join a multicast group on a Host network interface. * * @param[in] aNetifIdentifier The network interface identifier. * @param[in] aAddress The multicast group address. @@ -311,7 +311,7 @@ public: Error JoinNetifMulticastGroup(NetifIdentifier aNetifIdentifier, const Address &aAddress); /** - * This method configures the UDP socket to leave a multicast group on a Host network interface. + * Configures the UDP socket to leave a multicast group on a Host network interface. * * @param[in] aNetifIdentifier The network interface identifier. * @param[in] aAddress The multicast group address. @@ -325,7 +325,7 @@ public: }; /** - * This class implements a UDP receiver. + * Implements a UDP receiver. * */ class Receiver : public otUdpReceiver, public LinkedListEntry @@ -334,7 +334,7 @@ public: public: /** - * This constructor initializes the UDP receiver. + * Initializes the UDP receiver. * * @param[in] aHandler A pointer to the function to handle UDP message. * @param[in] aContext A pointer to arbitrary context information. @@ -355,7 +355,7 @@ public: }; /** - * This class implements UDP header generation and parsing. + * Implements UDP header generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -368,7 +368,7 @@ public: static constexpr uint16_t kChecksumFieldOffset = 6; ///< Byte offset of Checksum field in UDP header. /** - * This method returns the UDP Source Port. + * Returns the UDP Source Port. * * @returns The UDP Source Port. * @@ -376,7 +376,7 @@ public: uint16_t GetSourcePort(void) const { return HostSwap16(mSourcePort); } /** - * This method sets the UDP Source Port. + * Sets the UDP Source Port. * * @param[in] aPort The UDP Source Port. * @@ -384,7 +384,7 @@ public: void SetSourcePort(uint16_t aPort) { mSourcePort = HostSwap16(aPort); } /** - * This method returns the UDP Destination Port. + * Returns the UDP Destination Port. * * @returns The UDP Destination Port. * @@ -392,7 +392,7 @@ public: uint16_t GetDestinationPort(void) const { return HostSwap16(mDestinationPort); } /** - * This method sets the UDP Destination Port. + * Sets the UDP Destination Port. * * @param[in] aPort The UDP Destination Port. * @@ -400,7 +400,7 @@ public: void SetDestinationPort(uint16_t aPort) { mDestinationPort = HostSwap16(aPort); } /** - * This method returns the UDP Length. + * Returns the UDP Length. * * @returns The UDP Length. * @@ -408,7 +408,7 @@ public: uint16_t GetLength(void) const { return HostSwap16(mLength); } /** - * This method sets the UDP Length. + * Sets the UDP Length. * * @param[in] aLength The UDP Length. * @@ -416,7 +416,7 @@ public: void SetLength(uint16_t aLength) { mLength = HostSwap16(aLength); } /** - * This method returns the UDP Checksum. + * Returns the UDP Checksum. * * @returns The UDP Checksum. * @@ -424,7 +424,7 @@ public: uint16_t GetChecksum(void) const { return HostSwap16(mChecksum); } /** - * This method sets the UDP Checksum. + * Sets the UDP Checksum. * * @param[in] aChecksum The UDP Checksum. * @@ -440,7 +440,7 @@ public: } OT_TOOL_PACKED_END; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to OpenThread instance. * @@ -448,7 +448,7 @@ public: explicit Udp(Instance &aInstance); /** - * This method adds a UDP receiver. + * Adds a UDP receiver. * * @param[in] aReceiver A reference to the UDP receiver. * @@ -459,7 +459,7 @@ public: Error AddReceiver(Receiver &aReceiver); /** - * This method removes a UDP receiver. + * Removes a UDP receiver. * * @param[in] aReceiver A reference to the UDP receiver. * @@ -470,7 +470,7 @@ public: Error RemoveReceiver(Receiver &aReceiver); /** - * This method opens a UDP socket. + * Opens a UDP socket. * * @param[in] aSocket A reference to the socket. * @param[in] aHandler A pointer to a function that is called when receiving UDP messages. @@ -483,7 +483,7 @@ public: Error Open(SocketHandle &aSocket, otUdpReceive aHandler, void *aContext); /** - * This method returns if a UDP socket is open. + * Returns if a UDP socket is open. * * @param[in] aSocket A reference to the socket. * @@ -493,7 +493,7 @@ public: bool IsOpen(const SocketHandle &aSocket) const { return mSockets.Contains(aSocket); } /** - * This method binds a UDP socket. + * Binds a UDP socket. * * @param[in] aSocket A reference to the socket. * @param[in] aSockAddr A reference to the socket address. @@ -507,7 +507,7 @@ public: Error Bind(SocketHandle &aSocket, const SockAddr &aSockAddr, NetifIdentifier aNetifIdentifier); /** - * This method connects a UDP socket. + * Connects a UDP socket. * * @param[in] aSocket A reference to the socket. * @param[in] aSockAddr A reference to the socket address. @@ -519,7 +519,7 @@ public: Error Connect(SocketHandle &aSocket, const SockAddr &aSockAddr); /** - * This method closes the UDP socket. + * Closes the UDP socket. * * @param[in] aSocket A reference to the socket. * @@ -530,7 +530,7 @@ public: Error Close(SocketHandle &aSocket); /** - * This method sends a UDP message using a socket. + * Sends a UDP message using a socket. * * @param[in] aSocket A reference to the socket. * @param[in] aMessage The message to send. @@ -544,7 +544,7 @@ public: Error SendTo(SocketHandle &aSocket, Message &aMessage, const MessageInfo &aMessageInfo); /** - * This method returns a new ephemeral port. + * Returns a new ephemeral port. * * @returns A new ephemeral port. * @@ -552,7 +552,7 @@ public: uint16_t GetEphemeralPort(void); /** - * This method returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) + * Returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) * * @returns A pointer to the message or `nullptr` if no buffers are available. * @@ -560,7 +560,7 @@ public: Message *NewMessage(void); /** - * This method returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) + * Returns a new UDP message with default settings (link security enabled and `kPriorityNormal`) * * @param[in] aReserved The number of header bytes to reserve after the UDP header. * @@ -570,7 +570,7 @@ public: Message *NewMessage(uint16_t aReserved); /** - * This method returns a new UDP message with sufficient header space reserved. + * Returns a new UDP message with sufficient header space reserved. * * @param[in] aReserved The number of header bytes to reserve after the UDP header. * @param[in] aSettings The message settings. @@ -581,7 +581,7 @@ public: Message *NewMessage(uint16_t aReserved, const Message::Settings &aSettings); /** - * This method sends an IPv6 datagram. + * Sends an IPv6 datagram. * * @param[in] aMessage A reference to the message. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -594,7 +594,7 @@ public: Error SendDatagram(Message &aMessage, MessageInfo &aMessageInfo, uint8_t aIpProto); /** - * This method handles a received UDP message. + * Handles a received UDP message. * * @param[in] aMessage A reference to the UDP message to process. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -606,7 +606,7 @@ public: Error HandleMessage(Message &aMessage, MessageInfo &aMessageInfo); /** - * This method handles a received UDP message with offset set to the payload. + * Handles a received UDP message with offset set to the payload. * * @param[in] aMessage A reference to the UDP message to process. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. @@ -615,7 +615,7 @@ public: void HandlePayload(Message &aMessage, MessageInfo &aMessageInfo); /** - * This method returns the head of UDP Sockets list. + * Returns the head of UDP Sockets list. * * @returns A pointer to the head of UDP Socket linked list. * @@ -624,7 +624,7 @@ public: #if OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE /** - * This method sets the forward sender. + * Sets the forward sender. * * @param[in] aForwarder A function pointer to forward UDP packets. * @param[in] aContext A pointer to arbitrary context information. @@ -634,7 +634,7 @@ public: #endif /** - * This method returns whether a udp port is being used by OpenThread or any of it's optional + * Returns whether a udp port is being used by OpenThread or any of it's optional * features, e.g. CoAP API. * * @param[in] aPort The udp port @@ -646,7 +646,7 @@ public: bool IsPortInUse(uint16_t aPort) const; /** - * This method returns whether a udp port belongs to the platform or the stack. + * Returns whether a udp port belongs to the platform or the stack. * * @param[in] aPort The udp port * diff --git a/src/core/radio/max_power_table.hpp b/src/core/radio/max_power_table.hpp index 7b38d9c21..4fe09f8f0 100644 --- a/src/core/radio/max_power_table.hpp +++ b/src/core/radio/max_power_table.hpp @@ -42,7 +42,7 @@ public: MaxPowerTable(void) { memset(mPowerTable, kPowerDefault, sizeof(mPowerTable)); } /** - * This method gets the max allowed transmit power of channel @p aChannel. + * Gets the max allowed transmit power of channel @p aChannel. * * @param[in] aChannel The radio channel number. * @@ -52,7 +52,7 @@ public: int8_t GetTransmitPower(uint8_t aChannel) const { return mPowerTable[aChannel - Radio::kChannelMin]; } /** - * This method sets the max allowed transmit power of channel @p aChannel. + * Sets the max allowed transmit power of channel @p aChannel. * * @param[in] aChannel The radio channel number. * @param[in] aPower The max supported transmit power in dBm. @@ -61,7 +61,7 @@ public: void SetTransmitPower(uint8_t aChannel, int8_t aPower) { mPowerTable[aChannel - Radio::kChannelMin] = aPower; } /** - * This method gets the supported channel masks. + * Gets the supported channel masks. * */ uint32_t GetSupportedChannelMask(void) const diff --git a/src/core/radio/radio.hpp b/src/core/radio/radio.hpp index bbe8544d5..d8e4d2e30 100644 --- a/src/core/radio/radio.hpp +++ b/src/core/radio/radio.hpp @@ -68,7 +68,7 @@ static constexpr uint64_t kMaxCslTimeout = OPENTHREAD_CONFIG_MAC_CSL_MAX_TIMEOUT */ /** - * This class represents an OpenThread radio abstraction. + * Represents an OpenThread radio abstraction. * */ class Radio : public InstanceLocator, private NonCopyable @@ -116,7 +116,7 @@ public: "must be set to 1 to specify the radio mode"); /** - * This class defines the callbacks from `Radio`. + * Defines the callbacks from `Radio`. * */ class Callbacks : public InstanceLocator @@ -159,7 +159,7 @@ public: /** * This callback method handles "Energy Scan Done" event from radio platform. * - * This method is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. It is called from + * Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. It is called from * `otPlatRadioEnergyScanDone()`. * * @param[in] aMaxRssi The maximum RSSI encountered on the scanned channel. @@ -200,7 +200,7 @@ public: }; /** - * This constructor initializes the `Radio` object. + * Initializes the `Radio` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -212,7 +212,7 @@ public: } /** - * This method gets the radio version string. + * Gets the radio version string. * * @returns A pointer to the OpenThread radio version. * @@ -220,7 +220,7 @@ public: const char *GetVersionString(void); /** - * This method gets the factory-assigned IEEE EUI-64 for the device. + * Gets the factory-assigned IEEE EUI-64 for the device. * * @param[out] aIeeeEui64 A reference to `Mac::ExtAddress` to place the factory-assigned IEEE EUI-64. * @@ -228,7 +228,7 @@ public: void GetIeeeEui64(Mac::ExtAddress &aIeeeEui64); /** - * This method gets the radio capabilities. + * Gets the radio capabilities. * * @returns The radio capability bit vector (see `OT_RADIO_CAP_*` definitions). * @@ -236,7 +236,7 @@ public: otRadioCaps GetCaps(void); /** - * This method gets the radio receive sensitivity value. + * Gets the radio receive sensitivity value. * * @returns The radio receive sensitivity value in dBm. * @@ -245,14 +245,14 @@ public: #if OPENTHREAD_RADIO /** - * This method initializes the states of the Thread radio. + * Initializes the states of the Thread radio. * */ void Init(void); #endif /** - * This method sets the PAN ID for address filtering. + * Sets the PAN ID for address filtering. * * @param[in] aPanId The IEEE 802.15.4 PAN ID. * @@ -260,7 +260,7 @@ public: void SetPanId(Mac::PanId aPanId); /** - * This method sets the Extended Address for address filtering. + * Sets the Extended Address for address filtering. * * @param[in] aExtAddress The IEEE 802.15.4 Extended Address stored in little-endian byte order. * @@ -268,7 +268,7 @@ public: void SetExtendedAddress(const Mac::ExtAddress &aExtAddress); /** - * This method sets the Short Address for address filtering. + * Sets the Short Address for address filtering. * * @param[in] aShortAddress The IEEE 802.15.4 Short Address. * @@ -276,7 +276,7 @@ public: void SetShortAddress(Mac::ShortAddress aShortAddress); /** - * This method sets MAC key and key ID. + * Sets MAC key and key ID. * * @param[in] aKeyIdMode MAC key ID mode. * @param[in] aKeyId Current MAC key index. @@ -292,7 +292,7 @@ public: const Mac::KeyMaterial &aNextKey); /** - * This method sets the current MAC Frame Counter value. + * Sets the current MAC Frame Counter value. * * @param[in] aMacFrameCounter The MAC Frame Counter value. * @@ -303,7 +303,7 @@ public: } /** - * This method sets the current MAC Frame Counter value only if the new given value is larger than the current + * Sets the current MAC Frame Counter value only if the new given value is larger than the current * value. * * @param[in] aMacFrameCounter The MAC Frame Counter value. @@ -315,7 +315,7 @@ public: } /** - * This method gets the radio's transmit power in dBm. + * Gets the radio's transmit power in dBm. * * @param[out] aPower A reference to output the transmit power in dBm. * @@ -326,7 +326,7 @@ public: Error GetTransmitPower(int8_t &aPower); /** - * This method sets the radio's transmit power in dBm. + * Sets the radio's transmit power in dBm. * * @param[in] aPower The transmit power in dBm. * @@ -337,7 +337,7 @@ public: Error SetTransmitPower(int8_t aPower); /** - * This method gets the radio's CCA ED threshold in dBm. + * Gets the radio's CCA ED threshold in dBm. * * @param[in] aThreshold The CCA ED threshold in dBm. * @@ -348,7 +348,7 @@ public: Error GetCcaEnergyDetectThreshold(int8_t &aThreshold); /** - * This method sets the radio's CCA ED threshold in dBm. + * Sets the radio's CCA ED threshold in dBm. * * @param[in] aThreshold The CCA ED threshold in dBm. * @@ -359,7 +359,7 @@ public: Error SetCcaEnergyDetectThreshold(int8_t aThreshold); /** - * This method gets the status of promiscuous mode. + * Gets the status of promiscuous mode. * * @retval TRUE Promiscuous mode is enabled. * @retval FALSE Promiscuous mode is disabled. @@ -368,7 +368,7 @@ public: bool GetPromiscuous(void); /** - * This method enables or disables promiscuous mode. + * Enables or disables promiscuous mode. * * @param[in] aEnable TRUE to enable or FALSE to disable promiscuous mode. * @@ -376,9 +376,9 @@ public: void SetPromiscuous(bool aEnable); /** - * This method returns the current state of the radio. + * Returns the current state of the radio. * - * This function is not required by OpenThread. It may be used for debugging and/or application-specific purposes. + * Is not required by OpenThread. It may be used for debugging and/or application-specific purposes. * * @note This function may be not implemented. In this case it always returns OT_RADIO_STATE_INVALID state. * @@ -388,7 +388,7 @@ public: otRadioState GetState(void); /** - * This method enables the radio. + * Enables the radio. * * @retval kErrorNone Successfully enabled. * @retval kErrorFailed The radio could not be enabled. @@ -397,7 +397,7 @@ public: Error Enable(void); /** - * This method disables the radio. + * Disables the radio. * * @retval kErrorNone Successfully transitioned to Disabled. * @retval kErrorInvalidState The radio was not in sleep state. @@ -406,7 +406,7 @@ public: Error Disable(void); /** - * This method indicates whether radio is enabled or not. + * Indicates whether radio is enabled or not. * * @returns TRUE if the radio is enabled, FALSE otherwise. * @@ -414,7 +414,7 @@ public: bool IsEnabled(void); /** - * This method transitions the radio from Receive to Sleep (turn off the radio). + * Transitions the radio from Receive to Sleep (turn off the radio). * * @retval kErrorNone Successfully transitioned to Sleep. * @retval kErrorBusy The radio was transmitting. @@ -424,7 +424,7 @@ public: Error Sleep(void); /** - * This method transitions the radio from Sleep to Receive (turn on the radio). + * Transitions the radio from Sleep to Receive (turn on the radio). * * @param[in] aChannel The channel to use for receiving. * @@ -436,7 +436,7 @@ public: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method updates the CSL sample time in radio. + * Updates the CSL sample time in radio. * * @param[in] aCslSampleTime The CSL sample time. * @@ -444,7 +444,7 @@ public: void UpdateCslSampleTime(uint32_t aCslSampleTime); /** - * This method schedules a radio reception window at a specific time and duration. + * Schedules a radio reception window at a specific time and duration. * * @param[in] aChannel The radio channel on which to receive. * @param[in] aStart The receive window start time, in microseconds. @@ -456,7 +456,7 @@ public: */ Error ReceiveAt(uint8_t aChannel, uint32_t aStart, uint32_t aDuration); - /** This method enables CSL sampling in radio. + /** Enables CSL sampling in radio. * * @param[in] aCslPeriod CSL period, 0 for disabling CSL. * @param[in] aShortAddr The short source address of CSL receiver's peer. @@ -493,7 +493,7 @@ public: #endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE || OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE /** - * This method gets the radio transmit frame buffer. + * Gets the radio transmit frame buffer. * * OpenThread forms the IEEE 802.15.4 frame in this buffer then calls `Transmit()` to request transmission. * @@ -503,7 +503,7 @@ public: Mac::TxFrame &GetTransmitBuffer(void); /** - * This method starts the transmit sequence on the radio. + * Starts the transmit sequence on the radio. * * The caller must form the IEEE 802.15.4 frame in the buffer provided by `GetTransmitBuffer()` before * requesting transmission. The channel and transmit power are also included in the frame. @@ -517,7 +517,7 @@ public: Error Transmit(Mac::TxFrame &aFrame); /** - * This method gets the most recent RSSI measurement. + * Gets the most recent RSSI measurement. * * @returns The RSSI in dBm when it is valid. 127 when RSSI is invalid. * @@ -525,9 +525,9 @@ public: int8_t GetRssi(void); /** - * This method begins the energy scan sequence on the radio. + * Begins the energy scan sequence on the radio. * - * This function is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. + * Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability. * * @param[in] aScanChannel The channel to perform the energy scan on. * @param[in] aScanDuration The duration, in milliseconds, for the channel to be scanned. @@ -540,7 +540,7 @@ public: Error EnergyScan(uint8_t aScanChannel, uint16_t aScanDuration); /** - * This method enables/disables source address match feature. + * Enables/disables source address match feature. * * The source address match feature controls how the radio layer decides the "frame pending" bit for acks sent in * response to data request commands from children. @@ -559,7 +559,7 @@ public: void EnableSrcMatch(bool aEnable); /** - * This method adds a short address to the source address match table. + * Adds a short address to the source address match table. * * @param[in] aShortAddress The short address to be added. * @@ -570,7 +570,7 @@ public: Error AddSrcMatchShortEntry(Mac::ShortAddress aShortAddress); /** - * This method adds an extended address to the source address match table. + * Adds an extended address to the source address match table. * * @param[in] aExtAddress The extended address to be added stored in little-endian byte order. * @@ -581,7 +581,7 @@ public: Error AddSrcMatchExtEntry(const Mac::ExtAddress &aExtAddress); /** - * This method removes a short address from the source address match table. + * Removes a short address from the source address match table. * * @param[in] aShortAddress The short address to be removed. * @@ -592,7 +592,7 @@ public: Error ClearSrcMatchShortEntry(Mac::ShortAddress aShortAddress); /** - * This method removes an extended address from the source address match table. + * Removes an extended address from the source address match table. * * @param[in] aExtAddress The extended address to be removed stored in little-endian byte order. * @@ -603,19 +603,19 @@ public: Error ClearSrcMatchExtEntry(const Mac::ExtAddress &aExtAddress); /** - * This method clears all short addresses from the source address match table. + * Clears all short addresses from the source address match table. * */ void ClearSrcMatchShortEntries(void); /** - * This method clears all the extended/long addresses from source address match table. + * Clears all the extended/long addresses from source address match table. * */ void ClearSrcMatchExtEntries(void); /** - * This method gets the radio supported channel mask that the device is allowed to be on. + * Gets the radio supported channel mask that the device is allowed to be on. * * @returns The radio supported channel mask. * @@ -623,7 +623,7 @@ public: uint32_t GetSupportedChannelMask(void); /** - * This method gets the radio preferred channel mask that the device prefers to form on. + * Gets the radio preferred channel mask that the device prefers to form on. * * @returns The radio preferred channel mask. * @@ -632,7 +632,7 @@ public: #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This method enables/disables or updates Enhanced-ACK Based Probing in radio for a specific Initiator. + * Enables/disables or updates Enhanced-ACK Based Probing in radio for a specific Initiator. * * After Enhanced-ACK Based Probing is configured by a specific Probing Initiator, the Enhanced-ACK sent to that * node should include Vendor-Specific IE containing Link Metrics data. This method informs the radio to @@ -660,7 +660,7 @@ public: #endif // OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This method checks if a given channel is valid as a CSL channel. + * Checks if a given channel is valid as a CSL channel. * * @retval true The channel is valid. * @retval false The channel is invalid. diff --git a/src/core/radio/trel_interface.hpp b/src/core/radio/trel_interface.hpp index 1822d4739..9ef09b2dd 100644 --- a/src/core/radio/trel_interface.hpp +++ b/src/core/radio/trel_interface.hpp @@ -60,7 +60,7 @@ extern "C" void otPlatTrelHandleReceived(otInstance *aInstance, uint8_t *aBuffer extern "C" void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPlatTrelPeerInfo *aInfo); /** - * This class represents a TREL link interface. + * Represents a TREL link interface. * */ class Interface : public InstanceLocator @@ -71,7 +71,7 @@ class Interface : public InstanceLocator public: /** - * This class represents information about a discovered TREL peer. + * Represents information about a discovered TREL peer. * */ class Peer : public otTrelPeer @@ -81,7 +81,7 @@ public: public: /** - * This method returns the Extended MAC Address of the discovered TREL peer. + * Returns the Extended MAC Address of the discovered TREL peer. * * @returns The Extended MAC Address of the TREL peer. * @@ -89,7 +89,7 @@ public: const Mac::ExtAddress &GetExtAddress(void) const { return static_cast(mExtAddress); } /** - * This method returns the Extended PAN Identifier of the discovered TREL peer. + * Returns the Extended PAN Identifier of the discovered TREL peer. * * @returns The Extended PAN Identifier of the TREL peer. * @@ -100,7 +100,7 @@ public: } /** - * This method returns the IPv6 socket address of the discovered TREL peer. + * Returns the IPv6 socket address of the discovered TREL peer. * * @returns The IPv6 socket address of the TREP peer. * @@ -108,7 +108,7 @@ public: const Ip6::SockAddr &GetSockAddr(void) const { return static_cast(mSockAddr); } /** - * This method indicates whether the peer matches a given Extended Address. + * Indicates whether the peer matches a given Extended Address. * * @param[in] aExtAddress A Extended Address to match with. * @@ -119,7 +119,7 @@ public: bool Matches(const Mac::ExtAddress &aExtAddress) const { return GetExtAddress() == aExtAddress; } /** - * This method indicates whether the peer matches a given Socket Address. + * Indicates whether the peer matches a given Socket Address. * * @param[in] aSockAddr A Socket Address to match with. * @@ -146,20 +146,20 @@ public: }; /** - * This type represents an iterator for iterating over TREL peer table entries. + * Represents an iterator for iterating over TREL peer table entries. * */ typedef otTrelPeerIterator PeerIterator; /** - * This method enables or disables the TREL interface. + * Enables or disables the TREL interface. * * @param[in] aEnable A boolean to enable/disable the TREL interface. */ void SetEnabled(bool aEnable); /** - * This method enables the TREL interface. + * Enables the TREL interface. * * This call initiates an ongoing DNS-SD browse on the service name "_trel._udp" within the local browsing domain * to discover other devices supporting TREL. Device also registers a new service to be advertised using DNS-SD, @@ -170,7 +170,7 @@ public: void Enable(void); /** - * This method disables the TREL interface. + * Disables the TREL interface. * * This call stops the DNS-SD browse on the service name "_trel._udp", stops advertising TREL DNS-SD service, and * clears the TREL peer table. @@ -179,7 +179,7 @@ public: void Disable(void); /** - * This method indicates whether the TREL interface is enabled. + * Indicates whether the TREL interface is enabled. * * @retval TRUE if the TREL interface is enabled. * @retval FALSE if the TREL interface is disabled. @@ -188,7 +188,7 @@ public: bool IsEnabled(void) const { return mEnabled; } /** - * This method initializes a peer table iterator. + * Initializes a peer table iterator. * * @param[in] aIterator The iterator to initialize. * @@ -196,7 +196,7 @@ public: void InitIterator(PeerIterator &aIterator) const { aIterator = 0; } /** - * This method iterates over the peer table entries. + * Iterates over the peer table entries. * * @param[in] aIterator The iterator. MUST be initialized. * @@ -206,7 +206,7 @@ public: const Peer *GetNextPeer(PeerIterator &aIterator) const; /** - * This method sets the filter mode (enables/disables filtering). + * Sets the filter mode (enables/disables filtering). * * When filtering is enabled, any rx and tx traffic through TREL interface is silently dropped. This is mainly * intended for use during testing. @@ -220,7 +220,7 @@ public: void SetFilterEnabled(bool aEnable) { mFiltered = aEnable; } /** - * This method indicates whether or not the filter mode is enabled. + * Indicates whether or not the filter mode is enabled. * * @retval TRUE if the TREL filter mode is enabled. * @retval FALSE if the TREL filter mode is disabled. diff --git a/src/core/radio/trel_link.hpp b/src/core/radio/trel_link.hpp index f19b0bbae..4d538ad55 100644 --- a/src/core/radio/trel_link.hpp +++ b/src/core/radio/trel_link.hpp @@ -65,7 +65,7 @@ namespace Trel { */ /** - * This class represents a Thread Radio Encapsulation Link (TREL). + * Represents a Thread Radio Encapsulation Link (TREL). * */ class Link : public InstanceLocator @@ -79,7 +79,7 @@ public: static constexpr uint8_t kFcsSize = 0; ///< FCS size for TREL frame. /** - * This constructor initializes the `Link` object. + * Initializes the `Link` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -87,7 +87,7 @@ public: explicit Link(Instance &aInstance); /** - * This method sets the PAN Identifier. + * Sets the PAN Identifier. * * @param[in] aPanId A PAN Identifier. * @@ -95,32 +95,32 @@ public: void SetPanId(Mac::PanId aPanId) { mPanId = aPanId; } /** - * This method notifies TREL radio link that device's extended MAC address has changed for it to update any + * Notifies TREL radio link that device's extended MAC address has changed for it to update any * internal address/state. * */ void HandleExtAddressChange(void) { mInterface.HandleExtAddressChange(); } /** - * This method enables the TREL radio link. + * Enables the TREL radio link. * */ void Enable(void); /** - * This method disables the TREL radio link. + * Disables the TREL radio link. * */ void Disable(void); /** - * This method requests TREL radio link to transition to Sleep mode + * Requests TREL radio link to transition to Sleep mode * */ void Sleep(void); /** - * This method requests TREL radio link to transition to Receive mode on a given channel. + * Requests TREL radio link to transition to Receive mode on a given channel. * * `Mac::HandleReceivedFrame()` is used to notify MAC layer upon receiving a frame. * @@ -130,7 +130,7 @@ public: void Receive(uint8_t aChannel); /** - * This method gets the radio transmit frame for TREL radio link. + * Gets the radio transmit frame for TREL radio link. * * @returns The transmit frame. * @@ -138,7 +138,7 @@ public: Mac::TxFrame &GetTransmitFrame(void) { return mTxFrame; } /** - * This method requests a frame to be sent over TREL radio link. + * Requests a frame to be sent over TREL radio link. * * The frame should be already placed in `GetTransmitFrame()` frame. * @@ -197,7 +197,7 @@ private: }; /** - * This class defines all the neighbor info required for TREL link. + * Defines all the neighbor info required for TREL link. * * `Neighbor` class publicly inherits from this class. * diff --git a/src/core/radio/trel_packet.hpp b/src/core/radio/trel_packet.hpp index 5b28cb784..5b4caace6 100644 --- a/src/core/radio/trel_packet.hpp +++ b/src/core/radio/trel_packet.hpp @@ -48,7 +48,7 @@ namespace ot { namespace Trel { /** - * This class represents a TREL radio link packet encapsulation header. + * Represents a TREL radio link packet encapsulation header. * */ OT_TOOL_PACKED_BEGIN @@ -56,7 +56,7 @@ class Header { public: /** - * This enumeration defines packet types. + * Defines packet types. * */ enum Type : uint8_t @@ -67,7 +67,7 @@ public: }; /** - * This enumeration represents Ack Mode field in TREL header. + * Represents Ack Mode field in TREL header. * */ enum AckMode : uint8_t @@ -79,13 +79,13 @@ public: static constexpr uint16_t kInfoStringSize = 128; ///< Max chars for the info string (@sa ToInfoString()). /** - * This type defines the fixed-length `String` object returned from `ToString()` method. + * Defines the fixed-length `String` object returned from `ToString()` method. * */ typedef String InfoString; /** - * This method initializes the header. + * Initializes the header. * * @param[in] aType The header type. * @@ -93,7 +93,7 @@ public: void Init(Type aType) { mControl = aType + kVersion; } /** - * This method checks whether the version field in header is valid or not + * Checks whether the version field in header is valid or not * * @returns TRUE if the version field is valid, FALSE otherwise. * @@ -101,7 +101,7 @@ public: bool IsVersionValid(void) const { return (mControl & kVersionMask) == kVersion; } /** - * This method gets the packet type. + * Gets the packet type. * * @returns The packet type. * @@ -109,7 +109,7 @@ public: Type GetType(void) const { return static_cast(mControl & kTypeMask); } /** - * This method gets the header length based on its type. + * Gets the header length based on its type. * * @returns the header length (number of bytes). * @@ -117,7 +117,7 @@ public: uint16_t GetLength(void) const { return GetSize(GetType()); } /** - * This method gets the Ack Mode field from the header. + * Gets the Ack Mode field from the header. * * @returns The Ack Mode field. * @@ -125,7 +125,7 @@ public: AckMode GetAckMode(void) const { return (mControl & kAckModeFlag) ? kAckRequested : kNoAck; } /** - * This method sets the Ack Mode field in the header. + * Sets the Ack Mode field in the header. * * @param[in] aAckMode The Ack Mode field * @@ -133,7 +133,7 @@ public: void SetAckMode(AckMode aAckMode); /** - * This method gets the channel field from the header. + * Gets the channel field from the header. * * @returns The channel field. * @@ -141,7 +141,7 @@ public: uint8_t GetChannel(void) const { return mChannel; } /** - * This method sets the channel field in the header. + * Sets the channel field in the header. * * @param[in] aChannel A channel. * @@ -149,7 +149,7 @@ public: void SetChannel(uint8_t aChannel) { mChannel = aChannel; } /** - * This method gets the PAN Identifier field from the header. + * Gets the PAN Identifier field from the header. * * @returns The PAN Identifier field. * @@ -157,7 +157,7 @@ public: Mac::PanId GetPanId(void) const { return Encoding::BigEndian::HostSwap16(mPanId); } /** - * This method sets the PAN Identifier field in the header. + * Sets the PAN Identifier field in the header. * * @param[in] aPanId A PAN Identifier. * @@ -165,7 +165,7 @@ public: void SetPanId(Mac::PanId aPanId) { mPanId = Encoding::BigEndian::HostSwap16(aPanId); } /** - * This method gets the packet number field from the header. + * Gets the packet number field from the header. * * @returns The packet number field. * @@ -173,7 +173,7 @@ public: uint32_t GetPacketNumber(void) const { return Encoding::BigEndian::HostSwap32(mPacketNumber); } /** - * This method sets the packet number field in the header. + * Sets the packet number field in the header. * * @param[in] aPacketNumber The packet number. * @@ -181,7 +181,7 @@ public: void SetPacketNumber(uint32_t aPacketNumber) { mPacketNumber = Encoding::BigEndian::HostSwap32(aPacketNumber); } /** - * This method gets the source MAC address field from the header. + * Gets the source MAC address field from the header. * * @returns The source MAC address field. * @@ -189,7 +189,7 @@ public: const Mac::ExtAddress &GetSource(void) const { return mSource; } /** - * This method sets the source MAC address filed in the header. + * Sets the source MAC address filed in the header. * * @param[in] aSource A MAC extended address to set as source. * @@ -197,9 +197,9 @@ public: void SetSource(const Mac::ExtAddress &aSource) { mSource = aSource; } /** - * This method gets the destination MAC address field from the header. + * Gets the destination MAC address field from the header. * - * This method MUST be used with a unicast of ack type packet, otherwise its behavior is undefined. + * MUST be used with a unicast of ack type packet, otherwise its behavior is undefined. * * @returns The destination MAC address field. * @@ -207,9 +207,9 @@ public: const Mac::ExtAddress &GetDestination(void) const { return mDestination; } /** - * This method sets the destination MAC address field in the header. + * Sets the destination MAC address field in the header. * - * This method MUST be used with a unicast of ack type packet, otherwise its behavior is undefined. + * MUST be used with a unicast of ack type packet, otherwise its behavior is undefined. * * @param[in] aDest A MAC extended address to set as destination. * @@ -217,7 +217,7 @@ public: void SetDestination(const Mac::ExtAddress &aDest) { mDestination = aDest; } /** - * This static method gets the size (number of bytes) in header of given packet type. + * Gets the size (number of bytes) in header of given packet type. * * @param[in] aType The packet type. * @@ -227,7 +227,7 @@ public: static uint16_t GetSize(Type aType); /** - * This method returns a string representation of header. + * Returns a string representation of header. * * @returns An `InfoString` representation of header. * @@ -251,7 +251,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class represents a TREL radio link packet. + * Represents a TREL radio link packet. * */ class Packet : private MutableData @@ -260,7 +260,7 @@ class Packet : private MutableData public: /** - * This method initializes the `Packet` with a given buffer and length. + * Initializes the `Packet` with a given buffer and length. * * @param[in] aBuffer A pointer to a buffer containing the entire packet (header and payload). * @param[in] aLength Length (number of bytes) of the packet (including header and payload). @@ -269,10 +269,10 @@ public: void Init(uint8_t *aBuffer, uint16_t aLength) { Base::Init(aBuffer, aLength); } /** - * This method initializes the `Packet` with a specified header type and given a payload. + * Initializes the `Packet` with a specified header type and given a payload. * * The payload buffer @p aPayload should have space reserved before the start of payload for the packet header. - * This method will initialize the header with the given type @p aType. Rest of header fields can be updated after + * Will initialize the header with the given type @p aType. Rest of header fields can be updated after * initializing the packet. * * @param[in] aType The packet type. @@ -284,7 +284,7 @@ public: void Init(Header::Type aType, uint8_t *aPayload, uint16_t aPayloadLength); /** - * This method gets a pointer to buffer containing the packet. + * Gets a pointer to buffer containing the packet. * * @returns A pointer to buffer containing the packet. * @@ -292,7 +292,7 @@ public: uint8_t *GetBuffer(void) { return Base::GetBytes(); } /** - * This method gets a pointer to buffer containing the packet. + * Gets a pointer to buffer containing the packet. * * @returns A pointer to buffer containing the packet. * @@ -300,7 +300,7 @@ public: const uint8_t *GetBuffer(void) const { return Base::GetBytes(); } /** - * This method gets the length of packet. + * Gets the length of packet. * * @returns The length (number of bytes) of packet (header and payload). * @@ -308,7 +308,7 @@ public: uint16_t GetLength(void) const { return Base::GetLength(); } /** - * This method checks whether or not the packet header is valid. + * Checks whether or not the packet header is valid. * * @retval TRUE The packet header is valid and well-formed. * @retval FALSE The packet header is not valid. @@ -317,7 +317,7 @@ public: bool IsHeaderValid(void) const; /** - * This method gets the packet header. + * Gets the packet header. * * @returns A reference to the packet header as `Header`. * @@ -325,7 +325,7 @@ public: Header &GetHeader(void) { return *reinterpret_cast
(Base::GetBytes()); } /** - * This method gets the packet header. + * Gets the packet header. * * @returns A reference to the packet header as `Header`. * @@ -333,7 +333,7 @@ public: const Header &GetHeader(void) const { return *reinterpret_cast(Base::GetBytes()); } /** - * This method gets a pointer to start of packet payload. + * Gets a pointer to start of packet payload. * * @returns A pointer to start of packet payload (after header). * @@ -341,7 +341,7 @@ public: uint8_t *GetPayload(void) { return Base::GetBytes() + GetHeader().GetLength(); } /** - * This method gets a pointer to start of packet payload. + * Gets a pointer to start of packet payload. * * @returns A pointer to start of packet payload (after header). * @@ -349,7 +349,7 @@ public: const uint8_t *GetPayload(void) const { return Base::GetBytes() + GetHeader().GetLength(); } /** - * This method gets the payload length. + * Gets the payload length. * * @returns The packet payload length (number of bytes). * diff --git a/src/core/thread/address_resolver.hpp b/src/core/thread/address_resolver.hpp index 81ee36be5..171fa1447 100644 --- a/src/core/thread/address_resolver.hpp +++ b/src/core/thread/address_resolver.hpp @@ -61,7 +61,7 @@ namespace ot { */ /** - * This class implements the EID-to-RLOC mapping and caching. + * Implements the EID-to-RLOC mapping and caching. * */ class AddressResolver : public InstanceLocator, private NonCopyable @@ -74,7 +74,7 @@ class AddressResolver : public InstanceLocator, private NonCopyable public: /** - * This type represents an iterator used for iterating through the EID cache table entries. + * Represents an iterator used for iterating through the EID cache table entries. * */ class Iterator : public otCacheEntryIterator, public Clearable @@ -91,7 +91,7 @@ public: }; /** - * This type represents an EID cache entry. + * Represents an EID cache entry. * */ class EntryInfo : public otCacheEntryInfo, public Clearable @@ -107,20 +107,20 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * */ explicit AddressResolver(Instance &aInstance); #if OPENTHREAD_FTD /** - * This method clears the EID-to-RLOC cache. + * Clears the EID-to-RLOC cache. * */ void Clear(void); /** - * This method gets the information about the next EID cache entry (using an iterator). + * Gets the information about the next EID cache entry (using an iterator). * * @param[out] aInfo An `EntryInfo` where the EID cache entry information is placed. * @param[in,out] aIterator An iterator. It will be updated to point to the next entry on success. @@ -134,7 +134,7 @@ public: Error GetNextCacheEntry(EntryInfo &aInfo, Iterator &aIterator) const; /** - * This method removes the EID-to-RLOC cache entries corresponding to an RLOC16. + * Removes the EID-to-RLOC cache entries corresponding to an RLOC16. * * @param[in] aRloc16 The RLOC16 address. * @@ -142,7 +142,7 @@ public: void RemoveEntriesForRloc16(Mac::ShortAddress aRloc16); /** - * This method removes all EID-to-RLOC cache entries associated with a Router ID. + * Removes all EID-to-RLOC cache entries associated with a Router ID. * * @param[in] aRouterId The Router ID. * @@ -150,7 +150,7 @@ public: void RemoveEntriesForRouterId(uint8_t aRouterId); /** - * This method removes the cache entry for the EID. + * Removes the cache entry for the EID. * * @param[in] aEid A reference to the EID. * @@ -158,7 +158,7 @@ public: void RemoveEntryForAddress(const Ip6::Address &aEid); /** - * This method replaces all EID-to-RLOC cache entries corresponding to an old RLOC16 with a new RLOC16. + * Replaces all EID-to-RLOC cache entries corresponding to an old RLOC16 with a new RLOC16. * * @param[in] aOldRloc16 The old RLOC16. * @param[in] aNewRloc16 The new RLOC16. @@ -167,7 +167,7 @@ public: void ReplaceEntriesForRloc16(uint16_t aOldRloc16, uint16_t aNewRloc16); /** - * This method updates an existing entry or adds a snooped cache entry for a given EID. + * Updates an existing entry or adds a snooped cache entry for a given EID. * * The method is intended to add an entry for snoop optimization (inspection of a received message to create a * cache entry mapping an EID to a RLOC). @@ -180,7 +180,7 @@ public: void UpdateSnoopedCacheEntry(const Ip6::Address &aEid, Mac::ShortAddress aRloc16, Mac::ShortAddress aDest); /** - * This method returns the RLOC16 for a given EID, initiates an Address Query if the mapping is not known. + * Returns the RLOC16 for a given EID, initiates an Address Query if the mapping is not known. * * @param[in] aEid A reference to the EID. * @param[out] aRloc16 The RLOC16 corresponding to @p aEid. @@ -197,7 +197,7 @@ public: } /** - * This method looks up the RLOC16 for a given EID in the address cache. + * Looks up the RLOC16 for a given EID in the address cache. * * @param[in] aEid A reference to the EID. * @@ -207,7 +207,7 @@ public: Mac::ShortAddress LookUp(const Ip6::Address &aEid); /** - * This method restarts any ongoing address queries. + * Restarts any ongoing address queries. * * Any existing address queries will be restarted as if they are being sent for the first time. * @@ -215,7 +215,7 @@ public: void RestartAddressQueries(void); /** - * This method sends an Address Notification (ADDR_NTF.ans) message. + * Sends an Address Notification (ADDR_NTF.ans) message. * * @param[in] aTarget The target address of the ADDR_NTF.ans message. * @param[in] aMeshLocalIid The ML-IID of the ADDR_NTF.ans message. @@ -230,7 +230,7 @@ public: const Ip6::Address &aDestination); /** - * This method sends an Address Error Notification (ADDR_ERR.ntf) message. + * Sends an Address Error Notification (ADDR_ERR.ntf) message. * * @param aTarget The target address of the ADDR_ERR.ntf message. * @param aMeshLocalIid The ML-IID of the ADDR_ERR.ntf message. diff --git a/src/core/thread/announce_begin_server.hpp b/src/core/thread/announce_begin_server.hpp index a5aafd1f3..5839f9c84 100644 --- a/src/core/thread/announce_begin_server.hpp +++ b/src/core/thread/announce_begin_server.hpp @@ -45,7 +45,7 @@ namespace ot { /** - * This class implements handling Announce Begin Requests. + * Implements handling Announce Begin Requests. * */ class AnnounceBeginServer : public AnnounceSenderBase @@ -54,13 +54,13 @@ class AnnounceBeginServer : public AnnounceSenderBase public: /** - * This constructor initializes the object. + * Initializes the object. * */ explicit AnnounceBeginServer(Instance &aInstance); /** - * This method begins the MLE Announce transmission process. + * Begins the MLE Announce transmission process. * * @param[in] aChannelMask The channels to use for transmission. * @param[in] aCount The number of transmissions per channel. diff --git a/src/core/thread/announce_sender.hpp b/src/core/thread/announce_sender.hpp index a3e533ed1..26927da25 100644 --- a/src/core/thread/announce_sender.hpp +++ b/src/core/thread/announce_sender.hpp @@ -46,9 +46,9 @@ namespace ot { /** - * This class implements the base class for an `AnnounceSender` and `AnnounceBeginSever`. + * Implements the base class for an `AnnounceSender` and `AnnounceBeginSever`. * - * This class provides APIs to schedule periodic transmission of MLE Announcement messages for a given number + * Provides APIs to schedule periodic transmission of MLE Announcement messages for a given number * transmissions per channel. */ class AnnounceSenderBase : public InstanceLocator, private NonCopyable @@ -61,7 +61,7 @@ protected: static constexpr uint8_t kChannelIteratorFirst = Mac::ChannelMask::kChannelIteratorFirst; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aHandler A timer handler provided by sub-class. @@ -70,9 +70,9 @@ protected: AnnounceSenderBase(Instance &aInstance, Timer::Handler aHandler); /** - * This method schedules the MLE Announce transmissions. + * Schedules the MLE Announce transmissions. * - * This method requests @p aCount additional MLE transmission cycles to be scheduled. Each cycle covers all the + * Requests @p aCount additional MLE transmission cycles to be scheduled. Each cycle covers all the * channels in the specified channel mask from `GetChannelMask()`, with `GetPeriod()` as the time interval between * any two successive MLE Announcement transmissions (possibly) on different channels from the mask. The * `GetJitter()` value is used to add a random interval from `[-jitter, jitter]` to each period interval. @@ -93,13 +93,13 @@ protected: void SendAnnounce(uint8_t aCount); /** - * This method stops the ongoing MLE Announce transmissions. + * Stops the ongoing MLE Announce transmissions. * */ void Stop(void); /** - * This method indicates whether a previously scheduled MLE Announce transmission is currently in progress or is + * Indicates whether a previously scheduled MLE Announce transmission is currently in progress or is * finished. * * @returns TRUE if the MLE Announce transmission is in progress, FALSE otherwise. @@ -108,7 +108,7 @@ protected: bool IsRunning(void) const { return mTimer.IsRunning(); } /** - * This method gets the period interval. + * Gets the period interval. * * @returns The period interval (in milliseconds). * @@ -116,7 +116,7 @@ protected: uint32_t GetPeriod(void) const { return mPeriod; } /** - * This method sets the period interval. + * Sets the period interval. * * The period along with jitter value from (`Get/SetJitter()`) determines the interval between two successive MLE * Announcement transmissions (possibly) on different channels from the specified channel mask. @@ -127,7 +127,7 @@ protected: void SetPeriod(uint32_t aPeriod) { mPeriod = aPeriod; } /** - * This method gets the current jitter interval. + * Gets the current jitter interval. * * @returns The jitter interval (in milliseconds). * @@ -135,7 +135,7 @@ protected: uint16_t GetJitter(void) const { return mJitter; } /** - * This method sets the jitter interval. + * Sets the jitter interval. * * @param[in] aJitter The jitter interval (in milliseconds). * @@ -143,7 +143,7 @@ protected: void SetJitter(uint16_t aJitter) { mJitter = aJitter; } /** - * This method gets the channel mask. + * Gets the channel mask. * * @returns The channel mask. * @@ -151,7 +151,7 @@ protected: const Mac::ChannelMask GetChannelMask(void) const { return mChannelMask; } /** - * This method sets the channel mask. + * Sets the channel mask. * * @param[in] aChannelMask The channel mask. * @@ -159,7 +159,7 @@ protected: void SetChannelMask(Mac::ChannelMask aChannelMask); /** - * This method gets the starting channel, i.e., the first channel in a TX cycle to send MLE Announcement on. + * Gets the starting channel, i.e., the first channel in a TX cycle to send MLE Announcement on. * * @returns The current starting channel. * @@ -167,7 +167,7 @@ protected: uint8_t GetStartingChannel(void) const { return mStartingChannel; } /** - * This method sets the starting channel, i.e., the first channel in a TX cycle to send MLE Announcement on. + * Sets the starting channel, i.e., the first channel in a TX cycle to send MLE Announcement on. * * @p aStartingChannel MUST be present in the current channel mask (from `GetChannelMask()`), otherwise it is * ignored and an MLE transmission cycle starts with the first channel (with smallest channel number) in the channel @@ -179,7 +179,7 @@ protected: void SetStartingChannel(uint8_t aStartingChannel); /** - * This method is the timer handler and must be invoked by sub-class when the timer expires from the `aHandler` + * Is the timer handler and must be invoked by sub-class when the timer expires from the `aHandler` * callback function provided in the constructor. * */ @@ -200,7 +200,7 @@ private: #if OPENTHREAD_CONFIG_ANNOUNCE_SENDER_ENABLE /** - * This class implements an AnnounceSender. + * Implements an AnnounceSender. * */ class AnnounceSender : public AnnounceSenderBase @@ -209,7 +209,7 @@ class AnnounceSender : public AnnounceSenderBase public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -217,7 +217,7 @@ public: explicit AnnounceSender(Instance &aInstance); /** - * This method notifies the `AnnounceSender` that a MLE Announcement message was received with a current timestamp + * Notifies the `AnnounceSender` that a MLE Announcement message was received with a current timestamp * to update its internal state (decide whether or not to skip transmission of MLE Announcement in this cycle). * */ diff --git a/src/core/thread/anycast_locator.hpp b/src/core/thread/anycast_locator.hpp index cba969d2e..be983931f 100644 --- a/src/core/thread/anycast_locator.hpp +++ b/src/core/thread/anycast_locator.hpp @@ -47,7 +47,7 @@ namespace ot { /** - * This class implements Anycast Locator functionality which allows caller to determine the mesh local EID and RLOC16 + * Implements Anycast Locator functionality which allows caller to determine the mesh local EID and RLOC16 * of the closest destination of an anycast address (if any). * * The closest destination is determined based on the current routing table and path costs within the Thread mesh. @@ -59,13 +59,13 @@ class AnycastLocator : public InstanceLocator, private NonCopyable public: /** - * This function pointer type defines the callback to notify the outcome of a request. + * Pointer type defines the callback to notify the outcome of a request. * */ typedef otThreadAnycastLocatorCallback LocatorCallback; /** - * This constructor initializes the `AnycastLocator` object. + * Initializes the `AnycastLocator` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -73,7 +73,7 @@ public: explicit AnycastLocator(Instance &aInstance); /** - * This method requests the closest destination of a given anycast address to be located. + * Requests the closest destination of a given anycast address to be located. * * If a previous `Locate()` request is ongoing, a subsequent call to this method will cancel and replace the * earlier request. @@ -90,7 +90,7 @@ public: Error Locate(const Ip6::Address &aAnycastAddress, LocatorCallback aCallback, void *aContext); /** - * This method indicates whether an earlier request is in progress. + * Indicates whether an earlier request is in progress. * * @returns TRUE if an earlier request is in progress, FALSE otherwise. * diff --git a/src/core/thread/child_mask.hpp b/src/core/thread/child_mask.hpp index ae18b2a52..f7315c922 100644 --- a/src/core/thread/child_mask.hpp +++ b/src/core/thread/child_mask.hpp @@ -51,7 +51,7 @@ namespace ot { */ /** - * This class represents a bit-vector of child mask. + * Represents a bit-vector of child mask. * */ typedef BitVector ChildMask; diff --git a/src/core/thread/child_supervision.hpp b/src/core/thread/child_supervision.hpp index c56291f69..637e5ff88 100644 --- a/src/core/thread/child_supervision.hpp +++ b/src/core/thread/child_supervision.hpp @@ -86,7 +86,7 @@ class Child; #if OPENTHREAD_FTD /** - * This class implements a child supervisor. + * Implements a child supervisor. * */ class ChildSupervisor : public InstanceLocator, private NonCopyable @@ -96,7 +96,7 @@ class ChildSupervisor : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -104,19 +104,19 @@ public: explicit ChildSupervisor(Instance &aInstance); /** - * This method starts the child supervision process on parent. + * Starts the child supervision process on parent. * */ void Start(void); /** - * This method stops the child supervision process on parent. + * Stops the child supervision process on parent. * */ void Stop(void); /** - * This method returns the destination for a supervision message. + * Returns the destination for a supervision message. * * @param[in] aMessage The message for which to get the destination. * @@ -127,7 +127,7 @@ public: Child *GetDestination(const Message &aMessage) const; /** - * This method updates the supervision state for a child. It informs the child supervisor that a message was + * Updates the supervision state for a child. It informs the child supervisor that a message was * successfully sent to the child. * * @param[in] aChild The child to which a message was successfully sent. @@ -147,14 +147,14 @@ private: #endif // #if OPENTHREAD_FTD /** - * This class implements a child supervision listener. + * Implements a child supervision listener. * */ class SupervisionListener : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -162,19 +162,19 @@ public: explicit SupervisionListener(Instance &aInstance); /** - * This method starts the supervision listener operation. + * Starts the supervision listener operation. * */ void Start(void); /** - * This method stops the supervision listener operation. + * Stops the supervision listener operation. * */ void Stop(void); /** - * This method sets the supervision interval. + * Sets the supervision interval. * * @param[in] aInterval If non-zero, the desired supervision interval (in seconds), zero to disable supervision. * @@ -182,7 +182,7 @@ public: void SetInterval(uint16_t aInterval); /** - * This method returns the supervision interval. + * Returns the supervision interval. * * @returns The current supervision interval (seconds), or zero if supervision is disabled. * @@ -190,7 +190,7 @@ public: uint16_t GetInterval(void) const { return mInterval; } /** - * This method sets the supervision check timeout (in seconds). + * Sets the supervision check timeout (in seconds). * * If the child does not hear from its parent within the given check timeout interval, it initiates the re-attach * process (MLE Child Update Request/Response exchange with its parent). Setting the timeout to zero, disables the @@ -205,7 +205,7 @@ public: void SetTimeout(uint16_t aTimeout); /** - * This method returns the supervision check timeout interval (in seconds). + * Returns the supervision check timeout interval (in seconds). * * @returns The check timeout interval (in seconds) or zero if the supervision check on the child is disabled. * @@ -213,7 +213,7 @@ public: uint16_t GetTimeout(void) const { return mTimeout; } /** - * This method returns the value of supervision check timeout failure counter. + * Returns the value of supervision check timeout failure counter. * * The counter tracks the number of supervision check failures on the child. It is incremented when the child does * not hear from its parent within the specified check timeout interval. @@ -222,13 +222,13 @@ public: uint16_t GetCounter(void) const { return mCounter; } /** - * This method reset the supervision check timeout failure counter. + * Reset the supervision check timeout failure counter. * */ void ResetCounter(void) { mCounter = 0; } /** - * This method updates the supervision listener state. It informs the listener of a received frame. + * Updates the supervision listener state. It informs the listener of a received frame. * * @param[in] aSourceAddress The source MAC address of the received frame * @param[in] aIsSecure TRUE to indicate that the received frame is secure, FALSE otherwise. diff --git a/src/core/thread/child_table.hpp b/src/core/thread/child_table.hpp index 7df7dee34..e02313661 100644 --- a/src/core/thread/child_table.hpp +++ b/src/core/thread/child_table.hpp @@ -47,7 +47,7 @@ namespace ot { /** - * This class represents the Thread child table. + * Represents the Thread child table. * */ class ChildTable : public InstanceLocator, private NonCopyable @@ -57,7 +57,7 @@ class ChildTable : public InstanceLocator, private NonCopyable public: /** - * This class represents an iterator for iterating through the child entries in the child table. + * Represents an iterator for iterating through the child entries in the child table. * */ class Iterator : public InstanceLocator, public ItemPtrIterator @@ -67,7 +67,7 @@ public: public: /** - * This constructor initializes an `Iterator` instance. + * Initializes an `Iterator` instance. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aFilter A child state filter. @@ -76,13 +76,13 @@ public: Iterator(Instance &aInstance, Child::StateFilter aFilter); /** - * This method resets the iterator to start over. + * Resets the iterator to start over. * */ void Reset(void); /** - * This method gets the `Child` entry to which the iterator is currently pointing. + * Gets the `Child` entry to which the iterator is currently pointing. * * @returns A pointer to the `Child` entry, or `nullptr` if the iterator is done and/or empty. * @@ -102,7 +102,7 @@ public: }; /** - * This constructor initializes a `ChildTable` instance. + * Initializes a `ChildTable` instance. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -110,13 +110,13 @@ public: explicit ChildTable(Instance &aInstance); /** - * This method clears the child table. + * Clears the child table. * */ void Clear(void); /** - * This method returns the child table index for a given `Child` instance. + * Returns the child table index for a given `Child` instance. * * @param[in] aChild A reference to a `Child` * @@ -126,7 +126,7 @@ public: uint16_t GetChildIndex(const Child &aChild) const { return static_cast(&aChild - mChildren); } /** - * This method returns a pointer to a `Child` entry at a given index, or `nullptr` if the index is out of bounds, + * Returns a pointer to a `Child` entry at a given index, or `nullptr` if the index is out of bounds, * i.e., index is larger or equal to maximum number of children allowed (@sa GetMaxChildrenAllowed()). * * @param[in] aChildIndex A child index. @@ -137,7 +137,7 @@ public: Child *GetChildAtIndex(uint16_t aChildIndex); /** - * This method gets a new/unused `Child` entry from the child table. + * Gets a new/unused `Child` entry from the child table. * * @note The returned child entry will be cleared (`memset` to zero). * @@ -147,7 +147,7 @@ public: Child *GetNewChild(void); /** - * This method searches the child table for a `Child` with a given RLOC16 also matching a given state filter. + * Searches the child table for a `Child` with a given RLOC16 also matching a given state filter. * * @param[in] aRloc16 A RLOC16 address. * @param[in] aFilter A child state filter. @@ -158,7 +158,7 @@ public: Child *FindChild(uint16_t aRloc16, Child::StateFilter aFilter); /** - * This method searches the child table for a `Child` with a given extended address also matching a given state + * Searches the child table for a `Child` with a given extended address also matching a given state * filter. * * @param[in] aExtAddress A reference to an extended address. @@ -170,7 +170,7 @@ public: Child *FindChild(const Mac::ExtAddress &aExtAddress, Child::StateFilter aFilter); /** - * This method searches the child table for a `Child` with a given address also matching a given state filter. + * Searches the child table for a `Child` with a given address also matching a given state filter. * * @param[in] aMacAddress A reference to a MAC address. * @param[in] aFilter A child state filter. @@ -181,7 +181,7 @@ public: Child *FindChild(const Mac::Address &aMacAddress, Child::StateFilter aFilter); /** - * This method indicates whether the child table contains any child matching a given state filter. + * Indicates whether the child table contains any child matching a given state filter. * * @param[in] aFilter A child state filter. * @@ -191,7 +191,7 @@ public: bool HasChildren(Child::StateFilter aFilter) const; /** - * This method returns the number of children in the child table matching a given state filter. + * Returns the number of children in the child table matching a given state filter. * * @param[in] aFilter A child state filter. * @@ -201,7 +201,7 @@ public: uint16_t GetNumChildren(Child::StateFilter aFilter) const; /** - * This method returns the maximum number of children that can be supported (build-time constant). + * Returns the maximum number of children that can be supported (build-time constant). * * @note Number of children allowed (from `GetMaxChildrenAllowed()`) can be less than maximum number of supported * children. @@ -212,7 +212,7 @@ public: uint16_t GetMaxChildren(void) const { return kMaxChildren; } /** - * This method get the maximum number of children allowed. + * Get the maximum number of children allowed. * * @returns The maximum number of children allowed. * @@ -220,7 +220,7 @@ public: uint16_t GetMaxChildrenAllowed(void) const { return mMaxChildrenAllowed; } /** - * This method sets the maximum number of children allowed. + * Sets the maximum number of children allowed. * * The number of children allowed must be at least one and at most same as maximum supported children (@sa * GetMaxChildren()). It can be changed only if the child table is empty. @@ -235,10 +235,10 @@ public: Error SetMaxChildrenAllowed(uint16_t aMaxChildren); /** - * This method enables range-based `for` loop iteration over all child entries in the child table matching a given + * Enables range-based `for` loop iteration over all child entries in the child table matching a given * state filter. * - * This method should be used as follows: + * Should be used as follows: * * for (Child &child : aChildTable.Iterate(aFilter)) { ... } * @@ -250,7 +250,7 @@ public: IteratorBuilder Iterate(Child::StateFilter aFilter) { return IteratorBuilder(GetInstance(), aFilter); } /** - * This method retains diagnostic information for an attached child by Child ID or RLOC16. + * Retains diagnostic information for an attached child by Child ID or RLOC16. * * @param[in] aChildId The Child ID or RLOC16 for an attached child. * @param[out] aChildInfo A reference to a `Child::Info` to populate with the child information. @@ -259,7 +259,7 @@ public: Error GetChildInfoById(uint16_t aChildId, Child::Info &aChildInfo); /** - * This method retains diagnostic information for an attached child by the internal table index. + * Retains diagnostic information for an attached child by the internal table index. * * @param[in] aChildIndex The table index. * @param[out] aChildInfo A reference to a `Child::Info` to populate with the child information. @@ -268,13 +268,13 @@ public: Error GetChildInfoByIndex(uint16_t aChildIndex, Child::Info &aChildInfo); /** - * This method restores child table from non-volatile memory. + * Restores child table from non-volatile memory. * */ void Restore(void); /** - * This method removes a stored child information from non-volatile memory. + * Removes a stored child information from non-volatile memory. * * @param[in] aChild A reference to the child to remove from non-volatile memory. * @@ -282,7 +282,7 @@ public: void RemoveStoredChild(const Child &aChild); /** - * This method store a child information into non-volatile memory. + * Store a child information into non-volatile memory. * * @param[in] aChild A reference to the child to store. * @@ -293,7 +293,7 @@ public: Error StoreChild(const Child &aChild); /** - * This method indicates whether the child table contains any sleepy child (in states valid or restoring) with a + * Indicates whether the child table contains any sleepy child (in states valid or restoring) with a * given IPv6 address. * * @param[in] aIp6Address An IPv6 address. @@ -305,7 +305,7 @@ public: bool HasSleepyChildWithAddress(const Ip6::Address &aIp6Address) const; /** - * This method indicates whether the child table contains a given `Neighbor` instance. + * Indicates whether the child table contains a given `Neighbor` instance. * * @param[in] aNeighbor A reference to a `Neighbor`. * diff --git a/src/core/thread/csl_tx_scheduler.cpp b/src/core/thread/csl_tx_scheduler.cpp index f30f85f7a..907381d27 100644 --- a/src/core/thread/csl_tx_scheduler.cpp +++ b/src/core/thread/csl_tx_scheduler.cpp @@ -115,7 +115,7 @@ void CslTxScheduler::Clear(void) } /** - * This method always finds the most recent CSL tx among all children, + * Always finds the most recent CSL tx among all children, * and requests `Mac` to do CSL tx at specific time. It shouldn't be called * when `Mac` is already starting to do the CSL tx (indicated by `mCslTxMessage`). * diff --git a/src/core/thread/csl_tx_scheduler.hpp b/src/core/thread/csl_tx_scheduler.hpp index e0378b228..3f1bfec6e 100644 --- a/src/core/thread/csl_tx_scheduler.hpp +++ b/src/core/thread/csl_tx_scheduler.hpp @@ -55,7 +55,7 @@ namespace ot { class Child; /** - * This class implements CSL tx scheduling functionality. + * Implements CSL tx scheduling functionality. * */ class CslTxScheduler : public InstanceLocator, private NonCopyable @@ -67,7 +67,7 @@ public: static constexpr uint8_t kMaxCslTriggeredTxAttempts = OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS; /** - * This class defines all the child info required for scheduling CSL transmissions. + * Defines all the child info required for scheduling CSL transmissions. * * `Child` class publicly inherits from this class. * @@ -114,7 +114,7 @@ public: }; /** - * This class defines the callbacks used by the `CslTxScheduler`. + * Defines the callbacks used by the `CslTxScheduler`. * */ class Callbacks : public InstanceLocator @@ -125,7 +125,7 @@ public: typedef IndirectSenderBase::FrameContext FrameContext; /** - * This constructor initializes the callbacks object. + * Initializes the callbacks object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -163,7 +163,7 @@ public: Child &aChild); }; /** - * This constructor initializes the CSL tx scheduler object. + * Initializes the CSL tx scheduler object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -171,7 +171,7 @@ public: explicit CslTxScheduler(Instance &aInstance); /** - * This method updates the next CSL transmission (finds the nearest child). + * Updates the next CSL transmission (finds the nearest child). * * It would then request the `Mac` to do the CSL tx. If the last CSL tx has been fired at `Mac` but hasn't been * done yet, and it's aborted, this method would set `mCslTxChild` to `nullptr` to notify the `HandleTransmitDone` @@ -181,7 +181,7 @@ public: void Update(void); /** - * This method clears all the states inside `CslTxScheduler` and the related states in each child. + * Clears all the states inside `CslTxScheduler` and the related states in each child. * */ void Clear(void); diff --git a/src/core/thread/discover_scanner.hpp b/src/core/thread/discover_scanner.hpp index ac5ac523e..d9bdd13aa 100644 --- a/src/core/thread/discover_scanner.hpp +++ b/src/core/thread/discover_scanner.hpp @@ -54,7 +54,7 @@ class MeshForwarder; namespace Mle { /** - * This class implements MLE Discover Scan. + * Implements MLE Discover Scan. * */ class DiscoverScanner : public InstanceLocator, private NonCopyable @@ -71,13 +71,13 @@ public: static constexpr uint32_t kDefaultScanDuration = Mac::kScanDurationDefault; /** - * This type represents Discover Scan result. + * Represents Discover Scan result. * */ typedef otActiveScanResult ScanResult; /** - * This type represents the handler function pointer called with any Discover Scan result or when the scan + * Represents the handler function pointer called with any Discover Scan result or when the scan * completes. * * The handler function format is `void (*oHandler)(ScanResult *aResult, void *aContext);`. End of scan is @@ -87,7 +87,7 @@ public: typedef otHandleActiveScanResult Handler; /** - * This type represents the filter indexes, i.e., hash bit index values for the bloom filter (calculated from a + * Represents the filter indexes, i.e., hash bit index values for the bloom filter (calculated from a * Joiner ID). * * This is used when filtering is enabled during Discover Scan, i.e., received MLE Discovery Responses with steering @@ -97,7 +97,7 @@ public: typedef MeshCoP::SteeringData::HashBitIndexes FilterIndexes; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -105,7 +105,7 @@ public: explicit DiscoverScanner(Instance &aInstance); /** - * This method starts a Thread Discovery Scan. + * Starts a Thread Discovery Scan. * * @param[in] aScanChannels Channel mask listing channels to scan (if empty, use all supported channels). * @param[in] aPanId The PAN ID filter (set to Broadcast PAN to disable filter). @@ -133,7 +133,7 @@ public: void *aContext); /** - * This method indicates whether or not an MLE Thread Discovery Scan is currently in progress. + * Indicates whether or not an MLE Thread Discovery Scan is currently in progress. * * @returns true if an MLE Thread Discovery Scan is in progress, false otherwise. * @@ -141,7 +141,7 @@ public: bool IsInProgress(void) const { return (mState != kStateIdle); } /** - * This method sets Joiner Advertisement. + * Sets Joiner Advertisement. * * @param[in] aOui The Vendor OUI for Joiner Advertisement. * @param[in] aAdvData A pointer to AdvData for Joiner Advertisement. diff --git a/src/core/thread/dua_manager.hpp b/src/core/thread/dua_manager.hpp index d8df6c672..a50807779 100644 --- a/src/core/thread/dua_manager.hpp +++ b/src/core/thread/dua_manager.hpp @@ -77,7 +77,7 @@ namespace ot { */ /** - * This class implements managing DUA. + * Implements managing DUA. * */ class DuaManager : public InstanceLocator, private NonCopyable @@ -88,7 +88,7 @@ class DuaManager : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -96,7 +96,7 @@ public: explicit DuaManager(Instance &aInstance); /** - * This method notifies Domain Prefix status. + * Notifies Domain Prefix status. * * @param[in] aState The Domain Prefix state or state change. * @@ -104,7 +104,7 @@ public: void HandleDomainPrefixUpdate(BackboneRouter::Leader::DomainPrefixState aState); /** - * This method notifies Primary Backbone Router status. + * Notifies Primary Backbone Router status. * * @param[in] aState The state or state change of Primary Backbone Router. * @param[in] aConfig The Primary Backbone Router service. @@ -115,7 +115,7 @@ public: #if OPENTHREAD_CONFIG_DUA_ENABLE /** - * This method returns a reference to the Domain Unicast Address. + * Returns a reference to the Domain Unicast Address. * * @returns A reference to the Domain Unicast Address. * @@ -123,7 +123,7 @@ public: const Ip6::Address &GetDomainUnicastAddress(void) const { return mDomainUnicastAddress.GetAddress(); } /** - * This method sets the Interface Identifier manually specified for the Thread Domain Unicast Address. + * Sets the Interface Identifier manually specified for the Thread Domain Unicast Address. * * @param[in] aIid A reference to the Interface Identifier to set. * @@ -134,13 +134,13 @@ public: Error SetFixedDuaInterfaceIdentifier(const Ip6::InterfaceIdentifier &aIid); /** - * This method clears the Interface Identifier manually specified for the Thread Domain Unicast Address. + * Clears the Interface Identifier manually specified for the Thread Domain Unicast Address. * */ void ClearFixedDuaInterfaceIdentifier(void); /** - * This method indicates whether or not there is Interface Identifier manually specified for the Thread + * Indicates whether or not there is Interface Identifier manually specified for the Thread * Domain Unicast Address. * * @retval true If there is Interface Identifier manually specified. @@ -150,7 +150,7 @@ public: bool IsFixedDuaInterfaceIdentifierSet(void) { return !mFixedDuaInterfaceIdentifier.IsUnspecified(); } /** - * This method gets the Interface Identifier for the Thread Domain Unicast Address if manually specified. + * Gets the Interface Identifier for the Thread Domain Unicast Address if manually specified. * * @returns A reference to the Interface Identifier. * @@ -158,13 +158,13 @@ public: const Ip6::InterfaceIdentifier &GetFixedDuaInterfaceIdentifier(void) const { return mFixedDuaInterfaceIdentifier; } /* - * This method restores duplicate address detection information from non-volatile memory. + * Restores duplicate address detection information from non-volatile memory. * */ void Restore(void); /** - * This method notifies duplicated Domain Unicast Address. + * Notifies duplicated Domain Unicast Address. * */ void NotifyDuplicateDomainUnicastAddress(void); diff --git a/src/core/thread/energy_scan_server.hpp b/src/core/thread/energy_scan_server.hpp index ca7c7a506..99fe32e89 100644 --- a/src/core/thread/energy_scan_server.hpp +++ b/src/core/thread/energy_scan_server.hpp @@ -48,7 +48,7 @@ namespace ot { /** - * This class implements handling Energy Scan Requests. + * Implements handling Energy Scan Requests. * */ class EnergyScanServer : public InstanceLocator, private NonCopyable @@ -58,7 +58,7 @@ class EnergyScanServer : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * */ explicit EnergyScanServer(Instance &aInstance); diff --git a/src/core/thread/indirect_sender.hpp b/src/core/thread/indirect_sender.hpp index f04b54f1c..b15c942e8 100644 --- a/src/core/thread/indirect_sender.hpp +++ b/src/core/thread/indirect_sender.hpp @@ -62,7 +62,7 @@ namespace ot { class Child; /** - * This class implements indirect transmission. + * Implements indirect transmission. * */ class IndirectSender : public InstanceLocator, public IndirectSenderBase, private NonCopyable @@ -75,7 +75,7 @@ class IndirectSender : public InstanceLocator, public IndirectSenderBase, privat public: /** - * This class defines all the child info required for indirect transmission. + * Defines all the child info required for indirect transmission. * * `Child` class publicly inherits from this class. * @@ -89,7 +89,7 @@ public: public: /** - * This method returns the number of queued messages for the child. + * Returns the number of queued messages for the child. * * @returns Number of queued messages for the child. * @@ -134,7 +134,7 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -142,13 +142,13 @@ public: explicit IndirectSender(Instance &aInstance); /** - * This method enables indirect transmissions. + * Enables indirect transmissions. * */ void Start(void) { mEnabled = true; } /** - * This method disables indirect transmission. + * Disables indirect transmission. * * Any previously scheduled indirect transmission is canceled. * @@ -156,7 +156,7 @@ public: void Stop(void); /** - * This method adds a message for indirect transmission to a sleepy child. + * Adds a message for indirect transmission to a sleepy child. * * @param[in] aMessage The message to add. * @param[in] aChild The (sleepy) child for indirect transmission. @@ -165,7 +165,7 @@ public: void AddMessageForSleepyChild(Message &aMessage, Child &aChild); /** - * This method removes a message for indirect transmission to a sleepy child. + * Removes a message for indirect transmission to a sleepy child. * * @param[in] aMessage The message to update. * @param[in] aChild The (sleepy) child for indirect transmission. @@ -177,7 +177,7 @@ public: Error RemoveMessageFromSleepyChild(Message &aMessage, Child &aChild); /** - * This method removes all added messages for a specific child and frees message (with no indirect/direct tx). + * Removes all added messages for a specific child and frees message (with no indirect/direct tx). * * @param[in] aChild A reference to a child whose messages shall be removed. * @@ -185,7 +185,7 @@ public: void ClearAllMessagesForSleepyChild(Child &aChild); /** - * This method sets whether to use the extended or short address for a child. + * Sets whether to use the extended or short address for a child. * * @param[in] aChild A reference to the child. * @param[in] aUseShortAddress `true` to use short address, `false` to use extended address. @@ -194,7 +194,7 @@ public: void SetChildUseShortAddress(Child &aChild, bool aUseShortAddress); /** - * This method handles a child mode change and updates any queued messages for the child accordingly. + * Handles a child mode change and updates any queued messages for the child accordingly. * * @param[in] aChild The child whose device mode was changed. * @param[in] aOldMode The old device mode of the child. diff --git a/src/core/thread/indirect_sender_frame_context.hpp b/src/core/thread/indirect_sender_frame_context.hpp index 9e14348b3..b1d9c2ac9 100644 --- a/src/core/thread/indirect_sender_frame_context.hpp +++ b/src/core/thread/indirect_sender_frame_context.hpp @@ -50,7 +50,7 @@ namespace ot { */ /** - * This class defines the `FrameContext` type. + * Defines the `FrameContext` type. * * This is the base class for `IndirectSender`. * @@ -59,9 +59,9 @@ class IndirectSenderBase { public: /** - * This type defines the frame context used by `IndirectSender`. + * Defines the frame context used by `IndirectSender`. * - * This type specifies all the info that `IndirectSender` requires to be saved along with a prepared frame for + * Specifies all the info that `IndirectSender` requires to be saved along with a prepared frame for * indirect transmission. `IndirectSender` is designed to contain the common code for handling of indirect * transmission to sleepy children and be able to interface to different lower-layer implementation of * `DataPollHandler`. While the `FrameContext` is defined by the `IndirectSender` itself, the lower-layer diff --git a/src/core/thread/key_manager.hpp b/src/core/thread/key_manager.hpp index 7428301c9..1fa8e320a 100644 --- a/src/core/thread/key_manager.hpp +++ b/src/core/thread/key_manager.hpp @@ -65,7 +65,7 @@ namespace ot { */ /** - * This class represents Security Policy Rotation and Flags. + * Represents Security Policy Rotation and Flags. * */ class SecurityPolicy : public otSecurityPolicy, public Equatable @@ -81,20 +81,20 @@ public: static constexpr uint16_t kDefaultKeyRotationTime = 672; ///< Default Key Rotation Time (in unit of hours). /** - * This constructor initializes the object with default Key Rotation Time + * Initializes the object with default Key Rotation Time * and Security Policy Flags. * */ SecurityPolicy(void) { SetToDefault(); } /** - * This method sets the Security Policy to default values. + * Sets the Security Policy to default values. * */ void SetToDefault(void); /** - * This method sets the Security Policy Flags. + * Sets the Security Policy Flags. * * @param[in] aFlags The Security Policy Flags. * @param[in] aFlagsLength The length of the Security Policy Flags, 1 byte for @@ -104,7 +104,7 @@ public: void SetFlags(const uint8_t *aFlags, uint8_t aFlagsLength); /** - * This method returns the Security Policy Flags. + * Returns the Security Policy Flags. * * @param[out] aFlags A pointer to the Security Policy Flags buffer. * @param[in] aFlagsLength The length of the Security Policy Flags buffer. @@ -131,7 +131,7 @@ private: }; /** - * This class represents a Thread Network Key. + * Represents a Thread Network Key. * */ OT_TOOL_PACKED_BEGIN @@ -142,7 +142,7 @@ public: #if !OPENTHREAD_RADIO /** - * This method generates a cryptographically secure random sequence to populate the Thread Network Key. + * Generates a cryptographically secure random sequence to populate the Thread Network Key. * * @retval kErrorNone Successfully generated a random Thread Network Key. * @retval kErrorFailed Failed to generate random sequence. @@ -162,7 +162,7 @@ typedef otNetworkKeyRef NetworkKeyRef; #endif /** - * This class represents a Thread Pre-Shared Key for the Commissioner (PSKc). + * Represents a Thread Pre-Shared Key for the Commissioner (PSKc). * */ OT_TOOL_PACKED_BEGIN @@ -173,7 +173,7 @@ public: #if !OPENTHREAD_RADIO /** - * This method generates a cryptographically secure random sequence to populate the Thread PSKc. + * Generates a cryptographically secure random sequence to populate the Thread PSKc. * * @retval kErrorNone Successfully generated a random Thread PSKc. * @@ -192,27 +192,27 @@ typedef otPskcRef PskcRef; /** * - * This class represents a Key Encryption Key (KEK). + * Represents a Key Encryption Key (KEK). * */ typedef Mac::Key Kek; /** * - * This class represents a Key Material for Key Encryption Key (KEK). + * Represents a Key Material for Key Encryption Key (KEK). * */ typedef Mac::KeyMaterial KekKeyMaterial; /** - * This class defines Thread Key Manager. + * Defines Thread Key Manager. * */ class KeyManager : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -220,19 +220,19 @@ public: explicit KeyManager(Instance &aInstance); /** - * This method starts KeyManager rotation timer and sets guard timer to initial value. + * Starts KeyManager rotation timer and sets guard timer to initial value. * */ void Start(void); /** - * This method stops KeyManager timers. + * Stops KeyManager timers. * */ void Stop(void); /** - * This method gets the Thread Network Key. + * Gets the Thread Network Key. * * @param[out] aNetworkKey A reference to a `NetworkKey` to output the Thread Network Key. * @@ -240,7 +240,7 @@ public: void GetNetworkKey(NetworkKey &aNetworkKey) const; /** - * This method sets the Thread Network Key. + * Sets the Thread Network Key. * * @param[in] aNetworkKey A Thread Network Key. * @@ -249,7 +249,7 @@ public: #if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This method returns a Key Ref to Thread Network Key. + * Returns a Key Ref to Thread Network Key. * * @returns A key reference to the Thread Network Key. * @@ -257,7 +257,7 @@ public: NetworkKeyRef GetNetworkKeyRef(void) const { return mNetworkKeyRef; } /** - * This method sets the Thread Network Key using Key Reference. + * Sets the Thread Network Key using Key Reference. * * @param[in] aKeyRef Reference to Thread Network Key. * @@ -266,7 +266,7 @@ public: #endif /** - * This method indicates whether the PSKc is configured. + * Indicates whether the PSKc is configured. * * A value of all zeros indicates that the PSKc is not configured. * @@ -277,7 +277,7 @@ public: bool IsPskcSet(void) const { return mIsPskcSet; } /** - * This method gets the PKSc. + * Gets the PKSc. * * @param[out] aPskc A reference to a `Pskc` to return the PSKc. * @@ -285,7 +285,7 @@ public: void GetPskc(Pskc &aPskc) const; /** - * This method sets the PSKc. + * Sets the PSKc. * * @param[in] aPskc A reference to the PSKc. * @@ -294,7 +294,7 @@ public: #if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This method returns a Key Ref to PSKc. + * Returns a Key Ref to PSKc. * * @returns A key reference to the PSKc. * @@ -302,7 +302,7 @@ public: const PskcRef &GetPskcRef(void) const { return mPskcRef; } /** - * This method sets the PSKc as a Key reference. + * Sets the PSKc as a Key reference. * * @param[in] aPskc A reference to the PSKc. * @@ -311,7 +311,7 @@ public: #endif /** - * This method returns the current key sequence value. + * Returns the current key sequence value. * * @returns The current key sequence value. * @@ -319,7 +319,7 @@ public: uint32_t GetCurrentKeySequence(void) const { return mKeySequence; } /** - * This method sets the current key sequence value. + * Sets the current key sequence value. * * @param[in] aKeySequence The key sequence value. * @@ -328,7 +328,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This method returns the current MAC key for TREL radio link. + * Returns the current MAC key for TREL radio link. * * @returns The current TREL MAC key. * @@ -336,7 +336,7 @@ public: const Mac::KeyMaterial &GetCurrentTrelMacKey(void) const { return mTrelKey; } /** - * This method returns a temporary MAC key for TREL radio link computed from the given key sequence. + * Returns a temporary MAC key for TREL radio link computed from the given key sequence. * * @param[in] aKeySequence The key sequence value. * @@ -347,7 +347,7 @@ public: #endif /** - * This method returns the current MLE key Material. + * Returns the current MLE key Material. * * @returns The current MLE key. * @@ -355,7 +355,7 @@ public: const Mle::KeyMaterial &GetCurrentMleKey(void) const { return mMleKey; } /** - * This method returns a temporary MLE key Material computed from the given key sequence. + * Returns a temporary MLE key Material computed from the given key sequence. * * @param[in] aKeySequence The key sequence value. * @@ -366,7 +366,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_IEEE_802_15_4_ENABLE /** - * This method returns the current MAC Frame Counter value for 15.4 radio link. + * Returns the current MAC Frame Counter value for 15.4 radio link. * * @returns The current MAC Frame Counter value. * @@ -376,7 +376,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This method returns the current MAC Frame Counter value for TREL radio link. + * Returns the current MAC Frame Counter value for TREL radio link. * * @returns The current MAC Frame Counter value for TREL radio link. * @@ -384,14 +384,14 @@ public: uint32_t GetTrelMacFrameCounter(void) const { return mMacFrameCounters.GetTrel(); } /** - * This method increments the current MAC Frame Counter value for TREL radio link. + * Increments the current MAC Frame Counter value for TREL radio link. * */ void IncrementTrelMacFrameCounter(void); #endif /** - * This method gets the maximum MAC Frame Counter among all supported radio links. + * Gets the maximum MAC Frame Counter among all supported radio links. * * @return The maximum MAC frame Counter among all supported radio links. * @@ -399,7 +399,7 @@ public: uint32_t GetMaximumMacFrameCounter(void) const { return mMacFrameCounters.GetMaximum(); } /** - * This method sets the current MAC Frame Counter value for all radio links. + * Sets the current MAC Frame Counter value for all radio links. * * @param[in] aFrameCounter The MAC Frame Counter value. * @param[in] aSetIfLarger If `true`, set only if the new value @p aFrameCounter is larger than current value. @@ -409,7 +409,7 @@ public: void SetAllMacFrameCounters(uint32_t aFrameCounter, bool aSetIfLarger); /** - * This method sets the MAC Frame Counter value which is stored in non-volatile memory. + * Sets the MAC Frame Counter value which is stored in non-volatile memory. * * @param[in] aStoredMacFrameCounter The stored MAC Frame Counter value. * @@ -417,7 +417,7 @@ public: void SetStoredMacFrameCounter(uint32_t aStoredMacFrameCounter) { mStoredMacFrameCounter = aStoredMacFrameCounter; } /** - * This method returns the current MLE Frame Counter value. + * Returns the current MLE Frame Counter value. * * @returns The current MLE Frame Counter value. * @@ -425,7 +425,7 @@ public: uint32_t GetMleFrameCounter(void) const { return mMleFrameCounter; } /** - * This method sets the current MLE Frame Counter value. + * Sets the current MLE Frame Counter value. * * @param[in] aMleFrameCounter The MLE Frame Counter value. * @@ -433,7 +433,7 @@ public: void SetMleFrameCounter(uint32_t aMleFrameCounter) { mMleFrameCounter = aMleFrameCounter; } /** - * This method sets the MLE Frame Counter value which is stored in non-volatile memory. + * Sets the MLE Frame Counter value which is stored in non-volatile memory. * * @param[in] aStoredMleFrameCounter The stored MLE Frame Counter value. * @@ -441,13 +441,13 @@ public: void SetStoredMleFrameCounter(uint32_t aStoredMleFrameCounter) { mStoredMleFrameCounter = aStoredMleFrameCounter; } /** - * This method increments the current MLE Frame Counter value. + * Increments the current MLE Frame Counter value. * */ void IncrementMleFrameCounter(void); /** - * This method returns the KEK as `KekKeyMaterial` + * Returns the KEK as `KekKeyMaterial` * * @returns The KEK as `KekKeyMaterial`. * @@ -455,7 +455,7 @@ public: const KekKeyMaterial &GetKek(void) const { return mKek; } /** - * This method retrieves the KEK as literal `Kek` key. + * Retrieves the KEK as literal `Kek` key. * * @param[out] aKek A reference to a `Kek` to output the retrieved KEK. * @@ -463,7 +463,7 @@ public: void ExtractKek(Kek &aKek) { mKek.ExtractKey(aKek); } /** - * This method sets the KEK. + * Sets the KEK. * * @param[in] aKek A KEK. * @@ -471,7 +471,7 @@ public: void SetKek(const Kek &aKek); /** - * This method sets the KEK. + * Sets the KEK. * * @param[in] aKekBytes A pointer to the KEK bytes. * @@ -479,7 +479,7 @@ public: void SetKek(const uint8_t *aKekBytes) { SetKek(*reinterpret_cast(aKekBytes)); } /** - * This method returns the current KEK Frame Counter value. + * Returns the current KEK Frame Counter value. * * @returns The current KEK Frame Counter value. * @@ -487,13 +487,13 @@ public: uint32_t GetKekFrameCounter(void) const { return mKekFrameCounter; } /** - * This method increments the current KEK Frame Counter value. + * Increments the current KEK Frame Counter value. * */ void IncrementKekFrameCounter(void) { mKekFrameCounter++; } /** - * This method returns the KeySwitchGuardTime. + * Returns the KeySwitchGuardTime. * * The KeySwitchGuardTime is the time interval during which key rotation procedure is prevented. * @@ -503,7 +503,7 @@ public: uint32_t GetKeySwitchGuardTime(void) const { return mKeySwitchGuardTime; } /** - * This method sets the KeySwitchGuardTime. + * Sets the KeySwitchGuardTime. * * The KeySwitchGuardTime is the time interval during which key rotation procedure is prevented. * @@ -513,7 +513,7 @@ public: void SetKeySwitchGuardTime(uint32_t aKeySwitchGuardTime) { mKeySwitchGuardTime = aKeySwitchGuardTime; } /** - * This method returns the Security Policy. + * Returns the Security Policy. * * The Security Policy specifies Key Rotation Time and network administrator preferences * for which security-related operations are allowed or disallowed. @@ -524,7 +524,7 @@ public: const SecurityPolicy &GetSecurityPolicy(void) const { return mSecurityPolicy; } /** - * This method sets the Security Policy. + * Sets the Security Policy. * * The Security Policy specifies Key Rotation Time and network administrator preferences * for which security-related operations are allowed or disallowed. @@ -535,13 +535,13 @@ public: void SetSecurityPolicy(const SecurityPolicy &aSecurityPolicy); /** - * This method updates the MAC keys and MLE key. + * Updates the MAC keys and MLE key. * */ void UpdateKeyMaterial(void); /** - * This method handles MAC frame counter changes (callback from `SubMac` for 15.4 security frame change). + * Handles MAC frame counter changes (callback from `SubMac` for 15.4 security frame change). * * This is called to indicate the @p aMacFrameCounter value is now used. * @@ -552,13 +552,13 @@ public: #if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE /** - * This method destroys all the volatile mac keys stored in PSA ITS. + * Destroys all the volatile mac keys stored in PSA ITS. * */ void DestroyTemporaryKeys(void); /** - * This method destroys all the persistent keys stored in PSA ITS. + * Destroys all the persistent keys stored in PSA ITS. * */ void DestroyPersistentKeys(void); diff --git a/src/core/thread/link_metrics.hpp b/src/core/thread/link_metrics.hpp index 0dcdd991f..36b64820e 100644 --- a/src/core/thread/link_metrics.hpp +++ b/src/core/thread/link_metrics.hpp @@ -74,7 +74,7 @@ namespace LinkMetrics { #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE /** - * This class implements the Thread Link Metrics Initiator. + * Implements the Thread Link Metrics Initiator. * * The Initiator makes queries, configures Link Metrics probing at the Subject and generates reports of the results. * @@ -88,7 +88,7 @@ public: typedef otLinkMetricsEnhAckProbingIeReportCallback EnhAckProbingIeReportCallback; /** - * This structure provides the info used for appending MLE Link Metric Query TLV. + * Provides the info used for appending MLE Link Metric Query TLV. * */ struct QueryInfo : public Clearable @@ -99,7 +99,7 @@ public: }; /** - * This constructor initializes an instance of the Initiator class. + * Initializes an instance of the Initiator class. * * @param[in] aInstance A reference to the OpenThread interface. * @@ -107,7 +107,7 @@ public: explicit Initiator(Instance &aInstance); /** - * This method sends an MLE Data Request containing Link Metrics Query TLV to query Link Metrics data. + * Sends an MLE Data Request containing Link Metrics Query TLV to query Link Metrics data. * * It could be either a Single Probe or a Forward Tracking Series. * @@ -124,7 +124,7 @@ public: Error Query(const Ip6::Address &aDestination, uint8_t aSeriesId, const Metrics *aMetrics); /** - * This method appends MLE Link Metrics Query TLV to a given message. + * Appends MLE Link Metrics Query TLV to a given message. * * @param[in] aMessage The message to append to. * @param[in] aInfo The link metrics query info to use to prepare the message. @@ -136,7 +136,7 @@ public: Error AppendLinkMetricsQueryTlv(Message &aMessage, const QueryInfo &aInfo); /** - * This method registers a callback to handle Link Metrics report received. + * Registers a callback to handle Link Metrics report received. * * @param[in] aCallback A pointer to a function that is called when a Link Metrics report is received. * @param[in] aContext A pointer to application-specific context. @@ -145,7 +145,7 @@ public: void SetReportCallback(ReportCallback aCallback, void *aContext) { mReportCallback.Set(aCallback, aContext); } /** - * This method handles the received Link Metrics report contained in @p aMessage. + * Handles the received Link Metrics report contained in @p aMessage. * * @param[in] aMessage A reference to the message. * @param[in] aOffset The offset in bytes where the metrics report sub-TLVs start. @@ -156,7 +156,7 @@ public: void HandleReport(const Message &aMessage, uint16_t aOffset, uint16_t aLength, const Ip6::Address &aAddress); /** - * This method sends an MLE Link Metrics Management Request to configure/clear a Forward Tracking Series. + * Sends an MLE Link Metrics Management Request to configure/clear a Forward Tracking Series. * * @param[in] aDestination A reference to the IPv6 address of the destination. * @param[in] aSeriesId The Series ID. @@ -175,7 +175,7 @@ public: const Metrics *aMetrics); /** - * This method registers a callback to handle Link Metrics Management Response received. + * Registers a callback to handle Link Metrics Management Response received. * * @param[in] aCallback A pointer to a function that is called when a Link Metrics Management Response is received. * @param[in] aContext A pointer to application-specific context. @@ -187,7 +187,7 @@ public: } /** - * This method sends an MLE Link Metrics Management Request to configure/clear a Enhanced-ACK Based Probing. + * Sends an MLE Link Metrics Management Request to configure/clear a Enhanced-ACK Based Probing. * * @param[in] aDestination A reference to the IPv6 address of the destination. * @param[in] aEnhAckFlags Enh-ACK Flags to indicate whether to register or clear the probing. `0` to clear @@ -206,7 +206,7 @@ public: const Metrics *aMetrics); /** - * This method registers a callback to handle Link Metrics when Enh-ACK Probing IE is received. + * Registers a callback to handle Link Metrics when Enh-ACK Probing IE is received. * * @param[in] aCallback A pointer to a function that is called when Enh-ACK Probing IE is received is received. * @param[in] aContext A pointer to application-specific context. @@ -218,7 +218,7 @@ public: } /** - * This method handles the received Link Metrics Management Response contained in @p aMessage. + * Handles the received Link Metrics Management Response contained in @p aMessage. * * @param[in] aMessage A reference to the message that contains the Link Metrics Management Response. * @param[in] aAddress A reference to the source address of the message. @@ -230,7 +230,7 @@ public: Error HandleManagementResponse(const Message &aMessage, const Ip6::Address &aAddress); /** - * This method sends an MLE Link Probe message. + * Sends an MLE Link Probe message. * * @param[in] aDestination A reference to the IPv6 address of the destination. * @param[in] aSeriesId The Series ID which the Probe message targets at. @@ -245,7 +245,7 @@ public: Error SendLinkProbe(const Ip6::Address &aDestination, uint8_t aSeriesId, uint8_t aLength); /** - * This method processes received Enh-ACK Probing IE data. + * Processes received Enh-ACK Probing IE data. * * @param[in] aData A pointer to buffer containing the Enh-ACK Probing IE data. * @param[in] aLength The length of @p aData. @@ -269,7 +269,7 @@ private: #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This class implements the Thread Link Metrics Subject. + * Implements the Thread Link Metrics Subject. * * The Subject reponds queries with reports, handles Link Metrics Management Requests and Link Probe Messages. * @@ -280,7 +280,7 @@ public: typedef otLinkMetricsEnhAckProbingIeReportCallback EnhAckProbingIeReportCallback; /** - * This constructor initializes an instance of the Subject class. + * Initializes an instance of the Subject class. * * @param[in] aInstance A reference to the OpenThread interface. * @@ -288,7 +288,7 @@ public: explicit Subject(Instance &aInstance); /** - * This method appends a Link Metrics Report to a message according to the Link Metrics query. + * Appends a Link Metrics Report to a message according to the Link Metrics query. * * @param[out] aMessage A reference to the message to append report. * @param[in] aRequestMessage A reference to the message of the Data Request. @@ -302,7 +302,7 @@ public: Error AppendReport(Message &aMessage, const Message &aRequestMessage, Neighbor &aNeighbor); /** - * This method handles the received Link Metrics Management Request contained in @p aMessage and return a status. + * Handles the received Link Metrics Management Request contained in @p aMessage and return a status. * * @param[in] aMessage A reference to the message that contains the Link Metrics Management Request. * @param[in] aNeighbor A reference to the neighbor who sends the request. @@ -315,7 +315,7 @@ public: Error HandleManagementRequest(const Message &aMessage, Neighbor &aNeighbor, Status &aStatus); /** - * This method handles the Link Probe contained in @p aMessage. + * Handles the Link Probe contained in @p aMessage. * * @param[in] aMessage A reference to the message that contains the Link Probe Message. * @param[out] aSeriesId A reference to Series ID that parsed from the message. @@ -327,7 +327,7 @@ public: Error HandleLinkProbe(const Message &aMessage, uint8_t &aSeriesId); /** - * This method frees a SeriesInfo entry that was allocated from the Subject object. + * Frees a SeriesInfo entry that was allocated from the Subject object. * * @param[in] aSeries A reference to the SeriesInfo to free. * diff --git a/src/core/thread/link_metrics_tlvs.hpp b/src/core/thread/link_metrics_tlvs.hpp index ccf4af1ac..46464c9b3 100644 --- a/src/core/thread/link_metrics_tlvs.hpp +++ b/src/core/thread/link_metrics_tlvs.hpp @@ -53,7 +53,7 @@ namespace LinkMetrics { using ot::Encoding::BigEndian::HostSwap32; /** - * This class defines constants related to Link Metrics Sub-TLVs. + * Defines constants related to Link Metrics Sub-TLVs. * */ class SubTlv @@ -75,19 +75,19 @@ public: }; /** - * This class defines Link Metrics Query ID Sub-TLV constants and types. + * Defines Link Metrics Query ID Sub-TLV constants and types. * */ typedef UintTlvInfo QueryIdSubTlv; /** - * This type defines a Link Metrics Status Sub-Tlv. + * Defines a Link Metrics Status Sub-Tlv. * */ typedef UintTlvInfo StatusSubTlv; /** - * This class implements Link Metrics Report Sub-TLV generation and parsing. + * Implements Link Metrics Report Sub-TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -97,13 +97,13 @@ public: static constexpr uint8_t kMinLength = 2; ///< Minimum expected TLV length (type ID and u8 value). /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) { SetType(SubTlv::kReport); } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval true The TLV appears to be well-formed. * @retval false The TLV does not appear to be well-formed. @@ -112,7 +112,7 @@ public: bool IsValid(void) const { return GetLength() >= kMinLength; } /** - * This method returns the Link Metrics Type ID. + * Returns the Link Metrics Type ID. * * @returns The Link Metrics Type ID. * @@ -120,7 +120,7 @@ public: uint8_t GetMetricsTypeId(void) const { return mMetricsTypeId; } /** - * This method sets the Link Metrics Type ID. + * Sets the Link Metrics Type ID. * * @param[in] aMetricsTypeId The Link Metrics Type ID to set. * @@ -128,7 +128,7 @@ public: void SetMetricsTypeId(uint8_t aMetricsTypeId) { mMetricsTypeId = aMetricsTypeId; } /** - * This method returns the metric value in 8 bits. + * Returns the metric value in 8 bits. * * @returns The metric value. * @@ -136,7 +136,7 @@ public: uint8_t GetMetricsValue8(void) const { return mMetricsValue.m8; } /** - * This method returns the metric value in 32 bits. + * Returns the metric value in 32 bits. * * @returns The metric value. * @@ -144,7 +144,7 @@ public: uint32_t GetMetricsValue32(void) const { return HostSwap32(mMetricsValue.m32); } /** - * This method sets the metric value (8 bits). + * Sets the metric value (8 bits). * * @param[in] aMetricsValue Metrics value. * @@ -156,7 +156,7 @@ public: } /** - * This method sets the metric value (32 bits). + * Sets the metric value (32 bits). * * @param[in] aMetricsValue Metrics value. * @@ -177,7 +177,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Link Metrics Query Options Sub-TLV generation and parsing. + * Implements Link Metrics Query Options Sub-TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -185,7 +185,7 @@ class QueryOptionsSubTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -195,7 +195,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -206,7 +206,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class defines Link Metrics Forward Probing Registration Sub-TLV. + * Defines Link Metrics Forward Probing Registration Sub-TLV. * */ OT_TOOL_PACKED_BEGIN @@ -216,7 +216,7 @@ public: static constexpr uint8_t kMinLength = sizeof(uint8_t) + sizeof(uint8_t); ///< Minimum expected TLV length /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -226,7 +226,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval true The TLV appears to be well-formed. * @retval false The TLV does not appear to be well-formed. @@ -235,7 +235,7 @@ public: bool IsValid(void) const { return GetLength() >= kMinLength; } /** - * This method gets the Forward Series ID value. + * Gets the Forward Series ID value. * * @returns The Forward Series ID. * @@ -243,7 +243,7 @@ public: uint8_t GetSeriesId(void) const { return mSeriesId; } /** - * This method sets the Forward Series ID value. + * Sets the Forward Series ID value. * * @param[in] aSeriesId The Forward Series ID. * @@ -251,7 +251,7 @@ public: void SetSeriesId(uint8_t aSeriesId) { mSeriesId = aSeriesId; } /** - * This method gets the Forward Series Flags bit-mask. + * Gets the Forward Series Flags bit-mask. * * @returns The Forward Series Flags mask. * @@ -259,7 +259,7 @@ public: uint8_t GetSeriesFlagsMask(void) const { return mSeriesFlagsMask; } /** - * This method sets the Forward Series Flags bit-mask + * Sets the Forward Series Flags bit-mask * * @param[in] aSeriesFlagsMask The Forward Series Flags. * @@ -267,7 +267,7 @@ public: void SetSeriesFlagsMask(uint8_t aSeriesFlagsMask) { mSeriesFlagsMask = aSeriesFlagsMask; } /** - * This method gets the start of Type ID array. + * Gets the start of Type ID array. * * @returns The start of Type ID array. Array has `kMaxTypeIds` max length. * @@ -287,7 +287,7 @@ public: static constexpr uint8_t kMinLength = sizeof(uint8_t); ///< Minimum TLV length (only `EnhAckFlags`). /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -297,7 +297,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval true The TLV appears to be well-formed. * @retval false The TLV does not appear to be well-formed. @@ -306,7 +306,7 @@ public: bool IsValid(void) const { return GetLength() >= kMinLength; } /** - * This method gets the Enhanced ACK Flags. + * Gets the Enhanced ACK Flags. * * @returns The Enhanced ACK Flags. * @@ -314,7 +314,7 @@ public: uint8_t GetEnhAckFlags(void) const { return mEnhAckFlags; } /** - * This method sets Enhanced ACK Flags. + * Sets Enhanced ACK Flags. * * @param[in] aEnhAckFlags The value of Enhanced ACK Flags. * @@ -322,7 +322,7 @@ public: void SetEnhAckFlags(EnhAckFlags aEnhAckFlags) { mEnhAckFlags = aEnhAckFlags; } /** - * This method gets the start of Type ID array. + * Gets the start of Type ID array. * * @returns The start of Type ID array. Array has `kMaxTypeIds` max length. * diff --git a/src/core/thread/link_metrics_types.hpp b/src/core/thread/link_metrics_types.hpp index eb10b2c0b..b7883b705 100644 --- a/src/core/thread/link_metrics_types.hpp +++ b/src/core/thread/link_metrics_types.hpp @@ -52,7 +52,7 @@ namespace LinkMetrics { constexpr uint8_t kMaxTypeIds = 4; ///< Maximum number of Type IDs in a `Metrics`. /** - * This type represents Link Metric Flags indicating a set of metrics. + * Represents Link Metric Flags indicating a set of metrics. * * @sa otLinkMetrics * @@ -61,7 +61,7 @@ class Metrics : public otLinkMetrics, public Clearable { public: /** - * This method converts the `Metrics` into an array of Type IDs. + * Converts the `Metrics` into an array of Type IDs. * * @param[out] aTypeIds The array of Type IDs to populate. MUST have at least `kMaxTypeIds` elements. * @@ -72,7 +72,7 @@ public: }; /** - * This type represents the results (values) for a set of metrics. + * Represents the results (values) for a set of metrics. * * @sa otLinkMetricsValues * @@ -81,7 +81,7 @@ class MetricsValues : public otLinkMetricsValues, public Clearable(mMetrics); } /** - * This method gets the metrics flags. + * Gets the metrics flags. * * @returns The metrics flags. * @@ -97,7 +97,7 @@ public: const Metrics &GetMetrics(void) const { return static_cast(mMetrics); } /** - * This method set the metrics flags. + * Set the metrics flags. * * @param[in] aMetrics The metrics flags to set from. * @@ -137,7 +137,7 @@ public: static constexpr uint8_t kRssi = (kMetricRssi | kTypeAve); ///< Type ID for RSSI. /** - * This static method indicates whether or not a given Type ID is extended. + * Indicates whether or not a given Type ID is extended. * * Extended Type IDs are reserved for future use. When set an additional second byte follows the current ID flags. * @@ -150,7 +150,7 @@ public: static bool IsExtended(uint8_t aTypeId) { return (aTypeId & kExtendedFlag); } /** - * This static method determines the value length (number of bytes) associated with a given Type ID. + * Determines the value length (number of bytes) associated with a given Type ID. * * Type IDs can either have a short value as a `uint8_t` (e.g., `kLqi`, `kLinkMargin` or `kRssi`) or a long value as * a `uint32_t` (`kPdu`). @@ -166,7 +166,7 @@ public: } /** - * This static method updates a Type ID to mark it as reversed. + * Updates a Type ID to mark it as reversed. * * This is used for testing only. * @@ -179,14 +179,14 @@ public: }; /** - * This class represents the Series Flags for Forward Tracking Series. + * Represents the Series Flags for Forward Tracking Series. * */ class SeriesFlags : public otLinkMetricsSeriesFlags { public: /** - * This method converts the `SeriesFlags` to `uint8_t` bit-mask (for inclusion in TLVs). + * Converts the `SeriesFlags` to `uint8_t` bit-mask (for inclusion in TLVs). * * @returns The bit-mask representation. * @@ -194,7 +194,7 @@ public: uint8_t ConvertToMask(void) const; /** - * This method sets the `SeriesFlags` from a given bit-mask value. + * Sets the `SeriesFlags` from a given bit-mask value. * * @param[in] aFlagsMask The bit-mask flags. * @@ -202,7 +202,7 @@ public: void SetFrom(uint8_t aFlagsMask); /** - * This method indicates whether or not the Link Probe flag is set. + * Indicates whether or not the Link Probe flag is set. * * @retval true The Link Probe flag is set. * @retval false The Link Probe flag is not set. @@ -211,7 +211,7 @@ public: bool IsLinkProbeFlagSet(void) const { return mLinkProbe; } /** - * This method indicates whether or not the MAC Data flag is set. + * Indicates whether or not the MAC Data flag is set. * * @retval true The MAC Data flag is set. * @retval false The MAC Data flag is not set. @@ -220,7 +220,7 @@ public: bool IsMacDataFlagSet(void) const { return mMacData; } /** - * This method indicates whether or not the MAC Data Request flag is set. + * Indicates whether or not the MAC Data Request flag is set. * * @retval true The MAC Data Request flag is set. * @retval false The MAC Data Request flag is not set. @@ -229,7 +229,7 @@ public: bool IsMacDataRequestFlagSet(void) const { return mMacDataRequest; } /** - * This method indicates whether or not the Mac Ack flag is set. + * Indicates whether or not the Mac Ack flag is set. * * @retval true The Mac Ack flag is set. * @retval false The Mac Ack flag is not set. @@ -245,7 +245,7 @@ private: }; /** - * This enumeration type represent Enhanced-ACK Flags. + * Type represent Enhanced-ACK Flags. * */ enum EnhAckFlags : uint8_t @@ -255,13 +255,13 @@ enum EnhAckFlags : uint8_t }; /** - * This class represents one Series that is being tracked by the Subject. + * Represents one Series that is being tracked by the Subject. * * When an Initiator successfully configured a Forward Tracking Series, the Subject would use an instance of this class * to track the information of the Series. The Subject has a `Pool` of `SeriesInfo`. It would allocate one when a new * Series comes, and free it when a Series finishes. * - * This class inherits `LinkedListEntry` and each `Neighbor` has a list of `SeriesInfo` so that the Subject could track + * Inherits `LinkedListEntry` and each `Neighbor` has a list of `SeriesInfo` so that the Subject could track * per Series initiated by neighbors as long as it has available resources. * */ @@ -280,7 +280,7 @@ public: static constexpr uint8_t kSeriesTypeLinkProbe = 0; /** - * This method initializes the SeriesInfo object. + * Initializes the SeriesInfo object. * * @param[in] aSeriesId The Series ID. * @param[in] aSeriesFlagsMask The Series Flags bitmask which specify what types of frames are to be accounted. @@ -290,7 +290,7 @@ public: void Init(uint8_t aSeriesId, uint8_t aSeriesFlagsMask, const Metrics &aMetrics); /** - * This method gets the Series ID. + * Gets the Series ID. * * @returns The Series ID. * @@ -298,7 +298,7 @@ public: uint8_t GetSeriesId(void) const { return mSeriesId; } /** - * This method gets the PDU count. + * Gets the PDU count. * * @returns The PDU count. * @@ -306,7 +306,7 @@ public: uint32_t GetPduCount(void) const { return mPduCount; } /** - * This method gets the average LQI. + * Gets the average LQI. * * @returns The average LQI. * @@ -314,7 +314,7 @@ public: uint8_t GetAverageLqi(void) const { return mLqiAverager.GetAverage(); } /** - * This method gets the average RSS. + * Gets the average RSS. * * @returns The average RSS. * @@ -322,7 +322,7 @@ public: int8_t GetAverageRss(void) const { return mRssAverager.GetAverage(); } /** - * This method aggregates the Link Metrics data of a frame into this series. + * Aggregates the Link Metrics data of a frame into this series. * * @param[in] aFrameType The type of the frame. * @param[in] aLqi The LQI value. @@ -332,7 +332,7 @@ public: void AggregateLinkMetrics(uint8_t aFrameType, uint8_t aLqi, int8_t aRss); /** - * This methods gets the metrics. + * Gets the metrics. * * @returns The metrics associated with `SeriesInfo`. * @@ -353,7 +353,7 @@ private: }; /** - * This enumeration type represents Link Metrics Status. + * Type represents Link Metrics Status. * */ enum Status : uint8_t diff --git a/src/core/thread/link_quality.hpp b/src/core/thread/link_quality.hpp index 9c4bc4cc7..319ebe74a 100644 --- a/src/core/thread/link_quality.hpp +++ b/src/core/thread/link_quality.hpp @@ -55,7 +55,7 @@ namespace ot { */ /** - * This class implements an operation Success Rate Tracker. + * Implements an operation Success Rate Tracker. * * This can be used to track different link quality related metrics, e.g., CCA failure rate, frame tx success rate). * The success rate is maintained using an exponential moving IIR averaging filter with a `uint16_t` as the storage. @@ -67,7 +67,7 @@ public: static constexpr uint16_t kMaxRateValue = 0xffff; ///< Value corresponding to max (failure/success) rate of 100%. /** - * This method adds a sample (success or failure) to `SuccessRateTracker`. + * Adds a sample (success or failure) to `SuccessRateTracker`. * * @param[in] aSuccess The sample status be added, `true` for success, `false` for failure. * @param[in] aWeight The weight coefficient used for adding the new sample into average. @@ -76,7 +76,7 @@ public: void AddSample(bool aSuccess, uint16_t aWeight = kDefaultWeight); /** - * This method returns the average failure rate. + * Returns the average failure rate. * * @retval the average failure rate `[0-kMaxRateValue]` with `kMaxRateValue` corresponding to 100%. * @@ -84,7 +84,7 @@ public: uint16_t GetFailureRate(void) const { return mFailureRate; } /** - * This method returns the average success rate. + * Returns the average success rate. * * @retval the average success rate as [0-kMaxRateValue] with `kMaxRateValue` corresponding to 100%. * @@ -98,7 +98,7 @@ private: }; /** - * This class implements a Received Signal Strength (RSS) averager. + * Implements a Received Signal Strength (RSS) averager. * * The average is maintained using an adaptive exponentially weighted moving filter. * @@ -109,13 +109,13 @@ public: static constexpr uint16_t kStringSize = 10; ///< Max string size for average (@sa ToString()). /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; /** - * This method indicates whether the averager contains an average (i.e., at least one RSS value has been added). + * Indicates whether the averager contains an average (i.e., at least one RSS value has been added). * * @retval true If the average value is available (at least one RSS value has been added). * @retval false Averager is empty (no RSS value added yet). @@ -124,7 +124,7 @@ public: bool HasAverage(void) const { return (mCount != 0); } /** - * This method adds a received signal strength (RSS) value to the average. + * Adds a received signal strength (RSS) value to the average. * * If @p aRss is `Radio::kInvalidRssi`, it is ignored and error status kErrorInvalidArgs is returned. * The value of RSS is capped at 0dBm (i.e., for any given RSS value higher than 0dBm, 0dBm is used instead). @@ -138,7 +138,7 @@ public: Error Add(int8_t aRss); /** - * This method returns the current average signal strength value maintained by the averager. + * Returns the current average signal strength value maintained by the averager. * * @returns The current average value (in dBm) or `Radio::kInvalidRssi` if no average is available. * @@ -146,7 +146,7 @@ public: int8_t GetAverage(void) const; /** - * This method returns an raw/encoded version of current average signal strength value. The raw value is the + * Returns an raw/encoded version of current average signal strength value. The raw value is the * average multiplied by a precision factor (currently set as -8). * * @returns The current average multiplied by precision factor or zero if no average is available. @@ -155,7 +155,7 @@ public: uint16_t GetRaw(void) const { return mAverage; } /** - * This method converts the current average RSS value to a human-readable string (e.g., "-80.375"). If the + * Converts the current average RSS value to a human-readable string (e.g., "-80.375"). If the * average is unknown, empty string is returned. * * @returns An `InfoString` object containing the string representation of average RSS. @@ -188,7 +188,7 @@ private: }; /** - * This class implements a Link Quality Indicator (LQI) averager. + * Implements a Link Quality Indicator (LQI) averager. * * It maintains the exponential moving average value of LQI. * @@ -197,7 +197,7 @@ class LqiAverager : public Clearable { public: /** - * This method adds a link quality indicator (LQI) value to the average. + * Adds a link quality indicator (LQI) value to the average. * * @param[in] aLqi Link Quality Indicator value to be added to the average. * @@ -205,7 +205,7 @@ public: void Add(uint8_t aLqi); /** - * This method returns the current average link quality value maintained by the averager. + * Returns the current average link quality value maintained by the averager. * * @returns The current average value. * @@ -213,7 +213,7 @@ public: uint8_t GetAverage(void) const { return mAverage; } /** - * This method returns the count of frames calculated so far. + * Returns the count of frames calculated so far. * * @returns The count of frames calculated. * @@ -228,7 +228,7 @@ private: }; /** - * This enumeration represents the link quality constants. + * Represents the link quality constants. * * Link Quality is an integer in [0, 3]. A higher link quality indicates a more usable link, with 0 indicating that the * link is non-existent or unusable. @@ -248,7 +248,7 @@ constexpr uint8_t kCostForLinkQuality2 = 2; ///< Link Cost for constexpr uint8_t kCostForLinkQuality3 = 1; ///< Link Cost for Link Quality 3. /** - * This function converts link quality to route cost. + * Converts link quality to route cost. * * @param[in] aLinkQuality The link quality to convert. * @@ -258,7 +258,7 @@ constexpr uint8_t kCostForLinkQuality3 = 1; ///< Link Cost for uint8_t CostForLinkQuality(LinkQuality aLinkQuality); /** - * This function computes the link margin from a given noise floor and received signal strength. + * Computes the link margin from a given noise floor and received signal strength. * * @param[in] aNoiseFloor The noise floor value (in dBm). * @param[in] aRss The received signal strength value (in dBm). @@ -269,7 +269,7 @@ uint8_t CostForLinkQuality(LinkQuality aLinkQuality); uint8_t ComputeLinkMargin(int8_t aNoiseFloor, int8_t aRss); /** - * This function converts a link margin value to a link quality value. + * Converts a link margin value to a link quality value. * * @param[in] aLinkMargin The Link Margin in dB. * @@ -279,7 +279,7 @@ uint8_t ComputeLinkMargin(int8_t aNoiseFloor, int8_t aRss); LinkQuality LinkQualityForLinkMargin(uint8_t aLinkMargin); /** - * This function gets the typical received signal strength value for a given link quality. + * Gets the typical received signal strength value for a given link quality. * * @param[in] aNoiseFloor The noise floor value (in dBm). * @param[in] aLinkQuality The link quality value in [0, 3]. @@ -290,7 +290,7 @@ LinkQuality LinkQualityForLinkMargin(uint8_t aLinkMargin); int8_t GetTypicalRssForLinkQuality(int8_t aNoiseFloor, LinkQuality aLinkQuality); /** - * This class encapsulates/stores all relevant information about quality of a link, including average received signal + * Encapsulates/stores all relevant information about quality of a link, including average received signal * strength (RSS), last RSS, link margin, and link quality. * */ @@ -303,13 +303,13 @@ public: static constexpr uint16_t kInfoStringSize = 50; ///< `InfoString` size (@sa ToInfoString()). /** - * This type defines the fixed-length `String` object returned from `ToInfoString()`. + * Defines the fixed-length `String` object returned from `ToInfoString()`. * */ typedef String InfoString; /** - * This method initializes the `LinkQualityInfo` object. + * Initializes the `LinkQualityInfo` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -317,19 +317,19 @@ public: void Init(Instance &aInstance) { InstanceLocatorInit::Init(aInstance); } /** - * This method clears the all the data in the object. + * Clears the all the data in the object. * */ void Clear(void); /** - * This method clears the average RSS value. + * Clears the average RSS value. * */ void ClearAverageRss(void) { mRssAverager.Clear(); } /** - * This method adds a new received signal strength (RSS) value to the average. + * Adds a new received signal strength (RSS) value to the average. * * @param[in] aRss A new received signal strength value (in dBm) to be added to the average. * @@ -337,7 +337,7 @@ public: void AddRss(int8_t aRss); /** - * This method returns the current average received signal strength value. + * Returns the current average received signal strength value. * * @returns The current average value or `Radio::kInvalidRssi` if no average is available. * @@ -345,7 +345,7 @@ public: int8_t GetAverageRss(void) const { return mRssAverager.GetAverage(); } /** - * This method returns an encoded version of current average signal strength value. The encoded value is the + * Returns an encoded version of current average signal strength value. The encoded value is the * average multiplied by a precision factor (currently -8). * * @returns The current average multiplied by precision factor or zero if no average is available. @@ -354,7 +354,7 @@ public: uint16_t GetAverageRssRaw(void) const { return mRssAverager.GetRaw(); } /** - * This method converts the link quality info to info/debug human-readable string. + * Converts the link quality info to info/debug human-readable string. * * @returns An `InfoString` representing the link quality info. * @@ -362,7 +362,7 @@ public: InfoString ToInfoString(void) const; /** - * This method returns the link margin. The link margin is calculated using the link's current average received + * Returns the link margin. The link margin is calculated using the link's current average received * signal strength (RSS) and average noise floor. * * @returns Link margin derived from average received signal strength and average noise floor. @@ -395,7 +395,7 @@ public: int8_t GetLastRss(void) const { return mLastRss; } /** - * This method adds a MAC frame transmission status (success/failure) and updates the frame tx error rate. + * Adds a MAC frame transmission status (success/failure) and updates the frame tx error rate. * * @param[in] aTxStatus Success/Failure of MAC frame transmission (`true` -> success, `false` -> failure). * @@ -406,7 +406,7 @@ public: } /** - * This method adds a message transmission status (success/failure) and updates the message error rate. + * Adds a message transmission status (success/failure) and updates the message error rate. * * @param[in] aTxStatus Success/Failure of message (`true` -> success, `false` -> message tx failed). * A larger (IPv6) message may be fragmented and sent as multiple MAC frames. The message @@ -420,7 +420,7 @@ public: } /** - * This method returns the MAC frame transmission error rate for the link. + * Returns the MAC frame transmission error rate for the link. * * The rate is maintained over a window of (roughly) last `OPENTHREAD_CONFIG_FRAME_TX_ERR_RATE_AVERAGING_WINDOW` * frame transmissions. @@ -431,7 +431,7 @@ public: uint16_t GetFrameErrorRate(void) const { return mFrameErrorRate.GetFailureRate(); } /** - * This method returns the message error rate for the link. + * Returns the message error rate for the link. * * The rate is maintained over a window of (roughly) last `OPENTHREAD_CONFIG_IPV6_TX_ERR_RATE_AVERAGING_WINDOW` * (IPv6) messages. diff --git a/src/core/thread/lowpan.hpp b/src/core/thread/lowpan.hpp index 77139a631..e0b7a59dc 100644 --- a/src/core/thread/lowpan.hpp +++ b/src/core/thread/lowpan.hpp @@ -71,7 +71,7 @@ namespace Lowpan { using ot::Encoding::BigEndian::HostSwap16; /** - * This structure represents a LOWPAN_IPHC Context. + * Represents a LOWPAN_IPHC Context. * */ struct Context : public Clearable @@ -83,14 +83,14 @@ struct Context : public Clearable }; /** - * This class implements LOWPAN_IPHC header compression. + * Implements LOWPAN_IPHC header compression. * */ class Lowpan : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -98,7 +98,7 @@ public: explicit Lowpan(Instance &aInstance); /** - * This method indicates whether or not the header is a LOWPAN_IPHC header. + * Indicates whether or not the header is a LOWPAN_IPHC header. * * @param[in] aHeader A pointer to the header. * @@ -111,7 +111,7 @@ public: } /** - * This method indicates whether or not header in a given frame is a LOWPAN_IPHC header. + * Indicates whether or not header in a given frame is a LOWPAN_IPHC header. * * @param[in] aFrameData The frame data. * @@ -124,7 +124,7 @@ public: } /** - * This method compresses an IPv6 header. + * Compresses an IPv6 header. * * @param[in] aMessage A reference to the IPv6 message. * @param[in] aMacAddrs The MAC source and destination addresses. @@ -136,7 +136,7 @@ public: Error Compress(Message &aMessage, const Mac::Addresses &aMacAddrs, FrameBuilder &aFrameBuilder); /** - * This method decompresses a LOWPAN_IPHC header. + * Decompresses a LOWPAN_IPHC header. * * If the header is parsed successfully the @p aFrameData is updated to skip over the parsed header bytes. * @@ -156,7 +156,7 @@ public: uint16_t aDatagramLength); /** - * This method decompresses a LOWPAN_IPHC header. + * Decompresses a LOWPAN_IPHC header. * * If the header is parsed successfully the @p aFrameData is updated to skip over the parsed header bytes. * @@ -175,7 +175,7 @@ public: FrameData &aFrameData); /** - * This method decompresses a LOWPAN_NHC UDP header. + * Decompresses a LOWPAN_NHC UDP header. * * If the header is parsed successfully the @p aFrameData is updated to skip over the parsed header bytes. * @@ -189,7 +189,7 @@ public: Error DecompressUdpHeader(Ip6::Udp::Header &aUdpHeader, FrameData &aFrameData); /** - * This method decompresses the IPv6 ECN field in a LOWPAN_IPHC header. + * Decompresses the IPv6 ECN field in a LOWPAN_IPHC header. * * @param[in] aMessage The message to read the IPHC header from. * @param[in] aOffset The offset in @p aMessage to start of IPHC header. @@ -200,9 +200,9 @@ public: Ip6::Ecn DecompressEcn(const Message &aMessage, uint16_t aOffset) const; /** - * This method updates the compressed ECN field in a LOWPAN_IPHC header to `kEcnMarked`. + * Updates the compressed ECN field in a LOWPAN_IPHC header to `kEcnMarked`. * - * This method MUST be used when the ECN field is not elided in the IPHC header. Note that the ECN is not elided + * MUST be used when the ECN field is not elided in the IPHC header. Note that the ECN is not elided * when it is not zero (`kEcnNotCapable`). * * @param[in,out] aMessage The message containing the IPHC header and to update. @@ -291,14 +291,14 @@ private: }; /** - * This class implements Mesh Header generation and processing. + * Implements Mesh Header generation and processing. * */ class MeshHeader { public: /** - * This method initializes the Mesh Header with a given Mesh Source, Mesh Destination and Hops Left value. + * Initializes the Mesh Header with a given Mesh Source, Mesh Destination and Hops Left value. * * @param[in] aSource The Mesh Source address. * @param[in] aDestination The Mesh Destination address. @@ -308,7 +308,7 @@ public: void Init(uint16_t aSource, uint16_t aDestination, uint8_t aHopsLeft); /** - * This static method indicates whether or not the header (in a given frame) is a Mesh Header. + * Indicates whether or not the header (in a given frame) is a Mesh Header. * * @note This method checks whether the first byte in header/frame (dispatch byte) matches the Mesh Header dispatch * It does not fully parse and validate the Mesh Header. `ParseFrom()` method can be used to fully parse and @@ -321,7 +321,7 @@ public: static bool IsMeshHeader(const FrameData &aFrameData); /** - * This method parses the Mesh Header from a frame @p aFrame. + * Parses the Mesh Header from a frame @p aFrame. * * @param[in] aFrame The pointer to the frame. * @param[in] aFrameLength The length of the frame. @@ -334,7 +334,7 @@ public: Error ParseFrom(const uint8_t *aFrame, uint16_t aFrameLength, uint16_t &aHeaderLength); /** - * This method parses the Mesh Header from a given frame data. + * Parses the Mesh Header from a given frame data. * * If the Mesh Header is parsed successfully the @p aFrameData is updated to skip over the parsed header bytes. * @@ -347,7 +347,7 @@ public: Error ParseFrom(FrameData &aFrameData); /** - * This method parses the Mesh Header from a given message. + * Parses the Mesh Header from a given message. * * @note The Mesh Header is read from offset zero within the @p aMessage. * @@ -360,7 +360,7 @@ public: Error ParseFrom(const Message &aMessage); /** - * This method parses the Mesh Header from a given message. + * Parses the Mesh Header from a given message. * * @note The Mesh Header is read from offset zero within the @p aMessage. * @@ -374,7 +374,7 @@ public: Error ParseFrom(const Message &aMessage, uint16_t &aHeaderLength); /** - * This method returns the the Mesh Header length when written to a frame. + * Returns the the Mesh Header length when written to a frame. * * @note The returned value from this method gives the header length (number of bytes) when the header is written * to a frame or message. This should not be used to determine the parsed length (number of bytes read) when the @@ -386,7 +386,7 @@ public: uint16_t GetHeaderLength(void) const; /** - * This method returns the Hops Left value. + * Returns the Hops Left value. * * @returns The Hops Left value. * @@ -394,13 +394,13 @@ public: uint8_t GetHopsLeft(void) const { return mHopsLeft; } /** - * This method decrements the Hops Left value (if it is not zero). + * Decrements the Hops Left value (if it is not zero). * */ void DecrementHopsLeft(void); /** - * This method returns the Mesh Source address. + * Returns the Mesh Source address. * * @returns The Mesh Source address. * @@ -408,7 +408,7 @@ public: uint16_t GetSource(void) const { return mSource; } /** - * This method returns the Mesh Destination address. + * Returns the Mesh Destination address. * * @returns The Mesh Destination address. * @@ -416,7 +416,7 @@ public: uint16_t GetDestination(void) const { return mDestination; } /** - * This method appends the Mesh Header into a given frame. + * Appends the Mesh Header into a given frame. * * @param[out] aFrameBuilder The `FrameBuilder` to append to. * @@ -427,7 +427,7 @@ public: Error AppendTo(FrameBuilder &aFrameBuilder) const; /** - * This method appends the Mesh Header to a given message. + * Appends the Mesh Header to a given message. * * * @param[out] aMessage A message to append the Mesh Header to. @@ -456,7 +456,7 @@ private: }; /** - * This class implements Fragment Header generation and parsing. + * Implements Fragment Header generation and parsing. * */ class FragmentHeader @@ -467,7 +467,7 @@ public: { public: /** - * This method initializes the `FirstFrag`. + * Initializes the `FirstFrag`. * * @param[in] aSize The Datagram Size value. * @param[in] aTag The Datagram Tag value. @@ -497,7 +497,7 @@ public: { public: /** - * This method initializes the `NextFrag`. + * Initializes the `NextFrag`. * * @param[in] aSize The Datagram Size value. * @param[in] aTag The Datagram Tag value. @@ -528,7 +528,7 @@ public: } OT_TOOL_PACKED_END; /** - * This static method indicates whether or not the header (in a given frame) is a Fragment Header. + * Indicates whether or not the header (in a given frame) is a Fragment Header. * * @note This method checks whether the frame has the minimum required length and that the first byte in * header (dispatch byte) matches the Fragment Header dispatch value. It does not fully parse and validate the @@ -543,7 +543,7 @@ public: static bool IsFragmentHeader(const FrameData &aFrameData); /** - * This method parses the Fragment Header from a given frame data. + * Parses the Fragment Header from a given frame data. * * If the Fragment Header is parsed successfully the @p aFrameData is updated to skip over the parsed header bytes. * @@ -556,7 +556,7 @@ public: Error ParseFrom(FrameData &aFrameData); /** - * This method parses the Fragment Header from a message. + * Parses the Fragment Header from a message. * * @param[in] aMessage The message to read from. * @param[in] aOffset The offset within the message to start reading from. @@ -569,7 +569,7 @@ public: Error ParseFrom(const Message &aMessage, uint16_t aOffset, uint16_t &aHeaderLength); /** - * This method returns the Datagram Size value. + * Returns the Datagram Size value. * * @returns The Datagram Size value. * @@ -577,7 +577,7 @@ public: uint16_t GetDatagramSize(void) const { return mSize; } /** - * This method returns the Datagram Tag value. + * Returns the Datagram Tag value. * * @returns The Datagram Tag value. * @@ -585,7 +585,7 @@ public: uint16_t GetDatagramTag(void) const { return mTag; } /** - * This method returns the Datagram Offset value. + * Returns the Datagram Offset value. * * The returned offset value is always multiple of 8. * diff --git a/src/core/thread/mesh_forwarder.hpp b/src/core/thread/mesh_forwarder.hpp index 9ee160b5c..cfbb82aeb 100644 --- a/src/core/thread/mesh_forwarder.hpp +++ b/src/core/thread/mesh_forwarder.hpp @@ -75,14 +75,14 @@ class HistoryTracker; */ /** - * This class represents link-specific information for messages received from the Thread radio. + * Represents link-specific information for messages received from the Thread radio. * */ class ThreadLinkInfo : public otThreadLinkInfo, public Clearable { public: /** - * This method returns the IEEE 802.15.4 Source PAN ID. + * Returns the IEEE 802.15.4 Source PAN ID. * * @returns The IEEE 802.15.4 Source PAN ID. * @@ -90,7 +90,7 @@ public: Mac::PanId GetPanId(void) const { return mPanId; } /** - * This method returns the IEEE 802.15.4 Channel. + * Returns the IEEE 802.15.4 Channel. * * @returns The IEEE 802.15.4 Channel. * @@ -98,7 +98,7 @@ public: uint8_t GetChannel(void) const { return mChannel; } /** - * This method returns whether the Destination PAN ID is broadcast. + * Returns whether the Destination PAN ID is broadcast. * * @retval TRUE If Destination PAN ID is broadcast. * @retval FALSE If Destination PAN ID is not broadcast. @@ -107,7 +107,7 @@ public: bool IsDstPanIdBroadcast(void) const { return mIsDstPanIdBroadcast; } /** - * This method indicates whether or not link security is enabled. + * Indicates whether or not link security is enabled. * * @retval TRUE If link security is enabled. * @retval FALSE If link security is not enabled. @@ -116,7 +116,7 @@ public: bool IsLinkSecurityEnabled(void) const { return mLinkSecurity; } /** - * This method returns the Received Signal Strength (RSS) in dBm. + * Returns the Received Signal Strength (RSS) in dBm. * * @returns The Received Signal Strength (RSS) in dBm. * @@ -124,7 +124,7 @@ public: int8_t GetRss(void) const { return mRss; } /** - * This method returns the frame/radio Link Quality Indicator (LQI) value. + * Returns the frame/radio Link Quality Indicator (LQI) value. * * @returns The Link Quality Indicator value. * @@ -133,7 +133,7 @@ public: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method returns the Time Sync Sequence. + * Returns the Time Sync Sequence. * * @returns The Time Sync Sequence. * @@ -141,7 +141,7 @@ public: uint8_t GetTimeSyncSeq(void) const { return mTimeSyncSeq; } /** - * This method returns the time offset to the Thread network time (in microseconds). + * Returns the time offset to the Thread network time (in microseconds). * * @returns The time offset to the Thread network time (in microseconds). * @@ -150,7 +150,7 @@ public: #endif /** - * This method sets the `ThreadLinkInfo` from a given received frame. + * Sets the `ThreadLinkInfo` from a given received frame. * * @param[in] aFrame A received frame. * @@ -159,7 +159,7 @@ public: }; /** - * This class implements mesh forwarding within Thread. + * Implements mesh forwarding within Thread. * */ class MeshForwarder : public InstanceLocator, private NonCopyable @@ -174,7 +174,7 @@ class MeshForwarder : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -182,19 +182,19 @@ public: explicit MeshForwarder(Instance &aInstance); /** - * This method enables mesh forwarding and the IEEE 802.15.4 MAC layer. + * Enables mesh forwarding and the IEEE 802.15.4 MAC layer. * */ void Start(void); /** - * This method disables mesh forwarding and the IEEE 802.15.4 MAC layer. + * Disables mesh forwarding and the IEEE 802.15.4 MAC layer. * */ void Stop(void); /** - * This method submits a message to the mesh forwarder for forwarding. + * Submits a message to the mesh forwarder for forwarding. * * @param[in] aMessage A reference to the message. * @@ -207,7 +207,7 @@ public: #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method sends an empty data frame to the parent. + * Sends an empty data frame to the parent. * * @retval kErrorNone Successfully enqueued an empty message. * @retval kErrorInvalidState Device is not in Rx-Off-When-Idle mode or it has no parent. @@ -218,7 +218,7 @@ public: #endif /** - * This method is called by the address resolver when an EID-to-RLOC mapping has been resolved. + * Is called by the address resolver when an EID-to-RLOC mapping has been resolved. * * @param[in] aEid A reference to the EID that has been resolved. * @param[in] aError kErrorNone on success and kErrorDrop otherwise. @@ -227,7 +227,7 @@ public: void HandleResolved(const Ip6::Address &aEid, Error aError); /** - * This method indicates whether or not rx-on-when-idle mode is enabled. + * Indicates whether or not rx-on-when-idle mode is enabled. * * @retval TRUE The rx-on-when-idle mode is enabled. * @retval FALSE The rx-on-when-idle-mode is disabled. @@ -236,7 +236,7 @@ public: bool GetRxOnWhenIdle(void) const; /** - * This method sets the rx-on-when-idle mode + * Sets the rx-on-when-idle mode * * @param[in] aRxOnWhenIdle TRUE to enable, FALSE otherwise. * @@ -244,7 +244,7 @@ public: void SetRxOnWhenIdle(bool aRxOnWhenIdle); /** - * This method sets the scan parameters for MLE Discovery Request messages. + * Sets the scan parameters for MLE Discovery Request messages. * * @param[in] aScanChannels A reference to channel mask indicating which channels to scan. * If @p aScanChannels is empty, then all channels are used instead. @@ -254,7 +254,7 @@ public: #if OPENTHREAD_FTD /** - * This method frees any messages queued for an existing child. + * Frees any messages queued for an existing child. * * @param[in] aChild A reference to the child. * @param[in] aSubType The message sub-type to remove. @@ -265,13 +265,13 @@ public: #endif /** - * This method frees unicast/multicast MLE Data Responses from Send Message Queue if any. + * Frees unicast/multicast MLE Data Responses from Send Message Queue if any. * */ void RemoveDataResponseMessages(void); /** - * This method evicts the message with lowest priority in the send queue. + * Evicts the message with lowest priority in the send queue. * * @param[in] aPriority The highest priority level of the evicted message. * @@ -282,7 +282,7 @@ public: Error EvictMessage(Message::Priority aPriority); /** - * This method returns a reference to the send queue. + * Returns a reference to the send queue. * * @returns A reference to the send queue. * @@ -290,7 +290,7 @@ public: const PriorityQueue &GetSendQueue(void) const { return mSendQueue; } /** - * This method returns a reference to the reassembly queue. + * Returns a reference to the reassembly queue. * * @returns A reference to the reassembly queue. * @@ -298,7 +298,7 @@ public: const MessageQueue &GetReassemblyQueue(void) const { return mReassemblyList; } /** - * This method returns a reference to the IP level counters. + * Returns a reference to the IP level counters. * * @returns A reference to the IP level counters. * @@ -306,14 +306,14 @@ public: const otIpCounters &GetCounters(void) const { return mIpCounters; } /** - * This method resets the IP level counters. + * Resets the IP level counters. * */ void ResetCounters(void) { memset(&mIpCounters, 0, sizeof(mIpCounters)); } #if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This method handles a deferred ack. + * Handles a deferred ack. * * Some radio links can use deferred ack logic, where a tx request always report `HandleSentFrame()` quickly. The * link layer would wait for the ack and report it at a later time using this method. diff --git a/src/core/thread/mle.hpp b/src/core/thread/mle.hpp index f33b52552..5e7a96087 100644 --- a/src/core/thread/mle.hpp +++ b/src/core/thread/mle.hpp @@ -95,7 +95,7 @@ namespace Mle { */ /** - * This class implements MLE functionality required by the Thread EndDevices, Router, and Leader roles. + * Implements MLE functionality required by the Thread EndDevices, Router, and Leader roles. * */ class Mle : public InstanceLocator, private NonCopyable @@ -109,7 +109,7 @@ class Mle : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the MLE object. + * Initializes the MLE object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -117,7 +117,7 @@ public: explicit Mle(Instance &aInstance); /** - * This method enables MLE. + * Enables MLE. * * @retval kErrorNone Successfully enabled MLE. * @retval kErrorAlready MLE was already enabled. @@ -126,7 +126,7 @@ public: Error Enable(void); /** - * This method disables MLE. + * Disables MLE. * * @retval kErrorNone Successfully disabled MLE. * @@ -134,7 +134,7 @@ public: Error Disable(void); /** - * This method starts the MLE protocol operation. + * Starts the MLE protocol operation. * * @retval kErrorNone Successfully started the protocol operation. * @retval kErrorInvalidState IPv6 interface is down or device is in raw-link mode. @@ -143,19 +143,19 @@ public: Error Start(void) { return Start(kNormalAttach); } /** - * This method stops the MLE protocol operation. + * Stops the MLE protocol operation. * */ void Stop(void) { Stop(kUpdateNetworkDatasets); } /** - * This method restores network information from non-volatile memory (if any). + * Restores network information from non-volatile memory (if any). * */ void Restore(void); /** - * This method stores network information into non-volatile memory. + * Stores network information into non-volatile memory. * * @retval kErrorNone Successfully store the network information. * @retval kErrorNoBufs Could not store the network information due to insufficient memory space. @@ -164,7 +164,7 @@ public: Error Store(void); /** - * This method generates an MLE Announce message. + * Generates an MLE Announce message. * * @param[in] aChannel The channel to use when transmitting. * @@ -172,7 +172,7 @@ public: void SendAnnounce(uint8_t aChannel) { SendAnnounce(aChannel, kNormalAnnounce); } /** - * This method causes the Thread interface to detach from the Thread network. + * Causes the Thread interface to detach from the Thread network. * * @retval kErrorNone Successfully detached from the Thread network. * @retval kErrorInvalidState MLE is Disabled. @@ -181,7 +181,7 @@ public: Error BecomeDetached(void); /** - * This method causes the Thread interface to attempt an MLE attach. + * Causes the Thread interface to attempt an MLE attach. * * @retval kErrorNone Successfully began the attach process. * @retval kErrorInvalidState MLE is Disabled. @@ -191,7 +191,7 @@ public: Error BecomeChild(void); /** - * This function notifies other nodes in the network (if any) and then stops Thread protocol operation. + * Notifies other nodes in the network (if any) and then stops Thread protocol operation. * * It sends an Address Release if it's a router, or sets its child timeout to 0 if it's a child. * @@ -205,7 +205,7 @@ public: Error DetachGracefully(otDetachGracefullyCallback aCallback, void *aContext); /** - * This method indicates whether or not the Thread device is attached to a Thread network. + * Indicates whether or not the Thread device is attached to a Thread network. * * @retval TRUE Attached to a Thread network. * @retval FALSE Not attached to a Thread network. @@ -214,7 +214,7 @@ public: bool IsAttached(void) const; /** - * This method indicates whether device is currently attaching or not. + * Indicates whether device is currently attaching or not. * * Note that an already attached device may also be in attaching state. Examples of this include a leader/router * trying to attach to a better partition, or a child trying to find a better parent (when feature @@ -227,7 +227,7 @@ public: bool IsAttaching(void) const { return (mAttachState != kAttachStateIdle); } /** - * This method returns the current Thread device role. + * Returns the current Thread device role. * * @returns The current Thread device role. * @@ -235,7 +235,7 @@ public: DeviceRole GetRole(void) const { return mRole; } /** - * This method indicates whether device role is disabled. + * Indicates whether device role is disabled. * * @retval TRUE Device role is disabled. * @retval FALSE Device role is not disabled. @@ -244,7 +244,7 @@ public: bool IsDisabled(void) const { return (mRole == kRoleDisabled); } /** - * This method indicates whether device role is detached. + * Indicates whether device role is detached. * * @retval TRUE Device role is detached. * @retval FALSE Device role is not detached. @@ -253,7 +253,7 @@ public: bool IsDetached(void) const { return (mRole == kRoleDetached); } /** - * This method indicates whether device role is child. + * Indicates whether device role is child. * * @retval TRUE Device role is child. * @retval FALSE Device role is not child. @@ -262,7 +262,7 @@ public: bool IsChild(void) const { return (mRole == kRoleChild); } /** - * This method indicates whether device role is router. + * Indicates whether device role is router. * * @retval TRUE Device role is router. * @retval FALSE Device role is not router. @@ -271,7 +271,7 @@ public: bool IsRouter(void) const { return (mRole == kRoleRouter); } /** - * This method indicates whether device role is leader. + * Indicates whether device role is leader. * * @retval TRUE Device role is leader. * @retval FALSE Device role is not leader. @@ -280,7 +280,7 @@ public: bool IsLeader(void) const { return (mRole == kRoleLeader); } /** - * This method indicates whether device role is either router or leader. + * Indicates whether device role is either router or leader. * * @retval TRUE Device role is either router or leader. * @retval FALSE Device role is neither router nor leader. @@ -289,7 +289,7 @@ public: bool IsRouterOrLeader(void) const; /** - * This method returns the Device Mode as reported in the Mode TLV. + * Returns the Device Mode as reported in the Mode TLV. * * @returns The Device Mode as reported in the Mode TLV. * @@ -297,7 +297,7 @@ public: DeviceMode GetDeviceMode(void) const { return mDeviceMode; } /** - * This method sets the Device Mode as reported in the Mode TLV. + * Sets the Device Mode as reported in the Mode TLV. * * @param[in] aDeviceMode The device mode to set. * @@ -308,7 +308,7 @@ public: Error SetDeviceMode(DeviceMode aDeviceMode); /** - * This method indicates whether or not the device is rx-on-when-idle. + * Indicates whether or not the device is rx-on-when-idle. * * @returns TRUE if rx-on-when-idle, FALSE otherwise. * @@ -316,7 +316,7 @@ public: bool IsRxOnWhenIdle(void) const { return mDeviceMode.IsRxOnWhenIdle(); } /** - * This method indicates whether or not the device is a Full Thread Device. + * Indicates whether or not the device is a Full Thread Device. * * @returns TRUE if a Full Thread Device, FALSE otherwise. * @@ -324,7 +324,7 @@ public: bool IsFullThreadDevice(void) const { return mDeviceMode.IsFullThreadDevice(); } /** - * This method indicates whether or not the device is a Minimal End Device. + * Indicates whether or not the device is a Minimal End Device. * * @returns TRUE if the device is a Minimal End Device, FALSE otherwise. * @@ -332,7 +332,7 @@ public: bool IsMinimalEndDevice(void) const { return mDeviceMode.IsMinimalEndDevice(); } /** - * This method gets the Network Data type (full set or stable subset) that this device requests. + * Gets the Network Data type (full set or stable subset) that this device requests. * * @returns The Network Data type requested by this device. * @@ -340,7 +340,7 @@ public: NetworkData::Type GetNetworkDataType(void) const { return mDeviceMode.GetNetworkDataType(); } /** - * This method returns a pointer to the Mesh Local Prefix. + * Returns a pointer to the Mesh Local Prefix. * * @returns A reference to the Mesh Local Prefix. * @@ -348,7 +348,7 @@ public: const Ip6::NetworkPrefix &GetMeshLocalPrefix(void) const { return mMeshLocal16.GetAddress().GetPrefix(); } /** - * This method sets the Mesh Local Prefix. + * Sets the Mesh Local Prefix. * * @param[in] aMeshLocalPrefix A reference to the Mesh Local Prefix. * @@ -357,7 +357,7 @@ public: #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method sets the Mesh Local IID. + * Sets the Mesh Local IID. * * Available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. * @@ -371,13 +371,13 @@ public: #endif /** - * This method applies the Mesh Local Prefix. + * Applies the Mesh Local Prefix. * */ void ApplyMeshLocalPrefix(void); /** - * This method returns a reference to the Thread link-local address. + * Returns a reference to the Thread link-local address. * * The Thread link local address is derived using IEEE802.15.4 Extended Address as Interface Identifier. * @@ -387,7 +387,7 @@ public: const Ip6::Address &GetLinkLocalAddress(void) const { return mLinkLocal64.GetAddress(); } /** - * This method updates the link local address. + * Updates the link local address. * * Call this method when the IEEE 802.15.4 Extended Address has changed. * @@ -395,7 +395,7 @@ public: void UpdateLinkLocalAddress(void); /** - * This method returns a reference to the link-local all Thread nodes multicast address. + * Returns a reference to the link-local all Thread nodes multicast address. * * @returns A reference to the link-local all Thread nodes multicast address. * @@ -403,7 +403,7 @@ public: const Ip6::Address &GetLinkLocalAllThreadNodesAddress(void) const { return mLinkLocalAllThreadNodes.GetAddress(); } /** - * This method returns a reference to the realm-local all Thread nodes multicast address. + * Returns a reference to the realm-local all Thread nodes multicast address. * * @returns A reference to the realm-local all Thread nodes multicast address. * @@ -414,7 +414,7 @@ public: } /** - * This method gets the parent when operating in End Device mode. + * Gets the parent when operating in End Device mode. * * @returns A reference to the parent. * @@ -422,7 +422,7 @@ public: Parent &GetParent(void) { return mParent; } /** - * This method gets the parent when operating in End Device mode. + * Gets the parent when operating in End Device mode. * * @returns A reference to the parent. * @@ -441,7 +441,7 @@ public: Error GetParentInfo(Router::Info &aParentInfo) const; /** - * This method get the parent candidate. + * Get the parent candidate. * * The parent candidate is valid when attempting to attach to a new parent. * @@ -449,7 +449,7 @@ public: Parent &GetParentCandidate(void) { return mParentCandidate; } /** - * This method starts the process for child to search for a better parent while staying attached to its current + * Starts the process for child to search for a better parent while staying attached to its current * parent * * @retval kErrorNone Successfully started the process to search for a better parent. @@ -459,7 +459,7 @@ public: Error SearchForBetterParent(void); /** - * This method indicates whether or not an IPv6 address is an RLOC. + * Indicates whether or not an IPv6 address is an RLOC. * * @retval TRUE If @p aAddress is an RLOC. * @retval FALSE If @p aAddress is not an RLOC. @@ -468,7 +468,7 @@ public: bool IsRoutingLocator(const Ip6::Address &aAddress) const; /** - * This method indicates whether or not an IPv6 address is an ALOC. + * Indicates whether or not an IPv6 address is an ALOC. * * @retval TRUE If @p aAddress is an ALOC. * @retval FALSE If @p aAddress is not an ALOC. @@ -477,7 +477,7 @@ public: bool IsAnycastLocator(const Ip6::Address &aAddress) const; /** - * This method indicates whether or not an IPv6 address is a Mesh Local Address. + * Indicates whether or not an IPv6 address is a Mesh Local Address. * * @retval TRUE If @p aAddress is a Mesh Local Address. * @retval FALSE If @p aAddress is not a Mesh Local Address. @@ -486,7 +486,7 @@ public: bool IsMeshLocalAddress(const Ip6::Address &aAddress) const; /** - * This method returns the MLE Timeout value. + * Returns the MLE Timeout value. * * @returns The MLE Timeout value in seconds. * @@ -494,7 +494,7 @@ public: uint32_t GetTimeout(void) const { return mTimeout; } /** - * This method sets the MLE Timeout value. + * Sets the MLE Timeout value. * * @param[in] aTimeout The Timeout value in seconds. * @@ -502,7 +502,7 @@ public: void SetTimeout(uint32_t aTimeout); /** - * This method returns the RLOC16 assigned to the Thread interface. + * Returns the RLOC16 assigned to the Thread interface. * * @returns The RLOC16 assigned to the Thread interface. * @@ -510,7 +510,7 @@ public: uint16_t GetRloc16(void) const { return mRloc16; } /** - * This method returns a reference to the RLOC assigned to the Thread interface. + * Returns a reference to the RLOC assigned to the Thread interface. * * @returns A reference to the RLOC assigned to the Thread interface. * @@ -518,7 +518,7 @@ public: const Ip6::Address &GetMeshLocal16(void) const { return mMeshLocal16.GetAddress(); } /** - * This method returns a reference to the ML-EID assigned to the Thread interface. + * Returns a reference to the ML-EID assigned to the Thread interface. * * @returns A reference to the ML-EID assigned to the Thread interface. * @@ -526,7 +526,7 @@ public: const Ip6::Address &GetMeshLocal64(void) const { return mMeshLocal64.GetAddress(); } /** - * This method returns the Router ID of the Leader. + * Returns the Router ID of the Leader. * * @returns The Router ID of the Leader. * @@ -534,7 +534,7 @@ public: uint8_t GetLeaderId(void) const { return mLeaderData.GetLeaderRouterId(); } /** - * This method retrieves the Leader's RLOC. + * Retrieves the Leader's RLOC. * * @param[out] aAddress A reference to the Leader's RLOC. * @@ -545,7 +545,7 @@ public: Error GetLeaderAddress(Ip6::Address &aAddress) const; /** - * This method retrieves the Leader's ALOC. + * Retrieves the Leader's ALOC. * * @param[out] aAddress A reference to the Leader's ALOC. * @@ -556,7 +556,7 @@ public: Error GetLeaderAloc(Ip6::Address &aAddress) const { return GetLocatorAddress(aAddress, kAloc16Leader); } /** - * This method computes the Commissioner's ALOC. + * Computes the Commissioner's ALOC. * * @param[out] aAddress A reference to the Commissioner's ALOC. * @param[in] aSessionId Commissioner session id. @@ -571,7 +571,7 @@ public: } /** - * This method retrieves the Service ALOC for given Service ID. + * Retrieves the Service ALOC for given Service ID. * * @param[in] aServiceId Service ID to get ALOC for. * @param[out] aAddress A reference to the Service ALOC. @@ -583,7 +583,7 @@ public: Error GetServiceAloc(uint8_t aServiceId, Ip6::Address &aAddress) const; /** - * This method returns the most recently received Leader Data. + * Returns the most recently received Leader Data. * * @returns A reference to the most recently received Leader Data. * @@ -591,7 +591,7 @@ public: const LeaderData &GetLeaderData(void); /** - * This method returns a reference to the send queue. + * Returns a reference to the send queue. * * @returns A reference to the send queue. * @@ -599,13 +599,13 @@ public: const MessageQueue &GetMessageQueue(void) const { return mDelayedResponses; } /** - * This method frees multicast MLE Data Response from Delayed Message Queue if any. + * Frees multicast MLE Data Response from Delayed Message Queue if any. * */ void RemoveDelayedDataResponseMessage(void); /** - * This method gets the MLE counters. + * Gets the MLE counters. * * @returns A reference to the MLE counters. * @@ -619,14 +619,14 @@ public: } /** - * This method resets the MLE counters. + * Resets the MLE counters. * */ void ResetCounters(void); #if OPENTHREAD_CONFIG_MLE_PARENT_RESPONSE_CALLBACK_API_ENABLE /** - * This function registers the client callback that is called when processing an MLE Parent Response message. + * Registers the client callback that is called when processing an MLE Parent Response message. * * @param[in] aCallback A pointer to a function that is called to deliver MLE Parent Response data. * @param[in] aContext A pointer to application-specific context. @@ -639,17 +639,17 @@ public: #endif /** - * This method requests MLE layer to prepare and send a shorter version of Child ID Request message by only + * Requests MLE layer to prepare and send a shorter version of Child ID Request message by only * including the mesh-local IPv6 address in the Address Registration TLV. * - * This method should be called when a previous MLE Child ID Request message would require fragmentation at 6LoWPAN + * Should be called when a previous MLE Child ID Request message would require fragmentation at 6LoWPAN * layer. * */ void RequestShorterChildIdRequest(void); /** - * This method gets the RLOC or ALOC of a given RLOC16 or ALOC16. + * Gets the RLOC or ALOC of a given RLOC16 or ALOC16. * * @param[out] aAddress A reference to the RLOC or ALOC. * @param[in] aLocator RLOC16 or ALOC16. @@ -661,13 +661,13 @@ public: Error GetLocatorAddress(Ip6::Address &aAddress, uint16_t aLocator) const; /** - * This method schedules a Child Update Request. + * Schedules a Child Update Request. * */ void ScheduleChildUpdateRequest(void); /* - * This method indicates whether or not the device has restored the network information from + * Indicates whether or not the device has restored the network information from * non-volatile settings after boot. * * @retval true Successfully restored the network information. @@ -678,7 +678,7 @@ public: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method gets the CSL timeout. + * Gets the CSL timeout. * * @returns CSL timeout * @@ -686,7 +686,7 @@ public: uint32_t GetCslTimeout(void) const { return mCslTimeout; } /** - * This method sets the CSL timeout. + * Sets the CSL timeout. * * @param[in] aTimeout The CSL timeout in seconds. * @@ -694,7 +694,7 @@ public: void SetCslTimeout(uint32_t aTimeout); /** - * This method calculates CSL metric of parent. + * Calculates CSL metric of parent. * * @param[in] aCslAccuracy The CSL accuracy. * @@ -779,7 +779,7 @@ protected: static constexpr uint16_t kMleMaxResponseDelay = 1000u; ///< Max delay before responding to a multicast request. /** - * This enumeration type is used in `AppendAddressRegistrationTlv()` to determine which addresses to include in the + * Type is used in `AppendAddressRegistrationTlv()` to determine which addresses to include in the * appended Address Registration TLV. * */ @@ -790,7 +790,7 @@ protected: }; /** - * This enumeration represents the message actions used in `Log()` methods. + * Represents the message actions used in `Log()` methods. * */ enum MessageAction : uint8_t @@ -802,7 +802,7 @@ protected: }; /** - * This enumeration represents message types used in `Log()` methods. + * Represents message types used in `Log()` methods. * */ enum MessageType : uint8_t @@ -850,20 +850,20 @@ protected: static constexpr uint8_t kMaxTlvListSize = 32; ///< Maximum number of TLVs in a `TlvList`. /** - * This type represents a list of TLVs (array of TLV types). + * Represents a list of TLVs (array of TLV types). * */ class TlvList : public Array { public: /** - * This constructor initializes the `TlvList` as empty. + * Initializes the `TlvList` as empty. * */ TlvList(void) = default; /** - * This method checks if a given TLV type is not already present in the list and adds it in the list. + * Checks if a given TLV type is not already present in the list and adds it in the list. * * If the list is full, this method logs it as a warning. * @@ -873,7 +873,7 @@ protected: void Add(uint8_t aTlvType); /** - * This method adds elements from a given list to this TLV list (if not already present in the list). + * Adds elements from a given list to this TLV list (if not already present in the list). * * @param[in] aTlvList The TLV list to add elements from. * @@ -882,7 +882,7 @@ protected: }; /** - * This type represents a Challenge (or Response) data. + * Represents a Challenge (or Response) data. * */ struct Challenge @@ -891,13 +891,13 @@ protected: uint8_t mLength; ///< Challenge length (in bytes). /** - * This method generates a cryptographically secure random sequence to populate the challenge data. + * Generates a cryptographically secure random sequence to populate the challenge data. * */ void GenerateRandom(void); /** - * This method indicates whether the Challenge matches a given buffer. + * Indicates whether the Challenge matches a given buffer. * * @param[in] aBuffer A pointer to a buffer to compare with the Challenge. * @param[in] aLength Length of @p aBuffer (in bytes). @@ -909,7 +909,7 @@ protected: bool Matches(const uint8_t *aBuffer, uint8_t aLength) const; /** - * This method indicates whether two Challenge data byte sequences are equal or not. + * Indicates whether two Challenge data byte sequences are equal or not. * * @param[in] aOther Another Challenge data to compare. * @@ -921,14 +921,14 @@ protected: }; /** - * This class represents an MLE Tx message. + * Represents an MLE Tx message. * */ class TxMessage : public Message { public: /** - * This method appends a Source Address TLV to the message. + * Appends a Source Address TLV to the message. * * @retval kErrorNone Successfully appended the Source Address TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Source Address TLV. @@ -937,7 +937,7 @@ protected: Error AppendSourceAddressTlv(void); /** - * This method appends a Mode TLV to the message. + * Appends a Mode TLV to the message. * * @param[in] aMode The Device Mode. * @@ -948,7 +948,7 @@ protected: Error AppendModeTlv(DeviceMode aMode); /** - * This method appends a Timeout TLV to the message. + * Appends a Timeout TLV to the message. * * @param[in] aTimeout The Timeout value. * @@ -959,7 +959,7 @@ protected: Error AppendTimeoutTlv(uint32_t aTimeout); /** - * This method appends a Challenge TLV to the message. + * Appends a Challenge TLV to the message. * * @param[in] aChallenge A pointer to the Challenge value. * @param[in] aChallengeLength The length of the Challenge value in bytes. @@ -971,7 +971,7 @@ protected: Error AppendChallengeTlv(const uint8_t *aChallenge, uint8_t aChallengeLength); /** - * This method appends a Challenge TLV to the message. + * Appends a Challenge TLV to the message. * * @param[in] aChallenge A reference to the Challenge data. * @@ -982,7 +982,7 @@ protected: Error AppendChallengeTlv(const Challenge &aChallenge); /** - * This method appends a Response TLV to the message. + * Appends a Response TLV to the message. * * @param[in] aResponse A reference to the Response data. * @@ -993,7 +993,7 @@ protected: Error AppendResponseTlv(const Challenge &aResponse); /** - * This method appends a Link Frame Counter TLV to the message. + * Appends a Link Frame Counter TLV to the message. * * @retval kErrorNone Successfully appended the Link Frame Counter TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Link Frame Counter TLV. @@ -1002,7 +1002,7 @@ protected: Error AppendLinkFrameCounterTlv(void); /** - * This method appends an MLE Frame Counter TLV to the message. + * Appends an MLE Frame Counter TLV to the message. * * @retval kErrorNone Successfully appended the Frame Counter TLV. * @retval kErrorNoBufs Insufficient buffers available to append the MLE Frame Counter TLV. @@ -1011,7 +1011,7 @@ protected: Error AppendMleFrameCounterTlv(void); /** - * This method appends an Address16 TLV to the message. + * Appends an Address16 TLV to the message. * * @param[in] aRloc16 The RLOC16 value. * @@ -1022,7 +1022,7 @@ protected: Error AppendAddress16Tlv(uint16_t aRloc16); /** - * This method appends a Network Data TLV to the message. + * Appends a Network Data TLV to the message. * * @param[in] aType The Network Data type to append, full set or stable subset. * @@ -1033,7 +1033,7 @@ protected: Error AppendNetworkDataTlv(NetworkData::Type aType); /** - * This method appends a TLV Request TLV to the message. + * Appends a TLV Request TLV to the message. * * @param[in] aTlvs A pointer to the list of TLV types. * @param[in] aTlvsLength The number of TLV types in @p aTlvs @@ -1045,7 +1045,7 @@ protected: Error AppendTlvRequestTlv(const uint8_t *aTlvs, uint8_t aTlvsLength); /** - * This method appends a TLV Request TLV to the message. + * Appends a TLV Request TLV to the message. * * @tparam kArrayLength The TLV array length. * @@ -1061,7 +1061,7 @@ protected: } /** - * This method appends a Leader Data TLV to the message. + * Appends a Leader Data TLV to the message. * * @retval kErrorNone Successfully appended the Leader Data TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Leader Data TLV. @@ -1070,7 +1070,7 @@ protected: Error AppendLeaderDataTlv(void); /** - * This method appends a Scan Mask TLV to th message. + * Appends a Scan Mask TLV to th message. * * @param[in] aScanMask The Scan Mask value. * @@ -1081,7 +1081,7 @@ protected: Error AppendScanMaskTlv(uint8_t aScanMask); /** - * This method appends a Status TLV to the message. + * Appends a Status TLV to the message. * * @param[in] aStatus The Status value. * @@ -1092,7 +1092,7 @@ protected: Error AppendStatusTlv(StatusTlv::Status aStatus); /** - * This method appends a Link Margin TLV to the message. + * Appends a Link Margin TLV to the message. * * @param[in] aLinkMargin The Link Margin value. * @@ -1103,7 +1103,7 @@ protected: Error AppendLinkMarginTlv(uint8_t aLinkMargin); /** - * This method appends a Version TLV to the message. + * Appends a Version TLV to the message. * * @retval kErrorNone Successfully appended the Version TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Version TLV. @@ -1112,7 +1112,7 @@ protected: Error AppendVersionTlv(void); /** - * This method appends an Address Registration TLV to the message. + * Appends an Address Registration TLV to the message. * * @param[in] aMode Determines which addresses to include in the TLV (see `AddressRegistrationMode`). * @@ -1123,7 +1123,7 @@ protected: Error AppendAddressRegistrationTlv(AddressRegistrationMode aMode = kAppendAllAddresses); /** - * This method appends a Supervision Interval TLV to the message. + * Appends a Supervision Interval TLV to the message. * * @param[in] aInterval The interval value. * @@ -1135,7 +1135,7 @@ protected: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method appends a Time Request TLV to the message. + * Appends a Time Request TLV to the message. * * @retval kErrorNone Successfully appended the Time Request TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Time Request TLV. @@ -1144,7 +1144,7 @@ protected: Error AppendTimeRequestTlv(void); /** - * This method appends a Time Parameter TLV to the message. + * Appends a Time Parameter TLV to the message. * * @retval kErrorNone Successfully appended the Time Parameter TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Time Parameter TLV. @@ -1153,7 +1153,7 @@ protected: Error AppendTimeParameterTlv(void); #endif /** - * This method appends a XTAL Accuracy TLV to the message. + * Appends a XTAL Accuracy TLV to the message. * * @retval kErrorNone Successfully appended the XTAL Accuracy TLV. * @retval kErrorNoBufs Insufficient buffers available to append the XTAl Accuracy TLV. @@ -1163,7 +1163,7 @@ protected: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method appends a CSL Channel TLV to the message. + * Appends a CSL Channel TLV to the message. * * @retval kErrorNone Successfully appended the CSL Channel TLV. * @retval kErrorNoBufs Insufficient buffers available to append the CSL Channel TLV. @@ -1172,7 +1172,7 @@ protected: Error AppendCslChannelTlv(void); /** - * This method appends a CSL Sync Timeout TLV to the message. + * Appends a CSL Sync Timeout TLV to the message. * * @retval kErrorNone Successfully appended the CSL Timeout TLV. * @retval kErrorNoBufs Insufficient buffers available to append the CSL Timeout TLV. @@ -1183,7 +1183,7 @@ protected: #if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE /** - * This method appends a CSL Clock Accuracy TLV to the message. + * Appends a CSL Clock Accuracy TLV to the message. * * @retval kErrorNone Successfully appended the CSL Accuracy TLV. * @retval kErrorNoBufs Insufficient buffers available to append the CSL Accuracy TLV. @@ -1193,7 +1193,7 @@ protected: #endif /** - * This method appends a Active Timestamp TLV to the message. + * Appends a Active Timestamp TLV to the message. * * @retval kErrorNone Successfully appended the Active Timestamp TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Active Timestamp TLV. @@ -1202,7 +1202,7 @@ protected: Error AppendActiveTimestampTlv(void); /** - * This method appends a Pending Timestamp TLV to the message. + * Appends a Pending Timestamp TLV to the message. * * @retval kErrorNone Successfully appended the Pending Timestamp TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Pending Timestamp TLV. @@ -1212,7 +1212,7 @@ protected: #if OPENTHREAD_FTD /** - * This method appends a Route TLV to the message. + * Appends a Route TLV to the message. * * @param[in] aNeighbor A pointer to the intended destination (can be `nullptr`). * @@ -1223,7 +1223,7 @@ protected: Error AppendRouteTlv(Neighbor *aNeighbor = nullptr); /** - * This method appends a Active Dataset TLV to the message. + * Appends a Active Dataset TLV to the message. * * @retval kErrorNone Successfully appended the Active Dataset TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Active Dataset TLV. @@ -1232,7 +1232,7 @@ protected: Error AppendActiveDatasetTlv(void); /** - * This method appends a Pending Dataset TLV to the message. + * Appends a Pending Dataset TLV to the message. * * @retval kErrorNone Successfully appended the Pending Dataset TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Pending Dataset TLV. @@ -1241,7 +1241,7 @@ protected: Error AppendPendingDatasetTlv(void); /** - * This method appends a Connectivity TLV to the message. + * Appends a Connectivity TLV to the message. * * @retval kErrorNone Successfully appended the Connectivity TLV. * @retval kErrorNoBufs Insufficient buffers available to append the Connectivity TLV. @@ -1250,7 +1250,7 @@ protected: Error AppendConnectivityTlv(void); /** - * This method appends a Address Registration TLV to the message with addresses from a given child. + * Appends a Address Registration TLV to the message with addresses from a given child. * * @param[in] aChild The child to include its list of addresses in the Address Registration TLV. * @@ -1262,7 +1262,7 @@ protected: #endif // OPENTHREAD_FTD /** - * This method submits the MLE message to the UDP socket to be sent. + * Submits the MLE message to the UDP socket to be sent. * * @param[in] aDestination A reference to the IPv6 address of the destination. * @@ -1273,7 +1273,7 @@ protected: Error SendTo(const Ip6::Address &aDestination); /** - * This method enqueues the message to be sent after a given delay. + * Enqueues the message to be sent after a given delay. * * @param[in] aDestination The IPv6 address of the recipient of the message. * @param[in] aDelay The delay in milliseconds before transmission of the message. @@ -1290,14 +1290,14 @@ protected: }; /** - * This class represents an MLE Rx message. + * Represents an MLE Rx message. * */ class RxMessage : public Message { public: /** - * This method reads Challenge TLV from the message. + * Reads Challenge TLV from the message. * * @param[out] aChallenge A reference to the Challenge data where to output the read value. * @@ -1309,7 +1309,7 @@ protected: Error ReadChallengeTlv(Challenge &aChallenge) const; /** - * This method reads Response TLV from the message. + * Reads Response TLV from the message. * * @param[out] aResponse A reference to the Response data where to output the read value. * @@ -1321,7 +1321,7 @@ protected: Error ReadResponseTlv(Challenge &aResponse) const; /** - * This method reads Link and MLE Frame Counters from the message. + * Reads Link and MLE Frame Counters from the message. * * Link Frame Counter TLV must be present in the message and its value is read into @p aLinkFrameCounter. If MLE * Frame Counter TLV is present in the message, its value is read into @p aMleFrameCounter. If the MLE Frame @@ -1339,7 +1339,7 @@ protected: Error ReadFrameCounterTlvs(uint32_t &aLinkFrameCounter, uint32_t &aMleFrameCounter) const; /** - * This method reads TLV Request TLV from the message. + * Reads TLV Request TLV from the message. * * @param[out] aTlvList A reference to output the read list of requested TLVs. * @@ -1351,7 +1351,7 @@ protected: Error ReadTlvRequestTlv(TlvList &aTlvList) const; /** - * This method reads Leader Data TLV from a message. + * Reads Leader Data TLV from a message. * * @param[out] aLeaderData A reference to output the Leader Data. * @@ -1364,7 +1364,7 @@ protected: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method reads CSL Clock Accuracy TLV from a message. + * Reads CSL Clock Accuracy TLV from a message. * * @param[out] aCslAccuracy A reference to output the CSL accuracy. * @@ -1378,7 +1378,7 @@ protected: #if OPENTHREAD_FTD /** - * This method reads and validates Route TLV from a message. + * Reads and validates Route TLV from a message. * * @param[out] aRouteTlv A reference to output the read Route TLV. * @@ -1395,14 +1395,14 @@ protected: }; /** - * This structure represents a received MLE message containing additional information about the message (e.g. + * Represents a received MLE message containing additional information about the message (e.g. * key sequence, neighbor from which it was received). * */ struct RxInfo { /** - * This enumeration represents a received MLE message class. + * Represents a received MLE message class. * */ enum Class : uint8_t @@ -1413,7 +1413,7 @@ protected: }; /** - * This constructor initializes the `RxInfo`. + * Initializes the `RxInfo`. * * @param[in] aMessage The received MLE message. * @param[in] aMessageInfo The `Ip6::MessageInfo` associated with message. @@ -1430,7 +1430,7 @@ protected: } /** - * This method indicates whether the `mNeighbor` (neighbor from which message was received) is non-null and + * Indicates whether the `mNeighbor` (neighbor from which message was received) is non-null and * in valid state. * * @retval TRUE If `mNeighbor` is non-null and in valid state. @@ -1448,7 +1448,7 @@ protected: }; /** - * This method allocates and initializes new MLE message for a given command. + * Allocates and initializes new MLE message for a given command. * * @param[in] aCommand The MLE command. * @@ -1458,7 +1458,7 @@ protected: TxMessage *NewMleMessage(Command aCommand); /** - * This method sets the device role. + * Sets the device role. * * @param[in] aRole A device role. * @@ -1466,7 +1466,7 @@ protected: void SetRole(DeviceRole aRole); /** - * This method causes the Thread interface to attempt an MLE attach. + * Causes the Thread interface to attempt an MLE attach. * * @param[in] aMode Indicates what partitions to attach to. * @@ -1474,7 +1474,7 @@ protected: void Attach(AttachMode aMode); /** - * This method sets the attach state + * Sets the attach state * * @param[in] aState An attach state * @@ -1482,9 +1482,9 @@ protected: void SetAttachState(AttachState aState); /** - * This method initializes a given @p aNeighbor with information from @p aRxInfo. + * Initializes a given @p aNeighbor with information from @p aRxInfo. * - * This method updates the following properties on @p aNeighbor from @p aRxInfo: + * Updates the following properties on @p aNeighbor from @p aRxInfo: * * - Sets the Extended MAC address from `MessageInfo` peer IPv6 address IID. * - Clears the `GetLinkInfo()` and adds RSS from the `GetThreadLinkInfo()`. @@ -1498,13 +1498,13 @@ protected: void InitNeighbor(Neighbor &aNeighbor, const RxInfo &aRxInfo); /** - * This method clears the parent candidate. + * Clears the parent candidate. * */ void ClearParentCandidate(void) { mParentCandidate.Clear(); } /** - * This method checks if the destination is reachable. + * Checks if the destination is reachable. * * @param[in] aMeshDest The RLOC16 of the destination. * @param[in] aIp6Header The IPv6 header of the message. @@ -1516,7 +1516,7 @@ protected: Error CheckReachability(uint16_t aMeshDest, const Ip6::Header &aIp6Header); /** - * This method returns the next hop towards an RLOC16 destination. + * Returns the next hop towards an RLOC16 destination. * * @param[in] aDestination The RLOC16 of the destination. * @@ -1526,7 +1526,7 @@ protected: Mac::ShortAddress GetNextHop(uint16_t aDestination) const; /** - * This method generates an MLE Data Request message. + * Generates an MLE Data Request message. * * @param[in] aDestination The IPv6 destination address. * @@ -1538,7 +1538,7 @@ protected: #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE /** - * This method generates an MLE Data Request message which request Link Metrics Report TLV. + * Generates an MLE Data Request message which request Link Metrics Report TLV. * * @param[in] aDestination A reference to the IPv6 address of the destination. * @param[in] aQueryInfo A Link Metrics query info. @@ -1552,7 +1552,7 @@ protected: #endif /** - * This method generates an MLE Child Update Request message. + * Generates an MLE Child Update Request message. * * @retval kErrorNone Successfully generated an MLE Child Update Request message. * @retval kErrorNoBufs Insufficient buffers to generate the MLE Child Update Request message. @@ -1561,7 +1561,7 @@ protected: Error SendChildUpdateRequest(void); /** - * This method generates an MLE Child Update Response message. + * Generates an MLE Child Update Response message. * * @param[in] aTlvList A list of requested TLV types. * @param[in] aChallenge The Challenge for the response. @@ -1573,7 +1573,7 @@ protected: Error SendChildUpdateResponse(const TlvList &aTlvList, const Challenge &aChallenge); /** - * This method sets the RLOC16 assigned to the Thread interface. + * Sets the RLOC16 assigned to the Thread interface. * * @param[in] aRloc16 The RLOC16 to set. * @@ -1581,19 +1581,19 @@ protected: void SetRloc16(uint16_t aRloc16); /** - * This method sets the Device State to Detached. + * Sets the Device State to Detached. * */ void SetStateDetached(void); /** - * This method sets the Device State to Child. + * Sets the Device State to Child. * */ void SetStateChild(uint16_t aRloc16); /** - * This method sets the Leader's Partition ID, Weighting, and Router ID values. + * Sets the Leader's Partition ID, Weighting, and Router ID values. * * @param[in] aPartitionId The Leader's Partition ID value. * @param[in] aWeighting The Leader's Weighting value. @@ -1604,7 +1604,7 @@ protected: #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_INFO) /** - * This static method emits a log message with an IPv6 address. + * Emits a log message with an IPv6 address. * * @param[in] aAction The message action (send/receive/delay, etc). * @param[in] aType The message type. @@ -1614,7 +1614,7 @@ protected: static void Log(MessageAction aAction, MessageType aType, const Ip6::Address &aAddress); /** - * This static method emits a log message with an IPv6 address and RLOC16. + * Emits a log message with an IPv6 address and RLOC16. * * @param[in] aAction The message action (send/receive/delay, etc). * @param[in] aType The message type. @@ -1630,7 +1630,7 @@ protected: #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_WARN) /** - * This static method emits a log message indicating an error in processing of a message. + * Emits a log message indicating an error in processing of a message. * * Note that log message is emitted only if there is an error, i.e., @p aError is not `kErrorNone`. The log * message will have the format "Failed to process {aMessageString} : {ErrorString}". @@ -1642,7 +1642,7 @@ protected: static void LogProcessError(MessageType aType, Error aError); /** - * This static method emits a log message indicating an error when sending a message. + * Emits a log message indicating an error when sending a message. * * Note that log message is emitted only if there is an error, i.e. @p aError is not `kErrorNone`. The log * message will have the format "Failed to send {Message Type} : {ErrorString}". @@ -1658,7 +1658,7 @@ protected: #endif // #if OT_SHOULD_LOG_AT( OT_LOG_LEVEL_WARN) /** - * This method triggers MLE Announce on previous channel after the Thread device successfully + * Triggers MLE Announce on previous channel after the Thread device successfully * attaches and receives the new Active Commissioning Dataset if needed. * * MTD would send Announce immediately after attached. @@ -1668,7 +1668,7 @@ protected: void InformPreviousChannel(void); /** - * This method indicates whether or not in announce attach process. + * Indicates whether or not in announce attach process. * * @retval true if attaching/attached on the announced parameters, false otherwise. * @@ -1677,7 +1677,7 @@ protected: #if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_NOTE) /** - * This method converts an `AttachMode` enumeration value into a human-readable string. + * Converts an `AttachMode` enumeration value into a human-readable string. * * @param[in] aMode An attach mode * @@ -1687,7 +1687,7 @@ protected: static const char *AttachModeToString(AttachMode aMode); /** - * This method converts an `AttachState` enumeration value into a human-readable string. + * Converts an `AttachState` enumeration value into a human-readable string. * * @param[in] aState An attach state * @@ -1697,7 +1697,7 @@ protected: static const char *AttachStateToString(AttachState aState); /** - * This method converts a `ReattachState` enumeration value into a human-readable string. + * Converts a `ReattachState` enumeration value into a human-readable string. * * @param[in] aState A reattach state * @@ -1709,7 +1709,7 @@ protected: #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE /** - * This method sends a Link Metrics Management Request message. + * Sends a Link Metrics Management Request message. * * @param[in] aDestination A reference to the IPv6 address of the destination. * @param[in] aSubTlv A reference to the sub-TLV to include. @@ -1721,7 +1721,7 @@ protected: Error SendLinkMetricsManagementRequest(const Ip6::Address &aDestination, const ot::Tlv &aSubTlv); /** - * This method sends an MLE Link Probe message. + * Sends an MLE Link Probe message. * * @param[in] aDestination A reference to the IPv6 address of the destination. * @param[in] aSeriesId The Series ID [1, 254] which the Probe message targets at. diff --git a/src/core/thread/mle_router.hpp b/src/core/thread/mle_router.hpp index ac84f757f..48f18b463 100644 --- a/src/core/thread/mle_router.hpp +++ b/src/core/thread/mle_router.hpp @@ -70,7 +70,7 @@ namespace Mle { #if OPENTHREAD_FTD /** - * This class implements MLE functionality required by the Thread Router and Leader roles. + * Implements MLE functionality required by the Thread Router and Leader roles. * */ class MleRouter : public Mle @@ -82,7 +82,7 @@ class MleRouter : public Mle public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -90,7 +90,7 @@ public: explicit MleRouter(Instance &aInstance); /** - * This method indicates whether or not the device is router-eligible. + * Indicates whether or not the device is router-eligible. * * @retval true If device is router-eligible. * @retval false If device is not router-eligible. @@ -99,7 +99,7 @@ public: bool IsRouterEligible(void) const; /** - * This method sets whether or not the device is router-eligible. + * Sets whether or not the device is router-eligible. * * If @p aEligible is false and the device is currently operating as a router, this call will cause the device to * detach and attempt to reattach as a child. @@ -113,7 +113,7 @@ public: Error SetRouterEligible(bool aEligible); /** - * This method indicates whether a node is the only router on the network. + * Indicates whether a node is the only router on the network. * * @retval TRUE It is the only router in the network. * @retval FALSE It is a child or is not a single router in the network. @@ -122,7 +122,7 @@ public: bool IsSingleton(void) const; /** - * This method generates an Address Solicit request for a Router ID. + * Generates an Address Solicit request for a Router ID. * * @param[in] aStatus The reason for requesting a Router ID. * @@ -134,7 +134,7 @@ public: Error BecomeRouter(ThreadStatusTlv::Status aStatus); /** - * This method causes the Thread interface to become a Leader and start a new partition. + * Causes the Thread interface to become a Leader and start a new partition. * * @retval kErrorNone Successfully become a Leader and started a new partition. * @retval kErrorNotCapable Device is not capable of becoming a leader @@ -144,7 +144,7 @@ public: Error BecomeLeader(void); /** - * This method gets the device properties which are used to determine the Leader Weight. + * Gets the device properties which are used to determine the Leader Weight. * * @returns The current device properties. * @@ -152,7 +152,7 @@ public: const DeviceProperties &GetDeviceProperties(void) const { return mDeviceProperties; } /** - * This method sets the device properties which are then used to determine and set the Leader Weight. + * Sets the device properties which are then used to determine and set the Leader Weight. * * @param[in] aDeviceProperties The device properties. * @@ -160,7 +160,7 @@ public: void SetDeviceProperties(const DeviceProperties &aDeviceProperties); /** - * This method returns the Leader Weighting value for this Thread interface. + * Returns the Leader Weighting value for this Thread interface. * * @returns The Leader Weighting value for this Thread interface. * @@ -168,9 +168,9 @@ public: uint8_t GetLeaderWeight(void) const { return mLeaderWeight; } /** - * This method sets the Leader Weighting value for this Thread interface. + * Sets the Leader Weighting value for this Thread interface. * - * This method directly sets the Leader Weight to the new value replacing its previous value (which may have been + * Directly sets the Leader Weight to the new value replacing its previous value (which may have been * determined from a previous call to `SetDeviceProperties()`). * * @param[in] aWeight The Leader Weighting value. @@ -181,7 +181,7 @@ public: #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method returns the preferred Partition Id when operating in the Leader role for certification testing. + * Returns the preferred Partition Id when operating in the Leader role for certification testing. * * @returns The preferred Partition Id value. * @@ -189,7 +189,7 @@ public: uint32_t GetPreferredLeaderPartitionId(void) const { return mPreferredLeaderPartitionId; } /** - * This method sets the preferred Partition Id when operating in the Leader role for certification testing. + * Sets the preferred Partition Id when operating in the Leader role for certification testing. * * @param[in] aPartitionId The preferred Leader Partition Id. * @@ -198,7 +198,7 @@ public: #endif /** - * This method sets the preferred Router Id. Upon becoming a router/leader the node + * Sets the preferred Router Id. Upon becoming a router/leader the node * attempts to use this Router Id. If the preferred Router Id is not set or if it * can not be used, a randomly generated router Id is picked. * This property can be set when he device role is detached or disabled. @@ -212,13 +212,13 @@ public: Error SetPreferredRouterId(uint8_t aRouterId); /** - * This method gets the Partition Id which the device joined successfully once. + * Gets the Partition Id which the device joined successfully once. * */ uint32_t GetPreviousPartitionId(void) const { return mPreviousPartitionId; } /** - * This method sets the Partition Id which the device joins successfully. + * Sets the Partition Id which the device joins successfully. * * @param[in] aPartitionId The Partition Id. * @@ -226,7 +226,7 @@ public: void SetPreviousPartitionId(uint32_t aPartitionId) { mPreviousPartitionId = aPartitionId; } /** - * This method sets the Router Id. + * Sets the Router Id. * * @param[in] aRouterId The Router Id. * @@ -234,7 +234,7 @@ public: void SetRouterId(uint8_t aRouterId); /** - * This method returns the next hop towards an RLOC16 destination. + * Returns the next hop towards an RLOC16 destination. * * @param[in] aDestination The RLOC16 of the destination. * @@ -244,7 +244,7 @@ public: uint16_t GetNextHop(uint16_t aDestination) { return mRouterTable.GetNextHop(aDestination); } /** - * This method returns the NETWORK_ID_TIMEOUT value. + * Returns the NETWORK_ID_TIMEOUT value. * * @returns The NETWORK_ID_TIMEOUT value. * @@ -252,7 +252,7 @@ public: uint8_t GetNetworkIdTimeout(void) const { return mNetworkIdTimeout; } /** - * This method sets the NETWORK_ID_TIMEOUT value. + * Sets the NETWORK_ID_TIMEOUT value. * * @param[in] aTimeout The NETWORK_ID_TIMEOUT value. * @@ -260,7 +260,7 @@ public: void SetNetworkIdTimeout(uint8_t aTimeout) { mNetworkIdTimeout = aTimeout; } /** - * This method returns the ROUTER_SELECTION_JITTER value. + * Returns the ROUTER_SELECTION_JITTER value. * * @returns The ROUTER_SELECTION_JITTER value. * @@ -268,7 +268,7 @@ public: uint8_t GetRouterSelectionJitter(void) const { return mRouterSelectionJitter; } /** - * This method sets the ROUTER_SELECTION_JITTER value. + * Sets the ROUTER_SELECTION_JITTER value. * * @returns The ROUTER_SELECTION_JITTER value. * @@ -276,7 +276,7 @@ public: Error SetRouterSelectionJitter(uint8_t aRouterJitter); /** - * This method returns the current router selection jitter timeout value. + * Returns the current router selection jitter timeout value. * * @returns The current router selection jitter timeout value. * @@ -284,7 +284,7 @@ public: uint8_t GetRouterSelectionJitterTimeout(void) const { return mRouterSelectionJitterTimeout; } /** - * This method returns the ROUTER_UPGRADE_THRESHOLD value. + * Returns the ROUTER_UPGRADE_THRESHOLD value. * * @returns The ROUTER_UPGRADE_THRESHOLD value. * @@ -292,7 +292,7 @@ public: uint8_t GetRouterUpgradeThreshold(void) const { return mRouterUpgradeThreshold; } /** - * This method sets the ROUTER_UPGRADE_THRESHOLD value. + * Sets the ROUTER_UPGRADE_THRESHOLD value. * * @param[in] aThreshold The ROUTER_UPGRADE_THRESHOLD value. * @@ -300,7 +300,7 @@ public: void SetRouterUpgradeThreshold(uint8_t aThreshold) { mRouterUpgradeThreshold = aThreshold; } /** - * This method returns the ROUTER_DOWNGRADE_THRESHOLD value. + * Returns the ROUTER_DOWNGRADE_THRESHOLD value. * * @returns The ROUTER_DOWNGRADE_THRESHOLD value. * @@ -308,7 +308,7 @@ public: uint8_t GetRouterDowngradeThreshold(void) const { return mRouterDowngradeThreshold; } /** - * This method sets the ROUTER_DOWNGRADE_THRESHOLD value. + * Sets the ROUTER_DOWNGRADE_THRESHOLD value. * * @param[in] aThreshold The ROUTER_DOWNGRADE_THRESHOLD value. * @@ -316,7 +316,7 @@ public: void SetRouterDowngradeThreshold(uint8_t aThreshold) { mRouterDowngradeThreshold = aThreshold; } /** - * This method returns the MLE_CHILD_ROUTER_LINKS value. + * Returns the MLE_CHILD_ROUTER_LINKS value. * * @returns The MLE_CHILD_ROUTER_LINKS value. * @@ -324,7 +324,7 @@ public: uint8_t GetChildRouterLinks(void) const { return mChildRouterLinks; } /** - * This method sets the MLE_CHILD_ROUTER_LINKS value. + * Sets the MLE_CHILD_ROUTER_LINKS value. * * @param[in] aChildRouterLinks The MLE_CHILD_ROUTER_LINKS value. * @@ -334,7 +334,7 @@ public: Error SetChildRouterLinks(uint8_t aChildRouterLinks); /** - * This method returns if the REED is expected to become Router soon. + * Returns if the REED is expected to become Router soon. * * @retval TRUE If the REED is going to become a Router soon. * @retval FALSE If the REED is not going to become a Router soon. @@ -343,7 +343,7 @@ public: bool IsExpectedToBecomeRouterSoon(void) const; /** - * This method removes a link to a neighbor. + * Removes a link to a neighbor. * * @param[in] aNeighbor A reference to the neighbor object. * @@ -351,7 +351,7 @@ public: void RemoveNeighbor(Neighbor &aNeighbor); /** - * This method invalidates a direct link to a neighboring router (due to failed link-layer acks). + * Invalidates a direct link to a neighboring router (due to failed link-layer acks). * * @param[in] aRouter A reference to the router object. * @@ -359,7 +359,7 @@ public: void RemoveRouterLink(Router &aRouter); /** - * This method indicates whether or not the RLOC16 is an MTD child of this device. + * Indicates whether or not the RLOC16 is an MTD child of this device. * * @param[in] aRloc16 The RLOC16. * @@ -370,7 +370,7 @@ public: bool IsMinimalChild(uint16_t aRloc16); /** - * This method indicates whether or not the given Thread partition attributes are preferred. + * Indicates whether or not the given Thread partition attributes are preferred. * * @param[in] aSingletonA Whether or not the Thread Partition A has a single router. * @param[in] aLeaderDataA A reference to Thread Partition A's Leader Data. @@ -388,7 +388,7 @@ public: const LeaderData &aLeaderDataB); /** - * This method checks if the destination is reachable. + * Checks if the destination is reachable. * * @param[in] aMeshDest The RLOC16 of the destination. * @param[in] aIp6Header A reference to the IPv6 header of the message. @@ -400,7 +400,7 @@ public: Error CheckReachability(uint16_t aMeshDest, const Ip6::Header &aIp6Header); /** - * This method resolves 2-hop routing loops. + * Resolves 2-hop routing loops. * * @param[in] aSourceMac The RLOC16 of the previous hop. * @param[in] aDestRloc16 The RLOC16 of the final destination. @@ -409,7 +409,7 @@ public: void ResolveRoutingLoops(uint16_t aSourceMac, uint16_t aDestRloc16); /** - * This method checks if a given Router ID has correct value. + * Checks if a given Router ID has correct value. * * @param[in] aRouterId The Router ID value. * @@ -420,7 +420,7 @@ public: static bool IsRouterIdValid(uint8_t aRouterId) { return aRouterId <= kMaxRouterId; } /** - * This method fills an ConnectivityTlv. + * Fills an ConnectivityTlv. * * @param[out] aTlv A reference to the tlv to be filled. * @@ -428,7 +428,7 @@ public: void FillConnectivityTlv(ConnectivityTlv &aTlv); /** - * This method generates an MLE Child Update Request message to be sent to the parent. + * Generates an MLE Child Update Request message to be sent to the parent. * * @retval kErrorNone Successfully generated an MLE Child Update Request message. * @retval kErrorNoBufs Insufficient buffers to generate the MLE Child Update Request message. @@ -440,7 +440,7 @@ public: #if OPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE /** - * This method sets steering data out of band + * Sets steering data out of band * * @param[in] aExtAddress Value used to set steering data * All zeros clears steering data @@ -452,7 +452,7 @@ public: #endif /** - * This method gets the assigned parent priority. + * Gets the assigned parent priority. * * @returns The assigned parent priority value, -2 means not assigned. * @@ -460,7 +460,7 @@ public: int8_t GetAssignParentPriority(void) const { return mParentPriority; } /** - * This method sets the parent priority. + * Sets the parent priority. * * @param[in] aParentPriority The parent priority value. * @@ -471,7 +471,7 @@ public: Error SetAssignParentPriority(int8_t aParentPriority); /** - * This method gets the longest MLE Timeout TLV for all active MTD children. + * Gets the longest MLE Timeout TLV for all active MTD children. * * @param[out] aTimeout A reference to where the information is placed. * @@ -483,7 +483,7 @@ public: Error GetMaxChildTimeout(uint32_t &aTimeout) const; /** - * This function sets the callback that is called when processing an MLE Discovery Request message. + * Sets the callback that is called when processing an MLE Discovery Request message. * * @param[in] aCallback A pointer to a function that is called to deliver MLE Discovery Request data. * @param[in] aContext A pointer to application-specific context. @@ -495,14 +495,14 @@ public: } /** - * This method resets the MLE Advertisement Trickle timer interval. + * Resets the MLE Advertisement Trickle timer interval. * */ void ResetAdvertiseInterval(void); #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method generates an MLE Time Synchronization message. + * Generates an MLE Time Synchronization message. * * @retval kErrorNone Successfully sent an MLE Time Synchronization message. * @retval kErrorNoBufs Insufficient buffers to generate the MLE Time Synchronization message. @@ -513,7 +513,7 @@ public: #if OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE /** - * This method sets the delay before registering Backbone Router service. + * Sets the delay before registering Backbone Router service. * * @param[in] aDelay The delay before registering Backbone Router service. * @@ -522,7 +522,7 @@ public: #endif /** - * This method gets the maximum number of IP addresses that each MTD child may register with this device as parent. + * Gets the maximum number of IP addresses that each MTD child may register with this device as parent. * * @returns The maximum number of IP addresses that each MTD child may register with this device as parent. * @@ -531,7 +531,7 @@ public: #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method sets/restores the maximum number of IP addresses that each MTD child may register with this + * Sets/restores the maximum number of IP addresses that each MTD child may register with this * device as parent. * * @param[in] aMaxIpAddresses The maximum number of IP addresses that each MTD child may register with this @@ -544,7 +544,7 @@ public: Error SetMaxChildIpAddresses(uint8_t aMaxIpAddresses); /** - * This method sets whether the device was commissioned using CCM. + * Sets whether the device was commissioned using CCM. * * @param[in] aEnabled TRUE if the device was commissioned using CCM, FALSE otherwise. * @@ -552,7 +552,7 @@ public: void SetCcmEnabled(bool aEnabled) { mCcmEnabled = aEnabled; } /** - * This function sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled. + * Sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled. * * @param[in] aEnabled TRUE to enable Security Policy TLV version-threshold for routing, FALSE otherwise. * diff --git a/src/core/thread/mle_tlvs.hpp b/src/core/thread/mle_tlvs.hpp index 7449965b9..467622717 100644 --- a/src/core/thread/mle_tlvs.hpp +++ b/src/core/thread/mle_tlvs.hpp @@ -63,7 +63,7 @@ using ot::Encoding::BigEndian::HostSwap32; */ /** - * This class implements MLE TLV generation and parsing. + * Implements MLE TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -125,7 +125,7 @@ public: }; /** - * This method returns the Type value. + * Returns the Type value. * * @returns The Type value. * @@ -133,7 +133,7 @@ public: Type GetType(void) const { return static_cast(ot::Tlv::GetType()); } /** - * This method sets the Type value. + * Sets the Type value. * * @param[in] aType The Type value. * @@ -143,109 +143,109 @@ public: } OT_TOOL_PACKED_END; /** - * This class defines Source Address TLV constants and types. + * Defines Source Address TLV constants and types. * */ typedef UintTlvInfo SourceAddressTlv; /** - * This class defines Mode TLV constants and types. + * Defines Mode TLV constants and types. * */ typedef UintTlvInfo ModeTlv; /** - * This class defines Timeout TLV constants and types. + * Defines Timeout TLV constants and types. * */ typedef UintTlvInfo TimeoutTlv; /** - * This class defines Challenge TLV constants and types. + * Defines Challenge TLV constants and types. * */ typedef TlvInfo ChallengeTlv; /** - * This class defines Response TLV constants and types. + * Defines Response TLV constants and types. * */ typedef TlvInfo ResponseTlv; /** - * This class defines Link Frame Counter TLV constants and types. + * Defines Link Frame Counter TLV constants and types. * */ typedef UintTlvInfo LinkFrameCounterTlv; /** - * This class defines MLE Frame Counter TLV constants and types. + * Defines MLE Frame Counter TLV constants and types. * */ typedef UintTlvInfo MleFrameCounterTlv; /** - * This class defines Address16 TLV constants and types. + * Defines Address16 TLV constants and types. * */ typedef UintTlvInfo Address16Tlv; /** - * This class defines Network Data TLV constants and types. + * Defines Network Data TLV constants and types. * */ typedef TlvInfo NetworkDataTlv; /** - * This class defines TLV Request TLV constants and types. + * Defines TLV Request TLV constants and types. * */ typedef TlvInfo TlvRequestTlv; /** - * This class defines Link Margin TLV constants and types. + * Defines Link Margin TLV constants and types. * */ typedef UintTlvInfo LinkMarginTlv; /** - * This class defines Version TLV constants and types. + * Defines Version TLV constants and types. * */ typedef UintTlvInfo VersionTlv; /** - * This class defines PAN ID TLV constants and types. + * Defines PAN ID TLV constants and types. * */ typedef UintTlvInfo PanIdTlv; /** - * This class defines Active Timestamp TLV constants and types. + * Defines Active Timestamp TLV constants and types. * */ typedef SimpleTlvInfo ActiveTimestampTlv; /** - * This class defines Pending Timestamp TLV constants and types. + * Defines Pending Timestamp TLV constants and types. * */ typedef SimpleTlvInfo PendingTimestampTlv; /** - * This class defines Timeout TLV constants and types. + * Defines Timeout TLV constants and types. * */ typedef UintTlvInfo SupervisionIntervalTlv; /** - * This class defines CSL Timeout TLV constants and types. + * Defines CSL Timeout TLV constants and types. * */ typedef UintTlvInfo CslTimeoutTlv; /** - * This class defines XTAL Accuracy TLV constants and types. + * Defines XTAL Accuracy TLV constants and types. * */ typedef UintTlvInfo XtalAccuracyTlv; @@ -253,7 +253,7 @@ typedef UintTlvInfo XtalAccuracyTlv; #if !OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE /** - * This class implements Route TLV generation and parsing. + * Implements Route TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -261,13 +261,13 @@ class RouteTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void); /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -276,7 +276,7 @@ public: bool IsValid(void) const; /** - * This method returns the Router ID Sequence value. + * Returns the Router ID Sequence value. * * @returns The Router ID Sequence value. * @@ -284,7 +284,7 @@ public: uint8_t GetRouterIdSequence(void) const { return mRouterIdSequence; } /** - * This method sets the Router ID Sequence value. + * Sets the Router ID Sequence value. * * @param[in] aSequence The Router ID Sequence value. * @@ -292,13 +292,13 @@ public: void SetRouterIdSequence(uint8_t aSequence) { mRouterIdSequence = aSequence; } /** - * This method gets the Router ID Mask. + * Gets the Router ID Mask. * */ const RouterIdSet &GetRouterIdMask(void) const { return mRouterIdMask; } /** - * This method sets the Router ID Mask. + * Sets the Router ID Mask. * * @param[in] aRouterIdSet The Router ID Mask to set. * @@ -306,7 +306,7 @@ public: void SetRouterIdMask(const RouterIdSet &aRouterIdSet) { mRouterIdMask = aRouterIdSet; } /** - * This method indicates whether or not a Router ID bit is set. + * Indicates whether or not a Router ID bit is set. * * @param[in] aRouterId The Router ID bit. * @@ -317,7 +317,7 @@ public: bool IsRouterIdSet(uint8_t aRouterId) const { return mRouterIdMask.Contains(aRouterId); } /** - * This method indicates whether the `RouteTlv` is a singleton, i.e., only one router is allocated. + * Indicates whether the `RouteTlv` is a singleton, i.e., only one router is allocated. * * @retval TRUE It is a singleton. * @retval FALSE It is not a singleton. @@ -326,7 +326,7 @@ public: bool IsSingleton(void) const { return IsValid() && (mRouterIdMask.GetNumberOfAllocatedIds() <= 1); } /** - * This method returns the Route Data Length value. + * Returns the Route Data Length value. * * @returns The Route Data Length value. * @@ -334,7 +334,7 @@ public: uint8_t GetRouteDataLength(void) const { return GetLength() - sizeof(mRouterIdSequence) - sizeof(mRouterIdMask); } /** - * This method sets the Route Data Length value. + * Sets the Route Data Length value. * * @param[in] aLength The Route Data Length value. * @@ -342,7 +342,7 @@ public: void SetRouteDataLength(uint8_t aLength) { SetLength(sizeof(mRouterIdSequence) + sizeof(mRouterIdMask) + aLength); } /** - * This method returns the Route Cost value for a given Router index. + * Returns the Route Cost value for a given Router index. * * @param[in] aRouterIndex The Router index. * @@ -352,7 +352,7 @@ public: uint8_t GetRouteCost(uint8_t aRouterIndex) const { return mRouteData[aRouterIndex] & kRouteCostMask; } /** - * This method returns the Link Quality In value for a given Router index. + * Returns the Link Quality In value for a given Router index. * * @param[in] aRouterIndex The Router index. * @@ -365,7 +365,7 @@ public: } /** - * This method returns the Link Quality Out value for a given Router index. + * Returns the Link Quality Out value for a given Router index. * * @param[in] aRouterIndex The Router index. * @@ -378,7 +378,7 @@ public: } /** - * This method sets the Route Data (Link Quality In/Out and Route Cost) for a given Router index. + * Sets the Route Data (Link Quality In/Out and Route Cost) for a given Router index. * * @param[in] aRouterIndex The Router index. * @param[in] aLinkQualityIn The Link Quality In value. @@ -409,7 +409,7 @@ private: #else // OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE /** - * This class implements Route TLV generation and parsing. + * Implements Route TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -417,7 +417,7 @@ class RouteTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -427,7 +427,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -436,7 +436,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(mRouterIdSequence) + sizeof(mRouterIdMask); } /** - * This method returns the Router ID Sequence value. + * Returns the Router ID Sequence value. * * @returns The Router ID Sequence value. * @@ -444,7 +444,7 @@ public: uint8_t GetRouterIdSequence(void) const { return mRouterIdSequence; } /** - * This method sets the Router ID Sequence value. + * Sets the Router ID Sequence value. * * @param[in] aSequence The Router ID Sequence value. * @@ -452,13 +452,13 @@ public: void SetRouterIdSequence(uint8_t aSequence) { mRouterIdSequence = aSequence; } /** - * This method gets the Router ID Mask. + * Gets the Router ID Mask. * */ const RouterIdSet &GetRouterIdMask(void) const { return mRouterIdMask; } /** - * This method sets the Router ID Mask. + * Sets the Router ID Mask. * * @param[in] aRouterIdSet The Router ID Mask to set. * @@ -466,7 +466,7 @@ public: void SetRouterIdMask(const RouterIdSet &aRouterIdSet) { mRouterIdMask = aRouterIdSet; } /** - * This method indicates whether or not a Router ID bit is set. + * Indicates whether or not a Router ID bit is set. * * @param[in] aRouterId The Router ID. * @@ -477,7 +477,7 @@ public: bool IsRouterIdSet(uint8_t aRouterId) const { return mRouterIdMask.Contains(aRouterId); } /** - * This method indicates whether the `RouteTlv` is a singleton, i.e., only one router is allocated. + * Indicates whether the `RouteTlv` is a singleton, i.e., only one router is allocated. * * @retval TRUE It is a singleton. * @retval FALSE It is not a singleton. @@ -486,7 +486,7 @@ public: bool IsSingleton(void) const { return IsValid() && (mRouterIdMask.GetNumberOfAllocatedIds() <= 1); } /** - * This method sets the Router ID bit. + * Sets the Router ID bit. * * @param[in] aRouterId The Router ID bit to set. * @@ -494,7 +494,7 @@ public: void SetRouterId(uint8_t aRouterId) { mRouterIdMask.Add(aRouterId); } /** - * This method returns the Route Data Length value. + * Returns the Route Data Length value. * * @returns The Route Data Length value in bytes * @@ -502,7 +502,7 @@ public: uint8_t GetRouteDataLength(void) const { return GetLength() - sizeof(mRouterIdSequence) - sizeof(mRouterIdMask); } /** - * This method sets the Route Data Length value. + * Sets the Route Data Length value. * * @param[in] aLength The Route Data Length value in number of router entries * @@ -513,7 +513,7 @@ public: } /** - * This method returns the Route Cost value for a given Router index. + * Returns the Route Cost value for a given Router index. * * @param[in] aRouterIndex The Router index. * @@ -537,7 +537,7 @@ public: } /** - * This method returns the Link Quality In value for a given Router index. + * Returns the Link Quality In value for a given Router index. * * @param[in] aRouterIndex The Router index. * @@ -553,7 +553,7 @@ public: } /** - * This method returns the Link Quality Out value for a given Router index. + * Returns the Link Quality Out value for a given Router index. * * @param[in] aRouterIndex The Router index. * @@ -569,7 +569,7 @@ public: } /** - * This method sets the Route Data (Link Quality In/Out and Route Cost) for a given Router index. + * Sets the Route Data (Link Quality In/Out and Route Cost) for a given Router index. * * @param[in] aRouterIndex The Router index. * @param[in] aLinkQualityIn The Link Quality In value. @@ -636,7 +636,7 @@ private: #endif // OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE /** - * This class implements Leader Data TLV generation and parsing. + * Implements Leader Data TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -644,7 +644,7 @@ class LeaderDataTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -654,7 +654,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -663,7 +663,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method gets the Leader Data info from TLV. + * Gets the Leader Data info from TLV. * * @param[out] aLeaderData A reference to output Leader Data info. * @@ -678,7 +678,7 @@ public: } /** - * This method sets the Leader Data. + * Sets the Leader Data. * * @param[in] aLeaderData A Leader Data. * @@ -701,7 +701,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Scan Mask TLV generation and parsing. + * Implements Scan Mask TLV generation and parsing. * */ class ScanMaskTlv : public UintTlvInfo @@ -711,7 +711,7 @@ public: static constexpr uint8_t kEndDeviceFlag = 1 << 6; ///< Scan Mask End Device Flag. /** - * This method indicates whether or not the Router flag is set. + * Indicates whether or not the Router flag is set. * * @param[in] aMask A scan mask value. * @@ -721,7 +721,7 @@ public: static bool IsRouterFlagSet(uint8_t aMask) { return (aMask & kRouterFlag) != 0; } /** - * This method indicates whether or not the End Device flag is set. + * Indicates whether or not the End Device flag is set. * * @param[in] aMask A scan mask value. * @@ -732,7 +732,7 @@ public: }; /** - * This class implements Connectivity TLV generation and parsing. + * Implements Connectivity TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -740,7 +740,7 @@ class ConnectivityTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -750,7 +750,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -763,7 +763,7 @@ public: } /** - * This method indicates whether or not the sed buffer size and datagram count are included. + * Indicates whether or not the sed buffer size and datagram count are included. * * @retval TRUE If the sed buffer size and datagram count are included. * @retval FALSE If the sed buffer size and datagram count are not included. @@ -772,7 +772,7 @@ public: bool IsSedBufferingIncluded(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Parent Priority value. + * Returns the Parent Priority value. * * @returns The Parent Priority value. * @@ -780,7 +780,7 @@ public: int8_t GetParentPriority(void) const; /** - * This method sets the Parent Priority value. + * Sets the Parent Priority value. * * @param[in] aParentPriority The Parent Priority value. * @@ -788,7 +788,7 @@ public: void SetParentPriority(int8_t aParentPriority); /** - * This method returns the Link Quality 3 value. + * Returns the Link Quality 3 value. * * @returns The Link Quality 3 value. * @@ -796,7 +796,7 @@ public: uint8_t GetLinkQuality3(void) const { return mLinkQuality3; } /** - * This method sets the Link Quality 3 value. + * Sets the Link Quality 3 value. * * @param[in] aLinkQuality The Link Quality 3 value. * @@ -804,7 +804,7 @@ public: void SetLinkQuality3(uint8_t aLinkQuality) { mLinkQuality3 = aLinkQuality; } /** - * This method returns the Link Quality 2 value. + * Returns the Link Quality 2 value. * * @returns The Link Quality 2 value. * @@ -812,7 +812,7 @@ public: uint8_t GetLinkQuality2(void) const { return mLinkQuality2; } /** - * This method sets the Link Quality 2 value. + * Sets the Link Quality 2 value. * * @param[in] aLinkQuality The Link Quality 2 value. * @@ -820,7 +820,7 @@ public: void SetLinkQuality2(uint8_t aLinkQuality) { mLinkQuality2 = aLinkQuality; } /** - * This method sets the Link Quality 1 value. + * Sets the Link Quality 1 value. * * @returns The Link Quality 1 value. * @@ -828,7 +828,7 @@ public: uint8_t GetLinkQuality1(void) const { return mLinkQuality1; } /** - * This method sets the Link Quality 1 value. + * Sets the Link Quality 1 value. * * @param[in] aLinkQuality The Link Quality 1 value. * @@ -836,7 +836,7 @@ public: void SetLinkQuality1(uint8_t aLinkQuality) { mLinkQuality1 = aLinkQuality; } /** - * This method increments the Link Quality N field in TLV for a given Link Quality N (1,2,3). + * Increments the Link Quality N field in TLV for a given Link Quality N (1,2,3). * * The Link Quality N field specifies the number of neighboring router devices with which the sender shares a link * of quality N. @@ -847,7 +847,7 @@ public: void IncrementLinkQuality(LinkQuality aLinkQuality); /** - * This method sets the Active Routers value. + * Sets the Active Routers value. * * @returns The Active Routers value. * @@ -855,7 +855,7 @@ public: uint8_t GetActiveRouters(void) const { return mActiveRouters; } /** - * This method sets the Active Routers value. + * Sets the Active Routers value. * * @param[in] aActiveRouters The Active Routers value. * @@ -863,7 +863,7 @@ public: void SetActiveRouters(uint8_t aActiveRouters) { mActiveRouters = aActiveRouters; } /** - * This method returns the Leader Cost value. + * Returns the Leader Cost value. * * @returns The Leader Cost value. * @@ -871,7 +871,7 @@ public: uint8_t GetLeaderCost(void) const { return mLeaderCost; } /** - * This method sets the Leader Cost value. + * Sets the Leader Cost value. * * @param[in] aCost The Leader Cost value. * @@ -879,7 +879,7 @@ public: void SetLeaderCost(uint8_t aCost) { mLeaderCost = aCost; } /** - * This method returns the ID Sequence value. + * Returns the ID Sequence value. * * @returns The ID Sequence value. * @@ -887,7 +887,7 @@ public: uint8_t GetIdSequence(void) const { return mIdSequence; } /** - * This method sets the ID Sequence value. + * Sets the ID Sequence value. * * @param[in] aSequence The ID Sequence value. * @@ -895,7 +895,7 @@ public: void SetIdSequence(uint8_t aSequence) { mIdSequence = aSequence; } /** - * This method returns the SED Buffer Size value. + * Returns the SED Buffer Size value. * * @returns The SED Buffer Size value. * @@ -912,7 +912,7 @@ public: } /** - * This method sets the SED Buffer Size value. + * Sets the SED Buffer Size value. * * @param[in] aSedBufferSize The SED Buffer Size value. * @@ -920,7 +920,7 @@ public: void SetSedBufferSize(uint16_t aSedBufferSize) { mSedBufferSize = HostSwap16(aSedBufferSize); } /** - * This method returns the SED Datagram Count value. + * Returns the SED Datagram Count value. * * @returns The SED Datagram Count value. * @@ -937,7 +937,7 @@ public: } /** - * This method sets the SED Datagram Count value. + * Sets the SED Datagram Count value. * * @param[in] aSedDatagramCount The SED Datagram Count value. * @@ -960,7 +960,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class specifies Status TLV status values. + * Specifies Status TLV status values. * */ struct StatusTlv : public UintTlvInfo @@ -975,7 +975,7 @@ struct StatusTlv : public UintTlvInfo }; /** - * This class provides constants and methods for generation and parsing of Address Registration TLV. + * Provides constants and methods for generation and parsing of Address Registration TLV. * */ class AddressRegistrationTlv : public TlvInfo @@ -989,7 +989,7 @@ public: static constexpr uint8_t kControlByteUncompressed = 0; /** - * This static method returns the control byte to use in a compressed entry where the 64-prefix is replaced with a + * Returns the control byte to use in a compressed entry where the 64-prefix is replaced with a * 6LoWPAN context identifier. * * @param[in] aContextId The 6LoWPAN context ID. @@ -1000,7 +1000,7 @@ public: static uint8_t ControlByteFor(uint8_t aContextId) { return kCompressed | (aContextId & kContextIdMask); } /** - * This static method indicates whether or not an address entry is using compressed format. + * Indicates whether or not an address entry is using compressed format. * * @param[in] aControlByte The control byte (the first byte in the entry). * @@ -1011,7 +1011,7 @@ public: static bool IsEntryCompressed(uint8_t aControlByte) { return (aControlByte & kCompressed); } /** - * This static method gets the context ID in a compressed entry. + * Gets the context ID in a compressed entry. * * @param[in] aControlByte The control byte (the first byte in the entry). * @@ -1028,7 +1028,7 @@ private: }; /** - * This class implements Channel TLV generation and parsing. + * Implements Channel TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1036,7 +1036,7 @@ class ChannelTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1046,7 +1046,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1055,7 +1055,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Channel Page value. + * Returns the Channel Page value. * * @returns The Channel Page value. * @@ -1063,7 +1063,7 @@ public: uint8_t GetChannelPage(void) const { return mChannelPage; } /** - * This method sets the Channel Page value. + * Sets the Channel Page value. * * @param[in] aChannelPage The Channel Page value. * @@ -1071,7 +1071,7 @@ public: void SetChannelPage(uint8_t aChannelPage) { mChannelPage = aChannelPage; } /** - * This method returns the Channel value. + * Returns the Channel value. * * @returns The Channel value. * @@ -1079,7 +1079,7 @@ public: uint16_t GetChannel(void) const { return HostSwap16(mChannel); } /** - * This method sets the Channel value. + * Sets the Channel value. * * @param[in] aChannel The Channel value. * @@ -1093,13 +1093,13 @@ private: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This class defines Time Request TLV constants and types. + * Defines Time Request TLV constants and types. * */ typedef TlvInfo TimeRequestTlv; /** - * This class implements Time Parameter TLV generation and parsing. + * Implements Time Parameter TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1107,7 +1107,7 @@ class TimeParameterTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1117,7 +1117,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1126,7 +1126,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the time sync period. + * Returns the time sync period. * * @returns The time sync period. * @@ -1134,7 +1134,7 @@ public: uint16_t GetTimeSyncPeriod(void) const { return HostSwap16(mTimeSyncPeriod); } /** - * This method sets the time sync period. + * Sets the time sync period. * * @param[in] aTimeSyncPeriod The time sync period. * @@ -1142,7 +1142,7 @@ public: void SetTimeSyncPeriod(uint16_t aTimeSyncPeriod) { mTimeSyncPeriod = HostSwap16(aTimeSyncPeriod); } /** - * This method returns the XTAL accuracy threshold. + * Returns the XTAL accuracy threshold. * * @returns The XTAL accuracy threshold. * @@ -1150,7 +1150,7 @@ public: uint16_t GetXtalThreshold(void) const { return HostSwap16(mXtalThreshold); } /** - * This method sets the XTAL accuracy threshold. + * Sets the XTAL accuracy threshold. * * @param[in] aXTALThreshold The XTAL accuracy threshold. * @@ -1166,7 +1166,7 @@ private: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE || (OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE) /** - * This class implements CSL Channel TLV generation and parsing. + * Implements CSL Channel TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1174,7 +1174,7 @@ class CslChannelTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1184,7 +1184,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1193,7 +1193,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the Channel Page value. + * Returns the Channel Page value. * * @returns The Channel Page value. * @@ -1201,7 +1201,7 @@ public: uint8_t GetChannelPage(void) const { return mChannelPage; } /** - * This method sets the Channel Page value. + * Sets the Channel Page value. * * @param[in] aChannelPage The Channel Page value. * @@ -1209,7 +1209,7 @@ public: void SetChannelPage(uint8_t aChannelPage) { mChannelPage = aChannelPage; } /** - * This method returns the Channel value. + * Returns the Channel value. * * @returns The Channel value. * @@ -1217,7 +1217,7 @@ public: uint16_t GetChannel(void) const { return HostSwap16(mChannel); } /** - * This method sets the Channel value. + * Sets the Channel value. * * @param[in] aChannel The Channel value. * @@ -1233,7 +1233,7 @@ private: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE || OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE /** - * This class implements CSL Clock Accuracy TLV generation and parsing. + * Implements CSL Clock Accuracy TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1241,7 +1241,7 @@ class CslClockAccuracyTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1251,7 +1251,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1260,7 +1260,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the CSL Clock Accuracy value. + * Returns the CSL Clock Accuracy value. * * @returns The CSL Clock Accuracy value. * @@ -1268,7 +1268,7 @@ public: uint8_t GetCslClockAccuracy(void) const { return mCslClockAccuracy; } /** - * This method sets the CSL Clock Accuracy value. + * Sets the CSL Clock Accuracy value. * * @param[in] aCslClockAccuracy The CSL Clock Accuracy value. * @@ -1276,7 +1276,7 @@ public: void SetCslClockAccuracy(uint8_t aCslClockAccuracy) { mCslClockAccuracy = aCslClockAccuracy; } /** - * This method returns the Clock Uncertainty value. + * Returns the Clock Uncertainty value. * * @returns The Clock Uncertainty value. * @@ -1284,7 +1284,7 @@ public: uint8_t GetCslUncertainty(void) const { return mCslUncertainty; } /** - * This method sets the CSL Uncertainty value. + * Sets the CSL Uncertainty value. * * @param[in] aCslUncertainty The CSL Uncertainty value. * diff --git a/src/core/thread/mle_types.hpp b/src/core/thread/mle_types.hpp index 286e63ae6..e885504b3 100644 --- a/src/core/thread/mle_types.hpp +++ b/src/core/thread/mle_types.hpp @@ -193,7 +193,7 @@ constexpr int8_t kParentPriorityLow = -1; ///< Parent Priority Low constexpr int8_t kParentPriorityUnspecified = -2; ///< Parent Priority Unspecified /** - * This type represents a Thread device role. + * Represents a Thread device role. * */ enum DeviceRole : uint8_t @@ -221,7 +221,7 @@ constexpr uint8_t kServiceMinId = 0x00; ///< Minimal Service ID. constexpr uint8_t kServiceMaxId = 0x0f; ///< Maximal Service ID. /** - * This enumeration specifies the leader role start mode. + * Specifies the leader role start mode. * * The start mode indicates whether device is starting normally as leader or restoring its role after reset. * @@ -293,7 +293,7 @@ enum class ChildDuaState : uint8_t #endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 /** - * This type represents a MLE device mode. + * Represents a MLE device mode. * */ class DeviceMode : public Equatable @@ -307,7 +307,7 @@ public: static constexpr uint16_t kInfoStringSize = 45; ///< String buffer size used for `ToString()`. /** - * This type defines the fixed-length `String` object returned from `ToString()`. + * Defines the fixed-length `String` object returned from `ToString()`. * */ typedef String InfoString; @@ -325,7 +325,7 @@ public: DeviceMode(void) = default; /** - * This constructor initializes a `DeviceMode` object from a given mode TLV bitmask. + * Initializes a `DeviceMode` object from a given mode TLV bitmask. * * @param[in] aMode A mode TLV bitmask to initialize the `DeviceMode` object. * @@ -333,7 +333,7 @@ public: explicit DeviceMode(uint8_t aMode) { Set(aMode); } /** - * This constructor initializes a `DeviceMode` object from a given mode configuration structure. + * Initializes a `DeviceMode` object from a given mode configuration structure. * * @param[in] aModeConfig A mode configuration to initialize the `DeviceMode` object. * @@ -341,7 +341,7 @@ public: explicit DeviceMode(ModeConfig aModeConfig) { Set(aModeConfig); } /** - * This method gets the device mode as a mode TLV bitmask. + * Gets the device mode as a mode TLV bitmask. * * @returns The device mode as a mode TLV bitmask. * @@ -349,7 +349,7 @@ public: uint8_t Get(void) const { return mMode; } /** - * This method sets the device mode from a given mode TLV bitmask. + * Sets the device mode from a given mode TLV bitmask. * * @param[in] aMode A mode TLV bitmask. * @@ -357,7 +357,7 @@ public: void Set(uint8_t aMode) { mMode = aMode | kModeReserved; } /** - * This method gets the device mode as a mode configuration structure. + * Gets the device mode as a mode configuration structure. * * @param[out] aModeConfig A reference to a mode configuration structure to output the device mode. * @@ -373,7 +373,7 @@ public: void Set(const ModeConfig &aModeConfig); /** - * This method indicates whether or not the device is rx-on-when-idle. + * Indicates whether or not the device is rx-on-when-idle. * * @retval TRUE If the device is rx-on-when-idle (non-sleepy). * @retval FALSE If the device is not rx-on-when-idle (sleepy). @@ -382,7 +382,7 @@ public: bool IsRxOnWhenIdle(void) const { return (mMode & kModeRxOnWhenIdle) != 0; } /** - * This method indicates whether or not the device is a Full Thread Device. + * Indicates whether or not the device is a Full Thread Device. * * @retval TRUE If the device is Full Thread Device. * @retval FALSE If the device if not Full Thread Device. @@ -391,7 +391,7 @@ public: bool IsFullThreadDevice(void) const { return (mMode & kModeFullThreadDevice) != 0; } /** - * This method gets the Network Data type (full set or stable subset) that the device requests. + * Gets the Network Data type (full set or stable subset) that the device requests. * * @returns The Network Data type requested by this device. * @@ -402,7 +402,7 @@ public: } /** - * This method indicates whether or not the device is a Minimal End Device. + * Indicates whether or not the device is a Minimal End Device. * * @retval TRUE If the device is a Minimal End Device. * @retval FALSE If the device is not a Minimal End Device. @@ -414,7 +414,7 @@ public: } /** - * This method indicates whether or not the device mode flags are valid. + * Indicates whether or not the device mode flags are valid. * * An FTD which is not rx-on-when-idle (is sleepy) is considered invalid. * @@ -426,7 +426,7 @@ public: bool IsValid(void) const { return !IsFullThreadDevice() || IsRxOnWhenIdle(); } /** - * This method converts the device mode into a human-readable string. + * Converts the device mode into a human-readable string. * * @returns An `InfoString` object representing the device mode. * @@ -439,7 +439,7 @@ private: #if OPENTHREAD_FTD /** - * This class represents device properties. + * Represents device properties. * * The device properties are used for calculating the local leader weight on the device. * @@ -448,7 +448,7 @@ class DeviceProperties : public otDeviceProperties, public Clearable { public: /** - * This method returns the Partition ID value. + * Returns the Partition ID value. * * @returns The Partition ID value. * @@ -514,7 +514,7 @@ public: uint32_t GetPartitionId(void) const { return mPartitionId; } /** - * This method sets the Partition ID value. + * Sets the Partition ID value. * * @param[in] aPartitionId The Partition ID value. * @@ -522,7 +522,7 @@ public: void SetPartitionId(uint32_t aPartitionId) { mPartitionId = aPartitionId; } /** - * This method returns the Weighting value. + * Returns the Weighting value. * * @returns The Weighting value. * @@ -530,7 +530,7 @@ public: uint8_t GetWeighting(void) const { return mWeighting; } /** - * This method sets the Weighting value. + * Sets the Weighting value. * * @param[in] aWeighting The Weighting value. * @@ -538,7 +538,7 @@ public: void SetWeighting(uint8_t aWeighting) { mWeighting = aWeighting; } /** - * This method returns the Data Version value for a type (full set or stable subset). + * Returns the Data Version value for a type (full set or stable subset). * * @param[in] aType The Network Data type (full set or stable subset). * @@ -551,7 +551,7 @@ public: } /** - * This method sets the Data Version value. + * Sets the Data Version value. * * @param[in] aVersion The Data Version value. * @@ -559,7 +559,7 @@ public: void SetDataVersion(uint8_t aVersion) { mDataVersion = aVersion; } /** - * This method sets the Stable Data Version value. + * Sets the Stable Data Version value. * * @param[in] aVersion The Stable Data Version value. * @@ -567,7 +567,7 @@ public: void SetStableDataVersion(uint8_t aVersion) { mStableDataVersion = aVersion; } /** - * This method returns the Leader Router ID value. + * Returns the Leader Router ID value. * * @returns The Leader Router ID value. * @@ -575,7 +575,7 @@ public: uint8_t GetLeaderRouterId(void) const { return mLeaderRouterId; } /** - * This method sets the Leader Router ID value. + * Sets the Leader Router ID value. * * @param[in] aRouterId The Leader Router ID value. * @@ -588,13 +588,13 @@ class RouterIdSet : public Equatable { public: /** - * This method clears the Router Id Set. + * Clears the Router Id Set. * */ void Clear(void) { memset(mRouterIdSet, 0, sizeof(mRouterIdSet)); } /** - * This method indicates whether or not a Router ID bit is set. + * Indicates whether or not a Router ID bit is set. * * @param[in] aRouterId The Router ID. * @@ -605,7 +605,7 @@ public: bool Contains(uint8_t aRouterId) const { return (mRouterIdSet[aRouterId / 8] & MaskFor(aRouterId)) != 0; } /** - * This method sets a given Router ID. + * Sets a given Router ID. * * @param[in] aRouterId The Router ID to set. * @@ -613,7 +613,7 @@ public: void Add(uint8_t aRouterId) { mRouterIdSet[aRouterId / 8] |= MaskFor(aRouterId); } /** - * This method removes a given Router ID. + * Removes a given Router ID. * * @param[in] aRouterId The Router ID to remove. * @@ -621,7 +621,7 @@ public: void Remove(uint8_t aRouterId) { mRouterIdSet[aRouterId / 8] &= ~MaskFor(aRouterId); } /** - * This method calculates the number of allocated Router IDs in the set. + * Calculates the number of allocated Router IDs in the set. * * @returns The number of allocated Router IDs in the set. * @@ -635,25 +635,25 @@ private: } OT_TOOL_PACKED_END; /** - * This class represents a MLE Key Material + * Represents a MLE Key Material * */ typedef Mac::KeyMaterial KeyMaterial; /** - * This class represents a MLE Key. + * Represents a MLE Key. * */ typedef Mac::Key Key; /** - * This structure represents the Thread MLE counters. + * Represents the Thread MLE counters. * */ typedef otMleCounters Counters; /** - * This function derives the Child ID from a given RLOC16. + * Derives the Child ID from a given RLOC16. * * @param[in] aRloc16 The RLOC16 value. * @@ -663,7 +663,7 @@ typedef otMleCounters Counters; inline uint16_t ChildIdFromRloc16(uint16_t aRloc16) { return aRloc16 & kMaxChildId; } /** - * This function derives the Router ID portion from a given RLOC16. + * Derives the Router ID portion from a given RLOC16. * * @param[in] aRloc16 The RLOC16 value. * @@ -673,7 +673,7 @@ inline uint16_t ChildIdFromRloc16(uint16_t aRloc16) { return aRloc16 & kMaxChild inline uint8_t RouterIdFromRloc16(uint16_t aRloc16) { return aRloc16 >> kRouterIdOffset; } /** - * This function returns whether the two RLOC16 have the same Router ID. + * Returns whether the two RLOC16 have the same Router ID. * * @param[in] aRloc16A The first RLOC16 value. * @param[in] aRloc16B The second RLOC16 value. @@ -687,7 +687,7 @@ inline bool RouterIdMatch(uint16_t aRloc16A, uint16_t aRloc16B) } /** - * This function returns the Service ID corresponding to a Service ALOC16. + * Returns the Service ID corresponding to a Service ALOC16. * * @param[in] aAloc16 The Service ALOC16 value. * @@ -697,7 +697,7 @@ inline bool RouterIdMatch(uint16_t aRloc16A, uint16_t aRloc16B) inline uint8_t ServiceIdFromAloc(uint16_t aAloc16) { return static_cast(aAloc16 - kAloc16ServiceStart); } /** - * This function returns the Service ALOC16 corresponding to a Service ID. + * Returns the Service ALOC16 corresponding to a Service ID. * * @param[in] aServiceId The Service ID value. * @@ -710,7 +710,7 @@ inline uint16_t ServiceAlocFromId(uint8_t aServiceId) } /** - * This function returns the Commissioner Aloc corresponding to a Commissioner Session ID. + * Returns the Commissioner Aloc corresponding to a Commissioner Session ID. * * @param[in] aSessionId The Commissioner Session ID value. * @@ -723,7 +723,7 @@ inline uint16_t CommissionerAloc16FromId(uint16_t aSessionId) } /** - * This function derives RLOC16 from a given Router ID. + * Derives RLOC16 from a given Router ID. * * @param[in] aRouterId The Router ID value. * @@ -733,7 +733,7 @@ inline uint16_t CommissionerAloc16FromId(uint16_t aSessionId) inline uint16_t Rloc16FromRouterId(uint8_t aRouterId) { return static_cast(aRouterId << kRouterIdOffset); } /** - * This function indicates whether or not @p aRloc16 refers to an active router. + * Indicates whether or not @p aRloc16 refers to an active router. * * @param[in] aRloc16 The RLOC16 value. * @@ -744,7 +744,7 @@ inline uint16_t Rloc16FromRouterId(uint8_t aRouterId) { return static_cast(mTlvs); } /** - * This method returns a pointer to the end of Network Data TLV sequence. + * Returns a pointer to the end of Network Data TLV sequence. * * @returns A pointer to the end of Network Data TLV sequence. * @@ -425,7 +425,7 @@ protected: const NetworkDataTlv *GetTlvsEnd(void) const { return reinterpret_cast(mTlvs + mLength); } /** - * This method returns a pointer to a Prefix TLV. + * Returns a pointer to a Prefix TLV. * * @param[in] aPrefix A pointer to an IPv6 prefix. * @param[in] aPrefixLength The prefix length pointed to by @p aPrefix (in bits). @@ -436,7 +436,7 @@ protected: const PrefixTlv *FindPrefix(const uint8_t *aPrefix, uint8_t aPrefixLength) const; /** - * This method returns a pointer to a Prefix TLV. + * Returns a pointer to a Prefix TLV. * * @param[in] aPrefix An IPv6 prefix. * @@ -449,7 +449,7 @@ protected: } /** - * This method returns a pointer to a matching Service TLV. + * Returns a pointer to a matching Service TLV. * * @param[in] aEnterpriseNumber Enterprise Number. * @param[in] aServiceData A Service Data. @@ -463,9 +463,9 @@ protected: ServiceMatchMode aServiceMatchMode) const; /** - * This method returns the next pointer to a matching Service TLV. + * Returns the next pointer to a matching Service TLV. * - * This method can be used to iterate over all Service TLVs that start with a given Service Data. + * Can be used to iterate over all Service TLVs that start with a given Service Data. * * @param[in] aPrevServiceTlv Set to `nullptr` to start from the beginning of the TLVs (finding the first * matching Service TLV), or a pointer to the previous Service TLV returned from @@ -483,9 +483,9 @@ protected: ServiceMatchMode aServiceMatchMode) const; /** - * This method returns the next pointer to a matching Thread Service TLV (with Thread Enterprise number). + * Returns the next pointer to a matching Thread Service TLV (with Thread Enterprise number). * - * This method can be used to iterate over all Thread Service TLVs that start with a given Service Data. + * Can be used to iterate over all Thread Service TLVs that start with a given Service Data. * * @param[in] aPrevServiceTlv Set to `nullptr` to start from the beginning of the TLVs (finding the first * matching Service TLV), or a pointer to the previous Service TLV returned from @@ -584,7 +584,7 @@ private: }; /** - * This class represents mutable Network Data. + * Represents mutable Network Data. * */ class MutableNetworkData : public NetworkData @@ -595,7 +595,7 @@ class MutableNetworkData : public NetworkData public: /** - * This constructor initializes the `MutableNetworkData` + * Initializes the `MutableNetworkData` * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aTlvs A pointer to the buffer to store the TLVs. @@ -613,7 +613,7 @@ public: using NetworkData::GetLength; /** - * This method returns the size of the buffer to store the mutable Network Data. + * Returns the size of the buffer to store the mutable Network Data. * * @returns The size of the buffer. * @@ -621,7 +621,7 @@ public: uint8_t GetSize(void) const { return mSize; } /** - * This method returns a pointer to start of the TLVs in `NetworkData`. + * Returns a pointer to start of the TLVs in `NetworkData`. * * @returns A pointer to start of the TLVs. * @@ -629,14 +629,14 @@ public: uint8_t *GetBytes(void) { return AsNonConst(AsConst(this)->GetBytes()); } /** - * This method clears the network data. + * Clears the network data. * */ void Clear(void) { mLength = 0; } protected: /** - * This method sets the Network Data length. + * Sets the Network Data length. * * @param[in] aLength The length. * @@ -646,7 +646,7 @@ protected: using NetworkData::GetTlvsStart; /** - * This method returns a pointer to the start of Network Data TLV sequence. + * Returns a pointer to the start of Network Data TLV sequence. * * @returns A pointer to the start of Network Data TLV sequence. * @@ -656,7 +656,7 @@ protected: using NetworkData::GetTlvsEnd; /** - * This method returns a pointer to the end of Network Data TLV sequence. + * Returns a pointer to the end of Network Data TLV sequence. * * @returns A pointer to the end of Network Data TLV sequence. * @@ -666,7 +666,7 @@ protected: using NetworkData::FindPrefix; /** - * This method returns a pointer to a Prefix TLV. + * Returns a pointer to a Prefix TLV. * * @param[in] aPrefix A pointer to an IPv6 prefix. * @param[in] aPrefixLength The prefix length pointed to by @p aPrefix (in bits). @@ -680,7 +680,7 @@ protected: } /** - * This method returns a pointer to a Prefix TLV. + * Returns a pointer to a Prefix TLV. * * @param[in] aPrefix An IPv6 prefix. * @@ -692,7 +692,7 @@ protected: using NetworkData::FindService; /** - * This method returns a pointer to a matching Service TLV. + * Returns a pointer to a matching Service TLV. * * @param[in] aEnterpriseNumber Enterprise Number. * @param[in] aServiceData A Service Data. @@ -709,7 +709,7 @@ protected: } /** - * This method indicates whether there is space in Network Data to insert/append new info and grow it by a given + * Indicates whether there is space in Network Data to insert/append new info and grow it by a given * number of bytes. * * @param[in] aSize The number of bytes to grow the Network Data. @@ -721,7 +721,7 @@ protected: bool CanInsert(uint16_t aSize) const { return (mLength + aSize <= mSize); } /** - * This method grows the Network Data to append a TLV with a requested size. + * Grows the Network Data to append a TLV with a requested size. * * On success, the returned TLV is not initialized (i.e., the TLV Length field is not set) but the requested * size for it (@p aTlvSize number of bytes) is reserved in the Network Data. @@ -735,7 +735,7 @@ protected: NetworkDataTlv *AppendTlv(uint16_t aTlvSize); /** - * This method inserts bytes into the Network Data. + * Inserts bytes into the Network Data. * * @param[in] aStart A pointer to the beginning of the insertion. * @param[in] aLength The number of bytes to insert. @@ -744,7 +744,7 @@ protected: void Insert(void *aStart, uint8_t aLength); /** - * This method removes bytes from the Network Data. + * Removes bytes from the Network Data. * * @param[in] aRemoveStart A pointer to the beginning of the removal. * @param[in] aRemoveLength The number of bytes to remove. @@ -753,7 +753,7 @@ protected: void Remove(void *aRemoveStart, uint8_t aRemoveLength); /** - * This method removes a TLV from the Network Data. + * Removes a TLV from the Network Data. * * @param[in] aTlv The TLV to remove. * @@ -761,7 +761,7 @@ protected: void RemoveTlv(NetworkDataTlv *aTlv); /** - * This method strips non-stable data from the Thread Network Data. + * Strips non-stable data from the Thread Network Data. * */ void RemoveTemporaryData(void); diff --git a/src/core/thread/network_data_leader.hpp b/src/core/thread/network_data_leader.hpp index 92dae9382..a696b5588 100644 --- a/src/core/thread/network_data_leader.hpp +++ b/src/core/thread/network_data_leader.hpp @@ -60,14 +60,14 @@ namespace NetworkData { */ /** - * This class implements the Thread Network Data maintained by the Leader. + * Implements the Thread Network Data maintained by the Leader. * */ class LeaderBase : public MutableNetworkData { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -80,13 +80,13 @@ public: } /** - * This method reset the Thread Network Data. + * Reset the Thread Network Data. * */ void Reset(void); /** - * This method returns the maximum observed Network Data length since OT stack initialization or since the last + * Returns the maximum observed Network Data length since OT stack initialization or since the last * call to `ResetMaxLength()`. * * @returns The maximum observed Network Data length (high water mark for Network Data length). @@ -95,7 +95,7 @@ public: uint8_t GetMaxLength(void) const { return mMaxLength; } /** - * This method resets the tracked maximum Network Data Length. + * Resets the tracked maximum Network Data Length. * * @sa GetMaxLength * @@ -103,7 +103,7 @@ public: void ResetMaxLength(void) { mMaxLength = GetLength(); } /** - * This method returns the Data Version value for a type (full set or stable subset). + * Returns the Data Version value for a type (full set or stable subset). * * @param[in] aType The Network Data type (full set or stable subset). * @@ -113,7 +113,7 @@ public: uint8_t GetVersion(Type aType) const { return (aType == kFullSet) ? mVersion : mStableVersion; } /** - * This method retrieves the 6LoWPAN Context information based on a given IPv6 address. + * Retrieves the 6LoWPAN Context information based on a given IPv6 address. * * @param[in] aAddress A reference to an IPv6 address. * @param[out] aContext A reference to 6LoWPAN Context information. @@ -125,7 +125,7 @@ public: Error GetContext(const Ip6::Address &aAddress, Lowpan::Context &aContext) const; /** - * This method retrieves the 6LoWPAN Context information based on a given Context ID. + * Retrieves the 6LoWPAN Context information based on a given Context ID. * * @param[in] aContextId The Context ID value. * @param[out] aContext A reference to the 6LoWPAN Context information. @@ -137,7 +137,7 @@ public: Error GetContext(uint8_t aContextId, Lowpan::Context &aContext) const; /** - * This method indicates whether or not the given IPv6 address is on-mesh. + * Indicates whether or not the given IPv6 address is on-mesh. * * @param[in] aAddress A reference to an IPv6 address. * @@ -148,7 +148,7 @@ public: bool IsOnMesh(const Ip6::Address &aAddress) const; /** - * This method performs a route lookup using the Network Data. + * Performs a route lookup using the Network Data. * * @param[in] aSource A reference to the IPv6 source address. * @param[in] aDestination A reference to the IPv6 destination address. @@ -161,7 +161,7 @@ public: Error RouteLookup(const Ip6::Address &aSource, const Ip6::Address &aDestination, uint16_t &aRloc16) const; /** - * This method is used by non-Leader devices to set Network Data by reading it from a message from Leader. + * Is used by non-Leader devices to set Network Data by reading it from a message from Leader. * * @param[in] aVersion The Version value. * @param[in] aStableVersion The Stable Version value. @@ -182,7 +182,7 @@ public: uint16_t aLength); /** - * This method returns a pointer to the Commissioning Data. + * Returns a pointer to the Commissioning Data. * * @returns A pointer to the Commissioning Data or `nullptr` if no Commissioning Data exists. * @@ -190,7 +190,7 @@ public: CommissioningDataTlv *GetCommissioningData(void) { return AsNonConst(AsConst(this)->GetCommissioningData()); } /** - * This method returns a pointer to the Commissioning Data. + * Returns a pointer to the Commissioning Data. * * @returns A pointer to the Commissioning Data or `nullptr` if no Commissioning Data exists. * @@ -198,7 +198,7 @@ public: const CommissioningDataTlv *GetCommissioningData(void) const; /** - * This method returns a pointer to the Commissioning Data Sub-TLV. + * Returns a pointer to the Commissioning Data Sub-TLV. * * @param[in] aType The TLV type value. * @@ -211,7 +211,7 @@ public: } /** - * This method returns a pointer to the Commissioning Data Sub-TLV. + * Returns a pointer to the Commissioning Data Sub-TLV. * * @param[in] aType The TLV type value. * @@ -221,7 +221,7 @@ public: const MeshCoP::Tlv *GetCommissioningDataSubTlv(MeshCoP::Tlv::Type aType) const; /** - * This method indicates whether or not the Commissioning Data TLV indicates Joining is enabled. + * Indicates whether or not the Commissioning Data TLV indicates Joining is enabled. * * Joining is enabled if a Border Agent Locator TLV exist and the Steering Data TLV is non-zero. * @@ -231,7 +231,7 @@ public: bool IsJoiningEnabled(void) const; /** - * This method adds Commissioning Data to the Thread Network Data. + * Adds Commissioning Data to the Thread Network Data. * * @param[in] aValue A pointer to the Commissioning Data value. * @param[in] aValueLength The length of @p aValue. @@ -243,7 +243,7 @@ public: Error SetCommissioningData(const uint8_t *aValue, uint8_t aValueLength); /** - * This method checks if the steering data includes a Joiner. + * Checks if the steering data includes a Joiner. * * @param[in] aEui64 A reference to the Joiner's IEEE EUI-64. * @@ -255,7 +255,7 @@ public: Error SteeringDataCheckJoiner(const Mac::ExtAddress &aEui64) const; /** - * This method checks if the steering data includes a Joiner with a given discerner value. + * Checks if the steering data includes a Joiner with a given discerner value. * * @param[in] aDiscerner A reference to the Joiner Discerner. * @@ -267,7 +267,7 @@ public: Error SteeringDataCheckJoiner(const MeshCoP::JoinerDiscerner &aDiscerner) const; /** - * This method gets the Service ID for the specified service. + * Gets the Service ID for the specified service. * * @param[in] aEnterpriseNumber Enterprise Number (IANA-assigned) for Service TLV * @param[in] aServiceData The Service Data. @@ -284,7 +284,7 @@ public: uint8_t &aServiceId) const; /** - * This methods gets the preferred NAT64 prefix from network data. + * Gets the preferred NAT64 prefix from network data. * * The returned prefix is the highest preference external route entry in Network Data with NAT64 flag set. If there * are multiple such entries the first one is returned. diff --git a/src/core/thread/network_data_leader_ftd.hpp b/src/core/thread/network_data_leader_ftd.hpp index 85096c33c..7c29c9478 100644 --- a/src/core/thread/network_data_leader_ftd.hpp +++ b/src/core/thread/network_data_leader_ftd.hpp @@ -63,7 +63,7 @@ namespace NetworkData { */ /** - * This class implements the Thread Network Data maintained by the Leader. + * Implements the Thread Network Data maintained by the Leader. * */ class Leader : public LeaderBase, private NonCopyable @@ -72,7 +72,7 @@ class Leader : public LeaderBase, private NonCopyable public: /** - * This enumeration defines the match mode constants to compare two RLOC16 values. + * Defines the match mode constants to compare two RLOC16 values. * */ enum MatchMode : uint8_t @@ -82,7 +82,7 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -90,13 +90,13 @@ public: explicit Leader(Instance &aInstance); /** - * This method reset the Thread Network Data. + * Reset the Thread Network Data. * */ void Reset(void); /** - * This method starts the Leader services. + * Starts the Leader services. * * The start mode indicates whether device is starting normally as leader or restoring its role as leader after * reset. In the latter case, we do not accept any new registrations (`HandleServerData()`) and wait for @@ -109,19 +109,19 @@ public: void Start(Mle::LeaderStartMode aStartMode); /** - * This method increments the Thread Network Data version. + * Increments the Thread Network Data version. * */ void IncrementVersion(void); /** - * This method increments both the Thread Network Data version and stable version. + * Increments both the Thread Network Data version and stable version. * */ void IncrementVersionAndStableVersion(void); /** - * This method returns CONTEXT_ID_RESUSE_DELAY value. + * Returns CONTEXT_ID_RESUSE_DELAY value. * * @returns The CONTEXT_ID_REUSE_DELAY value (in seconds). * @@ -129,7 +129,7 @@ public: uint32_t GetContextIdReuseDelay(void) const { return mContextIds.GetReuseDelay(); } /** - * This method sets CONTEXT_ID_RESUSE_DELAY value. + * Sets CONTEXT_ID_RESUSE_DELAY value. * * @warning This method should only be used for testing. * @@ -139,7 +139,7 @@ public: void SetContextIdReuseDelay(uint32_t aDelay) { mContextIds.SetReuseDelay(aDelay); } /** - * This method removes Network Data entries matching with a given RLOC16. + * Removes Network Data entries matching with a given RLOC16. * * @param[in] aRloc16 A RLOC16 value. * @param[in] aMatchMode A match mode (@sa MatchMode). @@ -148,7 +148,7 @@ public: void RemoveBorderRouter(uint16_t aRloc16, MatchMode aMatchMode); /** - * This method synchronizes internal 6LoWPAN Context ID Set with recently obtained Thread Network Data. + * Synchronizes internal 6LoWPAN Context ID Set with recently obtained Thread Network Data. * * Note that this method should be called only by the Leader once after reset. * @@ -156,7 +156,7 @@ public: void HandleNetworkDataRestoredAfterReset(void); /** - * This method scans network data for given Service ID and returns pointer to the respective TLV, if present. + * Scans network data for given Service ID and returns pointer to the respective TLV, if present. * * @param aServiceId Service ID to look for. * @return Pointer to the Service TLV for given Service ID, or nullptr if not present. @@ -166,7 +166,7 @@ public: #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE /** - * This method indicates whether a given Prefix can act as a valid OMR prefix and exists in the network data. + * Indicates whether a given Prefix can act as a valid OMR prefix and exists in the network data. * * @param[in] aPrefix The OMR prefix to check. * diff --git a/src/core/thread/network_data_local.hpp b/src/core/thread/network_data_local.hpp index 27090a5ba..761e7f875 100644 --- a/src/core/thread/network_data_local.hpp +++ b/src/core/thread/network_data_local.hpp @@ -57,7 +57,7 @@ namespace NetworkData { class Notifier; /** - * This class implements the Thread Network Data contributed by the local device. + * Implements the Thread Network Data contributed by the local device. * */ class Local : public MutableNetworkData, private NonCopyable @@ -66,7 +66,7 @@ class Local : public MutableNetworkData, private NonCopyable public: /** - * This constructor initializes the local Network Data. + * Initializes the local Network Data. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -78,7 +78,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE /** - * This method adds a Border Router entry to the Thread Network Data. + * Adds a Border Router entry to the Thread Network Data. * * @param[in] aConfig A reference to the on mesh prefix configuration. * @@ -90,7 +90,7 @@ public: Error AddOnMeshPrefix(const OnMeshPrefixConfig &aConfig); /** - * This method removes a Border Router entry from the Thread Network Data. + * Removes a Border Router entry from the Thread Network Data. * * @param[in] aPrefix The Prefix to remove. * @@ -101,7 +101,7 @@ public: Error RemoveOnMeshPrefix(const Ip6::Prefix &aPrefix) { return RemovePrefix(aPrefix); } /** - * This method indicates whether or not the Thread Network Data contains a given on mesh prefix. + * Indicates whether or not the Thread Network Data contains a given on mesh prefix. * * @param[in] aPrefix The on mesh prefix to check. * @@ -112,7 +112,7 @@ public: bool ContainsOnMeshPrefix(const Ip6::Prefix &aPrefix) const; /** - * This method adds a Has Route entry to the Thread Network data. + * Adds a Has Route entry to the Thread Network data. * * @param[in] aConfig A reference to the external route configuration. * @@ -124,7 +124,7 @@ public: Error AddHasRoutePrefix(const ExternalRouteConfig &aConfig); /** - * This method removes a Border Router entry from the Thread Network Data. + * Removes a Border Router entry from the Thread Network Data. * * @param[in] aPrefix The Prefix to remove. * @@ -137,7 +137,7 @@ public: #if OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE /** - * This method adds a Service entry to the Thread Network local data. + * Adds a Service entry to the Thread Network local data. * * @param[in] aEnterpriseNumber Enterprise Number (IANA-assigned) for Service TLV. * @param[in] aServiceData The Service Data. @@ -154,7 +154,7 @@ public: const ServerData &aServerData); /** - * This method removes a Service entry from the Thread Network local data. + * Removes a Service entry from the Thread Network local data. * * @param[in] aEnterpriseNumber Enterprise Number of the service to be deleted. * @param[in] aServiceData The service data. diff --git a/src/core/thread/network_data_notifier.hpp b/src/core/thread/network_data_notifier.hpp index 65426cda0..bd60e6490 100644 --- a/src/core/thread/network_data_notifier.hpp +++ b/src/core/thread/network_data_notifier.hpp @@ -51,7 +51,7 @@ namespace NetworkData { class NetworkData; /** - * This class implements the SVR_DATA.ntf transmission logic. + * Implements the SVR_DATA.ntf transmission logic. * */ class Notifier : public InstanceLocator, private NonCopyable @@ -71,7 +71,7 @@ public: /** * Call this method to inform the notifier that new server data is available. * - * This method posts a tasklet to sync new server data with leader so if there are multiple changes within the same + * Posts a tasklet to sync new server data with leader so if there are multiple changes within the same * flow of execution (multiple calls to this method) they are all synchronized together and included in the same * message to the leader. * @@ -80,10 +80,10 @@ public: #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE && OPENTHREAD_CONFIG_BORDER_ROUTER_REQUEST_ROUTER_ROLE /** - * This method indicates whether the device as border router is eligible for router role upgrade request using the + * Indicates whether the device as border router is eligible for router role upgrade request using the * status reason `kBorderRouterRequest`. * - * This method checks whether device is providing IP connectivity and that there are fewer than two border routers + * Checks whether device is providing IP connectivity and that there are fewer than two border routers * in network data acting as router. Device is considered to provide external IP connectivity if at least one of * the below conditions hold: * @@ -91,7 +91,7 @@ public: * - It has added at least one prefix entry with default-route and on-mesh flags set. * - It has added at least one domain prefix (domain and on-mesh flags set). * - * This method does not check the current role of device. + * Does not check the current role of device. * * @retval TRUE Device is eligible to request router role upgrade as a border router. * @retval FALSE Device is not eligible to request router role upgrade as a border router. diff --git a/src/core/thread/network_data_publisher.hpp b/src/core/thread/network_data_publisher.hpp index 3d3a37f27..3ac2c825a 100644 --- a/src/core/thread/network_data_publisher.hpp +++ b/src/core/thread/network_data_publisher.hpp @@ -62,7 +62,7 @@ namespace ot { namespace NetworkData { /** - * This class implements the Network Data Publisher. + * Implements the Network Data Publisher. * * It provides mechanisms to limit the number of similar Service and/or Prefix (on-mesh prefix or external route) * entries in the Thread Network Data by monitoring the Network Data and managing if or when to add or remove entries. @@ -74,7 +74,7 @@ class Publisher : public InstanceLocator, private NonCopyable public: /** - * This enumeration represents the events reported from the Publisher callbacks. + * Represents the events reported from the Publisher callbacks. * */ enum Event : uint8_t @@ -84,7 +84,7 @@ public: }; /** - * This enumeration represents the requester associated with a published prefix. + * Represents the requester associated with a published prefix. * */ enum Requester : uint8_t @@ -94,7 +94,7 @@ public: }; /** - * This constructor initializes `Publisher` object. + * Initializes `Publisher` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -104,7 +104,7 @@ public: #if OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE /** - * This type represents the callback function pointer used to notify when a "DNS/SRP Service" entry is added to or + * Represents the callback function pointer used to notify when a "DNS/SRP Service" entry is added to or * removed from the Thread Network Data. * * On remove the callback is invoked independent of whether the entry is removed by `Publisher` (e.g., when there @@ -115,7 +115,7 @@ public: typedef otNetDataDnsSrpServicePublisherCallback DnsSrpServiceCallback; /** - * This method sets a callback for notifying when a published "DNS/SRP Service" is actually added to or removed + * Sets a callback for notifying when a published "DNS/SRP Service" is actually added to or removed * from the Thread Network Data. * * A subsequent call to this method replaces any previously set callback function. @@ -130,7 +130,7 @@ public: } /** - * This method requests "DNS/SRP Service Anycast Address" to be published in the Thread Network Data. + * Requests "DNS/SRP Service Anycast Address" to be published in the Thread Network Data. * * A call to this method will remove and replace any previous "DNS/SRP Service" entry that was being published * (from earlier call to any of `PublishDnsSrpService{Type}()` methods). @@ -141,12 +141,12 @@ public: void PublishDnsSrpServiceAnycast(uint8_t aSequenceNumber) { mDnsSrpServiceEntry.PublishAnycast(aSequenceNumber); } /** - * This method requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. + * Requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. * * A call to this method will remove and replace any previous "DNS/SRP Service" entry that was being published * (from earlier call to any of `PublishDnsSrpService{Type}()` methods). * - * This method publishes the "DNS/SRP Service Unicast Address" by including the address and port info in the + * Publishes the "DNS/SRP Service Unicast Address" by including the address and port info in the * Service TLV data. * * @param[in] aAddress The DNS/SRP server address to publish. @@ -159,7 +159,7 @@ public: } /** - * This method requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. + * Requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. * * A call to this method will remove and replace any previous "DNS/SRP Service" entry that was being published * (from earlier call to any of `PublishDnsSrpService{Type}()` methods). @@ -174,7 +174,7 @@ public: void PublishDnsSrpServiceUnicast(uint16_t aPort) { mDnsSrpServiceEntry.PublishUnicast(aPort); } /** - * This method indicates whether or not currently the "DNS/SRP Service" entry is added to the Thread Network Data. + * Indicates whether or not currently the "DNS/SRP Service" entry is added to the Thread Network Data. * * @retval TRUE The published DNS/SRP Service entry is added to the Thread Network Data. * @retval FALSE The entry is not added to Thread Network Data or there is no entry to publish. @@ -183,7 +183,7 @@ public: bool IsDnsSrpServiceAdded(void) const { return mDnsSrpServiceEntry.IsAdded(); } /** - * This method unpublishes any previously added "DNS/SRP (Anycast or Unicast) Service" entry from the Thread + * Unpublishes any previously added "DNS/SRP (Anycast or Unicast) Service" entry from the Thread * Network Data. * */ @@ -193,7 +193,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE /** - * This type represents the callback function pointer used to notify when a prefix (on-mesh or external route) + * Represents the callback function pointer used to notify when a prefix (on-mesh or external route) * entry is added to or removed from the Thread Network Data. * * On remove the callback is invoked independent of whether the entry is removed by `Publisher` (e.g., when there @@ -204,7 +204,7 @@ public: typedef otNetDataPrefixPublisherCallback PrefixCallback; /** - * This method sets a callback for notifying when a published prefix entry is actually added to or removed from + * Sets a callback for notifying when a published prefix entry is actually added to or removed from * the Thread Network Data. * * A subsequent call to this method replaces any previously set callback function. @@ -216,7 +216,7 @@ public: void SetPrefixCallback(PrefixCallback aCallback, void *aContext) { mPrefixCallback.Set(aCallback, aContext); } /** - * This method requests an on-mesh prefix to be published in the Thread Network Data. + * Requests an on-mesh prefix to be published in the Thread Network Data. * * Only stable entries can be published (i.e.,`aConfig.mStable` MUST be `true`). * @@ -242,7 +242,7 @@ public: Error PublishOnMeshPrefix(const OnMeshPrefixConfig &aConfig, Requester aRequester); /** - * This method requests an external route prefix to be published in the Thread Network Data. + * Requests an external route prefix to be published in the Thread Network Data. * * Only stable entries can be published (i.e.,`aConfig.mStable` MUST be `true`). * @@ -267,7 +267,7 @@ public: Error PublishExternalRoute(const ExternalRouteConfig &aConfig, Requester aRequester); /** - * This method replaces a previously published external route. + * Replaces a previously published external route. * * Only stable entries can be published (i.e.,`aConfig.mStable` MUST be `true`). * @@ -304,7 +304,7 @@ public: Requester aRequester); /** - * This method indicates whether or not currently a published prefix entry (on-mesh or external route) is added to + * Indicates whether or not currently a published prefix entry (on-mesh or external route) is added to * the Thread Network Data. * * @param[in] aPrefix The prefix to check. @@ -316,7 +316,7 @@ public: bool IsPrefixAdded(const Ip6::Prefix &aPrefix) const; /** - * This method unpublishes a previously published prefix (on-mesh or external route). + * Unpublishes a previously published prefix (on-mesh or external route). * * @param[in] aPrefix The prefix to unpublish. * diff --git a/src/core/thread/network_data_service.hpp b/src/core/thread/network_data_service.hpp index 5dec83a69..aea859a97 100644 --- a/src/core/thread/network_data_service.hpp +++ b/src/core/thread/network_data_service.hpp @@ -58,7 +58,7 @@ const uint32_t kThreadEnterpriseNumber = ServiceTlv::kThreadEnterpriseNumber; // #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) /** - * This type implements Thread Network Data "Backbone Router Service" server data generation and parsing. + * Implements Thread Network Data "Backbone Router Service" server data generation and parsing. * */ class BackboneRouter @@ -74,7 +74,7 @@ public: static constexpr uint8_t kServiceDataMinSize = 1; /** - * This class implements the generation and parsing of "Backbone Router Service" server data. + * Implements the generation and parsing of "Backbone Router Service" server data. * */ OT_TOOL_PACKED_BEGIN @@ -82,7 +82,7 @@ public: { public: /** - * This method returns the length (in bytes) of server data. + * Returns the length (in bytes) of server data. * * @returns The server data length in bytes. * @@ -90,7 +90,7 @@ public: uint8_t GetLength(void) const { return sizeof(ServerData); } /** - * This method returns the sequence number of Backbone Router. + * Returns the sequence number of Backbone Router. * * @returns The sequence number of the Backbone Router. * @@ -98,7 +98,7 @@ public: uint8_t GetSequenceNumber(void) const { return mSequenceNumber; } /** - * This method sets the sequence number of Backbone Router. + * Sets the sequence number of Backbone Router. * * @param[in] aSequenceNumber The sequence number of Backbone Router. * @@ -106,7 +106,7 @@ public: void SetSequenceNumber(uint8_t aSequenceNumber) { mSequenceNumber = aSequenceNumber; } /** - * This method returns the Registration Delay (in seconds) of Backbone Router. + * Returns the Registration Delay (in seconds) of Backbone Router. * * @returns The BBR Registration Delay (in seconds) of Backbone Router. * @@ -114,7 +114,7 @@ public: uint16_t GetReregistrationDelay(void) const { return HostSwap16(mReregistrationDelay); } /** - * This method sets the Registration Delay (in seconds) of Backbone Router. + * Sets the Registration Delay (in seconds) of Backbone Router. * * @param[in] aReregistrationDelay The Registration Delay (in seconds) of Backbone Router. * @@ -125,7 +125,7 @@ public: } /** - * This method returns the multicast listener report timeout (in seconds) of Backbone Router. + * Returns the multicast listener report timeout (in seconds) of Backbone Router. * * @returns The multicast listener report timeout (in seconds) of Backbone Router. * @@ -133,7 +133,7 @@ public: uint32_t GetMlrTimeout(void) const { return HostSwap32(mMlrTimeout); } /** - * This method sets multicast listener report timeout (in seconds) of Backbone Router. + * Sets multicast listener report timeout (in seconds) of Backbone Router. * * @param[in] aMlrTimeout The multicast listener report timeout (in seconds) of Backbone Router. * @@ -152,7 +152,7 @@ public: #endif // #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) /** - * This type implements Thread Network Data "DNS/SRP Service Anycast Address" generation and parsing. + * Implements Thread Network Data "DNS/SRP Service Anycast Address" generation and parsing. * */ class DnsSrpAnycast @@ -169,7 +169,7 @@ public: static const uint8_t kServiceData = kServiceNumber; /** - * This structure represents information about an DNS/SRP server parsed from related Network Data service entries. + * Represents information about an DNS/SRP server parsed from related Network Data service entries. * */ struct Info @@ -179,7 +179,7 @@ public: }; /** - * This class represents the "DNS/SRP Service (Anycast)" service data. + * Represents the "DNS/SRP Service (Anycast)" service data. * */ OT_TOOL_PACKED_BEGIN @@ -187,7 +187,7 @@ public: { public: /** - * This constructor initializes the `ServiceData` object. + * Initializes the `ServiceData` object. * * @param[in] aSequenceNumber The sequence number of "DNS/SRP server" service. * @@ -200,7 +200,7 @@ public: } /** - * This method returns the length (in bytes) of service data. + * Returns the length (in bytes) of service data. * * @returns The data length in bytes. * @@ -208,7 +208,7 @@ public: uint8_t GetLength(void) const { return sizeof(ServiceData); } /** - * This method returns the sequence number. + * Returns the sequence number. * * @returns The sequence number. * @@ -224,7 +224,7 @@ public: }; /** - * This type implements Thread Network Data DNS/SRP Service (Unicast Address) generation and parsing. + * Implements Thread Network Data DNS/SRP Service (Unicast Address) generation and parsing. * */ class DnsSrpUnicast @@ -241,7 +241,7 @@ public: static const uint8_t kServiceData = kServiceNumber; /** - * This enumeration represents the origin a `DnsSrpUnicast` entry. + * Represents the origin a `DnsSrpUnicast` entry. * */ enum Origin : uint8_t @@ -251,7 +251,7 @@ public: }; /** - * This structure represents information about an DNS/SRP server parsed from related Network Data service entries. + * Represents information about an DNS/SRP server parsed from related Network Data service entries. * */ struct Info @@ -262,7 +262,7 @@ public: }; /** - * This class represents long version of "DNS/SRP Service (Unicast)" service data. + * Represents long version of "DNS/SRP Service (Unicast)" service data. * */ OT_TOOL_PACKED_BEGIN @@ -270,7 +270,7 @@ public: { public: /** - * This constructor initializes the `ServiceData` object. + * Initializes the `ServiceData` object. * * @param[in] aAddress The IPv6 address of DNS/SRP server. * @param[in] aPort The port number of DNS/SRP server. @@ -285,7 +285,7 @@ public: } /** - * This method returns the length (in bytes) of service data. + * Returns the length (in bytes) of service data. * * @returns The data length in bytes. * @@ -293,7 +293,7 @@ public: uint8_t GetLength(void) const { return sizeof(ServiceData); } /** - * This method returns the IPv6 address. + * Returns the IPv6 address. * * @returns The IPv6 address * @@ -301,7 +301,7 @@ public: const Ip6::Address &GetAddress(void) const { return mAddress; } /** - * This method returns the port number. + * Returns the port number. * * @returns The port number. * @@ -315,7 +315,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class represents long version of "DNS/SRP Service (Unicast)" server data. + * Represents long version of "DNS/SRP Service (Unicast)" server data. * */ OT_TOOL_PACKED_BEGIN @@ -323,7 +323,7 @@ public: { public: /** - * This constructor initializes the `ServerData` object. + * Initializes the `ServerData` object. * * @param[in] aAddress The IPv6 address of DNS/SRP server. * @param[in] aPort The port number of DNS/SRP server. @@ -336,7 +336,7 @@ public: } /** - * This method returns the length (in bytes) of server data. + * Returns the length (in bytes) of server data. * * @returns The data length in bytes. * @@ -344,7 +344,7 @@ public: uint8_t GetLength(void) const { return sizeof(ServerData); } /** - * This method returns the IPv6 address. + * Returns the IPv6 address. * * @returns The IPv6 address * @@ -352,7 +352,7 @@ public: const Ip6::Address &GetAddress(void) const { return mAddress; } /** - * This method returns the port number. + * Returns the port number. * * @returns The port number. * @@ -368,14 +368,14 @@ public: }; /** - * This class manages the Thread Service entries in Thread Network Data. + * Manages the Thread Service entries in Thread Network Data. * */ class Manager : public InstanceLocator, private NonCopyable { public: /** - * This class represents an iterator used to iterate through Network Data Service entries. + * Represents an iterator used to iterate through Network Data Service entries. * */ class Iterator : public Clearable @@ -384,7 +384,7 @@ public: public: /** - * This constructor initializes the iterator (as empty/clear). + * Initializes the iterator (as empty/clear). * */ Iterator(void) @@ -394,7 +394,7 @@ public: } /** - * This method resets the iterator to start from beginning. + * Resets the iterator to start from beginning. * */ void Reset(void) @@ -409,7 +409,7 @@ public: }; /** - * This constructor initializes the `Manager` object. + * Initializes the `Manager` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -421,7 +421,7 @@ public: #if OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE /** - * This method adds a Thread Service entry to the local Thread Network Data. + * Adds a Thread Service entry to the local Thread Network Data. * * This version of `Add()` is intended for use with a `ServiceType` that has a constant service data * format with a non-empty and potentially non-const server data format (provided as input parameter). @@ -448,7 +448,7 @@ public: } /** - * This method adds a Thread Service entry to the local Thread Network Data. + * Adds a Thread Service entry to the local Thread Network Data. * * This version of `Add()` is intended for use with a `ServiceType` that has a non-const service data * format (provided as input parameter) with an empty server data. @@ -473,7 +473,7 @@ public: } /** - * This method removes a Thread Service entry from the local Thread Network Data. + * Removes a Thread Service entry from the local Thread Network Data. * * This version of `Remove()` is intended for use with a `ServiceType` that has a constant service data * format. @@ -493,7 +493,7 @@ public: } /** - * This method removes a Thread Service entry from the local Thread Network Data. + * Removes a Thread Service entry from the local Thread Network Data. * * This version of `Remove()` is intended for use with a `ServiceType` that has a non-const service * data format (provided as input parameter). @@ -518,7 +518,7 @@ public: #endif // OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE /** - * This method gets the Service ID for the specified service from Thread Network Data. + * Gets the Service ID for the specified service from Thread Network Data. * * The template type `ServiceType` has the following requirements: * - It MUST have a constant `ServiceType::kServiceNumber` specifying the service number. @@ -539,7 +539,7 @@ public: #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) /** - * This method gets the Primary Backbone Router (PBBR) in the Thread Network Data. + * Gets the Primary Backbone Router (PBBR) in the Thread Network Data. * * @param[out] aConfig The Primary Backbone Router configuration. * @@ -548,7 +548,7 @@ public: #endif /** - * This method gets the next DNS/SRP info from the Thread Network Data "DNS/SRP Service Anycast Address" entries. + * Gets the next DNS/SRP info from the Thread Network Data "DNS/SRP Service Anycast Address" entries. * * To get the first entry, @p aIterator should be cleared (e.g., a new instance of `Iterator` or calling `Clear()` * method). @@ -563,7 +563,7 @@ public: Error GetNextDnsSrpAnycastInfo(Iterator &aIterator, DnsSrpAnycast::Info &aInfo) const; /** - * This method finds the preferred DNS/SRP info among all the Thread Network Data "DNS/SRP Service Anycast Address" + * Finds the preferred DNS/SRP info among all the Thread Network Data "DNS/SRP Service Anycast Address" * entries. * * The preferred entry is determined based on the sequence number value where a larger value (in the sense @@ -578,7 +578,7 @@ public: Error FindPreferredDnsSrpAnycastInfo(DnsSrpAnycast::Info &aInfo) const; /** - * This method gets the next DNS/SRP info from the Thread Network Data "DNS/SRP Service Unicast Address" entries. + * Gets the next DNS/SRP info from the Thread Network Data "DNS/SRP Service Unicast Address" entries. * * To get the first entry @p aIterator should be cleared (e.g., a new instance of `Iterator` or calling `Clear()` * method). diff --git a/src/core/thread/network_data_tlvs.hpp b/src/core/thread/network_data_tlvs.hpp index 443d1e1ba..b93a97bac 100644 --- a/src/core/thread/network_data_tlvs.hpp +++ b/src/core/thread/network_data_tlvs.hpp @@ -64,7 +64,7 @@ using ot::Encoding::BigEndian::HostSwap32; class NetworkDataTlv; /** - * This template method casts a `NetworkDataTlv` pointer to a given subclass `TlvType` pointer. + * Casts a `NetworkDataTlv` pointer to a given subclass `TlvType` pointer. * * @tparam TlvType The TLV type to cast into. MUST be a subclass of `NetworkDataTlv`. * @@ -76,7 +76,7 @@ class NetworkDataTlv; template TlvType *As(NetworkDataTlv *aTlv) { return static_cast(aTlv); } /** - * This template method casts a `NetworkDataTlv` pointer to a given subclass `TlvType` pointer. + * Casts a `NetworkDataTlv` pointer to a given subclass `TlvType` pointer. * * @tparam TlvType The TLV type to cast into. MUST be a subclass of `NetworkDataTlv`. * @@ -88,7 +88,7 @@ template TlvType *As(NetworkDataTlv *aTlv) { return static_cast< template const TlvType *As(const NetworkDataTlv *aTlv) { return static_cast(aTlv); } /** - * This template method casts a `NetworkDataTlv` reference to a given subclass `TlvType` reference. + * Casts a `NetworkDataTlv` reference to a given subclass `TlvType` reference. * * @tparam TlvType The TLV type to cast into. MUST be a subclass of `NetworkDataTlv`. * @@ -100,7 +100,7 @@ template const TlvType *As(const NetworkDataTlv *aTlv) { return template TlvType &As(NetworkDataTlv &aTlv) { return static_cast(aTlv); } /** - * This template method casts a `NetworkDataTlv` reference to a given subclass `TlvType` reference. + * Casts a `NetworkDataTlv` reference to a given subclass `TlvType` reference. * * @tparam TlvType The TLV type to cast into. MUST be a subclass of `NetworkDataTlv`. * @@ -112,7 +112,7 @@ template TlvType &As(NetworkDataTlv &aTlv) { return static_cast< template const TlvType &As(const NetworkDataTlv &aTlv) { return static_cast(aTlv); } /** - * This class implements Thread Network Data TLV generation and parsing. + * Implements Thread Network Data TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -135,7 +135,7 @@ public: }; /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -145,7 +145,7 @@ public: } /** - * This method returns the Type value. + * Returns the Type value. * * @returns The Type value. * @@ -153,7 +153,7 @@ public: Type GetType(void) const { return static_cast(mType >> kTypeOffset); } /** - * This method sets the Type value. + * Sets the Type value. * * @param[in] aType The Type value. * @@ -161,7 +161,7 @@ public: void SetType(Type aType) { mType = (mType & ~kTypeMask) | ((aType << kTypeOffset) & kTypeMask); } /** - * This method returns the Length value. + * Returns the Length value. * * @returns The Length value. * @@ -169,7 +169,7 @@ public: uint8_t GetLength(void) const { return mLength; } /** - * This method sets the Length value. + * Sets the Length value. * * @param[in] aLength The Length value. * @@ -177,7 +177,7 @@ public: void SetLength(uint8_t aLength) { mLength = aLength; } /** - * This methods increases the Length value by a given amount. + * Increases the Length value by a given amount. * * @param[in] aIncrement The increment amount to increase the length. * @@ -185,7 +185,7 @@ public: void IncreaseLength(uint8_t aIncrement) { mLength += aIncrement; } /** - * This methods decreases the Length value by a given amount. + * Decreases the Length value by a given amount. * * @param[in] aDecrement The decrement amount to decrease the length. * @@ -193,7 +193,7 @@ public: void DecreaseLength(uint8_t aDecrement) { mLength -= aDecrement; } /** - * This method returns the TLV's total size (number of bytes) including Type, Length, and Value fields. + * Returns the TLV's total size (number of bytes) including Type, Length, and Value fields. * * @returns The total size include Type, Length, and Value fields. * @@ -201,7 +201,7 @@ public: uint8_t GetSize(void) const { return sizeof(NetworkDataTlv) + mLength; } /** - * This method returns a pointer to the Value. + * Returns a pointer to the Value. * * @returns A pointer to the value. * @@ -209,7 +209,7 @@ public: uint8_t *GetValue(void) { return reinterpret_cast(this) + sizeof(NetworkDataTlv); } /** - * This method returns a pointer to the Value. + * Returns a pointer to the Value. * * @returns A pointer to the value. * @@ -217,7 +217,7 @@ public: const uint8_t *GetValue(void) const { return reinterpret_cast(this) + sizeof(NetworkDataTlv); } /** - * This method returns a pointer to the next Network Data TLV. + * Returns a pointer to the next Network Data TLV. * * @returns A pointer to the next Network Data TLV. * @@ -228,7 +228,7 @@ public: } /** - * This method returns a pointer to the next Network Data TLV. + * Returns a pointer to the next Network Data TLV. * * @returns A pointer to the next Network Data TLV. * @@ -240,13 +240,13 @@ public: } /** - * This method clears the Stable bit. + * Clears the Stable bit. * */ void ClearStable(void) { mType &= ~kStableMask; } /** - * This method indicates whether or not the Stable bit is set. + * Indicates whether or not the Stable bit is set. * * @retval TRUE If the Stable bit is set. * @retval FALSE If the Stable bit is not set. @@ -255,13 +255,13 @@ public: bool IsStable(void) const { return (mType & kStableMask); } /** - * This method sets the Stable bit. + * Sets the Stable bit. * */ void SetStable(void) { mType |= kStableMask; } /** - * This static method searches in a given sequence of TLVs to find the first TLV with a given type. + * Searches in a given sequence of TLVs to find the first TLV with a given type. * * @param[in] aStart A pointer to the start of the sequence of TLVs to search within. * @param[in] aEnd A pointer to the end of the sequence of TLVs. @@ -276,7 +276,7 @@ public: } /** - * This static method searches in a given sequence of TLVs to find the first TLV with a given type. + * Searches in a given sequence of TLVs to find the first TLV with a given type. * * @param[in] aStart A pointer to the start of the sequence of TLVs to search within. * @param[in] aEnd A pointer to the end of the sequence of TLVs. @@ -320,7 +320,7 @@ public: } /** - * This static method searches in a given sequence of TLVs to find the first TLV with a given TLV type and stable + * Searches in a given sequence of TLVs to find the first TLV with a given TLV type and stable * flag. * * @param[in] aStart A pointer to the start of the sequence of TLVs to search within. @@ -337,7 +337,7 @@ public: } /** - * This static method searches in a given sequence of TLVs to find the first TLV with a given TLV type and stable + * Searches in a given sequence of TLVs to find the first TLV with a given TLV type and stable * flag. * * @param[in] aStart A pointer to the start of the sequence of TLVs to search within. @@ -400,7 +400,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Has Route TLV entry generation and parsing. + * Implements Has Route TLV entry generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -410,7 +410,7 @@ class HasRouteEntry : public Equatable public: /** - * This method initializes the header. + * Initializes the header. * */ void Init(void) @@ -420,14 +420,14 @@ public: } /** - * This method returns the RLOC16 value. + * Returns the RLOC16 value. * * @returns The RLOC16 value. */ uint16_t GetRloc(void) const { return HostSwap16(mRloc); } /** - * This method sets the RLOC16 value. + * Sets the RLOC16 value. * * @param[in] aRloc16 The RLOC16 value. * @@ -435,7 +435,7 @@ public: void SetRloc(uint16_t aRloc16) { mRloc = HostSwap16(aRloc16); } /** - * This method returns the Preference value. + * Returns the Preference value. * * @returns The preference value. * @@ -443,7 +443,7 @@ public: int8_t GetPreference(void) const { return PreferenceFromFlags(GetFlags()); } /** - * This method gets the Flags value. + * Gets the Flags value. * * @returns The Flags value. * @@ -451,7 +451,7 @@ public: uint8_t GetFlags(void) const { return mFlags; } /** - * This method sets the Flags value. + * Sets the Flags value. * * @param[in] aFlags The Flags value. * @@ -459,7 +459,7 @@ public: void SetFlags(uint8_t aFlags) { mFlags = aFlags; } /** - * This method indicates whether or not the NAT64 flag is set. + * Indicates whether or not the NAT64 flag is set. * * @retval TRUE If the NAT64 flag is set. * @retval FALSE If the NAT64 flag is not set. @@ -468,7 +468,7 @@ public: bool IsNat64(void) const { return (mFlags & kNat64Flag) != 0; } /** - * This method returns a pointer to the next HasRouteEntry. + * Returns a pointer to the next HasRouteEntry. * * @returns A pointer to the next HasRouteEntry. * @@ -476,7 +476,7 @@ public: HasRouteEntry *GetNext(void) { return (this + 1); } /** - * This method returns a pointer to the next HasRouteEntry. + * Returns a pointer to the next HasRouteEntry. * * @returns A pointer to the next HasRouteEntry. * @@ -484,7 +484,7 @@ public: const HasRouteEntry *GetNext(void) const { return (this + 1); } /** - * This static method returns an updated flags bitmask by removing the preference bits (sets them to zero) from a + * Returns an updated flags bitmask by removing the preference bits (sets them to zero) from a * given flags bitmask. * * @param[in] aFlags The flags bitmask. @@ -495,7 +495,7 @@ public: static uint8_t FlagsWithoutPreference(uint8_t aFlags) { return (aFlags & ~kPreferenceMask); } /** - * This static method gets the preference field from a flags bitmask. + * Gets the preference field from a flags bitmask. * * @param[in] aFlags The flags. * @@ -514,7 +514,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Has Route TLV generation and parsing. + * Implements Has Route TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -524,7 +524,7 @@ public: static constexpr Type kType = kTypeHasRoute; ///< The TLV Type. /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -535,7 +535,7 @@ public: } /** - * This method returns the number of HasRoute entries. + * Returns the number of HasRoute entries. * * @returns The number of HasRoute entries. * @@ -543,7 +543,7 @@ public: uint8_t GetNumEntries(void) const { return GetLength() / sizeof(HasRouteEntry); } /** - * This method returns a pointer to the HasRoute entry at a given index. + * Returns a pointer to the HasRoute entry at a given index. * * @param[in] aIndex An index. * @@ -556,7 +556,7 @@ public: } /** - * This method returns a pointer to the HasRoute entry at a given index. + * Returns a pointer to the HasRoute entry at a given index. * * @param[in] aIndex An index. * @@ -569,7 +569,7 @@ public: } /** - * This method returns a pointer to the first HasRouteEntry (at index 0'th). + * Returns a pointer to the first HasRouteEntry (at index 0'th). * * @returns A pointer to the first HasRouteEntry. * @@ -577,7 +577,7 @@ public: HasRouteEntry *GetFirstEntry(void) { return reinterpret_cast(GetValue()); } /** - * This method returns a pointer to the first HasRouteEntry (at index 0'th). + * Returns a pointer to the first HasRouteEntry (at index 0'th). * * @returns A pointer to the first HasRouteEntry. * @@ -585,7 +585,7 @@ public: const HasRouteEntry *GetFirstEntry(void) const { return reinterpret_cast(GetValue()); } /** - * This method returns a pointer to the last HasRouteEntry. + * Returns a pointer to the last HasRouteEntry. * * If there are no entries the pointer will be invalid but guaranteed to be before the `GetFirstEntry()` pointer. * @@ -598,7 +598,7 @@ public: } /** - * This method returns a pointer to the last HasRouteEntry. + * Returns a pointer to the last HasRouteEntry. * * If there are no entries the pointer will be invalid but guaranteed to be before the `GetFirstEntry()` pointer. * @@ -613,7 +613,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements Prefix TLV generation and parsing. + * Implements Prefix TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -623,7 +623,7 @@ public: static constexpr Type kType = kTypePrefix; ///< The TLV Type. /** - * This method initializes the TLV. + * Initializes the TLV. * * @param[in] aDomainId The Domain ID. * @param[in] aPrefixLength The Prefix Length in bits. @@ -641,7 +641,7 @@ public: } /** - * This method initializes the TLV. + * Initializes the TLV. * * @param[in] aDomainId The Domain ID. * @param[in] aPrefix The Prefix. @@ -653,7 +653,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -667,7 +667,7 @@ public: } /** - * This method returns the Domain ID value. + * Returns the Domain ID value. * * @returns The Domain ID value. * @@ -675,7 +675,7 @@ public: uint8_t GetDomainId(void) const { return mDomainId; } /** - * This method returns the Prefix Length value. + * Returns the Prefix Length value. * * @returns The Prefix Length value (in bits). * @@ -683,7 +683,7 @@ public: uint8_t GetPrefixLength(void) const { return mPrefixLength; } /** - * This method returns a pointer to the Prefix. + * Returns a pointer to the Prefix. * * @returns A pointer to the Prefix. * @@ -691,7 +691,7 @@ public: uint8_t *GetPrefix(void) { return reinterpret_cast(this) + sizeof(*this); } /** - * This method returns a pointer to the Prefix. + * Returns a pointer to the Prefix. * * @returns A pointer to the Prefix. * @@ -699,7 +699,7 @@ public: const uint8_t *GetPrefix(void) const { return reinterpret_cast(this) + sizeof(*this); } /** - * This method copies the Prefix from TLV into a given `Ip6::Prefix`. + * Copies the Prefix from TLV into a given `Ip6::Prefix`. * * @param[out] aPrefix An `Ip6::Prefix` to copy the Prefix from TLV into. * @@ -707,7 +707,7 @@ public: void CopyPrefixTo(Ip6::Prefix &aPrefix) const { aPrefix.Set(GetPrefix(), GetPrefixLength()); } /** - * This method indicates whether the Prefix from TLV is equal to a given `Ip6::Prefix`. + * Indicates whether the Prefix from TLV is equal to a given `Ip6::Prefix`. * * @param[in] aPrefix A Prefix to compare with. * @@ -718,7 +718,7 @@ public: bool IsEqual(Ip6::Prefix &aPrefix) const { return aPrefix.IsEqual(GetPrefix(), GetPrefixLength()); } /** - * This method indicates whether the Prefix from TLV is equal to a given Prefix. + * Indicates whether the Prefix from TLV is equal to a given Prefix. * * @param[in] aPrefix A pointer to an IPv6 prefix to compare with. * @param[in] aPrefixLength The prefix length pointed to by @p aPrefix (in bits). @@ -735,7 +735,7 @@ public: } /** - * This method returns a pointer to the Sub-TLVs. + * Returns a pointer to the Sub-TLVs. * * @returns A pointer to the Sub-TLVs. * @@ -746,7 +746,7 @@ public: } /** - * This method returns a pointer to the Sub-TLVs. + * Returns a pointer to the Sub-TLVs. * * @returns A pointer to the Sub-TLVs. * @@ -757,7 +757,7 @@ public: } /** - * This method returns the Sub-TLVs length in bytes. + * Returns the Sub-TLVs length in bytes. * * @returns The Sub-TLVs length in bytes. * @@ -768,7 +768,7 @@ public: } /** - * This method sets the Sub-TLVs length in bytes. + * Sets the Sub-TLVs length in bytes. * * @param[in] aLength The Sub-TLVs length in bytes. * @@ -779,7 +779,7 @@ public: } /** - * This template method searches in the sub-TLVs to find the first one matching a given TLV type. + * Searches in the sub-TLVs to find the first one matching a given TLV type. * * @tparam SubTlvType The sub-TLV type to search for (MUST be a sub-class of `NetworkDataTlv`). * @@ -792,7 +792,7 @@ public: } /** - * This template method searches in the sub-TLVs to find the first one matching a given TLV Type. + * Searches in the sub-TLVs to find the first one matching a given TLV Type. * * @tparam SubTlvType The sub-TLV type to search for (MUST be a sub-class of `NetworkDataTlv`). * @@ -805,7 +805,7 @@ public: } /** - * This template method searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. + * Searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. * * @tparam SubTlvType The sub-TLV type to search for (MUST be a sub-class of `NetworkDataTlv`). * @@ -820,7 +820,7 @@ public: } /** - * This template method searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. + * Searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. * * @tparam SubTlvType The sub-TLV type to search for (MUST be a sub-class of `NetworkDataTlv`). * @@ -835,7 +835,7 @@ public: } /** - * This method searches in the sub-TLVs to find the first one matching a given TLV type. + * Searches in the sub-TLVs to find the first one matching a given TLV type. * * @param[in] aType The sub-TLV type to search for. * @@ -845,7 +845,7 @@ public: NetworkDataTlv *FindSubTlv(Type aType) { return AsNonConst(AsConst(this)->FindSubTlv(aType)); } /** - * This method searches in the sub-TLVs to find the first one matching a given TLV type. + * Searches in the sub-TLVs to find the first one matching a given TLV type. * * @param[in] aType The sub-TLV type to search for. * @@ -855,7 +855,7 @@ public: const NetworkDataTlv *FindSubTlv(Type aType) const; /** - * This method searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. + * Searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. * * @param[in] aType The sub-TLV type to search for. * @param[in] aStable TRUE to find a stable TLV, FALSE to find a TLV not marked as stable. @@ -869,7 +869,7 @@ public: } /** - * This method searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. + * Searches in the sub-TLVs to find the first one matching a given TLV type and stable flag. * * @param[in] aType The sub-TLV type to search for. * @param[in] aStable TRUE to find a stable TLV, FALSE to find a TLV not marked as stable. @@ -880,7 +880,7 @@ public: const NetworkDataTlv *FindSubTlv(Type aType, bool aStable) const; /** - * This static method calculates the total size (number of bytes) of a Prefix TLV with a given Prefix Length value. + * Calculates the total size (number of bytes) of a Prefix TLV with a given Prefix Length value. * * Note that the returned size does include the Type and Length fields in the TLV, but does not account for any * sub TLVs of the Prefix TLV. @@ -901,7 +901,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Border Router Entry generation and parsing. + * Implements Border Router Entry generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -911,7 +911,7 @@ class BorderRouterEntry : public Equatable public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -921,14 +921,14 @@ public: } /** - * This method returns the RLOC16 value. + * Returns the RLOC16 value. * * @returns The RLOC16 value. */ uint16_t GetRloc(void) const { return HostSwap16(mRloc); } /** - * This method sets the RLOC16 value. + * Sets the RLOC16 value. * * @param[in] aRloc16 The RLOC16 value. * @@ -936,7 +936,7 @@ public: void SetRloc(uint16_t aRloc16) { mRloc = HostSwap16(aRloc16); } /** - * This method returns the Flags value. + * Returns the Flags value. * * @returns The Flags value. * @@ -944,7 +944,7 @@ public: uint16_t GetFlags(void) const { return HostSwap16(mFlags); } /** - * This method sets the Flags value. + * Sets the Flags value. * * @param[in] aFlags The Flags value. * @@ -952,7 +952,7 @@ public: void SetFlags(uint16_t aFlags) { mFlags = HostSwap16(aFlags); } /** - * This method returns the Preference value. + * Returns the Preference value. * * @returns the Preference value. * @@ -960,7 +960,7 @@ public: int8_t GetPreference(void) const { return PreferenceFromFlags(GetFlags()); } /** - * This method indicates whether or not the Preferred flag is set. + * Indicates whether or not the Preferred flag is set. * * @retval TRUE If the Preferred flag is set. * @retval FALSE If the Preferred flag is not set. @@ -969,7 +969,7 @@ public: bool IsPreferred(void) const { return (HostSwap16(mFlags) & kPreferredFlag) != 0; } /** - * This method indicates whether or not the SLAAC flag is set. + * Indicates whether or not the SLAAC flag is set. * * @retval TRUE If the SLAAC flag is set. * @retval FALSE If the SLAAC flag is not set. @@ -978,7 +978,7 @@ public: bool IsSlaac(void) const { return (HostSwap16(mFlags) & kSlaacFlag) != 0; } /** - * This method indicates whether or not the DHCP flag is set. + * Indicates whether or not the DHCP flag is set. * * @retval TRUE If the DHCP flag is set. * @retval FALSE If the DHCP flag is not set. @@ -987,7 +987,7 @@ public: bool IsDhcp(void) const { return (HostSwap16(mFlags) & kDhcpFlag) != 0; } /** - * This method indicates whether or not the Configure flag is set. + * Indicates whether or not the Configure flag is set. * * @retval TRUE If the Configure flag is set. * @retval FALSE If the Configure flag is not set. @@ -996,7 +996,7 @@ public: bool IsConfigure(void) const { return (HostSwap16(mFlags) & kConfigureFlag) != 0; } /** - * This method indicates whether or not the Default Route flag is set. + * Indicates whether or not the Default Route flag is set. * * @retval TRUE If the Default Route flag is set. * @retval FALSE If the Default Route flag is not set. @@ -1005,7 +1005,7 @@ public: bool IsDefaultRoute(void) const { return (HostSwap16(mFlags) & kDefaultRouteFlag) != 0; } /** - * This method indicates whether or not the On-Mesh flag is set. + * Indicates whether or not the On-Mesh flag is set. * * @retval TRUE If the On-Mesh flag is set. * @retval FALSE If the On-Mesh flag is not set. @@ -1014,7 +1014,7 @@ public: bool IsOnMesh(void) const { return (HostSwap16(mFlags) & kOnMeshFlag) != 0; } /** - * This method indicates whether or not the Nd-Dns flag is set. + * Indicates whether or not the Nd-Dns flag is set. * * @retval TRUE If the Nd-Dns flag is set. * @retval FALSE If the Nd-Dns flag is not set. @@ -1023,7 +1023,7 @@ public: bool IsNdDns(void) const { return (HostSwap16(mFlags) & kNdDnsFlag) != 0; } /** - * This method indicates whether or not the Domain Prefix flag is set. + * Indicates whether or not the Domain Prefix flag is set. * * @retval TRUE If the Domain Prefix flag is set. * @retval FALSE If the Domain Prefix flag is not set. @@ -1032,7 +1032,7 @@ public: bool IsDp(void) const { return (HostSwap16(mFlags) & kDpFlag) != 0; } /** - * This method returns a pointer to the next BorderRouterEntry + * Returns a pointer to the next BorderRouterEntry * * @returns A pointer to the next BorderRouterEntry. * @@ -1040,7 +1040,7 @@ public: BorderRouterEntry *GetNext(void) { return (this + 1); } /** - * This method returns a pointer to the next BorderRouterEntry + * Returns a pointer to the next BorderRouterEntry * * @returns A pointer to the next BorderRouterEntry. * @@ -1048,7 +1048,7 @@ public: const BorderRouterEntry *GetNext(void) const { return (this + 1); } /** - * This static method returns an updated flags bitmask by removing the preference bits (sets them to zero) from a + * Returns an updated flags bitmask by removing the preference bits (sets them to zero) from a * given flags bitmask. * * @param[in] aFlags The flags bitmask. @@ -1059,7 +1059,7 @@ public: static uint16_t FlagsWithoutPreference(uint16_t aFlags) { return (aFlags & ~kPreferenceMask); } /** - * This static method gets the preference field from a flags bitmask. + * Gets the preference field from a flags bitmask. * * @param[in] aFlags The flags. * @@ -1088,7 +1088,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Border Router TLV generation and parsing. + * Implements Border Router TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1098,7 +1098,7 @@ public: static constexpr Type kType = kTypeBorderRouter; ///< The TLV Type. /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1109,7 +1109,7 @@ public: } /** - * This method returns the number of Border Router entries. + * Returns the number of Border Router entries. * * @returns The number of Border Router entries. * @@ -1117,7 +1117,7 @@ public: uint8_t GetNumEntries(void) const { return GetLength() / sizeof(BorderRouterEntry); } /** - * This method returns a pointer to the Border Router entry at a given index + * Returns a pointer to the Border Router entry at a given index * * @param[in] aIndex The index. * @@ -1130,7 +1130,7 @@ public: } /** - * This method returns a pointer to the Border Router entry at a given index. + * Returns a pointer to the Border Router entry at a given index. * * @param[in] aIndex The index. * @@ -1143,7 +1143,7 @@ public: } /** - * This method returns a pointer to the first BorderRouterEntry (at index 0'th). + * Returns a pointer to the first BorderRouterEntry (at index 0'th). * * @returns A pointer to the first BorderRouterEntry. * @@ -1151,7 +1151,7 @@ public: BorderRouterEntry *GetFirstEntry(void) { return reinterpret_cast(GetValue()); } /** - * This method returns a pointer to the first BorderRouterEntry (at index 0'th). + * Returns a pointer to the first BorderRouterEntry (at index 0'th). * * @returns A pointer to the first BorderRouterEntry. * @@ -1162,7 +1162,7 @@ public: } /** - * This method returns a pointer to the last BorderRouterEntry. + * Returns a pointer to the last BorderRouterEntry. * * If there are no entries the pointer will be invalid but guaranteed to be before the `GetFirstEntry()` pointer. * @@ -1175,7 +1175,7 @@ public: } /** - * This method returns a pointer to the last BorderRouterEntry. + * Returns a pointer to the last BorderRouterEntry. * * If there are no entries the pointer will be invalid but guaranteed to be before the `GetFirstEntry()` pointer. * @@ -1190,7 +1190,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements Context TLV generation and processing. + * Implements Context TLV generation and processing. * */ OT_TOOL_PACKED_BEGIN @@ -1200,7 +1200,7 @@ public: static constexpr Type kType = kTypeContext; ///< The TLV Type. /** - * This method initializes the Context TLV. + * Initializes the Context TLV. * * @param[in] aContextId The Context ID value. * @param[in] aContextLength The Context Length value. @@ -1216,7 +1216,7 @@ public: } /** - * This method indicates whether or not the Compress flag is set. + * Indicates whether or not the Compress flag is set. * * @retval TRUE The Compress flag is set. * @retval FALSE The Compress flags is not set. @@ -1225,19 +1225,19 @@ public: bool IsCompress(void) const { return (mFlags & kCompressFlag) != 0; } /** - * This method clears the Compress flag. + * Clears the Compress flag. * */ void ClearCompress(void) { mFlags &= ~kCompressFlag; } /** - * This method sets the Compress flag. + * Sets the Compress flag. * */ void SetCompress(void) { mFlags |= kCompressFlag; } /** - * This method returns the Context ID value. + * Returns the Context ID value. * * @returns The Context ID value. * @@ -1245,7 +1245,7 @@ public: uint8_t GetContextId(void) const { return mFlags & kContextIdMask; } /** - * This method returns the Context Length value. + * Returns the Context Length value. * * @returns The Context Length value. * @@ -1262,7 +1262,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Commissioning Data TLV generation and parsing. + * Implements Commissioning Data TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1272,7 +1272,7 @@ public: static constexpr Type kType = kTypeCommissioningData; ///< The TLV Type. /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -1284,7 +1284,7 @@ public: } OT_TOOL_PACKED_END; /** - * This class implements Service Data TLV generation and parsing. + * Implements Service Data TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1296,7 +1296,7 @@ public: static constexpr uint32_t kThreadEnterpriseNumber = 44970; ///< Thread enterprise number. /** - * This method initializes the TLV. + * Initializes the TLV. * * @param[in] aServiceId The Service Id value. * @param[in] aEnterpriseNumber The Enterprise Number. @@ -1306,7 +1306,7 @@ public: void Init(uint8_t aServiceId, uint32_t aEnterpriseNumber, const ServiceData &aServiceData); /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1323,7 +1323,7 @@ public: } /** - * This method returns the Service ID. It is in range 0x00-0x0f. + * Returns the Service ID. It is in range 0x00-0x0f. * * @returns the Service ID. * @@ -1331,7 +1331,7 @@ public: uint8_t GetServiceId(void) const { return (mFlagsServiceId & kServiceIdMask); } /** - * This method returns Enterprise Number field. + * Returns Enterprise Number field. * * @returns The Enterprise Number. * @@ -1343,7 +1343,7 @@ public: } /** - * This method gets the Service Data. + * Gets the Service Data. * * @param[out] aServiceData A reference to a`ServiceData` to return the data. * @@ -1354,7 +1354,7 @@ public: } /** - * This method gets Service Data length. + * Gets Service Data length. * * @returns length of the Service Data field in bytes. * @@ -1365,7 +1365,7 @@ public: } /** - * This method returns the Sub-TLVs length in bytes. + * Returns the Sub-TLVs length in bytes. * * @returns The Sub-TLVs length in bytes. * @@ -1373,7 +1373,7 @@ public: uint8_t GetSubTlvsLength(void) { return GetLength() - GetFieldsLength(); } /** - * This method sets the Sub-TLVs length in bytes. + * Sets the Sub-TLVs length in bytes. * * @param[in] aLength The Sub-TLVs length in bytes. * @@ -1381,7 +1381,7 @@ public: void SetSubTlvsLength(uint8_t aLength) { SetLength(GetFieldsLength() + aLength); } /** - * This method returns a pointer to the Sub-TLVs. + * Returns a pointer to the Sub-TLVs. * * @returns A pointer to the Sub-TLVs. * @@ -1389,7 +1389,7 @@ public: NetworkDataTlv *GetSubTlvs(void) { return reinterpret_cast(GetValue() + GetFieldsLength()); } /** - * This method returns a pointer to the Sub-TLVs. + * Returns a pointer to the Sub-TLVs. * * @returns A pointer to the Sub-TLVs. * @@ -1400,7 +1400,7 @@ public: } /** - * This static method calculates the total size (number of bytes) of a Service TLV with a given Enterprise Number + * Calculates the total size (number of bytes) of a Service TLV with a given Enterprise Number * and Service Data length. * * Note that the returned size does include the Type and Length fields in the TLV, but does not account for any @@ -1455,7 +1455,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Server Data TLV generation and parsing. + * Implements Server Data TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -1465,7 +1465,7 @@ public: static constexpr Type kType = kTypeServer; ///< The TLV Type. /** - * This method initializes the Server TLV. + * Initializes the Server TLV. * * @param[in] aServer16 The Server16 value. * @param[in] aServerData The Server Data. @@ -1481,7 +1481,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -1490,7 +1490,7 @@ public: bool IsValid(void) const { return GetLength() >= (sizeof(*this) - sizeof(NetworkDataTlv)); } /** - * This method returns the Server16 value. + * Returns the Server16 value. * * @returns The Server16 value. * @@ -1498,7 +1498,7 @@ public: uint16_t GetServer16(void) const { return HostSwap16(mServer16); } /* - * This method sets the Server16 value. + * Sets the Server16 value. * * @param[in] aServer16 The Server16 value. * @@ -1506,7 +1506,7 @@ public: void SetServer16(uint16_t aServer16) { mServer16 = HostSwap16(aServer16); } /** - * This method gets the Server Data. + * Gets the Server Data. * * @param[out] aServerData A reference to a`ServerData` to return the data. * @@ -1514,7 +1514,7 @@ public: void GetServerData(ServerData &aServerData) const { aServerData.Init(GetServerData(), GetServerDataLength()); } /** - * This method returns the Server Data length in bytes. + * Returns the Server Data length in bytes. * * @returns The Server Data length in bytes. * @@ -1522,7 +1522,7 @@ public: uint8_t GetServerDataLength(void) const { return GetLength() - (sizeof(*this) - sizeof(NetworkDataTlv)); } /** - * This method indicates whether two Server TLVs fully match. + * Indicates whether two Server TLVs fully match. * * @param[in] aOther Another Server TLV to compare with it. * @@ -1536,7 +1536,7 @@ public: } /** - * This static method calculates the total size (number of bytes) of a Service TLV with a given Server Data length. + * Calculates the total size (number of bytes) of a Service TLV with a given Server Data length. * * Note that the returned size does include the Type and Length fields in the TLV. * @@ -1555,14 +1555,14 @@ private: } OT_TOOL_PACKED_END; /** - * This class represents a Network Data TLV iterator. + * Represents a Network Data TLV iterator. * */ class TlvIterator { public: /** - * This constructor initializes the `TlvIterator` to iterate over a given sequence of TLVs. + * Initializes the `TlvIterator` to iterate over a given sequence of TLVs. * * @param[in] aStart A pointer to the start of the TLV sequence. * @param[in] aEnd A pointer to the end of the TLV sequence. @@ -1575,7 +1575,7 @@ public: } /** - * This constructor initializes the `TlvIterator` to iterate over TLVs from a given buffer. + * Initializes the `TlvIterator` to iterate over TLVs from a given buffer. * * @param[in] aBuffer A pointer to a buffer containing the TLVs. * @param[in] aLength The length (number of bytes) of @p aBuffer. @@ -1588,7 +1588,7 @@ public: } /** - * This constructor initializes the `TlvIterator` to iterate over sub-TLVs of a given Prefix TLV. + * Initializes the `TlvIterator` to iterate over sub-TLVs of a given Prefix TLV. * * @param[in] aPrefixTlv A Prefix TLV to iterate over its sub-TLVs. * @@ -1599,7 +1599,7 @@ public: } /** - * This constructor initializes the `TlvIterator` to iterate over sub-TLVs of a given Service TLV. + * Initializes the `TlvIterator` to iterate over sub-TLVs of a given Service TLV. * * @param[in] aServiceTlv A Service TLV to iterate over its sub-TLVs. * @@ -1610,7 +1610,7 @@ public: } /** - * This template method iterates to the next TLV with a given type. + * Iterates to the next TLV with a given type. * * @tparam TlvType The TLV Type to search for (MUST be a sub-class of `NetworkDataTlv`). * @@ -1620,7 +1620,7 @@ public: template const TlvType *Iterate(void) { return As(Iterate(TlvType::kType)); } /** - * This template method iterates to the next TLV with a given type and stable flag. + * Iterates to the next TLV with a given type and stable flag. * * @tparam TlvType The TLV Type to search for (MUST be a sub-class of `NetworkDataTlv`). * diff --git a/src/core/thread/network_data_types.hpp b/src/core/thread/network_data_types.hpp index 642b398e6..1457aa239 100644 --- a/src/core/thread/network_data_types.hpp +++ b/src/core/thread/network_data_types.hpp @@ -71,7 +71,7 @@ class ServerTlv; class ContextTlv; /** - * This enumeration represents the Network Data type. + * Represents the Network Data type. * */ enum Type : uint8_t @@ -81,7 +81,7 @@ enum Type : uint8_t }; /** - * This enumeration type represents the route preference values as a signed integer (per RFC-4191). + * Type represents the route preference values as a signed integer (per RFC-4191). * */ enum RoutePreference : int8_t @@ -96,7 +96,7 @@ static_assert(kRoutePreferenceMedium == Preference::kMedium, "kRoutePreferenceMe static_assert(kRoutePreferenceLow == Preference::kLow, "kRoutePreferenceLow is not valid"); /** - * This enumeration represents the border router RLOC role filter used when searching for border routers in the Network + * Represents the border router RLOC role filter used when searching for border routers in the Network * Data. * */ @@ -108,7 +108,7 @@ enum RoleFilter : uint8_t }; /** - * This function indicates whether a given `int8_t` preference value is a valid route preference (i.e., one of the + * Indicates whether a given `int8_t` preference value is a valid route preference (i.e., one of the * values from `RoutePreference` enumeration). * * @param[in] aPref The signed route preference value. @@ -120,7 +120,7 @@ enum RoleFilter : uint8_t inline bool IsRoutePreferenceValid(int8_t aPref) { return Preference::IsValid(aPref); } /** - * This function coverts a route preference to a 2-bit unsigned value. + * Coverts a route preference to a 2-bit unsigned value. * * The @p aPref MUST be valid (value from `RoutePreference` enumeration), or the behavior is undefined. * @@ -132,7 +132,7 @@ inline bool IsRoutePreferenceValid(int8_t aPref) { return Preference::IsValid(aP inline uint8_t RoutePreferenceToValue(int8_t aPref) { return Preference::To2BitUint(aPref); } /** - * This function coverts a 2-bit unsigned value to a route preference. + * Coverts a 2-bit unsigned value to a route preference. * * @param[in] aValue The 2-bit unsigned value to convert from. Note that only the first two bits of @p aValue * are used and the rest of bits are ignored. @@ -146,7 +146,7 @@ inline RoutePreference RoutePreferenceFromValue(uint8_t aValue) } /** - * This function converts a router preference to a human-readable string. + * Converts a router preference to a human-readable string. * * @param[in] aPreference The preference to convert * @@ -156,7 +156,7 @@ inline RoutePreference RoutePreferenceFromValue(uint8_t aValue) inline const char *RoutePreferenceToString(RoutePreference aPreference) { return Preference::ToString(aPreference); } /** - * This class represents an On-mesh Prefix (Border Router) configuration. + * Represents an On-mesh Prefix (Border Router) configuration. * */ class OnMeshPrefixConfig : public otBorderRouterConfig, @@ -170,7 +170,7 @@ class OnMeshPrefixConfig : public otBorderRouterConfig, public: /** - * This method gets the prefix. + * Gets the prefix. * * @return The prefix. * @@ -178,7 +178,7 @@ public: const Ip6::Prefix &GetPrefix(void) const { return AsCoreType(&mPrefix); } /** - * This method gets the prefix. + * Gets the prefix. * * @return The prefix. * @@ -186,7 +186,7 @@ public: Ip6::Prefix &GetPrefix(void) { return AsCoreType(&mPrefix); } /** - * This method gets the preference. + * Gets the preference. * * @return The preference. * @@ -195,7 +195,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE /** - * This method indicates whether or not the prefix configuration is valid. + * Indicates whether or not the prefix configuration is valid. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -217,7 +217,7 @@ private: }; /** - * This class represents an External Route configuration. + * Represents an External Route configuration. * */ class ExternalRouteConfig : public otExternalRouteConfig, @@ -230,7 +230,7 @@ class ExternalRouteConfig : public otExternalRouteConfig, public: /** - * This method gets the prefix. + * Gets the prefix. * * @return The prefix. * @@ -238,7 +238,7 @@ public: const Ip6::Prefix &GetPrefix(void) const { return AsCoreType(&mPrefix); } /** - * This method gets the prefix. + * Gets the prefix. * * @return The prefix. * @@ -246,7 +246,7 @@ public: Ip6::Prefix &GetPrefix(void) { return AsCoreType(&mPrefix); } /** - * This method sets the prefix. + * Sets the prefix. * * @param[in] aPrefix The prefix to set to. * @@ -255,7 +255,7 @@ public: #if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE /** - * This method indicates whether or not the external route configuration is valid. + * Indicates whether or not the external route configuration is valid. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -278,7 +278,7 @@ private: }; /** - * This class represents 6LoWPAN Context ID information associated with a prefix in Network Data. + * Represents 6LoWPAN Context ID information associated with a prefix in Network Data. * */ class LowpanContextInfo : public otLowpanContextInfo, public Clearable @@ -287,7 +287,7 @@ class LowpanContextInfo : public otLowpanContextInfo, public Clearable @@ -308,7 +308,7 @@ class ServiceData : public Data }; /** - * This class represents a Server Data. + * Represents a Server Data. * */ class ServerData : public Data @@ -316,7 +316,7 @@ class ServerData : public Data }; /** - * This type represents a Service configuration. + * Represents a Service configuration. * */ class ServiceConfig : public otServiceConfig, public Clearable, public Unequatable @@ -325,7 +325,7 @@ class ServiceConfig : public otServiceConfig, public Clearable, p public: /** - * This class represents a Server configuration. + * Represents a Server configuration. * */ class ServerConfig : public otServerConfig, public Unequatable @@ -334,7 +334,7 @@ public: public: /** - * This method gets the Server Data. + * Gets the Server Data. * * @param[out] aServerData A reference to a`ServerData` to return the data. * @@ -342,7 +342,7 @@ public: void GetServerData(ServerData &aServerData) const { aServerData.Init(mServerData, mServerDataLength); } /** - * This method overloads operator `==` to evaluate whether or not two `ServerConfig` instances are equal. + * Overloads operator `==` to evaluate whether or not two `ServerConfig` instances are equal. * * @param[in] aOther The other `ServerConfig` instance to compare with. * @@ -357,7 +357,7 @@ public: }; /** - * This method gets the Service Data. + * Gets the Service Data. * * @param[out] aServiceData A reference to a `ServiceData` to return the data. * @@ -365,7 +365,7 @@ public: void GetServiceData(ServiceData &aServiceData) const { aServiceData.Init(mServiceData, mServiceDataLength); } /** - * This method gets the Server configuration. + * Gets the Server configuration. * * @returns The Server configuration. * @@ -373,7 +373,7 @@ public: const ServerConfig &GetServerConfig(void) const { return static_cast(mServerConfig); } /** - * This method gets the Server configuration. + * Gets the Server configuration. * * @returns The Server configuration. * @@ -381,7 +381,7 @@ public: ServerConfig &GetServerConfig(void) { return static_cast(mServerConfig); } /** - * This method overloads operator `==` to evaluate whether or not two `ServiceConfig` instances are equal. + * Overloads operator `==` to evaluate whether or not two `ServiceConfig` instances are equal. * * @param[in] aOther The other `ServiceConfig` instance to compare with. * diff --git a/src/core/thread/network_diagnostic.hpp b/src/core/thread/network_diagnostic.hpp index 4026aa32c..0070207b4 100644 --- a/src/core/thread/network_diagnostic.hpp +++ b/src/core/thread/network_diagnostic.hpp @@ -62,7 +62,7 @@ namespace NetworkDiagnostic { class Client; /** - * This class implements the Network Diagnostic server responding to requests. + * Implements the Network Diagnostic server responding to requests. * */ class Server : public InstanceLocator, private NonCopyable @@ -72,7 +72,7 @@ class Server : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the Server. + * Initializes the Server. * * @param[in] aInstance The OpenThread instance. * @@ -81,7 +81,7 @@ public: #if OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE /** - * This method returns the vendor name string. + * Returns the vendor name string. * * @returns The vendor name string. * @@ -89,7 +89,7 @@ public: const char *GetVendorName(void) const { return mVendorName; } /** - * This method sets the vendor name string. + * Sets the vendor name string. * * @param[in] aVendorName The vendor name string. * @@ -100,7 +100,7 @@ public: Error SetVendorName(const char *aVendorName); /** - * This method returns the vendor model string. + * Returns the vendor model string. * * @returns The vendor model string. * @@ -108,7 +108,7 @@ public: const char *GetVendorModel(void) const { return mVendorModel; } /** - * This method sets the vendor model string. + * Sets the vendor model string. * * @param[in] aVendorModel The vendor model string. * @@ -119,7 +119,7 @@ public: Error SetVendorModel(const char *aVendorModel); /** - * This method returns the vendor software version string. + * Returns the vendor software version string. * * @returns The vendor software version string. * @@ -127,7 +127,7 @@ public: const char *GetVendorSwVersion(void) const { return mVendorSwVersion; } /** - * This method sets the vendor sw version string + * Sets the vendor sw version string * * @param[in] aVendorSwVersion The vendor sw version string. * @@ -175,7 +175,7 @@ DeclareTmfHandler(Server, kUriDiagnosticGetAnswer); #if OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE /** - * This class implements the Network Diagnostic client sending requests and queries. + * Implements the Network Diagnostic client sending requests and queries. * */ class Client : public InstanceLocator, private NonCopyable @@ -191,7 +191,7 @@ public: static constexpr Iterator kIteratorInit = OT_NETWORK_DIAGNOSTIC_ITERATOR_INIT; ///< Initializer for Iterator. /** - * This constructor initializes the Client. + * Initializes the Client. * * @param[in] aInstance The OpenThread instance. * @@ -199,7 +199,7 @@ public: explicit Client(Instance &aInstance); /** - * This method sends Diagnostic Get request. If the @p aDestination is of multicast type, the DIAG_GET.qry + * Sends Diagnostic Get request. If the @p aDestination is of multicast type, the DIAG_GET.qry * message is sent or the DIAG_GET.req otherwise. * * @param[in] aDestination The destination address. @@ -216,7 +216,7 @@ public: void *Context); /** - * This method sends Diagnostic Reset request. + * Sends Diagnostic Reset request. * * @param[in] aDestination The destination address. * @param[in] aTlvTypes An array of Network Diagnostic TLV types. @@ -226,7 +226,7 @@ public: Error SendDiagnosticReset(const Ip6::Address &aDestination, const uint8_t aTlvTypes[], uint8_t aCount); /** - * This static method gets the next Network Diagnostic TLV in a given message. + * Gets the next Network Diagnostic TLV in a given message. * * @param[in] aMessage Message to read TLVs from. * @param[in,out] aIterator The Network Diagnostic iterator. To get the first TLV set it to `kIteratorInit`. diff --git a/src/core/thread/network_diagnostic_tlvs.hpp b/src/core/thread/network_diagnostic_tlvs.hpp index c46298cff..cc366c56a 100644 --- a/src/core/thread/network_diagnostic_tlvs.hpp +++ b/src/core/thread/network_diagnostic_tlvs.hpp @@ -56,7 +56,7 @@ using ot::Encoding::BigEndian::HostSwap16; using ot::Encoding::BigEndian::HostSwap32; /** - * This class implements Network Diagnostic TLV generation and parsing. + * Implements Network Diagnostic TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -117,7 +117,7 @@ public: static constexpr uint8_t kMaxThreadStackVersionLength = OT_NETWORK_DIAGNOSTIC_MAX_THREAD_STACK_VERSION_TLV_LENGTH; /** - * This method returns the Type value. + * Returns the Type value. * * @returns The Type value. * @@ -125,7 +125,7 @@ public: Type GetType(void) const { return static_cast(ot::Tlv::GetType()); } /** - * This method sets the Type value. + * Sets the Type value. * * @param[in] aType The Type value. * @@ -135,91 +135,91 @@ public: } OT_TOOL_PACKED_END; /** - * This class defines Extended MAC Address TLV constants and types. + * Defines Extended MAC Address TLV constants and types. * */ typedef SimpleTlvInfo ExtMacAddressTlv; /** - * This class defines Address16 TLV constants and types. + * Defines Address16 TLV constants and types. * */ typedef UintTlvInfo Address16Tlv; /** - * This class defines Mode TLV constants and types. + * Defines Mode TLV constants and types. * */ typedef UintTlvInfo ModeTlv; /** - * This class defines Timeout TLV constants and types. + * Defines Timeout TLV constants and types. * */ typedef UintTlvInfo TimeoutTlv; /** - * This class defines Network Data TLV constants and types. + * Defines Network Data TLV constants and types. * */ typedef TlvInfo NetworkDataTlv; /** - * This class defines IPv6 Address List TLV constants and types. + * Defines IPv6 Address List TLV constants and types. * */ typedef TlvInfo Ip6AddressListTlv; /** - * This class defines Battery Level TLV constants and types. + * Defines Battery Level TLV constants and types. * */ typedef UintTlvInfo BatteryLevelTlv; /** - * This class defines Supply Voltage TLV constants and types. + * Defines Supply Voltage TLV constants and types. * */ typedef UintTlvInfo SupplyVoltageTlv; /** - * This class defines Child Table TLV constants and types. + * Defines Child Table TLV constants and types. * */ typedef TlvInfo ChildTableTlv; /** - * This class defines Max Child Timeout TLV constants and types. + * Defines Max Child Timeout TLV constants and types. * */ typedef UintTlvInfo MaxChildTimeoutTlv; /** - * This class defines Version TLV constants and types. + * Defines Version TLV constants and types. * */ typedef UintTlvInfo VersionTlv; /** - * This class defines Vendor Name TLV constants and types. + * Defines Vendor Name TLV constants and types. * */ typedef StringTlvInfo VendorNameTlv; /** - * This class defines Vendor Model TLV constants and types. + * Defines Vendor Model TLV constants and types. * */ typedef StringTlvInfo VendorModelTlv; /** - * This class defines Vendor SW Version TLV constants and types. + * Defines Vendor SW Version TLV constants and types. * */ typedef StringTlvInfo VendorSwVersionTlv; /** - * This class defines Thread Stack Version TLV constants and types. + * Defines Thread Stack Version TLV constants and types. * */ typedef StringTlvInfo ThreadStackVersionTlv; @@ -227,7 +227,7 @@ typedef StringTlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -328,7 +328,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -337,7 +337,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(Tlv); } /** - * This method returns the IfInUnknownProtos counter. + * Returns the IfInUnknownProtos counter. * * @returns The IfInUnknownProtos counter * @@ -345,7 +345,7 @@ public: uint32_t GetIfInUnknownProtos(void) const { return HostSwap32(mIfInUnknownProtos); } /** - * This method sets the IfInUnknownProtos counter. + * Sets the IfInUnknownProtos counter. * * @param[in] aIfInUnknownProtos The IfInUnknownProtos counter * @@ -356,7 +356,7 @@ public: } /** - * This method returns the IfInErrors counter. + * Returns the IfInErrors counter. * * @returns The IfInErrors counter * @@ -364,7 +364,7 @@ public: uint32_t GetIfInErrors(void) const { return HostSwap32(mIfInErrors); } /** - * This method sets the IfInErrors counter. + * Sets the IfInErrors counter. * * @param[in] aIfInErrors The IfInErrors counter * @@ -372,7 +372,7 @@ public: void SetIfInErrors(const uint32_t aIfInErrors) { mIfInErrors = HostSwap32(aIfInErrors); } /** - * This method returns the IfOutErrors counter. + * Returns the IfOutErrors counter. * * @returns The IfOutErrors counter * @@ -380,7 +380,7 @@ public: uint32_t GetIfOutErrors(void) const { return HostSwap32(mIfOutErrors); } /** - * This method sets the IfOutErrors counter. + * Sets the IfOutErrors counter. * * @param[in] aIfOutErrors The IfOutErrors counter. * @@ -388,7 +388,7 @@ public: void SetIfOutErrors(const uint32_t aIfOutErrors) { mIfOutErrors = HostSwap32(aIfOutErrors); } /** - * This method returns the IfInUcastPkts counter. + * Returns the IfInUcastPkts counter. * * @returns The IfInUcastPkts counter * @@ -396,14 +396,14 @@ public: uint32_t GetIfInUcastPkts(void) const { return HostSwap32(mIfInUcastPkts); } /** - * This method sets the IfInUcastPkts counter. + * Sets the IfInUcastPkts counter. * * @param[in] aIfInUcastPkts The IfInUcastPkts counter. * */ void SetIfInUcastPkts(const uint32_t aIfInUcastPkts) { mIfInUcastPkts = HostSwap32(aIfInUcastPkts); } /** - * This method returns the IfInBroadcastPkts counter. + * Returns the IfInBroadcastPkts counter. * * @returns The IfInBroadcastPkts counter * @@ -411,7 +411,7 @@ public: uint32_t GetIfInBroadcastPkts(void) const { return HostSwap32(mIfInBroadcastPkts); } /** - * This method sets the IfInBroadcastPkts counter. + * Sets the IfInBroadcastPkts counter. * * @param[in] aIfInBroadcastPkts The IfInBroadcastPkts counter. * @@ -422,7 +422,7 @@ public: } /** - * This method returns the IfInDiscards counter. + * Returns the IfInDiscards counter. * * @returns The IfInDiscards counter * @@ -430,7 +430,7 @@ public: uint32_t GetIfInDiscards(void) const { return HostSwap32(mIfInDiscards); } /** - * This method sets the IfInDiscards counter. + * Sets the IfInDiscards counter. * * @param[in] aIfInDiscards The IfInDiscards counter. * @@ -438,7 +438,7 @@ public: void SetIfInDiscards(const uint32_t aIfInDiscards) { mIfInDiscards = HostSwap32(aIfInDiscards); } /** - * This method returns the IfOutUcastPkts counter. + * Returns the IfOutUcastPkts counter. * * @returns The IfOutUcastPkts counter * @@ -446,7 +446,7 @@ public: uint32_t GetIfOutUcastPkts(void) const { return HostSwap32(mIfOutUcastPkts); } /** - * This method sets the IfOutUcastPkts counter. + * Sets the IfOutUcastPkts counter. * * @param[in] aIfOutUcastPkts The IfOutUcastPkts counter. * @@ -454,7 +454,7 @@ public: void SetIfOutUcastPkts(const uint32_t aIfOutUcastPkts) { mIfOutUcastPkts = HostSwap32(aIfOutUcastPkts); } /** - * This method returns the IfOutBroadcastPkts counter. + * Returns the IfOutBroadcastPkts counter. * * @returns The IfOutBroadcastPkts counter * @@ -462,7 +462,7 @@ public: uint32_t GetIfOutBroadcastPkts(void) const { return HostSwap32(mIfOutBroadcastPkts); } /** - * This method sets the IfOutBroadcastPkts counter. + * Sets the IfOutBroadcastPkts counter. * * @param[in] aIfOutBroadcastPkts The IfOutBroadcastPkts counter. * @@ -473,7 +473,7 @@ public: } /** - * This method returns the IfOutDiscards counter. + * Returns the IfOutDiscards counter. * * @returns The IfOutDiscards counter * @@ -481,7 +481,7 @@ public: uint32_t GetIfOutDiscards(void) const { return HostSwap32(mIfOutDiscards); } /** - * This method sets the IfOutDiscards counter. + * Sets the IfOutDiscards counter. * * @param[in] aIfOutDiscards The IfOutDiscards counter. * @@ -501,7 +501,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Child Table Entry generation and parsing. + * Implements Child Table Entry generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -509,7 +509,7 @@ class ChildTableEntry : public Clearable { public: /** - * This method returns the Timeout value. + * Returns the Timeout value. * * @returns The Timeout value. * @@ -517,7 +517,7 @@ public: uint8_t GetTimeout(void) const { return (GetTimeoutChildId() & kTimeoutMask) >> kTimeoutOffset; } /** - * This method sets the Timeout value. + * Sets the Timeout value. * * @param[in] aTimeout The Timeout value. * @@ -528,7 +528,7 @@ public: } /** - * This method the Link Quality value. + * The Link Quality value. * * @returns The Link Quality value. * @@ -539,7 +539,7 @@ public: } /** - * This method set the Link Quality value. + * Set the Link Quality value. * * @param[in] aLinkQuality The Link Quality value. * @@ -550,7 +550,7 @@ public: } /** - * This method returns the Child ID value. + * Returns the Child ID value. * * @returns The Child ID value. * @@ -558,7 +558,7 @@ public: uint16_t GetChildId(void) const { return (GetTimeoutChildId() & kChildIdMask) >> kChildIdOffset; } /** - * This method sets the Child ID value. + * Sets the Child ID value. * * @param[in] aChildId The Child ID value. * @@ -569,7 +569,7 @@ public: } /** - * This method returns the Device Mode + * Returns the Device Mode * * @returns The Device Mode * @@ -577,7 +577,7 @@ public: Mle::DeviceMode GetMode(void) const { return Mle::DeviceMode(mMode); } /** - * This method sets the Device Mode. + * Sets the Device Mode. * * @param[in] aMode The Device Mode. * @@ -606,7 +606,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements Channel Pages TLV generation and parsing. + * Implements Channel Pages TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -614,7 +614,7 @@ class ChannelPagesTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -624,7 +624,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -637,7 +637,7 @@ public: } /** - * This method returns a pointer to the list of Channel Pages. + * Returns a pointer to the list of Channel Pages. * * @returns A pointer to the list of Channel Pages. * @@ -649,7 +649,7 @@ private: } OT_TOOL_PACKED_END; /** - * This class implements IPv6 Address List TLV generation and parsing. + * Implements IPv6 Address List TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -657,7 +657,7 @@ class TypeListTlv : public Tlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) diff --git a/src/core/thread/panid_query_server.hpp b/src/core/thread/panid_query_server.hpp index 70deaf9e9..ed0c67421 100644 --- a/src/core/thread/panid_query_server.hpp +++ b/src/core/thread/panid_query_server.hpp @@ -47,7 +47,7 @@ namespace ot { /** - * This class implements handling PANID Query Requests. + * Implements handling PANID Query Requests. * */ class PanIdQueryServer : public InstanceLocator, private NonCopyable @@ -56,7 +56,7 @@ class PanIdQueryServer : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * */ explicit PanIdQueryServer(Instance &aInstance); diff --git a/src/core/thread/radio_selector.hpp b/src/core/thread/radio_selector.hpp index bf980cc15..40cb8b55f 100644 --- a/src/core/thread/radio_selector.hpp +++ b/src/core/thread/radio_selector.hpp @@ -65,7 +65,7 @@ class RadioSelector : InstanceLocator { public: /** - * This class defines all the neighbor info required for multi radio link and radio selection. + * Defines all the neighbor info required for multi radio link and radio selection. * * `Neighbor` class publicly inherits from this class. * @@ -76,13 +76,13 @@ public: public: /** - * This type represents multi radio information associated with a neighbor. + * Represents multi radio information associated with a neighbor. * */ typedef otMultiRadioNeighborInfo MultiRadioInfo; /** - * This method returns the supported radio types by the neighbor. + * Returns the supported radio types by the neighbor. * * @returns The supported radio types set. * @@ -90,7 +90,7 @@ public: Mac::RadioTypes GetSupportedRadioTypes(void) const { return mSupportedRadioTypes; } /** - * This method retrieves the multi radio information `otMultiRadioNeighborInfo` associated with the neighbor. + * Retrieves the multi radio information `otMultiRadioNeighborInfo` associated with the neighbor. * * @param[out] aInfo A reference to `MultiRadioInfo` to populate with neighbor info. * @@ -110,7 +110,7 @@ public: }; /** - * This constructor initializes the RadioSelector object. + * Initializes the RadioSelector object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -118,9 +118,9 @@ public: explicit RadioSelector(Instance &aInstance); /** - * This method updates the neighbor info (for multi radio support) on a received frame event. + * Updates the neighbor info (for multi radio support) on a received frame event. * - * This method notifies `RadioSelector` of a received secure frame/message on a radio link type for neighbor. If + * Notifies `RadioSelector` of a received secure frame/message on a radio link type for neighbor. If * the frame/message happens to be received earlier on another radio link, the `aIsDuplicate` is set to `true`. * A duplicate frame/message should have passed the security check (i.e., tag/MIC should be valid). * @@ -132,9 +132,9 @@ public: void UpdateOnReceive(Neighbor &aNeighbor, Mac::RadioType aRadioType, bool aIsDuplicate); /** - * This method updates the neighbor info (for multi radio support) on a send done event. + * Updates the neighbor info (for multi radio support) on a send done event. * - * This method notifies `RadioSelector` the status of frame transmission on a radio link type. The radio link + * Notifies `RadioSelector` the status of frame transmission on a radio link type. The radio link * type is provided by the `aFrame` itself. * * @param[in] aFrame A transmitted frame. @@ -145,7 +145,7 @@ public: #if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE /** - * This method updates the neighbor info (for multi radio support) on a deferred ack event. + * Updates the neighbor info (for multi radio support) on a deferred ack event. * * The deferred ack model is used by TREL radio link. * @@ -158,7 +158,7 @@ public: #endif /** - * This method selects the radio link type for sending a data poll frame to a given parent neighbor. + * Selects the radio link type for sending a data poll frame to a given parent neighbor. * * @param[in] aParent The parent to which the data poll frame will be sent. * @@ -168,7 +168,7 @@ public: Mac::RadioType SelectPollFrameRadio(const Neighbor &aParent); /** - * This method selects the radio link for sending a given message to a specified MAC destination. + * Selects the radio link for sending a given message to a specified MAC destination. * * The `aMessage` will be updated to store the selected radio type (please see `Message::GetRadioType()`). * The `aTxFrames` will also be updated to indicate which radio links are to be used. diff --git a/src/core/thread/router_table.hpp b/src/core/thread/router_table.hpp index e87ed0dbc..bed25ab13 100644 --- a/src/core/thread/router_table.hpp +++ b/src/core/thread/router_table.hpp @@ -63,19 +63,19 @@ public: explicit RouterTable(Instance &aInstance); /** - * This method clears the router table. + * Clears the router table. * */ void Clear(void); /** - * This method removes all neighbor links to routers. + * Removes all neighbor links to routers. * */ void ClearNeighbors(void); /** - * This method allocates a router with a random Router ID. + * Allocates a router with a random Router ID. * * @returns A pointer to the allocated router or `nullptr` if a Router ID is not available. * @@ -83,7 +83,7 @@ public: Router *Allocate(void); /** - * This method allocates a router with a specified Router ID. + * Allocates a router with a specified Router ID. * * @param[in] aRouterId The Router ID to try to allocate. * @@ -93,7 +93,7 @@ public: Router *Allocate(uint8_t aRouterId); /** - * This method releases a Router ID. + * Releases a Router ID. * * @param[in] aRouterId The Router ID. * @@ -105,7 +105,7 @@ public: Error Release(uint8_t aRouterId); /** - * This method removes a router link. + * Removes a router link. * * @param[in] aRouter A reference to the router. * @@ -113,7 +113,7 @@ public: void RemoveRouterLink(Router &aRouter); /** - * This method returns the number of active routers in the Thread network. + * Returns the number of active routers in the Thread network. * * @returns The number of active routers in the Thread network. * @@ -121,7 +121,7 @@ public: uint8_t GetActiveRouterCount(void) const { return mRouters.GetLength(); } /** - * This method returns the leader in the Thread network. + * Returns the leader in the Thread network. * * @returns A pointer to the Leader in the Thread network. * @@ -129,7 +129,7 @@ public: Router *GetLeader(void) { return AsNonConst(AsConst(this)->GetLeader()); } /** - * This method returns the leader in the Thread network. + * Returns the leader in the Thread network. * * @returns A pointer to the Leader in the Thread network. * @@ -137,7 +137,7 @@ public: const Router *GetLeader(void) const; /** - * This method returns the leader's age in seconds, i.e., seconds since the last Router ID Sequence update. + * Returns the leader's age in seconds, i.e., seconds since the last Router ID Sequence update. * * @returns The leader's age. * @@ -145,7 +145,7 @@ public: uint32_t GetLeaderAge(void) const; /** - * This method returns the link cost for a neighboring router. + * Returns the link cost for a neighboring router. * * @param[in] aRouter A router. * @@ -155,7 +155,7 @@ public: uint8_t GetLinkCost(const Router &aRouter) const; /** - * This method returns the link cost to the given Router. + * Returns the link cost to the given Router. * * @param[in] aRouterId The Router ID. * @@ -165,7 +165,7 @@ public: uint8_t GetLinkCost(uint8_t aRouterId) const; /** - * This method returns the minimum mesh path cost to the given RLOC16 + * Returns the minimum mesh path cost to the given RLOC16 * * @param[in] aDestRloc16 The RLOC16 of destination * @@ -175,7 +175,7 @@ public: uint8_t GetPathCost(uint16_t aDestRloc16) const; /** - * This method returns the mesh path cost to leader. + * Returns the mesh path cost to leader. * * @returns The path cost to leader. * @@ -183,7 +183,7 @@ public: uint8_t GetPathCostToLeader(void) const; /** - * This method determines the next hop towards an RLOC16 destination. + * Determines the next hop towards an RLOC16 destination. * * @param[in] aDestRloc16 The RLOC16 of the destination. * @@ -193,7 +193,7 @@ public: uint16_t GetNextHop(uint16_t aDestRloc16) const; /** - * This method determines the next hop and the path cost towards an RLOC16 destination. + * Determines the next hop and the path cost towards an RLOC16 destination. * * @param[in] aDestRloc16 The RLOC16 of the destination. * @param[out] aNextHopRloc16 A reference to return the RLOC16 of next hop if known, or `Mle::kInvalidRloc16`. @@ -203,7 +203,7 @@ public: void GetNextHopAndPathCost(uint16_t aDestRloc16, uint16_t &aNextHopRloc16, uint8_t &aPathCost) const; /** - * This method finds the router for a given Router ID. + * Finds the router for a given Router ID. * * @param[in] aRouterId The Router ID to search for. * @@ -213,7 +213,7 @@ public: Router *FindRouterById(uint8_t aRouterId) { return AsNonConst(AsConst(this)->FindRouterById(aRouterId)); } /** - * This method finds the router for a given Router ID. + * Finds the router for a given Router ID. * * @param[in] aRouterId The Router ID to search for. * @@ -223,7 +223,7 @@ public: const Router *FindRouterById(uint8_t aRouterId) const; /** - * This method finds the router for a given RLOC16. + * Finds the router for a given RLOC16. * * @param[in] aRloc16 The RLOC16 to search for. * @@ -233,7 +233,7 @@ public: Router *FindRouterByRloc16(uint16_t aRloc16) { return AsNonConst(AsConst(this)->FindRouterByRloc16(aRloc16)); } /** - * This method finds the router for a given RLOC16. + * Finds the router for a given RLOC16. * * @param[in] aRloc16 The RLOC16 to search for. * @@ -243,7 +243,7 @@ public: const Router *FindRouterByRloc16(uint16_t aRloc16) const; /** - * This method finds the router that is the next hop of a given router. + * Finds the router that is the next hop of a given router. * * @param[in] aRouter The router to find next hop of. * @@ -253,7 +253,7 @@ public: Router *FindNextHopOf(const Router &aRouter) { return AsNonConst(AsConst(this)->FindNextHopOf(aRouter)); } /** - * This method finds the router that is the next hop of a given router. + * Finds the router that is the next hop of a given router. * * @param[in] aRouter The router to find next hop of. * @@ -263,7 +263,7 @@ public: const Router *FindNextHopOf(const Router &aRouter) const; /** - * This method find the router for a given MAC Extended Address. + * Find the router for a given MAC Extended Address. * * @param[in] aExtAddress A reference to the MAC Extended Address. * @@ -273,7 +273,7 @@ public: Router *FindRouter(const Mac::ExtAddress &aExtAddress); /** - * This method indicates whether the router table contains a given `Neighbor` instance. + * Indicates whether the router table contains a given `Neighbor` instance. * * @param[in] aNeighbor A reference to a `Neighbor`. * @@ -288,7 +288,7 @@ public: } /** - * This method retains diagnostic information for a given router. + * Retains diagnostic information for a given router. * * @param[in] aRouterId The router ID or RLOC16 for a given router. * @param[out] aRouterInfo The router information. @@ -301,7 +301,7 @@ public: Error GetRouterInfo(uint16_t aRouterId, Router::Info &aRouterInfo); /** - * This method returns the Router ID Sequence. + * Returns the Router ID Sequence. * * @returns The Router ID Sequence. * @@ -309,7 +309,7 @@ public: uint8_t GetRouterIdSequence(void) const { return mRouterIdSequence; } /** - * This method returns the local time when the Router ID Sequence was last updated. + * Returns the local time when the Router ID Sequence was last updated. * * @returns The local time when the Router ID Sequence was last updated. * @@ -317,7 +317,7 @@ public: TimeMilli GetRouterIdSequenceLastUpdated(void) const { return mRouterIdSequenceLastUpdated; } /** - * This method determines whether the Router ID Sequence in a received Route TLV is more recent than the current + * Determines whether the Router ID Sequence in a received Route TLV is more recent than the current * Router ID Sequence being used by `RouterTable`. * * @param[in] aRouteTlv The Route TLV to compare. @@ -329,7 +329,7 @@ public: bool IsRouteTlvIdSequenceMoreRecent(const Mle::RouteTlv &aRouteTlv) const; /** - * This method returns the number of neighbor links. + * Returns the number of neighbor links. * * @returns The number of neighbor links. * @@ -337,7 +337,7 @@ public: uint8_t GetNeighborCount(void) const; /** - * This method indicates whether or not a Router ID is allocated. + * Indicates whether or not a Router ID is allocated. * * @param[in] aRouterId The Router ID. * @@ -348,7 +348,7 @@ public: bool IsAllocated(uint8_t aRouterId) const { return mRouterIdMap.IsAllocated(aRouterId); } /** - * This method updates the Router ID allocation set. + * Updates the Router ID allocation set. * * @param[in] aRouterIdSequence The Router ID Sequence. * @param[in] aRouterIdSet The Router ID Set. @@ -357,7 +357,7 @@ public: void UpdateRouterIdSet(uint8_t aRouterIdSequence, const Mle::RouterIdSet &aRouterIdSet); /** - * This method updates the routes based on a received `RouteTlv` from a neighboring router. + * Updates the routes based on a received `RouteTlv` from a neighboring router. * * @param[in] aRouteTlv The received `RouteTlv` * @param[in] aNeighborId The router ID of neighboring router from which @p aRouteTlv is received. @@ -366,9 +366,9 @@ public: void UpdateRoutes(const Mle::RouteTlv &aRouteTlv, uint8_t aNeighborId); /** - * This method updates the routes on an FED based on a received `RouteTlv` from the parent. + * Updates the routes on an FED based on a received `RouteTlv` from the parent. * - * This method MUST be called when device is an FED child and @p aRouteTlv is received from its current parent. + * MUST be called when device is an FED child and @p aRouteTlv is received from its current parent. * * @param[in] aRouteTlv The received `RouteTlv` from parent. * @param[in] aParentId The Router ID of parent. @@ -377,7 +377,7 @@ public: void UpdateRoutesOnFed(const Mle::RouteTlv &aRouteTlv, uint8_t aParentId); /** - * This method gets the allocated Router ID set. + * Gets the allocated Router ID set. * * @returns The allocated Router ID set. * @@ -385,7 +385,7 @@ public: void GetRouterIdSet(Mle::RouterIdSet &aRouterIdSet) const { return mRouterIdMap.GetAsRouterIdSet(aRouterIdSet); } /** - * This method fills a Route TLV. + * Fills a Route TLV. * * When @p aNeighbor is not `nullptr`, we limit the number of router entries to `Mle::kLinkAcceptMaxRouters` when * populating `aRouteTlv`, so that the TLV can be appended in a Link Accept message. In this case, we ensure to @@ -398,14 +398,14 @@ public: void FillRouteTlv(Mle::RouteTlv &aRouteTlv, const Neighbor *aNeighbor = nullptr) const; /** - * This method updates the router table and must be called with a one second period. + * Updates the router table and must be called with a one second period. * */ void HandleTimeTick(void); #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE /** - * This method gets the range of Router IDs. + * Gets the range of Router IDs. * * All the Router IDs in the range `[aMinRouterId, aMaxRouterId]` are allowed. This is intended for testing only. * @@ -416,7 +416,7 @@ public: void GetRouterIdRange(uint8_t &aMinRouterId, uint8_t &aMaxRouterId) const; /** - * This method sets the range of Router IDs. + * Sets the range of Router IDs. * * All the Router IDs in the range `[aMinRouterId, aMaxRouterId]` are allowed. This is intended for testing only. * diff --git a/src/core/thread/src_match_controller.hpp b/src/core/thread/src_match_controller.hpp index 860caa05e..b8871ded8 100644 --- a/src/core/thread/src_match_controller.hpp +++ b/src/core/thread/src_match_controller.hpp @@ -56,12 +56,12 @@ class Child; */ /** - * This class implements the "source address match" controller. + * Implements the "source address match" controller. * * The source address match feature controls how the radio layer decides the "frame pending" bit for acks sent in * response to data request commands from sleepy children. * - * This class updates the source match table and also controls when to enable or disable the source matching + * Updates the source match table and also controls when to enable or disable the source matching * feature. * * The source address match table provides the list of children for which there is a pending frame. Either a short @@ -72,7 +72,7 @@ class SourceMatchController : public InstanceLocator, private NonCopyable { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance * @@ -80,7 +80,7 @@ public: explicit SourceMatchController(Instance &aInstance); /** - * This method returns the current state of source address matching. + * Returns the current state of source address matching. * * @returns `true` if source address matching is enabled, `false` otherwise. * @@ -88,7 +88,7 @@ public: bool IsEnabled(void) const { return mEnabled; } /** - * This method increments the message count for a child and updates the source match table. + * Increments the message count for a child and updates the source match table. * * @param[in] aChild A reference to the child. * @@ -96,7 +96,7 @@ public: void IncrementMessageCount(Child &aChild); /** - * This method decrements the message count for a child and updates the source match table. + * Decrements the message count for a child and updates the source match table. * * @param[in] aChild A reference to the child. * @@ -104,7 +104,7 @@ public: void DecrementMessageCount(Child &aChild); /** - * This method resets the message count for a child to zero and updates the source match table. + * Resets the message count for a child to zero and updates the source match table. * * @param[in] aChild A reference to the child. * @@ -112,7 +112,7 @@ public: void ResetMessageCount(Child &aChild); /** - * This method sets whether or not to perform source address matching on the extended or short address for + * Sets whether or not to perform source address matching on the extended or short address for * a child. * * @param[in] aChild A reference to the child. @@ -123,13 +123,13 @@ public: private: /** - * This method clears the source match table. + * Clears the source match table. * */ void ClearTable(void); /** - * This method enables or disables the source matching. + * Enables or disables the source matching. * * If enabled, the radio uses the source match table to determine whether to set or clear the "frame pending" bit * in an acknowledgment to a MAC Data Request command. If disabled, the radio layer sets the "frame pending" on all @@ -141,7 +141,7 @@ private: void Enable(bool aEnable); /** - * This method adds an entry to source match table for a given child and updates the state of source matching + * Adds an entry to source match table for a given child and updates the state of source matching * feature accordingly. * * If the entry is added successfully, source matching feature is enabled (if not already enabled) after ensuring @@ -154,7 +154,7 @@ private: void AddEntry(Child &aChild); /** - * This method clears an entry in source match table for a given child and updates the state of source matching + * Clears an entry in source match table for a given child and updates the state of source matching * feature accordingly. * * If the entry is removed successfully and frees up space in the source match table, any remaining pending @@ -166,7 +166,7 @@ private: void ClearEntry(Child &aChild); /** - * This method adds a given child's address (short or extended address depending on child's setting) to the source + * Adds a given child's address (short or extended address depending on child's setting) to the source * source match table (@sa SetSrcMatchAsShort. * * @param[in] aChild A reference to the child @@ -178,7 +178,7 @@ private: Error AddAddress(const Child &aChild); /** - * This method adds all pending entries to the source match table. + * Adds all pending entries to the source match table. * * @retval kErrorNone All pending entries were successfully added. * @retval kErrorNoBufs No available space in the source match table. diff --git a/src/core/thread/thread_netif.hpp b/src/core/thread/thread_netif.hpp index af776bee2..ab14a89b6 100644 --- a/src/core/thread/thread_netif.hpp +++ b/src/core/thread/thread_netif.hpp @@ -54,7 +54,7 @@ class ThreadNetif : public Ip6::Netif { public: /** - * This constructor initializes the Thread network interface. + * Initializes the Thread network interface. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -62,19 +62,19 @@ public: explicit ThreadNetif(Instance &aInstance); /** - * This method enables the Thread network interface. + * Enables the Thread network interface. * */ void Up(void); /** - * This method disables the Thread network interface. + * Disables the Thread network interface. * */ void Down(void); /** - * This method indicates whether or not the Thread network interface is enabled. + * Indicates whether or not the Thread network interface is enabled. * * @retval TRUE If the Thread network interface is enabled. * @retval FALSE If the Thread network interface is not enabled. diff --git a/src/core/thread/thread_tlvs.hpp b/src/core/thread/thread_tlvs.hpp index 4527aac39..5b3bdb24a 100644 --- a/src/core/thread/thread_tlvs.hpp +++ b/src/core/thread/thread_tlvs.hpp @@ -50,7 +50,7 @@ using ot::Encoding::BigEndian::HostSwap16; using ot::Encoding::BigEndian::HostSwap32; /** - * This class implements Network Layer TLV generation and parsing. + * Implements Network Layer TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -80,7 +80,7 @@ public: }; /** - * This method returns the Type value. + * Returns the Type value. * * @returns The Type value. * @@ -88,7 +88,7 @@ public: Type GetType(void) const { return static_cast(ot::Tlv::GetType()); } /** - * This method sets the Type value. + * Sets the Type value. * * @param[in] aType The Type value. * @@ -98,55 +98,55 @@ public: } OT_TOOL_PACKED_END; /** - * This class defines Target TLV constants and types. + * Defines Target TLV constants and types. * */ typedef SimpleTlvInfo ThreadTargetTlv; /** - * This class defines Extended MAC Address TLV constants and types. + * Defines Extended MAC Address TLV constants and types. * */ typedef SimpleTlvInfo ThreadExtMacAddressTlv; /** - * This class defines RLOC16 TLV constants and types. + * Defines RLOC16 TLV constants and types. * */ typedef UintTlvInfo ThreadRloc16Tlv; /** - * This class defines ML-EID TLV constants and types. + * Defines ML-EID TLV constants and types. * */ typedef SimpleTlvInfo ThreadMeshLocalEidTlv; /** - * This class defines Time Since Last Transaction TLV constants and types. + * Defines Time Since Last Transaction TLV constants and types. * */ typedef UintTlvInfo ThreadLastTransactionTimeTlv; /** - * This class defines Timeout TLV constants and types. + * Defines Timeout TLV constants and types. * */ typedef UintTlvInfo ThreadTimeoutTlv; /** - * This class defines Network Name TLV constants and types. + * Defines Network Name TLV constants and types. * */ typedef StringTlvInfo ThreadNetworkNameTlv; /** - * This class defines Commissioner Session ID TLV constants and types. + * Defines Commissioner Session ID TLV constants and types. * */ typedef UintTlvInfo ThreadCommissionerSessionIdTlv; /** - * This class defines Status TLV constants and types. + * Defines Status TLV constants and types. * */ class ThreadStatusTlv : public UintTlvInfo @@ -199,14 +199,14 @@ public: }; /** - * This class implements Router Mask TLV generation and parsing. + * Implements Router Mask TLV generation and parsing. * */ class ThreadRouterMaskTlv : public ThreadTlv, public TlvInfo { public: /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) @@ -217,7 +217,7 @@ public: } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -226,7 +226,7 @@ public: bool IsValid(void) const { return GetLength() >= sizeof(*this) - sizeof(ThreadTlv); } /** - * This method returns the ID Sequence value. + * Returns the ID Sequence value. * * @returns The ID Sequence value. * @@ -234,7 +234,7 @@ public: uint8_t GetIdSequence(void) const { return mIdSequence; } /** - * This method sets the ID Sequence value. + * Sets the ID Sequence value. * * @param[in] aSequence The ID Sequence value. * @@ -242,7 +242,7 @@ public: void SetIdSequence(uint8_t aSequence) { mIdSequence = aSequence; } /** - * This method gets the Assigned Router ID Mask. + * Gets the Assigned Router ID Mask. * * @returns The Assigned Router ID Mask. * @@ -250,7 +250,7 @@ public: const Mle::RouterIdSet &GetAssignedRouterIdMask(void) const { return mAssignedRouterIdMask; } /** - * This method gets the Assigned Router ID Mask. + * Gets the Assigned Router ID Mask. * * @returns The Assigned Router ID Mask. * @@ -258,7 +258,7 @@ public: Mle::RouterIdSet &GetAssignedRouterIdMask(void) { return mAssignedRouterIdMask; } /** - * This method sets the Assigned Router ID Mask. + * Sets the Assigned Router ID Mask. * * @param[in] aRouterIdSet A reference to the Assigned Router ID Mask. * @@ -271,7 +271,7 @@ private: }; /** - * This class implements Thread Network Data TLV generation and parsing. + * Implements Thread Network Data TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -279,7 +279,7 @@ class ThreadNetworkDataTlv : public ThreadTlv, public TlvInfo= OT_THREAD_VERSION_1_2 /** - * This class implements IPv6 Addresses TLV generation and parsing. + * Implements IPv6 Addresses TLV generation and parsing. * */ OT_TOOL_PACKED_BEGIN @@ -325,13 +325,13 @@ public: static constexpr uint8_t kMaxAddresses = OT_IP6_MAX_MLR_ADDRESSES; /** - * This method initializes the TLV. + * Initializes the TLV. * */ void Init(void) { SetType(kIp6Addresses); } /** - * This method indicates whether or not the TLV appears to be well-formed. + * Indicates whether or not the TLV appears to be well-formed. * * @retval TRUE If the TLV appears to be well-formed. * @retval FALSE If the TLV does not appear to be well-formed. @@ -345,7 +345,7 @@ public: } /** - * This method returns a pointer to the IPv6 address entry. + * Returns a pointer to the IPv6 address entry. * * @param[in] aIndex The index into the IPv6 address list. * diff --git a/src/core/thread/time_sync_service.hpp b/src/core/thread/time_sync_service.hpp index d0ad1acf8..ae060efaa 100644 --- a/src/core/thread/time_sync_service.hpp +++ b/src/core/thread/time_sync_service.hpp @@ -51,7 +51,7 @@ namespace ot { /** - * This class implements OpenThread Time Synchronization Service. + * Implements OpenThread Time Synchronization Service. * */ class TimeSync : public InstanceLocator, private NonCopyable @@ -60,7 +60,7 @@ class TimeSync : public InstanceLocator, private NonCopyable public: /** - * This enumeration represents Network Time Status + * Represents Network Time Status * */ enum Status : int8_t @@ -71,7 +71,7 @@ public: }; /** - * This constructor initializes the object. + * Initializes the object. * */ TimeSync(Instance &aInstance); @@ -108,7 +108,7 @@ public: #endif /** - * This method gets the time synchronization sequence. + * Gets the time synchronization sequence. * * @returns The time synchronization sequence. * @@ -116,7 +116,7 @@ public: uint8_t GetTimeSyncSeq(void) const { return mTimeSyncSeq; } /** - * This method gets the time offset to the Thread network time. + * Gets the time offset to the Thread network time. * * @returns The time offset to the Thread network time, in microseconds. * diff --git a/src/core/thread/tmf.hpp b/src/core/thread/tmf.hpp index 02a1aa34a..3b3854444 100644 --- a/src/core/thread/tmf.hpp +++ b/src/core/thread/tmf.hpp @@ -44,7 +44,7 @@ namespace ot { namespace Tmf { /** - * This macro declares a TMF handler (a full template specialization of `HandleTmf` method) in a given `Type`. + * Declares a TMF handler (a full template specialization of `HandleTmf` method) in a given `Type`. * * The class `Type` MUST declare a template method of the following format: * @@ -62,7 +62,7 @@ constexpr uint16_t kUdpPort = 61631; ///< TMF UDP Port typedef Coap::Message Message; ///< A TMF message. /** - * This class represents message information for a TMF message. + * Represents message information for a TMF message. * * This is sub-class of `Ip6::MessageInfo` intended for use when sending TMF messages. * @@ -71,7 +71,7 @@ class MessageInfo : public InstanceLocator, public Ip6::MessageInfo { public: /** - * This constructor initializes the `MessageInfo`. + * Initializes the `MessageInfo`. * * The peer port is set to `Tmf::kUdpPort` and all other properties are cleared (set to zero). * @@ -85,19 +85,19 @@ public: } /** - * This method sets the local socket port to TMF port. + * Sets the local socket port to TMF port. * */ void SetSockPortToTmf(void) { SetSockPort(kUdpPort); } /** - * This method sets the local socket address to mesh-local RLOC address. + * Sets the local socket address to mesh-local RLOC address. * */ void SetSockAddrToRloc(void); /** - * This method sets the local socket address to RLOC address and the peer socket address to leader ALOC. + * Sets the local socket address to RLOC address and the peer socket address to leader ALOC. * * @retval kErrorNone Successfully set the addresses. * @retval kErrorDetached Cannot set leader ALOC since device is currently detached. @@ -106,7 +106,7 @@ public: Error SetSockAddrToRlocPeerAddrToLeaderAloc(void); /** - * This method sets the local socket address to RLOC address and the peer socket address to leader RLOC. + * Sets the local socket address to RLOC address and the peer socket address to leader RLOC. * * @retval kErrorNone Successfully set the addresses. * @retval kErrorDetached Cannot set leader RLOC since device is currently detached. @@ -115,14 +115,14 @@ public: Error SetSockAddrToRlocPeerAddrToLeaderRloc(void); /** - * This method sets the local socket address to RLOC address and the peer socket address to realm-local all + * Sets the local socket address to RLOC address and the peer socket address to realm-local all * routers multicast address. * */ void SetSockAddrToRlocPeerAddrToRealmLocalAllRoutersMulticast(void); /** - * This method sets the local socket address to RLOC address and the peer socket address to a router RLOC based on + * Sets the local socket address to RLOC address and the peer socket address to a router RLOC based on * a given RLOC16. * * @param[in] aRloc16 The RLOC16 to use for peer address. @@ -131,7 +131,7 @@ public: void SetSockAddrToRlocPeerAddrTo(uint16_t aRloc16); /** - * This method sets the local socket address to RLOC address and the peer socket address to a given address. + * Sets the local socket address to RLOC address and the peer socket address to a given address. * * @param[in] aPeerAddress The peer address. * @@ -140,14 +140,14 @@ public: }; /** - * This class implements functionality of the Thread TMF agent. + * Implements functionality of the Thread TMF agent. * */ class Agent : public Coap::Coap { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -155,7 +155,7 @@ public: explicit Agent(Instance &aInstance); /** - * This method starts the TMF agent. + * Starts the TMF agent. * * @retval kErrorNone Successfully started the CoAP service. * @retval kErrorFailed Failed to start the TMF agent. @@ -164,7 +164,7 @@ public: Error Start(void); /** - * This method indicates whether or not a message meets TMF addressing rules. + * Indicates whether or not a message meets TMF addressing rules. * * A TMF message MUST comply with following rules: * @@ -183,7 +183,7 @@ public: bool IsTmfMessage(const Ip6::Address &aSourceAddress, const Ip6::Address &aDestAddress, uint16_t aDestPort) const; /** - * This static method converts a TMF message priority to IPv6 header DSCP value. + * Converts a TMF message priority to IPv6 header DSCP value. * * @param[in] aPriority The message priority to convert. * @@ -193,7 +193,7 @@ public: static uint8_t PriorityToDscp(Message::Priority aPriority); /** - * This static method converts a IPv6 header DSCP value to message priority for TMF message. + * Converts a IPv6 header DSCP value to message priority for TMF message. * * @param[in] aDscp The IPv6 header DSCP value in a TMF message. * @@ -217,14 +217,14 @@ private: #if OPENTHREAD_CONFIG_DTLS_ENABLE /** - * This class implements functionality of the secure TMF agent. + * Implements functionality of the secure TMF agent. * */ class SecureAgent : public Coap::CoapSecure { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * diff --git a/src/core/thread/topology.hpp b/src/core/thread/topology.hpp index 2f89fae4c..7e4b0c006 100644 --- a/src/core/thread/topology.hpp +++ b/src/core/thread/topology.hpp @@ -65,7 +65,7 @@ namespace ot { /** - * This class represents a Thread neighbor. + * Represents a Thread neighbor. * */ class Neighbor : public InstanceLocatorInit @@ -96,7 +96,7 @@ public: }; /** - * This enumeration defines state filters used for finding a neighbor or iterating through the child/neighbor table. + * Defines state filters used for finding a neighbor or iterating through the child/neighbor table. * * Each filter definition accepts a subset of `State` values. * @@ -114,7 +114,7 @@ public: }; /** - * This class represents an Address Matcher used to find a neighbor (child/router) with a given MAC address also + * Represents an Address Matcher used to find a neighbor (child/router) with a given MAC address also * matching a given state filter. * */ @@ -122,7 +122,7 @@ public: { public: /** - * This constructor initializes the `AddressMatcher` with a given MAC short address (RCOC16) and state filter. + * Initializes the `AddressMatcher` with a given MAC short address (RCOC16) and state filter. * * @param[in] aShortAddress A MAC short address (RLOC16). * @param[in] aStateFilter A state filter. @@ -134,7 +134,7 @@ public: } /** - * This constructor initializes the `AddressMatcher` with a given MAC extended address and state filter. + * Initializes the `AddressMatcher` with a given MAC extended address and state filter. * * @param[in] aExtAddress A MAC extended address. * @param[in] aStateFilter A state filter. @@ -146,7 +146,7 @@ public: } /** - * This constructor initializes the `AddressMatcher` with a given MAC address and state filter. + * Initializes the `AddressMatcher` with a given MAC address and state filter. * * @param[in] aMacAddress A MAC address. * @param[in] aStateFilter A state filter. @@ -161,7 +161,7 @@ public: } /** - * This constructor initializes the `AddressMatcher` with a given state filter (it accepts any address). + * Initializes the `AddressMatcher` with a given state filter (it accepts any address). * * @param[in] aStateFilter A state filter. * @@ -172,7 +172,7 @@ public: } /** - * This method indicates if a given neighbor matches the address and state filter of `AddressMatcher`. + * Indicates if a given neighbor matches the address and state filter of `AddressMatcher`. * * @param[in] aNeighbor A neighbor. * @@ -196,14 +196,14 @@ public: }; /** - * This type represents diagnostic information for a neighboring node. + * Represents diagnostic information for a neighboring node. * */ class Info : public otNeighborInfo, public Clearable { public: /** - * This method sets the `Info` instance from a given `Neighbor`. + * Sets the `Info` instance from a given `Neighbor`. * * @param[in] aNeighbor A neighbor. * @@ -212,7 +212,7 @@ public: }; /** - * This method returns the current state. + * Returns the current state. * * @returns The current state. * @@ -220,7 +220,7 @@ public: State GetState(void) const { return static_cast(mState); } /** - * This method sets the current state. + * Sets the current state. * * @param[in] aState The state value. * @@ -228,7 +228,7 @@ public: void SetState(State aState); /** - * This method indicates whether the neighbor is in the Invalid state. + * Indicates whether the neighbor is in the Invalid state. * * @returns TRUE if the neighbor is in the Invalid state, FALSE otherwise. * @@ -236,7 +236,7 @@ public: bool IsStateInvalid(void) const { return (mState == kStateInvalid); } /** - * This method indicates whether the neighbor is in the Child ID Request state. + * Indicates whether the neighbor is in the Child ID Request state. * * @returns TRUE if the neighbor is in the Child ID Request state, FALSE otherwise. * @@ -244,7 +244,7 @@ public: bool IsStateChildIdRequest(void) const { return (mState == kStateChildIdRequest); } /** - * This method indicates whether the neighbor is in the Link Request state. + * Indicates whether the neighbor is in the Link Request state. * * @returns TRUE if the neighbor is in the Link Request state, FALSE otherwise. * @@ -252,7 +252,7 @@ public: bool IsStateLinkRequest(void) const { return (mState == kStateLinkRequest); } /** - * This method indicates whether the neighbor is in the Parent Response state. + * Indicates whether the neighbor is in the Parent Response state. * * @returns TRUE if the neighbor is in the Parent Response state, FALSE otherwise. * @@ -260,7 +260,7 @@ public: bool IsStateParentResponse(void) const { return (mState == kStateParentResponse); } /** - * This method indicates whether the neighbor is being restored. + * Indicates whether the neighbor is being restored. * * @returns TRUE if the neighbor is being restored, FALSE otherwise. * @@ -268,7 +268,7 @@ public: bool IsStateRestoring(void) const { return (mState == kStateRestored) || (mState == kStateChildUpdateRequest); } /** - * This method indicates whether the neighbor is in the Restored state. + * Indicates whether the neighbor is in the Restored state. * * @returns TRUE if the neighbor is in the Restored state, FALSE otherwise. * @@ -276,7 +276,7 @@ public: bool IsStateRestored(void) const { return (mState == kStateRestored); } /** - * This method indicates whether the neighbor is valid (frame counters are synchronized). + * Indicates whether the neighbor is valid (frame counters are synchronized). * * @returns TRUE if the neighbor is valid, FALSE otherwise. * @@ -284,7 +284,7 @@ public: bool IsStateValid(void) const { return (mState == kStateValid); } /** - * This method indicates whether the neighbor is in valid state or if it is being restored. + * Indicates whether the neighbor is in valid state or if it is being restored. * * When in these states messages can be sent to and/or received from the neighbor. * @@ -294,7 +294,7 @@ public: bool IsStateValidOrRestoring(void) const { return (mState == kStateValid) || IsStateRestoring(); } /** - * This method indicates if the neighbor state is valid, attaching, or restored. + * Indicates if the neighbor state is valid, attaching, or restored. * * The states `kStateRestored`, `kStateChildIdRequest`, `kStateChildUpdateRequest`, `kStateValid`, and * `kStateLinkRequest` are considered as valid, attaching, or restored. @@ -305,7 +305,7 @@ public: bool IsStateValidOrAttaching(void) const; /** - * This method indicates whether neighbor state matches a given state filter. + * Indicates whether neighbor state matches a given state filter. * * @param[in] aFilter A state filter (`StateFilter` enumeration) to match against. * @@ -315,7 +315,7 @@ public: bool MatchesFilter(StateFilter aFilter) const; /** - * This method indicates whether neighbor matches a given `AddressMatcher`. + * Indicates whether neighbor matches a given `AddressMatcher`. * * @param[in] aMatcher An `AddressMatcher` to match against. * @@ -325,7 +325,7 @@ public: bool Matches(const AddressMatcher &aMatcher) const { return aMatcher.Matches(*this); } /** - * This method gets the device mode flags. + * Gets the device mode flags. * * @returns The device mode flags. * @@ -333,7 +333,7 @@ public: Mle::DeviceMode GetDeviceMode(void) const { return Mle::DeviceMode(mMode); } /** - * This method sets the device mode flags. + * Sets the device mode flags. * * @param[in] aMode The device mode flags. * @@ -341,7 +341,7 @@ public: void SetDeviceMode(Mle::DeviceMode aMode) { mMode = aMode.Get(); } /** - * This method indicates whether or not the device is rx-on-when-idle. + * Indicates whether or not the device is rx-on-when-idle. * * @returns TRUE if rx-on-when-idle, FALSE otherwise. * @@ -349,7 +349,7 @@ public: bool IsRxOnWhenIdle(void) const { return GetDeviceMode().IsRxOnWhenIdle(); } /** - * This method indicates whether or not the device is a Full Thread Device. + * Indicates whether or not the device is a Full Thread Device. * * @returns TRUE if a Full Thread Device, FALSE otherwise. * @@ -357,7 +357,7 @@ public: bool IsFullThreadDevice(void) const { return GetDeviceMode().IsFullThreadDevice(); } /** - * This method gets the Network Data type (full set or stable subset) that the device requests. + * Gets the Network Data type (full set or stable subset) that the device requests. * * @returns The Network Data type. * @@ -365,7 +365,7 @@ public: NetworkData::Type GetNetworkDataType(void) const { return GetDeviceMode().GetNetworkDataType(); } /** - * This method returns the Extended Address. + * Returns the Extended Address. * * @returns A const reference to the Extended Address. * @@ -373,7 +373,7 @@ public: const Mac::ExtAddress &GetExtAddress(void) const { return mMacAddr; } /** - * This method returns the Extended Address. + * Returns the Extended Address. * * @returns A reference to the Extended Address. * @@ -381,7 +381,7 @@ public: Mac::ExtAddress &GetExtAddress(void) { return mMacAddr; } /** - * This method sets the Extended Address. + * Sets the Extended Address. * * @param[in] aAddress The Extended Address value to set. * @@ -389,7 +389,7 @@ public: void SetExtAddress(const Mac::ExtAddress &aAddress) { mMacAddr = aAddress; } /** - * This method gets the key sequence value. + * Gets the key sequence value. * * @returns The key sequence value. * @@ -397,7 +397,7 @@ public: uint32_t GetKeySequence(void) const { return mKeySequence; } /** - * This method sets the key sequence value. + * Sets the key sequence value. * * @param[in] aKeySequence The key sequence value. * @@ -405,7 +405,7 @@ public: void SetKeySequence(uint32_t aKeySequence) { mKeySequence = aKeySequence; } /** - * This method returns the last heard time. + * Returns the last heard time. * * @returns The last heard time. * @@ -413,7 +413,7 @@ public: TimeMilli GetLastHeard(void) const { return mLastHeard; } /** - * This method sets the last heard time. + * Sets the last heard time. * * @param[in] aLastHeard The last heard time. * @@ -421,7 +421,7 @@ public: void SetLastHeard(TimeMilli aLastHeard) { mLastHeard = aLastHeard; } /** - * This method gets the link frame counters. + * Gets the link frame counters. * * @returns A reference to `Mac::LinkFrameCounters` containing link frame counter for all supported radio links. * @@ -429,7 +429,7 @@ public: Mac::LinkFrameCounters &GetLinkFrameCounters(void) { return mValidPending.mValid.mLinkFrameCounters; } /** - * This method gets the link frame counters. + * Gets the link frame counters. * * @returns A reference to `Mac::LinkFrameCounters` containing link frame counter for all supported radio links. * @@ -438,7 +438,7 @@ public: #if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 /** - * This method gets the link ACK frame counter value. + * Gets the link ACK frame counter value. * * @returns The link ACK frame counter value. * @@ -447,7 +447,7 @@ public: #endif /** - * This method sets the link ACK frame counter value. + * Sets the link ACK frame counter value. * * @param[in] aAckFrameCounter The link ACK frame counter value. * @@ -462,7 +462,7 @@ public: } /** - * This method gets the MLE frame counter value. + * Gets the MLE frame counter value. * * @returns The MLE frame counter value. * @@ -470,7 +470,7 @@ public: uint32_t GetMleFrameCounter(void) const { return mValidPending.mValid.mMleFrameCounter; } /** - * This method sets the MLE frame counter value. + * Sets the MLE frame counter value. * * @param[in] aFrameCounter The MLE frame counter value. * @@ -478,7 +478,7 @@ public: void SetMleFrameCounter(uint32_t aFrameCounter) { mValidPending.mValid.mMleFrameCounter = aFrameCounter; } /** - * This method gets the RLOC16 value. + * Gets the RLOC16 value. * * @returns The RLOC16 value. * @@ -486,7 +486,7 @@ public: uint16_t GetRloc16(void) const { return mRloc16; } /** - * This method gets the Router ID value. + * Gets the Router ID value. * * @returns The Router ID value. * @@ -494,7 +494,7 @@ public: uint8_t GetRouterId(void) const { return mRloc16 >> Mle::kRouterIdOffset; } /** - * This method sets the RLOC16 value. + * Sets the RLOC16 value. * * @param[in] aRloc16 The RLOC16 value. * @@ -503,7 +503,7 @@ public: #if OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method clears the last received fragment tag. + * Clears the last received fragment tag. * * The last received fragment tag is used for detect duplicate frames (received over different radios) when * multi-radio feature is enabled. @@ -512,9 +512,9 @@ public: void ClearLastRxFragmentTag(void) { mLastRxFragmentTag = 0; } /** - * This method gets the last received fragment tag. + * Gets the last received fragment tag. * - * This method MUST be used only when the tag is set (and not cleared). Otherwise its behavior is undefined. + * MUST be used only when the tag is set (and not cleared). Otherwise its behavior is undefined. * * @returns The last received fragment tag. * @@ -522,7 +522,7 @@ public: uint16_t GetLastRxFragmentTag(void) const { return mLastRxFragmentTag; } /** - * This method set the last received fragment tag. + * Set the last received fragment tag. * * @param[in] aTag The new tag value. * @@ -530,7 +530,7 @@ public: void SetLastRxFragmentTag(uint16_t aTag); /** - * This method indicates whether or not the last received fragment tag is set and valid (i.e., not yet timed out). + * Indicates whether or not the last received fragment tag is set and valid (i.e., not yet timed out). * * @returns TRUE if the last received fragment tag is set and valid, FALSE otherwise. * @@ -538,9 +538,9 @@ public: bool IsLastRxFragmentTagSet(void) const; /** - * This method indicates whether the last received fragment tag is strictly after a given tag value. + * Indicates whether the last received fragment tag is strictly after a given tag value. * - * This method MUST be used only when the tag is set (and not cleared). Otherwise its behavior is undefined. + * MUST be used only when the tag is set (and not cleared). Otherwise its behavior is undefined. * * The tag value compassion follows the Serial Number Arithmetic logic from RFC-1982. It is semantically equivalent * to `LastRxFragmentTag > aTag`. @@ -556,7 +556,7 @@ public: #endif // OPENTHREAD_CONFIG_MULTI_RADIO /** - * This method indicates whether or not it is Thread 1.1. + * Indicates whether or not it is Thread 1.1. * * @returns TRUE if neighbors is Thread 1.1, FALSE otherwise. * @@ -564,7 +564,7 @@ public: bool IsThreadVersion1p1(void) const { return mState != kStateInvalid && mVersion == kThreadVersion1p1; } /** - * This method indicates whether or not neighbor is Thread 1.2 or higher.. + * Indicates whether or not neighbor is Thread 1.2 or higher.. * * @returns TRUE if neighbor is Thread 1.2 or higher, FALSE otherwise. * @@ -572,7 +572,7 @@ public: bool IsThreadVersion1p2OrHigher(void) const { return mState != kStateInvalid && mVersion >= kThreadVersion1p2; } /** - * This method indicates whether Thread version supports CSL. + * Indicates whether Thread version supports CSL. * * @returns TRUE if CSL is supported, FALSE otherwise. * @@ -580,7 +580,7 @@ public: bool IsThreadVersionCslCapable(void) const { return IsThreadVersion1p2OrHigher() && !IsRxOnWhenIdle(); } /** - * This method indicates whether Enhanced Keep-Alive is supported or not. + * Indicates whether Enhanced Keep-Alive is supported or not. * * @returns TRUE if Enhanced Keep-Alive is supported, FALSE otherwise. * @@ -591,13 +591,13 @@ public: } /** - * This method gets the device MLE version. + * Gets the device MLE version. * */ uint16_t GetVersion(void) const { return mVersion; } /** - * This method sets the device MLE version. + * Sets the device MLE version. * * @param[in] aVersion The device MLE version. * @@ -605,7 +605,7 @@ public: void SetVersion(uint16_t aVersion) { mVersion = aVersion; } /** - * This method gets the number of consecutive link failures. + * Gets the number of consecutive link failures. * * @returns The number of consecutive link failures. * @@ -613,19 +613,19 @@ public: uint8_t GetLinkFailures(void) const { return mLinkFailures; } /** - * This method increments the number of consecutive link failures. + * Increments the number of consecutive link failures. * */ void IncrementLinkFailures(void) { mLinkFailures++; } /** - * This method resets the number of consecutive link failures to zero. + * Resets the number of consecutive link failures to zero. * */ void ResetLinkFailures(void) { mLinkFailures = 0; } /** - * This method returns the LinkQualityInfo object. + * Returns the LinkQualityInfo object. * * @returns The LinkQualityInfo object. * @@ -633,7 +633,7 @@ public: LinkQualityInfo &GetLinkInfo(void) { return mLinkInfo; } /** - * This method returns the LinkQualityInfo object. + * Returns the LinkQualityInfo object. * * @returns The LinkQualityInfo object. * @@ -641,7 +641,7 @@ public: const LinkQualityInfo &GetLinkInfo(void) const { return mLinkInfo; } /** - * This method gets the link quality in value. + * Gets the link quality in value. * * @returns The link quality in value. * @@ -649,13 +649,13 @@ public: LinkQuality GetLinkQualityIn(void) const { return GetLinkInfo().GetLinkQuality(); } /** - * This method generates a new challenge value for MLE Link Request/Response exchanges. + * Generates a new challenge value for MLE Link Request/Response exchanges. * */ void GenerateChallenge(void); /** - * This method returns the current challenge value for MLE Link Request/Response exchanges. + * Returns the current challenge value for MLE Link Request/Response exchanges. * * @returns The current challenge value. * @@ -663,7 +663,7 @@ public: const uint8_t *GetChallenge(void) const { return mValidPending.mPending.mChallenge; } /** - * This method returns the size (bytes) of the challenge value for MLE Link Request/Response exchanges. + * Returns the size (bytes) of the challenge value for MLE Link Request/Response exchanges. * * @returns The size (bytes) of the challenge value for MLE Link Request/Response exchanges. * @@ -672,7 +672,7 @@ public: #if OPENTHREAD_CONFIG_UPTIME_ENABLE /** - * This method returns the connection time (in seconds) of the neighbor (seconds since entering `kStateValid`). + * Returns the connection time (in seconds) of the neighbor (seconds since entering `kStateValid`). * * @returns The connection time (in seconds), zero if device is not currently in `kStateValid`. * @@ -682,7 +682,7 @@ public: #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE /** - * This method indicates whether or not time sync feature is enabled. + * Indicates whether or not time sync feature is enabled. * * @returns TRUE if time sync feature is enabled, FALSE otherwise. * @@ -690,7 +690,7 @@ public: bool IsTimeSyncEnabled(void) const { return mTimeSyncEnabled; } /** - * This method sets whether or not time sync feature is enabled. + * Sets whether or not time sync feature is enabled. * * @param[in] aEnable TRUE if time sync feature is enabled, FALSE otherwise. * @@ -700,7 +700,7 @@ public: #if OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE || OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This method aggregates the Link Metrics data into all the series that is running for this neighbor. + * 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 aggregate @p aLqi and * @p aRss into its averagers. @@ -714,7 +714,7 @@ public: void AggregateLinkMetrics(uint8_t aSeriesId, uint8_t aFrameType, uint8_t aLqi, int8_t aRss); /** - * This method adds a new LinkMetrics::SeriesInfo to the neighbor's list. + * Adds a new LinkMetrics::SeriesInfo to the neighbor's list. * * @param[in] aSeriesInfo A reference to the new SeriesInfo. * @@ -722,7 +722,7 @@ public: void AddForwardTrackingSeriesInfo(LinkMetrics::SeriesInfo &aSeriesInfo); /** - * This method finds a specific LinkMetrics::SeriesInfo by Series ID. + * Finds a specific LinkMetrics::SeriesInfo by Series ID. * * @param[in] aSeriesId A reference to the Series ID. * @@ -732,7 +732,7 @@ public: LinkMetrics::SeriesInfo *GetForwardTrackingSeriesInfo(const uint8_t &aSeriesId); /** - * This method removes a specific LinkMetrics::SeriesInfo by Series ID. + * Removes a specific LinkMetrics::SeriesInfo by Series ID. * * @param[in] aSeriesId A reference to the Series ID to remove. * @@ -742,13 +742,13 @@ public: LinkMetrics::SeriesInfo *RemoveForwardTrackingSeriesInfo(const uint8_t &aSeriesId); /** - * This method removes all the Series and return the data structures to the Pool. + * Removes all the Series and return the data structures to the Pool. * */ void RemoveAllForwardTrackingSeriesInfo(void); /** - * This method gets the Enh-ACK Probing metrics (this `Neighbor` object is the Probing Subject). + * Gets the Enh-ACK Probing metrics (this `Neighbor` object is the Probing Subject). * * @returns Enh-ACK Probing metrics configured. * @@ -756,7 +756,7 @@ public: const LinkMetrics::Metrics &GetEnhAckProbingMetrics(void) const { return mEnhAckProbingMetrics; } /** - * This method sets the Enh-ACK Probing metrics (this `Neighbor` object is the Probing Subject). + * Sets the Enh-ACK Probing metrics (this `Neighbor` object is the Probing Subject). * * @param[in] aEnhAckProbingMetrics The metrics value to set. * @@ -767,7 +767,7 @@ public: } /** - * This method indicates if Enh-ACK Probing is configured and active for this `Neighbor` object. + * Indicates if Enh-ACK Probing is configured and active for this `Neighbor` object. * * @retval TRUE Enh-ACK Probing is configured and active for this `Neighbor`. * @retval FALSE Otherwise. @@ -781,7 +781,7 @@ public: #endif // OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE || OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE /** - * This method converts a given `State` to a human-readable string. + * Converts a given `State` to a human-readable string. * * @param[in] aState A neighbor state. * @@ -792,7 +792,7 @@ public: protected: /** - * This method initializes the `Neighbor` object. + * Initializes the `Neighbor` object. * * @param[in] aInstance A reference to OpenThread instance. * @@ -859,7 +859,7 @@ private: #if OPENTHREAD_FTD /** - * This class represents a Thread Child. + * Represents a Thread Child. * */ class Child : public Neighbor, @@ -876,14 +876,14 @@ public: static constexpr uint8_t kMaxRequestTlvs = 6; /** - * This class represents diagnostic information for a Thread Child. + * Represents diagnostic information for a Thread Child. * */ class Info : public otChildInfo, public Clearable { public: /** - * This method sets the `Info` instance from a given `Child`. + * Sets the `Info` instance from a given `Child`. * * @param[in] aChild A neighbor. * @@ -892,7 +892,7 @@ public: }; /** - * This class defines an iterator used to go through IPv6 address entries of a child. + * Defines an iterator used to go through IPv6 address entries of a child. * */ class AddressIterator : public Unequatable @@ -901,13 +901,13 @@ public: public: /** - * This type represents an index indicating the current IPv6 address entry to which the iterator is pointing. + * Represents an index indicating the current IPv6 address entry to which the iterator is pointing. * */ typedef otChildIp6AddressIterator Index; /** - * This constructor initializes the iterator associated with a given `Child` starting from beginning of the + * Initializes the iterator associated with a given `Child` starting from beginning of the * IPv6 address list. * * @param[in] aChild A reference to a child entry. @@ -920,7 +920,7 @@ public: } /** - * This constructor initializes the iterator associated with a given `Child` starting from a given index + * Initializes the iterator associated with a given `Child` starting from a given index * * @param[in] aChild A reference to the child entry. * @param[in] aIndex An index (`Index`) with which to initialize the iterator. @@ -936,7 +936,7 @@ public: } /** - * This method converts the iterator into an index. + * Converts the iterator into an index. * * @returns An index corresponding to the iterator. * @@ -944,7 +944,7 @@ public: Index GetAsIndex(void) const { return mIndex; } /** - * This method gets the iterator's associated `Child` entry. + * Gets the iterator's associated `Child` entry. * * @returns The associated child entry. * @@ -952,7 +952,7 @@ public: const Child &GetChild(void) const { return mChild; } /** - * This method gets the current `Child` IPv6 Address to which the iterator is pointing. + * Gets the current `Child` IPv6 Address to which the iterator is pointing. * * @returns A pointer to the associated IPv6 Address, or `nullptr` if iterator is done. * @@ -960,7 +960,7 @@ public: const Ip6::Address *GetAddress(void) const; /** - * This method indicates whether the iterator has reached end of the list. + * Indicates whether the iterator has reached end of the list. * * @retval TRUE There are no more entries in the list (reached end of the list). * @retval FALSE The current entry is valid. @@ -969,7 +969,7 @@ public: bool IsDone(void) const { return (mIndex >= kMaxIndex); } /** - * This method overloads `++` operator (pre-increment) to advance the iterator. + * Overloads `++` operator (pre-increment) to advance the iterator. * * The iterator is moved to point to the next `Address` entry. If there are no more `Ip6::Address` entries * `IsDone()` returns `true`. @@ -978,7 +978,7 @@ public: void operator++(void) { mIndex++, Update(); } /** - * This method overloads `++` operator (post-increment) to advance the iterator. + * Overloads `++` operator (post-increment) to advance the iterator. * * The iterator is moved to point to the next `Address` entry. If there are no more `Ip6::Address` entries * `IsDone()` returns `true`. @@ -987,10 +987,10 @@ public: void operator++(int) { mIndex++, Update(); } /** - * This method overloads the `*` dereference operator and gets a reference to `Ip6::Address` to which the + * Overloads the `*` dereference operator and gets a reference to `Ip6::Address` to which the * iterator is currently pointing. * - * This method MUST be used when the iterator is not done (i.e., `IsDone()` returns `false`). + * MUST be used when the iterator is not done (i.e., `IsDone()` returns `false`). * * @returns A reference to the `Ip6::Address` entry currently pointed by the iterator. * @@ -998,9 +998,9 @@ public: const Ip6::Address &operator*(void) const { return *GetAddress(); } /** - * This method overloads operator `==` to evaluate whether or not two `Iterator` instances are equal. + * Overloads operator `==` to evaluate whether or not two `Iterator` instances are equal. * - * This method MUST be used when the two iterators are associated with the same `Child` entry. + * MUST be used when the two iterators are associated with the same `Child` entry. * * @param[in] aOther The other `Iterator` to compare with. * @@ -1033,7 +1033,7 @@ public: }; /** - * This method initializes the `Child` object. + * Initializes the `Child` object. * * @param[in] aInstance A reference to OpenThread instance. * @@ -1041,19 +1041,19 @@ public: void Init(Instance &aInstance) { Neighbor::Init(aInstance); } /** - * This method clears the child entry. + * Clears the child entry. * */ void Clear(void); /** - * This method clears the IPv6 address list for the child. + * Clears the IPv6 address list for the child. * */ void ClearIp6Addresses(void); /** - * This method sets the device mode flags. + * Sets the device mode flags. * * @param[in] aMode The device mode flags. * @@ -1061,7 +1061,7 @@ public: void SetDeviceMode(Mle::DeviceMode aMode); /** - * This method gets the mesh-local IPv6 address. + * Gets the mesh-local IPv6 address. * * @param[out] aAddress A reference to an IPv6 address to provide address (if any). * @@ -1072,7 +1072,7 @@ public: Error GetMeshLocalIp6Address(Ip6::Address &aAddress) const; /** - * This method returns the Mesh Local Interface Identifier. + * Returns the Mesh Local Interface Identifier. * * @returns The Mesh Local Interface Identifier. * @@ -1080,9 +1080,9 @@ public: const Ip6::InterfaceIdentifier &GetMeshLocalIid(void) const { return mMeshLocalIid; } /** - * This method enables range-based `for` loop iteration over all (or a subset of) IPv6 addresses. + * Enables range-based `for` loop iteration over all (or a subset of) IPv6 addresses. * - * This method should be used as follows: to iterate over all addresses + * Should be used as follows: to iterate over all addresses * * for (const Ip6::Address &address : child.IterateIp6Addresses()) { ... } * @@ -1102,7 +1102,7 @@ public: } /** - * This method adds an IPv6 address to the list. + * Adds an IPv6 address to the list. * * @param[in] aAddress A reference to IPv6 address to be added. * @@ -1115,7 +1115,7 @@ public: Error AddIp6Address(const Ip6::Address &aAddress); /** - * This method removes an IPv6 address from the list. + * Removes an IPv6 address from the list. * * @param[in] aAddress A reference to IPv6 address to be removed. * @@ -1127,7 +1127,7 @@ public: Error RemoveIp6Address(const Ip6::Address &aAddress); /** - * This method indicates whether an IPv6 address is in the list of IPv6 addresses of the child. + * Indicates whether an IPv6 address is in the list of IPv6 addresses of the child. * * @param[in] aAddress A reference to IPv6 address. * @@ -1139,7 +1139,7 @@ public: #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_DUA_ENABLE /** - * This method retrieves the Domain Unicast Address registered by the child. + * Retrieves the Domain Unicast Address registered by the child. * * @returns A pointer to Domain Unicast Address registered by the child if there is. * @@ -1148,7 +1148,7 @@ public: #endif /** - * This method gets the child timeout. + * Gets the child timeout. * * @returns The child timeout. * @@ -1156,7 +1156,7 @@ public: uint32_t GetTimeout(void) const { return mTimeout; } /** - * This method sets the child timeout. + * Sets the child timeout. * * @param[in] aTimeout The child timeout. * @@ -1164,7 +1164,7 @@ public: void SetTimeout(uint32_t aTimeout) { mTimeout = aTimeout; } /** - * This method gets the network data version. + * Gets the network data version. * * @returns The network data version. * @@ -1172,7 +1172,7 @@ public: uint8_t GetNetworkDataVersion(void) const { return mNetworkDataVersion; } /** - * This method sets the network data version. + * Sets the network data version. * * @param[in] aVersion The network data version. * @@ -1180,13 +1180,13 @@ public: void SetNetworkDataVersion(uint8_t aVersion) { mNetworkDataVersion = aVersion; } /** - * This method generates a new challenge value to use during a child attach. + * Generates a new challenge value to use during a child attach. * */ void GenerateChallenge(void); /** - * This method gets the current challenge value used during attach. + * Gets the current challenge value used during attach. * * @returns The current challenge value. * @@ -1194,7 +1194,7 @@ public: const uint8_t *GetChallenge(void) const { return mAttachChallenge; } /** - * This method gets the challenge size (bytes) used during attach. + * Gets the challenge size (bytes) used during attach. * * @returns The challenge size (bytes). * @@ -1202,13 +1202,13 @@ public: uint8_t GetChallengeSize(void) const { return sizeof(mAttachChallenge); } /** - * This method clears the requested TLV list. + * Clears the requested TLV list. * */ void ClearRequestTlvs(void) { memset(mRequestTlvs, Mle::Tlv::kInvalid, sizeof(mRequestTlvs)); } /** - * This method returns the requested TLV at index @p aIndex. + * Returns the requested TLV at index @p aIndex. * * @param[in] aIndex The index into the requested TLV list. * @@ -1218,7 +1218,7 @@ public: uint8_t GetRequestTlv(uint8_t aIndex) const { return mRequestTlvs[aIndex]; } /** - * This method sets the requested TLV at index @p aIndex. + * Sets the requested TLV at index @p aIndex. * * @param[in] aIndex The index into the requested TLV list. * @param[in] aType The TLV type. @@ -1227,7 +1227,7 @@ public: void SetRequestTlv(uint8_t aIndex, uint8_t aType) { mRequestTlvs[aIndex] = aType; } /** - * This method returns the supervision interval (in seconds). + * Returns the supervision interval (in seconds). * * @returns The supervision interval (in seconds). * @@ -1235,7 +1235,7 @@ public: uint16_t GetSupervisionInterval(void) const { return mSupervisionInterval; } /** - * This method sets the supervision interval. + * Sets the supervision interval. * * @param[in] aInterval The supervision interval (in seconds). * @@ -1243,13 +1243,13 @@ public: void SetSupervisionInterval(uint16_t aInterval) { mSupervisionInterval = aInterval; } /** - * This method increments the number of seconds since last supervision of the child. + * Increments the number of seconds since last supervision of the child. * */ void IncrementSecondsSinceLastSupervision(void) { mSecondsSinceSupervision++; } /** - * This method returns the number of seconds since last supervision of the child (last message to the child) + * Returns the number of seconds since last supervision of the child (last message to the child) * * @returns Number of seconds since last supervision of the child. * @@ -1257,14 +1257,14 @@ public: uint16_t GetSecondsSinceLastSupervision(void) const { return mSecondsSinceSupervision; } /** - * This method resets the number of seconds since last supervision of the child to zero. + * Resets the number of seconds since last supervision of the child to zero. * */ void ResetSecondsSinceLastSupervision(void) { mSecondsSinceSupervision = 0; } #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE /** - * This method returns MLR state of an IPv6 multicast address. + * Returns MLR state of an IPv6 multicast address. * * @note The @p aAddress reference MUST be from `IterateIp6Addresses()` or `AddressIterator`. * @@ -1276,7 +1276,7 @@ public: MlrState GetAddressMlrState(const Ip6::Address &aAddress) const; /** - * This method sets MLR state of an IPv6 multicast address. + * Sets MLR state of an IPv6 multicast address. * * @note The @p aAddress reference MUST be from `IterateIp6Addresses()` or `AddressIterator`. * @@ -1287,7 +1287,7 @@ public: void SetAddressMlrState(const Ip6::Address &aAddress, MlrState aState); /** - * This method returns if the Child has IPv6 address @p aAddress of MLR state `kMlrStateRegistered`. + * Returns if the Child has IPv6 address @p aAddress of MLR state `kMlrStateRegistered`. * * @param[in] aAddress The IPv6 address. * @@ -1298,7 +1298,7 @@ public: bool HasMlrRegisteredAddress(const Ip6::Address &aAddress) const; /** - * This method returns if the Child has any IPv6 address of MLR state `kMlrStateRegistered`. + * Returns if the Child has any IPv6 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`. @@ -1307,7 +1307,7 @@ public: bool HasAnyMlrRegisteredAddress(void) const { return mMlrRegisteredMask.HasAny(); } /** - * This method returns if the Child has any IPv6 address of MLR state `kMlrStateToRegister`. + * Returns if the Child has any IPv6 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`. @@ -1370,21 +1370,21 @@ private: class Parent; /** - * This class represents a Thread Router + * Represents a Thread Router * */ class Router : public Neighbor { public: /** - * This class represents diagnostic information for a Thread Router. + * Represents diagnostic information for a Thread Router. * */ class Info : public otRouterInfo, public Clearable { public: /** - * This method sets the `Info` instance from a given `Router`. + * Sets the `Info` instance from a given `Router`. * * @param[in] aRouter A router. * @@ -1392,7 +1392,7 @@ public: void SetFrom(const Router &aRouter); /** - * This method sets the `Info` instance from a given `Parent`. + * Sets the `Info` instance from a given `Parent`. * * @param[in] aParent A parent. * @@ -1401,7 +1401,7 @@ public: }; /** - * This method initializes the `Router` object. + * Initializes the `Router` object. * * @param[in] aInstance A reference to OpenThread instance. * @@ -1409,19 +1409,19 @@ public: void Init(Instance &aInstance) { Neighbor::Init(aInstance); } /** - * This method clears the router entry. + * Clears the router entry. * */ void Clear(void); /** - * This method sets the `Router` entry from a `Parent` + * Sets the `Router` entry from a `Parent` * */ void SetFrom(const Parent &aParent); /** - * This method gets the router ID of the next hop to this router. + * Gets the router ID of the next hop to this router. * * @returns The router ID of the next hop to this router. * @@ -1429,7 +1429,7 @@ public: uint8_t GetNextHop(void) const { return mNextHop; } /** - * This method gets the link quality out value for this router. + * Gets the link quality out value for this router. * * @returns The link quality out value for this router. * @@ -1437,7 +1437,7 @@ public: LinkQuality GetLinkQualityOut(void) const { return static_cast(mLinkQualityOut); } /** - * This method sets the link quality out value for this router. + * Sets the link quality out value for this router. * * @param[in] aLinkQuality The link quality out value for this router. * @@ -1445,7 +1445,7 @@ public: void SetLinkQualityOut(LinkQuality aLinkQuality) { mLinkQualityOut = aLinkQuality; } /** - * This method gets the two-way link quality value (minimum of link quality in and out). + * Gets the two-way link quality value (minimum of link quality in and out). * * @returns The two-way link quality value. * @@ -1453,7 +1453,7 @@ public: LinkQuality GetTwoWayLinkQuality(void) const; /** - * This method get the route cost to this router. + * Get the route cost to this router. * * @returns The route cost to this router. * @@ -1461,7 +1461,7 @@ public: uint8_t GetCost(void) const { return mCost; } /** - * This method sets the next hop and cost to this router. + * Sets the next hop and cost to this router. * * @param[in] aNextHop The Router ID of the next hop to this router. * @param[in] aCost The cost to this router. @@ -1473,7 +1473,7 @@ public: bool SetNextHopAndCost(uint8_t aNextHop, uint8_t aCost); /** - * This method sets the next hop to this router as invalid and clears the cost. + * Sets the next hop to this router as invalid and clears the cost. * * @retval TRUE If there was a change (next hop was valid before). * @retval FALSE No change to next hop (next hop was invalid before). @@ -1493,14 +1493,14 @@ private: }; /** - * This class represent parent of a child node. + * Represent parent of a child node. * */ class Parent : public Router { public: /** - * This method initializes the `Parent`. + * Initializes the `Parent`. * * @param[in] aInstance A reference to OpenThread instance. * @@ -1514,13 +1514,13 @@ public: } /** - * This method clears the parent entry. + * Clears the parent entry. * */ void Clear(void); /** - * This method gets route cost from parent to leader. + * Gets route cost from parent to leader. * * @returns The route cost from parent to leader * @@ -1528,7 +1528,7 @@ public: uint8_t GetLeaderCost(void) const { return mLeaderCost; } /** - * This method sets route cost from parent to leader. + * Sets route cost from parent to leader. * * @param[in] aLaderConst The route cost. * @@ -1537,7 +1537,7 @@ public: #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE /** - * This method gets the CSL accuracy (clock accuracy and uncertainty). + * Gets the CSL accuracy (clock accuracy and uncertainty). * * @returns The CSL accuracy. * @@ -1545,7 +1545,7 @@ public: const Mac::CslAccuracy &GetCslAccuracy(void) const { return mCslAccuracy; } /** - * This method sets CSL accuracy. + * Sets CSL accuracy. * * @param[in] aCslAccuracy The CSL accuracy. * diff --git a/src/core/thread/uri_paths.hpp b/src/core/thread/uri_paths.hpp index 01ef7b08c..e40666920 100644 --- a/src/core/thread/uri_paths.hpp +++ b/src/core/thread/uri_paths.hpp @@ -41,7 +41,7 @@ namespace ot { /** - * This enumeration represents Thread URIs. + * Represents Thread URIs. * */ enum Uri : uint8_t @@ -89,7 +89,7 @@ enum Uri : uint8_t }; /** - * This function returns URI path string for a given URI. + * Returns URI path string for a given URI. * * @param[in] aUri A URI. * @@ -99,7 +99,7 @@ enum Uri : uint8_t const char *PathForUri(Uri aUri); /** - * This function looks up the URI from a given path string. + * Looks up the URI from a given path string. * * @param[in] aPath A path string. * diff --git a/src/core/utils/channel_manager.hpp b/src/core/utils/channel_manager.hpp index f375be022..ad46141e8 100644 --- a/src/core/utils/channel_manager.hpp +++ b/src/core/utils/channel_manager.hpp @@ -58,7 +58,7 @@ namespace Utils { */ /** - * This class implements the Channel Manager. + * Implements the Channel Manager. * */ class ChannelManager : public InstanceLocator, private NonCopyable @@ -71,7 +71,7 @@ public: static constexpr uint16_t kMinimumDelay = OPENTHREAD_CONFIG_CHANNEL_MANAGER_MINIMUM_DELAY; /** - * This constructor initializes a `ChanelManager` object. + * Initializes a `ChanelManager` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -79,7 +79,7 @@ public: explicit ChannelManager(Instance &aInstance); /** - * This method requests a Thread network channel change. + * Requests a Thread network channel change. * * The Thread network switches to the given channel after a specified delay (@sa GetDelay()). The channel change is * performed by updating the Pending Operational Dataset. @@ -94,7 +94,7 @@ public: void RequestChannelChange(uint8_t aChannel); /** - * This method gets the channel from the last successful call to `RequestChannelChange()`. + * Gets the channel from the last successful call to `RequestChannelChange()`. * * @returns The last requested channel, or zero if there has been no channel change request yet. * @@ -102,7 +102,7 @@ public: uint8_t GetRequestedChannel(void) const { return mChannel; } /** - * This method gets the delay (in seconds) used for a channel change. + * Gets the delay (in seconds) used for a channel change. * * @returns The delay (in seconds) * @@ -110,7 +110,7 @@ public: uint16_t GetDelay(void) const { return mDelay; } /** - * This method sets the delay (in seconds) used for a channel change. + * Sets the delay (in seconds) used for a channel change. * * The delay should preferably be longer than maximum data poll interval used by all sleepy-end-devices within the * Thread network. @@ -124,7 +124,7 @@ public: Error SetDelay(uint16_t aDelay); /** - * This method requests that `ChannelManager` checks and selects a new channel and starts a channel change. + * Requests that `ChannelManager` checks and selects a new channel and starts a channel change. * * Unlike the `RequestChannelChange()` where the channel must be given as a parameter, this method asks the * `ChannelManager` to select a channel by itself (based on the collected channel quality info). @@ -155,7 +155,7 @@ public: Error RequestChannelSelect(bool aSkipQualityCheck); /** - * This method enables/disables the auto-channel-selection functionality. + * Enables/disables the auto-channel-selection functionality. * * When enabled, `ChannelManager` will periodically invoke a `RequestChannelSelect(false)`. The period interval * can be set by `SetAutoChannelSelectionInterval()`. @@ -166,7 +166,7 @@ public: void SetAutoChannelSelectionEnabled(bool aEnabled); /** - * This method indicates whether the auto-channel-selection functionality is enabled or not. + * Indicates whether the auto-channel-selection functionality is enabled or not. * * @returns TRUE if enabled, FALSE if disabled. * @@ -174,7 +174,7 @@ public: bool GetAutoChannelSelectionEnabled(void) const { return mAutoSelectEnabled; } /** - * This method sets the period interval (in seconds) used by auto-channel-selection functionality. + * Sets the period interval (in seconds) used by auto-channel-selection functionality. * * @param[in] aInterval The interval (in seconds). * @@ -185,7 +185,7 @@ public: Error SetAutoChannelSelectionInterval(uint32_t aInterval); /** - * This method gets the period interval (in seconds) used by auto-channel-selection functionality. + * Gets the period interval (in seconds) used by auto-channel-selection functionality. * * @returns The interval (in seconds). * @@ -193,7 +193,7 @@ public: uint32_t GetAutoChannelSelectionInterval(void) const { return mAutoSelectInterval; } /** - * This method gets the supported channel mask. + * Gets the supported channel mask. * * @returns The supported channels mask. * @@ -201,7 +201,7 @@ public: uint32_t GetSupportedChannels(void) const { return mSupportedChannelMask.GetMask(); } /** - * This method sets the supported channel mask. + * Sets the supported channel mask. * * @param[in] aChannelMask A channel mask. * @@ -209,7 +209,7 @@ public: void SetSupportedChannels(uint32_t aChannelMask); /** - * This method gets the favored channel mask. + * Gets the favored channel mask. * * @returns The favored channels mask. * @@ -217,7 +217,7 @@ public: uint32_t GetFavoredChannels(void) const { return mFavoredChannelMask.GetMask(); } /** - * This method sets the favored channel mask. + * Sets the favored channel mask. * * @param[in] aChannelMask A channel mask. * @@ -225,7 +225,7 @@ public: void SetFavoredChannels(uint32_t aChannelMask); /** - * This method gets the CCA failure rate threshold + * Gets the CCA failure rate threshold * * @returns The CCA failure rate threshold * @@ -233,7 +233,7 @@ public: uint16_t GetCcaFailureRateThreshold(void) const { return mCcaFailureRateThreshold; } /** - * This method sets the CCA failure rate threshold + * Sets the CCA failure rate threshold * * @param[in] aThreshold A CCA failure rate threshold. * diff --git a/src/core/utils/channel_monitor.hpp b/src/core/utils/channel_monitor.hpp index b0221af52..2c638a10e 100644 --- a/src/core/utils/channel_monitor.hpp +++ b/src/core/utils/channel_monitor.hpp @@ -59,7 +59,7 @@ namespace Utils { */ /** - * This class implements the channel monitoring logic. + * Implements the channel monitoring logic. * * Channel Monitoring will periodically monitor all channels to help determine the cleaner channels (channels * with less interference). @@ -95,7 +95,7 @@ public: static constexpr uint32_t kSampleWindow = OPENTHREAD_CONFIG_CHANNEL_MONITOR_SAMPLE_WINDOW; /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -103,7 +103,7 @@ public: explicit ChannelMonitor(Instance &aInstance); /** - * This method starts the Channel Monitoring operation. + * Starts the Channel Monitoring operation. * * Once started, any previously collected data is cleared. * @@ -114,7 +114,7 @@ public: Error Start(void); /** - * This method stops the Channel Monitoring operation. + * Stops the Channel Monitoring operation. * * @note After `Stop()`, the previous data is still valid and can be read. * @@ -125,7 +125,7 @@ public: Error Stop(void); /** - * This method indicates whether the Channel Monitoring operation is started and running. + * Indicates whether the Channel Monitoring operation is started and running. * * @returns TRUE if the Channel Monitoring operation is running, FALSE otherwise. * @@ -133,13 +133,13 @@ public: bool IsRunning(void) const { return mTimer.IsRunning(); } /** - * This method clears all currently stored data. + * Clears all currently stored data. * */ void Clear(void); /** - * This method returns the total number of RSSI samples (per channel) taken so far (since call to `Start()`). + * Returns the total number of RSSI samples (per channel) taken so far (since call to `Start()`). * * @returns total number of RSSI sample taken since last call to `Start()`. * @@ -147,7 +147,7 @@ public: uint32_t GetSampleCount(void) const { return mSampleCount; } /** - * This method returns the current channel occupancy for a given channel. + * Returns the current channel occupancy for a given channel. * * The channel occupancy represents the average rate/percentage of RSSI samples that were above RSSI threshold * `kRssiThreshold` ("bad" RSSI samples). @@ -168,7 +168,7 @@ public: uint16_t GetChannelOccupancy(uint8_t aChannel) const; /** - * This method finds the best channel(s) (with least occupancy rate) in a given channel mask. + * Finds the best channel(s) (with least occupancy rate) in a given channel mask. * * The channels are compared based on their occupancy rate from `GetChannelOccupancy()` and lower occupancy rate * is considered better. diff --git a/src/core/utils/flash.hpp b/src/core/utils/flash.hpp index 795a47a59..4f1d5e62d 100644 --- a/src/core/utils/flash.hpp +++ b/src/core/utils/flash.hpp @@ -45,7 +45,7 @@ namespace ot { /** - * This class implements the flash storage driver. + * Implements the flash storage driver. * */ class Flash : public InstanceLocator @@ -61,13 +61,13 @@ public: } /** - * This method initializes the flash storage driver. + * Initializes the flash storage driver. * */ void Init(void); /** - * This method fetches the value identified by @p aKey. + * Fetches the value identified by @p aKey. * * @param[in] aKey The key associated with the requested value. * @param[in] aIndex The index of the specific item to get. @@ -86,7 +86,7 @@ public: Error Get(uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength) const; /** - * This method sets or replaces the value identified by @p aKey. + * Sets or replaces the value identified by @p aKey. * * If there was more than one value previously associated with @p aKey, then they are all deleted and replaced with * this single entry. @@ -103,7 +103,7 @@ public: Error Set(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength); /** - * This method adds a value to @p aKey. + * Adds a value to @p aKey. * * @param[in] aKey The key associated with the value. * @param[in] aValue A pointer to where the new value of the setting should be read from. @@ -117,7 +117,7 @@ public: Error Add(uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength); /** - * This method removes a value from @p aKey. + * Removes a value from @p aKey. * * * @param[in] aKey The key associated with the value. @@ -131,7 +131,7 @@ public: Error Delete(uint16_t aKey, int aIndex); /** - * This method removes all values. + * Removes all values. * */ void Wipe(void); diff --git a/src/core/utils/heap.hpp b/src/core/utils/heap.hpp index bd391a97d..c4125b14b 100644 --- a/src/core/utils/heap.hpp +++ b/src/core/utils/heap.hpp @@ -49,7 +49,7 @@ namespace ot { namespace Utils { /** - * This class represents a memory block. + * Represents a memory block. * * A block is of the structure as below. * @@ -69,7 +69,7 @@ class Block public: /** - * This method returns the size of this block. + * Returns the size of this block. * * @returns Size of this block. * @@ -77,7 +77,7 @@ public: uint16_t GetSize(void) const { return mSize; } /** - * This method updates the size of this block. + * Updates the size of this block. * * @param[in] aSize Size of this block in bytes. * @@ -85,7 +85,7 @@ public: void SetSize(uint16_t aSize) { mSize = aSize; } /** - * This method returns the offset of the free block after this block. + * Returns the offset of the free block after this block. * * @note This offset is relative to the start of the heap. * @@ -101,7 +101,7 @@ public: } /** - * This method updates the offset of the free block after this block. + * Updates the offset of the free block after this block. * * @note This offset @p aNext must be relative to the start of the heap. * @@ -115,7 +115,7 @@ public: } /** - * This method returns the pointer to the start of the memory for user. + * Returns the pointer to the start of the memory for user. * * @retval Pointer to the user memory. The pointer address is aligned to sizeof(long). * @@ -123,7 +123,7 @@ public: void *GetPointer(void) { return &mMemory; } /** - * This method returns the offset of the free block after the left neighbor block. + * Returns the offset of the free block after the left neighbor block. * * @returns Offset in bytes. * @@ -131,7 +131,7 @@ public: uint16_t GetLeftNext(void) const { return *(&mSize - 1); } /** - * This method returns whether the left neighbor block is a free block. + * Returns whether the left neighbor block is a free block. * * @retval true The left neighbor block is free. * @retval false The left neighbor block is not free. @@ -140,7 +140,7 @@ public: bool IsLeftFree(void) const { return GetLeftNext() != 0; } /** - * This method returns whether the current block is a free block. + * Returns whether the current block is a free block. * * @retval true The block is free. * @retval false The block is not free. @@ -160,7 +160,7 @@ private: }; /** - * This class defines functionality to manipulate heap. + * Defines functionality to manipulate heap. * * This implementation is currently for mbedTLS. * @@ -177,13 +177,13 @@ class Heap : private NonCopyable { public: /** - * This constructor initializes a memory heap. + * Initializes a memory heap. * */ Heap(void); /** - * This method allocates at least @p aCount * @aSize bytes memory and initialize to zero. + * Allocates at least @p aCount * @aSize bytes memory and initialize to zero. * * @param[in] aCount Number of allocate units. * @param[in] aSize Unit size in bytes. @@ -196,7 +196,7 @@ public: void *CAlloc(size_t aCount, size_t aSize); /** - * This method free memory pointed by @p aPointer. + * Free memory pointed by @p aPointer. * * @param[in] aPointer A pointer to the memory to free. * @@ -204,7 +204,7 @@ public: void Free(void *aPointer); /** - * This method returns whether the heap is clean. + * Returns whether the heap is clean. * */ bool IsClean(void) const @@ -216,13 +216,13 @@ public: } /** - * This method returns the capacity of this heap. + * Returns the capacity of this heap. * */ size_t GetCapacity(void) const { return kFirstBlockSize; } /** - * This method returns free space of this heap. + * Returns free space of this heap. */ size_t GetFreeSize(void) const { return mMemory.mFreeSize; } @@ -243,7 +243,7 @@ private: static_assert(kMemorySize % kAlignSize == 0, "The heap memory size is not aligned to kAlignSize!"); /** - * This method returns the block at offset @p aOffset. + * Returns the block at offset @p aOffset. * * @param[in] aOffset Offset in bytes. * @@ -253,7 +253,7 @@ private: Block &BlockAt(uint16_t aOffset) { return *reinterpret_cast(&mMemory.m16[aOffset / 2]); } /** - * This method returns the block of @p aPointer. + * Returns the block of @p aPointer. * * @param[in] aPointer The pointer returned by CAlloc(). * @@ -268,7 +268,7 @@ private: } /** - * This method returns the super block. + * Returns the super block. * * @returns Reference to the super block. * @@ -276,7 +276,7 @@ private: Block &BlockSuper(void) { return BlockAt(kSuperBlockOffset); } /** - * This method returns the free block after @p aBlock in the free block list. + * Returns the free block after @p aBlock in the free block list. * * @param[in] aBlock A reference to the block. * @@ -286,7 +286,7 @@ private: Block &BlockNext(const Block &aBlock) { return BlockAt(aBlock.GetNext()); } /** - * This method returns the block on the right side of @p aBlock. + * Returns the block on the right side of @p aBlock. * * @param[in] aBlock A reference to the block. * @@ -296,7 +296,7 @@ private: Block &BlockRight(const Block &aBlock) { return BlockAt(BlockOffset(aBlock) + sizeof(Block) + aBlock.GetSize()); } /** - * This method returns the free block before @p aBlock in the free block list. + * Returns the free block before @p aBlock in the free block list. * * @returns Reference to the free block before this block. * @@ -304,7 +304,7 @@ private: Block &BlockPrev(const Block &aBlock); /** - * This method returns whether the block on the left side of @p aBlock is free. + * Returns whether the block on the left side of @p aBlock is free. * * @param[in] aBlock A reference to the block. * @@ -312,7 +312,7 @@ private: bool IsLeftFree(const Block &aBlock) { return (BlockOffset(aBlock) != kFirstBlockOffset && aBlock.IsLeftFree()); } /** - * This method returns the offset of @p aBlock. + * Returns the offset of @p aBlock. * * @param[in] aBlock A reference to the block. * @@ -325,7 +325,7 @@ private: } /** - * This method inserts @p aBlock into the free block list. + * Inserts @p aBlock into the free block list. * * The free block list is single linked and is sorted by size from minimal to maximum. * diff --git a/src/core/utils/history_tracker.hpp b/src/core/utils/history_tracker.hpp index c3613935e..173292d74 100644 --- a/src/core/utils/history_tracker.hpp +++ b/src/core/utils/history_tracker.hpp @@ -69,7 +69,7 @@ namespace Utils { (OPENTHREAD_CONFIG_HISTORY_TRACKER_EXTERNAL_ROUTE_LIST_SIZE > 0)) /** - * This class implements History Tracker. + * Implements History Tracker. * */ class HistoryTracker : public InstanceLocator, private NonCopyable @@ -107,7 +107,7 @@ public: static constexpr uint8_t kNoNextHop = OT_HISTORY_TRACKER_NO_NEXT_HOP; /** - * This type represents an iterator to iterate through a history list. + * Represents an iterator to iterate through a history list. * */ class Iterator : public otHistoryTrackerIterator @@ -116,7 +116,7 @@ public: public: /** - * This method initializes an `Iterator` + * Initializes an `Iterator` * * An iterator MUST be initialized before it is used. An iterator can be initialized again to start from * the beginning of the list. @@ -142,7 +142,7 @@ public: typedef otHistoryTrackerExternalRouteInfo ExternalRouteInfo; ///< Network Data external route info /** - * This constructor initializes the `HistoryTracker`. + * Initializes the `HistoryTracker`. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -150,7 +150,7 @@ public: explicit HistoryTracker(Instance &aInstance); /** - * This method iterates over the entries in the network info history list. + * Iterates over the entries in the network info history list. * * @param[in,out] aIterator An iterator. MUST be initialized. * @param[out] aEntryAge A reference to a variable to output the entry's age. @@ -167,7 +167,7 @@ public: } /** - * This method iterates over the entries in the unicast address history list. + * Iterates over the entries in the unicast address history list. * * @param[in,out] aIterator An iterator. MUST be initialized. * @param[out] aEntryAge A reference to a variable to output the entry's age. @@ -184,7 +184,7 @@ public: } /** - * This method iterates over the entries in the multicast address history list. + * Iterates over the entries in the multicast address history list. * * @param[in,out] aIterator An iterator. MUST be initialized. * @param[out] aEntryAge A reference to a variable to output the entry's age. @@ -201,7 +201,7 @@ public: } /** - * This method iterates over the entries in the RX history list. + * Iterates over the entries in the RX history list. * * @param[in,out] aIterator An iterator. MUST be initialized. * @param[out] aEntryAge A reference to a variable to output the entry's age. @@ -218,7 +218,7 @@ public: } /** - * This method iterates over the entries in the TX history list. + * Iterates over the entries in the TX history list. * * @param[in,out] aIterator An iterator. MUST be initialized. * @param[out] aEntryAge A reference to a variable to output the entry's age. @@ -255,7 +255,7 @@ public: } /** - * This static method converts a given entry age to a human-readable string. + * Converts a given entry age to a human-readable string. * * The entry age string follows the format "::." for hours, minutes, seconds and millisecond * (if shorter than one day) or "
days ::." (if longer than one day). diff --git a/src/core/utils/jam_detector.hpp b/src/core/utils/jam_detector.hpp index 084ab7773..3bbe9fbf5 100644 --- a/src/core/utils/jam_detector.hpp +++ b/src/core/utils/jam_detector.hpp @@ -58,7 +58,7 @@ class JamDetector : public InstanceLocator, private NonCopyable public: /** - * This function pointer is called if jam state changes (assuming jamming detection is enabled). + * Pointer is called if jam state changes (assuming jamming detection is enabled). * * @param[in] aJamState `true` if jam is detected, `false` if jam is cleared. * @param[in] aContext A pointer to application-specific context. @@ -67,7 +67,7 @@ public: typedef void (*Handler)(bool aJamState, void *aContext); /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * diff --git a/src/core/utils/mesh_diag.hpp b/src/core/utils/mesh_diag.hpp index 931a080a7..2f1768a05 100644 --- a/src/core/utils/mesh_diag.hpp +++ b/src/core/utils/mesh_diag.hpp @@ -60,7 +60,7 @@ namespace ot { namespace Utils { /** - * This class implements the Mesh Diagnostics. + * Implements the Mesh Diagnostics. * */ class MeshDiag : public InstanceLocator @@ -72,7 +72,7 @@ public: typedef otMeshDiagDiscoverCallback DiscoverCallback; ///< The discovery callback function pointer type. /** - * This type represents an iterator to go over list of IPv6 addresses of a router. + * Represents an iterator to go over list of IPv6 addresses of a router. * */ class Ip6AddrIterator : public otMeshDiagIp6AddrIterator @@ -81,7 +81,7 @@ public: public: /** - * This method iterates through the discovered IPv6 address of a router. + * Iterates through the discovered IPv6 address of a router. * * @param[out] aIp6Address A reference to return the next IPv6 address (if any). * @@ -100,7 +100,7 @@ public: }; /** - * This type represents information about a router in Thread mesh. + * Represents information about a router in Thread mesh. * */ class RouterInfo : public otMeshDiagRouterInfo, public Clearable @@ -112,7 +112,7 @@ public: }; /** - * This type represents information about a child in Thread mesh. + * Represents information about a child in Thread mesh. * */ class ChildInfo : public otMeshDiagChildInfo, public Clearable @@ -120,7 +120,7 @@ public: }; /** - * This type represents an iterator to go over list of IPv6 addresses of a router. + * Represents an iterator to go over list of IPv6 addresses of a router. * */ class ChildIterator : public otMeshDiagChildIterator @@ -129,7 +129,7 @@ public: public: /** - * This method iterates through the discovered children of a router. + * Iterates through the discovered children of a router. * * @param[out] aChildInfo A reference to return the info for the next child (if any). * @@ -149,7 +149,7 @@ public: }; /** - * This constructor initializes the `MeshDiag` instance. + * Initializes the `MeshDiag` instance. * * @param[in] aInstance The OpenThread instance. * @@ -157,7 +157,7 @@ public: explicit MeshDiag(Instance &aInstance); /** - * This method starts network topology discovery. + * Starts network topology discovery. * * @param[in] aConfig The configuration to use for discovery (e.g., which items to discover). * @param[in] aCallback The callback to report the discovered routers. @@ -172,7 +172,7 @@ public: Error DiscoverTopology(const DiscoverConfig &aConfig, DiscoverCallback aCallback, void *aContext); /** - * This method cancels an ongoing topology discovery if there one, otherwise no action. + * Cancels an ongoing topology discovery if there one, otherwise no action. * * When ongoing discovery is cancelled, the callback from `DiscoverTopology()` will not be called anymore. * diff --git a/src/core/utils/otns.hpp b/src/core/utils/otns.hpp index ce9b2ef16..c949fd8bf 100644 --- a/src/core/utils/otns.hpp +++ b/src/core/utils/otns.hpp @@ -56,7 +56,7 @@ namespace ot { namespace Utils { /** - * This class implements the OTNS Stub that interacts with OTNS. + * Implements the OTNS Stub that interacts with OTNS. * */ class Otns : public InstanceLocator, private NonCopyable @@ -65,7 +65,7 @@ class Otns : public InstanceLocator, private NonCopyable public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -76,7 +76,7 @@ public: } /** - * This function emits radio short address to OTNS when changed. + * Emits radio short address to OTNS when changed. * * @param[in] aShortAddress The new short address. * @@ -84,7 +84,7 @@ public: static void EmitShortAddress(uint16_t aShortAddress); /** - * This function emits radio extended address to OTNS when changed. + * Emits radio extended address to OTNS when changed. * * @param[in] aExtAddress The new extended address. * @@ -92,7 +92,7 @@ public: static void EmitExtendedAddress(const Mac::ExtAddress &aExtAddress); /** - * This function emits ping request information to OTNS when sending. + * Emits ping request information to OTNS when sending. * * @param[in] aPeerAddress The peer address of the ping request. * @param[in] aPingLength The data length of the ping request. @@ -106,7 +106,7 @@ public: uint8_t aHopLimit); /** - * This function emits ping reply information to OTNS when received. + * Emits ping reply information to OTNS when received. * * @param[in] aPeerAddress The peer address of the ping request. * @param[in] aPingLength The data length of the ping reply. @@ -120,7 +120,7 @@ public: uint8_t aHopLimit); /** - * This function emits a neighbor table event to OTNS when a neighbor is added or removed. + * Emits a neighbor table event to OTNS when a neighbor is added or removed. * * @param[in] aEvent The event type. * @param[in] aNeighbor The neighbor that is added or removed. @@ -129,7 +129,7 @@ public: static void EmitNeighborChange(NeighborTable::Event aEvent, const Neighbor &aNeighbor); /** - * This function emits a transmit event to OTNS. + * Emits a transmit event to OTNS. * * @param[in] aFrame The frame of the transmission. * @@ -137,7 +137,7 @@ public: static void EmitTransmit(const Mac::TxFrame &aFrame); /** - * This function emits the device mode to OTNS. + * Emits the device mode to OTNS. * * @param[in] aMode The device mode. * @@ -145,7 +145,7 @@ public: static void EmitDeviceMode(Mle::DeviceMode aMode); /** - * This function emits the sending COAP message info to OTNS. + * Emits the sending COAP message info to OTNS. * * @param[in] aMessage The sending COAP message. * @param[in] aMessageInfo The message info. @@ -154,7 +154,7 @@ public: static void EmitCoapSend(const Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo); /** - * This function emits the COAP message sending failure to OTNS. + * Emits the COAP message sending failure to OTNS. * * @param[in] aError The error in sending the COAP message. * @param[in] aMessage The COAP message failed to send. @@ -164,7 +164,7 @@ public: static void EmitCoapSendFailure(Error aError, Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo); /** - * This function emits the received COAP message info to OTNS. + * Emits the received COAP message info to OTNS. * * @param[in] aMessage The received COAP message. * @param[in] aMessageInfo The message info. diff --git a/src/core/utils/parse_cmdline.hpp b/src/core/utils/parse_cmdline.hpp index 777a50aae..4216487ae 100644 --- a/src/core/utils/parse_cmdline.hpp +++ b/src/core/utils/parse_cmdline.hpp @@ -56,7 +56,7 @@ namespace CmdLineParser { */ /** - * This function parses a string as a `uint8_t` value. + * Parses a string as a `uint8_t` value. * * The number in string is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -70,7 +70,7 @@ namespace CmdLineParser { otError ParseAsUint8(const char *aString, uint8_t &aUint8); /** - * This function parses a string as a `uint16_t` value. + * Parses a string as a `uint16_t` value. * * The number in string is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -84,7 +84,7 @@ otError ParseAsUint8(const char *aString, uint8_t &aUint8); otError ParseAsUint16(const char *aString, uint16_t &aUint16); /** - * This function parses a string as a `uint32_t` value. + * Parses a string as a `uint32_t` value. * * The number in string is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -98,7 +98,7 @@ otError ParseAsUint16(const char *aString, uint16_t &aUint16); otError ParseAsUint32(const char *aString, uint32_t &aUint32); /** - * This function parses a string as a `uint64_t` value. + * Parses a string as a `uint64_t` value. * * The number in string is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -112,7 +112,7 @@ otError ParseAsUint32(const char *aString, uint32_t &aUint32); otError ParseAsUint64(const char *aString, uint64_t &aUint64); /** - * This function parses a string as a `int8_t` value. + * Parses a string as a `int8_t` value. * * The number in string is parsed as decimal or hex format (if contains `0x` or `0X` prefix). The string can start with * `+`/`-` sign. @@ -127,7 +127,7 @@ otError ParseAsUint64(const char *aString, uint64_t &aUint64); otError ParseAsInt8(const char *aString, int8_t &aInt8); /** - * This function parses a string as a `int16_t` value. + * Parses a string as a `int16_t` value. * * The number in string is parsed as decimal or hex format (if contains `0x` or `0X` prefix). The string can start with * `+`/`-` sign. @@ -142,7 +142,7 @@ otError ParseAsInt8(const char *aString, int8_t &aInt8); otError ParseAsInt16(const char *aString, int16_t &aInt16); /** - * This function parses a string as a `int32_t` value. + * Parses a string as a `int32_t` value. * * The number in string is parsed as decimal or hex format (if contains `0x` or `0X` prefix). The string can start with * `+`/`-` sign. @@ -157,7 +157,7 @@ otError ParseAsInt16(const char *aString, int16_t &aInt16); otError ParseAsInt32(const char *aString, int32_t &aInt32); /** - * This function parses a string as a `bool` value. + * Parses a string as a `bool` value. * * Zero value is treated as `false`, non-zero value as `true`. * @@ -172,7 +172,7 @@ otError ParseAsBool(const char *aString, bool &aBool); #if OPENTHREAD_FTD || OPENTHREAD_MTD /** - * This function parses a string as an IPv6 address. + * Parses a string as an IPv6 address. * * * @param[in] aString The string to parse. @@ -185,7 +185,7 @@ otError ParseAsBool(const char *aString, bool &aBool); otError ParseAsIp6Address(const char *aString, otIp6Address &aAddress); /** - * This function parses a string as an IPv4 address. + * Parses a string as an IPv4 address. * * @param[in] aString The string to parse. * @param[out] aAddress A reference to an `otIp6Address` to output the parsed IPv6 address. @@ -197,7 +197,7 @@ otError ParseAsIp6Address(const char *aString, otIp6Address &aAddress); otError ParseAsIp4Address(const char *aString, otIp4Address &aAddress); /** - * This function parses a string as an IPv6 prefix. + * Parses a string as an IPv6 prefix. * * The string is parsed as `{IPv6Address}/{PrefixLength}`. * @@ -212,13 +212,13 @@ otError ParseAsIp6Prefix(const char *aString, otIp6Prefix &aPrefix); #endif // OPENTHREAD_FTD || OPENTHREAD_MTD /** - * This function parses a hex string into a byte array of fixed expected size. + * Parses a hex string into a byte array of fixed expected size. * - * This function returns `kErrorNone` only when the hex string contains exactly @p aSize bytes (after parsing). If + * Returns `kErrorNone` only when the hex string contains exactly @p aSize bytes (after parsing). If * there are fewer or more bytes in hex string that @p aSize, the parsed bytes (up to @p aSize) are copied into the * `aBuffer` and `kErrorInvalidArgs` is returned. * - * This function correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is + * Correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is * parsed as {0xaa, 0xbb, 0xcc, 0xdd} and "123" (with odd length) is parsed as {0x01, 0x23}. * * @param[in] aString The string to parse. @@ -234,11 +234,11 @@ otError ParseAsHexString(const char *aString, uint8_t *aBuffer, uint16_t aSize); /** * This template function parses a hex string into a a given fixed size array. * - * This function returns `kErrorNone` only when the hex string contains exactly @p kBufferSize bytes (after parsing). + * Returns `kErrorNone` only when the hex string contains exactly @p kBufferSize bytes (after parsing). * If there are fewer or more bytes in hex string that @p kBufferSize, the parsed bytes (up to @p kBufferSize) are * copied into the `aBuffer` and `kErrorInvalidArgs` is returned. * - * This function correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is + * Correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is * parsed as {0xaa, 0xbb, 0xcc, 0xdd} and "123" (with odd length) is parsed as {0x01, 0x23}. * * @tparam kBufferSize The byte array size (number of bytes). @@ -256,11 +256,11 @@ template static otError ParseAsHexString(const char *aStr } /** - * This function parses a hex string into a byte array. + * Parses a hex string into a byte array. * - * This function verifies that the parsed hex string bytes fit in @p aBuffer with its given @p aSize. + * Verifies that the parsed hex string bytes fit in @p aBuffer with its given @p aSize. * - * This function correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is + * Correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is * parsed as {0xaa, 0xbb, 0xcc, 0xdd} and "123" (with odd length) is parsed as {0x01, 0x23}. * * @param[in] aString The string to parse. @@ -275,14 +275,14 @@ template static otError ParseAsHexString(const char *aStr otError ParseAsHexString(const char *aString, uint16_t &aSize, uint8_t *aBuffer); /** - * This function parses a segment of a hex string up to a given size. + * Parses a segment of a hex string up to a given size. * - * This function allows a longer hex string to be parsed and read in smaller segments into a given buffer. If the + * Allows a longer hex string to be parsed and read in smaller segments into a given buffer. If the * entire hex string bytes can fit in the given @p aBuffer with its @p aSize, they are copied into @p aBuffer and * function returns `kErrorNone`. Otherwise, @p aSize bytes are read and copied and function returns `kErrorPending` * to indicate that there are more bytes to parse. The @p aString is also updated to skip over the parsed segment. * - * This function correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is + * Correctly handles hex strings with even or odd length. For example, "AABBCCDD" (with even length) is * parsed as {0xaa, 0xbb, 0xcc, 0xdd} and "123" (with odd length) is parsed as {0x01, 0x23}. * * @param[in,out] aString A reference to string to parse. On successful parse, updated to skip parsed digits. @@ -299,20 +299,20 @@ otError ParseAsHexString(const char *aString, uint16_t &aSize, uint8_t *aBuffer) otError ParseAsHexStringSegment(const char *&aString, uint16_t &aSize, uint8_t *aBuffer); /** - * This class represents a single argument from an argument list. + * Represents a single argument from an argument list. * */ class Arg { public: /** - * This method clears the argument. + * Clears the argument. * */ void Clear(void) { mString = nullptr; } /** - * This method indicates whether or not the argument is empty (i.e., reached the end of argument list). + * Indicates whether or not the argument is empty (i.e., reached the end of argument list). * * @retval TRUE The argument is empty. * @retval FALSE The argument is not empty. @@ -321,7 +321,7 @@ public: bool IsEmpty(void) const { return (mString == nullptr); } /** - * This method returns the length (number of characters) in the argument C string. + * Returns the length (number of characters) in the argument C string. * * @returns The argument string length if argument is not empty, zero otherwise. * @@ -329,7 +329,7 @@ public: uint16_t GetLength(void) const; /** - * This method gets the argument as a C string. + * Gets the argument as a C string. * * @returns A pointer to the argument as a C string, or `nullptr` if argument is empty. * @@ -337,7 +337,7 @@ public: const char *GetCString(void) const { return mString; } /** - * This method gets the argument as C string. + * Gets the argument as C string. * * @returns A pointer to the argument as a C string, or `nullptr` if argument is empty. * @@ -345,7 +345,7 @@ public: char *GetCString(void) { return mString; } /** - * This method sets the argument with a given C string. + * Sets the argument with a given C string. * * @param[in] aString A pointer to the new C string. * @@ -353,7 +353,7 @@ public: void SetCString(char *aString) { mString = aString; } /** - * This method overload the operator `==` to evaluate whether the argument is equal to a given C string. + * Overload the operator `==` to evaluate whether the argument is equal to a given C string. * * If the argument is empty (`IsEmpty()` is `true`) then comparing it using operator `==` with any C string will * return false. @@ -367,7 +367,7 @@ public: bool operator==(const char *aString) const; /** - * This method overload the operator `!=` to evaluate whether the argument is unequal to a given C string. + * Overload the operator `!=` to evaluate whether the argument is unequal to a given C string. * * @param[in] aString The C string to compare with (MUST not be `nullptr`). * @@ -378,7 +378,7 @@ public: bool operator!=(const char *aString) const { return !(*this == aString); } /** - * This method parses the argument as a `uint8_t` value. + * Parses the argument as a `uint8_t` value. * * The number is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -391,7 +391,7 @@ public: otError ParseAsUint8(uint8_t &aUint8) const { return CmdLineParser::ParseAsUint8(mString, aUint8); } /** - * This method parses the argument as a `uint16_t` value. + * Parses the argument as a `uint16_t` value. * * The number is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -404,7 +404,7 @@ public: otError ParseAsUint16(uint16_t &aUint16) const { return CmdLineParser::ParseAsUint16(mString, aUint16); } /** - * This method parses the argument as a `uint32_t` value. + * Parses the argument as a `uint32_t` value. * * The number is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -417,7 +417,7 @@ public: otError ParseAsUint32(uint32_t &aUint32) const { return CmdLineParser::ParseAsUint32(mString, aUint32); } /** - * This method parses the argument as a `uint64_t` value. + * Parses the argument as a `uint64_t` value. * * The number is parsed as decimal or hex format (if contains `0x` or `0X` prefix). * @@ -430,7 +430,7 @@ public: otError ParseAsUint64(uint64_t &aUint64) const { return CmdLineParser::ParseAsUint64(mString, aUint64); } /** - * This method parses the argument as a `int8_t` value. + * Parses the argument as a `int8_t` value. * * The number is parsed as decimal or hex format (if contains `0x` or `0X` prefix). The string can start with * `+`/`-` sign. @@ -444,7 +444,7 @@ public: otError ParseAsInt8(int8_t &aInt8) const { return CmdLineParser::ParseAsInt8(mString, aInt8); } /** - * This method parses the argument as a `int16_t` value. + * Parses the argument as a `int16_t` value. * * The number is parsed as decimal or hex format (if contains `0x` or `0X` prefix). The string can start with * `+`/`-` sign. @@ -458,7 +458,7 @@ public: otError ParseAsInt16(int16_t &aInt16) const { return CmdLineParser::ParseAsInt16(mString, aInt16); } /** - * This method parses the argument as a `int32_t` value. + * Parses the argument as a `int32_t` value. * * The number is parsed as decimal or hex format (if contains `0x` or `0X` prefix). The string can start with * `+`/`-` sign. @@ -472,7 +472,7 @@ public: otError ParseAsInt32(int32_t &aInt32) const { return CmdLineParser::ParseAsInt32(mString, aInt32); } /** - * This method parses the argument as a `bool` value. + * Parses the argument as a `bool` value. * * Zero value is treated as `false`, non-zero value as `true`. * @@ -486,7 +486,7 @@ public: #if OPENTHREAD_FTD || OPENTHREAD_MTD /** - * This method parses the argument as an IPv6 address. + * Parses the argument as an IPv6 address. * * @param[out] aAddress A reference to an `otIp6Address` to output the parsed IPv6 address. * @@ -500,7 +500,7 @@ public: } /** - * This method parses the argument as an IPv4 address. + * Parses the argument as an IPv4 address. * * @param[out] aAddress A reference to an `otIp4Address` to output the parsed IPv4 address. * @@ -514,7 +514,7 @@ public: } /** - * This method parses the argument as an IPv6 prefix. + * Parses the argument as an IPv6 prefix. * * The string is parsed as `{IPv6Address}/{PrefixLength}`. * @@ -529,7 +529,7 @@ public: #endif // OPENTHREAD_FTD || OPENTHREAD_MTD /** - * This template method parses the argument as a specified value type. + * Parses the argument as a specified value type. * * @tparam Type The value type. * @@ -542,9 +542,9 @@ public: template otError ParseAs(Type &aValue) const; /** - * This method parses the argument as a hex string into a byte array of fixed expected size. + * Parses the argument as a hex string into a byte array of fixed expected size. * - * This method returns `kErrorNone` only when the hex string contains exactly @p aSize bytes (after parsing). If + * Returns `kErrorNone` only when the hex string contains exactly @p aSize bytes (after parsing). If * there are fewer or more bytes in hex string that @p aSize, the parsed bytes (up to @p aSize) are copied into the * `aBuffer` and `kErrorInvalidArgs` is returned. * @@ -561,9 +561,9 @@ public: } /** - * This template method parses the argument as a hex string into a a given fixed size array. + * Parses the argument as a hex string into a a given fixed size array. * - * This method returns `kErrorNone` only when the hex string contains exactly @p kBufferSize bytes (after parsing). + * Returns `kErrorNone` only when the hex string contains exactly @p kBufferSize bytes (after parsing). * If there are fewer or more bytes in hex string that @p kBufferSize, the parsed bytes (up to @p kBufferSize) are * copied into the `aBuffer` and `kErrorInvalidArgs` is returned. * @@ -581,9 +581,9 @@ public: } /** - * This method parses the argument as a hex string into a byte array. + * Parses the argument as a hex string into a byte array. * - * This method verifies that the parsed hex string bytes fit in @p aBuffer with its given @p aSize. + * Verifies that the parsed hex string bytes fit in @p aBuffer with its given @p aSize. * * @param[in,out] aSize On entry indicates the number of bytes in @p aBuffer (max size of @p aBuffer). * On exit provides number of bytes parsed and copied into @p aBuffer. @@ -599,7 +599,7 @@ public: } /** - * This static method copies the argument string pointers from an `Arg` array to a C string array. + * Copies the argument string pointers from an `Arg` array to a C string array. * * @note this method only copies the string pointer value (i.e., `GetString()` pointer) from `aArgs` array to the * @p aStrings array (the content of strings are not copied). @@ -612,7 +612,7 @@ public: static void CopyArgsToStringArray(Arg aArgs[], char *aStrings[]); /** - * This static method returns the length of argument array, i.e. number of consecutive non-empty arguments. + * Returns the length of argument array, i.e. number of consecutive non-empty arguments. * * @param[in] aArgs An `Arg` array. * @@ -626,9 +626,9 @@ private: }; /** - * This function parses a given command line string and breaks it into an argument list. + * Parses a given command line string and breaks it into an argument list. * - * This function may change the input @p aCommandString, it will put a '\0' by the end of each argument, and @p aArgs + * May change the input @p aCommandString, it will put a '\0' by the end of each argument, and @p aArgs * will point to the arguments in the input @p aCommandString. Backslash ('\') can be used to escape separators * (' ', '\t', '\r', '\n') and the backslash itself. * @@ -636,7 +636,7 @@ private: * will be cleared and marked as empty. So the number of arguments can be determined by going through @p aArgs array * entries till we get to an empty `Arg` (i.e., `Arg::IsEmpty()` returns `true). * - * This function ensures that the last entry in @p aArgs array is always used to indicate the end (always marked as + * Ensures that the last entry in @p aArgs array is always used to indicate the end (always marked as * empty), so the @p aArgs array should have one more entry than the desired max number of arguments. * * @param[in] aCommandString A null-terminated input string. diff --git a/src/core/utils/ping_sender.hpp b/src/core/utils/ping_sender.hpp index 9eb0a9129..8037b10ce 100644 --- a/src/core/utils/ping_sender.hpp +++ b/src/core/utils/ping_sender.hpp @@ -55,20 +55,20 @@ namespace ot { namespace Utils { /** - * This class implements sending ICMPv6 Echo Request messages and processing ICMPv6 Echo Reply messages. + * Implements sending ICMPv6 Echo Request messages and processing ICMPv6 Echo Reply messages. * */ class PingSender : public InstanceLocator, private NonCopyable { public: /** - * This class represents a ping reply. + * Represents a ping reply. * */ typedef otPingSenderReply Reply; /** - * This class represents the statistics of several ping requests. + * Represents the statistics of several ping requests. * */ struct Statistics : public otPingSenderStatistics @@ -87,7 +87,7 @@ public: }; /** - * This class represents a ping request configuration. + * Represents a ping request configuration. * */ class Config : public otPingSenderConfig @@ -96,7 +96,7 @@ public: public: /** - * This method gets the source IPv6 address of the ping. + * Gets the source IPv6 address of the ping. * * @returns The ping source IPv6 address. * @@ -104,7 +104,7 @@ public: Ip6::Address &GetSource(void) { return AsCoreType(&mSource); } /** - * This method gets the source IPv6 address of the ping. + * Gets the source IPv6 address of the ping. * * @returns The ping source IPv6 address. * @@ -112,7 +112,7 @@ public: const Ip6::Address &GetSource(void) const { return AsCoreType(&mSource); } /** - * This method gets the destination IPv6 address to ping. + * Gets the destination IPv6 address to ping. * * @returns The ping destination IPv6 address. * @@ -120,7 +120,7 @@ public: Ip6::Address &GetDestination(void) { return AsCoreType(&mDestination); } /** - * This method gets the destination IPv6 address to ping. + * Gets the destination IPv6 address to ping. * * @returns The ping destination IPv6 address. * @@ -139,7 +139,7 @@ public: }; /** - * This constructor initializes the `PingSender` object. + * Initializes the `PingSender` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -147,7 +147,7 @@ public: explicit PingSender(Instance &aInstance); /** - * This method starts a ping. + * Starts a ping. * * @param[in] aConfig The ping config to use. * @@ -159,7 +159,7 @@ public: Error Ping(const Config &aConfig); /** - * This method stops an ongoing ping. + * Stops an ongoing ping. * */ void Stop(void); diff --git a/src/core/utils/power_calibration.hpp b/src/core/utils/power_calibration.hpp index e16775b3a..1f2d83c57 100644 --- a/src/core/utils/power_calibration.hpp +++ b/src/core/utils/power_calibration.hpp @@ -49,7 +49,7 @@ namespace ot { namespace Utils { /** - * This class implements power calibration module. + * Implements power calibration module. * * The power calibration module implements the radio platform power calibration APIs. It mainly stores the calibrated * power table and the target power table, provides an API for the platform to get the raw power setting of the diff --git a/src/core/utils/slaac_address.hpp b/src/core/utils/slaac_address.hpp index 1784d33ac..3e73f1920 100644 --- a/src/core/utils/slaac_address.hpp +++ b/src/core/utils/slaac_address.hpp @@ -57,7 +57,7 @@ namespace Utils { */ /** - * This class implements the SLAAC utility for Thread protocol. + * Implements the SLAAC utility for Thread protocol. * */ class Slaac : public InstanceLocator, private NonCopyable @@ -66,7 +66,7 @@ class Slaac : public InstanceLocator, private NonCopyable public: /** - * This type represents the secret key used for generating semantically opaque IID (per RFC 7217). + * Represents the secret key used for generating semantically opaque IID (per RFC 7217). * */ struct IidSecretKey @@ -77,7 +77,7 @@ public: }; /** - * This constructor initializes the SLAAC manager object. + * Initializes the SLAAC manager object. * * Note that SLAAC module starts enabled. * @@ -87,7 +87,7 @@ public: explicit Slaac(Instance &aInstance); /** - * This method enables the SLAAC module. + * Enables the SLAAC module. * * When enabled, new SLAAC addresses are generated and added from on-mesh prefixes in network data. * @@ -95,7 +95,7 @@ public: void Enable(void); /** - * This method disables the SLAAC module. + * Disables the SLAAC module. * * When disabled, any previously added SLAAC address by this module is removed. * @@ -103,7 +103,7 @@ public: void Disable(void); /** - * This method indicates whether SLAAC module is enabled or not. + * Indicates whether SLAAC module is enabled or not. * * @retval TRUE SLAAC module is enabled. * @retval FALSE SLAAC module is disabled. @@ -112,7 +112,7 @@ public: bool IsEnabled(void) const { return mEnabled; } /** - * This method sets a SLAAC prefix filter handler. + * Sets a SLAAC prefix filter handler. * * The handler is invoked by SLAAC module when it is about to add a SLAAC address based on a prefix. The return * boolean value from handler determines whether the address is filtered or added (TRUE to filter the address, @@ -124,7 +124,7 @@ public: void SetFilter(otIp6SlaacPrefixFilter aFilter); /** - * This method generates the IID of an IPv6 address. + * Generates the IID of an IPv6 address. * * @param[in,out] aAddress A reference to the address that will be filled with the IID generated. * Note the prefix of the address must already be filled and will be used diff --git a/src/core/utils/srp_client_buffers.hpp b/src/core/utils/srp_client_buffers.hpp index a60be7b73..37028afb9 100644 --- a/src/core/utils/srp_client_buffers.hpp +++ b/src/core/utils/srp_client_buffers.hpp @@ -56,7 +56,7 @@ namespace Utils { #endif /** - * This class represents the SRP client buffers and service pool. + * Represents the SRP client buffers and service pool. * */ class SrpClientBuffers : public InstanceLocator, private NonCopyable @@ -105,7 +105,7 @@ public: static constexpr uint16_t kTxtBufferSize = OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_TXT_BUFFER_SIZE; /** - * This class represents a SRP client service entry from the pool. + * Represents a SRP client service entry from the pool. * */ class ServiceEntry : public otSrpClientBuffersServiceEntry, public Clearable @@ -115,7 +115,7 @@ public: public: /** - * This method gets the string buffer for the service name from the service entry. + * Gets the string buffer for the service name from the service entry. * * @param[out] aSize Reference to a variable to return the size (number of bytes) of the string buffer. * @@ -129,7 +129,7 @@ public: } /** - * This method gets the string buffer for the instance name from the service entry. + * Gets the string buffer for the instance name from the service entry. * * @param[out] aSize Reference to a variable to return the size (number of bytes) of the string buffer. * @@ -143,7 +143,7 @@ public: } /** - * This method gets the buffer for the TXT value from the service entry. + * Gets the buffer for the TXT value from the service entry. * * @param[out] aSize Reference to a variable to return the size (number of bytes) of the buffer. * @@ -157,7 +157,7 @@ public: } /** - * This method gets the array for service subtype labels from the service entry. + * Gets the array for service subtype labels from the service entry. * * @param[out] aArrayLength Reference to a variable to return the array length. * @@ -182,7 +182,7 @@ public: }; /** - * This constructor initializes the `SrpClientBuffers` object. + * Initializes the `SrpClientBuffers` object. * * @param[in] aInstance A reference to the OpenThread instance. * @@ -190,7 +190,7 @@ public: explicit SrpClientBuffers(Instance &aInstance); /** - * This method gets the string buffer to use for SRP client host name. + * Gets the string buffer to use for SRP client host name. * * @param[out] aSize Reference to a variable to return the size (number of bytes) of the string buffer. * @@ -204,7 +204,7 @@ public: } /** - * This method gets the array of IPv6 address entries to use as SRP client host address list. + * Gets the array of IPv6 address entries to use as SRP client host address list. * * @param[out] aArrayLength Reference to a variable to return the array length (number of IPv6 address entries in * * the array). @@ -219,7 +219,7 @@ public: } /** - * This method allocates a new service entry from the pool. + * Allocates a new service entry from the pool. * * The returned service entry instance will be initialized as follows: * @@ -240,7 +240,7 @@ public: ServiceEntry *AllocateService(void); /** - * This method frees a previously allocated service entry. + * Frees a previously allocated service entry. * * The @p aService MUST be previously allocated using `AllocateService()` and not yet freed. Otherwise the behavior * of this method is undefined. @@ -251,7 +251,7 @@ public: void FreeService(ServiceEntry &aServiceEntry) { mServicePool.Free(aServiceEntry); } /** - * This method frees all previously allocated service entries. + * Frees all previously allocated service entries. * */ void FreeAllServices(void) { mServicePool.FreeAll(); } diff --git a/src/lib/hdlc/hdlc.cpp b/src/lib/hdlc/hdlc.cpp index b75b42e47..b4798fdbd 100644 --- a/src/lib/hdlc/hdlc.cpp +++ b/src/lib/hdlc/hdlc.cpp @@ -40,7 +40,7 @@ namespace ot { namespace Hdlc { /** - * This method updates an FCS. + * Updates an FCS. * * @param[in] aFcs The FCS to update. * @param[in] aByte The input byte value. diff --git a/src/lib/hdlc/hdlc.hpp b/src/lib/hdlc/hdlc.hpp index eb80f6f2c..0268f2c26 100644 --- a/src/lib/hdlc/hdlc.hpp +++ b/src/lib/hdlc/hdlc.hpp @@ -56,9 +56,9 @@ namespace ot { namespace Hdlc { /** - * This class defines a frame write pointer used by `Hdlc::Encoder` or `Hdlc::Decoder`. + * Defines a frame write pointer used by `Hdlc::Encoder` or `Hdlc::Decoder`. * - * This class defines the minimum set of APIs used by `Encoder/Decoder` for writing an encoded/decoded frame. It is + * Defines the minimum set of APIs used by `Encoder/Decoder` for writing an encoded/decoded frame. It is * simply a wrapper over a pointer into a buffer indicating where next byte should be written. Along with a write * pointer, this class stores a remaining length variable indicating number of remaining bytes that can be written into * the buffer. @@ -76,7 +76,7 @@ class FrameWritePointer { public: /** - * This method indicates whether there is buffer space available to write @p aWriteLength bytes. + * Indicates whether there is buffer space available to write @p aWriteLength bytes. * * param[in] aWriteLength Number of bytes to write. * @@ -87,7 +87,7 @@ public: bool CanWrite(uint16_t aWriteLength) const { return (mRemainingLength >= aWriteLength); } /** - * This method writes a byte into the buffer and updates the write pointer (if space is available). + * Writes a byte into the buffer and updates the write pointer (if space is available). * * @retval OT_ERROR_NONE Successfully wrote the byte and updated the pointer. * @retval OT_ERROR_NO_BUFS Insufficient buffer space to write the byte. @@ -100,7 +100,7 @@ public: } /** - * This method undoes the last @p aUndoLength writes, removing them from frame. + * Undoes the last @p aUndoLength writes, removing them from frame. * * @note Caller should ensure that @p aUndoLength is less than or equal to the number of previously written bytes * into the frame. This method does not perform any checks and its behavior is undefined if @p aUndoLength is @@ -127,7 +127,7 @@ protected: }; /** - * This class defines a template frame buffer of a given size for storing a single frame. + * Defines a template frame buffer of a given size for storing a single frame. * * The template parameter `kSize` specifies the size of the buffer. * @@ -136,7 +136,7 @@ template class FrameBuffer : public FrameWritePointer { public: /** - * This constructor initializes the `FrameBuffer` object. + * Initializes the `FrameBuffer` object. * */ FrameBuffer(void) @@ -146,7 +146,7 @@ public: } /** - * This method clears the buffer, moving the write pointer to the beginning of the buffer. + * Clears the buffer, moving the write pointer to the beginning of the buffer. * */ void Clear(void) @@ -156,7 +156,7 @@ public: } /** - * This method indicates whether the buffer is empty or contains a frame. + * Indicates whether the buffer is empty or contains a frame. * * @retval TRUE Buffer is empty * @retval FALSE Buffer contains a frame @@ -165,7 +165,7 @@ public: bool IsEmpty(void) const { return (mWritePointer == mBuffer); } /** - * This method gets the length (number of bytes) in the frame. + * Gets the length (number of bytes) in the frame. * * @returns The length (number of bytes) in the frame. * @@ -173,7 +173,7 @@ public: uint16_t GetLength(void) const { return static_cast(mWritePointer - mBuffer); } /** - * This method gets a pointer to start of the frame. + * Gets a pointer to start of the frame. * * @returns A pointer to start of the frame. * @@ -185,7 +185,7 @@ private: }; /** - * This class defines a template frame buffer of a given size for storing multiple frames. + * Defines a template frame buffer of a given size for storing multiple frames. * * The template parameter `kSize` specifies the total size of the buffer. * @@ -197,7 +197,7 @@ template class MultiFrameBuffer : public FrameWritePointer { public: /** - * This constructor initializes the `MultiFrameBuffer` object. + * Initializes the `MultiFrameBuffer` object. * */ MultiFrameBuffer(void) @@ -207,7 +207,7 @@ public: } /** - * This method clears the buffer, removing current frame and all previously saved frames. + * Clears the buffer, removing current frame and all previously saved frames. * * It moves the write pointer to the beginning of the buffer. * @@ -222,7 +222,7 @@ public: } /** - * This method indicates whether the current frame (being written) is empty or not. + * Indicates whether the current frame (being written) is empty or not. * * @retval TRUE Current frame is empty. * @retval FALSE Current frame is not empty. @@ -231,7 +231,7 @@ public: bool HasFrame(void) const { return (mWritePointer != GetFrame()); } /** - * This method sets the length (number of bytes) of the current frame being written. + * Sets the length (number of bytes) of the current frame being written. * * param[in] aLength The length of current frame. * @@ -254,7 +254,7 @@ public: } /** - * This method gets the length (number of bytes) in the current frame being written into the buffer. + * Gets the length (number of bytes) in the current frame being written into the buffer. * * @returns The length (number of bytes) in the frame. * @@ -262,7 +262,7 @@ public: uint16_t GetLength(void) const { return static_cast(mWritePointer - GetFrame()); } /** - * This method sets the length (number of bytes) of reserved buffer in front of the current frame being written. + * Sets the length (number of bytes) of reserved buffer in front of the current frame being written. * * param[in] aSkipLength The length of reserved buffer. * @@ -286,7 +286,7 @@ public: } /** - * This method gets the length (number of bytes) of reserved buffer in front of the current frame being written. + * Gets the length (number of bytes) of reserved buffer in front of the current frame being written. * * @returns The length (number of bytes) of the reserved buffer. * @@ -297,7 +297,7 @@ public: } /** - * This method gets a pointer to the start of the current frame. + * Gets a pointer to the start of the current frame. * * @returns A pointer to the start of the frame. * @@ -305,7 +305,7 @@ public: uint8_t *GetFrame(void) const { return mWriteFrameStart + kHeaderSize + GetSkipLength(); } /** - * This method gets the maximum length of the current frame. + * Gets the maximum length of the current frame. * * @returns The maximum length of the current frame. * @@ -313,7 +313,7 @@ public: uint16_t GetFrameMaxLength(void) const { return static_cast(mBuffer + kSize - GetFrame()); } /** - * This method saves the current frame and prepares the write pointer for a next frame to be written into the + * Saves the current frame and prepares the write pointer for a next frame to be written into the * buffer. * * Saved frame can be retrieved later using `GetNextSavedFrame()`. @@ -329,7 +329,7 @@ public: } /** - * This method discards the current frame and prepares the write pointer for a next frame to be written into the + * Discards the current frame and prepares the write pointer for a next frame to be written into the * buffer. * */ @@ -342,7 +342,7 @@ public: } /** - * This method indicates whether there are any saved frames in the buffer. + * Indicates whether there are any saved frames in the buffer. * * @retval TRUE There is at least one saved frame in the buffer. * @retval FALSE There is no saved frame in the buffer. @@ -351,7 +351,7 @@ public: bool HasSavedFrame(void) const { return (mWriteFrameStart != mBuffer); } /** - * This method iterates through previously saved frames in the buffer, getting a next frame in the queue. + * Iterates through previously saved frames in the buffer, getting a next frame in the queue. * * @param[in,out] aFrame On entry, should point to a previous saved frame or nullptr to get the first frame. * On exit, the pointer variable is updated to next frame or set to nullptr if there are @@ -390,7 +390,7 @@ public: } /** - * This method clears all saved frames from the buffer and adjusts all the pointers. + * Clears all saved frames from the buffer and adjusts all the pointers. * * @note This method moves the pointers into the buffer and also copies the content. Any previously retrieved * pointer to buffer (from `GetFrame()` or `GetNextSavedFrame()`) should be considered invalid after calling this @@ -456,14 +456,14 @@ private: }; /** - * This class implements the HDLC-lite encoder. + * Implements the HDLC-lite encoder. * */ class Encoder { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aWritePointer The `FrameWritePointer` used by `Encoder` to write the encoded frames. * @@ -471,7 +471,7 @@ public: explicit Encoder(FrameWritePointer &aWritePointer); /** - * This method begins an HDLC frame. + * Begins an HDLC frame. * * @retval OT_ERROR_NONE Successfully started the HDLC frame. * @retval OT_ERROR_NO_BUFS Insufficient buffer space available to start the HDLC frame. @@ -480,7 +480,7 @@ public: otError BeginFrame(void); /** - * This method encodes a single byte into current frame. + * Encodes a single byte into current frame. * * If there is no space to add the byte, the write pointer in frame buffer remains the same. * @@ -493,9 +493,9 @@ public: otError Encode(uint8_t aByte); /** - * This method encodes a given block of data into current frame. + * Encodes a given block of data into current frame. * - * This method returns success only if there is space in buffer to encode the entire block of data. If there is no + * Returns success only if there is space in buffer to encode the entire block of data. If there is no * space to encode the entire block of data, the write pointer in frame buffer remains the same. * * @param[in] aData A pointer to a buffer containing the data to encode. @@ -508,7 +508,7 @@ public: otError Encode(const uint8_t *aData, uint16_t aLength); /** - * This method ends/finalizes the HDLC frame. + * Ends/finalizes the HDLC frame. * * @retval OT_ERROR_NONE Successfully ended the HDLC frame. * @retval OT_ERROR_NO_BUFS Insufficient buffer space available to end the HDLC frame. @@ -522,14 +522,14 @@ private: }; /** - * This class implements the HDLC-lite decoder. + * Implements the HDLC-lite decoder. * */ class Decoder { public: /** - * This function pointer is called when either a complete frame has been decoded or an error occurs during + * Pointer is called when either a complete frame has been decoded or an error occurs during * decoding. * * The decoded frame (or the partially decoded frame in case of an error) is available in `aFrameWritePointer` @@ -544,7 +544,7 @@ public: typedef void (*FrameHandler)(void *aContext, otError aError); /** - * This constructor initializes the decoder. + * Initializes the decoder. * * @param[in] aFrameWritePointer The `FrameWritePointer` used by `Decoder` to write the decoded frames. * @param[in] aFrameHandler The frame handler callback function pointer. @@ -554,7 +554,7 @@ public: Decoder(FrameWritePointer &aFrameWritePointer, FrameHandler aFrameHandler, void *aContext); /** - * This method feeds a block of data into the decoder. + * Feeds a block of data into the decoder. * * If during decoding, a full HDLC frame is successfully decoded or an error occurs, the `FrameHandler` callback * is called. The decoded frame (or the partially decoded frame in case of an error) is available in @@ -568,7 +568,7 @@ public: void Decode(const uint8_t *aData, uint16_t aLength); /** - * This method resets internal states of the decoder. + * Resets internal states of the decoder. * */ void Reset(void); diff --git a/src/lib/platform/exit_code.h b/src/lib/platform/exit_code.h index ccb8f7c66..c809eb1d1 100644 --- a/src/lib/platform/exit_code.h +++ b/src/lib/platform/exit_code.h @@ -43,7 +43,7 @@ extern "C" { #endif /** - * This enumeration represents exit codes used when OpenThread exits. + * Represents exit codes used when OpenThread exits. * */ enum @@ -85,7 +85,7 @@ enum }; /** - * This function converts an exit code into a string. + * Converts an exit code into a string. * * @param[in] aExitCode An exit code. * @@ -95,7 +95,7 @@ enum const char *otExitCodeToString(uint8_t aExitCode); /** - * This macro checks for the specified condition, which is expected to commonly be true, + * Checks for the specified condition, which is expected to commonly be true, * and both records exit status and terminates the program if the condition is false. * * @param[in] aCondition The condition to verify @@ -116,7 +116,7 @@ const char *otExitCodeToString(uint8_t aExitCode); } while (false) /** - * This macro checks for the specified error code, which is expected to commonly be successful, + * Checks for the specified error code, which is expected to commonly be successful, * and both records exit status and terminates the program if the error code is unsuccessful. * * @param[in] aError An error code to be evaluated against OT_ERROR_NONE. @@ -127,7 +127,7 @@ const char *otExitCodeToString(uint8_t aExitCode); (aError == OT_ERROR_INVALID_ARGS ? OT_EXIT_INVALID_ARGUMENTS : OT_EXIT_FAILURE)) /** - * This macro unconditionally both records exit status and terminates the program. + * Unconditionally both records exit status and terminates the program. * * @param[in] aExitCode The exit code. * @@ -135,7 +135,7 @@ const char *otExitCodeToString(uint8_t aExitCode); #define DieNow(aExitCode) VerifyOrDie(false, aExitCode) /** - * This macro unconditionally both records exit status and exit message and terminates the program. + * Unconditionally both records exit status and exit message and terminates the program. * * @param[in] aMessage The exit message. * @param[in] aExitCode The exit code. diff --git a/src/lib/spinel/radio_spinel.hpp b/src/lib/spinel/radio_spinel.hpp index d14f7c0aa..11a7b9de0 100644 --- a/src/lib/spinel/radio_spinel.hpp +++ b/src/lib/spinel/radio_spinel.hpp @@ -106,7 +106,7 @@ template class RadioSpinel { public: /** - * This constructor initializes the spinel based OpenThread transceiver. + * Initializes the spinel based OpenThread transceiver. * */ RadioSpinel(void); @@ -130,7 +130,7 @@ public: void Deinit(void); /** - * This method gets the status of promiscuous mode. + * Gets the status of promiscuous mode. * * @retval true Promiscuous mode is enabled. * @retval false Promiscuous mode is disabled. @@ -139,7 +139,7 @@ public: bool IsPromiscuous(void) const { return mIsPromiscuous; } /** - * This method sets the status of promiscuous mode. + * Sets the status of promiscuous mode. * * @param[in] aEnable Whether to enable or disable promiscuous mode. * @@ -151,7 +151,7 @@ public: otError SetPromiscuous(bool aEnable); /** - * This method sets the Short Address for address filtering. + * Sets the Short Address for address filtering. * * @param[in] aShortAddress The IEEE 802.15.4 Short Address. * @@ -163,7 +163,7 @@ public: otError SetShortAddress(uint16_t aAddress); /** - * This method gets the factory-assigned IEEE EUI-64 for this transceiver. + * Gets the factory-assigned IEEE EUI-64 for this transceiver. * * @param[in] aInstance The OpenThread instance structure. * @param[out] aIeeeEui64 A pointer to the factory-assigned IEEE EUI-64. @@ -176,7 +176,7 @@ public: otError GetIeeeEui64(uint8_t *aIeeeEui64); /** - * This method sets the Extended Address for address filtering. + * Sets the Extended Address for address filtering. * * @param[in] aExtAddress A pointer to the IEEE 802.15.4 Extended Address stored in little-endian byte order. * @@ -188,7 +188,7 @@ public: otError SetExtendedAddress(const otExtAddress &aAddress); /** - * This method sets the PAN ID for address filtering. + * Sets the PAN ID for address filtering. * * @param[in] aPanId The IEEE 802.15.4 PAN ID. * @@ -200,7 +200,7 @@ public: otError SetPanId(uint16_t aPanId); /** - * This method gets the radio's transmit power in dBm. + * Gets the radio's transmit power in dBm. * * @param[out] aPower The transmit power in dBm. * @@ -212,7 +212,7 @@ public: otError GetTransmitPower(int8_t &aPower); /** - * This method sets the radio's transmit power in dBm. + * Sets the radio's transmit power in dBm. * * @param[in] aPower The transmit power in dBm. * @@ -224,7 +224,7 @@ public: otError SetTransmitPower(int8_t aPower); /** - * This method gets the radio's CCA ED threshold in dBm. + * Gets the radio's CCA ED threshold in dBm. * * @param[out] aThreshold The CCA ED threshold in dBm. * @@ -236,7 +236,7 @@ public: otError GetCcaEnergyDetectThreshold(int8_t &aThreshold); /** - * This method sets the radio's CCA ED threshold in dBm. + * Sets the radio's CCA ED threshold in dBm. * * @param[in] aThreshold The CCA ED threshold in dBm. * @@ -248,7 +248,7 @@ public: otError SetCcaEnergyDetectThreshold(int8_t aThreshold); /** - * This method gets the FEM's Rx LNA gain in dBm. + * Gets the FEM's Rx LNA gain in dBm. * * @param[out] aGain The FEM's Rx LNA gain in dBm. * @@ -260,7 +260,7 @@ public: otError GetFemLnaGain(int8_t &aGain); /** - * This method sets the FEM's Rx LNA gain in dBm. + * Sets the FEM's Rx LNA gain in dBm. * * @param[in] aGain The FEM's Rx LNA gain in dBm. * @@ -272,7 +272,7 @@ public: otError SetFemLnaGain(int8_t aGain); /** - * This method returns the radio sw version string. + * Returns the radio sw version string. * * @returns A pointer to the radio version string. * @@ -280,7 +280,7 @@ public: const char *GetVersion(void) const { return mVersion; } /** - * This method returns the radio capabilities. + * Returns the radio capabilities. * * @returns The radio capability bit vector. * @@ -288,14 +288,14 @@ public: otRadioCaps GetRadioCaps(void) const { return mRadioCaps; } /** - * This method gets the most recent RSSI measurement. + * Gets the most recent RSSI measurement. * * @returns The RSSI in dBm when it is valid. 127 when RSSI is invalid. */ int8_t GetRssi(void); /** - * This method returns the radio receive sensitivity value. + * Returns the radio receive sensitivity value. * * @returns The radio receive sensitivity value in dBm. * @@ -307,7 +307,7 @@ public: int8_t GetReceiveSensitivity(void) const { return mRxSensitivity; } /** - * This method gets current state of the radio. + * Gets current state of the radio. * * @return Current state of the radio. * @@ -315,7 +315,7 @@ public: otRadioState GetState(void) const; /** - * This method gets the current receiving channel. + * Gets the current receiving channel. * * @returns Current receiving channel. * @@ -346,7 +346,7 @@ public: bool IsCoexEnabled(void); /** - * This method retrieves the radio coexistence metrics. + * Retrieves the radio coexistence metrics. * * @param[out] aCoexMetrics A reference to the coexistence metrics structure. * @@ -358,7 +358,7 @@ public: #endif // OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE /** - * This method returns a reference to the transmit buffer. + * Returns a reference to the transmit buffer. * * The caller forms the IEEE 802.15.4 frame in this buffer then calls otPlatRadioTransmit() to request transmission. * @@ -368,7 +368,7 @@ public: otRadioFrame &GetTransmitFrame(void) { return mTxRadioFrame; } /** - * This method enables or disables source address match feature. + * Enables or disables source address match feature. * * @param[in] aEnable Enable/disable source address match feature. * @@ -380,7 +380,7 @@ public: otError EnableSrcMatch(bool aEnable); /** - * This method adds a short address to the source address match table. + * Adds a short address to the source address match table. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aShortAddress The short address to be added. @@ -393,7 +393,7 @@ public: otError AddSrcMatchShortEntry(uint16_t aShortAddress); /** - * This method removes a short address from the source address match table. + * Removes a short address from the source address match table. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aShortAddress The short address to be removed. @@ -456,7 +456,7 @@ public: otError ClearSrcMatchExtEntries(void); /** - * This method begins the energy scan sequence on the radio. + * Begins the energy scan sequence on the radio. * * @param[in] aScanChannel The channel to perform the energy scan on. * @param[in] aScanDuration The duration, in milliseconds, for the channel to be scanned. @@ -469,7 +469,7 @@ public: otError EnergyScan(uint8_t aScanChannel, uint16_t aScanDuration); /** - * This method switches the radio state from Receive to Transmit. + * Switches the radio state from Receive to Transmit. * * @param[in] aFrame A reference to the transmitted frame. * @@ -481,7 +481,7 @@ public: otError Transmit(otRadioFrame &aFrame); /** - * This method switches the radio state from Sleep to Receive. + * Switches the radio state from Sleep to Receive. * * @param[in] aChannel The channel to use for receiving. * @@ -492,7 +492,7 @@ public: otError Receive(uint8_t aChannel); /** - * This method switches the radio state from Receive to Sleep. + * Switches the radio state from Receive to Sleep. * * @retval OT_ERROR_NONE Successfully transitioned to Sleep. * @retval OT_ERROR_BUSY The radio was transmitting @@ -523,7 +523,7 @@ public: otError Disable(void); /** - * This method checks whether radio is enabled or not. + * Checks whether radio is enabled or not. * * @returns TRUE if the radio is enabled, FALSE otherwise. * @@ -531,7 +531,7 @@ public: bool IsEnabled(void) const { return mState != kStateDisabled; } /** - * This method indicates whether there is a pending transmission. + * Indicates whether there is a pending transmission. * * @retval TRUE There is a pending transmission. * @retval FALSE There is no pending transmission. @@ -540,7 +540,7 @@ public: bool IsTransmitting(void) const { return mState == kStateTransmitting; } /** - * This method indicates whether a transmit has just finished. + * Indicates whether a transmit has just finished. * * @retval TRUE The transmission is done. * @retval FALSE The transmission is not done. @@ -549,7 +549,7 @@ public: bool IsTransmitDone(void) const { return mState == kStateTransmitDone; } /** - * This method returns the timeout timepoint for the pending transmission. + * Returns the timeout timepoint for the pending transmission. * * @returns The timeout timepoint for the pending transmission. * @@ -557,7 +557,7 @@ public: uint64_t GetTxRadioEndUs(void) const { return mTxRadioEndUs; } /** - * This method processes any pending the I/O data. + * Processes any pending the I/O data. * * @param[in] aContext The process context. * @@ -565,7 +565,7 @@ public: void Process(const ProcessContextType &aContext); /** - * This method returns the underlying spinel interface. + * Returns the underlying spinel interface. * * @returns The underlying spinel interface. * @@ -574,7 +574,7 @@ public: #if OPENTHREAD_CONFIG_DIAG_ENABLE /** - * This method enables/disables the factory diagnostics mode. + * Enables/disables the factory diagnostics mode. * * @param[in] aMode TRUE to enable diagnostics mode, FALSE otherwise. * @@ -582,7 +582,7 @@ public: void SetDiagEnabled(bool aMode) { mDiagMode = aMode; } /** - * This method indicates whether or not factory diagnostics mode is enabled. + * Indicates whether or not factory diagnostics mode is enabled. * * @returns TRUE if factory diagnostics mode is enabled, FALSE otherwise. * @@ -590,7 +590,7 @@ public: bool IsDiagEnabled(void) const { return mDiagMode; } /** - * This method processes platform diagnostics commands. + * Processes platform diagnostics commands. * * @param[in] aString A null-terminated input string. * @param[out] aOutput The diagnostics execution result. @@ -605,7 +605,7 @@ public: #endif /** - * This method returns the radio channel mask. + * Returns the radio channel mask. * * @param[in] aPreferred TRUE to get preferred channel mask, FALSE to get supported channel mask. * @@ -617,7 +617,7 @@ public: uint32_t GetRadioChannelMask(bool aPreferred); /** - * This method processes a received Spinel frame. + * Processes a received Spinel frame. * * The newly received frame is available in `RxFrameBuffer` from `SpinelInterface::GetRxFrameBuffer()`. * @@ -625,7 +625,7 @@ public: void HandleReceivedFrame(void); /** - * This method sets MAC key and key index to RCP. + * Sets MAC key and key index to RCP. * * @param[in] aKeyIdMode The key ID mode. * @param[in] aKeyId The key index. @@ -646,7 +646,7 @@ public: const otMacKeyMaterial *aNextKey); /** - * This method sets the current MAC Frame Counter value. + * Sets the current MAC Frame Counter value. * * @param[in] aMacFrameCounter The MAC Frame Counter value. * @param[in] aSetIfLarger If `true`, set only if the new value is larger than the current value. @@ -656,7 +656,7 @@ public: otError SetMacFrameCounter(uint32_t aMacFrameCounter, bool aSetIfLarger); /** - * This method sets the radio region code. + * Sets the radio region code. * * @param[in] aRegionCode The radio region code. * @@ -667,7 +667,7 @@ public: otError SetRadioRegion(uint16_t aRegionCode); /** - * This method gets the radio region code. + * Gets the radio region code. * * @param[out] aRegionCode The radio region code. * @@ -727,7 +727,7 @@ public: #endif /** - * This method checks whether the spinel interface is radio-only. + * Checks whether the spinel interface is radio-only. * * @param[out] aSupportsRcpApiVersion A reference to a boolean variable to update whether the list of * spinel capabilities includes `SPINEL_CAP_RCP_API_VERSION`. @@ -741,7 +741,7 @@ public: bool IsRcp(bool &aSupportsRcpApiVersion, bool &aSupportsRcpMinHostApiVersion); /** - * This method checks whether there is pending frame in the buffer. + * Checks whether there is pending frame in the buffer. * * @returns Whether there is pending frame in the buffer. * @@ -749,7 +749,7 @@ public: bool HasPendingFrame(void) const { return mRxFrameBuffer.HasSavedFrame(); } /** - * This method gets dataset from NCP radio and saves it. + * Gets dataset from NCP radio and saves it. * * @retval OT_ERROR_NONE Successfully restore dataset. * @retval OT_ERROR_BUSY Failed due to another operation is on going. @@ -760,7 +760,7 @@ public: otError RestoreDatasetFromNcp(void); /** - * This method returns the next timepoint to recalculate RCP time offset. + * Returns the next timepoint to recalculate RCP time offset. * * @returns The timepoint to start the recalculation of RCP time offset. * @@ -768,7 +768,7 @@ public: uint64_t GetNextRadioTimeRecalcStart(void) const { return mRadioTimeRecalcStart; } /** - * This method gets the current estimated time on RCP. + * Gets the current estimated time on RCP. * * @returns The current estimated RCP time in microseconds. * @@ -776,7 +776,7 @@ public: uint64_t GetNow(void); /** - * This method returns the bus speed between the host and the radio. + * Returns the bus speed between the host and the radio. * * @returns bus speed in bits/second. * @@ -784,7 +784,7 @@ public: uint32_t GetBusSpeed(void) const; /** - * This method sets the max transmit power. + * Sets the max transmit power. * * @param[in] aChannel The radio channel. * @param[in] aPower The max transmit power in dBm. @@ -796,7 +796,7 @@ public: otError SetChannelMaxTransmitPower(uint8_t aChannel, int8_t aPower); /** - * This method tries to retrieve a spinel property from OpenThread transceiver. + * Tries to retrieve a spinel property from OpenThread transceiver. * * @param[in] aKey Spinel property key. * @param[in] aFormat Spinel formatter to unpack property value. @@ -810,7 +810,7 @@ public: otError Get(spinel_prop_key_t aKey, const char *aFormat, ...); /** - * This method tries to retrieve a spinel property from OpenThread transceiver with parameter appended. + * Tries to retrieve a spinel property from OpenThread transceiver with parameter appended. * * @param[in] aKey Spinel property key. * @param[in] aParam Parameter appended to spinel command. @@ -830,7 +830,7 @@ public: ...); /** - * This method tries to update a spinel property of OpenThread transceiver. + * Tries to update a spinel property of OpenThread transceiver. * * @param[in] aKey Spinel property key. * @param[in] aFormat Spinel formatter to pack property value. @@ -844,7 +844,7 @@ public: otError Set(spinel_prop_key_t aKey, const char *aFormat, ...); /** - * This method tries to insert a item into a spinel list property of OpenThread transceiver. + * Tries to insert a item into a spinel list property of OpenThread transceiver. * * @param[in] aKey Spinel property key. * @param[in] aFormat Spinel formatter to pack the item. @@ -858,7 +858,7 @@ public: otError Insert(spinel_prop_key_t aKey, const char *aFormat, ...); /** - * This method tries to remove a item from a spinel list property of OpenThread transceiver. + * Tries to remove a item from a spinel list property of OpenThread transceiver. * * @param[in] aKey Spinel property key. * @param[in] aFormat Spinel formatter to pack the item. @@ -872,7 +872,7 @@ public: otError Remove(spinel_prop_key_t aKey, const char *aFormat, ...); /** - * This method tries to reset the co-processor. + * Tries to reset the co-processor. * * @prarm[in] aResetType The reset type, SPINEL_RESET_PLATFORM or SPINEL_RESET_STACK. * @@ -883,7 +883,7 @@ public: otError SendReset(uint8_t aResetType); /** - * This method returns the radio Spinel metrics. + * Returns the radio Spinel metrics. * * @returns The radio Spinel metrics. * @@ -968,13 +968,13 @@ private: otError CheckRcpApiVersion(bool aSupportsRcpApiVersion, bool aSupportsMinHostRcpApiVersion); /** - * This method triggers a state transfer of the state machine. + * Triggers a state transfer of the state machine. * */ void ProcessRadioStateMachine(void); /** - * This method processes the frame queue. + * Processes the frame queue. * */ void ProcessFrameQueue(void); @@ -1009,7 +1009,7 @@ private: otError ThreadDatasetHandler(const uint8_t *aBuffer, uint16_t aLength); /** - * This method returns if the property changed event is safe to be handled now. + * Returns if the property changed event is safe to be handled now. * * If a property handler will go up to core stack, it may cause reentrant issue of `Hdlc::Decode()` and * `WaitResponse()`. diff --git a/src/lib/spinel/radio_spinel_metrics.h b/src/lib/spinel/radio_spinel_metrics.h index 91d4d76da..e2500879e 100644 --- a/src/lib/spinel/radio_spinel_metrics.h +++ b/src/lib/spinel/radio_spinel_metrics.h @@ -40,7 +40,7 @@ extern "C" { #endif /** - * This structure represents the radio spinel metrics. + * Represents the radio spinel metrics. * */ typedef struct otRadioSpinelMetrics diff --git a/src/lib/spinel/spinel.h b/src/lib/spinel/spinel.h index 1f4476a9f..c251eb1db 100644 --- a/src/lib/spinel/spinel.h +++ b/src/lib/spinel/spinel.h @@ -5031,9 +5031,9 @@ SPINEL_API_EXTERN spinel_ssize_t spinel_datatype_unpack(const uint8_t *data_in, const char *pack_format, ...); /** - * This function parses spinel data similar to sscanf(). + * Parses spinel data similar to sscanf(). * - * This function actually calls spinel_datatype_vunpack_in_place() to parse data. + * Actually calls spinel_datatype_vunpack_in_place() to parse data. * * @param[in] data_in A pointer to the data to parse. * @param[in] data_len The length of @p data_in in bytes. @@ -5063,7 +5063,7 @@ SPINEL_API_EXTERN spinel_ssize_t spinel_datatype_vunpack(const uint8_t *data_in, const char *pack_format, va_list args); /** - * This function parses spinel data similar to vsscanf(). + * Parses spinel data similar to vsscanf(). * * @param[in] data_in A pointer to the data to parse. * @param[in] data_len The length of @p data_in in bytes. diff --git a/src/lib/spinel/spinel_buffer.hpp b/src/lib/spinel/spinel_buffer.hpp index fecdb645c..965c87e3a 100644 --- a/src/lib/spinel/spinel_buffer.hpp +++ b/src/lib/spinel/spinel_buffer.hpp @@ -41,7 +41,7 @@ namespace ot { namespace Spinel { /** - * This class implements a buffer/queue for storing Ncp frames. + * Implements a buffer/queue for storing Ncp frames. * * A frame can consist of a sequence of data bytes and/or the content of an `otMessage` or a combination of the two. * `Buffer` implements priority FIFO logic for storing and reading frames. Two priority levels of high and low @@ -117,7 +117,7 @@ public: typedef void (*BufferCallback)(void *aContext, FrameTag aTag, Priority aPriority, Buffer *aBuffer); /** - * This constructor initializes an NCP frame buffer. + * Initializes an NCP frame buffer. * * @param[in] aBuffer A pointer to a buffer which will be used by NCP frame buffer. * @param[in] aBufferLength The buffer size (in bytes). @@ -126,13 +126,13 @@ public: Buffer(uint8_t *aBuffer, uint16_t aBufferLength); /** - * This method clears the NCP frame buffer. All the frames are cleared/removed. + * Clears the NCP frame buffer. All the frames are cleared/removed. * */ void Clear(void); /** - * This method sets the FrameAdded callback and its context. + * Sets the FrameAdded callback and its context. * * Subsequent calls to this method will overwrite the previous callback and its context. * @@ -143,7 +143,7 @@ public: void SetFrameAddedCallback(BufferCallback aFrameAddedCallback, void *aFrameAddedContext); /** - * This method sets the FrameRemoved callback and its context. + * Sets the FrameRemoved callback and its context. * * Subsequent calls to this method will overwrite the previous callback and its context. * @@ -154,7 +154,7 @@ public: void SetFrameRemovedCallback(BufferCallback aFrameRemovedCallback, void *aFrameRemovedContext); /** - * This method begins a new input frame (InFrame) to be added/written to the frame buffer. + * Begins a new input frame (InFrame) to be added/written to the frame buffer. * If there is a previous frame being written (for which `InFrameEnd()` has not yet been called), calling * `InFrameBegin()` will discard and clear the previous unfinished frame. @@ -165,7 +165,7 @@ public: void InFrameBegin(Priority aPriority); /** - * This method adds a single byte to current input frame. + * Adds a single byte to current input frame. * * Before using this method `InFrameBegin()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -183,7 +183,7 @@ public: otError InFrameFeedByte(uint8_t aByte); /** - * This method adds data to the current input frame. + * Adds data to the current input frame. * * Before using this method `InFrameBegin()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -203,7 +203,7 @@ public: #if OPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE /** - * This method adds a message to the current input frame. + * Adds a message to the current input frame. * * Before using this method `InFrameBegin()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -229,7 +229,7 @@ public: #endif /** - * This method gets the current write position in the input frame. + * Gets the current write position in the input frame. * * The write position is returned in @p aPosition. The saved position can later be used to overwrite the frame * content (using `InFrameOverwrite()`) or discard a portion of written frame and move the write pointer back to @@ -244,13 +244,13 @@ public: otError InFrameGetPosition(WritePosition &aPosition); /** - * This method overwrites the previously written content in the current input frame at a given write position. + * Overwrites the previously written content in the current input frame at a given write position. * * The write position @p aPostion must belong to the same input frame saved earlier with `InFrameGetPosition()`. - * This method does not allow writing beyond the current end of the input frame (i.e., it can only write over + * Does not allow writing beyond the current end of the input frame (i.e., it can only write over * previously added content). If writing @p aDataBufferLength bytes from write position @p aPosition goes beyond * the end, this method does not change the input frame and returns error status `OT_ERROR_INVALID_ARGS`. - * This method cannot be used if the input frame has an added `otMessage` (i.e., a previous call to + * Cannot be used if the input frame has an added `otMessage` (i.e., a previous call to * `InFrameFeedMessage()`). * * @param[in] aPosition A reference to the write position. @@ -267,11 +267,11 @@ public: otError InFrameOverwrite(const WritePosition &aPosition, const uint8_t *aDataBuffer, uint16_t aDataBufferLength); /** - * This method resets the write position of input frame back to a previously saved position. Any previously + * Resets the write position of input frame back to a previously saved position. Any previously * added content after the write position is discarded. * * The write position @p aPosition must belong to the same input frame saved earlier with `InFrameGetPosition()`. - * This method cannot be used if the input frame has an added `otMessage` (i.e., a previous call to + * Cannot be used if the input frame has an added `otMessage` (i.e., a previous call to * `InFrameFeedMessage()`). * * @param[in] aPosition A reference to write position @@ -285,10 +285,10 @@ public: otError InFrameReset(const WritePosition &aPosition); /** - * This method gets the distance (number of bytes) from a given saved position to current end of frame. + * Gets the distance (number of bytes) from a given saved position to current end of frame. * * The write position @p aPosition must belong to the same input frame saved earlier with `InFrameGetPosition()`. - * This method cannot be used if the input frame has an added `otMessage` (i.e., a previous call to + * Cannot be used if the input frame has an added `otMessage` (i.e., a previous call to * `InFrameFeedMessage()`). In case of invalid argument, this method returns zero. * * @param[in] aPosition A reference to write position @@ -300,7 +300,7 @@ public: uint16_t InFrameGetDistance(const WritePosition &aPosition) const; /** - * This method finalizes/ends the current input frame being written to the buffer. + * Finalizes/ends the current input frame being written to the buffer. * * Before using this method `InFrameBegin()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -316,7 +316,7 @@ public: otError InFrameEnd(void); /** - * This method returns the tag assigned to last successfully written/added frame to NcpBuffer (i.e., last input + * Returns the tag assigned to last successfully written/added frame to NcpBuffer (i.e., last input * frame for which `InFrameEnd()` was called and returned success status). The tag is a unique value (within * currently queued frames) associated with a frame in the `Buffer`. The tag can be used to identify the * same frame when it is read and removed from the NcpBuffer. Tags can be compared using operator `==`. @@ -326,7 +326,7 @@ public: FrameTag InFrameGetLastTag(void) const; /** - * This method checks if the buffer is empty. A non-empty buffer contains at least one full frame for reading. + * Checks if the buffer is empty. A non-empty buffer contains at least one full frame for reading. * * @retval TRUE Buffer is not empty and contains at least one full frame for reading. * @retval FALSE Buffer is empty and contains no frame for reading. @@ -335,7 +335,7 @@ public: bool IsEmpty(void) const; /** - * This method begins/prepares an output frame to be read from the frame buffer if there is no current active output + * Begins/prepares an output frame to be read from the frame buffer if there is no current active output * frame, or resets the read offset if there is a current active output frame. * * The NCP buffer maintains a read offset for the current frame being read. Before reading any bytes from the frame @@ -353,7 +353,7 @@ public: otError OutFrameBegin(void); /** - * This method checks if the current output frame (being read) has ended. + * Checks if the current output frame (being read) has ended. * * The NCP buffer maintains a read offset for the current output frame being read. This method returns `true` if * the read offset has reached the end of the frame and there are no more bytes available to read, or if there is @@ -367,7 +367,7 @@ public: bool OutFrameHasEnded(void); /** - * This method reads and returns the next byte from the current output frame. + * Reads and returns the next byte from the current output frame. * * The NCP buffer maintains a read offset for the current output frame being read. This method reads and returns * the next byte from the current frame and moves the read offset forward. If read offset is already at the end @@ -380,7 +380,7 @@ public: uint8_t OutFrameReadByte(void); /** - * This method reads and copies bytes from the current output frame into a given buffer. + * Reads and copies bytes from the current output frame into a given buffer. * * The NCP buffer maintains a read offset for the current output frame being read. This method attempts to read * the given number of bytes (@p aReadLength) from the current frame and copies the bytes into the given @@ -397,7 +397,7 @@ public: uint16_t OutFrameRead(uint16_t aReadLength, uint8_t *aDataBuffer); /** - * This method removes the current or front output frame from the buffer. + * Removes the current or front output frame from the buffer. * * If there is an active output from being read (an output frame was prepared earlier with a successful call to * `OutFrameBegin()`), this method removes the current active output frame. If there is no current active frame, @@ -415,7 +415,7 @@ public: otError OutFrameRemove(void); /** - * This method returns the number of bytes (length) of current or front frame in the NCP frame buffer. + * Returns the number of bytes (length) of current or front frame in the NCP frame buffer. * * If there is an active output from being read (an output frame was prepared earlier with successful call to * `OutFrameBegin()`), this method returns the length of the current output frame. If there is no current active @@ -429,7 +429,7 @@ public: uint16_t OutFrameGetLength(void); /** - * This method returns the tag value associated to current or front frame in the NCP frame buffer. + * Returns the tag value associated to current or front frame in the NCP frame buffer. * * If there is an active output from being read (an output frame was prepared earlier with successful call to * `OutFrameBegin()`), this method returns the tag associated with current output frame. If there is no current diff --git a/src/lib/spinel/spinel_decoder.hpp b/src/lib/spinel/spinel_decoder.hpp index bdd386198..96aea6b5c 100644 --- a/src/lib/spinel/spinel_decoder.hpp +++ b/src/lib/spinel/spinel_decoder.hpp @@ -44,7 +44,7 @@ namespace ot { namespace Spinel { /** - * This class defines a spinel decoder. + * Defines a spinel decoder. * */ class Decoder @@ -56,13 +56,13 @@ public: }; /** - * This constructor initializes a `Decoder` object. + * Initializes a `Decoder` object. * */ Decoder(void); /** - * This method initializes the decoder to start decoding a new frame. + * Initializes the decoder to start decoding a new frame. * * It sets the read position to the start of the frame and also erases/voids any saved positions (see * `SavePosition()` and `ResetToSaved()` methods). @@ -74,7 +74,7 @@ public: void Init(const uint8_t *aFrame, uint16_t aLength); /** - * This method returns the pointer to the start of the frame. + * Returns the pointer to the start of the frame. * * @returns A pointer to buffer containing current frame being decoded. * @@ -82,7 +82,7 @@ public: const uint8_t *GetFrame(void) const { return mFrame; } /** - * This method returns the total length of current frame being decoded. + * Returns the total length of current frame being decoded. * * @returns The length of current frame being decoded. * @@ -90,7 +90,7 @@ public: uint16_t GetLength(void) const { return mLength; } /** - * This method returns the number of bytes that are already read/decoded from the frame. + * Returns the number of bytes that are already read/decoded from the frame. * * @returns The number of bytes already read from frame. * @@ -98,7 +98,7 @@ public: uint16_t GetReadLength(void) const { return mIndex; } /** - * This method returns the number of remaining (not yet read/decoded) bytes in the frame. + * Returns the number of remaining (not yet read/decoded) bytes in the frame. * * @returns The number of remaining unread bytes in the frame. * @@ -106,7 +106,7 @@ public: uint16_t GetRemainingLength(void) const { return mLength - mIndex; } /** - * This method indicates whether or not all the bytes in the frame are read. + * Indicates whether or not all the bytes in the frame are read. * * @returns TRUE if all the bytes in the buffer are read, FALSE otherwise. * @@ -114,14 +114,14 @@ public: bool IsAllRead(void) const { return (mIndex == mLength); } /** - * This method resets the read position to beginning of frame. It will also void/erase any previously saved + * Resets the read position to beginning of frame. It will also void/erase any previously saved * position using `SavePosition()` method. * */ void Reset(void); /** - * This method decodes and reads a boolean value form the frame. + * Decodes and reads a boolean value form the frame. * * On success, the read position gets updated. * @@ -134,7 +134,7 @@ public: otError ReadBool(bool &aBool); /** - * This method decodes and reads an `int8_t` value form the frame. + * Decodes and reads an `int8_t` value form the frame. * * On success, the read position get updated. * @@ -147,7 +147,7 @@ public: otError ReadInt8(int8_t &aInt8); /** - * This method decodes and reads an `uint8_t` value form the frame. + * Decodes and reads an `uint8_t` value form the frame. * * On success, the read position gets updated. * @@ -160,7 +160,7 @@ public: otError ReadUint8(uint8_t &aUint8); /** - * This method decodes and reads an `int16_t` value form the frame. + * Decodes and reads an `int16_t` value form the frame. * * On success, the read position gets updated. * @@ -173,7 +173,7 @@ public: otError ReadInt16(int16_t &aInt16); /** - * This method decodes and reads an `uint16_t` value form the frame. + * Decodes and reads an `uint16_t` value form the frame. * * On success, the read position gets updated. * @@ -186,7 +186,7 @@ public: otError ReadUint16(uint16_t &aUint16); /** - * This method decodes and reads an `int32_t` value form the frame. + * Decodes and reads an `int32_t` value form the frame. * * On success, the read position gets updated. * @@ -199,7 +199,7 @@ public: otError ReadInt32(int32_t &aInt32); /** - * This method decodes and reads an `uint32_t` value form the frame. + * Decodes and reads an `uint32_t` value form the frame. * * On success, the read position gets updated. * @@ -212,7 +212,7 @@ public: otError ReadUint32(uint32_t &aUint32); /** - * This method decodes and reads an `int64_t` value form the frame. + * Decodes and reads an `int64_t` value form the frame. * * On success, the read position gets updated. * @@ -225,7 +225,7 @@ public: otError ReadInt64(int64_t &aInt64); /** - * This method decodes and reads an `uint64_t` value form the frame. + * Decodes and reads an `uint64_t` value form the frame. * * On success, the read position gets updated. * @@ -238,7 +238,7 @@ public: otError ReadUint64(uint64_t &aUint64); /** - * This method decodes (using spinel packed integer format) and reads an unsigned integer value form the frame. + * Decodes (using spinel packed integer format) and reads an unsigned integer value form the frame. * * On success, the read position gets updated. * @@ -251,7 +251,7 @@ public: otError ReadUintPacked(unsigned int &aUint); /** - * This method decodes and reads an IPv6 address form the frame. + * Decodes and reads an IPv6 address form the frame. * * On success, the read position gets updated. * @@ -268,7 +268,7 @@ public: } /** - * This method decodes and reads an IPv6 address form the frame. + * Decodes and reads an IPv6 address form the frame. * * On success, the read position gets updated. * @@ -285,7 +285,7 @@ public: } /** - * This method decodes and reads an IPv6 address form the frame. + * Decodes and reads an IPv6 address form the frame. * * On success, the read position gets updated. * @@ -302,7 +302,7 @@ public: } /** - * This method decodes and reads an IPv6 address form the frame. + * Decodes and reads an IPv6 address form the frame. * * On success, the read position gets updated and the IP address is copied into the given output variable. * @@ -316,7 +316,7 @@ public: otError ReadIp6Address(spinel_ipv6addr_t &aIp6Addr); /** - * This method decodes and reads an IPv6 address form the frame. + * Decodes and reads an IPv6 address form the frame. * * On success, the read position gets updated and the IP address is copied into the given output variable. * @@ -330,7 +330,7 @@ public: otError ReadIp6Address(otIp6Address &aIp6Addr); /** - * This method decodes and reads an EUI64 value form the frame. + * Decodes and reads an EUI64 value form the frame. * * On success, the read position gets updated. * @@ -347,7 +347,7 @@ public: } /** - * This method decodes and reads an EUI64 value form the frame. + * Decodes and reads an EUI64 value form the frame. * * On success, the read position gets updated. * @@ -364,7 +364,7 @@ public: } /** - * This method decodes and reads an EUI64 value form the frame. + * Decodes and reads an EUI64 value form the frame. * * On success, the read position gets updated. * @@ -378,7 +378,7 @@ public: otError ReadEui64(const uint8_t *&aEui64BufPtr) { return ReadItem(&aEui64BufPtr, sizeof(spinel_eui64_t)); } /** - * This method decodes and reads an EUI64 value form the frame. + * Decodes and reads an EUI64 value form the frame. * * On success, the read position gets updated and the EUI64 value is copied into the given output variable. * @@ -392,7 +392,7 @@ public: otError ReadEui64(spinel_eui64_t &aEui64); /** - * This method decodes and reads an EUI64 value form the frame. + * Decodes and reads an EUI64 value form the frame. * * On success, the read position gets updated and the EUI64 value is copied into the given output variable. * @@ -406,7 +406,7 @@ public: otError ReadEui64(otExtAddress &aEui64); /** - * This method decodes and reads an EUI48 value form the frame. + * Decodes and reads an EUI48 value form the frame. * * On success, the read position gets updated. * @@ -423,7 +423,7 @@ public: } /** - * This method decodes and reads an EUI48 value form the frame. + * Decodes and reads an EUI48 value form the frame. * * On success, the read position gets updated. * @@ -437,7 +437,7 @@ public: otError ReadEui48(const uint8_t *&aEui48BufPtr) { return ReadItem(&aEui48BufPtr, sizeof(spinel_eui48_t)); } /** - * This method decodes and reads an EUI48 value form the frame. + * Decodes and reads an EUI48 value form the frame. * * On success, the read position gets updated and the EUI48 value is copied into the given output variable. * @@ -451,7 +451,7 @@ public: otError ReadEui48(spinel_eui48_t &aEui48); /** - * This method decodes and reads a UTF8 string form the frame. + * Decodes and reads a UTF8 string form the frame. * * On success, the read position gets updated. * @@ -465,7 +465,7 @@ public: otError ReadUtf8(const char *&aUtf8); /** - * This method decodes and reads a data blob (sequence of bytes) form the frame. + * Decodes and reads a data blob (sequence of bytes) form the frame. * * On success, the read position gets updated. * @@ -480,7 +480,7 @@ public: otError ReadData(const uint8_t *&aData, uint16_t &aDataLen); /** - * This method decodes and reads a data blob (sequence of bytes) with data length. + * Decodes and reads a data blob (sequence of bytes) with data length. * * The data length is assumed to be prepended before the data content (encoded as a `uint16_t`). The size of the * length field should not be included in the length value. This method corresponds to `SPINEL_DATATYPE_DATA_WLEN` @@ -497,7 +497,7 @@ public: otError ReadDataWithLen(const uint8_t *&aData, uint16_t &aDataLen); /** - * This method opens a struct in the frame. + * Opens a struct in the frame. * * After a successful call to this method, all the subsequent `Read{SomeType}()` methods decode and read the * field/value from the current open struct until the struct is closed using `CloseStruct()` method. Structures can @@ -511,7 +511,7 @@ public: otError OpenStruct(void); /** - * This method closes the most recently opened struct (using `OpenStruct()`) in the frame. + * Closes the most recently opened struct (using `OpenStruct()`) in the frame. * * On success, the read position is moved to end of the struct skipping any unread bytes within the struct. * @@ -522,7 +522,7 @@ public: otError CloseStruct(void); /** - * This method returns the number of remaining/unread bytes in the current inner-most open structure. + * Returns the number of remaining/unread bytes in the current inner-most open structure. * * If there is no currently open structure the number of remaining bytes in whole frame is returned instead. * @@ -532,7 +532,7 @@ public: uint16_t GetRemainingLengthInStruct(void) const { return mEnd - mIndex; } /** - * This method indicates whether or not all the bytes in inner-most open structure are read. + * Indicates whether or not all the bytes in inner-most open structure are read. * * If there is no currently open structure, the whole frame is considered instead. * @@ -542,7 +542,7 @@ public: bool IsAllReadInStruct(void) const { return (mIndex == mEnd); } /** - * This method saves the current read position in the frame. + * Saves the current read position in the frame. * * A subsequent call to `SavePosition()` will overwrite the previously saved position. The saved position can be * used to move the read position back (using `ResetToSaved()`) and re-read the same content. @@ -555,7 +555,7 @@ public: void SavePosition(void); /** - * This method resets/moves the read position to a previously saved position. + * Resets/moves the read position to a previously saved position. * * The saved position remembers its enclosing structure. When `ResetToSaved()` is called, the current open * structure will be the same as when position was saved. diff --git a/src/lib/spinel/spinel_encoder.hpp b/src/lib/spinel/spinel_encoder.hpp index 214e8136d..6b9ea983d 100644 --- a/src/lib/spinel/spinel_encoder.hpp +++ b/src/lib/spinel/spinel_encoder.hpp @@ -46,14 +46,14 @@ namespace ot { namespace Spinel { /** - * This class defines a spinel encoder. + * Defines a spinel encoder. * */ class Encoder { public: /** - * This constructor initializes a `Encoder` object. + * Initializes a `Encoder` object. * * @param[in] aNcpBuffer A reference to a `Spinel::Buffer` where the frames are written. * @@ -66,7 +66,7 @@ public: } /** - * This method begins a new frame to be added/written to the frame buffer. + * Begins a new frame to be added/written to the frame buffer. * * If there is a previous frame being written (for which `EndFrame()` has not yet been called), calling * `BeginFrame()` will discard and clear the previous unfinished frame. @@ -80,7 +80,7 @@ public: otError BeginFrame(Spinel::Buffer::Priority aPriority); /** - * This method begins a new spinel command frame to be added/written to the frame buffer. + * Begins a new spinel command frame to be added/written to the frame buffer. * * If there is a previous frame being written (for which `EndFrame()` has not yet been called), calling * `BeginFrame()` will discard and clear the previous unfinished frame. @@ -98,7 +98,7 @@ public: otError BeginFrame(uint8_t aHeader, unsigned int aCommand); /** - * This method begins a new spinel property update command frame to be added/written to the frame buffer. + * Begins a new spinel property update command frame to be added/written to the frame buffer. * * If there is a previous frame being written (for which `EndFrame()` has not yet been called), calling * `BeginFrame()` will discard and clear the previous unfinished frame. @@ -106,7 +106,7 @@ public: * The spinel transaction ID (TID) in the given spinel header is used to determine the priority level of the new * frame. Non-zero TID value indicates that the frame is a response and therefore it uses higher priority level. * - * This method saves the write position before the property key (see also `SavePosition()`) so that if fetching the + * Saves the write position before the property key (see also `SavePosition()`) so that if fetching the * property fails and the property key should be switched to `LAST_STATUS` with an error status, the saved * position can be used to update the property key in the frame (see also `OverwriteWithLastStatusError()`) * @@ -121,12 +121,12 @@ public: otError BeginFrame(uint8_t aHeader, unsigned int aCommand, spinel_prop_key_t aKey); /** - * This method overwrites the property key with `LAST_STATUS` in a property update command frame. + * Overwrites the property key with `LAST_STATUS` in a property update command frame. * - * This method should be only used after a successful `BeginFrame(aHeader, aCommand, aPropertyKey)`, otherwise, its + * Should be only used after a successful `BeginFrame(aHeader, aCommand, aPropertyKey)`, otherwise, its * behavior is undefined. * - * This method moves the write position back to saved position by `BeginFrame()` and replaces the property key + * Moves the write position back to saved position by `BeginFrame()` and replaces the property key * `SPINEL_PROP_LAST_STATUS` and writes the given spinel status error. * * @param[in] aStatus Spinel error status @@ -138,7 +138,7 @@ public: otError OverwriteWithLastStatusError(spinel_status_t aStatus); /** - * This method finalizes/ends the current frame being written to the buffer. + * Finalizes/ends the current frame being written to the buffer. * * Before using this method `BeginFrame()` must be called to start and prepare a new frame. Otherwise, this method * does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -146,7 +146,7 @@ public: * If no buffer space is available, this method will discard and clear the frame and return error status * `OT_ERROR_NO_BUFS`. * - * This method ensures to close any open structure (previously opened using `OpenStruct()` but not closed using + * Ensures to close any open structure (previously opened using `OpenStruct()` but not closed using * `CloseStruct()`). * * @retval OT_ERROR_NONE Successfully ended the input frame. @@ -157,7 +157,7 @@ public: otError EndFrame(void); /** - * This method encodes and writes a boolean value to current input frame. + * Encodes and writes a boolean value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -175,7 +175,7 @@ public: otError WriteBool(bool aBool) { return mNcpBuffer.InFrameFeedByte(aBool ? 0x01 : 0x00); } /** - * This method encodes and writes a `uint8_t` value to current input frame. + * Encodes and writes a `uint8_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -193,7 +193,7 @@ public: otError WriteUint8(uint8_t aUint8) { return mNcpBuffer.InFrameFeedByte(aUint8); } /** - * This method encodes and writes an `int8_t` value to current input frame. + * Encodes and writes an `int8_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -211,7 +211,7 @@ public: otError WriteInt8(int8_t aInt8) { return WriteUint8(static_cast(aInt8)); } /** - * This method encodes and writes a `uint16_t` value to current input frame. + * Encodes and writes a `uint16_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -229,7 +229,7 @@ public: otError WriteUint16(uint16_t aUint16); /** - * This method encodes and writes an `int16_t` value to current input frame. + * Encodes and writes an `int16_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -247,7 +247,7 @@ public: otError WriteInt16(int16_t aInt16) { return WriteUint16(static_cast(aInt16)); } /** - * This method encodes and writes a `uint32_t` value to current input frame. + * Encodes and writes a `uint32_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -265,7 +265,7 @@ public: otError WriteUint32(uint32_t aUint32); /** - * This method encodes and writes an `int32_t` value to current input frame. + * Encodes and writes an `int32_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -283,7 +283,7 @@ public: otError WriteInt32(int32_t aInt32) { return WriteUint32(static_cast(aInt32)); } /** - * This method encodes and writes a `uint64_t` value to current input frame. + * Encodes and writes a `uint64_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -301,7 +301,7 @@ public: otError WriteUint64(uint64_t aUint64); /** - * This method encodes and writes an `int64_t` value to current input frame. + * Encodes and writes an `int64_t` value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -319,7 +319,7 @@ public: otError WriteInt64(int64_t aInt64) { return WriteUint64(static_cast(aInt64)); } /** - * This method encodes (using spinel packed integer format) and writes a value to current input frame. + * Encodes (using spinel packed integer format) and writes a value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -337,7 +337,7 @@ public: otError WriteUintPacked(unsigned int aUint); /** - * This method encodes and writes an IPv6 address to current input frame. + * Encodes and writes an IPv6 address to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -355,7 +355,7 @@ public: otError WriteIp6Address(const spinel_ipv6addr_t &aIp6Addr) { return WriteIp6Address(aIp6Addr.bytes); } /** - * This method encodes and writes an IPv6 address to current input frame. + * Encodes and writes an IPv6 address to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -373,7 +373,7 @@ public: otError WriteIp6Address(const otIp6Address &aIp6Addr) { return WriteIp6Address(aIp6Addr.mFields.m8); } /** - * This method encodes and writes an IPv6 address to current input frame. + * Encodes and writes an IPv6 address to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -391,7 +391,7 @@ public: otError WriteIp6Address(const uint8_t *aIp6AddrBuf) { return WriteData(aIp6AddrBuf, sizeof(spinel_ipv6addr_t)); } /** - * This method encodes and writes an EUI64 value to current input frame. + * Encodes and writes an EUI64 value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -409,7 +409,7 @@ public: otError WriteEui64(const spinel_eui64_t &aEui64) { return WriteEui64(aEui64.bytes); } /** - * This method encodes and writes an EUI64 value to current input frame. + * Encodes and writes an EUI64 value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -427,7 +427,7 @@ public: otError WriteEui64(const otExtAddress &aExtAddress) { return WriteEui64(aExtAddress.m8); } /** - * This method encodes and writes an EUI64 value to current input frame. + * Encodes and writes an EUI64 value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -445,7 +445,7 @@ public: otError WriteEui64(const uint8_t *aEui64) { return WriteData(aEui64, sizeof(spinel_eui64_t)); } /** - * This method encodes and writes an EUI48 value to current input frame. + * Encodes and writes an EUI48 value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -463,7 +463,7 @@ public: otError WriteEui48(const spinel_eui48_t &aEui48) { return WriteEui48(aEui48.bytes); } /** - * This method encodes and writes an EUI48 value to current input frame. + * Encodes and writes an EUI48 value to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -481,7 +481,7 @@ public: otError WriteEui48(const uint8_t *aEui48) { return WriteData(aEui48, sizeof(spinel_eui48_t)); } /** - * This method encodes and writes a UTF8 string to current input frame. + * Encodes and writes a UTF8 string to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -499,7 +499,7 @@ public: otError WriteUtf8(const char *aUtf8); /** - * This method encodes and writes a sequence of bytes to current input frame. + * Encodes and writes a sequence of bytes to current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -518,7 +518,7 @@ public: otError WriteData(const uint8_t *aData, uint16_t aDataLen) { return mNcpBuffer.InFrameFeedData(aData, aDataLen); } /** - * This method encodes and writes a data blob (sequence of bytes) with its length prepended before the data. + * Encodes and writes a data blob (sequence of bytes) with its length prepended before the data. * * The length of the data (in bytes) is prepended (with the length encoded as a `uint16`). The size of the length * field is not included in the length. This is similar to `SPINEL_DATATYPE_DATA_WLEN` type. @@ -541,7 +541,7 @@ public: #if OPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE /** - * This method adds a message to the current input frame. + * Adds a message to the current input frame. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this * method does nothing and returns error status `OT_ERROR_INVALID_STATE`. @@ -567,7 +567,7 @@ public: #endif /** - * This method encodes and writes a set of variables to the current input frame using a given spinel packing format + * Encodes and writes a set of variables to the current input frame using a given spinel packing format * string. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this @@ -590,7 +590,7 @@ public: otError WritePacked(const char *aPackFormat, ...); /** - * This method encodes and writes a set of variables to the current input frame using a given spinel packing format + * Encodes and writes a set of variables to the current input frame using a given spinel packing format * string. * * Before using this method `BeginFrame()` must be called to start and prepare a new input frame. Otherwise, this @@ -613,7 +613,7 @@ public: otError WriteVPacked(const char *aPackFormat, va_list aArgs); /** - * This method opens a struct in the current input frame. + * Opens a struct in the current input frame. * * After a successful call to this method, all the subsequent `Write()` methods add the field/value to * the current open struct until the struct is closed using `CloseStruct()` method. Structures can be nested. Up to @@ -634,7 +634,7 @@ public: otError OpenStruct(void); /** - * This method closes the most recently opened struct (using `OpenStruct()`) in the current input frame. + * Closes the most recently opened struct (using `OpenStruct()`) in the current input frame. * * Each call to `CloseStruct()` must correspond to an earlier successfully opened struct. If a frame is ended using * `EndFrame()` with remaining open structs, the `EndFrame()` method will close all the remaining structs. @@ -650,7 +650,7 @@ public: otError CloseStruct(void); /** - * This method saves the current write position in the input frame. + * Saves the current write position in the input frame. * * The saved position can later be used to discard a portion of written/encoded frame and move the write pointer * back to the saved position (using `ResetToSaved()`). @@ -662,7 +662,7 @@ public: otError SavePosition(void); /** - * This method resets the write position of input frame back to a previously saved position. Any added content + * Resets the write position of input frame back to a previously saved position. Any added content * after the write position is discarded. * * The saved position must belong to the same input frame saved earlier with `SavePosition()`. This method cannot diff --git a/src/lib/spinel/spinel_encrypter.hpp b/src/lib/spinel/spinel_encrypter.hpp index 989bbc586..1bc52d884 100644 --- a/src/lib/spinel/spinel_encrypter.hpp +++ b/src/lib/spinel/spinel_encrypter.hpp @@ -34,7 +34,7 @@ namespace SpinelEncrypter { /** * Encrypts spinel frames before sending to AP/NCP. * - * This method encrypts outbound frames in both directions, i.e. from AP to NCP and from NCP to AP. + * Encrypts outbound frames in both directions, i.e. from AP to NCP and from NCP to AP. * * @param[in,out] aFrameBuf Pointer to buffer containing the frame, also where the encrypted frame will be placed. * @param[in] aFrameSize Max number of bytes in frame buffer (max length of spinel frame + additional data for @@ -48,7 +48,7 @@ bool EncryptOutbound(unsigned char *aFrameBuf, size_t aFrameSize, size_t *aFrame /** * Decrypts spinel frames received from AP/NCP. * - * This method decrypts inbound frames in both directions, i.e. from AP to NCP and from NCP to AP. + * Decrypts inbound frames in both directions, i.e. from AP to NCP and from NCP to AP. * * @param[in,out] aFrameBuf Pointer to buffer containing encrypted frame, also where the decrypted frame will be placed. * @param[in] aFrameSize Max number of bytes in frame buffer (max length of spinel frame + additional data for diff --git a/src/lib/spinel/spinel_interface.hpp b/src/lib/spinel/spinel_interface.hpp index 1feafddd4..84a10b8e8 100644 --- a/src/lib/spinel/spinel_interface.hpp +++ b/src/lib/spinel/spinel_interface.hpp @@ -50,7 +50,7 @@ public: }; /** - * This type defines a receive frame buffer to store received spinel frame(s). + * Defines a receive frame buffer to store received spinel frame(s). * * @note The receive frame buffer is an `Hdlc::MultiFrameBuffer` and therefore it is capable of storing multiple * frames in a FIFO queue manner. @@ -61,7 +61,7 @@ public: typedef void (*ReceiveFrameCallback)(void *aContext); /** - * This method indicates whether or not the frame is the Spinel SPINEL_CMD_RESET frame. + * Indicates whether or not the frame is the Spinel SPINEL_CMD_RESET frame. * * @param[in] aFrame A pointer to buffer containing the spinel frame. * @param[in] aLength The length (number of bytes) in the frame. diff --git a/src/lib/url/url.hpp b/src/lib/url/url.hpp index fbcff4a72..c336e2ae4 100644 --- a/src/lib/url/url.hpp +++ b/src/lib/url/url.hpp @@ -34,7 +34,7 @@ /** * @struct otUrl * - * This structure represents a URL. + * Represents a URL. * */ struct otUrl @@ -49,14 +49,14 @@ namespace ot { namespace Url { /** - * This class implements the URL processing. + * Implements the URL processing. * */ class Url : public otUrl { public: /** - * This method initializes the URL. + * Initializes the URL. * * @param[in] aUrl A buffer stores the null-terminated URL string. * @@ -67,7 +67,7 @@ public: otError Init(char *aUrl); /** - * This method gets the path in URL. + * Gets the path in URL. * * @returns The path in URL. * @@ -75,7 +75,7 @@ public: const char *GetPath(void) const { return mPath; } /** - * This method gets the value of parameter @p aName. + * Gets the value of parameter @p aName. * * @param[in] aName The parameter name. * @param[in] aLastValue The last iterated parameter value, nullptr for the first value. @@ -86,7 +86,7 @@ public: const char *GetValue(const char *aName, const char *aLastValue = nullptr) const; /** - * This method returns the URL protocol. + * Returns the URL protocol. * * @returns The URL protocol. * diff --git a/src/ncp/changed_props_set.hpp b/src/ncp/changed_props_set.hpp index 0b7040c58..1f4451aa9 100644 --- a/src/ncp/changed_props_set.hpp +++ b/src/ncp/changed_props_set.hpp @@ -65,7 +65,7 @@ public: }; /** - * This constructor initializes the set. + * Initializes the set. * */ ChangedPropsSet(void) @@ -75,13 +75,13 @@ public: } /** - * This method clears the set. + * Clears the set. * */ void Clear(void) { mChangedSet = 0; } /** - * This method indicates if the set is empty or not. + * Indicates if the set is empty or not. * * @returns TRUE if the set if empty, FALSE otherwise. * @@ -89,7 +89,7 @@ public: bool IsEmpty(void) const { return (mChangedSet == 0); } /** - * This method adds a property to the set. The property added must be in the list of supported properties + * Adds a property to the set. The property added must be in the list of supported properties * capable of sending unsolicited update, otherwise the input is ignored. * * Note that if the property is already in the set, adding it again does not change the set. @@ -100,7 +100,7 @@ public: void AddProperty(spinel_prop_key_t aPropKey) { Add(aPropKey, SPINEL_STATUS_OK); } /** - * This method adds a `LAST_STATUS` update to the set. The update must be in list of supported entries. + * Adds a `LAST_STATUS` update to the set. The update must be in list of supported entries. * * @param[in] aStatus The spinel status update to be added to set. * @@ -108,7 +108,7 @@ public: void AddLastStatus(spinel_status_t aStatus) { Add(SPINEL_PROP_LAST_STATUS, aStatus); } /** - * This method returns a pointer to array of entries of supported property/status updates. The list includes + * Returns a pointer to array of entries of supported property/status updates. The list includes * all properties that can generate unsolicited update. * * @param[out] aNumEntries A reference to output the number of entries in the list. @@ -123,7 +123,7 @@ public: } /** - * This method returns a pointer to the entry associated with a given index. + * Returns a pointer to the entry associated with a given index. * * @param[in] aIndex The index to an entry. * @@ -136,7 +136,7 @@ public: } /** - * This method indicates if the entry associated with an index is in the set (i.e., it has been changed and + * Indicates if the entry associated with an index is in the set (i.e., it has been changed and * requires an unsolicited update). * * @param[in] aIndex The index to an entry. @@ -147,7 +147,7 @@ public: bool IsEntryChanged(uint8_t aIndex) const { return IsBitSet(mChangedSet, aIndex); } /** - * This method removes an entry associated with an index in the set. + * Removes an entry associated with an index in the set. * * Note that if the property/entry is not in the set, removing it simply does nothing. * @@ -157,7 +157,7 @@ public: void RemoveEntry(uint8_t aIndex) { ClearBit(mChangedSet, aIndex); } /** - * This method enables/disables filtering of a given property. + * Enables/disables filtering of a given property. * * @param[in] aPropKey The property key to filter. * @param[in] aEnable TRUE to enable filtering, FALSE to disable. @@ -169,7 +169,7 @@ public: otError EnablePropertyFilter(spinel_prop_key_t aPropKey, bool aEnable); /** - * This method determines whether filtering is enabled for an entry associated with an index. + * Determines whether filtering is enabled for an entry associated with an index. * * @param[in] aIndex Index of entry to be checked. * @@ -179,7 +179,7 @@ public: bool IsEntryFiltered(uint8_t aIndex) const { return IsBitSet(mFilterSet, aIndex); } /** - * This method determines whether filtering is enabled for a given property key. + * Determines whether filtering is enabled for a given property key. * * @param[in] aPropKey The property key to check. * @@ -190,7 +190,7 @@ public: bool IsPropertyFiltered(spinel_prop_key_t aPropKey) const; /** - * This method clears the filter. + * Clears the filter. * */ void ClearFilter(void) { mFilterSet = 0; } diff --git a/src/ncp/ncp_base.hpp b/src/ncp/ncp_base.hpp index 995dbc4d1..c9123ea4d 100644 --- a/src/ncp/ncp_base.hpp +++ b/src/ncp/ncp_base.hpp @@ -75,7 +75,7 @@ public: }; /** - * This constructor creates and initializes an NcpBase instance. + * Creates and initializes an NcpBase instance. * * @param[in] aInstance The OpenThread instance structure. * @@ -83,7 +83,7 @@ public: explicit NcpBase(Instance *aInstance); /** - * This static method returns the pointer to the single NCP instance. + * Returns the pointer to the single NCP instance. * * @returns Pointer to the single NCP instance. * @@ -91,7 +91,7 @@ public: static NcpBase *GetNcpInstance(void); /** - * This method sends data to host via specific stream. + * Sends data to host via specific stream. * * * @param[in] aStreamId A numeric identifier for the stream to write to. @@ -109,7 +109,7 @@ public: otError StreamWrite(int aStreamId, const uint8_t *aDataPtr, int aDataLen); /** - * This method send an OpenThread log message to host via `SPINEL_PROP_STREAM_LOG` property. + * Send an OpenThread log message to host via `SPINEL_PROP_STREAM_LOG` property. * * @param[in] aLogLevel The log level * @param[in] aLogRegion The log region @@ -120,7 +120,7 @@ public: #if OPENTHREAD_CONFIG_NCP_ENABLE_PEEK_POKE /** - * This method registers peek/poke delegate functions with NCP module. + * Registers peek/poke delegate functions with NCP module. * * @param[in] aAllowPeekDelegate Delegate function pointer for peek operation. * @param[in] aAllowPokeDelegate Delegate function pointer for poke operation. @@ -131,7 +131,7 @@ public: #endif /** - * This method is called by the framer whenever a framing error is detected. + * Is called by the framer whenever a framing error is detected. */ void IncrementFrameErrorCounter(void); @@ -154,7 +154,7 @@ protected: typedef otError (NcpBase::*PropertyHandler)(void); /** - * This enumeration represents the `ResponseEntry` type. + * Represents the `ResponseEntry` type. * */ enum ResponseType @@ -165,7 +165,7 @@ protected: }; /** - * This struct represents a spinel response entry. + * Represents a spinel response entry. * */ struct ResponseEntry @@ -462,7 +462,7 @@ protected: #if OPENTHREAD_ENABLE_NCP_VENDOR_HOOK /** - * This method defines a vendor "command handler" hook to process vendor-specific spinel commands. + * Defines a vendor "command handler" hook to process vendor-specific spinel commands. * * @param[in] aHeader The spinel frame header. * @param[in] aCommand The spinel command key. @@ -474,7 +474,7 @@ protected: otError VendorCommandHandler(uint8_t aHeader, unsigned int aCommand); /** - * This method is a callback which mirrors `NcpBase::HandleFrameRemovedFromNcpBuffer()`. It is called when a + * Is a callback which mirrors `NcpBase::HandleFrameRemovedFromNcpBuffer()`. It is called when a * spinel frame is sent and removed from NCP buffer. * * (a) This can be used to track and verify that a vendor spinel frame response is delivered to the host (tracking @@ -489,7 +489,7 @@ protected: void VendorHandleFrameRemovedFromNcpBuffer(Spinel::Buffer::FrameTag aFrameTag); /** - * This method defines a vendor "get property handler" hook to process vendor spinel properties. + * Defines a vendor "get property handler" hook to process vendor spinel properties. * * The vendor handler should return `OT_ERROR_NOT_FOUND` status if it does not support "get" operation for the * given property key. Otherwise, the vendor handler should behave like other property get handlers, i.e., it @@ -506,7 +506,7 @@ protected: otError VendorGetPropertyHandler(spinel_prop_key_t aPropKey); /** - * This method defines a vendor "set property handler" hook to process vendor spinel properties. + * Defines a vendor "set property handler" hook to process vendor spinel properties. * * The vendor handler should return `OT_ERROR_NOT_FOUND` status if it does not support "set" operation for the * given property key. Otherwise, the vendor handler should behave like other property set handlers, i.e., it diff --git a/src/ncp/ncp_hdlc.hpp b/src/ncp/ncp_hdlc.hpp index d0516c001..1cce0e46c 100644 --- a/src/ncp/ncp_hdlc.hpp +++ b/src/ncp/ncp_hdlc.hpp @@ -59,13 +59,13 @@ public: explicit NcpHdlc(Instance *aInstance, otNcpHdlcSendCallback aSendCallback); /** - * This method is called when uart tx is finished. It prepares and sends the next data chunk (if any) to uart. + * Is called when uart tx is finished. It prepares and sends the next data chunk (if any) to uart. * */ void HandleHdlcSendDone(void); /** - * This method is called when uart received a data buffer. + * Is called when uart received a data buffer. * */ void HandleHdlcReceiveDone(const uint8_t *aBuf, uint16_t aBufLength); diff --git a/src/ncp/ncp_spi.hpp b/src/ncp/ncp_spi.hpp index 43c80dbcb..12f0321fc 100644 --- a/src/ncp/ncp_spi.hpp +++ b/src/ncp/ncp_spi.hpp @@ -123,7 +123,7 @@ namespace ot { namespace Ncp { /** - * This class defines a SPI frame. + * Defines a SPI frame. * */ class SpiFrame @@ -135,7 +135,7 @@ public: }; /** - * This constructor initializes an `SpiFrame` instance. + * Initializes an `SpiFrame` instance. * * @param[in] aBuffer Pointer to buffer containing the frame. * @@ -146,7 +146,7 @@ public: } /** - * This method gets a pointer to data portion in the SPI frame skipping the header. + * Gets a pointer to data portion in the SPI frame skipping the header. * * @returns A pointer to data in the SPI frame. * @@ -154,7 +154,7 @@ public: uint8_t *GetData(void) { return mBuffer + kHeaderSize; } /** - * This method indicates whether or not the frame is valid. + * Indicates whether or not the frame is valid. * * In a valid frame the flag byte should contain the pattern bits. * @@ -164,7 +164,7 @@ public: bool IsValid(void) const { return ((mBuffer[kIndexFlagByte] & kFlagPatternMask) == kFlagPattern); } /** - * This method indicates whether or not the "RST" bit is set. + * Indicates whether or not the "RST" bit is set. * * @returns TRUE if the "RST" bit is set, FALSE otherwise. * @@ -172,7 +172,7 @@ public: bool IsResetFlagSet(void) const { return ((mBuffer[kIndexFlagByte] & kFlagReset) == kFlagReset); } /** - * This method sets the "flag byte" field in the SPI frame header. + * Sets the "flag byte" field in the SPI frame header. * * @param[in] aResetFlag The status of reset flag (TRUE to set the flag, FALSE to clear flag). * @@ -180,7 +180,7 @@ public: void SetHeaderFlagByte(bool aResetFlag) { mBuffer[kIndexFlagByte] = kFlagPattern | (aResetFlag ? kFlagReset : 0); } /** - * This method gets the "flag byte" field in the SPI frame header. + * Gets the "flag byte" field in the SPI frame header. * * @returns The flag byte. * @@ -188,7 +188,7 @@ public: uint8_t GetHeaderFlagByte(void) const { return mBuffer[kIndexFlagByte]; } /** - * This method sets the "accept len" field in the SPI frame header. + * Sets the "accept len" field in the SPI frame header. * * "accept len" specifies number of bytes the sender of the SPI frame can receive. * @@ -201,7 +201,7 @@ public: } /** - * This method gets the "accept len" field in the SPI frame header. + * Gets the "accept len" field in the SPI frame header. * * @returns The accept length in bytes. * @@ -209,7 +209,7 @@ public: uint16_t GetHeaderAcceptLen(void) const { return Encoding::LittleEndian::ReadUint16(mBuffer + kIndexAcceptLen); } /** - * This method sets the "data len" field in the SPI frame header. + * Sets the "data len" field in the SPI frame header. * * "Data len" specifies number of data bytes in the transmitted SPI frame. * @@ -219,7 +219,7 @@ public: void SetHeaderDataLen(uint16_t aDataLen) { Encoding::LittleEndian::WriteUint16(aDataLen, mBuffer + kIndexDataLen); } /** - * This method gets the "data len" field in the SPI frame header. + * Gets the "data len" field in the SPI frame header. * * @returns The data length in bytes. * @@ -245,7 +245,7 @@ class NcpSpi : public NcpBase { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aInstance A pointer to the OpenThread instance structure. * diff --git a/src/posix/main.c b/src/posix/main.c index 8800ac0c1..2966965e1 100644 --- a/src/posix/main.c +++ b/src/posix/main.c @@ -71,7 +71,7 @@ #include "lib/platform/reset_util.h" /** - * This function initializes NCP app. + * Initializes NCP app. * * @param[in] aInstance A pointer to the OpenThread instance. * @@ -79,13 +79,13 @@ void otAppNcpInit(otInstance *aInstance); /** - * This function deinitializes NCP app. + * Deinitializes NCP app. * */ void otAppNcpUpdate(otSysMainloopContext *aContext); /** - * This function updates the file descriptor sets with file descriptors used by console. + * Updates the file descriptor sets with file descriptors used by console. * * @param[in,out] aMainloop A pointer to the mainloop context. * @@ -93,7 +93,7 @@ void otAppNcpUpdate(otSysMainloopContext *aContext); void otAppNcpProcess(const otSysMainloopContext *aContext); /** - * This function initializes CLI app. + * Initializes CLI app. * * @param[in] aInstance A pointer to the OpenThread instance. * @@ -101,13 +101,13 @@ void otAppNcpProcess(const otSysMainloopContext *aContext); void otAppCliInit(otInstance *aInstance); /** - * This function deinitializes CLI app. + * Deinitializes CLI app. * */ void otAppCliDeinit(void); /** - * This function updates the file descriptor sets with file descriptors used by console. + * Updates the file descriptor sets with file descriptors used by console. * * @param[in,out] aMainloop A pointer to the mainloop context. * @@ -115,7 +115,7 @@ void otAppCliDeinit(void); void otAppCliUpdate(otSysMainloopContext *aMainloop); /** - * This function performs console driver processing. + * Performs console driver processing. * * @param[in] aMainloop A pointer to the mainloop context. * @@ -131,7 +131,7 @@ typedef struct PosixConfig } PosixConfig; /** - * This enumeration defines the argument return values. + * Defines the argument return values. * */ enum diff --git a/src/posix/platform/config_file.hpp b/src/posix/platform/config_file.hpp index c0a74ca44..067124a7a 100644 --- a/src/posix/platform/config_file.hpp +++ b/src/posix/platform/config_file.hpp @@ -37,14 +37,14 @@ namespace ot { namespace Posix { /** - * This class provides read/write/clear methods for key/value configuration files. + * Provides read/write/clear methods for key/value configuration files. * */ class ConfigFile { public: /** - * This method initializes the configuration file path. + * Initializes the configuration file path. * * @param[in] aFilePath A pointer to the null-terminated file path. * @@ -52,7 +52,7 @@ public: explicit ConfigFile(const char *aFilePath); /** - * This method gets a configuration from the configuration file. + * Gets a configuration from the configuration file. * * @param[in] aKey The key string associated with the requested configuration. * @param[in,out] aIterator A reference to an iterator. MUST be initialized to 0 or the behavior is undefined. @@ -68,7 +68,7 @@ public: otError Get(const char *aKey, int &aIterator, char *aValue, int aValueLength); /** - * This method adds a configuration to the configuration file. + * Adds a configuration to the configuration file. * * @param[in] aKey The key string associated with the requested configuration. * @param[in] aValue A pointer to where the new value string of the configuration should be written. @@ -80,7 +80,7 @@ public: otError Add(const char *aKey, const char *aValue); /** - * This function removes all configurations with the same key string from the configuration file. + * Removes all configurations with the same key string from the configuration file. * * @param[in] aKey The key string associated with the requested configuration. * diff --git a/src/posix/platform/hdlc_interface.hpp b/src/posix/platform/hdlc_interface.hpp index dc9fbf89a..65fef8521 100644 --- a/src/posix/platform/hdlc_interface.hpp +++ b/src/posix/platform/hdlc_interface.hpp @@ -46,14 +46,14 @@ namespace ot { namespace Posix { /** - * This class defines an HDLC interface to the Radio Co-processor (RCP) + * Defines an HDLC interface to the Radio Co-processor (RCP) * */ class HdlcInterface { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aCallback Callback on frame received * @param[in] aCallbackContext Callback context @@ -71,7 +71,7 @@ public: ~HdlcInterface(void); /** - * This method initializes the interface to the Radio Co-processor (RCP) + * Initializes the interface to the Radio Co-processor (RCP) * * @note This method should be called before reading and sending spinel frames to the interface. * @@ -85,13 +85,13 @@ public: otError Init(const Url::Url &aRadioUrl); /** - * This method deinitializes the interface to the RCP. + * Deinitializes the interface to the RCP. * */ void Deinit(void); /** - * This method encodes and sends a spinel frame to Radio Co-processor (RCP) over the socket. + * Encodes and sends a spinel frame to Radio Co-processor (RCP) over the socket. * * This is blocking call, i.e., if the socket is not writable, this method waits for it to become writable for * up to `kMaxWaitTime` interval. @@ -107,7 +107,7 @@ public: otError SendFrame(const uint8_t *aFrame, uint16_t aLength); /** - * This method waits for receiving part or all of spinel frame within specified interval. + * Waits for receiving part or all of spinel frame within specified interval. * * @param[in] aTimeout The timeout value in microseconds. * @@ -118,7 +118,7 @@ public: otError WaitForFrame(uint64_t aTimeoutUs); /** - * This method updates the file descriptor sets with file descriptors used by the radio driver. + * Updates the file descriptor sets with file descriptors used by the radio driver. * * @param[in,out] aReadFdSet A reference to the read file descriptors. * @param[in,out] aWriteFdSet A reference to the write file descriptors. @@ -129,7 +129,7 @@ public: void UpdateFdSet(fd_set &aReadFdSet, fd_set &aWriteFdSet, int &aMaxFd, struct timeval &aTimeout); /** - * This method performs radio driver processing. + * Performs radio driver processing. * * @param[in] aContext The context containing fd_sets. * @@ -138,9 +138,9 @@ public: #if OPENTHREAD_POSIX_VIRTUAL_TIME /** - * This method process read data (decode the data). + * Process read data (decode the data). * - * This method is intended only for virtual time simulation. Its behavior is similar to `Read()` but instead of + * Is intended only for virtual time simulation. Its behavior is similar to `Read()` but instead of * reading the data from the radio socket, it uses the given data in @p `aEvent`. * * @param[in] aEvent The data event. @@ -150,7 +150,7 @@ public: #endif /** - * This method returns the bus speed between the host and the radio. + * Returns the bus speed between the host and the radio. * * @returns Bus speed in bits/second. * @@ -158,7 +158,7 @@ public: uint32_t GetBusSpeed(void) const { return mBaudRate; } /** - * This method hardware resets the RCP. + * Hardware resets the RCP. * * @retval OT_ERROR_NONE Successfully reset the RCP. * @retval OT_ERROR_NOT_IMPLEMENT The hardware reset is not implemented. @@ -167,7 +167,7 @@ public: otError HardwareReset(void) { return OT_ERROR_NOT_IMPLEMENTED; } /** - * This method returns the RCP interface metrics. + * Returns the RCP interface metrics. * * @returns The RCP interface metrics. * @@ -176,13 +176,13 @@ public: private: /** - * This method is called when RCP is reset to recreate the connection with it. + * Is called when RCP is reset to recreate the connection with it. * */ otError ResetConnection(void); /** - * This method instructs `HdlcInterface` to read and decode data from radio over the socket. + * Instructs `HdlcInterface` to read and decode data from radio over the socket. * * If a full HDLC frame is decoded while reading data, this method invokes the `HandleReceivedFrame()` (on the * `aCallback` object from constructor) to pass the received frame to be processed. @@ -191,7 +191,7 @@ private: void Read(void); /** - * This method waits for the socket file descriptor associated with the HDLC interface to become writable within + * Waits for the socket file descriptor associated with the HDLC interface to become writable within * `kMaxWaitTime` interval. * * @retval OT_ERROR_NONE Socket is writable. @@ -201,7 +201,7 @@ private: otError WaitForWritable(void); /** - * This method writes a given frame to the socket. + * Writes a given frame to the socket. * * This is blocking call, i.e., if the socket is not writable, this method waits for it to become writable for * up to `kMaxWaitTime` interval. @@ -216,7 +216,7 @@ private: otError Write(const uint8_t *aFrame, uint16_t aLength); /** - * This method performs HDLC decoding on received data. + * Performs HDLC decoding on received data. * * If a full HDLC frame is decoded while reading data, this method invokes the `HandleReceivedFrame()` (on the * `aCallback` object from constructor) to pass the received frame to be processed. @@ -231,7 +231,7 @@ private: void HandleHdlcFrame(otError aError); /** - * This method opens file specified by aRadioUrl. + * Opens file specified by aRadioUrl. * * @param[in] aRadioUrl A reference to object containing path to file and data for configuring * the connection with tty type file. @@ -241,7 +241,7 @@ private: int OpenFile(const Url::Url &aRadioUrl); /** - * This method closes file associated with the file descriptor. + * Closes file associated with the file descriptor. * */ void CloseFile(void); diff --git a/src/posix/platform/include/openthread/openthread-system.h b/src/posix/platform/include/openthread/openthread-system.h index bca1a7111..e3b02fc5a 100644 --- a/src/posix/platform/include/openthread/openthread-system.h +++ b/src/posix/platform/include/openthread/openthread-system.h @@ -52,7 +52,7 @@ extern "C" { #endif /** - * This enumeration represents default parameters for the SPI interface. + * Represents default parameters for the SPI interface. * */ enum @@ -69,7 +69,7 @@ enum }; /** - * This structure represents platform specific configurations. + * Represents platform specific configurations. * */ typedef struct otPlatformConfig @@ -86,7 +86,7 @@ typedef struct otPlatformConfig } otPlatformConfig; /** - * This structure represents RCP interface metrics. + * Represents RCP interface metrics. * */ typedef struct otRcpInterfaceMetrics @@ -102,7 +102,7 @@ typedef struct otRcpInterfaceMetrics } otRcpInterfaceMetrics; /** - * This function performs all platform-specific initialization of OpenThread's drivers and initializes the OpenThread + * Performs all platform-specific initialization of OpenThread's drivers and initializes the OpenThread * instance. * * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function @@ -116,7 +116,7 @@ typedef struct otRcpInterfaceMetrics otInstance *otSysInit(otPlatformConfig *aPlatformConfig); /** - * This function finalizes the OpenThread instance and performs all platform-specific deinitialization for OpenThread's + * Finalizes the OpenThread instance and performs all platform-specific deinitialization for OpenThread's * drivers. * * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function @@ -126,7 +126,7 @@ otInstance *otSysInit(otPlatformConfig *aPlatformConfig); void otSysDeinit(void); /** - * This structure represents a context for a select() based mainloop. + * Represents a context for a select() based mainloop. * */ typedef struct otSysMainloopContext @@ -139,7 +139,7 @@ typedef struct otSysMainloopContext } otSysMainloopContext; /** - * This function updates the file descriptor sets with file descriptors used by OpenThread drivers. + * Updates the file descriptor sets with file descriptors used by OpenThread drivers. * * @param[in] aInstance The OpenThread instance structure. * @param[in,out] aMainloop A pointer to the mainloop context. @@ -148,7 +148,7 @@ typedef struct otSysMainloopContext void otSysMainloopUpdate(otInstance *aInstance, otSysMainloopContext *aMainloop); /** - * This function polls OpenThread's mainloop. + * Polls OpenThread's mainloop. * * @param[in,out] aMainloop A pointer to the mainloop context. * @@ -158,7 +158,7 @@ void otSysMainloopUpdate(otInstance *aInstance, otSysMainloopContext *aMainloop) int otSysMainloopPoll(otSysMainloopContext *aMainloop); /** - * This function performs all platform-specific processing for OpenThread's example applications. + * Performs all platform-specific processing for OpenThread's example applications. * * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function * in the main loop when processing OpenThread's drivers is most appropriate. @@ -170,7 +170,7 @@ int otSysMainloopPoll(otSysMainloopContext *aMainloop); void otSysMainloopProcess(otInstance *aInstance, const otSysMainloopContext *aMainloop); /** - * This method returns the radio url help string. + * Returns the radio url help string. * * @returns the radio url help string. * @@ -180,7 +180,7 @@ const char *otSysGetRadioUrlHelpString(void); extern otPlatResetReason gPlatResetReason; /** - * This method returns the Thread network interface name. + * Returns the Thread network interface name. * * @returns The Thread network interface name. * @@ -188,7 +188,7 @@ extern otPlatResetReason gPlatResetReason; const char *otSysGetThreadNetifName(void); /** - * This method returns the Thread network interface index. + * Returns the Thread network interface index. * * @returns The Thread network interface index. * @@ -196,7 +196,7 @@ const char *otSysGetThreadNetifName(void); unsigned int otSysGetThreadNetifIndex(void); /** - * This method returns the infrastructure network interface name. + * Returns the infrastructure network interface name. * * @returns The infrastructure network interface name, or `nullptr` if not specified. * @@ -204,7 +204,7 @@ unsigned int otSysGetThreadNetifIndex(void); const char *otSysGetInfraNetifName(void); /** - * This method returns the radio spinel metrics. + * Returns the radio spinel metrics. * * @returns The radio spinel metrics. * @@ -212,7 +212,7 @@ const char *otSysGetInfraNetifName(void); const otRadioSpinelMetrics *otSysGetRadioSpinelMetrics(void); /** - * This method returns the RCP interface metrics. + * Returns the RCP interface metrics. * * @returns The RCP interface metrics. * @@ -220,7 +220,7 @@ const otRadioSpinelMetrics *otSysGetRadioSpinelMetrics(void); const otRcpInterfaceMetrics *otSysGetRcpInterfaceMetrics(void); /** - * This function returns the ifr_flags of the infrastructure network interface. + * Returns the ifr_flags of the infrastructure network interface. * * @returns The ifr_flags of infrastructure network interface. * diff --git a/src/posix/platform/include/openthread/platform/secure_settings.h b/src/posix/platform/include/openthread/platform/secure_settings.h index 288ad4ff2..e69d4b867 100644 --- a/src/posix/platform/include/openthread/platform/secure_settings.h +++ b/src/posix/platform/include/openthread/platform/secure_settings.h @@ -52,7 +52,7 @@ extern "C" { */ /** - * This function performs any initialization for the secure settings subsystem, if necessary. + * Performs any initialization for the secure settings subsystem, if necessary. * * @param[in] aInstance The OpenThread instance structure. * @@ -60,7 +60,7 @@ extern "C" { void otPosixSecureSettingsInit(otInstance *aInstance); /** - * This function performs any de-initialization for the secure settings subsystem, if necessary. + * Performs any de-initialization for the secure settings subsystem, if necessary. * * @param[in] aInstance The OpenThread instance structure. * @@ -68,11 +68,11 @@ void otPosixSecureSettingsInit(otInstance *aInstance); void otPosixSecureSettingsDeinit(otInstance *aInstance); /** - * This function fetches the value of the setting identified by aKey and write it to the memory pointed to by aValue. + * Fetches the value of the setting identified by aKey and write it to the memory pointed to by aValue. * It then writes the length to the integer pointed to by aValueLength. The initial value of aValueLength is the * maximum number of bytes to be written to aValue. * - * This function can be used to check for the existence of a key without fetching the value by setting aValue and + * Can be used to check for the existence of a key without fetching the value by setting aValue and * aValueLength to NULL. You can also check the length of the setting without fetching it by setting only aValue * to NULL. * @@ -101,7 +101,7 @@ otError otPosixSecureSettingsGet(otInstance *aInstance, uint16_t *aValueLength); /** - * This function sets or replaces the value of a setting identified by aKey. If there was more than one value + * Sets or replaces the value of a setting identified by aKey. If there was more than one value * previously associated with aKey, then they are all deleted and replaced with this single entry. * * Calling this function successfully may cause unrelated settings with multiple values to be reordered. @@ -120,7 +120,7 @@ otError otPosixSecureSettingsGet(otInstance *aInstance, otError otPosixSecureSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength); /** - * This function adds the value to a setting identified by aKey, without replacing any existing values. + * Adds the value to a setting identified by aKey, without replacing any existing values. * * Note that the underlying implementation is not required to maintain the order of the items associated with a * specific key. The added value may be added to the end, the beginning, or even somewhere in the middle. The order @@ -142,7 +142,7 @@ otError otPosixSecureSettingsSet(otInstance *aInstance, uint16_t aKey, const uin otError otPosixSecureSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength); /** - * This function deletes a specific value from the setting identified by aKey from the secure settings store. + * Deletes a specific value from the setting identified by aKey from the secure settings store. * * Note that the underlying implementation is not required to maintain the order of the items associated with a * specific key. @@ -159,7 +159,7 @@ otError otPosixSecureSettingsAdd(otInstance *aInstance, uint16_t aKey, const uin otError otPosixSecureSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex); /** - * This function deletes all settings from the secure settings store, resetting it to its initial factory state. + * Deletes all settings from the secure settings store, resetting it to its initial factory state. * * @param[in] aInstance The OpenThread instance structure. * diff --git a/src/posix/platform/infra_if.hpp b/src/posix/platform/infra_if.hpp index 03146fa27..b0be452f6 100644 --- a/src/posix/platform/infra_if.hpp +++ b/src/posix/platform/infra_if.hpp @@ -46,14 +46,14 @@ namespace ot { namespace Posix { /** - * This class manages infrastructure network interface. + * Manages infrastructure network interface. * */ class InfraNetif : public Mainloop::Source, private NonCopyable { public: /** - * This method updates the fd_set and timeout for mainloop. + * Updates the fd_set and timeout for mainloop. * * @param[in,out] aContext A reference to the mainloop context. * @@ -61,7 +61,7 @@ public: void Update(otSysMainloopContext &aContext) override; /** - * This method performs infrastructure network interface processing. + * Performs infrastructure network interface processing. * * @param[in] aContext A reference to the mainloop context. * @@ -69,7 +69,7 @@ public: void Process(const otSysMainloopContext &aContext) override; /** - * This method initializes the infrastructure network interface. + * Initializes the infrastructure network interface. * * @note This method is called before OpenThread instance is created. * @@ -79,7 +79,7 @@ public: void Init(const char *aIfName); /** - * This method sets up the infrastructure network interface. + * Sets up the infrastructure network interface. * * @note This method is called after OpenThread instance is created. * @@ -87,7 +87,7 @@ public: void SetUp(void); /** - * This method tears down the infrastructure network interface. + * Tears down the infrastructure network interface. * * @note This method is called before OpenThread instance is destructed. * @@ -95,7 +95,7 @@ public: void TearDown(void); /** - * This method deinitializes the infrastructure network interface. + * Deinitializes the infrastructure network interface. * * @note This method is called after OpenThread instance is destructed. * @@ -103,13 +103,13 @@ public: void Deinit(void); /** - * This method checks whether the infrastructure network interface is running. + * Checks whether the infrastructure network interface is running. * */ bool IsRunning(void) const; /** - * This method returns the ifr_flags of the infrastructure network interface. + * Returns the ifr_flags of the infrastructure network interface. * * @returns The ifr_flags of the infrastructure network interface. * @@ -125,7 +125,7 @@ public: void CountAddresses(otSysInfraNetIfAddressCounters &aAddressCounters) const; /** - * This method sends an ICMPv6 Neighbor Discovery message on given infrastructure interface. + * Sends an ICMPv6 Neighbor Discovery message on given infrastructure interface. * * See RFC 4861: https://tools.ietf.org/html/rfc4861. * @@ -148,7 +148,7 @@ public: uint16_t aBufferLength); /** - * This method sends an asynchronous address lookup for the well-known host name "ipv4only.arpa" + * Sends an asynchronous address lookup for the well-known host name "ipv4only.arpa" * to discover the NAT64 prefix. * * @param[in] aInfraIfIndex The index of the infrastructure interface the address look-up is sent to. @@ -160,7 +160,7 @@ public: otError DiscoverNat64Prefix(uint32_t aInfraIfIndex); /** - * This method gets the infrastructure network interface name. + * Gets the infrastructure network interface name. * * @returns The infrastructure network interface name, or `nullptr` if not specified. * @@ -168,7 +168,7 @@ public: const char *GetNetifName(void) const { return (mInfraIfIndex != 0) ? mInfraIfName : nullptr; } /** - * This function gets the infrastructure network interface singleton. + * Gets the infrastructure network interface singleton. * * @returns The singleton object. * diff --git a/src/posix/platform/ip6_utils.hpp b/src/posix/platform/ip6_utils.hpp index 15d4ef634..39c7bc168 100644 --- a/src/posix/platform/ip6_utils.hpp +++ b/src/posix/platform/ip6_utils.hpp @@ -54,7 +54,7 @@ public: } /** - * This method returns the string as a null-terminated C string. + * Returns the string as a null-terminated C string. * * @returns The null-terminated C string. * diff --git a/src/posix/platform/mainloop.hpp b/src/posix/platform/mainloop.hpp index fd2989b66..6e11e5645 100644 --- a/src/posix/platform/mainloop.hpp +++ b/src/posix/platform/mainloop.hpp @@ -41,7 +41,7 @@ namespace Posix { namespace Mainloop { /** - * This class is the base for all mainloop event sources. + * Is the base for all mainloop event sources. * */ class Source @@ -50,7 +50,7 @@ class Source public: /** - * This method registers events in the mainloop. + * Registers events in the mainloop. * * @param[in,out] aContext A reference to the mainloop context. * @@ -58,7 +58,7 @@ public: virtual void Update(otSysMainloopContext &aContext) = 0; /** - * This method processes the mainloop events. + * Processes the mainloop events. * * @param[in] aContext A reference to the mainloop context. * @@ -66,7 +66,7 @@ public: virtual void Process(const otSysMainloopContext &aContext) = 0; /** - * This method marks destructor virtual method. + * Marks destructor virtual method. * */ virtual ~Source() = default; @@ -76,14 +76,14 @@ private: }; /** - * This class manages mainloop. + * Manages mainloop. * */ class Manager { public: /** - * This method updates event polls in the mainloop context. + * Updates event polls in the mainloop context. * * @param[in,out] aContext A reference to the mainloop context. * @@ -91,7 +91,7 @@ public: void Update(otSysMainloopContext &aContext); /** - * This method processes events in the mainloop context. + * Processes events in the mainloop context. * * @param[in] aContext A reference to the mainloop context. * @@ -99,7 +99,7 @@ public: void Process(const otSysMainloopContext &aContext); /** - * This method adds a new event source into the mainloop. + * Adds a new event source into the mainloop. * * @param[in] aSource A reference to the event source. * @@ -107,7 +107,7 @@ public: void Add(Source &aSource); /** - * This method removes an event source from the mainloop. + * Removes an event source from the mainloop. * * @param[in] aSource A reference to the event source. * @@ -115,7 +115,7 @@ public: void Remove(Source &aSource); /** - * This function returns the Mainloop singleton. + * Returns the Mainloop singleton. * * @returns A reference to the Mainloop singleton. * diff --git a/src/posix/platform/openthread-posix-config.h b/src/posix/platform/openthread-posix-config.h index 170f24f85..33ee49767 100644 --- a/src/posix/platform/openthread-posix-config.h +++ b/src/posix/platform/openthread-posix-config.h @@ -166,7 +166,7 @@ /** * @def OPENTHREAD_POSIX_CONFIG_OMR_ROUTES_PRIORITY * - * This macro defines the priority of OMR routes added to kernel. The larger the number, the lower the priority. We + * Defines the priority of OMR routes added to kernel. The larger the number, the lower the priority. We * need to assign a high priority to such routes so that kernel prefers the Thread link rather than infrastructure. * Otherwise we may unnecessarily transmit packets via infrastructure, which potentially causes looping issue. * @@ -178,7 +178,7 @@ /** * @def OPENTHREAD_POSIX_CONFIG_MAX_OMR_ROUTES_NUM * - * This macro defines the max number of OMR routes that can be added to kernel. + * Defines the max number of OMR routes that can be added to kernel. * */ #ifndef OPENTHREAD_POSIX_CONFIG_MAX_OMR_ROUTES_NUM @@ -198,7 +198,7 @@ /** * @def OPENTHREAD_POSIX_CONFIG_EXTERNAL_ROUTE_PRIORITY * - * This macro defines the priority of external routes added to kernel. The larger the number, the lower the priority. We + * Defines the priority of external routes added to kernel. The larger the number, the lower the priority. We * need to assign a low priority to such routes so that kernel prefers the infra link rather than thread. Otherwise we * may unnecessarily transmit packets via thread, which potentially causes performance issue. In linux, normally infra * link routes' metric value is not greater than 1024, hence 65535 should be big enough. @@ -211,7 +211,7 @@ /** * @def OPENTHREAD_POSIX_CONFIG_MAX_EXTERNAL_ROUTE_NUM * - * This macro defines the max number of external routes that can be added to kernel. + * Defines the max number of external routes that can be added to kernel. * */ #ifndef OPENTHREAD_POSIX_CONFIG_MAX_EXTERNAL_ROUTE_NUM diff --git a/src/posix/platform/platform-posix.h b/src/posix/platform/platform-posix.h index 8c36122ef..d279a8507 100644 --- a/src/posix/platform/platform-posix.h +++ b/src/posix/platform/platform-posix.h @@ -101,7 +101,7 @@ struct RadioProcessContext }; /** - * This function initializes the alarm service used by OpenThread. + * Initializes the alarm service used by OpenThread. * * @param[in] aSpeedUpFactor The speed up factor. * @param[in] aRealTimeSignal The real time signal for microsecond alarms. @@ -110,7 +110,7 @@ struct RadioProcessContext void platformAlarmInit(uint32_t aSpeedUpFactor, int aRealTimeSignal); /** - * This function retrieves the time remaining until the alarm fires. + * Retrieves the time remaining until the alarm fires. * * @param[out] aTimeval A pointer to the timeval struct. * @@ -118,7 +118,7 @@ void platformAlarmInit(uint32_t aSpeedUpFactor, int aRealTimeSignal); void platformAlarmUpdateTimeout(struct timeval *tv); /** - * This function performs alarm driver processing. + * Performs alarm driver processing. * * @param[in] aInstance The OpenThread instance structure. * @@ -126,7 +126,7 @@ void platformAlarmUpdateTimeout(struct timeval *tv); void platformAlarmProcess(otInstance *aInstance); /** - * This function returns the next alarm event time. + * Returns the next alarm event time. * * @returns The next alarm fire time. * @@ -147,7 +147,7 @@ int32_t platformAlarmGetNext(void); #endif /** - * This function advances the alarm time by @p aDelta. + * Advances the alarm time by @p aDelta. * * @param[in] aDelta The amount of time to advance. * @@ -155,7 +155,7 @@ int32_t platformAlarmGetNext(void); void platformAlarmAdvanceNow(uint64_t aDelta); /** - * This function initializes the radio service used by OpenThread. + * Initializes the radio service used by OpenThread. * * @note Even when @p aPlatformConfig->mResetRadio is false, a reset event (i.e. a PROP_LAST_STATUS between * [SPINEL_STATUS_RESET__BEGIN, SPINEL_STATUS_RESET__END]) is still expected from RCP. @@ -166,13 +166,13 @@ void platformAlarmAdvanceNow(uint64_t aDelta); void platformRadioInit(const char *aUrl); /** - * This function shuts down the radio service used by OpenThread. + * Shuts down the radio service used by OpenThread. * */ void platformRadioDeinit(void); /** - * This function inputs a received radio frame. + * Inputs a received radio frame. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aBuf A pointer to the received radio frame. @@ -182,7 +182,7 @@ void platformRadioDeinit(void); void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLength); /** - * This function updates the file descriptor sets with file descriptors used by the radio driver. + * Updates the file descriptor sets with file descriptors used by the radio driver. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. @@ -193,7 +193,7 @@ void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLen void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd, struct timeval *aTimeout); /** - * This function performs radio driver processing. + * Performs radio driver processing. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aReadFdSet A pointer to the read file descriptors. @@ -203,13 +203,13 @@ void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMax void platformRadioProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet); /** - * This function initializes the random number service used by OpenThread. + * Initializes the random number service used by OpenThread. * */ void platformRandomInit(void); /** - * This function initializes the logging service used by OpenThread. + * Initializes the logging service used by OpenThread. * * @param[in] aName A name string which will be prefixed to each log line. * @@ -217,7 +217,7 @@ void platformRandomInit(void); void platformLoggingInit(const char *aName); /** - * This function updates the file descriptor sets with file descriptors used by the UART driver. + * Updates the file descriptor sets with file descriptors used by the UART driver. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. @@ -227,7 +227,7 @@ void platformLoggingInit(const char *aName); void platformUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aErrorFdSet, int *aMaxFd); /** - * This function performs radio driver processing. + * Performs radio driver processing. * * @param[in] aReadFdSet A pointer to the read file descriptors. * @param[in] aWriteFdSet A pointer to the write file descriptors. @@ -237,7 +237,7 @@ void platformUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aE void platformUartProcess(const fd_set *aReadFdSet, const fd_set *aWriteFdSet, const fd_set *aErrorFdSet); /** - * This function initializes platform netif. + * Initializes platform netif. * * @note This function is called before OpenThread instance is created. * @@ -247,7 +247,7 @@ void platformUartProcess(const fd_set *aReadFdSet, const fd_set *aWriteFdSet, co void platformNetifInit(otPlatformConfig *aPlatformConfig); /** - * This function sets up platform netif. + * Sets up platform netif. * * @note This function is called after OpenThread instance is created. * @@ -257,7 +257,7 @@ void platformNetifInit(otPlatformConfig *aPlatformConfig); void platformNetifSetUp(void); /** - * This function tears down platform netif. + * Tears down platform netif. * * @note This function is called before OpenThread instance is destructed. * @@ -265,7 +265,7 @@ void platformNetifSetUp(void); void platformNetifTearDown(void); /** - * This function deinitializes platform netif. + * Deinitializes platform netif. * * @note This function is called after OpenThread instance is destructed. * @@ -273,7 +273,7 @@ void platformNetifTearDown(void); void platformNetifDeinit(void); /** - * This function updates the file descriptor sets with file descriptors used by platform netif module. + * Updates the file descriptor sets with file descriptors used by platform netif module. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. @@ -284,7 +284,7 @@ void platformNetifDeinit(void); void platformNetifUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aErrorFdSet, int *aMaxFd); /** - * This function performs platform netif processing. + * Performs platform netif processing. * * @param[in] aReadFdSet A pointer to the read file descriptors. * @param[in] aWriteFdSet A pointer to the write file descriptors. @@ -294,7 +294,7 @@ void platformNetifUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *a void platformNetifProcess(const fd_set *aReadFdSet, const fd_set *aWriteFdSet, const fd_set *aErrorFdSet); /** - * This function performs notifies state changes to platform netif. + * Performs notifies state changes to platform netif. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aFlags Flags that denote the state change events. @@ -303,7 +303,7 @@ void platformNetifProcess(const fd_set *aReadFdSet, const fd_set *aWriteFdSet, c void platformNetifStateChange(otInstance *aInstance, otChangedFlags aFlags); /** - * This function initialize virtual time simulation. + * Initialize virtual time simulation. * * @params[in] aNodeId Node id of this simulated device. * @@ -311,13 +311,13 @@ void platformNetifStateChange(otInstance *aInstance, otChangedFlags aFlags); void virtualTimeInit(uint16_t aNodeId); /** - * This function deinitialize virtual time simulation. + * Deinitialize virtual time simulation. * */ void virtualTimeDeinit(void); /** - * This function performs virtual time simulation processing. + * Performs virtual time simulation processing. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aReadFdSet A pointer to the read file descriptors. @@ -330,7 +330,7 @@ void virtualTimeProcess(otInstance *aInstance, const fd_set *aErrorFdSet); /** - * This function updates the file descriptor sets with file descriptors + * Updates the file descriptor sets with file descriptors * used by the virtual time simulation. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. @@ -347,7 +347,7 @@ void virtualTimeUpdateFdSet(fd_set *aReadFdSet, struct timeval *aTimeout); /** - * This function sends radio spinel event of virtual time simulation. + * Sends radio spinel event of virtual time simulation. * * @param[in] aData A pointer to the spinel frame. * @param[in] aLength Length of the spinel frame. @@ -356,7 +356,7 @@ void virtualTimeUpdateFdSet(fd_set *aReadFdSet, void virtualTimeSendRadioSpinelWriteEvent(const uint8_t *aData, uint16_t aLength); /** - * This function receives an event of virtual time simulation. + * Receives an event of virtual time simulation. * * @param[out] aEvent A pointer to the event receiving the event. * @@ -364,7 +364,7 @@ void virtualTimeSendRadioSpinelWriteEvent(const uint8_t *aData, uint16_t aLength void virtualTimeReceiveEvent(struct VirtualTimeEvent *aEvent); /** - * This function sends sleep event through virtual time simulation. + * Sends sleep event through virtual time simulation. * * @param[in] aTimeout A pointer to the time sleeping. * @@ -372,7 +372,7 @@ void virtualTimeReceiveEvent(struct VirtualTimeEvent *aEvent); void virtualTimeSendSleepEvent(const struct timeval *aTimeout); /** - * This function performs radio spinel processing of virtual time simulation. + * Performs radio spinel processing of virtual time simulation. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aEvent A pointer to the current event. @@ -387,7 +387,7 @@ enum SocketBlockOption }; /** - * This function initializes platform TREL UDP6 driver. + * Initializes platform TREL UDP6 driver. * * @param[in] aTrelUrl The TREL URL (configuration for TREL platform). * @@ -395,13 +395,13 @@ enum SocketBlockOption void platformTrelInit(const char *aTrelUrl); /** - * This function shuts down the platform TREL UDP6 platform driver. + * Shuts down the platform TREL UDP6 platform driver. * */ void platformTrelDeinit(void); /** - * This function updates the file descriptor sets with file descriptors used by the TREL driver. + * Updates the file descriptor sets with file descriptors used by the TREL driver. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. @@ -412,7 +412,7 @@ void platformTrelDeinit(void); void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd, struct timeval *aTimeout); /** - * This function performs TREL driver processing. + * Performs TREL driver processing. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aReadFdSet A pointer to the read file descriptors. @@ -422,7 +422,7 @@ void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxF void platformTrelProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet); /** - * This function creates a socket with SOCK_CLOEXEC flag set. + * Creates a socket with SOCK_CLOEXEC flag set. * * @param[in] aDomain The communication domain. * @param[in] aType The semantics of communication. @@ -454,7 +454,7 @@ extern unsigned int gNetifIndex; extern otIp4Cidr gNat64Cidr; /** - * This function initializes platform Backbone network. + * Initializes platform Backbone network. * * @note This function is called before OpenThread instance is created. * @@ -464,7 +464,7 @@ extern otIp4Cidr gNat64Cidr; void platformBackboneInit(const char *aInterfaceName); /** - * This function sets up platform Backbone network. + * Sets up platform Backbone network. * * @note This function is called after OpenThread instance is created. * @@ -474,7 +474,7 @@ void platformBackboneInit(const char *aInterfaceName); void platformBackboneSetUp(void); /** - * This function tears down platform Backbone network. + * Tears down platform Backbone network. * * @note This function is called before OpenThread instance is destructed. * @@ -482,7 +482,7 @@ void platformBackboneSetUp(void); void platformBackboneTearDown(void); /** - * This function shuts down the platform Backbone network. + * Shuts down the platform Backbone network. * * @note This function is called after OpenThread instance is destructed. * @@ -490,7 +490,7 @@ void platformBackboneTearDown(void); void platformBackboneDeinit(void); /** - * This function performs notifies state changes to platform Backbone network. + * Performs notifies state changes to platform Backbone network. * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aFlags Flags that denote the state change events. @@ -517,7 +517,7 @@ extern char gBackboneNetifName[IFNAMSIZ]; extern unsigned int gBackboneNetifIndex; /** - * This function tells if the infrastructure interface is running. + * Tells if the infrastructure interface is running. * * @returns TRUE if the infrastructure interface is running, FALSE if not. * @@ -525,7 +525,7 @@ extern unsigned int gBackboneNetifIndex; bool platformInfraIfIsRunning(void); /** - * This function initializes backtrace module. + * Initializes backtrace module. * */ void platformBacktraceInit(void); diff --git a/src/posix/platform/power.hpp b/src/posix/platform/power.hpp index dbc92e05e..4edbcb2d5 100644 --- a/src/posix/platform/power.hpp +++ b/src/posix/platform/power.hpp @@ -46,7 +46,7 @@ public: Domain(void) { m8[0] = '\0'; } /** - * This method sets the regulatory domain from a given null terminated C string. + * Sets the regulatory domain from a given null terminated C string. * * @param[in] aDomain A regulatory domain name C string. * @@ -57,7 +57,7 @@ public: otError Set(const char *aDomain); /** - * This method overloads operator `==` to evaluate whether or not two `Domain` instances are equal. + * Overloads operator `==` to evaluate whether or not two `Domain` instances are equal. * * @param[in] aOther The other `Domain` instance to compare with. * @@ -68,7 +68,7 @@ public: bool operator==(const Domain &aOther) const { return strcmp(m8, aOther.m8) == 0; } /** - * This method overloads operator `!=` to evaluate whether or not the `Domain` is unequal to a given C string. + * Overloads operator `!=` to evaluate whether or not the `Domain` is unequal to a given C string. * * @param[in] aCString A C string to compare with. Can be `nullptr` which then returns 'TRUE'. * @@ -79,7 +79,7 @@ public: bool operator!=(const char *aCString) const { return (aCString == nullptr) ? true : strcmp(m8, aCString) != 0; } /** - * This method gets the regulatory domain as a null terminated C string. + * Gets the regulatory domain as a null terminated C string. * * @returns The regulatory domain as a null terminated C string array. * @@ -98,7 +98,7 @@ public: typedef String InfoString; /** - * This method parses an target power string. + * Parses an target power string. * * The string MUST follow the format: ",,". * For example, "11,26,2000" @@ -112,7 +112,7 @@ public: otError FromString(char *aString); /** - * This method returns the start channel. + * Returns the start channel. * * @returns The channel. * @@ -120,7 +120,7 @@ public: uint8_t GetChannelStart(void) const { return mChannelStart; } /** - * This method returns the end channel. + * Returns the end channel. * * @returns The channel. * @@ -128,7 +128,7 @@ public: uint8_t GetChannelEnd(void) const { return mChannelEnd; } /** - * This method returns the target power. + * Returns the target power. * * @returns The target power, in 0.01 dBm. * @@ -136,7 +136,7 @@ public: int16_t GetTargetPower(void) const { return mTargetPower; } /** - * This method converts the target power into a human-readable string. + * Converts the target power into a human-readable string. * * @returns An `InfoString` object representing the target power. * @@ -157,7 +157,7 @@ public: typedef String InfoString; /** - * This method sets the raw power setting from a given null terminated hex C string. + * Sets the raw power setting from a given null terminated hex C string. * * @param[in] aRawPowerSetting A raw power setting hex C string. * @@ -168,7 +168,7 @@ public: otError Set(const char *aRawPowerSetting); /** - * This method converts the raw power setting into a human-readable string. + * Converts the raw power setting into a human-readable string. * * @returns An `InfoString` object representing the calibrated power. * @@ -193,7 +193,7 @@ public: typedef String InfoString; /** - * This method parses an calibrated power string. + * Parses an calibrated power string. * * The string MUST follow the format: ",,,". * For example, "11,26,2000,1122aabb" @@ -207,7 +207,7 @@ public: otError FromString(char *aString); /** - * This method returns the start channel. + * Returns the start channel. * * @returns The channel. * @@ -215,7 +215,7 @@ public: uint8_t GetChannelStart(void) const { return mChannelStart; } /** - * This method sets the start channel. + * Sets the start channel. * * @param[in] aChannelStart The start channel. * @@ -223,7 +223,7 @@ public: void SetChannelStart(uint8_t aChannelStart) { mChannelStart = aChannelStart; } /** - * This method returns the end channel. + * Returns the end channel. * * @returns The channel. * @@ -231,7 +231,7 @@ public: uint8_t GetChannelEnd(void) const { return mChannelEnd; } /** - * This method sets the end channel. + * Sets the end channel. * * @param[in] aChannelEnd The end channel. * @@ -239,7 +239,7 @@ public: void SetChannelEnd(uint8_t aChannelEnd) { mChannelEnd = aChannelEnd; } /** - * This method returns the actual power. + * Returns the actual power. * * @returns The actual measured power, in 0.01 dBm. * @@ -247,7 +247,7 @@ public: int16_t GetActualPower(void) const { return mActualPower; } /** - * This method sets the actual channel. + * Sets the actual channel. * * @param[in] aActualPower The actual power in 0.01 dBm. * @@ -255,7 +255,7 @@ public: void SetActualPower(int16_t aActualPower) { mActualPower = aActualPower; } /** - * This method returns the raw power setting. + * Returns the raw power setting. * * @returns A reference to the raw power setting. * @@ -263,7 +263,7 @@ public: const RawPowerSetting &GetRawPowerSetting(void) const { return mRawPowerSetting; } /** - * This method sets the raw power setting. + * Sets the raw power setting. * * @param[in] aRawPowerSetting The raw power setting. * @@ -271,7 +271,7 @@ public: void SetRawPowerSetting(const RawPowerSetting &aRawPowerSetting) { mRawPowerSetting = aRawPowerSetting; } /** - * This method converts the calibrated power into a human-readable string. + * Converts the calibrated power into a human-readable string. * * @returns An `InfoString` object representing the calibrated power. * diff --git a/src/posix/platform/power_updater.hpp b/src/posix/platform/power_updater.hpp index fb12c2385..f20e67d60 100644 --- a/src/posix/platform/power_updater.hpp +++ b/src/posix/platform/power_updater.hpp @@ -48,7 +48,7 @@ namespace ot { namespace Posix { /** - * This class updates the target power table and calibrated power table to the RCP. + * Updates the target power table and calibrated power table to the RCP. * */ class PowerUpdater diff --git a/src/posix/platform/radio.hpp b/src/posix/platform/radio.hpp index 6a3d54956..50ca95d39 100644 --- a/src/posix/platform/radio.hpp +++ b/src/posix/platform/radio.hpp @@ -35,14 +35,14 @@ namespace ot { namespace Posix { /** - * This class manages Thread radio. + * Manages Thread radio. * */ class Radio { public: /** - * This method creates the radio manager. + * Creates the radio manager. * * @param[in] aUrl A pointer to the null-terminated URL. * @@ -50,13 +50,13 @@ public: explicit Radio(const char *aUrl); /** - * This method initialize the Thread radio. + * Initialize the Thread radio. * */ void Init(void); /** - * This method acts as an accessor to the spinel instance used by the radio. + * Acts as an accessor to the spinel instance used by the radio. * * @returns A pointer to the radio's spinel interface instance. * diff --git a/src/posix/platform/radio_url.hpp b/src/posix/platform/radio_url.hpp index 2445989a9..32b2c4c16 100644 --- a/src/posix/platform/radio_url.hpp +++ b/src/posix/platform/radio_url.hpp @@ -40,14 +40,14 @@ namespace ot { namespace Posix { /** - * This class implements the radio URL processing. + * Implements the radio URL processing. * */ class RadioUrl : public ot::Url::Url { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aUrl The null-terminated URL string. * diff --git a/src/posix/platform/resolver.hpp b/src/posix/platform/resolver.hpp index ea7da3bb4..ee063466b 100644 --- a/src/posix/platform/resolver.hpp +++ b/src/posix/platform/resolver.hpp @@ -47,7 +47,7 @@ public: constexpr static ssize_t kMaxUpstreamServerCount = 3; /** - * This method initialize the upstream DNS resolver. + * Initialize the upstream DNS resolver. * */ void Init(void); diff --git a/src/posix/platform/settings.cpp b/src/posix/platform/settings.cpp index f807ebc08..73925fe21 100644 --- a/src/posix/platform/settings.cpp +++ b/src/posix/platform/settings.cpp @@ -107,7 +107,7 @@ static int swapOpen(otInstance *aInstance) } /** - * This function reads @p aLength bytes from the data file and appends to the swap file. + * Reads @p aLength bytes from the data file and appends to the swap file. * * @param[in] aFd The file descriptor of the current swap file. * @param[in] aLength Number of bytes to copy. diff --git a/src/posix/platform/settings.hpp b/src/posix/platform/settings.hpp index 6afb0f754..d2009aa37 100644 --- a/src/posix/platform/settings.hpp +++ b/src/posix/platform/settings.hpp @@ -33,7 +33,7 @@ namespace ot { namespace Posix { /** - * This function gets a setting from the persisted file. + * Gets a setting from the persisted file. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aKey The key associated with the requested setting. @@ -48,7 +48,7 @@ namespace Posix { otError PlatformSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength); /** - * This function sets a setting in the persisted file. + * Sets a setting in the persisted file. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aKey The key associated with the requested setting. @@ -59,7 +59,7 @@ otError PlatformSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, ui void PlatformSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength); /** - * This function adds a setting to the persisted file. + * Adds a setting to the persisted file. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aKey The key associated with the requested setting. @@ -70,7 +70,7 @@ void PlatformSettingsSet(otInstance *aInstance, uint16_t aKey, const uint8_t *aV void PlatformSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aValue, uint16_t aValueLength); /** - * This function removes a setting either from swap file or persisted file. + * Removes a setting either from swap file or persisted file. * * @param[in] aInstance The OpenThread instance structure. * @param[in] aKey The key associated with the requested setting. @@ -88,7 +88,7 @@ void PlatformSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *aV otError PlatformSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex, int *aSwapFd); /** - * This function gets the sensitive keys that should be stored in the secure area. + * Gets the sensitive keys that should be stored in the secure area. * * @param[in] aInstance The OpenThread instance structure. * @param[out] aKeys A pointer to where the pointer to the array containing sensitive keys should be written. diff --git a/src/posix/platform/spi_interface.hpp b/src/posix/platform/spi_interface.hpp index 0f3242e35..bd24d3f09 100644 --- a/src/posix/platform/spi_interface.hpp +++ b/src/posix/platform/spi_interface.hpp @@ -50,14 +50,14 @@ namespace ot { namespace Posix { /** - * This class defines an SPI interface to the Radio Co-processor (RCP). + * Defines an SPI interface to the Radio Co-processor (RCP). * */ class SpiInterface { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aCallback A reference to a `Callback` object. * @param[in] aCallbackContext The context pointer passed to the callback. @@ -75,7 +75,7 @@ public: ~SpiInterface(void); /** - * This method initializes the interface to the Radio Co-processor (RCP). + * Initializes the interface to the Radio Co-processor (RCP). * * @note This method should be called before reading and sending spinel frames to the interface. * @@ -89,13 +89,13 @@ public: otError Init(const Url::Url &aRadioUrl); /** - * This method deinitializes the interface to the RCP. + * Deinitializes the interface to the RCP. * */ void Deinit(void); /** - * This method encodes and sends a spinel frame to Radio Co-processor (RCP) over the socket. + * Encodes and sends a spinel frame to Radio Co-processor (RCP) over the socket. * * @param[in] aFrame A pointer to buffer containing the spinel frame to send. * @param[in] aLength The length (number of bytes) in the frame. @@ -109,7 +109,7 @@ public: otError SendFrame(const uint8_t *aFrame, uint16_t aLength); /** - * This method waits for receiving part or all of spinel frame within specified interval. + * Waits for receiving part or all of spinel frame within specified interval. * * @param[in] aTimeout The timeout value in microseconds. * @@ -120,7 +120,7 @@ public: otError WaitForFrame(uint64_t aTimeoutUs); /** - * This method updates the file descriptor sets with file descriptors used by the radio driver. + * Updates the file descriptor sets with file descriptors used by the radio driver. * * @param[in,out] aReadFdSet A reference to the read file descriptors. * @param[in,out] aWriteFdSet A reference to the write file descriptors. @@ -131,7 +131,7 @@ public: void UpdateFdSet(fd_set &aReadFdSet, fd_set &aWriteFdSet, int &aMaxFd, struct timeval &aTimeout); /** - * This method performs radio driver processing. + * Performs radio driver processing. * * @param[in] aContext The context containing fd_sets. * @@ -139,7 +139,7 @@ public: void Process(const RadioProcessContext &aContext); /** - * This method returns the bus speed between the host and the radio. + * Returns the bus speed between the host and the radio. * * @returns Bus speed in bits/second. * @@ -147,7 +147,7 @@ public: uint32_t GetBusSpeed(void) const { return ((mSpiDevFd >= 0) ? mSpiSpeedHz : 0); } /** - * This method hardware resets the RCP. + * Hardware resets the RCP. * * @retval OT_ERROR_NONE Successfully reset the RCP. * @retval OT_ERROR_NOT_IMPLEMENT The hardware reset is not implemented. @@ -156,7 +156,7 @@ public: otError HardwareReset(void); /** - * This method returns the RCP interface metrics. + * Returns the RCP interface metrics. * * @returns The RCP interface metrics. * diff --git a/src/posix/platform/system.cpp b/src/posix/platform/system.cpp index 6f11db727..b6895bfcd 100644 --- a/src/posix/platform/system.cpp +++ b/src/posix/platform/system.cpp @@ -290,7 +290,7 @@ void otSysDeinit(void) #if OPENTHREAD_POSIX_VIRTUAL_TIME /** - * This function try selecting the given file descriptors in nonblocking mode. + * Try selecting the given file descriptors in nonblocking mode. * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. diff --git a/src/posix/platform/system.hpp b/src/posix/platform/system.hpp index 871226a43..25c047b2d 100644 --- a/src/posix/platform/system.hpp +++ b/src/posix/platform/system.hpp @@ -33,7 +33,7 @@ */ /* - * This method returns if the system will run in dry-run mode. + * Returns if the system will run in dry-run mode. * * @returns If the system runs in dry-run mode. * diff --git a/src/posix/platform/utils.hpp b/src/posix/platform/utils.hpp index c3f9dda72..21d4449f7 100644 --- a/src/posix/platform/utils.hpp +++ b/src/posix/platform/utils.hpp @@ -35,7 +35,7 @@ namespace ot { namespace Posix { /** - * This method formats a system command to execute. + * Formats a system command to execute. * * @param[in] aFormat A pointer to the format string. * @param[in] ... Arguments for the format specification. diff --git a/src/posix/platform/vendor_interface.hpp b/src/posix/platform/vendor_interface.hpp index 8c82c204d..726761247 100644 --- a/src/posix/platform/vendor_interface.hpp +++ b/src/posix/platform/vendor_interface.hpp @@ -47,14 +47,14 @@ namespace ot { namespace Posix { /** - * This class defines a vendor interface to the Radio Co-processor (RCP). + * Defines a vendor interface to the Radio Co-processor (RCP). * */ class VendorInterface { public: /** - * This constructor initializes the object. + * Initializes the object. * * @param[in] aCallback A reference to a `Callback` object. * @param[in] aCallbackContext The context pointer passed to the callback. @@ -72,7 +72,7 @@ public: ~VendorInterface(void); /** - * This method initializes the interface to the Radio Co-processor (RCP). + * Initializes the interface to the Radio Co-processor (RCP). * * @note This method should be called before reading and sending spinel frames to the interface. * @@ -86,13 +86,13 @@ public: otError Init(const Url::Url &aRadioUrl); /** - * This method deinitializes the interface to the RCP. + * Deinitializes the interface to the RCP. * */ void Deinit(void); /** - * This method encodes and sends a spinel frame to Radio Co-processor (RCP) over the socket. + * Encodes and sends a spinel frame to Radio Co-processor (RCP) over the socket. * * @param[in] aFrame A pointer to buffer containing the spinel frame to send. * @param[in] aLength The length (number of bytes) in the frame. @@ -106,7 +106,7 @@ public: otError SendFrame(const uint8_t *aFrame, uint16_t aLength); /** - * This method waits for receiving part or all of spinel frame within specified interval. + * Waits for receiving part or all of spinel frame within specified interval. * * @param[in] aTimeoutUs The timeout value in microseconds. * @@ -117,7 +117,7 @@ public: otError WaitForFrame(uint64_t aTimeoutUs); /** - * This method updates the file descriptor sets with file descriptors used by the radio driver. + * Updates the file descriptor sets with file descriptors used by the radio driver. * * @param[in,out] aReadFdSet A reference to the read file descriptors. * @param[in,out] aWriteFdSet A reference to the write file descriptors. @@ -128,7 +128,7 @@ public: void UpdateFdSet(fd_set &aReadFdSet, fd_set &aWriteFdSet, int &aMaxFd, struct timeval &aTimeout); /** - * This method performs radio driver processing. + * Performs radio driver processing. * * @param[in] aContext The context containing fd_sets. * @@ -136,7 +136,7 @@ public: void Process(const RadioProcessContext &aContext); /** - * This method returns the bus speed between the host and the radio. + * Returns the bus speed between the host and the radio. * * @returns Bus speed in bits/second. * @@ -144,7 +144,7 @@ public: uint32_t GetBusSpeed(void) const; /** - * This method hardware resets the RCP. + * Hardware resets the RCP. * * @retval OT_ERROR_NONE Successfully reset the RCP. * @retval OT_ERROR_NOT_IMPLEMENT The hardware reset is not implemented. @@ -153,7 +153,7 @@ public: otError HardwareReset(void); /** - * This method returns the RCP interface metrics. + * Returns the RCP interface metrics. * * @returns The RCP interface metrics. * diff --git a/src/posix/platform/vendor_interface_example.cpp b/src/posix/platform/vendor_interface_example.cpp index ebf6b7869..12b8b82a1 100644 --- a/src/posix/platform/vendor_interface_example.cpp +++ b/src/posix/platform/vendor_interface_example.cpp @@ -43,7 +43,7 @@ namespace Posix { using ot::Spinel::SpinelInterface; /** - * This class defines the vendor implementation object. + * Defines the vendor implementation object. * */ class VendorInterfaceImpl diff --git a/tests/unit/test_lowpan.cpp b/tests/unit/test_lowpan.cpp index f50f868e9..67fe5f6b9 100644 --- a/tests/unit/test_lowpan.cpp +++ b/tests/unit/test_lowpan.cpp @@ -99,7 +99,7 @@ void TestIphcVector::GetUncompressedStream(Message &aMessage) } /** - * This function initializes Thread Interface. + * Initializes Thread Interface. * */ static void Init(void) @@ -134,7 +134,7 @@ static void Init(void) } /** - * This function performs compression or/and decompression based on the given test vector. + * Performs compression or/and decompression based on the given test vector. * * @note Performing decompression and compression on the same LOWPAN_IPHC frame may give different result. * This situation may occur when sender does not use the best possible compression, diff --git a/tests/unit/test_lowpan.hpp b/tests/unit/test_lowpan.hpp index 1625dbc65..a9542b9e7 100644 --- a/tests/unit/test_lowpan.hpp +++ b/tests/unit/test_lowpan.hpp @@ -68,7 +68,7 @@ public: } /** - * This method sets long MAC source address. + * Sets long MAC source address. * * @param aAddress Pointer to the long MAC address. * @@ -76,7 +76,7 @@ public: void SetMacSource(const uint8_t *aAddress) { mMacAddrs.mSource.SetExtended(aAddress); } /** - * This method sets short MAC source address. + * Sets short MAC source address. * * @param aAddress Short MAC address. * @@ -84,7 +84,7 @@ public: void SetMacSource(uint16_t aAddress) { mMacAddrs.mSource.SetShort(aAddress); } /** - * This method sets long MAC destination address. + * Sets long MAC destination address. * * @param aAddress Pointer to the long MAC address. * @@ -92,7 +92,7 @@ public: void SetMacDestination(const uint8_t *aAddress) { mMacAddrs.mDestination.SetExtended(aAddress); } /** - * This method sets short MAC destination address. + * Sets short MAC destination address. * * @param aAddress Short MAC address. * @@ -100,7 +100,7 @@ public: void SetMacDestination(uint16_t aAddress) { mMacAddrs.mDestination.SetShort(aAddress); } /** - * This method gets the IPv6 header + * Gets the IPv6 header * * @returns the IPv6 header. * @@ -108,7 +108,7 @@ public: const Ip6::Header &GetIpHeader(void) const { return mIpHeader; } /** - * This method initializes IPv6 Header. + * Initializes IPv6 Header. * * @param aVersionClassFlow Value of the Version, Traffic class and Flow control fields. * @param aPayloadLength Value of the payload length field. @@ -134,7 +134,7 @@ public: } /** - * This method initializes IPv6 Encapsulated Header. + * Initializes IPv6 Encapsulated Header. * * @param aVersionClassFlow Value of the Version, Traffic class and Flow control fields. * @param aPayloadLength Value of the payload length field. @@ -160,7 +160,7 @@ public: } /** - * This method initializes IPv6 Extension Header. + * Initializes IPv6 Extension Header. * * @param aExtHeader Pointer to the extension header data. * @param aExtHeaderLength Length of the extension header data. @@ -173,7 +173,7 @@ public: } /** - * This method initializes UDP Header. + * Initializes UDP Header. * * @param aSource Value of the source port. * @param aDestination Value of the destination port. @@ -190,7 +190,7 @@ public: } /** - * This method initializes LOWPAN_IPHC Header. + * Initializes LOWPAN_IPHC Header. * * @param aIphc Pointer to the LOWPAN_IPHC header. * @param aIphcLength Length of the LOWPAN_IPHC header. @@ -203,7 +203,7 @@ public: } /** - * This method sets the expect result of the compression / decompression procedure. + * Sets the expect result of the compression / decompression procedure. * * @param aError Expected result. * @@ -211,7 +211,7 @@ public: void SetError(Error aError) { mError = aError; } /** - * This method initializes IPv6 Payload (uncompressed data). + * Initializes IPv6 Payload (uncompressed data). * * @param aPayload Pointer to the payload data. * @param aLength Length of the payload data. @@ -224,7 +224,7 @@ public: } /** - * This method sets the offset from the beginning of the IPv6 header to the uncompressed + * Sets the offset from the beginning of the IPv6 header to the uncompressed * payload. * * @param aPayloadOffset The offset from the beginning of the IPv6 header to the uncompressed @@ -234,7 +234,7 @@ public: void SetPayloadOffset(uint16_t aPayloadOffset) { mPayloadOffset = aPayloadOffset; } /** - * This method returns compressed LOWPAN_IPHC frame. + * Returns compressed LOWPAN_IPHC frame. * * @returns The compressed stream. * @@ -242,7 +242,7 @@ public: void GetCompressedStream(uint8_t *aIphc, uint16_t &aIphcLength); /** - * This method returns message object with the uncompressed IPv6 packet. + * Returns message object with the uncompressed IPv6 packet. * * @returns The message object with the uncompressed IPv6 packet. * @@ -250,7 +250,7 @@ public: void GetUncompressedStream(Message &aMessage); /** - * This method returns data with the uncompressed IPv6 packet. + * Returns data with the uncompressed IPv6 packet. * * @returns The data with the uncompressed IPv6 packet. * diff --git a/tests/unit/test_util.h b/tests/unit/test_util.h index 5630a53d8..4b3931f20 100644 --- a/tests/unit/test_util.h +++ b/tests/unit/test_util.h @@ -39,7 +39,7 @@ extern "C" { #endif /** - * This macro verifies a given error status to be successful (compared against value zero (0)), otherwise, it emits a + * Verifies a given error status to be successful (compared against value zero (0)), otherwise, it emits a * given error messages and exits the program. * * @param[in] aStatus A scalar error status to be evaluated against zero (0). @@ -58,7 +58,7 @@ extern "C" { } while (false) /** - * This macro verifies that a given boolean condition is true, otherwise, it emits a given error message and exits the + * Verifies that a given boolean condition is true, otherwise, it emits a given error message and exits the * program. * * @param[in] aCondition A Boolean expression to be evaluated. diff --git a/tests/unit/test_util.hpp b/tests/unit/test_util.hpp index e561fc2d1..6f248d0df 100644 --- a/tests/unit/test_util.hpp +++ b/tests/unit/test_util.hpp @@ -34,7 +34,7 @@ #include "test_util.h" /** - * This function prints the content of a given buffer to screen as a hex dump along with ASCII text translation. + * Prints the content of a given buffer to screen as a hex dump along with ASCII text translation. * * @param[in] aTextMessag A text message to describe the buffer content (printed before the buffer content) * @param[in] aBuffer A pointer to the buffer diff --git a/tools/ot-fct/cli.hpp b/tools/ot-fct/cli.hpp index e679ef593..452299a67 100644 --- a/tools/ot-fct/cli.hpp +++ b/tools/ot-fct/cli.hpp @@ -47,7 +47,7 @@ namespace Fct { class Cli; /** - * This class implements the factory CLI. + * Implements the factory CLI. * */ class Cli @@ -60,7 +60,7 @@ public: } /** - * This method processes a factory command. + * Processes a factory command. * * @param[in] aArgs The arguments of command line. * @param[in] aArgsLength The number of args in @p aArgs. @@ -69,7 +69,7 @@ public: void ProcessCommand(Utils::CmdLineParser::Arg aArgs[]); /** - * This method processes the command line. + * Processes the command line. * * @param[in] aLine A pointer to a command line string. * @@ -77,7 +77,7 @@ public: void ProcessLine(char *aLine); /** - * This method outputs the prompt. + * Outputs the prompt. * */ void OutputPrompt(void);