![]() |
0.01.00
|
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... | |
| Neighbor * | ot::Mle::MleRouter::GetNeighbor (uint16_t aAddress) |
| This method returns a pointer to a Neighbor object. More... | |
| Neighbor * | ot::Mle::MleRouter::GetNeighbor (const Mac::ExtAddress &aAddress) |
| This method returns a pointer to a Neighbor object. More... | |
| Neighbor * | ot::Mle::MleRouter::GetNeighbor (const Mac::Address &aAddress) |
| This method returns a pointer to a Neighbor object. More... | |
| Neighbor * | ot::Mle::MleRouter::GetNeighbor (const Ip6::Address &aAddress) |
| This method returns a pointer to a Neighbor object. More... | |
| 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. 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 |
This module includes definitions for MLE functionality required by the Thread Router and Leader roles.
| otError ot::Mle::MleRouter::BecomeLeader | ( | void | ) |
This method causes the Thread interface to become a Leader and start a new partition.
| OT_ERROR_NONE | Successfully become a Leader and started a new partition. |
| OT_ERROR_NOT_CAPABLE | Device is not capable of becoming a leader |
| OT_ERROR_INVALID_STATE | Thread is not enabled |
| otError ot::Mle::MleRouter::BecomeRouter | ( | ThreadStatusTlv::Status | aStatus | ) |
This method generates an Address Solicit request for a Router ID.
| [in] | aStatus | The reason for requesting a Router ID. |
| OT_ERROR_NONE | Successfully generated an Address Solicit message. |
| OT_ERROR_NOT_CAPABLE | Device is not capable of becoming a router |
| OT_ERROR_INVALID_STATE | Thread is not enabled |
| otError ot::Mle::MleRouter::CheckReachability | ( | uint16_t | aMeshSource, |
| uint16_t | aMeshDest, | ||
| Ip6::Header & | aIp6Header | ||
| ) |
This method checks if the destination is reachable.
| [in] | aMeshSource | The RLOC16 of the source. |
| [in] | aMeshDest | The RLOC16 of the destination. |
| [in] | aIp6Header | A reference to the IPv6 header of the message. |
| OT_ERROR_NONE | The destination is reachable. |
| OT_ERROR_DROP | The destination is not reachable and the message should be dropped. |
|
static |
This method indicates whether or not the given Thread partition attributes are preferred.
| [in] | aSingletonA | Whether or not the Thread Partition A has a single router. |
| [in] | aLeaderDataA | A reference to Thread Partition A's Leader Data. |
| [in] | aSingletonB | Whether or not the Thread Partition B has a single router. |
| [in] | aLeaderDataB | A reference to Thread Partition B's Leader Data. |
| 1 | If partition A is preferred. |
| 0 | If partition A and B have equal preference. |
| -1 | If partition B is preferred. |
| void ot::Mle::MleRouter::FillConnectivityTlv | ( | ConnectivityTlv & | aTlv | ) |
This method fills an ConnectivityTlv.
| [out] | aTlv | A reference to the tlv to be filled. |
| void ot::Mle::MleRouter::FillRouteTlv | ( | RouteTlv & | aTlv | ) |
This method fills an RouteTlv.
| [out] | aTlv | A reference to the tlv to be filled. |
| int8_t ot::Mle::MleRouter::GetAssignParentPriority | ( | void | ) | const |
This method gets the assigned parent priority.
| otError ot::Mle::MleRouter::GetChildInfoById | ( | uint16_t | aChildId, |
| otChildInfo & | aChildInfo | ||
| ) |
| otError ot::Mle::MleRouter::GetChildInfoByIndex | ( | uint8_t | aChildIndex, |
| otChildInfo & | aChildInfo | ||
| ) |
This method retains diagnostic information for an attached child by the internal table index.
| [in] | aChildIndex | The table index. |
| [out] | aChildInfo | The child information. |
| 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.
| [in] | aChildIndex | The child index. |
| [in,out] | aIterator | A reference to iterator. On success the iterator will be updated to point to next entry in the list. |
| [out] | aAddress | A reference to an IPv6 address where the child's next address is placed (on success). |
| OT_ERROR_NONE | Successfully found the next address (aAddress and @ aIterator are updated). |
| OT_ERROR_NOT_FOUND | The child has no subsequent IPv6 address entry. |
| OT_ERROR_INVALID_ARGS | Child at aChildIndex is not valid. |
|
inline |
This method gets the ChildTable object.
ChildTable.
|
inline |
This method gets the "child table changed" callback function.
| uint8_t ot::Mle::MleRouter::GetCost | ( | uint16_t | aRloc16 | ) |
This method returns the minimum cost to the given router.
| [in] | aRloc16 | The short address of the given router. |
|
inline |
This method returns the fixed Partition Id of Thread network partition for certification testing.
|
inline |
This method returns the Leader Weighting value for this Thread interface.
| uint8_t ot::Mle::MleRouter::GetLinkCost | ( | uint8_t | aRouterId | ) |
| otError ot::Mle::MleRouter::GetMaxChildTimeout | ( | uint32_t & | aTimeout | ) | const |
This method gets the longest MLE Timeout TLV for all active MTD children.
| [out] | aTimeout | A reference to where the information is placed. |
| OT_ERROR_NONE | Successfully get the max child timeout |
| OT_ERROR_INVALID_STATE | Not an active router |
| OT_ERROR_NOT_FOUND | NO MTD child |
| Neighbor* ot::Mle::MleRouter::GetNeighbor | ( | uint16_t | aAddress | ) |
| Neighbor* ot::Mle::MleRouter::GetNeighbor | ( | const Mac::ExtAddress & | aAddress | ) |
| Neighbor* ot::Mle::MleRouter::GetNeighbor | ( | const Mac::Address & | aAddress | ) |
| Neighbor* ot::Mle::MleRouter::GetNeighbor | ( | const Ip6::Address & | aAddress | ) |
|
inline |
This method returns the NETWORK_ID_TIMEOUT value.
| uint16_t ot::Mle::MleRouter::GetNextHop | ( | uint16_t | aDestination | ) |
This method returns the next hop towards an RLOC16 destination.
| [in] | aDestination | The RLOC16 of the destination. |
| 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.
| [in,out] | aIterator | A reference to the iterator context. To get the first neighbor entry it should be set to OT_NEIGHBOR_INFO_ITERATOR_INIT. |
| [out] | aNeighInfo | The neighbor information. |
| OT_ERROR_NONE | Successfully found the next neighbor entry in table. |
| OT_ERROR_NOT_FOUND | No subsequent neighbor entry exists in the table. |
| uint8_t ot::Mle::MleRouter::GetRouteCost | ( | uint16_t | aRloc16 | ) | const |
This method returns the route cost to a RLOC16.
| [in] | aRloc16 | The RLOC16 of the destination. |
|
inline |
This method returns the ROUTER_DOWNGRADE_THRESHOLD value.
|
inline |
This method returns the ROUTER_SELECTION_JITTER value.
|
inline |
This method returns the current router selection jitter timeout value.
|
inline |
This method returns the ROUTER_UPGRADE_THRESHOLD value.
| Neighbor* ot::Mle::MleRouter::GetRxOnlyNeighborRouter | ( | const Mac::Address & | aAddress | ) |
| bool ot::Mle::MleRouter::HasSleepyChildrenSubscribed | ( | const Ip6::Address & | aAddress | ) |
This method returns whether the device has any sleepy children subscribed the address.
| [in] | aAddress | The reference of the address. |
| TRUE | If the device has any sleepy children subscribed the address aAddress. |
| FALSE | If the device doesn't have any sleepy children subscribed the address aAddress. |
| bool ot::Mle::MleRouter::IsMinimalChild | ( | uint16_t | aRloc16 | ) |
This method indicates whether or not the RLOC16 is an MTD child of this device.
| [in] | aRloc16 | The RLOC16. |
| TRUE | if aRloc16 is an MTD child of this device. |
| FALSE | if aRloc16 is not an MTD child of this device. |
|
inlinestatic |
| bool ot::Mle::MleRouter::IsRouterRoleEnabled | ( | void | ) | const |
| bool ot::Mle::MleRouter::IsSingleton | ( | void | ) |
This method indicates whether a node is the only router on the network.
| TRUE | It is the only router in the network. |
| FALSE | It is a child or is not a single router in the network. |
| bool ot::Mle::MleRouter::IsSleepyChildSubscribed | ( | const Ip6::Address & | aAddress, |
| Child & | aChild | ||
| ) |
This method returns whether the specific child subscribed the address.
| [in] | aAddress | The reference of the address. |
| [in] | aChild | The reference of the child. |
| TRUE | If the sleepy child aChild subscribed the address aAddress. |
| FALSE | If the sleepy child aChild did not subscribe the address aAddress. |
|
static |
This static method converts link quality to route cost.
| [in] | aLinkQuality | The link quality. |
aLinkQuality.
|
explicit |
This constructor initializes the object.
| [in] | aInstance | A reference to the OpenThread instance. |
| otError ot::Mle::MleRouter::RemoveNeighbor | ( | const Mac::Address & | aAddress | ) |
This method removes a link to a neighbor.
| [in] | aAddress | The link address of the neighbor. |
| OT_ERROR_NONE | Successfully removed the neighbor. |
| OT_ERROR_NOT_FOUND | Could not find the neighbor. |
This method removes a link to a neighbor.
| [in] | aNeighbor | A reference to the neighbor object. |
| OT_ERROR_NONE | Successfully removed the neighbor. |
| otError ot::Mle::MleRouter::RemoveStoredChild | ( | uint16_t | aChildRloc16 | ) |
This method remove a stored child information from non-volatile memory.
| [in] | aChildRloc16 | The child RLOC16 to remove. |
| OT_ERROR_NONE | Successfully remove child. |
| OT_ERROR_NOT_FOUND | There is no specified child stored in non-volatile memory. |
| void ot::Mle::MleRouter::ResolveRoutingLoops | ( | uint16_t | aSourceMac, |
| uint16_t | aDestRloc16 | ||
| ) |
This method resolves 2-hop routing loops.
| [in] | aSourceMac | The RLOC16 of the previous hop. |
| [in] | aDestRloc16 | The RLOC16 of the final destination. |
|
inline |
| otError ot::Mle::MleRouter::SetAssignParentPriority | ( | int8_t | aParentPriority | ) |
This method sets the parent priority.
| [in] | aParentPriority | The parent priority value. |
| OT_ERROR_NONE | Successfully set the parent priority. |
| OT_ERROR_INVALID_ARGS | If the parent priority value is not among 1, 0, -1 and -2. |
|
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.
| [in] | aCallback | A pointer to callback handler function. |
|
inline |
This method sets the fixed Partition Id for Thread network partition for certification testing.
| [in] | aPartitionId | The Leader Partition Id. |
|
inline |
This method sets the Leader Weighting value for this Thread interface.
| [in] | aWeight | The Leader Weighting value. |
|
inline |
This method sets the NETWORK_ID_TIMEOUT value.
| [in] | aTimeout | The NETWORK_ID_TIMEOUT value. |
| 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.
| [in] | aRouterId | The preferred Router Id. |
| OT_ERROR_NONE | Successfully set the preferred Router Id. |
| OT_ERROR_INVALID_STATE | Could not set (role is other than detached and disabled) |
|
inline |
This method sets the Partition Id which the device joins successfully.
| [in] | aPartitionId | The Partition Id. |
|
inline |
This method sets the ROUTER_DOWNGRADE_THRESHOLD value.
| void ot::Mle::MleRouter::SetRouterId | ( | uint8_t | aRouterId | ) |
| void ot::Mle::MleRouter::SetRouterRoleEnabled | ( | bool | aEnabled | ) |
| otError ot::Mle::MleRouter::SetRouterSelectionJitter | ( | uint8_t | aRouterJitter | ) |
This method sets the ROUTER_SELECTION_JITTER value.
|
inline |
This method sets the ROUTER_UPGRADE_THRESHOLD value.