OpenThread  1.05.03.02
Public Member Functions | Private Attributes | Static Private Attributes
ConnectivityTlv Class Reference

#include <mle_tlvs.hpp>

+ Inheritance diagram for ConnectivityTlv:
+ Collaboration diagram for ConnectivityTlv:

Public Member Functions

uint8_t GetActiveRouters (void) const
 
uint8_t GetIdSequence (void) const
 
uint8_t GetLeaderCost (void) const
 
uint8_t GetLinkQuality1 (void) const
 
uint8_t GetLinkQuality2 (void) const
 
uint8_t GetLinkQuality3 (void) const
 
int8_t GetParentPriority (void) const
 
uint16_t GetSedBufferSize (void) const
 
uint8_t GetSedDatagramCount (void) const
 
void Init (void)
 
bool IsSedBufferingIncluded (void) const
 
bool IsValid (void) const
 
void SetActiveRouters (uint8_t aActiveRouters)
 
void SetIdSequence (uint8_t aSequence)
 
void SetLeaderCost (uint8_t aCost)
 
void SetLinkQuality1 (uint8_t aLinkQuality)
 
void SetLinkQuality2 (uint8_t aLinkQuality)
 
void SetLinkQuality3 (uint8_t aLinkQuality)
 
void SetParentPriority (int8_t aParentPriority)
 
void SetSedBufferSize (uint16_t aSedBufferSize)
 
void SetSedDatagramCount (uint8_t aSedDatagramCount)
 
- Public Member Functions inherited from Tlv
Type GetType (void) const
 
void SetType (Type aType)
 
- Public Member Functions inherited from Tlv
Error AppendTo (Message &aMessage) const
 
uint8_t GetLength (void) const
 
TlvGetNext (void)
 
const TlvGetNext (void) const
 
uint32_t GetSize (void) const
 
uint8_t GetType (void) const
 
uint8_t * GetValue (void)
 
const uint8_t * GetValue (void) const
 
bool IsExtended (void) const
 
void SetLength (uint8_t aLength)
 
void SetType (uint8_t aType)
 

Private Attributes

uint8_t mActiveRouters
 
uint8_t mIdSequence
 
uint8_t mLeaderCost
 
uint8_t mLinkQuality1
 
uint8_t mLinkQuality2
 
uint8_t mLinkQuality3
 
uint8_t mParentPriority
 
uint16_t mSedBufferSize
 
uint8_t mSedDatagramCount
 

Static Private Attributes

static constexpr uint8_t kParentPriorityMask = 3 << kParentPriorityOffset
 
static constexpr uint8_t kParentPriorityOffset = 6
 

Additional Inherited Members

- Public Types inherited from Tlv
enum  Type : uint8_t {
  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, kCslChannel = 80,
  kCslTimeout = 85, kCslClockAccuracy = 86, kLinkMetricsQuery = 87, kLinkMetricsManagement = 88,
  kLinkMetricsReport = 89, kLinkProbe = 90, kTimeRequest = 252, kTimeParameter = 253,
  kXtalAccuracy = 254, kInvalid = 255
}
 
- Static Public Member Functions inherited from Tlv
template<typename TlvType >
static Error Append (Message &aMessage, const void *aValue, uint8_t aLength)
 
template<typename SimpleTlvType >
static Error Append (Message &aMessage, const typename SimpleTlvType::ValueType &aValue)
 
template<typename UintTlvType >
static Error Append (Message &aMessage, typename UintTlvType::UintValueType aValue)
 
template<typename TlvType >
static Error Find (const Message &aMessage, void *aValue, uint8_t aLength)
 
template<typename SimpleTlvType >
static Error Find (const Message &aMessage, typename SimpleTlvType::ValueType &aValue)
 
template<typename UintTlvType >
static Error Find (const Message &aMessage, typename UintTlvType::UintValueType &aValue)
 
static Error FindTlv (const Message &aMessage, uint8_t aType, uint16_t aMaxSize, Tlv &aTlv)
 
template<typename TlvType >
static Error FindTlv (const Message &aMessage, TlvType &aTlv)
 
static Error FindTlvOffset (const Message &aMessage, uint8_t aType, uint16_t &aOffset)
 
static Error FindTlvValueOffset (const Message &aMessage, uint8_t aType, uint16_t &aValueOffset, uint16_t &aLength)
 
template<typename SimpleTlvType >
static Error Read (const Message &aMessage, uint16_t aOffset, typename SimpleTlvType::ValueType &aValue)
 
template<typename UintTlvType >
static Error Read (const Message &aMessage, uint16_t aOffset, typename UintTlvType::UintValueType &aValue)
 
static Error ReadTlv (const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength)
 
- Static Public Attributes inherited from Tlv
static constexpr uint8_t kBaseTlvMaxLength = OT_NETWORK_BASE_TLV_MAX_LENGTH
 
- Static Public Attributes inherited from TlvInfo< Tlv::kConnectivity >
static constexpr uint8_t kType
 The TLV Type value. More...
 
- Static Protected Attributes inherited from Tlv
static const uint8_t kExtendedLength = 255
 

Detailed Description

This class implements Connectivity TLV generation and parsing.

Member Function Documentation

§ Init()

void Init ( void  )
inline

This method initializes the TLV.

References Tlv::kConnectivity, Tlv::SetLength(), and Tlv::SetType().

Referenced by Mle::TxMessage::SendAfterDelay().

§ IsValid()

bool IsValid ( void  ) const
inline

This method indicates whether or not the TLV appears to be well-formed.

