0.01.00
Router

This module includes definitions for MLE functionality required by the Thread Router and Leader roles. More...

Classes

class  ot::Mle::MleRouter
 This class implements MLE functionality required by the Thread Router and Leader roles. More...
 

Functions

 ot::Mle::MleRouter::MleRouter (Instance &aInstance)
 This constructor initializes the object. More...
 
bool ot::Mle::MleRouter::IsRouterRoleEnabled (void) const
 This method indicates whether or not the Router Role is enabled. More...
 
void ot::Mle::MleRouter::SetRouterRoleEnabled (bool aEnabled)
 This method sets whether or not the Router Role is enabled. More...
 
bool ot::Mle::MleRouter::IsSingleton (void)
 This method indicates whether a node is the only router on the network. More...
 
otError ot::Mle::MleRouter::BecomeRouter (ThreadStatusTlv::Status aStatus)
 This method generates an Address Solicit request for a Router ID. More...
 
otError ot::Mle::MleRouter::BecomeLeader (void)
 This method causes the Thread interface to become a Leader and start a new partition. More...
 
uint8_t ot::Mle::MleRouter::GetLeaderWeight (void) const
 This method returns the Leader Weighting value for this Thread interface. More...
 
void ot::Mle::MleRouter::SetLeaderWeight (uint8_t aWeight)
 This method sets the Leader Weighting value for this Thread interface. More...
 
uint32_t ot::Mle::MleRouter::GetLeaderPartitionId (void) const
 This method returns the fixed Partition Id of Thread network partition for certification testing. More...
 
void ot::Mle::MleRouter::SetLeaderPartitionId (uint32_t aPartitionId)
 This method sets the fixed Partition Id for Thread network partition for certification testing. More...
 
otError ot::Mle::MleRouter::SetPreferredRouterId (uint8_t aRouterId)
 This method sets the preferred Router Id. More...
 
uint32_t ot::Mle::MleRouter::GetPreviousPartitionId (void) const
 This method gets the Partition Id which the device joined successfully once.
 
void ot::Mle::MleRouter::SetPreviousPartitionId (uint32_t aPartitionId)
 This method sets the Partition Id which the device joins successfully. More...
 
void ot::Mle::MleRouter::SetRouterId (uint8_t aRouterId)
 This method sets the Router Id. More...
 
uint16_t ot::Mle::MleRouter::GetNextHop (uint16_t aDestination)
 This method returns the next hop towards an RLOC16 destination. More...
 
uint8_t ot::Mle::MleRouter::GetNetworkIdTimeout (void) const
 This method returns the NETWORK_ID_TIMEOUT value. More...
 
void ot::Mle::MleRouter::SetNetworkIdTimeout (uint8_t aTimeout)
 This method sets the NETWORK_ID_TIMEOUT value. More...
 
uint8_t ot::Mle::MleRouter::GetRouteCost (uint16_t aRloc16) const
 This method returns the route cost to a RLOC16. More...
 
uint8_t ot::Mle::MleRouter::GetLinkCost (uint8_t aRouterId)
 This method returns the link cost to the given Router. More...
 
uint8_t ot::Mle::MleRouter::GetCost (uint16_t aRloc16)
 This method returns the minimum cost to the given router. More...
 
uint8_t ot::Mle::MleRouter::GetRouterSelectionJitter (void) const
 This method returns the ROUTER_SELECTION_JITTER value. More...
 
otError ot::Mle::MleRouter::SetRouterSelectionJitter (uint8_t aRouterJitter)
 This method sets the ROUTER_SELECTION_JITTER value. More...
 
uint8_t ot::Mle::MleRouter::GetRouterSelectionJitterTimeout (void)
 This method returns the current router selection jitter timeout value. More...
 
uint8_t ot::Mle::MleRouter::GetRouterUpgradeThreshold (void) const
 This method returns the ROUTER_UPGRADE_THRESHOLD value. More...
 
void ot::Mle::MleRouter::SetRouterUpgradeThreshold (uint8_t aThreshold)
 This method sets the ROUTER_UPGRADE_THRESHOLD value. More...
 
uint8_t ot::Mle::MleRouter::GetRouterDowngradeThreshold (void) const
 This method returns the ROUTER_DOWNGRADE_THRESHOLD value. More...
 
