package com.hdl.sdk.link.core.bean;
|
|
|
/**
|
* Created by Tong on 2021/9/29.
|
*/
|
public class HexRequest extends LinkRequest {
|
|
private Integer command;
|
|
// private static int info_number;
|
public HexRequest(String topic, String data, boolean encrypt) {
|
super(topic, data, encrypt);
|
}
|
|
|
public HexRequest(int command, byte []fileData, boolean encrypt) {
|
this.command = command;
|
super.setEncrypt(encrypt);
|
super.setData(fileData);
|
}
|
|
@Override
|
public byte [] getSendBytes() {
|
return getData();
|
}
|
|
public String getTopic() {
|
return "65531_" + command;
|
}
|
|
public String getAckTopic() {
|
return "65531_" + ++command;
|
}
|
|
}
|