Doxygen fixes (#2718)
* warning: explicit link request to 'ifdef' could not be resolved
* warning: documented symbol 'chip::Platform::Security::AES128BlockCipher::*' was not declared or defined.
* warning: documentation for unknown define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_* found.
* src/system/SystemError.h:165: warning: unbalanced grouping commands
* warning: documentation for unknown define CHIP_DEVICE_ERROR_CONFIG_VALUE_NOT_FOUND found.
* warning: explicit link request to 'CHIP_SYSTEM_ERROR_*' could not be resolved
* Ignore src/app until the code is cleaned up
* warning: argument '*' of command @param is not found in the argument list of chip::System::Platform::Layer::*
* Activate STL in docs/Doxyfile since it is used at some places in the code
* Transport::BLE::* documented function not declared or defined
* warning: the name 'Defines' supplied as the argument in the \file statement is not an input file
* warning: the name 'This' supplied as the argument in the \file statement is not an input file
* Expand more macros than only the ones that are predefined
* argument 'err' of command @param is not found in the argument list of chip::System::*
* InetUtils.cpp - warning: Unsupported xml/html tag
* efr32-chip-mbedtls-config.h: warning: documentation for unknown define MBEDTLS*
* Various misnames parameters or duplicate parameters in src/inet
* warning: argument '*' of command @param is not found
* unable to resolve reference to *
* Missing params in src/transport
* warning: explicit link request to '*' could not be resolved
* warning: documented symbol 'short chip::Inet::InterfaceIterator::GetFlags' was not declared or defined
* warning: no matching class member found for
* Included by graph for '*' not generated, too many nodes (*), threshold is 50. Consider increasing DOT_GRAPH_MAX_NODES.
* Inet::InterfaceId is not documented
* warning: explicit link request to
* warning: Unsupported xml/html tag <platform>
* warning: Found unknown command '@requirements'
* Doxygen is confused by __attribute__ annotation
* Wrong parameter name aType->aEventType
* explicit reference
* src/controller/java/CHIPDeviceController-JNI.cpp confuses doxygen
* Ignore NetworkProvisioningServer* files since those are broken and not used so far
diff --git a/docs/BUILDING.md b/docs/BUILDING.md
index 92cf027..6fcb5ab 100644
--- a/docs/BUILDING.md
+++ b/docs/BUILDING.md
@@ -118,7 +118,7 @@
make -f Makefile-Standalone
```
-The helper Makefile-<platform> will automatically run configure the using a
+The helper Makefile-<platform> will automatically run configure the using a
default set of parameters, and allow custom override parameters to be passed via
environment variables. An example of this follows:
diff --git a/docs/Doxyfile b/docs/Doxyfile
index e611856..1417c8c 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -354,7 +354,7 @@
# diagrams that involve STL classes more complete and accurate.
# The default value is: NO.
-BUILTIN_STL_SUPPORT = NO
+BUILTIN_STL_SUPPORT = YES
# If you use Microsoft's C++/CLI language, you should set this option to YES to
# enable parsing support.
@@ -485,7 +485,7 @@
# included in the documentation.
# The default value is: NO.
-EXTRACT_STATIC = NO
+EXTRACT_STATIC = YES
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO,
@@ -824,13 +824,14 @@
# Note: If this tag is empty the current directory is searched.
INPUT = README.md \
+ CODE_OF_CONDUCT.md \
CONTRIBUTING.md \
docs/README.md \
docs/BUILDING.md \
+ docs/BUILDING-GN.md \
docs/VSCODE_DEVELOPMENT.md \
docs/PROJECT_FLOW.md \
docs/STYLE_GUIDE.md \
- src/app \
src/ble \
src/controller \
src/crypto \
@@ -839,6 +840,7 @@
src/lib/core \
src/lib/support \
src/lib/shell \
+ src/lib/message/support/crypto \
src/platform \
src/setup_payload \
src/system \
@@ -933,7 +935,8 @@
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
-EXCLUDE_PATTERNS = */tests/* \
+EXCLUDE_PATTERNS = NetworkProvisioningServer* \
+ */tests/* \
*/dbus/*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
@@ -2164,7 +2167,7 @@
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+INCLUDE_PATH = third_party/
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
@@ -2182,7 +2185,9 @@
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED = CHIP_SYSTEM_CONFIG_USE_SOCKETS=1 \
+PREDEFINED = DOXYGEN=1 \
+ NO_INLINE= \
+ CHIP_SYSTEM_CONFIG_USE_SOCKETS=1 \
CHIP_SYSTEM_CONFIG_USE_LWIP=1 \
INET_CONFIG_ENABLE_IPV4=1 \
CHIP_CONFIG_SECURITY_TEST_MODE=1 \
@@ -2513,7 +2518,7 @@
# Minimum value: 0, maximum value: 10000, default value: 50.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_GRAPH_MAX_NODES = 50
+DOT_GRAPH_MAX_NODES = 200
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
# generated by dot. A depth value of 3 means that only nodes reachable from the
diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h
index 652dc4c..a2324af 100644
--- a/src/controller/CHIPDeviceController.h
+++ b/src/controller/CHIPDeviceController.h
@@ -98,6 +98,7 @@
* @param[in] onMessageReceived Callback for when a message is received
* @param[in] onError Callback for when an error occurs
* @param[in] devicePort [Optional] The CHIP Device's port, defaults to CHIP_PORT
+ * @param[in] interfaceId [Optional] The interface indicator to use
* @return CHIP_ERROR The connection status
*/
CHIP_ERROR ConnectDevice(NodeId remoteDeviceId, IPAddress deviceAddr, void * appReqState, NewConnectionHandler onConnected,
@@ -116,6 +117,7 @@
* @param[in] onMessageReceived Callback for when a message is received
* @param[in] onError Callback for when an error occurs
* @param[in] devicePort [Optional] The CHIP Device's port, defaults to CHIP_PORT
+ * @param[in] interfaceId [Optional] The interface indicator to use
* @return CHIP_ERROR The connection status
*/
[[deprecated("Available until Rendezvous is implemented")]] CHIP_ERROR
diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp
index bf1dddf..f6a3cf7 100644
--- a/src/controller/java/CHIPDeviceController-JNI.cpp
+++ b/src/controller/java/CHIPDeviceController-JNI.cpp
@@ -276,7 +276,7 @@
ChipLogProgress(Controller, "beginConnectDevice() called with IP Address");
const char * deviceAddrStr = env->GetStringUTFChars(deviceAddr, 0);
- chip::Inet::IPAddress::FromString(deviceAddrStr, deviceIPAddr);
+ deviceIPAddr.FromString(deviceAddrStr, deviceIPAddr);
env->ReleaseStringUTFChars(deviceAddr, deviceAddrStr);
pthread_mutex_lock(&sStackLock);
@@ -374,7 +374,11 @@
{
ChipLogProgress(Controller, "isConnected() called");
ChipDeviceController * deviceController = (ChipDeviceController *) deviceControllerPtr;
- return deviceController->IsConnected() ? JNI_TRUE : JNI_FALSE;
+ if (deviceController->IsConnected())
+ {
+ return JNI_TRUE;
+ }
+ return JNI_FALSE;
}
JNI_METHOD(jboolean, disconnectDevice)(JNIEnv * env, jobject self, jlong deviceControllerPtr)
diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h
index 1f790d4..04f37a3 100644
--- a/src/crypto/CHIPCryptoPAL.h
+++ b/src/crypto/CHIPCryptoPAL.h
@@ -529,7 +529,7 @@
*
* @param fe A pointer to an initialized implementation dependant field element.
*
- * @requirements The implementation must generate a random element from [0, q) where q is the curve order.
+ * @note The implementation must generate a random element from [0, q) where q is the curve order.
*
* @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise
**/
@@ -542,7 +542,7 @@
* @param fe1 A pointer to an initialized implementation dependant field element.
* @param fe2 A pointer to an initialized implementation dependant field element.
*
- * @requirements The result must be a field element (i.e. reduced by the curve order).
+ * @note The result must be a field element (i.e. reduced by the curve order).
*
* @return Returns a CHIP_ERROR on error, CHIP_NO_ERROR otherwise
**/
diff --git a/src/include/platform/CHIPDeviceError.h b/src/include/platform/CHIPDeviceError.h
index 282c617..f614595 100644
--- a/src/include/platform/CHIPDeviceError.h
+++ b/src/include/platform/CHIPDeviceError.h
@@ -24,7 +24,7 @@
#define _CHIP_DEVICE_ERROR(e) (CHIP_DEVICE_ERROR_MIN + (e))
/**
- * @def CHIP_DEVICE_ERROR_CONFIG_VALUE_NOT_FOUND
+ * @def CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND
*
* @brief
* The requested configuration value was not found.
diff --git a/src/include/platform/PlatformManager.h b/src/include/platform/PlatformManager.h
index 3290006..87fc592 100644
--- a/src/include/platform/PlatformManager.h
+++ b/src/include/platform/PlatformManager.h
@@ -31,10 +31,11 @@
namespace Platform {
namespace Layer {
-System::Error PostEvent(System::Layer &, void *, System::Object &, System::EventType, uintptr_t);
-System::Error DispatchEvents(System::Layer &, void *);
-System::Error DispatchEvent(System::Layer &, void *, System::Event);
-System::Error StartTimer(System::Layer &, void *, uint32_t);
+System::Error PostEvent(System::Layer & aLayer, void * aContext, System::Object & aTarget, System::EventType aType,
+ uintptr_t aArgument);
+System::Error DispatchEvents(System::Layer & aLayer, void * aContext);
+System::Error DispatchEvent(System::Layer & aLayer, void * aContext, System::Event aEvent);
+System::Error StartTimer(System::Layer & aLayer, void * aContext, uint32_t aMilliseconds);
} // namespace Layer
} // namespace Platform
diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h b/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h
index 0cf4aa7..a888e2f 100644
--- a/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h
+++ b/src/include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h
@@ -37,7 +37,7 @@
* class, which also appears as the template's ImplClass parameter.
*
* The members of this class are all inlined methods that do nothing, and return static return
- * values. This allows the compiler to optimize away dead code without the use of #ifdef's.
+ * values. This allows the compiler to optimize away dead code without the use of \#ifdef's.
* For example:
*
* ```
diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_NoWiFi.h b/src/include/platform/internal/GenericConnectivityManagerImpl_NoWiFi.h
index 01b62c2..a084bfd 100644
--- a/src/include/platform/internal/GenericConnectivityManagerImpl_NoWiFi.h
+++ b/src/include/platform/internal/GenericConnectivityManagerImpl_NoWiFi.h
@@ -37,7 +37,7 @@
* class, which also appears as the template's ImplClass parameter.
*
* The members of this class are all inlined methods that do nothing, and return static return
- * values. This allows the compiler to optimize away dead code without the use of #ifdef's.
+ * values. This allows the compiler to optimize away dead code without the use of \#ifdef's.
* For example:
*
* ```
diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_WiFi.h b/src/include/platform/internal/GenericConnectivityManagerImpl_WiFi.h
index f380e48..1eaa363 100644
--- a/src/include/platform/internal/GenericConnectivityManagerImpl_WiFi.h
+++ b/src/include/platform/internal/GenericConnectivityManagerImpl_WiFi.h
@@ -40,7 +40,7 @@
* class, which also appears as the template's ImplClass parameter.
*
* The members of this class are all inlined methods that do nothing, and return static return
- * values. This allows the compiler to optimize away dead code without the use of #ifdef's.
+ * values. This allows the compiler to optimize away dead code without the use of \#ifdef's.
* For example:
*
* ```
diff --git a/src/inet/IPEndPointBasis.cpp b/src/inet/IPEndPointBasis.cpp
index ca5bd82..e75a9d8 100644
--- a/src/inet/IPEndPointBasis.cpp
+++ b/src/inet/IPEndPointBasis.cpp
@@ -348,7 +348,7 @@
*
* @param[in] aIPVersion
*
- * @param[in] aLoop
+ * @param[in] aLoopback
*
* @retval INET_NO_ERROR
* success: multicast loopback behavior set
diff --git a/src/inet/IPEndPointBasis.h b/src/inet/IPEndPointBasis.h
index 2ca9931..7dfee4a 100644
--- a/src/inet/IPEndPointBasis.h
+++ b/src/inet/IPEndPointBasis.h
@@ -136,7 +136,7 @@
protected:
void HandleDataReceived(chip::System::PacketBuffer * aBuffer);
- static IPPacketInfo * GetPacketInfo(chip::System::PacketBuffer * buf);
+ static IPPacketInfo * GetPacketInfo(chip::System::PacketBuffer * aBuffer);
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP
#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp
index 09dc127..a7468eb 100644
--- a/src/inet/InetInterface.cpp
+++ b/src/inet/InetInterface.cpp
@@ -664,14 +664,13 @@
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP
}
+#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
+
/**
* @fn short InterfaceIterator::GetFlags(void)
*
* @brief Returns the ifr_flags value for the current interface.
*/
-
-#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
-
short InterfaceIterator::GetFlags(void)
{
struct ifreq intfData;
@@ -694,6 +693,7 @@
#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
+#if CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
/**
* @fn InterfaceAddressIterator::InterfaceAddressIterator(void)
*
@@ -703,8 +703,6 @@
* Starts the iterator at the first network address. On some platforms,
* this constructor may allocate resources recycled by the destructor.
*/
-
-#if CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS
InterfaceAddressIterator::InterfaceAddressIterator(void)
{
mAddrsList = NULL;
diff --git a/src/inet/InetLayer.cpp b/src/inet/InetLayer.cpp
index 9ded89f..8555c4e 100644
--- a/src/inet/InetLayer.cpp
+++ b/src/inet/InetLayer.cpp
@@ -1302,7 +1302,7 @@
* initialized.
*
* @param[in,out] aContext Platform-specific context data passed to
- * the layer initialization method, ::Init.
+ * the layer initialization method, \::Init.
*
* @return #INET_NO_ERROR on success; otherwise, a specific error indicating
* the reason for initialization failure. Returning non-successful
@@ -1326,10 +1326,10 @@
* initialized.
*
* @param[in,out] aContext Platform-specific context data passed to
- * the layer initialization method, ::Init.
+ * the layer initialization method, \::Init.
*
* @param[in] anError The overall status being returned via the
- * InetLayer ::Init method.
+ * InetLayer \::Init method.
*
*/
DLL_EXPORT void DidInit(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError)
@@ -1350,7 +1350,7 @@
* shutdown.
*
* @param[in,out] aContext Platform-specific context data passed to
- * the layer initialization method, ::Init.
+ * the layer initialization method, \::Init.
*
* @return #INET_NO_ERROR on success; otherwise, a specific error indicating
* the reason for shutdown failure. Returning non-successful
@@ -1374,10 +1374,10 @@
* shutdown.
*
* @param[in,out] aContext Platform-specific context data passed to
- * the layer initialization method, ::Init.
+ * the layer initialization method, \::Init.
*
* @param[in] anError The overall status being returned via the
- * InetLayer ::Shutdown method.
+ * InetLayer \::Shutdown method.
*
*/
DLL_EXPORT void DidShutdown(Inet::InetLayer * aLayer, void * aContext, INET_ERROR anError)
diff --git a/src/inet/InetUtils.cpp b/src/inet/InetUtils.cpp
index 9ca04ff..9d0a355 100644
--- a/src/inet/InetUtils.cpp
+++ b/src/inet/InetUtils.cpp
@@ -40,11 +40,11 @@
* following formats:
*
* * <host-name>
- * * <host-name>:<port>
+ * * <host-name>:\<port\>
* * <ip-4-addr>
- * * <ip-4-addr>:<port>
+ * * <ip-4-addr>:\<port\>
* * <ip-6-addr>
- * * [<ip-6-addr>]:<port>
+ * * [<ip-6-addr>]:\<port\>
*
* @param[in] aString The human-reable string to parse.
*
@@ -159,17 +159,17 @@
* formats:
*
* * <host-name>
- * * <host-name>%<interface>
- * * <host-name>:<port>
- * * <host-name>:<port>%<interface>
+ * * <host-name>%\<interface\>
+ * * <host-name>:\<port\>
+ * * <host-name>:\<port\>%\<interface\>
* * <ip-4-addr>
- * * <ip-4-addr>%<interface>
- * * <ip-4-addr>:<port>
- * * <ip-4-addr>:<port>%<interface>
+ * * <ip-4-addr>%\<interface\>
+ * * <ip-4-addr>:\<port\>
+ * * <ip-4-addr>:\<port\>%\<interface\>
* * <ip-6-addr>
- * * <ip-6-addr>%<interface>
- * * [<ip-6-addr>]:<port>
- * * [<ip-6-addr>]:<port>%<interface>
+ * * <ip-6-addr>%\<interface\>
+ * * [<ip-6-addr>]:\<port\>
+ * * [<ip-6-addr>]:\<port\>%\<interface\>
*
* @param[in] aString The human-reable string to parse.
*
diff --git a/src/inet/RawEndPoint.cpp b/src/inet/RawEndPoint.cpp
index 05217cd..dbd3618 100644
--- a/src/inet/RawEndPoint.cpp
+++ b/src/inet/RawEndPoint.cpp
@@ -240,20 +240,9 @@
* interface index. Also sets various IPv6 socket options appropriate for
* transmitting packets to and from on-link destinations.
*
- * @param[in] intf An InterfaceId to identify the scope of the address.
- *
+ * @param[in] intfId An InterfaceId to identify the scope of the address.
* @param[in] addr An IPv6 link-local scope IPAddress object.
*
- * @return INET_NO_ERROR on success, or a mapped OS error on failure. An invalid
- * parameter list can result in INET_ERROR_WRONG_ADDRESS_TYPE. If the raw endpoint
- * is already bound or is listening, then returns INET_ERROR_INCORRECT_STATE.
- */
-/**
- * @brief Bind the endpoint to an interface IPv6 link-local address.
- *
- * @param[in] intf the indicator of the network interface
- * @param[in] addr the IP address (must be an interface address)
- *
* @retval INET_NO_ERROR success: endpoint bound to address
* @retval INET_ERROR_INCORRECT_STATE endpoint has been bound previously
* @retval INET_NO_MEMORY insufficient memory for endpoint
@@ -262,24 +251,24 @@
* \c addrType does not match \c IPVer.
*
* @retval INET_ERROR_WRONG_ADDRESS_TYPE
- * \c addr is not an IPv6 link-local address or \c intf is
+ * \c addr is not an IPv6 link-local address or \c intfId is
* \c INET_NULL_INTERFACEID.
*
* @retval other another system or platform error
*
* @details
* Binds the endpoint to the IPv6 link-local address \c addr on the
- * network interface indicated by \c intf.
+ * network interface indicated by \c intfId.
*
* On LwIP, this method must not be called with the LwIP stack lock
* already acquired.
*/
-INET_ERROR RawEndPoint::BindIPv6LinkLocal(InterfaceId intf, IPAddress addr)
+INET_ERROR RawEndPoint::BindIPv6LinkLocal(InterfaceId intfId, IPAddress addr)
{
INET_ERROR res = INET_NO_ERROR;
#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
- const int lIfIndex = static_cast<int>(intf);
+ const int lIfIndex = static_cast<int>(intfId);
#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
if (mState != kState_Ready && mState != kState_Bound)
@@ -800,7 +789,7 @@
*
* @param[in] addrType the protocol version of the IP address.
*
- * @param[in] intf indicator of the network interface.
+ * @param[in] intfId indicator of the network interface.
*
* @retval INET_NO_ERROR success: endpoint bound to address
* @retval INET_NO_MEMORY insufficient memory for endpoint
diff --git a/src/inet/RawEndPoint.h b/src/inet/RawEndPoint.h
index a1457e2..c053ce8 100644
--- a/src/inet/RawEndPoint.h
+++ b/src/inet/RawEndPoint.h
@@ -72,8 +72,8 @@
IPProtocol IPProto; // This data member is read-only
INET_ERROR Bind(IPAddressType addrType, IPAddress addr, InterfaceId intfId = INET_NULL_INTERFACEID);
- INET_ERROR BindIPv6LinkLocal(InterfaceId intf, IPAddress addr);
- INET_ERROR BindInterface(IPAddressType addrType, InterfaceId intf);
+ INET_ERROR BindIPv6LinkLocal(InterfaceId intfId, IPAddress addr);
+ INET_ERROR BindInterface(IPAddressType addrType, InterfaceId intfId);
InterfaceId GetBoundInterface(void);
INET_ERROR Listen(void);
INET_ERROR SendTo(IPAddress addr, chip::System::PacketBuffer * msg, uint16_t sendFlags = 0);
diff --git a/src/inet/TCPEndPoint.cpp b/src/inet/TCPEndPoint.cpp
index b43b6ad..6ccf122 100644
--- a/src/inet/TCPEndPoint.cpp
+++ b/src/inet/TCPEndPoint.cpp
@@ -295,7 +295,7 @@
return res;
}
-INET_ERROR TCPEndPoint::Connect(IPAddress addr, uint16_t port, InterfaceId intf)
+INET_ERROR TCPEndPoint::Connect(IPAddress addr, uint16_t port, InterfaceId intfId)
{
INET_ERROR res = INET_NO_ERROR;
@@ -314,7 +314,7 @@
// As a work-around, if the destination is an IPv6 link-local address, we bind the PCB
// to the link local address associated with the source interface; however this is only
// viable if the endpoint hasn't already been bound.
- if (intf != INET_NULL_INTERFACEID)
+ if (intfId != INET_NULL_INTERFACEID)
{
IPAddress intfLLAddr;
InetLayer & lInetLayer = Layer();
@@ -322,7 +322,7 @@
if (!addr.IsIPv6LinkLocal() || State == kState_Bound)
return INET_ERROR_NOT_IMPLEMENTED;
- res = lInetLayer.GetLinkLocalAddr(intf, &intfLLAddr);
+ res = lInetLayer.GetLinkLocalAddr(intfId, &intfLLAddr);
if (res != INET_NO_ERROR)
return res;
@@ -385,7 +385,7 @@
if (res != INET_NO_ERROR)
return res;
- if (intf == INET_NULL_INTERFACEID)
+ if (intfId == INET_NULL_INTERFACEID)
{
// The behavior when connecting to an IPv6 link-local address without specifying an outbound
// interface is ambiguous. So prevent it in all cases.
@@ -405,7 +405,7 @@
struct ::ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
- res = GetInterfaceName(intf, ifr.ifr_name, sizeof(ifr.ifr_name));
+ res = GetInterfaceName(intfId, ifr.ifr_name, sizeof(ifr.ifr_name));
if (res != INET_NO_ERROR)
return res;
@@ -425,7 +425,7 @@
// Attempting to initiate a connection via a specific interface is not allowed.
// The only way to do this is to bind the local to an address on the desired
// interface.
- res = BindSrcAddrFromIntf(addrType, intf);
+ res = BindSrcAddrFromIntf(addrType, intfId);
if (res != INET_NO_ERROR)
return res;
}
@@ -461,7 +461,7 @@
sa.in6.sin6_port = htons(port);
sa.in6.sin6_flowinfo = 0;
sa.in6.sin6_addr = addr.ToIPv6();
- sa.in6.sin6_scope_id = intf;
+ sa.in6.sin6_scope_id = intfId;
sockaddrsize = sizeof(sockaddr_in6);
sockaddrptr = (const sockaddr *) &sa.in6;
}
@@ -802,28 +802,6 @@
return res;
}
-/**
- * TCPEndPoint::EnableKeepAlive
- *
- * @brief
- * Enable TCP keepalive probes on the associated TCP connection.
- *
- * @param interval
- * The interval (in seconds) between keepalive probes. This value also controls
- * the time between last data packet sent and the transmission of the first keepalive
- * probe.
- *
- * @param timeoutCount
- * The maximum number of unacknowledged probes before the connection will be deemed
- * to have failed.
- *
- * @note
- * This method can only be called when the endpoint is in one of the connected states.
- *
- * This method can be called multiple times to adjust the keepalive interval or timeout
- * count.
- */
-
INET_ERROR TCPEndPoint::EnableKeepAlive(uint16_t interval, uint16_t timeoutCount)
{
INET_ERROR res = INET_NO_ERROR;
@@ -2165,7 +2143,7 @@
#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
-INET_ERROR TCPEndPoint::BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intf)
+INET_ERROR TCPEndPoint::BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId)
{
INET_ERROR err = INET_NO_ERROR;
@@ -2185,7 +2163,7 @@
curAddr = addrIter.GetAddress();
curIntfId = addrIter.GetInterface();
- if (curIntfId == intf)
+ if (curIntfId == intfId)
{
// Search for an IPv4 address on the TargetInterface
diff --git a/src/inet/TCPEndPoint.h b/src/inet/TCPEndPoint.h
index fc2264f..e03327a 100644
--- a/src/inet/TCPEndPoint.h
+++ b/src/inet/TCPEndPoint.h
@@ -136,7 +136,7 @@
*
* @param[in] addr the destination IP address
* @param[in] port the destination TCP port
- * @param[in] intf an optional network interface indicator
+ * @param[in] intfId an optional network interface indicator
*
* @retval INET_NO_ERROR success: \c msg is queued for transmit.
* @retval INET_ERROR_NOT_IMPLEMENTED system implementation not complete.
@@ -144,16 +144,16 @@
* @retval INET_ERROR_WRONG_ADDRESS_TYPE
* the destination address and the bound interface address do not
* have matching protocol versions or address type, or the destination
- * address is an IPv6 link-local address and \c intf is not specified.
+ * address is an IPv6 link-local address and \c intfId is not specified.
*
* @retval other another system or platform error
*
* @details
* If possible, then this method initiates a TCP connection to the
- * destination \c addr (with \c intf used as the scope
+ * destination \c addr (with \c intfId used as the scope
* identifier for IPv6 link-local destinations) and \c port.
*/
- INET_ERROR Connect(IPAddress addr, uint16_t port, InterfaceId intf = INET_NULL_INTERFACEID);
+ INET_ERROR Connect(IPAddress addr, uint16_t port, InterfaceId intfId = INET_NULL_INTERFACEID);
/**
* @brief Extract IP address and TCP port of remote endpoint.
@@ -224,10 +224,17 @@
INET_ERROR EnableNoDelay(void);
/**
- * @brief Enable the TCP "keep-alive" option.
+ * @brief
+ * Enable TCP keepalive probes on the associated TCP connection.
*
- * @param[in] interval time in seconds between probe requests.
- * @param[in] timeoutCount number of probes to send before timeout.
+ * @param[in] interval
+ * The interval (in seconds) between keepalive probes. This value also controls
+ * the time between last data packet sent and the transmission of the first keepalive
+ * probe.
+ *
+ * @param[in] timeoutCount
+ * The maximum number of unacknowledged probes before the connection will be deemed
+ * to have failed.
*
* @retval INET_NO_ERROR success: address and port extracted.
* @retval INET_ERROR_INCORRECT_STATE TCP connection not established.
@@ -236,6 +243,12 @@
*
* @retval other another system or platform error
*
+ * @note
+ * This method can only be called when the endpoint is in one of the connected states.
+ *
+ * This method can be called multiple times to adjust the keepalive interval or timeout
+ * count.
+ *
* @details
* Start automatically transmitting TCP "keep-alive" probe segments every
* \c interval seconds. The connection will abort automatically after
@@ -645,7 +658,7 @@
void HandlePendingIO(void);
void ReceiveData(void);
void HandleIncomingConnection(void);
- INET_ERROR BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intf);
+ INET_ERROR BindSrcAddrFromIntf(IPAddressType addrType, InterfaceId intfId);
#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
};
diff --git a/src/inet/UDPEndPoint.cpp b/src/inet/UDPEndPoint.cpp
index 1688240..dc9f324 100644
--- a/src/inet/UDPEndPoint.cpp
+++ b/src/inet/UDPEndPoint.cpp
@@ -718,7 +718,7 @@
*
* @param[in] addrType the protocol version of the IP address.
*
- * @param[in] intf indicator of the network interface.
+ * @param[in] intfId indicator of the network interface.
*
* @retval INET_NO_ERROR success: endpoint bound to address
* @retval INET_NO_MEMORY insufficient memory for endpoint
diff --git a/src/inet/UDPEndPoint.h b/src/inet/UDPEndPoint.h
index 301c5b7..66d3edc 100644
--- a/src/inet/UDPEndPoint.h
+++ b/src/inet/UDPEndPoint.h
@@ -54,7 +54,7 @@
public:
INET_ERROR Bind(IPAddressType addrType, IPAddress addr, uint16_t port, InterfaceId intfId = INET_NULL_INTERFACEID);
- INET_ERROR BindInterface(IPAddressType addrType, InterfaceId intf);
+ INET_ERROR BindInterface(IPAddressType addrType, InterfaceId intfId);
InterfaceId GetBoundInterface(void);
uint16_t GetBoundPort(void);
INET_ERROR Listen(void);
diff --git a/src/lib/core/CHIPTLVWriter.cpp b/src/lib/core/CHIPTLVWriter.cpp
index 2c9fa82..99bc9f9 100644
--- a/src/lib/core/CHIPTLVWriter.cpp
+++ b/src/lib/core/CHIPTLVWriter.cpp
@@ -36,6 +36,11 @@
#include <stdarg.h>
#include <stdint.h>
+// Doxygen is confused by the __attribute__ annotation
+#ifndef DOXYGEN
+#define NO_INLINE __attribute__((noinline))
+#endif // DOXYGEN
+
namespace chip {
namespace TLV {
@@ -162,7 +167,7 @@
* @param[in] maxLen The maximum number of bytes that should be written to the output buffer.
*
*/
-__attribute__((noinline)) void TLVWriter::Init(uint8_t * buf, uint32_t maxLen)
+NO_INLINE void TLVWriter::Init(uint8_t * buf, uint32_t maxLen)
{
mBufHandle = 0;
mBufStart = mWritePoint = buf;
diff --git a/src/lib/message/support/crypto/AESBlockCipher.h b/src/lib/message/support/crypto/AESBlockCipher.h
index 5c6452e..97e3028 100644
--- a/src/lib/message/support/crypto/AESBlockCipher.h
+++ b/src/lib/message/support/crypto/AESBlockCipher.h
@@ -27,10 +27,10 @@
* functions should assert #CHIP_CONFIG_AES_IMPLEMENTATION_PLATFORM
* and create a platform-specific header file containing the necessary
* declarations. The name of the platform-specific header file must be
- * specified via the #CHIP_AES_BLOCK_CIPHER_PLATFORM_INCLUDE macro.
+ * specified via the CHIP_AES_BLOCK_CIPHER_PLATFORM_INCLUDE macro.
*
* Platforms that that require specific AES context data should define
- * the #CHIP_AES_128_CTX_PLATFORM and #CHIP_AES_256_CTX_PLATFORM macros
+ * the CHIP_AES_128_CTX_PLATFORM and CHIP_AES_256_CTX_PLATFORM macros
* accordingly.
*
*/
diff --git a/src/lib/message/support/crypto/HashAlgos.h b/src/lib/message/support/crypto/HashAlgos.h
index fc285db..77f78be 100644
--- a/src/lib/message/support/crypto/HashAlgos.h
+++ b/src/lib/message/support/crypto/HashAlgos.h
@@ -31,7 +31,7 @@
*
* The default name for the platform-specific hash implementation header
* file is "ChipProjectHashAlgos.h". This can be overridden by defining
- * #CHIP_HASH_ALGOS_PLATFORM_INCLUDE.
+ * CHIP_HASH_ALGOS_PLATFORM_INCLUDE.
*
* The platform-specific header file should include declarations of the
* SHA_CTX_PLATFORM and SHA256_CTX_PLATFORM context structures.
diff --git a/src/lib/shell/shell.h b/src/lib/shell/shell.h
index 4f5cdb4..3c1afa8 100644
--- a/src/lib/shell/shell.h
+++ b/src/lib/shell/shell.h
@@ -121,7 +121,6 @@
*
* @param on_command An iterator callback to be called for each command.
* @param arg A context variable to be passed to each command iterated.
- * @param streamer The streamer to write shell output to.
*/
void ForEachCommand(shell_command_iterator_t * on_command, void * arg);
diff --git a/src/platform/EFR32/efr32-chip-mbedtls-config.h b/src/platform/EFR32/efr32-chip-mbedtls-config.h
index 6b9d7b4..3237a64 100644
--- a/src/platform/EFR32/efr32-chip-mbedtls-config.h
+++ b/src/platform/EFR32/efr32-chip-mbedtls-config.h
@@ -102,6 +102,7 @@
*/
#define MBEDTLS_ENTROPY_HARDWARE_ALT
+#if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
/**
* \def MBEDTLS_ECP_INTERNAL_ALT
* \def ECP_SHORTWEIERSTRASS
@@ -118,7 +119,6 @@
* Requires: MBEDTLS_BIGNUM_C, MBEDTLS_ECP_C and at least one
* MBEDTLS_ECP_DP_XXX_ENABLED and (CRYPTO_COUNT > 0)
*/
-#if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
#define MBEDTLS_ECP_INTERNAL_ALT
#define ECP_SHORTWEIERSTRASS
#define MBEDTLS_ECP_ADD_MIXED_ALT
@@ -128,6 +128,7 @@
#define MBEDTLS_ECP_RANDOMIZE_JAC_ALT
#endif
+#if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
/**
* \def MBEDTLS_SHA1_ALT
*
@@ -143,10 +144,10 @@
* Requires: MBEDTLS_SHA1_C and (CRYPTO_COUNT > 0)
* See MBEDTLS_SHA1_C for more information.
*/
-#if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
#define MBEDTLS_SHA1_ALT
#endif
+#if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
/**
* \def MBEDTLS_SHA256_ALT
*
@@ -163,7 +164,6 @@
* Requires: MBEDTLS_SHA256_C and (CRYPTO_COUNT > 0)
* See MBEDTLS_SHA256_C for more information.
*/
-#if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0)
#define MBEDTLS_SHA256_ALT
#endif
diff --git a/src/platform/ESP32/ConnectivityManagerImpl.cpp b/src/platform/ESP32/ConnectivityManagerImpl.cpp
index fd7ca8d..36e599f 100644
--- a/src/platform/ESP32/ConnectivityManagerImpl.cpp
+++ b/src/platform/ESP32/ConnectivityManagerImpl.cpp
@@ -706,7 +706,7 @@
}
}
-void ConnectivityManagerImpl::DriveStationState(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError)
+void ConnectivityManagerImpl::DriveStationState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError)
{
sInstance.DriveStationState();
}
@@ -887,7 +887,7 @@
}
}
-void ConnectivityManagerImpl::DriveAPState(chip::System::Layer * aLayer, void * aAppState, chip::System::Error aError)
+void ConnectivityManagerImpl::DriveAPState(::chip::System::Layer * aLayer, void * aAppState, ::chip::System::Error aError)
{
sInstance.DriveAPState();
}
diff --git a/src/system/SystemConfig.h b/src/system/SystemConfig.h
index 6f887a7..b8cc827 100644
--- a/src/system/SystemConfig.h
+++ b/src/system/SystemConfig.h
@@ -627,6 +627,8 @@
#endif
#endif // CHIP_SYSTEM_CONFIG_USE_POSIX_PIPE
+#ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS
+#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__
/**
* @def CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS
*
@@ -638,12 +640,12 @@
*
* Defaults to enabled on Zephyr platforms using sockets
*/
-#ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS
-#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__
#define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS 1
#endif
#endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_SOCKET_EXTENSIONS
+#ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
+#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__
/**
* @def CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
*
@@ -652,8 +654,6 @@
*
* Defaults to enabled on Zephyr platforms using sockets
*/
-#ifndef CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
-#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && __ZEPHYR__
#define CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF 1
#endif
#endif // CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF
diff --git a/src/system/SystemError.cpp b/src/system/SystemError.cpp
index f351e99..a68fc81 100644
--- a/src/system/SystemError.cpp
+++ b/src/system/SystemError.cpp
@@ -171,7 +171,7 @@
* underlying POSIX network and OS stack errors into a platform- or system-specific range. Error codes beyond those currently
* defined by POSIX or the ISO C/C++ standards are mapped similar to the standard ones.
*
- * @param[in] e The POSIX network or OS error to map.
+ * @param[in] aError The POSIX network or OS error to map.
*
* @return The mapped POSIX network or OS error.
*/
@@ -184,7 +184,7 @@
* This implements a function to return an NULL-terminated OS-specific descriptive C string, associated with the specified, mapped
* OS error.
*
- * @param[in] err The mapped OS-specific error to describe.
+ * @param[in] aError The mapped OS-specific error to describe.
*
* @return A NULL-terminated, OS-specific descriptive C string describing the error.
*/
@@ -198,7 +198,7 @@
* This implements an introspection function for CHIP System Layer errors that allows the caller to determine whether the
* specified error is an internal, underlying OS error.
*
- * @param[in] err The mapped error to determine whether it is an OS error.
+ * @param[in] aError The mapped error to determine whether it is an OS error.
*
* @return True if the specified error is an OS error; otherwise, false.
*/
@@ -272,7 +272,7 @@
* This implements a mapping function for CHIP System Layer errors that allows mapping underlying LwIP network stack errors into a
* platform- or system-specific range.
*
- * @param[in] e The LwIP error to map.
+ * @param[in] aError The LwIP error to map.
*
* @return The mapped LwIP network or OS error.
*
@@ -286,7 +286,7 @@
* This implements a function to return an NULL-terminated LwIP-specific descriptive C string, associated with the specified,
* mapped LwIP error.
*
- * @param[in] err The mapped LwIP-specific error to describe.
+ * @param[in] aError The mapped LwIP-specific error to describe.
*
* @return A NULL-terminated, LwIP-specific descriptive C string describing the error.
*
@@ -308,7 +308,7 @@
* allows the caller to determine whether the specified error is an
* internal, underlying LwIP error.
*
- * @param[in] err The mapped error to determine whether it is a LwIP error.
+ * @param[in] aError The mapped error to determine whether it is a LwIP error.
*
* @return True if the specified error is a LwIP error; otherwise, false.
*
diff --git a/src/system/SystemError.h b/src/system/SystemError.h
index 7272cc4..d66ab81 100644
--- a/src/system/SystemError.h
+++ b/src/system/SystemError.h
@@ -70,8 +70,6 @@
#define CHIP_SYSTEM_ERROR_MAX CHIP_SYSTEM_CONFIG_ERROR_MAX
#endif // CHIP_SYSTEM_CONFIG_ERROR_MAX
-#ifdef _CHIP_SYSTEM_CONFIG_ERROR
-
/**
* @def _CHIP_SYSTEM_ERROR(e)
*
@@ -160,8 +158,6 @@
// If you add new CHIP System Layer errors, please update the translation of error
// codes to strings in SystemError.cpp, and add them to unittest in test-apps/TestErrorStr.cpp
-#endif // _CHIP_SYSTEM_CONFIG_ERROR
-
/**
* @}
*/
diff --git a/src/system/SystemEvent.h b/src/system/SystemEvent.h
index be3b93f..8deacce 100644
--- a/src/system/SystemEvent.h
+++ b/src/system/SystemEvent.h
@@ -74,9 +74,9 @@
*
* @return true if it falls within the enumerated range; otherwise, false.
*/
-static inline bool IsEventOfType(EventType aType)
+static inline bool IsEventOfType(EventType aEventType)
{
- return (aType >= kEvent_ReleaseObj && aType <= kEvent_ScheduleWork);
+ return (aEventType >= kEvent_ReleaseObj && aEventType <= kEvent_ScheduleWork);
}
#else
diff --git a/src/system/SystemLayer.cpp b/src/system/SystemLayer.cpp
index 3bff362..be8cdc8 100644
--- a/src/system/SystemLayer.cpp
+++ b/src/system/SystemLayer.cpp
@@ -244,9 +244,9 @@
* @return Other Value indicating timer failed to start.
*
*/
-void Layer::StartTimer(uint32_t aMilliseconds, chip::Callback::Callback<> * cb)
+void Layer::StartTimer(uint32_t aMilliseconds, chip::Callback::Callback<> * aCallback)
{
- Cancelable * ca = cb->Cancel();
+ Cancelable * ca = aCallback->Cancel();
ca->mInfoScalar = Timer::GetCurrentEpoch() + aMilliseconds;
@@ -507,7 +507,7 @@
*
* This function is guaranteed to be thread-safe on any platform that employs threading.
*
- * @param[out] curTime The current time, expressed as Unix time scaled to milliseconds.
+ * @param[out] curTimeMS The current time, expressed as Unix time scaled to milliseconds.
*
* @retval #CHIP_SYSTEM_NO_ERROR If the method succeeded.
* @retval #CHIP_SYSTEM_ERROR_REAL_TIME_NOT_SYNCED
@@ -986,7 +986,7 @@
*
* @param[in,out] aLayer A reference to the CHIP System Layer instance being initialized.
*
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Init.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Init.
*
* @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
* Returning non-successful status will abort initialization.
@@ -1005,7 +1005,7 @@
*
* @param[in,out] aLayer A pointer to the CHIP System Layer instance being shutdown.
*
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Shutdown.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Shutdown.
*
* @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for shutdown failure. Returning
* non-successful status will abort shutdown.
@@ -1024,9 +1024,9 @@
*
* @param[in,out] aLayer A reference to the CHIP System Layer instance being initialized.
*
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Init.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Init.
*
- * @param[in] anError The overall status being returned via the CHIP System Layer ::Init method.
+ * @param[in] aStatus The overall status being returned via the CHIP System Layer \::Init method.
*/
DLL_EXPORT void DidInit(Layer & aLayer, void * aContext, Error aStatus)
{
@@ -1041,9 +1041,9 @@
*
* @param[in,out] aLayer A reference to the CHIP System Layer instance being shutdown.
*
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Shutdown.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Shutdown.
*
- * @param[in] anError The overall status being returned via the CHIP System Layer ::Shutdown method.
+ * @param[in] aStatus The overall status being returned via the CHIP System Layer \::Shutdown method.
*
* @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for shutdown failure. Returning
* non-successful status will abort shutdown.
@@ -1074,13 +1074,13 @@
*
* @param[in,out] aLayer A pointer to the layer instance to which the event / message is being posted.
*
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Init.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Init.
*
* @param[in,out] aTarget A pointer to the CHIP System Layer object making the post request.
*
* @param[in] aType The type of event to post.
*
- * @param[in,out] anArg The argument associated with the event to post.
+ * @param[in,out] aArgument The argument associated with the event to post.
*
* @return #CHIP_SYSTEM_NO_ERROR on success; otherwise, a specific error indicating the reason for initialization failure.
*/
@@ -1120,9 +1120,9 @@
*
* @param[in,out] aLayer A reference to the layer instance for which events / messages are being dispatched.
*
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Init.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Init.
*
- * @retval #CHIP_SYSTEM_ERROR_BAD_ARGS If #aLayer or #aContext is NULL.
+ * @retval #CHIP_SYSTEM_ERROR_BAD_ARGS If aLayer or aContext is NULL.
* @retval #CHIP_SYSTEM_ERROR_UNEXPECTED_STATE If the state of the CHIP System Layer object is unexpected.
* @retval #CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT If an event type is unrecognized.
* @retval #CHIP_SYSTEM_NO_ERROR On success.
@@ -1168,10 +1168,10 @@
* This is an implementation for LwIP.
*
* @param[in,out] aLayer A reference to the layer instance for which events / messages are being dispatched.
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Init.
- * @param[in] anEvent The platform-specific event object to dispatch for handling.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Init.
+ * @param[in] aEvent The platform-specific event object to dispatch for handling.
*
- * @retval #CHIP_SYSTEM_ERROR_BAD_ARGS If #aLayer or the event target is NULL.
+ * @retval #CHIP_SYSTEM_ERROR_BAD_ARGS If aLayer or the event target is NULL.
* @retval #CHIP_SYSTEM_ERROR_UNEXPECTED_EVENT If the event type is unrecognized.
* @retval #CHIP_SYSTEM_ERROR_UNEXPECTED_STATE If the state of the CHIP System Layer object is unexpected.
* @retval #CHIP_SYSTEM_NO_ERROR On success.
@@ -1202,7 +1202,7 @@
* This is an implementation for LwIP.
*
* @param[in,out] aLayer A reference to the layer instance for which events / messages are being dispatched.
- * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, ::Init.
+ * @param[in,out] aContext Platform-specific context data passed to the layer initialization method, \::Init.
* @param[in] aMilliseconds The number of milliseconds to set for the timer.
*
* @retval #CHIP_SYSTEM_NO_ERROR Always succeeds unless overridden.
diff --git a/src/system/SystemLayer.h b/src/system/SystemLayer.h
index 407f0de..a5e2687 100644
--- a/src/system/SystemLayer.h
+++ b/src/system/SystemLayer.h
@@ -139,7 +139,7 @@
Error NewTimer(Timer *& aTimerPtr);
- void StartTimer(uint32_t aMilliseconds, chip::Callback::Callback<> * cb);
+ void StartTimer(uint32_t aMilliseconds, chip::Callback::Callback<> * aCallback);
void DispatchTimerCallbacks(const uint64_t kCurrentEpoch);
typedef void (*TimerCompleteFunct)(Layer * aLayer, void * aAppState, Error aError);
diff --git a/src/system/SystemPacketBuffer.cpp b/src/system/SystemPacketBuffer.cpp
index bc62c96..c63317e 100644
--- a/src/system/SystemPacketBuffer.cpp
+++ b/src/system/SystemPacketBuffer.cpp
@@ -317,7 +317,7 @@
* Advance the data start position in the current buffer by the specified amount, in bytes, up to the length of data in the
* buffer. Decrease the length and total length by the amount consumed.
*
- * @param[in] aConsumeLen - number of bytes to consume from the current buffer.
+ * @param[in] aConsumeLength - number of bytes to consume from the current buffer.
*/
void PacketBuffer::ConsumeHead(uint16_t aConsumeLength)
{
diff --git a/src/transport/BLE.h b/src/transport/BLE.h
index 2a438d8..3a63ec3 100644
--- a/src/transport/BLE.h
+++ b/src/transport/BLE.h
@@ -27,8 +27,6 @@
#include <ble/BleConfig.h>
-#if CONFIG_NETWORK_LAYER_BLE
-
#include <utility>
#include <ble/BleError.h>
@@ -114,6 +112,4 @@
} // namespace Transport
} // namespace chip
-#endif // CONFIG_NETWORK_LAYER_BLE
-
#endif // __TRANSPORT_BLE_H__
diff --git a/src/transport/BUILD.gn b/src/transport/BUILD.gn
index b1c436e..c56997e 100644
--- a/src/transport/BUILD.gn
+++ b/src/transport/BUILD.gn
@@ -13,13 +13,12 @@
# limitations under the License.
import("//build_overrides/chip.gni")
+import("${chip_root}/src/ble/ble.gni")
static_library("transport") {
output_name = "libTransportLayer"
sources = [
- "BLE.cpp",
- "BLE.h",
"Base.h",
"MessageHeader.cpp",
"MessageHeader.h",
@@ -43,6 +42,13 @@
"UDP.h",
]
+ if (chip_config_network_layer_ble) {
+ sources += [
+ "BLE.cpp",
+ "BLE.h",
+ ]
+ }
+
public_deps = [
"${chip_root}/src/crypto",
"${chip_root}/src/inet",
diff --git a/src/transport/Base.h b/src/transport/Base.h
index 09e20e5..6dd2e3a 100644
--- a/src/transport/Base.h
+++ b/src/transport/Base.h
@@ -16,8 +16,9 @@
*/
/**
- * @file Defines base properties and constants valid across all transport
- * classes (UDP, TCP, BLE, ....)
+ * @file
+ * Defines base properties and constants valid across all transport
+ * classes (UDP, TCP, BLE, ....)
*/
#ifndef TRANSPORT_BASE_H_
diff --git a/src/transport/MessageHeader.cpp b/src/transport/MessageHeader.cpp
index 47ea75a..6f68192 100644
--- a/src/transport/MessageHeader.cpp
+++ b/src/transport/MessageHeader.cpp
@@ -16,7 +16,8 @@
*/
/**
- * @file This file contains the implementation the chip::MessageHeader class.
+ * @file
+ * This file contains the implementation the chip::MessageHeader class.
*/
#include "MessageHeader.h"
diff --git a/src/transport/MessageHeader.h b/src/transport/MessageHeader.h
index 5d4b9d6..c829fff 100644
--- a/src/transport/MessageHeader.h
+++ b/src/transport/MessageHeader.h
@@ -16,7 +16,8 @@
*/
/**
- * @file This file defines the chip::MessageHeader class.
+ * @file
+ * This file defines the chip::MessageHeader class.
*/
#ifndef MESSAGEHEADER_H_
diff --git a/src/transport/RendezvousSession.cpp b/src/transport/RendezvousSession.cpp
index d0d2787..04dd574 100644
--- a/src/transport/RendezvousSession.cpp
+++ b/src/transport/RendezvousSession.cpp
@@ -17,9 +17,12 @@
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
-#include <transport/BLE.h>
#include <transport/RendezvousSession.h>
+#if CONFIG_NETWORK_LAYER_BLE
+#include <transport/BLE.h>
+#endif // CONFIG_NETWORK_LAYER_BLE
+
static const size_t kMax_SecureSDU_Length = 1024;
static constexpr uint32_t kSpake2p_Iteration_Count = 50000;
static const char * kSpake2pKeyExchangeSalt = "SPAKE2P Key Exchange Salt";
diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h
index 70b6ca5..0c9aba6 100644
--- a/src/transport/SecureSession.h
+++ b/src/transport/SecureSession.h
@@ -50,6 +50,8 @@
* @param remote_public_key A pointer to peer's public key
* @param salt A pointer to the initial salt used for deriving the keys
* @param salt_length Length of the initial salt
+ * @param info A pointer to the initial info
+ * @param info_length Length of the initial info
* @return CHIP_ERROR The result of key derivation
*/
CHIP_ERROR Init(const Crypto::P256Keypair & local_keypair, const Crypto::P256PublicKey & remote_public_key,
@@ -64,6 +66,8 @@
* @param secret_length Length of the shared secret
* @param salt A pointer to the initial salt used for deriving the keys
* @param salt_length Length of the initial salt
+ * @param info A pointer to the initial info
+ * @param info_length Length of the initial info
* @return CHIP_ERROR The result of key derivation
*/
CHIP_ERROR InitFromSecret(const uint8_t * secret, const size_t secret_length, const uint8_t * salt, const size_t salt_length,
diff --git a/src/transport/SecureSessionMgr.h b/src/transport/SecureSessionMgr.h
index 0a7c31b..bdfcf47 100644
--- a/src/transport/SecureSessionMgr.h
+++ b/src/transport/SecureSessionMgr.h
@@ -62,8 +62,9 @@
* msgBuf after processing it.
*
* @param header messageheader
- * @param state connection state
- * @param msgBuf received message
+ * @param state connection state
+ * @param msgBuf received message
+ * @param mgr A pointer to the SecureSessionMgr
*/
virtual void OnMessageReceived(const MessageHeader & header, Transport::PeerConnectionState * state,
System::PacketBuffer * msgBuf, SecureSessionMgrBase * mgr)
@@ -73,8 +74,9 @@
* @brief
* Called when received message processing resulted in error
*
- * @param error error code
- * @param source network entity that sent the message
+ * @param error error code
+ * @param source network entity that sent the message
+ * @param mgr A pointer to the SecureSessionMgr
*/
virtual void OnReceiveError(CHIP_ERROR error, const Transport::PeerAddress & source, SecureSessionMgrBase * mgr) {}
@@ -82,7 +84,8 @@
* @brief
* Called when a new connection is being established
*
- * @param state connection state
+ * @param state connection state
+ * @param mgr A pointer to the SecureSessionMgr
*/
virtual void OnNewConnection(Transport::PeerConnectionState * state, SecureSessionMgrBase * mgr) {}
diff --git a/src/transport/Tuple.h b/src/transport/Tuple.h
index 2b609f7..eda21ec 100644
--- a/src/transport/Tuple.h
+++ b/src/transport/Tuple.h
@@ -56,7 +56,7 @@
* ~~~~~~~~~
*
* The intent of this is to allow applications to use any transport types without CHIP pre-defining
- * popular mappings (like UDP only, UDP and BLE, BLE only etc.) and without using #ifdefs to create
+ * popular mappings (like UDP only, UDP and BLE, BLE only etc.) and without using \#ifdefs to create
* a single 'standard transport'.
*
* Transport logic: