opt:接口频率优化
This commit is contained in:
@@ -704,6 +704,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.require_apply_in_time_out);
|
||||
return;
|
||||
}
|
||||
this.require_apply_in_time = date;
|
||||
try {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("device_code", device_code);
|
||||
|
||||
@@ -132,8 +132,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
private int instruction_update_time_out = 1000;
|
||||
Integer heartbeat_tag;
|
||||
private Date instruction_require_time = new Date();
|
||||
private Date apply_feedback_require_time = new Date();
|
||||
|
||||
private int instruction_require_time_out = 3000;
|
||||
private int apply_feedback_require_time_out = 3000;
|
||||
|
||||
//行架机械手申请任务成功标识
|
||||
boolean requireSucess = false;
|
||||
|
||||
@@ -230,6 +233,12 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
|
||||
//反馈重量
|
||||
if (mode == 3 && action == 5 && move == 0 && weight > 0 && StrUtil.isNotEmpty(sub_volume_no) && !requireSucess) {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.apply_feedback_require_time.getTime() < (long) this.apply_feedback_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.apply_feedback_require_time_out);
|
||||
return ;
|
||||
}
|
||||
this.apply_feedback_require_time = date;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "反馈重量");
|
||||
ApplyfeedbackSubVolumeWeightRequest applyfeedbackSubVolumeWeightRequest = new ApplyfeedbackSubVolumeWeightRequest();
|
||||
ApplyfeedbackSubVolumeWeightResponse applyfeedbackSubVolumeWeightResponse;
|
||||
|
||||
Reference in New Issue
Block a user