0.01.00
ot::Neighbor Class Reference

This class represents a Thread neighbor. More...

#include <src/core/thread/topology.hpp>

Inheritance diagram for ot::Neighbor:
ot::Child ot::Router

Public Types

enum  State {
  kStateInvalid,
  kStateRestored,
  kStateParentRequest,
  kStateChildIdRequest,
  kStateLinkRequest,
  kStateChildUpdateRequest,
  kStateValid
}
 Neighbor link states. More...
 

Public Member Functions

State GetState (void) const
 This method returns the current state. More...
 
void SetState (State aState)
 This method sets the current state. More...
 
bool IsStateRestoring (void) const
 Check if the neighbor/child is being restored. More...
 
bool IsStateValidOrRestoring (void) const
 Check if the neighbor/child is in valid state or if it is being restored. More...
 
uint8_t GetDeviceMode (void) const
 This method gets the device mode flags. More...
 
void SetDeviceMode (uint8_t aMode)
 This method sets the device mode flags. More...
 
bool IsRxOnWhenIdle (void) const
 This method indicates whether or not the device is rx-on-when-idle. More...
 
bool IsFullThreadDevice (void) const
 This method indicates whether or not the device is a Full Thread Device. More...
 
bool IsSecureDataRequest (void) const
 This method indicates whether or not the device uses secure IEEE 802.15.4 Data Request messages. More...
 
bool IsFullNetworkData (void) const
 This method indicates whether or not the device requests Full Network Data. More...
 
void ClearExtAddress (void)
 This method sets all bytes of the Extended Address to zero.
 
Mac::ExtAddressGetExtAddress (void)
 This method returns the Extended Address. More...
 
const Mac::ExtAddressGetExtAddress (void) const
 This method returns the Extended Address. More...
 
void SetExtAddress (const Mac::ExtAddress &aAddress)
 This method sets the Extended Address. More...
 
uint32_t GetKeySequence (void) const
 This method gets the key sequence value. More...
 
void SetKeySequence (uint32_t aKeySequence)
 This method sets the key sequence value. More...
 
uint32_t GetLastHeard (void) const
 This method returns the last heard time. More...
 
void SetLastHeard (uint32_t aLastHeard)
 This method sets the last heard time. More...
 
uint32_t GetLinkFrameCounter (void) const
 This method gets the link frame counter value. More...
 
void SetLinkFrameCounter (uint32_t aFrameCounter)
 This method sets the link frame counter value. More...
 
uint32_t GetMleFrameCounter (void) const
 This method gets the MLE frame counter value. More...
 
void SetMleFrameCounter (uint32_t aFrameCounter)
 This method sets the MLE frame counter value. More...
 
uint16_t GetRloc16 (void) const
 This method gets the RLOC16 value. More...
 
void SetRloc16 (uint16_t aRloc16)
 This method sets the RLOC16 value. More...
 
bool IsDataRequestPending (void) const
 This method indicates whether an IEEE 802.15.4 Data Request message was received. More...
 
void SetDataRequestPending (bool aPending)
 This method sets the indicator for whether an IEEE 802.15.4 Data Request message was received. More...
 
uint8_t GetLinkFailures (void) const
 This method gets the number of consecutive link failures. More...
 
void IncrementLinkFailures (void)
 This method increments the number of consecutive link failures.
 
void ResetLinkFailures (void)
 This method resets the number of consecutive link failures to zero.
 
LinkQualityInfoGetLinkInfo (void)
 This method returns the LinkQualityInfo object. More...
 
void GenerateChallenge (void)
 This method generates a new challenge value for MLE Link Request/Response exchanges.
 
const uint8_t * GetChallenge (void) const
 This method returns the current challenge value for MLE Link Request/Response exchanges. More...
 
uint8_t GetChallengeSize (void) const
 This method returns the size (bytes) of the challenge value for MLE Link Request/Response exchanges. More...
 

Detailed Description

This class represents a Thread neighbor.

Member Enumeration Documentation

§ State

Neighbor link states.

Enumerator
kStateInvalid 

Neighbor link is invalid.

kStateRestored 

Neighbor is restored from non-volatile memory.

kStateParentRequest 

Received an MLE Parent Request message.

kStateChildIdRequest 

Received an MLE Child ID Request message.

kStateLinkRequest 

Sent an MLE Link Request message.

kStateChildUpdateRequest 

Sent an MLE Child Update Request message (trying to restore the child)

kStateValid 

Link is valid.

Member Function Documentation

§ GetChallenge()

const uint8_t* ot::Neighbor::GetChallenge ( void  ) const
inline

This method returns the current challenge value for MLE Link Request/Response exchanges.

Returns
The current challenge value.

§ GetChallengeSize()

uint8_t ot::Neighbor::GetChallengeSize ( void  ) const
inline

This method returns the size (bytes) of the challenge value for MLE Link Request/Response exchanges.

Returns
The size (bytes) of the challenge value for MLE Link Request/Response exchanges.

§ GetDeviceMode()

uint8_t ot::Neighbor::GetDeviceMode ( void  ) const
inline

This method gets the device mode flags.

Returns
The device mode flags.

§ GetExtAddress() [1/2]

Mac::ExtAddress& ot::Neighbor::GetExtAddress ( void  )
inline

This method returns the Extended Address.

Returns
A reference to the Extended Address.

§ GetExtAddress() [2/2]

