![]() |
![]() |
|
OpenThread
1.05.03.02
|
#include <meshcop_tlvs.hpp>
Inheritance diagram for ChannelTlv:
Collaboration diagram for ChannelTlv:Public Member Functions | |
| uint16_t | GetChannel (void) const |
| uint8_t | GetChannelPage (void) const |
| void | Init (void) |
| bool | IsValid (void) const |
| void | SetChannel (uint16_t aChannel) |
| void | SetChannelPage (uint8_t aChannelPage) |
Public Member Functions inherited from Tlv | |
| Tlv * | GetNext (void) |
| const Tlv * | GetNext (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 |
| Tlv * | GetNext (void) |
| const Tlv * | GetNext (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 | |
| uint16_t | mChannel |
| uint8_t | mChannelPage |
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 Tlv * | FindTlv (uint8_t *aTlvsStart, uint16_t aTlvsLength, Type aType) |
| static const Tlv * | FindTlv (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 Public Attributes inherited from Tlv | |
| static constexpr uint8_t | kBaseTlvMaxLength = OT_NETWORK_BASE_TLV_MAX_LENGTH |
Static Public Attributes inherited from TlvInfo< Tlv::kChannel > | |
| static constexpr uint8_t | kType |
| The TLV Type value. More... | |
Static Protected Attributes inherited from Tlv | |
| static const uint8_t | kExtendedLength = 255 |
This class implements Channel TLV generation and parsing.
|
inline |
This method initializes the TLV.
References Tlv::IsValid(), Tlv::kChannel, Tlv::SetLength(), and Tlv::SetType().
Referenced by Dataset::SetFrom().
| bool IsValid | ( | void | ) | const |
This method indicates whether or not the TLV appears to be well-formed.
| TRUE | If the TLV appears to be well-formed. |
| FALSE | If the TLV does not appear to be well-formed. |
References Tlv::GetLength(), and VerifyOrExit.
|
inline |
This method returns the ChannelPage value.
|
inline |
This method sets the ChannelPage value.
| [in] | aChannelPage | The ChannelPage value. |
|
inline |
This method returns the Channel value.
References ot::Encoding::BigEndian::HostSwap16().
| void SetChannel | ( | uint16_t | aChannel | ) |
This method sets the Channel value. Note: This method also sets the channel page according to the channel value.
| [in] | aChannel | The Channel value. |
References ot::Encoding::BigEndian::HostSwap16(), OT_RADIO_2P4GHZ_OQPSK_CHANNEL_MAX, OT_RADIO_2P4GHZ_OQPSK_CHANNEL_MIN, OT_RADIO_915MHZ_OQPSK_CHANNEL_MAX, OT_RADIO_915MHZ_OQPSK_CHANNEL_MIN, OT_RADIO_CHANNEL_PAGE_0, and OT_RADIO_CHANNEL_PAGE_2.
Referenced by Dataset::SetFrom().
|
private |
|
private |