Tuya iOS Smart Life App SDK 5.15.0
WTLThreadOperationalDataset Class Reference

#import <WTLThreadOperationalDataset.h>

Inheritance diagram for WTLThreadOperationalDataset:

Instance Methods

(instancetype) - NS_UNAVAILABLE
 
(instancetype _Nullable) - initWithNetworkName:extendedPANID:masterKey:PSKc:channelNumber:panID:
 
(instancetype _Nullable) - initWithData:
 
(size_t const WTLSizeThreadExtendedPanId) - WTL_DEPRECATED
 
(size_t const WTLSizeThreadExtendedPANID) - API_AVAILABLE
 
(size_t const WTLSizeThreadPANID) - API_AVAILABLE
 
(NSNumber *channelNumber) - API_AVAILABLE
 
(NSData *) - data
 
(nullable instancetype) - initWithNetworkName:extendedPANID:masterKey:PSKc:channel:panID:
 

Class Methods

(instancetype) + NS_UNAVAILABLE
 

Public Attributes

size_t const WTLSizeThreadNetworkName
 
size_t const WTLSizeThreadMasterKey
 
size_t const WTLSizeThreadPSKc
 

Properties

NSString * networkName
 
NSData * extendedPANID
 
NSData * masterKey
 
NSData * PSKc
 
NSData * panID
 

Detailed Description

Copyright (c) 2021-2023 Project CHIP Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. WTLThreadOperationalDataset allows converting between an "expanded" view of the dataset (with the separate fields) and a single-blob NSData view.

The latter can be used to pass Thread network credentials via WTLCommissioningParameters.

Definition at line 29 of file WTLThreadOperationalDataset.h.

Method Documentation

◆ API_AVAILABLE [1/3]

- (size_t const WTLSizeThreadExtendedPANID) API_AVAILABLE (macos(13.3)) 
(watchos(9.4)) 
(tvos(16.4))   

◆ API_AVAILABLE [2/3]

- (size_t const WTLSizeThreadPANID) API_AVAILABLE (macos(13.3)) 
(watchos(9.4)) 
(tvos(16.4))   

◆ API_AVAILABLE [3/3]

- (NSNumber *channelNumber) API_AVAILABLE (macos(13.3)) 
(watchos(9.4)) 
(tvos(16.4))   

The Thread network channel. Always an unsigned 16-bit integer.

◆ data

- (NSData *) data

Get the underlying data that represents the Thread Active Operational Dataset This can be used for the threadOperationalDataset of WTLCommissioningParameters.

◆ initWithData:

- (instancetype _Nullable) initWithData: (NSData *)  data

Create a Thread Operational Dataset object with a RCP formatted active operational dataset. This initializer will return nil if the input data cannot be parsed correctly

◆ initWithNetworkName:extendedPANID:masterKey:PSKc:channel:panID:

- (nullable instancetype) initWithNetworkName: (NSString *)  networkName
extendedPANID: (NSData *)  extendedPANID
masterKey: (NSData *)  masterKey
PSKc: (NSData *)  PSKc
channel: (uint16_t)  channel
panID: ("Please use initWithNetworkName:extendedPANID:masterKey:PSKc:channelNumber:panID") 
(macos(13.0, 13.3)) 
(watchos(9.1, 9.4)) 
(tvos(16.1, 16.4))  WTL_DEPRECATED 

◆ initWithNetworkName:extendedPANID:masterKey:PSKc:channelNumber:panID:

- (instancetype _Nullable) initWithNetworkName: (NSString *)  networkName
extendedPANID: (NSData *)  extendedPANID
masterKey: (NSData *)  masterKey
PSKc: (NSData *)  PSKc
channelNumber: (NSNumber *)  channelNumber
panID: (macos(13.3)) 
(watchos(9.4)) 
(tvos(16.4))  API_AVAILABLE 

Create a Thread Operational Dataset object with the individual network fields.

Parameters
extendedPANIDMust be WTLSizeThreadExtendedPANID bytes. Otherwise nil will be returned.
masterKeyMust be WTLSizeThreadMasterKey bytes. Otherwise nil will be returned.
PSKcMust be WTLSizeThreadPSKc bytes. Otherwise nil will be returned.
channelNumberMust be an unsigned 16-bit value.
panIDMust be WTLSizeThreadPANID bytes. Otherwise nil will be returned. In particular, it's expected to be a 16-bit unsigned integer stored as 2 bytes in host order.

◆ NS_UNAVAILABLE [1/2]

- (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [2/2]

+ (instancetype) NS_UNAVAILABLE

◆ WTL_DEPRECATED

- (size_t const WTLSizeThreadExtendedPanId) WTL_DEPRECATED ("Please use WTLSizeThreadExtendedPANID") 
(macos(13.0, 13.3)) 
(watchos(9.1, 9.4)) 
(tvos(16.1, 16.4))   

Member Data Documentation

◆ WTLSizeThreadMasterKey

- (size_t const) WTLSizeThreadMasterKey

Definition at line 68 of file WTLThreadOperationalDataset.h.

◆ WTLSizeThreadNetworkName

- (size_t const) WTLSizeThreadNetworkName

The expected lengths of each of the NSData fields in the WTLThreadOperationalDataset

Definition at line 64 of file WTLThreadOperationalDataset.h.

◆ WTLSizeThreadPSKc

- (size_t const) WTLSizeThreadPSKc

Definition at line 69 of file WTLThreadOperationalDataset.h.

Property Documentation

◆ extendedPANID

- (NSData*) extendedPANID
readnonatomiccopy

The Thread Network extendended PAN ID

Definition at line 80 of file WTLThreadOperationalDataset.h.

◆ masterKey

- (NSData*) masterKey
readnonatomiccopy

The 16 byte Master Key

Definition at line 85 of file WTLThreadOperationalDataset.h.

◆ networkName

- (NSString*) networkName
readnonatomiccopy

The Thread Network name

Definition at line 75 of file WTLThreadOperationalDataset.h.

◆ panID

- (NSData*) panID
readnonatomiccopy

A uint16_t stored as 2-bytes in host order representing the Thread PAN ID

Definition at line 100 of file WTLThreadOperationalDataset.h.

◆ PSKc

- (NSData*) PSKc
readnonatomiccopy

The Thread PSKc

Definition at line 90 of file WTLThreadOperationalDataset.h.


The documentation for this class was generated from the following file: