0.01.00
ot::ThreadTlv Class Reference

This class implements Network Layer TLV generation and parsing. More...

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

Inheritance diagram for ot::ThreadTlv:
ot::Tlv ot::ThreadExtMacAddressTlv ot::ThreadLastTransactionTimeTlv ot::ThreadMeshLocalEidTlv ot::ThreadNetworkDataTlv ot::ThreadRloc16Tlv ot::ThreadRouterMaskTlv ot::ThreadStatusTlv ot::ThreadTargetTlv

Public Types

enum  Type {
  kTarget = 0,
  kExtMacAddress = 1,
  kRloc16 = 2,
  kMeshLocalEid = 3,
  kStatus = 4,
  kLastTransactionTime = 6,
  kRouterMask = 7,
  kNDOption = 8,
  kNDData = 9,
  kThreadNetworkData = 10
}
 Network Layer TLV Types. More...
 

Public Member Functions

Type GetType (void) const
 This method returns the Type value. More...
 
void SetType (Type aType)
 This method sets the Type value. More...
 
- Public Member Functions inherited from ot::Tlv
 Tlv (void)
 Default constructor.
 
uint8_t GetType (void) const
 This method returns the Type value. More...
 
void SetType (uint8_t aType)
 This method sets the Type value. More...
 
uint8_t GetLength (void) const
 This method returns the Length value. More...
 
void SetLength (uint8_t aLength)
 This method sets the Length value. More...
 
uint8_t GetSize (void) const
 This method returns the total size including Type, Length, and Value fields. More...
 
uint8_t * GetValue (void)
 This method returns a pointer to the Value. More...
 
const uint8_t * GetValue (void) const
 This method returns a pointer to the Value. More...
 
TlvGetNext (void)
 This method returns a pointer to the next TLV. More...
 
const TlvGetNext (void) const
 This method returns a pointer to the next TLV. More...
 

Static Public Member Functions

static otError GetTlv (const Message &aMessage, Type aType, uint16_t aMaxLength, Tlv &aTlv)
 This static method reads the requested TLV out of aMessage. More...
 
- Static Public Member Functions inherited from ot::Tlv
static otError Get (const Message &aMessage, uint8_t aType, uint16_t aMaxLength, Tlv &aTlv)
 This static method reads the requested TLV out of aMessage. More...
 
static otError GetOffset (const Message &aMessage, uint8_t aType, uint16_t &aOffset)
 This static method obtains the offset of a TLV within aMessage. More...
 
static otError GetValueOffset (const Message &aMesasge, uint8_t aType, uint16_t &aOffset, uint16_t &aLength)
 This static method finds the offset and length of a given TLV type. More...
 

Additional Inherited Members

- Protected Types inherited from ot::Tlv
enum  { kExtendedLength = 255 }
 Length values. More...
 

Detailed Description

This class implements Network Layer TLV generation and parsing.

Member Enumeration Documentation

§ Type

Network Layer TLV Types.

Enumerator
kTarget 

Target EID TLV.

kExtMacAddress 

Extended MAC Address TLV.

kRloc16 

RLOC16 TLV.

kMeshLocalEid 

ML-EID TLV.

kStatus 

Status TLV.

kLastTransactionTime 

Time Since Last Transaction TLV.

kRouterMask 

Router Mask TLV.

kNDOption 

ND Option TLV.

kNDData 

ND Data TLV.

kThreadNetworkData 

Thread Network Data TLV.

Member Function Documentation

§ GetTlv()

static otError ot::ThreadTlv::GetTlv ( const Message aMessage,
Type  aType,
uint16_t  aMaxLength,
Tlv aTlv 
)
inlinestatic

This static method reads the requested TLV out of aMessage.

Parameters
[in]aMessageA reference to the message.
[in]aTypeThe Type value to search for.
[in]aMaxLengthMaximum number of bytes to read.
[out]aTlvA reference to the TLV that will be copied to.
Return values
OT_ERROR_NONESuccessfully copied the TLV.
OT_ERROR_NOT_FOUNDCould not find the TLV with Type aType.

§ GetType()

Type ot::ThreadTlv::GetType ( void  ) const
inline

This method returns the Type value.

Returns
The Type value.

§ SetType()

void ot::ThreadTlv::SetType ( Type  aType)
inline

This method sets the Type value.

Parameters
[in]aTypeThe Type value.

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