Return values
TRUEIf the TLV appears to be well-formed.
FALSEIf the TLV does not appear to be well-formed.

References Tlv::GetLength().

Referenced by Mle::HandleParentResponse().

§ IsSedBufferingIncluded()

bool IsSedBufferingIncluded ( void  ) const
inline

This method indicates whether or not the sed buffer size and datagram count are included.

Return values
TRUEIf the sed buffer size and datagram count are included.
FALSEIf the sed buffer size and datagram count are not included.

References Tlv::GetLength().

§ GetParentPriority()

int8_t GetParentPriority ( void  ) const
inline

This method returns the Parent Priority value.

Returns
The Parent Priority value.

Referenced by Mle::HandleParentResponse(), and Mle::IsBetterParent().

§ SetParentPriority()

void SetParentPriority ( int8_t  aParentPriority)
inline

This method sets the Parent Priority value.

Parameters
[in]aParentPriorityThe Parent Priority value.

§ GetLinkQuality3()

uint8_t GetLinkQuality3 ( void  ) const
inline

This method returns the Link Quality 3 value.

Returns
The Link Quality 3 value.

Referenced by Mle::HandleParentResponse(), and Mle::IsBetterParent().

§ SetLinkQuality3()

void SetLinkQuality3 ( uint8_t  aLinkQuality)
inline

This method sets the Link Quality 3 value.

Parameters
[in]aLinkQualityThe Link Quality 3 value.

§ GetLinkQuality2()

uint8_t GetLinkQuality2 ( void  ) const
inline

This method returns the Link Quality 2 value.

Returns
The Link Quality 2 value.

Referenced by Mle::HandleParentResponse(), and Mle::IsBetterParent().

§ SetLinkQuality2()

void SetLinkQuality2 ( uint8_t  aLinkQuality)
inline

This method sets the Link Quality 2 value.

Parameters
[in]aLinkQualityThe Link Quality 2 value.

§ GetLinkQuality1()

uint8_t GetLinkQuality1 ( void  ) const
inline

This method sets the Link Quality 1 value.

Returns
The Link Quality 1 value.

Referenced by Mle::HandleParentResponse(), and Mle::IsBetterParent().

§ SetLinkQuality1()

void SetLinkQuality1 ( uint8_t  aLinkQuality)
inline

This method sets the Link Quality 1 value.

Parameters
[in]aLinkQualityThe Link Quality 1 value.

§ GetActiveRouters()

uint8_t GetActiveRouters ( void  ) const
inline

This method sets the Active Routers value.

Returns
The Active Routers value.

Referenced by Mle::HandleParentResponse().

§ SetActiveRouters()

void SetActiveRouters ( uint8_t  aActiveRouters)
inline

This method sets the Active Routers value.

Parameters
[in]aActiveRoutersThe Active Routers value.

§ GetLeaderCost()

uint8_t GetLeaderCost ( void  ) const
inline

This method returns the Leader Cost value.

Returns
The Leader Cost value.

Referenced by Mle::HandleParentResponse().

§ SetLeaderCost()

void SetLeaderCost ( uint8_t  aCost)
inline

This method sets the Leader Cost value.

Parameters
[in]aCostThe Leader Cost value.

§ GetIdSequence()

uint8_t GetIdSequence ( void  ) const
inline

This method returns the ID Sequence value.

Returns
The ID Sequence value.

Referenced by Mle::HandleParentResponse().

§ SetIdSequence()

void SetIdSequence ( uint8_t  aSequence)
inline

This method sets the ID Sequence value.

Parameters
[in]aSequenceThe ID Sequence value.

§ GetSedBufferSize()

uint16_t GetSedBufferSize ( void  ) const
inline

This method returns the SED Buffer Size value.

Returns
The SED Buffer Size value.

References ot::Encoding::BigEndian::HostSwap16(), and OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE.

Referenced by Mle::HandleParentResponse(), and Mle::IsBetterParent().

§ SetSedBufferSize()

void SetSedBufferSize ( uint16_t  aSedBufferSize)
inline

This method sets the SED Buffer Size value.

Parameters
[in]aSedBufferSizeThe SED Buffer Size value.

References ot::Encoding::BigEndian::HostSwap16().

§ GetSedDatagramCount()

uint8_t GetSedDatagramCount ( void  ) const
inline

This method returns the SED Datagram Count value.

Returns
The SED Datagram Count value.

References OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT.

Referenced by Mle::HandleParentResponse(), and Mle::IsBetterParent().

§ SetSedDatagramCount()

void SetSedDatagramCount ( uint8_t  aSedDatagramCount)
inline

This method sets the SED Datagram Count value.

Parameters
[in]aSedDatagramCountThe SED Datagram Count value.

Field Documentation

§ kParentPriorityOffset

constexpr uint8_t kParentPriorityOffset = 6
staticprivate

§ kParentPriorityMask

constexpr uint8_t kParentPriorityMask = 3 << kParentPriorityOffset
staticprivate

§ mParentPriority

uint8_t mParentPriority
private

§ mLinkQuality3

uint8_t mLinkQuality3
private

§ mLinkQuality2

uint8_t mLinkQuality2
private

§ mLinkQuality1

uint8_t mLinkQuality1
private

§ mLeaderCost

uint8_t mLeaderCost
private

§ mIdSequence

uint8_t mIdSequence
private

§ mActiveRouters

uint8_t mActiveRouters
private

§ mSedBufferSize

uint16_t mSedBufferSize
private

§ mSedDatagramCount

uint8_t mSedDatagramCount
private

The documentation for this class was generated from the following file:
© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale