From 892b13a55e27a950993f3d0fafb997be5360177d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 11 八月 2020 14:25:38 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/model/protocol/CrnProtocol.java | 122 ++++++++++++++++++++++++++++------------
1 files changed, 84 insertions(+), 38 deletions(-)
diff --git a/src/main/java/com/zy/core/model/protocol/CrnProtocol.java b/src/main/java/com/zy/core/model/protocol/CrnProtocol.java
index 1c2e3d9..2e8b060 100644
--- a/src/main/java/com/zy/core/model/protocol/CrnProtocol.java
+++ b/src/main/java/com/zy/core/model/protocol/CrnProtocol.java
@@ -1,6 +1,7 @@
package com.zy.core.model.protocol;
import com.zy.core.enums.CrnForkPosType;
+import com.zy.core.enums.CrnLiftPosType;
import com.zy.core.enums.CrnModeType;
import com.zy.core.enums.CrnStatusType;
import lombok.Data;
@@ -15,49 +16,40 @@
* 1 = 鎵嬪姩妯″紡
* 2 = 鑷姩妯″紡
* 3 = 鐢佃剳妯″紡
- * 4 = 鎵嬪姩妯″紡鍚姩涓�
- * 5 = 鑷姩妯″紡鍚姩涓�
- * 6 = 鐢佃剳妯″紡鍚姩涓�
*/
- public short mode;
+ public Short mode;
public CrnModeType modeType;
/**
* 1 = 鎬ュ仠
*/
- public short eStop;
+ public Short eStop;
/**
* 寮傚父鐮�
*/
- public short alarm;
+ public Short alarm;
/**
* 浠诲姟鍙�
*/
- public short taskNo;
+ public Short taskNo = 0;
/**
* 鍫嗗灈鏈哄綋鍓嶇姸鎬�
- * 0 = 鏈煡
- * 1 = 绌洪棽
- * 2 = 妫�鏌ヤ换鍔℃暟鎹�
- * 3 = 瀹氫綅鍒板彇璐т綅
- * 7 = 鍙栬揣瀹屾垚
- * 8 = 绛夊緟璋冨害鏌滃厑璁�
- * 9 = 绉诲姩鍒版斁璐т綅缃�
- * 10 = 鏀捐揣涓�
- * 13 = 鎼繍瀹屾垚
- * 14 = 绌鸿浇閬胯
- * 15 = 妫�鏌ヤ换鍔℃暟鎹�
- * 20 = 妫�鏌ユ簮浣嶇疆
- * 21 = 妫�鏌ョ洰鏍囦綅缃�
- * 50 = 绉诲姩浠诲姟
- * 98 = 浠诲姟瀹屾垚锛寃cs鏈‘璁�
- * 99 = 鎶ヨ
+ * 0锛氱┖闂诧紝鏃犱换鍔�
+ * 1锛氬彇璐у畾浣嶄腑
+ * 2锛氬彇璐т腑
+ * 3锛氬彇璐у畬鎴愶紝鏀捐揣瀹氫綅涓�
+ * 4锛氭斁璐т腑
+ * 5锛氬洖鍘熺偣涓�
+ * 6锛氬弽鍘熺偣
+ * 7锛氬簱浣嶇Щ浣�
+ * 90锛氫换鍔″畬鎴愮瓑寰匴CS纭
+ * 99锛氭姤璀�
*/
- public short status;
+ public Short status;
/**
* 鐘舵�佹灇涓�
@@ -67,12 +59,12 @@
/**
* 鍫嗗灈鏈哄綋鍓嶅垪鍙�
*/
- public short bay;
+ public Short bay;
/**
* 鍫嗗灈鏈哄綋鍓嶅眰鍙�
*/
- public short level;
+ public Short level;
/**
* 褰撳墠璐у弶浣嶇疆
@@ -80,48 +72,85 @@
* 1 = 璐у弶鍦ㄥ乏渚�
* 2 = 璐у弶鍦ㄥ彸渚�
*/
- public short forkPos;
+ public Short forkPos;
- private CrnForkPosType forkPosType;
+ public CrnForkPosType forkPosType;
/**
* 褰撳墠杞借揣鍙颁綅缃�
* 0 = 涓嬪畾浣�
* 1 = 涓婂畾浣�
*/
- public short liftPos;
+ public Short liftPos;
+
+ public CrnLiftPosType liftPosType;
/**
* 璧拌鍦ㄥ畾浣�
* 0 = 鍦ㄥ畾浣�
* 1 = 涓嶅湪瀹氫綅
*/
- public short walkPos;
+ public Short walkPos;
/**
* 鍫嗗灈鏈轰换鍔″畬鎴�
*/
- public short taskFinish;
+ public Short taskFinish;
/**
* 杞借揣鍙版湁鐗�
*/
- public short loaded;
+ public Short loaded;
/**
- * 鍫嗗灈鏈虹疮璁¤蛋琛岃窛绂�
+ * 寮傚父鐮侊紙鏁板�兼樉绀猴級
*/
- public int xDistance;
+ private Short alarm1;
/**
- * 鍫嗗灈鏈虹疮璁″崌闄嶈窛绂�
+ * 寮傚父1
*/
- public int yDistance;
+ private Short error1;
/**
- * 鍫嗗灈鏈虹疮璁¤繍琛屾椂闀�
+ * 寮傚父2
*/
- public int duration;
+ private Short error2;
+
+ /**
+ * 淇濈暀
+ */
+ private Short temp1;
+
+ /**
+ * X琛岃蛋绾块�熷害m/min
+ */
+ private Short xSpeed;
+
+ /**
+ * Y琛岃蛋绾块�熷害m/min
+ */
+ private Short ySpeed;
+
+ /**
+ * Z琛岃蛋绾块�熷害m/min
+ */
+ private Short zSpeed;
+
+ /**
+ * 鍫嗗灈鏈虹疮璁¤蛋琛岃窛绂籯m
+ */
+ public Integer xDistance;
+
+ /**
+ * 鍫嗗灈鏈虹疮璁″崌闄嶈窛绂籯m
+ */
+ public Integer yDistance;
+
+ /**
+ * 鍫嗗灈鏈虹疮璁¤繍琛屾椂闀縣
+ */
+ public Integer duration;
public void setMode(Short mode) {
this.mode = mode;
@@ -143,6 +172,16 @@
this.forkPos = CrnForkPosType.get(type).id.shortValue();
}
+ public void setLiftPos(Short liftPos) {
+ this.liftPos = liftPos;
+ this.liftPosType = CrnLiftPosType.get(liftPos);
+ }
+
+ public void setLiftPos(CrnLiftPosType type) {
+ this.liftPosType = type;
+ this.liftPos = CrnLiftPosType.get(type).id.shortValue();
+ }
+
public void setStatus(Short status){
this.status = status;
this.statusType = CrnStatusType.get(status);
@@ -153,4 +192,11 @@
this.status = CrnStatusType.get(type).id.shortValue();
}
+ /**
+ * 鏈�杩戜竴娆″叆鍑哄簱绫诲瀷
+ * I:鍏ュ簱
+ * O:鍑哄簱
+ */
+ private String lastIo = "I";
+
}
--
Gitblit v1.9.1