0.01.00
ot::Mle::Tlv Class Reference

This class implements MLE TLV generation and parsing. More...

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

Inheritance diagram for ot::Mle::Tlv:
ot::Tlv ot::Mle::ActiveTimestampTlv ot::Mle::Address16Tlv ot::Mle::ChallengeTlv ot::Mle::ChannelTlv ot::Mle::ConnectivityTlv ot::Mle::LeaderDataTlv ot::Mle::LinkFrameCounterTlv ot::Mle::LinkMarginTlv ot::Mle::MleFrameCounterTlv ot::Mle::ModeTlv ot::Mle::NetworkDataTlv ot::Mle::PanIdTlv ot::Mle::PendingTimestampTlv ot::Mle::ResponseTlv ot::Mle::RouteTlv ot::Mle::ScanMaskTlv ot::Mle::SourceAddressTlv ot::Mle::StatusTlv ot::Mle::TimeoutTlv ot::Mle::TlvRequestTlv ot::Mle::VersionTlv

Public Types

enum  Type {
  kSourceAddress = 0,
  kMode = 1,
  kTimeout = 2,
  kChallenge = 3,
  kResponse = 4,
  kLinkFrameCounter = 5,
  kLinkQuality = 6,
  kNetworkParameter = 7,
  kMleFrameCounter = 8,
  kRoute = 9,
  kAddress16 = 10,
  kLeaderData = 11,
  kNetworkData = 12,
  kTlvRequest = 13,
  kScanMask = 14,
  kConnectivity = 15,
  kLinkMargin = 16,
  kStatus = 17,
  kVersion = 18,
  kAddressRegistration = 19,
  kChannel = 20,
  kPanId = 21,
  kActiveTimestamp = 22,
  kPendingTimestamp = 23,
  kActiveDataset = 24,
  kPendingDataset = 25,
  kDiscovery = 26,
  kTimeRequest = 252,
  kTimeParameter = 253,
  kXtalAccuracy = 254,
  kInvalid = 255
}
 MLE 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
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...
 
uint16_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 otError GetOffset (const Message &aMessage, Type aType, uint16_t &aOffset)
 This static method obtains the offset of a TLV within 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 MLE TLV generation and parsing.

Member Enumeration Documentation

§ Type

MLE TLV Types.

Enumerator
kSourceAddress 

Source Address TLV.

kMode 

Mode TLV.

kTimeout 

Timeout TLV.

kChallenge 

Challenge TLV.

kResponse 

Response TLV.

kLinkFrameCounter 

Link-Layer Frame Counter TLV.

kLinkQuality 

Link Quality TLV.

kNetworkParameter 

Network Parameter TLV.

kMleFrameCounter 

MLE Frame Counter TLV.

kRoute 

Route64 TLV.

kAddress16 

Address16 TLV.

kLeaderData 

Leader Data TLV.

kNetworkData 

Network Data TLV.

kTlvRequest 

TLV Request TLV.

kScanMask 

Scan Mask TLV.

kConnectivity 

Connectivity TLV.

kLinkMargin 

Link Margin TLV.

kStatus 

Status TLV.

kVersion 

Version TLV.

kAddressRegistration 

Address Registration TLV.

kChannel 

Channel TLV.

kPanId 

PAN ID TLV.

kActiveTimestamp 

Active Timestamp TLV.

kPendingTimestamp 

Pending Timestamp TLV.

kActiveDataset 

Active Operational Dataset TLV.

kPendingDataset 

Pending Operational Dataset TLV.

kDiscovery 

Thread Discovery TLV.

kTimeRequest 

Applicable/Required only when time synchronization service (OPENTHREAD_CONFIG_ENABLE_TIME_SYNC) is enabled.

Time Request TLV

kTimeParameter 

Time Parameter TLV.

kXtalAccuracy 

XTAL Accuracy TLV.

Member Function Documentation

§ GetOffset()

static otError ot::Mle::Tlv::GetOffset ( const Message aMessage,
Type  aType,
uint16_t &  aOffset 
)
inlinestatic

This static method obtains the offset of a TLV within aMessage.

Parameters
[in]aMessageA reference to the message.
[in]aTypeThe Type value to search for.
[out]aOffsetA reference to the offset of the TLV.
Return values
OT_ERROR_NONESuccessfully copied the TLV.
OT_ERROR_NOT_FOUNDCould not find the TLV with Type aType.

§ GetTlv()

static otError ot::Mle::Tlv::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::Mle::Tlv::GetType ( void  ) const
inline

This method returns the Type value.

Returns
The Type value.

§ SetType()

void ot::Mle::Tlv::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: