add rgv状态
This commit is contained in:
@@ -266,9 +266,18 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
System.out.println("下发agv数据:" + Bytes2HexString(b));
|
||||
dos.write(b);
|
||||
dos.flush();
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
try{
|
||||
Thread.sleep(5000);
|
||||
log.info("再次下发agv数据:" + Bytes2HexString(b));
|
||||
System.out.println("再次下发agv数据:" + Bytes2HexString(b));
|
||||
dos.write(b);
|
||||
dos.flush();
|
||||
} catch (Exception e1){
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class Resp<T> {
|
||||
public String result;
|
||||
|
||||
/**
|
||||
* 错误码(0表示成功)1代表入库目的位置有货,其他更多情况待定
|
||||
* 错误码
|
||||
*/
|
||||
public String code;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.nl.acs.ext.wms.liKuData.OutConfirmRequest;
|
||||
import org.nl.acs.ext.wms.liKuData.Resp;
|
||||
import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
import org.nl.acs.ext.wms.service.WmsToAcsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
@@ -291,11 +292,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
} else if (device.getDeviceDriver() instanceof DeviceStatusDeviceDriver) {
|
||||
deviceStatusDeviceDriver = (DeviceStatusDeviceDriver) device.getDeviceDriver();
|
||||
jo.put("device_code", deviceStatusDeviceDriver.getDevice().getDevice_code());
|
||||
jo.put("device_code", deviceStatusDeviceDriver.getDevice().getDevice_name());
|
||||
jo.put("device_name", deviceStatusDeviceDriver.getDevice().getDevice_name());
|
||||
jo.put("x", deviceStatusDeviceDriver.getX());
|
||||
jo.put("y", deviceStatusDeviceDriver.getY());
|
||||
jo.put("power", deviceStatusDeviceDriver.getPower());
|
||||
jo.put("error", deviceStatusDeviceDriver.getAlarm());
|
||||
jo.put("error_name", ErrorUtil.getDictDetail("rgv_error_type", String.valueOf(deviceStatusDeviceDriver.getAlarm())));
|
||||
//楼层
|
||||
jo.put("map_id", deviceStatusDeviceDriver.getMap_id());
|
||||
jo.put("pallet", deviceStatusDeviceDriver.getPallet());
|
||||
|
||||
@@ -192,9 +192,9 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
|
||||
if (true) {
|
||||
this.logItemChanged(itemId, accessor_value, value, itemDto);
|
||||
}
|
||||
// if(!ObjectUtil.isEmpty(value)){
|
||||
if(!ObjectUtil.isEmpty(value)){
|
||||
accessor_value.setValue(itemId, value);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ public class OpcServerServiceImpl implements OpcServerService, ApplicationAutoIn
|
||||
OpcUtl.writeValue(group, values);
|
||||
} catch (Exception var4) {
|
||||
this.clearServer(code);
|
||||
log.warn("写入出错opc server {} 重新加载", code, var4);
|
||||
log.info("写入出错opc server {} 重新加载", code, var4);
|
||||
ThreadUtl.sleep(5000L);
|
||||
throw var4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user