diff --git a/doc/ot_api_doc.h b/doc/ot_api_doc.h index 2513e092dbc..1e89578c2a6 100644 --- a/doc/ot_api_doc.h +++ b/doc/ot_api_doc.h @@ -160,7 +160,6 @@ * @} * * @} - * */ /** @@ -193,5 +192,4 @@ * @defgroup plat-trel TREL - Platform * * @} - * */ diff --git a/doc/ot_config_doc.h b/doc/ot_config_doc.h index 96d8f503869..e72eb232985 100644 --- a/doc/ot_config_doc.h +++ b/doc/ot_config_doc.h @@ -88,5 +88,4 @@ * @defgroup config-wakeup Wake-up * * @} - * */ diff --git a/examples/apps/cli/cli_uart.cpp b/examples/apps/cli/cli_uart.cpp index 81f05f825ec..cee0903ab20 100644 --- a/examples/apps/cli/cli_uart.cpp +++ b/examples/apps/cli/cli_uart.cpp @@ -49,7 +49,6 @@ * @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE * * The size of CLI UART RX buffer in bytes. - * */ #ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE @@ -63,7 +62,6 @@ * @def OPENTHREAD_CONFIG_CLI_TX_BUFFER_SIZE * * The size of CLI message buffer in bytes. - * */ #ifndef OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE #define OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE 1024 @@ -106,7 +104,6 @@ uint16_t sSendLength; /** * Macro to acquire an exclusive lock of uart cli output * Default implementation does nothing - * */ #ifndef OT_CLI_UART_OUTPUT_LOCK #define OT_CLI_UART_OUTPUT_LOCK() \ @@ -118,7 +115,6 @@ uint16_t sSendLength; /** * Macro to release the exclusive lock of uart cli output * Default implementation does nothing - * */ #ifndef OT_CLI_UART_OUTPUT_UNLOCK #define OT_CLI_UART_OUTPUT_UNLOCK() \ diff --git a/examples/apps/cli/main.c b/examples/apps/cli/main.c index 6e18b430ec1..f239fb935ec 100644 --- a/examples/apps/cli/main.c +++ b/examples/apps/cli/main.c @@ -51,7 +51,6 @@ * Initializes the CLI app. * * @param[in] aInstance The OpenThread instance structure. - * */ extern void otAppCliInit(otInstance *aInstance); diff --git a/examples/apps/ncp/main.c b/examples/apps/ncp/main.c index 5f59261e80c..1109b70d3fc 100644 --- a/examples/apps/ncp/main.c +++ b/examples/apps/ncp/main.c @@ -56,7 +56,6 @@ * Initializes the NCP app. * * @param[in] aInstance The OpenThread instance structure. - * */ extern void otAppNcpInit(otInstance *aInstance); extern void otAppNcpInitMulti(otInstance **aInstances, uint8_t count); diff --git a/examples/config/ot-core-config-check-size-br.h b/examples/config/ot-core-config-check-size-br.h index b8bf96feab0..dc34a344655 100644 --- a/examples/config/ot-core-config-check-size-br.h +++ b/examples/config/ot-core-config-check-size-br.h @@ -29,7 +29,6 @@ /** * This header file defines the OpenThread core configuration example for an Border Router. This is intended for use * in `script/check-size`. - * */ #ifndef OT_CORE_CONFIG_CHECK_SIZE_BR_H_ diff --git a/examples/config/ot-core-config-check-size-ftd.h b/examples/config/ot-core-config-check-size-ftd.h index 3cda3271bb8..2c663f2b6bb 100644 --- a/examples/config/ot-core-config-check-size-ftd.h +++ b/examples/config/ot-core-config-check-size-ftd.h @@ -29,7 +29,6 @@ /** * This header file defines the OpenThread core configuration example for an FTD device (not acting as BR). This is * intended for use in `script/check-size`. - * */ #ifndef OT_CORE_CONFIG_CHECK_SIZE_FTD_H_ diff --git a/examples/config/ot-core-config-check-size-mtd.h b/examples/config/ot-core-config-check-size-mtd.h index 310cfce9d3b..56e5454ae9c 100644 --- a/examples/config/ot-core-config-check-size-mtd.h +++ b/examples/config/ot-core-config-check-size-mtd.h @@ -29,7 +29,6 @@ /** * This header file defines the OpenThread core configuration example for an MTD/SED device. This is intended for use * in `script/check-size`. - * */ #ifndef OT_CORE_CONFIG_CHECK_SIZE_MTD_H_ diff --git a/examples/platforms/openthread-system.h b/examples/platforms/openthread-system.h index 90503ecd3d9..cde93e96c76 100644 --- a/examples/platforms/openthread-system.h +++ b/examples/platforms/openthread-system.h @@ -49,7 +49,6 @@ extern "C" { * * @param[in] argc Number of arguments in @p argv. * @param[in] argv Argument vector. - * */ void otSysInit(int argc, char *argv[]); @@ -58,7 +57,6 @@ void otSysInit(int argc, char *argv[]); * * @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. - * */ void otSysDeinit(void); @@ -69,7 +67,6 @@ void otSysDeinit(void); * * @note This function is not called by the OpenThread library. Instead, the system/RTOS should call this function * in the main loop to determine when to shut down and re-initialize the OpenThread instance. - * */ bool otSysPseudoResetWasRequested(void); @@ -80,7 +77,6 @@ bool otSysPseudoResetWasRequested(void); * in the main loop when processing OpenThread's drivers is most appropriate. * * @param[in] aInstance The OpenThread instance structure. - * */ void otSysProcessDrivers(otInstance *aInstance); @@ -89,7 +85,6 @@ void otSysProcessDrivers(otInstance *aInstance); * * @note This function is not handled by the OpenThread library. Instead, the system/RTOS should handle this function * and schedule a call to `otSysProcessDrivers()`. - * */ extern void otSysEventSignalPending(void); diff --git a/examples/platforms/simulation/diag.c b/examples/platforms/simulation/diag.c index 8ce6efcfdef..d8c5162a300 100644 --- a/examples/platforms/simulation/diag.c +++ b/examples/platforms/simulation/diag.c @@ -44,7 +44,6 @@ /** * Diagnostics mode variables. - * */ static bool sDiagMode = false; diff --git a/examples/platforms/simulation/entropy.c b/examples/platforms/simulation/entropy.c index b567b0b635c..951bddeba31 100644 --- a/examples/platforms/simulation/entropy.c +++ b/examples/platforms/simulation/entropy.c @@ -29,7 +29,6 @@ /** * @file * This file implements an entropy source based on /dev/urandom or pseudo-random generator. - * */ #include "platform-simulation.h" diff --git a/examples/platforms/simulation/platform-config.h b/examples/platforms/simulation/platform-config.h index 3e953d14c27..645e7fb3179 100644 --- a/examples/platforms/simulation/platform-config.h +++ b/examples/platforms/simulation/platform-config.h @@ -29,14 +29,12 @@ /** * @file * This file includes the platform-specific configuration. - * */ /** * @def OPENTHREAD_SIMULATION_UART_BAUDRATE * * This setting configures the baud rate of the UART. - * */ #ifndef OPENTHREAD_SIMULATION_UART_BAUDRATE #define OPENTHREAD_SIMULATION_UART_BAUDRATE B115200 @@ -46,7 +44,6 @@ * @def OPENTHREAD_SIMULATION_VIRTUAL_TIME * * This setting configures whether to use virtual time (used for simulation) in simulation platform. - * */ #ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME #define OPENTHREAD_SIMULATION_VIRTUAL_TIME 0 @@ -56,7 +53,6 @@ * @def OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART * * This setting configures whether to use virtual time for UART. - * */ #ifndef OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART #define OPENTHREAD_SIMULATION_VIRTUAL_TIME_UART 0 @@ -66,7 +62,6 @@ * @def OPENTHREAD_PLATFORM_USE_PSEUDO_RESET * * Define as 1 to enable pseudo-reset. - * */ #ifndef OPENTHREAD_PLATFORM_USE_PSEUDO_RESET #define OPENTHREAD_PLATFORM_USE_PSEUDO_RESET 0 @@ -76,7 +71,6 @@ * @def OPENTHREAD_CONFIG_NCP_SPI_ENABLE * * Define as 1 to enable SPI NCP interface. - * */ #ifndef OPENTHREAD_CONFIG_NCP_SPI_ENABLE #define OPENTHREAD_CONFIG_NCP_SPI_ENABLE 0 @@ -84,7 +78,6 @@ /** * Check OTNS configurations - * */ #if OPENTHREAD_CONFIG_OTNS_ENABLE @@ -98,7 +91,6 @@ * @def OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE * * This setting configures the maximum network size in simulation. - * */ #ifndef OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE #define OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE 33 @@ -111,7 +103,6 @@ * socket. * * This is intended for testing of the OpenThread Multicast DNS (mDNS) module. - * */ #ifndef OPENTHREAD_SIMULATION_MDNS_SOCKET_IMPLEMENT_POSIX #define OPENTHREAD_SIMULATION_MDNS_SOCKET_IMPLEMENT_POSIX 0 @@ -121,7 +112,6 @@ * @def OPENTHREAD_SIMULATION_IMPLMENT_INFRA_IF * * Define as 1 for the simulation platform to provide implementation of `otPlatInfra` APIs. - * */ #ifndef OPENTHREAD_SIMULATION_IMPLEMENT_INFRA_IF #define OPENTHREAD_SIMULATION_IMPLEMENT_INFRA_IF 1 diff --git a/examples/platforms/simulation/platform-simulation.h b/examples/platforms/simulation/platform-simulation.h index 1a12e9e91b1..a985b68fbb7 100644 --- a/examples/platforms/simulation/platform-simulation.h +++ b/examples/platforms/simulation/platform-simulation.h @@ -86,13 +86,11 @@ enum /** * Unique node ID. - * */ extern uint32_t gNodeId; /** * Initializes the alarm service used by OpenThread. - * */ void platformAlarmInit(uint32_t aSpeedUpFactor); @@ -100,7 +98,6 @@ void platformAlarmInit(uint32_t aSpeedUpFactor); * Retrieves the time remaining until the alarm fires. * * @param[out] aTimeout A pointer to the timeval struct. - * */ void platformAlarmUpdateTimeout(struct timeval *aTimeout); @@ -108,7 +105,6 @@ void platformAlarmUpdateTimeout(struct timeval *aTimeout); * Performs alarm driver processing. * * @param[in] aInstance The OpenThread instance structure. - * */ void platformAlarmProcess(otInstance *aInstance); @@ -116,7 +112,6 @@ void platformAlarmProcess(otInstance *aInstance); * Returns the duration to the next alarm event time (in micro seconds) * * @returns The duration (in micro seconds) to the next alarm event. - * */ uint64_t platformAlarmGetNext(void); @@ -124,7 +119,6 @@ uint64_t platformAlarmGetNext(void); * Returns the current alarm time. * * @returns The current alarm time. - * */ uint64_t platformAlarmGetNow(void); @@ -132,19 +126,16 @@ uint64_t platformAlarmGetNow(void); * Advances the alarm time by @p aDelta. * * @param[in] aDelta The amount of time to advance. - * */ void platformAlarmAdvanceNow(uint64_t aDelta); /** * Initializes the radio service used by OpenThread. - * */ void platformRadioInit(void); /** * Shuts down the radio service used by OpenThread. - * */ void platformRadioDeinit(void); @@ -154,7 +145,6 @@ void platformRadioDeinit(void); * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aBuf A pointer to the received radio frame. * @param[in] aBufLength The size of the received radio frame. - * */ void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLength); @@ -165,7 +155,6 @@ void platformRadioReceive(otInstance *aInstance, uint8_t *aBuf, uint16_t aBufLen * @param[in,out] aWriteFdSet A pointer to the write file descriptors. * @param[in,out] aTimeout A pointer to the timeout. * @param[in,out] aMaxFd A pointer to the max file descriptor. - * */ void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd); @@ -175,13 +164,11 @@ void platformRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct ti * @param[in] aInstance The OpenThread instance structure. * @param[in] aReadFdSet A pointer to the read file descriptors. * @param[in] aWriteFdSet A pointer to the write file descriptors. - * */ void platformRadioProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet); /** * Initializes the random number service used by OpenThread. - * */ void platformRandomInit(void); @@ -189,7 +176,6 @@ void platformRandomInit(void); * This functions set the file name to use for logging. * * @param[in] aName The file name. - * */ void platformLoggingSetFileName(const char *aName); @@ -197,13 +183,11 @@ void platformLoggingSetFileName(const char *aName); * Initializes the platform logging service. * * @param[in] aName The log module name to set with syslog. - * */ void platformLoggingInit(const char *aName); /** * Finalizes the platform logging service. - * */ void platformLoggingDeinit(void); @@ -213,19 +197,16 @@ void platformLoggingDeinit(void); * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. * @param[in,out] aMaxFd A pointer to the max file descriptor. - * */ void platformUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, fd_set *aErrorFdSet, int *aMaxFd); /** * Performs radio driver processing. - * */ void platformUartProcess(void); /** * Restores the Uart. - * */ void platformUartRestore(void); @@ -233,7 +214,6 @@ void platformUartRestore(void); * Sends a simulation event. * * @param[in] aEvent A pointer to the simulation event to send - * */ void otSimSendEvent(const struct Event *aEvent); @@ -242,7 +222,6 @@ void otSimSendEvent(const struct Event *aEvent); * * @param[in] aData A pointer to the UART data. * @param[in] aLength Length of UART data. - * */ void otSimSendUartWriteEvent(const uint8_t *aData, uint16_t aLength); @@ -250,7 +229,6 @@ void otSimSendUartWriteEvent(const uint8_t *aData, uint16_t aLength); * Checks if radio transmitting is pending. * * @returns Whether radio transmitting is pending. - * */ bool platformRadioIsTransmitPending(void); @@ -262,7 +240,6 @@ bool platformRadioIsTransmitPending(void); * * @param[in] aEnvName The name of the environment variable. * @param[out] aValue A pointer to the unsigned 16-bit integer. - * */ void parseFromEnvAsUint16(const char *aEnvName, uint16_t *aValue); @@ -272,13 +249,11 @@ void parseFromEnvAsUint16(const char *aEnvName, uint16_t *aValue); * Initializes the TREL service. * * @param[in] aSpeedUpFactor The time speed-up factor. - * */ void platformTrelInit(uint32_t aSpeedUpFactor); /** * Shuts down the TREL service. - * */ void platformTrelDeinit(void); @@ -289,7 +264,6 @@ void platformTrelDeinit(void); * @param[in,out] aWriteFdSet A pointer to the write file descriptors. * @param[in,out] aTimeout A pointer to the timeout. * @param[in,out] aMaxFd A pointer to the max file descriptor. - * */ void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd); @@ -299,7 +273,6 @@ void platformTrelUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct tim * @param[in] aInstance The OpenThread instance structure. * @param[in] aReadFdSet A pointer to the read file descriptors. * @param[in] aWriteFdSet A pointer to the write file descriptors. - * */ void platformTrelProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet); @@ -309,13 +282,11 @@ void platformTrelProcess(otInstance *aInstance, const fd_set *aReadFdSet, const /** * Initializes the platform infra-if module. - * */ void platformInfraIfInit(void); /** * Shuts down the platform infra-if module. - * */ void platformInfraIfDeinit(void); @@ -325,7 +296,6 @@ void platformInfraIfDeinit(void); * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aWriteFdSet A pointer to the write file descriptors. * @param[in,out] aMaxFd A pointer to the max file descriptor. - * */ void platformInfraIfUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd); @@ -335,7 +305,6 @@ void platformInfraIfUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aM * @param[in] aInstance The OpenThread instance structure. * @param[in] aReadFdSet A pointer to the read file descriptors. * @param[in] aWriteFdSet A pointer to the write file descriptors. - * */ void platformInfraIfProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet); @@ -348,7 +317,6 @@ void platformInfraIfProcess(otInstance *aInstance, const fd_set *aReadFdSet, con * * @param[in,out] aReadFdSet A pointer to the read file descriptors. * @param[in,out] aMaxFd A pointer to the max file descriptor. - * */ void platformMdnsSocketUpdateFdSet(fd_set *aReadFdSet, int *aMaxFd); @@ -357,7 +325,6 @@ void platformMdnsSocketUpdateFdSet(fd_set *aReadFdSet, int *aMaxFd); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aReadFdSet A pointer to the read file descriptors. - * */ void platformMdnsSocketProcess(otInstance *aInstance, const fd_set *aReadFdSet); @@ -365,7 +332,6 @@ void platformMdnsSocketProcess(otInstance *aInstance, const fd_set *aReadFdSet); /** * Shuts down the BLE service used by OpenThread. - * */ void platformBleDeinit(void); @@ -376,7 +342,6 @@ void platformBleDeinit(void); * @param[in,out] aWriteFdSet A pointer to the write file descriptors. * @param[in,out] aTimeout A pointer to the timeout. * @param[in,out] aMaxFd A pointer to the max file descriptor. - * */ void platformBleUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct timeval *aTimeout, int *aMaxFd); @@ -386,7 +351,6 @@ void platformBleUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, struct time * @param[in] aInstance The OpenThread instance structure. * @param[in] aReadFdSet A pointer to the read file descriptors. * @param[in] aWriteFdSet A pointer to the write file descriptors. - * */ void platformBleProcess(otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet); diff --git a/examples/platforms/simulation/simul_utils.h b/examples/platforms/simulation/simul_utils.h index a25389f45ae..d366c69e4c2 100644 --- a/examples/platforms/simulation/simul_utils.h +++ b/examples/platforms/simulation/simul_utils.h @@ -35,7 +35,6 @@ * Represents a socket for communication with other simulation node. * * This is used for emulation of 15.4 radio or other interfaces. - * */ typedef struct utilsSocket { @@ -60,7 +59,6 @@ extern const char *gLocalInterface; ///< Local interface name or address to use * @param[in] aFd The FD to add. * @param[in] aFdSet The FD set to add to. * @param[in] aMaxFd A pointer to track maximum FD in @p aFdSet (can be NULL). - * */ void utilsAddFdToFdSet(int aFd, fd_set *aFdSet, int *aMaxFd); @@ -69,7 +67,6 @@ void utilsAddFdToFdSet(int aFd, fd_set *aFdSet, int *aMaxFd); * * @param[in] aSocket The socket to initialize. * @param[in] aPortBase The base port number value. Nodes will determine their port as `aPortBased + gNodeId`. - * */ void utilsInitSocket(utilsSocket *aSocket, uint16_t aPortBase); @@ -77,7 +74,6 @@ void utilsInitSocket(utilsSocket *aSocket, uint16_t aPortBase); * De-initializes the socket. * * @param[in] aSocket The socket to de-initialize. - * */ void utilsDeinitSocket(utilsSocket *aSocket); @@ -87,7 +83,6 @@ void utilsDeinitSocket(utilsSocket *aSocket); * @param[in] aSocket The socket. * @param[in] aFdSet The (read) FD set to add to. * @param[in] aMaxFd A pointer to track maximum FD in @p aFdSet (can be NULL). - * */ void utilsAddSocketRxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd); @@ -97,7 +92,6 @@ void utilsAddSocketRxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd) * @param[in] aSocket The socket. * @param[in] aFdSet The (write) FD set to add to. * @param[in] aMaxFd A pointer to track maximum FD in @p aFdSet (can be NULL). - * */ void utilsAddSocketTxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd); @@ -109,7 +103,6 @@ void utilsAddSocketTxFd(const utilsSocket *aSocket, fd_set *aFdSet, int *aMaxFd) * * @retval TRUE The socket RX FD is in @p aReadFdSet, and socket can receive. * @retval FALSE The socket RX FD is not in @p aReadFdSet. Socket is not ready to receive. - * */ bool utilsCanSocketReceive(const utilsSocket *aSocket, const fd_set *aReadFdSet); @@ -121,7 +114,6 @@ bool utilsCanSocketReceive(const utilsSocket *aSocket, const fd_set *aReadFdSet) * * @retval TRUE The socket TX FD is in @p aWriteFdSet, and socket can send. * @retval FALSE The socket TX FD is not in @p aWriteFdSet. Socket is not ready to send. - * */ bool utilsCanSocketSend(const utilsSocket *aSocket, const fd_set *aWriteFdSet); @@ -137,7 +129,6 @@ bool utilsCanSocketSend(const utilsSocket *aSocket, const fd_set *aWriteFdSet); * Can be NULL if not needed. * * @returns The number of received bytes written into @p aBuffer. - * */ uint16_t utilsReceiveFromSocket(const utilsSocket *aSocket, void *aBuffer, @@ -150,7 +141,6 @@ uint16_t utilsReceiveFromSocket(const utilsSocket *aSocket, * @param[in] aSocket The socket. * @param[in] aBuffer The buffer containing the bytes to sent. * @param[in] aBufferSize Size of data in @p buffer in bytes. - * */ void utilsSendOverSocket(const utilsSocket *aSocket, const void *aBuffer, uint16_t aBufferLength); diff --git a/examples/platforms/simulation/system.c b/examples/platforms/simulation/system.c index 5c1f5d36a20..6483a36f6bd 100644 --- a/examples/platforms/simulation/system.c +++ b/examples/platforms/simulation/system.c @@ -70,7 +70,6 @@ static void handleSignal(int aSignal) /** * Defines the argument return values. - * */ enum { diff --git a/examples/platforms/utils/code_utils.h b/examples/platforms/utils/code_utils.h index d9ed6a2ee41..123f254746a 100644 --- a/examples/platforms/utils/code_utils.h +++ b/examples/platforms/utils/code_utils.h @@ -40,7 +40,6 @@ * condition is false. * * @param[in] aCondition A Boolean expression to be evaluated. - * */ #define otEXPECT(aCondition) \ do \ @@ -59,7 +58,6 @@ * @param[in] aCondition A Boolean expression to be evaluated. * @param[in] aAction An expression or block to execute when the * assertion fails. - * */ #define otEXPECT_ACTION(aCondition, aAction) \ do \ @@ -77,7 +75,6 @@ * @param[in] aArray Name of the array variable. * * @returns Number of elements in the array. - * */ #define otARRAY_LENGTH(aArray) (sizeof(aArray) / sizeof(aArray[0])) diff --git a/examples/platforms/utils/encoding.h b/examples/platforms/utils/encoding.h index 55e3f431741..2c28346fd7e 100644 --- a/examples/platforms/utils/encoding.h +++ b/examples/platforms/utils/encoding.h @@ -47,7 +47,6 @@ * @param[in] aSource The byte array. * * @returns The 64-bit value as a uint64_t. - * */ static inline uint64_t otEncodingReadUint64Le(const uint8_t *aSource) { diff --git a/examples/platforms/utils/link_metrics.cpp b/examples/platforms/utils/link_metrics.cpp index e62c4f5952c..75ec0ad2247 100644 --- a/examples/platforms/utils/link_metrics.cpp +++ b/examples/platforms/utils/link_metrics.cpp @@ -50,7 +50,6 @@ class LinkMetricsDataInfo : public LinkedListEntry, public public: /** * Constructor. - * */ LinkMetricsDataInfo(void) { Clear(); }; @@ -61,7 +60,6 @@ class LinkMetricsDataInfo : public LinkedListEntry, public * @param[in] aShortAddress Short Address of the Probing Initiator tracked by this object. * @param[in] aExtAddress A reference to the Extended Address of the Probing Initiator tracked by this * object. - * */ void Set(otLinkMetrics aLinkMetrics, otShortAddress aShortAddress, const otExtAddress &aExtAddress) { @@ -81,7 +79,6 @@ class LinkMetricsDataInfo : public LinkedListEntry, public * at least 2 bytes (per spec 4.11.3.4.4.6). Otherwise the behavior would be undefined. * * @returns The number of bytes written. `0` on failure. - * */ uint8_t GetEnhAckData(uint8_t aLqi, int8_t aRssi, uint8_t *aData) const { @@ -117,7 +114,6 @@ class LinkMetricsDataInfo : public LinkedListEntry, public * Gets the length of Link Metrics Data. * * @returns The number of bytes for the data. - * */ uint8_t GetEnhAckDataLen() const { @@ -129,7 +125,6 @@ class LinkMetricsDataInfo : public LinkedListEntry, public * Gets the metrics configured for the Enhanced-ACK Based Probing. * * @returns The metrics configured. - * */ otLinkMetrics GetLinkMetrics(void) const { return mLinkMetrics; } diff --git a/examples/platforms/utils/link_metrics.h b/examples/platforms/utils/link_metrics.h index 610dfd3d9d7..3209004e54f 100644 --- a/examples/platforms/utils/link_metrics.h +++ b/examples/platforms/utils/link_metrics.h @@ -33,7 +33,6 @@ * * APIs defined in this module could be used by a platform to implement Enhanced-ACK Based Probing feature * (Probing Subject side) in its radio driver. - * */ #ifndef OPENTHREAD_UTILS_LINK_METRICS_H @@ -52,7 +51,6 @@ extern "C" { * * @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). - * */ void otLinkMetricsInit(int8_t aNoiseFloor); @@ -72,7 +70,6 @@ void otLinkMetricsInit(int8_t aNoiseFloor); * @retval OT_ERROR_INVALID_ARGS @p aExtAddress is `nullptr`. * @retval OT_ERROR_NOT_FOUND The Initiator indicated by @p aShortAddress is not found when trying to clear. * @retval OT_ERROR_NO_BUFS No more Initiator can be supported. - * */ otError otLinkMetricsConfigureEnhAckProbing(otShortAddress aShortAddress, const otExtAddress *aExtAddress, @@ -93,7 +90,6 @@ otError otLinkMetricsConfigureEnhAckProbing(otShortAddress aShortAddress, * configured before. * * @returns The size of data read. Would be `0` if the Initiator is not found or @p aData is invalid. - * */ uint8_t otLinkMetricsEnhAckGenData(const otMacAddress *aMacAddress, uint8_t aLqi, int8_t aRssi, uint8_t *aData); @@ -103,13 +99,11 @@ uint8_t otLinkMetricsEnhAckGenData(const otMacAddress *aMacAddress, uint8_t aLqi * @param[in] aMacAddress The Mac address of the Initiator. * * @returns The size of data. `0` if it's not configured for the Initiator. - * */ uint8_t otLinkMetricsEnhAckGetDataLen(const otMacAddress *aMacAddress); /** * This method resets Enhanced-ACK Based Probing data. - * */ void otLinkMetricsResetEnhAckProbing(void); diff --git a/examples/platforms/utils/logging_rtt.c b/examples/platforms/utils/logging_rtt.c index 0c720519d51..a460aaa43ee 100644 --- a/examples/platforms/utils/logging_rtt.c +++ b/examples/platforms/utils/logging_rtt.c @@ -29,7 +29,6 @@ /** * @file * This file implements the OpenThread platform abstraction for logging. - * */ #include diff --git a/examples/platforms/utils/logging_rtt.h b/examples/platforms/utils/logging_rtt.h index ea8b380ec12..663fd068b3c 100644 --- a/examples/platforms/utils/logging_rtt.h +++ b/examples/platforms/utils/logging_rtt.h @@ -51,7 +51,6 @@ extern "C" { * @def LOG_RTT_BUFFER_INDEX * * RTT's buffer index. - * */ #ifndef LOG_RTT_BUFFER_INDEX #define LOG_RTT_BUFFER_INDEX 0 @@ -62,7 +61,6 @@ extern "C" { * * RTT's name. Only used if LOG_RTT_BUFFER_INDEX is not 0. Otherwise, * the buffer name is fixed to "Terminal". - * */ #ifndef LOG_RTT_BUFFER_NAME #define LOG_RTT_BUFFER_NAME "Terminal" @@ -74,7 +72,6 @@ extern "C" { * LOG RTT's buffer size. Only used if LOG_RTT_BUFFER_INDEX is not 0. To * configure buffer #0 size, check the BUFFER_SIZE_UP definition in * SEGGER_RTT_Conf.h - * */ #ifndef LOG_RTT_BUFFER_SIZE #define LOG_RTT_BUFFER_SIZE 256 @@ -84,7 +81,6 @@ extern "C" { * @def LOG_RTT_COLOR_ENABLE * * Enable colors on RTT Viewer. - * */ #ifndef LOG_RTT_COLOR_ENABLE #define LOG_RTT_COLOR_ENABLE 1 @@ -95,7 +91,6 @@ extern "C" { * * LOG buffer used to parse print format. It will be locally allocated on the * stack. - * */ #ifndef LOG_PARSE_BUFFER_SIZE #define LOG_PARSE_BUFFER_SIZE 128 @@ -105,7 +100,6 @@ extern "C" { * @def LOG_TIMESTAMP_ENABLE * * Enable timestamp in the logs. - * */ #ifndef LOG_TIMESTAMP_ENABLE #define LOG_TIMESTAMP_ENABLE 1 @@ -113,13 +107,11 @@ extern "C" { /** * Initialization of Logger driver. - * */ void utilsLogRttInit(void); /** * Deinitialization of Logger driver. - * */ void utilsLogRttDeinit(void); @@ -130,7 +122,6 @@ void utilsLogRttDeinit(void); * @param[in] aLogRegion The log region. * @param[in] aFormat A pointer to the format string. * @param[in] ap va_list matching information for aFormat - * */ void utilsLogRttOutput(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list ap); diff --git a/examples/platforms/utils/mac_frame.h b/examples/platforms/utils/mac_frame.h index 7925f4a6b42..4ac7d59fb56 100644 --- a/examples/platforms/utils/mac_frame.h +++ b/examples/platforms/utils/mac_frame.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines the mac frame interface for OpenThread platform radio drivers. - * */ #ifndef OPENTHREAD_UTILS_MAC_FRAME_H @@ -44,7 +43,6 @@ extern "C" { /** * Specifies the IEEE 802.15.4 Address type. - * */ typedef enum { @@ -55,7 +53,6 @@ typedef enum /** * Represents an IEEE 802.15.4 short or extended Address. - * */ typedef struct otMacAddress { @@ -75,7 +72,6 @@ typedef struct otMacAddress * * @retval true It is an ACK frame. * @retval false It is not an ACK frame. - * */ bool otMacFrameIsAck(const otRadioFrame *aFrame); @@ -86,7 +82,6 @@ bool otMacFrameIsAck(const otRadioFrame *aFrame); * * @retval true It is a Data frame. * @retval false It is not a Data frame. - * */ bool otMacFrameIsData(const otRadioFrame *aFrame); @@ -97,7 +92,6 @@ bool otMacFrameIsData(const otRadioFrame *aFrame); * * @retval true It is a Command frame. * @retval false It is not a Command frame. - * */ bool otMacFrameIsCommand(const otRadioFrame *aFrame); @@ -109,7 +103,6 @@ bool otMacFrameIsCommand(const otRadioFrame *aFrame); * * @retval true It is a Data Request Command frame. * @retval false It is not a Data Request Command frame. - * */ bool otMacFrameIsDataRequest(const otRadioFrame *aFrame); @@ -120,7 +113,6 @@ bool otMacFrameIsDataRequest(const otRadioFrame *aFrame); * * @retval true It requests ACK. * @retval false It does not request ACK. - * */ bool otMacFrameIsAckRequested(const otRadioFrame *aFrame); @@ -134,7 +126,6 @@ bool otMacFrameIsAckRequested(const otRadioFrame *aFrame); * * @retval true It is a broadcast or matches with the PAN id and one of the addresses. * @retval false It doesn't match. - * */ bool otMacFrameDoesAddrMatch(const otRadioFrame *aFrame, otPanId aPanId, @@ -149,7 +140,6 @@ bool otMacFrameDoesAddrMatch(const otRadioFrame *aFrame, * * @retval OT_ERROR_NONE Successfully got the source MAC address. * @retval OT_ERROR_PARSE Failed to parse the source MAC address. - * */ otError otMacFrameGetSrcAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress); @@ -161,7 +151,6 @@ otError otMacFrameGetSrcAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddre * * @retval OT_ERROR_NONE Successfully got the destination MAC address. * @retval OT_ERROR_PARSE Failed to parse the destination MAC address. - * */ otError otMacFrameGetDstAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddress); @@ -173,7 +162,6 @@ otError otMacFrameGetDstAddr(const otRadioFrame *aFrame, otMacAddress *aMacAddre * * @retval OT_ERROR_NONE Successfully got the sequence. * @retval OT_ERROR_PARSE Failed to parse the sequence. - * */ otError otMacFrameGetSequence(const otRadioFrame *aFrame, uint8_t *aSequence); @@ -183,7 +171,6 @@ otError otMacFrameGetSequence(const otRadioFrame *aFrame, uint8_t *aSequence); * @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 * for AES CCM computation. - * */ void otMacFrameProcessTransmitAesCcm(otRadioFrame *aFrame, const otExtAddress *aExtAddress); @@ -194,7 +181,6 @@ void otMacFrameProcessTransmitAesCcm(otRadioFrame *aFrame, const otExtAddress *a * * @retval true It is a version 2015 frame. * @retval false It is not a version 2015 frame. - * */ bool otMacFrameIsVersion2015(const otRadioFrame *aFrame); @@ -204,7 +190,6 @@ bool otMacFrameIsVersion2015(const otRadioFrame *aFrame); * @param[in] aFrame A pointer to the frame. * @param[in] aIsFramePending Value of the ACK's frame pending bit. * @param[out] aAckFrame A pointer to the ack frame to be generated. - * */ void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending, otRadioFrame *aAckFrame); @@ -219,7 +204,6 @@ void otMacFrameGenerateImmAck(const otRadioFrame *aFrame, bool aIsFramePending, * * @retval OT_ERROR_NONE Successfully generated Enh Ack in @p aAckFrame. * @retval OT_ERROR_PARSE @p aFrame has incorrect format. - * */ otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame, bool aIsFramePending, @@ -233,7 +217,6 @@ otError otMacFrameGenerateEnhAck(const otRadioFrame *aFrame, * @param[in,out] aFrame A pointer to the frame to be modified. * @param[in] aCslPeriod CSL Period in CSL IE. * @param[in] aCslPhase CSL Phase in CSL IE. - * */ void otMacFrameSetCslIe(otRadioFrame *aFrame, uint16_t aCslPeriod, uint16_t aCslPhase); @@ -244,7 +227,6 @@ void otMacFrameSetCslIe(otRadioFrame *aFrame, uint16_t aCslPeriod, uint16_t aCsl * * @retval true The frame has security enabled. * @retval false The frame does not have security enabled. - * */ bool otMacFrameIsSecurityEnabled(otRadioFrame *aFrame); @@ -255,7 +237,6 @@ bool otMacFrameIsSecurityEnabled(otRadioFrame *aFrame); * * @retval true The frame key ID mode is 1. * @retval false The frame security is not enabled or key ID mode is not 1. - * */ bool otMacFrameIsKeyIdMode1(otRadioFrame *aFrame); @@ -265,7 +246,6 @@ bool otMacFrameIsKeyIdMode1(otRadioFrame *aFrame); * @param[in] aFrame A pointer to the frame. * * @returns The key ID of the frame with key ID mode 1. Returns 0 if failed. - * */ uint8_t otMacFrameGetKeyId(otRadioFrame *aFrame); @@ -274,7 +254,6 @@ uint8_t otMacFrameGetKeyId(otRadioFrame *aFrame); * * @param[in,out] aFrame A pointer to the frame to be modified. * @param[in] aKeyId Key ID to be set to the frame. - * */ void otMacFrameSetKeyId(otRadioFrame *aFrame, uint8_t aKeyId); @@ -284,7 +263,6 @@ void otMacFrameSetKeyId(otRadioFrame *aFrame, uint8_t aKeyId); * @param[in] aFrame A pointer to the frame. * * @returns The frame counter of the frame. Returns UINT32_MAX if failed. - * */ uint32_t otMacFrameGetFrameCounter(otRadioFrame *aFrame); @@ -293,7 +271,6 @@ uint32_t otMacFrameGetFrameCounter(otRadioFrame *aFrame); * * @param[in,out] aFrame A pointer to the frame to be modified. * @param[in] aFrameCounter Frame counter to be set to the frame. - * */ void otMacFrameSetFrameCounter(otRadioFrame *aFrame, uint32_t aFrameCounter); @@ -303,7 +280,6 @@ void otMacFrameSetFrameCounter(otRadioFrame *aFrame, uint32_t aFrameCounter); * @param[out] aDest A pointer to the output buffer. * * @returns The total count of bytes (total length of CSL IE) written to the buffer. - * */ uint8_t otMacFrameGenerateCslIeTemplate(uint8_t *aDest); @@ -318,7 +294,6 @@ uint8_t otMacFrameGenerateCslIeTemplate(uint8_t *aDest); * @param[in] aIeDataLength The length of Link Metrics data value. Should be `1` or `2`. (Per spec 4.11.3.4.4.6) * * @returns The total count of bytes (total length of the Vendor IE) written to the buffer. - * */ uint8_t otMacFrameGenerateEnhAckProbingIe(uint8_t *aDest, const uint8_t *aIeData, uint8_t aIeDataLength); @@ -330,7 +305,6 @@ uint8_t otMacFrameGenerateEnhAckProbingIe(uint8_t *aDest, const uint8_t *aIeData * @param[in] aFrame The target frame that contains the IE. MUST NOT be `NULL`. * @param[in] aData A pointer to the data value. MUST NOT be `NULL`. * @param[in] aDataLen The length of @p aData. - * */ void otMacFrameSetEnhAckProbingIe(otRadioFrame *aFrame, const uint8_t *aData, uint8_t aDataLen); @@ -366,7 +340,6 @@ typedef struct otRadioContext * @param[in,out] aRadioContext The radio context accessible in ISR. * * @returns the error processing the callback. The caller should abort transmission on failures. - * */ otError otMacFrameProcessTxSfd(otRadioFrame *aFrame, uint64_t aRadioTime, otRadioContext *aRadioContext); @@ -379,7 +352,6 @@ otError otMacFrameProcessTxSfd(otRadioFrame *aFrame, uint64_t aRadioTime, otRadi * @retval OT_ERROR_NONE Successfully processed security. * @retval OT_ERROR_FAILED Failed to processed security. * @retval OT_ERROR_SECURITY Failed to processed security for missing key. - * */ otError otMacFrameProcessTransmitSecurity(otRadioFrame *aFrame, otRadioContext *aRadioContext); diff --git a/examples/platforms/utils/settings.h b/examples/platforms/utils/settings.h index 7b4e545ebe7..44096e69517 100644 --- a/examples/platforms/utils/settings.h +++ b/examples/platforms/utils/settings.h @@ -29,7 +29,6 @@ /** * @file * This file defines the configuration options for platform abstraction of non-volatile storage of settings. - * */ #ifndef UTILS_SETTINGS_H_ @@ -41,7 +40,6 @@ * @def OPENTHREAD_SETTINGS_RAM * * Define as 1 to enable saving the settings in RAM instead of flash. - * */ #ifndef OPENTHREAD_SETTINGS_RAM #define OPENTHREAD_SETTINGS_RAM 0 diff --git a/examples/platforms/utils/settings_ram.c b/examples/platforms/utils/settings_ram.c index d8e7c0fc079..a1cf4288176 100644 --- a/examples/platforms/utils/settings_ram.c +++ b/examples/platforms/utils/settings_ram.c @@ -29,7 +29,6 @@ /** * @file * This file implements OpenThread platform abstraction for storage of settings in RAM. - * */ #include "settings.h" diff --git a/examples/platforms/utils/soft_source_match_table.c b/examples/platforms/utils/soft_source_match_table.c index 3d8a8a6c190..114dae999e8 100644 --- a/examples/platforms/utils/soft_source_match_table.c +++ b/examples/platforms/utils/soft_source_match_table.c @@ -31,7 +31,6 @@ * This file implements a software Source Match table, for radios that don't have * such hardware acceleration. It supports only the single-instance build of * OpenThread. - * */ #include "utils/soft_source_match_table.h" diff --git a/examples/platforms/utils/uart.h b/examples/platforms/utils/uart.h index 6366dfefc00..90cb4810a12 100644 --- a/examples/platforms/utils/uart.h +++ b/examples/platforms/utils/uart.h @@ -50,7 +50,6 @@ extern "C" { * This module includes the platform abstraction for UART communication. * * @{ - * */ /** @@ -58,7 +57,6 @@ extern "C" { * * @retval OT_ERROR_NONE Successfully enabled the UART. * @retval OT_ERROR_FAILED Failed to enabled the UART. - * */ otError otPlatUartEnable(void); @@ -67,7 +65,6 @@ otError otPlatUartEnable(void); * * @retval OT_ERROR_NONE Successfully disabled the UART. * @retval OT_ERROR_FAILED Failed to disable the UART. - * */ otError otPlatUartDisable(void); @@ -79,7 +76,6 @@ otError otPlatUartDisable(void); * * @retval OT_ERROR_NONE Successfully started transmission. * @retval OT_ERROR_FAILED Failed to start the transmission. - * */ otError otPlatUartSend(const uint8_t *aBuf, uint16_t aBufLength); @@ -98,7 +94,6 @@ otError otPlatUartFlush(void); /** * The UART driver calls this method to notify OpenThread that the requested bytes have been sent. - * */ extern void otPlatUartSendDone(void); @@ -107,13 +102,11 @@ extern void otPlatUartSendDone(void); * * @param[in] aBuf A pointer to the received bytes. * @param[in] aBufLength The number of bytes received. - * */ extern void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength); /** * @} - * */ #ifdef __cplusplus diff --git a/examples/platforms/utils/uart_rtt.c b/examples/platforms/utils/uart_rtt.c index b5a42e09ac8..aa831501dce 100644 --- a/examples/platforms/utils/uart_rtt.c +++ b/examples/platforms/utils/uart_rtt.c @@ -29,7 +29,6 @@ /** * @file * This file implements the RTT implementation of the uart API. - * */ #include diff --git a/examples/platforms/utils/uart_rtt.h b/examples/platforms/utils/uart_rtt.h index b1529f59fef..ae5ac5cbcdb 100644 --- a/examples/platforms/utils/uart_rtt.h +++ b/examples/platforms/utils/uart_rtt.h @@ -29,7 +29,6 @@ /** * @file * This file defines the RTT implementation of the uart API and default constants used by uart_rtt.c. - * */ #ifndef UTILS_UART_RTT_H @@ -48,7 +47,6 @@ extern "C" { * @def UART_RTT_BUFFER_INDEX * * RTT buffer index used for the uart. - * */ #ifndef UART_RTT_BUFFER_INDEX #define UART_RTT_BUFFER_INDEX 1 @@ -64,7 +62,6 @@ extern "C" { * * RTT name used for the uart. Only used if UART_RTT_BUFFER_INDEX is not 0. * Otherwise, the buffer name is fixed to "Terminal". - * */ #ifndef UART_RTT_BUFFER_NAME #define UART_RTT_BUFFER_NAME "Terminal" @@ -76,7 +73,6 @@ extern "C" { * RTT up buffer size used for the uart. Only used if UART_RTT_BUFFER_INDEX * is not 0. To configure buffer #0 size, check the BUFFER_SIZE_UP definition * in SEGGER_RTT_Conf.h - * */ #ifndef UART_RTT_UP_BUFFER_SIZE #define UART_RTT_UP_BUFFER_SIZE 256 @@ -88,7 +84,6 @@ extern "C" { * RTT down buffer size used for the uart. Only used if UART_RTT_BUFFER_INDEX * is not 0. To configure buffer #0 size, check the BUFFER_SIZE_DOWN definition * in SEGGER_RTT_Conf.h - * */ #ifndef UART_RTT_DOWN_BUFFER_SIZE #define UART_RTT_DOWN_BUFFER_SIZE 16 @@ -99,7 +94,6 @@ extern "C" { * * Size of the temporary buffer used when reading from the RTT channel. It will be * locally allocated on the stack. - * */ #ifndef UART_RTT_READ_BUFFER_SIZE #define UART_RTT_READ_BUFFER_SIZE 16 @@ -107,7 +101,6 @@ extern "C" { /** * Updates the rtt uart. Must be called frequently to process receive and send done. - * */ void utilsUartRttProcess(void); diff --git a/include/openthread/backbone_router.h b/include/openthread/backbone_router.h index a057dc4edb4..89b5c7fb79c 100644 --- a/include/openthread/backbone_router.h +++ b/include/openthread/backbone_router.h @@ -48,12 +48,10 @@ extern "C" { * This module includes functions for the OpenThread Backbone Router Service. * * @{ - * */ /** * Represents Backbone Router configuration. - * */ typedef struct otBackboneRouterConfig { @@ -71,13 +69,11 @@ typedef struct otBackboneRouterConfig * * @retval OT_ERROR_NONE Successfully got Primary Backbone Router information. * @retval OT_ERROR_NOT_FOUND No Primary Backbone Router exists. - * */ otError otBackboneRouterGetPrimary(otInstance *aInstance, otBackboneRouterConfig *aConfig); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/backbone_router_ftd.h b/include/openthread/backbone_router_ftd.h index 88cfe0a3875..64fc71615b4 100644 --- a/include/openthread/backbone_router_ftd.h +++ b/include/openthread/backbone_router_ftd.h @@ -31,7 +31,6 @@ * @brief * This file defines the OpenThread Backbone Router API (for Thread 1.2 FTD with * `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`). - * */ #ifndef OPENTHREAD_BACKBONE_ROUTER_FTD_H_ @@ -49,12 +48,10 @@ extern "C" { * @addtogroup api-backbone-router * * @{ - * */ /** * Represents the Backbone Router Status. - * */ typedef enum { @@ -80,7 +77,6 @@ typedef enum * @sa otBackboneRouterGetConfig * @sa otBackboneRouterSetConfig * @sa otBackboneRouterRegister - * */ void otBackboneRouterSetEnabled(otInstance *aInstance, bool aEnable); @@ -97,7 +93,6 @@ void otBackboneRouterSetEnabled(otInstance *aInstance, bool aEnable); * @sa otBackboneRouterGetConfig * @sa otBackboneRouterSetConfig * @sa otBackboneRouterRegister - * */ otBackboneRouterState otBackboneRouterGetState(otInstance *aInstance); @@ -114,7 +109,6 @@ otBackboneRouterState otBackboneRouterGetState(otInstance *aInstance); * @sa otBackboneRouterGetState * @sa otBackboneRouterSetConfig * @sa otBackboneRouterRegister - * */ void otBackboneRouterGetConfig(otInstance *aInstance, otBackboneRouterConfig *aConfig); @@ -136,7 +130,6 @@ void otBackboneRouterGetConfig(otInstance *aInstance, otBackboneRouterConfig *aC * @sa otBackboneRouterGetState * @sa otBackboneRouterGetConfig * @sa otBackboneRouterRegister - * */ otError otBackboneRouterSetConfig(otInstance *aInstance, const otBackboneRouterConfig *aConfig); @@ -156,7 +149,6 @@ otError otBackboneRouterSetConfig(otInstance *aInstance, const otBackboneRouterC * @sa otBackboneRouterGetState * @sa otBackboneRouterGetConfig * @sa otBackboneRouterSetConfig - * */ otError otBackboneRouterRegister(otInstance *aInstance); @@ -166,7 +158,6 @@ otError otBackboneRouterRegister(otInstance *aInstance); * @returns The Backbone Router registration jitter value. * * @sa otBackboneRouterSetRegistrationJitter - * */ uint8_t otBackboneRouterGetRegistrationJitter(otInstance *aInstance); @@ -176,7 +167,6 @@ uint8_t otBackboneRouterGetRegistrationJitter(otInstance *aInstance); * @param[in] aJitter the Backbone Router registration jitter value to set. * * @sa otBackboneRouterGetRegistrationJitter - * */ void otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitter); @@ -188,7 +178,6 @@ void otBackboneRouterSetRegistrationJitter(otInstance *aInstance, uint8_t aJitte * * @retval OT_ERROR_NONE Successfully got the Domain Prefix configuration. * @retval OT_ERROR_NOT_FOUND No Domain Prefix was configured. - * */ otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterConfig *aConfig); @@ -204,8 +193,6 @@ otError otBackboneRouterGetDomainPrefix(otInstance *aInstance, otBorderRouterCon * @param[in] aMlIid A pointer to the Mesh Local IID. If NULL, respond with @p aStatus for any * coming DUA.req, otherwise only respond the one with matching @p aMlIid. * @param[in] aStatus The status to respond. - * - * */ void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance *aInstance, const otIp6InterfaceIdentifier *aMlIid, @@ -220,13 +207,11 @@ void otBackboneRouterConfigNextDuaRegistrationResponse(otInstance * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aStatus The status to respond. - * */ void otBackboneRouterConfigNextMulticastListenerRegistrationResponse(otInstance *aInstance, uint8_t aStatus); /** * Represents the Multicast Listener events. - * */ typedef enum { @@ -240,7 +225,6 @@ typedef enum * @param[in] aContext The user context pointer. * @param[in] aEvent The Multicast Listener event. * @param[in] aAddress The IPv6 multicast address of the Multicast Listener. - * */ typedef void (*otBackboneRouterMulticastListenerCallback)(void *aContext, otBackboneRouterMulticastListenerEvent aEvent, @@ -252,7 +236,6 @@ typedef void (*otBackboneRouterMulticastListenerCallback)(void * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to the Multicast Listener callback. * @param[in] aContext A user context pointer. - * */ void otBackboneRouterSetMulticastListenerCallback(otInstance *aInstance, otBackboneRouterMulticastListenerCallback aCallback, @@ -269,7 +252,6 @@ void otBackboneRouterSetMulticastListenerCallback(otInstance * * @sa otBackboneRouterMulticastListenerAdd * @sa otBackboneRouterMulticastListenerGetNext - * */ void otBackboneRouterMulticastListenerClear(otInstance *aInstance); @@ -292,7 +274,6 @@ void otBackboneRouterMulticastListenerClear(otInstance *aInstance); * * @sa otBackboneRouterMulticastListenerClear * @sa otBackboneRouterMulticastListenerGetNext - * */ otError otBackboneRouterMulticastListenerAdd(otInstance *aInstance, const otIp6Address *aAddress, uint32_t aTimeout); @@ -303,7 +284,6 @@ typedef uint16_t otBackboneRouterMulticastListenerIterator; ///< Used to iterate /** * Represents a Backbone Router Multicast Listener info. - * */ typedef struct otBackboneRouterMulticastListenerInfo { @@ -327,7 +307,6 @@ typedef struct otBackboneRouterMulticastListenerInfo * * @sa otBackboneRouterMulticastListenerClear * @sa otBackboneRouterMulticastListenerAdd - * */ otError otBackboneRouterMulticastListenerGetNext(otInstance *aInstance, otBackboneRouterMulticastListenerIterator *aIterator, @@ -335,7 +314,6 @@ otError otBackboneRouterMulticastListenerGetNext(otInstance /** * Represents the ND Proxy events. - * */ typedef enum { @@ -352,7 +330,6 @@ typedef enum * @param[in] aEvent The ND Proxy event. * @param[in] aDua The Domain Unicast Address of the ND Proxy, or `nullptr` if @p aEvent is * `OT_BACKBONE_ROUTER_NDPROXY_CLEARED`. - * */ typedef void (*otBackboneRouterNdProxyCallback)(void *aContext, otBackboneRouterNdProxyEvent aEvent, @@ -364,7 +341,6 @@ typedef void (*otBackboneRouterNdProxyCallback)(void *aCo * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to the ND Proxy callback. * @param[in] aContext A user context pointer. - * */ void otBackboneRouterSetNdProxyCallback(otInstance *aInstance, otBackboneRouterNdProxyCallback aCallback, @@ -372,7 +348,6 @@ void otBackboneRouterSetNdProxyCallback(otInstance *aInstanc /** * Represents the Backbone Router ND Proxy info. - * */ typedef struct otBackboneRouterNdProxyInfo { @@ -390,7 +365,6 @@ typedef struct otBackboneRouterNdProxyInfo * * @retval OT_ERROR_NONE Successfully got the ND Proxy info. * @retval OT_ERROR_NOT_FOUND Failed to find the Domain Unicast Address in the ND Proxy table. - * */ otError otBackboneRouterGetNdProxyInfo(otInstance *aInstance, const otIp6Address *aDua, @@ -398,7 +372,6 @@ otError otBackboneRouterGetNdProxyInfo(otInstance *aInstance, /** * Represents the Domain Prefix events. - * */ typedef enum { @@ -413,7 +386,6 @@ typedef enum * @param[in] aContext The user context pointer. * @param[in] aEvent The Domain Prefix event. * @param[in] aDomainPrefix The new Domain Prefix if added or changed, nullptr otherwise. - * */ typedef void (*otBackboneRouterDomainPrefixCallback)(void *aContext, otBackboneRouterDomainPrefixEvent aEvent, @@ -424,7 +396,6 @@ typedef void (*otBackboneRouterDomainPrefixCallback)(void * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to the Domain Prefix callback. * @param[in] aContext A user context pointer. - * */ void otBackboneRouterSetDomainPrefixCallback(otInstance *aInstance, otBackboneRouterDomainPrefixCallback aCallback, @@ -432,7 +403,6 @@ void otBackboneRouterSetDomainPrefixCallback(otInstance /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/ble_secure.h b/include/openthread/ble_secure.h index 81b34efb594..8aa6cd296ed 100644 --- a/include/openthread/ble_secure.h +++ b/include/openthread/ble_secure.h @@ -62,7 +62,6 @@ extern "C" { * (`OPENTHREAD_CONFIG_BLE_TCAT_ENABLE`) is enabled. * * @{ - * */ /** @@ -73,7 +72,6 @@ extern "C" { * @param[in] aBleConnectionOpen TRUE if a BLE connection was established to carry a TLS data stream, FALSE * otherwise. * @param[in] aContext A pointer to arbitrary context information. - * */ typedef void (*otHandleBleSecureConnect)(otInstance *aInstance, bool aConnected, @@ -82,7 +80,6 @@ typedef void (*otHandleBleSecureConnect)(otInstance *aInstance, /** * Pointer to call when data was received over a BLE Secure TLS connection. - * */ typedef otHandleTcatApplicationDataReceive otHandleBleSecureReceive; @@ -101,7 +98,6 @@ typedef otHandleTcatApplicationDataReceive otHandleBleSecureReceive; * * @retval OT_ERROR_NONE Successfully started the BLE Secure server. * @retval OT_ERROR_ALREADY The service was stated already. - * */ otError otBleSecureStart(otInstance *aInstance, otHandleBleSecureConnect aConnectHandler, @@ -129,7 +125,6 @@ otError otBleSecureSetTcatVendorInfo(otInstance *aInstance, const otTcatVendorIn * @retval OT_ERROR_NONE Successfully started the BLE Secure Joiner role. * @retval OT_ERROR_INVALID_ARGS @p aElevationPsk or @p aVendorInfo is invalid. * @retval OT_ERROR_INVALID_STATE The BLE function has not been started or line mode is not selected. - * */ otError otBleSecureTcatStart(otInstance *aInstance, otHandleTcatJoin aHandler); @@ -137,7 +132,6 @@ otError otBleSecureTcatStart(otInstance *aInstance, otHandleTcatJoin aHandler); * Stops the BLE Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otBleSecureStop(otInstance *aInstance); @@ -152,7 +146,6 @@ void otBleSecureStop(otInstance *aInstance); * @param[in] aPskLength The PSK length. * @param[in] aPskIdentity The Identity Name for the PSK. * @param[in] aPskIdLength The PSK Identity Length. - * */ void otBleSecureSetPsk(otInstance *aInstance, const uint8_t *aPsk, @@ -175,7 +168,6 @@ void otBleSecureSetPsk(otInstance *aInstance, * @retval OT_ERROR_INVALID_ARGS @p aInstance or @p aCertLength is invalid. * @retval OT_ERROR_INVALID_STATE Not connected yet. * @retval OT_ERROR_NO_BUFS Can't allocate memory for certificate. - * */ otError otBleSecureGetPeerCertificateBase64(otInstance *aInstance, unsigned char *aPeerCert, size_t *aCertLength); @@ -201,7 +193,6 @@ otError otBleSecureGetPeerCertificateBase64(otInstance *aInstance, unsigned char * @retval OT_ERROR_INVALID_ARGS Invalid attribute length. * @retval OT_ERROR_NONE Successfully read attribute. * @retval OT_ERROR_NO_BUFS Insufficient memory for storing the attribute value. - * */ otError otBleSecureGetPeerSubjectAttributeByOid(otInstance *aInstance, const char *aOid, @@ -232,7 +223,6 @@ otError otBleSecureGetPeerSubjectAttributeByOid(otInstance *aInstance, * @retval OT_ERROR_INVALID_STATE Not connected yet. * @retval OT_ERROR_NOT_IMPLEMENTED The value of aThreadOidDescriptor is >127. * @retval OT_ERROR_PARSE The certificate extensions could not be parsed. - * */ otError otBleSecureGetThreadAttributeFromPeerCertificate(otInstance *aInstance, int aThreadOidDescriptor, @@ -258,7 +248,6 @@ otError otBleSecureGetThreadAttributeFromPeerCertificate(otInstance *aInstance, * @retval OT_ERROR_INVALID_STATE Not connected yet. * @retval OT_ERROR_NOT_IMPLEMENTED The value of aThreadOidDescriptor is >127. * @retval OT_ERROR_PARSE The certificate extensions could not be parsed. - * */ otError otBleSecureGetThreadAttributeFromOwnCertificate(otInstance *aInstance, int aThreadOidDescriptor, @@ -273,7 +262,6 @@ otError otBleSecureGetThreadAttributeFromOwnCertificate(otInstance *aInstance, * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aVerifyPeerCertificate true, to verify the peer certificate. - * */ void otBleSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertificate); @@ -288,7 +276,6 @@ void otBleSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertificat * @param[in] aX509Length The length of certificate. * @param[in] aPrivateKey A pointer to the PEM formatted private key. * @param[in] aPrivateKeyLength The length of the private key. - * */ void otBleSecureSetCertificate(otInstance *aInstance, const uint8_t *aX509Cert, @@ -307,7 +294,6 @@ void otBleSecureSetCertificate(otInstance *aInstance, * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aX509CaCertificateChain A pointer to the PEM formatted X509 CA chain. * @param[in] aX509CaCertChainLength The length of chain. - * */ void otBleSecureSetCaCertificateChain(otInstance *aInstance, const uint8_t *aX509CaCertificateChain, @@ -319,7 +305,6 @@ void otBleSecureSetCaCertificateChain(otInstance *aInstance, * @param[in] aInstance A pointer to an OpenThread instance. * * @retval OT_ERROR_NONE Successfully started TLS connection. - * */ otError otBleSecureConnect(otInstance *aInstance); @@ -327,7 +312,6 @@ otError otBleSecureConnect(otInstance *aInstance); * Stops the BLE and TLS connection. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otBleSecureDisconnect(otInstance *aInstance); @@ -338,7 +322,6 @@ void otBleSecureDisconnect(otInstance *aInstance); * * @retval TRUE If TLS session is active. * @retval FALSE If TLS session is not active. - * */ bool otBleSecureIsConnectionActive(otInstance *aInstance); @@ -349,7 +332,6 @@ bool otBleSecureIsConnectionActive(otInstance *aInstance); * * @retval TRUE The TLS session is connected. * @retval FALSE The TLS session is not connected. - * */ bool otBleSecureIsConnected(otInstance *aInstance); @@ -358,7 +340,6 @@ bool otBleSecureIsConnected(otInstance *aInstance); * * @retval TRUE The TCAT agent is enabled. * @retval FALSE The TCAT agent is not enabled. - * */ bool otBleSecureIsTcatEnabled(otInstance *aInstance); @@ -370,7 +351,6 @@ bool otBleSecureIsTcatEnabled(otInstance *aInstance); * * @retval TRUE The command class is authorized. * @retval FALSE The command class is not authorized. - * */ bool otBleSecureIsCommandClassAuthorized(otInstance *aInstance, otTcatCommandClass aCommandClass); @@ -387,7 +367,6 @@ bool otBleSecureIsCommandClassAuthorized(otInstance *aInstance, otTcatCommandCla * @retval OT_ERROR_NONE Successfully sent message. * @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory. * @retval OT_ERROR_INVALID_STATE TLS connection was not initialized. - * */ otError otBleSecureSendMessage(otInstance *aInstance, otMessage *aMessage); @@ -401,7 +380,6 @@ otError otBleSecureSendMessage(otInstance *aInstance, otMessage *aMessage); * @retval OT_ERROR_NONE Successfully sent data. * @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory. * @retval OT_ERROR_INVALID_STATE TLS connection was not initialized. - * */ otError otBleSecureSend(otInstance *aInstance, uint8_t *aBuf, uint16_t aLength); @@ -415,7 +393,6 @@ otError otBleSecureSend(otInstance *aInstance, uint8_t *aBuf, uint16_t aLength); * @retval OT_ERROR_NONE Successfully sent data. * @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory. * @retval OT_ERROR_INVALID_STATE TLS connection was not initialized. - * */ otError otBleSecureSendApplicationTlv(otInstance *aInstance, uint8_t *aBuf, uint16_t aLength); @@ -427,13 +404,11 @@ otError otBleSecureSendApplicationTlv(otInstance *aInstance, uint8_t *aBuf, uint * @retval OT_ERROR_NONE Successfully flushed output buffer. * @retval OT_ERROR_NO_BUFS Failed to allocate buffer memory. * @retval OT_ERROR_INVALID_STATE TLS connection was not initialized. - * */ otError otBleSecureFlush(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/border_agent.h b/include/openthread/border_agent.h index e41d026bf97..f2544c8edaa 100644 --- a/include/openthread/border_agent.h +++ b/include/openthread/border_agent.h @@ -48,42 +48,35 @@ extern "C" { * This module includes functions for the Thread Border Agent role. * * @{ - * */ /** * The length of Border Agent/Router ID in bytes. - * */ #define OT_BORDER_AGENT_ID_LENGTH (16) /** * Minimum length of the ephemeral key string. - * */ #define OT_BORDER_AGENT_MIN_EPHEMERAL_KEY_LENGTH (6) /** * Maximum length of the ephemeral key string. - * */ #define OT_BORDER_AGENT_MAX_EPHEMERAL_KEY_LENGTH (32) /** * Default ephemeral key timeout interval in milliseconds. - * */ #define OT_BORDER_AGENT_DEFAULT_EPHEMERAL_KEY_TIMEOUT (2 * 60 * 1000u) /** * Maximum ephemeral key timeout interval in milliseconds. - * */ #define OT_BORDER_AGENT_MAX_EPHEMERAL_KEY_TIMEOUT (10 * 60 * 1000u) /** * Represents a Border Agent Identifier. - * */ typedef struct otBorderAgentId { @@ -92,7 +85,6 @@ typedef struct otBorderAgentId /** * Defines the Border Agent state. - * */ typedef enum otBorderAgentState { @@ -129,7 +121,6 @@ typedef struct otBorderAgentCounters * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the Border Agent counters. - * */ const otBorderAgentCounters *otBorderAgentGetCounters(otInstance *aInstance); @@ -139,7 +130,6 @@ const otBorderAgentCounters *otBorderAgentGetCounters(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current #otBorderAgentState of the Border Agent. - * */ otBorderAgentState otBorderAgentGetState(otInstance *aInstance); @@ -149,7 +139,6 @@ otBorderAgentState otBorderAgentGetState(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns UDP port of the Border Agent. - * */ uint16_t otBorderAgentGetUdpPort(otInstance *aInstance); @@ -169,7 +158,6 @@ uint16_t otBorderAgentGetUdpPort(otInstance *aInstance); * @retval ... If failed to retrieve the Border Agent ID. * * @sa otBorderAgentSetId - * */ otError otBorderAgentGetId(otInstance *aInstance, otBorderAgentId *aId); @@ -189,7 +177,6 @@ otError otBorderAgentGetId(otInstance *aInstance, otBorderAgentId *aId); * @retval ... If failed to set the Border Agent ID. * * @sa otBorderAgentGetId - * */ otError otBorderAgentSetId(otInstance *aInstance, const otBorderAgentId *aId); @@ -226,7 +213,6 @@ otError otBorderAgentSetId(otInstance *aInstance, const otBorderAgentId *aId); * @retval OT_ERROR_INVALID_ARGS The given @p aKeyString is not valid (too short or too long). * @retval OT_ERROR_FAILED Failed to set the key (e.g., could not bind to UDP port). - * */ otError otBorderAgentSetEphemeralKey(otInstance *aInstance, const char *aKeyString, @@ -246,7 +232,6 @@ otError otBorderAgentSetEphemeralKey(otInstance *aInstance, * commissioner disconnects. * * @param[in] aInstance The OpenThread instance. - * */ void otBorderAgentClearEphemeralKey(otInstance *aInstance); @@ -259,7 +244,6 @@ void otBorderAgentClearEphemeralKey(otInstance *aInstance); * * @retval TRUE An ephemeral key is active. * @retval FALSE No ephemeral key is active. - * */ bool otBorderAgentIsEphemeralKeyActive(otInstance *aInstance); @@ -279,7 +263,6 @@ bool otBorderAgentIsEphemeralKeyActive(otInstance *aInstance); * Any OpenThread API, including `otBorderAgent` APIs, can be safely called from this callback. * * @param[in] aContext A pointer to an arbitrary context (provided when callback is set). - * */ typedef void (*otBorderAgentEphemeralKeyCallback)(void *aContext); @@ -293,7 +276,6 @@ typedef void (*otBorderAgentEphemeralKeyCallback)(void *aContext); * @param[in] aInstance The OpenThread instance. * @param[in] aCallback The callback function pointer. * @param[in] aContext The arbitrary context to use with callback. - * */ void otBorderAgentSetEphemeralKeyCallback(otInstance *aInstance, otBorderAgentEphemeralKeyCallback aCallback, @@ -301,7 +283,6 @@ void otBorderAgentSetEphemeralKeyCallback(otInstance *aIns /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/border_router.h b/include/openthread/border_router.h index d07febac076..2d427c17cba 100644 --- a/include/openthread/border_router.h +++ b/include/openthread/border_router.h @@ -50,7 +50,6 @@ extern "C" { * This module includes functions to manage local network data with the OpenThread Border Router. * * @{ - * */ /** @@ -103,7 +102,6 @@ otError otBorderRouterRemoveOnMeshPrefix(otInstance *aInstance, const otIp6Prefi * * @retval OT_ERROR_NONE Successfully found the next On Mesh prefix. * @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data. - * */ otError otBorderRouterGetNextOnMeshPrefix(otInstance *aInstance, otNetworkDataIterator *aIterator, @@ -148,7 +146,6 @@ otError otBorderRouterRemoveRoute(otInstance *aInstance, const otIp6Prefix *aPre * * @retval OT_ERROR_NONE Successfully found the next External Route. * @retval OT_ERROR_NOT_FOUND No subsequent external route entry exists in the Thread Network Data. - * */ otError otBorderRouterGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIterator, @@ -172,7 +169,6 @@ otError otBorderRouterRegister(otInstance *aInstance); * Function pointer callback which is invoked when Network Data (local or leader) gets full. * * @param[in] aContext A pointer to arbitrary context information. - * */ typedef void (*otBorderRouterNetDataFullCallback)(void *aContext); @@ -191,7 +187,6 @@ typedef void (*otBorderRouterNetDataFullCallback)(void *aContext); * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback The callback. * @param[in] aContext A pointer to arbitrary context information used with @p aCallback. - * */ void otBorderRouterSetNetDataFullCallback(otInstance *aInstance, otBorderRouterNetDataFullCallback aCallback, @@ -199,7 +194,6 @@ void otBorderRouterSetNetDataFullCallback(otInstance *aIns /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/border_routing.h b/include/openthread/border_routing.h index a79af17ae6e..28ea60fa698 100644 --- a/include/openthread/border_routing.h +++ b/include/openthread/border_routing.h @@ -69,7 +69,6 @@ extern "C" { * self-configure their own routable unicast IPv6 address, this address can be used by Thread devices to reach AIL. If * Border Router finds no such RA message on AIL, it generates a ULA on-link prefix which it then advertises on AIL in * the emitted RA messages. - * */ /** @@ -79,7 +78,6 @@ extern "C" { * accessed or used by caller. * * Before using an iterator, it MUST be initialized using `otBorderRoutingPrefixTableInitIterator()`. - * */ typedef struct otBorderRoutingPrefixTableIterator { @@ -98,7 +96,6 @@ typedef struct otBorderRoutingPrefixTableIterator * determines whether the router is a peer BR (connected to the same Thread mesh network) by comparing its advertised * PIO/RIO prefixes with the entries in the Thread Network Data. While this method is generally effective, it may not * be 100% accurate in all scenarios, so the `mIsPeerBr` flag should be used with caution. - * */ typedef struct otBorderRoutingRouterEntry { @@ -118,7 +115,6 @@ typedef struct otBorderRoutingRouterEntry * * The entries in the discovered table track the Prefix/Route Info Options in the received Router Advertisement messages * from other routers on the infrastructure link. - * */ typedef struct otBorderRoutingPrefixTableEntry { @@ -133,7 +129,6 @@ typedef struct otBorderRoutingPrefixTableEntry /** * Represents information about a peer Border Router found in the Network Data. - * */ typedef struct otBorderRoutingPeerBorderRouterEntry { @@ -143,7 +138,6 @@ typedef struct otBorderRoutingPeerBorderRouterEntry /** * Represents a group of data of platform-generated RA messages processed. - * */ typedef struct otPdProcessedRaInfo { @@ -154,7 +148,6 @@ typedef struct otPdProcessedRaInfo /** * Represents the state of Border Routing Manager. - * */ typedef enum { @@ -166,7 +159,6 @@ typedef enum /** * This enumeration represents the state of DHCPv6 Prefix Delegation State. - * */ typedef enum { @@ -194,7 +186,6 @@ typedef enum * * @sa otPlatInfraIfStateChanged. * @sa otBorderRoutingSetEnabled. - * */ otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool aInfraIfIsRunning); @@ -208,7 +199,6 @@ otError otBorderRoutingInit(otInstance *aInstance, uint32_t aInfraIfIndex, bool * * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet. * @retval OT_ERROR_NONE Successfully enabled/disabled the Border Routing Manager. - * */ otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled); @@ -218,7 +208,6 @@ otError otBorderRoutingSetEnabled(otInstance *aInstance, bool aEnabled); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current state of Border Routing Manager. - * */ otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance); @@ -234,7 +223,6 @@ otBorderRoutingState otBorderRoutingGetState(otInstance *aInstance); * low preference when in child role. * * @returns The current Route Info Option preference. - * */ otRoutePreference otBorderRoutingGetRouteInfoOptionPreference(otInstance *aInstance); @@ -247,7 +235,6 @@ otRoutePreference otBorderRoutingGetRouteInfoOptionPreference(otInstance *aInsta * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPreference The route preference to use. - * */ void otBorderRoutingSetRouteInfoOptionPreference(otInstance *aInstance, otRoutePreference aPreference); @@ -258,7 +245,6 @@ void otBorderRoutingSetRouteInfoOptionPreference(otInstance *aInstance, otRouteP * in router/leader role and low preference when in child role. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otBorderRoutingClearRouteInfoOptionPreference(otInstance *aInstance); @@ -274,7 +260,6 @@ void otBorderRoutingClearRouteInfoOptionPreference(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the extra option bytes. * @retval OT_ERROR_NO_BUFS Could not allocate buffer to save the buffer. - * */ otError otBorderRoutingSetExtraRouterAdvertOptions(otInstance *aInstance, const uint8_t *aOptions, uint16_t aLength); @@ -289,7 +274,6 @@ otError otBorderRoutingSetExtraRouterAdvertOptions(otInstance *aInstance, const * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current published route preference. - * */ otRoutePreference otBorderRoutingGetRoutePreference(otInstance *aInstance); @@ -301,7 +285,6 @@ otRoutePreference otBorderRoutingGetRoutePreference(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPreference The route preference to use. - * */ void otBorderRoutingSetRoutePreference(otInstance *aInstance, otRoutePreference aPreference); @@ -312,7 +295,6 @@ void otBorderRoutingSetRoutePreference(otInstance *aInstance, otRoutePreference * link quality (to the parent when acting as end-device). * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otBorderRoutingClearRoutePreference(otInstance *aInstance); @@ -333,7 +315,6 @@ void otBorderRoutingClearRoutePreference(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully retrieved the OMR prefix. * * @sa otBorderRoutingGetPdOmrPrefix - * */ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix); @@ -353,7 +334,6 @@ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix) * * @sa otBorderRoutingGetOmrPrefix * @sa otPlatBorderRoutingProcessIcmp6Ra - * */ otError otBorderRoutingGetPdOmrPrefix(otInstance *aInstance, otBorderRoutingPrefixTableEntry *aPrefixInfo); @@ -368,7 +348,6 @@ otError otBorderRoutingGetPdOmrPrefix(otInstance *aInstance, otBorderRoutingPref * @retval OT_ERROR_NONE Successfully retrieved the Info. * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet. * @retval OT_ERROR_NOT_FOUND There are no valid Info on this BR. - * */ otError otBorderRoutingGetPdProcessedRaInfo(otInstance *aInstance, otPdProcessedRaInfo *aPdProcessedRaInfo); @@ -383,7 +362,6 @@ otError otBorderRoutingGetPdProcessedRaInfo(otInstance *aInstance, otPdProcessed * * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not running yet. * @retval OT_ERROR_NONE Successfully retrieved the favored OMR prefix. - * */ otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix, otRoutePreference *aPreference); @@ -398,7 +376,6 @@ otError otBorderRoutingGetFavoredOmrPrefix(otInstance *aInstance, otIp6Prefix *a * * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet. * @retval OT_ERROR_NONE Successfully retrieved the local on-link prefix. - * */ otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix); @@ -412,7 +389,6 @@ otError otBorderRoutingGetOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPref * * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet. * @retval OT_ERROR_NONE Successfully retrieved the favored on-link prefix. - * */ otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix *aPrefix); @@ -428,7 +404,6 @@ otError otBorderRoutingGetFavoredOnLinkPrefix(otInstance *aInstance, otIp6Prefix * * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet. * @retval OT_ERROR_NONE Successfully retrieved the NAT64 prefix. - * */ otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefix); @@ -443,7 +418,6 @@ otError otBorderRoutingGetNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefi * * @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet. * @retval OT_ERROR_NONE Successfully retrieved the favored NAT64 prefix. - * */ otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance, otIp6Prefix *aPrefix, @@ -461,7 +435,6 @@ otError otBorderRoutingGetFavoredNat64Prefix(otInstance *aInstance, * * @param[in] aInstance The OpenThread instance. * @param[out] aIterator A pointer to the iterator to initialize. - * */ void otBorderRoutingPrefixTableInitIterator(otInstance *aInstance, otBorderRoutingPrefixTableIterator *aIterator); @@ -477,7 +450,6 @@ void otBorderRoutingPrefixTableInitIterator(otInstance *aInstance, otBorderRouti * * @retval OT_ERROR_NONE Iterated to the next entry, @p aEntry and @p aIterator are updated. * @retval OT_ERROR_NOT_FOUND No more entries in the table. - * */ otError otBorderRoutingGetNextPrefixTableEntry(otInstance *aInstance, otBorderRoutingPrefixTableIterator *aIterator, @@ -492,7 +464,6 @@ otError otBorderRoutingGetNextPrefixTableEntry(otInstance * * @retval OT_ERROR_NONE Iterated to the next router, @p aEntry and @p aIterator are updated. * @retval OT_ERROR_NOT_FOUND No more router entries. - * */ otError otBorderRoutingGetNextRouterEntry(otInstance *aInstance, otBorderRoutingPrefixTableIterator *aIterator, @@ -519,7 +490,6 @@ otError otBorderRoutingGetNextRouterEntry(otInstance *aI * * @retval OT_ERROR_NONE Iterated to the next entry, @p aEntry and @p aIterator are updated. * @retval OT_ERROR_NOT_FOUND No more entries. - * */ otError otBorderRoutingGetNextPeerBrEntry(otInstance *aInstance, otBorderRoutingPrefixTableIterator *aIterator, @@ -546,7 +516,6 @@ otError otBorderRoutingGetNextPeerBrEntry(otInstance * * Age is represented as seconds since appearance of the BR entry in the Network Data. * * @returns The number of peer BRs. - * */ uint16_t otBorderRoutingCountPeerBrs(otInstance *aInstance, uint32_t *aMinAge); @@ -557,7 +526,6 @@ uint16_t otBorderRoutingCountPeerBrs(otInstance *aInstance, uint32_t *aMinAge); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled Whether to accept platform generated RA messages. - * */ void otBorderRoutingDhcp6PdSetEnabled(otInstance *aInstance, bool aEnabled); @@ -569,7 +537,6 @@ void otBorderRoutingDhcp6PdSetEnabled(otInstance *aInstance, bool aEnabled); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current state of DHCPv6 Prefix Delegation. - * */ otBorderRoutingDhcp6PdState otBorderRoutingDhcp6PdGetState(otInstance *aInstance); @@ -579,7 +546,6 @@ otBorderRoutingDhcp6PdState otBorderRoutingDhcp6PdGetState(otInstance *aInstance * * @param[in] aState The state of DHCPv6 Prefix Delegation State. * @param[in] aContext A pointer to arbitrary context information. - * */ typedef void (*otBorderRoutingRequestDhcp6PdCallback)(otBorderRoutingDhcp6PdState aState, void *aContext); @@ -591,8 +557,6 @@ typedef void (*otBorderRoutingRequestDhcp6PdCallback)(otBorderRoutingDhcp6PdStat * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to a function that is called whenever the DHCPv6 PD state changes. * @param[in] aContext A pointer to arbitrary context information. - * - * */ void otBorderRoutingDhcp6PdSetRequestCallback(otInstance *aInstance, otBorderRoutingRequestDhcp6PdCallback aCallback, @@ -606,13 +570,11 @@ void otBorderRoutingDhcp6PdSetRequestCallback(otInstance * This is intended for testing only and using it will make the BR non-compliant with the Thread Specification. * * @param[in] aPrefix The on-link prefix to use. - * */ void otBorderRoutingSetOnLinkPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/channel_manager.h b/include/openthread/channel_manager.h index e024957e6d8..d3e57ee1cb3 100644 --- a/include/openthread/channel_manager.h +++ b/include/openthread/channel_manager.h @@ -57,7 +57,6 @@ extern "C" { * the CSL channel. * * @{ - * */ /** @@ -70,7 +69,6 @@ extern "C" { * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aChannel The new channel for the Thread network. - * */ void otChannelManagerRequestChannelChange(otInstance *aInstance, uint8_t aChannel); @@ -78,7 +76,6 @@ void otChannelManagerRequestChannelChange(otInstance *aInstance, uint8_t aChanne * 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. - * */ uint8_t otChannelManagerGetRequestedChannel(otInstance *aInstance); @@ -90,7 +87,6 @@ uint8_t otChannelManagerGetRequestedChannel(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The delay (in seconds) for channel change. - * */ uint16_t otChannelManagerGetDelay(otInstance *aInstance); @@ -105,7 +101,6 @@ uint16_t otChannelManagerGetDelay(otInstance *aInstance); * * @retval OT_ERROR_NONE Delay was updated successfully. * @retval OT_ERROR_INVALID_ARGS The given delay @p aDelay is too short. - * */ otError otChannelManagerSetDelay(otInstance *aInstance, uint16_t aDelay); @@ -135,7 +130,6 @@ otError otChannelManagerSetDelay(otInstance *aInstance, uint16_t aDelay); * * @retval OT_ERROR_NONE Channel selection finished successfully. * @retval OT_ERROR_NOT_FOUND Supported channel mask is empty, therefore could not select a channel. - * */ otError otChannelManagerRequestChannelSelect(otInstance *aInstance, bool aSkipQualityCheck); @@ -166,7 +160,6 @@ otError otChannelManagerRequestChannelSelect(otInstance *aInstance, bool aSkipQu * * @retval OT_ERROR_NONE Channel selection finished successfully. * @retval OT_ERROR_NOT_FOUND Supported channel mask is empty, therefore could not select a channel. - * */ otError otChannelManagerRequestCslChannelSelect(otInstance *aInstance, bool aSkipQualityCheck); @@ -178,7 +171,6 @@ otError otChannelManagerRequestCslChannelSelect(otInstance *aInstance, bool aSki * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled Indicates whether to enable or disable this functionality. - * */ void otChannelManagerSetAutoChannelSelectionEnabled(otInstance *aInstance, bool aEnabled); @@ -188,7 +180,6 @@ void otChannelManagerSetAutoChannelSelectionEnabled(otInstance *aInstance, bool * @param[in] aInstance A pointer to an OpenThread instance. * * @returns TRUE if enabled, FALSE if disabled. - * */ bool otChannelManagerGetAutoChannelSelectionEnabled(otInstance *aInstance); @@ -202,7 +193,6 @@ bool otChannelManagerGetAutoChannelSelectionEnabled(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled Indicates whether to enable or disable this functionality. - * */ void otChannelManagerSetAutoCslChannelSelectionEnabled(otInstance *aInstance, bool aEnabled); @@ -215,7 +205,6 @@ void otChannelManagerSetAutoCslChannelSelectionEnabled(otInstance *aInstance, bo * @param[in] aInstance A pointer to an OpenThread instance. * * @returns TRUE if enabled, FALSE if disabled. - * */ bool otChannelManagerGetAutoCslChannelSelectionEnabled(otInstance *aInstance); @@ -227,7 +216,6 @@ bool otChannelManagerGetAutoCslChannelSelectionEnabled(otInstance *aInstance); * * @retval OT_ERROR_NONE The interval was set successfully. * @retval OT_ERROR_INVALID_ARGS The @p aInterval is not valid (zero). - * */ otError otChannelManagerSetAutoChannelSelectionInterval(otInstance *aInstance, uint32_t aInterval); @@ -237,7 +225,6 @@ otError otChannelManagerSetAutoChannelSelectionInterval(otInstance *aInstance, u * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The interval in seconds. - * */ uint32_t otChannelManagerGetAutoChannelSelectionInterval(otInstance *aInstance); @@ -247,7 +234,6 @@ uint32_t otChannelManagerGetAutoChannelSelectionInterval(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The supported channels as a bit-mask. - * */ uint32_t otChannelManagerGetSupportedChannels(otInstance *aInstance); @@ -256,7 +242,6 @@ uint32_t otChannelManagerGetSupportedChannels(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aChannelMask A channel mask. - * */ void otChannelManagerSetSupportedChannels(otInstance *aInstance, uint32_t aChannelMask); @@ -266,7 +251,6 @@ void otChannelManagerSetSupportedChannels(otInstance *aInstance, uint32_t aChann * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The favored channels as a bit-mask. - * */ uint32_t otChannelManagerGetFavoredChannels(otInstance *aInstance); @@ -275,7 +259,6 @@ uint32_t otChannelManagerGetFavoredChannels(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aChannelMask A channel mask. - * */ void otChannelManagerSetFavoredChannels(otInstance *aInstance, uint32_t aChannelMask); @@ -285,7 +268,6 @@ void otChannelManagerSetFavoredChannels(otInstance *aInstance, uint32_t aChannel * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The CCA failure rate threshold. Value 0 maps to 0% and 0xffff maps to 100%. - * */ uint16_t otChannelManagerGetCcaFailureRateThreshold(otInstance *aInstance); @@ -294,13 +276,11 @@ uint16_t otChannelManagerGetCcaFailureRateThreshold(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aThreshold A CCA failure rate threshold. Value 0 maps to 0% and 0xffff maps to 100%. - * */ void otChannelManagerSetCcaFailureRateThreshold(otInstance *aInstance, uint16_t aThreshold); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/channel_monitor.h b/include/openthread/channel_monitor.h index d69033ad159..f6b96abc25b 100644 --- a/include/openthread/channel_monitor.h +++ b/include/openthread/channel_monitor.h @@ -60,7 +60,6 @@ extern "C" { * occupancy). * * @{ - * */ /** @@ -77,7 +76,6 @@ extern "C" { * * @retval OT_ERROR_NONE Channel Monitoring state changed successfully * @retval OT_ERROR_ALREADY Channel Monitoring is already in the same state. - * */ otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled); @@ -87,7 +85,6 @@ otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns TRUE if the Channel Monitoring operation is enabled, FALSE otherwise. - * */ bool otChannelMonitorIsEnabled(otInstance *aInstance); @@ -97,7 +94,6 @@ bool otChannelMonitorIsEnabled(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The channel monitor sample interval in milliseconds. - * */ uint32_t otChannelMonitorGetSampleInterval(otInstance *aInstance); @@ -107,7 +103,6 @@ uint32_t otChannelMonitorGetSampleInterval(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The RSSI threshold in dBm. - * */ int8_t otChannelMonitorGetRssiThreshold(otInstance *aInstance); @@ -117,7 +112,6 @@ int8_t otChannelMonitorGetRssiThreshold(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The averaging sample window. - * */ uint32_t otChannelMonitorGetSampleWindow(otInstance *aInstance); @@ -130,7 +124,6 @@ uint32_t otChannelMonitorGetSampleWindow(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns Total number of RSSI samples (per channel) taken so far. - * */ uint32_t otChannelMonitorGetSampleCount(otInstance *aInstance); @@ -151,13 +144,11 @@ uint32_t otChannelMonitorGetSampleCount(otInstance *aInstance); * @param[in] aChannel The channel for which to get the link occupancy. * * @returns The current channel occupancy for the given channel. - * */ uint16_t otChannelMonitorGetChannelOccupancy(otInstance *aInstance, uint8_t aChannel); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/child_supervision.h b/include/openthread/child_supervision.h index dbfd859deb9..ef0a7c2e9d9 100644 --- a/include/openthread/child_supervision.h +++ b/include/openthread/child_supervision.h @@ -48,7 +48,6 @@ extern "C" { * This module includes functions for Child Supervision feature. * * @{ - * */ /** @@ -61,7 +60,6 @@ extern "C" { * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The child supervision interval. Zero indicates that supervision is disabled. - * */ uint16_t otChildSupervisionGetInterval(otInstance *aInstance); @@ -70,7 +68,6 @@ uint16_t otChildSupervisionGetInterval(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aInterval The supervision interval (in seconds). Zero to disable supervision. - * */ void otChildSupervisionSetInterval(otInstance *aInstance, uint16_t aInterval); @@ -83,7 +80,6 @@ void otChildSupervisionSetInterval(otInstance *aInstance, uint16_t aInterval); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The supervision check timeout. Zero indicates that supervision check on the child is disabled. - * */ uint16_t otChildSupervisionGetCheckTimeout(otInstance *aInstance); @@ -92,7 +88,6 @@ uint16_t otChildSupervisionGetCheckTimeout(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aTimeout The check timeout (in seconds). Zero to disable supervision check on the child. - * */ void otChildSupervisionSetCheckTimeout(otInstance *aInstance, uint16_t aTimeout); @@ -101,19 +96,16 @@ void otChildSupervisionSetCheckTimeout(otInstance *aInstance, uint16_t aTimeout) * * 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. - * */ uint16_t otChildSupervisionGetCheckFailureCounter(otInstance *aInstance); /** * Reset the supervision check timeout failure counter to zero. - * */ void otChildSupervisionResetCheckFailureCounter(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/cli.h b/include/openthread/cli.h index 07bd92a3739..bcc907390ad 100644 --- a/include/openthread/cli.h +++ b/include/openthread/cli.h @@ -47,7 +47,6 @@ extern "C" { /** * Represents a CLI command. - * */ typedef struct otCliCommand { @@ -64,7 +63,6 @@ typedef struct otCliCommand * This module includes functions that control the Thread stack's execution. * * @{ - * */ /** @@ -75,7 +73,6 @@ typedef struct otCliCommand * @param[in] aArguments The format string arguments. * * @returns Number of bytes written by the callback. - * */ typedef int (*otCliOutputCallback)(void *aContext, const char *aFormat, va_list aArguments); @@ -85,7 +82,6 @@ typedef int (*otCliOutputCallback)(void *aContext, const char *aFormat, va_list * @param[in] aInstance The OpenThread instance structure. * @param[in] aCallback A callback method called to process CLI output. * @param[in] aContext A user context pointer. - * */ void otCliInit(otInstance *aInstance, otCliOutputCallback aCallback, void *aContext); @@ -93,7 +89,6 @@ void otCliInit(otInstance *aInstance, otCliOutputCallback aCallback, void *aCont * Is called to feed in a console input line. * * @param[in] aBuf A pointer to a null-terminated string. - * */ void otCliInputLine(char *aBuf); @@ -114,7 +109,6 @@ otError otCliSetUserCommands(const otCliCommand *aUserCommands, uint8_t aLength, * * @param[in] aBytes A pointer to data which should be printed. * @param[in] aLength @p aBytes length. - * */ void otCliOutputBytes(const uint8_t *aBytes, uint8_t aLength); @@ -123,7 +117,6 @@ void otCliOutputBytes(const uint8_t *aBytes, uint8_t aLength); * * @param[in] aFmt A pointer to the format string. * @param[in] ... A matching list of arguments. - * */ void otCliOutputFormat(const char *aFmt, ...); @@ -133,7 +126,6 @@ void otCliOutputFormat(const char *aFmt, ...); * If the @p aError is `OT_ERROR_PENDING` nothing will be outputted. * * @param[in] aError Error code value. - * */ void otCliAppendResult(otError aError); @@ -144,7 +136,6 @@ void otCliAppendResult(otError aError); * @param[in] aLogRegion The log region. * @param[in] aFormat A pointer to the format string. * @param[in] aArgs va_list matching aFormat. - * */ void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs); @@ -153,13 +144,11 @@ void otCliPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFo * * Available when `OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE` is enabled and * `OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES` is greater than 1. - * */ extern void otCliVendorSetUserCommands(void); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/coap.h b/include/openthread/coap.h index a19fb16a6b9..76f8bed1ffe 100644 --- a/include/openthread/coap.h +++ b/include/openthread/coap.h @@ -53,7 +53,6 @@ extern "C" { * The functions in this module are available when CoAP API feature (`OPENTHREAD_CONFIG_COAP_API_ENABLE`) is enabled. * * @{ - * */ #define OT_DEFAULT_COAP_PORT 5683 ///< Default CoAP port, as specified in RFC 7252 @@ -68,7 +67,6 @@ extern "C" { /** * CoAP Type values (2 bit unsigned integer). - * */ typedef enum otCoapType { @@ -80,13 +78,11 @@ typedef enum otCoapType /** * Helper macro to define CoAP Code values. - * */ #define OT_COAP_CODE(c, d) ((((c)&0x7) << 5) | ((d)&0x1f)) /** * CoAP Code values. - * */ typedef enum otCoapCode { @@ -152,7 +148,6 @@ typedef enum otCoapOptionType /** * Represents a CoAP option. - * */ typedef struct otCoapOption { @@ -162,7 +157,6 @@ typedef struct otCoapOption /** * Acts as an iterator for CoAP options - * */ typedef struct otCoapOptionIterator { @@ -339,7 +333,6 @@ typedef enum otCoapBlockSzx * @retval OT_ERROR_NONE A response was received successfully. * @retval OT_ERROR_ABORT A CoAP transaction was reset by peer. * @retval OT_ERROR_RESPONSE_TIMEOUT No response or acknowledgment received during timeout period. - * */ typedef void (*otCoapResponseHandler)(void *aContext, otMessage *aMessage, @@ -352,7 +345,6 @@ typedef void (*otCoapResponseHandler)(void *aContext, * @param[in] aContext A pointer to arbitrary context information. * @param[in] aMessage A pointer to the message. * @param[in] aMessageInfo A pointer to the message info for @p aMessage. - * */ typedef void (*otCoapRequestHandler)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo); @@ -373,7 +365,6 @@ typedef void (*otCoapRequestHandler)(void *aContext, otMessage *aMessage, const * @retval OT_ERROR_NONE Block segment was stored successfully. * @retval OT_ERROR_NO_BUFS No more memory to store blocks. * @retval OT_ERROR_NO_FRAME_RECEIVED Block segment missing. - * */ typedef otError (*otCoapBlockwiseReceiveHook)(void *aContext, const uint8_t *aBlock, @@ -400,7 +391,6 @@ typedef otError (*otCoapBlockwiseReceiveHook)(void *aContext, * * @retval OT_ERROR_NONE No error occurred. * @retval OT_ERROR_INVALID_ARGS Block at @p aPosition does not exist. - * */ typedef otError (*otCoapBlockwiseTransmitHook)(void *aContext, uint8_t *aBlock, @@ -410,7 +400,6 @@ typedef otError (*otCoapBlockwiseTransmitHook)(void *aContext, /** * Represents a CoAP resource. - * */ typedef struct otCoapResource { @@ -422,7 +411,6 @@ typedef struct otCoapResource /** * Represents a CoAP resource with block-wise transfer. - * */ typedef struct otCoapBlockwiseResource { @@ -450,34 +438,29 @@ typedef struct otCoapBlockwiseResource * @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 * avoid 64-bit arithmetic. - * */ typedef struct otCoapTxParameters { /** * Minimum spacing before first retransmission when ACK is not received, in milliseconds (RFC7252 default value is * 2000ms). - * */ uint32_t mAckTimeout; /** * Numerator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not * received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1). - * */ uint8_t mAckRandomFactorNumerator; /** * Denominator of ACK_RANDOM_FACTOR used to calculate maximum spacing before first retransmission when ACK is not * received (RFC7252 default value of ACK_RANDOM_FACTOR is 1.5; must not be decreased below 1). - * */ uint8_t mAckRandomFactorDenominator; /** * Maximum number of retransmissions for CoAP Confirmable messages (RFC7252 default value is 4). - * */ uint8_t mMaxRetransmit; } otCoapTxParameters; @@ -488,7 +471,6 @@ typedef struct otCoapTxParameters * @param[in,out] aMessage A pointer to the CoAP message to initialize. * @param[in] aType CoAP message type. * @param[in] aCode CoAP message code. - * */ void otCoapMessageInit(otMessage *aMessage, otCoapType aType, otCoapCode aCode); @@ -504,7 +486,6 @@ void otCoapMessageInit(otMessage *aMessage, otCoapType aType, otCoapCode aCode); * * @retval OT_ERROR_NONE Successfully initialized the response message. * @retval OT_ERROR_NO_BUFS Insufficient message buffers available to initialize the response message. - * */ otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aRequest, otCoapType aType, otCoapCode aCode); @@ -517,7 +498,6 @@ otError otCoapMessageInitResponse(otMessage *aResponse, const otMessage *aReques * * @retval OT_ERROR_NONE Successfully set the Token value. * @retval OT_ERROR_NO_BUFS Insufficient buffers to set the Token value. - * */ otError otCoapMessageSetToken(otMessage *aMessage, const uint8_t *aToken, uint8_t aTokenLength); @@ -526,7 +506,6 @@ otError otCoapMessageSetToken(otMessage *aMessage, const uint8_t *aToken, uint8_ * * @param[in,out] aMessage A pointer to the CoAP message. * @param[in] aTokenLength The Length of a Token to set. - * */ void otCoapMessageGenerateToken(otMessage *aMessage, uint8_t aTokenLength); @@ -547,7 +526,6 @@ void otCoapMessageGenerateToken(otMessage *aMessage, uint8_t aTokenLength); * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendContentFormatOption(otMessage *aMessage, otCoapOptionContentFormat aContentFormat); @@ -562,7 +540,6 @@ otError otCoapMessageAppendContentFormatOption(otMessage *aMessage, otCoapOption * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendOption(otMessage *aMessage, uint16_t aNumber, uint16_t aLength, const void *aValue); @@ -591,7 +568,6 @@ otError otCoapMessageAppendUintOption(otMessage *aMessage, uint16_t aNumber, uin * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendObserveOption(otMessage *aMessage, uint32_t aObserve); @@ -604,7 +580,6 @@ otError otCoapMessageAppendObserveOption(otMessage *aMessage, uint32_t aObserve) * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendUriPathOptions(otMessage *aMessage, const char *aUriPath); @@ -617,7 +592,6 @@ otError otCoapMessageAppendUriPathOptions(otMessage *aMessage, const char *aUriP * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendUriQueryOptions(otMessage *aMessage, const char *aUriQuery); @@ -627,7 +601,6 @@ otError otCoapMessageAppendUriQueryOptions(otMessage *aMessage, const char *aUri * @param[in] aSize Block size exponent. * * @returns The actual size exponent value. - * */ uint16_t otCoapBlockSizeFromExponent(otCoapBlockSzx aSize); @@ -642,7 +615,6 @@ uint16_t otCoapBlockSizeFromExponent(otCoapBlockSzx aSize); * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendBlock2Option(otMessage *aMessage, uint32_t aNum, bool aMore, otCoapBlockSzx aSize); @@ -657,7 +629,6 @@ otError otCoapMessageAppendBlock2Option(otMessage *aMessage, uint32_t aNum, bool * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendBlock1Option(otMessage *aMessage, uint32_t aNum, bool aMore, otCoapBlockSzx aSize); @@ -670,7 +641,6 @@ otError otCoapMessageAppendBlock1Option(otMessage *aMessage, uint32_t aNum, bool * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendProxyUriOption(otMessage *aMessage, const char *aUriPath); @@ -683,7 +653,6 @@ otError otCoapMessageAppendProxyUriOption(otMessage *aMessage, const char *aUriP * @retval OT_ERROR_NONE Successfully appended the option. * @retval OT_ERROR_INVALID_ARGS The option type is not equal or greater than the last option type. * @retval OT_ERROR_NO_BUFS The option length exceeds the buffer size. - * */ otError otCoapMessageAppendMaxAgeOption(otMessage *aMessage, uint32_t aMaxAge); @@ -706,7 +675,6 @@ otError otCoapMessageAppendUriQueryOption(otMessage *aMessage, const char *aUriQ * * @retval OT_ERROR_NONE Payload Marker successfully added. * @retval OT_ERROR_NO_BUFS Header Payload Marker exceeds the buffer size. - * */ otError otCoapMessageSetPayloadMarker(otMessage *aMessage); @@ -716,7 +684,6 @@ otError otCoapMessageSetPayloadMarker(otMessage *aMessage); * @param[in] aMessage A pointer to the CoAP message. * * @returns The Type value. - * */ otCoapType otCoapMessageGetType(const otMessage *aMessage); @@ -726,7 +693,6 @@ otCoapType otCoapMessageGetType(const otMessage *aMessage); * @param[in] aMessage A pointer to the CoAP message. * * @returns The Code value. - * */ otCoapCode otCoapMessageGetCode(const otMessage *aMessage); @@ -735,7 +701,6 @@ otCoapCode otCoapMessageGetCode(const otMessage *aMessage); * * @param[in,out] aMessage A pointer to the CoAP message to initialize. * @param[in] aCode CoAP message code. - * */ void otCoapMessageSetCode(otMessage *aMessage, otCoapCode aCode); @@ -745,7 +710,6 @@ void otCoapMessageSetCode(otMessage *aMessage, otCoapCode aCode); * @param[in] aMessage A pointer to the CoAP message. * * @ returns The CoAP Code as string. - * */ const char *otCoapMessageCodeToString(const otMessage *aMessage); @@ -755,7 +719,6 @@ const char *otCoapMessageCodeToString(const otMessage *aMessage); * @param[in] aMessage A pointer to the CoAP message. * * @returns The Message ID value. - * */ uint16_t otCoapMessageGetMessageId(const otMessage *aMessage); @@ -765,7 +728,6 @@ uint16_t otCoapMessageGetMessageId(const otMessage *aMessage); * @param[in] aMessage A pointer to the CoAP message. * * @returns The Token length. - * */ uint8_t otCoapMessageGetTokenLength(const otMessage *aMessage); @@ -775,7 +737,6 @@ uint8_t otCoapMessageGetTokenLength(const otMessage *aMessage); * @param[in] aMessage A pointer to the CoAP message. * * @returns A pointer to the Token value. - * */ const uint8_t *otCoapMessageGetToken(const otMessage *aMessage); @@ -787,7 +748,6 @@ const uint8_t *otCoapMessageGetToken(const otMessage *aMessage); * * @retval OT_ERROR_NONE Successfully initialised. * @retval OT_ERROR_PARSE Message state is inconsistent. - * */ otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessage *aMessage); @@ -798,7 +758,6 @@ otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessag * @param[in] aOption The option number sought. * * @returns A pointer to the first matching option. If no matching option is present NULL pointer is returned. - * */ const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption); @@ -808,7 +767,6 @@ const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionItera * @param[in,out] aIterator A pointer to the CoAP message option iterator. * * @returns A pointer to the first option. If no option is present NULL pointer is returned. - * */ const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIterator); @@ -819,7 +777,6 @@ const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIt * @param[in] aOption The option number sought. * * @returns A pointer to the next matching option. If no further matching option is present NULL pointer is returned. - * */ const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption); @@ -829,7 +786,6 @@ const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterat * @param[in,out] aIterator A pointer to the CoAP message option iterator. * * @returns A pointer to the next option. If no more options are present NULL pointer is returned. - * */ const otCoapOption *otCoapOptionIteratorGetNextOption(otCoapOptionIterator *aIterator); @@ -856,7 +812,6 @@ otError otCoapOptionIteratorGetOptionUintValue(otCoapOptionIterator *aIterator, * * @retval OT_ERROR_NONE Successfully filled value. * @retval OT_ERROR_NOT_FOUND No current option. - * */ otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void *aValue); @@ -870,7 +825,6 @@ otError otCoapOptionIteratorGetOptionValue(otCoapOptionIterator *aIterator, void * @param[in] aSettings A pointer to the message settings or NULL to set default settings. * * @returns A pointer to the message buffer or NULL if no message buffers are available or parameters are invalid. - * */ otMessage *otCoapNewMessage(otInstance *aInstance, const otMessageSettings *aSettings); @@ -894,7 +848,6 @@ otMessage *otCoapNewMessage(otInstance *aInstance, const otMessageSettings *aSet * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. * @retval OT_ERROR_INVALID_ARGS Invalid arguments are given. - * */ otError otCoapSendRequestWithParameters(otInstance *aInstance, otMessage *aMessage, @@ -925,7 +878,6 @@ otError otCoapSendRequestWithParameters(otInstance *aInstance, * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. * @retval OT_ERROR_INVALID_ARGS Invalid arguments are given. - * */ otError otCoapSendRequestBlockWiseWithParameters(otInstance *aInstance, otMessage *aMessage, @@ -956,7 +908,6 @@ otError otCoapSendRequestBlockWiseWithParameters(otInstance *aIn * * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. - * */ static inline otError otCoapSendRequestBlockWise(otInstance *aInstance, otMessage *aMessage, @@ -985,7 +936,6 @@ static inline otError otCoapSendRequestBlockWise(otInstance *aIn * * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. - * */ static inline otError otCoapSendRequest(otInstance *aInstance, otMessage *aMessage, @@ -1005,7 +955,6 @@ static inline otError otCoapSendRequest(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully started the CoAP server. * @retval OT_ERROR_FAILED Failed to start the CoAP server. - * */ otError otCoapStart(otInstance *aInstance, uint16_t aPort); @@ -1015,7 +964,6 @@ otError otCoapStart(otInstance *aInstance, uint16_t aPort); * @param[in] aInstance A pointer to an OpenThread instance. * * @retval OT_ERROR_NONE Successfully stopped the CoAP server. - * */ otError otCoapStop(otInstance *aInstance); @@ -1024,7 +972,6 @@ otError otCoapStop(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapAddResource(otInstance *aInstance, otCoapResource *aResource); @@ -1033,7 +980,6 @@ void otCoapAddResource(otInstance *aInstance, otCoapResource *aResource); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapRemoveResource(otInstance *aInstance, otCoapResource *aResource); @@ -1042,7 +988,6 @@ void otCoapRemoveResource(otInstance *aInstance, otCoapResource *aResource); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); @@ -1051,7 +996,6 @@ void otCoapAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource * * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); @@ -1061,7 +1005,6 @@ void otCoapRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResourc * @param[in] aInstance A pointer to an OpenThread instance. * @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 NULL if not used. - * */ void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandler, void *aContext); @@ -1076,7 +1019,6 @@ void otCoapSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandle * @retval OT_ERROR_NONE Successfully enqueued the CoAP response message. * @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response. * @retval OT_ERROR_INVALID_ARGS Invalid arguments are given. - * */ otError otCoapSendResponseWithParameters(otInstance *aInstance, otMessage *aMessage, @@ -1099,7 +1041,6 @@ otError otCoapSendResponseWithParameters(otInstance *aInstance, * @retval OT_ERROR_NONE Successfully enqueued the CoAP response message. * @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response. * @retval OT_ERROR_INVALID_ARGS Invalid arguments are given. - * */ otError otCoapSendResponseBlockWiseWithParameters(otInstance *aInstance, otMessage *aMessage, @@ -1122,7 +1063,6 @@ otError otCoapSendResponseBlockWiseWithParameters(otInstance *aI * * @retval OT_ERROR_NONE Successfully enqueued the CoAP response message. * @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response. - * */ static inline otError otCoapSendResponseBlockWise(otInstance *aInstance, otMessage *aMessage, @@ -1143,7 +1083,6 @@ static inline otError otCoapSendResponseBlockWise(otInstance *aI * * @retval OT_ERROR_NONE Successfully enqueued the CoAP response message. * @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response. - * */ static inline otError otCoapSendResponse(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo) { @@ -1153,7 +1092,6 @@ static inline otError otCoapSendResponse(otInstance *aInstance, otMessage *aMess /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/coap_secure.h b/include/openthread/coap_secure.h index 012750fc07d..349e5ca2251 100644 --- a/include/openthread/coap_secure.h +++ b/include/openthread/coap_secure.h @@ -62,14 +62,12 @@ extern "C" { * (`OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE`) is enabled. * * @{ - * */ #define OT_DEFAULT_COAP_SECURE_PORT 5684 ///< Default CoAP Secure port, as specified in RFC 7252 /** * CoAP secure connection event types. - * */ typedef enum otCoapSecureConnectEvent { @@ -85,7 +83,6 @@ typedef enum otCoapSecureConnectEvent * * @param[in] aEvent The connection event. * @param[in] aContext A pointer to arbitrary context information. - * */ typedef void (*otHandleCoapSecureClientConnect)(otCoapSecureConnectEvent aEvent, void *aContext); @@ -94,7 +91,6 @@ typedef void (*otHandleCoapSecureClientConnect)(otCoapSecureConnectEvent aEvent, * number of connection attempts. * * @param[in] aContext A pointer to arbitrary context information. - * */ typedef void (*otCoapSecureAutoStopCallback)(void *aContext); @@ -105,7 +101,6 @@ typedef void (*otCoapSecureAutoStopCallback)(void *aContext); * @param[in] aPort The local UDP port to bind to. * * @retval OT_ERROR_NONE Successfully started the CoAP Secure server. - * */ otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort); @@ -121,7 +116,6 @@ otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort); * * @retval OT_ERROR_NONE Successfully started the CoAP agent. * @retval OT_ERROR_ALREADY Already started. - * */ otError otCoapSecureStartWithMaxConnAttempts(otInstance *aInstance, uint16_t aPort, @@ -133,7 +127,6 @@ otError otCoapSecureStartWithMaxConnAttempts(otInstance *aInsta * Stops the CoAP Secure server. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otCoapSecureStop(otInstance *aInstance); @@ -148,7 +141,6 @@ void otCoapSecureStop(otInstance *aInstance); * @param[in] aPskLength The PSK length. * @param[in] aPskIdentity The Identity Name for the PSK. * @param[in] aPskIdLength The PSK Identity Length. - * */ void otCoapSecureSetPsk(otInstance *aInstance, const uint8_t *aPsk, @@ -170,7 +162,6 @@ void otCoapSecureSetPsk(otInstance *aInstance, * @retval OT_ERROR_INVALID_STATE Not connected yet. * @retval OT_ERROR_NONE Successfully get the peer certificate. * @retval OT_ERROR_NO_BUFS Can't allocate memory for certificate. - * */ otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance, unsigned char *aPeerCert, @@ -185,7 +176,6 @@ otError otCoapSecureGetPeerCertificateBase64(otInstance *aInstance, * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aVerifyPeerCertificate true, to verify the peer certificate. - * */ void otCoapSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertificate); @@ -200,7 +190,6 @@ void otCoapSecureSetSslAuthMode(otInstance *aInstance, bool aVerifyPeerCertifica * @param[in] aX509Length The length of certificate. * @param[in] aPrivateKey A pointer to the PEM formatted private key. * @param[in] aPrivateKeyLength The length of the private key. - * */ void otCoapSecureSetCertificate(otInstance *aInstance, const uint8_t *aX509Cert, @@ -219,7 +208,6 @@ void otCoapSecureSetCertificate(otInstance *aInstance, * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aX509CaCertificateChain A pointer to the PEM formatted X509 CA chain. * @param[in] aX509CaCertChainLength The length of chain. - * */ void otCoapSecureSetCaCertificateChain(otInstance *aInstance, const uint8_t *aX509CaCertificateChain, @@ -235,7 +223,6 @@ void otCoapSecureSetCaCertificateChain(otInstance *aInstance, * @param[in] aContext A pointer to arbitrary context information. * * @retval OT_ERROR_NONE Successfully started DTLS connection. - * */ otError otCoapSecureConnect(otInstance *aInstance, const otSockAddr *aSockAddr, @@ -246,7 +233,6 @@ otError otCoapSecureConnect(otInstance *aInstance, * Stops the DTLS connection. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otCoapSecureDisconnect(otInstance *aInstance); @@ -257,7 +243,6 @@ void otCoapSecureDisconnect(otInstance *aInstance); * * @retval TRUE The DTLS session is connected. * @retval FALSE The DTLS session is not connected. - * */ bool otCoapSecureIsConnected(otInstance *aInstance); @@ -268,7 +253,6 @@ bool otCoapSecureIsConnected(otInstance *aInstance); * * @retval TRUE If DTLS session is active. * @retval FALSE If DTLS session is not active. - * */ bool otCoapSecureIsConnectionActive(otInstance *aInstance); @@ -279,7 +263,6 @@ bool otCoapSecureIsConnectionActive(otInstance *aInstance); * * @retval TRUE The DTLS session is closed. * @retval FALSE The DTLS session is not closed. - * */ bool otCoapSecureIsClosed(otInstance *aInstance); @@ -303,7 +286,6 @@ bool otCoapSecureIsClosed(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. * @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized. - * */ otError otCoapSecureSendRequestBlockWise(otInstance *aInstance, otMessage *aMessage, @@ -327,7 +309,6 @@ otError otCoapSecureSendRequestBlockWise(otInstance *aInstance, * @retval OT_ERROR_NONE Successfully sent CoAP message. * @retval OT_ERROR_NO_BUFS Failed to allocate retransmission data. * @retval OT_ERROR_INVALID_STATE DTLS connection was not initialized. - * */ otError otCoapSecureSendRequest(otInstance *aInstance, otMessage *aMessage, @@ -339,7 +320,6 @@ otError otCoapSecureSendRequest(otInstance *aInstance, * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapSecureAddResource(otInstance *aInstance, otCoapResource *aResource); @@ -348,7 +328,6 @@ void otCoapSecureAddResource(otInstance *aInstance, otCoapResource *aResource); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapSecureRemoveResource(otInstance *aInstance, otCoapResource *aResource); @@ -357,7 +336,6 @@ void otCoapSecureRemoveResource(otInstance *aInstance, otCoapResource *aResource * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapSecureAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); @@ -366,7 +344,6 @@ void otCoapSecureAddBlockWiseResource(otInstance *aInstance, otCoapBlockwiseReso * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aResource A pointer to the resource. - * */ void otCoapSecureRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseResource *aResource); @@ -376,7 +353,6 @@ void otCoapSecureRemoveBlockWiseResource(otInstance *aInstance, otCoapBlockwiseR * @param[in] aInstance A pointer to an OpenThread instance. * @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 NULL if not used. - * */ void otCoapSecureSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler aHandler, void *aContext); @@ -387,7 +363,6 @@ void otCoapSecureSetDefaultHandler(otInstance *aInstance, otCoapRequestHandler a * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aHandler A pointer to a function that will be called once DTLS connection has changed. * @param[in] aContext A pointer to arbitrary context information. May be NULL if not used. - * */ void otCoapSecureSetClientConnectEventCallback(otInstance *aInstance, otHandleCoapSecureClientConnect aHandler, @@ -407,7 +382,6 @@ void otCoapSecureSetClientConnectEventCallback(otInstance *a * * @retval OT_ERROR_NONE Successfully enqueued the CoAP response message. * @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response. - * */ otError otCoapSecureSendResponseBlockWise(otInstance *aInstance, otMessage *aMessage, @@ -424,13 +398,11 @@ otError otCoapSecureSendResponseBlockWise(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully enqueued the CoAP response message. * @retval OT_ERROR_NO_BUFS Insufficient buffers available to send the CoAP response. - * */ otError otCoapSecureSendResponse(otInstance *aInstance, otMessage *aMessage, const otMessageInfo *aMessageInfo); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/commissioner.h b/include/openthread/commissioner.h index 410bd0f707c..22147d343bd 100644 --- a/include/openthread/commissioner.h +++ b/include/openthread/commissioner.h @@ -52,12 +52,10 @@ extern "C" { * This module includes functions for the Thread Commissioner role. * * @{ - * */ /** * Defines the Commissioner State. - * */ typedef enum otCommissionerState { @@ -68,7 +66,6 @@ typedef enum otCommissionerState /** * Defines a Joiner Event on the Commissioner. - * */ typedef enum otCommissionerJoinerEvent { @@ -88,7 +85,6 @@ typedef enum otCommissionerJoinerEvent /** * Represents the steering data. - * */ typedef struct otSteeringData { @@ -98,7 +94,6 @@ typedef struct otSteeringData /** * Represents a Commissioning Dataset. - * */ typedef struct otCommissioningDataset { @@ -118,7 +113,6 @@ typedef struct otCommissioningDataset /** * Represents a Joiner PSKd. - * */ typedef struct otJoinerPskd { @@ -127,7 +121,6 @@ typedef struct otJoinerPskd /** * Defines a Joiner Info Type. - * */ typedef enum otJoinerInfoType { @@ -138,7 +131,6 @@ typedef enum otJoinerInfoType /** * Represents a Joiner Info. - * */ typedef struct otJoinerInfo { @@ -157,7 +149,6 @@ typedef struct otJoinerInfo * * @param[in] aState The Commissioner state. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otCommissionerStateCallback)(otCommissionerState aState, void *aContext); @@ -168,7 +159,6 @@ typedef void (*otCommissionerStateCallback)(otCommissionerState aState, void *aC * @param[in] aJoinerInfo A pointer to the Joiner Info. * @param[in] aJoinerId A pointer to the Joiner ID (if not known, it will be NULL). * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent, const otJoinerInfo *aJoinerInfo, @@ -186,7 +176,6 @@ typedef void (*otCommissionerJoinerCallback)(otCommissionerJoinerEvent aEvent, * @retval OT_ERROR_NONE Successfully started the Commissioner service. * @retval OT_ERROR_ALREADY Commissioner is already started. * @retval OT_ERROR_INVALID_STATE Device is not currently attached to a network. - * */ otError otCommissionerStart(otInstance *aInstance, otCommissionerStateCallback aStateCallback, @@ -200,7 +189,6 @@ otError otCommissionerStart(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully stopped the Commissioner service. * @retval OT_ERROR_ALREADY Commissioner is already stopped. - * */ otError otCommissionerStop(otInstance *aInstance); @@ -210,7 +198,6 @@ otError otCommissionerStop(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Commissioner Id. - * */ const char *otCommissionerGetId(otInstance *aInstance); @@ -223,7 +210,6 @@ const char *otCommissionerGetId(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully set the Commissioner Id. * @retval OT_ERROR_INVALID_ARGS Given name is too long. * @retval OT_ERROR_INVALID_STATE The commissioner is active and id cannot be changed. - * */ otError otCommissionerSetId(otInstance *aInstance, const char *aId); @@ -241,7 +227,6 @@ otError otCommissionerSetId(otInstance *aInstance, const char *aId); * @retval OT_ERROR_INVALID_STATE The commissioner is not active. * * @note Only use this after successfully starting the Commissioner role with otCommissionerStart(). - * */ otError otCommissionerAddJoiner(otInstance *aInstance, const otExtAddress *aEui64, @@ -262,7 +247,6 @@ otError otCommissionerAddJoiner(otInstance *aInstance, * @retval OT_ERROR_INVALID_STATE The commissioner is not active. * * @note Only use this after successfully starting the Commissioner role with otCommissionerStart(). - * */ otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner, @@ -278,7 +262,6 @@ otError otCommissionerAddJoinerWithDiscerner(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully get the Joiner info. * @retval OT_ERROR_NOT_FOUND Not found next Joiner. - * */ otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner); @@ -294,7 +277,6 @@ otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterat * @retval OT_ERROR_INVALID_STATE The commissioner is not active. * * @note Only use this after successfully starting the Commissioner role with otCommissionerStart(). - * */ otError otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aEui64); @@ -310,7 +292,6 @@ otError otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aE * @retval OT_ERROR_INVALID_STATE The commissioner is not active. * * @note Only use this after successfully starting the Commissioner role with otCommissionerStart(). - * */ otError otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJoinerDiscerner *aDiscerner); @@ -320,7 +301,6 @@ otError otCommissionerRemoveJoinerWithDiscerner(otInstance *aInstance, const otJ * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the URL string. - * */ const char *otCommissionerGetProvisioningUrl(otInstance *aInstance); @@ -332,7 +312,6 @@ const char *otCommissionerGetProvisioningUrl(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the Provisioning URL. * @retval OT_ERROR_INVALID_ARGS @p aProvisioningUrl is invalid (too long). - * */ otError otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aProvisioningUrl); @@ -350,7 +329,6 @@ otError otCommissionerSetProvisioningUrl(otInstance *aInstance, const char *aPro * @retval OT_ERROR_INVALID_STATE The commissioner is not active. * * @note Only use this after successfully starting the Commissioner role with otCommissionerStart(). - * */ otError otCommissionerAnnounceBegin(otInstance *aInstance, uint32_t aChannelMask, @@ -365,7 +343,6 @@ otError otCommissionerAnnounceBegin(otInstance *aInstance, * @param[in] aEnergyList A pointer to the energy measurement list. * @param[in] aEnergyListLength Number of entries in @p aEnergyListLength. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask, const uint8_t *aEnergyList, @@ -389,7 +366,6 @@ typedef void (*otCommissionerEnergyReportCallback)(uint32_t aChannelMask, * @retval OT_ERROR_INVALID_STATE The commissioner is not active. * * @note Only use this after successfully starting the Commissioner role with otCommissionerStart(). - * */ otError otCommissionerEnergyScan(otInstance *aInstance, uint32_t aChannelMask, @@ -406,7 +382,6 @@ otError otCommissionerEnergyScan(otInstance *aInstance, * @param[in] aPanId The PAN ID value. * @param[in] aChannelMask The channel mask value. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aChannelMask, void *aContext); @@ -425,7 +400,6 @@ typedef void (*otCommissionerPanIdConflictCallback)(uint16_t aPanId, uint32_t aC * @retval OT_ERROR_INVALID_STATE The commissioner is not active. * * @note Only use this after successfully starting the Commissioner role with otCommissionerStart(). - * */ otError otCommissionerPanIdQuery(otInstance *aInstance, uint16_t aPanId, @@ -444,7 +418,6 @@ otError otCommissionerPanIdQuery(otInstance *aInstance, * @retval OT_ERROR_NONE Successfully send the meshcop dataset command. * @retval OT_ERROR_NO_BUFS Insufficient buffer space to send. * @retval OT_ERROR_INVALID_STATE The commissioner is not active. - * */ otError otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, uint8_t aLength); @@ -459,7 +432,6 @@ otError otCommissionerSendMgmtGet(otInstance *aInstance, const uint8_t *aTlvs, u * @retval OT_ERROR_NONE Successfully send the meshcop dataset command. * @retval OT_ERROR_NO_BUFS Insufficient buffer space to send. * @retval OT_ERROR_INVALID_STATE The commissioner is not active. - * */ otError otCommissionerSendMgmtSet(otInstance *aInstance, const otCommissioningDataset *aDataset, @@ -472,7 +444,6 @@ otError otCommissionerSendMgmtSet(otInstance *aInstance, * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current commissioner session id. - * */ uint16_t otCommissionerGetSessionId(otInstance *aInstance); @@ -484,13 +455,11 @@ uint16_t otCommissionerGetSessionId(otInstance *aInstance); * @retval OT_COMMISSIONER_STATE_DISABLED Commissioner disabled. * @retval OT_COMMISSIONER_STATE_PETITION Becoming the commissioner. * @retval OT_COMMISSIONER_STATE_ACTIVE Commissioner enabled. - * */ otCommissionerState otCommissionerGetState(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/config.h b/include/openthread/config.h index 090532c038a..57c3d86818b 100644 --- a/include/openthread/config.h +++ b/include/openthread/config.h @@ -39,7 +39,6 @@ * @def OPENTHREAD_CONFIG_FILE * * The OpenThread feature configuration file. - * */ #if defined(OPENTHREAD_CONFIG_FILE) #include OPENTHREAD_CONFIG_FILE diff --git a/include/openthread/crypto.h b/include/openthread/crypto.h index 414b4bae568..7b3e184bfb8 100644 --- a/include/openthread/crypto.h +++ b/include/openthread/crypto.h @@ -52,12 +52,10 @@ extern "C" { * This module includes cryptographic functions. * * @{ - * */ /** * Represents a SHA-256 hash. - * */ typedef otPlatCryptoSha256Hash otCryptoSha256Hash; @@ -68,7 +66,6 @@ typedef otPlatCryptoSha256Hash otCryptoSha256Hash; * @param[in] aBuf A pointer to the input buffer. * @param[in] aBufLength The length of @p aBuf in bytes. * @param[out] aHash A pointer to a `otCryptoSha256Hash` structure to output the hash value. - * */ void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash); @@ -89,7 +86,6 @@ void otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t a * @param[in] aEncrypt `true` on encrypt and `false` on decrypt. * * @param[out] aTag A pointer to the tag. - * */ void otCryptoAesCcm(const otCryptoKey *aKey, uint8_t aTagLength, @@ -105,7 +101,6 @@ void otCryptoAesCcm(const otCryptoKey *aKey, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/dataset.h b/include/openthread/dataset.h index 50b174a0e6f..3b76ec16fb9 100644 --- a/include/openthread/dataset.h +++ b/include/openthread/dataset.h @@ -59,7 +59,6 @@ extern "C" { * @struct otNetworkKey * * Represents a Thread Network Key. - * */ OT_TOOL_PACKED_BEGIN struct otNetworkKey @@ -69,13 +68,11 @@ struct otNetworkKey /** * Represents a Thread Network Key. - * */ typedef struct otNetworkKey otNetworkKey; /** * This datatype represents KeyRef to NetworkKey. - * */ typedef otCryptoKeyRef otNetworkKeyRef; ///< Reference to Key @@ -85,7 +82,6 @@ typedef otCryptoKeyRef otNetworkKeyRef; ///< Reference to Key * Represents a Network Name. * * The `otNetworkName` is a null terminated C string (i.e., `m8` char array MUST end with null char `\0`). - * */ typedef struct otNetworkName { @@ -96,7 +92,6 @@ typedef struct otNetworkName /** * Represents an Extended PAN ID. - * */ OT_TOOL_PACKED_BEGIN struct otExtendedPanId @@ -106,7 +101,6 @@ struct otExtendedPanId /** * Represents an Extended PAN ID. - * */ typedef struct otExtendedPanId otExtendedPanId; @@ -114,7 +108,6 @@ typedef struct otExtendedPanId otExtendedPanId; /** * Represents a Mesh Local Prefix. - * */ typedef otIp6NetworkPrefix otMeshLocalPrefix; @@ -122,7 +115,6 @@ typedef otIp6NetworkPrefix otMeshLocalPrefix; /** * Represents PSKc. - * */ OT_TOOL_PACKED_BEGIN struct otPskc @@ -132,19 +124,16 @@ struct otPskc /** * Represents a PSKc. - * */ typedef struct otPskc otPskc; /** * This datatype represents KeyRef to PSKc. - * */ typedef otCryptoKeyRef otPskcRef; ///< Reference to Key /** * Represent Security Policy. - * */ typedef struct otSecurityPolicy { @@ -164,7 +153,6 @@ typedef struct otSecurityPolicy /** * Represents Channel Mask. - * */ typedef uint32_t otChannelMask; @@ -197,7 +185,6 @@ typedef uint32_t otChannelMask; /** * Represents presence of different components in Active or Pending Operational Dataset. - * */ typedef struct otOperationalDatasetComponents { @@ -217,7 +204,6 @@ typedef struct otOperationalDatasetComponents /** * Represents a Thread Dataset timestamp component. - * */ typedef struct otTimestamp { @@ -230,7 +216,6 @@ typedef struct otTimestamp * Represents an Active or Pending Operational Dataset. * * Components in Dataset are optional. `mComponents` structure specifies which components are present in the Dataset. - * */ typedef struct otOperationalDataset { @@ -251,7 +236,6 @@ typedef struct otOperationalDataset /** * Maximum length of Operational Dataset in bytes. - * */ #define OT_OPERATIONAL_DATASET_MAX_LENGTH 254 @@ -259,7 +243,6 @@ typedef struct otOperationalDataset * Represents an Active or Pending Operational Dataset. * * The Operational Dataset is TLV encoded as specified by Thread. - * */ typedef struct otOperationalDatasetTlvs { @@ -269,7 +252,6 @@ typedef struct otOperationalDatasetTlvs /** * Represents meshcop TLV types. - * */ typedef enum otMeshcopTlvType { @@ -326,7 +308,6 @@ typedef enum otMeshcopTlvType * @retval OT_ERROR_PARSE An error occurred during parsing the response. * @retval OT_ERROR_ABORT The request was reset by peer. * @retval OT_ERROR_RESPONSE_TIMEOUT No response or acknowledgment received during timeout period. - * */ typedef void (*otDatasetMgmtSetCallback)(otError aResult, void *aContext); @@ -336,7 +317,6 @@ typedef void (*otDatasetMgmtSetCallback)(otError aResult, void *aContext); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise. - * */ bool otDatasetIsCommissioned(otInstance *aInstance); @@ -348,7 +328,6 @@ bool otDatasetIsCommissioned(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully retrieved the Active Operational Dataset. * @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store. - * */ otError otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset); @@ -360,7 +339,6 @@ otError otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset * * @retval OT_ERROR_NONE Successfully retrieved the Active Operational Dataset. * @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store. - * */ otError otDatasetGetActiveTlvs(otInstance *aInstance, otOperationalDatasetTlvs *aDataset); @@ -389,7 +367,6 @@ otError otDatasetGetActiveTlvs(otInstance *aInstance, otOperationalDatasetTlvs * * @param[in] aDataset A pointer to the Active Operational Dataset. * * @retval OT_ERROR_NONE Successfully set the Active Operational Dataset. - * */ otError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aDataset); @@ -414,7 +391,6 @@ otError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aD * * @retval OT_ERROR_NONE Successfully set the Active Operational Dataset. * @retval OT_ERROR_INVALID_ARGS The @p aDataset is invalid. It is too long or contains incorrect TLV formatting. - * */ otError otDatasetSetActiveTlvs(otInstance *aInstance, const otOperationalDatasetTlvs *aDataset); @@ -426,7 +402,6 @@ otError otDatasetSetActiveTlvs(otInstance *aInstance, const otOperationalDataset * * @retval OT_ERROR_NONE Successfully retrieved the Pending Operational Dataset. * @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store. - * */ otError otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDataset); @@ -438,7 +413,6 @@ otError otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDatase * * @retval OT_ERROR_NONE Successfully retrieved the Pending Operational Dataset. * @retval OT_ERROR_NOT_FOUND No corresponding value in the setting store. - * */ otError otDatasetGetPendingTlvs(otInstance *aInstance, otOperationalDatasetTlvs *aDataset); @@ -454,7 +428,6 @@ otError otDatasetGetPendingTlvs(otInstance *aInstance, otOperationalDatasetTlvs * @param[in] aDataset A pointer to the Pending Operational Dataset. * * @retval OT_ERROR_NONE Successfully set the Pending Operational Dataset. - * */ otError otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *aDataset); @@ -466,7 +439,6 @@ otError otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *a * * @retval OT_ERROR_NONE Successfully set the Pending Operational Dataset. * @retval OT_ERROR_INVALID_ARGS The @p aDataset is invalid. It is too long or contains incorrect TLV formatting. - * */ otError otDatasetSetPendingTlvs(otInstance *aInstance, const otOperationalDatasetTlvs *aDataset); @@ -481,7 +453,6 @@ otError otDatasetSetPendingTlvs(otInstance *aInstance, const otOperationalDatase * * @retval OT_ERROR_NONE Successfully send the meshcop dataset command. * @retval OT_ERROR_NO_BUFS Insufficient buffer space to send. - * */ otError otDatasetSendMgmtActiveGet(otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, @@ -502,7 +473,6 @@ otError otDatasetSendMgmtActiveGet(otInstance *aInstan * @retval OT_ERROR_NONE Successfully send the meshcop dataset command. * @retval OT_ERROR_NO_BUFS Insufficient buffer space to send. * @retval OT_ERROR_BUSY A previous request is ongoing. - * */ otError otDatasetSendMgmtActiveSet(otInstance *aInstance, const otOperationalDataset *aDataset, @@ -522,7 +492,6 @@ otError otDatasetSendMgmtActiveSet(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully send the meshcop dataset command. * @retval OT_ERROR_NO_BUFS Insufficient buffer space to send. - * */ otError otDatasetSendMgmtPendingGet(otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, @@ -543,7 +512,6 @@ otError otDatasetSendMgmtPendingGet(otInstance *aInsta * @retval OT_ERROR_NONE Successfully send the meshcop dataset command. * @retval OT_ERROR_NO_BUFS Insufficient buffer space to send. * @retval OT_ERROR_BUSY A previous request is ongoing. - * */ otError otDatasetSendMgmtPendingSet(otInstance *aInstance, const otOperationalDataset *aDataset, @@ -564,7 +532,6 @@ otError otDatasetSendMgmtPendingSet(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully generate PSKc. * @retval OT_ERROR_INVALID_ARGS If any of the input arguments is invalid. - * */ otError otDatasetGeneratePskc(const char *aPassPhrase, const otNetworkName *aNetworkName, @@ -582,7 +549,6 @@ otError otDatasetGeneratePskc(const char *aPassPhrase, * * @retval OT_ERROR_NONE Successfully set @p aNetworkName from @p aNameString. * @retval OT_ERROR_INVALID_ARGS @p aNameStrng is invalid (too long or does not follow UTF-8 encoding). - * */ otError otNetworkNameFromString(otNetworkName *aNetworkName, const char *aNameString); @@ -594,7 +560,6 @@ otError otNetworkNameFromString(otNetworkName *aNetworkName, const char *aNameSt * * @retval OT_ERROR_NONE Successfully set @p aDataset from @p aDatasetTlvs. * @retval OT_ERROR_INVALID_ARGS @p aDatasetTlvs's length is longer than `OT_OPERATIONAL_DATASET_MAX_LENGTH`. - * */ otError otDatasetParseTlvs(const otOperationalDatasetTlvs *aDatasetTlvs, otOperationalDataset *aDataset); @@ -603,7 +568,6 @@ otError otDatasetParseTlvs(const otOperationalDatasetTlvs *aDatasetTlvs, otOpera * * @param[in] aDataset An Operational dataset to convert to TLVs. * @param[out] aDatasetTlvs A pointer to dataset TLVs to return the result. - * */ void otDatasetConvertToTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs); @@ -618,13 +582,11 @@ void otDatasetConvertToTlvs(const otOperationalDataset *aDataset, otOperationalD * @retval OT_ERROR_NONE Successfully updated @p aDatasetTlvs. * @retval OT_ERROR_INVALID_ARGS @p aDataset contains invalid values. * @retval OT_ERROR_NO_BUFS Not enough space space in @p aDatasetTlvs to apply the update. - * */ otError otDatasetUpdateTlvs(const otOperationalDataset *aDataset, otOperationalDatasetTlvs *aDatasetTlvs); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/dataset_ftd.h b/include/openthread/dataset_ftd.h index 05e37a1b2bf..cb8aef17b31 100644 --- a/include/openthread/dataset_ftd.h +++ b/include/openthread/dataset_ftd.h @@ -46,7 +46,6 @@ extern "C" { * @addtogroup api-operational-dataset * * @{ - * */ /** @@ -57,7 +56,6 @@ extern "C" { * * @retval OT_ERROR_NONE Successfully created a new Operational Dataset. * @retval OT_ERROR_FAILED Failed to generate random values for new parameters. - * */ otError otDatasetCreateNewNetwork(otInstance *aInstance, otOperationalDataset *aDataset); @@ -67,7 +65,6 @@ otError otDatasetCreateNewNetwork(otInstance *aInstance, otOperationalDataset *a * @param[in] aInstance A pointer to an OpenThread instance. * * @retval the value of minimal delay timer (in ms). - * */ uint32_t otDatasetGetDelayTimerMinimal(otInstance *aInstance); @@ -82,13 +79,11 @@ uint32_t otDatasetGetDelayTimerMinimal(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set minimal delay timer. * @retval OT_ERROR_INVALID_ARGS If @p aDelayTimerMinimal is not valid. - * */ otError otDatasetSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/dataset_updater.h b/include/openthread/dataset_updater.h index 4943257d9d7..02c17076834 100644 --- a/include/openthread/dataset_updater.h +++ b/include/openthread/dataset_updater.h @@ -48,7 +48,6 @@ extern "C" { * @{ * * For FTD builds only, Dataset Updater includes functions to manage dataset updates. - * */ /** @@ -64,7 +63,6 @@ extern "C" { * a conflicting Dataset update. * * @param[in] aContext A pointer to the arbitrary context (provided by user in `otDatasetUpdaterRequestUpdate()`). - * */ typedef void (*otDatasetUpdaterCallback)(otError aError, void *aContext); @@ -87,7 +85,6 @@ typedef void (*otDatasetUpdaterCallback)(otError aError, void *aContext); * @retval OT_ERROR_INVALID_ARGS The @p aDataset is not valid (contains Active or Pending Timestamp). * @retval OT_ERROR_BUSY Cannot start update, a previous one is ongoing. * @retval OT_ERROR_NO_BUFS Could not allocated buffer to save Dataset. - * */ otError otDatasetUpdaterRequestUpdate(otInstance *aInstance, const otOperationalDataset *aDataset, @@ -100,7 +97,6 @@ otError otDatasetUpdaterRequestUpdate(otInstance *aInstance, * Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otDatasetUpdaterCancelUpdate(otInstance *aInstance); @@ -113,13 +109,11 @@ void otDatasetUpdaterCancelUpdate(otInstance *aInstance); * * @retval TRUE There is an ongoing update. * @retval FALSE There is no ongoing update. - * */ bool otDatasetUpdaterIsUpdateOngoing(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/diag.h b/include/openthread/diag.h index 9362ef3783e..f8b62d93df9 100644 --- a/include/openthread/diag.h +++ b/include/openthread/diag.h @@ -49,7 +49,6 @@ extern "C" { * This module includes functions that control the Thread stack's execution. * * @{ - * */ /* Represents the pointer to callback to output diag messages. */ @@ -61,7 +60,6 @@ typedef otPlatDiagOutputCallback otDiagOutputCallback; * @param[in] aInstance The OpenThread instance structure. * @param[in] aCallback A pointer to a function that is called on outputting diag messages. * @param[in] aContext A pointer to the user context. - * */ void otDiagSetOutputCallback(otInstance *aInstance, otDiagOutputCallback aCallback, void *aContext); @@ -75,7 +73,6 @@ void otDiagSetOutputCallback(otInstance *aInstance, otDiagOutputCallback aCallba * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided. * @retval OT_ERROR_NONE The command is successfully process. * @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported. - * */ otError otDiagProcessCmd(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[]); @@ -89,7 +86,6 @@ otError otDiagProcessCmd(otInstance *aInstance, uint8_t aArgsLength, char *aArgs * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided. * @retval OT_ERROR_NOT_IMPLEMENTED The command is not supported. * @retval OT_ERROR_NO_BUFS The command string is too long. - * */ otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString); @@ -100,13 +96,11 @@ otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString); * * @retval TRUE if factory diagnostics mode is enabled * @retval FALSE if factory diagnostics mode is disabled. - * */ bool otDiagIsEnabled(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/dns.h b/include/openthread/dns.h index 0d02dd27e3a..d0ee1f581d9 100644 --- a/include/openthread/dns.h +++ b/include/openthread/dns.h @@ -51,7 +51,6 @@ extern "C" { * This module includes functions that control DNS communication. * * @{ - * */ #define OT_DNS_MAX_NAME_SIZE 255 ///< Maximum name string size (includes null char at the end of string). @@ -72,7 +71,6 @@ extern "C" { * * An array of `otDnsTxtEntry` entries are used in `otSrpClientService` to specify the full TXT record (a list of * entries). - * */ typedef struct otDnsTxtEntry { @@ -89,7 +87,6 @@ typedef struct otDnsTxtEntry * * If `mKey` is NULL, then `mValue` buffer is treated as an already encoded TXT-DATA and is appended as is in the * DNS message. - * */ const char *mKey; const uint8_t *mValue; ///< The TXT record value or already encoded TXT-DATA (depending on `mKey`). @@ -100,7 +97,6 @@ typedef struct otDnsTxtEntry * 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. - * */ typedef struct otDnsTxtEntryIterator { @@ -118,7 +114,6 @@ typedef struct otDnsTxtEntryIterator * @param[in] aIterator A pointer to the iterator to initialize (MUST NOT be NULL). * @param[in] aTxtData A pointer to buffer containing the encoded TXT data. * @param[in] aTxtDataLength The length (number of bytes) of @p aTxtData. - * */ void otDnsInitTxtEntryIterator(otDnsTxtEntryIterator *aIterator, const uint8_t *aTxtData, uint16_t aTxtDataLength); @@ -139,7 +134,6 @@ void otDnsInitTxtEntryIterator(otDnsTxtEntryIterator *aIterator, const uint8_t * * @retval OT_ERROR_NONE The next entry was parsed successfully. @p aEntry is updated. * @retval OT_ERROR_NOT_FOUND No more entries in the TXT data. * @retval OT_ERROR_PARSE The TXT data from @p aIterator is not well-formed. - * */ otError otDnsGetNextTxtEntry(otDnsTxtEntryIterator *aIterator, otDnsTxtEntry *aEntry); @@ -154,7 +148,6 @@ otError otDnsGetNextTxtEntry(otDnsTxtEntryIterator *aIterator, otDnsTxtEntry *aE * @retval OT_ERROR_NONE Encoded TXT data successfully, @p aTxtData and @p aTxtDataLength are updated. * @retval OT_ERROR_INVALID_ARGS The @p aTxtEntries is not valid. * @retval OT_ERROR_NO_BUS Could not fit the encoded data in @p aTxtData buffer with its @p aTxtDataLength. - * */ otError otDnsEncodeTxtData(const otDnsTxtEntry *aTxtEntries, uint16_t aNumTxtEntries, @@ -173,7 +166,6 @@ otError otDnsEncodeTxtData(const otDnsTxtEntry *aTxtEntries, * instances (i.e., calling this function enables/disables the compression mode on all OpenThread instances). * * @param[in] aEnabled TRUE to enable the "DNS name compression" mode, FALSE to disable. - * */ void otDnsSetNameCompressionEnabled(bool aEnabled); @@ -183,13 +175,11 @@ void otDnsSetNameCompressionEnabled(bool aEnabled); * This is intended for testing only and available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` config is enabled. * * @returns TRUE if the "DNS name compression" mode is enabled, FALSE otherwise. - * */ bool otDnsIsNameCompressionEnabled(void); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/dns_client.h b/include/openthread/dns_client.h index 49dcdfdb3f2..5dc82ad8dcb 100644 --- a/include/openthread/dns_client.h +++ b/include/openthread/dns_client.h @@ -52,12 +52,10 @@ extern "C" { * The functions in this module are available only if feature `OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE` is enabled. * * @{ - * */ /** * Type represents the "Recursion Desired" (RD) flag in an `otDnsQueryConfig`. - * */ typedef enum { @@ -71,7 +69,6 @@ typedef enum * * 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. - * */ typedef enum { @@ -85,7 +82,6 @@ typedef enum * * This is only used during DNS client service resolution `otDnsClientResolveService()`. It determines which * record types to query. - * */ typedef enum { @@ -101,7 +97,6 @@ typedef enum * 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. - * */ typedef enum { @@ -115,7 +110,6 @@ typedef enum * * 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`. - * */ typedef struct otDnsQueryConfig { @@ -138,7 +132,6 @@ typedef struct otDnsQueryConfig * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the current default config being used by DNS client. - * */ const otDnsQueryConfig *otDnsClientGetDefaultConfig(otInstance *aInstance); @@ -164,7 +157,6 @@ const otDnsQueryConfig *otDnsClientGetDefaultConfig(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aConfig A pointer to the new query config to use as default. - * */ void otDnsClientSetDefaultConfig(otInstance *aInstance, const otDnsQueryConfig *aConfig); @@ -172,7 +164,6 @@ void otDnsClientSetDefaultConfig(otInstance *aInstance, const otDnsQueryConfig * * An opaque representation of a response to an address resolution DNS query. * * Pointers to instance of this type are provided from callback `otDnsAddressCallback`. - * */ typedef struct otDnsAddressResponse otDnsAddressResponse; @@ -212,7 +203,6 @@ typedef struct otDnsAddressResponse otDnsAddressResponse; * - (21) BADALG Bad algorithm -> OT_ERROR_SECURITY * - (22) BADTRUN Bad truncation -> OT_ERROR_PARSE * - Other response codes -> OT_ERROR_FAILED - * */ typedef void (*otDnsAddressCallback)(otError aError, const otDnsAddressResponse *aResponse, void *aContext); @@ -233,7 +223,6 @@ typedef void (*otDnsAddressCallback)(otError aError, const otDnsAddressResponse * @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query. * @retval OT_ERROR_INVALID_ARGS The host name is not valid format. * @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up. - * */ otError otDnsClientResolveAddress(otInstance *aInstance, const char *aHostName, @@ -263,7 +252,6 @@ otError otDnsClientResolveAddress(otInstance *aInstance, * @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query. * @retval OT_ERROR_INVALID_ARGS The host name is not valid format or NAT64 is not enabled in config. * @retval OT_ERROR_INVALID_STATE Cannot send query since Thread interface is not up. - * */ otError otDnsClientResolveIp4Address(otInstance *aInstance, const char *aHostName, @@ -282,7 +270,6 @@ otError otDnsClientResolveIp4Address(otInstance *aInstance, * * @retval OT_ERROR_NONE The full host name was read successfully. * @retval OT_ERROR_NO_BUFS The name does not fit in @p aNameBuffer. - * */ otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse, char *aNameBuffer, @@ -307,7 +294,6 @@ otError otDnsAddressResponseGetHostName(const otDnsAddressResponse *aResponse, * @retval OT_ERROR_NOT_FOUND No address record in @p aResponse at @p aIndex. * @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse. * @retval OT_ERROR_INVALID_STATE No NAT64 prefix (applicable only when NAT64 is allowed). - * */ otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse, uint16_t aIndex, @@ -318,7 +304,6 @@ otError otDnsAddressResponseGetAddress(const otDnsAddressResponse *aResponse, * 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`. - * */ typedef struct otDnsBrowseResponse otDnsBrowseResponse; @@ -336,13 +321,11 @@ typedef struct otDnsBrowseResponse otDnsBrowseResponse; * @param[in] aContext A pointer to application-specific context. * * For the full list of possible values for @p aError, please see `otDnsAddressCallback()`. - * */ typedef void (*otDnsBrowseCallback)(otError aError, const otDnsBrowseResponse *aResponse, void *aContext); /** * Provides info for a DNS service instance. - * */ typedef struct otDnsServiceInfo { @@ -377,7 +360,6 @@ typedef struct otDnsServiceInfo * * @retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the status. * @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query. - * */ otError otDnsClientBrowse(otInstance *aInstance, const char *aServiceName, @@ -396,7 +378,6 @@ otError otDnsClientBrowse(otInstance *aInstance, * * @retval OT_ERROR_NONE The service name was read successfully. * @retval OT_ERROR_NO_BUFS The name does not fit in @p aNameBuffer. - * */ otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse, char *aNameBuffer, @@ -422,7 +403,6 @@ otError otDnsBrowseResponseGetServiceName(const otDnsBrowseResponse *aResponse, * @retval OT_ERROR_NO_BUFS The name does not fit in @p aNameBuffer. * @retval OT_ERROR_NOT_FOUND No service instance record in @p aResponse at @p aIndex. * @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse. - * */ otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aResponse, uint16_t aIndex, @@ -455,7 +435,6 @@ otError otDnsBrowseResponseGetServiceInstance(const otDnsBrowseResponse *aRespon * @retval OT_ERROR_NOT_FOUND Could not find a matching SRV record for @p aInstanceLabel. * @retval OT_ERROR_NO_BUFS The host name and/or TXT data could not fit in the given buffers. * @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse. - * */ otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse, const char *aInstanceLabel, @@ -480,7 +459,6 @@ otError otDnsBrowseResponseGetServiceInfo(const otDnsBrowseResponse *aResponse, * @retval OT_ERROR_NONE The address was read successfully. * @retval OT_ERROR_NOT_FOUND No address record for @p aHostname in @p aResponse at @p aIndex. * @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse. - * */ otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse, const char *aHostName, @@ -492,7 +470,6 @@ otError otDnsBrowseResponseGetHostAddress(const otDnsBrowseResponse *aResponse, * An opaque representation of a response to a service instance resolution DNS query. * * Pointers to instance of this type are provided from callback `otDnsAddressCallback`. - * */ typedef struct otDnsServiceResponse otDnsServiceResponse; @@ -510,7 +487,6 @@ typedef struct otDnsServiceResponse otDnsServiceResponse; * @param[in] aContext A pointer to application-specific context. * * For the full list of possible values for @p aError, please see `otDnsAddressCallback()`. - * */ typedef void (*otDnsServiceCallback)(otError aError, const otDnsServiceResponse *aResponse, void *aContext); @@ -545,7 +521,6 @@ typedef void (*otDnsServiceCallback)(otError aError, const otDnsServiceResponse * @retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the status. * @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query. * @retval OT_ERROR_INVALID_ARGS @p aInstanceLabel is NULL. - * */ otError otDnsClientResolveService(otInstance *aInstance, const char *aInstanceLabel, @@ -582,7 +557,6 @@ otError otDnsClientResolveService(otInstance *aInstance, * @retval OT_ERROR_NONE Query sent successfully. @p aCallback will be invoked to report the status. * @retval OT_ERROR_NO_BUFS Insufficient buffer to prepare and send query. * @retval OT_ERROR_INVALID_ARGS @p aInstanceLabel is NULL, or @p aConfig is invalid. - * */ otError otDnsClientResolveServiceAndHostAddress(otInstance *aInstance, const char *aInstanceLabel, @@ -605,7 +579,6 @@ otError otDnsClientResolveServiceAndHostAddress(otInstance *aInstanc * * @retval OT_ERROR_NONE The service name was read successfully. * @retval OT_ERROR_NO_BUFS Either the label or name does not fit in the given buffers. - * */ otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse, char *aLabelBuffer, @@ -644,7 +617,6 @@ otError otDnsServiceResponseGetServiceName(const otDnsServiceResponse *aResponse * @retval OT_ERROR_NOT_FOUND Could not find a required record in @p aResponse. * @retval OT_ERROR_NO_BUFS The host name and/or TXT data could not fit in the given buffers. * @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse. - * */ otError otDnsServiceResponseGetServiceInfo(const otDnsServiceResponse *aResponse, otDnsServiceInfo *aServiceInfo); @@ -667,7 +639,6 @@ otError otDnsServiceResponseGetServiceInfo(const otDnsServiceResponse *aResponse * @retval OT_ERROR_NONE The address was read successfully. * @retval OT_ERROR_NOT_FOUND No address record for @p aHostname in @p aResponse at @p aIndex. * @retval OT_ERROR_PARSE Could not parse the records in the @p aResponse. - * */ otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse, const char *aHostName, @@ -677,7 +648,6 @@ otError otDnsServiceResponseGetHostAddress(const otDnsServiceResponse *aResponse /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/dnssd_server.h b/include/openthread/dnssd_server.h index c008e326607..78f7469c62c 100644 --- a/include/openthread/dnssd_server.h +++ b/include/openthread/dnssd_server.h @@ -52,7 +52,6 @@ extern "C" { * This module includes APIs for DNS-SD server. * * @{ - * */ /** @@ -78,7 +77,6 @@ extern "C" { * * @sa otDnssdQueryHandleDiscoveredServiceInstance * @sa otDnssdQueryHandleDiscoveredHost - * */ typedef void (*otDnssdQuerySubscribeCallback)(void *aContext, const char *aFullName); @@ -96,19 +94,16 @@ typedef void (*otDnssdQuerySubscribeCallback)(void *aContext, const char *aFullN * @param[in] aContext A pointer to the application-specific context. * @param[in] aFullName The null-terminated full service name (e.g. "_ipps._tcp.default.service.arpa."), or * full service instance name (e.g. "OpenThread._ipps._tcp.default.service.arpa."). - * */ typedef void (*otDnssdQueryUnsubscribeCallback)(void *aContext, const char *aFullName); /** * This opaque type represents a DNS-SD query. - * */ typedef void otDnssdQuery; /** * Represents information of a discovered service instance for a DNS-SD query. - * */ typedef struct otDnssdServiceInstanceInfo { @@ -126,7 +121,6 @@ typedef struct otDnssdServiceInstanceInfo /** * Represents information of a discovered host for a DNS-SD query. - * */ typedef struct otDnssdHostInfo { @@ -137,7 +131,6 @@ typedef struct otDnssdHostInfo /** * Specifies a DNS-SD query type. - * */ typedef enum { @@ -161,7 +154,6 @@ typedef struct otUpstreamDnsCounters /** * Contains the counters of DNS-SD server. - * */ typedef struct otDnssdCounters { @@ -188,7 +180,6 @@ typedef struct otDnssdCounters * @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. * @param[in] aContext A pointer to the application-specific context. - * */ void otDnssdQuerySetCallbacks(otInstance *aInstance, otDnssdQuerySubscribeCallback aSubscribe, @@ -206,7 +197,6 @@ void otDnssdQuerySetCallbacks(otInstance *aInstance, * @param[in] aInstance The OpenThread instance structure. * @param[in] aServiceFullName The null-terminated full service name. * @param[in] aInstanceInfo A pointer to the discovered service instance information. - * */ void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aInstance, const char *aServiceFullName, @@ -222,7 +212,6 @@ void otDnssdQueryHandleDiscoveredServiceInstance(otInstance *aIn * @param[in] aInstance The OpenThread instance structure. * @param[in] aHostFullName The null-terminated full host name. * @param[in] aHostInfo A pointer to the discovered service instance information. - * */ void otDnssdQueryHandleDiscoveredHost(otInstance *aInstance, const char *aHostFullName, otDnssdHostInfo *aHostInfo); @@ -233,7 +222,6 @@ void otDnssdQueryHandleDiscoveredHost(otInstance *aInstance, const char *aHostFu * @param[in] aQuery The query pointer. Pass NULL to get the first query. * * @returns A pointer to the query or NULL if no more queries. - * */ const otDnssdQuery *otDnssdGetNextQuery(otInstance *aInstance, const otDnssdQuery *aQuery); @@ -244,7 +232,6 @@ const otDnssdQuery *otDnssdGetNextQuery(otInstance *aInstance, const otDnssdQuer * @param[out] aNameOutput The name output buffer, which should be `OT_DNS_MAX_NAME_SIZE` bytes long. * * @returns The DNS-SD query type. - * */ otDnssdQueryType otDnssdGetQueryTypeAndName(const otDnssdQuery *aQuery, char (*aNameOutput)[OT_DNS_MAX_NAME_SIZE]); @@ -254,7 +241,6 @@ otDnssdQueryType otDnssdGetQueryTypeAndName(const otDnssdQuery *aQuery, char (*a * @param[in] aInstance The OpenThread instance structure. * * @returns A pointer to the counters of the DNS-SD server. - * */ const otDnssdCounters *otDnssdGetCounters(otInstance *aInstance); @@ -269,7 +255,6 @@ const otDnssdCounters *otDnssdGetCounters(otInstance *aInstance); * @sa otPlatDnsStartUpstreamQuery * @sa otPlatDnsCancelUpstreamQuery * @sa otPlatDnsUpstreamQueryDone - * */ void otDnssdUpstreamQuerySetEnabled(otInstance *aInstance, bool aEnabled); @@ -283,13 +268,11 @@ void otDnssdUpstreamQuerySetEnabled(otInstance *aInstance, bool aEnabled); * @retval FALSE If the DNSSD server will not forward DNS queries. * * @sa otDnssdUpstreamQuerySetEnabled - * */ bool otDnssdUpstreamQueryIsEnabled(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/error.h b/include/openthread/error.h index d54d7bac66f..bef7360716c 100644 --- a/include/openthread/error.h +++ b/include/openthread/error.h @@ -48,12 +48,10 @@ extern "C" { * This module includes error definitions used in OpenThread. * * @{ - * */ /** * Represents error codes used throughout OpenThread. - * */ typedef enum OT_MUST_USE_RESULT otError { @@ -230,7 +228,6 @@ typedef enum OT_MUST_USE_RESULT otError /** * Special error code used to indicate success/error status is pending and not yet known. - * */ OT_ERROR_PENDING = 36, @@ -256,13 +253,11 @@ typedef enum OT_MUST_USE_RESULT otError * @param[in] aError An otError enum. * * @returns A string representation of an otError. - * */ const char *otThreadErrorToString(otError aError); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/heap.h b/include/openthread/heap.h index b3484b8bec4..e6e27e5d18d 100644 --- a/include/openthread/heap.h +++ b/include/openthread/heap.h @@ -48,14 +48,12 @@ extern "C" { * This module includes functions that set the external OpenThread heap. * * @{ - * */ // This is a temporary API and would be removed after moving heap to platform. // TODO: Remove after moving heap to platform. /** * @note This API is deprecated and use of it is discouraged. - * */ void *otHeapCAlloc(size_t aCount, size_t aSize); @@ -63,13 +61,11 @@ void *otHeapCAlloc(size_t aCount, size_t aSize); // TODO: Remove after moving heap to platform. /** * @note This API is deprecated and use of it is discouraged. - * */ void otHeapFree(void *aPointer); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/history_tracker.h b/include/openthread/history_tracker.h index 72a0c4a2da9..ec928056066 100644 --- a/include/openthread/history_tracker.h +++ b/include/openthread/history_tracker.h @@ -46,14 +46,12 @@ extern "C" { * The functions in this module are available when `OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE` is enabled. * * @{ - * */ /** * This constant specifies the maximum age of entries which is 49 days (in msec). * * Entries older than the max age will give this value as their age. - * */ #define OT_HISTORY_TRACKER_MAX_AGE (49 * 24 * 60 * 60 * 1000u) @@ -66,7 +64,6 @@ extern "C" { * by caller. * * Before using an iterator, it MUST be initialized using `otHistoryTrackerInitIterator()`, - * */ typedef struct otHistoryTrackerIterator { @@ -76,7 +73,6 @@ typedef struct otHistoryTrackerIterator /** * Represents Thread network info. - * */ typedef struct otHistoryTrackerNetworkInfo { @@ -89,7 +85,6 @@ typedef struct otHistoryTrackerNetworkInfo /** * Defines the events for an IPv6 (unicast or multicast) address info (i.e., whether address is added * or removed). - * */ typedef enum { @@ -99,7 +94,6 @@ typedef enum /** * Represent a unicast IPv6 address info. - * */ typedef struct otHistoryTrackerUnicastAddressInfo { @@ -115,7 +109,6 @@ typedef struct otHistoryTrackerUnicastAddressInfo /** * Represent an IPv6 multicast address info. - * */ typedef struct otHistoryTrackerMulticastAddressInfo { @@ -126,7 +119,6 @@ typedef struct otHistoryTrackerMulticastAddressInfo /** * Constants representing message priority used in `otHistoryTrackerMessageInfo` struct. - * */ enum { @@ -141,7 +133,6 @@ enum * * 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. - * */ typedef struct otHistoryTrackerMessageInfo { @@ -166,7 +157,6 @@ typedef struct otHistoryTrackerMessageInfo * 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 * tries to restore connection to them. - * */ typedef enum { @@ -178,7 +168,6 @@ typedef enum /** * Represents a neighbor info. - * */ typedef struct otHistoryTrackerNeighborInfo { @@ -194,7 +183,6 @@ typedef struct otHistoryTrackerNeighborInfo /** * Defines the events in a router info (i.e. whether router is added, removed, or changed). - * */ typedef enum { @@ -210,7 +198,6 @@ typedef enum /** * Represents a router table entry event. - * */ typedef struct otHistoryTrackerRouterInfo { @@ -223,7 +210,6 @@ typedef struct otHistoryTrackerRouterInfo /** * Defines the events for a Network Data entry (i.e., whether an entry is added or removed). - * */ typedef enum { @@ -233,7 +219,6 @@ typedef enum /** * Represent a Network Data on mesh prefix info. - * */ typedef struct otHistoryTrackerOnMeshPrefixInfo { @@ -243,7 +228,6 @@ typedef struct otHistoryTrackerOnMeshPrefixInfo /** * Represent a Network Data extern route info. - * */ typedef struct otHistoryTrackerExternalRouteInfo { @@ -263,7 +247,6 @@ typedef struct otHistoryTrackerExternalRouteInfo * (when entry was recorded) to the iterator initialization time. * * @param[in] aIterator A pointer to the iterator to initialize (MUST NOT be NULL). - * */ void otHistoryTrackerInitIterator(otHistoryTrackerIterator *aIterator); @@ -278,7 +261,6 @@ void otHistoryTrackerInitIterator(otHistoryTrackerIterator *aIterator); * older than max age. * * @returns A pointer to `otHistoryTrackerNetworkInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInstance *aInstance, otHistoryTrackerIterator *aIterator, @@ -295,7 +277,6 @@ const otHistoryTrackerNetworkInfo *otHistoryTrackerIterateNetInfoHistory(otInsta * older than max age. * * @returns A pointer to `otHistoryTrackerUnicastAddressInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressHistory( otInstance *aInstance, @@ -313,7 +294,6 @@ const otHistoryTrackerUnicastAddressInfo *otHistoryTrackerIterateUnicastAddressH * older than max age. * * @returns A pointer to `otHistoryTrackerMulticastAddressInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddressHistory( otInstance *aInstance, @@ -331,7 +311,6 @@ const otHistoryTrackerMulticastAddressInfo *otHistoryTrackerIterateMulticastAddr * older than max age. * * @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance *aInstance, otHistoryTrackerIterator *aIterator, @@ -348,7 +327,6 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateRxHistory(otInstance * older than max age. * * @returns The `otHistoryTrackerMessageInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance *aInstance, otHistoryTrackerIterator *aIterator, @@ -365,7 +343,6 @@ const otHistoryTrackerMessageInfo *otHistoryTrackerIterateTxHistory(otInstance * older than max age. * * @returns The `otHistoryTrackerNeighborInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otInstance *aInstance, otHistoryTrackerIterator *aIterator, @@ -382,7 +359,6 @@ const otHistoryTrackerNeighborInfo *otHistoryTrackerIterateNeighborHistory(otIns * older than max age. * * @returns The `otHistoryTrackerRouterInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerRouterInfo *otHistoryTrackerIterateRouterHistory(otInstance *aInstance, otHistoryTrackerIterator *aIterator, @@ -399,7 +375,6 @@ const otHistoryTrackerRouterInfo *otHistoryTrackerIterateRouterHistory(otInstanc * older than max age. * * @returns The `otHistoryTrackerOnMeshPrefixInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHistory(otInstance *aInstance, otHistoryTrackerIterator *aIterator, @@ -416,7 +391,6 @@ const otHistoryTrackerOnMeshPrefixInfo *otHistoryTrackerIterateOnMeshPrefixHisto * older than max age. * * @returns The `otHistoryTrackerExternalRouteInfo` entry or `NULL` if no more entries in the list. - * */ const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHistory( otInstance *aInstance, @@ -435,13 +409,11 @@ const otHistoryTrackerExternalRouteInfo *otHistoryTrackerIterateExternalRouteHis * @param[in] aEntryAge The entry age (duration in msec). * @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL). * @param[in] aSize The size of @p aBuffer. Recommended to use `OT_HISTORY_TRACKER_ENTRY_AGE_STRING_SIZE`. - * */ void otHistoryTrackerEntryAgeToString(uint32_t aEntryAge, char *aBuffer, uint16_t aSize); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/icmp6.h b/include/openthread/icmp6.h index e7359ac297d..b903e8ecddb 100644 --- a/include/openthread/icmp6.h +++ b/include/openthread/icmp6.h @@ -49,12 +49,10 @@ extern "C" { * This module includes functions that control ICMPv6 communication. * * @{ - * */ /** * ICMPv6 Message Types - * */ typedef enum otIcmp6Type { @@ -72,7 +70,6 @@ typedef enum otIcmp6Type /** * ICMPv6 Message Codes - * */ typedef enum otIcmp6Code { @@ -88,7 +85,6 @@ typedef enum otIcmp6Code * @struct otIcmp6Header * * Represents an ICMPv6 header. - * */ OT_TOOL_PACKED_BEGIN struct otIcmp6Header @@ -106,7 +102,6 @@ struct otIcmp6Header /** * Represents an ICMPv6 header. - * */ typedef struct otIcmp6Header otIcmp6Header; @@ -117,7 +112,6 @@ typedef struct otIcmp6Header otIcmp6Header; * @param[in] aMessage A pointer to the received message. * @param[in] aMessageInfo A pointer to message information associated with @p aMessage. * @param[in] aIcmpHeader A pointer to the received ICMPv6 header. - * */ typedef void (*otIcmp6ReceiveCallback)(void *aContext, otMessage *aMessage, @@ -126,7 +120,6 @@ typedef void (*otIcmp6ReceiveCallback)(void *aContext, /** * Implements ICMPv6 message handler. - * */ typedef struct otIcmp6Handler { @@ -137,7 +130,6 @@ typedef struct otIcmp6Handler /** * ICMPv6 Echo Reply Modes - * */ typedef enum otIcmp6EchoMode { @@ -157,7 +149,6 @@ typedef enum otIcmp6EchoMode * @retval OT_ICMP6_ECHO_HANDLER_UNICAST_ONLY ICMPv6 Echo processing enabled for unicast requests only * @retval OT_ICMP6_ECHO_HANDLER_MULTICAST_ONLY ICMPv6 Echo processing enabled for multicast requests only * @retval OT_ICMP6_ECHO_HANDLER_ALL ICMPv6 Echo processing enabled for unicast and multicast requests - * */ otIcmp6EchoMode otIcmp6GetEchoMode(otInstance *aInstance); @@ -166,7 +157,6 @@ otIcmp6EchoMode otIcmp6GetEchoMode(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMode The ICMPv6 Echo processing mode. - * */ void otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode); @@ -179,7 +169,6 @@ void otIcmp6SetEchoMode(otInstance *aInstance, otIcmp6EchoMode aMode); * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aHandler A pointer to a handler containing callback that is called when * an ICMPv6 message is received. - * */ otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler); @@ -191,7 +180,6 @@ otError otIcmp6RegisterHandler(otInstance *aInstance, otIcmp6Handler *aHandler); * @param[in] aMessageInfo A reference to message information associated with @p aMessage. * @param[in] aIdentifier An identifier to aid in matching Echo Replies to this Echo Request. * May be zero. - * */ otError otIcmp6SendEchoRequest(otInstance *aInstance, otMessage *aMessage, @@ -200,7 +188,6 @@ otError otIcmp6SendEchoRequest(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/instance.h b/include/openthread/instance.h index 3d005568efa..a9e55198e0d 100644 --- a/include/openthread/instance.h +++ b/include/openthread/instance.h @@ -51,9 +51,8 @@ extern "C" { * This number MUST increase by one each time the contents of public OpenThread API include headers change. * * @note This number versions both OpenThread platform and user APIs. - * */ -#define OPENTHREAD_API_VERSION (446) +#define OPENTHREAD_API_VERSION (447) /** * @addtogroup api-instance @@ -62,7 +61,6 @@ extern "C" { * This module includes functions that control the OpenThread Instance. * * @{ - * */ /** @@ -85,7 +83,6 @@ typedef struct otInstance otInstance; * @returns A pointer to the new OpenThread instance. * * @sa otInstanceFinalize - * */ otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize); @@ -98,7 +95,6 @@ otInstance *otInstanceInit(void *aInstanceBuffer, size_t *aInstanceBufferSize); * Is available and can only be used when support for multiple OpenThread instances is disabled. * * @returns A pointer to the single OpenThread instance. - * */ otInstance *otInstanceInitSingle(void); @@ -115,7 +111,6 @@ otInstance *otInstanceInitSingle(void); * @param[in] aIdx The index of the OpenThread instance to initialize. * * @returns A pointer to the new OpenThread instance. - * */ otInstance *otInstanceInitMultiple(uint8_t aIdx); @@ -126,7 +121,6 @@ otInstance *otInstanceInitMultiple(uint8_t aIdx); * change after initialization. * * @returns The instance identifier. - * */ uint32_t otInstanceGetId(otInstance *aInstance); @@ -140,7 +134,6 @@ uint32_t otInstanceGetId(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns TRUE if the given instance is valid/initialized, FALSE otherwise. - * */ bool otInstanceIsInitialized(otInstance *aInstance); @@ -150,7 +143,6 @@ bool otInstanceIsInitialized(otInstance *aInstance); * Call this function when OpenThread is no longer in use. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otInstanceFinalize(otInstance *aInstance); @@ -164,7 +156,6 @@ void otInstanceFinalize(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The uptime (number of milliseconds). - * */ uint64_t otInstanceGetUptime(otInstance *aInstance); @@ -184,7 +175,6 @@ uint64_t otInstanceGetUptime(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aBuffer A pointer to a char array to output the string. * @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_UPTIME_STRING_SIZE`. - * */ void otInstanceGetUptimeAsString(otInstance *aInstance, char *aBuffer, uint16_t aSize); @@ -224,7 +214,6 @@ void otInstanceGetUptimeAsString(otInstance *aInstance, char *aBuffer, uint16_t /** * Represents a bit-field indicating specific state/configuration that has changed. See `OT_CHANGED_*` * definitions. - * */ typedef uint32_t otChangedFlags; @@ -233,7 +222,6 @@ typedef uint32_t otChangedFlags; * * @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. - * */ typedef void (*otStateChangedCallback)(otChangedFlags aFlags, void *aContext); @@ -247,7 +235,6 @@ typedef void (*otStateChangedCallback)(otChangedFlags aFlags, void *aContext); * @retval OT_ERROR_NONE Added the callback to the list of callbacks. * @retval OT_ERROR_ALREADY The callback was already registered. * @retval OT_ERROR_NO_BUFS Could not add the callback due to resource constraints. - * */ otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aContext); @@ -257,7 +244,6 @@ otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback * @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. * @param[in] aContext A pointer to application-specific context. - * */ void otRemoveStateChangeCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aContext); @@ -268,7 +254,6 @@ void otRemoveStateChangeCallback(otInstance *aInstance, otStateChangedCallback a * `otPlatformReset` does not erase any persistent state/info saved in non-volatile memory. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otInstanceReset(otInstance *aInstance); @@ -282,7 +267,6 @@ void otInstanceReset(otInstance *aInstance); * @retval OT_ERROR_NONE Reset to bootloader successfully. * @retval OT_ERROR_BUSY Failed due to another operation is ongoing. * @retval OT_ERROR_NOT_CAPABLE Not capable of resetting to bootloader. - * */ otError otInstanceResetToBootloader(otInstance *aInstance); @@ -290,7 +274,6 @@ otError otInstanceResetToBootloader(otInstance *aInstance); * Deletes all the settings stored on non-volatile memory, and then triggers a platform reset. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otInstanceFactoryReset(otInstance *aInstance); @@ -302,7 +285,6 @@ void otInstanceFactoryReset(otInstance *aInstance); * This API is only available under radio builds (`OPENTHREAD_RADIO = 1`). * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otInstanceResetRadioStack(otInstance *aInstance); @@ -314,7 +296,6 @@ void otInstanceResetRadioStack(otInstance *aInstance); * * @retval OT_ERROR_NONE All persistent info/state was erased successfully. * @retval OT_ERROR_INVALID_STATE Device is not in `disabled` state/role. - * */ otError otInstanceErasePersistentInfo(otInstance *aInstance); @@ -322,7 +303,6 @@ otError otInstanceErasePersistentInfo(otInstance *aInstance); * Gets the OpenThread version string. * * @returns A pointer to the OpenThread version. - * */ const char *otGetVersionString(void); @@ -332,13 +312,11 @@ const char *otGetVersionString(void); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the OpenThread radio version. - * */ const char *otGetRadioVersionString(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/ip6.h b/include/openthread/ip6.h index 4d1f3ce6021..4c05b2bae1e 100644 --- a/include/openthread/ip6.h +++ b/include/openthread/ip6.h @@ -49,7 +49,6 @@ extern "C" { * This module includes functions that control IPv6 communication. * * @{ - * */ #define OT_IP6_PREFIX_SIZE 8 ///< Size of an IPv6 prefix (bytes) @@ -64,7 +63,6 @@ extern "C" { * @struct otIp6InterfaceIdentifier * * Represents the Interface Identifier of an IPv6 address. - * */ OT_TOOL_PACKED_BEGIN struct otIp6InterfaceIdentifier @@ -79,7 +77,6 @@ struct otIp6InterfaceIdentifier /** * Represents the Interface Identifier of an IPv6 address. - * */ typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier; @@ -87,7 +84,6 @@ typedef struct otIp6InterfaceIdentifier otIp6InterfaceIdentifier; * @struct otIp6NetworkPrefix * * Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). - * */ OT_TOOL_PACKED_BEGIN struct otIp6NetworkPrefix @@ -97,7 +93,6 @@ struct otIp6NetworkPrefix /** * Represents the Network Prefix of an IPv6 address (most significant 64 bits of the address). - * */ typedef struct otIp6NetworkPrefix otIp6NetworkPrefix; @@ -105,7 +100,6 @@ typedef struct otIp6NetworkPrefix otIp6NetworkPrefix; * @struct otIp6AddressComponents * * Represents the components of an IPv6 address. - * */ OT_TOOL_PACKED_BEGIN struct otIp6AddressComponents @@ -116,7 +110,6 @@ struct otIp6AddressComponents /** * Represents the components of an IPv6 address. - * */ typedef struct otIp6AddressComponents otIp6AddressComponents; @@ -124,7 +117,6 @@ typedef struct otIp6AddressComponents otIp6AddressComponents; * @struct otIp6Address * * Represents an IPv6 address. - * */ OT_TOOL_PACKED_BEGIN struct otIp6Address @@ -140,7 +132,6 @@ struct otIp6Address /** * Represents an IPv6 address. - * */ typedef struct otIp6Address otIp6Address; @@ -148,7 +139,6 @@ typedef struct otIp6Address otIp6Address; * @struct otIp6Prefix * * Represents an IPv6 prefix. - * */ OT_TOOL_PACKED_BEGIN struct otIp6Prefix @@ -159,13 +149,11 @@ struct otIp6Prefix /** * Represents an IPv6 prefix. - * */ typedef struct otIp6Prefix otIp6Prefix; /** * IPv6 Address origins - * */ enum { @@ -177,7 +165,6 @@ enum /** * Represents an IPv6 network interface unicast address. - * */ typedef struct otNetifAddress { @@ -196,7 +183,6 @@ typedef struct otNetifAddress /** * Represents an IPv6 network interface multicast address. - * */ typedef struct otNetifMulticastAddress { @@ -206,7 +192,6 @@ typedef struct otNetifMulticastAddress /** * Represents an IPv6 socket address. - * */ typedef struct otSockAddr { @@ -216,7 +201,6 @@ typedef struct otSockAddr /** * ECN statuses, represented as in the IP header. - * */ enum { @@ -228,7 +212,6 @@ enum /** * Represents the local and peer IPv6 socket addresses. - * */ typedef struct otMessageInfo { @@ -247,7 +230,6 @@ typedef struct otMessageInfo /** * Internet Protocol Numbers. - * */ enum { @@ -273,7 +255,6 @@ enum * @retval OT_ERROR_NONE Successfully brought the IPv6 interface up/down. * @retval OT_ERROR_INVALID_STATE IPv6 interface is not available since device is operating in raw-link mode * (applicable only when `OPENTHREAD_CONFIG_LINK_RAW_ENABLE` feature is enabled). - * */ otError otIp6SetEnabled(otInstance *aInstance, bool aEnabled); @@ -284,7 +265,6 @@ otError otIp6SetEnabled(otInstance *aInstance, bool aEnabled); * * @retval TRUE The IPv6 interface is enabled. * @retval FALSE The IPv6 interface is disabled. - * */ bool otIp6IsEnabled(otInstance *aInstance); @@ -300,7 +280,6 @@ bool otIp6IsEnabled(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully added (or updated) the Network Interface Address. * @retval OT_ERROR_INVALID_ARGS The IP Address indicated by @p aAddress is an internal address. * @retval OT_ERROR_NO_BUFS The Network Interface is already storing the maximum allowed external addresses. - * */ otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *aAddress); @@ -313,7 +292,6 @@ otError otIp6AddUnicastAddress(otInstance *aInstance, const otNetifAddress *aAdd * @retval OT_ERROR_NONE Successfully removed the Network Interface Address. * @retval OT_ERROR_INVALID_ARGS The IP Address indicated by @p aAddress is an internal address. * @retval OT_ERROR_NOT_FOUND The IP Address indicated by @p aAddress was not found. - * */ otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress); @@ -323,7 +301,6 @@ otError otIp6RemoveUnicastAddress(otInstance *aInstance, const otIp6Address *aAd * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the first Network Interface Address. - * */ const otNetifAddress *otIp6GetUnicastAddresses(otInstance *aInstance); @@ -335,7 +312,6 @@ const otNetifAddress *otIp6GetUnicastAddresses(otInstance *aInstance); * * @retval TRUE If @p aAddress is assigned to the Thread interface. * @retval FALSE If @p aAddress is not assigned to the Thread interface. - * */ bool otIp6HasUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress); @@ -354,7 +330,6 @@ bool otIp6HasUnicastAddress(otInstance *aInstance, const otIp6Address *aAddress) * @retval OT_ERROR_REJECTED The IP Address indicated by @p aAddress is an internal multicast address. * @retval OT_ERROR_NO_BUFS The Network Interface is already storing the maximum allowed external multicast * addresses. - * */ otError otIp6SubscribeMulticastAddress(otInstance *aInstance, const otIp6Address *aAddress); @@ -367,7 +342,6 @@ otError otIp6SubscribeMulticastAddress(otInstance *aInstance, const otIp6Address * @retval OT_ERROR_NONE Successfully unsubscribed to the Network Interface Multicast Address. * @retval OT_ERROR_REJECTED The IP Address indicated by @p aAddress is an internal address. * @retval OT_ERROR_NOT_FOUND The IP Address indicated by @p aAddress was not found. - * */ otError otIp6UnsubscribeMulticastAddress(otInstance *aInstance, const otIp6Address *aAddress); @@ -377,7 +351,6 @@ otError otIp6UnsubscribeMulticastAddress(otInstance *aInstance, const otIp6Addre * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the first Network Interface Multicast Address. - * */ const otNetifMulticastAddress *otIp6GetMulticastAddresses(otInstance *aInstance); @@ -393,7 +366,6 @@ const otNetifMulticastAddress *otIp6GetMulticastAddresses(otInstance *aInstance) * @returns A pointer to the message buffer or NULL if no message buffers are available or parameters are invalid. * * @sa otMessageFree - * */ otMessage *otIp6NewMessage(otInstance *aInstance, const otMessageSettings *aSettings); @@ -412,7 +384,6 @@ otMessage *otIp6NewMessage(otInstance *aInstance, const otMessageSettings *aSett * @returns A pointer to the message or NULL if malformed IPv6 header or insufficient message buffers are available. * * @sa otMessageFree - * */ otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance, const uint8_t *aData, @@ -426,7 +397,6 @@ otMessage *otIp6NewMessageFromBuffer(otInstance *aInstance, * the ownership of the @p aMessage to the receiver of the callback. The message should be * freed by the receiver of the callback after it is processed (see otMessageFree()). * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otIp6ReceiveCallback)(otMessage *aMessage, void *aContext); @@ -443,13 +413,11 @@ typedef void (*otIp6ReceiveCallback)(otMessage *aMessage, void *aContext); * * @sa otIp6IsReceiveFilterEnabled * @sa otIp6SetReceiveFilterEnabled - * */ void otIp6SetReceiveCallback(otInstance *aInstance, otIp6ReceiveCallback aCallback, void *aCallbackContext); /** * Represents IPv6 address information. - * */ typedef struct otIp6AddressInfo { @@ -466,7 +434,6 @@ typedef struct otIp6AddressInfo * @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. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otIp6AddressCallback)(const otIp6AddressInfo *aAddressInfo, bool aIsAdded, void *aContext); @@ -477,7 +444,6 @@ typedef void (*otIp6AddressCallback)(const otIp6AddressInfo *aAddressInfo, bool * @param[in] aCallback A pointer to a function that is called when an internal IPv6 address is added or * removed. NULL to disable the callback. * @param[in] aCallbackContext A pointer to application-specific context. - * */ void otIp6SetAddressCallback(otInstance *aInstance, otIp6AddressCallback aCallback, void *aCallbackContext); @@ -491,7 +457,6 @@ void otIp6SetAddressCallback(otInstance *aInstance, otIp6AddressCallback aCallba * * @sa otIp6SetReceiveCallback * @sa otIp6SetReceiveFilterEnabled - * */ bool otIp6IsReceiveFilterEnabled(otInstance *aInstance); @@ -504,7 +469,6 @@ bool otIp6IsReceiveFilterEnabled(otInstance *aInstance); * * @sa otIp6SetReceiveCallback * @sa otIsReceiveIp6FilterEnabled - * */ void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled); @@ -526,7 +490,6 @@ void otIp6SetReceiveFilterEnabled(otInstance *aInstance, bool aEnabled); * @retval OT_ERROR_PARSE Encountered a malformed header when processing the message. * @retval OT_ERROR_INVALID_ARGS The message's metadata is invalid, e.g. the message uses * `OT_MESSAGE_ORIGIN_THREAD_NETIF` as the origin. - * */ otError otIp6Send(otInstance *aInstance, otMessage *aMessage); @@ -539,7 +502,6 @@ otError otIp6Send(otInstance *aInstance, otMessage *aMessage); * @retval OT_ERROR_NONE The port was successfully added to the allowed unsecure port list. * @retval OT_ERROR_INVALID_ARGS The port is invalid (value 0 is reserved for internal use). * @retval OT_ERROR_NO_BUFS The unsecure port list is full. - * */ otError otIp6AddUnsecurePort(otInstance *aInstance, uint16_t aPort); @@ -556,7 +518,6 @@ otError otIp6AddUnsecurePort(otInstance *aInstance, uint16_t aPort); * @retval OT_ERROR_NONE The port was successfully removed from the allowed unsecure port list. * @retval OT_ERROR_INVALID_ARGS The port is invalid (value 0 is reserved for internal use). * @retval OT_ERROR_NOT_FOUND The port was not found in the unsecure port list. - * */ otError otIp6RemoveUnsecurePort(otInstance *aInstance, uint16_t aPort); @@ -564,7 +525,6 @@ otError otIp6RemoveUnsecurePort(otInstance *aInstance, uint16_t aPort); * Removes all ports from the allowed unsecure port list. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otIp6RemoveAllUnsecurePorts(otInstance *aInstance); @@ -577,7 +537,6 @@ void otIp6RemoveAllUnsecurePorts(otInstance *aInstance); * @param[out] aNumEntries The number of entries in the list. * * @returns A pointer to the unsecure port list. - * */ const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntries); @@ -589,7 +548,6 @@ const uint16_t *otIp6GetUnsecurePorts(otInstance *aInstance, uint8_t *aNumEntrie * * @retval TRUE The two IPv6 addresses are the same. * @retval FALSE The two IPv6 addresses are not the same. - * */ bool otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond); @@ -601,7 +559,6 @@ bool otIp6IsAddressEqual(const otIp6Address *aFirst, const otIp6Address *aSecond * * @retval TRUE The two IPv6 prefixes are the same. * @retval FALSE The two IPv6 prefixes are not the same. - * */ bool otIp6ArePrefixesEqual(const otIp6Prefix *aFirst, const otIp6Prefix *aSecond); @@ -613,7 +570,6 @@ bool otIp6ArePrefixesEqual(const otIp6Prefix *aFirst, const otIp6Prefix *aSecond * * @retval OT_ERROR_NONE Successfully parsed @p aString and updated @p aAddress. * @retval OT_ERROR_PARSE Failed to parse @p aString as an IPv6 address. - * */ otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress); @@ -628,7 +584,6 @@ otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress); * * @retval OT_ERROR_NONE Successfully parsed the string as an IPv6 prefix and updated @p aPrefix. * @retval OT_ERROR_PARSE Failed to parse @p aString as an IPv6 prefix. - * */ otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix); @@ -645,7 +600,6 @@ otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix); * @param[in] aAddress A pointer to an IPv6 address (MUST NOT be NULL). * @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL). * @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_IP6_ADDRESS_STRING_SIZE`. - * */ void otIp6AddressToString(const otIp6Address *aAddress, char *aBuffer, uint16_t aSize); @@ -664,7 +618,6 @@ void otIp6AddressToString(const otIp6Address *aAddress, char *aBuffer, uint16_t * @param[in] aSockAddr A pointer to an IPv6 socket address (MUST NOT be NULL). * @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL). * @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_IP6_SOCK_ADDR_STRING_SIZE`. - * */ void otIp6SockAddrToString(const otSockAddr *aSockAddr, char *aBuffer, uint16_t aSize); @@ -681,7 +634,6 @@ void otIp6SockAddrToString(const otSockAddr *aSockAddr, char *aBuffer, uint16_t * @param[in] aPrefix A pointer to an IPv6 prefix (MUST NOT be NULL). * @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL). * @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_IP6_PREFIX_STRING_SIZE`. - * */ void otIp6PrefixToString(const otIp6Prefix *aPrefix, char *aBuffer, uint16_t aSize); @@ -692,7 +644,6 @@ void otIp6PrefixToString(const otIp6Prefix *aPrefix, char *aBuffer, uint16_t aSi * @param[in] aSecond A pointer to the second IPv6 address. * * @returns The prefix match length in bits. - * */ uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond); @@ -702,7 +653,6 @@ uint8_t otIp6PrefixMatch(const otIp6Address *aFirst, const otIp6Address *aSecond * @param[in] aAddress A pointer to an IPv6 address. * @param[in] aLength The length of prefix in bits. * @param[out] aPrefix A pointer to output the IPv6 prefix. - * */ void otIp6GetPrefix(const otIp6Address *aAddress, uint8_t aLength, otIp6Prefix *aPrefix); @@ -713,7 +663,6 @@ void otIp6GetPrefix(const otIp6Address *aAddress, uint8_t aLength, otIp6Prefix * * * @retval TRUE If the IPv6 address is the Unspecified Address. * @retval FALSE If the IPv6 address is not the Unspecified Address. - * */ bool otIp6IsAddressUnspecified(const otIp6Address *aAddress); @@ -725,7 +674,6 @@ bool otIp6IsAddressUnspecified(const otIp6Address *aAddress); * * @retval OT_ERROR_NONE Found a source address and is filled into mSockAddr of @p aMessageInfo. * @retval OT_ERROR_NOT_FOUND No source address was found and @p aMessageInfo is unchanged. - * */ otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageInfo); @@ -736,7 +684,6 @@ otError otIp6SelectSourceAddress(otInstance *aInstance, otMessageInfo *aMessageI * * @retval TRUE SLAAC module is enabled. * @retval FALSE SLAAC module is disabled. - * */ bool otIp6IsSlaacEnabled(otInstance *aInstance); @@ -750,7 +697,6 @@ bool otIp6IsSlaacEnabled(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled TRUE to enable, FALSE to disable. - * */ void otIp6SetSlaacEnabled(otInstance *aInstance, bool aEnabled); @@ -766,7 +712,6 @@ void otIp6SetSlaacEnabled(otInstance *aInstance, bool aEnabled); * * @retval TRUE Indicates that the SLAAC address based on the prefix should be filtered and NOT added. * @retval FALSE Indicates that the SLAAC address based on the prefix should be added. - * */ typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix *aPrefix); @@ -784,7 +729,6 @@ typedef bool (*otIp6SlaacPrefixFilter)(otInstance *aInstance, const otIp6Prefix * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aFilter A pointer to SLAAC prefix filter handler, or NULL to disable filtering. - * */ void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFilter); @@ -800,7 +744,6 @@ void otIp6SetSlaacPrefixFilter(otInstance *aInstance, otIp6SlaacPrefixFilter aFi * @param[in] aFailedAddressNum The number of failed IPv6 addresses when @p aError is OT_ERROR_NONE. * * @sa otIp6RegisterMulticastListeners - * */ typedef void (*otIp6RegisterMulticastListenersCallback)(void *aContext, otError aError, @@ -834,7 +777,6 @@ typedef void (*otIp6RegisterMulticastListenersCallback)(void *aCon * @retval OT_ERROR_NO_BUFS If insufficient message buffers available. * * @sa otIp6RegisterMulticastListenersCallback - * */ otError otIp6RegisterMulticastListeners(otInstance *aInstance, const otIp6Address *aAddresses, @@ -853,7 +795,6 @@ otError otIp6RegisterMulticastListeners(otInstance * * * @retval OT_ERROR_NONE Successfully set the Mesh Local IID. * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. - * */ otError otIp6SetMeshLocalIid(otInstance *aInstance, const otIp6InterfaceIdentifier *aIid); @@ -863,13 +804,11 @@ otError otIp6SetMeshLocalIid(otInstance *aInstance, const otIp6InterfaceIdentifi * @param[in] aIpProto An IP protocol number (`OT_IP6_PROTO_*` enumeration). * * @returns A string representing @p aIpProto. - * */ const char *otIp6ProtoToString(uint8_t aIpProto); /** * Represents the counters for packets and bytes. - * */ typedef struct otPacketsAndBytes { @@ -879,7 +818,6 @@ typedef struct otPacketsAndBytes /** * Represents the counters of packets forwarded via Border Routing. - * */ typedef struct otBorderRoutingCounters { @@ -905,7 +843,6 @@ typedef struct otBorderRoutingCounters * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the Border Routing counters. - * */ const otBorderRoutingCounters *otIp6GetBorderRoutingCounters(otInstance *aInstance); @@ -913,13 +850,11 @@ const otBorderRoutingCounters *otIp6GetBorderRoutingCounters(otInstance *aInstan * Resets the Border Routing counters. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otIp6ResetBorderRoutingCounters(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/jam_detection.h b/include/openthread/jam_detection.h index e49f8b430e7..ddf523e9f8c 100644 --- a/include/openthread/jam_detection.h +++ b/include/openthread/jam_detection.h @@ -51,7 +51,6 @@ extern "C" { * is enabled. * * @{ - * */ /** @@ -59,7 +58,6 @@ extern "C" { * * @param[in] aJamState Current jam state (`true` if jam is detected, `false` otherwise). * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otJamDetectionCallback)(bool aJamState, void *aContext); @@ -70,7 +68,6 @@ typedef void (*otJamDetectionCallback)(bool aJamState, void *aContext); * @param[in] aRssiThreshold The RSSI threshold. * * @retval OT_ERROR_NONE Successfully set the threshold. - * */ otError otJamDetectionSetRssiThreshold(otInstance *aInstance, int8_t aRssiThreshold); @@ -91,7 +88,6 @@ int8_t otJamDetectionGetRssiThreshold(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the window. * @retval OT_ERROR_INVALID_ARGS The given input parameter not within valid range (1-63) - * */ otError otJamDetectionSetWindow(otInstance *aInstance, uint8_t aWindow); @@ -101,7 +97,6 @@ otError otJamDetectionSetWindow(otInstance *aInstance, uint8_t aWindow); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Jam Detection Window. - * */ uint8_t otJamDetectionGetWindow(otInstance *aInstance); @@ -117,7 +112,6 @@ uint8_t otJamDetectionGetWindow(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the window. * @retval OT_ERROR_INVALID_ARGS The given input is not within the valid range. - * */ otError otJamDetectionSetBusyPeriod(otInstance *aInstance, uint8_t aBusyPeriod); @@ -127,7 +121,6 @@ otError otJamDetectionSetBusyPeriod(otInstance *aInstance, uint8_t aBusyPeriod); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Jam Detection Busy Period. - * */ uint8_t otJamDetectionGetBusyPeriod(otInstance *aInstance); @@ -140,7 +133,6 @@ uint8_t otJamDetectionGetBusyPeriod(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully started the jamming detection. * @retval OT_ERROR_ALREADY Jam detection has been started before. - * */ otError otJamDetectionStart(otInstance *aInstance, otJamDetectionCallback aCallback, void *aContext); @@ -151,7 +143,6 @@ otError otJamDetectionStart(otInstance *aInstance, otJamDetectionCallback aCallb * * @retval OT_ERROR_NONE Successfully stopped the jamming detection. * @retval OT_ERROR_ALREADY Jam detection is already stopped. - * */ otError otJamDetectionStop(otInstance *aInstance); @@ -161,7 +152,6 @@ otError otJamDetectionStop(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Jam Detection status (true if enabled, false otherwise). - * */ bool otJamDetectionIsEnabled(otInstance *aInstance); @@ -171,7 +161,6 @@ bool otJamDetectionIsEnabled(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Jam Detection state (`true` jam is detected, `false' otherwise). - * */ bool otJamDetectionGetState(otInstance *aInstance); @@ -188,13 +177,11 @@ bool otJamDetectionGetState(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current history bitmap. - * */ uint64_t otJamDetectionGetHistoryBitmap(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/joiner.h b/include/openthread/joiner.h index 7b8968455ec..98534db063e 100644 --- a/include/openthread/joiner.h +++ b/include/openthread/joiner.h @@ -52,12 +52,10 @@ extern "C" { * The functions in this module require `OPENTHREAD_CONFIG_JOINER_ENABLE=1`. * * @{ - * */ /** * Defines the Joiner State. - * */ typedef enum otJoinerState { @@ -73,7 +71,6 @@ typedef enum otJoinerState /** * Represents a Joiner Discerner. - * */ typedef struct otJoinerDiscerner { @@ -89,7 +86,6 @@ typedef struct otJoinerDiscerner * OT_ERROR_NOT_FOUND if no joinable network was discovered. * OT_ERROR_RESPONSE_TIMEOUT if a response timed out. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otJoinerCallback)(otError aError, void *aContext); @@ -110,7 +106,6 @@ typedef void (*otJoinerCallback)(otError aError, void *aContext); * @retval OT_ERROR_BUSY The previous attempt is still on-going. * @retval OT_ERROR_INVALID_ARGS @p aPskd or @p aProvisioningUrl is invalid. * @retval OT_ERROR_INVALID_STATE The IPv6 stack is not enabled or Thread stack is fully enabled. - * */ otError otJoinerStart(otInstance *aInstance, const char *aPskd, @@ -126,7 +121,6 @@ otError otJoinerStart(otInstance *aInstance, * Disables the Thread Joiner role. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otJoinerStop(otInstance *aInstance); @@ -136,7 +130,6 @@ void otJoinerStop(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The joiner state. - * */ otJoinerState otJoinerGetState(otInstance *aInstance); @@ -151,7 +144,6 @@ otJoinerState otJoinerGetState(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns A pointer to the Joiner ID. - * */ const otExtAddress *otJoinerGetId(otInstance *aInstance); @@ -168,7 +160,6 @@ const otExtAddress *otJoinerGetId(otInstance *aInstance); * @retval OT_ERROR_NONE The Joiner Discerner updated successfully. * @retval OT_ERROR_INVALID_ARGS @p aDiscerner is not valid (specified length is not within valid range). * @retval OT_ERROR_INVALID_STATE There is an ongoing Joining process so Joiner Discerner could not be changed. - * */ otError otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerner); @@ -178,7 +169,6 @@ otError otJoinerSetDiscerner(otInstance *aInstance, otJoinerDiscerner *aDiscerne * @param[in] aInstance A pointer to the OpenThread instance. * * @returns A pointer to Joiner Discerner or NULL if none is set. - * */ const otJoinerDiscerner *otJoinerGetDiscerner(otInstance *aInstance); @@ -188,13 +178,11 @@ const otJoinerDiscerner *otJoinerGetDiscerner(otInstance *aInstance); * @param[in] aState The joiner state. * * @returns A human-readable string representation of @p aState. - * */ const char *otJoinerStateToString(otJoinerState aState); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/link.h b/include/openthread/link.h index bd42cff20de..7cdbca66f76 100644 --- a/include/openthread/link.h +++ b/include/openthread/link.h @@ -50,13 +50,11 @@ extern "C" { * This module includes functions that control link-layer configuration. * * @{ - * */ #define OT_US_PER_TEN_SYMBOLS OT_RADIO_TEN_SYMBOLS_TIME ///< Time for 10 symbols in units of microseconds /** * Used to indicate no fixed received signal strength was set - * */ #define OT_MAC_FILTER_FIXED_RSS_DISABLED 127 @@ -66,7 +64,6 @@ typedef uint8_t otMacFilterIterator; ///< Used to iterate through mac filter ent /** * Defines address mode of the mac filter. - * */ typedef enum otMacFilterAddressMode { @@ -77,7 +74,6 @@ typedef enum otMacFilterAddressMode /** * Represents a Mac Filter entry. - * */ typedef struct otMacFilterEntry { @@ -87,7 +83,6 @@ typedef struct otMacFilterEntry /** * Represents the MAC layer counters. - * */ typedef struct otMacCounters { @@ -114,61 +109,51 @@ typedef struct otMacCounters * - @p mTxTotal = @p mTxUnicast + @p mTxBroadcast * - @p mTxTotal = @p mTxAckRequested + @p mTxNoAckRequested * - @p mTxTotal = @p mTxData + @p mTxDataPoll + @p mTxBeacon + @p mTxBeaconRequest + @p mTxOther - * */ uint32_t mTxTotal; /** * The total number of unique unicast MAC frame transmission requests. - * */ uint32_t mTxUnicast; /** * The total number of unique broadcast MAC frame transmission requests. - * */ uint32_t mTxBroadcast; /** * The total number of unique MAC frame transmission requests with requested acknowledgment. - * */ uint32_t mTxAckRequested; /** * The total number of unique MAC frame transmission requests that were acked. - * */ uint32_t mTxAcked; /** * The total number of unique MAC frame transmission requests without requested acknowledgment. - * */ uint32_t mTxNoAckRequested; /** * The total number of unique MAC Data frame transmission requests. - * */ uint32_t mTxData; /** * The total number of unique MAC Data Poll frame transmission requests. - * */ uint32_t mTxDataPoll; /** * The total number of unique MAC Beacon frame transmission requests. - * */ uint32_t mTxBeacon; /** * The total number of unique MAC Beacon Request frame transmission requests. - * */ uint32_t mTxBeaconRequest; @@ -176,7 +161,6 @@ typedef struct otMacCounters * The total number of unique other MAC frame transmission requests. * * This counter is currently used for counting out-of-band frames. - * */ uint32_t mTxOther; @@ -197,19 +181,16 @@ typedef struct otMacCounters * * Currently, this counter is invalid if the platform's radio driver capability includes * @ref OT_RADIO_CAPS_TRANSMIT_RETRIES. - * */ uint32_t mTxRetry; /** * The total number of unique MAC transmission packets that meet maximal retry limit for direct packets. - * */ uint32_t mTxDirectMaxRetryExpiry; /** * The total number of unique MAC transmission packets that meet maximal retry limit for indirect packets. - * */ uint32_t mTxIndirectMaxRetryExpiry; @@ -224,19 +205,16 @@ typedef struct otMacCounters * If @ref OT_RADIO_CAPS_TRANSMIT_RETRIES is enabled, this counter represents the total number of full CSMA/CA * failed attempts and it is incremented by one for each individual data frame request (regardless of the * amount of retransmissions). - * */ uint32_t mTxErrCca; /** * The total number of unique MAC transmission request failures cause by an abort error. - * */ uint32_t mTxErrAbort; /** * The total number of unique MAC transmission requests failures caused by a busy channel (a CSMA/CA fail). - * */ uint32_t mTxErrBusyChannel; @@ -245,61 +223,51 @@ typedef struct otMacCounters * * This counter counts all frames reported by the platform's radio driver, including frames * that were dropped, for example because of an FCS error. - * */ uint32_t mRxTotal; /** * The total number of unicast frames received. - * */ uint32_t mRxUnicast; /** * The total number of broadcast frames received. - * */ uint32_t mRxBroadcast; /** * The total number of MAC Data frames received. - * */ uint32_t mRxData; /** * The total number of MAC Data Poll frames received. - * */ uint32_t mRxDataPoll; /** * The total number of MAC Beacon frames received. - * */ uint32_t mRxBeacon; /** * The total number of MAC Beacon Request frames received. - * */ uint32_t mRxBeaconRequest; /** * The total number of other types of frames received. - * */ uint32_t mRxOther; /** * The total number of frames dropped by MAC Filter module, for example received from denylisted node. - * */ uint32_t mRxAddressFiltered; /** * The total number of frames dropped by destination address check, for example received frame for other node. - * */ uint32_t mRxDestAddrFiltered; @@ -308,25 +276,21 @@ typedef struct otMacCounters * * This counter may be incremented, for example when ACK frame generated by the receiver hasn't reached * transmitter node which performed retransmission. - * */ uint32_t mRxDuplicated; /** * The total number of frames dropped because of missing or malformed content. - * */ uint32_t mRxErrNoFrame; /** * The total number of frames dropped due to unknown neighbor. - * */ uint32_t mRxErrUnknownNeighbor; /** * The total number of frames dropped due to invalid source address. - * */ uint32_t mRxErrInvalidSrcAddr; @@ -335,26 +299,22 @@ typedef struct otMacCounters * * This counter may be incremented, for example when lower than expected Frame Counter is used * to encrypt the frame. - * */ uint32_t mRxErrSec; /** * The total number of frames dropped due to invalid FCS. - * */ uint32_t mRxErrFcs; /** * The total number of frames dropped due to other error. - * */ uint32_t mRxErrOther; } otMacCounters; /** * Represents a received IEEE 802.15.4 Beacon. - * */ typedef struct otActiveScanResult { @@ -378,7 +338,6 @@ typedef struct otActiveScanResult /** * Represents an energy scan result. - * */ typedef struct otEnergyScanResult { @@ -392,7 +351,6 @@ typedef struct otEnergyScanResult * * @param[in] aResult A valid pointer to the beacon information or NULL when the active scan completes. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otHandleActiveScanResult)(otActiveScanResult *aResult, void *aContext); @@ -407,7 +365,6 @@ typedef void (*otHandleActiveScanResult)(otActiveScanResult *aResult, void *aCon * * @retval OT_ERROR_NONE Accepted the Active Scan request. * @retval OT_ERROR_BUSY Already performing an Active Scan. - * */ otError otLinkActiveScan(otInstance *aInstance, uint32_t aScanChannels, @@ -430,7 +387,6 @@ bool otLinkIsActiveScanInProgress(otInstance *aInstance); * * @param[in] aResult A valid pointer to the energy scan result information or NULL when the energy scan completes. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aContext); @@ -445,7 +401,6 @@ typedef void (*otHandleEnergyScanResult)(otEnergyScanResult *aResult, void *aCon * * @retval OT_ERROR_NONE Accepted the Energy Scan request. * @retval OT_ERROR_BUSY Could not start the energy scan. - * */ otError otLinkEnergyScan(otInstance *aInstance, uint32_t aScanChannels, @@ -459,7 +414,6 @@ otError otLinkEnergyScan(otInstance *aInstance, * @param[in] aInstance A pointer to an OpenThread instance. * * @returns true if an IEEE 802.15.4 Energy Scan is in progress, false otherwise. - * */ bool otLinkIsEnergyScanInProgress(otInstance *aInstance); @@ -471,7 +425,6 @@ bool otLinkIsEnergyScanInProgress(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully enqueued an IEEE 802.15.4 Data Request message. * @retval OT_ERROR_INVALID_STATE Device is not in rx-off-when-idle mode. * @retval OT_ERROR_NO_BUFS Insufficient message buffers available. - * */ otError otLinkSendDataRequest(otInstance *aInstance); @@ -485,7 +438,6 @@ otError otLinkSendDataRequest(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns true if an IEEE 802.15.4 MAC is in the transmit state, false otherwise. - * */ bool otLinkIsInTransmitState(otInstance *aInstance); @@ -497,7 +449,6 @@ bool otLinkIsInTransmitState(otInstance *aInstance); * @returns The IEEE 802.15.4 channel. * * @sa otLinkSetChannel - * */ uint8_t otLinkGetChannel(otInstance *aInstance); @@ -515,7 +466,6 @@ uint8_t otLinkGetChannel(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otLinkGetChannel - * */ otError otLinkSetChannel(otInstance *aInstance, uint8_t aChannel); @@ -525,7 +475,6 @@ otError otLinkSetChannel(otInstance *aInstance, uint8_t aChannel); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The supported channel mask as `uint32_t` with bit 0 (lsb) mapping to channel 0, bit 1 to channel 1, so on. - * */ uint32_t otLinkGetSupportedChannelMask(otInstance *aInstance); @@ -539,7 +488,6 @@ uint32_t otLinkGetSupportedChannelMask(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the supported channel mask. * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. - * */ otError otLinkSetSupportedChannelMask(otInstance *aInstance, uint32_t aChannelMask); @@ -549,7 +497,6 @@ otError otLinkSetSupportedChannelMask(otInstance *aInstance, uint32_t aChannelMa * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the IEEE 802.15.4 Extended Address. - * */ const otExtAddress *otLinkGetExtendedAddress(otInstance *aInstance); @@ -564,7 +511,6 @@ const otExtAddress *otLinkGetExtendedAddress(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully set the IEEE 802.15.4 Extended Address. * @retval OT_ERROR_INVALID_ARGS @p aExtAddress was NULL. * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. - * */ otError otLinkSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -573,7 +519,6 @@ otError otLinkSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExt * * @param[in] aInstance A pointer to the OpenThread instance. * @param[out] aEui64 A pointer to where the factory-assigned IEEE EUI-64 is placed. - * */ void otLinkGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64); @@ -585,7 +530,6 @@ void otLinkGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui * @returns The IEEE 802.15.4 PAN ID. * * @sa otLinkSetPanId - * */ otPanId otLinkGetPanId(otInstance *aInstance); @@ -603,7 +547,6 @@ otPanId otLinkGetPanId(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otLinkGetPanId - * */ otError otLinkSetPanId(otInstance *aInstance, otPanId aPanId); @@ -615,7 +558,6 @@ otError otLinkSetPanId(otInstance *aInstance, otPanId aPanId); * @returns The data poll period of sleepy end device in milliseconds. * * @sa otLinkSetPollPeriod - * */ uint32_t otLinkGetPollPeriod(otInstance *aInstance); @@ -638,7 +580,6 @@ uint32_t otLinkGetPollPeriod(otInstance *aInstance); * @retval OT_ERROR_INVALID_ARGS If aPollPeriod is invalid. * * @sa otLinkGetPollPeriod - * */ otError otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPeriod); @@ -648,7 +589,6 @@ otError otLinkSetPollPeriod(otInstance *aInstance, uint32_t aPollPeriod); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the IEEE 802.15.4 Short Address. - * */ otShortAddress otLinkGetShortAddress(otInstance *aInstance); @@ -658,7 +598,6 @@ otShortAddress otLinkGetShortAddress(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The maximum number of retries during direct transmission. - * */ uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance); @@ -667,7 +606,6 @@ uint8_t otLinkGetMaxFrameRetriesDirect(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMaxFrameRetriesDirect The maximum number of retries during direct transmission. - * */ void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetriesDirect); @@ -677,7 +615,6 @@ void otLinkSetMaxFrameRetriesDirect(otInstance *aInstance, uint8_t aMaxFrameRetr * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The maximum number of retries during indirect transmission. - * */ uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance); @@ -686,7 +623,6 @@ uint8_t otLinkGetMaxFrameRetriesIndirect(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMaxFrameRetriesIndirect The maximum number of retries during indirect transmission. - * */ void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRetriesIndirect); @@ -696,7 +632,6 @@ void otLinkSetMaxFrameRetriesIndirect(otInstance *aInstance, uint8_t aMaxFrameRe * @param[in] aInstance A pointer to the OpenThread instance. * * @returns The current MAC frame counter value. - * */ uint32_t otLinkGetFrameCounter(otInstance *aInstance); @@ -708,7 +643,6 @@ uint32_t otLinkGetFrameCounter(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns the address mode. - * */ otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance); @@ -719,7 +653,6 @@ otMacFilterAddressMode otLinkFilterGetAddressMode(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMode The address mode to set. - * */ void otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aMode); @@ -733,7 +666,6 @@ void otLinkFilterSetAddressMode(otInstance *aInstance, otMacFilterAddressMode aM * * @retval OT_ERROR_NONE Successfully added @p aExtAddress to MAC filter. * @retval OT_ERROR_NO_BUFS No available entry exists. - * */ otError otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -746,7 +678,6 @@ otError otLinkFilterAddAddress(otInstance *aInstance, const otExtAddress *aExtAd * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aExtAddress A pointer to the Extended Address (MUST NOT be NULL). - * */ void otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -756,7 +687,6 @@ void otLinkFilterRemoveAddress(otInstance *aInstance, const otExtAddress *aExtAd * Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otLinkFilterClearAddresses(otInstance *aInstance); @@ -772,7 +702,6 @@ void otLinkFilterClearAddresses(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully retrieved an in-use address filter entry. * @retval OT_ERROR_NOT_FOUND No subsequent entry exists. - * */ otError otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry); @@ -792,7 +721,6 @@ otError otLinkFilterGetNextAddress(otInstance *aInstance, otMacFilterIterator *a * * @retval OT_ERROR_NONE Successfully added an entry for @p aExtAddress and @p aRss. * @retval OT_ERROR_NO_BUFS No available entry exists. - * */ otError otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddress, int8_t aRss); @@ -808,7 +736,6 @@ otError otLinkFilterAddRssIn(otInstance *aInstance, const otExtAddress *aExtAddr * * @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. - * */ void otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -822,7 +749,6 @@ void otLinkFilterRemoveRssIn(otInstance *aInstance, const otExtAddress *aExtAddr * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aRss The default received signal strength (in dBm) to set. - * */ void otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss); @@ -832,7 +758,6 @@ void otLinkFilterSetDefaultRssIn(otInstance *aInstance, int8_t aRss); * Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otLinkFilterClearDefaultRssIn(otInstance *aInstance); @@ -844,7 +769,6 @@ void otLinkFilterClearDefaultRssIn(otInstance *aInstance); * Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otLinkFilterClearAllRssIn(otInstance *aInstance); @@ -862,7 +786,6 @@ void otLinkFilterClearAllRssIn(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully retrieved the next entry. * @retval OT_ERROR_NOT_FOUND No subsequent entry exists. - * */ otError otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIterator, otMacFilterEntry *aEntry); @@ -878,7 +801,6 @@ otError otLinkFilterGetNextRssIn(otInstance *aInstance, otMacFilterIterator *aIt * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aFilterEnabled TRUE to enable radio filter, FALSE to disable - * */ void otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled); @@ -889,7 +811,6 @@ void otLinkSetRadioFilterEnabled(otInstance *aInstance, bool aFilterEnabled); * * @retval TRUE If the radio filter is enabled. * @retval FALSE If the radio filter is disabled. - * */ bool otLinkIsRadioFilterEnabled(otInstance *aInstance); @@ -900,7 +821,6 @@ bool otLinkIsRadioFilterEnabled(otInstance *aInstance); * @param[in] aRss The received signal strength value to be converted. * * @return Link quality value mapping to @p aRss. - * */ uint8_t otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss); @@ -911,7 +831,6 @@ uint8_t otLinkConvertRssToLinkQuality(otInstance *aInstance, int8_t aRss); * @param[in] aLinkQuality LinkQuality value, should be in range [0,3]. * * @return Typical platform received signal strength mapping to @p aLinkQuality. - * */ int8_t otLinkConvertLinkQualityToRss(otInstance *aInstance, uint8_t aLinkQuality); @@ -938,7 +857,6 @@ const uint32_t *otLinkGetTxDirectRetrySuccessHistogram(otInstance *aInstance, ui * * @returns A pointer to the histogram of retries (in a form of an array). * The n-th element indicates that the packet has been sent with n-th retry. - * */ const uint32_t *otLinkGetTxIndirectRetrySuccessHistogram(otInstance *aInstance, uint8_t *aNumberOfEntries); @@ -948,7 +866,6 @@ const uint32_t *otLinkGetTxIndirectRetrySuccessHistogram(otInstance *aInstance, * Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otLinkResetTxRetrySuccessHistogram(otInstance *aInstance); @@ -958,7 +875,6 @@ void otLinkResetTxRetrySuccessHistogram(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the MAC layer counters. - * */ const otMacCounters *otLinkGetCounters(otInstance *aInstance); @@ -966,7 +882,6 @@ const otMacCounters *otLinkGetCounters(otInstance *aInstance); * Resets the MAC layer counters. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otLinkResetCounters(otInstance *aInstance); @@ -980,7 +895,6 @@ void otLinkResetCounters(otInstance *aInstance); * @param[in] aFrame A pointer to the received IEEE 802.15.4 frame. * @param[in] aIsTx Whether this frame is transmitted, not received. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void *aContext); @@ -991,7 +905,6 @@ typedef void (*otLinkPcapCallback)(const otRadioFrame *aFrame, bool aIsTx, void * @param[in] aPcapCallback A pointer to a function that is called when receiving an IEEE 802.15.4 link frame or * NULL to disable the callback. * @param[in] aCallbackContext A pointer to application-specific context. - * */ void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallback, void *aCallbackContext); @@ -1002,7 +915,6 @@ void otLinkSetPcapCallback(otInstance *aInstance, otLinkPcapCallback aPcapCallba * * @retval TRUE Promiscuous mode is enabled. * @retval FALSE Promiscuous mode is not enabled. - * */ bool otLinkIsPromiscuous(otInstance *aInstance); @@ -1017,7 +929,6 @@ bool otLinkIsPromiscuous(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully enabled promiscuous mode. * @retval OT_ERROR_INVALID_STATE Could not enable promiscuous mode because * the Thread interface is enabled. - * */ otError otLinkSetPromiscuous(otInstance *aInstance, bool aPromiscuous); @@ -1027,7 +938,6 @@ otError otLinkSetPromiscuous(otInstance *aInstance, bool aPromiscuous); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The CSL channel. - * */ uint8_t otLinkGetCslChannel(otInstance *aInstance); @@ -1040,7 +950,6 @@ uint8_t otLinkGetCslChannel(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the CSL parameters. * @retval OT_ERROR_INVALID_ARGS Invalid @p aChannel. - * */ otError otLinkSetCslChannel(otInstance *aInstance, uint8_t aChannel); @@ -1048,7 +957,6 @@ otError otLinkSetCslChannel(otInstance *aInstance, uint8_t aChannel); * Represents CSL period ten symbols unit in microseconds. * * The CSL period (in micro seconds) MUST be a multiple of this value. - * */ #define OT_LINK_CSL_PERIOD_TEN_SYMBOLS_UNIT_IN_USEC (160) @@ -1058,7 +966,6 @@ otError otLinkSetCslChannel(otInstance *aInstance, uint8_t aChannel); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The CSL period in microseconds. - * */ uint32_t otLinkGetCslPeriod(otInstance *aInstance); @@ -1073,7 +980,6 @@ uint32_t otLinkGetCslPeriod(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the CSL period. * @retval OT_ERROR_INVALID_ARGS Invalid CSL period - * */ otError otLinkSetCslPeriod(otInstance *aInstance, uint32_t aPeriod); @@ -1083,7 +989,6 @@ otError otLinkSetCslPeriod(otInstance *aInstance, uint32_t aPeriod); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The CSL timeout in seconds. - * */ uint32_t otLinkGetCslTimeout(otInstance *aInstance); @@ -1095,7 +1000,6 @@ uint32_t otLinkGetCslTimeout(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the CSL timeout. * @retval OT_ERROR_INVALID_ARGS Invalid CSL timeout. - * */ otError otLinkSetCslTimeout(otInstance *aInstance, uint32_t aTimeout); @@ -1106,7 +1010,6 @@ otError otLinkSetCslTimeout(otInstance *aInstance, uint32_t aTimeout); * frame transmissions. * * @returns The CCA failure rate with maximum value `0xffff` corresponding to 100% failure rate. - * */ uint16_t otLinkGetCcaFailureRate(otInstance *aInstance); @@ -1121,7 +1024,6 @@ uint16_t otLinkGetCcaFailureRate(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully enabled / disabled the link layer. * @retval OT_ERROR_INVALID_STATE Could not disable the link layer because * the Thread interface is enabled. - * */ otError otLinkSetEnabled(otInstance *aInstance, bool aEnable); @@ -1132,7 +1034,6 @@ otError otLinkSetEnabled(otInstance *aInstance, bool aEnable); * * @retval TRUE Link layer is enabled. * @retval FALSE Link layer is not enabled. - * */ bool otLinkIsEnabled(otInstance *aInstance); @@ -1143,7 +1044,6 @@ bool otLinkIsEnabled(otInstance *aInstance); * * @retval TRUE Link layer is CSL enabled. * @retval FALSE Link layer is not CSL enabled. - * */ bool otLinkIsCslEnabled(otInstance *aInstance); @@ -1152,7 +1052,6 @@ bool otLinkIsCslEnabled(otInstance *aInstance); * * @retval TRUE If parent supports CSL. * @retval FALSE If parent does not support CSL. - * */ bool otLinkIsCslSupported(otInstance *aInstance); @@ -1167,7 +1066,6 @@ bool otLinkIsCslSupported(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully enqueued an empty message. * @retval OT_ERROR_INVALID_STATE Device is not in Rx-Off-When-Idle mode. * @retval OT_ERROR_NO_BUFS Insufficient message buffers available. - * */ otError otLinkSendEmptyData(otInstance *aInstance); @@ -1183,7 +1081,6 @@ otError otLinkSendEmptyData(otInstance *aInstance); * @retval OT_ERROR_FAILED Other platform specific errors. * @retval OT_ERROR_NONE Successfully set region code. * @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented. - * */ otError otLinkSetRegion(otInstance *aInstance, uint16_t aRegionCode); @@ -1200,13 +1097,11 @@ otError otLinkSetRegion(otInstance *aInstance, uint16_t aRegionCode); * @retval OT_ERROR_FAILED Other platform specific errors. * @retval OT_ERROR_NONE Successfully got region code. * @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented. - * */ otError otLinkGetRegion(otInstance *aInstance, uint16_t *aRegionCode); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/link_metrics.h b/include/openthread/link_metrics.h index cf79a800944..dee38320ca3 100644 --- a/include/openthread/link_metrics.h +++ b/include/openthread/link_metrics.h @@ -50,12 +50,10 @@ extern "C" { * This module includes functions that control the Link Metrics protocol. * * @{ - * */ /** * Represents the result (value) for a Link Metrics query. - * */ typedef struct otLinkMetricsValues { @@ -69,7 +67,6 @@ typedef struct otLinkMetricsValues /** * Represents which frames are accounted in a Forward Tracking Series. - * */ typedef struct otLinkMetricsSeriesFlags { @@ -83,7 +80,6 @@ typedef struct otLinkMetricsSeriesFlags * Enhanced-ACK Flags. * * These are used in Enhanced-ACK Based Probing to indicate whether to register or clear the probing. - * */ typedef enum otLinkMetricsEnhAckFlags { @@ -93,7 +89,6 @@ typedef enum otLinkMetricsEnhAckFlags /** * Link Metrics Status values. - * */ typedef enum otLinkMetricsStatus { @@ -112,7 +107,6 @@ typedef enum otLinkMetricsStatus * @param[in] aMetricsValues A pointer to the Link Metrics values (the query result). * @param[in] aStatus The status code in the report (only useful when @p aMetricsValues is NULL). * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otLinkMetricsReportCallback)(const otIp6Address *aSource, const otLinkMetricsValues *aMetricsValues, @@ -124,7 +118,6 @@ typedef void (*otLinkMetricsReportCallback)(const otIp6Address *aSource, * @param[in] aSource A pointer to the source address. * @param[in] aStatus The status code in the response. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otLinkMetricsMgmtResponseCallback)(const otIp6Address *aSource, otLinkMetricsStatus aStatus, @@ -137,7 +130,6 @@ typedef void (*otLinkMetricsMgmtResponseCallback)(const otIp6Address *aSource, * @param[in] aExtAddress A pointer to the Mac extended address of the Probing Subject. * @param[in] aMetricsValues A pointer to the Link Metrics values obtained from the IE. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress aShortAddress, const otExtAddress *aExtAddress, @@ -160,7 +152,6 @@ typedef void (*otLinkMetricsEnhAckProbingIeReportCallback)(otShortAddress * @retval OT_ERROR_NO_BUFS Insufficient buffers to generate the MLE Data Request message. * @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found. * @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics. - * */ otError otLinkMetricsQuery(otInstance *aInstance, const otIp6Address *aDestination, @@ -187,7 +178,6 @@ otError otLinkMetricsQuery(otInstance *aInstance, * @retval OT_ERROR_INVALID_ARGS @p aSeriesId is not within the valid range. * @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found. * @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics. - * */ otError otLinkMetricsConfigForwardTrackingSeries(otInstance *aInstance, const otIp6Address *aDestination, @@ -216,7 +206,6 @@ otError otLinkMetricsConfigForwardTrackingSeries(otInstance * @retval OT_ERROR_INVALID_ARGS @p aEnhAckFlags is not a valid value or @p aLinkMetricsFlags isn't correct. * @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found. * @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics. - * */ otError otLinkMetricsConfigEnhAckProbing(otInstance *aInstance, const otIp6Address *aDestination, @@ -240,7 +229,6 @@ otError otLinkMetricsConfigEnhAckProbing(otInstance * @retval OT_ERROR_INVALID_ARGS @p aSeriesId or @p aLength is not within the valid range. * @retval OT_ERROR_UNKNOWN_NEIGHBOR @p aDestination is not link-local or the neighbor is not found. * @retval OT_ERROR_NOT_CAPABLE The neighbor is not a Thread 1.2 device and does not support Link Metrics. - * */ otError otLinkMetricsSendLinkProbe(otInstance *aInstance, const otIp6Address *aDestination, @@ -254,7 +242,6 @@ otError otLinkMetricsSendLinkProbe(otInstance *aInstance, * * @retval TRUE Link Metrics Manager is enabled. * @retval FALSE Link Metrics Manager is not enabled. - * */ bool otLinkMetricsManagerIsEnabled(otInstance *aInstance); @@ -263,7 +250,6 @@ bool otLinkMetricsManagerIsEnabled(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnable A boolean indicating to enable or disable. - * */ void otLinkMetricsManagerSetEnabled(otInstance *aInstance, bool aEnable); @@ -277,7 +263,6 @@ void otLinkMetricsManagerSetEnabled(otInstance *aInstance, bool aEnable); * @retval OT_ERROR_NONE Successfully got the Link Metrics data. * @retval OT_ERROR_INVALID_ARGS The arguments are invalid. * @retval OT_ERROR_NOT_FOUND No neighbor with the given extended address is found. - * */ otError otLinkMetricsManagerGetMetricsValueByExtAddr(otInstance *aInstance, const otExtAddress *aExtAddress, @@ -285,7 +270,6 @@ otError otLinkMetricsManagerGetMetricsValueByExtAddr(otInstance *aInsta /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/link_raw.h b/include/openthread/link_raw.h index c5ba5adba98..5bea2a04183 100644 --- a/include/openthread/link_raw.h +++ b/include/openthread/link_raw.h @@ -48,7 +48,6 @@ extern "C" { * This module includes functions that control the raw link-layer configuration. * * @{ - * */ /** @@ -58,7 +57,6 @@ extern "C" { * @param[in] aFrame A pointer to the received frame or NULL if the receive operation was aborted. * @param[in] aError OT_ERROR_NONE when successfully received a frame. * OT_ERROR_ABORT when reception was aborted and a frame was not received. - * */ typedef void (*otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame, otError aError); @@ -72,7 +70,6 @@ typedef void (*otLinkRawReceiveDone)(otInstance *aInstance, otRadioFrame *aFrame * @retval OT_ERROR_FAILED The radio could not be enabled/disabled. * @retval OT_ERROR_INVALID_STATE If the OpenThread IPv6 interface is already enabled. * @retval OT_ERROR_NONE If the enable state was successfully set. - * */ otError otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCallback); @@ -83,7 +80,6 @@ otError otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCal * * @retval true The raw link-layer is enabled. * @retval false The raw link-layer is disabled. - * */ bool otLinkRawIsEnabled(otInstance *aInstance); @@ -94,7 +90,6 @@ bool otLinkRawIsEnabled(otInstance *aInstance); * * @retval true Promiscuous mode is enabled. * @retval false Promiscuous mode is disabled. - * */ bool otLinkRawGetPromiscuous(otInstance *aInstance); @@ -106,7 +101,6 @@ bool otLinkRawGetPromiscuous(otInstance *aInstance); * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSetPromiscuous(otInstance *aInstance, bool aEnable); @@ -118,7 +112,6 @@ otError otLinkRawSetPromiscuous(otInstance *aInstance, bool aEnable); * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress); @@ -131,7 +124,6 @@ otError otLinkRawSetShortAddress(otInstance *aInstance, uint16_t aShortAddress); * @retval OT_ERROR_NONE Successfully transitioned to Sleep. * @retval OT_ERROR_BUSY The radio was transmitting * @retval OT_ERROR_INVALID_STATE The radio was disabled - * */ otError otLinkRawSleep(otInstance *aInstance); @@ -143,7 +135,6 @@ otError otLinkRawSleep(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully transitioned to Receive. * @retval OT_ERROR_INVALID_STATE The radio was disabled or transmitting. - * */ otError otLinkRawReceive(otInstance *aInstance); @@ -157,7 +148,6 @@ otError otLinkRawReceive(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the transmit buffer or NULL if the raw link-layer isn't enabled. - * */ otRadioFrame *otLinkRawGetTransmitBuffer(otInstance *aInstance); @@ -172,7 +162,6 @@ otRadioFrame *otLinkRawGetTransmitBuffer(otInstance *aInstance); * OT_ERROR_CHANNEL_ACCESS_FAILURE when the transmission could not take place due to activity on the channel. * OT_ERROR_ABORT when transmission was aborted for other reasons. - * */ typedef void (*otLinkRawTransmitDone)(otInstance *aInstance, otRadioFrame *aFrame, @@ -194,7 +183,6 @@ typedef void (*otLinkRawTransmitDone)(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully transitioned to Transmit. * @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state. - * */ otError otLinkRawTransmit(otInstance *aInstance, otLinkRawTransmitDone aCallback); @@ -204,7 +192,6 @@ otError otLinkRawTransmit(otInstance *aInstance, otLinkRawTransmitDone aCallback * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The RSSI in dBm when it is valid. 127 when RSSI is invalid. - * */ int8_t otLinkRawGetRssi(otInstance *aInstance); @@ -214,7 +201,6 @@ int8_t otLinkRawGetRssi(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The radio capability bit vector. The stack enables or disables some functions based on this value. - * */ otRadioCaps otLinkRawGetCaps(otInstance *aInstance); @@ -223,7 +209,6 @@ otRadioCaps otLinkRawGetCaps(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnergyScanMaxRssi The maximum RSSI encountered on the scanned channel. - * */ typedef void (*otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergyScanMaxRssi); @@ -239,7 +224,6 @@ typedef void (*otLinkRawEnergyScanDone)(otInstance *aInstance, int8_t aEnergySca * @retval OT_ERROR_BUSY The radio is performing energy scanning. * @retval OT_ERROR_NOT_IMPLEMENTED The radio doesn't support energy scanning. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawEnergyScan(otInstance *aInstance, uint8_t aScanChannel, @@ -254,7 +238,6 @@ otError otLinkRawEnergyScan(otInstance *aInstance, * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSrcMatchEnable(otInstance *aInstance, bool aEnable); @@ -267,7 +250,6 @@ otError otLinkRawSrcMatchEnable(otInstance *aInstance, bool aEnable); * @retval OT_ERROR_NONE Successfully added short address to the source match table. * @retval OT_ERROR_NO_BUFS No available entry in the source match table. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSrcMatchAddShortEntry(otInstance *aInstance, uint16_t aShortAddress); @@ -280,7 +262,6 @@ otError otLinkRawSrcMatchAddShortEntry(otInstance *aInstance, uint16_t aShortAdd * @retval OT_ERROR_NONE Successfully added extended address to the source match table. * @retval OT_ERROR_NO_BUFS No available entry in the source match table. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSrcMatchAddExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -293,7 +274,6 @@ otError otLinkRawSrcMatchAddExtEntry(otInstance *aInstance, const otExtAddress * * @retval OT_ERROR_NONE Successfully removed short address from the source match table. * @retval OT_ERROR_NO_ADDRESS The short address is not in source match table. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSrcMatchClearShortEntry(otInstance *aInstance, uint16_t aShortAddress); @@ -306,7 +286,6 @@ otError otLinkRawSrcMatchClearShortEntry(otInstance *aInstance, uint16_t aShortA * @retval OT_ERROR_NONE Successfully removed the extended address from the source match table. * @retval OT_ERROR_NO_ADDRESS The extended address is not in source match table. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSrcMatchClearExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -317,7 +296,6 @@ otError otLinkRawSrcMatchClearExtEntry(otInstance *aInstance, const otExtAddress * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSrcMatchClearShortEntries(otInstance *aInstance); @@ -328,7 +306,6 @@ otError otLinkRawSrcMatchClearShortEntries(otInstance *aInstance); * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSrcMatchClearExtEntries(otInstance *aInstance); @@ -344,7 +321,6 @@ otError otLinkRawSrcMatchClearExtEntries(otInstance *aInstance); * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSetMacKey(otInstance *aInstance, uint8_t aKeyIdMode, @@ -364,7 +340,6 @@ otError otLinkRawSetMacKey(otInstance *aInstance, * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter); @@ -376,7 +351,6 @@ otError otLinkRawSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCou * * @retval OT_ERROR_NONE If successful. * @retval OT_ERROR_INVALID_STATE If the raw link-layer isn't enabled. - * */ otError otLinkRawSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacFrameCounter); @@ -386,13 +360,11 @@ otError otLinkRawSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMac * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current radio time in microseconds. - * */ uint64_t otLinkRawGetRadioTime(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/logging.h b/include/openthread/logging.h index c0fb61002a1..3243f9b7962 100644 --- a/include/openthread/logging.h +++ b/include/openthread/logging.h @@ -49,7 +49,6 @@ extern "C" { * This module includes OpenThread logging related definitions. * * @{ - * */ /** @@ -59,7 +58,6 @@ extern "C" { * currently set dynamic log level. Otherwise, this function returns the build-time configured log level. * * @returns The log level. - * */ otLogLevel otLoggingGetLevel(void); @@ -72,7 +70,6 @@ otLogLevel otLoggingGetLevel(void); * * @retval OT_ERROR_NONE Successfully updated log level. * @retval OT_ERROR_INVALID_ARGS Log level value is invalid. - * */ otError otLoggingSetLevel(otLogLevel aLogLevel); @@ -84,7 +81,6 @@ otError otLoggingSetLevel(otLogLevel aLogLevel); * * @param[in] aFormat The format string. * @param[in] ... Arguments for the format specification. - * */ void otLogCritPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); @@ -96,7 +92,6 @@ void otLogCritPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE * * @param[in] aFormat The format string. * @param[in] ... Arguments for the format specification. - * */ void otLogWarnPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); @@ -108,7 +103,6 @@ void otLogWarnPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE * * @param[in] aFormat The format string. * @param[in] ... Arguments for the format specification. - * */ void otLogNotePlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); @@ -120,7 +114,6 @@ void otLogNotePlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE * * @param[in] aFormat The format string. * @param[in] ... Arguments for the format specification. - * */ void otLogInfoPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); @@ -132,7 +125,6 @@ void otLogInfoPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE * * @param[in] aFormat The format string. * @param[in] ... Arguments for the format specification. - * */ void otLogDebgPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(1, 2); @@ -145,7 +137,6 @@ void otLogDebgPlat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHE * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ void otDumpCritPlat(const char *aText, const void *aData, uint16_t aDataLength); @@ -158,7 +149,6 @@ void otDumpCritPlat(const char *aText, const void *aData, uint16_t aDataLength); * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ void otDumpWarnPlat(const char *aText, const void *aData, uint16_t aDataLength); @@ -171,7 +161,6 @@ void otDumpWarnPlat(const char *aText, const void *aData, uint16_t aDataLength); * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ void otDumpNotePlat(const char *aText, const void *aData, uint16_t aDataLength); @@ -184,7 +173,6 @@ void otDumpNotePlat(const char *aText, const void *aData, uint16_t aDataLength); * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ void otDumpInfoPlat(const char *aText, const void *aData, uint16_t aDataLength); @@ -197,7 +185,6 @@ void otDumpInfoPlat(const char *aText, const void *aData, uint16_t aDataLength); * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ void otDumpDebgPlat(const char *aText, const void *aData, uint16_t aDataLength); @@ -216,7 +203,6 @@ void otDumpDebgPlat(const char *aText, const void *aData, uint16_t aDataLength); * @param[in] aPlatModuleName The platform sub-module name. * @param[in] aFormat The format string. * @param[in] ... Arguments for the format specification. - * */ void otLogPlat(otLogLevel aLogLevel, const char *aPlatModuleName, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 4); @@ -236,7 +222,6 @@ void otLogPlat(otLogLevel aLogLevel, const char *aPlatModuleName, const char *aF * @param[in] aPlatModuleName The platform sub-module name. * @param[in] aFormat The format string. * @param[in] aArgs Arguments for the format specification. - * */ void otLogPlatArgs(otLogLevel aLogLevel, const char *aPlatModuleName, const char *aFormat, va_list aArgs); @@ -249,7 +234,6 @@ void otLogPlatArgs(otLogLevel aLogLevel, const char *aPlatModuleName, const char * @param[in] aLogLevel The log level. * @param[in] aFormat The format string. * @param[in] ... Arguments for the format specification. - * */ void otLogCli(otLogLevel aLogLevel, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3); @@ -257,7 +241,6 @@ void otLogCli(otLogLevel aLogLevel, const char *aFormat, ...) OT_TOOL_PRINTF_STY /** * Represents information used for generating hex dump output. - * */ typedef struct { @@ -288,13 +271,11 @@ typedef struct * * @retval OT_ERROR_NONE Successfully generated the next line, `mLine` field in @p aInfo is updated. * @retval OT_ERROR_NOT_FOUND Reached the end and no more line to generate. - * */ otError otLogGenerateNextHexDumpLine(otLogHexDumpInfo *aInfo); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/mdns.h b/include/openthread/mdns.h index c2a63f0fc42..c77b4c71d1b 100644 --- a/include/openthread/mdns.h +++ b/include/openthread/mdns.h @@ -30,7 +30,6 @@ * @file * @brief * This file includes the mDNS related APIs. - * */ #ifndef OPENTHREAD_MULTICAST_DNS_H_ @@ -57,12 +56,10 @@ extern "C" { * * The mDNS APIs are available when the mDNS support `OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE` is enabled and the * `OPENTHREAD_CONFIG_MULTICAST_DNS_PUBLIC_API_ENABLE` is also enabled. - * */ /** * Represents a request ID (`uint32_t` value) for registering a host, a service, or a key service. - * */ typedef otPlatDnssdRequestId otMdnsRequestId; @@ -81,7 +78,6 @@ typedef otPlatDnssdRequestId otMdnsRequestId; * @param[in] aInstance The OpenThread instance. * @param[in] aRequestId The request ID. * @param[in] aError Error indicating the outcome of request. - * */ typedef otPlatDnssdRegisterCallback otMdnsRegisterCallback; @@ -101,7 +97,6 @@ typedef otPlatDnssdRegisterCallback otMdnsRegisterCallback; * @param[in] aInstance The OpenThread instance. * @param[in] aName The host name or the service instance label. * @param[in] aServiceType The service type (e.g., `_tst._udp`). - * */ typedef void (*otMdnsConflictCallback)(otInstance *aInstance, const char *aName, const char *aServiceType); @@ -111,7 +106,6 @@ typedef void (*otMdnsConflictCallback)(otInstance *aInstance, const char *aName, * This type is used to register or unregister a host (`otMdnsRegisterHost()` and `otMdnsUnregisterHost()`). * * See the description of each function for more details on how different fields are used in each case. - * */ typedef otPlatDnssdHost otMdnsHost; @@ -121,7 +115,6 @@ typedef otPlatDnssdHost otMdnsHost; * This type is used to register or unregister a service (`otMdnsRegisterService()` and `otMdnsUnregisterService()`). * * See the description of each function for more details on how different fields are used in each case. - * */ typedef otPlatDnssdService otMdnsService; @@ -129,19 +122,16 @@ typedef otPlatDnssdService otMdnsService; * Represents an mDNS key record. * * See `otMdnsRegisterKey()`, `otMdnsUnregisterKey()` for more details about fields in each case. - * */ typedef otPlatDnssdKey otMdnsKey; /** * Represents an mDNS entry iterator. - * */ typedef struct otMdnsIterator otMdnsIterator; /** * Represents a host/service/key entry state. - * */ typedef enum otMdnsEntryState { @@ -165,7 +155,6 @@ typedef enum otMdnsEntryState * * @retval OT_ERROR_NONE Enabled or disabled the mDNS module successfully. * @retval OT_ERROR_ALREADY mDNS is already enabled on an enable request or is already disabled on a disable request. - * */ otError otMdnsSetEnabled(otInstance *aInstance, bool aEnable, uint32_t aInfraIfIndex); @@ -176,7 +165,6 @@ otError otMdnsSetEnabled(otInstance *aInstance, bool aEnable, uint32_t aInfraIfI * * @retval TRUE The mDNS module is enabled * @retval FALSE The mDNS module is disabled. - * */ bool otMdnsIsEnabled(otInstance *aInstance); @@ -190,7 +178,6 @@ bool otMdnsIsEnabled(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance. * @param[in] aAllow Indicates whether or not to allow "QU" questions. - * */ void otMdnsSetQuestionUnicastAllowed(otInstance *aInstance, bool aAllow); @@ -199,7 +186,6 @@ void otMdnsSetQuestionUnicastAllowed(otInstance *aInstance, bool aAllow); * * @retval TRUE The mDNS module is allowed to send "QU" questions. * @retval FALSE The mDNS module is not allowed to send "QU" questions. - * */ bool otMdnsIsQuestionUnicastAllowed(otInstance *aInstance); @@ -214,7 +200,6 @@ bool otMdnsIsQuestionUnicastAllowed(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance. * @param[in] aCallback The conflict callback. - * */ void otMdnsSetConflictCallback(otInstance *aInstance, otMdnsConflictCallback aCallback); @@ -252,7 +237,6 @@ void otMdnsSetConflictCallback(otInstance *aInstance, otMdnsConflictCallback aCa * * @retval OT_ERROR_NONE Successfully started registration. @p aCallback will report the outcome. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsRegisterHost(otInstance *aInstance, const otMdnsHost *aHost, @@ -277,7 +261,6 @@ otError otMdnsRegisterHost(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully unregistered host. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsUnregisterHost(otInstance *aInstance, const otMdnsHost *aHost); @@ -316,7 +299,6 @@ otError otMdnsUnregisterHost(otInstance *aInstance, const otMdnsHost *aHost); * * @retval OT_ERROR_NONE Successfully started registration. @p aCallback will report the outcome. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsRegisterService(otInstance *aInstance, const otMdnsService *aService, @@ -344,7 +326,6 @@ otError otMdnsRegisterService(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully unregistered service. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsUnregisterService(otInstance *aInstance, const otMdnsService *aService); @@ -375,7 +356,6 @@ otError otMdnsUnregisterService(otInstance *aInstance, const otMdnsService *aSer * * @retval OT_ERROR_NONE Successfully started registration. @p aCallback will report the outcome. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsRegisterKey(otInstance *aInstance, const otMdnsKey *aKey, @@ -404,7 +384,6 @@ otError otMdnsRegisterKey(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully unregistered key * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsUnregisterKey(otInstance *aInstance, const otMdnsKey *aKey); @@ -418,7 +397,6 @@ otError otMdnsUnregisterKey(otInstance *aInstance, const otMdnsKey *aKey); * @param[in] aInstance The OpenThread instance. * * @returns A pointer to the allocated iterator, or `NULL` if it fails to allocate. - * */ otMdnsIterator *otMdnsAllocateIterator(otInstance *aInstance); @@ -429,7 +407,6 @@ otMdnsIterator *otMdnsAllocateIterator(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance. * @param[in] aIterator The iterator to free. - * */ void otMdnsFreeIterator(otInstance *aInstance, otMdnsIterator *aIterator); @@ -449,7 +426,6 @@ void otMdnsFreeIterator(otInstance *aInstance, otMdnsIterator *aIterator); * @retval OT_ERROR_NONE @p aHost, @p aState, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG @p aIterator is not valid. - * */ otError otMdnsGetNextHost(otInstance *aInstance, otMdnsIterator *aIterator, @@ -473,7 +449,6 @@ otError otMdnsGetNextHost(otInstance *aInstance, * @retval OT_ERROR_NONE @p aService, @p aState, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG @p aIterator is not valid. - * */ otError otMdnsGetNextService(otInstance *aInstance, otMdnsIterator *aIterator, @@ -496,7 +471,6 @@ otError otMdnsGetNextService(otInstance *aInstance, * @retval OT_ERROR_NONE @p aKey, @p aState, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG Iterator is not valid. - * */ otError otMdnsGetNextKey(otInstance *aInstance, otMdnsIterator *aIterator, otMdnsKey *aKey, otMdnsEntryState *aState); @@ -504,19 +478,16 @@ otError otMdnsGetNextKey(otInstance *aInstance, otMdnsIterator *aIterator, otMdn * Represents a service browser. * * Refer to `otPlatDnssdBrowser` for documentation of member fields and `otMdnsStartBrowser()` for how they are used. - * */ typedef otPlatDnssdBrowser otMdnsBrowser; /** * Represents the callback function pointer type used to report a browse result. - * */ typedef otPlatDnssdBrowseCallback otMdnsBrowseCallback; /** * Represents a browse result. - * */ typedef otPlatDnssdBrowseResult otMdnsBrowseResult; @@ -525,19 +496,16 @@ typedef otPlatDnssdBrowseResult otMdnsBrowseResult; * * Refer to `otPlatDnssdSrvResolver` for documentation of member fields and `otMdnsStartSrvResolver()` for how they are * used. - * */ typedef otPlatDnssdSrvResolver otMdnsSrvResolver; /** * Represents the callback function pointer type used to report an SRV resolve result. - * */ typedef otPlatDnssdSrvCallback otMdnsSrvCallback; /** * Represents an SRV resolver result. - * */ typedef otPlatDnssdSrvResult otMdnsSrvResult; @@ -546,19 +514,16 @@ typedef otPlatDnssdSrvResult otMdnsSrvResult; * * Refer to `otPlatDnssdTxtResolver` for documentation of member fields and `otMdnsStartTxtResolver()` for how they are * used. - * */ typedef otPlatDnssdTxtResolver otMdnsTxtResolver; /** * Represents the callback function pointer type used to report a TXT resolve result. - * */ typedef otPlatDnssdTxtCallback otMdnsTxtCallback; /** * Represents a TXT resolver result. - * */ typedef otPlatDnssdTxtResult otMdnsTxtResult; @@ -567,25 +532,21 @@ typedef otPlatDnssdTxtResult otMdnsTxtResult; * * Refer to `otPlatDnssdAddressResolver` for documentation of member fields and `otMdnsStartIp6AddressResolver()` or * `otMdnsStartIp4AddressResolver()` for how they are used. - * */ typedef otPlatDnssdAddressResolver otMdnsAddressResolver; /** * Represents the callback function pointer type use to report an IPv6/IPv4 address resolve result. - * */ typedef otPlatDnssdAddressCallback otMdnsAddressCallback; /** * Represents a discovered host address and its TTL. - * */ typedef otPlatDnssdAddressAndTtl otMdnsAddressAndTtl; /** * Represents address resolver result. - * */ typedef otPlatDnssdAddressResult otMdnsAddressResult; @@ -608,7 +569,6 @@ typedef otPlatDnssdAddressResult otMdnsAddressResult; * @retval OT_ERROR_NONE Browser started successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. * @retval OT_ERROR_ALREADY An identical browser (same service and callback) is already active. - * */ otError otMdnsStartBrowser(otInstance *aInstance, const otMdnsBrowser *aBrowser); @@ -622,7 +582,6 @@ otError otMdnsStartBrowser(otInstance *aInstance, const otMdnsBrowser *aBrowser) * * @retval OT_ERROR_NONE Browser stopped successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsStopBrowser(otInstance *aInstance, const otMdnsBrowser *aBroswer); @@ -647,7 +606,6 @@ otError otMdnsStopBrowser(otInstance *aInstance, const otMdnsBrowser *aBroswer); * @retval OT_ERROR_NONE Resolver started successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. * @retval OT_ERROR_ALREADY An identical resolver (same service and callback) is already active. - * */ otError otMdnsStartSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *aResolver); @@ -661,7 +619,6 @@ otError otMdnsStartSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *a * * @retval OT_ERROR_NONE Resolver stopped successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsStopSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *aResolver); @@ -686,7 +643,6 @@ otError otMdnsStopSrvResolver(otInstance *aInstance, const otMdnsSrvResolver *aR * @retval OT_ERROR_NONE Resolver started successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. * @retval OT_ERROR_ALREADY An identical resolver (same service and callback) is already active. - * */ otError otMdnsStartTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *aResolver); @@ -700,7 +656,6 @@ otError otMdnsStartTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *a * * @retval OT_ERROR_NONE Resolver stopped successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsStopTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *aResolver); @@ -725,7 +680,6 @@ otError otMdnsStopTxtResolver(otInstance *aInstance, const otMdnsTxtResolver *aR * @retval OT_ERROR_NONE Resolver started successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. * @retval OT_ERROR_ALREADY An identical resolver (same host and callback) is already active. - * */ otError otMdnsStartIp6AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver); @@ -739,7 +693,6 @@ otError otMdnsStartIp6AddressResolver(otInstance *aInstance, const otMdnsAddress * * @retval OT_ERROR_NONE Resolver stopped successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsStopIp6AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver); @@ -765,7 +718,6 @@ otError otMdnsStopIp6AddressResolver(otInstance *aInstance, const otMdnsAddressR * @retval OT_ERROR_NONE Resolver started successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. * @retval OT_ERROR_ALREADY An identical resolver (same host and callback) is already active. - * */ otError otMdnsStartIp4AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver); @@ -779,13 +731,11 @@ otError otMdnsStartIp4AddressResolver(otInstance *aInstance, const otMdnsAddress * * @retval OT_ERROR_NONE Resolver stopped successfully. * @retval OT_ERROR_INVALID_STATE mDNS module is not enabled. - * */ otError otMdnsStopIp4AddressResolver(otInstance *aInstance, const otMdnsAddressResolver *aResolver); /** * Represents additional information about a browser/resolver and its cached results. - * */ typedef struct otMdnsCacheInfo { @@ -810,7 +760,6 @@ typedef struct otMdnsCacheInfo * @retval OT_ERROR_NONE @p aBrowser, @p aInfo, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG @p aIterator is not valid. - * */ otError otMdnsGetNextBrowser(otInstance *aInstance, otMdnsIterator *aIterator, @@ -835,7 +784,6 @@ otError otMdnsGetNextBrowser(otInstance *aInstance, * @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG @p aIterator is not valid. - * */ otError otMdnsGetNextSrvResolver(otInstance *aInstance, otMdnsIterator *aIterator, @@ -860,7 +808,6 @@ otError otMdnsGetNextSrvResolver(otInstance *aInstance, * @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG @p aIterator is not valid. - * */ otError otMdnsGetNextTxtResolver(otInstance *aInstance, otMdnsIterator *aIterator, @@ -885,7 +832,6 @@ otError otMdnsGetNextTxtResolver(otInstance *aInstance, * @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG @p aIterator is not valid. - * */ otError otMdnsGetNextIp6AddressResolver(otInstance *aInstance, otMdnsIterator *aIterator, @@ -910,7 +856,6 @@ otError otMdnsGetNextIp6AddressResolver(otInstance *aInstance, * @retval OT_ERROR_NONE @p aResolver, @p aInfo, & @p aIterator are updated successfully. * @retval OT_ERROR_NOT_FOUND Reached the end of the list. * @retval OT_ERROR_INVALID_ARG @p aIterator is not valid. - * */ otError otMdnsGetNextIp4AddressResolver(otInstance *aInstance, otMdnsIterator *aIterator, @@ -919,7 +864,6 @@ otError otMdnsGetNextIp4AddressResolver(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/mesh_diag.h b/include/openthread/mesh_diag.h index e21e47c937e..3c28ff1cf9d 100644 --- a/include/openthread/mesh_diag.h +++ b/include/openthread/mesh_diag.h @@ -51,13 +51,11 @@ extern "C" { * The Mesh Diagnostics APIs require `OPENTHREAD_CONFIG_MESH_DIAG_ENABLE` and `OPENTHREAD_FTD`. * * @{ - * */ /** * Represents the set of configurations used when discovering mesh topology indicating which items to * discover. - * */ typedef struct otMeshDiagDiscoverConfig { @@ -69,7 +67,6 @@ typedef struct otMeshDiagDiscoverConfig * An opaque iterator to iterate over list of IPv6 addresses of a router. * * Pointers to instance of this type are provided in `otMeshDiagRouterInfo`. - * */ typedef struct otMeshDiagIp6AddrIterator otMeshDiagIp6AddrIterator; @@ -77,7 +74,6 @@ typedef struct otMeshDiagIp6AddrIterator otMeshDiagIp6AddrIterator; * An opaque iterator to iterate over list of children of a router. * * Pointers to instance of this type are provided in `otMeshDiagRouterInfo`. - * */ typedef struct otMeshDiagChildIterator otMeshDiagChildIterator; @@ -86,13 +82,11 @@ typedef struct otMeshDiagChildIterator otMeshDiagChildIterator; * * This is used in `otMeshDiagRouterInfo` for `mVersion` property when device does not provide its version. This * indicates that device is likely running 1.3.0 (version value 4) or earlier. - * */ #define OT_MESH_DIAG_VERSION_UNKNOWN 0xffff /** * Represents information about a router in Thread mesh discovered using `otMeshDiagDiscoverTopology()`. - * */ typedef struct otMeshDiagRouterInfo { @@ -112,7 +106,6 @@ typedef struct otMeshDiagRouterInfo * The array is indexed based on Router ID. `mLinkQualities[routerId]` indicates the incoming link quality, the * router sees to the router with `routerId`. Link quality is a value in [0, 3]. Value zero indicates no link. * Larger value indicate better link quality (as defined by Thread specification). - * */ uint8_t mLinkQualities[OT_NETWORK_MAX_ROUTER_ID + 1]; @@ -124,7 +117,6 @@ typedef struct otMeshDiagRouterInfo * * The pointer can be NULL when there was no request to discover IPv6 addresses (in `otMeshDiagDiscoverConfig`) or * if the router did not provide the list. - * */ otMeshDiagIp6AddrIterator *mIp6AddrIterator; @@ -136,14 +128,12 @@ typedef struct otMeshDiagRouterInfo * * The pointer can be NULL when there was no request to discover children (in `otMeshDiagDiscoverConfig`) or * if the router did not provide the list. - * */ otMeshDiagChildIterator *mChildIterator; } otMeshDiagRouterInfo; /** * Represents information about a discovered child in Thread mesh using `otMeshDiagDiscoverTopology()`. - * */ typedef struct otMeshDiagChildInfo { @@ -166,7 +156,6 @@ typedef struct otMeshDiagChildInfo * OT_ERROR_RESPONSE_TIMEOUT Timed out waiting for response from one or more routers. * @param[in] aRouterInfo The discovered router info (can be null if `aError` is OT_ERROR_RESPONSE_TIMEOUT). * @param[in] aContext Application-specific context. - * */ typedef void (*otMeshDiagDiscoverCallback)(otError aError, otMeshDiagRouterInfo *aRouterInfo, void *aContext); @@ -182,7 +171,6 @@ typedef void (*otMeshDiagDiscoverCallback)(otError aError, otMeshDiagRouterInfo * @retval OT_ERROR_BUSY A previous discovery request is still ongoing. * @retval OT_ERROR_INVALID_STATE Device is not attached. * @retval OT_ERROR_NO_BUFS Could not allocate buffer to send discovery messages. - * */ otError otMeshDiagDiscoverTopology(otInstance *aInstance, const otMeshDiagDiscoverConfig *aConfig, @@ -193,7 +181,6 @@ otError otMeshDiagDiscoverTopology(otInstance *aInstance, * 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. - * */ void otMeshDiagCancel(otInstance *aInstance); @@ -210,7 +197,6 @@ void otMeshDiagCancel(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully retrieved the next address. @p aIp6Address and @p aIterator are updated. * @retval OT_ERROR_NOT_FOUND No more address. Reached the end of the list. - * */ otError otMeshDiagGetNextIp6Address(otMeshDiagIp6AddrIterator *aIterator, otIp6Address *aIp6Address); @@ -225,7 +211,6 @@ otError otMeshDiagGetNextIp6Address(otMeshDiagIp6AddrIterator *aIterator, otIp6A * * @retval OT_ERROR_NONE Successfully retrieved the next child. @p aChildInfo and @p aIterator are updated. * @retval OT_ERROR_NOT_FOUND No more child. Reached the end of the list. - * */ otError otMeshDiagGetNextChildInfo(otMeshDiagChildIterator *aIterator, otMeshDiagChildInfo *aChildInfo); @@ -237,7 +222,6 @@ otError otMeshDiagGetNextChildInfo(otMeshDiagChildIterator *aIterator, otMeshDia * layer, while `mMessageErrorRate` tracks the IPv6 message error rate (above MAC layer and after MAC retries) when * an IPv6 message is dropped. For example, if the message is large and requires 6LoWPAN fragmentation, message tx is * considered as failed if one of its fragment frame tx fails (for example, never acked). - * */ typedef struct otMeshDiagChildEntry { @@ -275,7 +259,6 @@ typedef struct otMeshDiagChildEntry * OT_ERROR_RESPONSE_TIMEOUT Timed out waiting for response. * @param[in] aChildEntry The child entry (can be null if `aError` is OT_ERROR_RESPONSE_TIMEOUT or OT_ERROR_NONE). * @param[in] aContext Application-specific context. - * */ typedef void (*otMeshDiagQueryChildTableCallback)(otError aError, const otMeshDiagChildEntry *aChildEntry, @@ -294,7 +277,6 @@ typedef void (*otMeshDiagQueryChildTableCallback)(otError aE * @retval OT_ERROR_INVALID_ARGS The @p aRloc16 is not a valid router RLOC16. * @retval OT_ERROR_INVALID_STATE Device is not attached. * @retval OT_ERROR_NO_BUFS Could not allocate buffer to send query messages. - * */ otError otMeshDiagQueryChildTable(otInstance *aInstance, uint16_t aRloc16, @@ -315,7 +297,6 @@ otError otMeshDiagQueryChildTable(otInstance *aInstance, * @param[in] aIp6AddrIterator An iterator to go through the IPv6 addresses of the child with @p aRloc using * `otMeshDiagGetNextIp6Address()`. Set to NULL on `OT_ERROR_RESPONSE_TIMEOUT`. * @param[in] aContext Application-specific context. - * */ typedef void (*otMeshDiagChildIp6AddrsCallback)(otError aError, uint16_t aChildRloc16, @@ -335,7 +316,6 @@ typedef void (*otMeshDiagChildIp6AddrsCallback)(otError aErro * @retval OT_ERROR_INVALID_ARGS The @p aRloc16 is not a valid RLOC16. * @retval OT_ERROR_INVALID_STATE Device is not attached. * @retval OT_ERROR_NO_BUFS Could not allocate buffer to send query messages. - * */ otError otMeshDiagQueryChildrenIp6Addrs(otInstance *aInstance, uint16_t aRloc16, @@ -350,7 +330,6 @@ otError otMeshDiagQueryChildrenIp6Addrs(otInstance *aInstanc * layer, while `mMessageErrorRate` tracks the IPv6 message error rate (above MAC layer and after MAC retries) when * an IPv6 message is dropped. For example, if the message is large and requires 6LoWPAN fragmentation, message tx is * considered as failed if one of its fragment frame tx fails (for example, never acked). - * */ typedef struct otMeshDiagRouterNeighborEntry { @@ -378,7 +357,6 @@ typedef struct otMeshDiagRouterNeighborEntry * OT_ERROR_RESPONSE_TIMEOUT Timed out waiting for response. * @param[in] aNeighborEntry The neighbor entry (can be null if `aError` is RESPONSE_TIMEOUT or NONE). * @param[in] aContext Application-specific context. - * */ typedef void (*otMeshDiagQueryRouterNeighborTableCallback)(otError aError, const otMeshDiagRouterNeighborEntry *aNeighborEntry, @@ -397,7 +375,6 @@ typedef void (*otMeshDiagQueryRouterNeighborTableCallback)(otError * @retval OT_ERROR_INVALID_ARGS The @p aRloc16 is not a valid router RLOC16. * @retval OT_ERROR_INVALID_STATE Device is not attached. * @retval OT_ERROR_NO_BUFS Could not allocate buffer to send query messages. - * */ otError otMeshDiagQueryRouterNeighborTable(otInstance *aInstance, uint16_t aRloc16, @@ -406,7 +383,6 @@ otError otMeshDiagQueryRouterNeighborTable(otInstance /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/message.h b/include/openthread/message.h index 39e14d431e0..c0a4d1bcdad 100644 --- a/include/openthread/message.h +++ b/include/openthread/message.h @@ -49,18 +49,15 @@ extern "C" { * This module includes functions that manipulate OpenThread message buffers. * * @{ - * */ /** * An opaque representation of an OpenThread message buffer. - * */ typedef struct otMessage otMessage; /** * Defines the OpenThread message priority levels. - * */ typedef enum otMessagePriority { @@ -71,7 +68,6 @@ typedef enum otMessagePriority /** * Defines the OpenThread message origins. - * */ typedef enum otMessageOrigin { @@ -82,7 +78,6 @@ typedef enum otMessageOrigin /** * Represents a message settings. - * */ typedef struct otMessageSettings { @@ -92,7 +87,6 @@ typedef struct otMessageSettings /** * Represents link-specific information for messages received from the Thread radio. - * */ typedef struct otThreadLinkInfo { @@ -123,7 +117,6 @@ typedef struct otThreadLinkInfo * @sa otMessageSetOffset * @sa otMessageRead * @sa otMessageWrite - * */ void otMessageFree(otMessage *aMessage); @@ -142,7 +135,6 @@ void otMessageFree(otMessage *aMessage); * @sa otMessageRead * @sa otMessageWrite * @sa otMessageSetLength - * */ uint16_t otMessageGetLength(const otMessage *aMessage); @@ -162,7 +154,6 @@ uint16_t otMessageGetLength(const otMessage *aMessage); * @sa otMessageSetOffset * @sa otMessageRead * @sa otMessageWrite - * */ otError otMessageSetLength(otMessage *aMessage, uint16_t aLength); @@ -180,7 +171,6 @@ otError otMessageSetLength(otMessage *aMessage, uint16_t aLength); * @sa otMessageSetOffset * @sa otMessageRead * @sa otMessageWrite - * */ uint16_t otMessageGetOffset(const otMessage *aMessage); @@ -197,7 +187,6 @@ uint16_t otMessageGetOffset(const otMessage *aMessage); * @sa otMessageGetOffset * @sa otMessageRead * @sa otMessageWrite - * */ void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset); @@ -208,7 +197,6 @@ void otMessageSetOffset(otMessage *aMessage, uint16_t aOffset); * * @retval TRUE If link security is enabled. * @retval FALSE If link security is not enabled. - * */ bool otMessageIsLinkSecurityEnabled(const otMessage *aMessage); @@ -219,7 +207,6 @@ bool otMessageIsLinkSecurityEnabled(const otMessage *aMessage); * * @retval TRUE If the message is allowed to be looped back to host. * @retval FALSE If the message is not allowed to be looped back to host. - * */ bool otMessageIsLoopbackToHostAllowed(const otMessage *aMessage); @@ -228,7 +215,6 @@ bool otMessageIsLoopbackToHostAllowed(const otMessage *aMessage); * * @param[in] aMessage A pointer to a message buffer. * @param[in] aAllowLoopbackToHost Whether to allow the message to be looped back to host. - * */ void otMessageSetLoopbackToHostAllowed(otMessage *aMessage, bool aAllowLoopbackToHost); @@ -241,7 +227,6 @@ void otMessageSetLoopbackToHostAllowed(otMessage *aMessage, bool aAllowLoopbackT * This API is mainly intended for use along with `otIp6Send()` which expects an already prepared IPv6 message. * * @param[in] aMessage A pointer to the message. - * */ bool otMessageIsMulticastLoopEnabled(otMessage *aMessage); @@ -250,7 +235,6 @@ bool otMessageIsMulticastLoopEnabled(otMessage *aMessage); * * @param[in] aMessage A pointer to the message. * @param[in] aEnabled The configuration value. - * */ void otMessageSetMulticastLoopEnabled(otMessage *aMessage, bool aEnabled); @@ -260,7 +244,6 @@ void otMessageSetMulticastLoopEnabled(otMessage *aMessage, bool aEnabled); * @param[in] aMessage A pointer to a message buffer. * * @returns The message origin. - * */ otMessageOrigin otMessageGetOrigin(const otMessage *aMessage); @@ -269,7 +252,6 @@ otMessageOrigin otMessageGetOrigin(const otMessage *aMessage); * * @param[in] aMessage A pointer to a message buffer. * @param[in] aOrigin The message origin. - * */ void otMessageSetOrigin(otMessage *aMessage, otMessageOrigin aOrigin); @@ -280,7 +262,6 @@ void otMessageSetOrigin(otMessage *aMessage, otMessageOrigin aOrigin); * @param[in] aMessage A pointer to a message buffer. * @param[in] aEnabled If `true`, the message is forced to use direct transmission. If `false`, the message follows * the normal procedure. - * */ void otMessageSetDirectTransmission(otMessage *aMessage, bool aEnabled); @@ -290,7 +271,6 @@ void otMessageSetDirectTransmission(otMessage *aMessage, bool aEnabled); * @param[in] aMessage A pointer to a message buffer. * * @returns The average RSS value (in dBm) or OT_RADIO_RSSI_INVALID if no average RSS is available. - * */ int8_t otMessageGetRss(const otMessage *aMessage); @@ -302,7 +282,6 @@ int8_t otMessageGetRss(const otMessage *aMessage); * * @retval OT_ERROR_NONE Successfully retrieved the link info, @p `aLinkInfo` is updated. * @retval OT_ERROR_NOT_FOUND Message origin is not `OT_MESSAGE_ORIGIN_THREAD_NETIF`. - * */ otError otMessageGetThreadLinkInfo(const otMessage *aMessage, otThreadLinkInfo *aLinkInfo); @@ -323,7 +302,6 @@ otError otMessageGetThreadLinkInfo(const otMessage *aMessage, otThreadLinkInfo * * @sa otMessageSetOffset * @sa otMessageRead * @sa otMessageWrite - * */ otError otMessageAppend(otMessage *aMessage, const void *aBuf, uint16_t aLength); @@ -344,7 +322,6 @@ otError otMessageAppend(otMessage *aMessage, const void *aBuf, uint16_t aLength) * @sa otMessageGetOffset * @sa otMessageSetOffset * @sa otMessageWrite - * */ uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength); @@ -365,7 +342,6 @@ uint16_t otMessageRead(const otMessage *aMessage, uint16_t aOffset, void *aBuf, * @sa otMessageGetOffset * @sa otMessageSetOffset * @sa otMessageRead - * */ int otMessageWrite(otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength); @@ -379,7 +355,6 @@ typedef struct /** * Represents information about a message queue. - * */ typedef struct otMessageQueueInfo { @@ -390,7 +365,6 @@ typedef struct otMessageQueueInfo /** * Represents the message buffer information for different queues used by OpenThread stack. - * */ typedef struct otBufferInfo { @@ -400,7 +374,6 @@ typedef struct otBufferInfo /** * The maximum number of used buffers at the same time since OT stack initialization or last call to * `otMessageResetBufferInfo()`. - * */ uint16_t mMaxUsedBuffers; @@ -422,7 +395,6 @@ typedef struct otBufferInfo * initialized or if it is initialized more than once. * * @param[in] aQueue A pointer to a message queue. - * */ void otMessageQueueInit(otMessageQueue *aQueue); @@ -431,7 +403,6 @@ void otMessageQueueInit(otMessageQueue *aQueue); * * @param[in] aQueue A pointer to the message queue. * @param[in] aMessage The message to add. - * */ void otMessageQueueEnqueue(otMessageQueue *aQueue, otMessage *aMessage); @@ -440,7 +411,6 @@ void otMessageQueueEnqueue(otMessageQueue *aQueue, otMessage *aMessage); * * @param[in] aQueue A pointer to the message queue. * @param[in] aMessage The message to add. - * */ void otMessageQueueEnqueueAtHead(otMessageQueue *aQueue, otMessage *aMessage); @@ -449,7 +419,6 @@ void otMessageQueueEnqueueAtHead(otMessageQueue *aQueue, otMessage *aMessage); * * @param[in] aQueue A pointer to the message queue. * @param[in] aMessage The message to remove. - * */ void otMessageQueueDequeue(otMessageQueue *aQueue, otMessage *aMessage); @@ -459,7 +428,6 @@ void otMessageQueueDequeue(otMessageQueue *aQueue, otMessage *aMessage); * @param[in] aQueue A pointer to a message queue. * * @returns A pointer to the message at the head of queue or NULL if queue is empty. - * */ otMessage *otMessageQueueGetHead(otMessageQueue *aQueue); @@ -471,7 +439,6 @@ otMessage *otMessageQueueGetHead(otMessageQueue *aQueue); * * @returns A pointer to the next message in the queue after `aMessage` or NULL if `aMessage is the tail of queue. * NULL is returned if `aMessage` is not in the queue `aQueue`. - * */ otMessage *otMessageQueueGetNext(otMessageQueue *aQueue, const otMessage *aMessage); @@ -480,7 +447,6 @@ otMessage *otMessageQueueGetNext(otMessageQueue *aQueue, const otMessage *aMessa * * @param[in] aInstance A pointer to the OpenThread instance. * @param[out] aBufferInfo A pointer where the message buffer information is written. - * */ void otMessageGetBufferInfo(otInstance *aInstance, otBufferInfo *aBufferInfo); @@ -490,13 +456,11 @@ void otMessageGetBufferInfo(otInstance *aInstance, otBufferInfo *aBufferInfo); * This resets `mMaxUsedBuffers` in `otBufferInfo`. * * @param[in] aInstance A pointer to the OpenThread instance. - * */ void otMessageResetBufferInfo(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/multi_radio.h b/include/openthread/multi_radio.h index 9ad35723bbb..ed1a8767df6 100644 --- a/include/openthread/multi_radio.h +++ b/include/openthread/multi_radio.h @@ -48,12 +48,10 @@ extern "C" { * This module includes definitions and functions for multi radio link. * * @{ - * */ /** * Represents information associated with a radio link. - * */ typedef struct otRadioLinkInfo { @@ -62,7 +60,6 @@ typedef struct otRadioLinkInfo /** * Represents multi radio link information associated with a neighbor. - * */ typedef struct otMultiRadioNeighborInfo { @@ -83,7 +80,6 @@ typedef struct otMultiRadioNeighborInfo * * @retval OT_ERROR_NONE Neighbor was found and @p aNeighborInfo was updated successfully. * @retval OT_ERROR_NOT_FOUND Could not find a neighbor with @p aExtAddress. - * */ otError otMultiRadioGetNeighborInfo(otInstance *aInstance, const otExtAddress *aExtAddress, @@ -91,7 +87,6 @@ otError otMultiRadioGetNeighborInfo(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/nat64.h b/include/openthread/nat64.h index 61fe1b697b7..8d48a6a7617 100644 --- a/include/openthread/nat64.h +++ b/include/openthread/nat64.h @@ -49,7 +49,6 @@ extern "C" { * only available when `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled. * * @{ - * */ #define OT_IP4_ADDRESS_SIZE 4 ///< Size of an IPv4 address (bytes) @@ -58,7 +57,6 @@ extern "C" { * @struct otIp4Address * * Represents an IPv4 address. - * */ OT_TOOL_PACKED_BEGIN struct otIp4Address @@ -72,7 +70,6 @@ struct otIp4Address /** * Represents an IPv4 address. - * */ typedef struct otIp4Address otIp4Address; @@ -80,7 +77,6 @@ typedef struct otIp4Address otIp4Address; * @struct otIp4Cidr * * Represents an IPv4 CIDR block. - * */ typedef struct otIp4Cidr { @@ -90,7 +86,6 @@ typedef struct otIp4Cidr /** * Represents the counters for NAT64. - * */ typedef struct otNat64Counters { @@ -102,7 +97,6 @@ typedef struct otNat64Counters /** * Represents the counters for the protocols supported by NAT64. - * */ typedef struct otNat64ProtocolCounters { @@ -114,7 +108,6 @@ typedef struct otNat64ProtocolCounters /** * Packet drop reasons. - * */ typedef enum otNat64DropReason { @@ -128,7 +121,6 @@ typedef enum otNat64DropReason /** * Represents the counters of dropped packets due to errors when handling NAT64 packets. - * */ typedef struct otNat64ErrorCounters { @@ -145,7 +137,6 @@ typedef struct otNat64ErrorCounters * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aCounters A pointer to an `otNat64Counters` where the counters of NAT64 translator will be placed. - * */ void otNat64GetCounters(otInstance *aInstance, otNat64ProtocolCounters *aCounters); @@ -156,7 +147,6 @@ void otNat64GetCounters(otInstance *aInstance, otNat64ProtocolCounters *aCounter * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aCounters A pointer to an `otNat64Counters` where the counters of NAT64 translator will be placed. - * */ void otNat64GetErrorCounters(otInstance *aInstance, otNat64ErrorCounters *aCounters); @@ -165,7 +155,6 @@ void otNat64GetErrorCounters(otInstance *aInstance, otNat64ErrorCounters *aCount * * @note The counters will be reset for each mapping session even for the same address pair. Applications can use `mId` * to identify different sessions to calculate the packets correctly. - * */ typedef struct otNat64AddressMapping { @@ -185,7 +174,6 @@ typedef struct otNat64AddressMapping * accessed or used by caller. * * Before using an iterator, it MUST be initialized using `otNat64AddressMappingIteratorInit()`. - * */ typedef struct otNat64AddressMappingIterator { @@ -201,7 +189,6 @@ typedef struct otNat64AddressMappingIterator * * @param[in] aInstance The OpenThread instance. * @param[out] aIterator A pointer to the iterator to initialize. - * */ void otNat64InitAddressMappingIterator(otInstance *aInstance, otNat64AddressMappingIterator *aIterator); @@ -220,7 +207,6 @@ void otNat64InitAddressMappingIterator(otInstance *aInstance, otNat64AddressMapp * @retval OT_ERROR_NONE Successfully found the next NAT64 address mapping info (@p aMapping was successfully * updated). * @retval OT_ERROR_NOT_FOUND No subsequent NAT64 address mapping info was found. - * */ otError otNat64GetNextAddressMapping(otInstance *aInstance, otNat64AddressMappingIterator *aIterator, @@ -228,7 +214,6 @@ otError otNat64GetNextAddressMapping(otInstance *aInstance, /** * States of NAT64. - * */ typedef enum { @@ -249,7 +234,6 @@ typedef enum * @retval OT_NAT64_STATE_NOT_RUNNING NAT64 translator is enabled, but the translator is not configured with a valid * NAT64 prefix and a CIDR. * @retval OT_NAT64_STATE_ACTIVE NAT64 translator is enabled, and is translating packets. - * */ otNat64State otNat64GetTranslatorState(otInstance *aInstance); @@ -268,7 +252,6 @@ otNat64State otNat64GetTranslatorState(otInstance *aInstance); * priority. * @retval OT_NAT64_STATE_ACTIVE NAT64 prefix manager is enabled, and is publishing NAT64 prefix to the Thread * network. - * */ otNat64State otNat64GetPrefixManagerState(otInstance *aInstance); @@ -289,7 +272,6 @@ otNat64State otNat64GetPrefixManagerState(otInstance *aInstance); * * @sa otNat64GetTranslatorState * @sa otNat64GetPrefixManagerState - * */ void otNat64SetEnabled(otInstance *aInstance, bool aEnabled); @@ -310,7 +292,6 @@ void otNat64SetEnabled(otInstance *aInstance, bool aEnabled); * @returns A pointer to the message buffer or NULL if no message buffers are available or parameters are invalid. * * @sa otNat64Send - * */ otMessage *otIp4NewMessage(otInstance *aInstance, const otMessageSettings *aSettings); @@ -333,7 +314,6 @@ otMessage *otIp4NewMessage(otInstance *aInstance, const otMessageSettings *aSett * * @sa otBorderRouterSend * @sa otBorderRouterSetReceiveCallback - * */ otError otNat64SetIp4Cidr(otInstance *aInstance, const otIp4Cidr *aCidr); @@ -353,7 +333,6 @@ otError otNat64SetIp4Cidr(otInstance *aInstance, const otIp4Cidr *aCidr); * @retval OT_ERROR_NO_ROUTE No route to host. * @retval OT_ERROR_INVALID_SOURCE_ADDRESS Source address is invalid, e.g. an anycast address or a multicast address. * @retval OT_ERROR_PARSE Encountered a malformed header when processing the message. - * */ otError otNat64Send(otInstance *aInstance, otMessage *aMessage); @@ -364,7 +343,6 @@ otError otNat64Send(otInstance *aInstance, otMessage *aMessage); * the ownership of the @p aMessage to the receiver of the callback. The message should be * freed by the receiver of the callback after it is processed. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otNat64ReceiveIp4Callback)(otMessage *aMessage, void *aContext); @@ -375,7 +353,6 @@ typedef void (*otNat64ReceiveIp4Callback)(otMessage *aMessage, void *aContext); * @param[in] aCallback A pointer to a function that is called when an IPv4 datagram is received or * NULL to disable the callback. * @param[in] aContext A pointer to application-specific context. - * */ void otNat64SetReceiveIp4Callback(otInstance *aInstance, otNat64ReceiveIp4Callback aCallback, void *aContext); @@ -386,7 +363,6 @@ void otNat64SetReceiveIp4Callback(otInstance *aInstance, otNat64ReceiveIp4Callba * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aCidr A pointer to an otIp4Cidr. Where the CIDR will be filled. - * */ otError otNat64GetCidr(otInstance *aInstance, otIp4Cidr *aCidr); @@ -398,7 +374,6 @@ otError otNat64GetCidr(otInstance *aInstance, otIp4Cidr *aCidr); * * @retval TRUE The two IPv4 addresses are the same. * @retval FALSE The two IPv4 addresses are not the same. - * */ bool otIp4IsAddressEqual(const otIp4Address *aFirst, const otIp4Address *aSecond); @@ -412,7 +387,6 @@ bool otIp4IsAddressEqual(const otIp4Address *aFirst, const otIp4Address *aSecond * @param[in] aPrefixLength The prefix length to use for IPv4/IPv6 translation. * @param[in] aIp6Address A pointer to an IPv6 address. * @param[out] aIp4Address A pointer to output the IPv4 address. - * */ void otIp4ExtractFromIp6Address(uint8_t aPrefixLength, const otIp6Address *aIp6Address, otIp4Address *aIp4Address); @@ -427,7 +401,6 @@ void otIp4ExtractFromIp6Address(uint8_t aPrefixLength, const otIp6Address *aIp6A * * @retval OT_ERROR_NONE Extracted the IPv4 address successfully. @p aIp4Address is updated. * @retval OT_ERROR_PARSE The @p aIp6Address does not follow the IPv4-mapped IPv6 address format. - * */ otError otIp4FromIp4MappedIp6Address(const otIp6Address *aIp6Address, otIp4Address *aIp4Address); @@ -436,7 +409,6 @@ otError otIp4FromIp4MappedIp6Address(const otIp6Address *aIp6Address, otIp4Addre * * @param[in] aIp4Address An IPv4 address to convert. * @param[out] aIp6Address An IPv6 address to set. - * */ void otIp4ToIp4MappedIp6Address(const otIp4Address *aIp4Address, otIp6Address *aIp6Address); @@ -453,7 +425,6 @@ void otIp4ToIp4MappedIp6Address(const otIp4Address *aIp4Address, otIp6Address *a * @param[in] aAddress A pointer to an IPv4 address (MUST NOT be NULL). * @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be `nullptr`). * @param[in] aSize The size of @p aBuffer (in bytes). - * */ void otIp4AddressToString(const otIp4Address *aAddress, char *aBuffer, uint16_t aSize); @@ -467,7 +438,6 @@ void otIp4AddressToString(const otIp4Address *aAddress, char *aBuffer, uint16_t * * @retval OT_ERROR_NONE Successfully parsed the string. * @retval OT_ERROR_INVALID_ARGS Failed to parse the string. - * */ otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr); @@ -483,7 +453,6 @@ otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr); * @param[in] aCidr A pointer to an IPv4 CIDR (MUST NOT be NULL). * @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be `nullptr`). * @param[in] aSize The size of @p aBuffer (in bytes). - * */ void otIp4CidrToString(const otIp4Cidr *aCidr, char *aBuffer, uint16_t aSize); @@ -495,7 +464,6 @@ void otIp4CidrToString(const otIp4Cidr *aCidr, char *aBuffer, uint16_t aSize); * * @retval OT_ERROR_NONE Successfully parsed the string. * @retval OT_ERROR_INVALID_ARGS Failed to parse the string. - * */ otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress); @@ -509,13 +477,11 @@ otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress); * * @returns OT_ERROR_NONE Successfully synthesized the IPv6 address from NAT64 prefix and IPv4 address. * @returns OT_ERROR_INVALID_STATE No valid NAT64 prefix in the network data. - * */ otError otNat64SynthesizeIp6Address(otInstance *aInstance, const otIp4Address *aIp4Address, otIp6Address *aIp6Address); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/ncp.h b/include/openthread/ncp.h index 8c810fc84c7..b985fbc0f49 100644 --- a/include/openthread/ncp.h +++ b/include/openthread/ncp.h @@ -51,7 +51,6 @@ extern "C" { * This module includes functions that control the Thread stack's execution. * * @{ - * */ /** @@ -61,13 +60,11 @@ extern "C" { * @param[in] aBufLength A length of the output data stored in the buffer. * * @returns Number of bytes processed by the callback. - * */ typedef int (*otNcpHdlcSendCallback)(const uint8_t *aBuf, uint16_t aBufLength); /** * Is called after NCP send finished. - * */ void otNcpHdlcSendDone(void); @@ -76,7 +73,6 @@ void otNcpHdlcSendDone(void); * * @param[in] aBuf A pointer to a buffer. * @param[in] aBufLength The length of the data stored in the buffer. - * */ void otNcpHdlcReceive(const uint8_t *aBuf, uint16_t aBufLength); @@ -85,7 +81,6 @@ void otNcpHdlcReceive(const uint8_t *aBuf, uint16_t aBufLength); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aSendCallback The function pointer used to send NCP data. - * */ void otNcpHdlcInit(otInstance *aInstance, otNcpHdlcSendCallback aSendCallback); @@ -95,7 +90,6 @@ void otNcpHdlcInit(otInstance *aInstance, otNcpHdlcSendCallback aSendCallback); * @param[in] aInstances The OpenThread instance pointers array. * @param[in] aCount Number of elements in the array. * @param[in] aSendCallback The function pointer used to send NCP data. - * */ void otNcpHdlcInitMulti(otInstance **aInstance, uint8_t aCount, otNcpHdlcSendCallback aSendCallback); @@ -103,7 +97,6 @@ void otNcpHdlcInitMulti(otInstance **aInstance, uint8_t aCount, otNcpHdlcSendCal * Initialize the NCP based on SPI framing. * * @param[in] aInstance The OpenThread instance structure. - * */ void otNcpSpiInit(otInstance *aInstance); @@ -154,7 +147,6 @@ void otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFo * @param[in] aCount Number of bytes to peek or poke. * * @returns TRUE to allow peek/poke of the given memory region, FALSE otherwise. - * */ typedef bool (*otNcpDelegateAllowPeekPoke)(uint32_t aAddress, uint16_t aCount); @@ -166,14 +158,12 @@ typedef bool (*otNcpDelegateAllowPeekPoke)(uint32_t aAddress, uint16_t aCount); * * @param[in] aAllowPeekDelegate Delegate function pointer for peek operation. * @param[in] aAllowPokeDelegate Delegate function pointer for poke operation. - * */ void otNcpRegisterPeekPokeDelegates(otNcpDelegateAllowPeekPoke aAllowPeekDelegate, otNcpDelegateAllowPeekPoke aAllowPokeDelegate); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/netdata.h b/include/openthread/netdata.h index 08bf504a98f..934ec5b9eb4 100644 --- a/include/openthread/netdata.h +++ b/include/openthread/netdata.h @@ -46,7 +46,6 @@ extern "C" { * @addtogroup api-thread-general * * @{ - * */ #define OT_NETWORK_DATA_ITERATOR_INIT 0 ///< Value to initialize `otNetworkDataIterator`. @@ -74,7 +73,6 @@ typedef struct otBorderRouterConfig /** * Represents 6LoWPAN Context ID information associated with a prefix in Network Data. - * */ typedef struct otLowpanContextInfo { @@ -85,7 +83,6 @@ typedef struct otLowpanContextInfo /** * Represents an External Route configuration. - * */ typedef struct otExternalRouteConfig { @@ -100,7 +97,6 @@ typedef struct otExternalRouteConfig /** * Defines valid values for `mPreference` in `otExternalRouteConfig` and `otBorderRouterConfig`. - * */ typedef enum otRoutePreference { @@ -114,7 +110,6 @@ typedef enum otRoutePreference /** * Represents a Server configuration. - * */ typedef struct otServerConfig { @@ -126,7 +121,6 @@ typedef struct otServerConfig /** * Represents a Service configuration. - * */ typedef struct otServiceConfig { @@ -148,7 +142,6 @@ typedef struct otServiceConfig * * @retval OT_ERROR_NONE Successfully copied the Thread Network Data into @p aData and updated @p aDataLength. * @retval OT_ERROR_NO_BUFS Not enough space in @p aData to fully copy the Thread Network Data. - * */ otError otNetDataGet(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength); @@ -158,7 +151,6 @@ otError otNetDataGet(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_ * @param[in] aInstance A pointer to an OpenThread instance. * * @return The length of the Network Data. - * */ uint8_t otNetDataGetLength(otInstance *aInstance); @@ -169,7 +161,6 @@ uint8_t otNetDataGetLength(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @return The maximum length of the Network Data (high water mark for Network Data length). - * */ uint8_t otNetDataGetMaxLength(otInstance *aInstance); @@ -179,7 +170,6 @@ uint8_t otNetDataGetMaxLength(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @sa otNetDataGetMaxLength - * */ void otNetDataResetMaxLength(otInstance *aInstance); @@ -193,7 +183,6 @@ void otNetDataResetMaxLength(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully found the next On Mesh prefix. * @retval OT_ERROR_NOT_FOUND No subsequent On Mesh prefix exists in the Thread Network Data. - * */ otError otNetDataGetNextOnMeshPrefix(otInstance *aInstance, otNetworkDataIterator *aIterator, @@ -209,7 +198,6 @@ otError otNetDataGetNextOnMeshPrefix(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully found the next External Route. * @retval OT_ERROR_NOT_FOUND No subsequent external route entry exists in the Thread Network Data. - * */ otError otNetDataGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig); @@ -223,7 +211,6 @@ otError otNetDataGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIte * * @retval OT_ERROR_NONE Successfully found the next service. * @retval OT_ERROR_NOT_FOUND No subsequent service exists in the partition's Network Data. - * */ otError otNetDataGetNextService(otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig); @@ -237,7 +224,6 @@ otError otNetDataGetNextService(otInstance *aInstance, otNetworkDataIterator *aI * * @retval OT_ERROR_NONE Successfully found the next 6LoWPAN Context ID info. * @retval OT_ERROR_NOT_FOUND No subsequent 6LoWPAN Context info exists in the partition's Network Data. - * */ otError otNetDataGetNextLowpanContextInfo(otInstance *aInstance, otNetworkDataIterator *aIterator, @@ -248,7 +234,6 @@ otError otNetDataGetNextLowpanContextInfo(otInstance *aInstance, * * @param[in] aInstance A pointer to the OpenThread instance. * @param[out] aDataset A pointer to a `otCommissioningDataset` to populate. - * */ void otNetDataGetCommissioningDataset(otInstance *aInstance, otCommissioningDataset *aDataset); @@ -258,7 +243,6 @@ void otNetDataGetCommissioningDataset(otInstance *aInstance, otCommissioningData * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Network Data Version. - * */ uint8_t otNetDataGetVersion(otInstance *aInstance); @@ -268,7 +252,6 @@ uint8_t otNetDataGetVersion(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Stable Network Data Version. - * */ uint8_t otNetDataGetStableVersion(otInstance *aInstance); @@ -281,7 +264,6 @@ uint8_t otNetDataGetStableVersion(otInstance *aInstance); * @retval OT_ERROR_NONE @p aEui64 is included in the steering data. * @retval OT_ERROR_INVALID_STATE No steering data present. * @retval OT_ERROR_NOT_FOUND @p aEui64 is not included in the steering data. - * */ otError otNetDataSteeringDataCheckJoiner(otInstance *aInstance, const otExtAddress *aEui64); @@ -297,7 +279,6 @@ struct otJoinerDiscerner; * @retval OT_ERROR_NONE @p aDiscerner is included in the steering data. * @retval OT_ERROR_INVALID_STATE No steering data present. * @retval OT_ERROR_NOT_FOUND @p aDiscerner is not included in the steering data. - * */ otError otNetDataSteeringDataCheckJoinerWithDiscerner(otInstance *aInstance, const struct otJoinerDiscerner *aDiscerner); @@ -311,13 +292,11 @@ otError otNetDataSteeringDataCheckJoinerWithDiscerner(otInstance * @returns Whether @p aPrefix is a valid OMR prefix and Leader's Network Data contains the OMR prefix @p aPrefix. * * @note This API is only available when `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` is used. - * */ bool otNetDataContainsOmrPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/netdata_publisher.h b/include/openthread/netdata_publisher.h index 21a934523a5..ef9665cc6da 100644 --- a/include/openthread/netdata_publisher.h +++ b/include/openthread/netdata_publisher.h @@ -51,12 +51,10 @@ extern "C" { * or remove entries. * * All the functions in this module require `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE` to be enabled. - * */ /** * Represents the events reported from the Publisher callbacks. - * */ typedef enum otNetDataPublisherEvent { @@ -74,7 +72,6 @@ typedef enum otNetDataPublisherEvent * * @param[in] aEvent Indicates the event (whether the entry was added or removed). * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otNetDataDnsSrpServicePublisherCallback)(otNetDataPublisherEvent aEvent, void *aContext); @@ -88,7 +85,6 @@ typedef void (*otNetDataDnsSrpServicePublisherCallback)(otNetDataPublisherEvent * @param[in] aEvent Indicates the event (whether the entry was added or removed). * @param[in] aPrefix A pointer to the prefix entry. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent, const otIp6Prefix *aPrefix, @@ -104,7 +100,6 @@ typedef void (*otNetDataPrefixPublisherCallback)(otNetDataPublisherEvent aEvent, * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aSequenceNUmber The sequence number of DNS/SRP Anycast Service. - * */ void otNetDataPublishDnsSrpServiceAnycast(otInstance *aInstance, uint8_t aSequenceNUmber); @@ -122,7 +117,6 @@ void otNetDataPublishDnsSrpServiceAnycast(otInstance *aInstance, uint8_t aSequen * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aAddress The DNS/SRP server address to publish (MUST NOT be NULL). * @param[in] aPort The SRP server port number to publish. - * */ void otNetDataPublishDnsSrpServiceUnicast(otInstance *aInstance, const otIp6Address *aAddress, uint16_t aPort); @@ -140,7 +134,6 @@ void otNetDataPublishDnsSrpServiceUnicast(otInstance *aInstance, const otIp6Addr * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPort The SRP server port number to publish. - * */ void otNetDataPublishDnsSrpServiceUnicastMeshLocalEid(otInstance *aInstance, uint16_t aPort); @@ -153,7 +146,6 @@ void otNetDataPublishDnsSrpServiceUnicastMeshLocalEid(otInstance *aInstance, uin * * @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. - * */ bool otNetDataIsDnsSrpServiceAdded(otInstance *aInstance); @@ -168,7 +160,6 @@ bool otNetDataIsDnsSrpServiceAdded(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback The callback function pointer (can be NULL if not needed). * @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked). - * */ void otNetDataSetDnsSrpServicePublisherCallback(otInstance *aInstance, otNetDataDnsSrpServicePublisherCallback aCallback, @@ -181,7 +172,6 @@ void otNetDataSetDnsSrpServicePublisherCallback(otInstance * `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otNetDataUnpublishDnsSrpService(otInstance *aInstance); @@ -207,8 +197,6 @@ void otNetDataUnpublishDnsSrpService(otInstance *aInstance); * @retval OT_ERROR_NO_BUFS Could not allocate an entry for the new request. Publisher supports a limited number * of entries (shared between on-mesh prefix and external route) determined by config * `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_MAX_PREFIX_ENTRIES`. - * - * */ otError otNetDataPublishOnMeshPrefix(otInstance *aInstance, const otBorderRouterConfig *aConfig); @@ -267,7 +255,6 @@ otError otNetDataPublishExternalRoute(otInstance *aInstance, const otExternalRou * @retval OT_ERROR_NO_BUFS Could not allocate an entry for the new request. Publisher supports a limited number * of entries (shared between on-mesh prefix and external route) determined by config * `OPENTHREAD_CONFIG_NETDATA_PUBLISHER_MAX_PREFIX_ENTRIES`. - * */ otError otNetDataReplacePublishedExternalRoute(otInstance *aInstance, const otIp6Prefix *aPrefix, @@ -284,7 +271,6 @@ otError otNetDataReplacePublishedExternalRoute(otInstance *aIns * * @retval TRUE The published prefix 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. - * */ bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix); @@ -299,7 +285,6 @@ bool otNetDataIsPrefixAdded(otInstance *aInstance, const otIp6Prefix *aPrefix); * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback The callback function pointer (can be NULL if not needed). * @param[in] aContext A pointer to application-specific context (used when @p aCallback is invoked). - * */ void otNetDataSetPrefixPublisherCallback(otInstance *aInstance, otNetDataPrefixPublisherCallback aCallback, @@ -315,13 +300,11 @@ void otNetDataSetPrefixPublisherCallback(otInstance *aInsta * * @retval OT_ERROR_NONE The prefix was unpublished successfully. * @retval OT_ERROR_NOT_FOUND Could not find the prefix in the published list. - * */ otError otNetDataUnpublishPrefix(otInstance *aInstance, const otIp6Prefix *aPrefix); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/netdiag.h b/include/openthread/netdiag.h index ff99b3850d1..762f81dff2b 100644 --- a/include/openthread/netdiag.h +++ b/include/openthread/netdiag.h @@ -46,7 +46,6 @@ extern "C" { * @addtogroup api-thread-general * * @{ - * */ #define OT_NETWORK_DIAGNOSTIC_TLV_EXT_ADDRESS 0 ///< MAC Extended Address TLV @@ -91,7 +90,6 @@ typedef uint16_t otNetworkDiagIterator; ///< Used to iterate through Network Dia /** * Represents a Network Diagnostic Connectivity value. - * */ typedef struct otNetworkDiagConnectivity { @@ -108,7 +106,6 @@ typedef struct otNetworkDiagConnectivity /** * Represents a Network Diagnostic Route data. - * */ typedef struct otNetworkDiagRouteData { @@ -120,7 +117,6 @@ typedef struct otNetworkDiagRouteData /** * Represents a Network Diagnostic Route64 TLV value. - * */ typedef struct otNetworkDiagRoute { @@ -136,7 +132,6 @@ typedef struct otNetworkDiagRoute * Represents a Network Diagnostic Mac Counters value. * * See RFC 2863 for definitions of member fields. - * */ typedef struct otNetworkDiagMacCounters { @@ -153,7 +148,6 @@ typedef struct otNetworkDiagMacCounters /** * Represents a Network Diagnostics MLE Counters value. - * */ typedef struct otNetworkDiagMleCounters { @@ -176,7 +170,6 @@ typedef struct otNetworkDiagMleCounters /** * Represents a Network Diagnostic Child Table Entry. - * */ typedef struct otNetworkDiagChildEntry { @@ -188,7 +181,6 @@ typedef struct otNetworkDiagChildEntry /** * Represents a Network Diagnostic TLV. - * */ typedef struct otNetworkDiagTlv { @@ -253,7 +245,6 @@ typedef struct otNetworkDiagTlv * @retval OT_ERROR_PARSE Parsing the next Network Diagnostic failed. * * @Note A subsequent call to this function is allowed only when current return value is OT_ERROR_NONE. - * */ otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage, otNetworkDiagIterator *aIterator, @@ -268,7 +259,6 @@ otError otThreadGetNextDiagnosticTlv(const otMessage *aMessage, * @param[in] aMessageInfo A pointer to the message info for @p aMessage. Available only when * @p aError is `OT_ERROR_NONE`. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otReceiveDiagnosticGetCallback)(otError aError, otMessage *aMessage, @@ -290,7 +280,6 @@ typedef void (*otReceiveDiagnosticGetCallback)(otError aError, * * @retval OT_ERROR_NONE Successfully queued the DIAG_GET.req. * @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_GET.req. - * */ otError otThreadSendDiagnosticGet(otInstance *aInstance, const otIp6Address *aDestination, @@ -311,7 +300,6 @@ otError otThreadSendDiagnosticGet(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully queued the DIAG_RST.ntf. * @retval OT_ERROR_NO_BUFS Insufficient message buffers available to send DIAG_RST.ntf. - * */ otError otThreadSendDiagnosticReset(otInstance *aInstance, const otIp6Address *aDestination, @@ -324,7 +312,6 @@ otError otThreadSendDiagnosticReset(otInstance *aInstance, * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The vendor name string. - * */ const char *otThreadGetVendorName(otInstance *aInstance); @@ -334,7 +321,6 @@ const char *otThreadGetVendorName(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The vendor model string. - * */ const char *otThreadGetVendorModel(otInstance *aInstance); @@ -344,7 +330,6 @@ const char *otThreadGetVendorModel(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The vendor software version string. - * */ const char *otThreadGetVendorSwVersion(otInstance *aInstance); @@ -354,7 +339,6 @@ const char *otThreadGetVendorSwVersion(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The vendor app URL string. - * */ const char *otThreadGetVendorAppUrl(otInstance *aInstance); @@ -371,7 +355,6 @@ const char *otThreadGetVendorAppUrl(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the vendor name. * @retval OT_ERROR_INVALID_ARGS @p aVendorName is not valid (too long or not UTF8). - * */ otError otThreadSetVendorName(otInstance *aInstance, const char *aVendorName); @@ -388,7 +371,6 @@ otError otThreadSetVendorName(otInstance *aInstance, const char *aVendorName); * * @retval OT_ERROR_NONE Successfully set the vendor model. * @retval OT_ERROR_INVALID_ARGS @p aVendorModel is not valid (too long or not UTF8). - * */ otError otThreadSetVendorModel(otInstance *aInstance, const char *aVendorModel); @@ -405,7 +387,6 @@ otError otThreadSetVendorModel(otInstance *aInstance, const char *aVendorModel); * * @retval OT_ERROR_NONE Successfully set the vendor software version. * @retval OT_ERROR_INVALID_ARGS @p aVendorSwVersion is not valid (too long or not UTF8). - * */ otError otThreadSetVendorSwVersion(otInstance *aInstance, const char *aVendorSwVersion); @@ -422,13 +403,11 @@ otError otThreadSetVendorSwVersion(otInstance *aInstance, const char *aVendorSwV * * @retval OT_ERROR_NONE Successfully set the vendor app URL string. * @retval OT_ERROR_INVALID_ARGS @p aVendorAppUrl is not valid (too long or not UTF8). - * */ otError otThreadSetVendorAppUrl(otInstance *aInstance, const char *aVendorAppUrl); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/network_time.h b/include/openthread/network_time.h index 7d5d153c5c6..f391f053f0b 100644 --- a/include/openthread/network_time.h +++ b/include/openthread/network_time.h @@ -49,12 +49,10 @@ extern "C" { * This module includes functions that control network time synchronization service. * * @{ - * */ /** * Represents OpenThread time synchronization status. - * */ typedef enum otNetworkTimeStatus { @@ -65,13 +63,11 @@ typedef enum otNetworkTimeStatus /** * Pointer is called when a network time sync or status change occurs. - * */ typedef void (*otNetworkTimeSyncCallbackFn)(void *aCallbackContext); /** * zero is considered as invalid time synchronization sequence. - * */ #define OT_TIME_SYNC_INVALID_SEQ 0 @@ -82,7 +78,6 @@ typedef void (*otNetworkTimeSyncCallbackFn)(void *aCallbackContext); * @param[in,out] aNetworkTime The Thread network time in microseconds. * * @returns The time synchronization status. - * */ otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTime); @@ -96,7 +91,6 @@ otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTi * * @retval OT_ERROR_NONE Successfully set the time sync period. * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. - * */ otError otNetworkTimeSetSyncPeriod(otInstance *aInstance, uint16_t aTimeSyncPeriod); @@ -106,7 +100,6 @@ otError otNetworkTimeSetSyncPeriod(otInstance *aInstance, uint16_t aTimeSyncPeri * @param[in] aInstance The OpenThread instance structure. * * @returns The time synchronization period. - * */ uint16_t otNetworkTimeGetSyncPeriod(otInstance *aInstance); @@ -120,7 +113,6 @@ uint16_t otNetworkTimeGetSyncPeriod(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the time sync period. * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. - * */ otError otNetworkTimeSetXtalThreshold(otInstance *aInstance, uint16_t aXTALThreshold); @@ -130,7 +122,6 @@ otError otNetworkTimeSetXtalThreshold(otInstance *aInstance, uint16_t aXTALThres * @param[in] aInstance The OpenThread instance structure. * * @returns The XTAL accuracy threshold for Router, in PPM. - * */ uint16_t otNetworkTimeGetXtalThreshold(otInstance *aInstance); @@ -143,7 +134,6 @@ uint16_t otNetworkTimeGetXtalThreshold(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * @param[in] aCallbackFn The callback function to be called * @param[in] aCallbackContext The context to be passed to the callback function upon invocation - * */ void otNetworkTimeSyncSetCallback(otInstance *aInstance, otNetworkTimeSyncCallbackFn aCallbackFn, @@ -151,7 +141,6 @@ void otNetworkTimeSyncSetCallback(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/ping_sender.h b/include/openthread/ping_sender.h index 28b5f9a6c4f..0b7c22bf26f 100644 --- a/include/openthread/ping_sender.h +++ b/include/openthread/ping_sender.h @@ -52,12 +52,10 @@ extern "C" { * This file includes the OpenThread API for the ping sender module. * * @{ - * */ /** * Represents a ping reply. - * */ typedef struct otPingSenderReply { @@ -70,7 +68,6 @@ typedef struct otPingSenderReply /** * Represents statistics of a ping request. - * */ typedef struct otPingSenderStatistics { @@ -87,7 +84,6 @@ typedef struct otPingSenderStatistics * * @param[in] aReply A pointer to a `otPingSenderReply` containing info about the received ping reply. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otPingSenderReplyCallback)(const otPingSenderReply *aReply, void *aContext); @@ -97,13 +93,11 @@ typedef void (*otPingSenderReplyCallback)(const otPingSenderReply *aReply, void * @param[in] aStatistics A pointer to a `otPingSenderStatistics` containing info about the received ping * statistics. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otPingSenderStatisticsCallback)(const otPingSenderStatistics *aStatistics, void *aContext); /** * Represents a ping request configuration. - * */ typedef struct otPingSenderConfig { @@ -133,7 +127,6 @@ typedef struct otPingSenderConfig * @retval OT_ERROR_BUSY Could not start since busy with a previous ongoing ping request. * @retval OT_ERROR_INVALID_ARGS The @p aConfig contains invalid parameters (e.g., ping interval is too long). - * */ otError otPingSenderPing(otInstance *aInstance, const otPingSenderConfig *aConfig); @@ -141,13 +134,11 @@ otError otPingSenderPing(otInstance *aInstance, const otPingSenderConfig *aConfi * Stops an ongoing ping. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otPingSenderStop(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/alarm-micro.h b/include/openthread/platform/alarm-micro.h index 9bbe05d19a6..9f6c8790fe3 100644 --- a/include/openthread/platform/alarm-micro.h +++ b/include/openthread/platform/alarm-micro.h @@ -47,7 +47,6 @@ extern "C" { * @addtogroup plat-alarm * * @{ - * */ /** @@ -59,7 +58,6 @@ extern "C" { * @param[in] aInstance The OpenThread instance structure. * @param[in] aT0 The reference time. * @param[in] aDt The time delay in microseconds from @p aT0. - * */ void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt); @@ -67,7 +65,6 @@ void otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt); * Stop the alarm. * * @param[in] aInstance The OpenThread instance structure. - * */ void otPlatAlarmMicroStop(otInstance *aInstance); @@ -78,7 +75,6 @@ void otPlatAlarmMicroStop(otInstance *aInstance); * entire range [0, 2^32-1] and MUST NOT wrap before 2^32. * * @returns The current time in microseconds. - * */ uint32_t otPlatAlarmMicroGetNow(void); @@ -91,7 +87,6 @@ extern void otPlatAlarmMicroFired(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/alarm-milli.h b/include/openthread/platform/alarm-milli.h index 48fb08cf26f..e826e15e0ce 100644 --- a/include/openthread/platform/alarm-milli.h +++ b/include/openthread/platform/alarm-milli.h @@ -50,7 +50,6 @@ extern "C" { * This module includes the platform abstraction for the alarm service. * * @{ - * */ /** @@ -98,7 +97,6 @@ extern void otPlatDiagAlarmFired(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/ble.h b/include/openthread/platform/ble.h index 40b06dc68dd..3babae67928 100644 --- a/include/openthread/platform/ble.h +++ b/include/openthread/platform/ble.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines a OpenThread BLE GATT peripheral interface driver. - * */ #ifndef OPENTHREAD_PLATFORM_BLE_H_ @@ -53,47 +52,40 @@ extern "C" { * The platform needs to implement Bluetooth LE 4.2 or higher. * * @{ - * */ /** * Time slot duration on PHY layer in microseconds (0.625ms). - * */ #define OT_BLE_TIMESLOT_UNIT 625 /** * Minimum allowed interval for advertising packet in OT_BLE_ADV_INTERVAL_UNIT units (20ms). - * */ #define OT_BLE_ADV_INTERVAL_MIN 0x0020 /** * Maximum allowed interval for advertising packet in OT_BLE_ADV_INTERVAL_UNIT units (10.24s). - * */ #define OT_BLE_ADV_INTERVAL_MAX 0x4000 /** * Default interval for advertising packet (ms). - * */ #define OT_BLE_ADV_INTERVAL_DEFAULT 100 /** * Unit used to calculate interval duration (0.625ms). - * */ #define OT_BLE_ADV_INTERVAL_UNIT OT_BLE_TIMESLOT_UNIT /** * Maximum allowed ATT MTU size (must be >= 23). - * */ #define OT_BLE_ATT_MTU_MAX 67 @@ -112,7 +104,6 @@ extern "C" { /** * Represent BLE link capabilities - * */ typedef struct otBleLinkCapabilities { @@ -123,7 +114,6 @@ typedef struct otBleLinkCapabilities /** * Represents a BLE packet. - * */ typedef struct otBleRadioPacket { @@ -161,7 +151,6 @@ otError otPlatBleEnable(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully transitioned to disabled. * @retval OT_ERROR_FAILED The BLE radio could not be disabled. - * */ otError otPlatBleDisable(otInstance *aInstance); @@ -181,7 +170,6 @@ otError otPlatBleDisable(otInstance *aInstance); * * @retval OT_ERROR_NONE Advertising procedure has been started. * @retval OT_ERROR_NO_BUFS No bufferspace available. - * */ otError otPlatBleGetAdvertisementBuffer(otInstance *aInstance, uint8_t **aAdvertisementBuffer); @@ -197,7 +185,6 @@ otError otPlatBleGetAdvertisementBuffer(otInstance *aInstance, uint8_t **aAdvert * @retval OT_ERROR_NONE Advertising procedure has been started. * @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state. * @retval OT_ERROR_INVALID_ARGS Invalid value has been supplied. - * */ otError otPlatBleGapAdvSetData(otInstance *aInstance, uint8_t *aAdvertisementData, uint16_t aAdvertisementLen); @@ -220,7 +207,6 @@ otError otPlatBleGapAdvSetData(otInstance *aInstance, uint8_t *aAdvertisementDat * @retval OT_ERROR_NONE Advertising procedure has been started. * @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state. * @retval OT_ERROR_INVALID_ARGS Invalid interval value has been supplied. - * */ otError otPlatBleGapAdvStart(otInstance *aInstance, uint16_t aInterval); @@ -233,7 +219,6 @@ otError otPlatBleGapAdvStart(otInstance *aInstance, uint16_t aInterval); * * @retval OT_ERROR_NONE Advertising procedure has been stopped. * @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state. - * */ otError otPlatBleGapAdvStop(otInstance *aInstance); @@ -243,7 +228,6 @@ otError otPlatBleGapAdvStop(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aConnectionId The identifier of the open connection. - * */ extern void otPlatBleGapOnConnected(otInstance *aInstance, uint16_t aConnectionId); @@ -253,7 +237,6 @@ extern void otPlatBleGapOnConnected(otInstance *aInstance, uint16_t aConnectionI * * @param[in] aInstance The OpenThread instance structure. * @param[in] aConnectionId The identifier of the closed connection. - * */ extern void otPlatBleGapOnDisconnected(otInstance *aInstance, uint16_t aConnectionId); @@ -267,7 +250,6 @@ extern void otPlatBleGapOnDisconnected(otInstance *aInstance, uint16_t aConnecti * * @retval OT_ERROR_NONE Disconnection procedure has been started. * @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state. - * */ otError otPlatBleGapDisconnect(otInstance *aInstance); @@ -283,7 +265,6 @@ otError otPlatBleGapDisconnect(otInstance *aInstance); * * @retval OT_ERROR_NONE ATT_MTU value has been placed in @p aMtu. * @retval OT_ERROR_FAILED BLE Device cannot determine its ATT_MTU. - * */ otError otPlatBleGattMtuGet(otInstance *aInstance, uint16_t *aMtu); @@ -292,7 +273,6 @@ otError otPlatBleGattMtuGet(otInstance *aInstance, uint16_t *aMtu); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aMtu The updated ATT_MTU value. - * */ extern void otPlatBleGattOnMtuUpdate(otInstance *aInstance, uint16_t aMtu); @@ -313,7 +293,6 @@ extern void otPlatBleGattOnMtuUpdate(otInstance *aInstance, uint16_t aMtu); * @retval OT_ERROR_INVALID_STATE BLE Device is in invalid state. * @retval OT_ERROR_INVALID_ARGS Invalid handle value, data or data length has been supplied. * @retval OT_ERROR_NO_BUFS No available internal buffer found. - * */ otError otPlatBleGattServerIndicate(otInstance *aInstance, uint16_t aHandle, const otBleRadioPacket *aPacket); @@ -326,7 +305,6 @@ otError otPlatBleGattServerIndicate(otInstance *aInstance, uint16_t aHandle, con * @param[in] aInstance The OpenThread instance structure. * @param[in] aHandle The handle of the attribute to be written. * @param[in] aPacket A pointer to the packet contains value to be written to the attribute. - * */ extern void otPlatBleGattServerOnWriteRequest(otInstance *aInstance, uint16_t aHandle, const otBleRadioPacket *aPacket); @@ -335,7 +313,6 @@ extern void otPlatBleGattServerOnWriteRequest(otInstance *aInstance, uint16_t aH * * @param[in] aInstance The OpenThread instance structure. * @param[out] aBleLinkCapabilities The pointer to retrieve the BLE ling capabilities. - * */ void otPlatBleGetLinkCapabilities(otInstance *aInstance, otBleLinkCapabilities *aBleLinkCapabilities); @@ -343,12 +320,10 @@ void otPlatBleGetLinkCapabilities(otInstance *aInstance, otBleLinkCapabilities * * Function to retrieve from platform multiradio support of BLE and IEEE. * * @param[in] aInstance The OpenThread instance structure. - * */ bool otPlatBleSupportsMultiRadio(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/border_routing.h b/include/openthread/platform/border_routing.h index aed4bdb1b28..dc11d12e9cf 100644 --- a/include/openthread/platform/border_routing.h +++ b/include/openthread/platform/border_routing.h @@ -61,7 +61,6 @@ extern "C" { * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMessage A pointer to an ICMPv6 RouterAdvertisement message. * @param[in] aLength The length of ICMPv6 RouterAdvertisement message. - * */ extern void otPlatBorderRoutingProcessIcmp6Ra(otInstance *aInstance, const uint8_t *aMessage, uint16_t aLength); @@ -79,7 +78,6 @@ extern void otPlatBorderRoutingProcessIcmp6Ra(otInstance *aInstance, const uint8 * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPrefixInfo A pointer to the prefix information structure - * */ extern void otPlatBorderRoutingProcessDhcp6PdPrefix(otInstance *aInstance, const otBorderRoutingPrefixTableEntry *aPrefixInfo); diff --git a/include/openthread/platform/crypto.h b/include/openthread/platform/crypto.h index fe3c0ead536..c5997ee6f71 100644 --- a/include/openthread/platform/crypto.h +++ b/include/openthread/platform/crypto.h @@ -51,12 +51,10 @@ extern "C" { * This module includes the platform abstraction for Crypto. * * @{ - * */ /** * Defines the key types. - * */ typedef enum { @@ -68,7 +66,6 @@ typedef enum /** * Defines the key algorithms. - * */ typedef enum { @@ -80,7 +77,6 @@ typedef enum /** * Defines the key usage flags. - * */ enum { @@ -94,7 +90,6 @@ enum /** * Defines the key storage types. - * */ typedef enum { @@ -104,7 +99,6 @@ typedef enum /** * This datatype represents the key reference. - * */ typedef uint32_t otCryptoKeyRef; @@ -112,7 +106,6 @@ typedef uint32_t otCryptoKeyRef; * @struct otCryptoKey * * Represents the Key Material required for Crypto operations. - * */ typedef struct otCryptoKey { @@ -125,7 +118,6 @@ typedef struct otCryptoKey * @struct otCryptoContext * * Stores the context object for platform APIs. - * */ typedef struct otCryptoContext { @@ -135,7 +127,6 @@ typedef struct otCryptoContext /** * Length of SHA256 hash (in bytes). - * */ #define OT_CRYPTO_SHA256_HASH_SIZE 32 @@ -143,7 +134,6 @@ typedef struct otCryptoContext * @struct otPlatCryptoSha256Hash * * Represents a SHA-256 hash. - * */ OT_TOOL_PACKED_BEGIN struct otPlatCryptoSha256Hash @@ -153,13 +143,11 @@ struct otPlatCryptoSha256Hash /** * Represents a SHA-256 hash. - * */ typedef struct otPlatCryptoSha256Hash otPlatCryptoSha256Hash; /** * Max buffer size (in bytes) for representing the EDCSA key-pair in DER format. - * */ #define OT_CRYPTO_ECDSA_MAX_DER_SIZE 125 @@ -169,7 +157,6 @@ typedef struct otPlatCryptoSha256Hash otPlatCryptoSha256Hash; * Represents an ECDSA key pair (public and private keys). * * The key pair is stored using Distinguished Encoding Rules (DER) format (per RFC 5915). - * */ typedef struct otPlatCryptoEcdsaKeyPair { @@ -179,7 +166,6 @@ typedef struct otPlatCryptoEcdsaKeyPair /** * Buffer size (in bytes) for representing the EDCSA public key. - * */ #define OT_CRYPTO_ECDSA_PUBLIC_KEY_SIZE 64 @@ -189,7 +175,6 @@ typedef struct otPlatCryptoEcdsaKeyPair * Represents a ECDSA public key. * * The public key is stored as a byte sequence representation of an uncompressed curve point (RFC 6605 - sec 4). - * */ OT_TOOL_PACKED_BEGIN struct otPlatCryptoEcdsaPublicKey @@ -201,7 +186,6 @@ typedef struct otPlatCryptoEcdsaPublicKey otPlatCryptoEcdsaPublicKey; /** * Buffer size (in bytes) for representing the EDCSA signature. - * */ #define OT_CRYPTO_ECDSA_SIGNATURE_SIZE 64 @@ -212,7 +196,6 @@ typedef struct otPlatCryptoEcdsaPublicKey otPlatCryptoEcdsaPublicKey; * * The signature is encoded as the concatenated binary representation of two MPIs `r` and `s` which are calculated * during signing (RFC 6605 - section 4). - * */ OT_TOOL_PACKED_BEGIN struct otPlatCryptoEcdsaSignature @@ -224,13 +207,11 @@ typedef struct otPlatCryptoEcdsaSignature otPlatCryptoEcdsaSignature; /** * Max PBKDF2 SALT length: salt prefix (6) + extended panid (8) + network name (16) - * */ #define OT_CRYPTO_PBDKF2_MAX_SALT_SIZE 30 /** * Initialize the Crypto module. - * */ void otPlatCryptoInit(void); @@ -256,7 +237,6 @@ void otPlatCryptoInit(void); * value does not matter and platform API MUST update it to return the new key ref. * * This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ otError otPlatCryptoImportKey(otCryptoKeyRef *aKeyRef, otCryptoKeyType aKeyType, @@ -279,7 +259,6 @@ otError otPlatCryptoImportKey(otCryptoKeyRef *aKeyRef, * @retval OT_ERROR_INVALID_ARGS @p aBuffer was NULL * * @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ otError otPlatCryptoExportKey(otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t aBufferLen, size_t *aKeyLen); @@ -292,7 +271,6 @@ otError otPlatCryptoExportKey(otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t a * @retval OT_ERROR_FAILED Failed to destroy the key. * * @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ otError otPlatCryptoDestroyKey(otCryptoKeyRef aKeyRef); @@ -305,7 +283,6 @@ otError otPlatCryptoDestroyKey(otCryptoKeyRef aKeyRef); * @retval FALSE There is no associated key with @p aKeyRef. * * @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ bool otPlatCryptoHasKey(otCryptoKeyRef aKeyRef); @@ -320,7 +297,6 @@ bool otPlatCryptoHasKey(otCryptoKeyRef aKeyRef); * * @note The platform driver shall point the context to the correct object such as psa_mac_operation_t or * mbedtls_md_context_t. - * */ otError otPlatCryptoHmacSha256Init(otCryptoContext *aContext); @@ -332,7 +308,6 @@ otError otPlatCryptoHmacSha256Init(otCryptoContext *aContext); * @retval OT_ERROR_NONE Successfully uninitialized HMAC operation. * @retval OT_ERROR_FAILED Failed to uninitialized HMAC operation. * @retval OT_ERROR_INVALID_ARGS @p aContext was NULL - * */ otError otPlatCryptoHmacSha256Deinit(otCryptoContext *aContext); @@ -345,7 +320,6 @@ otError otPlatCryptoHmacSha256Deinit(otCryptoContext *aContext); * @retval OT_ERROR_NONE Successfully started HMAC operation. * @retval OT_ERROR_FAILED Failed to start HMAC operation. * @retval OT_ERROR_INVALID_ARGS @p aContext or @p aKey was NULL - * */ otError otPlatCryptoHmacSha256Start(otCryptoContext *aContext, const otCryptoKey *aKey); @@ -359,7 +333,6 @@ otError otPlatCryptoHmacSha256Start(otCryptoContext *aContext, const otCryptoKey * @retval OT_ERROR_NONE Successfully updated HMAC with new input operation. * @retval OT_ERROR_FAILED Failed to update HMAC operation. * @retval OT_ERROR_INVALID_ARGS @p aContext or @p aBuf was NULL - * */ otError otPlatCryptoHmacSha256Update(otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength); @@ -373,7 +346,6 @@ otError otPlatCryptoHmacSha256Update(otCryptoContext *aContext, const void *aBuf * @retval OT_ERROR_NONE Successfully completed HMAC operation. * @retval OT_ERROR_FAILED Failed to complete HMAC operation. * @retval OT_ERROR_INVALID_ARGS @p aContext or @p aBuf was NULL - * */ otError otPlatCryptoHmacSha256Finish(otCryptoContext *aContext, uint8_t *aBuf, size_t aBufLength); @@ -389,7 +361,6 @@ otError otPlatCryptoHmacSha256Finish(otCryptoContext *aContext, uint8_t *aBuf, s * * @note The platform driver shall point the context to the correct object such as psa_key_id * or mbedtls_aes_context_t. - * */ otError otPlatCryptoAesInit(otCryptoContext *aContext); @@ -402,7 +373,6 @@ otError otPlatCryptoAesInit(otCryptoContext *aContext); * @retval OT_ERROR_NONE Successfully set the key for AES operation. * @retval OT_ERROR_FAILED Failed to set the key for AES operation. * @retval OT_ERROR_INVALID_ARGS @p aContext or @p aKey was NULL - * */ otError otPlatCryptoAesSetKey(otCryptoContext *aContext, const otCryptoKey *aKey); @@ -416,7 +386,6 @@ otError otPlatCryptoAesSetKey(otCryptoContext *aContext, const otCryptoKey *aKey * @retval OT_ERROR_NONE Successfully encrypted @p aInput. * @retval OT_ERROR_FAILED Failed to encrypt @p aInput. * @retval OT_ERROR_INVALID_ARGS @p aContext or @p aKey or @p aOutput were NULL - * */ otError otPlatCryptoAesEncrypt(otCryptoContext *aContext, const uint8_t *aInput, uint8_t *aOutput); @@ -428,7 +397,6 @@ otError otPlatCryptoAesEncrypt(otCryptoContext *aContext, const uint8_t *aInput, * @retval OT_ERROR_NONE Successfully freed AES context. * @retval OT_ERROR_FAILED Failed to free AES context. * @retval OT_ERROR_INVALID_ARGS @p aContext was NULL - * */ otError otPlatCryptoAesFree(otCryptoContext *aContext); @@ -443,7 +411,6 @@ otError otPlatCryptoAesFree(otCryptoContext *aContext); * * @note The platform driver shall point the context to the correct object such as psa_key_derivation_operation_t * or HmacSha256::Hash - * */ otError otPlatCryptoHkdfInit(otCryptoContext *aContext); @@ -459,7 +426,6 @@ otError otPlatCryptoHkdfInit(otCryptoContext *aContext); * @retval OT_ERROR_NONE HKDF Expand was successful. * @retval OT_ERROR_FAILED HKDF Expand failed. * @retval OT_ERROR_INVALID_ARGS @p aContext was NULL - * */ otError otPlatCryptoHkdfExpand(otCryptoContext *aContext, const uint8_t *aInfo, @@ -477,7 +443,6 @@ otError otPlatCryptoHkdfExpand(otCryptoContext *aContext, * * @retval OT_ERROR_NONE HKDF Extract was successful. * @retval OT_ERROR_FAILED HKDF Extract failed. - * */ otError otPlatCryptoHkdfExtract(otCryptoContext *aContext, const uint8_t *aSalt, @@ -492,7 +457,6 @@ otError otPlatCryptoHkdfExtract(otCryptoContext *aContext, * @retval OT_ERROR_NONE Successfully un-initialised HKDF operation. * @retval OT_ERROR_FAILED Failed to un-initialised HKDF operation. * @retval OT_ERROR_INVALID_ARGS @p aContext was NULL - * */ otError otPlatCryptoHkdfDeinit(otCryptoContext *aContext); @@ -519,7 +483,6 @@ otError otPlatCryptoSha256Init(otCryptoContext *aContext); * @retval OT_ERROR_NONE Successfully un-initialised SHA-256 operation. * @retval OT_ERROR_FAILED Failed to un-initialised SHA-256 operation. * @retval OT_ERROR_INVALID_ARGS @p aContext was NULL - * */ otError otPlatCryptoSha256Deinit(otCryptoContext *aContext); @@ -531,7 +494,6 @@ otError otPlatCryptoSha256Deinit(otCryptoContext *aContext); * @retval OT_ERROR_NONE Successfully started SHA-256 operation. * @retval OT_ERROR_FAILED Failed to start SHA-256 operation. * @retval OT_ERROR_INVALID_ARGS @p aContext was NULL - * */ otError otPlatCryptoSha256Start(otCryptoContext *aContext); @@ -545,7 +507,6 @@ otError otPlatCryptoSha256Start(otCryptoContext *aContext); * @retval OT_ERROR_NONE Successfully updated SHA-256 with new input operation. * @retval OT_ERROR_FAILED Failed to update SHA-256 operation. * @retval OT_ERROR_INVALID_ARGS @p aContext or @p aBuf was NULL - * */ otError otPlatCryptoSha256Update(otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength); @@ -559,19 +520,16 @@ otError otPlatCryptoSha256Update(otCryptoContext *aContext, const void *aBuf, ui * @retval OT_ERROR_NONE Successfully completed the SHA-256 operation. * @retval OT_ERROR_FAILED Failed to complete SHA-256 operation. * @retval OT_ERROR_INVALID_ARGS @p aContext or @p aHash was NULL - * */ otError otPlatCryptoSha256Finish(otCryptoContext *aContext, uint8_t *aHash, uint16_t aHashSize); /** * Initialize cryptographically-secure pseudorandom number generator (CSPRNG). - * */ void otPlatCryptoRandomInit(void); /** * Deinitialize cryptographically-secure pseudorandom number generator (CSPRNG). - * */ void otPlatCryptoRandomDeinit(void); @@ -583,7 +541,6 @@ void otPlatCryptoRandomDeinit(void); * * @retval OT_ERROR_NONE Successfully filled buffer with random values. * @retval OT_ERROR_FAILED Operation failed. - * */ otError otPlatCryptoRandomGet(uint8_t *aBuffer, uint16_t aSize); @@ -596,7 +553,6 @@ otError otPlatCryptoRandomGet(uint8_t *aBuffer, uint16_t aSize); * @retval OT_ERROR_NO_BUFS Failed to allocate buffer for key generation. * @retval OT_ERROR_NOT_CAPABLE Feature not supported. * @retval OT_ERROR_FAILED Failed to generate key-pair. - * */ otError otPlatCryptoEcdsaGenerateKey(otPlatCryptoEcdsaKeyPair *aKeyPair); @@ -609,7 +565,6 @@ otError otPlatCryptoEcdsaGenerateKey(otPlatCryptoEcdsaKeyPair *aKeyPair); * @retval OT_ERROR_NONE Public key was retrieved successfully, and @p aBuffer is updated. * @retval OT_ERROR_PARSE The key-pair DER format could not be parsed (invalid format). * @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL. - * */ otError otPlatCryptoEcdsaGetPublicKey(const otPlatCryptoEcdsaKeyPair *aKeyPair, otPlatCryptoEcdsaPublicKey *aPublicKey); @@ -627,7 +582,6 @@ otError otPlatCryptoEcdsaGetPublicKey(const otPlatCryptoEcdsaKeyPair *aKeyPair, * @retval OT_ERROR_PARSE The key-pair DER format could not be parsed (invalid format). * @retval OT_ERROR_NO_BUFS Failed to allocate buffer for signature calculation. * @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL. - * */ otError otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair, const otPlatCryptoSha256Hash *aHash, @@ -647,7 +601,6 @@ otError otPlatCryptoEcdsaSign(const otPlatCryptoEcdsaKeyPair *aKeyPair, * @retval OT_ERROR_SECURITY The signature is invalid. * @retval OT_ERROR_INVALID_ARGS The key or hash is invalid. * @retval OT_ERROR_NO_BUFS Failed to allocate buffer for signature verification. - * */ otError otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey, const otPlatCryptoSha256Hash *aHash, @@ -669,7 +622,6 @@ otError otPlatCryptoEcdsaVerify(const otPlatCryptoEcdsaPublicKey *aPublicKey, * @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL. * * @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ otError otPlatCryptoEcdsaSignUsingKeyRef(otCryptoKeyRef aKeyRef, const otPlatCryptoSha256Hash *aHash, @@ -692,7 +644,6 @@ otError otPlatCryptoEcdsaSignUsingKeyRef(otCryptoKeyRef aKeyRef, * @retval OT_ERROR_INVALID_ARGS The @p aContext is NULL. * * @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ otError otPlatCryptoEcdsaExportPublicKey(otCryptoKeyRef aKeyRef, otPlatCryptoEcdsaPublicKey *aPublicKey); @@ -707,7 +658,6 @@ otError otPlatCryptoEcdsaExportPublicKey(otCryptoKeyRef aKeyRef, otPlatCryptoEcd * @retval OT_ERROR_FAILED Failed to generate key-pair. * * @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ otError otPlatCryptoEcdsaGenerateAndImportKey(otCryptoKeyRef aKeyRef); @@ -726,7 +676,6 @@ otError otPlatCryptoEcdsaGenerateAndImportKey(otCryptoKeyRef aKeyRef); * @retval OT_ERROR_NO_BUFS Failed to allocate buffer for signature verification. * * @note This API is only used by OT core when `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled. - * */ otError otPlatCryptoEcdsaVerifyUsingKeyRef(otCryptoKeyRef aKeyRef, const otPlatCryptoSha256Hash *aHash, @@ -758,7 +707,6 @@ otError otPlatCryptoPbkdf2GenerateKey(const uint8_t *aPassword, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/debug_uart.h b/include/openthread/platform/debug_uart.h index a2643d68e38..ddd31461d9e 100644 --- a/include/openthread/platform/debug_uart.h +++ b/include/openthread/platform/debug_uart.h @@ -128,7 +128,6 @@ int otPlatDebugUart_kbhit(void); * * @retval (negative) no data available, see otPlatDebugUart_kbhit() * @retval (0x00..0x0ff) data byte value - * */ int otPlatDebugUart_getc(void); @@ -179,13 +178,11 @@ void otPlatDebugUart_puts_no_nl(const char *s); * @returns OT_ERROR_FAILED * * Platforms that desire this MUST provide an implementation. - * */ otError otPlatDebugUart_logfile(const char *filename); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/diag.h b/include/openthread/platform/diag.h index 888ef448c14..da8a0d47ded 100644 --- a/include/openthread/platform/diag.h +++ b/include/openthread/platform/diag.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines the platform diag interface. - * */ #ifndef OPENTHREAD_PLATFORM_DIAG_H_ @@ -53,12 +52,10 @@ extern "C" { * This module includes the platform abstraction for diagnostics features. * * @{ - * */ /** * Defines the gpio modes. - * */ typedef enum { @@ -72,7 +69,6 @@ typedef enum * @param[in] aFormat The format string. * @param[in] aArguments The format string arguments. * @param[out] aContext A pointer to the user context. - * */ typedef void (*otPlatDiagOutputCallback)(const char *aFormat, va_list aArguments, void *aContext); @@ -82,7 +78,6 @@ typedef void (*otPlatDiagOutputCallback)(const char *aFormat, va_list aArguments * @param[in] aInstance The OpenThread instance structure. * @param[in] aCallback A pointer to a function that is called on outputting diag messages. * @param[in] aContext A pointer to the user context. - * */ void otPlatDiagSetOutputCallback(otInstance *aInstance, otPlatDiagOutputCallback aCallback, void *aContext); @@ -96,7 +91,6 @@ void otPlatDiagSetOutputCallback(otInstance *aInstance, otPlatDiagOutputCallback * @retval OT_ERROR_INVALID_ARGS The command is supported but invalid arguments provided. * @retval OT_ERROR_NONE The command is successfully process. * @retval OT_ERROR_INVALID_COMMAND The command is not valid or not supported. - * */ otError otPlatDiagProcess(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[]); @@ -104,7 +98,6 @@ otError otPlatDiagProcess(otInstance *aInstance, uint8_t aArgsLength, char *aArg * Enables/disables the factory diagnostics mode. * * @param[in] aMode TRUE to enable diagnostics mode, FALSE otherwise. - * */ void otPlatDiagModeSet(bool aMode); @@ -112,7 +105,6 @@ void otPlatDiagModeSet(bool aMode); * Indicates whether or not factory diagnostics mode is enabled. * * @returns TRUE if factory diagnostics mode is enabled, FALSE otherwise. - * */ bool otPlatDiagModeGet(void); @@ -120,7 +112,6 @@ bool otPlatDiagModeGet(void); * Sets the channel to use for factory diagnostics. * * @param[in] aChannel The channel value. - * */ void otPlatDiagChannelSet(uint8_t aChannel); @@ -128,7 +119,6 @@ void otPlatDiagChannelSet(uint8_t aChannel); * Sets the transmit power to use for factory diagnostics. * * @param[in] aTxPower The transmit power value. - * */ void otPlatDiagTxPowerSet(int8_t aTxPower); @@ -138,7 +128,6 @@ void otPlatDiagTxPowerSet(int8_t aTxPower); * @param[in] aInstance The OpenThread instance for current request. * @param[in] aFrame The received radio frame. * @param[in] aError The received radio frame status. - * */ void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError); @@ -146,7 +135,6 @@ void otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otErro * Processes the alarm event. * * @param[in] aInstance The OpenThread instance for current request. - * */ void otPlatDiagAlarmCallback(otInstance *aInstance); @@ -161,7 +149,6 @@ void otPlatDiagAlarmCallback(otInstance *aInstance); * @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported. * @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled or @p aGpio is not configured as output. * @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform. - * */ otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue); @@ -176,7 +163,6 @@ otError otPlatDiagGpioSet(uint32_t aGpio, bool aValue); * @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported or @p aValue is NULL. * @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled or @p aGpio is not configured as input. * @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform. - * */ otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue); @@ -191,7 +177,6 @@ otError otPlatDiagGpioGet(uint32_t aGpio, bool *aValue); * @retval OT_ERROR_INVALID_ARGS @p aGpio or @p aMode is not supported. * @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled. * @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform. - * */ otError otPlatDiagGpioSetMode(uint32_t aGpio, otGpioMode aMode); @@ -207,7 +192,6 @@ otError otPlatDiagGpioSetMode(uint32_t aGpio, otGpioMode aMode); * @retval OT_ERROR_INVALID_ARGS @p aGpio is not supported or @p aMode is NULL. * @retval OT_ERROR_INVALID_STATE Diagnostic mode was not enabled. * @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented or configured on the platform. - * */ otError otPlatDiagGpioGetMode(uint32_t aGpio, otGpioMode *aMode); @@ -221,7 +205,6 @@ otError otPlatDiagGpioGetMode(uint32_t aGpio, otGpioMode *aMode); * @retval OT_ERROR_NONE Successfully set the raw power setting. * @retval OT_ERROR_INVALID_ARGS The @p aRawPowerSetting is NULL or the @p aRawPowerSettingLength is too long. * @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented. - * */ otError otPlatDiagRadioSetRawPowerSetting(otInstance *aInstance, const uint8_t *aRawPowerSetting, @@ -240,7 +223,6 @@ otError otPlatDiagRadioSetRawPowerSetting(otInstance *aInstance, * @aRawPowerSettingLength is too short. * @retval OT_ERROR_NOT_FOUND The raw power setting is not set. * @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented. - * */ otError otPlatDiagRadioGetRawPowerSetting(otInstance *aInstance, uint8_t *aRawPowerSetting, @@ -254,7 +236,6 @@ otError otPlatDiagRadioGetRawPowerSetting(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully enabled/disabled the raw power setting. * @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented. - * */ otError otPlatDiagRadioRawPowerSettingEnable(otInstance *aInstance, bool aEnable); @@ -267,7 +248,6 @@ otError otPlatDiagRadioRawPowerSettingEnable(otInstance *aInstance, bool aEnable * @retval OT_ERROR_NONE Successfully enabled/disabled . * @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state. * @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented. - * */ otError otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable); @@ -280,7 +260,6 @@ otError otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable); * @retval OT_ERROR_NONE Successfully enabled/disabled. * @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state. * @retval OT_ERROR_NOT_IMPLEMENTED This function is not implemented. - * */ otError otPlatDiagRadioTransmitStream(otInstance *aInstance, bool aEnable); @@ -300,7 +279,6 @@ otError otPlatDiagRadioTransmitStream(otInstance *aInstance, bool aEnable); * @p aRawPowerSettingLength is NULL or @aRawPowerSettingLength is too short. * @retval OT_ERROR_NOT_FOUND The power settings for the @p aChannel was not found. * @retval OT_ERROR_NOT_IMPLEMENTED This method is not implemented. - * */ otError otPlatDiagRadioGetPowerSettings(otInstance *aInstance, uint8_t aChannel, @@ -311,7 +289,6 @@ otError otPlatDiagRadioGetPowerSettings(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/dns.h b/include/openthread/platform/dns.h index 9e84fbe43f3..326fded122a 100644 --- a/include/openthread/platform/dns.h +++ b/include/openthread/platform/dns.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines the platform DNS interface. - * */ #ifndef OPENTHREAD_PLATFORM_DNS_H_ @@ -50,12 +49,10 @@ extern "C" { * This module includes the platform abstraction for sending recursive DNS query to upstream DNS servers. * * @{ - * */ /** * This opaque type represents an upstream DNS query transaction. - * */ typedef struct otPlatDnsUpstreamQuery otPlatDnsUpstreamQuery; @@ -71,7 +68,6 @@ typedef struct otPlatDnsUpstreamQuery otPlatDnsUpstreamQuery; * @param[in] aInstance The OpenThread instance structure. * @param[in] aTxn A pointer to the opaque DNS query transaction object. * @param[in] aQuery A message buffer of the DNS payload that should be sent to upstream DNS server. - * */ void otPlatDnsStartUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, const otMessage *aQuery); @@ -82,7 +78,6 @@ void otPlatDnsStartUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery * * * @param[in] aInstance The OpenThread instance structure. * @param[in] aTxn A pointer to the opaque DNS query transaction object. - * */ void otPlatDnsCancelUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn); @@ -98,13 +93,11 @@ void otPlatDnsCancelUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery * @param[in] aTxn A pointer to the opaque DNS query transaction object. * @param[in] aResponse A message buffer of the DNS response payload or `nullptr` to close a transaction without a * response. - * */ extern void otPlatDnsUpstreamQueryDone(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, otMessage *aResponse); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/dnssd.h b/include/openthread/platform/dnssd.h index d951db58549..a64589bea19 100644 --- a/include/openthread/platform/dnssd.h +++ b/include/openthread/platform/dnssd.h @@ -30,7 +30,6 @@ * @file * @brief * This file includes the platform abstraction for DNS-SD (e.g., mDNS) on the infrastructure network. - * */ #ifndef OPENTHREAD_PLATFORM_DNSSD_H_ @@ -56,12 +55,10 @@ extern "C" { * @{ * * The DNS-SD platform APIs are used only when `OPENTHREAD_CONFIG_PLATFORM_DNSSD_ENABLE` is enabled. - * */ /** * Represents the state of the DNS-SD platform. - * */ typedef enum otPlatDnssdState { @@ -71,7 +68,6 @@ typedef enum otPlatDnssdState /** * Represents a request ID for registering/unregistering a service or host. - * */ typedef uint32_t otPlatDnssdRequestId; @@ -85,7 +81,6 @@ typedef uint32_t otPlatDnssdRequestId; * @param[in] aInstance The OpenThread instance. * @param[in] aRequestId The request ID. * @param[in] aError Error indicating the outcome of request. - * */ typedef void (*otPlatDnssdRegisterCallback)(otInstance *aInstance, otPlatDnssdRequestId aRequestId, otError aError); @@ -93,7 +88,6 @@ typedef void (*otPlatDnssdRegisterCallback)(otInstance *aInstance, otPlatDnssdRe * Represents a DNS-SD service. * * See `otPlatDnssdRegisterService()`, `otPlatDnssdUnregisterService()` for more details about fields in each case. - * */ typedef struct otPlatDnssdService { @@ -115,7 +109,6 @@ typedef struct otPlatDnssdService * Represents a DNS-SD host. * * See `otPlatDnssdRegisterHost()`, `otPlatDnssdUnregisterHost()` for more details about fields in each case. - * */ typedef struct otPlatDnssdHost { @@ -130,7 +123,6 @@ typedef struct otPlatDnssdHost * Represents a DNS-SD key record. * * See `otPlatDnssdRegisterKey()`, `otPlatDnssdUnregisterKey()` for more details about fields in each case. - * */ typedef struct otPlatDnssdKey { @@ -153,7 +145,6 @@ typedef struct otPlatDnssdKey * resolvers are considered to be stopped, and any previously registered host, service, key entries as removed. * * @param[in] aInstance The OpenThread instance structure. - * */ extern void otPlatDnssdStateHandleStateChange(otInstance *aInstance); @@ -166,7 +157,6 @@ extern void otPlatDnssdStateHandleStateChange(otInstance *aInstance); * @param[in] aInstance The OpenThread instance. * * @returns The current state of the DNS-SD module. - * */ otPlatDnssdState otPlatDnssdGetState(otInstance *aInstance); @@ -222,7 +212,6 @@ otPlatDnssdState otPlatDnssdGetState(otInstance *aInstance); * @param[in] aService Information about the service to register. * @param[in] aRequestId The ID associated with this request. * @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed). - * */ void otPlatDnssdRegisterService(otInstance *aInstance, const otPlatDnssdService *aService, @@ -259,7 +248,6 @@ void otPlatDnssdRegisterService(otInstance *aInstance, * @param[in] aService Information about the service to unregister. * @param[in] aRequestId The ID associated with this request. * @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed). - * */ void otPlatDnssdUnregisterService(otInstance *aInstance, const otPlatDnssdService *aService, @@ -300,7 +288,6 @@ void otPlatDnssdUnregisterService(otInstance *aInstance, * @param[in] aHost Information about the host to register. * @param[in] aRequestId The ID associated with this request. * @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed). - * */ void otPlatDnssdRegisterHost(otInstance *aInstance, const otPlatDnssdHost *aHost, @@ -338,7 +325,6 @@ void otPlatDnssdRegisterHost(otInstance *aInstance, * @param[in] aHost Information about the host to unregister. * @param[in] aRequestId The ID associated with this request. * @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed). - * */ void otPlatDnssdUnregisterHost(otInstance *aInstance, const otPlatDnssdHost *aHost, @@ -375,7 +361,6 @@ void otPlatDnssdUnregisterHost(otInstance *aInstance, * @param[in] aKey Information about the key record to register. * @param[in] aRequestId The ID associated with this request. * @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed). - * */ void otPlatDnssdRegisterKey(otInstance *aInstance, const otPlatDnssdKey *aKey, @@ -411,7 +396,6 @@ void otPlatDnssdRegisterKey(otInstance *aInstance, * @param[in] aKey Information about the key to unregister. * @param[in] aRequestId The ID associated with this request. * @param[in] aCallback The callback function pointer to report the outcome (may be NULL if no callback needed). - * */ void otPlatDnssdUnregisterKey(otInstance *aInstance, const otPlatDnssdKey *aKey, @@ -422,7 +406,6 @@ void otPlatDnssdUnregisterKey(otInstance *aInstance, /** * Represents a browse result. - * */ typedef struct otPlatDnssdBrowseResult { @@ -438,13 +421,11 @@ typedef struct otPlatDnssdBrowseResult * * @param[in] aInstance The OpenThread instance. * @param[in] aResult The browse result. - * */ typedef void (*otPlatDnssdBrowseCallback)(otInstance *aInstance, const otPlatDnssdBrowseResult *aResult); /** * Represents a service browser. - * */ typedef struct otPlatDnssdBrowser { @@ -456,7 +437,6 @@ typedef struct otPlatDnssdBrowser /** * Represents an SRV resolver result. - * */ typedef struct otPlatDnssdSrvResult { @@ -475,13 +455,11 @@ typedef struct otPlatDnssdSrvResult * * @param[in] aInstance The OpenThread instance. * @param[in] aResult The SRV resolve result. - * */ typedef void (*otPlatDnssdSrvCallback)(otInstance *aInstance, const otPlatDnssdSrvResult *aResult); /** * Represents an SRV service resolver. - * */ typedef struct otPlatDnssdSrvResolver { @@ -493,7 +471,6 @@ typedef struct otPlatDnssdSrvResolver /** * Represents a TXT resolver result. - * */ typedef struct otPlatDnssdTxtResult { @@ -510,13 +487,11 @@ typedef struct otPlatDnssdTxtResult * * @param[in] aInstance The OpenThread instance. * @param[in] aResult The TXT resolve result. - * */ typedef void (*otPlatDnssdTxtCallback)(otInstance *aInstance, const otPlatDnssdTxtResult *aResult); /** * Represents a TXT service resolver. - * */ typedef struct otPlatDnssdTxtResolver { @@ -528,7 +503,6 @@ typedef struct otPlatDnssdTxtResolver /** * Represents a discovered host address and its TTL. - * */ typedef struct otPlatDnssdAddressAndTtl { @@ -538,7 +512,6 @@ typedef struct otPlatDnssdAddressAndTtl /** * Represents address resolver result. - * */ typedef struct otPlatDnssdAddressResult { @@ -553,13 +526,11 @@ typedef struct otPlatDnssdAddressResult * * @param[in] aInstance The OpenThread instance. * @param[in] aResult The address resolve result. - * */ typedef void (*otPlatDnssdAddressCallback)(otInstance *aInstance, const otPlatDnssdAddressResult *aResult); /** * Represents an address resolver. - * */ typedef struct otPlatDnssdAddressResolver { @@ -586,7 +557,6 @@ typedef struct otPlatDnssdAddressResolver * * @param[in] aInstance The OpenThread instance. * @param[in] aBrowser The browser to be started. - * */ void otPlatDnssdStartBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aBrowser); @@ -600,7 +570,6 @@ void otPlatDnssdStartBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aB * * @param[in] aInstance The OpenThread instance. * @param[in] aBrowser The browser to stop. - * */ void otPlatDnssdStopBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aBrowser); @@ -624,7 +593,6 @@ void otPlatDnssdStopBrowser(otInstance *aInstance, const otPlatDnssdBrowser *aBr * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to be started. - * */ void otPlatDnssdStartSrvResolver(otInstance *aInstance, const otPlatDnssdSrvResolver *aResolver); @@ -638,7 +606,6 @@ void otPlatDnssdStartSrvResolver(otInstance *aInstance, const otPlatDnssdSrvReso * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to stop. - * */ void otPlatDnssdStopSrvResolver(otInstance *aInstance, const otPlatDnssdSrvResolver *aResolver); @@ -662,7 +629,6 @@ void otPlatDnssdStopSrvResolver(otInstance *aInstance, const otPlatDnssdSrvResol * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to be started. - * */ void otPlatDnssdStartTxtResolver(otInstance *aInstance, const otPlatDnssdTxtResolver *aResolver); @@ -676,7 +642,6 @@ void otPlatDnssdStartTxtResolver(otInstance *aInstance, const otPlatDnssdTxtReso * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to stop. - * */ void otPlatDnssdStopTxtResolver(otInstance *aInstance, const otPlatDnssdTxtResolver *aResolver); @@ -700,7 +665,6 @@ void otPlatDnssdStopTxtResolver(otInstance *aInstance, const otPlatDnssdTxtResol * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to be started. - * */ void otPlatDnssdStartIp6AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver); @@ -714,7 +678,6 @@ void otPlatDnssdStartIp6AddressResolver(otInstance *aInstance, const otPlatDnssd * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to stop. - * */ void otPlatDnssdStopIp6AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver); @@ -739,7 +702,6 @@ void otPlatDnssdStopIp6AddressResolver(otInstance *aInstance, const otPlatDnssdA * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to be started. - * */ void otPlatDnssdStartIp4AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver); @@ -753,13 +715,11 @@ void otPlatDnssdStartIp4AddressResolver(otInstance *aInstance, const otPlatDnssd * * @param[in] aInstance The OpenThread instance. * @param[in] aResolver The resolver to stop. - * */ void otPlatDnssdStopIp4AddressResolver(otInstance *aInstance, const otPlatDnssdAddressResolver *aResolver); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/dso_transport.h b/include/openthread/platform/dso_transport.h index 4e005895c5b..03eb97e4bb5 100644 --- a/include/openthread/platform/dso_transport.h +++ b/include/openthread/platform/dso_transport.h @@ -50,7 +50,6 @@ extern "C" { * Represents a DSO connection. * * It is an opaque struct (the platform implementation only deals with pointers to this struct). - * */ typedef struct otPlatDsoConnection otPlatDsoConnection; @@ -61,7 +60,6 @@ typedef struct otPlatDsoConnection otPlatDsoConnection; * @param[in] aConnection A pointer to the DSO connection. * * @returns A pointer to the `otInstance`. - * */ extern otInstance *otPlatDsoGetInstance(otPlatDsoConnection *aConnection); @@ -74,7 +72,6 @@ extern otInstance *otPlatDsoGetInstance(otPlatDsoConnection *aConnection); * * @param[in] aInstance The OpenThread instance. * @param[in] aEnable TRUE to start listening, FALSE to stop listening. - * */ void otPlatDsoEnableListening(otInstance *aInstance, bool aEnable); @@ -93,7 +90,6 @@ void otPlatDsoEnableListening(otInstance *aInstance, bool aEnable); * @param[in] aPeerSockAddr The socket address (IPv6 address and port number) of the peer requesting connection. * * @returns A pointer to the `otPlatDsoConnection` to use if to accept, or `NULL` if to reject. - * */ extern otPlatDsoConnection *otPlatDsoAccept(otInstance *aInstance, const otSockAddr *aPeerSockAddr); @@ -105,7 +101,6 @@ extern otPlatDsoConnection *otPlatDsoAccept(otInstance *aInstance, const otSockA * * @param[in] aConnection The connection. * @param[in] aPeerSockAddr The socket address (IPv6 address and port number) of the peer to connect to. - * */ void otPlatDsoConnect(otPlatDsoConnection *aConnection, const otSockAddr *aPeerSockAddr); @@ -118,7 +113,6 @@ void otPlatDsoConnect(otPlatDsoConnection *aConnection, const otSockAddr *aPeerS * Only after this callback, the connection can be used to send and receive messages. * * @param[in] aConnection The connection. - * */ extern void otPlatDsoHandleConnected(otPlatDsoConnection *aConnection); @@ -137,7 +131,6 @@ extern void otPlatDsoHandleConnected(otPlatDsoConnection *aConnection); * * @param[in] aConnection The connection to send on. * @param[in] aMessage The message to send. - * */ void otPlatDsoSend(otPlatDsoConnection *aConnection, otMessage *aMessage); @@ -155,13 +148,11 @@ void otPlatDsoSend(otPlatDsoConnection *aConnection, otMessage *aMessage); * * @param[in] aConnection The connection on which the message was received. * @param[in] aMessage The received message. - * */ extern void otPlatDsoHandleReceive(otPlatDsoConnection *aConnection, otMessage *aMessage); /** * Defines disconnect modes. - * */ typedef enum { @@ -178,7 +169,6 @@ typedef enum * * @param[in] aConnection The connection to disconnect * @param[in] aMode The disconnect mode (close gracefully or forcibly abort). - * */ void otPlatDsoDisconnect(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMode aMode); @@ -191,7 +181,6 @@ void otPlatDsoDisconnect(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMo * * @param[in] aConnection The connection which disconnected. * @param[in] aMode The disconnect mode (closed gracefully or forcibly aborted). - * */ extern void otPlatDsoHandleDisconnected(otPlatDsoConnection *aConnection, otPlatDsoDisconnectMode aMode); diff --git a/include/openthread/platform/entropy.h b/include/openthread/platform/entropy.h index f86ced7b380..a928ebd789f 100644 --- a/include/openthread/platform/entropy.h +++ b/include/openthread/platform/entropy.h @@ -50,7 +50,6 @@ extern "C" { * This module includes the platform abstraction for entropy generation. * * @{ - * */ /** @@ -64,13 +63,11 @@ extern "C" { * @retval OT_ERROR_NONE Successfully filled @p aBuffer with true random values. * @retval OT_ERROR_FAILED Failed to fill @p aBuffer with true random values. * @retval OT_ERROR_INVALID_ARGS @p aBuffer was set to NULL. - * */ otError otPlatEntropyGet(uint8_t *aOutput, uint16_t aOutputLength); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/flash.h b/include/openthread/platform/flash.h index 64fc86093d8..dd71504b15f 100644 --- a/include/openthread/platform/flash.h +++ b/include/openthread/platform/flash.h @@ -41,7 +41,6 @@ extern "C" { * Initializes the flash driver. * * @param[in] aInstance The OpenThread instance structure. - * */ void otPlatFlashInit(otInstance *aInstance); @@ -51,7 +50,6 @@ void otPlatFlashInit(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * * @returns The size of the swap space in bytes. - * */ uint32_t otPlatFlashGetSwapSize(otInstance *aInstance); @@ -60,7 +58,6 @@ uint32_t otPlatFlashGetSwapSize(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aSwapIndex A value in [0, 1] that indicates the swap space. - * */ void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex); @@ -72,7 +69,6 @@ void otPlatFlashErase(otInstance *aInstance, uint8_t aSwapIndex); * @param[in] aOffset A byte offset within the swap space. * @param[out] aData A pointer to the data buffer for reading. * @param[in] aSize Number of bytes to read. - * */ void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, void *aData, uint32_t aSize); @@ -84,8 +80,6 @@ void otPlatFlashRead(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset * @param[in] aOffset A byte offset within the swap space. * @param[out] aData A pointer to the data to write. * @param[in] aSize Number of bytes to write. - * - * */ void otPlatFlashWrite(otInstance *aInstance, uint8_t aSwapIndex, uint32_t aOffset, const void *aData, uint32_t aSize); diff --git a/include/openthread/platform/infra_if.h b/include/openthread/platform/infra_if.h index 4241efd0690..171cbb1ccd8 100644 --- a/include/openthread/platform/infra_if.h +++ b/include/openthread/platform/infra_if.h @@ -30,7 +30,6 @@ * @file * @brief * This file includes the platform abstraction for the infrastructure network interface. - * */ #ifndef OPENTHREAD_PLATFORM_INFRA_IF_H_ @@ -53,7 +52,6 @@ extern "C" { * This module includes the platform abstraction for the adjacent infrastructure network interface. * * @{ - * */ /** @@ -63,7 +61,6 @@ extern "C" { * @param[in] aAddress The IPv6 address. * * @returns TRUE if the infra interface has given IPv6 address assigned, FALSE otherwise. - * */ bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddress); @@ -83,7 +80,6 @@ bool otPlatInfraIfHasAddress(uint32_t aInfraIfIndex, const otIp6Address *aAddres * * @retval OT_ERROR_NONE Successfully sent the ICMPv6 message. * @retval OT_ERROR_FAILED Failed to send the ICMPv6 message. - * */ otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex, const otIp6Address *aDestAddress, @@ -104,7 +100,6 @@ otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex, * * @note Per RFC 4861, the caller should enforce that the source address MUST be a IPv6 link-local * address and the IP Hop Limit MUST be 255. - * */ extern void otPlatInfraIfRecvIcmp6Nd(otInstance *aInstance, uint32_t aInfraIfIndex, @@ -129,7 +124,6 @@ extern void otPlatInfraIfRecvIcmp6Nd(otInstance *aInstance, * @retval OT_ERROR_INVALID_STATE The Routing Manager is not initialized. * @retval OT_ERROR_INVALID_ARGS The @p aInfraIfIndex doesn't match the infra interface the * Routing Manager are initialized with. - * */ extern otError otPlatInfraIfStateChanged(otInstance *aInstance, uint32_t aInfraIfIndex, bool aIsRunning); @@ -142,7 +136,6 @@ extern otError otPlatInfraIfStateChanged(otInstance *aInstance, uint32_t aInfraI * * @retval OT_ERROR_NONE Successfully request NAT64 prefix discovery. * @retval OT_ERROR_FAILED Failed to request NAT64 prefix discovery. - * */ otError otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex); @@ -156,7 +149,6 @@ otError otPlatInfraIfDiscoverNat64Prefix(uint32_t aInfraIfIndex); * @param[in] aInstance The OpenThread instance structure. * @param[in] aInfraIfIndex The index of the infrastructure interface on which the NAT64 prefix is discovered. * @param[in] aIp6Prefix A pointer to NAT64 prefix. - * */ extern void otPlatInfraIfDiscoverNat64PrefixDone(otInstance *aInstance, uint32_t aInfraIfIndex, @@ -164,7 +156,6 @@ extern void otPlatInfraIfDiscoverNat64PrefixDone(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/logging.h b/include/openthread/platform/logging.h index 20235dfe26e..01f7c49145e 100644 --- a/include/openthread/platform/logging.h +++ b/include/openthread/platform/logging.h @@ -49,7 +49,6 @@ extern "C" { * This module includes the platform abstraction for the debug log service. * * @{ - * */ /** @@ -57,7 +56,6 @@ extern "C" { * * @note Log Levels are defines so that embedded implementations can eliminate code at compile time via * #if/#else/#endif. - * */ #define OT_LOG_LEVEL_NONE 0 @@ -66,7 +64,6 @@ extern "C" { * * @note Log Levels are defines so that embedded implementations can eliminate code at compile time via * #if/#else/#endif. - * */ #define OT_LOG_LEVEL_CRIT 1 @@ -75,7 +72,6 @@ extern "C" { * * @note Log Levels are defines so that embedded implementations can eliminate code at compile time via * #if/#else/#endif. - * */ #define OT_LOG_LEVEL_WARN 2 @@ -84,7 +80,6 @@ extern "C" { * * @note Log Levels are defines so that embedded implementations can eliminate code at compile time via * #if/#else/#endif. - * */ #define OT_LOG_LEVEL_NOTE 3 @@ -93,7 +88,6 @@ extern "C" { * * @note Log Levels are defines so that embedded implementations can eliminate code at compile time via * #if/#else/#endif. - * */ #define OT_LOG_LEVEL_INFO 4 @@ -102,13 +96,11 @@ extern "C" { * * @note Log Levels are defines so that embedded implementations can eliminate code at compile time via * #if/#else/#endif. - * */ #define OT_LOG_LEVEL_DEBG 5 /** * Represents the log level. - * */ typedef int otLogLevel; @@ -118,7 +110,6 @@ typedef int otLogLevel; * 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 * in their `otPlatLog()` implementation. The OT core will always emit all logs with `OT_LOG_REGION_CORE`. - * */ typedef enum otLogRegion { @@ -157,7 +148,6 @@ typedef enum otLogRegion * @param[in] aLogRegion The log region. * @param[in] aFormat A pointer to the format string. * @param[in] ... Arguments for the format specification. - * */ void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...); @@ -170,13 +160,11 @@ void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat * @note Only applicable when `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1`. * * @param[in] aLogLevel The new OpenThread log level. - * */ void otPlatLogHandleLevelChanged(otLogLevel aLogLevel); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/mdns_socket.h b/include/openthread/platform/mdns_socket.h index cc2bed97adc..e6a205281ad 100644 --- a/include/openthread/platform/mdns_socket.h +++ b/include/openthread/platform/mdns_socket.h @@ -30,7 +30,6 @@ * @file * @brief * This file includes the platform abstraction for mDNS socket. - * */ #ifndef OPENTHREAD_PLATFORM_MULTICAST_DNS_SOCKET_H_ @@ -53,12 +52,10 @@ extern "C" { * This module defines platform APIs for Multicast DNS (mDNS) socket. * * @{ - * */ /** * Represents a socket address info. - * */ typedef struct otPlatMdnsAddressInfo { @@ -84,7 +81,6 @@ typedef struct otPlatMdnsAddressInfo * * @retval OT_ERROR_NONE Successfully enabled/disabled listening for mDNS messages. * @retval OT_ERROR_FAILED Failed to enable/disable listening for mDNS messages. - * */ otError otPlatMdnsSetListeningEnabled(otInstance *aInstance, bool aEnable, uint32_t aInfraIfIndex); @@ -107,7 +103,6 @@ otError otPlatMdnsSetListeningEnabled(otInstance *aInstance, bool aEnable, uint3 * @param[in] aInstance The OpenThread instance. * @param[in] aMessage The mDNS message to multicast. Ownership is transferred to the platform layer. * @param[in] aInfraIfIndex The infrastructure network interface index. - * */ void otPlatMdnsSendMulticast(otInstance *aInstance, otMessage *aMessage, uint32_t aInfraIfIndex); @@ -133,7 +128,6 @@ void otPlatMdnsSendMulticast(otInstance *aInstance, otMessage *aMessage, uint32_ * @param[in] aInstance The OpenThread instance. * @param[in] aMessage The mDNS message to multicast. Ownership is transferred to platform layer. * @param[in] aAddress The destination address info. - * */ void otPlatMdnsSendUnicast(otInstance *aInstance, otMessage *aMessage, const otPlatMdnsAddressInfo *aAddress); @@ -154,7 +148,6 @@ void otPlatMdnsSendUnicast(otInstance *aInstance, otMessage *aMessage, const otP * @param[in] aMessage The received mDNS message. Ownership is transferred to the OpenThread stack. * @param[in] aIsUnicast Indicates whether the received message is unicast or multicast. * @param[in] aAddress The sender's address info. - * */ extern void otPlatMdnsHandleReceive(otInstance *aInstance, otMessage *aMessage, @@ -163,7 +156,6 @@ extern void otPlatMdnsHandleReceive(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/memory.h b/include/openthread/platform/memory.h index 1f0e4227af1..af1a7a92c1c 100644 --- a/include/openthread/platform/memory.h +++ b/include/openthread/platform/memory.h @@ -48,7 +48,6 @@ extern "C" { * This module includes the platform abstraction for dynamic memory allocation. * * @{ - * */ /* @@ -84,7 +83,6 @@ void otPlatFree(void *aPtr); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/messagepool.h b/include/openthread/platform/messagepool.h index 5058871df0d..e098813a354 100644 --- a/include/openthread/platform/messagepool.h +++ b/include/openthread/platform/messagepool.h @@ -46,7 +46,6 @@ * This module includes the platform abstraction for the message pool. * * @{ - * */ #ifdef __cplusplus @@ -55,7 +54,6 @@ extern "C" { /** * Represents an OpenThread message buffer. - * */ typedef struct otMessageBuffer { @@ -70,7 +68,6 @@ typedef struct otMessageBuffer * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aMinNumFreeBuffers An uint16 containing the minimum number of free buffers desired by OpenThread. * @param[in] aBufferSize The size in bytes of a buffer object. - * */ void otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, size_t aBufferSize); @@ -84,7 +81,6 @@ void otPlatMessagePoolInit(otInstance *aInstance, uint16_t aMinNumFreeBuffers, s * @param[in] aInstance A pointer to the OpenThread instance. * * @returns A pointer to the buffer or NULL if no buffers are available. - * */ otMessageBuffer *otPlatMessagePoolNew(otInstance *aInstance); @@ -95,7 +91,6 @@ otMessageBuffer *otPlatMessagePoolNew(otInstance *aInstance); * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aBuffer The buffer to free. - * */ void otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer); @@ -107,7 +102,6 @@ void otPlatMessagePoolFree(otInstance *aInstance, otMessageBuffer *aBuffer); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns The number of buffers currently free and available to OpenThread. - * */ uint16_t otPlatMessagePoolNumFreeBuffers(otInstance *aInstance); @@ -117,7 +111,6 @@ uint16_t otPlatMessagePoolNumFreeBuffers(otInstance *aInstance); /** * @} - * */ #endif // OPENTHREAD_PLATFORM_MESSAGEPOOL_H_ diff --git a/include/openthread/platform/misc.h b/include/openthread/platform/misc.h index ecde9bae66e..b2928776a84 100644 --- a/include/openthread/platform/misc.h +++ b/include/openthread/platform/misc.h @@ -50,14 +50,12 @@ extern "C" { * This module includes platform abstractions for miscellaneous behaviors. * * @{ - * */ /** * Performs a software reset on the platform, if supported. * * @param[in] aInstance The OpenThread instance structure. - * */ void otPlatReset(otInstance *aInstance); @@ -71,7 +69,6 @@ void otPlatReset(otInstance *aInstance); * @retval OT_ERROR_NONE Reset to bootloader successfully. * @retval OT_ERROR_BUSY Failed due to another operation is ongoing. * @retval OT_ERROR_NOT_CAPABLE Not capable of resetting to bootloader. - * */ otError otPlatResetToBootloader(otInstance *aInstance); @@ -79,7 +76,6 @@ otError otPlatResetToBootloader(otInstance *aInstance); * Enumeration of possible reset reason codes. * * These are in the same order as the Spinel reset reason codes. - * */ typedef enum { @@ -100,7 +96,6 @@ typedef enum * Returns the reason for the last platform reset. * * @param[in] aInstance The OpenThread instance structure. - * */ otPlatResetReason otPlatGetResetReason(otInstance *aInstance); @@ -109,14 +104,12 @@ otPlatResetReason otPlatGetResetReason(otInstance *aInstance); * * @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. - * */ void otPlatAssertFail(const char *aFilename, int aLineNumber); /** * Performs a platform specific operation to wake the host MCU. * This is used only for NCP configurations. - * */ void otPlatWakeHost(void); @@ -133,7 +126,6 @@ void otPlatWakeHost(void); * external trigger (a "poke") to NCP before it can communicate with the NCP or not. * * After a reset, the MCU power state MUST be `OT_PLAT_POWER_STATE_ON`. - * */ typedef enum { @@ -144,7 +136,6 @@ typedef enum * external triggers. * * @note The `ON` power state only determines the MCU's power mode and is not related to radio's state. - * */ OT_PLAT_MCU_POWER_STATE_ON = 0, @@ -162,7 +153,6 @@ typedef enum * * @note The `LOW_POWER` power state only determines the MCU's power mode and is not related to radio's state * (radio is managed by OpenThread core and device role, e.g., device being sleepy or not. - * */ OT_PLAT_MCU_POWER_STATE_LOW_POWER = 1, @@ -171,7 +161,6 @@ typedef enum * * An NCP hardware reset (via a RESET pin) is required to bring the NCP back to `SPINEL_MCU_POWER_STATE_ON`. * RAM is not retained after reset. - * */ OT_PLAT_MCU_POWER_STATE_OFF = 2, } otPlatMcuPowerState; @@ -187,7 +176,6 @@ typedef enum * * @retval OT_ERROR_NONE The power state updated successfully. * @retval OT_ERROR_FAILED The given MCU power state is not supported by the platform. - * */ otError otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState); @@ -203,7 +191,6 @@ otError otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState * @param[in] aInstance A pointer to OpenThread instance. * * @returns The current power state. - * */ otPlatMcuPowerState otPlatGetMcuPowerState(otInstance *aInstance); @@ -219,7 +206,6 @@ otError otPlatLogCrashDump(void); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/multipan.h b/include/openthread/platform/multipan.h index 9af61e6d52c..adece8af6b3 100644 --- a/include/openthread/platform/multipan.h +++ b/include/openthread/platform/multipan.h @@ -41,7 +41,6 @@ * * Full multipan RCP and Automatic Switching RCP do not require any special care from the host side. * Manual Switching RCP requires host to switch currently active network. - * */ #ifndef OPENTHREAD_PLATFORM_MULTIPAN_H_ @@ -63,7 +62,6 @@ extern "C" { * This module includes the platform abstraction for multipan support. * * @{ - * */ /** @@ -77,7 +75,6 @@ extern "C" { * @retval OT_ERROR_NONE Successfully retrieved the property. * @retval OT_ERROR_NOT_IMPLEMENTED Failed due to lack of the support in radio. * @retval OT_ERROR_INVALID_COMMAND Platform supports all interfaces simultaneously. - * */ otError otPlatMultipanGetActiveInstance(otInstance **aInstance); @@ -99,7 +96,6 @@ otError otPlatMultipanGetActiveInstance(otInstance **aInstance); * @retval OT_ERROR_NOT_IMPLEMENTED Failed due to unknown instance or more instances than interfaces available. * @retval OT_ERROR_INVALID_COMMAND Platform supports all interfaces simultaneously. * @retval OT_ERROR_ALREADY Given interface is already active. - * */ otError otPlatMultipanSetActiveInstance(otInstance *aInstance, bool aCompletePending); @@ -111,7 +107,6 @@ otError otPlatMultipanSetActiveInstance(otInstance *aInstance, bool aCompletePen * * @param[in] aInstance The OpenThread instance structure. * @param[in] aSuccess True if successfully switched the interfaces, false if switching failed. - * */ extern void otPlatMultipanSwitchoverDone(otInstance *aInstance, bool aSuccess); @@ -135,7 +130,6 @@ uint8_t otPlatMultipanInstanceToIid(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/otns.h b/include/openthread/platform/otns.h index 19b206b2eae..b1f9216c890 100644 --- a/include/openthread/platform/otns.h +++ b/include/openthread/platform/otns.h @@ -50,7 +50,6 @@ extern "C" { * This module includes the platform abstraction for OTNS. * * @{ - * */ /** @@ -67,13 +66,11 @@ extern "C" { * Currently, OTNS only supports virtual time simulation. * * @param[in] aStatus The status string. - * */ void otPlatOtnsStatus(const char *aStatus); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/radio.h b/include/openthread/platform/radio.h index 95d35032f70..7c57f90bae7 100644 --- a/include/openthread/platform/radio.h +++ b/include/openthread/platform/radio.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines the radio interface for OpenThread. - * */ #ifndef OPENTHREAD_PLATFORM_RADIO_H_ @@ -53,7 +52,6 @@ extern "C" { * This module includes the platform abstraction for radio communication. * * @{ - * */ /** @@ -63,7 +61,6 @@ extern "C" { * This module includes the platform abstraction for a radio frame. * * @{ - * */ enum @@ -89,7 +86,6 @@ enum /** * Defines the channel page. - * */ enum { @@ -101,7 +97,6 @@ enum /** * Defines the frequency band channel range. - * */ enum { @@ -117,13 +112,11 @@ enum * Represents radio capabilities. * * The value is a bit-field indicating the capabilities supported by the radio. See `OT_RADIO_CAPS_*` definitions. - * */ typedef uint16_t otRadioCaps; /** * Defines constants that are used to indicate different radio capabilities. See `otRadioCaps`. - * */ enum { @@ -144,13 +137,11 @@ enum /** * Represents the IEEE 802.15.4 PAN ID. - * */ typedef uint16_t otPanId; /** * Represents the IEEE 802.15.4 Short Address. - * */ typedef uint16_t otShortAddress; @@ -158,7 +149,6 @@ typedef uint16_t otShortAddress; /** * Defines constants about size of header IE in ACK. - * */ enum { @@ -175,7 +165,6 @@ enum * @struct otExtAddress * * Represents the IEEE 802.15.4 Extended Address. - * */ OT_TOOL_PACKED_BEGIN struct otExtAddress @@ -185,7 +174,6 @@ struct otExtAddress /** * Represents the IEEE 802.15.4 Extended Address. - * */ typedef struct otExtAddress otExtAddress; @@ -195,7 +183,6 @@ typedef struct otExtAddress otExtAddress; * @struct otMacKey * * Represents a MAC Key. - * */ OT_TOOL_PACKED_BEGIN struct otMacKey @@ -205,13 +192,11 @@ struct otMacKey /** * Represents a MAC Key. - * */ typedef struct otMacKey otMacKey; /** * Represents a MAC Key Ref used by PSA. - * */ typedef otCryptoKeyRef otMacKeyRef; @@ -219,7 +204,6 @@ typedef otCryptoKeyRef otMacKeyRef; * @struct otMacKeyMaterial * * Represents a MAC Key. - * */ typedef struct otMacKeyMaterial { @@ -232,7 +216,6 @@ typedef struct otMacKeyMaterial /** * Defines constants about key types. - * */ typedef enum { @@ -312,7 +295,6 @@ typedef struct otRadioFrame * The switch to the RX channel MUST happen after the frame TX is fully done, i.e., after all retries and * when ack is received (when "Ack Request" flag is set on the TX frame) or ack timeout. Note that ack is * expected on the same channel that frame is sent on. - * */ uint8_t mRxChannelAfterTxDone; @@ -331,7 +313,6 @@ typedef struct otRadioFrame * 2. The power limit set by otPlatRadioSetChannelTargetPower(), * 3. The power limit set by otPlatRadioSetChannelMaxTransmitPower(), * 4. The power limit set by otPlatRadioSetRegion(). - * */ int8_t mTxPower; @@ -354,7 +335,6 @@ typedef struct otRadioFrame * however if the the transmission gets aborted and the frame is never sent over the air (e.g., channel * access error) the platform may choose to not update the header. If the platform updates the header, * it must also set this flag before passing the frame back from the `otPlatRadioTxDone()` callback. - * */ bool mIsHeaderUpdated : 1; bool mIsARetx : 1; ///< Indicates whether the frame is a retransmission or not. @@ -367,7 +347,6 @@ typedef struct otRadioFrame * the SFD was present at the local antenna. * * The platform should update this field before otPlatRadioTxStarted() is fired for each transmit attempt. - * */ uint64_t mTimestamp; } mTxInfo; @@ -453,7 +432,6 @@ typedef struct otRadioCoexMetrics /** * Represents what metrics are specified to query. - * */ typedef struct otLinkMetrics { @@ -466,7 +444,6 @@ typedef struct otLinkMetrics /** * @} - * */ /** @@ -476,7 +453,6 @@ typedef struct otLinkMetrics * This module includes the platform abstraction for radio configuration. * * @{ - * */ /** @@ -485,7 +461,6 @@ typedef struct otLinkMetrics * @param[in] aInstance The OpenThread instance structure. * * @returns The radio capability bit vector (see `OT_RADIO_CAP_*` definitions). - * */ otRadioCaps otPlatRadioGetCaps(otInstance *aInstance); @@ -498,7 +473,6 @@ otRadioCaps otPlatRadioGetCaps(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * * @returns A pointer to the OpenThread radio version. - * */ const char *otPlatRadioGetVersionString(otInstance *aInstance); @@ -508,7 +482,6 @@ const char *otPlatRadioGetVersionString(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * * @returns The radio receive sensitivity value in dBm. - * */ int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance); @@ -517,7 +490,6 @@ int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance structure. * @param[out] aIeeeEui64 A pointer to the factory-assigned IEEE EUI-64. - * */ void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64); @@ -526,7 +498,6 @@ void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aPanId The IEEE 802.15.4 PAN ID. - * */ void otPlatRadioSetPanId(otInstance *aInstance, otPanId aPanId); @@ -535,8 +506,6 @@ void otPlatRadioSetPanId(otInstance *aInstance, otPanId aPanId); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aExtAddress A pointer to the IEEE 802.15.4 Extended Address stored in little-endian byte order. - * - * */ void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -545,7 +514,6 @@ void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aE * * @param[in] aInstance The OpenThread instance structure. * @param[in] aShortAddress The IEEE 802.15.4 Short Address. - * */ void otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddress); @@ -561,7 +529,6 @@ void otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddr * @retval OT_ERROR_NONE Successfully retrieved the transmit power. * @retval OT_ERROR_INVALID_ARGS @p aPower was NULL. * @retval OT_ERROR_NOT_IMPLEMENTED Transmit power configuration via dBm is not implemented. - * */ otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower); @@ -576,7 +543,6 @@ otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower); * * @retval OT_ERROR_NONE Successfully set the transmit power. * @retval OT_ERROR_NOT_IMPLEMENTED Transmit power configuration via dBm is not implemented. - * */ otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower); @@ -589,7 +555,6 @@ otError otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower); * @retval OT_ERROR_NONE Successfully retrieved the CCA ED threshold. * @retval OT_ERROR_INVALID_ARGS @p aThreshold was NULL. * @retval OT_ERROR_NOT_IMPLEMENTED CCA ED threshold configuration via dBm is not implemented. - * */ otError otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aThreshold); @@ -602,7 +567,6 @@ otError otPlatRadioGetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t *aT * @retval OT_ERROR_NONE Successfully set the transmit power. * @retval OT_ERROR_INVALID_ARGS Given threshold is out of range. * @retval OT_ERROR_NOT_IMPLEMENTED CCA ED threshold configuration via dBm is not implemented. - * */ otError otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aThreshold); @@ -615,7 +579,6 @@ otError otPlatRadioSetCcaEnergyDetectThreshold(otInstance *aInstance, int8_t aTh * @retval OT_ERROR_NONE Successfully retrieved the external FEM's LNA gain. * @retval OT_ERROR_INVALID_ARGS @p aGain was NULL. * @retval OT_ERROR_NOT_IMPLEMENTED External FEM's LNA setting is not implemented. - * */ otError otPlatRadioGetFemLnaGain(otInstance *aInstance, int8_t *aGain); @@ -627,7 +590,6 @@ otError otPlatRadioGetFemLnaGain(otInstance *aInstance, int8_t *aGain); * * @retval OT_ERROR_NONE Successfully set the external FEM's LNA gain. * @retval OT_ERROR_NOT_IMPLEMENTED External FEM's LNA gain setting is not implemented. - * */ otError otPlatRadioSetFemLnaGain(otInstance *aInstance, int8_t aGain); @@ -638,7 +600,6 @@ otError otPlatRadioSetFemLnaGain(otInstance *aInstance, int8_t aGain); * * @retval TRUE Promiscuous mode is enabled. * @retval FALSE Promiscuous mode is disabled. - * */ bool otPlatRadioGetPromiscuous(otInstance *aInstance); @@ -647,7 +608,6 @@ bool otPlatRadioGetPromiscuous(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aEnable TRUE to enable or FALSE to disable promiscuous mode. - * */ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable); @@ -683,7 +643,6 @@ void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aEnable TRUE to keep radio in Receive state, FALSE to put to Sleep state during idle periods. - * */ void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable); @@ -699,7 +658,6 @@ void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aEnable); * @param[in] aCurrKey A pointer to the current MAC key. * @param[in] aNextKey A pointer to the next MAC key. * @param[in] aKeyType Key Type used. - * */ void otPlatRadioSetMacKey(otInstance *aInstance, uint8_t aKeyIdMode, @@ -716,7 +674,6 @@ void otPlatRadioSetMacKey(otInstance *aInstance, * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMacFrameCounter The MAC frame counter value. - * */ void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter); @@ -727,7 +684,6 @@ void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCoun * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aMacFrameCounter The MAC frame counter value. - * */ void otPlatRadioSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacFrameCounter); @@ -751,7 +707,6 @@ void otPlatRadioSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacF * * @returns The current time in microseconds. UINT64_MAX when platform does not * support or radio time is not ready. - * */ uint64_t otPlatRadioGetNow(otInstance *aInstance); @@ -762,7 +717,6 @@ uint64_t otPlatRadioGetNow(otInstance *aInstance); * * @returns The bus speed in bits/second between the host and the radio chip. * Return 0 when the MAC and above layer and Radio layer resides on the same chip. - * */ uint32_t otPlatRadioGetBusSpeed(otInstance *aInstance); @@ -773,13 +727,11 @@ uint32_t otPlatRadioGetBusSpeed(otInstance *aInstance); * * @returns The bus latency in microseconds between the host and the radio chip. * Return 0 when the MAC and above layer and Radio layer resides on the same chip. - * */ uint32_t otPlatRadioGetBusLatency(otInstance *aInstance); /** * @} - * */ /** @@ -789,7 +741,6 @@ uint32_t otPlatRadioGetBusLatency(otInstance *aInstance); * This module includes the platform abstraction for radio operations. * * @{ - * */ /** @@ -802,7 +753,6 @@ uint32_t otPlatRadioGetBusLatency(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * * @return Current state of the radio. - * */ otRadioState otPlatRadioGetState(otInstance *aInstance); @@ -813,7 +763,6 @@ otRadioState otPlatRadioGetState(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully enabled. * @retval OT_ERROR_FAILED The radio could not be enabled. - * */ otError otPlatRadioEnable(otInstance *aInstance); @@ -824,7 +773,6 @@ otError otPlatRadioEnable(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully transitioned to Disabled. * @retval OT_ERROR_INVALID_STATE The radio was not in sleep state. - * */ otError otPlatRadioDisable(otInstance *aInstance); @@ -834,7 +782,6 @@ otError otPlatRadioDisable(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * * @returns TRUE if the radio is enabled, FALSE otherwise. - * */ bool otPlatRadioIsEnabled(otInstance *aInstance); @@ -846,7 +793,6 @@ bool otPlatRadioIsEnabled(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully transitioned to Sleep. * @retval OT_ERROR_BUSY The radio was transmitting. * @retval OT_ERROR_INVALID_STATE The radio was disabled. - * */ otError otPlatRadioSleep(otInstance *aInstance); @@ -858,7 +804,6 @@ otError otPlatRadioSleep(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully transitioned to Receive. * @retval OT_ERROR_INVALID_STATE The radio was disabled or transmitting. - * */ otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel); @@ -891,7 +836,6 @@ otError otPlatRadioReceiveAt(otInstance *aInstance, uint8_t aChannel, uint32_t a * @param[in] aError OT_ERROR_NONE when successfully received a frame, * OT_ERROR_ABORT when reception was aborted and a frame was not received, * OT_ERROR_NO_BUFS when a frame could not be received due to lack of rx buffer space. - * */ extern void otPlatRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError); @@ -905,7 +849,6 @@ extern void otPlatRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, * @param[in] aError OT_ERROR_NONE when successfully received a frame, * OT_ERROR_ABORT when reception was aborted and a frame was not received, * OT_ERROR_NO_BUFS when a frame could not be received due to lack of rx buffer space. - * */ extern void otPlatDiagRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError); @@ -917,7 +860,6 @@ extern void otPlatDiagRadioReceiveDone(otInstance *aInstance, otRadioFrame *aFra * @param[in] aInstance The OpenThread instance structure. * * @returns A pointer to the transmit frame buffer. - * */ otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance); @@ -938,7 +880,6 @@ otRadioFrame *otPlatRadioGetTransmitBuffer(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully transitioned to Transmit. * @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state. - * */ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame); @@ -950,7 +891,6 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame); * * @param[in] aInstance A pointer to the OpenThread instance structure. * @param[in] aFrame A pointer to the frame that is being transmitted. - * */ extern void otPlatRadioTxStarted(otInstance *aInstance, otRadioFrame *aFrame); @@ -968,7 +908,6 @@ extern void otPlatRadioTxStarted(otInstance *aInstance, otRadioFrame *aFrame); * OT_ERROR_NO_ACK when the frame was transmitted but no ACK was received, * OT_ERROR_CHANNEL_ACCESS_FAILURE tx could not take place due to activity on the channel, * OT_ERROR_ABORT when transmission was aborted for other reasons. - * */ extern void otPlatRadioTxDone(otInstance *aInstance, otRadioFrame *aFrame, otRadioFrame *aAckFrame, otError aError); @@ -982,7 +921,6 @@ extern void otPlatRadioTxDone(otInstance *aInstance, otRadioFrame *aFrame, otRad * @param[in] aError OT_ERROR_NONE when the frame was transmitted, * OT_ERROR_CHANNEL_ACCESS_FAILURE tx could not take place due to activity on the channel, * OT_ERROR_ABORT when transmission was aborted for other reasons. - * */ extern void otPlatDiagRadioTransmitDone(otInstance *aInstance, otRadioFrame *aFrame, otError aError); @@ -992,7 +930,6 @@ extern void otPlatDiagRadioTransmitDone(otInstance *aInstance, otRadioFrame *aFr * @param[in] aInstance The OpenThread instance structure. * * @returns The RSSI in dBm when it is valid. 127 when RSSI is invalid. - * */ int8_t otPlatRadioGetRssi(otInstance *aInstance); @@ -1008,7 +945,6 @@ int8_t otPlatRadioGetRssi(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully started scanning the channel. * @retval OT_ERROR_BUSY The radio is performing energy scanning. * @retval OT_ERROR_NOT_IMPLEMENTED The radio doesn't support energy scanning. - * */ otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration); @@ -1019,7 +955,6 @@ otError otPlatRadioEnergyScan(otInstance *aInstance, uint8_t aScanChannel, uint1 * * @param[in] aInstance The OpenThread instance structure. * @param[in] aEnergyScanMaxRssi The maximum RSSI encountered on the scanned channel. - * */ extern void otPlatRadioEnergyScanDone(otInstance *aInstance, int8_t aEnergyScanMaxRssi); @@ -1027,7 +962,6 @@ extern void otPlatRadioEnergyScanDone(otInstance *aInstance, int8_t aEnergyScanM * The radio driver calls this method to notify OpenThread that the spinel bus latency has been changed. * * @param[in] aInstance The OpenThread instance structure. - * */ extern void otPlatRadioBusLatencyChanged(otInstance *aInstance); @@ -1047,7 +981,6 @@ extern void otPlatRadioBusLatencyChanged(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance structure. * @param[in] aEnable Enable/disable source address match feature. - * */ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable); @@ -1059,7 +992,6 @@ void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable); * * @retval OT_ERROR_NONE Successfully added short address to the source match table. * @retval OT_ERROR_NO_BUFS No available entry in the source match table. - * */ otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, otShortAddress aShortAddress); @@ -1071,7 +1003,6 @@ otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, otShortAddress a * * @retval OT_ERROR_NONE Successfully added extended address to the source match table. * @retval OT_ERROR_NO_BUFS No available entry in the source match table. - * */ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -1083,7 +1014,6 @@ otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress * * @retval OT_ERROR_NONE Successfully removed short address from the source match table. * @retval OT_ERROR_NO_ADDRESS The short address is not in source address match table. - * */ otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, otShortAddress aShortAddress); @@ -1095,7 +1025,6 @@ otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, otShortAddress * * @retval OT_ERROR_NONE Successfully removed the extended address from the source match table. * @retval OT_ERROR_NO_ADDRESS The extended address is not in source address match table. - * */ otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -1103,7 +1032,6 @@ otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddre * Clear all short addresses from the source address match table. * * @param[in] aInstance The OpenThread instance structure. - * */ void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance); @@ -1111,7 +1039,6 @@ void otPlatRadioClearSrcMatchShortEntries(otInstance *aInstance); * Clear all the extended/long addresses from source address match table. * * @param[in] aInstance The OpenThread instance structure. - * */ void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance); @@ -1121,7 +1048,6 @@ void otPlatRadioClearSrcMatchExtEntries(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * * @returns The radio supported channel mask. - * */ uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance); @@ -1131,7 +1057,6 @@ uint32_t otPlatRadioGetSupportedChannelMask(otInstance *aInstance); * @param[in] aInstance The OpenThread instance structure. * * @returns The radio preferred channel mask. - * */ uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance); @@ -1145,7 +1070,6 @@ uint32_t otPlatRadioGetPreferredChannelMask(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully enabled. * @retval OT_ERROR_FAILED The radio coex could not be enabled. - * */ otError otPlatRadioSetCoexEnabled(otInstance *aInstance, bool aEnabled); @@ -1157,7 +1081,6 @@ otError otPlatRadioSetCoexEnabled(otInstance *aInstance, bool aEnabled); * @param[in] aInstance The OpenThread instance structure. * * @returns TRUE if the radio coex is enabled, FALSE otherwise. - * */ bool otPlatRadioIsCoexEnabled(otInstance *aInstance); @@ -1187,7 +1110,6 @@ otError otPlatRadioGetCoexMetrics(otInstance *aInstance, otRadioCoexMetrics *aCo * @retval OT_ERROR_NOT_IMPLEMENTED Radio driver doesn't support CSL. * @retval OT_ERROR_FAILED Other platform specific errors. * @retval OT_ERROR_NONE Successfully enabled or disabled CSL. - * */ otError otPlatRadioEnableCsl(otInstance *aInstance, uint32_t aCslPeriod, @@ -1204,7 +1126,6 @@ otError otPlatRadioEnableCsl(otInstance *aInstance, * @retval OT_ERROR_NOT_IMPLEMENTED Radio driver doesn't support CSL. * @retval OT_ERROR_FAILED Other platform specific errors. * @retval OT_ERROR_NONE Successfully disabled CSL. - * */ otError otPlatRadioResetCsl(otInstance *aInstance); @@ -1240,7 +1161,6 @@ void otPlatRadioUpdateCslSampleTime(otInstance *aInstance, uint32_t aCslSampleTi * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current CSL rx/tx scheduling drift, in PPM. - * */ uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance); @@ -1259,7 +1179,6 @@ uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The CSL Uncertainty in units of 10 us. - * */ uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance); @@ -1274,7 +1193,6 @@ uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance); * @retval OT_ERROR_INVALID_ARGS The specified channel is not valid. * @retval OT_ERROR_FAILED Other platform specific errors. * @retval OT_ERROR_NONE Successfully set max transmit power. - * */ otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aChannel, int8_t aMaxPower); @@ -1291,7 +1209,6 @@ otError otPlatRadioSetChannelMaxTransmitPower(otInstance *aInstance, uint8_t aCh * @retval OT_ERROR_FAILED Other platform specific errors. * @retval OT_ERROR_NONE Successfully set region code. * @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented. - * */ otError otPlatRadioSetRegion(otInstance *aInstance, uint16_t aRegionCode); @@ -1308,7 +1225,6 @@ otError otPlatRadioSetRegion(otInstance *aInstance, uint16_t aRegionCode); * @retval OT_ERROR_FAILED Other platform specific errors. * @retval OT_ERROR_NONE Successfully got region code. * @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented. - * */ otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode); @@ -1331,7 +1247,6 @@ otError otPlatRadioGetRegion(otInstance *aInstance, uint16_t *aRegionCode); * @retval OT_ERROR_NOT_FOUND The Initiator indicated by @p aShortAddress is not found when trying to clear. * @retval OT_ERROR_NO_BUFS No more Initiator can be supported. * @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented. - * */ otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance, otLinkMetrics aLinkMetrics, @@ -1362,7 +1277,6 @@ otError otPlatRadioConfigureEnhAckProbing(otInstance *aInstance, * @retval OT_ERROR_INVALID_ARGS The @p aChannel, @p aActualPower or @p aRawPowerSetting is invalid or the * @p aActualPower already exists in the power calibration table. * @retval OT_ERROR_NOT_IMPLEMENTED This feature is not implemented. - * */ otError otPlatRadioAddCalibratedPower(otInstance *aInstance, uint8_t aChannel, @@ -1379,7 +1293,6 @@ otError otPlatRadioAddCalibratedPower(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully cleared all calibrated powers from the power calibration table. * @retval OT_ERROR_NOT_IMPLEMENTED This feature is not implemented. - * */ otError otPlatRadioClearCalibratedPowers(otInstance *aInstance); @@ -1403,7 +1316,6 @@ otError otPlatRadioClearCalibratedPowers(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully set the target power. * @retval OT_ERROR_INVALID_ARGS The @p aChannel is invalid. * @retval OT_ERROR_NOT_IMPLEMENTED The feature is not implemented. - * */ otError otPlatRadioSetChannelTargetPower(otInstance *aInstance, uint8_t aChannel, int16_t aTargetPower); @@ -1428,7 +1340,6 @@ otError otPlatRadioSetChannelTargetPower(otInstance *aInstance, uint8_t aChannel * @retval OT_ERROR_INVALID_ARGS The @p aChannel is invalid, @p aRawPowerSetting or @p aRawPowerSettingLength is NULL * or @aRawPowerSettingLength is too short. * @retval OT_ERROR_NOT_FOUND The raw power setting for the @p aChannel was not found. - * */ extern otError otPlatRadioGetRawPowerSetting(otInstance *aInstance, uint8_t aChannel, @@ -1437,12 +1348,10 @@ extern otError otPlatRadioGetRawPowerSetting(otInstance *aInstance, /** * @} - * */ /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/settings.h b/include/openthread/platform/settings.h index 5a1783c5464..fe0af92997a 100644 --- a/include/openthread/platform/settings.h +++ b/include/openthread/platform/settings.h @@ -48,7 +48,6 @@ extern "C" { * This module includes the platform abstraction for non-volatile storage of settings. * * @{ - * */ /** @@ -57,7 +56,6 @@ extern "C" { * 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 * `otPlatSettingsInit()`. - * */ enum { @@ -98,7 +96,6 @@ enum * @param[in] aSensitiveKeys A pointer to an array containing the list of sensitive keys. May be NULL only if * @p aSensitiveKeysLength is 0, which means that there is no sensitive keys. * @param[in] aSensitiveKeysLength The number of entries in the @p aSensitiveKeys array. - * */ void otPlatSettingsInit(otInstance *aInstance, const uint16_t *aSensitiveKeys, uint16_t aSensitiveKeysLength); @@ -106,7 +103,6 @@ void otPlatSettingsInit(otInstance *aInstance, const uint16_t *aSensitiveKeys, u * Performs any de-initialization for the settings subsystem, if necessary. * * @param[in] aInstance The OpenThread instance structure. - * */ void otPlatSettingsDeinit(otInstance *aInstance); @@ -244,7 +240,6 @@ void otPlatSettingsWipe(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/spi-slave.h b/include/openthread/platform/spi-slave.h index c3e4cb8fc8e..8a22ff1bd3a 100644 --- a/include/openthread/platform/spi-slave.h +++ b/include/openthread/platform/spi-slave.h @@ -51,7 +51,6 @@ extern "C" { * This module includes the platform abstraction for SPI slave communication. * * @{ - * */ /** @@ -92,7 +91,6 @@ typedef bool (*otPlatSpiSlaveTransactionCompleteCallback)(void *aContext, * callback MUST be called from the same OS context as any other OpenThread API/callback. * * @param[in] aContext Context pointer passed into `otPlatSpiSlaveEnable()`. - * */ typedef void (*otPlatSpiSlaveTransactionProcessCallback)(void *aContext); @@ -111,7 +109,6 @@ typedef void (*otPlatSpiSlaveTransactionProcessCallback)(void *aContext); * @retval OT_ERROR_NONE Successfully enabled the SPI Slave interface. * @retval OT_ERROR_ALREADY SPI Slave interface is already enabled. * @retval OT_ERROR_FAILED Failed to enable the SPI Slave interface. - * */ otError otPlatSpiSlaveEnable(otPlatSpiSlaveTransactionCompleteCallback aCompleteCallback, otPlatSpiSlaveTransactionProcessCallback aProcessCallback, @@ -161,7 +158,6 @@ void otPlatSpiSlaveDisable(void); * @retval OT_ERROR_NONE Transaction was successfully prepared. * @retval OT_ERROR_BUSY A transaction is currently in progress. * @retval OT_ERROR_INVALID_STATE otPlatSpiSlaveEnable() hasn't been called. - * */ otError otPlatSpiSlavePrepareTransaction(uint8_t *aOutputBuf, uint16_t aOutputBufLen, @@ -171,7 +167,6 @@ otError otPlatSpiSlavePrepareTransaction(uint8_t *aOutputBuf, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/time.h b/include/openthread/platform/time.h index 7ce36519a79..fd587b434c8 100644 --- a/include/openthread/platform/time.h +++ b/include/openthread/platform/time.h @@ -53,7 +53,6 @@ extern "C" { * This module includes the platform abstraction for the time service. * * @{ - * */ /** @@ -73,7 +72,6 @@ extern "C" { * accuracy limits announced by @ref otPlatTimeGetXtalAccuracy. * * @returns The current time in microseconds. - * */ uint64_t otPlatTimeGet(void); @@ -90,13 +88,11 @@ uint64_t otPlatTimeGet(void); * implementation. * * @returns The current platform clock accuracy, in PPM. - * */ uint16_t otPlatTimeGetXtalAccuracy(void); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/toolchain.h b/include/openthread/platform/toolchain.h index a35e3ecdec5..acdd924b705 100644 --- a/include/openthread/platform/toolchain.h +++ b/include/openthread/platform/toolchain.h @@ -51,7 +51,6 @@ * @endcode * * @{ - * */ #ifndef OPENTHREAD_PLATFORM_TOOLCHAIN_H_ @@ -74,7 +73,6 @@ extern "C" { * as attribute [[nodiscard]]). * @note To suppress the 'unused-result' warning/error, please use the * '-Wno-unused-result' compiler option. - * */ #if defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ >= 3 && __clang_minor__ >= 9)) #define OT_MUST_USE_RESULT __attribute__((warn_unused_result)) @@ -86,7 +84,6 @@ extern "C" { * @def OT_TOOL_PACKED_BEGIN * * Compiler-specific indication that a class or struct must be byte packed. - * */ /** @@ -94,21 +91,18 @@ extern "C" { * * Indicate to the compiler a nested struct or union to be packed * within byte packed class or struct. - * */ /** * @def OT_TOOL_PACKED_END * * Compiler-specific indication at the end of a byte packed class or struct. - * */ /** * @def OT_TOOL_WEAK * * Compiler-specific weak symbol modifier. - * */ /** @@ -126,7 +120,6 @@ extern "C" { * * @param[in] aFmtIndex The argument index of the format string. * @param[in] aStartIndex The argument index of the first argument to check against the format string. - * */ // =========== TOOLCHAIN SELECTION : START =========== @@ -189,14 +182,12 @@ extern "C" { * @def OT_UNUSED_VARIABLE * * Suppress unused variable warning in specific toolchains. - * */ /** * @def OT_UNREACHABLE_CODE * * Suppress Unreachable code warning in specific toolchains. - * */ #if defined(__ICCARM__) @@ -289,7 +280,6 @@ extern "C" { * @def OT_FALL_THROUGH * * Suppress fall through warning in specific compiler. - * */ #if defined(__cplusplus) && (__cplusplus >= 201703L) #define OT_FALL_THROUGH [[fallthrough]] @@ -306,7 +296,6 @@ extern "C" { /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/trel.h b/include/openthread/platform/trel.h index f9e068f7797..c953a5873ba 100644 --- a/include/openthread/platform/trel.h +++ b/include/openthread/platform/trel.h @@ -30,7 +30,6 @@ * @file * @brief * This file includes the platform abstraction for Thread Radio Encapsulation Link (TREL) using DNS-SD and UDP/IPv6. - * */ #ifndef OPENTHREAD_PLATFORM_TREL_H_ @@ -54,7 +53,6 @@ extern "C" { * UDP/IPv6. * * @{ - * */ /** @@ -82,7 +80,6 @@ extern "C" { * * @param[in] aInstance The OpenThread instance. * @param[out] aUdpPort A pointer to return the selected port number by platform layer. - * */ void otPlatTrelEnable(otInstance *aInstance, uint16_t *aUdpPort); @@ -93,13 +90,11 @@ void otPlatTrelEnable(otInstance *aInstance, uint16_t *aUdpPort); * TREL DNS-SD service (from `otPlatTrelRegisterService()`) and MUST close the UDP socket used to receive TREL messages. * * @pram[in] aInstance The OpenThread instance. - * */ void otPlatTrelDisable(otInstance *aInstance); /** * Represents a TREL peer info discovered using DNS-SD browse on the service name "_trel._udp". - * */ typedef struct otPlatTrelPeerInfo { @@ -108,14 +103,12 @@ typedef struct otPlatTrelPeerInfo * * - TRUE indicates that peer is removed. * - FALSE indicates that it is a new entry or an update to an existing entry. - * */ bool mRemoved; /** * The TXT record data (encoded as specified by DNS-SD) from the SRV record of the discovered TREL peer service * instance. - * */ const uint8_t *mTxtData; @@ -127,7 +120,6 @@ typedef struct otPlatTrelPeerInfo * The port number is determined from the SRV record of the discovered TREL peer service instance. The IPv6 address * is determined from the DNS-SD query for AAAA records on the hostname indicated in the SRV record of the * discovered service instance. If multiple host IPv6 addressees are discovered, one with highest scope is used. - * */ otSockAddr mSockAddr; } otPlatTrelPeerInfo; @@ -140,7 +132,6 @@ typedef struct otPlatTrelPeerInfo * * @param[in] aInstance The OpenThread instance. * @param[in] aInfo A pointer to the TREL peer info. - * */ extern void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPlatTrelPeerInfo *aInfo); @@ -164,8 +155,6 @@ extern void otPlatTrelHandleDiscoveredPeerInfo(otInstance *aInstance, const otPl * @param[in] aPort The port number to include in the SRV record of the advertised service. * @param[in] aTxtData A pointer to the TXT record data (encoded) to be include in the advertised service. * @param[in] aTxtLength The length of @p aTxtData (number of bytes). - * - * */ void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint8_t *aTxtData, uint8_t aTxtLength); @@ -176,7 +165,6 @@ void otPlatTrelRegisterService(otInstance *aInstance, uint16_t aPort, const uint * @param[in] aUdpPayload A pointer to UDP payload. * @param[in] aUdpPayloadLen The payload length (number of bytes). * @param[in] aDestSockAddr The destination socket address. - * */ void otPlatTrelSend(otInstance *aInstance, const uint8_t *aUdpPayload, @@ -193,13 +181,11 @@ void otPlatTrelSend(otInstance *aInstance, * @param[in] aInstance The OpenThread instance structure. * @param[in] aBuffer A buffer containing the received UDP payload. * @param[in] aLength UDP payload length (number of bytes). - * */ extern void otPlatTrelHandleReceived(otInstance *aInstance, uint8_t *aBuffer, uint16_t aLength); /** * Represents a group of TREL related counters in the platform layer. - * */ typedef struct otPlatTrelCounters { @@ -214,7 +200,6 @@ typedef struct otPlatTrelCounters * Gets the pointer to the TREL counters in the platform layer. * * @param[in] aInstance The OpenThread instance structure. - * */ const otPlatTrelCounters *otPlatTrelGetCounters(otInstance *aInstance); @@ -222,13 +207,11 @@ const otPlatTrelCounters *otPlatTrelGetCounters(otInstance *aInstance); * Resets the TREL counters in the platform layer. * * @param[in] aInstance The OpenThread instance structure. - * */ void otPlatTrelResetCounters(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/platform/udp.h b/include/openthread/platform/udp.h index 59d1fc7e46b..e7d4961e00d 100644 --- a/include/openthread/platform/udp.h +++ b/include/openthread/platform/udp.h @@ -48,7 +48,6 @@ extern "C" { * * @retval OT_ERROR_NONE Successfully initialized UDP socket by platform. * @retval OT_ERROR_FAILED Failed to initialize UDP Socket. - * */ otError otPlatUdpSocket(otUdpSocket *aUdpSocket); @@ -59,7 +58,6 @@ otError otPlatUdpSocket(otUdpSocket *aUdpSocket); * * @retval OT_ERROR_NONE Successfully closed UDP socket by platform. * @retval OT_ERROR_FAILED Failed to close UDP Socket. - * */ otError otPlatUdpClose(otUdpSocket *aUdpSocket); @@ -70,7 +68,6 @@ otError otPlatUdpClose(otUdpSocket *aUdpSocket); * * @retval OT_ERROR_NONE Successfully bound UDP socket by platform. * @retval OT_ERROR_FAILED Failed to bind UDP socket. - * */ otError otPlatUdpBind(otUdpSocket *aUdpSocket); @@ -84,7 +81,6 @@ otError otPlatUdpBind(otUdpSocket *aUdpSocket); * * @retval OT_ERROR_NONE Successfully bound UDP socket. * @retval OT_ERROR_FAILED Failed to bind UDP. - * */ otError otPlatUdpBindToNetif(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifIdentifier); @@ -95,7 +91,6 @@ otError otPlatUdpBindToNetif(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifId * * @retval OT_ERROR_NONE Successfully connected by platform. * @retval OT_ERROR_FAILED Failed to connect UDP socket. - * */ otError otPlatUdpConnect(otUdpSocket *aUdpSocket); @@ -108,7 +103,6 @@ otError otPlatUdpConnect(otUdpSocket *aUdpSocket); * * @retval OT_ERROR_NONE Successfully sent by platform, and @p aMessage is freed. * @retval OT_ERROR_FAILED Failed to bind UDP socket. - * */ otError otPlatUdpSend(otUdpSocket *aUdpSocket, otMessage *aMessage, const otMessageInfo *aMessageInfo); @@ -123,7 +117,6 @@ otError otPlatUdpSend(otUdpSocket *aUdpSocket, otMessage *aMessage, const otMess * * @retval OT_ERROR_NONE Successfully joined the multicast group. * @retval OT_ERROR_FAILED Failed to join the multicast group. - * */ otError otPlatUdpJoinMulticastGroup(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifIdentifier, @@ -140,7 +133,6 @@ otError otPlatUdpJoinMulticastGroup(otUdpSocket *aUdpSocket, * * @retval OT_ERROR_NONE Successfully left the multicast group. * @retval OT_ERROR_FAILED Failed to leave the multicast group. - * */ otError otPlatUdpLeaveMulticastGroup(otUdpSocket *aUdpSocket, otNetifIdentifier aNetifIdentifier, diff --git a/include/openthread/radio_stats.h b/include/openthread/radio_stats.h index 2db394d726d..3f5125bdf40 100644 --- a/include/openthread/radio_stats.h +++ b/include/openthread/radio_stats.h @@ -51,12 +51,10 @@ extern "C" { * This module includes functions for radio statistics. * * @{ - * */ /** * Contains the statistics of radio. - * */ typedef struct otRadioTimeStats { @@ -75,7 +73,6 @@ typedef struct otRadioTimeStats * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A const pointer to the otRadioTimeStats struct that contains the data. - * */ const otRadioTimeStats *otRadioTimeStatsGet(otInstance *aInstance); @@ -85,14 +82,11 @@ const otRadioTimeStats *otRadioTimeStatsGet(otInstance *aInstance); * All times are reset to 0. * * @param[in] aInstance A pointer to an OpenThread instance. - * - * */ void otRadioTimeStatsReset(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/random_crypto.h b/include/openthread/random_crypto.h index 94d3e61730c..eed3186abbd 100644 --- a/include/openthread/random_crypto.h +++ b/include/openthread/random_crypto.h @@ -50,7 +50,6 @@ extern "C" { * This module includes functions that generates cryptographic random numbers. * * @{ - * */ /** @@ -58,13 +57,11 @@ extern "C" { * * @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). - * */ otError otRandomCryptoFillBuffer(uint8_t *aBuffer, uint16_t aSize); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/random_noncrypto.h b/include/openthread/random_noncrypto.h index 0b353ca78d3..fd103d882af 100644 --- a/include/openthread/random_noncrypto.h +++ b/include/openthread/random_noncrypto.h @@ -48,14 +48,12 @@ extern "C" { * This module includes functions that generates non cryptographic random numbers. * * @{ - * */ /** * Generates and returns a random `uint32_t` value. * * @returns A random `uint32_t` value. - * */ uint32_t otRandomNonCryptoGetUint32(void); @@ -63,7 +61,6 @@ uint32_t otRandomNonCryptoGetUint32(void); * Generates and returns a random byte. * * @returns A random `uint8_t` value. - * */ uint8_t otRandomNonCryptoGetUint8(void); @@ -71,7 +68,6 @@ uint8_t otRandomNonCryptoGetUint8(void); * Generates and returns a random `uint16_t` value. * * @returns A random `uint16_t` value. - * */ uint16_t otRandomNonCryptoGetUint16(void); @@ -106,7 +102,6 @@ uint16_t otRandomNonCryptoGetUint16InRange(uint16_t aMin, uint16_t aMax); * @param[in] aMax A maximum value (this value is excluded from returned random result). * * @returns A random `uint32_t` value in the given range (i.e., aMin <= random value < aMax). - * */ uint32_t otRandomNonCryptoGetUint32InRange(uint32_t aMin, uint32_t aMax); @@ -115,7 +110,6 @@ uint32_t otRandomNonCryptoGetUint32InRange(uint32_t aMin, uint32_t aMax); * * @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). - * */ void otRandomNonCryptoFillBuffer(uint8_t *aBuffer, uint16_t aSize); @@ -126,13 +120,11 @@ void otRandomNonCryptoFillBuffer(uint8_t *aBuffer, uint16_t aSize); * @param[in] aJitter Maximum jitter. Random jitter is selected from the range `[-aJitter, aJitter]`. * * @returns The given value with an added random jitter. - * */ uint32_t otRandomNonCryptoAddJitter(uint32_t aValue, uint16_t aJitter); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/server.h b/include/openthread/server.h index 28cb56325ff..74e73bb4835 100644 --- a/include/openthread/server.h +++ b/include/openthread/server.h @@ -48,7 +48,6 @@ extern "C" { * This module includes functions to manage local network data with the OpenThread Server. * * @{ - * */ /** @@ -59,7 +58,6 @@ extern "C" { * @param[out] aData A pointer to the data buffer. * @param[in,out] aDataLength On entry, size of the data buffer pointed to by @p aData. * On exit, number of copied bytes. - * */ otError otServerGetNetDataLocal(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength); @@ -75,7 +73,6 @@ otError otServerGetNetDataLocal(otInstance *aInstance, bool aStable, uint8_t *aD * * @sa otServerRemoveService * @sa otServerRegister - * */ otError otServerAddService(otInstance *aInstance, const otServiceConfig *aConfig); @@ -92,7 +89,6 @@ otError otServerAddService(otInstance *aInstance, const otServiceConfig *aConfig * * @sa otServerAddService * @sa otServerRegister - * */ otError otServerRemoveService(otInstance *aInstance, uint32_t aEnterpriseNumber, @@ -109,7 +105,6 @@ otError otServerRemoveService(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully found the next service. * @retval OT_ERROR_NOT_FOUND No subsequent service exists in the Thread Network Data. - * */ otError otServerGetNextService(otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig); @@ -122,13 +117,11 @@ otError otServerGetNextService(otInstance *aInstance, otNetworkDataIterator *aIt * * @sa otServerAddService * @sa otServerRemoveService - * */ otError otServerRegister(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/sntp.h b/include/openthread/sntp.h index 98f9e86a5c3..c9b5222cac0 100644 --- a/include/openthread/sntp.h +++ b/include/openthread/sntp.h @@ -50,7 +50,6 @@ extern "C" { * This module includes functions that control SNTP communication. * * @{ - * */ #define OT_SNTP_DEFAULT_SERVER_IP "2001:4860:4806:8::" ///< Defines default SNTP Server address - Google NTP Server. @@ -58,7 +57,6 @@ extern "C" { /** * Implements SNTP Query parameters. - * */ typedef struct otSntpQuery { @@ -78,7 +76,6 @@ typedef struct otSntpQuery * @retval OT_ERROR_BUSY The Kiss-o'-death packet has been received. * @retval OT_ERROR_RESPONSE_TIMEOUT No SNTP response has been received within timeout. * @retval OT_ERROR_FAILED A response was received but contains incorrect data. - * */ typedef void (*otSntpResponseHandler)(void *aContext, uint64_t aTime, otError aResult); @@ -91,7 +88,6 @@ typedef void (*otSntpResponseHandler)(void *aContext, uint64_t aTime, otError aR * @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. * @param[in] aContext A pointer to arbitrary context information. - * */ otError otSntpClientQuery(otInstance *aInstance, const otSntpQuery *aQuery, @@ -105,13 +101,11 @@ otError otSntpClientQuery(otInstance *aInstance, * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aUnixEra Unix era number. - * */ void otSntpClientSetUnixEra(otInstance *aInstance, uint32_t aUnixEra); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/srp_client.h b/include/openthread/srp_client.h index 27c87f3d073..4c8ebae8841 100644 --- a/include/openthread/srp_client.h +++ b/include/openthread/srp_client.h @@ -49,12 +49,10 @@ extern "C" { * This module includes functions that control SRP client behavior. * * @{ - * */ /** * Specifies an SRP client item (service or host info) state. - * */ typedef enum { @@ -70,7 +68,6 @@ typedef enum /** * Represents an SRP client host info. - * */ typedef struct otSrpClientHostInfo { @@ -99,7 +96,6 @@ typedef struct otSrpClientHostInfo * SRP client will re-use the lease interval value for key lease interval as well. For example, if in service `mLease` * is explicitly set to 2 days and `mKeyLease` is set to zero and default key lease is set to 1 day, then when * registering this service, the requested key lease for this service is also set to 2 days. - * */ typedef struct otSrpClientService { @@ -171,7 +167,6 @@ typedef struct otSrpClientService * the list is empty. * @param[in] aRemovedServices The head of linked-list containing all removed services. NULL if the list is empty. * @param[in] aContext A pointer to an arbitrary context (provided when callback was registered). - * */ typedef void (*otSrpClientCallback)(otError aError, const otSrpClientHostInfo *aHostInfo, @@ -190,7 +185,6 @@ typedef void (*otSrpClientCallback)(otError aError, * @param[in] aServerSockAddr A non-NULL pointer indicates SRP server was started and pointer will give the * selected server socket address. A NULL pointer indicates SRP server was stopped. * @param[in] aContext A pointer to an arbitrary context (provided when callback was registered). - * */ typedef void (*otSrpClientAutoStartCallback)(const otSockAddr *aServerSockAddr, void *aContext); @@ -217,7 +211,6 @@ typedef void (*otSrpClientAutoStartCallback)(const otSockAddr *aServerSockAddr, * socket address and callback. * @retval OT_ERROR_BUSY SRP client is busy running with a different socket address. * @retval OT_ERROR_FAILED Failed to open/connect the client's UDP socket. - * */ otError otSrpClientStart(otInstance *aInstance, const otSockAddr *aServerSockAddr); @@ -228,7 +221,6 @@ otError otSrpClientStart(otInstance *aInstance, const otSockAddr *aServerSockAdd * 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. - * */ void otSrpClientStop(otInstance *aInstance); @@ -238,7 +230,6 @@ void otSrpClientStop(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns TRUE if the SRP client is running, FALSE otherwise. - * */ bool otSrpClientIsRunning(otInstance *aInstance); @@ -251,7 +242,6 @@ bool otSrpClientIsRunning(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns A pointer to the SRP server's socket address (is always non-NULL). - * */ const otSockAddr *otSrpClientGetServerAddress(otInstance *aInstance); @@ -264,7 +254,6 @@ const otSockAddr *otSrpClientGetServerAddress(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aCallback The callback to notify of events and changes. Can be NULL if not needed. * @param[in] aContext An arbitrary context used with @p aCallback. - * */ void otSrpClientSetCallback(otInstance *aInstance, otSrpClientCallback aCallback, void *aContext); @@ -305,7 +294,6 @@ void otSrpClientSetCallback(otInstance *aInstance, otSrpClientCallback aCallback * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aCallback A callback to notify when client is auto-started/stopped. Can be NULL if not needed. * @param[in] aContext A context to be passed when invoking @p aCallback. - * */ void otSrpClientEnableAutoStartMode(otInstance *aInstance, otSrpClientAutoStartCallback aCallback, void *aContext); @@ -320,7 +308,6 @@ void otSrpClientEnableAutoStartMode(otInstance *aInstance, otSrpClientAutoStartC * Note that a call to `otSrpClientStop()` will also disable the auto-start mode. * * @param[in] aInstance A pointer to the OpenThread instance. - * */ void otSrpClientDisableAutoStartMode(otInstance *aInstance); @@ -332,7 +319,6 @@ void otSrpClientDisableAutoStartMode(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns TRUE if the auto-start mode is enabled, FALSE otherwise. - * */ bool otSrpClientIsAutoStartModeEnabled(otInstance *aInstance); @@ -347,7 +333,6 @@ bool otSrpClientIsAutoStartModeEnabled(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns The TTL (in seconds). - * */ uint32_t otSrpClientGetTtl(otInstance *aInstance); @@ -360,7 +345,6 @@ uint32_t otSrpClientGetTtl(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aTtl The TTL (in seconds). If value is zero or greater than lease interval, the TTL is set to the * lease interval. - * */ void otSrpClientSetTtl(otInstance *aInstance, uint32_t aTtl); @@ -375,7 +359,6 @@ void otSrpClientSetTtl(otInstance *aInstance, uint32_t aTtl); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns The lease interval (in seconds). - * */ uint32_t otSrpClientGetLeaseInterval(otInstance *aInstance); @@ -390,7 +373,6 @@ uint32_t otSrpClientGetLeaseInterval(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aInterval The lease interval (in seconds). If zero, the default value specified by * `OPENTHREAD_CONFIG_SRP_CLIENT_DEFAULT_LEASE` would be used. - * */ void otSrpClientSetLeaseInterval(otInstance *aInstance, uint32_t aInterval); @@ -405,7 +387,6 @@ void otSrpClientSetLeaseInterval(otInstance *aInstance, uint32_t aInterval); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns The key lease interval (in seconds). - * */ uint32_t otSrpClientGetKeyLeaseInterval(otInstance *aInstance); @@ -420,7 +401,6 @@ uint32_t otSrpClientGetKeyLeaseInterval(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aInterval The key lease interval (in seconds). If zero, the default value specified by * `OPENTHREAD_CONFIG_SRP_CLIENT_DEFAULT_KEY_LEASE` would be used. - * */ void otSrpClientSetKeyLeaseInterval(otInstance *aInstance, uint32_t aInterval); @@ -430,7 +410,6 @@ void otSrpClientSetKeyLeaseInterval(otInstance *aInstance, uint32_t aInterval); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns A pointer to host info structure. - * */ const otSrpClientHostInfo *otSrpClientGetHostInfo(otInstance *aInstance); @@ -453,7 +432,6 @@ const otSrpClientHostInfo *otSrpClientGetHostInfo(otInstance *aInstance); * @retval OT_ERROR_NONE The host name label was set successfully. * @retval OT_ERROR_INVALID_ARGS The @p aName is NULL. * @retval OT_ERROR_INVALID_STATE The host name is already set and registered with the server. - * */ otError otSrpClientSetHostName(otInstance *aInstance, const char *aName); @@ -474,7 +452,6 @@ otError otSrpClientSetHostName(otInstance *aInstance, const char *aName); * * @retval OT_ERROR_NONE Successfully enabled auto host address mode. * @retval OT_ERROR_INVALID_STATE Host is being removed and therefore cannot enable auto host address mode. - * */ otError otSrpClientEnableAutoHostAddress(otInstance *aInstance); @@ -503,7 +480,6 @@ otError otSrpClientEnableAutoHostAddress(otInstance *aInstance); * will be called to report the status of registering addresses with server. * @retval OT_ERROR_INVALID_ARGS The address list is invalid (e.g., must contain at least one address). * @retval OT_ERROR_INVALID_STATE Host is being removed and therefore cannot change host address. - * */ otError otSrpClientSetHostAddresses(otInstance *aInstance, const otIp6Address *aIp6Addresses, uint8_t aNumAddresses); @@ -530,7 +506,6 @@ otError otSrpClientSetHostAddresses(otInstance *aInstance, const otIp6Address *a * called to report the status. * @retval OT_ERROR_ALREADY A service with the same service and instance names is already in the list. * @retval OT_ERROR_INVALID_ARGS The service structure is invalid (e.g., bad service name or `otDnsTxtEntry`). - * */ otError otSrpClientAddService(otInstance *aInstance, otSrpClientService *aService); @@ -551,7 +526,6 @@ otError otSrpClientAddService(otInstance *aInstance, otSrpClientService *aServic * @retval OT_ERROR_NONE The removal of service started successfully. The `otSrpClientCallback` will be called to * report the status. * @retval OT_ERROR_NOT_FOUND The service could not be found in the list. - * */ otError otSrpClientRemoveService(otInstance *aInstance, otSrpClientService *aService); @@ -571,7 +545,6 @@ otError otSrpClientRemoveService(otInstance *aInstance, otSrpClientService *aSer * * @retval OT_ERROR_NONE The @p aService is deleted successfully. It can be reclaimed and re-used immediately. * @retval OT_ERROR_NOT_FOUND The service could not be found in the list. - * */ otError otSrpClientClearService(otInstance *aInstance, otSrpClientService *aService); @@ -581,7 +554,6 @@ otError otSrpClientClearService(otInstance *aInstance, otSrpClientService *aServ * @param[in] aInstance A pointer to the OpenThread instance. * * @returns A pointer to the head of linked-list of all services or NULL if the list is empty. - * */ const otSrpClientService *otSrpClientGetServices(otInstance *aInstance); @@ -614,7 +586,6 @@ const otSrpClientService *otSrpClientGetServices(otInstance *aInstance); * @retval OT_ERROR_NONE The removal of host info and services started successfully. The `otSrpClientCallback` * will be called to report the status. * @retval OT_ERROR_ALREADY The host info is already removed. - * */ otError otSrpClientRemoveHostAndServices(otInstance *aInstance, bool aRemoveKeyLease, bool aSendUnregToServer); @@ -625,7 +596,6 @@ otError otSrpClientRemoveHostAndServices(otInstance *aInstance, bool aRemoveKeyL * function clears all the info immediately without any interaction with the server. * * @param[in] aInstance A pointer to the OpenThread instance. - * */ void otSrpClientClearHostAndServices(otInstance *aInstance); @@ -639,7 +609,6 @@ void otSrpClientClearHostAndServices(otInstance *aInstance); * @param[in] aInstance A pointer to the OpenThread instance. * * @returns The domain name string. - * */ const char *otSrpClientGetDomainName(otInstance *aInstance); @@ -661,7 +630,6 @@ const char *otSrpClientGetDomainName(otInstance *aInstance); * * @retval OT_ERROR_NONE The domain name label was set successfully. * @retval OT_ERROR_INVALID_STATE The host info is already registered with server. - * */ otError otSrpClientSetDomainName(otInstance *aInstance, const char *aName); @@ -671,7 +639,6 @@ otError otSrpClientSetDomainName(otInstance *aInstance, const char *aName); * @param[in] aItemState An item state. * * @returns A string representation of @p aItemState. - * */ const char *otSrpClientItemStateToString(otSrpClientItemState aItemState); @@ -689,7 +656,6 @@ const char *otSrpClientItemStateToString(otSrpClientItemState aItemState); * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aEnabled TRUE to enable, FALSE to disable the "service key record inclusion" mode. - * */ void otSrpClientSetServiceKeyRecordEnabled(otInstance *aInstance, bool aEnabled); @@ -701,13 +667,11 @@ void otSrpClientSetServiceKeyRecordEnabled(otInstance *aInstance, bool aEnabled) * @param[in] aInstance A pointer to the OpenThread instance. * * @returns TRUE if "service key record inclusion" mode is enabled, FALSE otherwise. - * */ bool otSrpClientIsServiceKeyRecordEnabled(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/srp_client_buffers.h b/include/openthread/srp_client_buffers.h index 974da0d565c..339d661e285 100644 --- a/include/openthread/srp_client_buffers.h +++ b/include/openthread/srp_client_buffers.h @@ -51,12 +51,10 @@ extern "C" { * @{ * * Functions in this module are only available when feature OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_ENABLE is enabled. - * */ /** * Represents a SRP client service pool entry. - * */ typedef struct otSrpClientBuffersServiceEntry { @@ -72,7 +70,6 @@ typedef struct otSrpClientBuffersServiceEntry * NULL). * * @returns A pointer to char buffer to use for SRP client host name. - * */ char *otSrpClientBuffersGetHostNameString(otInstance *aInstance, uint16_t *aSize); @@ -84,7 +81,6 @@ char *otSrpClientBuffersGetHostNameString(otInstance *aInstance, uint16_t *aSize * the array (MUST NOT be NULL). * * @returns A pointer to an array of `otIp6Address` entries (number of entries is returned in @p aArrayLength). - * */ otIp6Address *otSrpClientBuffersGetHostAddressesArray(otInstance *aInstance, uint8_t *aArrayLength); @@ -110,7 +106,6 @@ otIp6Address *otSrpClientBuffersGetHostAddressesArray(otInstance *aInstance, uin * @param[in] aInstance A pointer to the OpenThread instance. * * @returns A pointer to the newly allocated service entry or NULL if not more entry available in the pool. - * */ otSrpClientBuffersServiceEntry *otSrpClientBuffersAllocateService(otInstance *aInstance); @@ -122,7 +117,6 @@ otSrpClientBuffersServiceEntry *otSrpClientBuffersAllocateService(otInstance *aI * * @param[in] aInstance A pointer to the OpenThread instance. * @param[in] aService A pointer to the service entry to free (MUST NOT be NULL). - * */ void otSrpClientBuffersFreeService(otInstance *aInstance, otSrpClientBuffersServiceEntry *aService); @@ -130,7 +124,6 @@ void otSrpClientBuffersFreeService(otInstance *aInstance, otSrpClientBuffersServ * Frees all previously allocated service entries. * * @param[in] aInstance A pointer to the OpenThread instance. - * */ void otSrpClientBuffersFreeAllServices(otInstance *aInstance); @@ -142,7 +135,6 @@ void otSrpClientBuffersFreeAllServices(otInstance *aInstance); * NULL). * * @returns A pointer to the string buffer. - * */ char *otSrpClientBuffersGetServiceEntryServiceNameString(otSrpClientBuffersServiceEntry *aEntry, uint16_t *aSize); @@ -154,7 +146,6 @@ char *otSrpClientBuffersGetServiceEntryServiceNameString(otSrpClientBuffersServi * NULL). * * @returns A pointer to the string buffer. - * */ char *otSrpClientBuffersGetServiceEntryInstanceNameString(otSrpClientBuffersServiceEntry *aEntry, uint16_t *aSize); @@ -165,7 +156,6 @@ char *otSrpClientBuffersGetServiceEntryInstanceNameString(otSrpClientBuffersServ * @param[out] aSize A pointer to a variable to return the size (number of bytes) of the buffer (MUST NOT be NULL). * * @returns A pointer to the buffer. - * */ uint8_t *otSrpClientBuffersGetServiceEntryTxtBuffer(otSrpClientBuffersServiceEntry *aEntry, uint16_t *aSize); @@ -176,13 +166,11 @@ uint8_t *otSrpClientBuffersGetServiceEntryTxtBuffer(otSrpClientBuffersServiceEnt * @param[out] aArrayLength A pointer to a variable to return the array length (MUST NOT be NULL). * * @returns A pointer to the array. - * */ const char **otSrpClientBuffersGetSubTypeLabelsArray(otSrpClientBuffersServiceEntry *aEntry, uint16_t *aArrayLength); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/srp_server.h b/include/openthread/srp_server.h index 8f45b0842b3..541ec97108e 100644 --- a/include/openthread/srp_server.h +++ b/include/openthread/srp_server.h @@ -52,30 +52,25 @@ extern "C" { * This module includes functions of the Service Registration Protocol. * * @{ - * */ /** * This opaque type represents a SRP service host. - * */ typedef struct otSrpServerHost otSrpServerHost; /** * This opaque type represents a SRP service. - * */ typedef struct otSrpServerService otSrpServerService; /** * The ID of a SRP service update transaction on the SRP Server. - * */ typedef uint32_t otSrpServerServiceUpdateId; /** * Represents the state of the SRP server. - * */ typedef enum { @@ -89,7 +84,6 @@ typedef enum * * 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. - * */ typedef enum otSrpServerAddressMode { @@ -99,7 +93,6 @@ typedef enum otSrpServerAddressMode /** * Includes SRP server TTL configurations. - * */ typedef struct otSrpServerTtlConfig { @@ -109,7 +102,6 @@ typedef struct otSrpServerTtlConfig /** * Includes SRP server LEASE and KEY-LEASE configurations. - * */ typedef struct otSrpServerLeaseConfig { @@ -121,7 +113,6 @@ typedef struct otSrpServerLeaseConfig /** * Includes SRP server lease information of a host/service. - * */ typedef struct otSrpServerLeaseInfo { @@ -133,7 +124,6 @@ typedef struct otSrpServerLeaseInfo /** * Includes the statistics of SRP server responses. - * */ typedef struct otSrpServerResponseCounters { @@ -154,7 +144,6 @@ typedef struct otSrpServerResponseCounters * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the dot-joined domain string. - * */ const char *otSrpServerGetDomain(otInstance *aInstance); @@ -171,7 +160,6 @@ const char *otSrpServerGetDomain(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE The SRP server is already enabled and the Domain cannot be changed. * @retval OT_ERROR_INVALID_ARGS The argument @p aDomain is not a valid DNS domain name. * @retval OT_ERROR_NO_BUFS There is no memory to store content of @p aDomain. - * */ otError otSrpServerSetDomain(otInstance *aInstance, const char *aDomain); @@ -181,7 +169,6 @@ otError otSrpServerSetDomain(otInstance *aInstance, const char *aDomain); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current state of the SRP server. - * */ otSrpServerState otSrpServerGetState(otInstance *aInstance); @@ -191,7 +178,6 @@ otSrpServerState otSrpServerGetState(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The port of the SRP server. It returns 0 if the server is not running. - * */ uint16_t otSrpServerGetPort(otInstance *aInstance); @@ -201,7 +187,6 @@ uint16_t otSrpServerGetPort(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The SRP server's address mode. - * */ otSrpServerAddressMode otSrpServerGetAddressMode(otInstance *aInstance); @@ -213,7 +198,6 @@ otSrpServerAddressMode otSrpServerGetAddressMode(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the address mode. * @retval OT_ERROR_INVALID_STATE The SRP server is enabled and the address mode cannot be changed. - * */ otError otSrpServerSetAddressMode(otInstance *aInstance, otSrpServerAddressMode aMode); @@ -225,7 +209,6 @@ otError otSrpServerSetAddressMode(otInstance *aInstance, otSrpServerAddressMode * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The anycast sequence number. - * */ uint8_t otSrpServerGetAnycastModeSequenceNumber(otInstance *aInstance); @@ -237,7 +220,6 @@ uint8_t otSrpServerGetAnycastModeSequenceNumber(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the address mode. * @retval OT_ERROR_INVALID_STATE The SRP server is enabled and the sequence number cannot be changed. - * */ otError otSrpServerSetAnycastModeSequenceNumber(otInstance *aInstance, uint8_t aSequenceNumber); @@ -248,7 +230,6 @@ otError otSrpServerSetAnycastModeSequenceNumber(otInstance *aInstance, uint8_t a * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled A boolean to enable/disable the SRP server. - * */ void otSrpServerSetEnabled(otInstance *aInstance, bool aEnabled); @@ -270,7 +251,6 @@ void otSrpServerSetEnabled(otInstance *aInstance, bool aEnabled); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled A boolean to enable/disable the auto-enable mode. - * */ void otSrpServerSetAutoEnableMode(otInstance *aInstance, bool aEnabled); @@ -283,7 +263,6 @@ void otSrpServerSetAutoEnableMode(otInstance *aInstance, bool aEnabled); * * @retval TRUE The auto-enable mode is enabled. * @retval FALSE The auto-enable mode is disabled. - * */ bool otSrpServerIsAutoEnableMode(otInstance *aInstance); @@ -292,7 +271,6 @@ bool otSrpServerIsAutoEnableMode(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aTtlConfig A pointer to an `otSrpServerTtlConfig` instance. - * */ void otSrpServerGetTtlConfig(otInstance *aInstance, otSrpServerTtlConfig *aTtlConfig); @@ -307,7 +285,6 @@ void otSrpServerGetTtlConfig(otInstance *aInstance, otSrpServerTtlConfig *aTtlCo * * @retval OT_ERROR_NONE Successfully set the TTL configuration. * @retval OT_ERROR_INVALID_ARGS The TTL configuration is not valid. - * */ otError otSrpServerSetTtlConfig(otInstance *aInstance, const otSrpServerTtlConfig *aTtlConfig); @@ -316,7 +293,6 @@ otError otSrpServerSetTtlConfig(otInstance *aInstance, const otSrpServerTtlConfi * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aLeaseConfig A pointer to an `otSrpServerLeaseConfig` instance. - * */ void otSrpServerGetLeaseConfig(otInstance *aInstance, otSrpServerLeaseConfig *aLeaseConfig); @@ -333,7 +309,6 @@ void otSrpServerGetLeaseConfig(otInstance *aInstance, otSrpServerLeaseConfig *aL * * @retval OT_ERROR_NONE Successfully set the LEASE and KEY-LEASE ranges. * @retval OT_ERROR_INVALID_ARGS The LEASE or KEY-LEASE range is not valid. - * */ otError otSrpServerSetLeaseConfig(otInstance *aInstance, const otSrpServerLeaseConfig *aLeaseConfig); @@ -368,7 +343,6 @@ otError otSrpServerSetLeaseConfig(otInstance *aInstance, const otSrpServerLeaseC * * @sa otSrpServerSetServiceUpdateHandler * @sa otSrpServerHandleServiceUpdateResult - * */ typedef void (*otSrpServerServiceUpdateHandler)(otSrpServerServiceUpdateId aId, const otSrpServerHost *aHost, @@ -382,7 +356,6 @@ typedef void (*otSrpServerServiceUpdateHandler)(otSrpServerServiceUpdateId aId, * @param[in] aServiceHandler A pointer to a service handler. Use NULL to remove the handler. * @param[in] aContext A pointer to arbitrary context information. * May be NULL if not used. - * */ void otSrpServerSetServiceUpdateHandler(otInstance *aInstance, otSrpServerServiceUpdateHandler aServiceHandler, @@ -399,7 +372,6 @@ void otSrpServerSetServiceUpdateHandler(otInstance *aInstanc * provided via `otSrpServerServiceUpdateHandler`. * @param[in] aError An error to be returned to the SRP server. Use OT_ERROR_DUPLICATED * to represent DNS name conflicts. - * */ void otSrpServerHandleServiceUpdateResult(otInstance *aInstance, otSrpServerServiceUpdateId aId, otError aError); @@ -410,7 +382,6 @@ void otSrpServerHandleServiceUpdateResult(otInstance *aInstance, otSrpServerServ * @param[in] aHost A pointer to current host; use NULL to get the first host. * * @returns A pointer to the registered host. NULL, if no more hosts can be found. - * */ const otSrpServerHost *otSrpServerGetNextHost(otInstance *aInstance, const otSrpServerHost *aHost); @@ -420,7 +391,6 @@ const otSrpServerHost *otSrpServerGetNextHost(otInstance *aInstance, const otSrp * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the response counters of the SRP server. - * */ const otSrpServerResponseCounters *otSrpServerGetResponseCounters(otInstance *aInstance); @@ -433,7 +403,6 @@ const otSrpServerResponseCounters *otSrpServerGetResponseCounters(otInstance *aI * @param[in] aHost A pointer to the SRP service host. * * @returns TRUE if the host has been deleted, FALSE if not. - * */ bool otSrpServerHostIsDeleted(const otSrpServerHost *aHost); @@ -443,7 +412,6 @@ bool otSrpServerHostIsDeleted(const otSrpServerHost *aHost); * @param[in] aHost A pointer to the SRP service host. * * @returns A pointer to the null-terminated host name string. - * */ const char *otSrpServerHostGetFullName(const otSrpServerHost *aHost); @@ -458,7 +426,6 @@ const char *otSrpServerHostGetFullName(const otSrpServerHost *aHost); * * @retval TRUE If host matches the host name. * @retval FALSE If host does not match the host name. - * */ bool otSrpServerHostMatchesFullName(const otSrpServerHost *aHost, const char *aFullName); @@ -469,7 +436,6 @@ bool otSrpServerHostMatchesFullName(const otSrpServerHost *aHost, const char *aF * @param[out] aAddressesNum A pointer to where we should output the number of the addresses to. * * @returns A pointer to the array of IPv6 Address. - * */ const otIp6Address *otSrpServerHostGetAddresses(const otSrpServerHost *aHost, uint8_t *aAddressesNum); @@ -478,7 +444,6 @@ const otIp6Address *otSrpServerHostGetAddresses(const otSrpServerHost *aHost, ui * * @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. - * */ void otSrpServerHostGetLeaseInfo(const otSrpServerHost *aHost, otSrpServerLeaseInfo *aLeaseInfo); @@ -489,7 +454,6 @@ void otSrpServerHostGetLeaseInfo(const otSrpServerHost *aHost, otSrpServerLeaseI * @param[in] aService A pointer to current SRP service instance; use NULL to get the first service. * * @returns A pointer to the next service or NULL if there is no more services. - * */ const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost *aHost, const otSrpServerService *aService); @@ -504,7 +468,6 @@ const otSrpServerService *otSrpServerHostGetNextService(const otSrpServerHost * @param[in] aService A pointer to the SRP service. * * @returns TRUE if the service has been deleted, FALSE if not. - * */ bool otSrpServerServiceIsDeleted(const otSrpServerService *aService); @@ -514,7 +477,6 @@ bool otSrpServerServiceIsDeleted(const otSrpServerService *aService); * @param[in] aService A pointer to the SRP service. * * @returns A pointer to the null-terminated service instance name string. - * */ const char *otSrpServerServiceGetInstanceName(const otSrpServerService *aService); @@ -529,7 +491,6 @@ const char *otSrpServerServiceGetInstanceName(const otSrpServerService *aService * * @retval TRUE If service matches the service instance name. * @retval FALSE If service does not match the service instance name. - * */ bool otSrpServerServiceMatchesInstanceName(const otSrpServerService *aService, const char *aInstanceName); @@ -539,7 +500,6 @@ bool otSrpServerServiceMatchesInstanceName(const otSrpServerService *aService, c * @param[in] aService A pointer to the SRP service. * * @returns A pointer to the null-terminated service instance label string.. - * */ const char *otSrpServerServiceGetInstanceLabel(const otSrpServerService *aService); @@ -549,7 +509,6 @@ const char *otSrpServerServiceGetInstanceLabel(const otSrpServerService *aServic * @param[in] aService A pointer to the SRP service. * * @returns A pointer to the null-terminated service name string. - * */ const char *otSrpServerServiceGetServiceName(const otSrpServerService *aService); @@ -564,7 +523,6 @@ const char *otSrpServerServiceGetServiceName(const otSrpServerService *aService) * * @retval TRUE If service matches the service name. * @retval FALSE If service does not match the service name. - * */ bool otSrpServerServiceMatchesServiceName(const otSrpServerService *aService, const char *aServiceName); @@ -574,7 +532,6 @@ bool otSrpServerServiceMatchesServiceName(const otSrpServerService *aService, co * @param[in] aService A pointer to the SRP service. * * @returns The number of sub-types of @p aService. - * */ uint16_t otSrpServerServiceGetNumberOfSubTypes(const otSrpServerService *aService); @@ -587,7 +544,6 @@ uint16_t otSrpServerServiceGetNumberOfSubTypes(const otSrpServerService *aServic * @param[in] aIndex The index to get. * * @returns A pointer to sub-type service name at @p aIndex, or `NULL` if no sub-type at this index. - * */ const char *otSrpServerServiceGetSubTypeServiceNameAt(const otSrpServerService *aService, uint16_t aIndex); @@ -602,7 +558,6 @@ const char *otSrpServerServiceGetSubTypeServiceNameAt(const otSrpServerService * * * @retval TRUE Service contains the sub-type @p aSubTypeServiceName. * @retval FALSE Service does not contain the sub-type @p aSubTypeServiceName. - * */ bool otSrpServerServiceHasSubTypeServiceName(const otSrpServerService *aService, const char *aSubTypeServiceName); @@ -619,7 +574,6 @@ bool otSrpServerServiceHasSubTypeServiceName(const otSrpServerService *aService, * @retval OT_ERROR_NO_BUFS The sub-type label could not fit in @p aLabel buffer (number of chars from label * that could fit are copied in @p aLabel ensuring it is null-terminated). * @retval OT_ERROR_INVALID_ARGS @p aSubTypeServiceName is not a valid sub-type format. - * */ otError otSrpServerParseSubTypeServiceName(const char *aSubTypeServiceName, char *aLabel, uint8_t aLabelSize); @@ -629,7 +583,6 @@ otError otSrpServerParseSubTypeServiceName(const char *aSubTypeServiceName, char * @param[in] aService A pointer to the SRP service. * * @returns The port of the service. - * */ uint16_t otSrpServerServiceGetPort(const otSrpServerService *aService); @@ -639,7 +592,6 @@ uint16_t otSrpServerServiceGetPort(const otSrpServerService *aService); * @param[in] aService A pointer to the SRP service. * * @returns The weight of the service. - * */ uint16_t otSrpServerServiceGetWeight(const otSrpServerService *aService); @@ -649,7 +601,6 @@ uint16_t otSrpServerServiceGetWeight(const otSrpServerService *aService); * @param[in] aService A pointer to the SRP service. * * @returns The priority of the service. - * */ uint16_t otSrpServerServiceGetPriority(const otSrpServerService *aService); @@ -659,7 +610,6 @@ uint16_t otSrpServerServiceGetPriority(const otSrpServerService *aService); * @param[in] aService A pointer to the SRP service. * * @returns The TTL of the service instance.. - * */ uint32_t otSrpServerServiceGetTtl(const otSrpServerService *aService); @@ -670,7 +620,6 @@ uint32_t otSrpServerServiceGetTtl(const otSrpServerService *aService); * @param[out] aDataLength A pointer to return the TXT record data length. MUST NOT be NULL. * * @returns A pointer to the buffer containing the TXT record data (the TXT data length is returned in @p aDataLength). - * */ const uint8_t *otSrpServerServiceGetTxtData(const otSrpServerService *aService, uint16_t *aDataLength); @@ -680,7 +629,6 @@ const uint8_t *otSrpServerServiceGetTxtData(const otSrpServerService *aService, * @param[in] aService A pointer to the SRP service. * * @returns A pointer to the host instance. - * */ const otSrpServerHost *otSrpServerServiceGetHost(const otSrpServerService *aService); @@ -689,12 +637,10 @@ const otSrpServerHost *otSrpServerServiceGetHost(const otSrpServerService *aServ * * @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. - * */ void otSrpServerServiceGetLeaseInfo(const otSrpServerService *aService, otSrpServerLeaseInfo *aLeaseInfo); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/tasklet.h b/include/openthread/tasklet.h index d440a687241..18a08973c9b 100644 --- a/include/openthread/tasklet.h +++ b/include/openthread/tasklet.h @@ -48,14 +48,12 @@ extern "C" { * This module includes functions that control the Thread stack's execution. * * @{ - * */ /** * Run all queued OpenThread tasklets at the time this is called. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otTaskletsProcess(otInstance *aInstance); @@ -66,7 +64,6 @@ void otTaskletsProcess(otInstance *aInstance); * * @retval TRUE If there are tasklets pending. * @retval FALSE If there are no tasklets pending. - * */ bool otTaskletsArePending(otInstance *aInstance); @@ -74,13 +71,11 @@ bool otTaskletsArePending(otInstance *aInstance); * OpenThread calls this function when the tasklet queue transitions from empty to non-empty. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ extern void otTaskletsSignalPending(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/tcat.h b/include/openthread/tcat.h index 1733d9fb580..65313448f56 100644 --- a/include/openthread/tcat.h +++ b/include/openthread/tcat.h @@ -61,7 +61,6 @@ extern "C" { * (`OPENTHREAD_CONFIG_BLE_TCAT_ENABLE`) is enabled. * * @{ - * */ #define OT_TCAT_MAX_SERVICE_NAME_LENGTH \ @@ -74,7 +73,6 @@ extern "C" { /** * Represents TCAT status code. - * */ typedef enum otTcatStatusCode { @@ -92,7 +90,6 @@ typedef enum otTcatStatusCode /** * Represents TCAT application protocol. - * */ typedef enum otTcatApplicationProtocol { @@ -104,7 +101,6 @@ typedef enum otTcatApplicationProtocol /** * Represents a TCAT command class. - * */ typedef enum otTcatCommandClass { @@ -118,7 +114,6 @@ typedef enum otTcatCommandClass /** * Represents Advertised Device ID type. (used during TCAT advertisement) - * */ typedef enum otTcatAdvertisedDeviceIdType { @@ -139,7 +134,6 @@ typedef struct otTcatAdvertisedDeviceId /** * Represents General Device ID type. - * */ typedef struct otTcatGeneralDeviceId { @@ -151,7 +145,6 @@ typedef struct otTcatGeneralDeviceId * This structure represents a TCAT vendor information. * * The content of this structure MUST persist and remain unchanged while a TCAT session is running. - * */ typedef struct otTcatVendorInfo { @@ -178,7 +171,6 @@ typedef struct otTcatVendorInfo * @param[in] aTcatApplicationProtocol The protocol type of the message received. * @param[in] aServiceName The name of the service the message is direced to. * @param[in] aContext A pointer to arbitrary context information. - * */ typedef void (*otHandleTcatApplicationDataReceive)(otInstance *aInstance, const otMessage *aMessage, @@ -193,13 +185,11 @@ typedef void (*otHandleTcatApplicationDataReceive)(otInstance *aIn * @param[in] aError OT_ERROR_NONE if the join process succeeded. * OT_ERROR_SECURITY if the join process failed due to security credentials. * @param[in] aContext A pointer to arbitrary context information. - * */ typedef void (*otHandleTcatJoin)(otError aError, void *aContext); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/tcp.h b/include/openthread/tcp.h index 649a4b47220..a99b69cc2c0 100644 --- a/include/openthread/tcp.h +++ b/include/openthread/tcp.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines the OpenThread TCP API. - * */ #ifndef OPENTHREAD_TCP_H_ @@ -49,7 +48,6 @@ extern "C" { * This module includes functions that control TCP communication. * * @{ - * */ /** @@ -58,7 +56,6 @@ extern "C" { * A single otLinkedBuffer structure references an array of bytes in memory, * via mData and mLength. The mNext field is used to form a chain of * otLinkedBuffer structures. - * */ typedef struct otLinkedBuffer { @@ -75,7 +72,6 @@ typedef struct otTcpEndpoint otTcpEndpoint; * complete and that the connection is now established. * * @param[in] aEndpoint The TCP endpoint whose connection is now established. - * */ typedef void (*otTcpEstablished)(otTcpEndpoint *aEndpoint); @@ -90,7 +86,6 @@ typedef void (*otTcpEstablished)(otTcpEndpoint *aEndpoint); * * @param[in] aEndpoint The TCP endpoint for the connection. * @param[in] aData A pointer to the otLinkedBuffer that can be reclaimed. - * */ typedef void (*otTcpSendDone)(otTcpEndpoint *aEndpoint, otLinkedBuffer *aData); @@ -160,7 +155,6 @@ typedef void (*otTcpSendDone)(otTcpEndpoint *aEndpoint, otLinkedBuffer *aData); * @param[in] aInSendBuffer The number of bytes in the send buffer (sum of "in-flight" and "backlog" regions). * @param[in] aBacklog The number of bytes that are queued for sending but have not yet been sent (the "backlog" * region). - * */ typedef void (*otTcpForwardProgress)(otTcpEndpoint *aEndpoint, size_t aInSendBuffer, size_t aBacklog); @@ -181,7 +175,6 @@ typedef void (*otTcpForwardProgress)(otTcpEndpoint *aEndpoint, size_t aInSendBuf * can be received. * @param[in] aBytesRemaining The number of additional bytes that can be received before the receive buffer becomes * full. - * */ typedef void (*otTcpReceiveAvailable)(otTcpEndpoint *aEndpoint, size_t aBytesAvailable, @@ -214,7 +207,6 @@ typedef enum otTcpDisconnectedReason * * @param[in] aEndpoint The TCP endpoint whose connection has been lost. * @param[in] aReason The reason why the connection was lost. - * */ typedef void (*otTcpDisconnected)(otTcpEndpoint *aEndpoint, otTcpDisconnectedReason aReason); @@ -238,7 +230,6 @@ typedef void (*otTcpDisconnected)(otTcpEndpoint *aEndpoint, otTcpDisconnectedRea * The application should not inspect the fields of this structure directly; it * should only interact with it via the TCP API functions whose signatures are * provided in this file. - * */ struct otTcpEndpoint { @@ -267,7 +258,6 @@ struct otTcpEndpoint /** * Contains arguments to the otTcpEndpointInitialize() function. - * */ typedef struct otTcpEndpointInitializeArgs { @@ -292,7 +282,6 @@ typedef struct otTcpEndpointInitializeArgs * On platforms where memory is particularly constrained and in situations * where high bandwidth is not necessary, it may be desirable to manually * select a smaller buffer size. - * */ #define OT_TCP_RECEIVE_BUFFER_SIZE_FEW_HOPS 2598 @@ -304,7 +293,6 @@ typedef struct otTcpEndpointInitializeArgs * * If the TCP connection traverses a very large number of hops (more than 6 or * so), then it may be advisable to select a large buffer size manually. - * */ #define OT_TCP_RECEIVE_BUFFER_SIZE_MANY_HOPS 4157 @@ -323,7 +311,6 @@ typedef struct otTcpEndpointInitializeArgs * * @retval OT_ERROR_NONE Successfully opened the TCP endpoint. * @retval OT_ERROR_FAILED Failed to open the TCP endpoint. - * */ otError otTcpEndpointInitialize(otInstance *aInstance, otTcpEndpoint *aEndpoint, @@ -336,7 +323,6 @@ otError otTcpEndpointInitialize(otInstance *aInstance, * @param[in] aEndpoint The TCP endpoint whose instance to obtain. * * @returns The otInstance pointer associated with @p aEndpoint. - * */ otInstance *otTcpEndpointGetInstance(otTcpEndpoint *aEndpoint); @@ -347,7 +333,6 @@ otInstance *otTcpEndpointGetInstance(otTcpEndpoint *aEndpoint); * @param[in] aEndpoint The TCP endpoint whose context to obtain. * * @returns The context pointer associated with @p aEndpoint. - * */ void *otTcpEndpointGetContext(otTcpEndpoint *aEndpoint); @@ -360,7 +345,6 @@ void *otTcpEndpointGetContext(otTcpEndpoint *aEndpoint); * @param[in] aEndpoint The TCP endpoint whose local host and port to obtain. * * @returns The local host and port of @p aEndpoint. - * */ const otSockAddr *otTcpGetLocalAddress(const otTcpEndpoint *aEndpoint); @@ -373,7 +357,6 @@ const otSockAddr *otTcpGetLocalAddress(const otTcpEndpoint *aEndpoint); * @param[in] aEndpoint The TCP endpoint whose peer's host and port to obtain. * * @returns The host and port of the connection peer of @p aEndpoint. - * */ const otSockAddr *otTcpGetPeerAddress(const otTcpEndpoint *aEndpoint); @@ -385,13 +368,11 @@ const otSockAddr *otTcpGetPeerAddress(const otTcpEndpoint *aEndpoint); * * @retval OT_ERROR_NONE Successfully bound the TCP endpoint. * @retval OT_ERROR_FAILED Failed to bind the TCP endpoint. - * */ otError otTcpBind(otTcpEndpoint *aEndpoint, const otSockAddr *aSockName); /** * Defines flags passed to otTcpConnect(). - * */ enum { @@ -418,13 +399,11 @@ enum * * @retval OT_ERROR_NONE Successfully completed the operation. * @retval OT_ERROR_FAILED Failed to complete the operation. - * */ otError otTcpConnect(otTcpEndpoint *aEndpoint, const otSockAddr *aSockName, uint32_t aFlags); /** * Defines flags passed to @p otTcpSendByReference. - * */ enum { @@ -453,7 +432,6 @@ enum * * @retval OT_ERROR_NONE Successfully added data to the send buffer. * @retval OT_ERROR_FAILED Failed to add data to the send buffer. - * */ otError otTcpSendByReference(otTcpEndpoint *aEndpoint, otLinkedBuffer *aBuffer, uint32_t aFlags); @@ -469,7 +447,6 @@ otError otTcpSendByReference(otTcpEndpoint *aEndpoint, otLinkedBuffer *aBuffer, * * @retval OT_ERROR_NONE Successfully added data to the send buffer. * @retval OT_ERROR_FAILED Failed to add data to the send buffer. - * */ otError otTcpSendByExtension(otTcpEndpoint *aEndpoint, size_t aNumBytes, uint32_t aFlags); @@ -487,7 +464,6 @@ otError otTcpSendByExtension(otTcpEndpoint *aEndpoint, size_t aNumBytes, uint32_ * * @retval OT_ERROR_NONE Successfully completed the operation. * @retval OT_ERROR_FAILED Failed to complete the operation. - * */ otError otTcpReceiveByReference(otTcpEndpoint *aEndpoint, const otLinkedBuffer **aBuffer); @@ -504,7 +480,6 @@ otError otTcpReceiveByReference(otTcpEndpoint *aEndpoint, const otLinkedBuffer * * * @retval OT_ERROR_NONE Successfully completed the operation. * @retval OT_ERROR_FAILED Failed to complete the operation. - * */ otError otTcpReceiveContiguify(otTcpEndpoint *aEndpoint); @@ -520,7 +495,6 @@ otError otTcpReceiveContiguify(otTcpEndpoint *aEndpoint); * * @retval OT_ERROR_NONE Successfully completed the receive operation. * @retval OT_ERROR_FAILED Failed to complete the receive operation. - * */ otError otTcpCommitReceive(otTcpEndpoint *aEndpoint, size_t aNumBytes, uint32_t aFlags); @@ -540,7 +514,6 @@ otError otTcpCommitReceive(otTcpEndpoint *aEndpoint, size_t aNumBytes, uint32_t * * @retval OT_ERROR_NONE Successfully queued the "end of stream" condition for transmission. * @retval OT_ERROR_FAILED Failed to queue the "end of stream" condition for transmission. - * */ otError otTcpSendEndOfStream(otTcpEndpoint *aEndpoint); @@ -558,7 +531,6 @@ otError otTcpSendEndOfStream(otTcpEndpoint *aEndpoint); * * @retval OT_ERROR_NONE Successfully aborted the TCP endpoint's connection. * @retval OT_ERROR_FAILED Failed to abort the TCP endpoint's connection. - * */ otError otTcpAbort(otTcpEndpoint *aEndpoint); @@ -579,7 +551,6 @@ otError otTcpAbort(otTcpEndpoint *aEndpoint); * * @retval OT_ERROR_NONE Successfully deinitialized the TCP endpoint. * @retval OT_ERROR_FAILED Failed to deinitialize the TCP endpoint. - * */ otError otTcpEndpointDeinitialize(otTcpEndpoint *aEndpoint); @@ -590,7 +561,6 @@ typedef struct otTcpListener otTcpListener; * Defines incoming connection actions. * * This is used in otTcpAcceptReady() callback. - * */ typedef enum otTcpIncomingConnectionAction { @@ -627,7 +597,6 @@ typedef enum otTcpIncomingConnectionAction * @param[out] aAcceptInto The TCP endpoint into which to accept the incoming connection. * * @returns Description of how to handle the incoming connection. - * */ typedef otTcpIncomingConnectionAction (*otTcpAcceptReady)(otTcpListener *aListener, const otSockAddr *aPeer, @@ -646,7 +615,6 @@ typedef otTcpIncomingConnectionAction (*otTcpAcceptReady)(otTcpListener *aLis * @param[in] aListener The TCP listener that matches the incoming connection. * @param[in] aEndpoint The TCP endpoint into which the incoming connection was accepted. * @param[in] aPeer the host and port from which the incoming connection originated. - * */ typedef void (*otTcpAcceptDone)(otTcpListener *aListener, otTcpEndpoint *aEndpoint, const otSockAddr *aPeer); @@ -668,7 +636,6 @@ typedef void (*otTcpAcceptDone)(otTcpListener *aListener, otTcpEndpoint *aEndpoi * The application should not inspect the fields of this structure directly; it * should only interact with it via the TCP API functions whose signatures are * provided in this file. - * */ struct otTcpListener { @@ -687,7 +654,6 @@ struct otTcpListener /** * Contains arguments to the otTcpListenerInitialize() function. - * */ typedef struct otTcpListenerInitializeArgs { @@ -712,7 +678,6 @@ typedef struct otTcpListenerInitializeArgs * * @retval OT_ERROR_NONE Successfully opened the TCP listener. * @retval OT_ERROR_FAILED Failed to open the TCP listener. - * */ otError otTcpListenerInitialize(otInstance *aInstance, otTcpListener *aListener, @@ -725,7 +690,6 @@ otError otTcpListenerInitialize(otInstance *aInstance, * @param[in] aListener The TCP listener whose instance to obtain. * * @returns The otInstance pointer associated with @p aListener. - * */ otInstance *otTcpListenerGetInstance(otTcpListener *aListener); @@ -736,7 +700,6 @@ otInstance *otTcpListenerGetInstance(otTcpListener *aListener); * @param[in] aListener The TCP listener whose context to obtain. * * @returns The context pointer associated with @p aListener. - * */ void *otTcpListenerGetContext(otTcpListener *aListener); @@ -749,7 +712,6 @@ void *otTcpListenerGetContext(otTcpListener *aListener); * * @retval OT_ERROR_NONE Successfully initiated listening on the TCP listener. * @retval OT_ERROR_FAILED Failed to initiate listening on the TCP listener. - * */ otError otTcpListen(otTcpListener *aListener, const otSockAddr *aSockName); @@ -760,7 +722,6 @@ otError otTcpListen(otTcpListener *aListener, const otSockAddr *aSockName); * * @retval OT_ERROR_NONE Successfully stopped listening on the TCP listener. * @retval OT_ERROR_FAILED Failed to stop listening on the TCP listener. - * */ otError otTcpStopListening(otTcpListener *aListener); @@ -778,13 +739,11 @@ otError otTcpStopListening(otTcpListener *aListener); * * @retval OT_ERROR_NONE Successfully deinitialized the TCP listener. * @retval OT_ERROR_FAILED Failed to deinitialize the TCP listener. - * */ otError otTcpListenerDeinitialize(otTcpListener *aListener); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/tcp_ext.h b/include/openthread/tcp_ext.h index 9ac705b9f18..cdb29aaa3f3 100644 --- a/include/openthread/tcp_ext.h +++ b/include/openthread/tcp_ext.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines extensions to the OpenThread TCP API. - * */ #ifndef OPENTHREAD_TCP_EXT_H_ @@ -49,7 +48,6 @@ extern "C" { * This module includes easy-to-use abstractions on top of the base TCP API. * * @{ - * */ /** @@ -84,7 +82,6 @@ extern "C" { * The application should not inspect the fields of this structure directly; it * should only interact with it via the TCP Circular Send Buffer API functions * whose signature are provided in this file. - * */ typedef struct otTcpCircularSendBuffer { @@ -109,7 +106,6 @@ void otTcpCircularSendBufferInitialize(otTcpCircularSendBuffer *aSendBuffer, voi /** * Defines flags passed to @p otTcpCircularSendBufferWrite. - * */ enum { @@ -248,7 +244,6 @@ int otTcpMbedTlsSslRecvCallback(void *aCtx, unsigned char *aBuf, size_t aLen); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/thread.h b/include/openthread/thread.h index 25de6e63cd3..0769952fe0b 100644 --- a/include/openthread/thread.h +++ b/include/openthread/thread.h @@ -50,7 +50,6 @@ extern "C" { * The functions in this module require `OPENTHREAD_FTD=1` or `OPENTHREAD_MTD=1`. * * @{ - * */ #define OT_THREAD_VERSION_INVALID 0 ///< Invalid Thread version @@ -69,7 +68,6 @@ extern "C" { /** * Represents a Thread device role. - * */ typedef enum { @@ -92,7 +90,6 @@ typedef struct otLinkModeConfig /** * Holds diagnostic information for a neighboring Thread node - * */ typedef struct { @@ -121,7 +118,6 @@ typedef int16_t otNeighborInfoIterator; ///< Used to iterate through neighbor ta /** * Represents the Thread Leader Data. - * */ typedef struct otLeaderData { @@ -134,7 +130,6 @@ typedef struct otLeaderData /** * Holds diagnostic information for a Thread Router - * */ typedef struct { @@ -152,7 +147,6 @@ typedef struct /** * Parent CSL parameters are only relevant when OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE is enabled. - * */ uint8_t mCslClockAccuracy; ///< CSL clock accuracy, in ± ppm uint8_t mCslUncertainty; ///< CSL uncertainty, in ±10 us @@ -160,7 +154,6 @@ typedef struct /** * Represents the IP level counters. - * */ typedef struct otIpCounters { @@ -172,7 +165,6 @@ typedef struct otIpCounters /** * Represents the Thread MLE counters. - * */ typedef struct otMleCounters { @@ -189,7 +181,6 @@ typedef struct otMleCounters * Role time tracking. * * When uptime feature is enabled (OPENTHREAD_CONFIG_UPTIME_ENABLE = 1) time spent in each MLE role is tracked. - * */ uint64_t mDisabledTime; ///< Number of milliseconds device has been in OT_DEVICE_ROLE_DISABLED role. uint64_t mDetachedTime; ///< Number of milliseconds device has been in OT_DEVICE_ROLE_DETACHED role. @@ -204,14 +195,12 @@ typedef struct otMleCounters * A parent change can happen if device detaches from its current parent and attaches to a different one, or even * while device is attached when the periodic parent search feature is enabled (please see option * OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE). - * */ uint16_t mParentChanges; } otMleCounters; /** * Represents the MLE Parent Response data. - * */ typedef struct otThreadParentResponseInfo { @@ -229,7 +218,6 @@ typedef struct otThreadParentResponseInfo * This callback informs the application that the detaching process has finished. * * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otDetachGracefullyCallback)(void *aContext); @@ -246,7 +234,6 @@ typedef void (*otDetachGracefullyCallback)(void *aContext); * * @retval OT_ERROR_NONE Successfully started Thread protocol operation. * @retval OT_ERROR_INVALID_STATE The network interface was not up. - * */ otError otThreadSetEnabled(otInstance *aInstance, bool aEnabled); @@ -256,7 +243,6 @@ otError otThreadSetEnabled(otInstance *aInstance, bool aEnabled); * The constants `OT_THREAD_VERSION_*` define the numerical version values. * * @returns the Thread protocol version. - * */ uint16_t otThreadGetVersion(void); @@ -267,7 +253,6 @@ uint16_t otThreadGetVersion(void); * * @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. - * */ bool otThreadIsSingleton(otInstance *aInstance); @@ -289,7 +274,6 @@ bool otThreadIsSingleton(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE The IPv6 interface is not enabled (netif is not up). * @retval OT_ERROR_NO_BUFS Could not allocate message for Discovery Request. * @retval OT_ERROR_BUSY Thread Discovery Scan is already in progress. - * */ otError otThreadDiscover(otInstance *aInstance, uint32_t aScanChannels, @@ -303,7 +287,6 @@ otError otThreadDiscover(otInstance *aInstance, * Determines if an MLE Thread Discovery is currently in progress. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ bool otThreadIsDiscoverInProgress(otInstance *aInstance); @@ -322,7 +305,6 @@ bool otThreadIsDiscoverInProgress(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set Joiner Advertisement. * @retval OT_ERROR_INVALID_ARGS Invalid AdvData. - * */ otError otThreadSetJoinerAdvertisement(otInstance *aInstance, uint32_t aOui, @@ -339,7 +321,6 @@ otError otThreadSetJoinerAdvertisement(otInstance *aInstance, * @returns The Thread Child Timeout value in seconds. * * @sa otThreadSetChildTimeout - * */ uint32_t otThreadGetChildTimeout(otInstance *aInstance); @@ -350,7 +331,6 @@ uint32_t otThreadGetChildTimeout(otInstance *aInstance); * @param[in] aTimeout The timeout value in seconds. * * @sa otThreadGetChildTimeout - * */ void otThreadSetChildTimeout(otInstance *aInstance, uint32_t aTimeout); @@ -362,7 +342,6 @@ void otThreadSetChildTimeout(otInstance *aInstance, uint32_t aTimeout); * @returns A pointer to the IEEE 802.15.4 Extended PAN ID. * * @sa otThreadSetExtendedPanId - * */ const otExtendedPanId *otThreadGetExtendedPanId(otInstance *aInstance); @@ -380,7 +359,6 @@ const otExtendedPanId *otThreadGetExtendedPanId(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetExtendedPanId - * */ otError otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *aExtendedPanId); @@ -393,7 +371,6 @@ otError otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *a * @retval OT_ERROR_NONE The Leader's RLOC was successfully written to @p aLeaderRloc. * @retval OT_ERROR_INVALID_ARGS @p aLeaderRloc was NULL. * @retval OT_ERROR_DETACHED Not currently attached to a Thread Partition. - * */ otError otThreadGetLeaderRloc(otInstance *aInstance, otIp6Address *aLeaderRloc); @@ -405,7 +382,6 @@ otError otThreadGetLeaderRloc(otInstance *aInstance, otIp6Address *aLeaderRloc); * @returns The MLE Link Mode configuration. * * @sa otThreadSetLinkMode - * */ otLinkModeConfig otThreadGetLinkMode(otInstance *aInstance); @@ -418,7 +394,6 @@ otLinkModeConfig otThreadGetLinkMode(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully set the MLE Link Mode configuration. * * @sa otThreadGetLinkMode - * */ otError otThreadSetLinkMode(otInstance *aInstance, otLinkModeConfig aConfig); @@ -429,7 +404,6 @@ otError otThreadSetLinkMode(otInstance *aInstance, otLinkModeConfig aConfig); * @param[out] aNetworkKey A pointer to an `otNetworkKey` to return the Thread Network Key. * * @sa otThreadSetNetworkKey - * */ void otThreadGetNetworkKey(otInstance *aInstance, otNetworkKey *aNetworkKey); @@ -443,7 +417,6 @@ void otThreadGetNetworkKey(otInstance *aInstance, otNetworkKey *aNetworkKey); * @returns Reference to the Thread Network Key stored in memory. * * @sa otThreadSetNetworkKeyRef - * */ otNetworkKeyRef otThreadGetNetworkKeyRef(otInstance *aInstance); @@ -461,7 +434,6 @@ otNetworkKeyRef otThreadGetNetworkKeyRef(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetNetworkKey - * */ otError otThreadSetNetworkKey(otInstance *aInstance, const otNetworkKey *aKey); @@ -481,7 +453,6 @@ otError otThreadSetNetworkKey(otInstance *aInstance, const otNetworkKey *aKey); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetNetworkKeyRef - * */ otError otThreadSetNetworkKeyRef(otInstance *aInstance, otNetworkKeyRef aKeyRef); @@ -491,7 +462,6 @@ otError otThreadSetNetworkKeyRef(otInstance *aInstance, otNetworkKeyRef aKeyRef) * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the Thread Routing Locator (RLOC) address. - * */ const otIp6Address *otThreadGetRloc(otInstance *aInstance); @@ -501,7 +471,6 @@ const otIp6Address *otThreadGetRloc(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the Mesh Local EID address. - * */ const otIp6Address *otThreadGetMeshLocalEid(otInstance *aInstance); @@ -511,7 +480,6 @@ const otIp6Address *otThreadGetMeshLocalEid(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the Mesh Local Prefix. - * */ const otMeshLocalPrefix *otThreadGetMeshLocalPrefix(otInstance *aInstance); @@ -527,7 +495,6 @@ const otMeshLocalPrefix *otThreadGetMeshLocalPrefix(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the Mesh Local Prefix. * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. - * */ otError otThreadSetMeshLocalPrefix(otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix); @@ -539,7 +506,6 @@ otError otThreadSetMeshLocalPrefix(otInstance *aInstance, const otMeshLocalPrefi * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to Thread link-local IPv6 address. - * */ const otIp6Address *otThreadGetLinkLocalIp6Address(otInstance *aInstance); @@ -556,7 +522,6 @@ const otIp6Address *otThreadGetLinkLocalIp6Address(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to Thread Link-Local All Thread Nodes multicast address. - * */ const otIp6Address *otThreadGetLinkLocalAllThreadNodesMulticastAddress(otInstance *aInstance); @@ -573,7 +538,6 @@ const otIp6Address *otThreadGetLinkLocalAllThreadNodesMulticastAddress(otInstanc * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to Thread Realm-Local All Thread Nodes multicast address. - * */ const otIp6Address *otThreadGetRealmLocalAllThreadNodesMulticastAddress(otInstance *aInstance); @@ -597,7 +561,6 @@ otError otThreadGetServiceAloc(otInstance *aInstance, uint8_t aServiceId, otIp6A * @returns A pointer to the Thread Network Name. * * @sa otThreadSetNetworkName - * */ const char *otThreadGetNetworkName(otInstance *aInstance); @@ -615,7 +578,6 @@ const char *otThreadGetNetworkName(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetNetworkName - * */ otError otThreadSetNetworkName(otInstance *aInstance, const char *aNetworkName); @@ -629,7 +591,6 @@ otError otThreadSetNetworkName(otInstance *aInstance, const char *aNetworkName); * @returns A pointer to the Thread Domain Name. * * @sa otThreadSetDomainName - * */ const char *otThreadGetDomainName(otInstance *aInstance); @@ -645,7 +606,6 @@ const char *otThreadGetDomainName(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetDomainName - * */ otError otThreadSetDomainName(otInstance *aInstance, const char *aDomainName); @@ -678,7 +638,6 @@ otError otThreadSetFixedDuaInterfaceIdentifier(otInstance *aInstance, const otIp * @returns A pointer to the Interface Identifier which was set manually, or NULL if none was set. * * @sa otThreadSetFixedDuaInterfaceIdentifier - * */ const otIp6InterfaceIdentifier *otThreadGetFixedDuaInterfaceIdentifier(otInstance *aInstance); @@ -690,7 +649,6 @@ const otIp6InterfaceIdentifier *otThreadGetFixedDuaInterfaceIdentifier(otInstanc * @returns The thrKeySequenceCounter value. * * @sa otThreadSetKeySequenceCounter - * */ uint32_t otThreadGetKeySequenceCounter(otInstance *aInstance); @@ -704,7 +662,6 @@ uint32_t otThreadGetKeySequenceCounter(otInstance *aInstance); * @param[in] aKeySequenceCounter The thrKeySequenceCounter value. * * @sa otThreadGetKeySequenceCounter - * */ void otThreadSetKeySequenceCounter(otInstance *aInstance, uint32_t aKeySequenceCounter); @@ -716,7 +673,6 @@ void otThreadSetKeySequenceCounter(otInstance *aInstance, uint32_t aKeySequenceC * @returns The thrKeySwitchGuardTime value (in hours). * * @sa otThreadSetKeySwitchGuardTime - * */ uint16_t otThreadGetKeySwitchGuardTime(otInstance *aInstance); @@ -730,7 +686,6 @@ uint16_t otThreadGetKeySwitchGuardTime(otInstance *aInstance); * @param[in] aKeySwitchGuardTime The thrKeySwitchGuardTime value (in hours). * * @sa otThreadGetKeySwitchGuardTime - * */ void otThreadSetKeySwitchGuardTime(otInstance *aInstance, uint16_t aKeySwitchGuardTime); @@ -741,7 +696,6 @@ void otThreadSetKeySwitchGuardTime(otInstance *aInstance, uint16_t aKeySwitchGua * * @retval OT_ERROR_NONE Successfully detached from the Thread network. * @retval OT_ERROR_INVALID_STATE Thread is disabled. - * */ otError otThreadBecomeDetached(otInstance *aInstance); @@ -755,7 +709,6 @@ otError otThreadBecomeDetached(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully begin attempt to become a child. * @retval OT_ERROR_INVALID_STATE Thread is disabled. - * */ otError otThreadBecomeChild(otInstance *aInstance); @@ -771,7 +724,6 @@ otError otThreadBecomeChild(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully found the next neighbor entry in table. * @retval OT_ERROR_NOT_FOUND No subsequent neighbor entry exists in the table. * @retval OT_ERROR_INVALID_ARGS @p aIterator or @p aInfo was NULL. - * */ otError otThreadGetNextNeighborInfo(otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo); @@ -785,7 +737,6 @@ otError otThreadGetNextNeighborInfo(otInstance *aInstance, otNeighborInfoIterato * @retval OT_DEVICE_ROLE_CHILD The device is currently operating as a Thread Child. * @retval OT_DEVICE_ROLE_ROUTER The device is currently operating as a Thread Router. * @retval OT_DEVICE_ROLE_LEADER The device is currently operating as a Thread Leader. - * */ otDeviceRole otThreadGetDeviceRole(otInstance *aInstance); @@ -795,7 +746,6 @@ otDeviceRole otThreadGetDeviceRole(otInstance *aInstance); * @param[in] aRole The device role to convert. * * @returns A string representing @p aRole. - * */ const char *otThreadDeviceRoleToString(otDeviceRole aRole); @@ -807,7 +757,6 @@ const char *otThreadDeviceRoleToString(otDeviceRole aRole); * * @retval OT_ERROR_NONE Successfully retrieved the leader data. * @retval OT_ERROR_DETACHED Not currently attached. - * */ otError otThreadGetLeaderData(otInstance *aInstance, otLeaderData *aLeaderData); @@ -817,7 +766,6 @@ otError otThreadGetLeaderData(otInstance *aInstance, otLeaderData *aLeaderData); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Leader's Router ID. - * */ uint8_t otThreadGetLeaderRouterId(otInstance *aInstance); @@ -827,7 +775,6 @@ uint8_t otThreadGetLeaderRouterId(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Leader's Weight. - * */ uint8_t otThreadGetLeaderWeight(otInstance *aInstance); @@ -837,7 +784,6 @@ uint8_t otThreadGetLeaderWeight(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Partition ID. - * */ uint32_t otThreadGetPartitionId(otInstance *aInstance); @@ -847,7 +793,6 @@ uint32_t otThreadGetPartitionId(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The RLOC16. - * */ uint16_t otThreadGetRloc16(otInstance *aInstance); @@ -856,7 +801,6 @@ uint16_t otThreadGetRloc16(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aParentInfo A pointer to where the parent router information is placed. - * */ otError otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo); @@ -865,7 +809,6 @@ otError otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[out] aParentRssi A pointer to where the parent RSSI should be placed. - * */ otError otThreadGetParentAverageRssi(otInstance *aInstance, int8_t *aParentRssi); @@ -878,7 +821,6 @@ otError otThreadGetParentAverageRssi(otInstance *aInstance, int8_t *aParentRssi) * @retval OT_ERROR_NONE Successfully retrieved the RSSI data. * @retval OT_ERROR_FAILED Unable to get RSSI data. * @retval OT_ERROR_INVALID_ARGS @p aLastRssi is NULL. - * */ otError otThreadGetParentLastRssi(otInstance *aInstance, int8_t *aLastRssi); @@ -889,7 +831,6 @@ otError otThreadGetParentLastRssi(otInstance *aInstance, int8_t *aLastRssi); * * @retval OT_ERROR_NONE Successfully started the process to search for a better parent. * @retval OT_ERROR_INVALID_STATE Device role is not child. - * */ otError otThreadSearchForBetterParent(otInstance *aInstance); @@ -899,7 +840,6 @@ otError otThreadSearchForBetterParent(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the IPv6 counters. - * */ const otIpCounters *otThreadGetIp6Counters(otInstance *aInstance); @@ -907,7 +847,6 @@ const otIpCounters *otThreadGetIp6Counters(otInstance *aInstance); * Resets the IPv6 counters. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otThreadResetIp6Counters(otInstance *aInstance); @@ -937,7 +876,6 @@ void otThreadResetIp6Counters(otInstance *aInstance); * @param[out] aBinInterval Pointer to return the histogram bin interval length in milliseconds. * * @returns A pointer to an array of @p aNumBins entries representing the collected histogram info. - * */ const uint32_t *otThreadGetTimeInQueueHistogram(otInstance *aInstance, uint16_t *aNumBins, uint32_t *aBinInterval); @@ -954,7 +892,6 @@ const uint32_t *otThreadGetTimeInQueueHistogram(otInstance *aInstance, uint16_t * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The maximum time-in-queue in milliseconds for all messages in the TX queue (so far). - * */ uint32_t otThreadGetMaxTimeInQueue(otInstance *aInstance); @@ -964,7 +901,6 @@ uint32_t otThreadGetMaxTimeInQueue(otInstance *aInstance); * Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otThreadResetTimeInQueueStat(otInstance *aInstance); @@ -974,7 +910,6 @@ void otThreadResetTimeInQueueStat(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the Thread MLE counters. - * */ const otMleCounters *otThreadGetMleCounters(otInstance *aInstance); @@ -982,7 +917,6 @@ const otMleCounters *otThreadGetMleCounters(otInstance *aInstance); * Resets the Thread MLE counters. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otThreadResetMleCounters(otInstance *aInstance); @@ -993,7 +927,6 @@ void otThreadResetMleCounters(otInstance *aInstance); * * @param[in] aInfo A pointer to a location on stack holding the stats data. * @param[in] aContext A pointer to callback client-specific context. - * */ typedef void (*otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo, void *aContext); @@ -1005,7 +938,6 @@ typedef void (*otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo * @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. * @param[in] aContext A pointer to callback client-specific context. - * */ void otThreadRegisterParentResponseCallback(otInstance *aInstance, otThreadParentResponseCallback aCallback, @@ -1013,7 +945,6 @@ void otThreadRegisterParentResponseCallback(otInstance *aInst /** * Represents the Thread Discovery Request data. - * */ typedef struct otThreadDiscoveryRequestInfo { @@ -1027,7 +958,6 @@ typedef struct otThreadDiscoveryRequestInfo * * @param[in] aInfo A pointer to the Discovery Request info data. * @param[in] aContext A pointer to callback application-specific context. - * */ typedef void (*otThreadDiscoveryRequestCallback)(const otThreadDiscoveryRequestInfo *aInfo, void *aContext); @@ -1037,7 +967,6 @@ typedef void (*otThreadDiscoveryRequestCallback)(const otThreadDiscoveryRequestI * @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. * @param[in] aContext A pointer to callback application-specific context. - * */ void otThreadSetDiscoveryRequestCallback(otInstance *aInstance, otThreadDiscoveryRequestCallback aCallback, @@ -1054,7 +983,6 @@ void otThreadSetDiscoveryRequestCallback(otInstance *aInsta * @param[in] aMeshLocalAddress A pointer to the mesh-local EID of the closest destination of the anycast address * when @p aError is OT_ERROR_NONE, NULL otherwise. * @param[in] aRloc16 The RLOC16 of the destination if found, otherwise invalid RLOC16 (0xfffe). - * */ typedef void (*otThreadAnycastLocatorCallback)(void *aContext, otError aError, @@ -1076,7 +1004,6 @@ typedef void (*otThreadAnycastLocatorCallback)(void *aContext, * @retval OT_ERROR_NONE The request started successfully. @p aCallback will be invoked to report the result. * @retval OT_ERROR_INVALID_ARGS The @p aAnycastAddress is not a valid anycast address or @p aCallback is NULL. * @retval OT_ERROR_NO_BUFS Out of buffer to prepare and send the request message. - * */ otError otThreadLocateAnycastDestination(otInstance *aInstance, const otIp6Address *aAnycastAddress, @@ -1091,7 +1018,6 @@ otError otThreadLocateAnycastDestination(otInstance *aInstanc * @param[in] aInstance A pointer to an OpenThread instance. * * @returns TRUE if an anycast locate request is currently in progress, FALSE otherwise. - * */ bool otThreadIsAnycastLocateInProgress(otInstance *aInstance); @@ -1104,7 +1030,6 @@ bool otThreadIsAnycastLocateInProgress(otInstance *aInstance); * @param[in] aDestination The destination to send the ADDR_NTF.ntf message. * @param[in] aTarget The target address of the ADDR_NTF.ntf message. * @param[in] aMlIid The ML-IID of the ADDR_NTF.ntf message. - * */ void otThreadSendAddressNotification(otInstance *aInstance, otIp6Address *aDestination, @@ -1123,7 +1048,6 @@ void otThreadSendAddressNotification(otInstance *aInstance, * * @retval OT_ERROR_NONE Successfully sent PRO_BB.ntf on backbone link. * @retval OT_ERROR_NO_BUFS If insufficient message buffers available. - * */ otError otThreadSendProactiveBackboneNotification(otInstance *aInstance, otIp6Address *aTarget, @@ -1141,7 +1065,6 @@ otError otThreadSendProactiveBackboneNotification(otInstance *aIns * * @retval OT_ERROR_NONE Successfully started detaching. * @retval OT_ERROR_BUSY Detaching is already in progress. - * */ otError otThreadDetachGracefully(otInstance *aInstance, otDetachGracefullyCallback aCallback, void *aContext); @@ -1163,7 +1086,6 @@ otError otThreadDetachGracefully(otInstance *aInstance, otDetachGracefullyCallba * @param[in] aDuration A duration interval in seconds. * @param[out] aBuffer A pointer to a char array to output the string. * @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use `OT_DURATION_STRING_SIZE`. - * */ void otConvertDurationInSecondsToString(uint32_t aDuration, char *aBuffer, uint16_t aSize); @@ -1178,7 +1100,6 @@ void otConvertDurationInSecondsToString(uint32_t aDuration, char *aBuffer, uint1 * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aStoreFrameCounterAhead The store frame counter ahead to set. - * */ void otThreadSetStoreFrameCounterAhead(otInstance *aInstance, uint32_t aStoreFrameCounterAhead); @@ -1190,13 +1111,11 @@ void otThreadSetStoreFrameCounterAhead(otInstance *aInstance, uint32_t aStoreFra * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The current store frame counter ahead. - * */ uint32_t otThreadGetStoreFrameCounterAhead(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/thread_ftd.h b/include/openthread/thread_ftd.h index 8c5491c760f..dbe06c3419d 100644 --- a/include/openthread/thread_ftd.h +++ b/include/openthread/thread_ftd.h @@ -47,12 +47,10 @@ extern "C" { * @addtogroup api-thread-router * * @{ - * */ /** * Holds diagnostic information for a Thread Child - * */ typedef struct { @@ -84,7 +82,6 @@ typedef uint16_t otChildIp6AddressIterator; ///< Used to iterate through IPv6 ad /** * Defines the EID cache entry state. - * */ typedef enum otCacheEntryState { @@ -96,7 +93,6 @@ typedef enum otCacheEntryState /** * Represents an EID cache entry. - * */ typedef struct otCacheEntryInfo { @@ -117,7 +113,6 @@ typedef struct otCacheEntryInfo * * 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). - * */ typedef struct otCacheEntryIterator { @@ -132,7 +127,6 @@ typedef struct otCacheEntryIterator * @returns The maximum number of children currently allowed. * * @sa otThreadSetMaxAllowedChildren - * */ uint16_t otThreadGetMaxAllowedChildren(otInstance *aInstance); @@ -149,7 +143,6 @@ uint16_t otThreadGetMaxAllowedChildren(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE If Thread isn't stopped. * * @sa otThreadGetMaxAllowedChildren - * */ otError otThreadSetMaxAllowedChildren(otInstance *aInstance, uint16_t aMaxChildren); @@ -160,7 +153,6 @@ otError otThreadSetMaxAllowedChildren(otInstance *aInstance, uint16_t aMaxChildr * * @retval TRUE If device is router-eligible. * @retval FALSE If device is not router-eligible. - * */ bool otThreadIsRouterEligible(otInstance *aInstance); @@ -175,7 +167,6 @@ bool otThreadIsRouterEligible(otInstance *aInstance); * * @retval OT_ERROR_NONE Successfully set the router-eligible configuration. * @retval OT_ERROR_NOT_CAPABLE The device is not capable of becoming a router. - * */ otError otThreadSetRouterEligible(otInstance *aInstance, bool aEligible); @@ -194,7 +185,6 @@ otError otThreadSetRouterEligible(otInstance *aInstance, bool aEligible); * * @retval OT_ERROR_NONE Successfully set the preferred Router Id. * @retval OT_ERROR_INVALID_STATE Could not set (role is not detached or disabled) - * */ otError otThreadSetPreferredRouterId(otInstance *aInstance, uint8_t aRouterId); @@ -202,7 +192,6 @@ otError otThreadSetPreferredRouterId(otInstance *aInstance, uint8_t aRouterId); * Represents the power supply property on a device. * * This is used as a property in `otDeviceProperties` to calculate the leader weight. - * */ typedef enum { @@ -223,7 +212,6 @@ typedef enum * - Device internally detects that it loses external power supply more often than usual. What is usual is * determined by the vendor. * - Device internally detects that it reboots more often than usual. What is usual is determined by the vendor. - * */ typedef struct otDeviceProperties { @@ -240,7 +228,6 @@ typedef struct otDeviceProperties * Requires `OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE`. * * @returns The device properties `otDeviceProperties`. - * */ const otDeviceProperties *otThreadGetDeviceProperties(otInstance *aInstance); @@ -251,7 +238,6 @@ const otDeviceProperties *otThreadGetDeviceProperties(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aDeviceProperties The device properties. - * */ void otThreadSetDeviceProperties(otInstance *aInstance, const otDeviceProperties *aDeviceProperties); @@ -264,7 +250,6 @@ void otThreadSetDeviceProperties(otInstance *aInstance, const otDeviceProperties * * @sa otThreadSetLeaderWeight * @sa otThreadSetDeviceProperties - * */ uint8_t otThreadGetLocalLeaderWeight(otInstance *aInstance); @@ -278,7 +263,6 @@ uint8_t otThreadGetLocalLeaderWeight(otInstance *aInstance); * @param[in] aWeight The Thread Leader Weight value. * * @sa otThreadGetLeaderWeight - * */ void otThreadSetLocalLeaderWeight(otInstance *aInstance, uint8_t aWeight); @@ -288,7 +272,6 @@ void otThreadSetLocalLeaderWeight(otInstance *aInstance, uint8_t aWeight); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Thread Leader Partition Id value. - * */ uint32_t otThreadGetPreferredLeaderPartitionId(otInstance *aInstance); @@ -297,7 +280,6 @@ uint32_t otThreadGetPreferredLeaderPartitionId(otInstance *aInstance); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aPartitionId The Thread Leader Partition Id value. - * */ void otThreadSetPreferredLeaderPartitionId(otInstance *aInstance, uint32_t aPartitionId); @@ -309,7 +291,6 @@ void otThreadSetPreferredLeaderPartitionId(otInstance *aInstance, uint32_t aPart * @returns The Joiner UDP Port number. * * @sa otThreadSetJoinerUdpPort - * */ uint16_t otThreadGetJoinerUdpPort(otInstance *aInstance); @@ -322,7 +303,6 @@ uint16_t otThreadGetJoinerUdpPort(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully set the Joiner UDP Port. * * @sa otThreadGetJoinerUdpPort - * */ otError otThreadSetJoinerUdpPort(otInstance *aInstance, uint16_t aJoinerUdpPort); @@ -337,7 +317,6 @@ otError otThreadSetJoinerUdpPort(otInstance *aInstance, uint16_t aJoinerUdpPort) * All zeros to clear the steering data (no steering data). * All 0xFFs to set steering data/bloom filter to accept/allow all. * A specific EUI64 which is then added to current steering data/bloom filter. - * */ void otThreadSetSteeringData(otInstance *aInstance, const otExtAddress *aExtAddress); @@ -349,7 +328,6 @@ void otThreadSetSteeringData(otInstance *aInstance, const otExtAddress *aExtAddr * @returns The CONTEXT_ID_REUSE_DELAY value. * * @sa otThreadSetContextIdReuseDelay - * */ uint32_t otThreadGetContextIdReuseDelay(otInstance *aInstance); @@ -363,7 +341,6 @@ uint32_t otThreadGetContextIdReuseDelay(otInstance *aInstance); * @param[in] aDelay The CONTEXT_ID_REUSE_DELAY value. * * @sa otThreadGetContextIdReuseDelay - * */ void otThreadSetContextIdReuseDelay(otInstance *aInstance, uint32_t aDelay); @@ -378,7 +355,6 @@ void otThreadSetContextIdReuseDelay(otInstance *aInstance, uint32_t aDelay); * @returns The `NETWORK_ID_TIMEOUT` value. * * @sa otThreadSetNetworkIdTimeout - * */ uint8_t otThreadGetNetworkIdTimeout(otInstance *aInstance); @@ -392,7 +368,6 @@ uint8_t otThreadGetNetworkIdTimeout(otInstance *aInstance); * @param[in] aTimeout The `NETWORK_ID_TIMEOUT` value. * * @sa otThreadGetNetworkIdTimeout - * */ void otThreadSetNetworkIdTimeout(otInstance *aInstance, uint8_t aTimeout); @@ -404,7 +379,6 @@ void otThreadSetNetworkIdTimeout(otInstance *aInstance, uint8_t aTimeout); * @returns The ROUTER_UPGRADE_THRESHOLD value. * * @sa otThreadSetRouterUpgradeThreshold - * */ uint8_t otThreadGetRouterUpgradeThreshold(otInstance *aInstance); @@ -418,7 +392,6 @@ uint8_t otThreadGetRouterUpgradeThreshold(otInstance *aInstance); * @param[in] aThreshold The ROUTER_UPGRADE_THRESHOLD value. * * @sa otThreadGetRouterUpgradeThreshold - * */ void otThreadSetRouterUpgradeThreshold(otInstance *aInstance, uint8_t aThreshold); @@ -433,7 +406,6 @@ void otThreadSetRouterUpgradeThreshold(otInstance *aInstance, uint8_t aThreshold * @returns The MLE_CHILD_ROUTER_LINKS value. * * @sa otThreadSetChildRouterLinks - * */ uint8_t otThreadGetChildRouterLinks(otInstance *aInstance); @@ -447,7 +419,6 @@ uint8_t otThreadGetChildRouterLinks(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetChildRouterLinks - * */ otError otThreadSetChildRouterLinks(otInstance *aInstance, uint8_t aChildRouterLinks); @@ -464,7 +435,6 @@ otError otThreadSetChildRouterLinks(otInstance *aInstance, uint8_t aChildRouterL * @retval OT_ERROR_INVALID_ARGS @p aRouterId is not in the range [0, 62]. * @retval OT_ERROR_INVALID_STATE The device is not currently operating as a leader. * @retval OT_ERROR_NOT_FOUND The router id is not currently allocated. - * */ otError otThreadReleaseRouterId(otInstance *aInstance, uint8_t aRouterId); @@ -513,7 +483,6 @@ otError otThreadBecomeLeader(otInstance *aInstance); * @returns The ROUTER_DOWNGRADE_THRESHOLD value. * * @sa otThreadSetRouterDowngradeThreshold - * */ uint8_t otThreadGetRouterDowngradeThreshold(otInstance *aInstance); @@ -527,7 +496,6 @@ uint8_t otThreadGetRouterDowngradeThreshold(otInstance *aInstance); * @param[in] aThreshold The ROUTER_DOWNGRADE_THRESHOLD value. * * @sa otThreadGetRouterDowngradeThreshold - * */ void otThreadSetRouterDowngradeThreshold(otInstance *aInstance, uint8_t aThreshold); @@ -539,7 +507,6 @@ void otThreadSetRouterDowngradeThreshold(otInstance *aInstance, uint8_t aThresho * @returns The ROUTER_SELECTION_JITTER value. * * @sa otThreadSetRouterSelectionJitter - * */ uint8_t otThreadGetRouterSelectionJitter(otInstance *aInstance); @@ -553,7 +520,6 @@ uint8_t otThreadGetRouterSelectionJitter(otInstance *aInstance); * @param[in] aRouterJitter The ROUTER_SELECTION_JITTER value. * * @sa otThreadGetRouterSelectionJitter - * */ void otThreadSetRouterSelectionJitter(otInstance *aInstance, uint8_t aRouterJitter); @@ -567,7 +533,6 @@ void otThreadSetRouterSelectionJitter(otInstance *aInstance, uint8_t aRouterJitt * @retval OT_ERROR_NONE @p aChildInfo was successfully updated with the info for the given ID. * @retval OT_ERROR_NOT_FOUND No valid child with this Child ID. * @retval OT_ERROR_INVALID_ARGS If @p aChildInfo is NULL. - * */ otError otThreadGetChildInfoById(otInstance *aInstance, uint16_t aChildId, otChildInfo *aChildInfo); @@ -584,7 +549,6 @@ otError otThreadGetChildInfoById(otInstance *aInstance, uint16_t aChildId, otChi * than max table index). * * @sa otGetMaxAllowedChildren - * */ otError otThreadGetChildInfoByIndex(otInstance *aInstance, uint16_t aChildIndex, otChildInfo *aChildInfo); @@ -603,7 +567,6 @@ otError otThreadGetChildInfoByIndex(otInstance *aInstance, uint16_t aChildIndex, * @retval OT_ERROR_INVALID_ARGS @p aIterator or @p aAddress are NULL, or child at @p aChildIndex is not valid. * * @sa otThreadGetChildInfoByIndex - * */ otError otThreadGetChildNextIp6Address(otInstance *aInstance, uint16_t aChildIndex, @@ -616,7 +579,6 @@ otError otThreadGetChildNextIp6Address(otInstance *aInstance, * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The Router ID Sequence. - * */ uint8_t otThreadGetRouterIdSequence(otInstance *aInstance); @@ -626,7 +588,6 @@ uint8_t otThreadGetRouterIdSequence(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The maximum allowed router ID. - * */ uint8_t otThreadGetMaxRouterId(otInstance *aInstance); @@ -640,7 +601,6 @@ uint8_t otThreadGetMaxRouterId(otInstance *aInstance); * @retval OT_ERROR_NONE Successfully retrieved the router info for given id. * @retval OT_ERROR_NOT_FOUND No router entry with the given id. * @retval OT_ERROR_INVALID_ARGS @p aRouterInfo is NULL. - * */ otError otThreadGetRouterInfo(otInstance *aInstance, uint16_t aRouterId, otRouterInfo *aRouterInfo); @@ -655,7 +615,6 @@ otError otThreadGetRouterInfo(otInstance *aInstance, uint16_t aRouterId, otRoute * * @retval OT_ERROR_NONE Successfully populated @p aEntryInfo for next EID cache entry. * @retval OT_ERROR_NOT_FOUND No more entries in the address cache table. - * */ otError otThreadGetNextCacheEntry(otInstance *aInstance, otCacheEntryInfo *aEntryInfo, otCacheEntryIterator *aIterator); @@ -666,7 +625,6 @@ otError otThreadGetNextCacheEntry(otInstance *aInstance, otCacheEntryInfo *aEntr * @param[out] aPskc A pointer to an `otPskc` to return the retrieved Thread PSKc. * * @sa otThreadSetPskc - * */ void otThreadGetPskc(otInstance *aInstance, otPskc *aPskc); @@ -680,7 +638,6 @@ void otThreadGetPskc(otInstance *aInstance, otPskc *aPskc); * @returns Key Reference to PSKc * * @sa otThreadSetPskcRef - * */ otPskcRef otThreadGetPskcRef(otInstance *aInstance); @@ -698,7 +655,6 @@ otPskcRef otThreadGetPskcRef(otInstance *aInstance); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetPskc - * */ otError otThreadSetPskc(otInstance *aInstance, const otPskc *aPskc); @@ -718,7 +674,6 @@ otError otThreadSetPskc(otInstance *aInstance, const otPskc *aPskc); * @retval OT_ERROR_INVALID_STATE Thread protocols are enabled. * * @sa otThreadGetPskcRef - * */ otError otThreadSetPskcRef(otInstance *aInstance, otPskcRef aKeyRef); @@ -730,7 +685,6 @@ otError otThreadSetPskcRef(otInstance *aInstance, otPskcRef aKeyRef); * @returns The assigned parent priority value, -2 means not assigned. * * @sa otThreadSetParentPriority - * */ int8_t otThreadGetParentPriority(otInstance *aInstance); @@ -747,7 +701,6 @@ int8_t otThreadGetParentPriority(otInstance *aInstance); * @retval OT_ERROR_INVALID_ARGS If the parent priority value is not among 1, 0, -1 and -2. * * @sa otThreadGetParentPriority - * */ otError otThreadSetParentPriority(otInstance *aInstance, int8_t aParentPriority); @@ -759,7 +712,6 @@ otError otThreadSetParentPriority(otInstance *aInstance, int8_t aParentPriority) * @returns The maximum number of IP addresses that each MTD child may register with this device as parent. * * @sa otThreadSetMaxChildIpAddresses - * */ uint8_t otThreadGetMaxChildIpAddresses(otInstance *aInstance); @@ -782,13 +734,11 @@ uint8_t otThreadGetMaxChildIpAddresses(otInstance *aInstance); * @retval OT_ERROR_INVALID_ARGS If exceeds the allowed maximum number. * * @sa otThreadGetMaxChildIpAddresses - * */ otError otThreadSetMaxChildIpAddresses(otInstance *aInstance, uint8_t aMaxIpAddresses); /** * Defines the constants used in `otNeighborTableCallback` to indicate changes in neighbor table. - * */ typedef enum { @@ -802,7 +752,6 @@ typedef enum /** * Represent a neighbor table entry info (child or router) and is used as a parameter in the neighbor table * callback `otNeighborTableCallback`. - * */ typedef struct { @@ -819,7 +768,6 @@ typedef struct * * @param[in] aEvent A event flag. * @param[in] aEntryInfo A pointer to table entry info. - * */ typedef void (*otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo); @@ -834,7 +782,6 @@ typedef void (*otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNei * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aCallback A pointer to callback handler function. - * */ void otThreadRegisterNeighborTableCallback(otInstance *aInstance, otNeighborTableCallback aCallback); @@ -846,7 +793,6 @@ void otThreadRegisterNeighborTableCallback(otInstance *aInstance, otNeighborTabl * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled TRUE if the device was commissioned using CCM, FALSE otherwise. - * */ void otThreadSetCcmEnabled(otInstance *aInstance, bool aEnabled); @@ -858,7 +804,6 @@ void otThreadSetCcmEnabled(otInstance *aInstance, bool aEnabled); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled TRUE to enable Security Policy TLV version-threshold for routing, FALSE otherwise. - * */ void otThreadSetThreadVersionCheckEnabled(otInstance *aInstance, bool aEnabled); @@ -877,7 +822,6 @@ void otThreadSetThreadVersionCheckEnabled(otInstance *aInstance, bool aEnabled); * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnabled TRUE to enable filter, FALSE otherwise. - * */ void otThreadSetTmfOriginFilterEnabled(otInstance *aInstance, bool aEnabled); @@ -888,7 +832,6 @@ void otThreadSetTmfOriginFilterEnabled(otInstance *aInstance, bool aEnabled); * * @retval TRUE The filter is enabled. * @retval FALSE The filter is not enabled. - * */ bool otThreadIsTmfOriginFilterEnabled(otInstance *aInstance); @@ -903,7 +846,6 @@ bool otThreadIsTmfOriginFilterEnabled(otInstance *aInstance); * @param[out] aMaxRouterId The maximum router ID. * * @sa otThreadSetRouterIdRange - * */ void otThreadGetRouterIdRange(otInstance *aInstance, uint8_t *aMinRouterId, uint8_t *aMaxRouterId); @@ -921,7 +863,6 @@ void otThreadGetRouterIdRange(otInstance *aInstance, uint8_t *aMinRouterId, uint * @retval OT_ERROR_INVALID_ARGS aMinRouterId > aMaxRouterId, or the range is not covered by [0, 62]. * * @sa otThreadGetRouterIdRange - * */ otError otThreadSetRouterIdRange(otInstance *aInstance, uint8_t aMinRouterId, uint8_t aMaxRouterId); @@ -931,7 +872,6 @@ otError otThreadSetRouterIdRange(otInstance *aInstance, uint8_t aMinRouterId, ui * This API requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`, and is intended for testing only. * * @returns The Interval Max of Advertisement trickle timer in milliseconds. - * */ uint32_t otThreadGetAdvertisementTrickleIntervalMax(otInstance *aInstance); @@ -943,7 +883,6 @@ uint32_t otThreadGetAdvertisementTrickleIntervalMax(otInstance *aInstance); * * @retval TRUE The @p aRouterId is allocated. * @retval FALSE The @p aRouterId is not allocated. - * */ bool otThreadIsRouterIdAllocated(otInstance *aInstance, uint8_t aRouterId); @@ -957,7 +896,6 @@ bool otThreadIsRouterIdAllocated(otInstance *aInstance, uint8_t aRouterId); * @param[in] aDestRloc16 The RLOC16 of destination. * @param[out] aNextHopRloc16 A pointer to return RLOC16 of next hop, 0xfffe if no next hop. * @param[out] aPathCost A pointer to return path cost towards destination. - * */ void otThreadGetNextHopAndPathCost(otInstance *aInstance, uint16_t aDestRloc16, @@ -966,7 +904,6 @@ void otThreadGetNextHopAndPathCost(otInstance *aInstance, /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/trel.h b/include/openthread/trel.h index aa1cfc1473a..271d68677de 100644 --- a/include/openthread/trel.h +++ b/include/openthread/trel.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines the OpenThread TREL (Thread Radio Encapsulation Link) APIs for Thread Over Infrastructure. - * */ #ifndef OPENTHREAD_TREL_H_ @@ -54,12 +53,10 @@ extern "C" { * The functions in this module require `OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE` to be enabled. * * @{ - * */ /** * Represents a TREL peer. - * */ typedef struct otTrelPeer { @@ -70,7 +67,6 @@ typedef struct otTrelPeer /** * Represents an iterator for iterating over TREL peer table entries. - * */ typedef uint16_t otTrelPeerIterator; @@ -89,7 +85,6 @@ typedef uint16_t otTrelPeerIterator; * * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aEnable A boolean to enable/disable the TREL operation. - * */ void otTrelSetEnabled(otInstance *aInstance, bool aEnable); @@ -100,7 +95,6 @@ void otTrelSetEnabled(otInstance *aInstance, bool aEnable); * * @retval TRUE if the TREL operation is enabled. * @retval FALSE if the TREL operation is disabled. - * */ bool otTrelIsEnabled(otInstance *aInstance); @@ -109,7 +103,6 @@ bool otTrelIsEnabled(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance. * @param[in] aIterator The iterator to initialize. - * */ void otTrelInitPeerIterator(otInstance *aInstance, otTrelPeerIterator *aIterator); @@ -120,7 +113,6 @@ void otTrelInitPeerIterator(otInstance *aInstance, otTrelPeerIterator *aIterator * @param[in] aIterator The iterator. MUST be initialized. * * @returns A pointer to the next `otTrelPeer` entry or `NULL` if no more entries in the table. - * */ const otTrelPeer *otTrelGetNextPeer(otInstance *aInstance, otTrelPeerIterator *aIterator); @@ -130,7 +122,6 @@ const otTrelPeer *otTrelGetNextPeer(otInstance *aInstance, otTrelPeerIterator *a * @param[in] aInstance A pointer to an OpenThread instance. * * @returns The number of TREL peers. - * */ uint16_t otTrelGetNumberOfPeers(otInstance *aInstance); @@ -145,7 +136,6 @@ uint16_t otTrelGetNumberOfPeers(otInstance *aInstance); * * @param[in] aInstance The OpenThread instance. * @param[in] aFiltered TRUE to enable filter mode, FALSE to disable filter mode. - * */ void otTrelSetFilterEnabled(otInstance *aInstance, bool aEnable); @@ -156,13 +146,11 @@ void otTrelSetFilterEnabled(otInstance *aInstance, bool aEnable); * * @retval TRUE if the TREL filter mode is enabled. * @retval FALSE if the TREL filter mode is disabled. - * */ bool otTrelIsFilterEnabled(otInstance *aInstance); /** * Represents a group of TREL related counters. - * */ typedef otPlatTrelCounters otTrelCounters; @@ -172,7 +160,6 @@ typedef otPlatTrelCounters otTrelCounters; * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the TREL counters. - * */ const otTrelCounters *otTrelGetCounters(otInstance *aInstance); @@ -180,7 +167,6 @@ const otTrelCounters *otTrelGetCounters(otInstance *aInstance); * Resets the TREL counters. * * @param[in] aInstance A pointer to an OpenThread instance. - * */ void otTrelResetCounters(otInstance *aInstance); @@ -190,13 +176,11 @@ void otTrelResetCounters(otInstance *aInstance); * @param[in] aInstance A pointer to an OpenThread instance. * * @returns UDP port of the TREL interface. - * */ uint16_t otTrelGetUdpPort(otInstance *aInstance); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/udp.h b/include/openthread/udp.h index 3512b7bdc12..78a0c107bdd 100644 --- a/include/openthread/udp.h +++ b/include/openthread/udp.h @@ -30,7 +30,6 @@ * @file * @brief * This file defines the OpenThread UDP API. - * */ #ifndef OPENTHREAD_UDP_H_ @@ -50,7 +49,6 @@ extern "C" { * This module includes functions that control UDP communication. * * @{ - * */ /** @@ -58,13 +56,11 @@ extern "C" { * * @retval true The message is handled by this receiver and should not be further processed. * @retval false The message is not handled by this receiver. - * */ typedef bool (*otUdpHandler)(void *aContext, const otMessage *aMessage, const otMessageInfo *aMessageInfo); /** * Represents a UDP receiver. - * */ typedef struct otUdpReceiver { @@ -81,7 +77,6 @@ typedef struct otUdpReceiver * * @retval OT_ERROR_NONE The receiver is successfully added. * @retval OT_ERROR_ALREADY The UDP receiver was already added. - * */ otError otUdpAddReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver); @@ -93,7 +88,6 @@ otError otUdpAddReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver); * * @retval OT_ERROR_NONE The receiver is successfully removed. * @retval OT_ERROR_NOT_FOUND The UDP receiver was not added. - * */ otError otUdpRemoveReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver); @@ -107,19 +101,16 @@ otError otUdpRemoveReceiver(otInstance *aInstance, otUdpReceiver *aUdpReceiver); * @retval OT_ERROR_NONE Successfully enqueued the message into an output interface. * @retval OT_ERROR_NO_BUFS Insufficient available buffer to add the IPv6 headers. * @retval OT_ERROR_INVALID_ARGS Invalid arguments are given. - * */ otError otUdpSendDatagram(otInstance *aInstance, otMessage *aMessage, otMessageInfo *aMessageInfo); /** * This callback allows OpenThread to inform the application of a received UDP message. - * */ typedef void (*otUdpReceive)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo); /** * Represents a UDP socket. - * */ typedef struct otUdpSocket { @@ -133,7 +124,6 @@ typedef struct otUdpSocket /** * Defines the OpenThread network interface identifiers. - * */ typedef enum otNetifIdentifier { @@ -154,7 +144,6 @@ typedef enum otNetifIdentifier * @returns A pointer to the message buffer or NULL if no message buffers are available or parameters are invalid. * * @sa otMessageFree - * */ otMessage *otUdpNewMessage(otInstance *aInstance, const otMessageSettings *aSettings); @@ -168,7 +157,6 @@ otMessage *otUdpNewMessage(otInstance *aInstance, const otMessageSettings *aSett * * @retval OT_ERROR_NONE Successfully opened the socket. * @retval OT_ERROR_FAILED Failed to open the socket. - * */ otError otUdpOpen(otInstance *aInstance, otUdpSocket *aSocket, otUdpReceive aCallback, void *aContext); @@ -179,7 +167,6 @@ otError otUdpOpen(otInstance *aInstance, otUdpSocket *aSocket, otUdpReceive aCal * @param[in] aSocket A pointer to a UDP socket structure. * * @returns Whether the UDP socket is open. - * */ bool otUdpIsOpen(otInstance *aInstance, const otUdpSocket *aSocket); @@ -191,7 +178,6 @@ bool otUdpIsOpen(otInstance *aInstance, const otUdpSocket *aSocket); * * @retval OT_ERROR_NONE Successfully closed the socket. * @retval OT_ERROR_FAILED Failed to close UDP Socket. - * */ otError otUdpClose(otInstance *aInstance, otUdpSocket *aSocket); @@ -205,7 +191,6 @@ otError otUdpClose(otInstance *aInstance, otUdpSocket *aSocket); * * @retval OT_ERROR_NONE Bind operation was successful. * @retval OT_ERROR_FAILED Failed to bind UDP socket. - * */ otError otUdpBind(otInstance *aInstance, otUdpSocket *aSocket, const otSockAddr *aSockName, otNetifIdentifier aNetif); @@ -218,7 +203,6 @@ otError otUdpBind(otInstance *aInstance, otUdpSocket *aSocket, const otSockAddr * * @retval OT_ERROR_NONE Connect operation was successful. * @retval OT_ERROR_FAILED Failed to connect UDP socket. - * */ otError otUdpConnect(otInstance *aInstance, otUdpSocket *aSocket, const otSockAddr *aSockName); @@ -237,7 +221,6 @@ otError otUdpConnect(otInstance *aInstance, otUdpSocket *aSocket, const otSockAd * @retval OT_ERROR_NONE The message is successfully scheduled for sending. * @retval OT_ERROR_INVALID_ARGS Invalid arguments are given. * @retval OT_ERROR_NO_BUFS Insufficient available buffer to add the UDP and IPv6 headers. - * */ otError otUdpSend(otInstance *aInstance, otUdpSocket *aSocket, otMessage *aMessage, const otMessageInfo *aMessageInfo); @@ -247,13 +230,11 @@ otError otUdpSend(otInstance *aInstance, otUdpSocket *aSocket, otMessage *aMessa * @param[in] aInstance A pointer to an OpenThread instance. * * @returns A pointer to the head of UDP Socket linked list. - * */ otUdpSocket *otUdpGetSockets(otInstance *aInstance); /** * @} - * */ /** @@ -266,7 +247,6 @@ otUdpSocket *otUdpGetSockets(otInstance *aInstance); * enabled. * * @{ - * */ /** @@ -277,7 +257,6 @@ otUdpSocket *otUdpGetSockets(otInstance *aInstance); * @param[in] aPeerAddr A pointer to the destination IPv6 address. * @param[in] aSockPort The source UDP port. * @param[in] aContext A pointer to application-specific context. - * */ typedef void (*otUdpForwarder)(otMessage *aMessage, uint16_t aPeerPort, @@ -291,7 +270,6 @@ typedef void (*otUdpForwarder)(otMessage *aMessage, * @param[in] aInstance A pointer to an OpenThread instance. * @param[in] aForwarder A pointer to a function called to forward UDP packet to host. * @param[in] aContext A pointer to application-specific context. - * */ void otUdpForwardSetForwarder(otInstance *aInstance, otUdpForwarder aForwarder, void *aContext); @@ -305,7 +283,6 @@ void otUdpForwardSetForwarder(otInstance *aInstance, otUdpForwarder aForwarder, * @param[in] aSockPort The destination UDP port. * * @warning No matter the call success or fail, the message is freed. - * */ void otUdpForwardReceive(otInstance *aInstance, otMessage *aMessage, @@ -321,13 +298,11 @@ void otUdpForwardReceive(otInstance *aInstance, * * @retval true The port is being used exclusively by OpenThread. * @retval false The port is not used by any of the OpenThread API or is shared (e.g. is Backbone socket). - * */ bool otUdpIsPortInUse(otInstance *aInstance, uint16_t port); /** * @} - * */ #ifdef __cplusplus diff --git a/include/openthread/verhoeff_checksum.h b/include/openthread/verhoeff_checksum.h index bbd53ab3b4a..f9f8f1f432a 100644 --- a/include/openthread/verhoeff_checksum.h +++ b/include/openthread/verhoeff_checksum.h @@ -50,12 +50,10 @@ extern "C" { * The functions in this module are available when `OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE` is enabled. * * @{ - * */ /** * Specifies the maximum length of decimal string input in `otVerhoeffChecksum` functions. - * */ #define OT_VERHOEFF_CHECKSUM_MAX_STRING_LENGTH 128 @@ -70,7 +68,6 @@ extern "C" { * @retval OT_ERROR_NONE Successfully calculated the checksum, @p aChecksum is updated. * @retval OT_ERROR_INVALID_ARGS The @p aDecimalString is not valid, i.e. it either contains chars other than * ['0'-'9'], or is longer than `OT_VERHOEFF_CHECKSUM_MAX_STRING_LENGTH`. - * */ otError otVerhoeffChecksumCalculate(const char *aDecimalString, char *aChecksum); @@ -85,13 +82,11 @@ otError otVerhoeffChecksumCalculate(const char *aDecimalString, char *aChecksum) * @retval OT_ERROR_FAILED Checksum validation failed. * @retval OT_ERROR_INVALID_ARGS The @p aDecimalString is not valid, i.e. it either contains chars other than * ['0'-'9'], or is longer than `OT_VERHOEFF_CHECKSUM_MAX_STRING_LENGTH`. - * */ otError otVerhoeffChecksumValidate(const char *aDecimalString); /** * @} - * */ #ifdef __cplusplus diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 5da53f96fad..1827806cf95 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -652,7 +652,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * @cparam nat64 @ca{enable|disable} * @par api_copy * #otNat64SetEnabled - * */ if (ProcessEnableDisable(aArgs, otNat64SetEnabled) == OT_ERROR_NONE) { @@ -687,7 +686,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * - `Active`: NAT64 translator is enabled and is translating packets. * @sa otNat64GetPrefixManagerState * @sa otNat64GetTranslatorState - * */ else if (aArgs[0] == "state") { @@ -719,7 +717,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * @endcode * @par api_copy * #otNat64GetCidr - * */ if (aArgs[1].IsEmpty()) { @@ -737,7 +734,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * @endcode * @par api_copy * #otPlatNat64SetIp4Cidr - * */ else { @@ -760,7 +756,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * @endcode * @par api_copy * #otNat64GetNextAddressMapping - * */ else if (aArgs[0] == "mappings") { @@ -839,7 +834,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled. * @sa otNat64GetCounters * @sa otNat64GetErrorCounters - * */ else if (aArgs[0] == "counters") { @@ -3718,7 +3712,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * @cparam linkmetricsmgr @ca{enable|disable} * @par api_copy * #otLinkMetricsManagerSetEnabled - * */ if (ProcessEnableDisable(aArgs, otLinkMetricsManagerIsEnabled, otLinkMetricsManagerSetEnabled) == OT_ERROR_NONE) { @@ -3732,7 +3725,6 @@ template <> otError Interpreter::Process(Arg aArgs[]) * @endcode * @par api_copy * #otLinkMetricsManagerGetMetricsValueByExtAddr - * */ else if (aArgs[0] == "show") { diff --git a/src/cli/cli.hpp b/src/cli/cli.hpp index a8d89a4dda6..db5c47c8d68 100644 --- a/src/cli/cli.hpp +++ b/src/cli/cli.hpp @@ -92,7 +92,6 @@ namespace ot { * * @brief * This namespace contains definitions for the CLI interpreter. - * */ namespace Cli { @@ -103,7 +102,6 @@ extern "C" void otCliOutputFormat(const char *aFmt, ...); /** * Implements the CLI interpreter. - * */ class Interpreter : public OutputImplementer, public Utils { @@ -139,7 +137,6 @@ class Interpreter : public OutputImplementer, public Utils * Returns a reference to the interpreter object. * * @returns A reference to the interpreter object. - * */ static Interpreter &GetInterpreter(void) { @@ -154,7 +151,6 @@ class Interpreter : public OutputImplementer, public Utils * @param[in] aInstance The OpenThread instance structure. * @param[in] aCallback A pointer to a callback method. * @param[in] aContext A pointer to a user context. - * */ static void Initialize(otInstance *aInstance, otCliOutputCallback aCallback, void *aContext); @@ -162,7 +158,6 @@ class Interpreter : public OutputImplementer, public Utils * Returns whether the interpreter is initialized. * * @returns Whether the interpreter is initialized. - * */ static bool IsInitialized(void) { return sInterpreter != nullptr; } @@ -170,7 +165,6 @@ class Interpreter : public OutputImplementer, public Utils * Interprets a CLI command. * * @param[in] aBuf A pointer to a string. - * */ void ProcessLine(char *aBuf); diff --git a/src/cli/cli_bbr.hpp b/src/cli/cli_bbr.hpp index 120518ac957..f6b69379ddb 100644 --- a/src/cli/cli_bbr.hpp +++ b/src/cli/cli_bbr.hpp @@ -49,7 +49,6 @@ namespace Cli { /** * Implements the BBR CLI interpreter. - * */ class Bbr : private Utils { @@ -59,7 +58,6 @@ class Bbr : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Bbr(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -76,7 +74,6 @@ class Bbr : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_br.cpp b/src/cli/cli_br.cpp index eb7bca26388..4c34d97e345 100644 --- a/src/cli/cli_br.cpp +++ b/src/cli/cli_br.cpp @@ -544,7 +544,6 @@ template <> otError Br::Process(Arg aArgs[]) * @cparam br pd @ca{enable|disable} * @par api_copy * #otBorderRoutingDhcp6PdSetEnabled - * */ if (ProcessEnableDisable(aArgs, otBorderRoutingDhcp6PdSetEnabled) == OT_ERROR_NONE) { diff --git a/src/cli/cli_br.hpp b/src/cli/cli_br.hpp index 650544419ab..bc811e7fa7b 100644 --- a/src/cli/cli_br.hpp +++ b/src/cli/cli_br.hpp @@ -48,7 +48,6 @@ namespace Cli { /** * Implements the Border Router CLI interpreter. - * */ class Br : private Utils { @@ -58,7 +57,6 @@ class Br : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Br(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -75,7 +73,6 @@ class Br : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_coap.hpp b/src/cli/cli_coap.hpp index 95ce7b94a15..df14401caf6 100644 --- a/src/cli/cli_coap.hpp +++ b/src/cli/cli_coap.hpp @@ -47,7 +47,6 @@ namespace Cli { /** * Implements the CLI CoAP server and client. - * */ class Coap : private Utils { @@ -57,7 +56,6 @@ class Coap : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Coap(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -71,7 +69,6 @@ class Coap : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_coap_secure.hpp b/src/cli/cli_coap_secure.hpp index fb1e8e3993b..0f96ce28744 100644 --- a/src/cli/cli_coap_secure.hpp +++ b/src/cli/cli_coap_secure.hpp @@ -53,7 +53,6 @@ namespace Cli { /** * Implements the CLI CoAP Secure server and client. - * */ class CoapSecure : private Utils { @@ -63,7 +62,6 @@ class CoapSecure : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ CoapSecure(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -77,7 +75,6 @@ class CoapSecure : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_commissioner.hpp b/src/cli/cli_commissioner.hpp index a5feac4cc46..720d8731df9 100644 --- a/src/cli/cli_commissioner.hpp +++ b/src/cli/cli_commissioner.hpp @@ -47,7 +47,6 @@ namespace Cli { /** * Implements the Commissioner CLI interpreter. - * */ class Commissioner : private Utils { @@ -57,7 +56,6 @@ class Commissioner : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Commissioner(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -74,7 +72,6 @@ class Commissioner : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_config.h b/src/cli/cli_config.h index 0eb9b2d088e..5193a07d609 100644 --- a/src/cli/cli_config.h +++ b/src/cli/cli_config.h @@ -29,7 +29,6 @@ /** * @file * This file includes compile-time configurations for the CLI service. - * */ #ifndef CONFIG_CLI_H_ @@ -52,7 +51,6 @@ * @def OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH * * The maximum size of the CLI line in bytes including the null terminator. - * */ #ifndef OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH #define OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH 384 @@ -62,7 +60,6 @@ * @def OPENTHREAD_CONFIG_CLI_BLE_SECURE_ENABLE * * Indicates whether TCAT should be enabled in the CLI tool. - * */ #ifndef OPENTHREAD_CONFIG_CLI_BLE_SECURE_ENABLE #define OPENTHREAD_CONFIG_CLI_BLE_SECURE_ENABLE 1 @@ -72,7 +69,6 @@ * @def OPENTHREAD_CONFIG_CLI_TCP_ENABLE * * Indicates whether TCP should be enabled in the CLI tool. - * */ #ifndef OPENTHREAD_CONFIG_CLI_TCP_ENABLE #define OPENTHREAD_CONFIG_CLI_TCP_ENABLE 1 @@ -82,7 +78,6 @@ * @def OPENTHREAD_CONFIG_CLI_TCP_DEFAULT_BENCHMARK_SIZE * * The number of bytes to transfer for the TCP benchmark in the CLI. - * */ #ifndef OPENTHREAD_CONFIG_CLI_TCP_DEFAULT_BENCHMARK_SIZE #define OPENTHREAD_CONFIG_CLI_TCP_DEFAULT_BENCHMARK_SIZE (72 << 10) @@ -101,7 +96,6 @@ * @def OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES * * The maximum number of user CLI command lists that can be registered by the interpreter. - * */ #ifndef OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES #define OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES 1 @@ -113,7 +107,6 @@ * Indicates whether or not an externally provided list of cli commands is defined. * * This is to be used only when `OPENTHREAD_CONFIG_CLI_MAX_USER_CMD_ENTRIES` is greater than 1. - * */ #ifndef OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE #define OPENTHREAD_CONFIG_CLI_VENDOR_COMMANDS_ENABLE 0 @@ -126,7 +119,6 @@ * * By default this is enabled on any POSIX based platform (`OPENTHREAD_POSIX`) and only when CLI itself is not being * used for logging. - * */ #ifndef OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE #define OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE \ @@ -139,7 +131,6 @@ * Defines the log level to use when CLI emits its command input/output to the logs. * * This is used only when `OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE` is enabled. - * */ #ifndef OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_LEVEL #define OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_LEVEL OT_LOG_LEVEL_DEBG @@ -151,7 +142,6 @@ * The log string buffer size (in bytes). * * This is only used when `OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_ENABLE` is enabled. - * */ #ifndef OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_LOG_STRING_SIZE #define OPENTHREAD_CONFIG_CLI_LOG_INPUT_OUTPUT_LOG_STRING_SIZE OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH @@ -164,7 +154,6 @@ * * When enabled, the CLI will print prompt on the output after processing a command. * Otherwise, no prompt is added to the output. - * */ #ifndef OPENTHREAD_CONFIG_CLI_PROMPT_ENABLE #define OPENTHREAD_CONFIG_CLI_PROMPT_ENABLE 1 @@ -177,7 +166,6 @@ * * If the service TXT record data length is greater than the specified value, it will be read partially (up to the given * size) and output as a sequence of raw hex bytes `[{hex-bytes}...]` - * */ #ifndef OPENTHREAD_CONFIG_CLI_TXT_RECORD_MAX_SIZE #define OPENTHREAD_CONFIG_CLI_TXT_RECORD_MAX_SIZE 512 @@ -190,7 +178,6 @@ * * This is intended for testing only. Receive callback should be registered for the `otIp6GetBorderRoutingCounters()` * to count the messages being passed to the callback. - * */ #ifndef OPENTHREAD_CONFIG_CLI_REGISTER_IP6_RECV_CALLBACK #define OPENTHREAD_CONFIG_CLI_REGISTER_IP6_RECV_CALLBACK 0 @@ -200,7 +187,6 @@ * @def OPENTHREAD_CONFIG_CLI_BLE_SECURE_ENABLE * * Define to 1 to enable BLE secure support. - * */ #ifndef OPENTHREAD_CONFIG_CLI_BLE_SECURE_ENABLE #define OPENTHREAD_CONFIG_CLI_BLE_SECURE_ENABLE 0 diff --git a/src/cli/cli_dataset.hpp b/src/cli/cli_dataset.hpp index 708e4790e2f..7918b00d42b 100644 --- a/src/cli/cli_dataset.hpp +++ b/src/cli/cli_dataset.hpp @@ -47,7 +47,6 @@ namespace Cli { /** * Implements the Dataset CLI interpreter. - * */ class Dataset : private Utils { @@ -67,7 +66,6 @@ class Dataset : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_dns.hpp b/src/cli/cli_dns.hpp index bf31ed76e3d..297f1e89f86 100644 --- a/src/cli/cli_dns.hpp +++ b/src/cli/cli_dns.hpp @@ -61,7 +61,6 @@ namespace Cli { /** * Implements the DNS CLI interpreter. - * */ class Dns : private Utils { @@ -71,7 +70,6 @@ class Dns : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Dns(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -88,7 +86,6 @@ class Dns : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_history.hpp b/src/cli/cli_history.hpp index 6958b04293b..ee70166db46 100644 --- a/src/cli/cli_history.hpp +++ b/src/cli/cli_history.hpp @@ -48,7 +48,6 @@ namespace Cli { /** * Implements the History Tracker CLI interpreter. - * */ class History : private Utils { @@ -58,7 +57,6 @@ class History : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ History(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -75,7 +73,6 @@ class History : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_joiner.hpp b/src/cli/cli_joiner.hpp index 297525c743d..370768444d2 100644 --- a/src/cli/cli_joiner.hpp +++ b/src/cli/cli_joiner.hpp @@ -47,7 +47,6 @@ namespace Cli { /** * Implements the Joiner CLI interpreter. - * */ class Joiner : private Utils { @@ -57,7 +56,6 @@ class Joiner : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Joiner(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -74,7 +72,6 @@ class Joiner : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_link_metrics.hpp b/src/cli/cli_link_metrics.hpp index 13b65a5591d..8b777e18afb 100644 --- a/src/cli/cli_link_metrics.hpp +++ b/src/cli/cli_link_metrics.hpp @@ -47,7 +47,6 @@ namespace Cli { /** * Implements the Link Metrics CLI interpreter. - * */ class LinkMetrics : private Utils @@ -58,7 +57,6 @@ class LinkMetrics : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ LinkMetrics(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -72,7 +70,6 @@ class LinkMetrics : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_mac_filter.hpp b/src/cli/cli_mac_filter.hpp index 0f03b1b5bde..1ceb1058fcd 100644 --- a/src/cli/cli_mac_filter.hpp +++ b/src/cli/cli_mac_filter.hpp @@ -48,7 +48,6 @@ namespace Cli { /** * Implements the MAC Filter CLI interpreter. - * */ class MacFilter : private Utils { @@ -58,7 +57,6 @@ class MacFilter : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ MacFilter(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -75,7 +73,6 @@ class MacFilter : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_mdns.hpp b/src/cli/cli_mdns.hpp index df6b4fe4c94..a2fb03e4680 100644 --- a/src/cli/cli_mdns.hpp +++ b/src/cli/cli_mdns.hpp @@ -48,7 +48,6 @@ namespace Cli { /** * Implements the mDNS CLI interpreter. - * */ class Mdns : private Utils { @@ -58,7 +57,6 @@ class Mdns : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Mdns(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -78,7 +76,6 @@ class Mdns : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_network_data.hpp b/src/cli/cli_network_data.hpp index ba8f281c432..5ef7b101e23 100644 --- a/src/cli/cli_network_data.hpp +++ b/src/cli/cli_network_data.hpp @@ -45,7 +45,6 @@ namespace Cli { /** * Implements the Network Data CLI. - * */ class NetworkData : private Utils { @@ -56,7 +55,6 @@ class NetworkData : private Utils * BorderRouter (OnMeshPrefix) TLV uses `uint16_t` for its flags and ExternalRoute uses `uint8_t`, though some of * the bits are not currently used and reserved for future, so 17 chars string (16 flags plus null char at end of * string) covers current and future flags. - * */ static constexpr uint16_t kFlagsStringSize = 17; @@ -67,7 +65,6 @@ class NetworkData : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ NetworkData(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -81,7 +78,6 @@ class NetworkData : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); @@ -89,7 +85,6 @@ class NetworkData : private Utils * Outputs the prefix config. * * @param[in] aConfig The prefix config. - * */ void OutputPrefix(const otBorderRouterConfig &aConfig); @@ -97,7 +92,6 @@ class NetworkData : private Utils * Outputs the route config. * * @param[in] aConfig The route config. - * */ void OutputRoute(const otExternalRouteConfig &aConfig); @@ -105,7 +99,6 @@ class NetworkData : private Utils * Outputs the service config. * * @param[in] aConfig The service config. - * */ void OutputService(const otServiceConfig &aConfig); @@ -114,7 +107,6 @@ class NetworkData : private Utils * * @param[in] aConfig The prefix config. * @param[out] aString The string to populate from @a Config flags. - * */ static void PrefixFlagsToString(const otBorderRouterConfig &aConfig, FlagsString &aString); @@ -123,7 +115,6 @@ class NetworkData : private Utils * * @param[in] aConfig The route config. * @param[out] aString The string to populate from @a Config flags. - * */ static void RouteFlagsToString(const otExternalRouteConfig &aConfig, FlagsString &aString); diff --git a/src/cli/cli_ping.hpp b/src/cli/cli_ping.hpp index 6504412a4e3..2cd20c0cafa 100644 --- a/src/cli/cli_ping.hpp +++ b/src/cli/cli_ping.hpp @@ -47,7 +47,6 @@ namespace Cli { /** * Implements the Ping Sender CLI interpreter. - * */ class PingSender : private Utils @@ -58,7 +57,6 @@ class PingSender : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ PingSender(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -72,7 +70,6 @@ class PingSender : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_srp_client.hpp b/src/cli/cli_srp_client.hpp index 85564cd910c..c3f832a14e3 100644 --- a/src/cli/cli_srp_client.hpp +++ b/src/cli/cli_srp_client.hpp @@ -49,7 +49,6 @@ namespace Cli { /** * Implements the SRP Client CLI interpreter. - * */ class SrpClient : private Utils { @@ -59,7 +58,6 @@ class SrpClient : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ SrpClient(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -73,7 +71,6 @@ class SrpClient : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_srp_server.hpp b/src/cli/cli_srp_server.hpp index b110eb896fe..aceae84dba2 100644 --- a/src/cli/cli_srp_server.hpp +++ b/src/cli/cli_srp_server.hpp @@ -47,7 +47,6 @@ namespace Cli { /** * Implements the SRP Server CLI interpreter. - * */ class SrpServer : private Utils { @@ -57,7 +56,6 @@ class SrpServer : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ SrpServer(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -74,7 +72,6 @@ class SrpServer : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_tcat.hpp b/src/cli/cli_tcat.hpp index 697cba183d1..5a9bc56aeae 100644 --- a/src/cli/cli_tcat.hpp +++ b/src/cli/cli_tcat.hpp @@ -43,7 +43,6 @@ namespace Cli { /** * Implements the Tcat CLI interpreter. - * */ class Tcat : private Utils { @@ -53,7 +52,6 @@ class Tcat : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ Tcat(otInstance *aInstance, OutputImplementer &aOutputImplementer) : Utils(aInstance, aOutputImplementer) @@ -70,7 +68,6 @@ class Tcat : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_tcp.hpp b/src/cli/cli_tcp.hpp index e658edee0a2..98b0f84de41 100644 --- a/src/cli/cli_tcp.hpp +++ b/src/cli/cli_tcp.hpp @@ -57,7 +57,6 @@ namespace Cli { /** * Implements a CLI-based TCP example. - * */ class TcpExample : private Utils { @@ -67,7 +66,6 @@ class TcpExample : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ TcpExample(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -81,7 +79,6 @@ class TcpExample : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_udp.hpp b/src/cli/cli_udp.hpp index d1c70508def..ded6e83096d 100644 --- a/src/cli/cli_udp.hpp +++ b/src/cli/cli_udp.hpp @@ -45,7 +45,6 @@ namespace Cli { /** * Implements a CLI-based UDP example. - * */ class UdpExample : private Utils { @@ -55,7 +54,6 @@ class UdpExample : private Utils * * @param[in] aInstance The OpenThread Instance. * @param[in] aOutputImplementer An `OutputImplementer`. - * */ UdpExample(otInstance *aInstance, OutputImplementer &aOutputImplementer); @@ -69,7 +67,6 @@ class UdpExample : private Utils * @retval OT_ERROR_INVALID_COMMAND Invalid or unknown CLI command. * @retval OT_ERROR_INVALID_ARGS Invalid arguments. * @retval ... Error during execution of the CLI command. - * */ otError Process(Arg aArgs[]); diff --git a/src/cli/cli_utils.hpp b/src/cli/cli_utils.hpp index 0ed5d943f74..7a3c90db59d 100644 --- a/src/cli/cli_utils.hpp +++ b/src/cli/cli_utils.hpp @@ -57,7 +57,6 @@ namespace Cli { /** * Represents a ID number value associated with a CLI command string. - * */ typedef uint64_t CommandId; @@ -67,7 +66,6 @@ typedef uint64_t CommandId; * @param[in] aString The CLI command string. * * @returns The associated `CommandId` with @p aString. - * */ constexpr static CommandId Cmd(const char *aString) { @@ -78,7 +76,6 @@ class Utils; /** * Implements the basic output functions. - * */ class OutputImplementer { @@ -90,7 +87,6 @@ class OutputImplementer * * @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. - * */ OutputImplementer(otCliOutputCallback aCallback, void *aCallbackContext); @@ -116,7 +112,6 @@ class OutputImplementer /** * Provides CLI helper methods. - * */ class Utils { @@ -127,7 +122,6 @@ class Utils * Represent a CLI command table entry, mapping a command with `aName` to a handler method. * * @tparam Cli The CLI module type. - * */ template struct CommandEntry { @@ -140,7 +134,6 @@ class Utils * * @return zero means perfect match, positive (> 0) indicates @p aName is larger than entry's name, and * negative (< 0) indicates @p aName is smaller than entry's name. - * */ int Compare(const char *aName) const { return strcmp(aName, mName); } @@ -152,7 +145,6 @@ class Utils * * @retval TRUE if @p aFirst and @p aSecond are in order, i.e. `aFirst < aSecond`. * @retval FALSE if @p aFirst and @p aSecond are not in order, i.e. `aFirst >= aSecond`. - * */ constexpr static bool AreInOrder(const CommandEntry &aFirst, const CommandEntry &aSecond) { @@ -177,7 +169,6 @@ class Utils * @param[in] aNotFound The string to return if the @p aEnum is not in the @p aTable. * * @returns The string representation of @p aEnum from @p aTable, or @p aNotFound if it is not in the table. - * */ template static const char *Stringify(EnumType aEnum, @@ -192,7 +183,6 @@ class Utils * * @param[in] aInstance A pointer to OpenThread instance. * @param[in] aImplementer An `OutputImplementer`. - * */ Utils(otInstance *aInstance, OutputImplementer &aImplementer) : mInstance(aInstance) @@ -204,13 +194,11 @@ class Utils * Returns the pointer to OpenThread instance. * * @returns The pointer to the OpenThread instance. - * */ otInstance *GetInstancePtr(void) { return mInstance; } /** * Represents a buffer which is used when converting a `uint64` value to string in decimal format. - * */ struct Uint64StringBuffer { @@ -226,7 +214,6 @@ class Utils * @param[in] aBuffer A buffer to allocate the string from. * * @returns A pointer to the start of the string (null-terminated) representation of @p aUint64. - * */ static const char *Uint64ToString(uint64_t aUint64, Uint64StringBuffer &aBuffer); @@ -235,7 +222,6 @@ class Utils * * @param[in] aFormat A pointer to the format string. * @param[in] ... A variable list of arguments to format. - * */ void OutputFormat(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3); @@ -246,7 +232,6 @@ class Utils * @param[in] aIndentSize Number of indentation space chars to prepend to the string. * @param[in] aFormat A pointer to the format string. * @param[in] ... A variable list of arguments to format. - * */ void OutputFormat(uint8_t aIndentSize, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 4); @@ -255,7 +240,6 @@ class Utils * * @param[in] aFormat A pointer to the format string. * @param[in] ... A variable list of arguments to format. - * */ void OutputLine(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3); @@ -266,13 +250,11 @@ class Utils * @param[in] aIndentSize Number of indentation space chars to prepend to the string. * @param[in] aFormat A pointer to the format string. * @param[in] ... A variable list of arguments to format. - * */ void OutputLine(uint8_t aIndentSize, const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 4); /** * Delivered newline "\r\n" to the CLI console. - * */ void OutputNewLine(void); @@ -280,7 +262,6 @@ class Utils * Outputs a given number of space chars to the CLI console. * * @param[in] aCount Number of space chars to output. - * */ void OutputSpaces(uint8_t aCount); @@ -289,7 +270,6 @@ class Utils * * @param[in] aBytes A pointer to data which should be printed. * @param[in] aLength @p aBytes length. - * */ void OutputBytes(const uint8_t *aBytes, uint16_t aLength); @@ -299,7 +279,6 @@ class Utils * * @param[in] aBytes A pointer to data which should be printed. * @param[in] aLength @p aBytes length. - * */ void OutputBytesLine(const uint8_t *aBytes, uint16_t aLength); @@ -309,7 +288,6 @@ class Utils * @tparam kBytesLength The length of @p aBytes array. * * @param[in] aBytes A array of @p kBytesLength bytes which should be printed. - * */ template void OutputBytes(const uint8_t (&aBytes)[kBytesLength]) { @@ -323,7 +301,6 @@ class Utils * @tparam kBytesLength The length of @p aBytes array. * * @param[in] aBytes A array of @p kBytesLength bytes which should be printed. - * */ template void OutputBytesLine(const uint8_t (&aBytes)[kBytesLength]) { @@ -334,7 +311,6 @@ class Utils * Outputs an Extended MAC Address to the CLI console. * * param[in] aExtAddress The Extended MAC Address to output. - * */ void OutputExtAddress(const otExtAddress &aExtAddress) { OutputBytes(aExtAddress.m8); } @@ -342,7 +318,6 @@ class Utils * 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. - * */ void OutputExtAddressLine(const otExtAddress &aExtAddress) { OutputBytesLine(aExtAddress.m8); } @@ -350,7 +325,6 @@ class Utils * Outputs a `uint64_t` value in decimal format. * * @param[in] aUint64 The `uint64_t` value to output. - * */ void OutputUint64(uint64_t aUint64); @@ -358,7 +332,6 @@ class Utils * 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. - * */ void OutputUint64Line(uint64_t aUint64); @@ -366,7 +339,6 @@ class Utils * 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". - * */ void OutputEnabledDisabledStatus(bool aEnabled); @@ -376,7 +348,6 @@ class Utils * Outputs an IPv6 address to the CLI console. * * @param[in] aAddress A reference to the IPv6 address. - * */ void OutputIp6Address(const otIp6Address &aAddress); @@ -384,7 +355,6 @@ class Utils * 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. - * */ void OutputIp6AddressLine(const otIp6Address &aAddress); @@ -392,7 +362,6 @@ class Utils * Outputs an IPv6 prefix to the CLI console. * * @param[in] aPrefix A reference to the IPv6 prefix. - * */ void OutputIp6Prefix(const otIp6Prefix &aPrefix); @@ -400,7 +369,6 @@ class Utils * 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. - * */ void OutputIp6PrefixLine(const otIp6Prefix &aPrefix); @@ -408,7 +376,6 @@ class Utils * Outputs an IPv6 network prefix to the CLI console. * * @param[in] aPrefix A reference to the IPv6 network prefix. - * */ void OutputIp6Prefix(const otIp6NetworkPrefix &aPrefix); @@ -416,7 +383,6 @@ class Utils * 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. - * */ void OutputIp6PrefixLine(const otIp6NetworkPrefix &aPrefix); @@ -424,7 +390,6 @@ class Utils * Outputs an IPv6 socket address to the CLI console. * * @param[in] aSockAddr A reference to the IPv6 socket address. - * */ void OutputSockAddr(const otSockAddr &aSockAddr); @@ -432,7 +397,6 @@ class Utils * 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. - * */ void OutputSockAddrLine(const otSockAddr &aSockAddr); @@ -441,13 +405,11 @@ class Utils * * @param[in] aTxtData A pointer to a buffer containing the DNS TXT data. * @param[in] aTxtDataLength The length of @p aTxtData (in bytes). - * */ void OutputDnsTxtData(const uint8_t *aTxtData, uint16_t aTxtDataLength); /** * Represents a buffer which is used when converting an encoded rate value to percentage string. - * */ struct PercentageStringBuffer { @@ -467,7 +429,6 @@ class Utils * @param[in] aBuffer A buffer to allocate the string from. * * @returns A pointer to the start of the string (null-terminated) representation of @p aValue. - * */ static const char *PercentageToString(uint16_t aValue, PercentageStringBuffer &aBuffer); @@ -488,7 +449,6 @@ class Utils * * @param[in] aTitles An array specifying the table column titles. * @param[in] aWidths An array specifying the table column widths (in number of chars). - * */ template void OutputTableHeader(const char *const (&aTitles)[kTableNumColumns], const uint8_t (&aWidths)[kTableNumColumns]) @@ -508,7 +468,6 @@ class Utils * @tparam kTableNumColumns The number columns in the table. * * @param[in] aWidths An array specifying the table column widths (in number of chars). - * */ template void OutputTableSeparator(const uint8_t (&aWidths)[kTableNumColumns]) { @@ -522,7 +481,6 @@ class Utils * @tparam kLength The length of command table array. * * @param[in] aCommandTable The command table array. - * */ template void OutputCommandTable(const CommandEntry (&aCommandTable)[kLength]) { @@ -538,7 +496,6 @@ class Utils * @tparam ObjectType The object type. * * @param[in] aObject A reference to the object of type `ObjectType` to clear all its bytes. - * */ template static void ClearAllBytes(ObjectType &aObject) { @@ -567,7 +524,6 @@ class Utils * * @retval OT_ERROR_NONE Successfully parsed the @p aString and updated @p aEnable. * @retval OT_ERROR_INVALID_COMMAND The @p aString is not "enable" or "disable" command. - * */ static otError ParseEnableOrDisable(const Arg &aArg, bool &aEnable); @@ -658,7 +614,6 @@ class Utils * * @retval OT_ERROR_NONE Successfully parsed @p aArg and updated @p aPreference. * @retval OT_ERROR_INVALID_ARG @p aArg is not a valid preference string "high", "med", or "low". - * */ static otError ParsePreference(const Arg &aArg, otRoutePreference &aPreference); @@ -668,7 +623,6 @@ class Utils * @param[in] aPreference The preference value to convert (`OT_ROUTE_PREFERENCE_*` values). * * @returns A string representation @p aPreference. - * */ static const char *PreferenceToString(signed int aPreference); @@ -686,7 +640,6 @@ class Utils * @retval OT_ERROR_NONE The argument was parsed successfully. * @retval OT_ERROR_INVALID_ARGS The argument is empty or does not contain a valid IP address. * @retval OT_ERROR_INVALID_STATE No valid NAT64 prefix in the network data. - * */ static otError ParseToIp6Address(otInstance *aInstance, const Arg &aArg, @@ -701,7 +654,6 @@ class Utils * * @retval OT_ERROR_NONE The argument was parsed successfully. * @retval OT_ERROR_INVALID_ARGS The argument is empty or does not contain a valid joiner discerner. - * */ static otError ParseJoinerDiscerner(Arg &aArg, otJoinerDiscerner &aDiscerner); @@ -714,7 +666,6 @@ class Utils * * @retval OT_ERROR_NONE The argument was parsed successfully. * @retval OT_ERROR_INVALID_ARGS The argument is empty or does not contain a valid configuration. - * */ static otError ParsePrefix(Arg aArgs[], otBorderRouterConfig &aConfig); @@ -726,7 +677,6 @@ class Utils * * @retval OT_ERROR_NONE The argument was parsed successfully. * @retval OT_ERROR_INVALID_ARGS The argument is empty or does not contain a valid configuration. - * */ static otError ParseRoute(Arg aArgs[], otExternalRouteConfig &aConfig); #endif @@ -743,7 +693,6 @@ class Utils * @param[out] aStringBuffer A reference to an string array to place the string. * * @returns A pointer @p aStringBuffer which contains the converted string. - * */ static const char *LinkModeToString(const otLinkModeConfig &aLinkMode, char (&aStringBuffer)[kLinkModeStringSize]); @@ -753,7 +702,6 @@ class Utils * @param[in] aOrigin The IPv6 address origin to convert. * * @returns A human-readable string representation of @p aOrigin. - * */ static const char *AddressOriginToString(uint8_t aOrigin); diff --git a/src/cli/x509_cert_key.hpp b/src/cli/x509_cert_key.hpp index 5f6d6befa29..d59fab80ed4 100644 --- a/src/cli/x509_cert_key.hpp +++ b/src/cli/x509_cert_key.hpp @@ -107,7 +107,6 @@ extern "C" { /** * @} - * */ #ifdef __cplusplus diff --git a/src/core/backbone_router/backbone_tmf.hpp b/src/core/backbone_router/backbone_tmf.hpp index 286a9de9bae..d20906a1d0e 100644 --- a/src/core/backbone_router/backbone_tmf.hpp +++ b/src/core/backbone_router/backbone_tmf.hpp @@ -48,7 +48,6 @@ constexpr uint16_t kBackboneUdpPort = 61631; ///< Backbone TMF UDP Port /** * Implements functionality of the Backbone TMF agent. - * */ class BackboneTmfAgent : public Coap::Coap { @@ -57,7 +56,6 @@ class BackboneTmfAgent : public Coap::Coap * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit BackboneTmfAgent(Instance &aInstance); @@ -66,7 +64,6 @@ class BackboneTmfAgent : public Coap::Coap * * @retval kErrorNone Successfully started the CoAP service. * @retval kErrorFailed Failed to start the Backbone TMF agent. - * */ Error Start(void); @@ -75,7 +72,6 @@ class BackboneTmfAgent : public Coap::Coap * * @retval true Thread Management Framework Addressing Rules are met. * @retval false Thread Management Framework Addressing Rules are not met. - * */ bool IsBackboneTmfMessage(const Ip6::MessageInfo &aMessageInfo) const; @@ -83,7 +79,6 @@ class BackboneTmfAgent : public Coap::Coap * Subscribes the Backbone TMF socket to a given IPv6 multicast group on the Backbone network. * * @param[in] aAddress The IPv6 multicast group address. - * */ void SubscribeMulticast(const Ip6::Address &aAddress); @@ -91,7 +86,6 @@ class BackboneTmfAgent : public Coap::Coap * Unsubscribes the Backbone TMF socket from a given IPv6 multicast group on the Backbone network. * * @param[in] aAddress The IPv6 multicast group address. - * */ void UnsubscribeMulticast(const Ip6::Address &aAddress); diff --git a/src/core/backbone_router/bbr_leader.hpp b/src/core/backbone_router/bbr_leader.hpp index 2822bd8de11..f8a1ddbc1ab 100644 --- a/src/core/backbone_router/bbr_leader.hpp +++ b/src/core/backbone_router/bbr_leader.hpp @@ -69,7 +69,6 @@ static_assert(kParentAggregateDelay > 1, "kParentAggregateDelay should be larger /** * Represents Domain Prefix changes. - * */ enum DomainPrefixEvent : uint8_t { @@ -81,7 +80,6 @@ enum DomainPrefixEvent : uint8_t /** * Implements the basic Primary Backbone Router service operations. - * */ class Leader : public InstanceLocator, private NonCopyable { @@ -102,19 +100,16 @@ class Leader : public InstanceLocator, private NonCopyable * Initializes the `Leader`. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit Leader(Instance &aInstance); /** * Resets the cached Primary Backbone Router. - * */ void Reset(void); /** * Updates the cached Primary Backbone Router if any when new network data is available. - * */ void Update(void); @@ -125,7 +120,6 @@ class Leader : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully got the Primary Backbone Router information. * @retval kErrorNotFound No Backbone Router in the Thread Network. - * */ Error GetConfig(Config &aConfig) const; @@ -136,7 +130,6 @@ class Leader : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully got the Backbone Router Service ID. * @retval kErrorNotFound Backbone Router service doesn't exist. - * */ Error GetServiceId(uint8_t &aServiceId) const; @@ -144,7 +137,6 @@ class Leader : public InstanceLocator, private NonCopyable * Gets the short address of the Primary Backbone Router. * * @returns short address of Primary Backbone Router, or Mle::kInvalidRloc16 if no Primary Backbone Router. - * */ uint16_t GetServer16(void) const { return mConfig.mServer16; } @@ -153,7 +145,6 @@ class Leader : public InstanceLocator, private NonCopyable * * @retval TRUE If there is Primary Backbone Router. * @retval FALSE If there is no Primary Backbone Router. - * */ bool HasPrimary(void) const { return mConfig.mServer16 != Mle::kInvalidRloc16; } @@ -161,7 +152,6 @@ class Leader : public InstanceLocator, private NonCopyable * Gets the Domain Prefix in the Thread Network. * * @retval A pointer to the Domain Prefix or nullptr if there is no Domain Prefix. - * */ const Ip6::Prefix *GetDomainPrefix(void) const { @@ -173,7 +163,6 @@ class Leader : public InstanceLocator, private NonCopyable * * @retval TRUE If there is Domain Prefix. * @retval FALSE If there is no Domain Prefix. - * */ bool HasDomainPrefix(void) const { return (mDomainPrefix.GetLength() > 0); } @@ -184,7 +173,6 @@ class Leader : public InstanceLocator, private NonCopyable * * @retval true @p aAddress is a Domain Unicast Address. * @retval false @p aAddress is not a Domain Unicast Address. - * */ bool IsDomainUnicast(const Ip6::Address &aAddress) const; diff --git a/src/core/backbone_router/bbr_local.hpp b/src/core/backbone_router/bbr_local.hpp index 754f5a2a17f..1c42e5f856b 100644 --- a/src/core/backbone_router/bbr_local.hpp +++ b/src/core/backbone_router/bbr_local.hpp @@ -69,7 +69,6 @@ namespace BackboneRouter { /** * Implements the definitions for local Backbone Router service. - * */ class Local : public InstanceLocator, private NonCopyable { @@ -80,7 +79,6 @@ class Local : public InstanceLocator, private NonCopyable /** * Represents Backbone Router state. - * */ enum State : uint8_t { @@ -91,7 +89,6 @@ class Local : public InstanceLocator, private NonCopyable /** * Represents registration mode used as input to `AddService()` method. - * */ enum RegisterMode : uint8_t { @@ -103,7 +100,6 @@ class Local : public InstanceLocator, private NonCopyable * Initializes the local Backbone Router. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit Local(Instance &aInstance); @@ -111,7 +107,6 @@ class Local : public InstanceLocator, private NonCopyable * Enables/disables Backbone function. * * @param[in] aEnable TRUE to enable the backbone function, FALSE otherwise. - * */ void SetEnabled(bool aEnable); @@ -120,13 +115,11 @@ class Local : public InstanceLocator, private NonCopyable * * * @returns The current state of Backbone Router. - * */ State GetState(void) const { return mState; } /** * Resets the local Thread Network Data. - * */ void Reset(void); @@ -134,7 +127,6 @@ class Local : public InstanceLocator, private NonCopyable * Gets local Backbone Router configuration. * * @param[out] aConfig The local Backbone Router configuration. - * */ void GetConfig(Config &aConfig) const; @@ -145,7 +137,6 @@ class Local : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully updated configuration. * @retval kErrorInvalidArgs The configuration in @p aConfig is invalid. - * */ Error SetConfig(const Config &aConfig); @@ -157,7 +148,6 @@ class Local : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully added the Service entry. * @retval kErrorInvalidState Not in the ready state to register. * @retval kErrorNoBufs Insufficient space to add the Service entry. - * */ Error AddService(RegisterMode aMode); @@ -166,7 +156,6 @@ class Local : public InstanceLocator, private NonCopyable * * @retval True if the Backbone Router is Primary. * @retval False if the Backbone Router is not Primary. - * */ bool IsPrimary(void) const { return mState == kStatePrimary; } @@ -175,7 +164,6 @@ class Local : public InstanceLocator, private NonCopyable * * @retval True if the Backbone Router is enabled. * @retval False if the Backbone Router is not enabled. - * */ bool IsEnabled(void) const { return mState != kStateDisabled; } @@ -183,7 +171,6 @@ class Local : public InstanceLocator, private NonCopyable * Sets the Backbone Router registration jitter value. * * @param[in] aRegistrationJitter the Backbone Router registration jitter value to set. - * */ void SetRegistrationJitter(uint8_t aRegistrationJitter) { mRegistrationJitter = aRegistrationJitter; } @@ -191,7 +178,6 @@ class Local : public InstanceLocator, private NonCopyable * Returns the Backbone Router registration jitter value. * * @returns The Backbone Router registration jitter value. - * */ uint8_t GetRegistrationJitter(void) const { return mRegistrationJitter; } @@ -200,7 +186,6 @@ class Local : public InstanceLocator, private NonCopyable * * @param[in] aState The state or state change of Primary Backbone Router. * @param[in] aConfig The Primary Backbone Router service. - * */ void HandleBackboneRouterPrimaryUpdate(Leader::State aState, const Config &aConfig); @@ -211,7 +196,6 @@ class Local : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully got the Domain Prefix configuration. * @retval kErrorNotFound No Domain Prefix was configured. - * */ Error GetDomainPrefix(NetworkData::OnMeshPrefixConfig &aConfig); @@ -223,7 +207,6 @@ class Local : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully removed the Domain Prefix. * @retval kErrorInvalidArgs @p aPrefix is invalid. * @retval kErrorNotFound No Domain Prefix was configured or @p aPrefix doesn't match. - * */ Error RemoveDomainPrefix(const Ip6::Prefix &aPrefix); @@ -234,7 +217,6 @@ class Local : public InstanceLocator, private NonCopyable * * @returns kErrorNone Successfully set the local Domain Prefix. * @returns kErrorInvalidArgs @p aConfig is invalid. - * */ Error SetDomainPrefix(const NetworkData::OnMeshPrefixConfig &aConfig); @@ -242,7 +224,6 @@ class Local : public InstanceLocator, private NonCopyable * Returns a reference to the All Network Backbone Routers Multicast Address. * * @returns A reference to the All Network Backbone Routers Multicast Address. - * */ const Ip6::Address &GetAllNetworkBackboneRoutersAddress(void) const { return mAllNetworkBackboneRouters; } @@ -250,13 +231,11 @@ class Local : public InstanceLocator, private NonCopyable * Returns a reference to the All Domain Backbone Routers Multicast Address. * * @returns A reference to the All Domain Backbone Routers Multicast Address. - * */ const Ip6::Address &GetAllDomainBackboneRoutersAddress(void) const { return mAllDomainBackboneRouters; } /** * Applies the Mesh Local Prefix. - * */ void ApplyNewMeshLocalPrefix(void); @@ -264,7 +243,6 @@ class Local : public InstanceLocator, private NonCopyable * Updates the subscription of All Domain Backbone Routers Multicast Address. * * @param[in] aEvent The Domain Prefix event. - * */ void HandleDomainPrefixUpdate(DomainPrefixEvent aEvent); @@ -273,7 +251,6 @@ class Local : public InstanceLocator, private NonCopyable * * @param[in] aCallback The callback function. * @param[in] aContext A user context pointer. - * */ void SetDomainPrefixCallback(DomainPrefixCallback aCallback, void *aContext) { diff --git a/src/core/backbone_router/bbr_manager.hpp b/src/core/backbone_router/bbr_manager.hpp index 6a6d19d12ce..e9f4cf77339 100644 --- a/src/core/backbone_router/bbr_manager.hpp +++ b/src/core/backbone_router/bbr_manager.hpp @@ -57,7 +57,6 @@ namespace BackboneRouter { /** * Implements the definitions for Backbone Router management. - * */ class Manager : public InstanceLocator, private NonCopyable { @@ -70,7 +69,6 @@ class Manager : public InstanceLocator, private NonCopyable * Initializes the Backbone Router manager. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit Manager(Instance &aInstance); @@ -79,7 +77,6 @@ class Manager : public InstanceLocator, private NonCopyable * Returns the NdProxy Table. * * @returns The NdProxy Table. - * */ NdProxyTable &GetNdProxyTable(void); #endif @@ -94,7 +91,6 @@ class Manager : public InstanceLocator, private NonCopyable * @param[in] aMlIid A pointer to the Mesh Local IID. If `nullptr`, respond with @p aStatus for any * coming DUA.req, otherwise only respond the one with matching @p aMlIid. * @param[in] aStatus The status to respond. - * */ void ConfigNextDuaRegistrationResponse(const Ip6::InterfaceIdentifier *aMlIid, uint8_t aStatus); @@ -106,7 +102,6 @@ class Manager : public InstanceLocator, private NonCopyable * Only used for test and certification. * * @param[in] aStatus The status to respond. - * */ void ConfigNextMulticastListenerRegistrationResponse(ThreadStatusTlv::MlrStatus aStatus); #endif @@ -117,7 +112,6 @@ class Manager : public InstanceLocator, private NonCopyable * Gets the Multicast Listeners Table. * * @returns The Multicast Listeners Table. - * */ MulticastListenersTable &GetMulticastListenersTable(void) { return mMulticastListenersTable; } #endif @@ -130,7 +124,6 @@ class Manager : public InstanceLocator, private NonCopyable * * @retval TRUE If messages destined to the Domain Unicast Address should be forwarded to the Backbone link. * @retval FALSE If messages destined to the Domain Unicast Address should not be forwarded to the Backbone link. - * */ bool ShouldForwardDuaToBackbone(const Ip6::Address &aAddress); @@ -138,7 +131,6 @@ class Manager : public InstanceLocator, private NonCopyable * Returns a reference to the Backbone TMF agent. * * @returns A reference to the Backbone TMF agent. - * */ BackboneTmfAgent &GetBackboneTmfAgent(void) { return mBackboneTmfAgent; } @@ -152,7 +144,6 @@ class Manager : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully sent BB.qry on backbone link. * @retval kErrorInvalidState If the Backbone Router is not primary, or not enabled. * @retval kErrorNoBufs If insufficient message buffers available. - * */ Error SendBackboneQuery(const Ip6::Address &aDua, uint16_t aRloc16 = Mle::kInvalidRloc16); @@ -165,7 +156,6 @@ class Manager : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully sent PRO_BB.ntf on backbone link. * @retval kErrorNoBufs If insufficient message buffers available. - * */ Error SendProactiveBackboneNotification(const Ip6::Address &aDua, const Ip6::InterfaceIdentifier &aMeshLocalIid, diff --git a/src/core/backbone_router/multicast_listeners_table.hpp b/src/core/backbone_router/multicast_listeners_table.hpp index 392b8185fbd..27716bf912f 100644 --- a/src/core/backbone_router/multicast_listeners_table.hpp +++ b/src/core/backbone_router/multicast_listeners_table.hpp @@ -53,7 +53,6 @@ namespace BackboneRouter { /** * Implements the definitions for Multicast Listeners Table. - * */ class MulticastListenersTable : public InstanceLocator, private NonCopyable { @@ -62,7 +61,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable public: /** * Represents a Multicast Listener entry. - * */ class Listener : public Clearable { @@ -81,7 +79,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable /** * Initializes the `Listener` object. - * */ Listener(void) { Clear(); } @@ -89,7 +86,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * Returns the Multicast Listener address. * * @returns The Multicast Listener address. - * */ const Ip6::Address &GetAddress(void) const { return mAddress; } @@ -97,7 +93,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * Returns the expire time of the Multicast Listener. * * @returns The Multicast Listener expire time. - * */ const TimeMilli GetExpireTime(void) const { return mExpireTime; } @@ -115,7 +110,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * Initializes the Multicast Listeners Table. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit MulticastListenersTable(Instance &aInstance) : InstanceLocator(aInstance) @@ -132,7 +126,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * @retval kErrorNone If the Multicast Listener was successfully added. * @retval kErrorInvalidArgs If the Multicast Listener address was invalid. * @retval kErrorNoBufs No space available to save the Multicast Listener. - * */ Error Add(const Ip6::Address &aAddress, TimeMilli aExpireTime); @@ -140,13 +133,11 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * Removes a given Multicast Listener. * * @param[in] aAddress The Multicast Listener address. - * */ void Remove(const Ip6::Address &aAddress); /** * Removes expired Multicast Listeners. - * */ void Expire(void); @@ -154,7 +145,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * Counts the number of valid Multicast Listeners. * * @returns The number of valid Multicast Listeners. - * */ uint16_t Count(void) const { return mNumValidListeners; } @@ -166,13 +156,11 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * for (MulticastListenersTable::Listener &listener : Get().Iterate()) * * @returns An IteratorBuilder instance. - * */ IteratorBuilder Iterate(void) { return IteratorBuilder(GetInstance()); } /** * Removes all the Multicast Listeners. - * */ void Clear(void); @@ -181,7 +169,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * * @param[in] aCallback The callback function. * @param[in] aContext A user context pointer. - * */ void SetCallback(Listener::Callback aCallback, void *aContext); @@ -193,7 +180,6 @@ class MulticastListenersTable : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully found the next Multicast Listener info. * @retval kErrorNotFound No subsequent Multicast Listener was found. - * */ Error GetNext(Listener::Iterator &aIterator, Listener::Info &aInfo); diff --git a/src/core/backbone_router/ndproxy_table.hpp b/src/core/backbone_router/ndproxy_table.hpp index ae3c9c4e99e..42ee7243fe9 100644 --- a/src/core/backbone_router/ndproxy_table.hpp +++ b/src/core/backbone_router/ndproxy_table.hpp @@ -55,7 +55,6 @@ namespace BackboneRouter { /** * Implements NdProxy Table maintenance on Primary Backbone Router. - * */ class NdProxyTable : public InstanceLocator, private NonCopyable { @@ -64,7 +63,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable /** * Represents a ND Proxy instance. - * */ class NdProxy : private Clearable { @@ -76,7 +74,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable /** * Represents the ND Proxy events. - * */ enum Event { @@ -90,7 +87,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * Gets the Mesh-Local IID of the ND Proxy. * * @returns The Mesh-Local IID. - * */ const Ip6::InterfaceIdentifier &GetMeshLocalIid(void) const { return mMeshLocalIid; } @@ -98,7 +94,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * Gets the time since last transaction of the ND Proxy. * * @returns The time since last transaction in seconds. - * */ uint32_t GetTimeSinceLastTransaction(void) const { @@ -109,7 +104,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * Gets the short address of the device who sends the DUA registration. * * @returns The RLOC16 value. - * */ uint16_t GetRloc16(void) const { return mRloc16; } @@ -117,7 +111,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * Gets the DAD flag of the ND Proxy. * * @returns The DAD flag. - * */ bool GetDadFlag(void) const { return mDadFlag; } @@ -150,7 +143,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * Initializes the `NdProxyTable` object. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit NdProxyTable(Instance &aInstance) : InstanceLocator(aInstance) @@ -169,7 +161,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * @retval kErrorNone If registered successfully. * @retval kErrorDuplicated If the IPv6 address IID is a duplicate. * @retval kErrorNoBufs Insufficient buffer space available to register. - * */ Error Register(const Ip6::InterfaceIdentifier &aAddressIid, const Ip6::InterfaceIdentifier &aMeshLocalIid, @@ -183,7 +174,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * * @retval TRUE If the IPv6 address IID was registered. * @retval FALSE If the IPv6 address IID was not registered. - * */ bool IsRegistered(const Ip6::InterfaceIdentifier &aAddressIid) { return FindByAddressIid(aAddressIid) != nullptr; } @@ -191,13 +181,11 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * Notifies Domain Prefix event. * * @param[in] aEvent The Domain Prefix event. - * */ void HandleDomainPrefixUpdate(DomainPrefixEvent aEvent); /** * Notifies ND Proxy table of the timer tick. - * */ void HandleTimer(void); @@ -207,7 +195,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * @param[in] aDua The Domain Unicast Address. * * @returns The `NdProxy` instance matching the specified @p aDua, or nullptr if not found. - * */ NdProxy *ResolveDua(const Ip6::Address &aDua); @@ -216,7 +203,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * * @param[in] aNdProxy The ND Proxy to notify of. * @param[in] aDuplicated Whether duplicate was detected. - * */ static void NotifyDadComplete(NdProxy &aNdProxy, bool aDuplicated); @@ -224,7 +210,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * Removes the ND Proxy. * * @param[in] aNdProxy The ND Proxy to remove. - * */ static void Erase(NdProxy &aNdProxy); @@ -233,7 +218,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * * @param[in] aCallback The callback function. * @param[in] aContext A user context pointer. - * */ void SetCallback(NdProxy::Callback aCallback, void *aContext) { mCallback.Set(aCallback, aContext); } @@ -245,7 +229,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully retrieve the ND Proxy info. * @retval kErrorNotFound Failed to find the Domain Unicast Address in the ND Proxy table. - * */ Error GetInfo(const Ip6::Address &aDua, otBackboneRouterNdProxyInfo &aNdProxyInfo); @@ -261,7 +244,6 @@ class NdProxyTable : public InstanceLocator, private NonCopyable /** * 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 872d897e8ce..2de461cdeda 100644 --- a/src/core/border_router/infra_if.hpp +++ b/src/core/border_router/infra_if.hpp @@ -29,7 +29,6 @@ /** * @file * This file includes definitions for infrastructure network interface. - * */ #ifndef INFRA_IF_HPP_ @@ -52,7 +51,6 @@ namespace BorderRouter { /** * Represents the infrastructure network interface on a border router. - * */ class InfraIf : public InstanceLocator { @@ -66,7 +64,6 @@ class InfraIf : public InstanceLocator * Initializes the `InfraIf`. * * @param[in] aInstance A OpenThread instance. - * */ explicit InfraIf(Instance &aInstance); @@ -78,13 +75,11 @@ class InfraIf : public InstanceLocator * @retval kErrorNone Successfully initialized the `InfraIf`. * @retval kErrorInvalidArgs The index of the infra interface is not valid. * @retval kErrorInvalidState The `InfraIf` is already initialized. - * */ Error Init(uint32_t aIfIndex); /** * Deinitilaizes the `InfraIf`. - * */ void Deinit(void); @@ -93,7 +88,6 @@ class InfraIf : public InstanceLocator * * @retval TRUE The `InfraIf` is initialized. * @retval FALSE The `InfraIf` is not initialized. - * */ bool IsInitialized(void) const { return mInitialized; } @@ -102,7 +96,6 @@ class InfraIf : public InstanceLocator * * @retval TRUE The infrastructure interface is running. * @retval FALSE The infrastructure interface is not running. - * */ bool IsRunning(void) const { return mIsRunning; } @@ -110,7 +103,6 @@ class InfraIf : public InstanceLocator * Returns the infrastructure interface index. * * @returns The interface index or zero if not initialized. - * */ uint32_t GetIfIndex(void) const { return mIfIndex; } @@ -118,7 +110,6 @@ class InfraIf : public InstanceLocator * Sets the infrastructure interface index. * * @param[in] aIfIndex The infrastructure interface index. - * */ void SetIfIndex(uint32_t aIfIndex) { mIfIndex = aIfIndex; } @@ -131,7 +122,6 @@ class InfraIf : public InstanceLocator * * @retval TRUE The infrastructure interface has @p aAddress. * @retval FALSE The infrastructure interface does not have @p aAddress. - * */ bool HasAddress(const Ip6::Address &aAddress) const; @@ -145,7 +135,6 @@ class InfraIf : public InstanceLocator * * @retval kErrorNone Successfully sent the ICMPv6 message. * @retval kErrorFailed Failed to send the ICMPv6 message. - * */ Error Send(const Icmp6Packet &aPacket, const Ip6::Address &aDestination) const; @@ -155,7 +144,6 @@ class InfraIf : public InstanceLocator * @param[in] aIfIndex The infrastructure interface index on which the ICMPv6 message is received. * @param[in] aSource The IPv6 source address. * @param[in] aPacket The ICMPv6 packet. - * */ void HandledReceived(uint32_t aIfIndex, const Ip6::Address &aSource, const Icmp6Packet &aPacket); @@ -166,7 +154,6 @@ class InfraIf : public InstanceLocator * * @retval kErrorNone Successfully request NAT64 prefix discovery. * @retval kErrorFailed Failed to request NAT64 prefix discovery. - * */ Error DiscoverNat64Prefix(void) const; @@ -175,7 +162,6 @@ class InfraIf : public InstanceLocator * * @param[in] aIfIndex The infrastructure interface index on which the host address is received. * @param[in] aPrefix The NAT64 prefix on the infrastructure link. - * */ void DiscoverNat64PrefixDone(uint32_t aIfIndex, const Ip6::Prefix &aPrefix); @@ -188,7 +174,6 @@ class InfraIf : public InstanceLocator * @retval kErrorNone Successfully updated the infra interface status. * @retval kErrorInvalidState The `InfraIf` is not initialized. * @retval kErrorInvalidArgs The @p IfIndex does not match the interface index of `InfraIf`. - * */ Error HandleStateChanged(uint32_t aIfIndex, bool aIsRunning); @@ -196,7 +181,6 @@ class InfraIf : public InstanceLocator * Converts the `InfraIf` to a human-readable string. * * @returns The string representation of `InfraIf`. - * */ InfoString ToString(void) const; diff --git a/src/core/border_router/routing_manager.cpp b/src/core/border_router/routing_manager.cpp index ffe1e0a0db5..8ce5039c843 100644 --- a/src/core/border_router/routing_manager.cpp +++ b/src/core/border_router/routing_manager.cpp @@ -29,7 +29,6 @@ /** * @file * This file includes implementation for the RA-based routing management. - * */ #include "border_router/routing_manager.hpp" diff --git a/src/core/border_router/routing_manager.hpp b/src/core/border_router/routing_manager.hpp index 358831a8b35..802b443396a 100644 --- a/src/core/border_router/routing_manager.hpp +++ b/src/core/border_router/routing_manager.hpp @@ -29,7 +29,6 @@ /** * @file * This file includes definitions for the RA-based routing management. - * */ #ifndef ROUTING_MANAGER_HPP_ @@ -93,7 +92,6 @@ extern "C" void otPlatBorderRoutingProcessDhcp6PdPrefix(otInstance * * The Border Routing manager works on both Thread interface and infrastructure interface. * All ICMPv6 messages are sent/received on the infrastructure interface. - * */ class RoutingManager : public InstanceLocator { @@ -125,13 +123,11 @@ class RoutingManager : public InstanceLocator * - Route prefix `fc00::/7` or `::/0` * - One entry for NAT64 published prefix. * - One extra entry for transitions. - * */ static constexpr uint16_t kMaxPublishedPrefixes = 3; /** * Represents the states of `RoutingManager`. - * */ enum State : uint8_t { @@ -143,7 +139,6 @@ class RoutingManager : public InstanceLocator /** * This enumeration represents the states of DHCPv6 PD in `RoutingManager`. - * */ enum Dhcp6PdState : uint8_t { @@ -156,7 +151,6 @@ class RoutingManager : public InstanceLocator * Initializes the routing manager. * * @param[in] aInstance A OpenThread instance. - * */ explicit RoutingManager(Instance &aInstance); @@ -169,7 +163,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorNone Successfully started the routing manager. * @retval kErrorInvalidArgs The index of the infra interface is not valid. - * */ Error Init(uint32_t aInfraIfIndex, bool aInfraIfIsRunning); @@ -182,7 +175,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. * @retval kErrorNone Successfully enabled/disabled the Border Routing Manager. - * */ Error SetEnabled(bool aEnabled); @@ -194,7 +186,6 @@ class RoutingManager : public InstanceLocator * * @retval TRUE The RoutingManager is currently running. * @retval FALSE The RoutingManager is not running. - * */ bool IsRunning(void) const { return mIsRunning; } @@ -202,7 +193,6 @@ class RoutingManager : public InstanceLocator * Gets the state of `RoutingManager`. * * @returns The current state of `RoutingManager`. - * */ State GetState(void) const; @@ -217,7 +207,6 @@ class RoutingManager : public InstanceLocator * Note that this method does not change whether the Routing Manager is enabled or disabled (see `SetEnabled()`). * It stops the Routing Manager temporarily. After calling this method if the device role gets changes (device * gets attached) and/or the infra interface state gets changed, the Routing Manager may be started again. - * */ void RequestStop(void) { Stop(); } @@ -232,7 +221,6 @@ class RoutingManager : public InstanceLocator * preference when in child role. * * @returns The current Route Info Option preference. - * */ RoutePreference GetRouteInfoOptionPreference(void) const { return mRioAdvertiser.GetPreference(); } @@ -244,7 +232,6 @@ class RoutingManager : public InstanceLocator * cleared by calling `ClearRouteInfoOptionPreference`()`. * * @param[in] aPreference The route preference to use. - * */ void SetRouteInfoOptionPreference(RoutePreference aPreference) { mRioAdvertiser.SetPreference(aPreference); } @@ -253,7 +240,6 @@ class RoutingManager : public InstanceLocator * * 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. - * */ void ClearRouteInfoOptionPreference(void) { mRioAdvertiser.ClearPreference(); } @@ -269,7 +255,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorNone Successfully set the extra option bytes. * @retval kErrorNoBufs Could not allocate buffer to save the buffer. - * */ Error SetExtraRouterAdvertOptions(const uint8_t *aOptions, uint16_t aLength); @@ -282,7 +267,6 @@ class RoutingManager : public InstanceLocator * - Otherwise, it is determined automatically by `RoutingManager` based on the device's role and link quality. * * @returns The current published route preference. - * */ RoutePreference GetRoutePreference(void) const { return mRoutePublisher.GetPreference(); } @@ -293,7 +277,6 @@ class RoutingManager : public InstanceLocator * `ClearRoutePreference`()`. * * @param[in] aPreference The route preference to use. - * */ void SetRoutePreference(RoutePreference aPreference) { mRoutePublisher.SetPreference(aPreference); } @@ -302,7 +285,6 @@ class RoutingManager : public InstanceLocator * * After a call to this method, BR will determine the preference automatically based on the device's role and * link quality (to the parent when acting as end-device). - * */ void ClearRoutePreference(void) { mRoutePublisher.ClearPreference(); } @@ -316,7 +298,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. * @retval kErrorNone Successfully retrieved the OMR prefix. - * */ Error GetOmrPrefix(Ip6::Prefix &aPrefix) const; @@ -333,7 +314,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorInvalidState The Border Routing Manager is not running yet. * @retval kErrorNone Successfully retrieved the OMR prefix. - * */ Error GetFavoredOmrPrefix(Ip6::Prefix &aPrefix, RoutePreference &aPreference) const; @@ -348,7 +328,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. * @retval kErrorNone Successfully retrieved the local on-link prefix. - * */ Error GetOnLinkPrefix(Ip6::Prefix &aPrefix) const; @@ -361,7 +340,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. * @retval kErrorNone Successfully retrieved the favored on-link prefix. - * */ Error GetFavoredOnLinkPrefix(Ip6::Prefix &aPrefix) const; @@ -375,7 +353,6 @@ class RoutingManager : public InstanceLocator * when there is another border router publishing a NAT64 prefix with higher * priority. * @retval kStateActive The Border router is publishing a NAT64 prefix. - * */ Nat64::State GetNat64PrefixManagerState(void) const { return mNat64PrefixManager.GetState(); } @@ -383,7 +360,6 @@ class RoutingManager : public InstanceLocator * Enable or disable NAT64 prefix publishing. * * @param[in] aEnabled A boolean to enable/disable NAT64 prefix publishing. - * */ void SetNat64PrefixManagerEnabled(bool aEnabled); @@ -394,7 +370,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. * @retval kErrorNone Successfully retrieved the NAT64 prefix. - * */ Error GetNat64Prefix(Ip6::Prefix &aPrefix); @@ -408,7 +383,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. * @retval kErrorNone Successfully retrieved the NAT64 prefix. - * */ Error GetFavoredNat64Prefix(Ip6::Prefix &aPrefix, RoutePreference &aRoutePreference); @@ -417,7 +391,6 @@ class RoutingManager : public InstanceLocator * interface (`InfraIf::DiscoverNat64Prefix()`). * * @param[in] aPrefix The discovered NAT64 prefix on `InfraIf`. - * */ void HandleDiscoverNat64PrefixDone(const Ip6::Prefix &aPrefix) { mNat64PrefixManager.HandleDiscoverDone(aPrefix); } @@ -430,13 +403,11 @@ class RoutingManager : public InstanceLocator * * @param[in] aPacket The received ICMPv6 packet. * @param[in] aSrcAddress The source address this message is sent from. - * */ void HandleReceived(const InfraIf::Icmp6Packet &aPacket, const Ip6::Address &aSrcAddress); /** * Handles infrastructure interface state changes. - * */ void HandleInfraIfStateChanged(void) { EvaluateState(); } @@ -447,7 +418,6 @@ class RoutingManager : public InstanceLocator * * @retval TRUE The prefix is a valid OMR prefix. * @retval FALSE The prefix is not a valid OMR prefix. - * */ static bool IsValidOmrPrefix(const NetworkData::OnMeshPrefixConfig &aOnMeshPrefixConfig); @@ -458,7 +428,6 @@ class RoutingManager : public InstanceLocator * * @retval TRUE The prefix is a valid OMR prefix. * @retval FALSE The prefix is not a valid OMR prefix. - * */ static bool IsValidOmrPrefix(const Ip6::Prefix &aPrefix); @@ -471,7 +440,6 @@ class RoutingManager : public InstanceLocator * relative to the time the iterator was initialized. * * @param[out] aIterator The iterator to initialize. - * */ void InitPrefixTableIterator(PrefixTableIterator &aIterator) const { mRxRaTracker.InitIterator(aIterator); } @@ -483,7 +451,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorNone Got the next entry, @p aEntry is updated and @p aIterator is advanced. * @retval kErrorNotFound No more entries in the table. - * */ Error GetNextPrefixTableEntry(PrefixTableIterator &aIterator, PrefixTableEntry &aEntry) const { @@ -498,7 +465,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorNone Got the next router info, @p aEntry is updated and @p aIterator is advanced. * @retval kErrorNotFound No more routers. - * */ Error GetNextRouterEntry(PrefixTableIterator &aIterator, RouterEntry &aEntry) const { @@ -515,7 +481,6 @@ class RoutingManager : public InstanceLocator * * @retval kErrorNone Got the next peer BR info, @p aEntry is updated and @p aIterator is advanced. * @retval kErrorNotFound No more PR beers in the list. - * */ Error GetNextPeerBrEntry(PrefixTableIterator &aIterator, PeerBrEntry &aEntry) const { @@ -531,7 +496,6 @@ class RoutingManager : public InstanceLocator * Age is represented as seconds since appearance of the BR entry in the Network Data. * * @returns The number of peer BRs. - * */ uint16_t CountPeerBrs(uint32_t &aMinAge) const { return mNetDataPeerBrTracker.CountPeerBrs(aMinAge); } @@ -542,7 +506,6 @@ class RoutingManager : public InstanceLocator * 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. - * */ void HandleSrpServerAutoEnableMode(void); #endif @@ -552,7 +515,6 @@ class RoutingManager : public InstanceLocator * Enables / Disables the DHCPv6 Prefix Delegation. * * @param[in] aEnabled Whether to enable or disable. - * */ void SetDhcp6PdEnabled(bool aEnabled) { return mPdPrefixManager.SetEnabled(aEnabled); } @@ -560,7 +522,6 @@ class RoutingManager : public InstanceLocator * Returns the state DHCPv6 Prefix Delegation manager. * * @returns The DHCPv6 PD state. - * */ Dhcp6PdState GetDhcp6PdState(void) const { return mPdPrefixManager.GetState(); } @@ -569,7 +530,6 @@ class RoutingManager : public InstanceLocator * * @param[in] aCallback A pointer to a callback function * @param[in] aContext A pointer to arbitrary context information. - * */ void SetRequestDhcp6PdCallback(PdCallback aCallback, void *aContext) { @@ -584,7 +544,6 @@ class RoutingManager : public InstanceLocator * @retval kErrorNone Successfully retrieved the OMR prefix. * @retval kErrorNotFound There are no valid PD prefix on this BR. * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. - * */ Error GetPdOmrPrefix(PrefixTableEntry &aPrefixInfo) const; @@ -596,7 +555,6 @@ class RoutingManager : public InstanceLocator * @retval kErrorNone Successfully retrieved the Info. * @retval kErrorNotFound There are no valid RA process info on this BR. * @retval kErrorInvalidState The Border Routing Manager is not initialized yet. - * */ Error GetPdProcessedRaInfo(PdProcessedRaInfo &aPdProcessedRaInfo); @@ -613,7 +571,6 @@ class RoutingManager : public InstanceLocator * * @param[in] aMessage The message. * @param[in] aIp6Header The IPv6 header of @p aMessage. - * */ void CheckReachabilityToSendIcmpError(const Message &aMessage, const Ip6::Header &aIp6Header); #endif @@ -625,7 +582,6 @@ class RoutingManager : public InstanceLocator * This is intended for testing only and using it will make a device non-compliant with the Thread Specification. * * @param[in] aPrefix The on-link prefix to use. - * */ void SetOnLinkPrefix(const Ip6::Prefix &aPrefix) { mOnLinkPrefixManager.SetLocalPrefix(aPrefix); } #endif diff --git a/src/core/coap/coap.hpp b/src/core/coap/coap.hpp index a552021c88b..f558bb0c52b 100644 --- a/src/core/coap/coap.hpp +++ b/src/core/coap/coap.hpp @@ -60,14 +60,12 @@ namespace Coap { * @addtogroup core-coap * * @{ - * */ /** * Represents a function pointer which is called when a CoAP response is received or on the request timeout. * * Please see otCoapResponseHandler for details. - * */ typedef otCoapResponseHandler ResponseHandler; @@ -76,13 +74,11 @@ typedef otCoapResponseHandler ResponseHandler; * received. * * Please see otCoapRequestHandler for details. - * */ typedef otCoapRequestHandler RequestHandler; /** * Represents the CoAP transmission parameters. - * */ class TxParameters : public otCoapTxParameters { @@ -99,7 +95,6 @@ class TxParameters : public otCoapTxParameters * * @returns A reference to corresponding `TxParamters` if @p aTxParameters is not `nullptr`, otherwise the default * tx parameters. - * */ static const TxParameters &From(const otCoapTxParameters *aTxParameters) { @@ -110,7 +105,6 @@ class TxParameters : public otCoapTxParameters * Validates whether the CoAP transmission parameters are valid. * * @returns Whether the parameters are valid. - * */ bool IsValid(void) const; @@ -118,7 +112,6 @@ class TxParameters : public otCoapTxParameters * Returns default CoAP tx parameters. * * @returns The default tx parameters. - * */ static const TxParameters &GetDefault(void) { return static_cast(kDefaultTxParameters); } @@ -139,7 +132,6 @@ class TxParameters : public otCoapTxParameters /** * Implements CoAP resource handling. - * */ class Resource : public otCoapResource, public LinkedListEntry { @@ -152,7 +144,6 @@ class Resource : public otCoapResource, public LinkedListEntry * @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. * @param[in] aContext A pointer to arbitrary context information. - * */ Resource(const char *aUriPath, RequestHandler aHandler, void *aContext); @@ -162,7 +153,6 @@ class Resource : public otCoapResource, public LinkedListEntry * @param[in] aUri A Thread URI. * @param[in] aHandler A function pointer that is called when receiving a CoAP message for the URI. * @param[in] aContext A pointer to arbitrary context information. - * */ Resource(Uri aUri, RequestHandler aHandler, void *aContext); @@ -170,7 +160,6 @@ class Resource : public otCoapResource, public LinkedListEntry * Returns a pointer to the URI path. * * @returns A pointer to the URI path. - * */ const char *GetUriPath(void) const { return mUriPath; } @@ -184,7 +173,6 @@ class Resource : public otCoapResource, public LinkedListEntry #if OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE /** * Implements CoAP block-wise resource handling. - * */ class ResourceBlockWise : public otCoapBlockwiseResource { @@ -234,7 +222,6 @@ class ResourceBlockWise : public otCoapBlockwiseResource * 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. - * */ const ResourceBlockWise *GetNext(void) const { @@ -245,7 +232,6 @@ class ResourceBlockWise : public otCoapBlockwiseResource * 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. - * */ ResourceBlockWise *GetNext(void) { @@ -256,7 +242,6 @@ class ResourceBlockWise : public otCoapBlockwiseResource * Sets the next pointer on the entry. * * @param[in] aNext A pointer to the next entry. - * */ void SetNext(ResourceBlockWise *aNext) { static_cast(this)->mNext = aNext; } @@ -264,7 +249,6 @@ class ResourceBlockWise : public otCoapBlockwiseResource * Returns a pointer to the URI path. * * @returns A pointer to the URI path. - * */ const char *GetUriPath(void) const { return mUriPath; } @@ -278,7 +262,6 @@ class ResourceBlockWise : public otCoapBlockwiseResource /** * Caches CoAP responses to implement message deduplication. - * */ class ResponsesQueue { @@ -287,7 +270,6 @@ class ResponsesQueue * Default class constructor. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit ResponsesQueue(Instance &aInstance); @@ -302,13 +284,11 @@ class ResponsesQueue * @param[in] aMessage The CoAP response to add to the cache. * @param[in] aMessageInfo The message info corresponding to @p aMessage. * @param[in] aTxParameters Transmission parameters. - * */ void EnqueueResponse(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, const TxParameters &aTxParameters); /** * Removes all responses from the cache. - * */ void DequeueAllResponses(void); @@ -322,7 +302,6 @@ class ResponsesQueue * @retval kErrorNone Matching response found and successfully created a copy. * @retval kErrorNoBufs Matching response found but there is not sufficient buffer to create a copy. * @retval kErrorNotFound Matching response not found. - * */ Error GetMatchedResponseCopy(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo, Message **aResponse); @@ -330,7 +309,6 @@ class ResponsesQueue * Gets a reference to the cached CoAP responses queue. * * @returns A reference to the cached CoAP responses queue. - * */ const MessageQueue &GetResponses(void) const { return mQueue; } @@ -359,7 +337,6 @@ class ResponsesQueue /** * Implements the CoAP client and server. - * */ class CoapBase : public InstanceLocator, private NonCopyable { @@ -380,13 +357,11 @@ class CoapBase : public InstanceLocator, private NonCopyable * @retval kErrorNone Server should continue processing this message, other return values indicates the * server should stop processing this message. * @retval kErrorNotTmf The message is not a TMF message. - * */ typedef Error (*Interceptor)(const Message &aMessage, const Ip6::MessageInfo &aMessageInfo, void *aContext); /** * Clears requests and responses used by this CoAP agent. - * */ void ClearRequestsAndResponses(void); @@ -394,7 +369,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Clears requests with specified source address used by this CoAP agent. * * @param[in] aAddress A reference to the specified address. - * */ void ClearRequests(const Ip6::Address &aAddress); @@ -404,7 +378,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Adds a block-wise resource to the CoAP server. * * @param[in] aResource A reference to the resource. - * */ void AddBlockWiseResource(ResourceBlockWise &aResource); @@ -412,7 +385,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Removes a block-wise resource from the CoAP server. * * @param[in] aResource A reference to the resource. - * */ void RemoveBlockWiseResource(ResourceBlockWise &aResource); #endif @@ -421,7 +393,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Adds a resource to the CoAP server. * * @param[in] aResource A reference to the resource. - * */ void AddResource(Resource &aResource); @@ -429,7 +400,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Removes a resource from the CoAP server. * * @param[in] aResource A reference to the resource. - * */ void RemoveResource(Resource &aResource); @@ -437,7 +407,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @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. - * */ void SetDefaultHandler(RequestHandler aHandler, void *aContext) { mDefaultHandler.Set(aHandler, aContext); } @@ -447,7 +416,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @param[in] aSettings The message settings. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewMessage(const Message::Settings &aSettings); @@ -455,7 +423,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Allocates a new message with a CoAP header with default settings. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewMessage(void); @@ -463,7 +430,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * 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. - * */ Message *NewPriorityMessage(void); @@ -478,7 +444,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @param[in] aUri The URI. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewPriorityConfirmablePostMessage(Uri aUri); @@ -493,7 +458,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @param[in] aUri The URI. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewConfirmablePostMessage(Uri aUri); @@ -509,7 +473,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @param[in] aUri The URI. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewPriorityNonConfirmablePostMessage(Uri aUri); @@ -524,7 +487,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @param[in] aUri The URI. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewNonConfirmablePostMessage(Uri aUri); @@ -538,7 +500,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * marker when there is no payload. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewPriorityResponseMessage(const Message &aRequest); @@ -552,7 +513,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * marker when there is no payload. * * @returns A pointer to the message or `nullptr` if failed to allocate message. - * */ Message *NewResponseMessage(const Message &aRequest); @@ -574,7 +534,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Failed to allocate retransmission data. - * */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, @@ -600,7 +559,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP message. - * */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, @@ -620,7 +578,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP message. - * */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, const TxParameters &aTxParameters); /** @@ -635,7 +592,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. - * */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, @@ -652,7 +608,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. - * */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo); @@ -665,7 +620,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully enqueued the CoAP response message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. * @retval kErrorInvalidArgs The @p aRequest is not of confirmable type. - * */ Error SendReset(Message &aRequest, const Ip6::MessageInfo &aMessageInfo); @@ -679,7 +633,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully enqueued the CoAP response message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. * @retval kErrorInvalidArgs The @p aRequest header is not of confirmable type. - * */ Error SendHeaderResponse(Message::Code aCode, const Message &aRequest, const Ip6::MessageInfo &aMessageInfo); @@ -692,7 +645,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully enqueued the CoAP response message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. * @retval kErrorInvalidArgs The @p aRequest header is not of confirmable type. - * */ Error SendAck(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo); @@ -706,7 +658,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully enqueued the CoAP response message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. * @retval kErrorInvalidArgs The @p aRequest header is not of confirmable type. - * */ Error SendEmptyAck(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo, Code aCode); @@ -719,7 +670,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully enqueued the CoAP response message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. * @retval kErrorInvalidArgs The @p aRequest header is not of confirmable type. - * */ Error SendEmptyAck(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo); @@ -731,7 +681,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully enqueued the CoAP response message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. - * */ Error SendNotFound(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo); @@ -745,7 +694,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully enqueued the CoAP response message. * @retval kErrorNoBufs Insufficient buffers available to send the CoAP response. - * */ Error SendRequestEntityIncomplete(const Message &aRequest, const Ip6::MessageInfo &aMessageInfo) { @@ -763,7 +711,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully aborted CoAP transactions. * @retval kErrorNotFound CoAP transaction associated with given handler was not found. - * */ Error AbortTransaction(ResponseHandler aHandler, void *aContext); @@ -772,7 +719,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @param[in] aInterceptor A pointer to the interceptor. * @param[in] aContext A pointer to arbitrary context information. - * */ void SetInterceptor(Interceptor aInterceptor, void *aContext) { mInterceptor.Set(aInterceptor, aContext); } @@ -780,7 +726,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Returns a reference to the request message list. * * @returns A reference to the request message list. - * */ const MessageQueue &GetRequestMessages(void) const { return mPendingRequests; } @@ -788,7 +733,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Returns a reference to the cached response list. * * @returns A reference to the cached response list. - * */ const MessageQueue &GetCachedResponses(void) const { return mResponsesQueue.GetResponses(); } @@ -806,7 +750,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval TRUE Indicates that the URI path was known and the message was processed by the handler. * @retval FALSE Indicates that URI path was not known and the message was not processed by the handler. - * */ typedef bool (*ResourceHandler)(CoapBase &aCoapBase, const char *aUriPath, @@ -822,7 +765,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Failed to allocate retransmission data. - * */ typedef Error (*Sender)(CoapBase &aCoapBase, ot::Message &aMessage, const Ip6::MessageInfo &aMessageInfo); @@ -832,7 +774,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aSender A function pointer to send CoAP message, which SHOULD be a static * member method of a descendant of this class. - * */ CoapBase(Instance &aInstance, Sender aSender); @@ -841,7 +782,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * * @param[in] aMessage A reference to the received message. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. - * */ void Receive(ot::Message &aMessage, const Ip6::MessageInfo &aMessageInfo); @@ -849,7 +789,6 @@ class CoapBase : public InstanceLocator, private NonCopyable * Sets the resource handler function. * * @param[in] aHandler The resource handler function pointer. - * */ void SetResourceHandler(ResourceHandler aHandler) { mResourceHandler = aHandler; } @@ -962,7 +901,6 @@ class CoapBase : public InstanceLocator, private NonCopyable /** * Implements the CoAP client and server. - * */ class Coap : public CoapBase { @@ -971,7 +909,6 @@ class Coap : public CoapBase * Initializes the object. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit Coap(Instance &aInstance); @@ -983,7 +920,6 @@ class Coap : public CoapBase * * @retval kErrorNone Successfully started the CoAP service. * @retval kErrorFailed Failed to start CoAP agent. - * */ Error Start(uint16_t aPort, Ip6::NetifIdentifier aNetifIdentifier = Ip6::kNetifUnspecified); @@ -992,7 +928,6 @@ class Coap : public CoapBase * * @retval kErrorNone Successfully stopped the CoAP service. * @retval kErrorFailed Failed to stop CoAP agent. - * */ Error Stop(void); diff --git a/src/core/coap/coap_message.cpp b/src/core/coap/coap_message.cpp index 11a45602b78..6ddec43695d 100644 --- a/src/core/coap/coap_message.cpp +++ b/src/core/coap/coap_message.cpp @@ -114,7 +114,6 @@ uint8_t Message::WriteExtendedOptionField(uint16_t aValue, uint8_t *&aBuffer) * If `269 <= aValue`, two-byte extension is used and the value minis 269 * is written as a 16-bit unsigned integer and `14 (kOption2ByteExtension)` * is returned. - * */ uint8_t rval; diff --git a/src/core/coap/coap_message.hpp b/src/core/coap/coap_message.hpp index f985ff731e1..7ed8bdf26fd 100644 --- a/src/core/coap/coap_message.hpp +++ b/src/core/coap/coap_message.hpp @@ -55,7 +55,6 @@ namespace ot { * @namespace ot::Coap * @brief * This namespace includes definitions for CoAP. - * */ namespace Coap { @@ -66,14 +65,12 @@ namespace Coap { * This module includes definitions for CoAP. * * @{ - * */ class Option; /** * CoAP Type values. - * */ enum Type : uint8_t { @@ -85,7 +82,6 @@ enum Type : uint8_t /** * CoAP Code values. - * */ enum Code : uint8_t { @@ -133,7 +129,6 @@ enum Code : uint8_t /** * CoAP Option Numbers. - * */ enum OptionNumber : uint16_t { @@ -160,7 +155,6 @@ enum OptionNumber : uint16_t /** * Implements CoAP message generation and parsing. - * */ class Message : public ot::Message { @@ -177,7 +171,6 @@ class Message : public ot::Message /** * CoAP Block1/Block2 Types - * */ enum BlockType : uint8_t { @@ -189,7 +182,6 @@ class Message : public ot::Message /** * Initializes the CoAP header. - * */ void Init(void); @@ -198,7 +190,6 @@ class Message : public ot::Message * * @param[in] aType The Type value. * @param[in] aCode The Code value. - * */ void Init(Type aType, Code aCode); @@ -211,7 +202,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully appended the option. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error Init(Type aType, Code aCode, Uri aUri); @@ -225,7 +215,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully appended the option. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error InitAsPost(const Ip6::Address &aDestination, Uri aUri); @@ -234,7 +223,6 @@ class Message : public ot::Message * * 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); @@ -242,7 +230,6 @@ class Message : public ot::Message * Returns the Version value. * * @returns The Version value. - * */ uint8_t GetVersion(void) const { @@ -253,7 +240,6 @@ class Message : public ot::Message * Sets the Version value. * * @param[in] aVersion The Version value. - * */ void SetVersion(uint8_t aVersion) { @@ -265,7 +251,6 @@ class Message : public ot::Message * Returns the Type value. * * @returns The Type value. - * */ uint8_t GetType(void) const { return (GetHelpData().mHeader.mVersionTypeToken & kTypeMask) >> kTypeOffset; } @@ -273,7 +258,6 @@ class Message : public ot::Message * Sets the Type value. * * @param[in] aType The Type value. - * */ void SetType(Type aType) { @@ -285,7 +269,6 @@ class Message : public ot::Message * Returns the Code value. * * @returns The Code value. - * */ uint8_t GetCode(void) const { return static_cast(GetHelpData().mHeader.mCode); } @@ -293,7 +276,6 @@ class Message : public ot::Message * Sets the Code value. * * @param[in] aCode The Code value. - * */ void SetCode(Code aCode) { GetHelpData().mHeader.mCode = static_cast(aCode); } @@ -302,7 +284,6 @@ class Message : public ot::Message * Returns the CoAP Code as human readable string. * * @ returns The CoAP Code as string. - * */ const char *CodeToString(void) const; #endif // OPENTHREAD_CONFIG_COAP_API_ENABLE @@ -311,7 +292,6 @@ class Message : public ot::Message * Returns the Message ID value. * * @returns The Message ID value. - * */ uint16_t GetMessageId(void) const { return BigEndian::HostSwap16(GetHelpData().mHeader.mMessageId); } @@ -319,7 +299,6 @@ class Message : public ot::Message * Sets the Message ID value. * * @param[in] aMessageId The Message ID value. - * */ void SetMessageId(uint16_t aMessageId) { GetHelpData().mHeader.mMessageId = BigEndian::HostSwap16(aMessageId); } @@ -327,7 +306,6 @@ class Message : public ot::Message * Returns the Token length. * * @returns The Token length. - * */ uint8_t GetTokenLength(void) const { @@ -338,7 +316,6 @@ class Message : public ot::Message * Returns a pointer to the Token value. * * @returns A pointer to the Token value. - * */ const uint8_t *GetToken(void) const { return GetHelpData().mHeader.mToken; } @@ -350,7 +327,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully set the token value. * @retval kErrorNoBufs Insufficient message buffers available to set the token value. - * */ Error SetToken(const uint8_t *aToken, uint8_t aTokenLength); @@ -361,7 +337,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully set the token value. * @retval kErrorNoBufs Insufficient message buffers available to set the token value. - * */ Error SetTokenFromMessage(const Message &aMessage); @@ -372,7 +347,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully set the token value. * @retval kErrorNoBufs Insufficient message buffers available to set the token value. - * */ Error GenerateRandomToken(uint8_t aTokenLength); @@ -383,7 +357,6 @@ class Message : public ot::Message * * @retval TRUE If two Tokens are equal. * @retval FALSE If Tokens differ in length or value. - * */ bool IsTokenEqual(const Message &aMessage) const; @@ -397,7 +370,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendOption(uint16_t aNumber, uint16_t aLength, const void *aValue); @@ -414,7 +386,6 @@ class Message : public ot::Message * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. * @retval kErrorParse Not enough bytes in @p aMessage to read @p aLength bytes from @p aOffset. - * */ Error AppendOptionFromMessage(uint16_t aNumber, uint16_t aLength, const Message &aMessage, uint16_t aOffset); @@ -427,7 +398,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendUintOption(uint16_t aNumber, uint32_t aValue); @@ -440,7 +410,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendStringOption(uint16_t aNumber, const char *aValue); @@ -463,7 +432,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendUriPathOptions(const char *aUriPath); @@ -475,7 +443,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully read the Uri-Path options. * @retval kErrorParse CoAP Option header not well-formed. - * */ Error ReadUriPathOptions(char (&aUriPath)[kMaxReceivedUriPath + 1]) const; @@ -487,7 +454,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendUriQueryOptions(const char *aUriQuery); @@ -502,7 +468,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendBlockOption(BlockType aType, uint32_t aNum, bool aMore, otCoapBlockSzx aSize); @@ -514,7 +479,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendProxyUriOption(const char *aProxyUri) { return AppendStringOption(kOptionProxyUri, aProxyUri); } @@ -526,7 +490,6 @@ class Message : public ot::Message * @retval kErrorNone Successfully appended the option. * @retval kErrorInvalidArgs The option type is not equal or greater than the last option type. * @retval kErrorNoBufs The option length exceeds the buffer size. - * */ Error AppendContentFormatOption(otCoapOptionContentFormat aContentFormat) { @@ -572,7 +535,6 @@ class Message : public ot::Message * Returns the current header length of a message. * * @returns The length of the message header. - * */ uint16_t GetHeaderLength(void) const { return GetHelpData().mHeaderLength; } @@ -580,7 +542,6 @@ class Message : public ot::Message * Returns the block number of a CoAP block-wise transfer message. * * @returns The block number. - * */ uint32_t GetBlockWiseBlockNumber(void) const { return GetHelpData().mBlockWiseData.mBlockNumber; } @@ -589,7 +550,6 @@ class Message : public ot::Message * * @retval TRUE More Blocks flag is set. * @retval FALSE More Blocks flag is not set. - * */ bool IsMoreBlocksFlagSet(void) const { return GetHelpData().mBlockWiseData.mMoreBlocks; } @@ -597,7 +557,6 @@ class Message : public ot::Message * Returns the block size of a CoAP block-wise transfer message. * * @returns The block size. - * */ otCoapBlockSzx GetBlockWiseBlockSize(void) const { return GetHelpData().mBlockWiseData.mBlockSize; } #endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE @@ -607,7 +566,6 @@ class Message : public ot::Message * * @retval kErrorNone URI path string has been reassembled. * @retval kErrorNoBufs URI path string is too long. - * */ Error GetUriPath(char *aUriPath) const; @@ -618,7 +576,6 @@ class Message : public ot::Message * * @retval kErrorNone Payload Marker successfully added. * @retval kErrorNoBufs Message Payload Marker exceeds the buffer size. - * */ Error SetPayloadMarker(void); @@ -626,7 +583,6 @@ class Message : public ot::Message * Returns the offset of the first CoAP option. * * @returns The offset of the first CoAP option. - * */ uint16_t GetOptionStart(void) const { return kMinHeaderLength + GetTokenLength(); } @@ -635,7 +591,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully parsed CoAP header from the message. * @retval kErrorParse Failed to parse the CoAP header. - * */ Error ParseHeader(void); @@ -646,7 +601,6 @@ class Message : public ot::Message * * @retval kErrorNone Successfully set the default response header. * @retval kErrorNoBufs Insufficient message buffers available to set the default response header. - * */ Error SetDefaultResponseHeader(const Message &aRequest); @@ -656,7 +610,6 @@ class Message : public ot::Message * Sets the block number value in the message HelpData. * * @param[in] aBlockNumber Block number value to set. - * */ void SetBlockWiseBlockNumber(uint32_t aBlockNumber) { GetHelpData().mBlockWiseData.mBlockNumber = aBlockNumber; } @@ -664,7 +617,6 @@ class Message : public ot::Message * Sets the More Blocks flag in the message HelpData. * * @param[in] aMoreBlocks TRUE or FALSE. - * */ void SetMoreBlocksFlag(bool aMoreBlocks) { GetHelpData().mBlockWiseData.mMoreBlocks = aMoreBlocks; } @@ -672,7 +624,6 @@ class Message : public ot::Message * Sets the block size value in the message HelpData. * * @param[in] aBlockSize Block size value to set. - * */ void SetBlockWiseBlockSize(otCoapBlockSzx aBlockSize) { GetHelpData().mBlockWiseData.mBlockSize = aBlockSize; } #endif // OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE @@ -682,7 +633,6 @@ class Message : public ot::Message * * @retval TRUE Message is an empty message header. * @retval FALSE Message is not an empty message header. - * */ bool IsEmpty(void) const { return (GetCode() == kCodeEmpty); } @@ -691,7 +641,6 @@ class Message : public ot::Message * * @retval TRUE Message is a request header. * @retval FALSE Message is not a request header. - * */ bool IsRequest(void) const { return (GetCode() >= kCodeGet) && (GetCode() <= kCodeDelete); } @@ -700,7 +649,6 @@ class Message : public ot::Message * * @retval TRUE Message is a Get request. * @retval FALSE Message is not a Get request. - * */ bool IsGetRequest(void) const { return GetCode() == kCodeGet; } @@ -709,7 +657,6 @@ class Message : public ot::Message * * @retval TRUE Message is a Post request. * @retval FALSE Message is not a Post request. - * */ bool IsPostRequest(void) const { return GetCode() == kCodePost; } @@ -718,7 +665,6 @@ class Message : public ot::Message * * @retval TRUE Message is a Put request. * @retval FALSE Message is not a Put request. - * */ bool IsPutRequest(void) const { return GetCode() == kCodePut; } @@ -727,7 +673,6 @@ class Message : public ot::Message * * @retval TRUE Message is a Delete request. * @retval FALSE Message is not a Delete request. - * */ bool IsDeleteRequest(void) const { return GetCode() == kCodeDelete; } @@ -736,7 +681,6 @@ class Message : public ot::Message * * @retval TRUE Message is a response header. * @retval FALSE Message is not a response header. - * */ bool IsResponse(void) const { return GetCode() >= OT_COAP_CODE_RESPONSE_MIN; } @@ -745,7 +689,6 @@ class Message : public ot::Message * * @retval TRUE Message is a CON message header. * @retval FALSE Message is not is a CON message header. - * */ bool IsConfirmable(void) const { return (GetType() == kTypeConfirmable); } @@ -754,7 +697,6 @@ class Message : public ot::Message * * @retval TRUE Message is a NON message header. * @retval FALSE Message is not is a NON message header. - * */ bool IsNonConfirmable(void) const { return (GetType() == kTypeNonConfirmable); } @@ -763,7 +705,6 @@ class Message : public ot::Message * * @retval TRUE Message is a ACK message header. * @retval FALSE Message is not is a ACK message header. - * */ bool IsAck(void) const { return (GetType() == kTypeAck); } @@ -772,7 +713,6 @@ class Message : public ot::Message * * @retval TRUE Message is a RST message header. * @retval FALSE Message is not is a RST message header. - * */ bool IsReset(void) const { return (GetType() == kTypeReset); } @@ -782,7 +722,6 @@ class Message : public ot::Message * * @retval TRUE Message is a confirmable Post request. * @retval FALSE Message is not a confirmable Post request. - * */ bool IsConfirmablePostRequest(void) const; @@ -792,7 +731,6 @@ class Message : public ot::Message * * @retval TRUE Message is a non-confirmable Post request. * @retval FALSE Message is not a non-confirmable Post request. - * */ bool IsNonConfirmablePostRequest(void) const; @@ -806,7 +744,6 @@ class Message : public ot::Message * @param[in] aLength Number of payload bytes to copy. * * @returns A pointer to the message or `nullptr` if insufficient message buffers are available. - * */ Message *Clone(uint16_t aLength) const; @@ -818,13 +755,11 @@ class Message : public ot::Message * copied from the original one. * * @returns A pointer to the message or `nullptr` if insufficient message buffers are available. - * */ Message *Clone(void) const { return Clone(GetLength()); } /** * Returns the minimal reserved bytes required for CoAP message. - * */ static uint16_t GetHelpDataReserved(void) { return sizeof(HelpData) + kHelpDataAlignment; } @@ -835,7 +770,6 @@ class Message : public ot::Message * messages). * * @returns A pointer to the next message in the queue or `nullptr` if at the end of the queue. - * */ Message *GetNextCoapMessage(void) { return static_cast(GetNext()); } @@ -846,7 +780,6 @@ class Message : public ot::Message * messages). * * @returns A pointer to the next message in the queue or `nullptr` if at the end of the queue. - * */ const Message *GetNextCoapMessage(void) const { return static_cast(GetNext()); } @@ -883,7 +816,6 @@ class Message : public ot::Message * +-------------------------------+ * / Option Value / 0 or more bytes * +-------------------------------+ - * */ static constexpr uint8_t kOptionDeltaOffset = 4; @@ -924,7 +856,6 @@ class Message : public ot::Message /** * Represents a CoAP header excluding CoAP options. - * */ OT_TOOL_PACKED_BEGIN struct Header @@ -937,7 +868,6 @@ class Message : public ot::Message /** * Represents a HelpData used by this CoAP message. - * */ struct HelpData : public Clearable { @@ -1001,14 +931,12 @@ class Message : public ot::Message /** * Implements a CoAP message queue. - * */ class MessageQueue : public ot::MessageQueue { public: /** * Initializes the message queue. - * */ MessageQueue(void) = default; @@ -1016,7 +944,6 @@ class MessageQueue : public ot::MessageQueue * Returns a pointer to the first message. * * @returns A pointer to the first message. - * */ Message *GetHead(void) { return static_cast(ot::MessageQueue::GetHead()); } @@ -1024,7 +951,6 @@ class MessageQueue : public ot::MessageQueue * Returns a pointer to the first message. * * @returns A pointer to the first message. - * */ const Message *GetHead(void) const { return static_cast(ot::MessageQueue::GetHead()); } @@ -1032,7 +958,6 @@ class MessageQueue : public ot::MessageQueue * Adds a message to the end of the queue. * * @param[in] aMessage The message to add. - * */ void Enqueue(Message &aMessage) { Enqueue(aMessage, kQueuePositionTail); } @@ -1041,7 +966,6 @@ class MessageQueue : public ot::MessageQueue * * @param[in] aMessage The message to add. * @param[in] aPosition The position (head or tail) where to add the message. - * */ void Enqueue(Message &aMessage, QueuePosition aPosition) { ot::MessageQueue::Enqueue(aMessage, aPosition); } @@ -1049,7 +973,6 @@ class MessageQueue : public ot::MessageQueue * Removes a message from the queue. * * @param[in] aMessage The message to remove. - * */ void Dequeue(Message &aMessage) { ot::MessageQueue::Dequeue(aMessage); } @@ -1057,7 +980,6 @@ class MessageQueue : public ot::MessageQueue * Removes a message from the queue and frees it. * * @param[in] aMessage The message to remove and free. - * */ void DequeueAndFree(Message &aMessage) { ot::MessageQueue::DequeueAndFree(aMessage); } @@ -1075,14 +997,12 @@ class MessageQueue : public ot::MessageQueue /** * Represents a CoAP option. - * */ class Option : public otCoapOption { public: /** * Represents an iterator for CoAP options. - * */ class Iterator : public otCoapOptionIterator { @@ -1099,7 +1019,6 @@ class Option : public otCoapOption * * @retval kErrorNone Successfully initialized. Iterator is either at the first option or done. * @retval kErrorParse CoAP Option header in @p aMessage is not well-formed. - * */ Error Init(const Message &aMessage); @@ -1118,7 +1037,6 @@ class Option : public otCoapOption * * @retval kErrorNone Successfully initialized. Iterator is either at the first matching option or done. * @retval kErrorParse CoAP Option header in @p aMessage is not well-formed. - * */ Error Init(const Message &aMessage, uint16_t aNumber) { return InitOrAdvance(&aMessage, aNumber); } @@ -1127,7 +1045,6 @@ class Option : public otCoapOption * * @retval TRUE Iterator is done (reached end of Option header). * @retval FALSE Iterator is not done and currently pointing to a CoAP Option. - * */ bool IsDone(void) const { return mOption.mLength == kIteratorDoneLength; } @@ -1138,7 +1055,6 @@ class Option : public otCoapOption * * @retval TRUE There was an earlier parse error and the iterator is not valid. * @retval FALSE There was no earlier parse error and the iterator is valid. - * */ bool HasParseErrored(void) const { return mNextOptionOffset == kNextOptionOffsetParseError; } @@ -1149,7 +1065,6 @@ class Option : public otCoapOption * * @retval kErrorNone Successfully advanced the iterator. * @retval kErrorParse CoAP Option header is not well-formed. - * */ Error Advance(void); @@ -1163,7 +1078,6 @@ class Option : public otCoapOption * * @retval kErrorNone Successfully advanced the iterator. * @retval kErrorParse CoAP Option header is not well-formed. - * */ Error Advance(uint16_t aNumber) { return InitOrAdvance(nullptr, aNumber); } @@ -1171,7 +1085,6 @@ class Option : public otCoapOption * Gets the CoAP message associated with the iterator. * * @returns A reference to the CoAP message. - * */ const Message &GetMessage(void) const { return *static_cast(mMessage); } @@ -1180,7 +1093,6 @@ class Option : public otCoapOption * * @returns A pointer to the current CoAP Option, or `nullptr` if iterator is done (or there was an earlier * parse error). - * */ const Option *GetOption(void) const { return IsDone() ? nullptr : static_cast(&mOption); } @@ -1192,7 +1104,6 @@ class Option : public otCoapOption * * @retval kErrorNone Successfully read and copied the Option Value into given buffer. * @retval kErrorNotFound Iterator is done (not pointing to any option). - * */ Error ReadOptionValue(void *aValue) const; @@ -1204,7 +1115,6 @@ class Option : public otCoapOption * @retval kErrorNone Successfully read the Option value. * @retval kErrorNoBufs Value is too long to fit in an `uint64_t`. * @retval kErrorNotFound Iterator is done (not pointing to any option). - * */ Error ReadOptionValue(uint64_t &aUintValue) const; @@ -1214,7 +1124,6 @@ class Option : public otCoapOption * MUST be used after the iterator is done (i.e. iterated through all options). * * @returns The offset of beginning of the CoAP message payload - * */ uint16_t GetPayloadMessageOffset(void) const { return mNextOptionOffset; } @@ -1224,7 +1133,6 @@ class Option : public otCoapOption * MUST be used during the iterator is in progress. * * @returns The offset of beginning of the CoAP Option Value - * */ uint16_t GetOptionValueMessageOffset(void) const { return mNextOptionOffset - mOption.mLength; } @@ -1247,7 +1155,6 @@ class Option : public otCoapOption * Gets the CoAP Option Number. * * @returns The CoAP Option Number. - * */ uint16_t GetNumber(void) const { return mNumber; } @@ -1255,14 +1162,12 @@ class Option : public otCoapOption * Gets the CoAP Option Length (length of Option Value in bytes). * * @returns The CoAP Option Length (in bytes). - * */ uint16_t GetLength(void) const { return mLength; } }; /** * @} - * */ } // namespace Coap @@ -1278,7 +1183,6 @@ DefineMapEnum(otCoapCode, Coap::Code); * @param[in] aMessage A pointer to an `otMessage`. * * @returns A reference to `Coap::Message` matching @p aMessage. - * */ inline Coap::Message &AsCoapMessage(otMessage *aMessage) { return *static_cast(aMessage); } @@ -1288,7 +1192,6 @@ inline Coap::Message &AsCoapMessage(otMessage *aMessage) { return *static_cast(aMessage); } @@ -1298,7 +1201,6 @@ inline Coap::Message *AsCoapMessagePtr(otMessage *aMessage) { return static_cast * @param[in] aMessage A pointer to an `otMessage`. * * @returns A pointer to `Coap::Message` matching @p aMessage. - * */ inline const Coap::Message &AsCoapMessage(const otMessage *aMessage) { @@ -1311,7 +1213,6 @@ inline const Coap::Message &AsCoapMessage(const otMessage *aMessage) * @param[in] aMessage A pointer to an `otMessage`. * * @returns A pointer to `Coap::Message` matching @p aMessage. - * */ inline const Coap::Message *AsCoapMessagePtr(const otMessage *aMessage) { diff --git a/src/core/coap/coap_secure.hpp b/src/core/coap/coap_secure.hpp index a2517adc3a6..413d7976a7f 100644 --- a/src/core/coap/coap_secure.hpp +++ b/src/core/coap/coap_secure.hpp @@ -54,14 +54,12 @@ class CoapSecure : public CoapBase public: /** * Function pointer which is called reporting a connection event (when connection established or disconnected) - * */ typedef otHandleCoapSecureClientConnect ConnectEventCallback; /** * Callback to notify when the agent is automatically stopped due to reaching the maximum number of connection * attempts. - * */ typedef otCoapSecureAutoStopCallback AutoStopCallback; @@ -70,7 +68,6 @@ class CoapSecure : public CoapBase * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aLayerTwoSecurity Specifies whether to use layer two security or not. - * */ explicit CoapSecure(Instance &aInstance, bool aLayerTwoSecurity = false); @@ -81,7 +78,6 @@ class CoapSecure : public CoapBase * * @retval kErrorNone Successfully started the CoAP agent. * @retval kErrorAlready Already started. - * */ Error Start(uint16_t aPort); @@ -96,7 +92,6 @@ class CoapSecure : public CoapBase * * @retval kErrorNone Successfully started the CoAP agent. * @retval kErrorAlready Already started. - * */ Error Start(uint16_t aPort, uint16_t aMaxAttempts, AutoStopCallback aCallback, void *aContext); @@ -108,7 +103,6 @@ class CoapSecure : public CoapBase * * @retval kErrorNone Successfully started the CoAP agent. * @retval kErrorAlready Already started. - * */ Error Start(MeshCoP::SecureTransport::TransportCallback aCallback, void *aContext); @@ -117,7 +111,6 @@ class CoapSecure : public CoapBase * * @param[in] aCallback A pointer to a function to get called when connection state changes. * @param[in] aContext A pointer to arbitrary context information. - * */ void SetConnectEventCallback(ConnectEventCallback aCallback, void *aContext) { @@ -126,7 +119,6 @@ class CoapSecure : public CoapBase /** * Stops the secure CoAP agent. - * */ void Stop(void); @@ -138,7 +130,6 @@ class CoapSecure : public CoapBase * established. * * @retval kErrorNone Successfully started DTLS connection. - * */ Error Connect(const Ip6::SockAddr &aSockAddr, ConnectEventCallback aCallback, void *aContext); @@ -147,7 +138,6 @@ class CoapSecure : public CoapBase * * @retval TRUE If DTLS session is active. * @retval FALSE If DTLS session is not active. - * */ bool IsConnectionActive(void) const { return mDtls.IsConnectionActive(); } @@ -156,7 +146,6 @@ class CoapSecure : public CoapBase * * @retval TRUE The DTLS session is connected. * @retval FALSE The DTLS session is not connected. - * */ bool IsConnected(void) const { return mDtls.IsConnected(); } @@ -165,13 +154,11 @@ class CoapSecure : public CoapBase * * @retval TRUE The DTLS session is closed * @retval FALSE The DTLS session is not closed. - * */ bool IsClosed(void) const { return mDtls.IsClosed(); } /** * Stops the DTLS connection. - * */ void Disconnect(void) { mDtls.Disconnect(); } @@ -179,7 +166,6 @@ class CoapSecure : public CoapBase * Returns a reference to the DTLS object. * * @returns A reference to the DTLS object. - * */ MeshCoP::SecureTransport &GetDtls(void) { return mDtls; } @@ -187,7 +173,6 @@ class CoapSecure : public CoapBase * Gets the UDP port of this agent. * * @returns UDP port number. - * */ uint16_t GetUdpPort(void) const { return mDtls.GetUdpPort(); } @@ -199,7 +184,6 @@ class CoapSecure : public CoapBase * * @retval kErrorNone Successfully set the PSK. * @retval kErrorInvalidArgs The PSK is invalid. - * */ Error SetPsk(const uint8_t *aPsk, uint8_t aPskLength) { return mDtls.SetPsk(aPsk, aPskLength); } @@ -207,7 +191,6 @@ class CoapSecure : public CoapBase * Sets the PSK. * * @param[in] aPskd A Joiner PSKd. - * */ void SetPsk(const MeshCoP::JoinerPskd &aPskd); @@ -223,7 +206,6 @@ class CoapSecure : public CoapBase * @param[in] aPskLength The PSK char length. * @param[in] aPskIdentity The Identity Name for the PSK. * @param[in] aPskIdLength The PSK Identity Length. - * */ void SetPreSharedKey(const uint8_t *aPsk, uint16_t aPskLength, const uint8_t *aPskIdentity, uint16_t aPskIdLength) { @@ -241,7 +223,6 @@ class CoapSecure : public CoapBase * @param[in] aX509Length The length of certificate. * @param[in] aPrivateKey A pointer to the PEM formatted private key. * @param[in] aPrivateKeyLength The length of the private key. - * */ void SetCertificate(const uint8_t *aX509Cert, uint32_t aX509Length, @@ -258,7 +239,6 @@ class CoapSecure : public CoapBase * * @param[in] aX509CaCertificateChain A pointer to the PEM formatted X509 CA chain. * @param[in] aX509CaCertChainLength The length of chain. - * */ void SetCaCertificateChain(const uint8_t *aX509CaCertificateChain, uint32_t aX509CaCertChainLength) { @@ -278,7 +258,6 @@ class CoapSecure : public CoapBase * * @retval kErrorNone Successfully get the peer certificate. * @retval kErrorNoBufs Can't allocate memory for certificate. - * */ Error GetPeerCertificateBase64(unsigned char *aPeerCert, size_t *aCertLength, size_t aCertBufferSize) { @@ -291,7 +270,6 @@ class CoapSecure : public CoapBase * of peer certificate. * * @param[in] aVerifyPeerCertificate true, if the peer certificate should be verified - * */ void SetSslAuthMode(bool aVerifyPeerCertificate) { mDtls.SetSslAuthMode(aVerifyPeerCertificate); } @@ -314,7 +292,6 @@ class CoapSecure : public CoapBase * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Failed to allocate retransmission data. * @retval kErrorInvalidState DTLS connection was not initialized. - * */ Error SendMessage(Message &aMessage, ResponseHandler aHandler = nullptr, @@ -339,7 +316,6 @@ class CoapSecure : public CoapBase * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Failed to allocate retransmission data. * @retval kErrorInvalidState DTLS connection was not initialized. - * */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, @@ -362,7 +338,6 @@ class CoapSecure : public CoapBase * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Failed to allocate retransmission data. * @retval kErrorInvalidState DTLS connection was not initialized. - * */ Error SendMessage(Message &aMessage, ResponseHandler aHandler = nullptr, void *aContext = nullptr); @@ -381,7 +356,6 @@ class CoapSecure : public CoapBase * @retval kErrorNone Successfully sent CoAP message. * @retval kErrorNoBufs Failed to allocate retransmission data. * @retval kErrorInvalidState DTLS connection was not initialized. - * */ Error SendMessage(Message &aMessage, const Ip6::MessageInfo &aMessageInfo, @@ -394,7 +368,6 @@ class CoapSecure : public CoapBase * * @param[in] aMessage A reference to the received message. * @param[in] aMessageInfo A reference to the message info associated with @p aMessage. - * */ void HandleUdpReceive(ot::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) { @@ -405,7 +378,6 @@ class CoapSecure : public CoapBase * Returns the DTLS session's peer address. * * @return DTLS session's message info. - * */ const Ip6::MessageInfo &GetMessageInfo(void) const { return mDtls.GetMessageInfo(); } diff --git a/src/core/common/appender.hpp b/src/core/common/appender.hpp index 8cff1b5f49c..9f54b140857 100644 --- a/src/core/common/appender.hpp +++ b/src/core/common/appender.hpp @@ -49,14 +49,12 @@ namespace ot { * `Append()` method. * * Helps in construction of message content where the destination can be either a `Message` or a buffer. - * */ class Appender { public: /** * Represent the `Appender` Type (whether appending to a `Message` or data buffer). - * */ enum Type : uint8_t { @@ -70,7 +68,6 @@ class Appender * New content is appended to the end of @p aMessage, growing its length. * * @param[in] aMessage The message to append to. - * */ explicit Appender(Message &aMessage); @@ -82,7 +79,6 @@ class Appender * * @param[in] aBuffer A pointer to start of buffer. * @param[in] aSize The maximum size of @p aBuffer (number of available bytes in buffer). - * */ Appender(uint8_t *aBuffer, uint16_t aSize); @@ -90,7 +86,6 @@ class Appender * Indicates the `Appender` type (whether appending to a `Message` or data buffer). * * @returns The type of `Appender`. - * */ Type GetType(void) const { return mType; } @@ -102,7 +97,6 @@ class Appender * * @retval kErrorNone Successfully appended the bytes. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendBytes(const void *aBuffer, uint16_t aLength); @@ -115,7 +109,6 @@ class Appender * * @retval kErrorNone Successfully appended the object. * @retval kErrorNoBufs Insufficient available buffers to append @p aObject. - * */ template Error Append(const ObjectType &aObject) { @@ -130,7 +123,6 @@ class Appender * Can be used independent of the `Type` of `Appender`. * * @returns The number of byes appended so far. - * */ uint16_t GetAppendedLength(void) const; @@ -140,7 +132,6 @@ class Appender * MUST be used when `GetType() == kMessage`. Otherwise its behavior is undefined. * * @returns The `Message` instance associated with `Appender`. - * */ Message &GetMessage(void) const { return *mShared.mMessage.mMessage; } @@ -150,7 +141,6 @@ class Appender * MUST be used when `GetType() == kBuffer`. Otherwise its behavior is undefined. * * @returns A pointer to the start of the data buffer associated with `Appender`. - * */ uint8_t *GetBufferStart(void) const { return AsNonConst(mShared.mFrameBuilder.GetBytes()); } @@ -160,7 +150,6 @@ class Appender * MUST be used when `GetType() == kBuffer`. Otherwise its behavior is undefined. * * @pram[out] aData A reference to a `Data` to output the data buffer. - * */ void GetAsData(Data &aData) const; diff --git a/src/core/common/arg_macros.hpp b/src/core/common/arg_macros.hpp index ee54e0f0cf8..91023ba808e 100644 --- a/src/core/common/arg_macros.hpp +++ b/src/core/common/arg_macros.hpp @@ -40,7 +40,6 @@ * @param[in] ... A list of arguments (MUST contain at least one). * * @returns The first argument in the given list of input arguments. - * */ #define OT_FIRST_ARG(...) _OT_GET_FIRST_ARG(__VA_ARGS__, JUNK) @@ -52,7 +51,6 @@ * @param[in] ... A list of arguments (MUST contain either one or two arguments). * * @returns The second argument if any. - * */ #define OT_SECOND_ARG(...) _OT_GET_SECOND_ARG(_OT_HAS_ONE_ARG_OR_TWO_ARGS(__VA_ARGS__), __VA_ARGS__) @@ -67,7 +65,6 @@ * @param[in] ... A list of arguments (MUST contain at least one). * * @returns A comma separated list of arguments excluding the first one. - * */ #define OT_REST_ARGS(...) _OT_GET_REST_ARGS(_OT_HAS_ONE_ARG_VS_TWO_OR_MORE(__VA_ARGS__), __VA_ARGS__) diff --git a/src/core/common/array.hpp b/src/core/common/array.hpp index c9873e1b4c5..f32772cb47d 100644 --- a/src/core/common/array.hpp +++ b/src/core/common/array.hpp @@ -55,7 +55,6 @@ namespace ot { * @tparam kArrayLength The array length. * * @returns The array length (number of elements in the array). - * */ template constexpr inline uint16_t GetArrayLength(const Type (&)[kArrayLength]) { @@ -74,7 +73,6 @@ template constexpr inline uint16_t GetArr * @param[in] aArray A reference to the array. * * @returns Pointer to the past-the-end element. - * */ template inline Type *GetArrayEnd(Type (&aArray)[kArrayLength]) { @@ -93,7 +91,6 @@ template inline Type *GetArrayEnd(Type (& * @param[in] aArray A reference to the array. * * @returns Pointer to the past-the-end element. - * */ template inline const Type *GetArrayEnd(const Type (&aArray)[kArrayLength]) { @@ -108,7 +105,6 @@ template inline const Type *GetArrayEnd(c * @tparam SizeType The type to be used for array size, length, and index. If not specified, a default `uint` type * is determined based on `kMaxSize`, i.e., if `kMaxSize <= 255` then `uint8_t` will be used, * otherwise `uint16_t` will be used. - * */ template (kMaxSize); } @@ -201,7 +189,6 @@ class Array * Returns the current length of array (number of elements). * * @returns The current array length. - * */ IndexType GetLength(void) const { return mLength; } @@ -209,7 +196,6 @@ class Array * Sets the current length (number of elements) of the array. * * @param[in] aLength The array length. - * */ void SetLength(IndexType aLength) { mLength = aLength; } @@ -217,7 +203,6 @@ class Array * 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. - * */ Type *GetArrayBuffer(void) { return mElements; } @@ -225,7 +210,6 @@ class Array * 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. - * */ const Type *GetArrayBuffer(void) const { return mElements; } @@ -237,7 +221,6 @@ class Array * @param[in] aIndex The index to get. * * @returns A reference to the element in array at @p aIndex. - * */ Type &operator[](IndexType aIndex) { return mElements[aIndex]; } @@ -249,7 +232,6 @@ class Array * @param[in] aIndex The index to get. * * @returns A reference to the element in array at @p aIndex. - * */ const Type &operator[](IndexType aIndex) const { return mElements[aIndex]; } @@ -261,7 +243,6 @@ class Array * @param[in] aIndex The index to get. * * @returns A pointer to element in array at @p aIndex or `nullptr` if @p aIndex is not valid. - * */ Type *At(IndexType aIndex) { return (aIndex < mLength) ? &mElements[aIndex] : nullptr; } @@ -273,7 +254,6 @@ class Array * @param[in] aIndex The index to get. * * @returns A pointer to element in array at @p aIndex or `nullptr` if @p aIndex is not valid. - * */ const Type *At(IndexType aIndex) const { return (aIndex < mLength) ? &mElements[aIndex] : nullptr; } @@ -281,7 +261,6 @@ class Array * 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. - * */ Type *Front(void) { return At(0); } @@ -289,7 +268,6 @@ class Array * 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. - * */ const Type *Front(void) const { return At(0); } @@ -297,7 +275,6 @@ class Array * 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. - * */ Type *Back(void) { return At(mLength - 1); } @@ -305,7 +282,6 @@ class Array * 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. - * */ const Type *Back(void) const { return At(mLength - 1); } @@ -318,7 +294,6 @@ class Array * * @retval kErrorNone Successfully pushed back @p aEntry to the end of the array. * @retval kErrorNoBufs Could not append the new element since array is full. - * */ Error PushBack(const Type &aEntry) { return IsFull() ? kErrorNoBufs : (mElements[mLength++] = aEntry, kErrorNone); } @@ -329,7 +304,6 @@ class Array * initialize and use. * * @return A pointer to the newly appended element or `nullptr` if array is full. - * */ Type *PushBack(void) { return IsFull() ? nullptr : &mElements[mLength++]; } @@ -337,7 +311,6 @@ class Array * Removes the last element in the array. * * @returns A pointer to the removed element from the array, or `nullptr` if array is empty. - * */ Type *PopBack(void) { return IsEmpty() ? nullptr : &mElements[--mLength]; } @@ -349,7 +322,6 @@ class Array * @param[in] aElement A reference to an element in the array. * * @returns The index of @p aElement in the array. - * */ IndexType IndexOf(const Type &aElement) const { return static_cast(&aElement - &mElements[0]); } @@ -362,7 +334,6 @@ class Array * change after a call to this method. * * The method uses assignment `=` operator on `Type` to copy the last element in place of @p aElement. - * */ void Remove(Type &aElement) { @@ -382,7 +353,6 @@ class Array * @param[in] aEntry The entry to search for within the array. * * @returns A pointer to matched array element, or `nullptr` if a match could not be found. - * */ Type *Find(const Type &aEntry) { return AsNonConst(AsConst(this)->Find(aEntry)); } @@ -394,7 +364,6 @@ class Array * @param[in] aEntry The entry to search for within the array. * * @returns A pointer to matched array element, or `nullptr` if a match could not be found. - * */ const Type *Find(const Type &aEntry) const { @@ -421,7 +390,6 @@ class Array * * @retval TRUE The array contains a matching element with @p aEntry. * @retval FALSE The array does not contain a matching element with @p aEntry. - * */ bool Contains(const Type &aEntry) const { return Find(aEntry) != nullptr; } @@ -437,7 +405,6 @@ class Array * @param[in] aIndicator An indicator to match with elements in the array. * * @returns A pointer to the matched array element, or `nullptr` if a match could not be found. - * */ template Type *FindMatching(const Indicator &aIndicator) { @@ -456,7 +423,6 @@ class Array * @param[in] aIndicator An indicator to match with elements in the array. * * @returns A pointer to the matched array element, or `nullptr` if a match could not be found. - * */ template const Type *FindMatching(const Indicator &aIndicator) const { @@ -487,7 +453,6 @@ class Array * * @retval TRUE The array contains a matching element with @p aIndicator. * @retval FALSE The array does not contain a matching element with @p aIndicator. - * */ template bool ContainsMatching(const Indicator &aIndicator) const { @@ -508,7 +473,6 @@ class Array * bool Type::Matches(const Indicator &aIndicator) const * * @param[in] aIndicator An indicator to match with elements in the array. - * */ template void RemoveMatching(const Indicator &aIndicator) { @@ -533,7 +497,6 @@ class Array * bool Type::Matches(const Indicator &aIndicator) const * * @param[in] aIndicator An indicator to match with elements in the array. - * */ template void RemoveAllMatching(const Indicator &aIndicator) { @@ -563,7 +526,6 @@ class Array * the array. * * @param[in] aOtherArray Another array to copy from. - * */ Array &operator=(const Array &aOtherArray) { @@ -587,7 +549,6 @@ class Array * * @retval TRUE The @p aEntry is from the array. * @retval FALSE The @p aEntry is not from the array. - * */ bool IsInArrayBuffer(const Type *aEntry) const { diff --git a/src/core/common/as_core_type.hpp b/src/core/common/as_core_type.hpp index ffe4e293164..d10db1dfeb7 100644 --- a/src/core/common/as_core_type.hpp +++ b/src/core/common/as_core_type.hpp @@ -49,7 +49,6 @@ namespace ot { * named `Type` to provide the corresponding core class/type related to `FromType. * * For example, `CoreType::Type` is defined as `Ip6::Address`. - * */ template struct CoreType; @@ -61,7 +60,6 @@ template struct CoreType; * @param[in] aObject A pointer to the object to convert. * * @returns A reference of the corresponding C++ type matching @p aObject. - * */ template typename CoreType::Type &AsCoreType(Type *aObject) { @@ -78,7 +76,6 @@ template typename CoreType::Type &AsCoreType(Type *aObject * @param[in] aObject A const pointer to the object to convert. * * @returns A const reference of the corresponding C++ type matching @p aObject. - * */ template const typename CoreType::Type &AsCoreType(const Type *aObject) { @@ -95,7 +92,6 @@ template const typename CoreType::Type &AsCoreType(const T * @param[in] aObject A pointer to the object to convert. * * @returns A pointer of the corresponding C++ type matching @p aObject. - * */ template typename CoreType::Type *AsCoreTypePtr(Type *aObject) { @@ -110,7 +106,6 @@ template typename CoreType::Type *AsCoreTypePtr(Type *aObj * @param[in] aObject A pointer to the object to convert. * * @returns A const pointer of the corresponding C++ type matching @p aObject. - * */ template const typename CoreType::Type *AsCoreTypePtr(const Type *aObject) { @@ -126,7 +121,6 @@ template const typename CoreType::Type *AsCoreTypePtr(cons * the related `enum` type mapped with `FromEnumType`. * * For example, `MappedEnum::Type` is defined as `Mac::Filter::Mode`. - * */ template struct MappedEnum; @@ -136,7 +130,6 @@ template struct MappedEnum; * @param[in] aValue The enumeration value to convert * * @returns The matching enumeration value. - * */ template const typename MappedEnum::Type MapEnum(EnumType aValue) { diff --git a/src/core/common/binary_search.hpp b/src/core/common/binary_search.hpp index 434c172c84f..7a046efc631 100644 --- a/src/core/common/binary_search.hpp +++ b/src/core/common/binary_search.hpp @@ -67,7 +67,6 @@ class BinarySearch * @param[in] aTable A reference to an array of `kLength` entries of type `Entry` * * @returns A pointer to the entry in the table if a match is found, otherwise `nullptr` (no match in table). - * */ template static const Entry *Find(const Key &aKey, const Entry (&aTable)[kLength]) @@ -95,7 +94,6 @@ class BinarySearch * * @retval TRUE If the entries in @p aTable are sorted. * @retval FALSE If the entries in @p aTable are not sorted. - * */ template static constexpr bool IsSorted(const Entry (&aTable)[kLength]) { diff --git a/src/core/common/bit_vector.hpp b/src/core/common/bit_vector.hpp index 9b24043d028..44f0d40315f 100644 --- a/src/core/common/bit_vector.hpp +++ b/src/core/common/bit_vector.hpp @@ -51,14 +51,12 @@ namespace ot { * This module includes definitions for bit-vector. * * @{ - * */ /** * Represents a bit-vector. * * @tparam N Specifies the number of bits. - * */ template class BitVector : public Equatable>, public Clearable> { @@ -70,7 +68,6 @@ template class BitVector : public Equatable>, public C * * @retval TRUE If the given index is set. * @retval FALSE If the given index is clear. - * */ bool Get(uint16_t aIndex) const { @@ -83,7 +80,6 @@ template class BitVector : public Equatable>, public C * * @param[in] aIndex The index. * @param[in] aValue TRUE to set the mask, or FALSE to clear the mask. - * */ void Set(uint16_t aIndex, bool aValue) { @@ -104,7 +100,6 @@ template class BitVector : public Equatable>, public C * * @retval TRUE If any index is set. * @retval FALSE If all indexes are clear. - * */ bool HasAny(void) const { @@ -128,7 +123,6 @@ template class BitVector : public Equatable>, public C /** * @} - * */ } // namespace ot diff --git a/src/core/common/callback.hpp b/src/core/common/callback.hpp index da4a6fa2715..77136bda546 100644 --- a/src/core/common/callback.hpp +++ b/src/core/common/callback.hpp @@ -44,7 +44,6 @@ namespace ot { /** * Specifies the context argument position in a callback function pointer. - * */ enum CallbackContextPosition : uint8_t { @@ -56,14 +55,12 @@ enum CallbackContextPosition : uint8_t * Is the base class for `Callback` (a function pointer handler and a `void *` context). * * @tparam HandlerType The handler function pointer type. - * */ template class CallbackBase { public: /** * Clears the `Callback` by setting the handler function pointer to `nullptr`. - * */ void Clear(void) { mHandler = nullptr; } @@ -72,7 +69,6 @@ template class CallbackBase * * @param[in] aHandler The handler function pointer. * @param[in] aContext The context associated with handler. - * */ void Set(HandlerType aHandler, void *aContext) { @@ -85,7 +81,6 @@ template class CallbackBase * * @retval TRUE The handler is set. * @retval FALSE The handler is not set. - * */ bool IsSet(void) const { return (mHandler != nullptr); } @@ -93,7 +88,6 @@ template class CallbackBase * Returns the handler function pointer. * * @returns The handler function pointer. - * */ HandlerType GetHandler(void) const { return mHandler; } @@ -101,7 +95,6 @@ template class CallbackBase * Returns the context associated with callback. * * @returns The context. - * */ void *GetContext(void) const { return mContext; } @@ -113,7 +106,6 @@ template class CallbackBase * * @retval TRUE The callback matches @p aHandler and @p aContext. * @retval FALSE The callback does not match @p aHandler and @p aContext. - * */ bool Matches(HandlerType aHandler, void *aContext) const { @@ -145,7 +137,6 @@ template class CallbackBase * * @tparam HandlerType The function pointer handler type. * @tparam CallbackContextPosition Context position (first or last). Automatically determined at compile-time. - * */ template class Callback : /** * Initializes `Callback` as empty (`nullptr` handler function pointer). - * */ Callback(void) = default; @@ -181,7 +171,6 @@ template class Callback : * @param[in] aArgs The args to pass to the callback handler. * * @returns The return value from handler. - * */ template ReturnType Invoke(Args &&...aArgs) const { @@ -194,7 +183,6 @@ template class Callback : * The method MUST be used when the handler function returns `void`. * * @param[in] aArgs The args to pass to the callback handler. - * */ template void InvokeIfSet(Args &&...aArgs) const { @@ -216,7 +204,6 @@ template class Callback : * implementation. * * @param[in] aArgs The args to pass to the callback handler. - * */ template void InvokeAndClearIfSet(Args &&...aArgs) { @@ -265,7 +252,6 @@ template class Callback * implementation. * * @param[in] aArgs The args to pass to the callback handler. - * */ template void InvokeAndClearIfSet(Args &&...aArgs) { diff --git a/src/core/common/clearable.hpp b/src/core/common/clearable.hpp index bc1b1f6371e..679f35c603a 100644 --- a/src/core/common/clearable.hpp +++ b/src/core/common/clearable.hpp @@ -48,7 +48,6 @@ namespace ot { * @tparam ObjectType The object type. * * @param[in] aObject A reference to the object of type `ObjectType` to clear all its bytes. - * */ template void ClearAllBytes(ObjectType &aObject) { @@ -64,7 +63,6 @@ template void ClearAllBytes(ObjectType &aObject) * * Users of this class should follow CRTP-style inheritance, i.e., the `Type` class itself should publicly inherit * from `Clearable`. - * */ template class Clearable { diff --git a/src/core/common/code_utils.hpp b/src/core/common/code_utils.hpp index 647042a9c89..e8194d4be9b 100644 --- a/src/core/common/code_utils.hpp +++ b/src/core/common/code_utils.hpp @@ -46,7 +46,6 @@ * @param[in] aArray Name of the array variable. * * @returns Number of elements in the array. - * */ #define OT_ARRAY_LENGTH(aArray) (sizeof(aArray) / sizeof(aArray[0])) @@ -59,7 +58,6 @@ * @param[in] Name of the array variable * * @returns Pointer to the past-the-end element. - * */ #define OT_ARRAY_END(aArray) (&aArray[OT_ARRAY_LENGTH(aArray)]) @@ -70,7 +68,6 @@ * @param[in] aAlignment The desired alignment. * * @returns The aligned pointer. - * */ #define OT_ALIGN(aPointer, aAlignment) \ ((void *)(((uintptr_t)(aPointer) + (aAlignment)-1UL) & ~((uintptr_t)(aAlignment)-1UL))) @@ -84,13 +81,11 @@ /** * Returns the smaller of @p a and @p b. - * */ #define OT_MIN(a, b) ((b) < (a) ? (b) : (a)) /** * Returns the greater of @p a and @p b. - * */ #define OT_MAX(a, b) ((a) < (b) ? (b) : (a)) @@ -99,7 +94,6 @@ * label 'exit' if the status is unsuccessful. * * @param[in] aStatus A scalar status to be evaluated against zero (0). - * */ #define SuccessOrExit(aStatus) \ do \ @@ -116,7 +110,6 @@ * * @param[in] aCondition A Boolean expression to be evaluated. * @param[in] aAction An optional expression or block to execute when the assertion fails. - * */ #define VerifyOrExit(...) \ do \ @@ -135,7 +128,6 @@ * function body. * * @param[in] ... An optional expression or block to execute when the assertion fails. - * */ #define ExitNow(...) \ do \ @@ -151,7 +143,6 @@ * safely ignored. * * @param[in] aStatement The function/method to execute. - * */ #define IgnoreReturnValue(aStatement) \ do \ @@ -168,7 +159,6 @@ * the error can be safely ignored or there is guaranteed to be no error. * * @param[in] aError The error to be ignored. - * */ static inline void IgnoreError(otError aError) { OT_UNUSED_VARIABLE(aError); } diff --git a/src/core/common/const_cast.hpp b/src/core/common/const_cast.hpp index e63fce812ad..bd79c03032f 100644 --- a/src/core/common/const_cast.hpp +++ b/src/core/common/const_cast.hpp @@ -46,7 +46,6 @@ namespace ot { * @param[in] aObject A non-const reference to an object. * * @returns A const reference to @p aObject reference. - * */ template const Type &AsConst(Type &aObject) { return const_cast(aObject); } @@ -58,7 +57,6 @@ template const Type &AsConst(Type &aObject) { return const_cast< * @param[in] aPointer A non-const pointer to an object. * * @returns A const pointer to @p aPointer pointer. - * */ template const Type *AsConst(Type *aPointer) { return const_cast(aPointer); } @@ -70,7 +68,6 @@ template const Type *AsConst(Type *aPointer) { return const_cast * @param[in] aObject A const reference to an object. * * @returns A non-const reference to @p aObject reference. - * */ template Type &AsNonConst(const Type &aObject) { return const_cast(aObject); } @@ -82,7 +79,6 @@ template Type &AsNonConst(const Type &aObject) { return const_ca * @param[in] aPointer A const pointer to an object. * * @returns A non-const pointer to @p aPointer pointer. - * */ template Type *AsNonConst(const Type *aPointer) { return const_cast(aPointer); } diff --git a/src/core/common/crc16.hpp b/src/core/common/crc16.hpp index e5a84194b87..add84a6d129 100644 --- a/src/core/common/crc16.hpp +++ b/src/core/common/crc16.hpp @@ -42,7 +42,6 @@ namespace ot { /** * Implements CRC16 computations. - * */ class Crc16 { @@ -57,13 +56,11 @@ class Crc16 * Initializes the object. * * @param[in] aPolynomial The polynomial value. - * */ explicit Crc16(Polynomial aPolynomial); /** * Initializes the CRC16 computation. - * */ void Init(void) { mCrc = 0; } @@ -71,7 +68,6 @@ class Crc16 * Feeds a byte value into the CRC16 computation. * * @param[in] aByte The byte value. - * */ void Update(uint8_t aByte); @@ -79,7 +75,6 @@ class Crc16 * Gets the current CRC16 value. * * @returns The current CRC16 value. - * */ uint16_t Get(void) const { return mCrc; } diff --git a/src/core/common/data.hpp b/src/core/common/data.hpp index aa865cc1458..3afff1efe4f 100644 --- a/src/core/common/data.hpp +++ b/src/core/common/data.hpp @@ -52,7 +52,6 @@ namespace ot { /** * Type is used as the template parameter in `Data` and `MutableData` to indicate the `uint` type to * use for the data length. - * */ enum DataLengthType : uint8_t { @@ -71,13 +70,11 @@ enum DataLengthType : uint8_t * * @retval TRUE if @p aFirst matches @p aSecond. * @retval FALSE if @p aFirst does not match @p aSecond. - * */ typedef bool (*ByteMatcher)(uint8_t aFirst, uint8_t aSecond); /** * Implements common utility methods used by `Data` and `MutableData`. - * */ class DataUtils { @@ -103,7 +100,6 @@ template class MutableData; * instance (e.g., `GetBytes()` or `GetLength()`), otherwise the behavior is undefined. * * @tparam kDataLengthType Determines the data length type (`uint8_t` or `uint16_t`). - * */ template class Data : public Clearable>, public Unequatable>, private DataUtils @@ -113,7 +109,6 @@ class Data : public Clearable>, public Unequatable::Type; @@ -122,7 +117,6 @@ class Data : public Clearable>, public Unequatable>, public Unequatable>, public Unequatable void InitFrom(const ObjectType &aObject) { @@ -163,7 +155,6 @@ class Data : public Clearable>, public Unequatable>, public Unequatable>, public Unequatable>, public Unequatable>, public Unequatable>, public Unequatable>, public Unequatable>, public Unequatable>, public Unequatable class MutableData : public Data { @@ -280,7 +263,6 @@ template class MutableData : public Data class MutableData : public Data class MutableData : public Data class MutableData : public Data void InitFrom(ObjectType &aObject) { @@ -323,7 +302,6 @@ template class MutableData : public Data class MutableData : public Data class MutableData : public Data class MutableData : public Data &aData) { diff --git a/src/core/common/debug.hpp b/src/core/common/debug.hpp index fef8199b5cb..9e38eb73509 100644 --- a/src/core/common/debug.hpp +++ b/src/core/common/debug.hpp @@ -47,7 +47,6 @@ /** * Allow the build system to provide a custom file name. - * */ #ifndef FILE_NAME #define FILE_NAME __FILE__ @@ -97,7 +96,6 @@ * and `OT_ASSERT()` if it is not. * * @param[in] aStatus A scalar status to be evaluated against zero (0). - * */ #define SuccessOrAssert(aStatus) \ do \ @@ -115,7 +113,6 @@ * when `OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL` is enabled. Otherwise it is an empty macro. * * @param[in] aPointer The pointer variable (API input parameter) to check. - * */ #if OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL #define AssertPointerIsNotNull(aPointer) OT_ASSERT((aPointer) != nullptr) diff --git a/src/core/common/encoding.hpp b/src/core/common/encoding.hpp index 77cae42d2fb..8ef78e595eb 100644 --- a/src/core/common/encoding.hpp +++ b/src/core/common/encoding.hpp @@ -107,7 +107,6 @@ inline constexpr uint64_t HostSwap64(uint64_t v) { return Swap64(v); } * @param aValue The value to host swap. * * @returns The host swapped value. - * */ template UintType HostSwap(UintType aValue); @@ -122,7 +121,6 @@ template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue * @param[in] aBuffer Pointer to buffer to read from. * * @returns The `uint16_t` value read from buffer. - * */ inline uint16_t ReadUint16(const uint8_t *aBuffer) { return static_cast((aBuffer[0] << 8) | aBuffer[1]); } @@ -132,7 +130,6 @@ inline uint16_t ReadUint16(const uint8_t *aBuffer) { return static_cast UintType Read(const uint8_t *aBuffer); @@ -192,7 +186,6 @@ template <> inline uint64_t Read(const uint8_t *aBuffer) { return ReadUint64(aBu * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) { @@ -205,7 +198,6 @@ inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) { @@ -219,7 +211,6 @@ inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint32(uint32_t aValue, uint8_t *aBuffer) { @@ -234,7 +225,6 @@ inline void WriteUint32(uint32_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint64(uint64_t aValue, uint8_t *aBuffer) { @@ -255,7 +245,6 @@ inline void WriteUint64(uint64_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[in] aBuffer Pointer to the buffer to write to. - * */ template void Write(UintType aValue, uint8_t *aBuffer); @@ -290,7 +279,6 @@ inline constexpr uint64_t HostSwap64(uint64_t v) { return v; } * @param aValue The value to host swap. * * @returns The host swapped value. - * */ template UintType HostSwap(UintType aValue); @@ -305,7 +293,6 @@ template <> inline uint64_t HostSwap(uint64_t aValue) { return HostSwap64(aValue * @param[in] aBuffer Pointer to buffer to read from. * * @returns The `uint16_t` value read from buffer. - * */ inline uint16_t ReadUint16(const uint8_t *aBuffer) { return static_cast(aBuffer[0] | (aBuffer[1] << 8)); } @@ -315,7 +302,6 @@ inline uint16_t ReadUint16(const uint8_t *aBuffer) { return static_cast UintType Read(const uint8_t *aBuffer); @@ -375,7 +358,6 @@ template <> inline uint64_t Read(const uint8_t *aBuffer) { return ReadUint64(aBu * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) { @@ -388,7 +370,6 @@ inline void WriteUint16(uint16_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) { @@ -402,7 +383,6 @@ inline void WriteUint24(uint32_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint32(uint32_t aValue, uint8_t *aBuffer) { @@ -417,7 +397,6 @@ inline void WriteUint32(uint32_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[out] aBuffer Pointer to buffer where the value will be written. - * */ inline void WriteUint64(uint64_t aValue, uint8_t *aBuffer) { @@ -438,7 +417,6 @@ inline void WriteUint64(uint64_t aValue, uint8_t *aBuffer) * * @param[in] aValue The value to write to buffer. * @param[in] aBuffer Pointer to the buffer to write to. - * */ template void Write(UintType aValue, uint8_t *aBuffer); diff --git a/src/core/common/equatable.hpp b/src/core/common/equatable.hpp index 8ece3bb27fe..f5cdc5f7505 100644 --- a/src/core/common/equatable.hpp +++ b/src/core/common/equatable.hpp @@ -47,7 +47,6 @@ namespace ot { * * Users of this class should follow CRTP-style inheritance, i.e., the `Type` class itself should publicly inherit * from `Unequatable`. - * */ template class Unequatable { @@ -61,7 +60,6 @@ template class Unequatable * * @retval TRUE If the two `Type` instances are not equal. * @retval FALSE If the two `Type` instances are equal. - * */ bool operator!=(const Type &aOther) const { return !(*static_cast(this) == aOther); } }; @@ -73,7 +71,6 @@ template class Unequatable * * Users of this class should follow CRTP-style inheritance, i.e., the `Type` class itself should publicly inherit * from `Equatable`. - * */ template class Equatable : public Unequatable { @@ -85,7 +82,6 @@ template class Equatable : public Unequatable * * @retval TRUE If the two `Type` instances are equal. * @retval FALSE If the two `Type` instances are not equal. - * */ bool operator==(const Type &aOther) const { diff --git a/src/core/common/error.hpp b/src/core/common/error.hpp index 27caac4240e..4ae8bfd98e7 100644 --- a/src/core/common/error.hpp +++ b/src/core/common/error.hpp @@ -44,14 +44,12 @@ namespace ot { /** * Represents error codes used by OpenThread core modules. - * */ typedef otError Error; /* * The `OT_ERROR_*` enumeration values are re-defined using `kError` style format. * See `openthread/error.h` for more details about each error. - * */ constexpr Error kErrorNone = OT_ERROR_NONE; constexpr Error kErrorFailed = OT_ERROR_FAILED; @@ -99,7 +97,6 @@ constexpr uint8_t kNumErrors = OT_NUM_ERRORS; * @param[in] aError An error. * * @returns A string representation of @p aError. - * */ const char *ErrorToString(Error aError); diff --git a/src/core/common/frame_builder.hpp b/src/core/common/frame_builder.hpp index 5d5a98d9e6c..4b8df2158c8 100644 --- a/src/core/common/frame_builder.hpp +++ b/src/core/common/frame_builder.hpp @@ -45,7 +45,6 @@ class Message; /** * The `FrameBuilder` can be used to construct frame content in a given data buffer. - * */ class FrameBuilder { @@ -57,7 +56,6 @@ class FrameBuilder * * @param[in] aBuffer A pointer to a buffer. * @param[in] aLength The data length (number of bytes in @p aBuffer). - * */ void Init(void *aBuffer, uint16_t aLength); @@ -65,7 +63,6 @@ class FrameBuilder * Returns a pointer to the start of `FrameBuilder` buffer. * * @returns A pointer to the frame buffer. - * */ const uint8_t *GetBytes(void) const { return mBuffer; } @@ -73,7 +70,6 @@ class FrameBuilder * Returns the current length of frame (number of bytes appended so far). * * @returns The current frame length. - * */ uint16_t GetLength(void) const { return mLength; } @@ -81,7 +77,6 @@ class FrameBuilder * Returns the maximum length of the frame. * * @returns The maximum frame length (max number of bytes in the frame buffer). - * */ uint16_t GetMaxLength(void) const { return mMaxLength; } @@ -92,7 +87,6 @@ class FrameBuilder * length is valid for the frame buffer. * * @param[in] aLength The maximum frame length. - * */ void SetMaxLength(uint16_t aLength) { mMaxLength = aLength; } @@ -100,7 +94,6 @@ class FrameBuilder * Returns the remaining length (number of bytes that can be appended) in the frame. * * @returns The remaining length. - * */ uint16_t GetRemainingLength(void) const { return mMaxLength - mLength; } @@ -112,7 +105,6 @@ class FrameBuilder * * @retval TRUE There are enough remaining bytes to append @p aLength bytes. * @retval FALSE There are not enough remaining bytes to append @p aLength bytes. - * */ bool CanAppend(uint16_t aLength) const { return (static_cast(mLength) + aLength) <= mMaxLength; } @@ -123,7 +115,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the value. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendUint8(uint8_t aUint8); @@ -134,7 +125,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the value. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendBigEndianUint16(uint16_t aUint16); @@ -145,7 +135,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the value. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendBigEndianUint32(uint32_t aUint32); @@ -156,7 +145,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the value. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendLittleEndianUint16(uint16_t aUint16); @@ -167,7 +155,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the value. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendLittleEndianUint32(uint32_t aUint32); @@ -179,7 +166,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the bytes. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendBytes(const void *aBuffer, uint16_t aLength); @@ -190,7 +176,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the address. * @retval kErrorNoBufs Insufficient available buffers. - * */ Error AppendMacAddress(const Mac::Address &aMacAddress); @@ -205,7 +190,6 @@ class FrameBuilder * @retval kErrorNone Successfully appended the bytes. * @retval kErrorNoBufs Insufficient available buffers to append the requested @p aLength bytes. * @retval kErrorParse Not enough bytes in @p aMessage to read @p aLength bytes from @p aOffset. - * */ Error AppendBytesFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLength); #endif @@ -219,7 +203,6 @@ class FrameBuilder * * @retval kErrorNone Successfully appended the object. * @retval kErrorNoBufs Insufficient available buffers to append @p aObject. - * */ template Error Append(const ObjectType &aObject) { @@ -237,7 +220,6 @@ class FrameBuilder * @param[in] aOffset The offset to begin writing. * @param[in] aBuffer A pointer to a data buffer to write. * @param[in] aLength Number of bytes in @p aBuffer. - * */ void WriteBytes(uint16_t aOffset, const void *aBuffer, uint16_t aLength); @@ -251,7 +233,6 @@ class FrameBuilder * * @param[in] aOffset The offset to begin writing. * @param[in] aObject A reference to the object to write. - * */ template void Write(uint16_t aOffset, const ObjectType &aObject) { @@ -272,7 +253,6 @@ class FrameBuilder * * @retval kErrorNone Successfully inserted the bytes. * @retval kErrorNoBufs Insufficient available buffers to insert the bytes. - * */ Error InsertBytes(uint16_t aOffset, const void *aBuffer, uint16_t aLength); @@ -289,7 +269,6 @@ class FrameBuilder * * @retval kErrorNone Successfully inserted the bytes. * @retval kErrorNoBufs Insufficient available buffers to insert the bytes. - * */ template Error Insert(uint16_t aOffset, const ObjectType &aObject) { @@ -307,7 +286,6 @@ class FrameBuilder * * @param[in] aOffset The offset to remove bytes from. * @param[in] aLength The number of bytes to remove. - * */ void RemoveBytes(uint16_t aOffset, uint16_t aLength); diff --git a/src/core/common/frame_data.hpp b/src/core/common/frame_data.hpp index 7aa8359334e..591e5b25770 100644 --- a/src/core/common/frame_data.hpp +++ b/src/core/common/frame_data.hpp @@ -46,7 +46,6 @@ namespace ot { * * It provide helper method to parse the content. As data is parsed and read, the `FrameData` is updated to skip over * the read content. - * */ class FrameData : public Data { @@ -59,7 +58,6 @@ class FrameData : public Data * * @retval TRUE There are enough remaining bytes to read @p aLength bytes. * @retval FALSE There are not enough remaining bytes to read @p aLength bytes. - * */ bool CanRead(uint16_t aLength) const { return GetLength() >= aLength; } @@ -72,7 +70,6 @@ class FrameData : public Data * * @retval kErrorNone Successfully read `uint8_t` value and skipped over it. * @retval kErrorParse Not enough bytes remaining to read. - * */ Error ReadUint8(uint8_t &aUint8); @@ -85,7 +82,6 @@ class FrameData : public Data * * @retval kErrorNone Successfully read `uint16_t` value and skipped over it. * @retval kErrorParse Not enough bytes remaining to read. - * */ Error ReadBigEndianUint16(uint16_t &aUint16); @@ -98,7 +94,6 @@ class FrameData : public Data * * @retval kErrorNone Successfully read `uint32_t` value and skipped over it. * @retval kErrorParse Not enough bytes remaining to read. - * */ Error ReadBigEndianUint32(uint32_t &aUint32); @@ -111,7 +106,6 @@ class FrameData : public Data * * @retval kErrorNone Successfully read `uint16_t` value and skipped over it. * @retval kErrorParse Not enough bytes remaining to read. - * */ Error ReadLittleEndianUint16(uint16_t &aUint16); @@ -124,7 +118,6 @@ class FrameData : public Data * * @retval kErrorNone Successfully read `uint32_t` value and skipped over it. * @retval kErrorParse Not enough bytes remaining to read. - * */ Error ReadLittleEndianUint32(uint32_t &aUint32); @@ -138,7 +131,6 @@ class FrameData : public Data * * @retval kErrorNone Successfully read @p aLength bytes into @p aBuffer and skipped over them. * @retval kErrorParse Not enough bytes remaining to read @p aLength. - * */ Error ReadBytes(void *aBuffer, uint16_t aLength); @@ -151,7 +143,6 @@ class FrameData : public Data * * @retval kErrorNone Successfully read @p aObject and skipped over the read content. * @retval kErrorParse Not enough bytes remaining to read the entire object. - * */ template Error Read(ObjectType &aObject) { @@ -167,7 +158,6 @@ class FrameData : public Data * this method is undefined. * * @param[in] aLength The length (number of bytes) to skip over. - * */ void SkipOver(uint16_t aLength); }; diff --git a/src/core/common/heap.hpp b/src/core/common/heap.hpp index 6dbe066cf9f..6b93b5efcbf 100644 --- a/src/core/common/heap.hpp +++ b/src/core/common/heap.hpp @@ -49,7 +49,6 @@ namespace Heap { * @param[in] aSize Size of each object. * * @returns A pointer to the allocated buffer or `nullptr` if fails to allocate. - * */ void *CAlloc(size_t aCount, size_t aSize); @@ -59,7 +58,6 @@ void *CAlloc(size_t aCount, size_t aSize); * A heap allocated buffer MUST be freed only once. * * @param[in] aPointer A pointer to the previously heap allocated buffer. Can be `nullptr` which does nothing. - * */ void Free(void *aPointer); diff --git a/src/core/common/heap_allocatable.hpp b/src/core/common/heap_allocatable.hpp index b51018d323e..94ae15fc6a9 100644 --- a/src/core/common/heap_allocatable.hpp +++ b/src/core/common/heap_allocatable.hpp @@ -54,7 +54,6 @@ namespace Heap { * * The `Type` class destructor is used when `Free()` is called. The destructor frees any heap allocated data members * that are stored in a `Type` instance (e.g., `Heap::String`, `Heap::Data`, etc). - * */ template class Allocatable { @@ -68,7 +67,6 @@ template class Allocatable * @param[in] aArgs A set of arguments to pass to the `Type` constructor of the allocated `Type` instance. * * @returns A pointer to the newly allocated instance or `nullptr` if it fails to allocate. - * */ template static Type *Allocate(Args &&...aArgs) { @@ -87,7 +85,6 @@ template class Allocatable * @param[in] aArgs A set of arguments to initialize the allocated `Type` instance. * * @returns A pointer to the newly allocated instance or `nullptr` if it fails to allocate or initialize. - * */ template static Type *AllocateAndInit(Args &&...aArgs) { @@ -116,7 +113,6 @@ template class Allocatable * The `Free()` method invokes the `Type` destructor before releasing the allocated heap buffer for the instance. * This ensures that any heap allocated member variables in `Type` are freed before the `Type` instance itself is * freed. - * */ void Free(void) { diff --git a/src/core/common/heap_array.hpp b/src/core/common/heap_array.hpp index a4f549a74e4..d9982477ee9 100644 --- a/src/core/common/heap_array.hpp +++ b/src/core/common/heap_array.hpp @@ -61,7 +61,6 @@ namespace Heap { * * @tparam Type The array element type. * @tparam kCapacityIncrements Number of elements to allocate at a time when updating the array buffer. - * */ template class Array { @@ -70,7 +69,6 @@ template class Array /** * Initializes the `Array` as empty. - * */ Array(void) : mArray(nullptr) @@ -81,7 +79,6 @@ template class Array /** * This is the destructor for `Array` object. - * */ ~Array(void) { Free(); } @@ -89,7 +86,6 @@ template class Array * Frees any buffer allocated by the `Array`. * * The `Array` destructor will automatically call `Free()`. This method allows caller to free buffer explicitly. - * */ void Free(void) { @@ -106,7 +102,6 @@ template class Array * the current capacity of the array. * * Invokes `Type` destructor on all cleared existing elements of array. - * */ void Clear(void) { @@ -122,7 +117,6 @@ template class Array * Returns the current array length (number of elements in the array). * * @returns The array length. - * */ IndexType GetLength(void) const { return mLength; } @@ -132,7 +126,6 @@ template class Array * The returned raw pointer is valid only while the `Array` remains unchanged. * * @returns A pointer to the array buffer or `nullptr` if the array is empty. - * */ const Type *AsCArray(void) const { return (mLength != 0) ? mArray : nullptr; } @@ -144,7 +137,6 @@ template class Array * reserved using `ReserveCapacity()` method. * * @returns The current capacity of the array. - * */ IndexType GetCapacity(void) const { return mCapacity; } @@ -157,7 +149,6 @@ template class Array * * @retval kErrorNone Array was successfully updated to support @p aCapacity. * @retval kErrorNoBufs Could not allocate buffer. - * */ Error ReserveCapacity(IndexType aCapacity) { return Allocate(aCapacity); } @@ -165,7 +156,6 @@ template class Array * 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). - * */ void TakeFrom(Array &&aOther) { @@ -186,7 +176,6 @@ template class Array * @param[in] aIndex The index to get. * * @returns A reference to the element in array at @p aIndex. - * */ Type &operator[](IndexType aIndex) { return mArray[aIndex]; } @@ -198,7 +187,6 @@ template class Array * @param[in] aIndex The index to get. * * @returns A reference to the element in array at @p aIndex. - * */ const Type &operator[](IndexType aIndex) const { return mArray[aIndex]; } @@ -211,7 +199,6 @@ template class Array * @param[in] aIndex The index to get. * * @returns A pointer to element in array at @p aIndex or `nullptr` if @p aIndex is not valid. - * */ Type *At(IndexType aIndex) { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } @@ -224,7 +211,6 @@ template class Array * @param[in] aIndex The index to get. * * @returns A pointer to element in array at @p aIndex or `nullptr` if @p aIndex is not valid. - * */ const Type *At(IndexType aIndex) const { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } @@ -234,7 +220,6 @@ template class Array * The returned pointer is valid only while the `Array` remains unchanged. * * @returns A pointer to the front element or `nullptr` if array is empty. - * */ Type *Front(void) { return At(0); } @@ -244,7 +229,6 @@ template class Array * The returned pointer is valid only while the `Array` remains unchanged. * * @returns A pointer to the front element or `nullptr` if array is empty. - * */ const Type *Front(void) const { return At(0); } @@ -254,7 +238,6 @@ template class Array * The returned pointer is valid only while the `Array` remains unchanged. * * @returns A pointer to the back element or `nullptr` if array is empty. - * */ Type *Back(void) { return (mLength > 0) ? &mArray[mLength - 1] : nullptr; } @@ -264,7 +247,6 @@ template class Array * The returned pointer is valid only while the `Array` remains unchanged. * * @returns A pointer to the back element or `nullptr` if array is empty. - * */ const Type *Back(void) const { return (mLength > 0) ? &mArray[mLength - 1] : nullptr; } @@ -278,7 +260,6 @@ template class Array * * @retval kErrorNone Successfully pushed back @p aEntry to the end of the array. * @retval kErrorNoBufs Could not allocate buffer to grow the array. - * */ Error PushBack(const Type &aEntry) { @@ -305,7 +286,6 @@ template class Array * * @retval kErrorNone Successfully pushed back @p aEntry to the end of the array. * @retval kErrorNoBufs Could not allocate buffer to grow the array. - * */ Error PushBack(Type &&aEntry) { @@ -332,7 +312,6 @@ template class Array * The returned pointer is valid only while the `Array` remains unchanged. * * @return A pointer to the newly appended element or `nullptr` if could not allocate buffer to grow the array - * */ Type *PushBack(void) { @@ -353,7 +332,6 @@ template class Array * Removes the last element in the array. * * Will invoke the `Type` destructor on the removed element. - * */ void PopBack(void) { @@ -372,7 +350,6 @@ template class Array * @param[in] aElement A reference to an element in the array. * * @returns The index of @p aElement in the array. - * */ IndexType IndexOf(const Type &aElement) const { return static_cast(&aElement - mArray); } @@ -385,7 +362,6 @@ template class Array * @param[in] aEntry The entry to search for within the array. * * @returns A pointer to matched array element, or `nullptr` if a match could not be found. - * */ Type *Find(const Type &aEntry) { return AsNonConst(AsConst(this)->Find(aEntry)); } @@ -398,7 +374,6 @@ template class Array * @param[in] aEntry The entry to search for within the array. * * @returns A pointer to matched array element, or `nullptr` if a match could not be found. - * */ const Type *Find(const Type &aEntry) const { @@ -425,7 +400,6 @@ template class Array * * @retval TRUE The array contains a matching element with @p aEntry. * @retval FALSE The array does not contain a matching element with @p aEntry. - * */ bool Contains(const Type &aEntry) const { return Find(aEntry) != nullptr; } @@ -443,7 +417,6 @@ template class Array * @param[in] aIndicator An indicator to match with elements in the array. * * @returns A pointer to the matched array element, or `nullptr` if a match could not be found. - * */ template Type *FindMatching(const Indicator &aIndicator) { @@ -464,7 +437,6 @@ template class Array * @param[in] aIndicator An indicator to match with elements in the array. * * @returns A pointer to the matched array element, or `nullptr` if a match could not be found. - * */ template const Type *FindMatching(const Indicator &aIndicator) const { @@ -495,7 +467,6 @@ template class Array * * @retval TRUE The array contains a matching element with @p aIndicator. * @retval FALSE The array does not contain a matching element with @p aIndicator. - * */ template bool ContainsMatching(const Indicator &aIndicator) const { diff --git a/src/core/common/heap_data.hpp b/src/core/common/heap_data.hpp index 2e3118ffbc7..0b51ce98ed0 100644 --- a/src/core/common/heap_data.hpp +++ b/src/core/common/heap_data.hpp @@ -45,14 +45,12 @@ namespace Heap { /** * Represents a heap allocated data. - * */ class Data { public: /** * Initializes the `Heap::Data` as empty. - * */ Data(void) { mData.Init(nullptr, 0); } @@ -63,13 +61,11 @@ class Data * used as return type (return by value) from functions/methods (which will then use move semantics). * * @param[in] aData An rvalue reference to another `Heap::Data` to move from. - * */ Data(Data &&aData) { TakeFrom(aData); } /** * This is the destructor for `Heap::Data` object. - * */ ~Data(void) { Free(); } @@ -79,7 +75,6 @@ class Data * * @retval TRUE The `Heap::Data` is null. * @retval FALSE The `Heap::Data` is not null. - * */ bool IsNull(void) const { return (mData.GetBytes() == nullptr); } @@ -87,7 +82,6 @@ class Data * 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). - * */ const uint8_t *GetBytes(void) const { return mData.GetBytes(); } @@ -95,7 +89,6 @@ class Data * Returns the `Heap::Data` length. * * @returns The data length (number of bytes) or zero if the `HeapData` is null. - * */ uint16_t GetLength(void) const { return mData.GetLength(); } @@ -107,7 +100,6 @@ class Data * * @retval kErrorNone Successfully set the `Heap::Data`. * @retval kErrorNoBufs Failed to allocate buffer. - * */ Error SetFrom(const uint8_t *aBuffer, uint16_t aLength); @@ -120,7 +112,6 @@ class Data * * @retval kErrorNone Successfully set the `Heap::Data`. * @retval kErrorNoBufs Failed to allocate buffer. - * */ Error SetFrom(const Message &aMessage); @@ -136,7 +127,6 @@ class Data * @retval kErrorNone Successfully set the `Heap::Data`. * @retval kErrorNoBufs Failed to allocate buffer. * @retval kErrorParse Not enough bytes in @p aMessage to read the requested @p aLength bytes. - * */ Error SetFrom(const Message &aMessage, uint16_t aOffset, uint16_t aLength); @@ -144,7 +134,6 @@ class Data * Sets the `Heap::Data` from another one (move semantics). * * @param[in] aData The other `Heap::Data` to set from (rvalue reference). - * */ void SetFrom(Data &&aData); @@ -155,7 +144,6 @@ class Data * * @retval kErrorNone Successfully copied the bytes from `Heap::Data` into @p aMessage. * @retval kErrorNoBufs Failed to allocate buffer. - * */ Error CopyBytesTo(Message &aMessage) const { return aMessage.AppendBytes(mData.GetBytes(), mData.GetLength()); } @@ -165,7 +153,6 @@ class Data * It is up to the caller to ensure that @p aBuffer has enough space for the current data length. * * @param[in] aBuffer A pointer to buffer to copy the bytes into. - * */ void CopyBytesTo(uint8_t *aBuffer) const { return mData.CopyBytesTo(aBuffer); } @@ -177,7 +164,6 @@ class Data * * @retval TRUE The `Data` content matches the bytes in @p aBuffer. * @retval FALSE The `Data` content does not match the byes in @p aBuffer. - * */ bool Matches(const uint8_t *aBuffer, uint16_t aLength) const; @@ -188,7 +174,6 @@ class Data * * @retval TRUE The two `Data` instances have matching content (same length and same bytes). * @retval FALSE The two `Data` instances do not have matching content. - * */ bool operator==(const Data &aOtherData) const { return mData == aOtherData.mData; } @@ -197,7 +182,6 @@ class Data * * The `Heap::Data` destructor will automatically call `Free()`. This method allows caller to free the buffer * explicitly. - * */ void Free(void); diff --git a/src/core/common/heap_string.hpp b/src/core/common/heap_string.hpp index adfa549c17e..b576194de62 100644 --- a/src/core/common/heap_string.hpp +++ b/src/core/common/heap_string.hpp @@ -49,14 +49,12 @@ namespace Heap { * The buffer to store the string is allocated from heap and is managed 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 * allocated buffer. - * */ class String : public Unequatable { public: /** * Initializes the `String` as null (or empty). - * */ String(void) : mStringBuffer(nullptr) @@ -68,7 +66,6 @@ class String : public Unequatable * * `String` is non-copyable (copy constructor is deleted) but move constructor is provided to allow it to to be * used as return type (return by value) from functions/methods (which will then use move semantics). - * */ String(String &&aString) : mStringBuffer(aString.mStringBuffer) @@ -78,7 +75,6 @@ class String : public Unequatable /** * This is the destructor for `HealString` object - * */ ~String(void) { Free(); } @@ -88,7 +84,6 @@ class String : public Unequatable * * @retval TRUE The `String` is null. * @retval FALSE The `String` is not null. - * */ bool IsNull(void) const { return (mStringBuffer == nullptr); } @@ -96,7 +91,6 @@ class String : public Unequatable * 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). - * */ const char *AsCString(void) const { return mStringBuffer; } @@ -107,7 +101,6 @@ class String : public Unequatable * * @retval kErrorNone Successfully set the string. * @retval kErrorNoBufs Failed to allocate buffer for string. - * */ Error Set(const char *aCString); @@ -118,7 +111,6 @@ class String : public Unequatable * * @retval kErrorNone Successfully set the string. * @retval kErrorNoBufs Failed to allocate buffer for string. - * */ Error Set(const String &aString) { return Set(aString.AsCString()); } @@ -129,7 +121,6 @@ class String : public Unequatable * * @retval kErrorNone Successfully set the string. * @retval kErrorNoBufs Failed to allocate buffer for string. - * */ Error Set(String &&aString); @@ -138,7 +129,6 @@ class String : public Unequatable * * The `String` destructor will automatically call `Free()`. This method allows caller to free buffer * explicitly. - * */ void Free(void); @@ -149,7 +139,6 @@ class String : public Unequatable * * @retval TRUE If the two strings are equal. * @retval FALSE If the two strings are not equal. - * */ bool operator==(const char *aCString) const; @@ -160,7 +149,6 @@ class String : public Unequatable * * @retval TRUE If the two strings are not equal. * @retval FALSE If the two strings are equal. - * */ bool operator!=(const char *aCString) const { return !(*this == aCString); } @@ -171,7 +159,6 @@ class String : public Unequatable * * @retval TRUE If the two strings are equal. * @retval FALSE If the two strings are not equal. - * */ bool operator==(const String &aString) const { return (*this == aString.AsCString()); } diff --git a/src/core/common/iterator_utils.hpp b/src/core/common/iterator_utils.hpp index f0ae96ed1f0..b2049ab4c5d 100644 --- a/src/core/common/iterator_utils.hpp +++ b/src/core/common/iterator_utils.hpp @@ -43,7 +43,6 @@ namespace ot { * This module includes definitions for OpenThread generic item-pointer iterator class. * * @{ - * */ /** @@ -59,7 +58,6 @@ namespace ot { * @tparam IteratorType The Iterator class that inherits this class. The class MUST have a method `Advance()` which * moves the pointer to the next. `Advance()` SHALL NOT be called when `IsDone()` is `true` and * would set the pointer to `nullptr` when there's no more elements. - * */ template class ItemPtrIterator { @@ -69,7 +67,6 @@ template class ItemPtrIterator * * @retval TRUE There are no more items to be accessed (iterator has reached the end). * @retval FALSE The current item is valid. - * */ bool IsDone(void) const { return mItem == nullptr; } @@ -79,7 +76,6 @@ template class ItemPtrIterator * 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()` * returns `true`). - * */ void operator++(void) { static_cast(this)->Advance(); } @@ -89,7 +85,6 @@ template class ItemPtrIterator * 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()` * returns `true`). - * */ void operator++(int) { static_cast(this)->Advance(); } @@ -100,7 +95,6 @@ template class ItemPtrIterator * 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. - * */ ItemType &operator*(void) { return *mItem; } @@ -109,7 +103,6 @@ template class ItemPtrIterator * currently pointing. * * @returns A pointer to the item associated with the iterator, or `nullptr` if iterator is empty/done. - * */ ItemType *operator->(void) { return mItem; } @@ -121,7 +114,6 @@ template class ItemPtrIterator * * @retval TRUE If the two `Iterator` objects point to the same item or both are done. * @retval FALSE If the two `Iterator` objects do not point to the same item. - * */ bool operator==(const IteratorType &aOther) const { return mItem == aOther.mItem; } @@ -133,14 +125,12 @@ template class ItemPtrIterator * * @retval TRUE If the two `Iterator` objects do not point to the same item. * @retval FALSE If the two `Iterator` objects point to the same item or both are done. - * */ bool operator!=(const IteratorType &aOther) const { return mItem != aOther.mItem; } protected: /** * Default constructor - * */ ItemPtrIterator(void) : mItem(nullptr) @@ -149,7 +139,6 @@ template class ItemPtrIterator /** * Constructor with an Item pointer. - * */ explicit ItemPtrIterator(ItemType *item) : mItem(item) @@ -161,7 +150,6 @@ template class ItemPtrIterator /** * @} - * */ } // namespace ot diff --git a/src/core/common/linked_list.hpp b/src/core/common/linked_list.hpp index 0d9ecf9a4fc..a3ce919fcce 100644 --- a/src/core/common/linked_list.hpp +++ b/src/core/common/linked_list.hpp @@ -51,7 +51,6 @@ namespace ot { * This module includes definitions for OpenThread Singly Linked List. * * @{ - * */ /** @@ -64,7 +63,6 @@ namespace ot { * * The template type `Type` should contain a `mNext` member variable. The `mNext` should be of a type that can be * down-casted to `Type` itself. - * */ template class LinkedListEntry { @@ -73,7 +71,6 @@ template class LinkedListEntry * 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. - * */ const Type *GetNext(void) const { return static_cast(static_cast(this)->mNext); } @@ -81,7 +78,6 @@ template class LinkedListEntry * 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. - * */ Type *GetNext(void) { return static_cast(static_cast(this)->mNext); } @@ -89,7 +85,6 @@ template class LinkedListEntry * Sets the next pointer on the entry. * * @param[in] aNext A pointer to the next entry. - * */ void SetNext(Type *aNext) { static_cast(this)->mNext = aNext; } }; @@ -99,7 +94,6 @@ template class LinkedListEntry * * The template type `Type` should provide `GetNext()` and `SetNext()` methods (which can be realized by `Type` * inheriting from `LinkedListEntry` class). - * */ template class LinkedList { @@ -109,7 +103,6 @@ template class LinkedList public: /** * Initializes the linked list. - * */ LinkedList(void) : mHead(nullptr) @@ -120,7 +113,6 @@ template class LinkedList * 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. - * */ Type *GetHead(void) { return mHead; } @@ -128,7 +120,6 @@ template class LinkedList * 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. - * */ const Type *GetHead(void) const { return mHead; } @@ -136,13 +127,11 @@ template class LinkedList * 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. - * */ void SetHead(Type *aHead) { mHead = aHead; } /** * Clears the linked list. - * */ void Clear(void) { mHead = nullptr; } @@ -151,7 +140,6 @@ template class LinkedList * * @retval TRUE If the linked list is empty. * @retval FALSE If the linked list is not empty. - * */ bool IsEmpty(void) const { return (mHead == nullptr); } @@ -159,7 +147,6 @@ template class LinkedList * 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. - * */ void Push(Type &aEntry) { @@ -172,7 +159,6 @@ template class LinkedList * * @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). - * */ void PushAfter(Type &aEntry, Type &aPrevEntry) { @@ -184,7 +170,6 @@ template class LinkedList * Pushes an entry after the tail in the linked list. * * @param[in] aEntry A reference to an entry to push into the list. - * */ void PushAfterTail(Type &aEntry) { @@ -206,7 +191,6 @@ template class LinkedList * @note This method does not change the popped entry itself, i.e., the popped entry next pointer stays as before. * * @returns The entry that was popped if the list is not empty, or `nullptr` if the list is empty. - * */ Type *Pop(void) { @@ -229,7 +213,6 @@ template class LinkedList * otherwise (if it is `nullptr`) the entry at the head of the list is popped. * * @returns Pointer to the entry that was popped, or `nullptr` if there is no entry to pop. - * */ Type *PopAfter(Type *aPrevEntry) { @@ -259,7 +242,6 @@ template class LinkedList * * @retval TRUE The linked list contains @p aEntry. * @retval FALSE The linked list does not contain @p aEntry. - * */ bool Contains(const Type &aEntry) const { @@ -281,7 +263,6 @@ template class LinkedList * * @retval TRUE The linked list contains an entry matching @p aIndicator. * @retval FALSE The linked list contains no entry matching @p aIndicator. - * */ template bool ContainsMatching(const Indicator &aIndicator) const { @@ -295,7 +276,6 @@ template class LinkedList * * @retval kErrorNone The entry was successfully added at the head of the list. * @retval kErrorAlready The entry is already in the list. - * */ Error Add(Type &aEntry) { @@ -323,7 +303,6 @@ template class LinkedList * * @retval kErrorNone The entry was successfully removed from the list. * @retval kErrorNotFound Could not find the entry in the list. - * */ Error Remove(const Type &aEntry) { @@ -355,7 +334,6 @@ template class LinkedList * * @returns A pointer to the removed matching entry if one could be found, or `nullptr` if no matching entry is * found. - * */ template Type *RemoveMatching(const Indicator &aIndicator) { @@ -382,7 +360,6 @@ template class LinkedList * * @param[in] aIndicator An entry indicator to match against entries in the list. * @param[in] aRemovedList The list to add the removed entries to. - * */ template void RemoveAllMatching(const Indicator &aIndicator, LinkedList &aRemovedList) { @@ -419,7 +396,6 @@ template class LinkedList * * @retval kErrorNone The entry was found in the list and @p aPrevEntry was updated successfully. * @retval kErrorNotFound The entry was not found in the list. - * */ Error Find(const Type &aEntry, const Type *&aPrevEntry) const { @@ -449,7 +425,6 @@ template class LinkedList * * @retval kErrorNone The entry was found in the list and @p aPrevEntry was updated successfully. * @retval kErrorNotFound The entry was not found in the list. - * */ Error Find(const Type &aEntry, Type *&aPrevEntry) { @@ -475,7 +450,6 @@ template class LinkedList * list. * * @returns A pointer to the matching entry if one is found, or `nullptr` if no matching entry was found. - * */ template const Type *FindMatching(const Type *aBegin, @@ -517,7 +491,6 @@ template class LinkedList * list. * * @returns A pointer to the matching entry if one is found, or `nullptr` if no matching entry was found. - * */ template Type *FindMatching(const Type *aBegin, const Type *aEnd, const Indicator &aIndicator, Type *&aPrevEntry) @@ -541,7 +514,6 @@ template class LinkedList * list. * * @returns A pointer to the matching entry if one is found, or `nullptr` if no matching entry was found. - * */ template const Type *FindMatching(const Indicator &aIndicator, const Type *&aPrevEntry) const { @@ -565,7 +537,6 @@ template class LinkedList * list. * * @returns A pointer to the matching entry if one is found, or `nullptr` if no matching entry was found. - * */ template Type *FindMatching(const Indicator &aIndicator, Type *&aPrevEntry) { @@ -584,7 +555,6 @@ template class LinkedList * @param[in] aIndicator An indicator to match with entries in the list. * * @returns A pointer to the matching entry if one is found, or `nullptr` if no matching entry was found. - * */ template const Type *FindMatching(const Indicator &aIndicator) const { @@ -605,7 +575,6 @@ template class LinkedList * @param[in] aIndicator An indicator to match with entries in the list. * * @returns A pointer to the matching entry if one is found, or `nullptr` if no matching entry was found. - * */ template Type *FindMatching(const Indicator &aIndicator) { @@ -616,7 +585,6 @@ template class LinkedList * 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. - * */ const Type *GetTail(void) const { @@ -637,7 +605,6 @@ template class LinkedList * 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. - * */ Type *GetTail(void) { return AsNonConst(AsConst(this)->GetTail()); } @@ -687,7 +654,6 @@ template class LinkedList /** * @} - * */ } // namespace ot diff --git a/src/core/common/locator.hpp b/src/core/common/locator.hpp index b621b4c7412..8b1f8221742 100644 --- a/src/core/common/locator.hpp +++ b/src/core/common/locator.hpp @@ -55,7 +55,6 @@ extern uint64_t gInstanceRaw[]; * This module includes definitions for OpenThread instance locator. * * @{ - * */ /** @@ -68,7 +67,6 @@ extern uint64_t gInstanceRaw[]; * @tparam InstanceGetProvider The template sub-lass used in CRTP style inheritance. * `InstanceGetProvider` MUST provide a method with the following signature: * `Instance &GetInstance(void) const` - * */ template class GetProvider { @@ -82,7 +80,6 @@ template class GetProvider * `Instance` through the member variable property hierarchy. * * @returns A reference to the `Type` object of the instance. - * */ template inline Type &Get(void) const; // Implemented in `locator_getters.hpp`. @@ -99,7 +96,6 @@ template class GetProvider * * If multiple-instance feature is supported, the owning/parent OpenThread `Instance` is tracked as a reference. In the * single-instance case, this class becomes an empty base class. - * */ class InstanceLocator : public GetProvider { @@ -110,7 +106,6 @@ class InstanceLocator : public GetProvider * Returns a reference to the parent OpenThread Instance. * * @returns A reference to the parent otInstance. - * */ #if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE Instance &GetInstance(void) const { return *mInstance; } @@ -123,7 +118,6 @@ class InstanceLocator : public GetProvider * Initializes the object. * * @param[in] aInstance A reference to the OpenThread Instance. - * */ explicit InstanceLocator(Instance &aInstance) #if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE @@ -152,14 +146,12 @@ class InstanceLocator : public GetProvider * * The inheriting class from `InstanceLocatorInit` should ensure that object is properly initialized after the object * is created and more importantly that it is re-initialized when/if it is cleared or reset. - * */ class InstanceLocatorInit : public InstanceLocator { protected: /** * This is the default constructor for the `InstanceLocatorInit` object. - * */ InstanceLocatorInit(void) : InstanceLocator() @@ -182,7 +174,6 @@ class InstanceLocatorInit : public InstanceLocator /** * @} - * */ } // namespace ot diff --git a/src/core/common/log.hpp b/src/core/common/log.hpp index 89bac0a1582..3ee91a9c882 100644 --- a/src/core/common/log.hpp +++ b/src/core/common/log.hpp @@ -48,7 +48,6 @@ namespace ot { * @def OT_SHOULD_LOG * * This definition indicates whether or not logging is enabled. - * */ #define OT_SHOULD_LOG (OPENTHREAD_CONFIG_LOG_OUTPUT != OPENTHREAD_CONFIG_LOG_OUTPUT_NONE) @@ -58,13 +57,11 @@ namespace ot { * @param[in] aLevel The log level to check. * * @returns TRUE if logging is enabled at @p aLevel, FALSE otherwise. - * */ #define OT_SHOULD_LOG_AT(aLevel) (OT_SHOULD_LOG && (OPENTHREAD_CONFIG_LOG_LEVEL >= (aLevel))) /** * Represents the log level. - * */ enum LogLevel : uint8_t { @@ -88,7 +85,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * functions or macros (e.g., `LogInfo()` or `DumpInfo()`, ...) in the file. * * @param[in] aName The log module name string (MUST be shorter than `kMaxLogModuleNameLength`). - * */ #define RegisterLogModule(aName) \ constexpr char kLogModuleName[] = aName; \ @@ -109,7 +105,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * Emits a log message at critical log level. * * @param[in] ... Arguments for the format specification. - * */ #define LogCrit(...) Logger::LogAtLevel(kLogModuleName, __VA_ARGS__) #else @@ -121,7 +116,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * Emits a log message at warning log level. * * @param[in] ... Arguments for the format specification. - * */ #define LogWarn(...) Logger::LogAtLevel(kLogModuleName, __VA_ARGS__) #else @@ -133,7 +127,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * Emits a log message at note log level. * * @param[in] ... Arguments for the format specification. - * */ #define LogNote(...) Logger::LogAtLevel(kLogModuleName, __VA_ARGS__) #else @@ -145,7 +138,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * Emits a log message at info log level. * * @param[in] ... Arguments for the format specification. - * */ #define LogInfo(...) Logger::LogAtLevel(kLogModuleName, __VA_ARGS__) #else @@ -157,7 +149,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * Emits a log message at debug log level. * * @param[in] ... Arguments for the format specification. - * */ #define LogDebg(...) Logger::LogAtLevel(kLogModuleName, __VA_ARGS__) #else @@ -173,7 +164,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * * @param[in] aError The error to check and log. * @param[in] aText The text to include in the log. - * */ #define LogWarnOnError(aError, aText) Logger::LogOnError(kLogModuleName, aError, aText) #else @@ -186,7 +176,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * * @param[in] aLogLevel The log level to use. * @param[in] ... Argument for the format specification. - * */ #define LogAt(aLogLevel, ...) Logger::LogInModule(kLogModuleName, aLogLevel, __VA_ARGS__) #else @@ -198,7 +187,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * Emits a log message independent of the configured log level. * * @param[in] ... Arguments for the format specification. - * */ #define LogAlways(...) Logger::LogInModule("", kLogLevelNone, __VA_ARGS__) #else @@ -210,7 +198,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * Emit a log message for the certification test. * * @param[in] ... Arguments for the format specification. - * */ #define LogCert(...) LogAlways(__VA_ARGS__) #else @@ -224,7 +211,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ #define DumpCrit(aText, aData, aDataLength) Logger::Dump(aText, aData, aDataLength) #else @@ -238,7 +224,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ #define DumpWarn(aText, aData, aDataLength) Logger::Dump(aText, aData, aDataLength) #else @@ -252,7 +237,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ #define DumpNote(aText, aData, aDataLength) Logger::Dump(aText, aData, aDataLength) #else @@ -266,7 +250,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ #define DumpInfo(aText, aData, aDataLength) Logger::Dump(aText, aData, aDataLength) #else @@ -280,7 +263,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ #define DumpDebg(aText, aData, aDataLength) Logger::Dump(aText, aData, aDataLength) #else @@ -294,7 +276,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ #define DumpAlways(aText, aData, aDataLength) Logger::DumpInModule("", kLogLevelNone, aText, aData, aDataLength) #endif @@ -306,7 +287,6 @@ constexpr uint16_t kMaxLogStringSize = OPENTHREAD_CONFIG_LOG_MAX_SIZE; ///< Max * @param[in] aText A string that is printed before the bytes. * @param[in] aData A pointer to the data buffer. * @param[in] aDataLength Number of bytes in @p aData. - * */ #define DumpCert(aText, aData, aDataLength) DumpAlways(aText, aData, aDataLength) #else @@ -416,7 +396,6 @@ typedef otLogHexDumpInfo HexDumpInfo; ///< Represents the hex dump info. * * @retval kErrorNone Successfully generated the next line, `mLine` field in @p aInfo is updated. * @retval kErrorNotFound Reached the end and no more line to generate. - * */ Error GenerateNextHexDumpLine(HexDumpInfo &aInfo); diff --git a/src/core/common/message.hpp b/src/core/common/message.hpp index 673a9154669..1cb6100375e 100644 --- a/src/core/common/message.hpp +++ b/src/core/common/message.hpp @@ -62,7 +62,6 @@ /** * Represents an opaque (and empty) type for an OpenThread message buffer. - * */ struct otMessage { @@ -85,7 +84,6 @@ class HmacSha256; * This module includes definitions for the message buffer pool and message buffers. * * @{ - * */ /** @@ -97,7 +95,6 @@ class HmacSha256; * small implementations can add a rather large code-size overhead. * * @param[in] aMessage A pointer to a `Message` to free (can be `nullptr`). - * */ #define FreeMessage(aMessage) \ do \ @@ -115,7 +112,6 @@ class HmacSha256; * * @param[in] aMessage A pointer to a `Message` to free (can be `nullptr`). * @param[in] aError The `Error` to check. - * */ #define FreeMessageOnError(aMessage, aError) \ do \ @@ -131,7 +127,6 @@ class HmacSha256; * * @param[in] aMessage A pointer to a `Message` to free (can be `nullptr`). * @param[in] aError The `Error` to check. - * */ #define FreeAndNullMessageOnError(aMessage, aError) \ do \ @@ -154,7 +149,6 @@ class ThreadLinkInfo; /** * Represents a Message buffer. - * */ class Buffer : public otMessageBuffer, public LinkedListEntry { @@ -165,7 +159,6 @@ class Buffer : public otMessageBuffer, public LinkedListEntry * Returns a pointer to the next message buffer. * * @returns A pointer to the next message buffer. - * */ Buffer *GetNextBuffer(void) { return GetNext(); } @@ -173,7 +166,6 @@ class Buffer : public otMessageBuffer, public LinkedListEntry * Returns a pointer to the next message buffer. * * @returns A pointer to the next message buffer. - * */ const Buffer *GetNextBuffer(void) const { return GetNext(); } @@ -181,7 +173,6 @@ class Buffer : public otMessageBuffer, public LinkedListEntry * Sets the pointer to the next message buffer. * * @param[in] aNext A pointer to the next buffer. - * */ void SetNextBuffer(Buffer *aNext) { SetNext(aNext); } @@ -262,7 +253,6 @@ static_assert(sizeof(Buffer) >= kBufferSize, /** * Represents a message. - * */ class Message : public otMessage, public Buffer, public GetProvider { @@ -277,7 +267,6 @@ class Message : public otMessage, public Buffer, public GetProvider public: /** * Represents the message type. - * */ enum Type : uint8_t { @@ -292,7 +281,6 @@ class Message : public otMessage, public Buffer, public GetProvider /** * Represents the message sub-type. - * */ enum SubType : uint8_t { @@ -322,7 +310,6 @@ class Message : public otMessage, public Buffer, public GetProvider /** * Represents the link security mode (used by `Settings` constructor). - * */ enum LinkSecurityMode : bool { @@ -332,14 +319,12 @@ class Message : public otMessage, public Buffer, public GetProvider /** * Represents the message ownership model when a `Message` instance is passed to a method/function. - * */ enum Ownership : uint8_t { /** * This value indicates that the method/function receiving a `Message` instance should take custody of the * message (e.g., the method should `Free()` the message if no longer needed). - * */ kTakeCustody, @@ -347,14 +332,12 @@ class Message : public otMessage, public Buffer, public GetProvider * This value indicates that the method/function receiving a `Message` instance does not own the message (e.g., * it should not `Free()` or `Enqueue()` it in a queue). The receiving method/function should create a * copy/clone of the message to keep (if/when needed). - * */ kCopyToUse, }; /** * Represents an IPv6 message origin. - * */ enum Origin : uint8_t { @@ -365,7 +348,6 @@ class Message : public otMessage, public Buffer, public GetProvider /** * Represents settings used for creating a new message. - * */ class Settings : public otMessageSettings { @@ -375,7 +357,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @param[in] aSecurityMode A link security mode. * @param[in] aPriority A message priority. - * */ Settings(LinkSecurityMode aSecurityMode, Priority aPriority); @@ -383,7 +364,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Initializes the `Settings` with a given message priority and link security enabled. * * @param[in] aPriority A message priority. - * */ explicit Settings(Priority aPriority) : Settings(kWithLinkSecurity, aPriority) @@ -394,7 +374,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Gets the message priority. * * @returns The message priority. - * */ Priority GetPriority(void) const { return static_cast(mPriority); } @@ -402,7 +381,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Indicates whether the link security should be enabled. * * @returns TRUE if link security should be enabled, FALSE otherwise. - * */ bool IsLinkSecurityEnabled(void) const { return mLinkSecurityEnabled; } @@ -413,7 +391,6 @@ class Message : public otMessage, public Buffer, public GetProvider * If it is `nullptr`, then the default settings `GetDefault()` will be used. * * @returns A reference to the converted `Settings` or the default if @p aSettings is `nullptr`. - * */ static const Settings &From(const otMessageSettings *aSettings); @@ -421,7 +398,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the default settings with link security enabled and `kPriorityNormal` priority. * * @returns A reference to the default settings (link security enable and `kPriorityNormal` priority). - * */ static const Settings &GetDefault(void) { return static_cast(kDefault); } @@ -433,13 +409,11 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns a reference to the OpenThread Instance which owns the `Message`. * * @returns A reference to the `Instance`. - * */ Instance &GetInstance(void) const; /** * Frees this message buffer. - * */ void Free(void); @@ -447,7 +421,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ Message *GetNext(void) const; @@ -455,7 +428,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the number of bytes in the message. * * @returns The number of bytes in the message. - * */ uint16_t GetLength(void) const { return GetMetadata().mLength; } @@ -466,13 +438,11 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully set the length of the message. * @retval kErrorNoBufs Failed to grow the size of the message because insufficient buffers were available. - * */ Error SetLength(uint16_t aLength); /** * Returns the number of buffers in the message. - * */ uint8_t GetBufferCount(void) const; @@ -480,7 +450,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the byte offset within the message. * * @returns A byte offset within the message. - * */ uint16_t GetOffset(void) const { return GetMetadata().mOffset; } @@ -488,7 +457,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ void MoveOffset(int aDelta); @@ -496,7 +464,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the byte offset within the message. * * @param[in] aOffset The byte offset within the message. - * */ void SetOffset(uint16_t aOffset); @@ -504,7 +471,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the type of the message. * * @returns The type of the message. - * */ Type GetType(void) const { return static_cast(GetMetadata().mType); } @@ -512,7 +478,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the message type. * * @param[in] aType The message type. - * */ void SetType(Type aType) { GetMetadata().mType = aType; } @@ -520,7 +485,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the sub type of the message. * * @returns The sub type of the message. - * */ SubType GetSubType(void) const { return static_cast(GetMetadata().mSubType); } @@ -528,7 +492,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the message sub type. * * @param[in] aSubType The message sub type. - * */ void SetSubType(SubType aSubType) { GetMetadata().mSubType = aSubType; } @@ -537,7 +500,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If message is of MLE subtype. * @retval FALSE If message is not of MLE subtype. - * */ bool IsSubTypeMle(void) const; @@ -546,7 +508,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If message may be looped back. * @retval FALSE If message must not be looped back. - * */ bool GetMulticastLoop(void) const { return GetMetadata().mMulticastLoop; } @@ -554,7 +515,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets whether multicast may be looped back. * * @param[in] aMulticastLoop Whether allow looping back multicast. - * */ void SetMulticastLoop(bool aMulticastLoop) { GetMetadata().mMulticastLoop = aMulticastLoop; } @@ -562,7 +522,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the message priority level. * * @returns The priority level associated with this message. - * */ Priority GetPriority(void) const { return static_cast(GetMetadata().mPriority); } @@ -575,7 +534,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully set the priority for the message. * @retval kErrorInvalidArgs Priority level is not invalid. - * */ Error SetPriority(Priority aPriority); @@ -585,7 +543,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @param[in] aPriority The priority level. * * @returns A string representation of @p aPriority. - * */ static const char *PriorityToString(Priority aPriority); @@ -599,7 +556,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully prepended the bytes. * @retval kErrorNoBufs Not enough reserved bytes in the message. - * */ Error PrependBytes(const void *aBuf, uint16_t aLength); @@ -614,7 +570,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully prepended the object. * @retval kErrorNoBufs Not enough reserved bytes in the message. - * */ template Error Prepend(const ObjectType &aObject) { @@ -630,7 +585,6 @@ class Message : public otMessage, public Buffer, public GetProvider * length. * * @param[in] aLength Number of header bytes to remove from start of `Message`. - * */ void RemoveHeader(uint16_t aLength); @@ -645,7 +599,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @param[in] aOffset The offset to start removing. * @param[in] aLength Number of header bytes to remove. - * */ void RemoveHeader(uint16_t aOffset, uint16_t aLength); @@ -662,7 +615,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully grown the message and copied the existing header bytes. * @retval kErrorNoBufs Insufficient available buffers to grow the message. - * */ Error InsertHeader(uint16_t aOffset, uint16_t aLength); @@ -673,7 +625,6 @@ class Message : public otMessage, public Buffer, public GetProvider * will be removed. * * @param[in] aLength Number of footer bytes to remove from end of the `Message`. - * */ void RemoveFooter(uint16_t aLength); @@ -687,7 +638,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully appended the bytes. * @retval kErrorNoBufs Insufficient available buffers to grow the message. - * */ Error AppendBytes(const void *aBuf, uint16_t aLength); @@ -703,7 +653,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @retval kErrorNone Successfully appended the bytes. * @retval kErrorNoBufs Insufficient available buffers to grow the message. * @retval kErrorParse Not enough bytes in @p aMessage to read @p aLength bytes from @p aOffset. - * */ Error AppendBytesFromMessage(const Message &aMessage, uint16_t aOffset, uint16_t aLength); @@ -716,7 +665,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @retval kErrorNone Successfully appended the bytes. * @retval kErrorNoBufs Insufficient available buffers to grow the message. * @retval kErrorParse Not enough bytes in @p aMessage to read @p aOffsetRange. - * */ Error AppendBytesFromMessage(const Message &aMessage, const OffsetRange &aOffsetRange); @@ -731,7 +679,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully appended the object. * @retval kErrorNoBufs Insufficient available buffers to grow the message. - * */ template Error Append(const ObjectType &aObject) { @@ -751,7 +698,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully appended the bytes from @p aData. * @retval kErrorNoBufs Insufficient available buffers to grow the message. - * */ template Error AppendData(const Data &aData) { @@ -772,7 +718,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @param[in] aLength Number of bytes to read. * * @returns The number of bytes read. - * */ uint16_t ReadBytes(uint16_t aOffset, void *aBuf, uint16_t aLength) const; @@ -787,7 +732,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @param[out] aBuf A pointer to a data buffer to copy the read bytes into. * * @returns The number of bytes read. - * */ uint16_t ReadBytes(const OffsetRange &aOffsetRange, void *aBuf) const; @@ -800,7 +744,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone @p aLength bytes were successfully read from message. * @retval kErrorParse Not enough bytes remaining in message to read the entire object. - * */ Error Read(uint16_t aOffset, void *aBuf, uint16_t aLength) const; @@ -813,7 +756,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Requested bytes were successfully read from message. * @retval kErrorParse Not enough bytes remaining to read the requested @p aLength. - * */ Error Read(const OffsetRange &aOffsetRange, void *aBuf, uint16_t aLength) const; @@ -827,7 +769,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Object @p aObject was successfully read from message. * @retval kErrorParse Not enough bytes remaining in message to read the entire object. - * */ template Error Read(uint16_t aOffset, ObjectType &aObject) const { @@ -846,7 +787,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Object @p aObject was successfully read from message. * @retval kErrorParse Not enough bytes remaining in message to read the entire object. - * */ template Error Read(const OffsetRange &aOffsetRange, ObjectType &aObject) const { @@ -869,7 +809,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @returns TRUE if there are enough bytes available in @p aMessage and they match the bytes from @p aBuf, * FALSE otherwise. - * */ bool CompareBytes(uint16_t aOffset, const void *aBuf, uint16_t aLength, ByteMatcher aMatcher = nullptr) const; @@ -887,7 +826,6 @@ class Message : public otMessage, public Buffer, public GetProvider * directly compared. * * @returns TRUE if there are enough bytes available in both messages and they all match. FALSE otherwise. - * */ bool CompareBytes(uint16_t aOffset, const Message &aOtherMessage, @@ -908,7 +846,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @returns TRUE if there are enough bytes available in @p aMessage and they match the bytes in @p aObject, * FALSE otherwise. - * */ template bool Compare(uint16_t aOffset, const ObjectType &aObject) const { @@ -926,7 +863,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @param[in] aOffset Byte offset within the message to begin writing. * @param[in] aBuf A pointer to a data buffer. * @param[in] aLength Number of bytes to write. - * */ void WriteBytes(uint16_t aOffset, const void *aBuf, uint16_t aLength); @@ -943,7 +879,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @param[in] aMessage The message to read the bytes from. * @param[in] aReadOffset The offset in @p aMessage to start reading the bytes from. * @param[in] aLength The number of bytes to read from @p aMessage and write. - * */ void WriteBytesFromMessage(uint16_t aWriteOffset, const Message &aMessage, uint16_t aReadOffset, uint16_t aLength); @@ -957,7 +892,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @param[in] aOffset Byte offset within the message to begin writing. * @param[in] aObject A reference to the object to write. - * */ template void Write(uint16_t aOffset, const ObjectType &aObject) { @@ -976,7 +910,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @param[in] aOffset Byte offset within the message to begin writing. * @param[in] aData The `Data` to write to the message. - * */ template void WriteData(uint16_t aOffset, const Data &aData) { @@ -993,7 +926,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @param[in] aLength Number of payload bytes to copy. * * @returns A pointer to the message or nullptr if insufficient message buffers are available. - * */ Message *Clone(uint16_t aLength) const; @@ -1005,7 +937,6 @@ class Message : public otMessage, public Buffer, public GetProvider * copied from the original one. * * @returns A pointer to the message or `nullptr` if insufficient message buffers are available. - * */ Message *Clone(void) const { return Clone(GetLength()); } @@ -1014,7 +945,6 @@ class Message : public otMessage, public Buffer, public GetProvider * fragmentation. * * @returns The 6LoWPAN datagram tag or the IPv6 fragment identification. - * */ uint32_t GetDatagramTag(void) const { return GetMetadata().mDatagramTag; } @@ -1022,7 +952,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the datagram tag used for 6LoWPAN fragmentation. * * @param[in] aTag The 6LoWPAN datagram tag. - * */ void SetDatagramTag(uint32_t aTag) { GetMetadata().mDatagramTag = aTag; } @@ -1034,7 +963,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message is scheduled to be forwarded to the child. * @retval FALSE If the message is not scheduled to be forwarded to the child. - * */ bool GetChildMask(uint16_t aChildIndex) const; @@ -1042,7 +970,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Unschedules forwarding of the message to the child. * * @param[in] aChildIndex The index into the child table. - * */ void ClearChildMask(uint16_t aChildIndex); @@ -1050,7 +977,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Schedules forwarding of the message to the child. * * @param[in] aChildIndex The index into the child table. - * */ void SetChildMask(uint16_t aChildIndex); @@ -1059,7 +985,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If message forwarding is scheduled for at least one child. * @retval FALSE If message forwarding is not scheduled for any child. - * */ bool IsChildPending(void) const; #endif // OPENTHREAD_FTD @@ -1070,7 +995,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @note Only use this for non-link-local unicast messages. * * @returns The IEEE 802.15.4 Destination PAN ID. - * */ uint16_t GetMeshDest(void) const { return GetMetadata().mMeshDest; } @@ -1080,7 +1004,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @note Only use this when sending non-link-local unicast messages. * * @param[in] aMeshDest The IEEE 802.15.4 Destination PAN ID. - * */ void SetMeshDest(uint16_t aMeshDest) { GetMetadata().mMeshDest = aMeshDest; } @@ -1094,7 +1017,6 @@ class Message : public otMessage, public Buffer, public GetProvider * messages. * * @returns The IEEE 802.15.4 PAN ID. - * */ uint16_t GetPanId(void) const { return GetMetadata().mPanId; } @@ -1104,7 +1026,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @note Only use this when sending MLE Discover Request or Response messages. * * @param[in] aPanId The IEEE 802.15.4 Destination PAN ID. - * */ void SetPanId(uint16_t aPanId) { GetMetadata().mPanId = aPanId; } @@ -1115,7 +1036,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE The Destination PAN ID is broadcast. * @retval FALSE The Destination PAN ID is not broadcast. - * */ bool IsDstPanIdBroadcast(void) const { return GetMetadata().mIsDstPanIdBroadcast; } @@ -1125,7 +1045,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @note Only use this when sending MLE Announce messages. * * @returns The IEEE 802.15.4 Channel to use for transmission. - * */ uint8_t GetChannel(void) const { return GetMetadata().mChannel; } @@ -1135,7 +1054,6 @@ class Message : public otMessage, public Buffer, public GetProvider * @note Only use this when sending MLE Announce messages. * * @param[in] aChannel The IEEE 802.15.4 Channel to use for transmission. - * */ void SetChannel(uint8_t aChannel) { GetMetadata().mChannel = aChannel; } @@ -1143,7 +1061,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the message timestamp. * * @returns The message timestamp. - * */ TimeMilli GetTimestamp(void) const { return GetMetadata().mTimestamp; } @@ -1151,13 +1068,11 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the message timestamp to a given time. * * @param[in] aTimestamp The timestamp value. - * */ void SetTimestamp(TimeMilli aTimestamp) { GetMetadata().mTimestamp = aTimestamp; } /** * Sets the message timestamp to the current time. - * */ void SetTimestampToNow(void) { SetTimestamp(TimerMilli::GetNow()); } @@ -1166,19 +1081,16 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If message forwarding is scheduled for direct transmission. * @retval FALSE If message forwarding is not scheduled for direct transmission. - * */ bool IsDirectTransmission(void) const { return GetMetadata().mDirectTx; } /** * Unschedules forwarding using direct transmission. - * */ void ClearDirectTransmission(void) { GetMetadata().mDirectTx = false; } /** * Schedules forwarding using direct transmission. - * */ void SetDirectTransmission(void) { GetMetadata().mDirectTx = true; } @@ -1187,7 +1099,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @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). - * */ bool GetTxSuccess(void) const { return GetMetadata().mTxSuccess; } @@ -1196,7 +1107,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @param[in] aTxSuccess TRUE if the direct transmission is successful, FALSE otherwise (i.e., at least one * fragment transmission failed). - * */ void SetTxSuccess(bool aTxSuccess) { GetMetadata().mTxSuccess = aTxSuccess; } @@ -1205,7 +1115,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message must not be evicted. * @retval FALSE If the message may be evicted. - * */ bool GetDoNotEvict(void) const { return GetMetadata().mDoNotEvict; } @@ -1213,7 +1122,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets whether the message may be evicted. * * @param[in] aDoNotEvict TRUE if the message may not be evicted, FALSE otherwise. - * */ void SetDoNotEvict(bool aDoNotEvict) { GetMetadata().mDoNotEvict = aDoNotEvict; } @@ -1222,7 +1130,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message is waiting for address query resolution. * @retval FALSE If the message is not waiting for address query resolution. - * */ bool IsResolvingAddress(void) const { return GetMetadata().mResolvingAddress; } @@ -1230,7 +1137,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets whether the message is waiting for an address query resolution. * * @param[in] aResolvingAddress TRUE if message is waiting for address resolution, FALSE otherwise. - * */ void SetResolvingAddress(bool aResolvingAddress) { GetMetadata().mResolvingAddress = aResolvingAddress; } @@ -1239,7 +1145,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message is allowed to be looped back to host. * @retval FALSE If the message is not allowed to be looped back to host. - * */ bool IsLoopbackToHostAllowed(void) const { return GetMetadata().mAllowLookbackToHost; } @@ -1247,7 +1152,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets whether or not allow the message to be looped back to host. * * @param[in] aAllowLoopbackToHost Whether or not allow the message to be looped back to host. - * */ void SetLoopbackToHostAllowed(bool aAllowLoopbackToHost) { @@ -1258,7 +1162,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Gets the message origin. * * @returns An enum representing the origin of the message. - * */ Origin GetOrigin(void) const { return static_cast(GetMetadata().mOrigin); } @@ -1266,7 +1169,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the message origin. * * @param[in] aOrigin An enum representing the origin of the message. - * */ void SetOrigin(Origin aOrigin) { GetMetadata().mOrigin = aOrigin; } @@ -1275,7 +1177,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message origin is Thread Netif. * @retval FALSE If the message origin is not Thread Netif. - * */ bool IsOriginThreadNetif(void) const { return GetOrigin() == kOriginThreadNetif; } @@ -1284,7 +1185,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message origin is a trusted source on host. * @retval FALSE If the message origin is not a trusted source on host. - * */ bool IsOriginHostTrusted(void) const { return GetOrigin() == kOriginHostTrusted; } @@ -1293,7 +1193,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message origin is an untrusted source on host. * @retval FALSE If the message origin is not an untrusted source on host. - * */ bool IsOriginHostUntrusted(void) const { return GetOrigin() == kOriginHostUntrusted; } @@ -1302,7 +1201,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If link security is enabled. * @retval FALSE If link security is not enabled. - * */ bool IsLinkSecurityEnabled(void) const { return GetMetadata().mLinkSecurity; } @@ -1310,7 +1208,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets whether or not link security is enabled for the message. * * @param[in] aEnabled TRUE if link security is enabled, FALSE otherwise. - * */ void SetLinkSecurityEnabled(bool aEnabled) { GetMetadata().mLinkSecurity = aEnabled; } @@ -1320,7 +1217,6 @@ class Message : public otMessage, public Buffer, public GetProvider * received with a different signal strength. * * @param[in] aRss A new RSS value (in dBm) to be added to average. - * */ void AddRss(int8_t aRss) { IgnoreError(GetMetadata().mRssAverager.Add(aRss)); } @@ -1328,7 +1224,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ int8_t GetAverageRss(void) const { return GetMetadata().mRssAverager.GetAverage(); } @@ -1336,7 +1231,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns a const reference to RssAverager of the message. * * @returns A const reference to the RssAverager of the message. - * */ const RssAverager &GetRssAverager(void) const { return GetMetadata().mRssAverager; } @@ -1347,7 +1241,6 @@ class Message : public otMessage, public Buffer, public GetProvider * frame fragments each received with a different signal strength. * * @param[in] aLqi A new LQI value (has no unit) to be added to average. - * */ void AddLqi(uint8_t aLqi) { GetMetadata().mLqiAverager.Add(aLqi); } @@ -1355,7 +1248,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ uint8_t GetAverageLqi(void) const { return GetMetadata().mLqiAverager.GetAverage(); } @@ -1363,7 +1255,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns the count of frames counted so far. * * @returns The count of frames that have been counted. - * */ uint8_t GetPsduCount(void) const { return GetMetadata().mLqiAverager.GetCount(); } @@ -1371,7 +1262,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Returns a const reference to LqiAverager of the message. * * @returns A const reference to the LqiAverager of the message. - * */ const LqiAverager &GetLqiAverager(void) const { return GetMetadata().mLqiAverager; } @@ -1382,7 +1272,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval kErrorNone Successfully retrieved the link info, @p `aLinkInfo` is updated. * @retval kErrorNotFound Message origin is not `kOriginThreadNetif`. - * */ Error GetLinkInfo(ThreadLinkInfo &aLinkInfo) const; @@ -1390,7 +1279,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ void UpdateLinkInfoFrom(const ThreadLinkInfo &aLinkInfo); @@ -1398,7 +1286,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ MessageQueue *GetMessageQueue(void) const { @@ -1409,7 +1296,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ PriorityQueue *GetPriorityQueue(void) const { @@ -1423,7 +1309,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the message is also used for time sync purpose. * @retval FALSE If the message is not used for time sync purpose. - * */ bool IsTimeSync(void) const; @@ -1432,7 +1317,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ void SetTimeSync(bool aEnabled) { GetMetadata().mTimeSync = aEnabled; } @@ -1440,7 +1324,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the offset to network time. * * @param[in] aNetworkTimeOffset The offset to network time. - * */ void SetNetworkTimeOffset(int64_t aNetworkTimeOffset) { GetMetadata().mNetworkTimeOffset = aNetworkTimeOffset; } @@ -1448,7 +1331,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Gets the offset to network time. * * @returns The offset to network time. - * */ int64_t GetNetworkTimeOffset(void) const { return GetMetadata().mNetworkTimeOffset; } @@ -1456,7 +1338,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Sets the time sync sequence. * * @param[in] aTimeSyncSeq The time sync sequence. - * */ void SetTimeSyncSeq(uint8_t aTimeSyncSeq) { GetMetadata().mTimeSyncSeq = aTimeSyncSeq; } @@ -1464,7 +1345,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Gets the time sync sequence. * * @returns The time sync sequence. - * */ uint8_t GetTimeSyncSeq(void) const { return GetMetadata().mTimeSyncSeq; } #endif // OPENTHREAD_CONFIG_TIME_SYNC_ENABLE @@ -1475,7 +1355,6 @@ class Message : public otMessage, public Buffer, public GetProvider * * @retval TRUE If the radio type is set. * @retval FALSE If the radio type is not set. - * */ bool IsRadioTypeSet(void) const { return GetMetadata().mIsRadioTypeSet; } @@ -1485,7 +1364,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Should be used only when `IsRadioTypeSet()` returns `true`. * * @returns The radio link type of the message. - * */ Mac::RadioType GetRadioType(void) const { return static_cast(GetMetadata().mRadioType); } @@ -1493,7 +1371,6 @@ class Message : public otMessage, public Buffer, public GetProvider * 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. - * */ void SetRadioType(Mac::RadioType aRadioType) { @@ -1505,7 +1382,6 @@ class Message : public otMessage, public Buffer, public GetProvider * Clears any previously set radio type on the message. * * After calling this method, `IsRadioTypeSet()` returns false until radio type is set (`SetRadioType()`). - * */ void ClearRadioType(void) { GetMetadata().mIsRadioTypeSet = false; } @@ -1606,7 +1482,6 @@ class Message : public otMessage, public Buffer, public GetProvider /** * Implements a message queue. - * */ class MessageQueue : public otMessageQueue { @@ -1619,7 +1494,6 @@ class MessageQueue : public otMessageQueue /** * Represents a position (head or tail) in the queue. This is used to specify where a new message * should be added in the queue. - * */ enum QueuePosition : uint8_t { @@ -1629,7 +1503,6 @@ class MessageQueue : public otMessageQueue /** * Initializes the message queue. - * */ MessageQueue(void) { SetTail(nullptr); } @@ -1637,7 +1510,6 @@ class MessageQueue : public otMessageQueue * Returns a pointer to the first message. * * @returns A pointer to the first message. - * */ Message *GetHead(void) { return Message::NextOf(GetTail()); } @@ -1645,7 +1517,6 @@ class MessageQueue : public otMessageQueue * Returns a pointer to the first message. * * @returns A pointer to the first message. - * */ const Message *GetHead(void) const { return Message::NextOf(GetTail()); } @@ -1653,7 +1524,6 @@ class MessageQueue : public otMessageQueue * Adds a message to the end of the list. * * @param[in] aMessage The message to add. - * */ void Enqueue(Message &aMessage) { Enqueue(aMessage, kQueuePositionTail); } @@ -1662,7 +1532,6 @@ class MessageQueue : public otMessageQueue * * @param[in] aMessage The message to add. * @param[in] aPosition The position (head or tail) where to add the message. - * */ void Enqueue(Message &aMessage, QueuePosition aPosition); @@ -1670,7 +1539,6 @@ class MessageQueue : public otMessageQueue * Removes a message from the list. * * @param[in] aMessage The message to remove. - * */ void Dequeue(Message &aMessage); @@ -1678,13 +1546,11 @@ class MessageQueue : public otMessageQueue * Removes a message from the queue and frees it. * * @param[in] aMessage The message to remove and free. - * */ void DequeueAndFree(Message &aMessage); /** * Removes and frees all messages from the queue. - * */ void DequeueAndFreeAll(void); @@ -1697,7 +1563,6 @@ class MessageQueue : public otMessageQueue * up the number of messages/buffers on different queues. * * @param[out] aInfo A reference to `Info` structure to update.ni - * */ void GetInfo(Info &aInfo) const; @@ -1720,7 +1585,6 @@ class MessageQueue : public otMessageQueue /** * Implements a priority queue. - * */ class PriorityQueue : private Clearable { @@ -1734,7 +1598,6 @@ class PriorityQueue : private Clearable /** * Initializes the priority queue. - * */ PriorityQueue(void) { Clear(); } @@ -1742,7 +1605,6 @@ class PriorityQueue : private Clearable * Returns a pointer to the first message. * * @returns A pointer to the first message. - * */ Message *GetHead(void) { return AsNonConst(AsConst(this)->GetHead()); } @@ -1750,7 +1612,6 @@ class PriorityQueue : private Clearable * Returns a pointer to the first message. * * @returns A pointer to the first message. - * */ const Message *GetHead(void) const; @@ -1761,7 +1622,6 @@ class PriorityQueue : private Clearable * * @returns A pointer to the first message with given priority level or `nullptr` if there is no messages with * this priority level. - * */ Message *GetHeadForPriority(Message::Priority aPriority) { @@ -1775,7 +1635,6 @@ class PriorityQueue : private Clearable * * @returns A pointer to the first message with given priority level or `nullptr` if there is no messages with * this priority level. - * */ const Message *GetHeadForPriority(Message::Priority aPriority) const; @@ -1783,7 +1642,6 @@ class PriorityQueue : private Clearable * Adds a message to the queue. * * @param[in] aMessage The message to add. - * */ void Enqueue(Message &aMessage); @@ -1791,7 +1649,6 @@ class PriorityQueue : private Clearable * Removes a message from the list. * * @param[in] aMessage The message to remove. - * */ void Dequeue(Message &aMessage); @@ -1799,13 +1656,11 @@ class PriorityQueue : private Clearable * Removes a message from the queue and frees it. * * @param[in] aMessage The message to remove and free. - * */ void DequeueAndFree(Message &aMessage); /** * Removes and frees all messages from the queue. - * */ void DequeueAndFreeAll(void); @@ -1813,7 +1668,6 @@ class PriorityQueue : private Clearable * Returns the tail of the list (last message in the list). * * @returns A pointer to the tail of the list. - * */ Message *GetTail(void) { return AsNonConst(AsConst(this)->GetTail()); } @@ -1821,7 +1675,6 @@ class PriorityQueue : private Clearable * Returns the tail of the list (last message in the list). * * @returns A pointer to the tail of the list. - * */ const Message *GetTail(void) const; @@ -1834,7 +1687,6 @@ class PriorityQueue : private Clearable * to add up the number of messages/buffers on different queues. * * @param[out] aInfo A reference to an `Info` structure to update. - * */ void GetInfo(Info &aInfo) const; @@ -1867,7 +1719,6 @@ class PriorityQueue : private Clearable /** * Represents a message pool - * */ class MessagePool : public InstanceLocator, private NonCopyable { @@ -1878,7 +1729,6 @@ class MessagePool : public InstanceLocator, private NonCopyable public: /** * Initializes the object. - * */ explicit MessagePool(Instance &aInstance); @@ -1890,7 +1740,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * @param[in] aSettings The message settings. * * @returns A pointer to the message or `nullptr` if no message buffers are available. - * */ Message *Allocate(Message::Type aType, uint16_t aReserveHeader, const Message::Settings &aSettings); @@ -1900,7 +1749,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * @param[in] aType The message type. * * @returns A pointer to the message or `nullptr` if no message buffers are available. - * */ Message *Allocate(Message::Type aType); @@ -1911,7 +1759,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * @param[in] aReserveHeader The number of header bytes to reserve. * * @returns A pointer to the message or `nullptr` if no message buffers are available. - * */ Message *Allocate(Message::Type aType, uint16_t aReserveHeader); @@ -1919,7 +1766,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * Is used to free a message and return all message buffers to the buffer pool. * * @param[in] aMessage The message to free. - * */ void Free(Message *aMessage); @@ -1927,7 +1773,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * Returns the number of free buffers. * * @returns The number of free buffers, or 0xffff (UINT16_MAX) if number is unknown. - * */ uint16_t GetFreeBufferCount(void) const; @@ -1935,7 +1780,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * Returns the total number of buffers. * * @returns The total number of buffers, or 0xffff (UINT16_MAX) if number is unknown. - * */ uint16_t GetTotalBufferCount(void) const; @@ -1944,7 +1788,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * since last call to `ResetMaxUsedBufferCount()`. * * @returns The maximum number of buffers in use at the same time so far (buffer allocation watermark). - * */ uint16_t GetMaxUsedBufferCount(void) const { return mMaxAllocated; } @@ -1952,7 +1795,6 @@ class MessagePool : public InstanceLocator, private NonCopyable * Resets the tracked maximum number of buffers in use. * * @sa GetMaxUsedBufferCount - * */ void ResetMaxUsedBufferCount(void) { mMaxAllocated = mNumAllocated; } @@ -1972,7 +1814,6 @@ inline Instance &Message::GetInstance(void) const { return GetMessagePool()->Get /** * @} - * */ DefineCoreType(otMessageBuffer, Buffer); diff --git a/src/core/common/non_copyable.hpp b/src/core/common/non_copyable.hpp index bc6fb42f8de..afb24b1e232 100644 --- a/src/core/common/non_copyable.hpp +++ b/src/core/common/non_copyable.hpp @@ -38,7 +38,6 @@ namespace ot { /** * 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 0bd8effbee6..b2fc7a30e3d 100644 --- a/src/core/common/notifier.hpp +++ b/src/core/common/notifier.hpp @@ -57,12 +57,10 @@ namespace ot { * This module includes definitions for OpenThread Notifier class. * * @{ - * */ /** * Type represents events emitted from OpenThread Notifier. - * */ enum Event : uint32_t { @@ -102,20 +100,17 @@ enum Event : uint32_t /** * Represents a list of events. - * */ class Events { public: /** * Represents a bit-field indicating a list of events (with values from `Event`) - * */ typedef otChangedFlags Flags; /** * Initializes the `Events` list (as empty). - * */ Events(void) : mEventFlags(0) @@ -124,7 +119,6 @@ class Events /** * Clears the `Events` list. - * */ void Clear(void) { mEventFlags = 0; } @@ -134,7 +128,6 @@ class Events * @param[in] aEvent The event to check. * * @returns TRUE if the list contains the @p aEvent, FALSE otherwise. - * */ bool Contains(Event aEvent) const { return (mEventFlags & aEvent) != 0; } @@ -144,7 +137,6 @@ class Events * @param[in] aEvents The events set to check (must be a collection of `Event` constants combined using `|`). * * @returns TRUE if the list contains any of the @p aEvents set, FALSE otherwise. - * */ bool ContainsAny(Flags aEvents) const { return (mEventFlags & aEvents) != 0; } @@ -154,7 +146,6 @@ class Events * @param[in] aEvents The events set to check (must be collection of `Event` constants combined using `|`). * * @returns TRUE if the list contains all of the @p aEvents set, FALSE otherwise. - * */ bool ContainsAll(Flags aEvents) const { return (mEventFlags & aEvents) == aEvents; } @@ -162,7 +153,6 @@ class Events * Adds a given event to the `Events` list. * * @param[in] aEvent The event to add. - * */ void Add(Event aEvent) { mEventFlags |= aEvent; } @@ -170,7 +160,6 @@ class Events * Indicates whether the `Events` list is empty. * * @returns TRUE if the list is empty, FALSE otherwise. - * */ bool IsEmpty(void) const { return (mEventFlags == 0); } @@ -178,7 +167,6 @@ class Events * Gets the `Events` list as bit-field `Flags` value. * * @returns The list as bit-field `Flags` value. - * */ Flags GetAsFlags(void) const { return mEventFlags; } @@ -195,7 +183,6 @@ class Events * A `otStateChangedCallback` callback can be explicitly registered with the `Notifier`. This is mainly intended for use * by external users (i.e.provided as an OpenThread public API). Max number of such callbacks that can be registered at * the same time is specified by `OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS` configuration parameter. - * */ class Notifier : public InstanceLocator, private NonCopyable { @@ -204,7 +191,6 @@ class Notifier : public InstanceLocator, private NonCopyable * Initializes a `Notifier` instance. * * @param[in] aInstance A reference to OpenThread instance. - * */ explicit Notifier(Instance &aInstance); @@ -217,7 +203,6 @@ class Notifier : public InstanceLocator, private NonCopyable * @retval kErrorNone Successfully registered the callback. * @retval kErrorAlready The callback was already registered. * @retval kErrorNoBufs Could not add the callback due to resource constraints. - * */ Error RegisterCallback(otStateChangedCallback aCallback, void *aContext); @@ -226,7 +211,6 @@ class Notifier : public InstanceLocator, private NonCopyable * * @param[in] aCallback A pointer to the callback function pointer. * @param[in] aContext A pointer to arbitrary context information. - * */ void RemoveCallback(otStateChangedCallback aCallback, void *aContext); @@ -234,7 +218,6 @@ class Notifier : public InstanceLocator, private NonCopyable * Schedules signaling of an event. * * @param[in] aEvent The event to signal. - * */ void Signal(Event aEvent); @@ -242,7 +225,6 @@ class Notifier : public InstanceLocator, private NonCopyable * Schedules signaling of am event only if the event has not been signaled before (first time signal). * * @param[in] aEvent The event to signal. - * */ void SignalIfFirst(Event aEvent); @@ -250,7 +232,6 @@ class Notifier : public InstanceLocator, private NonCopyable * Indicates whether or not an event signal callback is pending/scheduled. * * @returns TRUE if a callback is pending, FALSE otherwise. - * */ bool IsPending(void) const { return !mEventsToSignal.IsEmpty(); } @@ -261,7 +242,6 @@ class Notifier : public InstanceLocator, private NonCopyable * * @retval TRUE The event @p aEvent have been signaled before. * @retval FALSE The event @p aEvent has not been signaled before. - * */ bool HasSignaled(Event aEvent) const { return mSignaledEvents.Contains(aEvent); } @@ -279,7 +259,6 @@ class Notifier : public InstanceLocator, private NonCopyable * * @retval kErrorNone The variable was update successfully and @p aEvent was signaled. * @retval kErrorAlready The variable was already set to the same value. - * */ template Error Update(Type &aVariable, const Type &aNewValue, Event aEvent) { @@ -327,7 +306,6 @@ class Notifier : public InstanceLocator, private NonCopyable /** * @} - * */ } // namespace ot diff --git a/src/core/common/num_utils.hpp b/src/core/common/num_utils.hpp index 598324098ba..d79491827c4 100644 --- a/src/core/common/num_utils.hpp +++ b/src/core/common/num_utils.hpp @@ -50,7 +50,6 @@ namespace ot { * @param[in] aSecond The second value. * * @returns The minimum of @p aFirst and @p aSecond. - * */ template Type Min(Type aFirst, Type aSecond) { return (aFirst < aSecond) ? aFirst : aSecond; } @@ -65,7 +64,6 @@ template Type Min(Type aFirst, Type aSecond) { return (aFirst < * @param[in] aSecond The second value. * * @returns The maximum of @p aFirst and @p aSecond. - * */ template Type Max(Type aFirst, Type aSecond) { return (aFirst < aSecond) ? aSecond : aFirst; } @@ -81,7 +79,6 @@ template Type Max(Type aFirst, Type aSecond) { return (aFirst < * @param[in] aMax The maximum value. * * @returns The clamped version of @aValue to the closed range [@p aMin, @p aMax]. - * */ template Type Clamp(Type aValue, Type aMin, Type aMax) { @@ -100,7 +97,6 @@ template Type Clamp(Type aValue, Type aMin, Type aMax) * @param[in] aValue The value to clamp. * * @returns The clamped version of @p aValue to `uint8_t`. - * */ template uint8_t ClampToUint8(UintType aValue) { @@ -121,7 +117,6 @@ template uint8_t ClampToUint8(UintType aValue) * @param[in] aValue The value to clamp. * * @returns The clamped version of @p aValue to `uint16_t`. - * */ template uint16_t ClampToUint16(UintType aValue) { @@ -142,7 +137,6 @@ template uint16_t ClampToUint16(UintType aValue) * @param[in] aValue The value to clamp. * * @returns The clamped version of @p aValue to `int8_t`. - * */ template int8_t ClampToInt8(IntType aValue) { @@ -165,7 +159,6 @@ template int8_t ClampToInt8(IntType aValue) * @retval 1 If @p aFirst > @p aSecond. * @retval 0 If @p aFirst == @p aSecond. * @retval -1 If @p aFirst < @p aSecond. - * */ template int ThreeWayCompare(Type aFirst, Type aSecond) { @@ -181,7 +174,6 @@ template int ThreeWayCompare(Type aFirst, Type aSecond) * @retval 1 If @p aFirst is true and @p aSecond is false (true > false). * @retval 0 If both @p aFirst and @p aSecond are true, or both are false (they are equal). * @retval -1 If @p aFirst is false and @p aSecond is true (false < true). - * */ template <> inline int ThreeWayCompare(bool aFirst, bool aSecond) { @@ -197,7 +189,6 @@ template <> inline int ThreeWayCompare(bool aFirst, bool aSecond) * @param[in] aDivisor The divisor value. * * @return The result of division and rounding to the closest integer. - * */ template inline IntType DivideAndRoundToClosest(IntType aDividend, IntType aDivisor) { @@ -210,7 +201,6 @@ template inline IntType DivideAndRoundToClosest(IntType aDivi * @param[in] aUint32 A `uint32_t` value. * * @returns The @p aUint32 value as `unsigned long`. - * */ inline unsigned long ToUlong(uint32_t aUint32) { return static_cast(aUint32); } @@ -222,7 +212,6 @@ inline unsigned long ToUlong(uint32_t aUint32) { return static_cast uint8_t CountBitsInMask(UintType aMask) { diff --git a/src/core/common/numeric_limits.hpp b/src/core/common/numeric_limits.hpp index 911df238097..122cdc35ec9 100644 --- a/src/core/common/numeric_limits.hpp +++ b/src/core/common/numeric_limits.hpp @@ -46,7 +46,6 @@ static constexpr uint8_t kBitsPerByte = 8; ///< Number of bits in a byte. * @param[in] aItem The item (type or variable or expression) to get the bit-size of. * * @returns Number of bits of @p aItem. - * */ #define BitSizeOf(aItem) (sizeof(aItem) * kBitsPerByte) @@ -56,7 +55,6 @@ static constexpr uint8_t kBitsPerByte = 8; ///< Number of bits in a byte. * @param[in] aBitSize The bit-size (number of bits). * * @returns Number of bytes to represent @p aBitSize. - * */ #define BytesForBitSize(aBitSize) static_cast(((aBitSize) + (kBitsPerByte - 1)) / kBitsPerByte) @@ -64,7 +62,6 @@ static constexpr uint8_t kBitsPerByte = 8; ///< Number of bits in a byte. * Provides a way to query properties of arithmetic types. * * There are no members if `Type` is not a supported arithmetic type. - * */ template struct NumericLimits { diff --git a/src/core/common/offset_range.hpp b/src/core/common/offset_range.hpp index 9b5b4772eaa..27ee347592b 100644 --- a/src/core/common/offset_range.hpp +++ b/src/core/common/offset_range.hpp @@ -47,7 +47,6 @@ class Message; /** * Represents an offset range. - * */ class OffsetRange : public Clearable { @@ -57,7 +56,6 @@ class OffsetRange : public Clearable * * @param[in] aOffset The start offset. * @param[in] aLength The range length (number of bytes). - * */ void Init(uint16_t aOffset, uint16_t aLength); @@ -68,7 +66,6 @@ class OffsetRange : public Clearable * * @param[in] aStartOffset The start offset (inclusive). * @param[in] aEndOffset The end offset (exclusive). - * */ void InitFromRange(uint16_t aStartOffset, uint16_t aEndOffset); @@ -79,7 +76,6 @@ class OffsetRange : public Clearable * in the message up to its current length `aMessage.GetLength()`. * * @param[in] aMessage The `Message` to initialize the `OffsetRange` from. - * */ void InitFromMessageOffsetToEnd(const Message &aMessage); @@ -89,7 +85,6 @@ class OffsetRange : public Clearable * The start offset of the range is set to zero, and the end offset is set to include full length of @p aMessage. * * @param[in] aMessage The `Message` to initialize the `OffsetRange` from. - * */ void InitFromMessageFullLength(const Message &aMessage); @@ -97,7 +92,6 @@ class OffsetRange : public Clearable * Gets the start offset of the `OffsetRange` * * @returns The start offset. - * */ uint16_t GetOffset(void) const { return mOffset; } @@ -107,7 +101,6 @@ class OffsetRange : public Clearable * This offset is exclusive, meaning it marks the position immediately after the last byte within the range. * * @returns The end offset. - * */ uint16_t GetEndOffset(void) const { return (mOffset + mLength); } @@ -115,7 +108,6 @@ class OffsetRange : public Clearable * Gets the `OffsetRange` length. * * @returns The length of the `OffsetRange` in bytes. - * */ uint16_t GetLength(void) const { return mLength; } @@ -124,7 +116,6 @@ class OffsetRange : public Clearable * * @retval TRUE The `OffsetRange` is empty. * @retval FALSE The `OffsetRange` is not empty (contains at least one byte). - * */ bool IsEmpty(void) const { return (mLength == 0); } @@ -135,7 +126,6 @@ class OffsetRange : public Clearable * * @retval TRUE The `OffsetRange` contains @p aLength or more bytes. * @retval FALSE The `OffsetRange` does not contain @p aLength bytes. - * */ bool Contains(uint32_t aLength) const { return aLength <= mLength; } @@ -147,7 +137,6 @@ class OffsetRange : public Clearable * effectively shrinking the range to zero length. * * @param[in] aLength The number of bytes to advance the start offset. - * */ void AdvanceOffset(uint32_t aLength); @@ -158,7 +147,6 @@ class OffsetRange : public Clearable * @p aLength. If the range is already shorter or the same, it remains unchanged. * * @param[in] aLength The new length to use. - * */ void ShrinkLength(uint16_t aLength); diff --git a/src/core/common/owned_ptr.hpp b/src/core/common/owned_ptr.hpp index b46c17a9d22..2004fcd252e 100644 --- a/src/core/common/owned_ptr.hpp +++ b/src/core/common/owned_ptr.hpp @@ -49,7 +49,6 @@ namespace ot { * The `Type` class MUST provide `Free()` method which frees the instance. * * @tparam Type The pointer type. - * */ template class OwnedPtr : public Ptr { @@ -58,7 +57,6 @@ template class OwnedPtr : public Ptr public: /** * This is the default constructor for `OwnedPtr` initializing it as null. - * */ OwnedPtr(void) = default; @@ -68,7 +66,6 @@ template class OwnedPtr : public Ptr * The `OwnedPtr` takes the ownership of the object at @p aPointer. * * @param[in] aPointer A pointer to object to initialize with. - * */ explicit OwnedPtr(Type *aPointer) : Ptr(aPointer) @@ -81,7 +78,6 @@ template class OwnedPtr : public Ptr * The `OwnedPtr` takes over the ownership of the object from @p aOther. After this call, @p aOther will be null. * * @param[in] aOther An rvalue reference to another `OwnedPtr`. - * */ OwnedPtr(OwnedPtr &&aOther) { @@ -93,7 +89,6 @@ template class OwnedPtr : public Ptr * This is the destructor for `OwnedPtr`. * * Upon destruction, the `OwnedPtr` invokes `Free()` method on its managed object (if any). - * */ ~OwnedPtr(void) { Delete(); } @@ -102,7 +97,6 @@ template class OwnedPtr : public Ptr * * Invokes `Free()` method on the `Type` object owned by `OwnedPtr` (if any). It will also set the * `OwnedPtr` to null. - * */ void Free(void) { @@ -118,7 +112,6 @@ template class OwnedPtr : public Ptr * being the same pointer as the one currently managed by `OwnedPtr`). * * @param[in] aPointer A pointer to the new object to replace with. - * */ void Reset(Type *aPointer = nullptr) { @@ -135,7 +128,6 @@ template class OwnedPtr : public Ptr * After this call, the `OwnedPtr` will be null. * * @returns The pointer to the object owned by `OwnedPtr` or `nullptr` if `OwnedPtr` was null. - * */ Type *Release(void) { @@ -148,7 +140,6 @@ template class OwnedPtr : public Ptr * Allows passing of the ownership to another `OwnedPtr` using move semantics. * * @returns An rvalue reference of the pointer to move from. - * */ OwnedPtr &&PassOwnership(void) { return static_cast(*this); } @@ -163,7 +154,6 @@ template class OwnedPtr : public Ptr * @param[in] aOther An rvalue reference to an `OwnedPtr` to move from. * * @returns A reference to this `OwnedPtr`. - * */ OwnedPtr &operator=(OwnedPtr &&aOther) { diff --git a/src/core/common/owning_list.hpp b/src/core/common/owning_list.hpp index 3d1ea5544a7..2cf182e43d0 100644 --- a/src/core/common/owning_list.hpp +++ b/src/core/common/owning_list.hpp @@ -45,7 +45,6 @@ namespace ot { /** * Represents a singly linked list which owns its entries and frees them upon destruction of the * list. - * */ template class OwningList : public LinkedList { @@ -55,7 +54,6 @@ template class OwningList : public LinkedList public: /** * This is the default constructor for `OwningList` - * */ OwningList(void) = default; @@ -63,13 +61,11 @@ template class OwningList : public LinkedList * This is the destructor for `OwningList`. * * On destruction, all existing entries in the list are freed. - * */ ~OwningList(void) { Free(); } /** * Clears the list and frees all existing entries in it. - * */ void Free(void) { @@ -80,7 +76,6 @@ template class OwningList : public LinkedList /** * Clears the list and frees all existing entries in it. - * */ void Clear(void) { Free(); } @@ -90,7 +85,6 @@ template class OwningList : public LinkedList * @note This method does not change the popped entry itself, i.e., the popped entry next pointer stays as before. * * @returns An `OwnedPtr` to the entry that was popped (set to null if list of empty). - * */ OwnedPtr Pop(void) { return OwnedPtr(LinkedList::Pop()); } @@ -103,7 +97,6 @@ template class OwningList : public LinkedList * otherwise (if it is `nullptr`) the entry at the head of the list is popped. * * @returns An `OwnedPtr` to the entry that was popped (set to null if there is no entry to pop). - * */ OwnedPtr PopAfter(Type *aPrevEntry) { return OwnedPtr(LinkedList::PopAfter(aPrevEntry)); } @@ -122,7 +115,6 @@ template class OwningList : public LinkedList * @param[in] aIndicator An entry indicator to match against entries in the list. * * @returns An `OwnedPtr` to the entry that was removed (set to null if there is no matching entry to remove). - * */ template OwnedPtr RemoveMatching(const Indicator &aIndicator) { @@ -143,7 +135,6 @@ template class OwningList : public LinkedList * * @param[in] aIndicator An entry indicator to match against entries in the list. * @param[in] aRemovedList The list to add the removed entries to. - * */ template void RemoveAllMatching(const Indicator &aIndicator, OwningList &aRemovedList) { @@ -163,7 +154,6 @@ template class OwningList : public LinkedList * * @retval TRUE At least one matching entry was removed. * @retval FALSE No matching entry was found. - * */ template bool RemoveAndFreeAllMatching(const Indicator &aIndicator) { diff --git a/src/core/common/pool.hpp b/src/core/common/pool.hpp index 926c56a1576..946b232f45c 100644 --- a/src/core/common/pool.hpp +++ b/src/core/common/pool.hpp @@ -51,7 +51,6 @@ class Instance; * This module includes definitions for OpenThread object pool. * * @{ - * */ /** @@ -60,14 +59,12 @@ class Instance; * @tparam Type The object type. Type should provide `GetNext() and `SetNext()` so that it can be added to a * linked list. * @tparam kPoolSize Specifies the pool size (maximum number of objects in the pool). - * */ template class Pool : private NonCopyable { public: /** * Initializes the pool. - * */ Pool(void) : mFreeList() @@ -85,7 +82,6 @@ template class Pool : private NonCopyable * each `Type` entry object. This can be realized by the `Type` class inheriting from `InstanceLocatorInit()`. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit Pool(Instance &aInstance) : mFreeList() @@ -102,7 +98,6 @@ template class Pool : private NonCopyable * * @returns A pointer to the newly allocated object, or `nullptr` if all entries from the pool are already * allocated. - * */ Type *Allocate(void) { return mFreeList.Pop(); } @@ -113,13 +108,11 @@ template class Pool : private NonCopyable * An already freed entry MUST not be freed again. * * @param[in] aEntry The pool object entry to free. - * */ void Free(Type &aEntry) { mFreeList.Push(aEntry); } /** * Frees all previously allocated objects. - * */ void FreeAll(void) { @@ -135,7 +128,6 @@ template class Pool : private NonCopyable * Returns the pool size. * * @returns The pool size (maximum number of objects in the pool). - * */ uint16_t GetSize(void) const { return kPoolSize; } @@ -146,7 +138,6 @@ template class Pool : private NonCopyable * * @retval TRUE if @p aObject is from the pool. * @retval FALSE if @p aObject is not from the pool. - * */ bool IsPoolEntry(const Type &aObject) const { return (&mPool[0] <= &aObject) && (&aObject < GetArrayEnd(mPool)); } @@ -158,7 +149,6 @@ template class Pool : private NonCopyable * @param[in] aEntry A reference to an entry from the pool. * * @returns The associated index of @p aEntry. - * */ uint16_t GetIndexOf(const Type &aEntry) const { return static_cast(&aEntry - mPool); } @@ -170,7 +160,6 @@ template class Pool : private NonCopyable * @param[in] aIndex An index. * * @returns A reference to entry at index @p aIndex. - * */ Type &GetEntryAt(uint16_t aIndex) { return mPool[aIndex]; } @@ -182,7 +171,6 @@ template class Pool : private NonCopyable * @param[in] aIndex An index. * * @returns A reference to entry at index @p aIndex. - * */ const Type &GetEntryAt(uint16_t aIndex) const { return mPool[aIndex]; } @@ -193,7 +181,6 @@ template class Pool : private NonCopyable /** * @} - * */ } // namespace ot diff --git a/src/core/common/preference.cpp b/src/core/common/preference.cpp index 44aeb522f29..85b7a7a53c5 100644 --- a/src/core/common/preference.cpp +++ b/src/core/common/preference.cpp @@ -29,7 +29,6 @@ /** * @file * This file implements methods for a signed preference value and its 2-bit unsigned representation. - * */ #include "preference.hpp" diff --git a/src/core/common/preference.hpp b/src/core/common/preference.hpp index 5919a8f47a4..2c4c052cdc5 100644 --- a/src/core/common/preference.hpp +++ b/src/core/common/preference.hpp @@ -44,7 +44,6 @@ namespace ot { /** * Provides constants and static methods to convert between `int8_t` preference and its 2-bit unsigned * representation. - * */ class Preference { @@ -62,7 +61,6 @@ class Preference * @param[in] aPrf The preference to convert to `uint8_t`. * * @returns The 2-bit unsigned value representing @p aPrf. - * */ static uint8_t To2BitUint(int8_t aPrf); @@ -81,7 +79,6 @@ class Preference * ignored. * * @returns The signed preference `kHigh`, `kMedium`, or `kLow` corresponding to @p a2BitUint. - * */ static int8_t From2BitUint(uint8_t a2BitUint); @@ -93,7 +90,6 @@ class Preference * * @retval TRUE if @p aPrf is valid. * @retval FALSE if @p aPrf is not valid - * */ static bool IsValid(int8_t aPrf); @@ -105,7 +101,6 @@ class Preference * * @retval TRUE if the first 2 bits of @p a2BitUint are `0b00`, `0b01`, or `0b11`. * @retval FALSE if the first 2 bits of @p a2BitUint are `0b01`. - * */ static bool Is2BitUintValid(uint8_t a2BitUint) { return ((a2BitUint & k2BitMask) != k2BitReserved); } @@ -115,7 +110,6 @@ class Preference * @param[in] aPrf The preference to convert. * * @returns The string representation of @p aPrf. - * */ static const char *ToString(int8_t aPrf); diff --git a/src/core/common/ptr_wrapper.hpp b/src/core/common/ptr_wrapper.hpp index eea318120f4..7f42be147d0 100644 --- a/src/core/common/ptr_wrapper.hpp +++ b/src/core/common/ptr_wrapper.hpp @@ -47,14 +47,12 @@ namespace ot { * This is intended as base class of `OwnedPtr` or `RetainPtr` providing common simple methods. * * @tparam Type The pointer type. - * */ template class Ptr { public: /** * This is the default constructor for `Ptr` initializing it as null. - * */ Ptr(void) : mPointer(nullptr) @@ -65,7 +63,6 @@ template class Ptr * Initializes the `Ptr` with a given pointer. * * @param[in] aPointer A pointer to initialize with. - * */ explicit Ptr(Type *aPointer) : mPointer(aPointer) @@ -77,7 +74,6 @@ template class Ptr * * @retval TRUE The `Ptr` is null. * @retval FALSE The `Ptr` is not null. - * */ bool IsNull(void) const { return (mPointer == nullptr); } @@ -85,7 +81,6 @@ template class Ptr * Gets the wrapped pointer. * * @returns The wrapped pointer. - * */ Type *Get(void) { return mPointer; } @@ -93,7 +88,6 @@ template class Ptr * Gets the wrapped pointer. * * @returns The wrapped pointer. - * */ const Type *Get(void) const { return mPointer; } @@ -101,7 +95,6 @@ template class Ptr * Overloads the `->` dereference operator and returns the pointer. * * @returns The wrapped pointer. - * */ Type *operator->(void) { return mPointer; } @@ -109,7 +102,6 @@ template class Ptr * Overloads the `->` dereference operator and returns the pointer. * * @returns The wrapped pointer. - * */ const Type *operator->(void) const { return mPointer; } @@ -119,7 +111,6 @@ template class Ptr * The behavior is undefined if `IsNull() == true`. * * @returns A reference to the pointed object. - * */ Type &operator*(void) { return *mPointer; } @@ -129,7 +120,6 @@ template class Ptr * The behavior is undefined if `IsNull() == true`. * * @returns A reference to the pointed object. - * */ const Type &operator*(void) const { return *mPointer; } @@ -140,7 +130,6 @@ template class Ptr * * @retval TRUE If `Ptr` is equal to @p aPointer. * @retval FALSE If `Ptr` is not equal to @p aPointer. - * */ bool operator==(const Type *aPointer) const { return (mPointer == aPointer); } @@ -151,7 +140,6 @@ template class Ptr * * @retval TRUE If `Ptr` is not equal to @p aPointer. * @retval FALSE If `Ptr` is equal to @p aPointer. - * */ bool operator!=(const Type *aPointer) const { return (mPointer != aPointer); } @@ -162,7 +150,6 @@ template class Ptr * * @retval TRUE If `Ptr` is equal to @p aOther. * @retval FALSE If `Ptr` is not equal to @p aOther. - * */ bool operator==(const Ptr &aOther) const { return (mPointer == aOther.mPointer); } @@ -173,7 +160,6 @@ template class Ptr * * @retval TRUE If `Ptr` is not equal to @p aOther. * @retval FALSE If `Ptr` is equal to @p aOther. - * */ bool operator!=(const Ptr &aOther) const { return (mPointer != aOther.mPointer); } diff --git a/src/core/common/random.hpp b/src/core/common/random.hpp index fb01e22c86a..4848c3be07e 100644 --- a/src/core/common/random.hpp +++ b/src/core/common/random.hpp @@ -50,20 +50,17 @@ namespace Random { /** * Manages random number generator initialization/deinitialization. - * */ class Manager : private NonCopyable { public: /** * Initializes the object. - * */ Manager(void); /** * This destructor deinitializes the object. - * */ ~Manager(void); @@ -71,7 +68,6 @@ class Manager : private NonCopyable * Generates and returns a random value using a non-crypto Pseudo Random Number Generator. * * @returns A random `uint32_t` value. - * */ static uint32_t NonCryptoGetUint32(void); @@ -83,7 +79,6 @@ class Manager : private NonCopyable * @param[in] aSize Size of buffer (number of bytes to fill). * * @retval kErrorNone Successfully filled buffer with random values. - * */ static Error CryptoFillBuffer(uint8_t *aBuffer, uint16_t aSize) { return otPlatCryptoRandomGet(aBuffer, aSize); } #endif @@ -109,7 +104,6 @@ namespace NonCrypto { * Generates and returns a random `uint32_t` value. * * @returns A random `uint32_t` value. - * */ inline uint32_t GetUint32(void) { return Manager::NonCryptoGetUint32(); } @@ -117,7 +111,6 @@ inline uint32_t GetUint32(void) { return Manager::NonCryptoGetUint32(); } * Generates and returns a random byte. * * @returns A random `uint8_t` value. - * */ inline uint8_t GetUint8(void) { return static_cast(GetUint32() & 0xff); } @@ -125,7 +118,6 @@ inline uint8_t GetUint8(void) { return static_cast(GetUint32() & 0xff); * Generates and returns a random `uint16_t` value. * * @returns A random `uint16_t` value. - * */ inline uint16_t GetUint16(void) { return static_cast(GetUint32() & 0xffff); } @@ -136,7 +128,6 @@ inline uint16_t GetUint16(void) { return static_cast(GetUint32() & 0xf * @param[in] aMax A maximum value (this value is excluded from returned random result). * * @returns A random `uint8_t` value in the given range (i.e., aMin <= random value < aMax). - * */ uint8_t GetUint8InRange(uint8_t aMin, uint8_t aMax); @@ -149,7 +140,6 @@ uint8_t GetUint8InRange(uint8_t aMin, uint8_t aMax); * @param[in] aMax A maximum value (this value is excluded from returned random result). * * @returns A random `uint16_t` value in the given range (i.e., aMin <= random value < aMax). - * */ uint16_t GetUint16InRange(uint16_t aMin, uint16_t aMax); @@ -162,7 +152,6 @@ uint16_t GetUint16InRange(uint16_t aMin, uint16_t aMax); * @param[in] aMax A maximum value (this value is excluded from returned random result). * * @returns A random `uint32_t` value in the given range (i.e., aMin <= random value < aMax). - * */ uint32_t GetUint32InRange(uint32_t aMin, uint32_t aMax); @@ -171,7 +160,6 @@ uint32_t GetUint32InRange(uint32_t aMin, uint32_t aMax); * * @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). - * */ void FillBuffer(uint8_t *aBuffer, uint16_t aSize); @@ -181,7 +169,6 @@ void FillBuffer(uint8_t *aBuffer, uint16_t aSize); * @tparam ObjectType The object type to fill. * * @param[in] aObject A reference to the object to fill. - * */ template void Fill(ObjectType &aObject) { @@ -197,7 +184,6 @@ template void Fill(ObjectType &aObject) * @param[in] aJitter Maximum jitter. Random jitter is selected from the range `[-aJitter, aJitter]`. * * @returns The given value with an added random jitter. - * */ uint32_t AddJitter(uint32_t aValue, uint16_t aJitter); @@ -214,7 +200,6 @@ namespace Crypto { * @param[in] aSize Size of buffer (number of bytes to fill). * * @retval kErrorNone Successfully filled buffer with random values. - * */ inline Error FillBuffer(uint8_t *aBuffer, uint16_t aSize) { return Manager::CryptoFillBuffer(aBuffer, aSize); } @@ -227,7 +212,6 @@ inline Error FillBuffer(uint8_t *aBuffer, uint16_t aSize) { return Manager::Cryp * * @retval kErrorNone Successfully filled @p aObject with random values. * @retval kErrorFailed Failed to generate secure random bytes to fill the object. - * */ template Error Fill(ObjectType &aObject) { diff --git a/src/core/common/retain_ptr.hpp b/src/core/common/retain_ptr.hpp index 207f4963eb8..b534957dcd2 100644 --- a/src/core/common/retain_ptr.hpp +++ b/src/core/common/retain_ptr.hpp @@ -53,7 +53,6 @@ namespace ot { * The `Type` can inherit from `RetainCountable` which provides the retain counting methods. * * @tparam Type The pointer type. - * */ template class RetainPtr : public Ptr { @@ -62,7 +61,6 @@ template class RetainPtr : public Ptr public: /** * This is the default constructor for `RetainPtr` initializing it as null. - * */ RetainPtr(void) = default; @@ -72,7 +70,6 @@ template class RetainPtr : public Ptr * Upon construction the `RetainPtr` will increment the retain count on @p aPointer (if not null). * * @param[in] aPointer A pointer to object to initialize with. - * */ explicit RetainPtr(Type *aPointer) : Ptr(aPointer) @@ -84,7 +81,6 @@ template class RetainPtr : public Ptr * Initializes the `RetainPtr` from another `RetainPtr`. * * @param[in] aOther Another `RetainPtr`. - * */ RetainPtr(const RetainPtr &aOther) : Ptr(aOther.mPointer) @@ -97,7 +93,6 @@ template class RetainPtr : public Ptr * * Upon destruction, the `RetainPtr` will decrement the retain count on the managed object (if not null) and * free the object if its retain count reaches zero. - * */ ~RetainPtr(void) { DecrementRetainCount(); } @@ -108,7 +103,6 @@ template class RetainPtr : public Ptr * managed by `RetainPtr`). * * @param[in] aPointer A pointer to a new object to replace with. - * */ void Reset(Type *aPointer = nullptr) { @@ -127,7 +121,6 @@ template class RetainPtr : public Ptr * After this call, the `RetainPtr` will be null. * * @returns The pointer to the object managed by `RetainPtr` or `nullptr` if `RetainPtr` was null. - * */ Type *Release(void) { @@ -146,7 +139,6 @@ template class RetainPtr : public Ptr * @param[in] aOther A reference to another `RetainPtr`. * * @returns A reference to this `RetainPtr`. - * */ RetainPtr &operator=(const RetainPtr &aOther) { @@ -174,7 +166,6 @@ template class RetainPtr : public Ptr /** * Provides mechanism to track retain count. - * */ class RetainCountable { @@ -183,7 +174,6 @@ class RetainCountable protected: /** * This constrictor initializes the object starting with retain count of zero. - * */ RetainCountable(void) : mRetainCount(0) @@ -194,13 +184,11 @@ class RetainCountable * Returns the current retain count. * * @returns The current retain count. - * */ uint16_t GetRetainCount(void) const { return mRetainCount; } /** * Increments the retain count. - * */ void IncrementRetainCount(void) { ++mRetainCount; } @@ -208,7 +196,6 @@ class RetainCountable * Decrements the retain count. * * @returns The retain count value after decrementing it. - * */ uint16_t DecrementRetainCount(void) { return --mRetainCount; } diff --git a/src/core/common/serial_number.hpp b/src/core/common/serial_number.hpp index 07e536c3b3c..ad76811af6d 100644 --- a/src/core/common/serial_number.hpp +++ b/src/core/common/serial_number.hpp @@ -59,7 +59,6 @@ class SerialNumber * * @retval TRUE If @p aFirst is less than @p aSecond. * @retval FALSE If @p aFirst is not less than @p aSecond. - * */ template static bool IsLess(UintType aFirst, UintType aSecond) { @@ -87,7 +86,6 @@ class SerialNumber * * @retval TRUE If @p aFirst is greater than @p aSecond. * @retval FALSE If @p aFirst is not greater than @p aSecond. - * */ template static bool IsGreater(UintType aFirst, UintType aSecond) { diff --git a/src/core/common/settings.hpp b/src/core/common/settings.hpp index 8b2fede0fe0..a289fc045e6 100644 --- a/src/core/common/settings.hpp +++ b/src/core/common/settings.hpp @@ -62,7 +62,6 @@ class Settings; * Defines the base class used by `Settings` and `Settings::ChildInfoIterator`. * * Provides structure definitions for different settings keys. - * */ class SettingsBase : public InstanceLocator { @@ -100,12 +99,10 @@ class SettingsBase : public InstanceLocator * * 4. New Key IDs may be defined in the future with the understanding * that such key values are not backward compatible. - * */ /** * Defines the keys of settings. - * */ enum Key : uint16_t { @@ -131,7 +128,6 @@ class SettingsBase : public InstanceLocator /** * Represents the device's own network information for settings storage. - * */ OT_TOOL_PACKED_BEGIN class NetworkInfo : private Clearable @@ -144,7 +140,6 @@ class SettingsBase : public InstanceLocator /** * Initializes the `NetworkInfo` object. - * */ void Init(void) { @@ -156,7 +151,6 @@ class SettingsBase : public InstanceLocator * Returns the Thread role. * * @returns The Thread role. - * */ uint8_t GetRole(void) const { return mRole; } @@ -164,7 +158,6 @@ class SettingsBase : public InstanceLocator * Sets the Thread role. * * @param[in] aRole The Thread Role. - * */ void SetRole(uint8_t aRole) { mRole = aRole; } @@ -172,7 +165,6 @@ class SettingsBase : public InstanceLocator * Returns the Thread device mode. * * @returns the Thread device mode. - * */ uint8_t GetDeviceMode(void) const { return mDeviceMode; } @@ -180,7 +172,6 @@ class SettingsBase : public InstanceLocator * Sets the Thread device mode. * * @param[in] aDeviceMode The Thread device mode. - * */ void SetDeviceMode(uint8_t aDeviceMode) { mDeviceMode = aDeviceMode; } @@ -188,7 +179,6 @@ class SettingsBase : public InstanceLocator * Returns the RLOC16. * * @returns The RLOC16. - * */ uint16_t GetRloc16(void) const { return LittleEndian::HostSwap16(mRloc16); } @@ -196,7 +186,6 @@ class SettingsBase : public InstanceLocator * Sets the RLOC16. * * @param[in] aRloc16 The RLOC16. - * */ void SetRloc16(uint16_t aRloc16) { mRloc16 = LittleEndian::HostSwap16(aRloc16); } @@ -204,7 +193,6 @@ class SettingsBase : public InstanceLocator * Returns the key sequence. * * @returns The key sequence. - * */ uint32_t GetKeySequence(void) const { return LittleEndian::HostSwap32(mKeySequence); } @@ -212,7 +200,6 @@ class SettingsBase : public InstanceLocator * Sets the key sequence. * * @param[in] aKeySequence The key sequence. - * */ void SetKeySequence(uint32_t aKeySequence) { mKeySequence = LittleEndian::HostSwap32(aKeySequence); } @@ -220,7 +207,6 @@ class SettingsBase : public InstanceLocator * Returns the MLE frame counter. * * @returns The MLE frame counter. - * */ uint32_t GetMleFrameCounter(void) const { return LittleEndian::HostSwap32(mMleFrameCounter); } @@ -228,7 +214,6 @@ class SettingsBase : public InstanceLocator * Sets the MLE frame counter. * * @param[in] aMleFrameCounter The MLE frame counter. - * */ void SetMleFrameCounter(uint32_t aMleFrameCounter) { @@ -239,7 +224,6 @@ class SettingsBase : public InstanceLocator * Returns the MAC frame counter. * * @returns The MAC frame counter. - * */ uint32_t GetMacFrameCounter(void) const { return LittleEndian::HostSwap32(mMacFrameCounter); } @@ -247,7 +231,6 @@ class SettingsBase : public InstanceLocator * Sets the MAC frame counter. * * @param[in] aMacFrameCounter The MAC frame counter. - * */ void SetMacFrameCounter(uint32_t aMacFrameCounter) { @@ -258,7 +241,6 @@ class SettingsBase : public InstanceLocator * Returns the previous partition ID. * * @returns The previous partition ID. - * */ uint32_t GetPreviousPartitionId(void) const { return LittleEndian::HostSwap32(mPreviousPartitionId); } @@ -266,7 +248,6 @@ class SettingsBase : public InstanceLocator * Sets the previous partition id. * * @param[in] aPreviousPartitionId The previous partition ID. - * */ void SetPreviousPartitionId(uint32_t aPreviousPartitionId) { @@ -277,7 +258,6 @@ class SettingsBase : public InstanceLocator * Returns the extended address. * * @returns The extended address. - * */ const Mac::ExtAddress &GetExtAddress(void) const { return mExtAddress; } @@ -285,7 +265,6 @@ class SettingsBase : public InstanceLocator * Sets the extended address. * * @param[in] aExtAddress The extended address. - * */ void SetExtAddress(const Mac::ExtAddress &aExtAddress) { mExtAddress = aExtAddress; } @@ -293,7 +272,6 @@ class SettingsBase : public InstanceLocator * Returns the Mesh Local Interface Identifier. * * @returns The Mesh Local Interface Identifier. - * */ const Ip6::InterfaceIdentifier &GetMeshLocalIid(void) const { return mMlIid; } @@ -301,7 +279,6 @@ class SettingsBase : public InstanceLocator * Sets the Mesh Local Interface Identifier. * * @param[in] aMeshLocalIid The Mesh Local Interface Identifier. - * */ void SetMeshLocalIid(const Ip6::InterfaceIdentifier &aMeshLocalIid) { mMlIid = aMeshLocalIid; } @@ -309,7 +286,6 @@ class SettingsBase : public InstanceLocator * Returns the Thread version. * * @returns The Thread version. - * */ uint16_t GetVersion(void) const { return LittleEndian::HostSwap16(mVersion); } @@ -317,7 +293,6 @@ class SettingsBase : public InstanceLocator * Sets the Thread version. * * @param[in] aVersion The Thread version. - * */ void SetVersion(uint16_t aVersion) { mVersion = LittleEndian::HostSwap16(aVersion); } @@ -338,7 +313,6 @@ class SettingsBase : public InstanceLocator /** * Represents the parent information for settings storage. - * */ OT_TOOL_PACKED_BEGIN class ParentInfo : private Clearable @@ -351,7 +325,6 @@ class SettingsBase : public InstanceLocator /** * Initializes the `ParentInfo` object. - * */ void Init(void) { @@ -363,7 +336,6 @@ class SettingsBase : public InstanceLocator * Returns the extended address. * * @returns The extended address. - * */ const Mac::ExtAddress &GetExtAddress(void) const { return mExtAddress; } @@ -371,7 +343,6 @@ class SettingsBase : public InstanceLocator * Sets the extended address. * * @param[in] aExtAddress The extended address. - * */ void SetExtAddress(const Mac::ExtAddress &aExtAddress) { mExtAddress = aExtAddress; } @@ -379,7 +350,6 @@ class SettingsBase : public InstanceLocator * Returns the Thread version. * * @returns The Thread version. - * */ uint16_t GetVersion(void) const { return LittleEndian::HostSwap16(mVersion); } @@ -387,7 +357,6 @@ class SettingsBase : public InstanceLocator * Sets the Thread version. * * @param[in] aVersion The Thread version. - * */ void SetVersion(uint16_t aVersion) { mVersion = LittleEndian::HostSwap16(aVersion); } @@ -401,7 +370,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_FTD /** * Represents the child information for settings storage. - * */ OT_TOOL_PACKED_BEGIN class ChildInfo @@ -413,7 +381,6 @@ class SettingsBase : public InstanceLocator /** * Clears the struct object (setting all the fields to zero). - * */ void Init(void) { @@ -425,7 +392,6 @@ class SettingsBase : public InstanceLocator * Returns the extended address. * * @returns The extended address. - * */ const Mac::ExtAddress &GetExtAddress(void) const { return mExtAddress; } @@ -433,7 +399,6 @@ class SettingsBase : public InstanceLocator * Sets the extended address. * * @param[in] aExtAddress The extended address. - * */ void SetExtAddress(const Mac::ExtAddress &aExtAddress) { mExtAddress = aExtAddress; } @@ -441,7 +406,6 @@ class SettingsBase : public InstanceLocator * Returns the child timeout. * * @returns The child timeout. - * */ uint32_t GetTimeout(void) const { return LittleEndian::HostSwap32(mTimeout); } @@ -449,7 +413,6 @@ class SettingsBase : public InstanceLocator * Sets the child timeout. * * @param[in] aTimeout The child timeout. - * */ void SetTimeout(uint32_t aTimeout) { mTimeout = LittleEndian::HostSwap32(aTimeout); } @@ -457,7 +420,6 @@ class SettingsBase : public InstanceLocator * Returns the RLOC16. * * @returns The RLOC16. - * */ uint16_t GetRloc16(void) const { return LittleEndian::HostSwap16(mRloc16); } @@ -465,7 +427,6 @@ class SettingsBase : public InstanceLocator * Sets the RLOC16. * * @param[in] aRloc16 The RLOC16. - * */ void SetRloc16(uint16_t aRloc16) { mRloc16 = LittleEndian::HostSwap16(aRloc16); } @@ -473,7 +434,6 @@ class SettingsBase : public InstanceLocator * Returns the Thread device mode. * * @returns The Thread device mode. - * */ uint8_t GetMode(void) const { return mMode; } @@ -481,7 +441,6 @@ class SettingsBase : public InstanceLocator * Sets the Thread device mode. * * @param[in] aMode The Thread device mode. - * */ void SetMode(uint8_t aMode) { mMode = aMode; } @@ -489,7 +448,6 @@ class SettingsBase : public InstanceLocator * Returns the Thread version. * * @returns The Thread version. - * */ uint16_t GetVersion(void) const { return LittleEndian::HostSwap16(mVersion); } @@ -497,7 +455,6 @@ class SettingsBase : public InstanceLocator * Sets the Thread version. * * @param[in] aVersion The Thread version. - * */ void SetVersion(uint16_t aVersion) { mVersion = LittleEndian::HostSwap16(aVersion); } @@ -515,7 +472,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE /** * Defines constants and types for SLAAC IID Secret key settings. - * */ class SlaacIidSecretKey { @@ -532,7 +488,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_CONFIG_DUA_ENABLE /** * Represents the duplicate address detection information for settings storage. - * */ OT_TOOL_PACKED_BEGIN class DadInfo : private Clearable @@ -545,7 +500,6 @@ class SettingsBase : public InstanceLocator /** * Initializes the `DadInfo` object. - * */ void Init(void) { Clear(); } @@ -553,7 +507,6 @@ class SettingsBase : public InstanceLocator * Returns the Dad Counter. * * @returns The Dad Counter value. - * */ uint8_t GetDadCounter(void) const { return mDadCounter; } @@ -561,7 +514,6 @@ class SettingsBase : public InstanceLocator * Sets the Dad Counter. * * @param[in] aDadCounter The Dad Counter value. - * */ void SetDadCounter(uint8_t aDadCounter) { mDadCounter = aDadCounter; } @@ -575,7 +527,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE /** * Defines constants and types for BR ULA prefix settings. - * */ class BrUlaPrefix { @@ -590,7 +541,6 @@ class SettingsBase : public InstanceLocator /** * Represents a BR on-link prefix entry for settings storage. - * */ OT_TOOL_PACKED_BEGIN class BrOnLinkPrefix : public Clearable @@ -602,7 +552,6 @@ class SettingsBase : public InstanceLocator /** * Initializes the `BrOnLinkPrefix` object. - * */ void Init(void) { Clear(); } @@ -610,7 +559,6 @@ class SettingsBase : public InstanceLocator * Gets the prefix. * * @returns The prefix. - * */ const Ip6::Prefix &GetPrefix(void) const { return mPrefix; } @@ -618,7 +566,6 @@ class SettingsBase : public InstanceLocator * Set the prefix. * * @param[in] aPrefix The prefix. - * */ void SetPrefix(const Ip6::Prefix &aPrefix) { mPrefix = aPrefix; } @@ -626,7 +573,6 @@ class SettingsBase : public InstanceLocator * Gets the remaining prefix lifetime in seconds. * * @returns The prefix lifetime in seconds. - * */ uint32_t GetLifetime(void) const { return mLifetime; } @@ -634,7 +580,6 @@ class SettingsBase : public InstanceLocator * Sets the the prefix lifetime. * * @param[in] aLifetime The prefix lifetime in seconds. - * */ void SetLifetime(uint32_t aLifetime) { mLifetime = aLifetime; } @@ -650,7 +595,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE /** * Defines constants and types for SRP ECDSA key settings. - * */ class SrpEcdsaKey { @@ -666,7 +610,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_CONFIG_SRP_CLIENT_SAVE_SELECTED_SERVER_ENABLE /** * Represents the SRP client info (selected server address). - * */ OT_TOOL_PACKED_BEGIN class SrpClientInfo : private Clearable @@ -679,7 +622,6 @@ class SettingsBase : public InstanceLocator /** * Initializes the `SrpClientInfo` object. - * */ void Init(void) { Clear(); } @@ -687,7 +629,6 @@ class SettingsBase : public InstanceLocator * Returns the server IPv6 address. * * @returns The server IPv6 address. - * */ const Ip6::Address &GetServerAddress(void) const { return mServerAddress; } @@ -695,7 +636,6 @@ class SettingsBase : public InstanceLocator * Sets the server IPv6 address. * * @param[in] aAddress The server IPv6 address. - * */ void SetServerAddress(const Ip6::Address &aAddress) { mServerAddress = aAddress; } @@ -703,7 +643,6 @@ class SettingsBase : public InstanceLocator * Returns the server port number. * * @returns The server port number. - * */ uint16_t GetServerPort(void) const { return LittleEndian::HostSwap16(mServerPort); } @@ -711,7 +650,6 @@ class SettingsBase : public InstanceLocator * Sets the server port number. * * @param[in] aPort The server port number. - * */ void SetServerPort(uint16_t aPort) { mServerPort = LittleEndian::HostSwap16(aPort); } @@ -727,7 +665,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE && OPENTHREAD_CONFIG_SRP_SERVER_PORT_SWITCH_ENABLE /** * Represents the SRP server info. - * */ OT_TOOL_PACKED_BEGIN class SrpServerInfo : private Clearable @@ -740,7 +677,6 @@ class SettingsBase : public InstanceLocator /** * Initializes the `SrpServerInfo` object. - * */ void Init(void) { Clear(); } @@ -748,7 +684,6 @@ class SettingsBase : public InstanceLocator * Returns the server port number. * * @returns The server port number. - * */ uint16_t GetPort(void) const { return LittleEndian::HostSwap16(mPort); } @@ -756,7 +691,6 @@ class SettingsBase : public InstanceLocator * Sets the server port number. * * @param[in] aPort The server port number. - * */ void SetPort(uint16_t aPort) { mPort = LittleEndian::HostSwap16(aPort); } @@ -770,7 +704,6 @@ class SettingsBase : public InstanceLocator #if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE && OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE /** * Represents the Border Agent ID. - * */ class BorderAgentId { @@ -808,7 +741,6 @@ class SettingsBase : public InstanceLocator /** * Defines methods related to non-volatile storage of settings. - * */ class Settings : public SettingsBase, private NonCopyable { @@ -819,7 +751,6 @@ class Settings : public SettingsBase, private NonCopyable * Initializes a `Settings` object. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit Settings(Instance &aInstance) : SettingsBase(aInstance) @@ -830,7 +761,6 @@ class Settings : public SettingsBase, private NonCopyable * Initializes the platform settings (non-volatile) module. * * This should be called before any other method from this class. - * */ void Init(void); @@ -838,13 +768,11 @@ class Settings : public SettingsBase, private NonCopyable * De-initializes the platform settings (non-volatile) module. * * Should be called when OpenThread instance is no longer in use. - * */ void Deinit(void); /** * Removes all settings from the non-volatile store. - * */ void Wipe(void); @@ -853,7 +781,6 @@ class Settings : public SettingsBase, private NonCopyable * * @param[in] aType The Dataset type (active or pending) to save. * @param[in] aDataset A reference to a `Dataset` object to be saved. - * */ void SaveOperationalDataset(MeshCoP::Dataset::Type aType, const MeshCoP::Dataset &aDataset); @@ -865,7 +792,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully read the Dataset. * @retval kErrorNotFound No corresponding value in the setting store. - * */ Error ReadOperationalDataset(MeshCoP::Dataset::Type aType, MeshCoP::Dataset &aDataset) const; @@ -873,7 +799,6 @@ class Settings : public SettingsBase, private NonCopyable * Deletes the Operational Dataset (active/pending) from settings. * * @param[in] aType The Dataset type (active or pending) to delete. - * */ void DeleteOperationalDataset(MeshCoP::Dataset::Type aType); @@ -895,7 +820,6 @@ class Settings : public SettingsBase, private NonCopyable * @retval kErrorNone Successfully read the entry. * @retval kErrorNotFound No corresponding value in the setting store. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ template Error Read(EntryType &aEntry) const { @@ -922,7 +846,6 @@ class Settings : public SettingsBase, private NonCopyable * @retval kErrorNone Successfully read the value. * @retval kErrorNotFound No corresponding value in the setting store. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ template Error Read(typename EntryType::ValueType &aValue) const { @@ -945,7 +868,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully saved Network Info in settings. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ template Error Save(const EntryType &aEntry) { @@ -971,7 +893,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully saved Network Info in settings. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ template Error Save(const typename EntryType::ValueType &aValue) { @@ -991,7 +912,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully deleted the value. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ template Error Delete(void) { return DeleteEntry(EntryType::kKey); } @@ -1005,7 +925,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully saved the Child Info in settings. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ Error AddChildInfo(const ChildInfo &aChildInfo); @@ -1016,7 +935,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully deleted the value. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ Error DeleteAllChildInfo(void); @@ -1029,13 +947,11 @@ class Settings : public SettingsBase, private NonCopyable * * * @returns A ChildInfoIteratorBuilder instance. - * */ ChildInfoIteratorBuilder IterateChildInfo(void) { return ChildInfoIteratorBuilder(GetInstance()); } /** * Defines an iterator to access all Child Info entries in the settings. - * */ class ChildInfoIterator : public SettingsBase, public Unequatable { @@ -1046,7 +962,6 @@ class Settings : public SettingsBase, private NonCopyable * Initializes a `ChildInfoInterator` object. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit ChildInfoIterator(Instance &aInstance); @@ -1056,21 +971,18 @@ class Settings : public SettingsBase, private NonCopyable * * @retval TRUE There are no more entries in the list (reached end of the list). * @retval FALSE The current entry is valid. - * */ bool IsDone(void) const { return mIsDone; } /** * 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(); } /** * 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(); } @@ -1081,7 +993,6 @@ class Settings : public SettingsBase, private NonCopyable * pointing to a valid entry. * * @returns A reference to `ChildInfo` structure corresponding to current iterator entry. - * */ const ChildInfo &GetChildInfo(void) const { return mChildInfo; } @@ -1091,7 +1002,6 @@ class Settings : public SettingsBase, private NonCopyable * @retval kErrorNone The entry was deleted successfully. * @retval kErrorInvalidState The entry is not valid (iterator has reached end of list). * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ Error Delete(void); @@ -1104,7 +1014,6 @@ class Settings : public SettingsBase, private NonCopyable * * * @returns A reference to the `ChildInfo` entry currently pointed by the iterator. - * */ const ChildInfo &operator*(void) const { return mChildInfo; } @@ -1115,7 +1024,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval TRUE If the two iterator objects are equal * @retval FALSE If the two iterator objects are not equal. - * */ bool operator==(const ChildInfoIterator &aOther) const { @@ -1155,7 +1063,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully added or updated the entry in settings. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ Error AddOrUpdateBrOnLinkPrefix(const BrOnLinkPrefix &aBrOnLinkPrefix); @@ -1166,7 +1073,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully removed the matching entry in settings. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ Error RemoveBrOnLinkPrefix(const Ip6::Prefix &aPrefix); @@ -1175,7 +1081,6 @@ class Settings : public SettingsBase, private NonCopyable * * @retval kErrorNone Successfully deleted the entries. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ Error DeleteAllBrOnLinkPrefixes(void); @@ -1188,7 +1093,6 @@ class Settings : public SettingsBase, private NonCopyable * @retval kErrorNone Successfully read the value. * @retval kErrorNotFound No corresponding value in the setting store. * @retval kErrorNotImplemented The platform does not implement settings functionality. - * */ Error ReadBrOnLinkPrefix(int aIndex, BrOnLinkPrefix &aBrOnLinkPrefix); diff --git a/src/core/common/settings_driver.hpp b/src/core/common/settings_driver.hpp index c4670897ba5..5a0dd6e2467 100644 --- a/src/core/common/settings_driver.hpp +++ b/src/core/common/settings_driver.hpp @@ -53,7 +53,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable * Initializes the `SettingsDriver`. * * @param[in] aInstance A reference to the OpenThread instance. - * */ explicit SettingsDriver(Instance &aInstance) : InstanceLocator(aInstance) @@ -68,7 +67,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable * * @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. - * */ void Init(const uint16_t *aSensitiveKeys, uint16_t aSensitiveKeysLength) { @@ -84,7 +82,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable /** * Deinitializes the settings driver. - * */ void Deinit(void) { @@ -103,7 +100,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable * * @retval kErrorNone The value was added. * @retval kErrorNoBufs Not enough space to store the value. - * */ Error Add(uint16_t aKey, const void *aValue, uint16_t aValueLength) { @@ -127,7 +123,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable * * @retval kErrorNone The given key and index was found and removed successfully. * @retval kErrorNotFound The given key or index was not found. - * */ Error Delete(uint16_t aKey, int aIndex = -1) { @@ -156,7 +151,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable * * @retval kErrorNone The value was fetched successfully. * @retval kErrorNotFound The key was not found. - * */ Error Get(uint16_t aKey, int aIndex, void *aValue, uint16_t *aValueLength) const { @@ -185,7 +179,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable * * @retval kErrorNone The value was fetched successfully. * @retval kErrorNotFound The key was not found. - * */ Error Get(uint16_t aKey, void *aValue, uint16_t *aValueLength) const { return Get(aKey, 0, aValue, aValueLength); } @@ -202,7 +195,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable * * @retval kErrorNone The value was changed. * @retval kErrorNoBufs Not enough space to store the value. - * */ Error Set(uint16_t aKey, const void *aValue, uint16_t aValueLength) { @@ -219,7 +211,6 @@ class SettingsDriver : public InstanceLocator, private NonCopyable /** * Removes all values. - * */ void Wipe(void) { diff --git a/src/core/common/string.hpp b/src/core/common/string.hpp index 2939232144d..a76a7573321 100644 --- a/src/core/common/string.hpp +++ b/src/core/common/string.hpp @@ -54,12 +54,10 @@ namespace ot { * This module includes definitions for OpenThread String class. * * @{ - * */ /** * Represents comparison mode when matching strings. - * */ enum StringMatchMode : uint8_t { @@ -69,7 +67,6 @@ enum StringMatchMode : uint8_t /** * Represents string encoding check when copying string. - * */ enum StringEncodingCheck : uint8_t { @@ -87,7 +84,6 @@ static constexpr char kNullChar = '\0'; ///< null character. * * @returns The number of characters that precede the terminating null character or @p aMaxLength, * whichever is smaller. `0` if @p aString is `nullptr`. - * */ uint16_t StringLength(const char *aString, uint16_t aMaxLength); @@ -98,7 +94,6 @@ uint16_t StringLength(const char *aString, uint16_t aMaxLength); * @param[in] aChar A char to search for in the string. * * @returns The pointer to first occurrence of the @p aChar in @p aString, or `nullptr` if cannot be found. - * */ const char *StringFind(const char *aString, char aChar); @@ -111,7 +106,6 @@ const char *StringFind(const char *aString, char aChar); * * @returns The pointer to first match of the @p aSubString in @p aString (using comparison @p aMode), or `nullptr` if * cannot be found. - * */ const char *StringFind(const char *aString, const char *aSubString, StringMatchMode aMode = kStringExactMatch); @@ -124,7 +118,6 @@ const char *StringFind(const char *aString, const char *aSubString, StringMatchM * * @retval TRUE If @p aString starts with @p aPrefixString. * @retval FALSE If @p aString does not start with @p aPrefixString. - * */ bool StringStartsWith(const char *aString, const char *aPrefixString, StringMatchMode aMode = kStringExactMatch); @@ -136,7 +129,6 @@ bool StringStartsWith(const char *aString, const char *aPrefixString, StringMatc * * @retval TRUE If @p aString ends with character @p aChar. * @retval FALSE If @p aString does not end with character @p aChar. - * */ bool StringEndsWith(const char *aString, char aChar); @@ -149,7 +141,6 @@ bool StringEndsWith(const char *aString, char aChar); * * @retval TRUE If @p aString ends with sub-string @p aSubString. * @retval FALSE If @p aString does not end with sub-string @p aSubString. - * */ bool StringEndsWith(const char *aString, const char *aSubString, StringMatchMode aMode = kStringExactMatch); @@ -161,7 +152,6 @@ bool StringEndsWith(const char *aString, const char *aSubString, StringMatchMode * * @retval TRUE If @p aFirstString matches @p aSecondString. * @retval FALSE If @p aFirstString does not match @p aSecondString. - * */ bool StringMatch(const char *aFirstString, const char *aSecondString); @@ -174,7 +164,6 @@ bool StringMatch(const char *aFirstString, const char *aSecondString); * * @retval TRUE If @p aFirstString matches @p aSecondString using match mode @p aMode. * @retval FALSE If @p aFirstString does not match @p aSecondString using match mode @p aMode. - * */ bool StringMatch(const char *aFirstString, const char *aSecondString, StringMatchMode aMode); @@ -189,7 +178,6 @@ bool StringMatch(const char *aFirstString, const char *aSecondString, StringMatc * @retval kErrorNone The @p aSource fits in the given buffer. @p aTargetBuffer is updated. * @retval kErrorInvalidArgs The @p aSource does not fit in the given buffer. * @retval kErrorParse The @p aSource does not follow the encoding format specified by @p aEncodingCheck. - * */ Error StringCopy(char *TargetBuffer, uint16_t aTargetSize, const char *aSource, StringEncodingCheck aEncodingCheck); @@ -205,7 +193,6 @@ Error StringCopy(char *TargetBuffer, uint16_t aTargetSize, const char *aSource, * @retval kErrorNone The @p aSource fits in the given buffer. @p aTargetBuffer is updated. * @retval kErrorInvalidArgs The @p aSource does not fit in the given buffer. * @retval kErrorParse The @p aSource does not follow the encoding format specified by @p aEncodingCheck. - * */ template Error StringCopy(char (&aTargetBuffer)[kSize], @@ -231,7 +218,6 @@ Error StringCopy(char (&aTargetBuffer)[kSize], * * @retval kErrorNone Successfully parsed the number from string. @p aString and @p aUint8 are updated. * @retval kErrorParse Failed to parse the number from @p aString, or parsed number is larger than @p aMaxValue. - * */ Error StringParseUint8(const char *&aString, uint8_t &aUint8, uint8_t aMaxValue); @@ -250,7 +236,6 @@ Error StringParseUint8(const char *&aString, uint8_t &aUint8, uint8_t aMaxValue) * * @retval kErrorNone Successfully parsed the number from string. @p aString and @p aUint8 are updated. * @retval kErrorParse Failed to parse the number from @p aString, or parsed number is out of range. - * */ Error StringParseUint8(const char *&aString, uint8_t &aUint8); @@ -258,7 +243,6 @@ Error StringParseUint8(const char *&aString, uint8_t &aUint8); * Converts all uppercase letter characters in a given string to lowercase. * * @param[in,out] aString A pointer to the string to convert. - * */ void StringConvertToLowercase(char *aString); @@ -266,7 +250,6 @@ void StringConvertToLowercase(char *aString); * Converts all lowercase letter characters in a given string to uppercase. * * @param[in,out] aString A pointer to the string to convert. - * */ void StringConvertToUppercase(char *aString); @@ -278,7 +261,6 @@ void StringConvertToUppercase(char *aString); * @param[in] aChar The character to convert * * @returns The character converted to lowercase. - * */ char ToLowercase(char aChar); @@ -290,7 +272,6 @@ char ToLowercase(char aChar); * @param[in] aChar The character to convert * * @returns The character converted to uppercase. - * */ char ToUppercase(char aChar); @@ -301,7 +282,6 @@ char ToUppercase(char aChar); * * @retval TRUE @p aChar is an uppercase letter. * @retval FALSE @p aChar is not an uppercase letter. - * */ bool IsUppercase(char aChar); @@ -312,7 +292,6 @@ bool IsUppercase(char aChar); * * @retval TRUE @p aChar is a lowercase letter. * @retval FALSE @p aChar is not a lowercase letter. - * */ bool IsLowercase(char aChar); @@ -323,7 +302,6 @@ bool IsLowercase(char aChar); * * @retval TRUE @p aChar is a digit character. * @retval FALSE @p aChar is not a digit character. - * */ bool IsDigit(char aChar); @@ -335,7 +313,6 @@ bool IsDigit(char aChar); * * @retval kErrorNone Successfully parsed the digit, @p aValue is updated. * @retval kErrorInvalidArgs @p aDigitChar is not a valid digit character. - * */ Error ParseDigit(char aDigitChar, uint8_t &aValue); @@ -347,7 +324,6 @@ Error ParseDigit(char aDigitChar, uint8_t &aValue); * * @retval kErrorNone Successfully parsed the digit, @p aValue is updated. * @retval kErrorInvalidArgs @p aHexChar is not a valid hex digit character. - * */ Error ParseHexDigit(char aHexChar, uint8_t &aValue); @@ -357,7 +333,6 @@ Error ParseHexDigit(char aHexChar, uint8_t &aValue); * @param[in] aBool A boolean value to convert. * * @returns The converted string representation of @p aBool ("yes" for TRUE and "no" for FALSE). - * */ const char *ToYesNo(bool aBool); @@ -369,7 +344,6 @@ const char *ToYesNo(bool aBool); * * @retval TRUE The sequence is a valid UTF-8 string. * @retval FALSE The sequence is not a valid UTF-8 string. - * */ bool IsValidUtf8String(const char *aString); @@ -382,7 +356,6 @@ bool IsValidUtf8String(const char *aString); * * @retval TRUE The sequence is a valid UTF-8 string. * @retval FALSE The sequence is not a valid UTF-8 string. - * */ bool IsValidUtf8String(const char *aString, size_t aLength); @@ -397,7 +370,6 @@ bool IsValidUtf8String(const char *aString, size_t aLength); * * @retval TRUE If first string is strictly before second string (alphabetical order). * @retval FALSE If first string is not strictly before second string (alphabetical order). - * */ inline constexpr bool AreStringsInOrder(const char *aFirst, const char *aSecond) { @@ -408,7 +380,6 @@ inline constexpr bool AreStringsInOrder(const char *aFirst, const char *aSecond) /** * Implements writing to a string buffer. - * */ class StringWriter { @@ -418,7 +389,6 @@ class StringWriter * * @param[in] aBuffer A pointer to the char buffer to write into. * @param[in] aSize The size of @p aBuffer. - * */ StringWriter(char *aBuffer, uint16_t aSize); @@ -426,7 +396,6 @@ class StringWriter * Clears the string writer. * * @returns The string writer. - * */ StringWriter &Clear(void); @@ -437,7 +406,6 @@ class StringWriter * * @retval true The output is truncated. * @retval false The output is not truncated. - * */ bool IsTruncated(void) const { return mLength >= mSize; } @@ -447,7 +415,6 @@ class StringWriter * Similar to `strlen()` the length does not include the null character at the end of the string. * * @returns The string length. - * */ uint16_t GetLength(void) const { return mLength; } @@ -455,7 +422,6 @@ class StringWriter * Returns the size (number of chars) in the buffer. * * @returns The size of the buffer. - * */ uint16_t GetSize(void) const { return mSize; } @@ -466,7 +432,6 @@ class StringWriter * @param[in] ... Arguments for the format specification. * * @returns The string writer. - * */ StringWriter &Append(const char *aFormat, ...) OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3); @@ -477,7 +442,6 @@ class StringWriter * @param[in] aArgs Arguments for the format specification (as `va_list`). * * @returns The string writer. - * */ StringWriter &AppendVarArgs(const char *aFormat, va_list aArgs); @@ -488,7 +452,6 @@ class StringWriter * @param[in] aLength The length of @p aBytes buffer (in bytes). * * @returns The string writer. - * */ StringWriter &AppendHexBytes(const uint8_t *aBytes, uint16_t aLength); @@ -497,19 +460,16 @@ class StringWriter * * @param[in] aChar The character to append. * @param[in] aCount Number of times to append @p aChar. - * */ StringWriter &AppendCharMultipleTimes(char aChar, uint16_t aCount); /** * Converts all uppercase letter characters in the string to lowercase. - * */ void ConvertToLowercase(void) { StringConvertToLowercase(mBuffer); } /** * Converts all lowercase letter characters in the string to uppercase. - * */ void ConvertToUppercase(void) { StringConvertToUppercase(mBuffer); } @@ -521,7 +481,6 @@ class StringWriter /** * Defines a fixed-size string. - * */ template class String : public StringWriter { @@ -530,7 +489,6 @@ template class String : public StringWriter public: /** * Initializes the string as empty. - * */ String(void) : StringWriter(mBuffer, sizeof(mBuffer)) @@ -541,7 +499,6 @@ template class String : public StringWriter * Returns the string as a null-terminated C string. * * @returns The null-terminated C string. - * */ const char *AsCString(void) const { return mBuffer; } @@ -552,14 +509,12 @@ template class String : public StringWriter /** * 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. - * */ class Stringify : public BinarySearch { public: /** * Represents a entry in the lookup table. - * */ class Entry { @@ -591,7 +546,6 @@ class Stringify : public BinarySearch * @param[in] aNotFound A C string to return if @p aKey was not found in the table. * * @returns The associated string with @p aKey in @p aTable if found, or @p aNotFound otherwise. - * */ template static const char *Lookup(uint16_t aKey, const Entry (&aTable)[kLength], const char *aNotFound = "unknown") @@ -606,7 +560,6 @@ class Stringify : public BinarySearch /** * @} - * */ } // namespace ot diff --git a/src/core/common/tasklet.hpp b/src/core/common/tasklet.hpp index 87e45d7c206..b31ee232518 100644 --- a/src/core/common/tasklet.hpp +++ b/src/core/common/tasklet.hpp @@ -52,19 +52,16 @@ namespace ot { * This module includes definitions for tasklets and the tasklet scheduler. * * @{ - * */ /** * Is used to represent a tasklet. - * */ class Tasklet : public InstanceLocator { public: /** * Implements the tasklet scheduler. - * */ class Scheduler : private NonCopyable { @@ -73,7 +70,6 @@ class Tasklet : public InstanceLocator public: /** * Initializes the object. - * */ Scheduler(void) : mTail(nullptr) @@ -85,13 +81,11 @@ class Tasklet : public InstanceLocator * * @retval TRUE If there are tasklets pending. * @retval FALSE If there are no tasklets pending. - * */ bool AreTaskletsPending(void) const { return mTail != nullptr; } /** * Processes all tasklets queued when this is called. - * */ void ProcessQueuedTasklets(void); @@ -105,7 +99,6 @@ class Tasklet : public InstanceLocator * Reference is called when the tasklet is run. * * @param[in] aTasklet A reference to the tasklet being run. - * */ typedef void (&Handler)(Tasklet &aTasklet); @@ -114,7 +107,6 @@ class Tasklet : public InstanceLocator * * @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. - * */ Tasklet(Instance &aInstance, Handler aHandler) : InstanceLocator(aInstance) @@ -127,7 +119,6 @@ class Tasklet : public InstanceLocator * 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. - * */ void Post(void); @@ -136,7 +127,6 @@ class Tasklet : public InstanceLocator * * @retval TRUE The tasklet is posted. * @retval FALSE The tasklet is not posted. - * */ bool IsPosted(void) const { return (mNext != nullptr); } @@ -154,7 +144,6 @@ class Tasklet : public InstanceLocator * @tparam HandleTaskletPtr A pointer to a non-static member method of `Owner` to use as tasklet handler. * * The `Owner` MUST be a type that is accessible using `InstanceLocator::Get()`. - * */ template class TaskletIn : public Tasklet { @@ -163,7 +152,6 @@ template class TaskletIn * Initializes the tasklet. * * @param[in] aInstance The OpenThread instance. - * */ explicit TaskletIn(Instance &aInstance) : Tasklet(aInstance, HandleTasklet) @@ -181,7 +169,6 @@ template class TaskletIn * method. This method works if there is a single instance of `Type` within OpenThread instance hierarchy. The * `TaskletContext` is intended for cases where there may be multiple instances of the same class/type using a `Tasklet` * object. `TaskletContext` will store a context `void *` information. - * */ class TaskletContext : public Tasklet { @@ -192,7 +179,6 @@ class TaskletContext : public Tasklet * @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. * @param[in] aContext A pointer to an arbitrary context information. - * */ TaskletContext(Instance &aInstance, Handler aHandler, void *aContext) : Tasklet(aInstance, aHandler) @@ -204,7 +190,6 @@ class TaskletContext : public Tasklet * Returns the pointer to the arbitrary context information. * * @returns Pointer to the arbitrary context information. - * */ void *GetContext(void) { return mContext; } @@ -214,7 +199,6 @@ class TaskletContext : public Tasklet /** * @} - * */ } // namespace ot diff --git a/src/core/common/time.hpp b/src/core/common/time.hpp index e1e5641611c..c707c075ae5 100644 --- a/src/core/common/time.hpp +++ b/src/core/common/time.hpp @@ -51,12 +51,10 @@ namespace ot { * This module includes definitions for the time instance. * * @{ - * */ /** * Represents a time instance. - * */ class Time : public Unequatable