void ot::Mle::MleRouter::SetRouterDowngradeThreshold (uint8_t aThreshold)
 This method sets the ROUTER_DOWNGRADE_THRESHOLD value. More...
 
otError ot::Mle::MleRouter::RemoveNeighbor (const Mac::Address &aAddress)
 This method removes a link to a neighbor. More...
 
otError ot::Mle::MleRouter::RemoveNeighbor (Neighbor &aNeighbor)
 This method removes a link to a neighbor. More...
 
ChildTable & ot::Mle::MleRouter::GetChildTable (void)
 This method gets the ChildTable object. More...
 
void ot::Mle::MleRouter::RestoreChildren (void)
 This method restores children information from non-volatile memory.
 
otError ot::Mle::MleRouter::RemoveStoredChild (uint16_t aChildRloc16)
 This method remove a stored child information from non-volatile memory. More...
 
otError ot::Mle::MleRouter::StoreChild (const Child &aChild)
 This method store a child information into non-volatile memory. More...
 
Neighborot::Mle::MleRouter::GetNeighbor (uint16_t aAddress)
 This method returns a pointer to a Neighbor object. More...
 
Neighborot::Mle::MleRouter::GetNeighbor (const Mac::ExtAddress &aAddress)
 This method returns a pointer to a Neighbor object. More...
 
Neighborot::Mle::MleRouter::GetNeighbor (const Mac::Address &aAddress)
 This method returns a pointer to a Neighbor object. More...
 
Neighborot::Mle::MleRouter::GetNeighbor (const Ip6::Address &aAddress)
 This method returns a pointer to a Neighbor object. More...
 
Neighborot::Mle::MleRouter::GetRxOnlyNeighborRouter (const Mac::Address &aAddress)
 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. More...
 
otError ot::Mle::MleRouter::GetChildInfoById (uint16_t aChildId, otChildInfo &aChildInfo)
 This method retains diagnostic information for an attached child by Child ID or RLOC16. More...
 
otError ot::Mle::MleRouter::GetChildInfoByIndex (uint8_t aChildIndex, otChildInfo &aChildInfo)
 This method retains diagnostic information for an attached child by the internal table index. More...
 
otError ot::Mle::MleRouter::GetChildNextIp6Address (uint8_t aChildIndex, Child::Ip6AddressIterator &aIterator, Ip6::Address &aAddress)
 This methods gets the next IPv6 address (using an iterator) for a given child. More...
 
bool ot::Mle::MleRouter::IsMinimalChild (uint16_t aRloc16)
 This method indicates whether or not the RLOC16 is an MTD child of this device. More...
 
otError ot::Mle::MleRouter::GetNextNeighborInfo (otNeighborInfoIterator &aIterator, otNeighborInfo &aNeighInfo)
 This method gets the next neighbor information. More...
 
static int ot::Mle::MleRouter::ComparePartitions (bool aSingletonA, const LeaderDataTlv &aLeaderDataA, bool aSingletonB, const LeaderDataTlv &aleaderDataB)
 This method indicates whether or not the given Thread partition attributes are preferred. More...
 
otError ot::Mle::MleRouter::CheckReachability (uint16_t aMeshSource, uint16_t aMeshDest, Ip6::Header &aIp6Header)
 This method checks if the destination is reachable. More...
 
void ot::Mle::MleRouter::ResolveRoutingLoops (uint16_t aSourceMac, uint16_t aDestRloc16)
 This method resolves 2-hop routing loops. More...
 
static bool ot::Mle::MleRouter::IsRouterIdValid (uint8_t aRouterId)
 This method checks if a given Router ID has correct value. More...
 
void ot::Mle::MleRouter::FillConnectivityTlv (ConnectivityTlv &aTlv)
 This method fills an ConnectivityTlv. More...
 
void ot::Mle::MleRouter::FillRouteTlv (RouteTlv &aTlv)
 This method fills an RouteTlv. More...
 
otError ot::Mle::MleRouter::SendChildUpdateRequest (void)
 This method generates an MLE Child Update Request message to be sent to the parent. More...
 
otError ot::Mle::MleRouter::SendLinkRequest (Neighbor *aNeighbor)
 
