更新
This commit is contained in:
@@ -107,29 +107,45 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
}
|
||||
|
||||
// public synchronized String getStatus() {
|
||||
// JSONObject jo = new JSONObject();
|
||||
//
|
||||
// if (action == 1) {
|
||||
// jo.put("name", this.getDevice().getDevice_code());
|
||||
// jo.put("status", "OPEN");
|
||||
// jo.put("action", action);
|
||||
// jo.put("mode", mode);
|
||||
//
|
||||
// } else if (action == 2) {
|
||||
// jo.put("name", this.getDevice().getDevice_code());
|
||||
// jo.put("status", "CLOSE");
|
||||
// jo.put("action", action);
|
||||
// jo.put("mode", mode);
|
||||
//
|
||||
// } else {
|
||||
// jo.put("name", this.getDevice().getDevice_code());
|
||||
// jo.put("status", "ERROR");
|
||||
// jo.put("action", action);
|
||||
// jo.put("mode", mode);
|
||||
// }
|
||||
// System.out.println("查询自动门状态,device_code:"+this.getDevice().getDevice_code() +",action:" + action +",mode:"+mode+",param:"+jo);
|
||||
//
|
||||
// return jo.toString();
|
||||
// }
|
||||
|
||||
public synchronized String getStatus() {
|
||||
JSONObject jo = new JSONObject();
|
||||
|
||||
if (action == 1) {
|
||||
if (action == 1 && mode == 2) {
|
||||
jo.put("name", this.getDevice().getDevice_code());
|
||||
jo.put("status", "OPEN");
|
||||
jo.put("action", action);
|
||||
jo.put("mode", mode);
|
||||
|
||||
} else if (action == 2) {
|
||||
} else if (action == 2 && mode == 2) {
|
||||
jo.put("name", this.getDevice().getDevice_code());
|
||||
jo.put("status", "CLOSE");
|
||||
jo.put("action", action);
|
||||
jo.put("mode", mode);
|
||||
|
||||
} else {
|
||||
jo.put("name", this.getDevice().getDevice_code());
|
||||
jo.put("status", "ERROR");
|
||||
jo.put("action", action);
|
||||
jo.put("mode", mode);
|
||||
}
|
||||
System.out.println("查询自动门状态,device_code:"+this.getDevice().getDevice_code() +",action:" + action +",mode:"+mode+",param:"+jo);
|
||||
|
||||
return jo.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -190,16 +190,16 @@ public class StandardManipulatorInspectSiteDeviceDriver extends AbstractOpcDevic
|
||||
break;
|
||||
case 3:
|
||||
//申请空盘
|
||||
if (!requireSucess && this.move == 0) {
|
||||
applyEmpty();
|
||||
}
|
||||
break;
|
||||
// if (!requireSucess && this.move == 0) {
|
||||
// applyEmpty();
|
||||
// }
|
||||
// break;
|
||||
case 4:
|
||||
//申请搬运任务
|
||||
if (!requireSucess && this.move != 0) {
|
||||
autoCreateTask();
|
||||
}
|
||||
break;
|
||||
// if (!requireSucess && this.move != 0) {
|
||||
// autoCreateTask();
|
||||
// }
|
||||
// break;
|
||||
case 5:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user