|
@ -116,7 +116,6 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
bs.append(temp < 16 ? bs1.append(Integer.toHexString(temp)) : Integer.toHexString(temp)); |
|
|
bs.append(temp < 16 ? bs1.append(Integer.toHexString(temp)) : Integer.toHexString(temp)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//System.out.println("收到请求参数:" + bs);
|
|
|
|
|
|
boolean flag = false; |
|
|
boolean flag = false; |
|
|
if (arr[8] * 256 + arr[9] == 0x73) { |
|
|
if (arr[8] * 256 + arr[9] == 0x73) { |
|
|
byte[] data = null; |
|
|
byte[] data = null; |
|
@ -127,7 +126,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
int index = arr[12] * 256 + arr[13]; |
|
|
int index = arr[12] * 256 + arr[13]; |
|
|
//任务号
|
|
|
//任务号
|
|
|
int ikey = arr[26] * 256 + arr[27]; |
|
|
int ikey = arr[26] * 256 + arr[27]; |
|
|
//站点号
|
|
|
//agv车号
|
|
|
int agvaddr = arr[18] * 256 + arr[19]; |
|
|
int agvaddr = arr[18] * 256 + arr[19]; |
|
|
//车号
|
|
|
//车号
|
|
|
int carno = arr[20]; |
|
|
int carno = arr[20]; |
|
@ -152,7 +151,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
link_flag = true; |
|
|
link_flag = true; |
|
|
} |
|
|
} |
|
|
log.info("接收agv上报信息:" + bs); |
|
|
log.info("接收agv上报信息:" + bs); |
|
|
log.info("接收agv上报信息:" + "phase--" + phase + " index--" + index + " ikey--" + ikey + " agvaddr--" + agvaddr + " Car--" + carno); |
|
|
log.info("接收agv上报信息:" + "phase--" + phase + " index--" + index + " ikey--" + ikey + " agvaddr--" + agvaddr + " carno--" + carno+" station--"+station); |
|
|
Device device = null; |
|
|
Device device = null; |
|
|
String device_code = null; |
|
|
String device_code = null; |
|
|
String old_device_code = null; |
|
|
String old_device_code = null; |
|
@ -169,7 +168,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
} |
|
|
} |
|
|
device = deviceAppService.findDeviceByCode(device_code); |
|
|
device = deviceAppService.findDeviceByCode(device_code); |
|
|
} |
|
|
} |
|
|
|
|
|
log.info("接收agv上报信息,agvaddr != 0,device:"+device); |
|
|
//
|
|
|
//
|
|
|
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver; |
|
|
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver; |
|
|
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver; |
|
|
StandardAutodoorDeviceDriver standardAutodoorDeviceDriver; |
|
@ -284,11 +283,19 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { |
|
|
else { |
|
|
else { |
|
|
//上报异常信息
|
|
|
//上报异常信息
|
|
|
//(不需要WCS反馈)
|
|
|
//(不需要WCS反馈)
|
|
|
|
|
|
/* if (phase == 0x67) { |
|
|
|
|
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[27])); |
|
|
|
|
|
} else { |
|
|
|
|
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[20])); |
|
|
|
|
|
}*/ |
|
|
if (phase == 0x67) { |
|
|
if (phase == 0x67) { |
|
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[27])); |
|
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[27])); |
|
|
|
|
|
} else if (phase == 0x73) { |
|
|
|
|
|
device = deviceAppService.findDeviceByCode(Integer.toString(agvaddr)); |
|
|
}else{ |
|
|
}else{ |
|
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[20])); |
|
|
device = deviceAppService.findDeviceByCode(Integer.toString(arr[20])); |
|
|
} |
|
|
} |
|
|
|
|
|
log.info("接收agv上报信息,上报异常信息:" + device); |
|
|
if (ObjectUtil.isNotEmpty(device)) { |
|
|
if (ObjectUtil.isNotEmpty(device)) { |
|
|
if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) { |
|
|
if (device.getDeviceDriver() instanceof AgvNdcOneDeviceDriver) { |
|
|
agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver(); |
|
|
agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver(); |
|
|