int8_t ot::Mle::MleRouter::GetAssignParentPriority (void) const
 This method gets the assigned parent priority. More...
 
otError ot::Mle::MleRouter::SetAssignParentPriority (int8_t aParentPriority)
 This method sets the parent priority. More...
 
otError ot::Mle::MleRouter::GetMaxChildTimeout (uint32_t &aTimeout) const
 This method gets the longest MLE Timeout TLV for all active MTD children. More...
 
void ot::Mle::MleRouter::SetChildTableChangedCallback (otThreadChildTableCallback aCallback)
 This method sets the "child table changed" callback function. More...
 
otThreadChildTableCallback ot::Mle::MleRouter::GetChildTableChangedCallback (void) const
 This method gets the "child table changed" callback function. More...
 
bool ot::Mle::MleRouter::HasSleepyChildrenSubscribed (const Ip6::Address &aAddress)
 This method returns whether the device has any sleepy children subscribed the address. More...
 
bool ot::Mle::MleRouter::IsSleepyChildSubscribed (const Ip6::Address &aAddress, Child &aChild)
 This method returns whether the specific child subscribed the address. More...
 
void ot::Mle::MleRouter::ResetAdvertiseInterval (void)
 This method resets the MLE Advertisement Trickle timer interval.
 
RouterTable & ot::Mle::MleRouter::GetRouterTable (void)
 This method returns a reference to the router table object.
 
static uint8_t ot::Mle::MleRouter::LinkQualityToCost (uint8_t aLinkQuality)
 This static method converts link quality to route cost. More...
 

Friends

class ot::Mle::MleRouter::Mle
 

Detailed Description

This module includes definitions for MLE functionality required by the Thread Router and Leader roles.

Function Documentation

§ BecomeLeader()

otError ot::Mle::MleRouter::BecomeLeader ( void  )

This method causes the Thread interface to become a Leader and start a new partition.

Return values
OT_ERROR_NONESuccessfully become a Leader and started a new partition.
OT_ERROR_NOT_CAPABLEDevice is not capable of becoming a leader
OT_ERROR_INVALID_STATEThread is not enabled

§ BecomeRouter()

otError ot::Mle::MleRouter::BecomeRouter ( ThreadStatusTlv::Status  aStatus)

This method generates an Address Solicit request for a Router ID.

Parameters
[in]aStatusThe reason for requesting a Router ID.
Return values
OT_ERROR_NONESuccessfully generated an Address Solicit message.
OT_ERROR_NOT_CAPABLEDevice is not capable of becoming a router
OT_ERROR_INVALID_STATEThread is not enabled

§ CheckReachability()

otError ot::Mle::MleRouter::CheckReachability ( uint16_t  aMeshSource,
uint16_t  aMeshDest,
Ip6::Header aIp6Header 
)

This method checks if the destination is reachable.

Parameters
[in]aMeshSourceThe RLOC16 of the source.
[in]aMeshDestThe RLOC16 of the destination.
[in]aIp6HeaderA reference to the IPv6 header of the message.
Return values
OT_ERROR_NONEThe destination is reachable.
OT_ERROR_DROPThe destination is not reachable and the message should be dropped.

§ ComparePartitions()

static int ot::Mle::MleRouter::ComparePartitions ( bool  aSingletonA,
const LeaderDataTlv aLeaderDataA,
bool  aSingletonB,
const LeaderDataTlv aleaderDataB 
)
static

This method indicates whether or not the given Thread partition attributes are preferred.

Parameters
[in]aSingletonAWhether or not the Thread Partition A has a single router.
[in]aLeaderDataAA reference to Thread Partition A's Leader Data.
[in]aSingletonBWhether or not the Thread Partition B has a single router.
[in]aLeaderDataBA reference to Thread Partition B's Leader Data.
Return values
1If partition A is preferred.
0If partition A and B have equal preference.
-1If partition B is preferred.

§ FillConnectivityTlv()

void ot::Mle::MleRouter::FillConnectivityTlv ( ConnectivityTlv aTlv)

This method fills an ConnectivityTlv.

Parameters
[out]aTlvA reference to the tlv to be filled.

§ FillRouteTlv()

void ot::Mle::MleRouter::FillRouteTlv ( RouteTlv aTlv)

