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

#include <network_data_tlvs.hpp>

+ Inheritance diagram for ContextTlv:
+ Collaboration diagram for ContextTlv:

Public Member Functions

void ClearCompress (void)
 
uint8_t GetContextId (void) const
 
uint8_t GetContextLength (void) const
 
void Init (uint8_t aContextId, uint8_t aContextLength)
 
bool IsCompress (void) const
 
void SetCompress (void)
 
- Public Member Functions inherited from NetworkDataTlv
void ClearStable (void)
 
void DecreaseLength (uint8_t aDecrement)
 
uint8_t GetLength (void) const
 
NetworkDataTlvGetNext (void)
 
const NetworkDataTlvGetNext (void) const
 
uint8_t GetSize (void) const
 
Type GetType (void) const
 
uint8_t * GetValue (void)
 
const uint8_t * GetValue (void) const
 
void IncreaseLength (uint8_t aIncrement)
 
void Init (void)
 
bool IsStable (void) const
 
void SetLength (uint8_t aLength)
 
void SetStable (void)
 
void SetType (Type aType)
 

Static Public Attributes

static constexpr Type kType = kTypeContext
 The TLV Type. More...
 

Private Attributes

uint8_t mContextLength
 
uint8_t mFlags
 

Static Private Attributes

static constexpr uint8_t kCompressFlag = 1 << 4
 
static constexpr uint8_t kContextIdMask = 0xf << kContextIdOffset
 
static constexpr uint8_t kContextIdOffset = 0
 

Additional Inherited Members

- Public Types inherited from NetworkDataTlv
enum  Type : uint8_t {
  kTypeHasRoute = 0, kTypePrefix = 1, kTypeBorderRouter = 2, kTypeContext = 3,
  kTypeCommissioningData = 4, kTypeService = 5, kTypeServer = 6
}
 
- Static Public Member Functions inherited from NetworkDataTlv
static NetworkDataTlvFind (NetworkDataTlv *aStart, NetworkDataTlv *aEnd, Type aType)
 
static const NetworkDataTlvFind (const NetworkDataTlv *aStart, const NetworkDataTlv *aEnd, Type aType)
 
template<typename TlvType >
static TlvType * Find (NetworkDataTlv *aStart, NetworkDataTlv *aEnd)
 
template<typename TlvType >
static const TlvType * Find (const NetworkDataTlv *aStart, const NetworkDataTlv *aEnd)
 
static NetworkDataTlvFind (NetworkDataTlv *aStart, NetworkDataTlv *aEnd, Type aType, bool aStable)
 
static const NetworkDataTlvFind (const NetworkDataTlv *aStart, const NetworkDataTlv *aEnd, Type aType, bool aStable)
 
template<typename TlvType >
static TlvType * Find (NetworkDataTlv *aStart, NetworkDataTlv *aEnd, bool aStable)
 
template<typename TlvType >
static const TlvType * Find (const NetworkDataTlv *aStart, const NetworkDataTlv *aEnd, bool aStable)
 

Detailed Description

This class implements Context TLV generation and processing.

Member Function Documentation

§ Init()

void Init ( uint8_t  aContextId,
uint8_t  aContextLength 
)
inline

This method initializes the Context TLV.

Parameters
[in]aContextIdThe Context ID value.
[in]aContextLengthThe Context Length value.

References NetworkDataTlv::Init(), NetworkDataTlv::kTypeContext, NetworkDataTlv::SetLength(), and NetworkDataTlv::SetType().

§ IsCompress()

bool IsCompress ( void  ) const
inline

This method indicates whether or not the Compress flag is set.

Return values
TRUEThe Compress flag is set.
FALSEThe Compress flags is not set.

Referenced by LeaderBase::GetContext().

§ ClearCompress()

void ClearCompress ( void  )
inline

This method clears the Compress flag.

§ SetCompress()

void SetCompress ( void  )
inline

This method sets the Compress flag.

§ GetContextId()

uint8_t GetContextId ( void  ) const
inline

This method returns the Context ID value.

Returns
The Context ID value.

Referenced by LeaderBase::GetContext().

§ GetContextLength()

uint8_t GetContextLength ( void  ) const
inline

This method returns the Context Length value.

Returns
The Context Length value.

Field Documentation

§ kType

constexpr Type kType = kTypeContext
static

The TLV Type.

§ kCompressFlag

constexpr uint8_t kCompressFlag = 1 << 4
staticprivate

§ kContextIdOffset

constexpr uint8_t kContextIdOffset = 0
staticprivate

§ kContextIdMask

constexpr uint8_t kContextIdMask = 0xf << kContextIdOffset
staticprivate

§ mFlags

uint8_t mFlags
private

§ mContextLength

uint8_t mContextLength
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