Tuya iOS Smart Life App SDK 5.15.0
ThingSmartBleMeshGroup Class Reference

The Thing Bluetooth mesh device groups allow you to create and update groups and add devices to the groups. More...

#import <ThingSmartBleMeshGroup.h>

Inheritance diagram for ThingSmartBleMeshGroup:

Instance Methods

(instancetype) - initWithGroupId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - deleteBleMeshGroupAddress:
 
(void) - updateMeshGroupName:success:failure:
 
(void) - removeMeshGroupWithSuccess:failure:
 
(void) - addDeviceWithDeviceId:success:failure:
 
(void) - editDeviceWithDeviceList:success:failure:
 
(void) - removeDeviceWithDeviceId:success:failure:
 
(void) - getDeviceListInfoWithSuccess:failure:
 
(void) - getDeviveListInfoWithSuccess:failure:
 
(instancetype) - initWithGroupId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - deleteBleMeshGroupAddress:
 
(void) - updateMeshGroupName:success:failure:
 
(void) - removeMeshGroupWithSuccess:failure:
 
(void) - addDeviceWithDeviceId:success:failure:
 
(void) - editDeviceWithDeviceList:success:failure:
 
(void) - removeDeviceWithDeviceId:success:failure:
 
(void) - getDeviceListInfoWithSuccess:failure:
 
(void) - getDeviveListInfoWithSuccess:failure:
 
(void) - addSubDeviceWithSubList:success:failure:
 
(void) - addSubDeviceWithSubList:success:failure:
 
(void) - addSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure:
 
(void) - addSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure:
 
(void) - removeSubDeviceWithSubList:success:failure:
 
(void) - removeSubDeviceWithSubList:success:failure:
 
(void) - removeSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure:
 
(void) - removeSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure:
 
(void) - publishDps:success:failure:
 
(void) - publishDps:success:failure:
 
(void) - publishDpsWithParams:success:failure:
 
(void) - publishDpsWithParams:success:failure:
 

Class Methods

(instancetype) + meshGroupWithGroupId:
 
(void) + getBleMeshGroupAddressFromCluondWithMeshId:success:failure:
 
(void) + createMeshGroupWithGroupName:meshId:localId:pcc:success:failure:
 
(NSInteger) + getBleMeshGroupAddress
 
(NSInteger) + getBleMeshGroupCount
 
(instancetype) + meshGroupWithGroupId:
 
(void) + getBleMeshGroupAddressFromCluondWithMeshId:success:failure:
 
(void) + createMeshGroupWithGroupName:meshId:localId:pcc:success:failure:
 
(NSInteger) + getBleMeshGroupAddress
 
(NSInteger) + getBleMeshGroupCount
 

Properties

id< ThingSmartBleMeshGroupDelegatedelegate
 
ThingSmartGroupModelmeshGroupModel
 

Detailed Description

The Thing Bluetooth mesh device groups allow you to create and update groups and add devices to the groups.

You can create a group of mesh devices with the same functions and simultaneously control them with a single command.

Definition at line 32 of file ThingSmartBleMeshGroup.h.

Method Documentation

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

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

Adds a device.

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

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

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

Adds a device.

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

◆ addSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure: [1/2]

- (void) addSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
localId: (NSString *)  localId
mainDevId: (nullable NSString *)  devId
categoryCode: (nullable NSString *)  categoryCode
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Adds a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
localIdmesh groupId
devIdremote control's devId
categoryCoderemote control's categoryCode
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

◆ addSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure: [2/2]

- (void) addSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
localId: (NSString *)  localId
mainDevId: (nullable NSString *)  devId
categoryCode: (nullable NSString *)  categoryCode
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Adds a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
localIdmesh groupId
devIdremote control's devId
categoryCoderemote control's categoryCode
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) addSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Adds a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) addSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Adds a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

◆ createMeshGroupWithGroupName:meshId:localId:pcc:success:failure: [1/2]