This method fills an RouteTlv.

Parameters
[out]aTlvA reference to the tlv to be filled.

§ GetAssignParentPriority()

int8_t ot::Mle::MleRouter::GetAssignParentPriority ( void  ) const

This method gets the assigned parent priority.

Returns
The assigned parent priority value, -2 means not assigned.

§ GetChildInfoById()

otError ot::Mle::MleRouter::GetChildInfoById ( uint16_t  aChildId,
otChildInfo aChildInfo 
)

This method retains diagnostic information for an attached child by Child ID or RLOC16.

Parameters
[in]aChildIdThe Child ID or RLOC16 for an attached child.
[out]aChildInfoThe child information.

§ GetChildInfoByIndex()

otError ot::Mle::MleRouter::GetChildInfoByIndex ( uint8_t  aChildIndex,
otChildInfo aChildInfo 
)

This method retains diagnostic information for an attached child by the internal table index.

Parameters
[in]aChildIndexThe table index.
[out]aChildInfoThe child information.

§ GetChildNextIp6Address()

otError ot::Mle::MleRouter::GetChildNextIp6Address ( uint8_t  aChildIndex,
Child::Ip6AddressIterator aIterator,
Ip6::Address aAddress 
)

This methods gets the next IPv6 address (using an iterator) for a given child.

Parameters
[in]aChildIndexThe child index.
[in,out]aIteratorA reference to iterator. On success the iterator will be updated to point to next entry in the list.
[out]aAddressA reference to an IPv6 address where the child's next address is placed (on success).
Return values
OT_ERROR_NONESuccessfully found the next address (aAddress and @ aIterator are updated).
OT_ERROR_NOT_FOUNDThe child has no subsequent IPv6 address entry.
OT_ERROR_INVALID_ARGSChild at aChildIndex is not valid.

§ GetChildTable()

ChildTable& ot::Mle::MleRouter::GetChildTable ( void  )
inline

This method gets the ChildTable object.

Returns
A reference to the ChildTable.

§ GetChildTableChangedCallback()

otThreadChildTableCallback ot::Mle::MleRouter::GetChildTableChangedCallback ( void  ) const
inline

This method gets the "child table changed" callback function.

Returns
The callback function pointer.

§ GetCost()

uint8_t ot::Mle::MleRouter::GetCost ( uint16_t  aRloc16)

This method returns the minimum cost to the given router.

Parameters
[in]aRloc16The short address of the given router.
Returns
The minimum cost to the given router (via direct link or forwarding).

§ GetLeaderPartitionId()

uint32_t ot::Mle::MleRouter::GetLeaderPartitionId ( void  ) const
inline

This method returns the fixed Partition Id of Thread network partition for certification testing.

Returns
The Partition Id for this Thread network partition.

§ GetLeaderWeight()

uint8_t ot::Mle::MleRouter::GetLeaderWeight ( void  ) const
inline

This method returns the Leader Weighting value for this Thread interface.

Returns
The Leader Weighting value for this Thread interface.

§ GetLinkCost()

uint8_t ot::Mle::MleRouter::GetLinkCost ( uint8_t  aRouterId)

This method returns the link cost to the given Router.

Parameters
[in]aRouterIdThe Router ID.
Returns
The link cost to the Router.

§ GetMaxChildTimeout()

otError ot::Mle::MleRouter::GetMaxChildTimeout ( uint32_t &  aTimeout) const

This method gets the longest MLE Timeout TLV for all active MTD children.

Parameters
[out]aTimeoutA reference to where the information is placed.
Return values
OT_ERROR_NONESuccessfully get the max child timeout
OT_ERROR_INVALID_STATENot an active router
OT_ERROR_NOT_FOUNDNO MTD child

§ GetNeighbor() [1/4]

Neighbor* ot::Mle::MleRouter::GetNeighbor ( uint16_t  aAddress)

This method returns a pointer to a Neighbor object.

Parameters
[in]aAddressThe address of the Neighbor.
Returns
A pointer to the Neighbor corresponding to aAddress, NULL otherwise.

§ GetNeighbor() [2/4]

Neighbor* ot::Mle::MleRouter::GetNeighbor ( const Mac::ExtAddress aAddress)

