![]() |
0.01.00
|
This class represents a Thread Child. More...
#include <src/core/thread/topology.hpp>
Public Types | |
enum | { kMaxIp6AddressPerChild = OPENTHREAD_CONFIG_IP_ADDRS_PER_CHILD, kMaxRequestTlvs = 5 } |
![]() | |
enum | State { kStateInvalid, kStateRestored, kStateParentRequest, kStateChildIdRequest, kStateLinkRequest, kStateChildUpdateRequest, kStateValid } |
Neighbor link states. More... | |
Public Member Functions | |
void | ClearIp6Addresses (void) |
This method clears the IPv6 addresses for the child. | |
Ip6::Address & | GetIp6Address (uint8_t aIndex) |
This method gets the IPv6 address at index aIndex . More... | |
otError | FindIp6Address (const Ip6::Address &aAddress, uint8_t *aIndex) const |
This method searches for a given IPv6 address in the child's IPv6 address list and provides the index of the address in the list if it is found. More... | |
void | RemoveIp6Address (uint8_t aIndex) |
This method removes the address at index aIndex . More... | |
uint32_t | GetTimeout (void) const |
This method gets the child timeout. More... | |
void | SetTimeout (uint32_t aTimeout) |
This method sets the child timeout. More... | |
uint8_t | GetNetworkDataVersion (void) const |
This method gets the network data version. More... | |
void | SetNetworkDataVersion (uint8_t aVersion) |
This method sets the network data version. More... | |
void | GenerateChallenge (void) |
This method generates a new challenge value to use during a child attach. | |
const uint8_t * | GetChallenge (void) const |
This method gets the current challenge value used during attach. More... | |
uint8_t | GetChallengeSize (void) const |
This method gets the challenge size (bytes) used during attach. More... | |
uint32_t | GetIndirectFrameCounter (void) const |
This method gets the IEEE 802.15.4 Frame Counter used during indirect retransmissions. More... | |
void | SetIndirectFrameCounter (uint32_t aFrameCounter) |
This method sets the IEEE 802.15.4 Frame Counter to use during indirect retransmissions. More... | |
Message * | GetIndirectMessage (void) |
This method gets the message buffer to use for indirect transmissions. More... | |
void | SetIndirectMessage (Message *aMessage) |
This method sets the message buffer to use for indirect transmissions. More... | |
uint16_t | GetIndirectFragmentOffset (void) const |
This method gets the 6LoWPAN Fragment Offset to use for indirect transmissions. More... | |
void | SetIndirectFragmentOffset (uint16_t aFragmentOffset) |
This method sets the 6LoWPAN Fragment Offset to use for indirect transmissions. More... | |
uint8_t | GetIndirectKeyId (void) const |
This method gets the IEEE 802.15.4 Key ID to use for indirect retransmissions. More... | |
void | SetIndirectKeyId (uint8_t aKeyId) |
This method sets the IEEE 802.15.4 Key ID value to use for indirect retransmissions. More... | |
uint8_t | GetIndirectTxAttempts (void) const |
This method gets the number of indirect transmission attempts for the current message. More... | |
void | ResetIndirectTxAttempts (void) |
This method resets the number of indirect transmission attempts to zero. | |
void | IncrementIndirectTxAttempts (void) |
This method increments the number of indirect transmission attempts. | |
uint8_t | GetIndirectDataSequenceNumber (void) const |
This method gets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions. More... | |
void | SetIndirectDataSequenceNumber (uint8_t aDsn) |
This method sets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions. More... | |
bool | IsIndirectSourceMatchShort (void) const |
This method indicates whether or not to source match on the short address. More... | |
void | SetIndirectSourceMatchShort (bool aShort) |
This method sets whether or not to source match on the short address. More... | |
bool | IsIndirectSourceMatchPending (void) const |
This method indicates whether or not the child needs to be added to the source match table. More... | |
void | SetIndirectSourceMatchPending (bool aPending) |
This method sets whether or not the child needs to be added to the source match table. More... | |
uint16_t | GetIndirectMessageCount (void) const |
This method returns the number of queued message(s) for the child. More... | |
void | IncrementIndirectMessageCount (void) |
This method increments the indirect message count. | |
void | DecrementIndirectMessageCount (void) |
This method decrements the indirect message count. | |
void | ResetIndirectMessageCount (void) |
This method resets the indirect message count to zero. | |
void | ClearRequestTlvs (void) |
This method clears the requested TLV list. | |
uint8_t | GetRequestTlv (uint8_t aIndex) const |
This method returns the requested TLV at index aIndex . More... | |
void | SetRequestTlv (uint8_t aIndex, uint8_t aType) |
This method sets the requested TLV at index aIndex . More... | |
const Mac::Address & | GetMacAddress (Mac::Address &aMacAddress) const |
This method gets the mac address of child (either rloc16 or extended address depending on UseShortAddress flag). More... | |
![]() | |
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::ExtAddress & | GetExtAddress (void) |
This method returns the Extended Address. More... | |
const Mac::ExtAddress & | GetExtAddress (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. | |
LinkQualityInfo & | GetLinkInfo (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... | |
This class represents a Thread Child.
otError ot::Child::FindIp6Address | ( | const Ip6::Address & | aAddress, |
uint8_t * | aIndex | ||
) | const |
This method searches for a given IPv6 address in the child's IPv6 address list and provides the index of the address in the list if it is found.
[in] | aAddress | The IPv6 address to search for in the IPv6 address list. |
[out] | aIndex | Pointer to variable where the index of address is provided if address is found in the list. aIndex can be set NULL if index is not required. |
OT_ERROR_NONE | Successfully found the address in IPv6 address list and updated aIndex . |
OT_ERROR_NOT_FOUND | Could not find the address in the list. |
|
inline |
This method gets the current challenge value used during attach.
|
inline |
This method gets the challenge size (bytes) used during attach.
|
inline |
This method gets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.
|
inline |
This method gets the 6LoWPAN Fragment Offset to use for indirect transmissions.
|
inline |
This method gets the IEEE 802.15.4 Frame Counter used during indirect retransmissions.
|
inline |
This method gets the IEEE 802.15.4 Key ID to use for indirect retransmissions.
|
inline |
This method gets the message buffer to use for indirect transmissions.
|
inline |
This method returns the number of queued message(s) for the child.
|
inline |
This method gets the number of indirect transmission attempts for the current message.
|
inline |
This method gets the IPv6 address at index aIndex
.
[in] | aIndex | The index into the IPv6 address list. |
aIndex
. const Mac::Address & ot::Child::GetMacAddress | ( | Mac::Address & | aMacAddress | ) | const |
This method gets the mac address of child (either rloc16 or extended address depending on UseShortAddress
flag).
[out] | aMacAddress | A reference to a mac address object to which the child's address is copied. |
|
inline |
This method gets the network data version.
|
inline |
This method returns the requested TLV at index aIndex
.
[in] | aIndex | The index into the requested TLV list. |
aIndex
.
|
inline |
This method gets the child timeout.
|
inline |
This method indicates whether or not the child needs to be added to the source match table.
|
inline |
This method indicates whether or not to source match on the short address.
void ot::Child::RemoveIp6Address | ( | uint8_t | aIndex | ) |
This method removes the address at index aIndex
.
[in] | aIndex | The index into the IPv6 address list. |
|
inline |
This method sets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.
[in] | aDsn | The IEEE 802.15.4 Data Sequence Number value. |
|
inline |
This method sets the 6LoWPAN Fragment Offset to use for indirect transmissions.
[in] | aFragmentOffset | The 6LoWPAN Fragment Offset value to use. |
|
inline |
This method sets the IEEE 802.15.4 Frame Counter to use during indirect retransmissions.
[in] | aFrameCounter | The IEEE 802.15.4 Frame Counter value. |
|
inline |
This method sets the IEEE 802.15.4 Key ID value to use for indirect retransmissions.
[in] | aKeyId | The IEEE 802.15.4 Key ID value. |
|
inline |
This method sets the message buffer to use for indirect transmissions.
[in] | aMessage | The message buffer. |
|
inline |
This method sets whether or not the child needs to be added to the source match table.
[in] | aPending | TRUE if the child needs to be added to the source match table, FALSE otherwise. |
|
inline |
This method sets whether or not to source match on the short address.
[in] | aShort | TRUE if using the short address, FALSE if using the extended address. |
|
inline |
This method sets the network data version.
[in] | aVersion | The network data version. |
|
inline |
This method sets the requested TLV at index aIndex
.
[in] | aIndex | The index into the requested TLV list. |
[in] | aType | The TLV type. |
|
inline |
This method sets the child timeout.
[in] | aTimeout | The child timeout. |