[style] harmonize feature check and header includes (#6399)

This commit harmonizes how the feature config checks are done within
OT core modules. In header `.hpp` files, any related `#if` config
check is done immediately after the `"openthread-core-config.h"` is
included. This way the rest of definitions are skipped over if the
feature is not being used. In `cpp` source files the `#if` check is
done immediately after including the related header file.
This commit is contained in:
Abtin Keshavarzian
2021-04-05 14:13:24 -07:00
committed by GitHub
parent 29f6f275b8
commit 743e91361c
111 changed files with 299 additions and 176 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (93)
#define OPENTHREAD_API_VERSION (94)
/**
* @addtogroup api-instance
+2
View File
@@ -35,6 +35,8 @@
#ifndef OPENTHREAD_PLATFORM_UDP_H_
#define OPENTHREAD_PLATFORM_UDP_H_
#include <openthread/udp.h>
#ifdef __cplusplus
extern "C" {
#endif
+1
View File
@@ -34,6 +34,7 @@
#include "openthread-core-config.h"
#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2)
#include <openthread/backbone_router.h>
#include "common/instance.hpp"
+2 -1
View File
@@ -34,9 +34,10 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
#include <openthread/backbone_router_ftd.h>
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
#include "common/instance.hpp"
using namespace ot;
+2 -2
View File
@@ -33,13 +33,13 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
#include <openthread/border_agent.h>
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
using namespace ot;
otBorderAgentState otBorderAgentGetState(otInstance *aInstance)
+3 -2
View File
@@ -32,6 +32,9 @@
*/
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE && OPENTHREAD_FTD
#include <openthread/channel_manager.h>
#include "common/instance.hpp"
@@ -40,8 +43,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE && OPENTHREAD_FTD
void otChannelManagerRequestChannelChange(otInstance *aInstance, uint8_t aChannel)
{
Instance &instance = *static_cast<Instance *>(aInstance);
+3 -2
View File
@@ -32,6 +32,9 @@
*/
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
#include <openthread/channel_monitor.h>
#include "common/instance.hpp"
@@ -39,8 +42,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled)
{
Utils::ChannelMonitor &monitor = static_cast<Instance *>(aInstance)->Get<Utils::ChannelMonitor>();
+3 -2
View File
@@ -32,6 +32,9 @@
*/
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
#include <openthread/child_supervision.h>
#include "common/instance.hpp"
@@ -39,8 +42,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
uint16_t otChildSupervisionGetInterval(otInstance *aInstance)
{
Instance &instance = *static_cast<Instance *>(aInstance);
+2 -2
View File
@@ -33,14 +33,14 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_COAP_API_ENABLE
#include <openthread/coap.h>
#include "coap/coap_message.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#if OPENTHREAD_CONFIG_COAP_API_ENABLE
using namespace ot;
otMessage *otCoapNewMessage(otInstance *aInstance, const otMessageSettings *aSettings)
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE
#include <openthread/coap_secure.h>
#include <openthread/ip6.h>
@@ -41,8 +43,6 @@
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#if OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE
using namespace ot;
otError otCoapSecureStart(otInstance *aInstance, uint16_t aPort)
+2 -1
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
#include <openthread/commissioner.h>
#include "common/instance.hpp"
@@ -40,7 +42,6 @@
using namespace ot;
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
otError otCommissionerStart(otInstance * aInstance,
otCommissionerStateCallback aStateCallback,
otCommissionerJoinerCallback aJoinerCallback,
+1
View File
@@ -32,6 +32,7 @@
*/
#include "openthread-core-config.h"
#include <openthread/crypto.h>
#include <openthread/error.h>
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE && OPENTHREAD_FTD
#include <openthread/dataset_updater.h>
#include "common/instance.hpp"
@@ -41,8 +43,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE && OPENTHREAD_FTD
otError otDatasetUpdaterRequestUpdate(otInstance * aInstance,
const otOperationalDataset *aDataset,
otDatasetUpdaterCallback aCallback,
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_DIAG_ENABLE
#include <openthread/diag.h>
#include "common/instance.hpp"
@@ -40,8 +42,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_DIAG_ENABLE
void otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOutputMaxLen)
{
Instance &instance = *static_cast<Instance *>(aInstance);
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE
#include <openthread/jam_detection.h>
#include "common/instance.hpp"
@@ -40,8 +42,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE
otError otJamDetectionSetRssiThreshold(otInstance *aInstance, int8_t aRssiThreshold)
{
Instance &instance = *static_cast<Instance *>(aInstance);
+2 -1
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_JOINER_ENABLE
#include <openthread/joiner.h>
#include "common/instance.hpp"
@@ -40,7 +42,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_JOINER_ENABLE
otError otJoinerStart(otInstance * aInstance,
const char * aPskd,
const char * aProvisioningUrl,
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_ENABLE
#include <openthread/link_metrics.h>
#include "common/instance.hpp"
@@ -40,8 +42,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_ENABLE
otError otLinkMetricsQuery(otInstance * aInstance,
const otIp6Address * aDestination,
uint8_t aSeriesId,
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
#include <string.h>
#include <openthread/diag.h>
#include <openthread/thread.h>
@@ -45,8 +47,6 @@
#include "common/random.hpp"
#include "mac/mac_frame.hpp"
#if OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
using namespace ot;
otError otLinkRawSetReceiveDone(otInstance *aInstance, otLinkRawReceiveDone aCallback)
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_MULTI_RADIO
#include <openthread/multi_radio.h>
#include "common/code_utils.hpp"
@@ -43,8 +45,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_MULTI_RADIO
otError otMultiRadioGetNeighborInfo(otInstance * aInstance,
const otExtAddress * aExtAddress,
otMultiRadioNeighborInfo *aInfo)
+2 -2
View File
@@ -33,14 +33,14 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#include <openthread/netdiag.h>
#include "common/instance.hpp"
using namespace ot;
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
otError otThreadGetNextDiagnosticTlv(const otMessage * aMessage,
otNetworkDiagIterator *aIterator,
otNetworkDiagTlv * aNetworkDiagTlv)
+4 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
#include <openthread/sntp.h>
#include "common/instance.hpp"
@@ -40,7 +42,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
otError otSntpClientQuery(otInstance * aInstance,
const otSntpQuery * aQuery,
otSntpResponseHandler aHandler,
@@ -57,4 +58,5 @@ void otSntpClientSetUnixEra(otInstance *aInstance, uint32_t aUnixEra)
return instance.Get<Sntp::Client>().SetUnixEra(aUnixEra);
}
#endif
#endif // OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
#include <openthread/srp_client.h>
#include "common/instance.hpp"
@@ -41,8 +43,6 @@
using namespace ot;
#if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
otError otSrpClientStart(otInstance *aInstance, const otSockAddr *aServerSockAddr)
{
Instance &instance = *static_cast<Instance *>(aInstance);
+3 -1
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD || OPENTHREAD_MTD
#include <openthread/thread.h>
#include "common/debug.hpp"
@@ -42,7 +44,6 @@
using namespace ot;
#if OPENTHREAD_FTD || OPENTHREAD_MTD
uint32_t otThreadGetChildTimeout(otInstance *aInstance)
{
Instance &instance = *static_cast<Instance *>(aInstance);
@@ -515,4 +516,5 @@ void otThreadRegisterParentResponseCallback(otInstance * aInst
instance.Get<Mle::MleRouter>().RegisterParentResponseStatsCallback(aCallback, aContext);
}
#endif // OPENTHREAD_FTD || OPENTHREAD_MTD
@@ -34,6 +34,10 @@
#ifndef OT_CORE_THREAD_BACKBONE_TMF_HPP_
#define OT_CORE_THREAD_BACKBONE_TMF_HPP_
#include "openthread-core-config.h"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
#include "coap/coap.hpp"
namespace ot {
@@ -104,4 +108,6 @@ private:
} // namespace BackboneRouter
} // namespace ot
#endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
#endif // OT_CORE_THREAD_BACKBONE_TMF_HPP_
+1
View File
@@ -37,6 +37,7 @@
#include "openthread-core-config.h"
#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2)
#include <openthread/backbone_router.h>
#include <openthread/ip6.h>
+1
View File
@@ -37,6 +37,7 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
#include <openthread/backbone_router.h>
#include <openthread/backbone_router_ftd.h>
+2 -2
View File
@@ -28,6 +28,8 @@
#include "coap_secure.hpp"
#if OPENTHREAD_CONFIG_DTLS_ENABLE
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#include "common/logging.hpp"
@@ -35,8 +37,6 @@
#include "meshcop/dtls.hpp"
#include "thread/thread_netif.hpp"
#if OPENTHREAD_CONFIG_DTLS_ENABLE
/**
* @file
* This file implements the secure CoAP agent.
+4
View File
@@ -31,6 +31,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_DTLS_ENABLE
#include "coap/coap.hpp"
#include "meshcop/dtls.hpp"
#include "meshcop/meshcop.hpp"
@@ -410,4 +412,6 @@ private:
} // namespace Coap
} // namespace ot
#endif // OPENTHREAD_CONFIG_DTLS_ENABLE
#endif // COAP_SECURE_HPP_
+2 -2
View File
@@ -36,12 +36,12 @@
#include "openthread-core-config.h"
#if OPENTHREAD_ENABLE_VENDOR_EXTENSION
#include "common/locator.hpp"
#include "common/non_copyable.hpp"
#include "common/notifier.hpp"
#if OPENTHREAD_ENABLE_VENDOR_EXTENSION
namespace ot {
namespace Ncp {
class NcpBase;
+4 -4
View File
@@ -33,6 +33,8 @@
#include "ecdsa.hpp"
#if OPENTHREAD_CONFIG_ECDSA_ENABLE
#include <string.h>
#include <mbedtls/ctr_drbg.h>
@@ -48,8 +50,6 @@ namespace ot {
namespace Crypto {
namespace Ecdsa {
#if OPENTHREAD_CONFIG_ECDSA_ENABLE
Error P256::KeyPair::Generate(void)
{
mbedtls_pk_context pk;
@@ -246,8 +246,8 @@ exit:
return error;
}
#endif // OPENTHREAD_CONFIG_ECDSA_ENABLE
} // namespace Ecdsa
} // namespace Crypto
} // namespace ot
#endif // OPENTHREAD_CONFIG_ECDSA_ENABLE
+4 -4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_ECDSA_ENABLE
#include <stdint.h>
#include <stdlib.h>
@@ -46,8 +48,6 @@ namespace ot {
namespace Crypto {
namespace Ecdsa {
#if OPENTHREAD_CONFIG_ECDSA_ENABLE
/**
* @addtogroup core-security
*
@@ -297,10 +297,10 @@ Error Sign(uint8_t * aOutput,
*
*/
#endif // OPENTHREAD_CONFIG_ECDSA_ENABLE
} // namespace Ecdsa
} // namespace Crypto
} // namespace ot
#endif // OPENTHREAD_CONFIG_ECDSA_ENABLE
#endif // ECDSA_HPP_
+4 -3
View File
@@ -33,6 +33,8 @@
#include "factory_diags.hpp"
#if OPENTHREAD_CONFIG_DIAG_ENABLE
#include <stdio.h>
#include <stdlib.h>
@@ -64,7 +66,6 @@ otError otPlatDiagProcess(otInstance *aInstance,
namespace ot {
namespace FactoryDiags {
#if OPENTHREAD_CONFIG_DIAG_ENABLE
#if OPENTHREAD_RADIO
const struct Diags::Command Diags::sCommands[] = {
@@ -607,7 +608,7 @@ bool Diags::IsEnabled(void)
return otPlatDiagModeGet();
}
#endif // OPENTHREAD_CONFIG_DIAG_ENABLE
} // namespace FactoryDiags
} // namespace ot
#endif // OPENTHREAD_CONFIG_DIAG_ENABLE
+4 -4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_DIAG_ENABLE
#include <string.h>
#include <openthread/platform/radio.h>
@@ -47,8 +49,6 @@
namespace ot {
namespace FactoryDiags {
#if OPENTHREAD_CONFIG_DIAG_ENABLE
class Diags : public InstanceLocator, private NonCopyable
{
public:
@@ -169,9 +169,9 @@ private:
#endif
};
#endif // #if OPENTHREAD_CONFIG_DIAG_ENABLE
} // namespace FactoryDiags
} // namespace ot
#endif // #if OPENTHREAD_CONFIG_DIAG_ENABLE
#endif // FACTORY_DIAGS_HPP_
+2 -2
View File
@@ -31,10 +31,10 @@
* This file includes the implementation for handling of data polls and indirect frame transmission.
*/
#if OPENTHREAD_FTD
#include "data_poll_handler.hpp"
#if OPENTHREAD_FTD
#include "common/code_utils.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD
#include "common/code_utils.hpp"
#include "common/locator.hpp"
#include "common/non_copyable.hpp"
@@ -295,4 +297,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_FTD
#endif // DATA_POLL_HANDLER_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
#include <string.h>
#include <openthread/diag.h>
#include <openthread/platform/diag.h>
@@ -44,8 +46,6 @@
#include "common/random.hpp"
#include "mac/mac_frame.hpp"
#if OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
namespace ot {
namespace Mac {
+4 -4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
#include <openthread/link_raw.h>
#include "common/locator.hpp"
@@ -46,8 +48,6 @@
namespace ot {
namespace Mac {
#if OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
/**
* This class defines the raw link-layer object.
*
@@ -311,9 +311,9 @@ private:
#endif
};
#endif // OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
} // namespace Mac
} // namespace ot
#endif // OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
#endif // LINK_RAW_HPP_
+2 -2
View File
@@ -33,10 +33,10 @@
#include "mac_filter.hpp"
#include "common/code_utils.hpp"
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
#include "common/code_utils.hpp"
namespace ot {
namespace Mac {
+2 -2
View File
@@ -36,13 +36,13 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
#include <stdint.h>
#include "common/non_copyable.hpp"
#include "mac/mac_frame.hpp"
#if OPENTHREAD_CONFIG_MAC_FILTER_ENABLE
namespace ot {
namespace Mac {
+2 -2
View File
@@ -33,6 +33,8 @@
#include "announce_begin_client.hpp"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#include "coap/coap_message.hpp"
#include "common/code_utils.hpp"
#include "common/debug.hpp"
@@ -44,8 +46,6 @@
#include "thread/thread_netif.hpp"
#include "thread/uri_paths.hpp"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
namespace ot {
AnnounceBeginClient::AnnounceBeginClient(Instance &aInstance)
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#include "coap/coap.hpp"
#include "common/locator.hpp"
#include "net/ip6_address.hpp"
@@ -77,4 +79,6 @@ public:
} // namespace ot
#endif // OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#endif // ANNOUNCE_BEGIN_CLIENT_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "border_agent.hpp"
#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
#include "coap/coap_message.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
@@ -43,8 +45,6 @@
#include "thread/thread_tlvs.hpp"
#include "thread/uri_paths.hpp"
#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
namespace ot {
namespace MeshCoP {
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
#include <openthread/border_agent.h>
#include "coap/coap.hpp"
@@ -190,4 +192,6 @@ private:
} // namespace MeshCoP
} // namespace ot
#endif // OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
#endif // BORDER_AGENT_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "commissioner.hpp"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
#include <stdio.h>
#include "coap/coap_message.hpp"
@@ -49,8 +51,6 @@
#include "thread/thread_tlvs.hpp"
#include "thread/uri_paths.hpp"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
namespace ot {
namespace MeshCoP {
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
#include <openthread/commissioner.h>
#include "coap/coap.hpp"
@@ -477,4 +479,6 @@ private:
} // namespace MeshCoP
} // namespace ot
#endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_COMMISSIONER_ENABLE
#endif // COMMISSIONER_HPP_
+3 -1
View File
@@ -31,6 +31,9 @@
* This file implements MeshCoP Datasets manager to process commands.
*
*/
#include "meshcop/dataset_manager.hpp"
#if OPENTHREAD_FTD
#include <stdio.h>
@@ -46,7 +49,6 @@
#include "common/random.hpp"
#include "common/timer.hpp"
#include "meshcop/dataset.hpp"
#include "meshcop/dataset_manager.hpp"
#include "meshcop/meshcop.hpp"
#include "meshcop/meshcop_leader.hpp"
#include "meshcop/meshcop_tlvs.hpp"
+2 -2
View File
@@ -34,14 +34,14 @@
#include "dataset_updater.hpp"
#if (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD
#include "common/code_utils.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#include "common/logging.hpp"
#include "common/random.hpp"
#if (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD
namespace ot {
namespace MeshCoP {
+4 -4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD
#include <openthread/dataset_updater.h>
#include "common/locator.hpp"
@@ -49,8 +51,6 @@
namespace ot {
namespace MeshCoP {
#if (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD
/**
* This class implements the Dataset Updater.
*
@@ -138,9 +138,9 @@ private:
Message * mDataset;
};
#endif // (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD
} // namespace MeshCoP
} // namespace ot
#endif // (OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE || OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE) && OPENTHREAD_FTD
#endif // DATASET_UPDATER_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "energy_scan_client.hpp"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#include "coap/coap_message.hpp"
#include "common/code_utils.hpp"
#include "common/debug.hpp"
@@ -45,8 +47,6 @@
#include "thread/thread_netif.hpp"
#include "thread/uri_paths.hpp"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
namespace ot {
EnergyScanClient::EnergyScanClient(Instance &aInstance)
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#include <openthread/commissioner.h>
#include "coap/coap.hpp"
@@ -97,4 +99,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#endif // ENERGY_SCAN_CLIENT_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "joiner.hpp"
#if OPENTHREAD_CONFIG_JOINER_ENABLE
#include <stdio.h>
#include "common/code_utils.hpp"
@@ -48,8 +50,6 @@
#include "thread/uri_paths.hpp"
#include "utils/otns.hpp"
#if OPENTHREAD_CONFIG_JOINER_ENABLE
namespace ot {
namespace MeshCoP {
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_JOINER_ENABLE
#include <openthread/joiner.h>
#include "coap/coap.hpp"
@@ -243,4 +245,6 @@ private:
} // namespace MeshCoP
} // namespace ot
#endif // OPENTHREAD_CONFIG_JOINER_ENABLE
#endif // JOINER_HPP_
+2 -2
View File
@@ -31,10 +31,10 @@
* This file implements the Joiner Router role.
*/
#if OPENTHREAD_FTD
#include "joiner_router.hpp"
#if OPENTHREAD_FTD
#include <stdio.h>
#include "common/code_utils.hpp"
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD
#include "coap/coap.hpp"
#include "coap/coap_message.hpp"
#include "common/locator.hpp"
@@ -134,4 +136,6 @@ private:
} // namespace MeshCoP
} // namespace ot
#endif // OPENTHREAD_FTD
#endif // JOINER_ROUTER_HPP_
+2 -2
View File
@@ -31,10 +31,10 @@
* This file implements a MeshCoP Leader.
*/
#if OPENTHREAD_FTD
#include "meshcop_leader.hpp"
#if OPENTHREAD_FTD
#include <stdio.h>
#include "coap/coap_message.hpp"
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD
#include "coap/coap.hpp"
#include "common/locator.hpp"
#include "common/non_copyable.hpp"
@@ -144,4 +146,6 @@ private:
} // namespace MeshCoP
} // namespace ot
#endif // OPENTHREAD_FTD
#endif // MESHCOP_LEADER_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "panid_query_client.hpp"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#include "coap/coap_message.hpp"
#include "common/code_utils.hpp"
#include "common/debug.hpp"
@@ -44,8 +46,6 @@
#include "thread/thread_netif.hpp"
#include "thread/uri_paths.hpp"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
namespace ot {
PanIdQueryClient::PanIdQueryClient(Instance &aInstance)
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#include <openthread/commissioner.h>
#include "coap/coap.hpp"
@@ -93,4 +95,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_CONFIG_COMMISSIONER_ENABLE && OPENTHREAD_FTD
#endif // PANID_QUERY_CLIENT_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "dhcp6_client.hpp"
#if OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
#include "common/code_utils.hpp"
#include "common/encoding.hpp"
#include "common/instance.hpp"
@@ -42,8 +44,6 @@
#include "net/dhcp6.hpp"
#include "thread/thread_netif.hpp"
#if OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
namespace ot {
namespace Dhcp6 {
+5 -5
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
#include "common/locator.hpp"
#include "common/message.hpp"
#include "common/non_copyable.hpp"
@@ -51,8 +53,6 @@ namespace ot {
namespace Dhcp6 {
#if OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
/**
* @addtogroup core-dhcp6
*
@@ -159,6 +159,9 @@ private:
*
*/
} // namespace Dhcp6
} // namespace ot
#else // OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
#if OPENTHREAD_ENABLE_DHCP6_MULTICAST_SOLICIT
@@ -167,7 +170,4 @@ private:
#endif // OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
} // namespace Dhcp6
} // namespace ot
#endif // DHCP6_CLIENT_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "dhcp6_server.hpp"
#if OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
#include "common/code_utils.hpp"
#include "common/encoding.hpp"
#include "common/instance.hpp"
@@ -41,8 +43,6 @@
#include "thread/mle.hpp"
#include "thread/thread_netif.hpp"
#if OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
namespace ot {
namespace Dhcp6 {
+4 -4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
#include "common/locator.hpp"
#include "common/non_copyable.hpp"
#include "mac/mac.hpp"
@@ -47,8 +49,6 @@
namespace ot {
namespace Dhcp6 {
#if OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
#if OPENTHREAD_ENABLE_DHCP6_MULTICAST_SOLICIT
#error "OPENTHREAD_ENABLE_DHCP6_MULTICAST_SOLICIT requires DHCPv6 server on Border Router side to be enabled."
#endif
@@ -229,9 +229,9 @@ private:
*
*/
#endif // OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
} // namespace Dhcp6
} // namespace ot
#endif // OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE
#endif // DHCP6_SERVER_HPP_
+2 -2
View File
@@ -28,6 +28,8 @@
#include "dns_client.hpp"
#if OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/instance.hpp"
@@ -36,8 +38,6 @@
#include "net/udp6.hpp"
#include "thread/thread_netif.hpp"
#if OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
/**
* @file
* This file implements the DNS client.
+4
View File
@@ -31,6 +31,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
#include <openthread/dns_client.h>
#include "common/clearable.hpp"
@@ -685,4 +687,6 @@ private:
} // namespace Dns
} // namespace ot
#endif // OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
#endif // DNS_CLIENT_HPP_
+2 -2
View File
@@ -29,6 +29,8 @@
#include "sntp_client.hpp"
#if OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/instance.hpp"
@@ -37,8 +39,6 @@
#include "net/udp6.hpp"
#include "thread/thread_netif.hpp"
#if OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
/**
* @file
* This file implements the SNTP client.
+4
View File
@@ -31,6 +31,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
#include <openthread/sntp.h>
#include "common/message.hpp"
@@ -591,4 +593,6 @@ private:
} // namespace Sntp
} // namespace ot
#endif // OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
#endif // SNTP_CLIENT_HPP_
+2 -2
View File
@@ -28,6 +28,8 @@
#include "srp_client.hpp"
#if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/instance.hpp"
@@ -38,8 +40,6 @@
#include "common/string.hpp"
#include "thread/network_data_service.hpp"
#if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
/**
* @file
* This file implements the SRP client.
+2 -2
View File
@@ -31,6 +31,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
#include <openthread/srp_client.h>
#include "common/clearable.hpp"
@@ -45,8 +47,6 @@
#include "net/ip6.hpp"
#include "net/udp6.hpp"
#if OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE
/**
* @file
* This file includes definitions for the SRP (Service Registration Protocol) client.
+2 -2
View File
@@ -32,6 +32,8 @@
#include "trel_interface.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
#include <openthread/platform/trel-udp6.h>
#include "common/code_utils.hpp"
@@ -39,8 +41,6 @@
#include "common/locator-getters.hpp"
#include "common/logging.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
namespace ot {
namespace Trel {
+2 -2
View File
@@ -36,13 +36,13 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
#include "common/locator.hpp"
#include "mac/mac_types.hpp"
#include "net/ip6_address.hpp"
#include "radio/trel_packet.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
namespace ot {
namespace Trel {
+2 -2
View File
@@ -32,14 +32,14 @@
#include "trel_link.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#include "common/logging.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
namespace ot {
namespace Trel {
+2 -2
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
#include "common/encoding.hpp"
#include "common/locator.hpp"
#include "common/tasklet.hpp"
@@ -45,8 +47,6 @@
#include "radio/trel_interface.hpp"
#include "radio/trel_packet.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
namespace ot {
class Neighbor;
+2 -2
View File
@@ -32,14 +32,14 @@
#include "trel_packet.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#include "common/logging.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
namespace ot {
namespace Trel {
+2 -2
View File
@@ -36,13 +36,13 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
#include "common/encoding.hpp"
#include "common/locator.hpp"
#include "common/string.hpp"
#include "mac/mac_types.hpp"
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
namespace ot {
namespace Trel {
+2 -2
View File
@@ -31,10 +31,10 @@
* This file implements Thread's EID-to-RLOC mapping and caching.
*/
#if OPENTHREAD_FTD
#include "address_resolver.hpp"
#if OPENTHREAD_FTD
#include "coap/coap_message.hpp"
#include "common/code_utils.hpp"
#include "common/debug.hpp"
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD
#include "coap/coap.hpp"
#include "common/linked_list.hpp"
#include "common/locator.hpp"
@@ -363,4 +365,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_FTD
#endif // ADDRESS_RESOLVER_HPP_
+4 -4
View File
@@ -33,14 +33,14 @@
#include "child_table.hpp"
#if OPENTHREAD_FTD
#include "common/code_utils.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
namespace ot {
#if OPENTHREAD_FTD
ChildTable::Iterator::Iterator(Instance &aInstance, Child::StateFilter aFilter)
: InstanceLocator(aInstance)
, ItemPtrIterator(nullptr)
@@ -330,6 +330,6 @@ bool ChildTable::HasSleepyChildWithAddress(const Ip6::Address &aIp6Address) cons
return hasChild;
}
#endif // OPENTHREAD_FTD
} // namespace ot
#endif // OPENTHREAD_FTD
+4 -4
View File
@@ -31,6 +31,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE
#include "common/locator.hpp"
#include "common/message.hpp"
#include "common/non_copyable.hpp"
@@ -50,8 +52,6 @@ namespace ot {
* @{
*/
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE
class Child;
/**
@@ -208,8 +208,6 @@ private:
Callbacks mCallbacks;
};
#endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE
/**
* @}
*
@@ -217,4 +215,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE
#endif // CSL_TX_SCHEDULER_HPP_
+2 -2
View File
@@ -31,10 +31,10 @@
* This file includes definitions for handling indirect transmission.
*/
#if OPENTHREAD_FTD
#include "indirect_sender.hpp"
#if OPENTHREAD_FTD
#include "common/code_utils.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD
#include "common/locator.hpp"
#include "common/message.hpp"
#include "common/non_copyable.hpp"
@@ -237,4 +239,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_FTD
#endif // INDIRECT_SENDER_HPP_
+4 -2
View File
@@ -35,14 +35,16 @@
#ifndef LINK_METRICS_TLVS_HPP_
#define LINK_METRICS_TLVS_HPP_
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_ENABLE
#include <openthread/link_metrics.h>
#include "common/encoding.hpp"
#include "common/message.hpp"
#include "common/tlvs.hpp"
#if OPENTHREAD_CONFIG_MLE_LINK_METRICS_ENABLE
namespace ot {
/**
+2
View File
@@ -235,6 +235,7 @@ public:
*/
void SetDiscoverParameters(const Mac::ChannelMask &aScanChannels);
#if OPENTHREAD_FTD
/**
* This method frees any messages queued for an existing child.
*
@@ -244,6 +245,7 @@ public:
*
*/
void RemoveMessages(Child &aChild, Message::SubType aSubType);
#endif
/**
* This method frees unicast/multicast MLE Data Responses from Send Message Queue if any.
+2 -2
View File
@@ -31,10 +31,10 @@
* This file implements FTD-specific mesh forwarding of IPv6/6LoWPAN messages.
*/
#if OPENTHREAD_FTD
#include "mesh_forwarder.hpp"
#if OPENTHREAD_FTD
#include "common/locator-getters.hpp"
#include "common/logging.hpp"
#include "meshcop/meshcop.hpp"
+2 -2
View File
@@ -31,10 +31,10 @@
* This file implements MTD-specific mesh forwarding of IPv6/6LoWPAN messages.
*/
#if OPENTHREAD_MTD
#include "mesh_forwarder.hpp"
#if OPENTHREAD_MTD
namespace ot {
Error MeshForwarder::SendMessage(Message &aMessage)
+1
View File
@@ -39,6 +39,7 @@
#include "common/encoding.hpp"
#include "common/locator.hpp"
#include "common/non_copyable.hpp"
#include "common/notifier.hpp"
#include "common/timer.hpp"
#include "mac/mac.hpp"
#include "meshcop/joiner_router.hpp"
+2 -2
View File
@@ -30,10 +30,10 @@
* This file implements MLE functionality required for the Thread Router and Leader roles.
*/
#if OPENTHREAD_FTD
#include "mle_router.hpp"
#if OPENTHREAD_FTD
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/encoding.hpp"
+2
View File
@@ -267,7 +267,9 @@ void NeighborTable::Signal(Event aEvent, const Neighbor &aNeighbor)
{
case OT_NEIGHBOR_TABLE_EVENT_CHILD_ADDED:
case OT_NEIGHBOR_TABLE_EVENT_CHILD_REMOVED:
#if OPENTHREAD_FTD
static_cast<Child::Info &>(info.mInfo.mChild).SetFrom(static_cast<const Child &>(aNeighbor));
#endif
break;
case OT_NEIGHBOR_TABLE_EVENT_ROUTER_ADDED:
+2 -2
View File
@@ -31,10 +31,10 @@
* This file implements the Thread Network Data managed by the Thread Leader.
*/
#if OPENTHREAD_FTD
#include "network_data_leader.hpp"
#if OPENTHREAD_FTD
#include "coap/coap_message.hpp"
#include "common/code_utils.hpp"
#include "common/debug.hpp"
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD
#include <stdint.h>
#include "coap/coap.hpp"
@@ -317,4 +319,6 @@ private:
} // namespace NetworkData
} // namespace ot
#endif // OPENTHREAD_FTD
#endif // NETWORK_DATA_LEADER_FTD_HPP_
+2 -2
View File
@@ -33,6 +33,8 @@
#include "network_data_local.hpp"
#if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE || OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/instance.hpp"
@@ -42,8 +44,6 @@
#include "thread/mle_types.hpp"
#include "thread/thread_netif.hpp"
#if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE || OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
namespace ot {
namespace NetworkData {
+2 -2
View File
@@ -37,11 +37,11 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE || OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
#include "common/non_copyable.hpp"
#include "thread/network_data.hpp"
#if OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE || OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE
namespace ot {
/**
+2 -2
View File
@@ -33,6 +33,8 @@
#include "network_diagnostic.hpp"
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#include "coap/coap_message.hpp"
#include "common/code_utils.hpp"
#include "common/debug.hpp"
@@ -48,8 +50,6 @@
#include "thread/thread_tlvs.hpp"
#include "thread/uri_paths.hpp"
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
namespace ot {
namespace NetworkDiagnostic {
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#include <openthread/netdiag.h>
#include "coap/coap.hpp"
@@ -163,4 +165,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_FTD || OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE
#endif // NETWORK_DIAGNOSTIC_HPP_
+2 -2
View File
@@ -33,14 +33,14 @@
#include "radio_selector.hpp"
#if OPENTHREAD_CONFIG_MULTI_RADIO
#include "common/code_utils.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
#include "common/logging.hpp"
#include "common/random.hpp"
#if OPENTHREAD_CONFIG_MULTI_RADIO
namespace ot {
// This array defines the order in which different radio link types are
+2 -2
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_MULTI_RADIO
#include <openthread/multi_radio.h>
#include "common/locator.hpp"
@@ -44,8 +46,6 @@
#include "mac/mac_links.hpp"
#include "mac/mac_types.hpp"
#if OPENTHREAD_CONFIG_MULTI_RADIO
namespace ot {
/**
+4
View File
@@ -36,6 +36,8 @@
#include "openthread-core-config.h"
#if OPENTHREAD_FTD
#include "common/error.hpp"
#include "common/locator.hpp"
#include "common/non_copyable.hpp"
@@ -194,4 +196,6 @@ private:
} // namespace ot
#endif // OPENTHREAD_FTD
#endif // SOURCE_MATCH_CONTROLLER_HPP_
+1
View File
@@ -37,6 +37,7 @@
#include "openthread-core-config.h"
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
#include <openthread/network_time.h>
#include "common/locator.hpp"
+6 -2
View File
@@ -214,6 +214,8 @@ const char *Neighbor::StateToString(State aState)
return static_cast<uint8_t>(aState) < OT_ARRAY_LENGTH(kStateStrings) ? kStateStrings[aState] : "Unknown";
}
#if OPENTHREAD_FTD
void Child::Info::SetFrom(const Child &aChild)
{
Clear();
@@ -428,7 +430,7 @@ void Child::GenerateChallenge(void)
IgnoreError(Random::Crypto::FillBuffer(mAttachChallenge, sizeof(mAttachChallenge)));
}
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
#if OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
bool Child::HasMlrRegisteredAddress(const Ip6::Address &aAddress) const
{
bool has = false;
@@ -471,7 +473,9 @@ void Child::SetAddressMlrState(const Ip6::Address &aAddress, MlrState aState)
mMlrToRegisterMask.Set(addressIndex, aState == kMlrStateToRegister);
mMlrRegisteredMask.Set(addressIndex, aState == kMlrStateRegistered);
}
#endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
#endif // OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE
#endif // OPENTHREAD_FTD
void Router::Info::SetFrom(const Router &aRouter)
{
+5 -1
View File
@@ -811,6 +811,8 @@ private:
#endif
};
#if OPENTHREAD_FTD
/**
* This class represents a Thread Child.
*
@@ -818,7 +820,7 @@ private:
class Child : public Neighbor,
public IndirectSender::ChildInfo,
public DataPollHandler::ChildInfo
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE
#if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE
,
public CslTxScheduler::ChildInfo
#endif
@@ -1308,6 +1310,8 @@ private:
static_assert(OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS < 8192, "mQueuedMessageCount cannot fit max required!");
};
#endif // OPENTHREAD_FTD
/**
* This class represents a Thread Router
*
+2 -2
View File
@@ -34,6 +34,8 @@
#include "channel_manager.hpp"
#if OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE && OPENTHREAD_FTD
#include "common/code_utils.hpp"
#include "common/instance.hpp"
#include "common/locator-getters.hpp"
@@ -42,8 +44,6 @@
#include "meshcop/dataset_updater.hpp"
#include "radio/radio.hpp"
#if OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE && OPENTHREAD_FTD
namespace ot {
namespace Utils {

Some files were not shown because too many files have changed in this diff Show More