This method returns a pointer to a Neighbor object.

Parameters
[in]aAddressThe address of the Neighbor.
Returns
A pointer to the Neighbor corresponding to aAddress, NULL otherwise.

§ GetNeighbor() [3/4]

Neighbor* ot::Mle::MleRouter::GetNeighbor ( const Mac::Address aAddress)

This method returns a pointer to a Neighbor object.

Parameters
[in]aAddressThe address of the Neighbor.
Returns
A pointer to the Neighbor corresponding to aAddress, NULL otherwise.

§ GetNeighbor() [4/4]

Neighbor* ot::Mle::MleRouter::GetNeighbor ( const Ip6::Address aAddress)

This method returns a pointer to a Neighbor object.

Parameters
[in]aAddressThe address of the Neighbor.
Returns
A pointer to the Neighbor corresponding to aAddress, NULL otherwise.

§ GetNetworkIdTimeout()

uint8_t ot::Mle::MleRouter::GetNetworkIdTimeout ( void  ) const
inline

This method returns the NETWORK_ID_TIMEOUT value.

Returns
The NETWORK_ID_TIMEOUT value.

§ GetNextHop()

uint16_t ot::Mle::MleRouter::GetNextHop ( uint16_t  aDestination)

This method returns the next hop towards an RLOC16 destination.

Parameters
[in]aDestinationThe RLOC16 of the destination.
Returns
A RLOC16 of the next hop if a route is known, kInvalidRloc16 otherwise.

§ GetNextNeighborInfo()

otError ot::Mle::MleRouter::GetNextNeighborInfo ( otNeighborInfoIterator aIterator,
otNeighborInfo aNeighInfo 
)

This method gets the next neighbor information.

It is used to iterate through the entries of the neighbor table.

Parameters
[in,out]aIteratorA reference to the iterator context. To get the first neighbor entry it should be set to OT_NEIGHBOR_INFO_ITERATOR_INIT.
[out]aNeighInfoThe neighbor information.
Return values
OT_ERROR_NONESuccessfully found the next neighbor entry in table.
OT_ERROR_NOT_FOUNDNo subsequent neighbor entry exists in the table.

§ GetRouteCost()

uint8_t ot::Mle::MleRouter::GetRouteCost ( uint16_t  aRloc16) const

This method returns the route cost to a RLOC16.

Parameters
[in]aRloc16The RLOC16 of the destination.
Returns
The route cost to a RLOC16.

§ GetRouterDowngradeThreshold()

uint8_t ot::Mle::MleRouter::GetRouterDowngradeThreshold ( void  ) const
inline

This method returns the ROUTER_DOWNGRADE_THRESHOLD value.

Returns
The ROUTER_DOWNGRADE_THRESHOLD value.

§ GetRouterSelectionJitter()

uint8_t ot::Mle::MleRouter::GetRouterSelectionJitter ( void  ) const
inline

This method returns the ROUTER_SELECTION_JITTER value.

Returns
The ROUTER_SELECTION_JITTER value.

§ GetRouterSelectionJitterTimeout()

uint8_t ot::Mle::MleRouter::GetRouterSelectionJitterTimeout ( void  )
inline

This method returns the current router selection jitter timeout value.

Returns
The current router selection jitter timeout value.

§ GetRouterUpgradeThreshold()

uint8_t ot::Mle::MleRouter::GetRouterUpgradeThreshold ( void  ) const
inline

This method returns the ROUTER_UPGRADE_THRESHOLD value.

Returns
The ROUTER_UPGRADE_THRESHOLD value.

§ GetRxOnlyNeighborRouter()

Neighbor* ot::Mle::MleRouter::GetRxOnlyNeighborRouter ( const Mac::Address aAddress)

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.

Parameters
[in]aAddressThe address of the Neighbor.
Returns
A pointer to the Neighbor corresponding to aAddress, NULL otherwise.

§ HasSleepyChildrenSubscribed()

bool ot::Mle::MleRouter::HasSleepyChildrenSubscribed ( const Ip6::Address aAddress)

This method returns whether the device has any sleepy children subscribed the address.

Parameters
[in]aAddressThe reference of the address.
Return values
TRUEIf the device has any sleepy children subscribed the address aAddress.
FALSEIf the device doesn't have any sleepy children subscribed the address aAddress.

