mirror of
https://github.com/espressif/openthread.git
synced 2026-08-10 04:37:47 +00:00
[mle] define constant for "Child ID Response" timeout (#8536)
This commit defines `kChildIdResponseTimeout` as a new constant in `mle_types.hpp` which is used as maximum wait time to receive a "Child ID Response" message from parent during attach. This commit also removes the now unused `kMaxChildUpdateResponseTimeout`.
This commit is contained in:
@@ -1436,7 +1436,7 @@ void Mle::HandleAttachTimer(void)
|
||||
if (HasAcceptableParentCandidate() && (SendChildIdRequest() == kErrorNone))
|
||||
{
|
||||
SetAttachState(kAttachStateChildIdRequest);
|
||||
delay = kParentRequestReedTimeout;
|
||||
delay = kChildIdResponseTimeout;
|
||||
ExitNow();
|
||||
}
|
||||
|
||||
|
||||
@@ -1702,7 +1702,7 @@ void MleRouter::HandleParentRequest(RxInfo &aRxInfo)
|
||||
if (!child->IsStateValidOrRestoring())
|
||||
{
|
||||
child->SetLastHeard(TimerMilli::GetNow());
|
||||
child->SetTimeout(Time::MsecToSec(kMaxChildIdRequestTimeout));
|
||||
child->SetTimeout(Time::MsecToSec(kChildIdRequestTimeout));
|
||||
}
|
||||
|
||||
aRxInfo.mClass = RxInfo::kPeerMessage;
|
||||
@@ -1948,7 +1948,7 @@ void MleRouter::HandleTimeTick(void)
|
||||
}
|
||||
else if (router.IsStateLinkRequest())
|
||||
{
|
||||
if (age >= kMaxLinkRequestTimeout)
|
||||
if (age >= kLinkRequestTimeout)
|
||||
{
|
||||
LogInfo("Link Request timeout expired");
|
||||
RemoveNeighbor(router);
|
||||
|
||||
@@ -86,6 +86,7 @@ constexpr uint16_t kUdpPort = 19788; ///< MLE UDP Port
|
||||
constexpr uint32_t kParentRequestRouterTimeout = 750; ///< Router Parent Request timeout (in msec)
|
||||
constexpr uint32_t kParentRequestDuplicateMargin = 50; ///< Margin for duplicate parent request
|
||||
constexpr uint32_t kParentRequestReedTimeout = 1250; ///< Router and REEDs Parent Request timeout (in msec)
|
||||
constexpr uint32_t kChildIdResponseTimeout = 1250; ///< Wait time to receive Child ID Response (in msec)
|
||||
constexpr uint32_t kAttachStartJitter = 50; ///< Max jitter time added to start of attach (in msec)
|
||||
constexpr uint32_t kAnnounceProcessTimeout = 250; ///< Delay after Announce rx before channel/pan-id change
|
||||
constexpr uint32_t kAnnounceTimeout = 1400; ///< Total timeout for sending Announce messages (in msec)
|
||||
@@ -96,9 +97,8 @@ constexpr uint32_t kUnicastRetransmissionDelay = 1000; ///< Base delay befor
|
||||
constexpr uint32_t kChildUpdateRequestPendingDelay = 100; ///< Delay for aggregating Child Update Req (in msec)
|
||||
constexpr uint8_t kMaxTransmissionCount = 3; ///< Max number of times an MLE message may be transmitted
|
||||
constexpr uint32_t kMaxResponseDelay = 1000; ///< Max response delay for a multicast request (in msec)
|
||||
constexpr uint32_t kMaxChildIdRequestTimeout = 5000; ///< Max delay to rx a Child ID Request (in msec)
|
||||
constexpr uint32_t kMaxChildUpdateResponseTimeout = 2000; ///< Max delay to rx a Child Update Response (in msec)
|
||||
constexpr uint32_t kMaxLinkRequestTimeout = 2000; ///< Max delay to rx a Link Accept
|
||||
constexpr uint32_t kChildIdRequestTimeout = 5000; ///< Max delay to rx a Child ID Request (in msec)
|
||||
constexpr uint32_t kLinkRequestTimeout = 2000; ///< Max delay to rx a Link Accept
|
||||
constexpr uint8_t kMulticastLinkRequestDelay = 5; ///< Max delay for sending a mcast Link Request (in sec)
|
||||
|
||||
constexpr uint32_t kMinTimeoutKeepAlive = (((kMaxChildKeepAliveAttempts + 1) * kUnicastRetransmissionDelay) / 1000);
|
||||
|
||||
Reference in New Issue
Block a user