From 8740b1c94ffd20b54b95962df886e43f722911c5 Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期四, 24 四月 2025 17:31:12 +0800 Subject: [PATCH] * --- src/main/java/com/zy/core/model/protocol/RgvProtocol.java | 134 ++++++++++---------------------------------- 1 files changed, 32 insertions(+), 102 deletions(-) diff --git a/src/main/java/com/zy/core/model/protocol/RgvProtocol.java b/src/main/java/com/zy/core/model/protocol/RgvProtocol.java index d14bd52..10b4588 100644 --- a/src/main/java/com/zy/core/model/protocol/RgvProtocol.java +++ b/src/main/java/com/zy/core/model/protocol/RgvProtocol.java @@ -18,9 +18,9 @@ * 2 = 鑷姩妯″紡 * 3 = 鐢佃剳妯″紡 */ - public Short mode; + public Short mode = -1; - public RgvModeType modeType; + public RgvModeType modeType = RgvModeType.NONE; /** * RGV褰撳墠鐘舵�� @@ -28,41 +28,32 @@ * 1锛氫綔涓氫腑 * 2锛氭姤璀� */ - public Short status; + public Short status = -1; /** * 鐘舵�佹灇涓� */ - public RgvStatusType statusType; + public RgvStatusType statusType = RgvStatusType.NONE; /** - * 宸ヤ綅1浠诲姟鍙� + * 浠诲姟鍙� */ - public Short taskNo1 = 0; + public Short taskNo = 0; /** - * RGV宸ヤ綅1褰撳墠鐘舵�� - * 0锛氱┖闂诧紝鏃犱换鍔� - * 11锛氬彇璐т腑 - * 12锛氭斁璐т腑 - * 10锛氫换鍔″畬鎴愮瓑寰匴CS纭 + * 鏈夌墿 */ - public Short status1; - - /** - * 鐘舵�佹灇涓� - */ - public RgvStatusType statusType1; - - /** - * 宸ヤ綅1鏈夌墿 - */ - public Short loaded1;//0 鏃犵墿锛�1 鏈夌墿 + public Short loaded;//0 鏃犵墿锛�1 鏈夌墿 /** * RGV褰撳墠浣嶇疆 */ - public Short RgvPos; + public Long RgvPos = 0L; + + /** + * RGV鐩殑浣嶇疆 + */ + public Long RgvPosDestination = 0L; /** * 璧拌鍦ㄥ畾浣� @@ -71,51 +62,10 @@ */ public Short walkPos; - ////////////////////// 宸ヤ綅2瀹氫箟 ////////////////////////////////////////////////// - /** - * 宸ヤ綅2浠诲姟鍙� - */ - public Short taskNo2 = 0; - - /** - * RGV宸ヤ綅2褰撳墠鐘舵�� - * 0锛氱┖闂诧紝鏃犱换鍔� - * 11锛氬彇璐т腑 - * 12锛氭斁璐т腑 - * 10锛氫换鍔″畬鎴愮瓑寰匴CS纭 - */ - public Short status2; - - /** - * 鐘舵�佹灇涓� - */ - public RgvStatusType statusType2; - - /** - * 宸ヤ綅2鏈夌墿 - */ - public Short loaded2; //0 鏃犵墿锛�1 涓�灞傛棤鐗╀簩灞傛湁鐗╋紙鍙兘鎷嗗彔锛� 锛�2涓�灞傛湁鐗╀簩灞傛棤鐗� 锛堝彧鑳芥弧鏀撅級锛�3 1銆�2灞傞兘鏈夌墿 4锛氾紙锛夊彧鍏佽鎷嗙洏 - /////////////////////////////////////////////////////////////////////////////////////// - /** * 寮傚父鐮� */ public Short alarm; - - /** - * 蹇冭烦鎸囦护 1-2姣忕鍒囨崲涓�娆� - */ - public Short heart; - - private Short temp1; - - private Short temp2; - - private Short temp3; - - private Short temp4; - - private Short temp5; /** * X琛岃蛋琛岄�熷害m/min @@ -123,14 +73,29 @@ private Float xSpeed; /** - * 鍫嗗灈鏈虹疮璁¤蛋琛岃窛绂籯m + * 绱璧拌璺濈km */ public Float xDistance; /** - * 鍫嗗灈鏈虹疮璁¤蛋琛屾椂闀縣 + * 绱璧拌鏃堕暱h */ public Float xDuration; + + /** + * 杞﹁韩 + */ + public Long carBodyJiaoMing = 0L; + + /** + * 杞﹁韩 + */ + public Long carBodyKunPeng = 0L; + + /** + * 鏄惁鍚敤 + */ + public boolean statusEnable;//0\1\2 public void setMode(Short mode) { this.mode = mode; @@ -152,40 +117,11 @@ this.status = RgvStatusType.get(type).id.shortValue(); } - public void setStatus1(Short status1){ - this.status1 = status1; - this.statusType1 = RgvStatusType.get(status1); - } - - public void setStatus1(RgvStatusType type1){ - this.statusType1 = type1; - this.status1 = RgvStatusType.get(type1).id.shortValue(); - } - - public void setStatus2(Short status2){ - this.status2 = status2; - this.statusType2 = RgvStatusType.get(status2); - } - - public void setStatus2(RgvStatusType type2){ - this.statusType2 = type2; - this.status2 = RgvStatusType.get(type2).id.shortValue(); - } - - /** - * 鏈�杩戜竴娆″叆鍑哄簱绫诲瀷 - * I:鍏ュ簱 - * O:鍑哄簱 - */ - private String lastIo = "I"; - - public BasRgv toSqlModel(BasRgv basRgv){ if (alarm!=null) { basRgv.setRgvErr(alarm.longValue()); } - basRgv.setWrkNo1(taskNo1.intValue()); - basRgv.setWrkNo2(taskNo2.intValue()); + basRgv.setWrkNo1(taskNo.intValue()); return basRgv; } @@ -199,12 +135,6 @@ public void setxDuration(Short xDuration) { this.xDuration = Float.valueOf(xDuration); - } - - public Integer getRgvPosI(){ - //闇�瑕佹牴鎹幇鍦烘敼閫� 鏍规嵁璇诲埌鐨勫�艰幏鍙栧搴旂珯鐐逛綅缃� - if (RgvPos==null) return 0; - return RgvPos.intValue(); } } -- Gitblit v1.9.1