|
@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.nl.acs.agv.server.AgvService; |
|
|
import org.nl.acs.agv.server.AgvService; |
|
|
import org.nl.acs.agv.server.NDCAgvService; |
|
|
import org.nl.acs.agv.server.NDCAgvService; |
|
|
|
|
|
import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
import org.nl.acs.device.service.DeviceService; |
|
|
import org.nl.acs.device_driver.DeviceDriver; |
|
|
import org.nl.acs.device_driver.DeviceDriver; |
|
|
import org.nl.acs.device_driver.RouteableDeviceDriver; |
|
|
import org.nl.acs.device_driver.RouteableDeviceDriver; |
|
@ -127,10 +128,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple |
|
|
inst.setExecute_status("1"); |
|
|
inst.setExecute_status("1"); |
|
|
instructionService.update(inst); |
|
|
instructionService.update(inst); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
|
|
|
OneNDCSocketConnectionAutoRun.write(data); |
|
|
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
agvphase = 0; |
|
|
agvphase = 0; |
|
|
index = 0; |
|
|
index = 0; |
|
|
inst = null; |
|
|
inst = null; |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
|
|
|
|
|
@ -142,11 +144,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple |
|
|
inst.setExecute_status("2"); |
|
|
inst.setExecute_status("2"); |
|
|
instructionService.update(inst); |
|
|
instructionService.update(inst); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
// OneNDCSocketConnectionAutoRun.write(data);
|
|
|
OneNDCSocketConnectionAutoRun.write(data); |
|
|
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
agvphase = 0; |
|
|
agvphase = 0; |
|
|
index = 0; |
|
|
index = 0; |
|
|
inst = null; |
|
|
inst = null; |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
|
|
|
|
|
@ -158,11 +160,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple |
|
|
inst.setExecute_status("5"); |
|
|
inst.setExecute_status("5"); |
|
|
instructionService.update(inst); |
|
|
instructionService.update(inst); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
// OneNDCSocketConnectionAutoRun.write(data);
|
|
|
OneNDCSocketConnectionAutoRun.write(data); |
|
|
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
agvphase = 0; |
|
|
agvphase = 0; |
|
|
index = 0; |
|
|
index = 0; |
|
|
inst = null; |
|
|
inst = null; |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
} |
|
|
} |
|
@ -173,11 +175,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple |
|
|
inst.setExecute_status("6"); |
|
|
inst.setExecute_status("6"); |
|
|
instructionService.update(inst); |
|
|
instructionService.update(inst); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); |
|
|
// OneNDCSocketConnectionAutoRun.write(data);
|
|
|
OneNDCSocketConnectionAutoRun.write(data); |
|
|
|
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
agvphase = 0; |
|
|
agvphase = 0; |
|
|
index = 0; |
|
|
index = 0; |
|
|
inst = null; |
|
|
inst = null; |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); |
|
|
|
|
|
|
|
|