+ (void) createMeshGroupWithGroupName: (NSString *)  groupName
meshId: (NSString *)  meshId
localId: (NSString *)  localId
pcc: (NSString *)  pcc
success: (ThingSuccessInt success
failure: (ThingFailureError failure 

Creates a mesh group.

Parameters
groupNameThe mesh group name.
meshIdThe mesh ID.
localIdThe local short address of the group.
pccThe size class label of each group device.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ createMeshGroupWithGroupName:meshId:localId:pcc:success:failure: [2/2]

+ (void) createMeshGroupWithGroupName: (NSString *)  groupName
meshId: (NSString *)  meshId
localId: (NSString *)  localId
pcc: (NSString *)  pcc
success: (ThingSuccessInt success
failure: (ThingFailureError failure 

Creates a mesh group.

Parameters
groupNameThe mesh group name.
meshIdThe mesh ID.
localIdThe local short address of the group.
pccThe size class label of each group device.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ deleteBleMeshGroupAddress: [1/2]

- (void) deleteBleMeshGroupAddress: (NSInteger)  address

◆ deleteBleMeshGroupAddress: [2/2]

- (void) deleteBleMeshGroupAddress: (NSInteger)  address

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

- (void) editDeviceWithDeviceList: (NSArray *)  deviceList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies multiple devices in a call.

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

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

- (void) editDeviceWithDeviceList: (NSArray *)  deviceList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies multiple devices in a call.

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

◆ getBleMeshGroupAddress [1/2]

+ (NSInteger) getBleMeshGroupAddress

◆ getBleMeshGroupAddress [2/2]

+ (NSInteger) getBleMeshGroupAddress

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

+ (void) getBleMeshGroupAddressFromCluondWithMeshId: (NSString *)  meshId
success: (ThingSuccessInt success
failure: (ThingFailureError failure 

Assigns a group ID from the cloud.

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

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

+ (void) getBleMeshGroupAddressFromCluondWithMeshId: (NSString *)  meshId
success: (ThingSuccessInt success
failure: (ThingFailureError failure 

Assigns a group ID from the cloud.

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

◆ getBleMeshGroupCount [1/2]

+ (NSInteger) getBleMeshGroupCount

◆ getBleMeshGroupCount [2/2]

+ (NSInteger) getBleMeshGroupCount

◆ getDeviceListInfoWithSuccess:failure: [1/2]

- (void) getDeviceListInfoWithSuccess: (void(^)(NSArray< ThingSmartDeviceModel * > *deviceList))  success
failure: (ThingFailureError failure 

Returns a list of devices from the group.

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

◆ getDeviceListInfoWithSuccess:failure: [2/2]

- (void) getDeviceListInfoWithSuccess: (void(^)(NSArray< ThingSmartDeviceModel * > *deviceList))  success
failure: (ThingFailureError failure 

Returns a list of devices from the group.

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

◆ getDeviveListInfoWithSuccess:failure: [1/2]

- (void) getDeviveListInfoWithSuccess: (void(^)(NSArray< ThingSmartDeviceModel * > *deviceList))  success
failure: ("This method is)  deprecated
(Use instead")  __deprecated_msg[ThingSmartBleMeshGroup getDeviceListInfoWithSuccess:failure:] 

Returns a list of devices from the group.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.
Deprecated:
This method is deprecated, Use ThingSmartBleMeshGroup getDeviceListInfoWithSuccess:failure: instead.

◆ getDeviveListInfoWithSuccess:failure: [2/2]

- (void) getDeviveListInfoWithSuccess: (void(^)(NSArray< ThingSmartDeviceModel * > *deviceList))  success
failure: ("This method is)  deprecated
(Use instead")  __deprecated_msg[ThingSmartBleMeshGroup getDeviceListInfoWithSuccess:failure:] 

Returns a list of devices from the group.

Parameters
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.
Deprecated:
This method is deprecated, Use ThingSmartBleMeshGroup getDeviceListInfoWithSuccess:failure: instead.

◆ initWithGroupId: [1/2]

- (instancetype) initWithGroupId: (NSInteger)  NS_DESIGNATED_INITIALIZER

Returns the mesh group object.

Parameters
groupIdThe group ID.

◆ initWithGroupId: [2/2]

- (instancetype) initWithGroupId: (NSInteger)  NS_DESIGNATED_INITIALIZER

Returns the mesh group object.

Parameters
groupIdThe group ID.

◆ meshGroupWithGroupId: [1/2]

+ (instancetype) meshGroupWithGroupId: (NSInteger)  groupId

Returns the mesh group object.

Parameters
groupIdThe group ID.

◆ meshGroupWithGroupId: [2/2]

+ (instancetype) meshGroupWithGroupId: (NSInteger)  groupId

Returns the mesh group object.

Parameters
groupIdThe group ID.

◆ NS_UNAVAILABLE [1/2]

- (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [2/2]

- (instancetype) NS_UNAVAILABLE

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

- (void) publishDps: (NSDictionary *)  dps
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) publishDps: (NSDictionary *)  dps
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) publishDpsWithParams: (NSDictionary *)  params
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Publishes custom parameters.

Parameters
paramsparam:dictionary { "localId":"c050" ,"dps":{"1":true} "pcc":"1510"}
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) publishDpsWithParams: (NSDictionary *)  params
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Publishes custom parameters.

Parameters
paramsparam:dictionary { "localId":"c050" ,"dps":{"1":true} "pcc":"1510"}
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

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

Removes the device.

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

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

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

Removes the device.

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

◆ removeMeshGroupWithSuccess:failure: [1/2]

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

Deletes the mesh group.

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

◆ removeMeshGroupWithSuccess:failure: [2/2]

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

Deletes the mesh group.

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

◆ removeSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure: [1/2]

- (void) removeSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
localId: (NSString *)  localId
mainDevId: (nullable NSString *)  devId
categoryCode: (nullable NSString *)  categoryCode
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Deletes a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
localIdmesh groupId
devIdremote control's devId
categoryCoderemote control's categoryCode
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

◆ removeSubDeviceWithSubList:localId:mainDevId:categoryCode:success:failure: [2/2]

- (void) removeSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
localId: (NSString *)  localId
mainDevId: (nullable NSString *)  devId
categoryCode: (nullable NSString *)  categoryCode
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Deletes a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
localIdmesh groupId
devIdremote control's devId
categoryCoderemote control's categoryCode
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) removeSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Deletes a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) removeSubDeviceWithSubList: (NSArray< ThingSmartDeviceModel * > *_Nonnull)  subList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Deletes a Bluetooth mesh sub-device group through the Bluetooth mesh gateway. The sub-devices must belong to the Bluetooth mesh gateway.

Parameters
subListThe gateway sub-device to be managed.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartBleMeshGroup(SIGMesh).

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

- (void) updateMeshGroupName: (NSString *)  meshGroupName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the mesh group name.

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

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

- (void) updateMeshGroupName: (NSString *)  meshGroupName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the mesh group name.

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

Property Documentation

◆ delegate

- (id< ThingSmartBleMeshGroupDelegate >) delegate
readwritenonatomicweak

Definition at line 34 of file ThingSmartBleMeshGroup.h.

◆ meshGroupModel

- (ThingSmartGroupModel *) meshGroupModel
readnonatomicstrong

Definition at line 36 of file ThingSmartBleMeshGroup.h.


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