1
wei
2021-01-21 62d098cb78296feaa6f786a20748921338db838c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// TYBLEMeshCommand.h
// TuyaSmartBLEMeshKit
//
// Copyright (c) 2014-2021 Tuya Inc. (https://developer.tuya.com)
 
#import <Foundation/Foundation.h>
#import "TYBLEMeshCommandType.h"
 
@protocol TYBLEMeshCommandProtocol <NSObject>
 
/// Convert to Bluetooth command.
/// @return Bluetooth command.
- (NSData *)command;
 
/// Convert to raw command (used by gateway).
/// @return Raw command.
- (NSString *)raw;
 
@end
 
@interface TYBLEMeshCommand : NSObject <TYBLEMeshCommandProtocol>
 
/// Command type
@property (nonatomic, assign) TYBLEMeshCommandType commandType;
 
/// For equipment type, the small category is in the front, and the major category is in the rear, for example, four street lamps. At this time, the PCC is 0401 "04 represents four street lamps, 01 represents major categories of lamps".
@property (nonatomic, strong) NSString *pcc;
 
/// Device or group address, device address range (1-255), group address range 0x8001-0x8008.
@property (nonatomic, assign) uint32_t address;
 
/// Is it a group command.
@property (nonatomic, assign) BOOL isGroup;
 
/// For command data, refer to the document.
@property (nonatomic, strong) NSArray<NSString *> *dataParams;
 
/// Secondary log output.
@property (nonatomic, strong) NSString *logDescription;
 
@end