0.01.00
ot::Child Class Reference

This class represents a Thread Child. More...

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

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

Public Types

enum  {
  kMaxIp6AddressPerChild = OPENTHREAD_CONFIG_IP_ADDRS_PER_CHILD,
  kMaxRequestTlvs = 5
}
 
- Public Types inherited from ot::Neighbor
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::AddressGetIp6Address (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...
 
MessageGetIndirectMessage (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::AddressGetMacAddress (Mac::Address &aMacAddress) const
 This method gets the mac address of child (either rloc16 or extended address depending on UseShortAddress flag). More...
 
- Public Member Functions inherited from ot::Neighbor
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 Child.

Member Function Documentation

§ FindIp6Address()

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.

Parameters
[in]aAddressThe IPv6 address to search for in the IPv6 address list.
[out]aIndexPointer 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.
Return values
OT_ERROR_NONESuccessfully found the address in IPv6 address list and updated aIndex.
OT_ERROR_NOT_FOUNDCould not find the address in the list.

§ GetChallenge()

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

This method gets the current challenge value used during attach.

Returns
The current challenge value.

§ GetChallengeSize()

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

This method gets the challenge size (bytes) used during attach.

Returns
The challenge size (bytes).

§ GetIndirectDataSequenceNumber()

uint8_t ot::Child::GetIndirectDataSequenceNumber ( void  ) const
inline

This method gets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.

Returns
The IEEE 802.15.4 Data Sequence Number value.

§ GetIndirectFragmentOffset()

uint16_t ot::Child::GetIndirectFragmentOffset ( void  ) const
inline

This method gets the 6LoWPAN Fragment Offset to use for indirect transmissions.

Returns
The 6LoWPAN Fragment Offset value.

§ GetIndirectFrameCounter()

uint32_t ot::Child::GetIndirectFrameCounter ( void  ) const
inline

This method gets the IEEE 802.15.4 Frame Counter used during indirect retransmissions.

Returns
The IEEE 802.15.4 Frame Counter value.

§ GetIndirectKeyId()

uint8_t ot::Child::GetIndirectKeyId ( void  ) const
inline

This method gets the IEEE 802.15.4 Key ID to use for indirect retransmissions.

Returns
The IEEE 802.15.4 Key ID value.

§ GetIndirectMessage()

Message* ot::Child::GetIndirectMessage ( void  )
inline

This method gets the message buffer to use for indirect transmissions.

Returns
The message buffer.

§ GetIndirectMessageCount()

uint16_t ot::Child::GetIndirectMessageCount ( void  ) const
inline

This method returns the number of queued message(s) for the child.

Returns
Number of queues message(s).

§ GetIndirectTxAttempts()

uint8_t ot::Child::GetIndirectTxAttempts ( void  ) const
inline

This method gets the number of indirect transmission attempts for the current message.

Returns
The number of indirect transmission attempts.

§ GetIp6Address()

Ip6::Address& ot::Child::GetIp6Address ( uint8_t  aIndex)
inline

This method gets the IPv6 address at index aIndex.

Parameters
[in]aIndexThe index into the IPv6 address list.
Returns
A reference to the IPv6 address entry at index aIndex.

§ GetMacAddress()

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).

Parameters
[out]aMacAddressA reference to a mac address object to which the child's address is copied.
Returns
A (const) reference to the mac address aMacAddress.

§ GetNetworkDataVersion()

uint8_t ot::Child::GetNetworkDataVersion ( void  ) const
inline

This method gets the network data version.

Returns
The network data version.

§ GetRequestTlv()

uint8_t ot::Child::GetRequestTlv ( uint8_t  aIndex) const
inline

This method returns the requested TLV at index aIndex.

Parameters
[in]aIndexThe index into the requested TLV list.
Returns
The requested TLV at index aIndex.

§ GetTimeout()

uint32_t ot::Child::GetTimeout ( void  ) const
inline

This method gets the child timeout.

Returns
The child timeout.

§ IsIndirectSourceMatchPending()

bool ot::Child::IsIndirectSourceMatchPending ( void  ) const
inline

This method indicates whether or not the child needs to be added to the source match table.

Returns
TRUE if the child needs to be added to the source match table, FALSE otherwise.

§ IsIndirectSourceMatchShort()

bool ot::Child::IsIndirectSourceMatchShort ( void  ) const
inline

This method indicates whether or not to source match on the short address.

Returns
TRUE if using the short address, FALSE if using the extended address.

§ RemoveIp6Address()

void ot::Child::RemoveIp6Address ( uint8_t  aIndex)

This method removes the address at index aIndex.

Parameters
[in]aIndexThe index into the IPv6 address list.

§ SetIndirectDataSequenceNumber()

void ot::Child::SetIndirectDataSequenceNumber ( uint8_t  aDsn)
inline

This method sets the IEEE 802.15.4 Data Sequence Number to use during indirect retransmissions.

Parameters
[in]aDsnThe IEEE 802.15.4 Data Sequence Number value.

§ SetIndirectFragmentOffset()

void ot::Child::SetIndirectFragmentOffset ( uint16_t  aFragmentOffset)
inline

This method sets the 6LoWPAN Fragment Offset to use for indirect transmissions.

Parameters
[in]aFragmentOffsetThe 6LoWPAN Fragment Offset value to use.

§ SetIndirectFrameCounter()

void ot::Child::SetIndirectFrameCounter ( uint32_t  aFrameCounter)
inline

This method sets the IEEE 802.15.4 Frame Counter to use during indirect retransmissions.

Parameters
[in]aFrameCounterThe IEEE 802.15.4 Frame Counter value.

§ SetIndirectKeyId()

void ot::Child::SetIndirectKeyId ( uint8_t  aKeyId)
inline

This method sets the IEEE 802.15.4 Key ID value to use for indirect retransmissions.

Parameters
[in]aKeyIdThe IEEE 802.15.4 Key ID value.

§ SetIndirectMessage()

void ot::Child::SetIndirectMessage ( Message aMessage)
inline

This method sets the message buffer to use for indirect transmissions.

Parameters
[in]aMessageThe message buffer.

§ SetIndirectSourceMatchPending()

void ot::Child::SetIndirectSourceMatchPending ( bool  aPending)
inline

This method sets whether or not the child needs to be added to the source match table.

Parameters
[in]aPendingTRUE if the child needs to be added to the source match table, FALSE otherwise.

§ SetIndirectSourceMatchShort()

void ot::Child::SetIndirectSourceMatchShort ( bool  aShort)
inline

This method sets whether or not to source match on the short address.

Parameters
[in]aShortTRUE if using the short address, FALSE if using the extended address.

§ SetNetworkDataVersion()

void ot::Child::SetNetworkDataVersion ( uint8_t  aVersion)
inline

This method sets the network data version.

Parameters
[in]aVersionThe network data version.

§ SetRequestTlv()

void ot::Child::SetRequestTlv ( uint8_t  aIndex,
uint8_t  aType 
)
inline

This method sets the requested TLV at index aIndex.

Parameters
[in]aIndexThe index into the requested TLV list.
[in]aTypeThe TLV type.

§ SetTimeout()

void ot::Child::SetTimeout ( uint32_t  aTimeout)
inline

This method sets the child timeout.

Parameters
[in]aTimeoutThe child timeout.

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