rev:优化agv下发方法

This commit is contained in:
2024-07-02 20:38:23 +08:00
parent 4fb3552444
commit 2bf7146c87
7 changed files with 113 additions and 171 deletions

View File

@@ -62,7 +62,7 @@ public interface NDCAgvService {
* @param result
* @return
*/
/*public byte[] sendAgvTwoModeInst(int phase, int index, int result,int offset,int quantity);*/
public byte[] sendAgvTwoModeInst(int phase, int index, int result,int offset,int quantity);
/**
* 下发一号agv指令

View File

@@ -336,7 +336,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
return b;
}
/*@Override
@Override
public byte[] sendAgvTwoModeInst(int phase, int index, int result,int offset,int quantity) {
if (phase < 0 || index < 0)
return null;
@@ -368,7 +368,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
System.out.println("反馈agv动作数据:" + Bytes2HexString(b));
return b;
}*/
}
@Override

View File

@@ -191,7 +191,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
inst.setAgv_jobno(String.valueOf(index));
inst.setSend_status("1");
instructionService.update(inst);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
}
flag = true;
}
@@ -219,12 +219,13 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
e.printStackTrace();
}
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
}
//请求删除任务
//(需要WCS反馈)
else if (phase == 0x30) {
data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0);
// data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(0x8F, index, 0,0,0);
}
//任务删除确认
//(需要WCS反馈)

View File

