Tuya iOS Smart Life App SDK 5.15.0
ThingSmartBleMesh Class Reference

The Bluetooth mesh base class that supports the basic operations of Bluetooth mesh networks. For example, devices in a mesh network can be created, updated, and deleted. More...

#import <ThingSmartBleMesh.h>

Inheritance diagram for ThingSmartBleMesh:

Instance Methods

(instancetype) - initWithMeshId:homeId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - getSubDeviceListFromCloudWithSuccess:failure:
 
(void) - getSubDeviceFromCloudWithDeviceId:success:failure:
 
(void) - publishNodeId:pcc:dps:success:failure:
 
(void) - multiPublishWithLocalId:pcc:dps:success:failure:
 
(void) - broadcastDps:pcc:success:failure:
 
(void) - getSubDeviceDpsWithNodeId:pcc:dpIdList:success:failure:
 
(void) - publishRawDataWithRaw:pcc:success:failure:
 
(void) - updateMeshName:success:failure:
 
(void) - removeMeshWithSuccess:failure:
 
(void) - addSubDeviceWithUuid:homeId:authKey:nodeId:productKey:ver:success:failure:
 
(void) - renameMeshSubDeviceWithDeviceId:name:success:failure:
 
(void) - removeMeshSubDeviceWithDeviceId:success:failure:
 
(instancetype) - initWithMeshId:homeId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - getSubDeviceListFromCloudWithSuccess:failure:
 
(void) - getSubDeviceFromCloudWithDeviceId:success:failure:
 
(void) - publishNodeId:pcc:dps:success:failure:
 
(void) - multiPublishWithLocalId:pcc:dps:success:failure:
 
(void) - broadcastDps:pcc:success:failure:
 
(void) - getSubDeviceDpsWithNodeId:pcc:dpIdList:success:failure:
 
(void) - publishRawDataWithRaw:pcc:success:failure:
 
(void) - updateMeshName:success:failure:
 
(void) - removeMeshWithSuccess:failure:
 
(void) - addSubDeviceWithUuid:homeId:authKey:nodeId:productKey:ver:success:failure:
 
(void) - renameMeshSubDeviceWithDeviceId:name:success:failure:
 
(void) - removeMeshSubDeviceWithDeviceId:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:companyId:venderId:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:companyId:venderId:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:companyId:venderId:success:failure:
 
(void) - addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:companyId:venderId:success:failure:
 
(void) - getSIGMeshNodeAddressFromServerWithSuccess:failure:
 
(void) - getSIGMeshNodeAddressFromServerWithSuccess:failure:
 
(void) - getMultiNodeAddressFromServerWithNumber:success:failure:
 
(void) - getMultiNodeAddressFromServerWithNumber:success:failure:
 
(void) - removeMeshSubDeviceWithGatewayId:subDeviceId:success:failure:
 
(void) - removeMeshSubDeviceWithGatewayId:subDeviceId:success:failure:
 
(void) - removeMeshSubDeviceWithMeshId:deviceId:success:failure:
 
(void) - removeMeshSubDeviceWithMeshId:deviceId:success:failure:
 
(void) - getSIGMeshSourceAddressFromServerWithSuccess:failure:
 
(void) - getSIGMeshSourceAddressFromServerWithSuccess:failure:
 

Class Methods

(instancetype) + sharedInstance
 The shared instance. More...
 
(instancetype) + bleMeshWithMeshId:homeId:
 
(void) + createBleMeshWithMeshName:homeId:success:failure:
 
(instancetype) + sharedInstance
 The shared instance. More...
 
(instancetype) + bleMeshWithMeshId:homeId:
 
(void) + createBleMeshWithMeshName:homeId:success:failure:
 
(void) + createSIGMeshWithHomeId:success:failure:
 
(void) + createSIGMeshWithHomeId:success:failure:
 
(ThingSmartSIGMeshManager *_Nullable) + initSIGMeshManager:ttl:nodeIds:
 
