Skip to content

Is there a mechanism to delay a reclaimed Child ID be allocate to a new Child device? #7775

Closed Answered by jwhui
jinpeng1989 asked this question in Q&A
Discussion options

You must be logged in to vote

Thread does not provide a mechanism to control how reclaimed Child IDs are allocated.

OpenThread will attempt to cycle through the set of available Child IDs before reusing previously allocated Child IDs.

// pick next Child ID that is not being used
do
{
mNextChildId++;
if (mNextChildId > kMaxChildId)
{
mNextChildId = kMinChildId;
}
rloc16 = Get<Mac::Mac>().GetShortAddress() | mNextChildId;
} while (mChildTable.FindChild(rloc16, Child::kInStateAnyExceptInvalid) != nullptr);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jwhui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #7773 on May 31, 2022 21:58.