mirror of
https://github.com/espressif/openthread.git
synced 2026-09-06 09:10:04 +00:00
[naming] rename FFD to FTD (#3102)
This commit is contained in:
@@ -71,7 +71,7 @@ public enum class otLinkModeFlags : unsigned int
|
||||
None = 0,
|
||||
RxOnWhenIdle = 0x1, /* 1, if the sender has its receiver on when not transmitting. 0, otherwise. */
|
||||
SecureDataRequests = 0x2, /* 1, if the sender will use IEEE 802.15.4 to secure all data requests. 0, otherwise. */
|
||||
DeviceType = 0x4, /* 1, if the sender is an FFD. 0, otherwise. */
|
||||
DeviceType = 0x4, /* 1, if the sender is an FTD. 0, otherwise. */
|
||||
NetworkData = 0x8 /* 1, if the sender requires the full Network Data. 0, otherwise. */
|
||||
};
|
||||
|
||||
|
||||
@@ -1540,7 +1540,7 @@ enum
|
||||
{
|
||||
kThreadMode_RxOnWhenIdle = (1 << 3),
|
||||
kThreadMode_SecureDataRequest = (1 << 2),
|
||||
kThreadMode_FullFunctionDevice = (1 << 1),
|
||||
kThreadMode_FullThreadDevice = (1 << 1),
|
||||
kThreadMode_FullNetworkData = (1 << 0),
|
||||
};
|
||||
|
||||
@@ -1564,7 +1564,7 @@ otLwfTunIoCtl_otLinkMode(
|
||||
|
||||
if (aLinkMode->mRxOnWhenIdle) numeric_mode |= kThreadMode_RxOnWhenIdle;
|
||||
if (aLinkMode->mSecureDataRequests) numeric_mode |= kThreadMode_SecureDataRequest;
|
||||
if (aLinkMode->mDeviceType) numeric_mode |= kThreadMode_FullFunctionDevice;
|
||||
if (aLinkMode->mDeviceType) numeric_mode |= kThreadMode_FullThreadDevice;
|
||||
if (aLinkMode->mNetworkData) numeric_mode |= kThreadMode_FullNetworkData;
|
||||
|
||||
status =
|
||||
@@ -1615,7 +1615,7 @@ otLwfTunIoCtl_otLinkMode_Handler(
|
||||
|
||||
aLinkMode->mRxOnWhenIdle = ((numeric_mode & kThreadMode_RxOnWhenIdle) == kThreadMode_RxOnWhenIdle);
|
||||
aLinkMode->mSecureDataRequests = ((numeric_mode & kThreadMode_SecureDataRequest) == kThreadMode_SecureDataRequest);
|
||||
aLinkMode->mDeviceType = ((numeric_mode & kThreadMode_FullFunctionDevice) == kThreadMode_FullFunctionDevice);
|
||||
aLinkMode->mDeviceType = ((numeric_mode & kThreadMode_FullThreadDevice) == kThreadMode_FullThreadDevice);
|
||||
aLinkMode->mNetworkData = ((numeric_mode & kThreadMode_FullNetworkData) == kThreadMode_FullNetworkData);
|
||||
|
||||
*OutBufferLength = sizeof(otLinkModeConfig);
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef struct otLinkModeConfig
|
||||
{
|
||||
bool mRxOnWhenIdle : 1; ///< 1, if the sender has its receiver on when not transmitting. 0, otherwise.
|
||||
bool mSecureDataRequests : 1; ///< 1, if the sender uses IEEE 802.15.4 to secure all data requests. 0, otherwise.
|
||||
bool mDeviceType : 1; ///< 1, if the sender is an FFD. 0, otherwise.
|
||||
bool mDeviceType : 1; ///< 1, if the sender is an FTD. 0, otherwise.
|
||||
bool mNetworkData : 1; ///< 1, if the sender requires the full Network Data. 0, otherwise.
|
||||
} otLinkModeConfig;
|
||||
|
||||
@@ -100,7 +100,7 @@ typedef struct
|
||||
uint16_t mMessageErrorRate; ///< (IPv6) msg error rate (0xffff->100%). Requires error tracking feature.
|
||||
bool mRxOnWhenIdle : 1; ///< rx-on-when-idle
|
||||
bool mSecureDataRequest : 1; ///< Secure Data Requests
|
||||
bool mFullFunction : 1; ///< Full Function Device
|
||||
bool mFullThreadDevice : 1; ///< Full Thread Device
|
||||
bool mFullNetworkData : 1; ///< Full Network Data
|
||||
bool mIsChild : 1; ///< Is the neighbor a child
|
||||
} otNeighborInfo;
|
||||
|
||||
@@ -72,7 +72,7 @@ typedef struct
|
||||
uint16_t mMessageErrorRate; ///< (IPv6) msg error rate (0xffff->100%). Requires error tracking feature.
|
||||
bool mRxOnWhenIdle : 1; ///< rx-on-when-idle
|
||||
bool mSecureDataRequest : 1; ///< Secure Data Requests
|
||||
bool mFullFunction : 1; ///< Full Function Device
|
||||
bool mFullThreadDevice : 1; ///< Full Thread Device
|
||||
bool mFullNetworkData : 1; ///< Full Network Data
|
||||
bool mIsStateRestoring : 1; ///< Is in restoring state
|
||||
} otChildInfo;
|
||||
|
||||
+2
-2
@@ -1196,7 +1196,7 @@ Get the Thread Device Mode value.
|
||||
|
||||
* r: rx-on-when-idle
|
||||
* s: Secure IEEE 802.15.4 data requests
|
||||
* d: Full Function Device
|
||||
* d: Full Thread Device
|
||||
* n: Full Network Data
|
||||
|
||||
```bash
|
||||
@@ -1211,7 +1211,7 @@ Set the Thread Device Mode value.
|
||||
|
||||
* r: rx-on-when-idle
|
||||
* s: Secure IEEE 802.15.4 data requests
|
||||
* d: Full Function Device
|
||||
* d: Full Thread Device
|
||||
* n: Full Network Data
|
||||
|
||||
```bash
|
||||
|
||||
+3
-3
@@ -541,7 +541,7 @@ void Interpreter::ProcessChild(int argc, char *argv[])
|
||||
mServer->OutputFormat("| %4d ", childInfo.mNetworkDataVersion);
|
||||
mServer->OutputFormat("|%1d", childInfo.mRxOnWhenIdle);
|
||||
mServer->OutputFormat("|%1d", childInfo.mSecureDataRequest);
|
||||
mServer->OutputFormat("|%1d", childInfo.mFullFunction);
|
||||
mServer->OutputFormat("|%1d", childInfo.mFullThreadDevice);
|
||||
mServer->OutputFormat("|%1d", childInfo.mFullNetworkData);
|
||||
mServer->OutputFormat("| ");
|
||||
|
||||
@@ -587,7 +587,7 @@ void Interpreter::ProcessChild(int argc, char *argv[])
|
||||
mServer->OutputFormat("s");
|
||||
}
|
||||
|
||||
if (childInfo.mFullFunction)
|
||||
if (childInfo.mFullThreadDevice)
|
||||
{
|
||||
mServer->OutputFormat("d");
|
||||
}
|
||||
@@ -1459,7 +1459,7 @@ void Interpreter::ProcessNeighbor(int argc, char *argv[])
|
||||
mServer->OutputFormat("| %9d ", neighborInfo.mLastRssi);
|
||||
mServer->OutputFormat("|%1d", neighborInfo.mRxOnWhenIdle);
|
||||
mServer->OutputFormat("|%1d", neighborInfo.mSecureDataRequest);
|
||||
mServer->OutputFormat("|%1d", neighborInfo.mFullFunction);
|
||||
mServer->OutputFormat("|%1d", neighborInfo.mFullThreadDevice);
|
||||
mServer->OutputFormat("|%1d", neighborInfo.mFullNetworkData);
|
||||
mServer->OutputFormat("| ");
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ otLinkModeConfig otThreadGetLinkMode(otInstance *aInstance)
|
||||
config.mSecureDataRequests = 1;
|
||||
}
|
||||
|
||||
if (mode & Mle::ModeTlv::kModeFFD)
|
||||
if (mode & Mle::ModeTlv::kModeFullThreadDevice)
|
||||
{
|
||||
config.mDeviceType = 1;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ otError otThreadSetLinkMode(otInstance *aInstance, otLinkModeConfig aConfig)
|
||||
|
||||
if (aConfig.mDeviceType)
|
||||
{
|
||||
mode |= Mle::ModeTlv::kModeFFD;
|
||||
mode |= Mle::ModeTlv::kModeFullThreadDevice;
|
||||
}
|
||||
|
||||
if (aConfig.mNetworkData)
|
||||
|
||||
@@ -1888,7 +1888,7 @@ void Mac::HandleReceivedFrame(Frame *aFrame, otError aError)
|
||||
((mRxOnWhenIdle && dstaddr.IsBroadcast()) || dstaddr.GetShort() == mShortAddress),
|
||||
error = OT_ERROR_DESTINATION_ADDRESS_FILTERED);
|
||||
|
||||
// Allow multicasts from neighbor routers if FFD
|
||||
// Allow multicasts from neighbor routers if FTD
|
||||
if (neighbor == NULL && dstaddr.IsBroadcast() && netif.GetMle().IsFullThreadDevice())
|
||||
{
|
||||
neighbor = netif.GetMle().GetRxOnlyNeighborRouter(srcaddr);
|
||||
|
||||
@@ -413,8 +413,8 @@ otError Mle::Restore(void)
|
||||
|
||||
memset(&mParent, 0, sizeof(mParent));
|
||||
mParent.SetExtAddress(*static_cast<Mac::ExtAddress *>(&parentInfo.mExtAddress));
|
||||
mParent.SetDeviceMode(ModeTlv::kModeFFD | ModeTlv::kModeRxOnWhenIdle | ModeTlv::kModeFullNetworkData |
|
||||
ModeTlv::kModeSecureDataRequest);
|
||||
mParent.SetDeviceMode(ModeTlv::kModeFullThreadDevice | ModeTlv::kModeRxOnWhenIdle |
|
||||
ModeTlv::kModeFullNetworkData | ModeTlv::kModeSecureDataRequest);
|
||||
mParent.SetRloc16(GetRloc16(GetRouterId(networkInfo.mRloc16)));
|
||||
mParent.SetState(Neighbor::kStateRestored);
|
||||
|
||||
@@ -809,14 +809,14 @@ otError Mle::SetDeviceMode(uint8_t aDeviceMode)
|
||||
otError error = OT_ERROR_NONE;
|
||||
uint8_t oldMode = mDeviceMode;
|
||||
|
||||
VerifyOrExit((aDeviceMode & ModeTlv::kModeFFD) == 0 || (aDeviceMode & ModeTlv::kModeRxOnWhenIdle) != 0,
|
||||
VerifyOrExit((aDeviceMode & ModeTlv::kModeFullThreadDevice) == 0 || (aDeviceMode & ModeTlv::kModeRxOnWhenIdle) != 0,
|
||||
error = OT_ERROR_INVALID_ARGS);
|
||||
VerifyOrExit(mDeviceMode != aDeviceMode);
|
||||
|
||||
otLogNoteMle(GetInstance(), "Mode 0x%02x -> 0x%02x [rx-on:%s, sec-data-req:%s, ffd:%s, full-netdata:%s]",
|
||||
otLogNoteMle(GetInstance(), "Mode 0x%02x -> 0x%02x [rx-on:%s, sec-data-req:%s, ftd:%s, full-netdata:%s]",
|
||||
mDeviceMode, aDeviceMode, (aDeviceMode & ModeTlv::kModeRxOnWhenIdle) ? "yes" : " no",
|
||||
(aDeviceMode & ModeTlv::kModeSecureDataRequest) ? "yes" : " no",
|
||||
(aDeviceMode & ModeTlv::kModeFFD) ? "yes" : "no",
|
||||
(aDeviceMode & ModeTlv::kModeFullThreadDevice) ? "yes" : "no",
|
||||
(aDeviceMode & ModeTlv::kModeFullNetworkData) ? "yes" : "no");
|
||||
|
||||
mDeviceMode = aDeviceMode;
|
||||
@@ -839,7 +839,7 @@ otError Mle::SetDeviceMode(uint8_t aDeviceMode)
|
||||
|
||||
case OT_DEVICE_ROLE_ROUTER:
|
||||
case OT_DEVICE_ROLE_LEADER:
|
||||
if ((oldMode & ModeTlv::kModeFFD) != 0 && (aDeviceMode & ModeTlv::kModeFFD) == 0)
|
||||
if ((oldMode & ModeTlv::kModeFullThreadDevice) != 0 && (aDeviceMode & ModeTlv::kModeFullThreadDevice) == 0)
|
||||
{
|
||||
BecomeDetached();
|
||||
}
|
||||
@@ -3235,8 +3235,8 @@ otError Mle::HandleParentResponse(const Message &aMessage, const Ip6::MessageInf
|
||||
mParentCandidate.SetRloc16(sourceAddress.GetRloc16());
|
||||
mParentCandidate.SetLinkFrameCounter(linkFrameCounter.GetFrameCounter());
|
||||
mParentCandidate.SetMleFrameCounter(mleFrameCounter.GetFrameCounter());
|
||||
mParentCandidate.SetDeviceMode(ModeTlv::kModeFFD | ModeTlv::kModeRxOnWhenIdle | ModeTlv::kModeFullNetworkData |
|
||||
ModeTlv::kModeSecureDataRequest);
|
||||
mParentCandidate.SetDeviceMode(ModeTlv::kModeFullThreadDevice | ModeTlv::kModeRxOnWhenIdle |
|
||||
ModeTlv::kModeFullNetworkData | ModeTlv::kModeSecureDataRequest);
|
||||
mParentCandidate.GetLinkInfo().Clear();
|
||||
mParentCandidate.GetLinkInfo().AddRss(netif.GetMac().GetNoiseFloor(), linkInfo->mRss);
|
||||
mParentCandidate.ResetLinkFailures();
|
||||
|
||||
@@ -658,7 +658,7 @@ public:
|
||||
* @returns TRUE if a Full Thread Device, FALSE otherwise.
|
||||
*
|
||||
*/
|
||||
bool IsFullThreadDevice(void) const { return (mDeviceMode & ModeTlv::kModeFFD) != 0; }
|
||||
bool IsFullThreadDevice(void) const { return (mDeviceMode & ModeTlv::kModeFullThreadDevice) != 0; }
|
||||
|
||||
/**
|
||||
* This method indicates whether or not the device uses secure IEEE 802.15.4 Data Request messages.
|
||||
@@ -684,8 +684,8 @@ public:
|
||||
*/
|
||||
bool IsMinimalEndDevice(void) const
|
||||
{
|
||||
return (mDeviceMode & (ModeTlv::kModeFFD | ModeTlv::kModeRxOnWhenIdle)) !=
|
||||
(ModeTlv::kModeFFD | ModeTlv::kModeRxOnWhenIdle);
|
||||
return (mDeviceMode & (ModeTlv::kModeFullThreadDevice | ModeTlv::kModeRxOnWhenIdle)) !=
|
||||
(ModeTlv::kModeFullThreadDevice | ModeTlv::kModeRxOnWhenIdle);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -83,7 +83,7 @@ MleRouter::MleRouter(Instance &aInstance)
|
||||
, mRouterSelectionJitterTimeout(0)
|
||||
, mParentPriority(kParentPriorityUnspecified)
|
||||
{
|
||||
mDeviceMode |= ModeTlv::kModeFFD | ModeTlv::kModeFullNetworkData;
|
||||
mDeviceMode |= ModeTlv::kModeFullThreadDevice | ModeTlv::kModeFullNetworkData;
|
||||
|
||||
SetRouterId(kInvalidRouterId);
|
||||
}
|
||||
@@ -991,7 +991,7 @@ otError MleRouter::HandleLinkAccept(const Message & aMessage,
|
||||
router->SetLinkFrameCounter(linkFrameCounter.GetFrameCounter());
|
||||
router->SetMleFrameCounter(mleFrameCounter.GetFrameCounter());
|
||||
router->SetLastHeard(TimerMilli::GetNow());
|
||||
router->SetDeviceMode(ModeTlv::kModeFFD | ModeTlv::kModeRxOnWhenIdle | ModeTlv::kModeFullNetworkData);
|
||||
router->SetDeviceMode(ModeTlv::kModeFullThreadDevice | ModeTlv::kModeRxOnWhenIdle | ModeTlv::kModeFullNetworkData);
|
||||
router->GetLinkInfo().Clear();
|
||||
router->GetLinkInfo().AddRss(GetNetif().GetMac().GetNoiseFloor(), linkInfo->mRss);
|
||||
router->SetLinkQualityOut(LinkQualityInfo::ConvertLinkMarginToLinkQuality(linkMargin.GetLinkMargin()));
|
||||
@@ -2150,7 +2150,7 @@ otError MleRouter::HandleChildIdRequest(const Message & aMessage,
|
||||
VerifyOrExit(pendingTimestamp.IsValid(), error = OT_ERROR_PARSE);
|
||||
}
|
||||
|
||||
if ((mode.GetMode() & ModeTlv::kModeFFD) == 0)
|
||||
if ((mode.GetMode() & ModeTlv::kModeFullThreadDevice) == 0)
|
||||
{
|
||||
SuccessOrExit(error = Tlv::GetOffset(aMessage, Tlv::kAddressRegistration, addressRegistrationOffset));
|
||||
SuccessOrExit(error = UpdateChildAddresses(aMessage, addressRegistrationOffset, *child));
|
||||
@@ -3153,7 +3153,7 @@ otError MleRouter::RemoveNeighbor(Neighbor &aNeighbor)
|
||||
netif.GetMeshForwarder().ClearChildIndirectMessages(static_cast<Child &>(aNeighbor));
|
||||
netif.GetNetworkDataLeader().SendServerDataNotification(aNeighbor.GetRloc16());
|
||||
|
||||
if (aNeighbor.GetDeviceMode() & ModeTlv::kModeFFD)
|
||||
if (aNeighbor.GetDeviceMode() & ModeTlv::kModeFullThreadDevice)
|
||||
{
|
||||
// Clear all EID-to-RLOC entries assossiated with the child.
|
||||
netif.GetAddressResolver().Remove(aNeighbor.GetRloc16());
|
||||
@@ -3614,7 +3614,7 @@ otError MleRouter::GetChildInfo(Child &aChild, otChildInfo &aChildInfo)
|
||||
|
||||
aChildInfo.mRxOnWhenIdle = aChild.IsRxOnWhenIdle();
|
||||
aChildInfo.mSecureDataRequest = aChild.IsSecureDataRequest();
|
||||
aChildInfo.mFullFunction = aChild.IsFullThreadDevice();
|
||||
aChildInfo.mFullThreadDevice = aChild.IsFullThreadDevice();
|
||||
aChildInfo.mFullNetworkData = aChild.IsFullNetworkData();
|
||||
aChildInfo.mIsStateRestoring = aChild.IsStateRestoring();
|
||||
|
||||
@@ -3693,7 +3693,7 @@ exit:
|
||||
#endif
|
||||
aNeighInfo.mRxOnWhenIdle = neighbor->IsRxOnWhenIdle();
|
||||
aNeighInfo.mSecureDataRequest = neighbor->IsSecureDataRequest();
|
||||
aNeighInfo.mFullFunction = neighbor->IsFullThreadDevice();
|
||||
aNeighInfo.mFullThreadDevice = neighbor->IsFullThreadDevice();
|
||||
aNeighInfo.mFullNetworkData = neighbor->IsFullNetworkData();
|
||||
}
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ public:
|
||||
|
||||
/**
|
||||
* This method returns a pointer to a Neighbor object if a one-way link is maintained
|
||||
* as in the instance of an FFD child with neighbor routers.
|
||||
* as in the instance of an FTD child with neighbor routers.
|
||||
*
|
||||
* @param[in] aAddress The address of the Neighbor.
|
||||
*
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
{
|
||||
kModeRxOnWhenIdle = 1 << 3,
|
||||
kModeSecureDataRequest = 1 << 2,
|
||||
kModeFFD = 1 << 1,
|
||||
kModeFullThreadDevice = 1 << 1,
|
||||
kModeFullNetworkData = 1 << 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
{
|
||||
kModeRxOnWhenIdle = 1 << 3,
|
||||
kModeSecureDataRequest = 1 << 2,
|
||||
kModeFFD = 1 << 1,
|
||||
kModeFullThreadDevice = 1 << 1,
|
||||
kModeFullNetworkData = 1 << 0,
|
||||
};
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
* @returns TRUE if a Full Thread Device, FALSE otherwise.
|
||||
*
|
||||
*/
|
||||
bool IsFullThreadDevice(void) const { return (mMode & Mle::ModeTlv::kModeFFD) != 0; }
|
||||
bool IsFullThreadDevice(void) const { return (mMode & Mle::ModeTlv::kModeFullThreadDevice) != 0; }
|
||||
|
||||
/**
|
||||
* This method indicates whether or not the device uses secure IEEE 802.15.4 Data Request messages.
|
||||
|
||||
@@ -62,8 +62,8 @@ otError NcpBase::EncodeChildInfo(const otChildInfo &aChildInfo)
|
||||
otError error = OT_ERROR_NONE;
|
||||
uint8_t modeFlags;
|
||||
|
||||
modeFlags = LinkFlagsToFlagByte(aChildInfo.mRxOnWhenIdle, aChildInfo.mSecureDataRequest, aChildInfo.mFullFunction,
|
||||
aChildInfo.mFullNetworkData);
|
||||
modeFlags = LinkFlagsToFlagByte(aChildInfo.mRxOnWhenIdle, aChildInfo.mSecureDataRequest,
|
||||
aChildInfo.mFullThreadDevice, aChildInfo.mFullNetworkData);
|
||||
|
||||
SuccessOrExit(error = mEncoder.WriteEui64(aChildInfo.mExtAddress));
|
||||
SuccessOrExit(error = mEncoder.WriteUint16(aChildInfo.mRloc16));
|
||||
|
||||
@@ -149,7 +149,7 @@ uint8_t NcpBase::LinkFlagsToFlagByte(bool aRxOnWhenIdle, bool aSecureDataRequest
|
||||
|
||||
if (aDeviceType)
|
||||
{
|
||||
flags |= SPINEL_THREAD_MODE_FULL_FUNCTION_DEV;
|
||||
flags |= SPINEL_THREAD_MODE_FULL_THREAD_DEV;
|
||||
}
|
||||
|
||||
if (aNetworkData)
|
||||
@@ -583,8 +583,8 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_NEIGHBOR_TABLE
|
||||
|
||||
while (otThreadGetNextNeighborInfo(mInstance, &iter, &neighInfo) == OT_ERROR_NONE)
|
||||
{
|
||||
modeFlags = LinkFlagsToFlagByte(neighInfo.mRxOnWhenIdle, neighInfo.mSecureDataRequest, neighInfo.mFullFunction,
|
||||
neighInfo.mFullNetworkData);
|
||||
modeFlags = LinkFlagsToFlagByte(neighInfo.mRxOnWhenIdle, neighInfo.mSecureDataRequest,
|
||||
neighInfo.mFullThreadDevice, neighInfo.mFullNetworkData);
|
||||
|
||||
SuccessOrExit(error = mEncoder.OpenStruct());
|
||||
|
||||
@@ -2207,8 +2207,7 @@ template <> otError NcpBase::HandlePropertySet<SPINEL_PROP_THREAD_MODE>(void)
|
||||
((numericMode & SPINEL_THREAD_MODE_RX_ON_WHEN_IDLE) == SPINEL_THREAD_MODE_RX_ON_WHEN_IDLE);
|
||||
modeConfig.mSecureDataRequests =
|
||||
((numericMode & SPINEL_THREAD_MODE_SECURE_DATA_REQUEST) == SPINEL_THREAD_MODE_SECURE_DATA_REQUEST);
|
||||
modeConfig.mDeviceType =
|
||||
((numericMode & SPINEL_THREAD_MODE_FULL_FUNCTION_DEV) == SPINEL_THREAD_MODE_FULL_FUNCTION_DEV);
|
||||
modeConfig.mDeviceType = ((numericMode & SPINEL_THREAD_MODE_FULL_THREAD_DEV) == SPINEL_THREAD_MODE_FULL_THREAD_DEV);
|
||||
modeConfig.mNetworkData =
|
||||
((numericMode & SPINEL_THREAD_MODE_FULL_NETWORK_DATA) == SPINEL_THREAD_MODE_FULL_NETWORK_DATA);
|
||||
|
||||
|
||||
+1
-1
@@ -273,7 +273,7 @@ enum
|
||||
enum
|
||||
{
|
||||
SPINEL_THREAD_MODE_FULL_NETWORK_DATA = (1 << 0),
|
||||
SPINEL_THREAD_MODE_FULL_FUNCTION_DEV = (1 << 1),
|
||||
SPINEL_THREAD_MODE_FULL_THREAD_DEV = (1 << 1),
|
||||
SPINEL_THREAD_MODE_SECURE_DATA_REQUEST = (1 << 2),
|
||||
SPINEL_THREAD_MODE_RX_ON_WHEN_IDLE = (1 << 3),
|
||||
};
|
||||
|
||||
@@ -202,12 +202,12 @@ Script below shows how to create a 3-node network topology with `node1` and `nod
|
||||
|
||||
>>> print node2.get(wpan.WPAN_THREAD_NEIGHBOR_TABLE)
|
||||
[
|
||||
"EAC1672C3EAB30A4, RLOC16:9401, LQIn:3, AveRssi:-20, LastRssi:-20, Age:30, LinkFC:6, MleFC:0, IsChild:yes, RxOnIdle:yes, FFD:yes, SecDataReq:yes, FullNetData:yes"
|
||||
"A2042C8762576FD5, RLOC16:dc00, LQIn:3, AveRssi:-20, LastRssi:-20, Age:5, LinkFC:21, MleFC:18, IsChild:no, RxOnIdle:yes, FFD:yes, SecDataReq:no, FullNetData:yes"
|
||||
"EAC1672C3EAB30A4, RLOC16:9401, LQIn:3, AveRssi:-20, LastRssi:-20, Age:30, LinkFC:6, MleFC:0, IsChild:yes, RxOnIdle:yes, FTD:yes, SecDataReq:yes, FullNetData:yes"
|
||||
"A2042C8762576FD5, RLOC16:dc00, LQIn:3, AveRssi:-20, LastRssi:-20, Age:5, LinkFC:21, MleFC:18, IsChild:no, RxOnIdle:yes, FTD:yes, SecDataReq:no, FullNetData:yes"
|
||||
]
|
||||
>>> print node1.get(wpan.WPAN_THREAD_NEIGHBOR_TABLE)
|
||||
[
|
||||
"960947C53415DAA1, RLOC16:9400, LQIn:3, AveRssi:-20, LastRssi:-20, Age:18, LinkFC:15, MleFC:11, IsChild:no, RxOnIdle:yes, FFD:yes, SecDataReq:no, FullNetData:yes"
|
||||
"960947C53415DAA1, RLOC16:9400, LQIn:3, AveRssi:-20, LastRssi:-20, Age:18, LinkFC:15, MleFC:11, IsChild:no, RxOnIdle:yes, FTD:yes, SecDataReq:no, FullNetData:yes"
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
@@ -88,7 +88,7 @@ for child in children:
|
||||
verify(int(entry.rloc16, 16) == int(child.get(wpan.WPAN_THREAD_RLOC16), 16))
|
||||
verify(int(entry.timeout, 0) == 120)
|
||||
verify(entry.is_rx_on_when_idle() == False)
|
||||
verify(entry.is_ffd() == False)
|
||||
verify(entry.is_ftd() == False)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -125,7 +125,7 @@ for child in children:
|
||||
|
||||
verify(int(entry.rloc16, 16) == int(child.get(wpan.WPAN_THREAD_RLOC16), 16))
|
||||
verify(entry.is_rx_on_when_idle() == False)
|
||||
verify(entry.is_ffd() == False)
|
||||
verify(entry.is_ftd() == False)
|
||||
verify(entry.is_child() == True)
|
||||
|
||||
# Verify that all other routers are seen in the neighbor table
|
||||
@@ -139,7 +139,7 @@ for router in routers[1:]:
|
||||
|
||||
verify(int(entry.rloc16, 16) == int(router.get(wpan.WPAN_THREAD_RLOC16), 16))
|
||||
verify(entry.is_rx_on_when_idle() == True)
|
||||
verify(entry.is_ffd() == True)
|
||||
verify(entry.is_ftd() == True)
|
||||
verify(entry.is_child() == False)
|
||||
|
||||
|
||||
|
||||
@@ -1113,7 +1113,7 @@ class ChildEntry(object):
|
||||
# Example of expected text:
|
||||
#
|
||||
# `\t"E24C5F67F4B8CBB9, RLOC16:d402, NetDataVer:175, LQIn:3, AveRssi:-20, LastRssi:-20, Timeout:120, Age:0, `
|
||||
# `RxOnIdle:no, FFD:no, SecDataReq:yes, FullNetData:yes"`
|
||||
# `RxOnIdle:no, FTD:no, SecDataReq:yes, FullNetData:yes"`
|
||||
#
|
||||
|
||||
# We get rid of the first two chars `\t"' and last char '"', split the rest using whitespace as separator.
|
||||
@@ -1129,7 +1129,7 @@ class ChildEntry(object):
|
||||
self._rloc16 = dict['RLOC16']
|
||||
self._timeout = dict['Timeout']
|
||||
self._rx_on_idle = (dict['RxOnIdle'] == 'yes')
|
||||
self._ffd = (dict['FFD'] == 'yes')
|
||||
self._ftd = (dict['FTD'] == 'yes')
|
||||
|
||||
@property
|
||||
def ext_address(self):
|
||||
@@ -1146,8 +1146,8 @@ class ChildEntry(object):
|
||||
def is_rx_on_when_idle(self):
|
||||
return self._rx_on_idle
|
||||
|
||||
def is_ffd(self):
|
||||
return self._ffd
|
||||
def is_ftd(self):
|
||||
return self._ftd
|
||||
|
||||
def __repr__(self):
|
||||
return 'ChildEntry({})'.format(self.__dict__)
|
||||
@@ -1165,7 +1165,7 @@ class NeighborEntry(object):
|
||||
# Example of expected text:
|
||||
#
|
||||
# `\t"5AC95ED4646D6565, RLOC16:9403, LQIn:3, AveRssi:-20, LastRssi:-20, Age:0, LinkFC:8, MleFC:0, IsChild:yes, '
|
||||
# 'RxOnIdle:no, FFD:no, SecDataReq:yes, FullNetData:yes"'
|
||||
# 'RxOnIdle:no, FTD:no, SecDataReq:yes, FullNetData:yes"'
|
||||
#
|
||||
|
||||
# We get rid of the first two chars `\t"' and last char '"', split the rest using whitespace as separator.
|
||||
@@ -1181,7 +1181,7 @@ class NeighborEntry(object):
|
||||
self._rloc16 = dict['RLOC16']
|
||||
self._is_child = (dict['IsChild'] == 'yes')
|
||||
self._rx_on_idle = (dict['RxOnIdle'] == 'yes')
|
||||
self._ffd = (dict['FFD'] == 'yes')
|
||||
self._ftd = (dict['FTD'] == 'yes')
|
||||
|
||||
@property
|
||||
def ext_address(self):
|
||||
@@ -1194,8 +1194,8 @@ class NeighborEntry(object):
|
||||
def is_rx_on_when_idle(self):
|
||||
return self._rx_on_idle
|
||||
|
||||
def is_ffd(self):
|
||||
return self._ffd
|
||||
def is_ftd(self):
|
||||
return self._ftd
|
||||
|
||||
def is_child(self):
|
||||
return self._is_child
|
||||
|
||||
@@ -287,7 +287,7 @@ class OpenThread(IThci):
|
||||
mode: thread device mode
|
||||
r: rx-on-when-idle
|
||||
s: secure IEEE 802.15.4 data request
|
||||
d: full function device
|
||||
d: full thread device
|
||||
n: full network data
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -368,7 +368,7 @@ class OpenThread_WpanCtl(IThci):
|
||||
mode: thread device mode. 15=rsdn, 13=rsn, 4=s
|
||||
r: rx-on-when-idle
|
||||
s: secure IEEE 802.15.4 data request
|
||||
d: full function device
|
||||
d: full thread device
|
||||
n: full network data
|
||||
|
||||
Returns:
|
||||
|
||||
Reference in New Issue
Block a user