public interface IBreezeDevice
Modifier and Type | Interface and Description |
---|---|
static interface |
IBreezeDevice.OnMessageCallback
设备主动上报数据回调接口
|
static interface |
IBreezeDevice.ResponseCallback
设备回复回调接口
当与设备交互且需要设备回复时,设备会通过该接口回调。 |
Modifier and Type | Method and Description |
---|---|
void |
addOnMessageCallback(IBreezeDevice.OnMessageCallback callback)
添加设备数据上报回调接口
|
boolean |
ready()
检查设备是否可以发送数据
|
void |
removeOnMessageCallback(IBreezeDevice.OnMessageCallback callback)
删除设备数据上报回调接口
|
void |
sendMessage(byte[] data,
IBreezeDevice.ResponseCallback callback)
发送数据给设备
当需要设备回复时,使用此方法 |
void |
sendMessage(byte[] data,
IBreezeDevice.ResponseCallback callback,
SendConfig config) |
void |
sendMessage(byte[] data,
IChannel.OperationCallback callback)
发送数据给设备
当不需要设备回复时,使用此方法 |
void |
sendMessage(byte[] data,
IChannel.OperationCallback callback,
SendConfig config) |
void sendMessage(byte[] data, IChannel.OperationCallback callback)
data
- 二进制数据callback
- 数据发送成功与否回调IChannel.OperationCallback
void sendMessage(byte[] data, IChannel.OperationCallback callback, SendConfig config)
void sendMessage(byte[] data, IBreezeDevice.ResponseCallback callback)
data
- 二进制数据callback
- 设备数据回调IBreezeDevice.ResponseCallback
void sendMessage(byte[] data, IBreezeDevice.ResponseCallback callback, SendConfig config)
void addOnMessageCallback(IBreezeDevice.OnMessageCallback callback)
callback
- 数据上报接口void removeOnMessageCallback(IBreezeDevice.OnMessageCallback callback)
callback
- 数据上报接口boolean ready()