const Mac::ExtAddress& ot::Neighbor::GetExtAddress ( void  ) const
inline

This method returns the Extended Address.

Returns
A reference to the Extended Address.

§ GetKeySequence()

uint32_t ot::Neighbor::GetKeySequence ( void  ) const
inline

This method gets the key sequence value.

Returns
The key sequence value.

§ GetLastHeard()

uint32_t ot::Neighbor::GetLastHeard ( void  ) const
inline

This method returns the last heard time.

Returns
The last heard time.

§ GetLinkFailures()

uint8_t ot::Neighbor::GetLinkFailures ( void  ) const
inline

This method gets the number of consecutive link failures.

Returns
The number of consecutive link failures.

§ GetLinkFrameCounter()

uint32_t ot::Neighbor::GetLinkFrameCounter ( void  ) const
inline

This method gets the link frame counter value.

Returns
The link frame counter value.

§ GetLinkInfo()

LinkQualityInfo& ot::Neighbor::GetLinkInfo ( void  )
inline

This method returns the LinkQualityInfo object.

Returns
The LinkQualityInfo object.

§ GetMleFrameCounter()

uint32_t ot::Neighbor::GetMleFrameCounter ( void  ) const
inline

This method gets the MLE frame counter value.

Returns
The MLE frame counter value.

§ GetRloc16()

uint16_t ot::Neighbor::GetRloc16 ( void  ) const
inline

This method gets the RLOC16 value.

Returns
The RLOC16 value.

§ GetState()

State ot::Neighbor::GetState ( void  ) const
inline

This method returns the current state.

Returns
The current state.

§ IsDataRequestPending()

bool ot::Neighbor::IsDataRequestPending ( void  ) const
inline

This method indicates whether an IEEE 802.15.4 Data Request message was received.

Returns
TRUE if an IEEE 802.15.4 Data Request message was received, FALSE otherwise.

§ IsFullNetworkData()

bool ot::Neighbor::IsFullNetworkData ( void  ) const
inline

This method indicates whether or not the device requests Full Network Data.

Returns
TRUE if requests Full Network Data, FALSE otherwise.

§ IsFullThreadDevice()

bool ot::Neighbor::IsFullThreadDevice ( void  ) const
inline

This method indicates whether or not the device is a Full Thread Device.

Returns
TRUE if a Full Thread Device, FALSE otherwise.

§ IsRxOnWhenIdle()

bool ot::Neighbor::IsRxOnWhenIdle ( void  ) const
inline

This method indicates whether or not the device is rx-on-when-idle.

Returns
TRUE if rx-on-when-idle, FALSE otherwise.

§ IsSecureDataRequest()

bool ot::Neighbor::IsSecureDataRequest ( void  ) const
inline

This method indicates whether or not the device uses secure IEEE 802.15.4 Data Request messages.

Returns
TRUE if using secure IEEE 802.15.4 Data Request messages, FALSE otherwise.

§ IsStateRestoring()

bool ot::Neighbor::IsStateRestoring ( void  ) const
inline

Check if the neighbor/child is being restored.

Returns
TRUE if the neighbor is being restored, FALSE otherwise.

§ IsStateValidOrRestoring()

bool ot::Neighbor::IsStateValidOrRestoring ( void  ) const
inline

Check if the neighbor/child is in valid state or if it is being restored.

When in these states messages can be sent to and/or received from the neighbor/child.

Returns
TRUE if the neighbor is in valid, restored, or being restored states, FALSE otherwise.

§ SetDataRequestPending()

void ot::Neighbor::SetDataRequestPending ( bool  aPending)
inline

This method sets the indicator for whether an IEEE 802.15.4 Data Request message was received.

Parameters
[in]aPendingTRUE if an IEEE 802.15.4 Data Request message was received, FALSE otherwise.

§ SetDeviceMode()

void ot::Neighbor::SetDeviceMode ( uint8_t  aMode)
inline

This method sets the device mode flags.

Parameters
[in]aModeThe device mode flags.

§ SetExtAddress()

void ot::Neighbor::SetExtAddress ( const Mac::ExtAddress aAddress)
inline

This method sets the Extended Address.

Parameters
[in]aAddressThe Extended Address value to set.

§ SetKeySequence()

void ot::Neighbor::SetKeySequence ( uint32_t  aKeySequence)
inline

This method sets the key sequence value.

Parameters
[in]aKeySequenceThe key sequence value.

§ SetLastHeard()

void ot::Neighbor::SetLastHeard ( uint32_t  aLastHeard)
inline

This method sets the last heard time.

Parameters
[in]aLastHeardThe last heard time.

§ SetLinkFrameCounter()

void ot::Neighbor::SetLinkFrameCounter ( uint32_t  aFrameCounter)
inline

This method sets the link frame counter value.

Parameters
[in]aFrameCounterThe link frame counter value.

§ SetMleFrameCounter()

void ot::Neighbor::SetMleFrameCounter ( uint32_t  aFrameCounter)
inline

This method sets the MLE frame counter value.

Parameters
[in]aFrameCounterThe MLE frame counter value.

§ SetRloc16()

void ot::Neighbor::SetRloc16 ( uint16_t  aRloc16)
inline

This method sets the RLOC16 value.

Parameters
[in]aRloc16The RLOC16 value.

§ SetState()

void ot::Neighbor::SetState ( State  aState)
inline

This method sets the current state.

Parameters
[in]aStateThe state value.

The documentation for this class was generated from the following files: