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

#include <meshcop_tlvs.hpp>

+ Inheritance diagram for JoinerAdvertisementTlv:
+ Collaboration diagram for JoinerAdvertisementTlv:

Public Member Functions

const uint8_t * GetAdvData (void) const
 
uint8_t GetAdvDataLength (void) const
 
uint32_t GetOui (void) const
 
void Init (void)
 
bool IsValid (void) const
 
void SetAdvData (const uint8_t *aAdvData, uint8_t aAdvDataLength)
 
void SetOui (uint32_t aOui)
 
- Public Member Functions inherited from Tlv
TlvGetNext (void)
 
const TlvGetNext (void) const
 
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)
 

Static Public Attributes

static constexpr uint8_t kAdvDataMaxLength = OT_JOINER_ADVDATA_MAX_LENGTH
 The Max Length of AdvData. More...
 
- Static Public Attributes inherited from Tlv
static constexpr uint8_t kBaseTlvMaxLength = OT_NETWORK_BASE_TLV_MAX_LENGTH
 
- Static Public Attributes inherited from TlvInfo< Tlv::kJoinerAdvertisement >
static constexpr uint8_t kType
 The TLV Type value. More...
 

Private Attributes

uint8_t mAdvData [kAdvDataMaxLength]
 
uint8_t mOui [3]
 

Additional Inherited Members

- Public Types inherited from Tlv
enum  Type : uint8_t {
  kChannel = OT_MESHCOP_TLV_CHANNEL, kPanId = OT_MESHCOP_TLV_PANID, kExtendedPanId = OT_MESHCOP_TLV_EXTPANID, kNetworkName = OT_MESHCOP_TLV_NETWORKNAME,
  kPskc = OT_MESHCOP_TLV_PSKC, kNetworkKey = OT_MESHCOP_TLV_NETWORKKEY, kNetworkKeySequence = OT_MESHCOP_TLV_NETWORK_KEY_SEQUENCE, kMeshLocalPrefix = OT_MESHCOP_TLV_MESHLOCALPREFIX,
  kSteeringData = OT_MESHCOP_TLV_STEERING_DATA, kBorderAgentLocator = OT_MESHCOP_TLV_BORDER_AGENT_RLOC, kCommissionerId = OT_MESHCOP_TLV_COMMISSIONER_ID, kCommissionerSessionId = OT_MESHCOP_TLV_COMM_SESSION_ID,
  kSecurityPolicy = OT_MESHCOP_TLV_SECURITYPOLICY, kGet = OT_MESHCOP_TLV_GET, kActiveTimestamp = OT_MESHCOP_TLV_ACTIVETIMESTAMP, kCommissionerUdpPort = OT_MESHCOP_TLV_COMMISSIONER_UDP_PORT,
  kState = OT_MESHCOP_TLV_STATE, kJoinerDtlsEncapsulation = OT_MESHCOP_TLV_JOINER_DTLS, kJoinerUdpPort = OT_MESHCOP_TLV_JOINER_UDP_PORT, kJoinerIid = OT_MESHCOP_TLV_JOINER_IID,
  kJoinerRouterLocator = OT_MESHCOP_TLV_JOINER_RLOC, kJoinerRouterKek = OT_MESHCOP_TLV_JOINER_ROUTER_KEK, kProvisioningUrl = OT_MESHCOP_TLV_PROVISIONING_URL, kVendorName = OT_MESHCOP_TLV_VENDOR_NAME_TLV,
  kVendorModel = OT_MESHCOP_TLV_VENDOR_MODEL_TLV, kVendorSwVersion = OT_MESHCOP_TLV_VENDOR_SW_VERSION_TLV, kVendorData = OT_MESHCOP_TLV_VENDOR_DATA_TLV, kVendorStackVersion = OT_MESHCOP_TLV_VENDOR_STACK_VERSION_TLV,
  kUdpEncapsulation = OT_MESHCOP_TLV_UDP_ENCAPSULATION_TLV, kIp6Address = OT_MESHCOP_TLV_IPV6_ADDRESS_TLV, kPendingTimestamp = OT_MESHCOP_TLV_PENDINGTIMESTAMP, kDelayTimer = OT_MESHCOP_TLV_DELAYTIMER,
  kChannelMask = OT_MESHCOP_TLV_CHANNELMASK, kCount = OT_MESHCOP_TLV_COUNT, kPeriod = OT_MESHCOP_TLV_PERIOD, kScanDuration = OT_MESHCOP_TLV_SCAN_DURATION,
  kEnergyList = OT_MESHCOP_TLV_ENERGY_LIST, kDiscoveryRequest = OT_MESHCOP_TLV_DISCOVERYREQUEST, kDiscoveryResponse = OT_MESHCOP_TLV_DISCOVERYRESPONSE, kJoinerAdvertisement = OT_MESHCOP_TLV_JOINERADVERTISEMENT
}
 
- Static Public Member Functions inherited from Tlv
static Error FindTlv (const Message &aMessage, Type aType, uint16_t aMaxLength, Tlv &aTlv)
 
template<typename TlvType >
static Error FindTlv (const Message &aMessage, TlvType &aTlv)
 
static TlvFindTlv (uint8_t *aTlvsStart, uint16_t aTlvsLength, Type aType)
 
static const TlvFindTlv (const uint8_t *aTlvsStart, uint16_t aTlvsLength, Type aType)
 
template<typename TlvType >
static TlvType * FindTlv (uint8_t *aTlvsStart, uint16_t aTlvsLength)
 
template<typename TlvType >
static const TlvType * FindTlv (const uint8_t *aTlvsStart, uint16_t aTlvsLength)
 
static bool IsValid (const Tlv &aTlv)
 
- 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 Protected Attributes inherited from Tlv
static const uint8_t kExtendedLength = 255
 

Detailed Description

This class implements Joiner Advertisement TLV generation and parsing.

Member Function Documentation

§ Init()

void Init ( void  )
inline

This method initializes the TLV.

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

Referenced by DiscoverScanner::Discover().

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

§ GetOui()

uint32_t GetOui ( void  ) const
inline

This method returns the Vendor OUI value.

Returns
The Vendor OUI value.

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

§ SetOui()

void SetOui ( uint32_t  aOui)
inline

This method sets the Vendor OUI value.

Parameters
[in]aOuiThe Vendor OUI value.

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

Referenced by DiscoverScanner::Discover().

§ GetAdvDataLength()

uint8_t GetAdvDataLength ( void  ) const
inline

This method returns the Adv Data length.

Returns
The AdvData length.

References Tlv::GetLength().

§ GetAdvData()

const uint8_t* GetAdvData ( void  ) const
inline

This method returns the Adv Data value.

Returns
A pointer to the Adv Data value.

§ SetAdvData()

void SetAdvData ( const uint8_t *  aAdvData,
uint8_t  aAdvDataLength 
)
inline

This method sets the Adv Data value.

Parameters
[in]aAdvDataA pointer to the AdvData value.
[in]aAdvDataLengthThe length of AdvData in bytes.

References OT_ASSERT, and Tlv::SetLength().

Referenced by DiscoverScanner::Discover().

Field Documentation

§ kAdvDataMaxLength

constexpr uint8_t kAdvDataMaxLength = OT_JOINER_ADVDATA_MAX_LENGTH
static

The Max Length of AdvData.

Referenced by DiscoverScanner::SetJoinerAdvertisement().

§ mOui

uint8_t mOui[3]
private

§ mAdvData

uint8_t mAdvData[kAdvDataMaxLength]
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