mirror of
https://github.com/espressif/openthread.git
synced 2026-08-20 17:39:51 +00:00
[config] child supervision (#4020)
This commit is contained in:
+4
-6
@@ -59,14 +59,14 @@ python --version || die
|
||||
-DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1"
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1"
|
||||
|
||||
scan-build ./configure \
|
||||
--enable-application-coap \
|
||||
--enable-application-coap-secure \
|
||||
--enable-builtin-mbedtls=no \
|
||||
--enable-cert-log \
|
||||
--enable-child-supervision \
|
||||
--enable-cli \
|
||||
--enable-commissioner \
|
||||
--enable-dhcp6-client \
|
||||
@@ -99,7 +99,6 @@ python --version || die
|
||||
--enable-application-coap-secure \
|
||||
--enable-builtin-mbedtls=no \
|
||||
--enable-cert-log \
|
||||
--enable-child-supervision \
|
||||
--enable-cli \
|
||||
--enable-commissioner \
|
||||
--enable-dhcp6-client \
|
||||
@@ -363,7 +362,8 @@ build_samr21() {
|
||||
export CPPFLAGS=" \
|
||||
-DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1"
|
||||
-DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1 \
|
||||
-DOPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1"
|
||||
|
||||
git checkout -- . || die
|
||||
git clean -xfd || die
|
||||
@@ -374,7 +374,6 @@ build_samr21() {
|
||||
--enable-mtd \
|
||||
--with-ncp-bus=spi \
|
||||
--with-examples=posix \
|
||||
--enable-child-supervision \
|
||||
--enable-diag \
|
||||
--enable-jam-detection \
|
||||
--enable-legacy \
|
||||
@@ -393,7 +392,6 @@ build_samr21() {
|
||||
--enable-mtd \
|
||||
--with-ncp-bus=spi \
|
||||
--with-examples=posix \
|
||||
--enable-child-supervision \
|
||||
--enable-legacy \
|
||||
--enable-mac-filter \
|
||||
--enable-service \
|
||||
|
||||
@@ -1206,37 +1206,6 @@ AC_SUBST(OPENTHREAD_NCP_SPINEL_ENCRYPTER_LIBS)
|
||||
AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER],[${OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER}],[Define to 1 if using NCP Spinel Encrypter])
|
||||
AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER], [test "${OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER}" = "1"])
|
||||
|
||||
#
|
||||
# Child Supervision
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(child_supervision,
|
||||
[AS_HELP_STRING([--enable-child-supervision],[Enable child supervision feature @<:@default=no@:>@.])],
|
||||
[
|
||||
case "${enableval}" in
|
||||
|
||||
no|yes)
|
||||
enable_child_supervision=${enableval}
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid value ${enable_child_supervision} for --enable-child-supervision])
|
||||
;;
|
||||
esac
|
||||
],
|
||||
[enable_child_supervision=no])
|
||||
|
||||
if test "$enable_child_supervision" = "yes"; then
|
||||
OPENTHREAD_ENABLE_CHILD_SUPERVISION=1
|
||||
else
|
||||
OPENTHREAD_ENABLE_CHILD_SUPERVISION=0
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT(${enable_child_supervision})
|
||||
AC_SUBST(OPENTHREAD_ENABLE_CHILD_SUPERVISION)
|
||||
AM_CONDITIONAL([OPENTHREAD_ENABLE_CHILD_SUPERVISION], [test "${enable_child_supervision}" = "yes"])
|
||||
AC_DEFINE_UNQUOTED([OPENTHREAD_ENABLE_CHILD_SUPERVISION],[${OPENTHREAD_ENABLE_CHILD_SUPERVISION}],[Define to 1 if you want to use child supervision feature])
|
||||
|
||||
#
|
||||
# DHCPv6 Client
|
||||
#
|
||||
@@ -1911,7 +1880,6 @@ AC_MSG_NOTICE([
|
||||
OpenThread Jam Detection support : ${enable_jam_detection}
|
||||
OpenThread MAC Filter support : ${enable_mac_filter}
|
||||
OpenThread Factory Diagnostics support : ${enable_diag}
|
||||
OpenThread Child Supervision support : ${enable_child_supervision}
|
||||
OpenThread Legacy network support : ${enable_legacy}
|
||||
OpenThread DHCPv6 Server support : ${enable_dhcp6_server}
|
||||
OpenThread DHCPv6 Client support : ${enable_dhcp6_client}
|
||||
|
||||
@@ -99,7 +99,7 @@ COMMONCFLAGS += -DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(CHILD_SUPERVISION),1)
|
||||
configure_OPTIONS += --enable-child-supervision
|
||||
COMMONCFLAGS += -DOPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE 0
|
||||
|
||||
/* Define to 1 if you want to use child supervision feature */
|
||||
#define OPENTHREAD_ENABLE_CHILD_SUPERVISION 1
|
||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE 1
|
||||
|
||||
/* Define to 1 to enable dtls support. */
|
||||
#define OPENTHREAD_CONFIG_DTLS_ENABLE 1
|
||||
|
||||
@@ -47,8 +47,8 @@ extern "C" {
|
||||
* @brief
|
||||
* This module includes functions for child supervision feature.
|
||||
*
|
||||
* The functions in this module are available when child supervision feature (`OPENTHREAD_ENABLE_CHILD_SUPERVISION`)
|
||||
* is enabled.
|
||||
* The functions in this module are available when child supervision feature
|
||||
* (`OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE`) is enabled.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
|
||||
@@ -322,6 +322,7 @@ HEADERS_COMMON = \
|
||||
config/border_router.h \
|
||||
config/channel_manager.h \
|
||||
config/channel_monitor.h \
|
||||
config/child_supervision.h \
|
||||
config/openthread-core-config-check.h \
|
||||
config/openthread-core-default-config.h \
|
||||
crypto/aes_ccm.hpp \
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
using namespace ot;
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
uint16_t otChildSupervisionGetInterval(otInstance *aInstance)
|
||||
{
|
||||
@@ -69,4 +69,4 @@ void otChildSupervisionSetCheckTimeout(otInstance *aInstance, uint16_t aTimeout)
|
||||
instance.Get<Utils::SupervisionListener>().SetTimeout(aTimeout);
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#endif // OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (c) 2019, The OpenThread Authors.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This file includes compile-time configurations for Child Supervision.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_CHILD_SUPERVISION_H_
|
||||
#define CONFIG_CHILD_SUPERVISION_H_
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
*
|
||||
* Define to 1 to enable Child Supervision support.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL
|
||||
*
|
||||
* The default supervision interval in seconds used by parent. Set to zero to disable the supervision process on the
|
||||
* parent.
|
||||
*
|
||||
* Applicable only if child supervision feature is enabled (i.e.,
|
||||
* `OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE ` is set).
|
||||
*
|
||||
* Child supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child
|
||||
* within the supervision interval. If there is no transmission to the child within the supervision interval, child
|
||||
* supervisor will enqueue and send a supervision message (a data message with empty payload) to the child.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL
|
||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL 129
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CHILD_SUPERVISION_CHECK_TIMEOUT
|
||||
*
|
||||
* The default supervision check timeout interval (in seconds) used by a device in child state. Set to zero to disable
|
||||
* the supervision check process on the child.
|
||||
*
|
||||
* Applicable only if child supervision feature is enabled (i.e., `OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE` is set).
|
||||
*
|
||||
* If the sleepy child does not hear from its parent within the specified timeout interval, it initiates the re-attach
|
||||
* process (MLE Child Update Request/Response exchange with its parent).
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CHILD_SUPERVISION_CHECK_TIMEOUT
|
||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_CHECK_TIMEOUT 190
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CHILD_SUPERVISION_MSG_NO_ACK_REQUEST
|
||||
*
|
||||
* Define as 1 to clear/disable 15.4 ack request in the MAC header of a supervision message.
|
||||
*
|
||||
* Applicable only if child supervision feature is enabled (i.e., `OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE` is set).
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CHILD_SUPERVISION_MSG_NO_ACK_REQUEST
|
||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_MSG_NO_ACK_REQUEST 0
|
||||
#endif
|
||||
|
||||
#endif // CONFIG_CHILD_SUPERVISION_H_
|
||||
@@ -1197,51 +1197,6 @@
|
||||
#define OPENTHREAD_CONFIG_IPV6_TX_ERR_RATE_AVERAGING_WINDOW 128
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL
|
||||
*
|
||||
* The default supervision interval in seconds used by parent. Set to zero to disable the supervision process on the
|
||||
* parent.
|
||||
*
|
||||
* Applicable only if child supervision feature is enabled (i.e., `OPENTHREAD_ENABLE_CHILD_SUPERVISION ` is set).
|
||||
*
|
||||
* Child supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child
|
||||
* within the supervision interval. If there is no transmission to the child within the supervision interval, child
|
||||
* supervisor will enqueue and send a supervision message (a data message with empty payload) to the child.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL
|
||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_INTERVAL 129
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_SUPERVISION_CHECK_TIMEOUT
|
||||
*
|
||||
* The default supervision check timeout interval (in seconds) used by a device in child state. Set to zero to disable
|
||||
* the supervision check process on the child.
|
||||
*
|
||||
* Applicable only if child supervision feature is enabled (i.e., `OPENTHREAD_ENABLE_CHILD_SUPERVISION` is set).
|
||||
*
|
||||
* If the sleepy child does not hear from its parent within the specified timeout interval, it initiates the re-attach
|
||||
* process (MLE Child Update Request/Response exchange with its parent).
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_SUPERVISION_CHECK_TIMEOUT
|
||||
#define OPENTHREAD_CONFIG_SUPERVISION_CHECK_TIMEOUT 190
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_SUPERVISION_MSG_NO_ACK_REQUEST
|
||||
*
|
||||
* Define as 1 to clear/disable 15.4 ack request in the MAC header of a supervision message.
|
||||
*
|
||||
* Applicable only if child supervision feature is enabled (i.e., `OPENTHREAD_ENABLE_CHILD_SUPERVISION` is set).
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_SUPERVISION_MSG_NO_ACK_REQUEST
|
||||
#define OPENTHREAD_CONFIG_SUPERVISION_MSG_NO_ACK_REQUEST 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_INFORM_PREVIOUS_PARENT_ON_REATTACH
|
||||
*
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "config/border_router.h"
|
||||
#include "config/channel_manager.h"
|
||||
#include "config/channel_monitor.h"
|
||||
#include "config/child_supervision.h"
|
||||
|
||||
#if OPENTHREAD_ENABLE_APPLICATION_COAP_SECURE || OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE || \
|
||||
OPENTHREAD_ENABLE_COMMISSIONER || OPENTHREAD_ENABLE_JOINER
|
||||
|
||||
@@ -203,7 +203,7 @@ private:
|
||||
* Indicates whether to set/enable 15.4 ack request in the MAC header of a supervision message.
|
||||
*
|
||||
*/
|
||||
kSupervisionMsgAckRequest = (OPENTHREAD_CONFIG_SUPERVISION_MSG_NO_ACK_REQUEST == 0) ? true : false,
|
||||
kSupervisionMsgAckRequest = (OPENTHREAD_CONFIG_CHILD_SUPERVISION_MSG_NO_ACK_REQUEST == 0) ? true : false,
|
||||
};
|
||||
|
||||
// Callbacks from DataPollHandler
|
||||
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
*/
|
||||
void SetRequestTlv(uint8_t aIndex, uint8_t aType) { mRequestTlvs[aIndex] = aType; }
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
/**
|
||||
* This method increments the number of seconds since last supervision of the child.
|
||||
@@ -615,7 +615,7 @@ public:
|
||||
*/
|
||||
void ResetSecondsSinceLastSupervision(void) { mSecondsSinceSupervision = 0; }
|
||||
|
||||
#endif // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#endif // #if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
private:
|
||||
#if OPENTHREAD_CONFIG_IP_ADDRS_PER_CHILD < 2
|
||||
@@ -639,9 +639,9 @@ private:
|
||||
uint8_t mAttachChallenge[Mle::ChallengeTlv::kMaxSize]; ///< The challenge value
|
||||
};
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
uint16_t mSecondsSinceSupervision; ///< Number of seconds since last supervision of the child.
|
||||
#endif // OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#endif
|
||||
|
||||
OT_STATIC_ASSERT(OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS < 8192, "mQueuedMessageCount cannot fit max required!");
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
namespace ot {
|
||||
namespace Utils {
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
#if OPENTHREAD_FTD
|
||||
|
||||
@@ -248,7 +248,7 @@ exit:
|
||||
RestartTimer();
|
||||
}
|
||||
|
||||
#endif // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#endif // #if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
} // namespace Utils
|
||||
} // namespace ot
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Utils {
|
||||
*
|
||||
*/
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION && OPENTHREAD_FTD
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE && OPENTHREAD_FTD
|
||||
|
||||
/**
|
||||
* This class implements a child supervisor.
|
||||
@@ -168,7 +168,7 @@ private:
|
||||
Notifier::Callback mNotifierCallback;
|
||||
};
|
||||
|
||||
#else // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION && OPENTHREAD_FTD
|
||||
#else // #if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE && OPENTHREAD_FTD
|
||||
|
||||
class ChildSupervisor
|
||||
{
|
||||
@@ -182,9 +182,9 @@ public:
|
||||
void UpdateOnSend(Child &) {}
|
||||
};
|
||||
|
||||
#endif // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION && OPENTHREAD_FTD
|
||||
#endif // #if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE && OPENTHREAD_FTD
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
/**
|
||||
* This class implements a child supervision listener.
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
private:
|
||||
enum
|
||||
{
|
||||
kDefaultTimeout = OPENTHREAD_CONFIG_SUPERVISION_CHECK_TIMEOUT, // (seconds)
|
||||
kDefaultTimeout = OPENTHREAD_CONFIG_CHILD_SUPERVISION_CHECK_TIMEOUT, // (seconds)
|
||||
};
|
||||
|
||||
void RestartTimer(void);
|
||||
@@ -259,7 +259,7 @@ private:
|
||||
TimerMilli mTimer;
|
||||
};
|
||||
|
||||
#else // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#else // #if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
class SupervisionListener
|
||||
{
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
void UpdateOnReceive(const Mac::Address &, bool) {}
|
||||
};
|
||||
|
||||
#endif // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#endif // #if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -1765,7 +1765,7 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_CAPS>(void)
|
||||
SuccessOrExit(error = mEncoder.WriteUintPacked(SPINEL_CAP_JAM_DETECT));
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
SuccessOrExit(error = mEncoder.WriteUintPacked(SPINEL_CAP_CHILD_SUPERVISION));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -504,7 +504,7 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey)
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_NETWORK_TIME>;
|
||||
break;
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
case SPINEL_PROP_CHILD_SUPERVISION_CHECK_TIMEOUT:
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_CHILD_SUPERVISION_CHECK_TIMEOUT>;
|
||||
break;
|
||||
@@ -608,7 +608,7 @@ NcpBase::PropertyHandler NcpBase::FindGetPropertyHandler(spinel_prop_key_t aKey)
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_STEERING_DATA>;
|
||||
break;
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
case SPINEL_PROP_CHILD_SUPERVISION_INTERVAL:
|
||||
handler = &NcpBase::HandlePropertyGet<SPINEL_PROP_CHILD_SUPERVISION_INTERVAL>;
|
||||
break;
|
||||
@@ -859,7 +859,7 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey)
|
||||
case SPINEL_PROP_CNTR_RESET:
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_CNTR_RESET>;
|
||||
break;
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
case SPINEL_PROP_CHILD_SUPERVISION_CHECK_TIMEOUT:
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_CHILD_SUPERVISION_CHECK_TIMEOUT>;
|
||||
break;
|
||||
@@ -923,7 +923,7 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey)
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_UDP_FORWARD_STREAM>;
|
||||
break;
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
case SPINEL_PROP_CHILD_SUPERVISION_INTERVAL:
|
||||
handler = &NcpBase::HandlePropertySet<SPINEL_PROP_CHILD_SUPERVISION_INTERVAL>;
|
||||
break;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#if OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
|
||||
#include <openthread/channel_manager.h>
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
#include <openthread/child_supervision.h>
|
||||
#endif
|
||||
#include <openthread/dataset.h>
|
||||
@@ -903,7 +903,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_CHILD_SUPERVISION_INTERVAL>(void)
|
||||
{
|
||||
@@ -922,7 +922,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#endif // OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
#if OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
|
||||
#include <openthread/channel_monitor.h>
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
#include <openthread/child_supervision.h>
|
||||
#endif
|
||||
#include <openthread/diag.h>
|
||||
@@ -2098,7 +2098,7 @@ void NcpBase::HandleJamStateChange(bool aJamState)
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_JAM_DETECTION
|
||||
|
||||
#if OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#if OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_CHILD_SUPERVISION_CHECK_TIMEOUT>(void)
|
||||
{
|
||||
@@ -2117,7 +2117,7 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_CHILD_SUPERVISION
|
||||
#endif // OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
|
||||
#if OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ build_config=$1
|
||||
configure_options=" \
|
||||
--disable-docs \
|
||||
--disable-tests \
|
||||
--enable-child-supervision \
|
||||
--enable-commissioner \
|
||||
--enable-coverage=$coverage \
|
||||
--enable-diag \
|
||||
|
||||
@@ -281,6 +281,14 @@
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_CHANNEL_MANAGER_THRESHOLD_TO_CHANGE_CHANNEL (0xffff * 10 / 100)
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
||||
*
|
||||
* Define to 1 to enable Child Supervision support.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE 1
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MESHCOP_PENDING_DATASET_MINIMUM_DELAY
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user