(ThingSmartSIGMeshManager *_Nullable) + initSIGMeshManager:ttl:nodeIds:
 
(ThingSmartSIGMeshManager *_Nullable) + getSIGMeshManager:
 
(ThingSmartSIGMeshManager *_Nullable) + getSIGMeshManager:
 
(void) + deleteSIGMeshManager:
 
(void) + deleteSIGMeshManager:
 
(void) + setSIGMeshNetworkMaxCount:
 
(void) + setSIGMeshNetworkMaxCount:
 
(NSInteger) + getSIGMeshNetworkMaxCount
 
(NSInteger) + getSIGMeshNetworkMaxCount
 
(NSArray< ThingSmartSIGMeshManager * > *) + getAllSIGMeshManager
 
(NSArray< ThingSmartSIGMeshManager * > *) + getAllSIGMeshManager
 
(void) + getUnActiceDeviceInfo:mac:success:failure:
 
(void) + getUnActiceDeviceInfo:mac:success:failure:
 

Properties

ThingSmartBleMeshModelbleMeshModel
 
id< ThingSmartBleMeshDelegatedelegate
 
BOOL disableBLECapability
 Whether to disable bluetooth. Default NO. More...
 

Detailed Description

The Bluetooth mesh base class that supports the basic operations of Bluetooth mesh networks. For example, devices in a mesh network can be created, updated, and deleted.

The mesh parameters are required to establish a Bluetooth mesh connection.

Definition at line 31 of file ThingSmartBleMesh.h.

