Browse Source

add 反馈agv状态接口

master
汪菘 2 years ago
parent
commit
134f3719c8
  1. 10
      acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java
  2. 10
      acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java

10
acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java

@ -455,19 +455,19 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
} else if (phase == 0x67) {//agv异常 } else if (phase == 0x67) {//agv异常
error = ikey; error = ikey;
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
} else if (phase == 0x71) { } else if (phase == 0x70) {
//x坐标 //x坐标
x = ikey; x = ikey;
} else if (phase == 0x72) { } else if (phase == 0x71) {
//y坐标 //y坐标
y = ikey; y = ikey;
} else if (phase == 0x73) { } else if (phase == 0x72) {
//车辆角度 //车辆角度
angle = ikey; angle = ikey;
} else if (phase == 0x74) { } else if (phase == 0x73) {
//agv电量 //agv电量
electric_qty = ikey; electric_qty = ikey;
} else if (phase == 0x75) { } else if (phase == 0x74) {
//三色灯状态 //三色灯状态
status = ikey; status = ikey;
} }

10
acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/ToAgvDevice.java

@ -52,17 +52,17 @@ public class ToAgvDevice {
request.put("REQCODE", IdUtil.simpleUUID()); request.put("REQCODE", IdUtil.simpleUUID());
request.put("TASKCODE", IdUtil.simpleUUID()); request.put("TASKCODE", IdUtil.simpleUUID());
//电量 //电量
request.put("AGVBATTERY", "80"); request.put("AGVBATTERY", agvNdcOneDeviceDriver.getElectric_qty());
//X //X
request.put("POSX", "60"); request.put("POSX", agvNdcOneDeviceDriver.getX());
//Y //Y
request.put("POSY", "80"); request.put("POSY", agvNdcOneDeviceDriver.getY());
//ip //ip
request.put("AGVIP", "127.0.0.1"); request.put("AGVIP", ObjectUtil.isEmpty(agvNdcOneDeviceDriver.getDevice().getExtraValue()) ? "" : agvNdcOneDeviceDriver.getDevice().getExtraValue().get("ip_address"));
//车号 //车号
request.put("AGVCODE", device.getDevice_code()); request.put("AGVCODE", device.getDevice_code());
//角度 //角度
request.put("AGVDIR", "90"); request.put("AGVDIR", agvNdcOneDeviceDriver.getAngle());
request.put("REQTIME", DateUtil.now()); request.put("REQTIME", DateUtil.now());
log.info("atrQueryAgvStatus 请求参数:"+request.toJSONString()); log.info("atrQueryAgvStatus 请求参数:"+request.toJSONString());
String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrQueryAgvStatus(request.toJSONString()); String str = new RTMSAGVSERVICE().getBasicHttpBindingIRTMSAGVSERVICE().atrQueryAgvStatus(request.toJSONString());

Loading…
Cancel
Save