LKIoTSubdeviceConn Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | LKMobileGateway.h |
– open:
required method
打开子设备连接通道
- (void)open:(void ( ^ ) ( NSError *error ))completionHandler
Parameters
completionHandler |
结果通知 |
---|
Discussion
打开子设备连接通道
Declared In
LKMobileGateway.h
– close:
required method
关闭子设备连接通道
- (void)close:(void ( ^ ) ( NSError *error ))completionHandler
Parameters
completionHandler |
结果通知 |
---|
Discussion
关闭子设备连接通道
Declared In
LKMobileGateway.h
– isReady
required method
判断跟子设备之间的连接是否准备就绪,如果没有就绪,SDK会调用open接口打开
- (BOOL)isReady
Discussion
判断跟子设备之间的连接是否准备就绪,如果没有就绪,SDK会调用open接口打开
Declared In
LKMobileGateway.h
– getSubDeviceInfo
required method
获取子设备的信息, 字典key包括: “clientId” “productKey” “deviceName” “sign”, “signMethod” 对于三元组设备 子设备签名规则同网关相同 clientId 客户端标识,可以取 mac,也可以是随机字串,由设备端确定,对于蓝牙设备,signMethod 指定为 sha256 假定:clientId=123, deviceName=test, productKey=123,deviceSecret=secret. signMethod:“sha256”, 则 sign 计算规则如下 sign = sha256(clientId123deviceNametestdeviceSecretsecretproductKey123)
- (NSDictionary *)getSubDeviceInfo
Discussion
获取子设备的信息, 字典key包括: “clientId” “productKey” “deviceName” “sign”, “signMethod” 对于三元组设备 子设备签名规则同网关相同 clientId 客户端标识,可以取 mac,也可以是随机字串,由设备端确定,对于蓝牙设备,signMethod 指定为 sha256 假定:clientId=123, deviceName=test, productKey=123,deviceSecret=secret. signMethod:“sha256”, 则 sign 计算规则如下 sign = sha256(clientId123deviceNametestdeviceSecretsecretproductKey123)
Declared In
LKMobileGateway.h