@@ -1,13 +1,12 @@
package org.nl.acs.device_driver.agv.ndctwo;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.AcsConfig;
import org.nl.acs.agv.server.NDCAgvService;
import org.nl.acs.auto.run.TwoNDCSocketConnectionAutoRun;
import org.nl.acs.common.base.CommonFinalParam;
@@ -23,7 +22,6 @@ import org.nl.acs.device_driver.storage.standard_storage.StandardStorageDeviceDr
import org.nl.acs.device_driver.driver.AbstractDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.HongXiangStationDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.manipulator_agv_station.ManipulatorAgvStationDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.oven_manipulator.OvenGantryManipulatorDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.ranging_stations.RangingStationsDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.waste_foil_weighing_station.WasteFoilWeighingStationDriver;
import org.nl.acs.ext.wms.service.AcsToWmsService;
@@ -41,8 +39,6 @@ import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.acs.task.service.impl.TaskServiceImpl;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.enums.LogTypeEnum;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.config.thread.ThreadPoolExecutorUtil;
@@ -267,7 +263,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -287,7 +283,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -305,47 +301,23 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1
&& standardInspectSiteDeviceDriver.getError() == 0)) {
String region = (String) standardInspectSiteDeviceDriver.getDevice().getExtraValue().get("region");
if (StrUtil.isNotEmpty(region) && !(" ".equals(region))) {
String linkDeviceCode = (String) standardInspectSiteDeviceDriver.getDevice().getExtraValue().get("link_device_code");
Device deviceByCode = deviceAppService.findDeviceByCode(linkDeviceCode);
if (ObjectUtil.isNotEmpty(deviceByCode) && deviceByCode.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
OvenGantryManipulatorDeviceDriver hxhj = (OvenGantryManipulatorDeviceDriver) deviceByCode.getDeviceDriver();
String s = Integer.parseInt(region) == 2 ? "one" : Integer.parseInt(region) == 6 ?
"two" : Integer.parseInt(region) == 8 ? "three" : null;
Class<? extends OvenGantryManipulatorDeviceDriver> aClass = hxhj.getClass();
String regionCode = "region_" + s;
if (StrUtil.isNotEmpty(s) && ((Integer) aClass.getField(regionCode).get(hxhj) == 0)) {
hxhj.writing("to_" + regionCode, region);
log.info("下发AGV进入区域{}信号值为:{}", s, region);
} else {
log.info("区域{}信号{}未清除,导致不满足下发AGV进入区域信号", s, regionCode);
}
if (hxhj.getMode() == 2 && StrUtil.isNotEmpty(region) && ((Integer) aClass.getField(regionCode).get(hxhj) == Integer.parseInt(region))) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} else {
log.error("AGV进入区域{}信号{}行架未接收{},请检查;或行架正在执行中:{}", region, regionCode, Integer.parseInt(region), hxhj.getMode());
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, standardInspectSiteDeviceDriver.getMove(), standardInspectSiteDeviceDriver.getAction()
, standardInspectSiteDeviceDriver.getError(), ikey);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content(message)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
} else {
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, standardInspectSiteDeviceDriver.getMove(), standardInspectSiteDeviceDriver.getAction()
, standardInspectSiteDeviceDriver.getError(), ikey);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content(message)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
@@ -356,7 +328,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -381,7 +353,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() > 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -408,7 +380,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -491,7 +463,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", "2");
wasteFoilWeighingStationDriver.writing(map);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -513,7 +485,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -579,7 +551,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
&& StrUtil.equals("true", this.device.getExtraValue().get("wait").toString())
&& StrUtil.equals(task.getTask_type(), "1")) {
standardOrdinarySiteDeviceDriver.setOption(0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -587,7 +559,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -618,7 +590,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} catch (Exception e) {
e.printStackTrace();
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -648,7 +620,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() > 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -675,7 +647,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -702,37 +674,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if ((standardInspectSiteDeviceDriver.getMove() != 1 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) {
String region = (String) standardInspectSiteDeviceDriver.getDevice().getExtraValue().get("region");
if (StrUtil.isNotEmpty(region) && !(" ".equals(region))) {
String linkDeviceCode = (String) standardInspectSiteDeviceDriver.getDevice().getExtraValue().get("link_device_code");
Device deviceByCode = deviceAppService.findDeviceByCode(linkDeviceCode);
if (ObjectUtil.isNotEmpty(deviceByCode) && deviceByCode.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
OvenGantryManipulatorDeviceDriver hxhj = (OvenGantryManipulatorDeviceDriver) deviceByCode.getDeviceDriver();
String s = Integer.parseInt(region) == 2 ? "one" : Integer.parseInt(region) == 6 ?
"two" : Integer.parseInt(region) == 8 ? "three" : null;
Class<? extends OvenGantryManipulatorDeviceDriver> aClass = hxhj.getClass();
String regionCode = "region_" + s;
if (StrUtil.isNotEmpty(s) && ((Integer) aClass.getField(regionCode).get(hxhj) != 0)) {
hxhj.writing("to_"+regionCode, "0");
log.info("下发AGV离开区域{}信号值为:{}", region, 0);
} else {
log.info("区域{}信号{}为0,不需要下发AGV离开区域信号", s, regionCode);
}
if (hxhj.getMode() == 2 && ((Integer) aClass.getField(regionCode).get(hxhj) == 0)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} else {
log.error("AGV离开区域{}信号{}行架未接收0,请检查;或行架正在执行中:{}", s, regionCode, hxhj.getMode());
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
} else {
message = "设备号:" + device_code + "光电信号:" + standardInspectSiteDeviceDriver.getMove() + ",动作信号:" + standardInspectSiteDeviceDriver.getAction() + "报警信号:" + standardInspectSiteDeviceDriver.getError() + ",指令号:" + ikey + "不满足取货条件";
log.info("设备{}当前光电信号{},动作信号{} ,错误信号{},不满足取货条件,指令号{}", device_code, standardInspectSiteDeviceDriver.getMove(), standardInspectSiteDeviceDriver.getAction()
@@ -752,7 +700,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", "3");
wasteFoilWeighingStationDriver.writing(map);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -774,7 +722,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -844,7 +792,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -864,7 +812,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -881,7 +829,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -907,7 +855,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -933,7 +881,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() > 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -960,7 +908,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1030,7 +978,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
log.info("设备{},偏移数据出错导致未反馈{},指令号{}", device_code, rangingStationsDeviceDriver.getLength1() + "," + rangingStationsDeviceDriver.getLength2(), ikey);
}
}*/ else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1087,7 +1035,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("wait").toString())) {
standardOrdinarySiteDeviceDriver.setOption(0);
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1095,7 +1043,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
standardOrdinarySiteDeviceDriver.setAgvphase(phase);
standardOrdinarySiteDeviceDriver.setIndex(index);
standardOrdinarySiteDeviceDriver.setInst(inst);
@@ -1114,7 +1062,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() == 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1140,7 +1088,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} catch (Exception e) {
e.printStackTrace();
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1156,7 +1104,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1183,7 +1131,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if ((standardInspectSiteDeviceDriver.getMove() == 1 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1202,7 +1150,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1238,7 +1186,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
task.setCarno(this.device_code);
taskService.update(task);
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1289,7 +1237,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1309,7 +1257,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1336,7 +1284,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1361,7 +1309,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() == 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1383,7 +1331,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
standardInspectSiteDeviceDriver.writing(1);
if ((standardInspectSiteDeviceDriver.getMove() == 0 && standardInspectSiteDeviceDriver.getAction() == 1 && standardInspectSiteDeviceDriver.getError() == 0)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1460,7 +1408,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", "4");
wasteFoilWeighingStationDriver.writing(map);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1482,7 +1430,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1546,7 +1494,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
// } else {
// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
// }
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1562,7 +1510,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} catch (Exception e) {
e.printStackTrace();
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1577,7 +1525,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() > 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1620,7 +1568,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1643,37 +1591,13 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
standardInspectSiteDeviceDriver.writing(0);
if ((standardInspectSiteDeviceDriver.getMove() == 1)) {
String region = (String) standardInspectSiteDeviceDriver.getDevice().getExtraValue().get("region");
if (StrUtil.isNotEmpty(region) && !(" ".equals(region))) {
String linkDeviceCode = (String) standardInspectSiteDeviceDriver.getDevice().getExtraValue().get("link_device_code");
Device deviceByCode = deviceAppService.findDeviceByCode(linkDeviceCode);
if (ObjectUtil.isNotEmpty(deviceByCode) && deviceByCode.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
OvenGantryManipulatorDeviceDriver hxhj = (OvenGantryManipulatorDeviceDriver) deviceByCode.getDeviceDriver();
String s = Integer.parseInt(region) == 2 ? "one" : Integer.parseInt(region) == 6 ?
"two" : Integer.parseInt(region) == 8 ? "three" : null;
Class<? extends OvenGantryManipulatorDeviceDriver> aClass = hxhj.getClass();
String regionCode = "region_" + s;
if (StrUtil.isNotEmpty(s) && ((Integer) aClass.getField(regionCode).get(hxhj) != 0)) {
hxhj.writing("to_"+ regionCode, "0");
log.info("下发AGV离开区域{}信号值为:{}", region, 0);
} else {
log.info("区域{}信号{}为0,不需要下发AGV离开区域信号", s, regionCode);
}
if (hxhj.getMode() == 2 && ((Integer) aClass.getField(regionCode).get(hxhj) == 0)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
} else {
log.error("AGV离开区域{}信号{}行架未接收0,请检查;或行架正在执行中:{}", s, regionCode, hxhj.getMode());
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) {
wasteFoilWeighingStationDriver = (WasteFoilWeighingStationDriver) device.getDeviceDriver();
@@ -1683,7 +1607,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
Map<String, Object> map = new LinkedHashMap<>();
map.put("to_command", "5");
wasteFoilWeighingStationDriver.writing(map);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1705,7 +1629,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1771,7 +1695,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
// } else {
// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
// }
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1789,7 +1713,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if ((manipulatorAgvStationDeviceDriver.getAction() == 1)) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1814,7 +1738,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() == 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1841,7 +1765,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1917,7 +1841,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
log.info("设备{},偏移数据出错导致未反馈{},指令号{}", device_code, rangingStationsDeviceDriver.getLength1() + "," + rangingStationsDeviceDriver.getLength2(), ikey);
}
}*/ else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -1984,7 +1908,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
// } else {
// data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
// }
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -2000,7 +1924,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
} catch (Exception e) {
e.printStackTrace();
}
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -2016,7 +1940,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
}
if (paperTubePickSiteDeviceDriver.getAction() == 1
&& paperTubePickSiteDeviceDriver.getError() == 0 && paperTubePickSiteDeviceDriver.getMode() == 2) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -2042,7 +1966,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
e.printStackTrace();
}
if (hongXiangStationDeviceDriver.getMove() > 0) {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)
@@ -2061,7 +1985,7 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto);
}
} else {
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0);
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0,0,0);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("agvphase:" + phase + "反馈:" + data)

View File

@@ -789,11 +789,14 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
//判断有没有DDJ对接位出入库的指令
List<Instruction> byCodeAndExcute = instructionService.findByCodeAndExcute(next_device_code);
if (CollUtil.isNotEmpty(byCodeAndExcute)){
for (Instruction instruction : byCodeAndExcute) {
Iterator<Instruction> iterator = byCodeAndExcute.iterator();
while (iterator.hasNext()) {
Instruction instruction = iterator.next();
Device nextDevice = deviceAppService.findDeviceByCode(instruction.getNext_device_code());
byCodeAndExcute.removeIf(item ->StrUtil.equals(nextDevice.getDevice_type(), DeviceType.storage.name()));
if (StrUtil.equals(nextDevice.getDevice_type(), DeviceType.storage.name())){
iterator.remove();
}
}
}
if (CollUtil.isNotEmpty(byCodeAndExcute)){
this.message="有DDJ对接位出入库的指令";

View File

@@ -21,6 +21,7 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.hongxiang_device.HongXiangConveyorDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.lamp_three_color.LampThreecolorDeviceDriver;
import org.nl.acs.device_driver.two_conveyor.manipulator_agv_station.ManipulatorAgvStationDeviceDriver;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.history.ErrorUtil;
import org.nl.acs.history.service.DeviceErrorLogService;
@@ -350,6 +351,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
Device startdevice = deviceAppService.findDeviceByCode(start_device_code);
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver;
OvenInspectSiteDeviceDriver ovenInspectSiteDeviceDriver;
/*if (startdevice.getDeviceDriver() instanceof OvenInspectSiteDeviceDriver && nextdevice.getDeviceDriver() instanceof RangingStationsDeviceDriver) {
ovenInspectSiteDeviceDriver = (OvenInspectSiteDeviceDriver) startdevice.getDeviceDriver();
@@ -1034,6 +1036,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver;
LampThreecolorDeviceDriver lampThreecolorDeviceDriver;
if (nextDevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextDevice.getDeviceDriver();
@@ -1051,8 +1054,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
}
if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextDevice.getDeviceDriver();
if (nextDevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver||nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
if (!StrUtil.startWith(taskDto.getTask_code(), "-")) {
if (ObjectUtil.isNotEmpty(nextDevice.getExtraValue().get("link_three_lamp"))) {
String lamp = nextDevice.getExtraValue().get("link_three_lamp").toString();

View File

@@ -695,6 +695,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
//拆叠盘位
FoldDiscSiteDeviceDriver foldDiscSiteDeviceDriver;
//气胀轴缓存库
InflatableShaftLibraryDeviceDriver inflatableShaftLibraryDeviceDriver;
PlugPullDeviceSiteDeviceDriver plugPullDeviceSiteDeviceDriver;
if (datas.size() == 0) {
throw new BadRequestException("缺少输入参数!");
@@ -844,6 +847,15 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
jo.put("qty", foldDiscSiteDeviceDriver.getQty());
jo.put("container_type", foldDiscSiteDeviceDriver.getContainer_type());
jo.put("error", foldDiscSiteDeviceDriver.getError());
}
else if (device.getDeviceDriver() instanceof InflatableShaftLibraryDeviceDriver) {
inflatableShaftLibraryDeviceDriver = (InflatableShaftLibraryDeviceDriver) device.getDeviceDriver();
jo.put("device_code", parent_device_code);
jo.put("move", inflatableShaftLibraryDeviceDriver.getMove());
jo.put("mode", inflatableShaftLibraryDeviceDriver.getMode());
jo.put("qty", inflatableShaftLibraryDeviceDriver.getQty());
jo.put("error", inflatableShaftLibraryDeviceDriver.getError());
jo.put("type", inflatableShaftLibraryDeviceDriver.getError());
} else {
jo.put("device_code", parent_device_code);
}