§ IsMinimalChild()

bool ot::Mle::MleRouter::IsMinimalChild ( uint16_t  aRloc16)

This method indicates whether or not the RLOC16 is an MTD child of this device.

Parameters
[in]aRloc16The RLOC16.
Return values
TRUEif aRloc16 is an MTD child of this device.
FALSEif aRloc16 is not an MTD child of this device.

§ IsRouterIdValid()

static bool ot::Mle::MleRouter::IsRouterIdValid ( uint8_t  aRouterId)
inlinestatic

This method checks if a given Router ID has correct value.

Parameters
[in]aRouterIdThe Router ID value.
Return values
TRUEIf aRouterId is in correct range [0..62].
FALSEIf aRouterId is not a valid Router ID.

§ IsRouterRoleEnabled()

bool ot::Mle::MleRouter::IsRouterRoleEnabled ( void  ) const

This method indicates whether or not the Router Role is enabled.

Return values
trueIf the Router Role is enabled.
falseIf the Router Role is not enabled.

§ IsSingleton()

bool ot::Mle::MleRouter::IsSingleton ( void  )

This method indicates whether a node is the only router on the network.

Return values
TRUEIt is the only router in the network.
FALSEIt is a child or is not a single router in the network.

§ IsSleepyChildSubscribed()

bool ot::Mle::MleRouter::IsSleepyChildSubscribed ( const Ip6::Address aAddress,
Child aChild 
)

This method returns whether the specific child subscribed the address.

Parameters
[in]aAddressThe reference of the address.
[in]aChildThe reference of the child.
Return values
TRUEIf the sleepy child aChild subscribed the address aAddress.
FALSEIf the sleepy child aChild did not subscribe the address aAddress.

§ LinkQualityToCost()

static uint8_t ot::Mle::MleRouter::LinkQualityToCost ( uint8_t  aLinkQuality)
static

This static method converts link quality to route cost.

Parameters
[in]aLinkQualityThe link quality.
Returns
The link cost corresponding to aLinkQuality.

§ MleRouter()

ot::Mle::MleRouter::MleRouter ( Instance aInstance)
explicit

This constructor initializes the object.

Parameters
[in]aInstanceA reference to the OpenThread instance.

§ RemoveNeighbor() [1/2]

otError ot::Mle::MleRouter::RemoveNeighbor ( const Mac::Address aAddress)

This method removes a link to a neighbor.

Parameters
[in]aAddressThe link address of the neighbor.
Return values
OT_ERROR_NONESuccessfully removed the neighbor.
OT_ERROR_NOT_FOUNDCould not find the neighbor.

§ RemoveNeighbor() [2/2]

otError ot::Mle::MleRouter::RemoveNeighbor ( Neighbor aNeighbor)

This method removes a link to a neighbor.

Parameters
[in]aNeighborA reference to the neighbor object.
Return values
OT_ERROR_NONESuccessfully removed the neighbor.

§ RemoveStoredChild()

otError ot::Mle::MleRouter::RemoveStoredChild ( uint16_t  aChildRloc16)

This method remove a stored child information from non-volatile memory.

Parameters
[in]aChildRloc16The child RLOC16 to remove.
Return values
OT_ERROR_NONESuccessfully remove child.
OT_ERROR_NOT_FOUNDThere is no specified child stored in non-volatile memory.

§ ResolveRoutingLoops()

void ot::Mle::MleRouter::ResolveRoutingLoops ( uint16_t  aSourceMac,
uint16_t  aDestRloc16 
)

This method resolves 2-hop routing loops.

Parameters
[in]aSourceMacThe RLOC16 of the previous hop.
[in]aDestRloc16The RLOC16 of the final destination.

§ SendChildUpdateRequest()

otError ot::Mle::MleRouter::SendChildUpdateRequest ( void  )
inline

This method generates an MLE Child Update Request message to be sent to the parent.

Return values
OT_ERROR_NONESuccessfully generated an MLE Child Update Request message.
OT_ERROR_NO_BUFSInsufficient buffers to generate the MLE Child Update Request message.

§ SetAssignParentPriority()

