126 bool IsRxOnWhenIdle(
void)
const {
return (mMode & Mle::ModeTlv::kModeRxOnWhenIdle) != 0; }
150 bool IsFullNetworkData(
void)
const {
return (mMode & Mle::ModeTlv::kModeFullNetworkData) != 0; }
228 void SetLinkFrameCounter(uint32_t aFrameCounter) { mValidPending.mValid.mLinkFrameCounter = aFrameCounter; }
244 void SetMleFrameCounter(uint32_t aFrameCounter) { mValidPending.mValid.mMleFrameCounter = aFrameCounter; }
252 uint16_t
GetRloc16(
void)
const {
return mValidPending.mValid.mRloc16; }
260 void SetRloc16(uint16_t aRloc16) { mValidPending.mValid.mRloc16 = aRloc16; }
318 const uint8_t *
GetChallenge(
void)
const {
return mValidPending.mPending.mChallenge; }
346 uint32_t mKeySequence;
349 bool mDataRequest : 1;
350 uint8_t mLinkFailures;
403 void RemoveIp6Address(uint8_t aIndex);
621 void ClearRequestTlvs(
void) { memset(mRequestTlvs, Mle::Tlv::kInvalid,
sizeof(mRequestTlvs)); }
631 uint8_t
GetRequestTlv(uint8_t aIndex)
const {
return mRequestTlvs[aIndex]; }
640 void SetRequestTlv(uint8_t aIndex, uint8_t aType) { mRequestTlvs[aIndex] = aType; }
652 #if OPENTHREAD_ENABLE_CHILD_SUPERVISION 658 void IncrementSecondsSinceLastSupervision(
void) { mSecondsSinceSupervision++; }
666 uint16_t GetSecondsSinceLastSupervision(
void)
const {
return mSecondsSinceSupervision; }
672 void ResetSecondsSinceLastSupervision(
void) { mSecondsSinceSupervision = 0; }
674 #endif // #if OPENTHREAD_ENABLE_CHILD_SUPERVISION 682 uint8_t mRequestTlvs[kMaxRequestTlvs];
686 uint32_t mIndirectFrameCounter;
688 uint16_t mIndirectFragmentOffset;
689 uint8_t mIndirectKeyId;
690 uint8_t mIndirectTxAttempts;
691 uint8_t mIndirectDsn;
692 uint8_t mNetworkDataVersion;
693 uint16_t mQueuedMessageCount : 13;
694 bool mUseShortAddress : 1;
695 bool mSourceMatchPending : 1;
697 #if OPENTHREAD_ENABLE_CHILD_SUPERVISION 698 uint16_t mSecondsSinceSupervision;
699 #endif // OPENTHREAD_ENABLE_CHILD_SUPERVISION 756 void SetCost(uint8_t aCost) { mCost = aCost; }
792 uint8_t mLinkQualityOut : 2;
795 bool mReclaimDelay : 1;
800 #endif // TOPOLOGY_HPP_ void SetTimeout(uint32_t aTimeout)
This method sets the child timeout.
Definition: topology.hpp:419
const uint8_t * GetChallenge(void) const
This method returns the current challenge value for MLE Link Request/Response exchanges.
Definition: topology.hpp:318
bool IsFullNetworkData(void) const
This method indicates whether or not the device requests Full Network Data.
Definition: topology.hpp:150
bool IsStateValidOrRestoring(void) const
Check if the neighbor/child is in valid state or if it is being restored.
Definition: topology.hpp:102
uint32_t GetKeySequence(void) const
This method gets the key sequence value.
Definition: topology.hpp:188
This structure represents an IEEE 802.15.4 Short or Extended Address.
Definition: mac_frame.hpp:147
void SetIndirectFragmentOffset(uint16_t aFragmentOffset)
This method sets the 6LoWPAN Fragment Offset to use for indirect transmissions.
Definition: topology.hpp:505
void SetIndirectKeyId(uint8_t aKeyId)
This method sets the IEEE 802.15.4 Key ID value to use for indirect retransmissions.
Definition: topology.hpp:521
uint8_t GetIndirectTxAttempts(void) const
This method gets the number of indirect transmission attempts for the current message.
Definition: topology.hpp:529
This class implements an IPv6 address object.
Definition: ip6_address.hpp:60
uint8_t GetIndirectDataSequenceNumber(void) const
This method gets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.
Definition: topology.hpp:549
bool IsFullThreadDevice(void) const
This method indicates whether or not the device is a Full Thread Device.
Definition: topology.hpp:134
Ip6::Address & GetIp6Address(uint8_t aIndex)
This method gets the IPv6 address at index aIndex.
Definition: topology.hpp:381
LinkQualityInfo & GetLinkInfo(void)
This method returns the LinkQualityInfo object.
Definition: topology.hpp:304
Received an MLE Child ID Request message.
Definition: topology.hpp:65
Sent an MLE Child Update Request message (trying to restore the child)
Definition: topology.hpp:67
void ClearRequestTlvs(void)
This method clears the requested TLV list.
Definition: topology.hpp:621
void ClearExtAddress(void)
This method sets all bytes of the Extended Address to zero.
Definition: topology.hpp:156
Message * GetIndirectMessage(void)
This method gets the message buffer to use for indirect transmissions.
Definition: topology.hpp:481
bool IsStateRestoring(void) const
Check if the neighbor/child is being restored.
Definition: topology.hpp:93
uint8_t GetNextHop(void) const
This method gets the router ID of the next hop to this router.
Definition: topology.hpp:716
void SetCost(uint8_t aCost)
This method sets the router cost to this router.
Definition: topology.hpp:756
void SetIndirectDataSequenceNumber(uint8_t aDsn)
This method sets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.
Definition: topology.hpp:557
void SetReclaimDelay(bool aReclaimDelay)
This method sets whether the reclaim delay is in effect for this router ID.
Definition: topology.hpp:788
Maximum size in bytes (Thread Specification).
Definition: mle_tlvs.hpp:311
uint32_t GetLastHeard(void) const
This method returns the last heard time.
Definition: topology.hpp:204
uint8_t GetChallengeSize(void) const
This method returns the size (bytes) of the challenge value for MLE Link Request/Response exchanges...
Definition: topology.hpp:326
void ResetIndirectTxAttempts(void)
This method resets the number of indirect transmission attempts to zero.
Definition: topology.hpp:535
const Mac::ExtAddress & GetExtAddress(void) const
This method returns the Extended Address.
Definition: topology.hpp:172
bool IsIndirectSourceMatchShort(void) const
This method indicates whether or not to source match on the short address.
Definition: topology.hpp:565
void SetRloc16(uint16_t aRloc16)
This method sets the RLOC16 value.
Definition: topology.hpp:260
uint16_t GetIndirectMessageCount(void) const
This method returns the number of queued message(s) for the child.
Definition: topology.hpp:597
void SetMleFrameCounter(uint32_t aFrameCounter)
This method sets the MLE frame counter value.
Definition: topology.hpp:244
uint8_t GetLinkFailures(void) const
This method gets the number of consecutive link failures.
Definition: topology.hpp:284
void SetIndirectSourceMatchShort(bool aShort)
This method sets whether or not to source match on the short address.
Definition: topology.hpp:573
This class represents a Thread neighbor.
Definition: topology.hpp:53
void SetState(State aState)
This method sets the current state.
Definition: topology.hpp:85
uint32_t GetLinkFrameCounter(void) const
This method gets the link frame counter value.
Definition: topology.hpp:220
void ResetIndirectMessageCount(void)
This method resets the indirect message count to zero.
Definition: topology.hpp:615
uint8_t mChallengeLength
The challenge length.
Definition: topology.hpp:342
uint32_t GetMleFrameCounter(void) const
This method gets the MLE frame counter value.
Definition: topology.hpp:236
void IncrementIndirectTxAttempts(void)
This method increments the number of indirect transmission attempts.
Definition: topology.hpp:541
bool IsIndirectSourceMatchPending(void) const
This method indicates whether or not the child needs to be added to the source match table...
Definition: topology.hpp:581
Neighbor is restored from non-volatile memory.
Definition: topology.hpp:63
bool IsReclaimDelay(void) const
This method indicates whether the reclaim delay is in effect for this router ID.
Definition: topology.hpp:780
uint16_t mRloc16
The RLOC16.
Definition: topology.hpp:337
uint8_t GetNetworkDataVersion(void) const
This method gets the network data version.
Definition: topology.hpp:427
This structure represents an IEEE 802.15.4 Extended Address.
Definition: mac_frame.hpp:84
This file includes definitions for generating and processing IEEE 802.15.4 MAC frames.
void SetIndirectFrameCounter(uint32_t aFrameCounter)
This method sets the IEEE 802.15.4 Frame Counter to use during indirect retransmissions.
Definition: topology.hpp:473
Sent an MLE Link Request message.
Definition: topology.hpp:66
void SetExtAddress(const Mac::ExtAddress &aAddress)
This method sets the Extended Address.
Definition: topology.hpp:180
This class represents a message.
Definition: message.hpp:195
uint8_t GetCost(void) const
This method get the route cost to this router.
Definition: topology.hpp:748
This file includes definitions for generating and processing MLE TLVs.
void SetDeviceMode(uint8_t aMode)
This method sets the device mode flags.
Definition: topology.hpp:118
uint8_t GetChallengeSize(void) const
This method gets the challenge size (bytes) used during attach.
Definition: topology.hpp:457
uint16_t GetIndirectFragmentOffset(void) const
This method gets the 6LoWPAN Fragment Offset to use for indirect transmissions.
Definition: topology.hpp:497
This file includes definitions for the message buffer pool and message buffers.
void SetRequestTlv(uint8_t aIndex, uint8_t aType)
This method sets the requested TLV at index aIndex.
Definition: topology.hpp:640
State GetState(void) const
This method returns the current state.
Definition: topology.hpp:77
uint16_t GetRloc16(void) const
This method gets the RLOC16 value.
Definition: topology.hpp:252
State
Neighbor link states.
Definition: topology.hpp:60
uint32_t mLinkFrameCounter
The Link Frame Counter.
Definition: topology.hpp:335
void IncrementIndirectMessageCount(void)
This method increments the indirect message count.
Definition: topology.hpp:603
uint8_t GetDeviceMode(void) const
This method gets the device mode flags.
Definition: topology.hpp:110
const uint8_t * GetChallenge(void) const
This method gets the current challenge value used during attach.
Definition: topology.hpp:449
Neighbor link is invalid.
Definition: topology.hpp:62
uint8_t GetRequestTlv(uint8_t aIndex) const
This method returns the requested TLV at index aIndex.
Definition: topology.hpp:631
This class represents a Thread Child.
Definition: topology.hpp:358
bool IsRxOnWhenIdle(void) const
This method indicates whether or not the device is rx-on-when-idle.
Definition: topology.hpp:126
bool IsSecureDataRequest(void) const
This method indicates whether or not the device uses secure IEEE 802.15.4 Data Request messages...
Definition: topology.hpp:142
This class represents a Thread Router.
Definition: topology.hpp:707
void SetDataRequestPending(bool aPending)
This method sets the indicator for whether an IEEE 802.15.4 Data Request message was received...
Definition: topology.hpp:276
Link is valid.
Definition: topology.hpp:68
bool IsDataRequestPending(void) const
This method indicates whether an IEEE 802.15.4 Data Request message was received. ...
Definition: topology.hpp:268
uint32_t GetTimeout(void) const
This method gets the child timeout.
Definition: topology.hpp:411
This file includes definitions for IPv6 packet processing.
void ResetLinkFailures(void)
This method resets the number of consecutive link failures to zero.
Definition: topology.hpp:296
uint32_t mMleFrameCounter
The MLE Frame Counter.
Definition: topology.hpp:336
void SetLastHeard(uint32_t aLastHeard)
This method sets the last heard time.
Definition: topology.hpp:212
#define OPENTHREAD_CONFIG_IP_ADDRS_PER_CHILD
The minimum number of supported IPv6 address registrations per child.
Definition: openthread-core-default-config.h:261
Mac::ExtAddress & GetExtAddress(void)
This method returns the Extended Address.
Definition: topology.hpp:164
void SetLinkFrameCounter(uint32_t aFrameCounter)
This method sets the link frame counter value.
Definition: topology.hpp:228
This file includes the platform abstraction for random number generation.
uint32_t GetIndirectFrameCounter(void) const
This method gets the IEEE 802.15.4 Frame Counter used during indirect retransmissions.
Definition: topology.hpp:465
uint8_t GetLinkQualityOut(void) const
This method gets the link quality out value for this router.
Definition: topology.hpp:732
void SetLinkQualityOut(uint8_t aLinkQuality)
This method sets the link quality out value for this router.
Definition: topology.hpp:740
void ClearIp6Addresses(void)
This method clears the IPv6 addresses for the child.
Definition: topology.hpp:371
void IncrementLinkFailures(void)
This method increments the number of consecutive link failures.
Definition: topology.hpp:290
void DecrementIndirectMessageCount(void)
This method decrements the indirect message count.
Definition: topology.hpp:609
uint8_t GetIndirectKeyId(void) const
This method gets the IEEE 802.15.4 Key ID to use for indirect retransmissions.
Definition: topology.hpp:513
void SetKeySequence(uint32_t aKeySequence)
This method sets the key sequence value.
Definition: topology.hpp:196
void SetIndirectMessage(Message *aMessage)
This method sets the message buffer to use for indirect transmissions.
Definition: topology.hpp:489
uint8_t mChallenge[Mle::ChallengeTlv::kMaxSize]
The challenge value.
Definition: topology.hpp:341
otError
This enumeration represents error codes used throughout OpenThread.
Definition: types.h:107
This file includes compile-time configuration constants for OpenThread.
void GenerateChallenge(void)
This method generates a new challenge value for MLE Link Request/Response exchanges.
Definition: topology.cpp:44
void SetIndirectSourceMatchPending(bool aPending)
This method sets whether or not the child needs to be added to the source match table.
Definition: topology.hpp:589
This class encapsulates/stores all relevant information about quality of a link, including average re...
Definition: link_quality.hpp:163
void SetAllocated(bool aAllocated)
This method sets whether or not this router ID has been allocated.
Definition: topology.hpp:772
void SetNextHop(uint8_t aRouterId)
This method sets the router ID of the next hop to this router.
Definition: topology.hpp:724
This file includes definitions for storing and processing link quality information.
bool IsAllocated(void) const
This method indicates whether or not this router ID has been allocated.
Definition: topology.hpp:764
Received an MLE Parent Request message.
Definition: topology.hpp:64
void SetNetworkDataVersion(uint8_t aVersion)
This method sets the network data version.
Definition: topology.hpp:435