From d867d8d14b00e20ecfb00e349611ea62c4853c78 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 24 三月 2023 10:16:53 +0800
Subject: [PATCH] 四向穿梭车通讯协议代码部分
---
src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java | 113 ++++++++++----------------------------------------------
1 files changed, 21 insertions(+), 92 deletions(-)
diff --git a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
index b82f97b..5c1d5d7 100644
--- a/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/ShuttleProtocol.java
@@ -37,82 +37,11 @@
public Short lev;
/**
- * 鎺у埗鎸囦护瀛�
- */
- private Integer commandWord;
-
- /**
- * 鍚浜岀淮缂栧彿
- */
- private Integer startCodeNum;
-
- /**
- * 涓棿浜岀淮缂栧彿
- */
- private Integer middleCodeNum;
-
- /**
- * 鐩爣浜岀淮缂栧彿
- */
- private Integer distCodeNum;
-
- /**
- * 璧风偣鍒扮洰鏍囩偣鐨勮窛绂婚暱搴�
- */
- private Integer startToDistDistance;
-
- /**
- * 涓棿鐐瑰埌鐩爣鐐圭殑璺濈闀垮害
- */
- private Integer middleToDistDistance;
-
- /**
- * 灏忚溅杩愯鏂瑰悜
- */
- private Integer runDirection;
-
- /**
- * 鎵樼洏椤跺崌
- */
- private Integer palletLift;
-
- /**
- * 灏忚溅寮哄埗绉诲姩璺濈
- */
- private Integer forceMoveDistance;
-
- /**
- * 鍏呯數寮�鍏�
- */
- private Integer chargeSwitch;
-
- /**
- * 灏忚溅IO鎺у埗
- */
- private Integer IOControl;
-
- /**
- * 灏忚溅杩愯閫熷害
- */
- private Integer runSpeed;
-
- /**
- * 灏忚溅闆疯揪澶囩敤
- */
- private Integer radarTmp;
-
- /**
- * 鎸囦护缁撴潫浣�
- */
- private Integer commandEnd;
-
-
- /**
* 灏忚溅蹇欑姸鎬佷綅
- * true: 蹇�
- * false: 绌洪棽
+ * 1: 蹇�
+ * 0: 绌洪棽
*/
- private Boolean busyStatus;
+ private Short busyStatus;
/**
* 灏忚溅蹇欑姸鎬佷綅鏋氫妇
@@ -123,82 +52,82 @@
* 褰撳墠浜岀淮鐮�
* 0涓虹┖
*/
- private String currentCode;
+ private Short currentCode;
/**
* 鐢垫睜鐢甸噺鐧惧垎姣�
*/
- private Double batteryPower;
+ private Short batteryPower;
/**
* 鐢垫睜娓╁害
*/
- private Double batteryTemp;
+ private Short batteryTemp;
/**
* 閿欒缂栧彿
*/
- private Integer errorCode;
+ private Short errorCode;
/**
* Plc杈撳嚭鐘舵�両O
*/
- private byte plcOutputStatusIO;
+ private Short plcOutputStatusIO;
/**
* 閿欒淇℃伅鐮�
*/
- private Integer statusErrorCode;
+ private Short statusErrorCode;
/**
* PLC杈撳叆鐘舵��
*/
- private byte plcInputStatus;
+ private Short plcInputStatus;
/**
* 褰撳墠鎴栬�呬箣鍓嶈鍒扮殑浜岀淮鐮佸��
*/
- private String currentOrBeforeCode;
+ private Short currentOrBeforeCode;
/**
* 璇诲埌鐨勪簩缁寸爜X鏂瑰悜鍋忕Щ閲�
*/
- private Integer codeOffsetX;
+ private Short codeOffsetX;
/**
* 璇诲埌鐨勪簩缁寸爜Y鏂瑰悜鍋忕Щ閲�
*/
- private Integer codeOffsetY;
+ private Short codeOffsetY;
/**
* 褰撳墠鐨勭數鍘嬪��
*/
- private Double currentVoltage;
+ private Short currentVoltage;
/**
* 褰撳墠鐨勬ā鎷熼噺鍊�
*/
- private Integer currentAnalogValue;
+ private Short currentAnalogValue;
/**
* 褰撳墠鐨勫崌闄嶄己鏈嶉�熷害
*/
- private Double currentLiftServoSpeed;
+ private Short currentLiftServoSpeed;
/**
* 褰撳墠鐨勮璧颁己鏈嶉�熷害
*/
- private Double currentMoveServoSpeed;
+ private Short currentMoveServoSpeed;
/**
* 褰撳墠鐨勫崌闄嶄己鏈嶈礋杞界巼
*/
- private Double currentLiftServoLoad;
+ private Short currentLiftServoLoad;
/**
* 褰撳墠鐨勮璧颁己鏈嶈礋杞界巼
*/
- private Double currentMoveServoLoad;
+ private Short currentMoveServoLoad;
/**
* 浣滀笟鏍囪
@@ -281,13 +210,13 @@
*/
private boolean goOHpAvoidErr;
- public void setBusyStatus(Boolean status) {
+ public void setBusyStatus(Short status) {
this.busyStatus = status;
this.busyStatusType = ShuttleStatusType.get(status);
}
public void setBusyStatus(ShuttleStatusType type) {
- this.busyStatus = type.id.booleanValue();
+ this.busyStatus = type.id.shortValue();
this.busyStatusType = type;
}
--
Gitblit v1.9.1