1078-修复摄像头立即拍摄命令应答
This commit is contained in:
@@ -10,6 +10,7 @@ import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufUtil;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -27,17 +28,19 @@ public class J0805 extends Re {
|
||||
/**
|
||||
* 表示拍摄成功的多媒体个数
|
||||
*/
|
||||
private List<Long> ids;
|
||||
private List<Long> ids = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected Rs decode0(ByteBuf buf, Header header, Session session) {
|
||||
respNo = buf.readUnsignedShort();
|
||||
result = buf.readUnsignedByte();
|
||||
int length = buf.readUnsignedByte();
|
||||
for (int i = 0; i < length; i++) {
|
||||
ids.add(buf.readUnsignedInt());
|
||||
if (result == 0) {
|
||||
int length = buf.readUnsignedShort();
|
||||
for (int i = 0; i < length; i++) {
|
||||
ids.add(buf.readUnsignedInt());
|
||||
}
|
||||
}
|
||||
SessionManager.INSTANCE.response(header.getTerminalId(), "0805", (long) respNo, ids);
|
||||
SessionManager.INSTANCE.response(header.getTerminalId(), "0805", null, ids);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -711,6 +711,6 @@ public class jt1078ServiceImpl implements Ijt1078Service {
|
||||
public List<Long> shooting(String deviceId, JTShootingCommand shootingCommand) {
|
||||
J8801 j8801 = new J8801();
|
||||
j8801.setCommand(shootingCommand);
|
||||
return (List<Long>)jt1078Template.shooting(deviceId, j8801, 20);
|
||||
return (List<Long>)jt1078Template.shooting(deviceId, j8801, 300);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ public enum SessionManager {
|
||||
return null;
|
||||
}
|
||||
String requestKey = requestKey(cmd.getDevId(), cmd.getRespId(), cmd.getPackageNo());
|
||||
System.out.println("requestKey==" + requestKey);
|
||||
SynchronousQueue<Object> subscribe = subscribe(requestKey);
|
||||
if (subscribe == null) {
|
||||
log.error("DevId: {} key:{} send repaid", cmd.getDevId(), requestKey);
|
||||
|
||||
Reference in New Issue
Block a user