Method Documentation

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:companyId:venderId:success:failure: [1/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productId: (NSString *)  productId
ver: (NSString *)  ver
mac: (NSString *)  mac
companyId: (nullable NSString *)  companyId
venderId: (nullable NSString *)  venderId
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

The Bluetooth device is bound with a PID before the network is connected. This applies when a third-party device is paired.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productIdThe product ID.
verThe version.
macThe MAC address of the device.
companyIdThe company ID.
venderIdThis parameter is required to add a third-party device to the app. Lighting devices, switches, and other low-power devices are supported.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:companyId:venderId:success:failure: [2/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productId: (NSString *)  productId
ver: (NSString *)  ver
mac: (NSString *)  mac
companyId: (nullable NSString *)  companyId
venderId: (nullable NSString *)  venderId
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

The Bluetooth device is bound with a PID before the network is connected. This applies when a third-party device is paired.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productIdThe product ID.
verThe version.
macThe MAC address of the device.
companyIdThe company ID.
venderIdThis parameter is required to add a third-party device to the app. Lighting devices, switches, and other low-power devices are supported.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:success:failure: [1/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productId: (NSString *)  productId
ver: (NSString *)  ver
mac: (NSString *)  mac
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Binds a PID to a Bluetooth device before the network is connected.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productIdThe product ID.
verThe version.
macThe MAC address of the device.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productId:ver:mac:success:failure: [2/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productId: (NSString *)  productId
ver: (NSString *)  ver
mac: (NSString *)  mac
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Binds a PID to a Bluetooth device before the network is connected.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productIdThe product ID.
verThe version.
macThe MAC address of the device.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:companyId:venderId:success:failure: [1/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productKey: (NSString *)  productKey
ver: (NSString *)  ver
mac: (NSString *)  mac
companyId: (nonnull NSString *)  companyId
venderId: (nonnull NSString *)  venderId
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Reports information about the paired Bluetooth device to the cloud after the device is connected to the network. The product key and MAC address are included in the report. The cloud returns the PID based on the reported information. This applies when a third-party device is paired.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productKeyThe product key.
verThe version.
macThe MAC address of the device.
companyIdThe company ID of the Bluetooth mesh device.
venderIdThis parameter is required to add a third-party device to the app. Lighting devices, switches, and other low-power devices are supported.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:companyId:venderId:success:failure: [2/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productKey: (NSString *)  productKey
ver: (NSString *)  ver
mac: (NSString *)  mac
companyId: (nonnull NSString *)  companyId
venderId: (nonnull NSString *)  venderId
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Reports information about the paired Bluetooth device to the cloud after the device is connected to the network. The product key and MAC address are included in the report. The cloud returns the PID based on the reported information. This applies when a third-party device is paired.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productKeyThe product key.
verThe version.
macThe MAC address of the device.
companyIdThe company ID of the Bluetooth mesh device.
venderIdThis parameter is required to add a third-party device to the app. Lighting devices, switches, and other low-power devices are supported.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:success:failure: [1/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productKey: (NSString *)  productKey
ver: (NSString *)  ver
mac: (NSString *)  mac
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Reports the result of the successful pairing between a Bluetooth sub-device and the app to the cloud. The productKey and mac parameters are included in the report. Then, the cloud returns the product ID (PID) based on both parameters.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productKeyThe product key.
verThe version.
macThe MAC address of the device.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSIGMeshSubDeviceWithUuid:devKey:nodeId:productKey:ver:mac:success:failure: [2/2]

- (void) addSIGMeshSubDeviceWithUuid: (NSString *)  uuid
devKey: (NSString *)  devKey
nodeId: (NSString *)  nodeId
productKey: (NSString *)  productKey
ver: (NSString *)  ver
mac: (NSString *)  mac
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Reports the result of the successful pairing between a Bluetooth sub-device and the app to the cloud. The productKey and mac parameters are included in the report. Then, the cloud returns the product ID (PID) based on both parameters.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
devKeyThe device key.
nodeIdThe node ID.
productKeyThe product key.
verThe version.
macThe MAC address of the device.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ addSubDeviceWithUuid:homeId:authKey:nodeId:productKey:ver:success:failure: [1/2]

- (void) addSubDeviceWithUuid: (NSString *)  uuid
homeId: (long long)  homeId
authKey: (NSString *)  authKey
nodeId: (NSString *)  nodeId
productKey: (NSString *)  productKey
ver: (NSString *)  ver
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Adds a Bluetooth sub-device. API version: 2.0.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
homeIdThe home ID.
authKeyThe authorization key.
nodeIdThe node ID.
productKeyThe product key.
verThe version.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addSubDeviceWithUuid:homeId:authKey:nodeId:productKey:ver:success:failure: [2/2]

- (void) addSubDeviceWithUuid: (NSString *)  uuid
homeId: (long long)  homeId
authKey: (NSString *)  authKey
nodeId: (NSString *)  nodeId
productKey: (NSString *)  productKey
ver: (NSString *)  ver
success: (void(^)(NSString *devId, NSString *name))  success
failure: (ThingFailureError failure 

Adds a Bluetooth sub-device. API version: 2.0.

Parameters
uuidThe short address identification of the Bluetooth sub-device.
homeIdThe home ID.
authKeyThe authorization key.
nodeIdThe node ID.
productKeyThe product key.
verThe version.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ bleMeshWithMeshId:homeId: [1/2]

+ (instancetype) bleMeshWithMeshId: (NSString *)  meshId
homeId: (long long)  homeId 

Returns a device object.

Parameters
meshIdThe mesh ID.
homeIdThe home ID.

◆ bleMeshWithMeshId:homeId: [2/2]

+ (instancetype) bleMeshWithMeshId: (NSString *)  meshId
homeId: (long long)  homeId 

Returns a device object.

Parameters
meshIdThe mesh ID.
homeIdThe home ID.

◆ broadcastDps:pcc:success:failure: [1/2]

- (void) broadcastDps: (NSDictionary *)  dps
pcc: (NSString *)  pcc
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Sends broadcast DPs.

Parameters
dpsThe DP dictionary.
pccThe size class label.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ broadcastDps:pcc:success:failure: [2/2]

- (void) broadcastDps: (NSDictionary *)  dps
pcc: (NSString *)  pcc
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Sends broadcast DPs.

Parameters
dpsThe DP dictionary.
pccThe size class label.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ createBleMeshWithMeshName:homeId:success:failure: [1/2]

+ (void) createBleMeshWithMeshName: (NSString *)  meshName
homeId: (long long)  homeId
success: (void(^)(ThingSmartBleMeshModel *meshModel))  success
failure: (ThingFailureError failure 

Creates a mesh.

Parameters
meshNameThe mesh name.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ createBleMeshWithMeshName:homeId:success:failure: [2/2]

+ (void) createBleMeshWithMeshName: (NSString *)  meshName
homeId: (long long)  homeId
success: (void(^)(ThingSmartBleMeshModel *meshModel))  success
failure: (ThingFailureError failure 

Creates a mesh.

Parameters
meshNameThe mesh name.
homeIdThe home ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ createSIGMeshWithHomeId:success:failure: [1/2]

+ (void) createSIGMeshWithHomeId: (long long)  homeId
success: (void(^)(ThingSmartBleMeshModel *meshModel))  success
failure: (ThingFailureError failure 

Provided by category ThingSmartBleMesh(SIGMesh).

◆ createSIGMeshWithHomeId:success:failure: [2/2]

+ (void) createSIGMeshWithHomeId: (long long)  homeId
success: (void(^)(ThingSmartBleMeshModel *meshModel))  success
failure: (ThingFailureError failure 

Provided by category ThingSmartBleMesh(SIGMesh).

◆ deleteSIGMeshManager: [1/2]

+ (void) deleteSIGMeshManager: (NSString *)  meshId

remove sigmesh network

Parameters
meshIdmeshId

Provided by category ThingSmartBleMesh(SIGMesh).

◆ deleteSIGMeshManager: [2/2]

+ (void) deleteSIGMeshManager: (NSString *)  meshId

remove sigmesh network

Parameters
meshIdmeshId

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getAllSIGMeshManager [1/2]

+ (NSArray< ThingSmartSIGMeshManager * > *) getAllSIGMeshManager

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getAllSIGMeshManager [2/2]

+ (NSArray< ThingSmartSIGMeshManager * > *) getAllSIGMeshManager

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getMultiNodeAddressFromServerWithNumber:success:failure: [1/2]

- (void) getMultiNodeAddressFromServerWithNumber: (NSInteger)  number
success: (ThingSuccessList success
failure: (ThingFailureError failure 

Returns multiple node IDs of Bluetooth mesh in a call.

Parameters
numberThe number of assigned node IDs.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getMultiNodeAddressFromServerWithNumber:success:failure: [2/2]

- (void) getMultiNodeAddressFromServerWithNumber: (NSInteger)  number
success: (ThingSuccessList success
failure: (ThingFailureError failure 

Returns multiple node IDs of Bluetooth mesh in a call.

Parameters
numberThe number of assigned node IDs.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshManager: [1/2]

+ (ThingSmartSIGMeshManager *_Nullable) getSIGMeshManager: (NSString *)  meshId

get SIGMeshManager by meshId

Parameters
meshIdmeshId

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshManager: [2/2]

+ (ThingSmartSIGMeshManager *_Nullable) getSIGMeshManager: (NSString *)  meshId

get SIGMeshManager by meshId

Parameters
meshIdmeshId

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshNetworkMaxCount [1/2]

+ (NSInteger) getSIGMeshNetworkMaxCount

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshNetworkMaxCount [2/2]

+ (NSInteger) getSIGMeshNetworkMaxCount

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshNodeAddressFromServerWithSuccess:failure: [1/2]

- (void) getSIGMeshNodeAddressFromServerWithSuccess: (ThingSuccessInt success
failure: (ThingFailureError failure 

Assigns the node ID of Bluetooth mesh from the cloud. In each request, the node ID is incremented by 0000 0111 or 8.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshNodeAddressFromServerWithSuccess:failure: [2/2]

- (void) getSIGMeshNodeAddressFromServerWithSuccess: (ThingSuccessInt success
failure: (ThingFailureError failure 

Assigns the node ID of Bluetooth mesh from the cloud. In each request, the node ID is incremented by 0000 0111 or 8.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshSourceAddressFromServerWithSuccess:failure: [1/2]

- (void) getSIGMeshSourceAddressFromServerWithSuccess: (ThingSuccessInt success
failure: (ThingFailureError failure 

Assigns the terminal source ID of Bluetooth mesh from the cloud.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSIGMeshSourceAddressFromServerWithSuccess:failure: [2/2]

- (void) getSIGMeshSourceAddressFromServerWithSuccess: (ThingSuccessInt success
failure: (ThingFailureError failure 

Assigns the terminal source ID of Bluetooth mesh from the cloud.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getSubDeviceDpsWithNodeId:pcc:dpIdList:success:failure: [1/2]

- (void) getSubDeviceDpsWithNodeId: (NSString *)  nodeId
pcc: (NSString *)  pcc
dpIdList: (NSArray< NSNumber * > *)  dpIdList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Returns the latest DP information of the sub-device.

Parameters
nodeIdThe node ID.
pccThe size class label.
dpIdListA list of keys in the DPs.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ getSubDeviceDpsWithNodeId:pcc:dpIdList:success:failure: [2/2]

- (void) getSubDeviceDpsWithNodeId: (NSString *)  nodeId
pcc: (NSString *)  pcc
dpIdList: (NSArray< NSNumber * > *)  dpIdList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Returns the latest DP information of the sub-device.

Parameters
nodeIdThe node ID.
pccThe size class label.
dpIdListA list of keys in the DPs.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ getSubDeviceFromCloudWithDeviceId:success:failure: [1/2]

- (void) getSubDeviceFromCloudWithDeviceId: (NSString *)  deviceId
success: (void(^)(ThingSmartDeviceModel *subDeviceModel))  success
failure: (ThingFailureError failure 

Returns the single sub-device information.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ getSubDeviceFromCloudWithDeviceId:success:failure: [2/2]

- (void) getSubDeviceFromCloudWithDeviceId: (NSString *)  deviceId
success: (void(^)(ThingSmartDeviceModel *subDeviceModel))  success
failure: (ThingFailureError failure 

Returns the single sub-device information.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ getSubDeviceListFromCloudWithSuccess:failure: [1/2]

- (void) getSubDeviceListFromCloudWithSuccess: (void(^)(NSArray< ThingSmartDeviceModel * > *subDeviceList))  success
failure: (ThingFailureError failure 

Returns the sub-device information of the mesh.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ getSubDeviceListFromCloudWithSuccess:failure: [2/2]

- (void) getSubDeviceListFromCloudWithSuccess: (void(^)(NSArray< ThingSmartDeviceModel * > *subDeviceList))  success
failure: (ThingFailureError failure 

Returns the sub-device information of the mesh.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ getUnActiceDeviceInfo:mac:success:failure: [1/2]

+ (void) getUnActiceDeviceInfo: (NSString *)  productId
mac: (NSString *)  mac
success: (ThingSuccessDict success
failure: (ThingFailureError failure 

Get the unactive device information

Parameters
productIdThe productId of device
macThe mac of device
successCalled when the task is finished. A dictionary of device information is returned.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ getUnActiceDeviceInfo:mac:success:failure: [2/2]

+ (void) getUnActiceDeviceInfo: (NSString *)  productId
mac: (NSString *)  mac
success: (ThingSuccessDict success
failure: (ThingFailureError failure 

Get the unactive device information

Parameters
productIdThe productId of device
macThe mac of device
successCalled when the task is finished. A dictionary of device information is returned.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ initSIGMeshManager:ttl:nodeIds: [1/2]

+ (ThingSmartSIGMeshManager *_Nullable) initSIGMeshManager: (ThingSmartBleMeshModel *)  meshModel
ttl: (NSInteger)  ttl
nodeIds: (NSArray< NSData * > *_Nullable)  nodeIds 

init SIGMeshManager by meshModel 、 ttl and nodeIds

Parameters
meshModelmeshModel
ttlNumber of times messages are forwarded on the network default is 8
nodeIdsAll nodeId in the mesh network (Does not contain low-power nodeIds)

Provided by category ThingSmartBleMesh(SIGMesh).

◆ initSIGMeshManager:ttl:nodeIds: [2/2]

+ (ThingSmartSIGMeshManager *_Nullable) initSIGMeshManager: (ThingSmartBleMeshModel *)  meshModel
ttl: (NSInteger)  ttl
nodeIds: (NSArray< NSData * > *_Nullable)  nodeIds 

init SIGMeshManager by meshModel 、 ttl and nodeIds

Parameters
meshModelmeshModel
ttlNumber of times messages are forwarded on the network default is 8
nodeIdsAll nodeId in the mesh network (Does not contain low-power nodeIds)

Provided by category ThingSmartBleMesh(SIGMesh).

◆ initWithMeshId:homeId: [1/2]

- (instancetype) initWithMeshId: (NSString *)  meshId
homeId: (long long)  NS_DESIGNATED_INITIALIZER 

The mesh parameters are required to establish a Bluetooth mesh connection.

Parameters
meshIdThe mesh ID.
homeIdThe home ID.

◆ initWithMeshId:homeId: [2/2]

- (instancetype) initWithMeshId: (NSString *)  meshId
homeId: (long long)  NS_DESIGNATED_INITIALIZER 

The mesh parameters are required to establish a Bluetooth mesh connection.

Parameters
meshIdThe mesh ID.
homeIdThe home ID.

◆ multiPublishWithLocalId:pcc:dps:success:failure: [1/2]

- (void) multiPublishWithLocalId: (NSString *)  localId
pcc: (NSString *)  pcc
dps: (NSDictionary *)  dps
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Controls devices in a group.

Parameters
localIdThe local ID.
pccThe size class label.
dpsThe DP dictionary.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ multiPublishWithLocalId:pcc:dps:success:failure: [2/2]

- (void) multiPublishWithLocalId: (NSString *)  localId
pcc: (NSString *)  pcc
dps: (NSDictionary *)  dps
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Controls devices in a group.

Parameters
localIdThe local ID.
pccThe size class label.
dpsThe DP dictionary.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ NS_UNAVAILABLE [1/2]

- (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE

◆ publishNodeId:pcc:dps:success:failure: [1/2]

- (void) publishNodeId: (NSString *)  nodeId
pcc: (NSString *)  pcc
dps: (NSDictionary *)  dps
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Sends DPs to a single sub-device.

Parameters
nodeIdThe node ID.
pccThe size class label.
dpsThe DP dictionary.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ publishNodeId:pcc:dps:success:failure: [2/2]

- (void) publishNodeId: (NSString *)  nodeId
pcc: (NSString *)  pcc
dps: (NSDictionary *)  dps
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Sends DPs to a single sub-device.

Parameters
nodeIdThe node ID.
pccThe size class label.
dpsThe DP dictionary.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ publishRawDataWithRaw:pcc:success:failure: [1/2]

- (void) publishRawDataWithRaw: (NSString *)  raw
pcc: (NSString *)  pcc
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Sends DPs of raw type to the device.

Parameters
rawThe type of transmission.
pccThe size class label.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ publishRawDataWithRaw:pcc:success:failure: [2/2]

- (void) publishRawDataWithRaw: (NSString *)  raw
pcc: (NSString *)  pcc
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Sends DPs of raw type to the device.

Parameters
rawThe type of transmission.
pccThe size class label.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeMeshSubDeviceWithDeviceId:success:failure: [1/2]

- (void) removeMeshSubDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes the mesh sub-device.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeMeshSubDeviceWithDeviceId:success:failure: [2/2]

- (void) removeMeshSubDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes the mesh sub-device.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeMeshSubDeviceWithGatewayId:subDeviceId:success:failure: [1/2]

- (void) removeMeshSubDeviceWithGatewayId: (NSString *)  gatewayId
subDeviceId: (NSString *)  subDeviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a Bluetooth mesh sub-device from the gateway to which the sub-device is connected.

Parameters
gatewayIdThe gateway ID.
subDeviceIdThe sub-device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ removeMeshSubDeviceWithGatewayId:subDeviceId:success:failure: [2/2]

- (void) removeMeshSubDeviceWithGatewayId: (NSString *)  gatewayId
subDeviceId: (NSString *)  subDeviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a Bluetooth mesh sub-device from the gateway to which the sub-device is connected.

Parameters
gatewayIdThe gateway ID.
subDeviceIdThe sub-device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMesh(SIGMesh).

◆ removeMeshSubDeviceWithMeshId:deviceId:success:failure: [1/2]

- (void) removeMeshSubDeviceWithMeshId: (NSString *)  meshId
deviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Provided by category ThingSmartBleMesh(SIGMesh).

◆ removeMeshSubDeviceWithMeshId:deviceId:success:failure: [2/2]

- (void) removeMeshSubDeviceWithMeshId: (NSString *)  meshId
deviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Provided by category ThingSmartBleMesh(SIGMesh).

◆ removeMeshWithSuccess:failure: [1/2]

- (void) removeMeshWithSuccess: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Deletes the mesh. If the specified mesh group contains sub-devices, the sub-devices are also removed. The Wi-Fi connector is also removed.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeMeshWithSuccess:failure: [2/2]

- (void) removeMeshWithSuccess: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Deletes the mesh. If the specified mesh group contains sub-devices, the sub-devices are also removed. The Wi-Fi connector is also removed.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ renameMeshSubDeviceWithDeviceId:name:success:failure: [1/2]

- (void) renameMeshSubDeviceWithDeviceId: (NSString *)  deviceId
name: (NSString *)  name
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Renames the mesh sub-device.

Parameters
deviceIdThe device ID.
nameThe device name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ renameMeshSubDeviceWithDeviceId:name:success:failure: [2/2]

- (void) renameMeshSubDeviceWithDeviceId: (NSString *)  deviceId
name: (NSString *)  name
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Renames the mesh sub-device.

Parameters
deviceIdThe device ID.
nameThe device name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ setSIGMeshNetworkMaxCount: [1/2]

+ (void) setSIGMeshNetworkMaxCount: (NSInteger)  count

Set the maximum number of supported sigmesh networks

Parameters
countcount default is 3

Provided by category ThingSmartBleMesh(SIGMesh).

◆ setSIGMeshNetworkMaxCount: [2/2]

+ (void) setSIGMeshNetworkMaxCount: (NSInteger)  count

Set the maximum number of supported sigmesh networks

Parameters
countcount default is 3

Provided by category ThingSmartBleMesh(SIGMesh).

◆ sharedInstance [1/2]

+ (instancetype) sharedInstance

The shared instance.

◆ sharedInstance [2/2]

+ (instancetype) sharedInstance

The shared instance.

◆ updateMeshName:success:failure: [1/2]

- (void) updateMeshName: (NSString *)  meshName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the mesh name.

Parameters
meshNameThe mesh name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateMeshName:success:failure: [2/2]

- (void) updateMeshName: (NSString *)  meshName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the mesh name.

Parameters
meshNameThe mesh name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Property Documentation

◆ bleMeshModel

- (ThingSmartBleMeshModel *) bleMeshModel
readnonatomicstrong

Definition at line 33 of file ThingSmartBleMesh.h.

◆ delegate

- (id< ThingSmartBleMeshDelegate >) delegate
readwritenonatomicweak

Definition at line 35 of file ThingSmartBleMesh.h.

◆ disableBLECapability

- (BOOL) disableBLECapability
readwritenonatomicassign

Whether to disable bluetooth. Default NO.

Definition at line 38 of file ThingSmartBleMesh.h.


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