otError ot::Mle::MleRouter::SetAssignParentPriority ( int8_t  aParentPriority)

This method sets the parent priority.

Parameters
[in]aParentPriorityThe parent priority value.
Return values
OT_ERROR_NONESuccessfully set the parent priority.
OT_ERROR_INVALID_ARGSIf the parent priority value is not among 1, 0, -1 and -2.

§ SetChildTableChangedCallback()

void ot::Mle::MleRouter::SetChildTableChangedCallback ( otThreadChildTableCallback  aCallback)
inline

This method sets the "child table changed" callback function.

The provided callback (if non-NULL) will be invoked when a child entry is being added/remove to/from the child table. Subsequent calls to this method will overwrite the previous callback.

Parameters
[in]aCallbackA pointer to callback handler function.

§ SetLeaderPartitionId()

void ot::Mle::MleRouter::SetLeaderPartitionId ( uint32_t  aPartitionId)
inline

This method sets the fixed Partition Id for Thread network partition for certification testing.

Parameters
[in]aPartitionIdThe Leader Partition Id.

§ SetLeaderWeight()

void ot::Mle::MleRouter::SetLeaderWeight ( uint8_t  aWeight)
inline

This method sets the Leader Weighting value for this Thread interface.

Parameters
[in]aWeightThe Leader Weighting value.

§ SetNetworkIdTimeout()

void ot::Mle::MleRouter::SetNetworkIdTimeout ( uint8_t  aTimeout)
inline

This method sets the NETWORK_ID_TIMEOUT value.

Parameters
[in]aTimeoutThe NETWORK_ID_TIMEOUT value.

§ SetPreferredRouterId()

otError ot::Mle::MleRouter::SetPreferredRouterId ( uint8_t  aRouterId)

This method sets the preferred Router Id.

Upon becoming a router/leader the node attempts to use this Router Id. If the preferred Router Id is not set or if it can not be used, a randomly generated router Id is picked. This property can be set when he device role is detached or disabled.

Parameters
[in]aRouterIdThe preferred Router Id.
Return values
OT_ERROR_NONESuccessfully set the preferred Router Id.
OT_ERROR_INVALID_STATECould not set (role is other than detached and disabled)

§ SetPreviousPartitionId()

void ot::Mle::MleRouter::SetPreviousPartitionId ( uint32_t  aPartitionId)
inline

This method sets the Partition Id which the device joins successfully.

Parameters
[in]aPartitionIdThe Partition Id.

§ SetRouterDowngradeThreshold()

void ot::Mle::MleRouter::SetRouterDowngradeThreshold ( uint8_t  aThreshold)
inline

This method sets the ROUTER_DOWNGRADE_THRESHOLD value.

Returns
The ROUTER_DOWNGRADE_THRESHOLD value.

§ SetRouterId()

void ot::Mle::MleRouter::SetRouterId ( uint8_t  aRouterId)

This method sets the Router Id.

Parameters
[in]aRouterIdThe Router Id.

§ SetRouterRoleEnabled()

void ot::Mle::MleRouter::SetRouterRoleEnabled ( bool  aEnabled)

This method sets whether or not the Router Role is enabled.

If aEnable is false and the device is currently operating as a router, this call will cause the device to detach and attempt to reattach as a child.

Parameters
[in]aEnabledTRUE to enable the Router Role, FALSE otherwise.

§ SetRouterSelectionJitter()

otError ot::Mle::MleRouter::SetRouterSelectionJitter ( uint8_t  aRouterJitter)

This method sets the ROUTER_SELECTION_JITTER value.

Returns
The ROUTER_SELECTION_JITTER value.

§ SetRouterUpgradeThreshold()

void ot::Mle::MleRouter::SetRouterUpgradeThreshold ( uint8_t  aThreshold)
inline

This method sets the ROUTER_UPGRADE_THRESHOLD value.

Returns
The ROUTER_UPGRADE_THRESHOLD value.

§ StoreChild()

otError ot::Mle::MleRouter::StoreChild ( const Child aChild)

This method store a child information into non-volatile memory.

Parameters
[in]aChildA reference to the child to store.
Return values
OT_ERROR_NONESuccessfully store child.
OT_ERROR_NO_BUFSInsufficient available buffers to store child.