[mle] rename static method to ChildIdFromRloc16() from GetChildId() (#4486)

This commit is contained in:
Abtin Keshavarzian
2020-01-22 20:52:09 -08:00
committed by Jonathan Hui
parent b7a56cdfd7
commit c9ce2d42e9
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -916,14 +916,14 @@ public:
otError GetLeaderData(otLeaderData &aLeaderData);
/**
* This method returns the Child ID portion of an RLOC16.
* This method derives the Child ID from a given RLOC16.
*
* @param[in] aRloc16 The RLOC16 value.
*
* @returns The Child ID portion of an RLOC16.
*
*/
static uint16_t GetChildId(uint16_t aRloc16) { return aRloc16 & kMaxChildId; }
static uint16_t ChildIdFromRloc16(uint16_t aRloc16) { return aRloc16 & kMaxChildId; }
/**
* This method derives the Router ID portion from a given RLOC16.
@@ -1010,7 +1010,7 @@ public:
* @retval FALSE If @p aRloc16 does not refer to an active router.
*
*/
static bool IsActiveRouter(uint16_t aRloc16) { return GetChildId(aRloc16) == 0; }
static bool IsActiveRouter(uint16_t aRloc16) { return ChildIdFromRloc16(aRloc16) == 0; }
/**
* This method fills the NetworkDataTlv.
+2 -2
View File
@@ -3501,7 +3501,7 @@ otError MleRouter::GetChildInfoById(uint16_t aChildId, otChildInfo &aChildInfo)
if ((aChildId & ~kMaxChildId) != 0)
{
aChildId = GetChildId(aChildId);
aChildId = ChildIdFromRloc16(aChildId);
}
rloc16 = Get<Mac::Mac>().GetShortAddress() | aChildId;
@@ -3652,7 +3652,7 @@ otError MleRouter::GetChildInfo(Child &aChild, otChildInfo &aChildInfo)
aChildInfo.mExtAddress = aChild.GetExtAddress();
aChildInfo.mTimeout = aChild.GetTimeout();
aChildInfo.mRloc16 = aChild.GetRloc16();
aChildInfo.mChildId = GetChildId(aChild.GetRloc16());
aChildInfo.mChildId = ChildIdFromRloc16(aChild.GetRloc16());
aChildInfo.mNetworkDataVersion = aChild.GetNetworkDataVersion();
aChildInfo.mAge = Time::MsecToSec(TimerMilli::GetNow() - aChild.GetLastHeard());
aChildInfo.mLinkQualityIn = aChild.GetLinkInfo().GetLinkQuality();
+1 -1
View File
@@ -261,7 +261,7 @@ otError NetworkDiagnostic::AppendChildTable(Message &aMessage)
entry.SetReserved(0);
entry.SetTimeout(timeout + 4);
entry.SetChildId(Mle::Mle::GetChildId(child.GetRloc16()));
entry.SetChildId(Mle::Mle::ChildIdFromRloc16(child.GetRloc16()));
entry.SetMode(child.GetDeviceMode());
SuccessOrExit(error = aMessage.Append(&entry, sizeof(ChildTableEntry)));