From c42614978ff12013a1eabebd0289b27169a5784f Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 06 五月 2025 17:25:56 +0800
Subject: [PATCH] 1、实现万功能token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并相应修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 111 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java
new file mode 100644
index 0000000..3fe03b0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/channel/tcp/PrefixedDataAvailableStatus.java
@@ -0,0 +1,111 @@
+package com.dy.common.mw.channel.tcp;
+
+public class PrefixedDataAvailableStatus {
+	
+	public final static Integer status_rubbish = 0 ;//鍨冨溇鏁版嵁
+	public final static Integer status_break = 1 ;//鏂寘
+	public final static Integer status_adjoin = 2 ;//绮樺寘
+	public final static Integer status_complete = 3 ;//涓嶆柇涓嶇矘
+	
+	private Integer status ;
+	private Integer dataLen ;
+	public String protocolName;
+	public Short protocolVersion;
+	
+	public PrefixedDataAvailableStatus(){
+		status = null ;
+		dataLen = null ;
+	}
+	
+	/**
+	 * 鍨冨溇鏁版嵁
+	 * @param dataLen 鏁版嵁闀垮害
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus rubbish(Integer dataLen){
+		this.status = status_rubbish ;
+		this.dataLen = dataLen ;
+		return this ;
+	}
+	
+	/**
+	 * 鍙戠敓鏂寘
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus breaked(){
+		this.status = status_break ;
+		this.dataLen = null ;
+		return this ;
+	}
+	
+	/**
+	 * 鍙戠敓绮樺寘
+	 * @param dataLen 鏁版嵁闀垮害
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus adjoined(Integer dataLen, String protocolName, Short protocolVersion){
+		this.status = status_adjoin ;
+		this.dataLen = dataLen ;
+		this.protocolName = protocolName ;
+		this.protocolVersion = protocolVersion ;
+		return this ;
+	}
+	
+	/**
+	 * 涓嶆柇鍖呬笉绮樺寘锛屾暟鎹濂芥敹鍏�
+	 * @param dataLen 鏁版嵁闀垮害
+	 * @return 鐘舵��
+	 */
+	@SuppressWarnings("unused")
+	public PrefixedDataAvailableStatus completed(Integer dataLen, String protocolName, Short protocolVersion){
+		this.status = status_complete ;
+		this.dataLen = dataLen ;
+		this.protocolName = protocolName ;
+		this.protocolVersion = protocolVersion ;
+		return this ;
+	}
+	
+	/**
+	 * 鏄惁鍨冨溇鏁版嵁
+	 * @return 鐘舵��
+	 */
+	public boolean isRubbish(){
+		return this.status.intValue() == status_rubbish.intValue();
+	}
+	/**
+	 * 鏄惁鏂寘
+	 * @return 鐘舵��
+	 */
+	public boolean isBreaked(){
+		return this.status.intValue() == status_break.intValue();
+	}
+	
+	
+	/**
+	 * 鏄惁绮樺寘
+	 * @return 鏄惁绮樺寘
+	 */
+	public boolean isAdjoined(){
+		return this.status.intValue() == status_adjoin.intValue();
+	}
+	
+	/**
+	 * 鏄惁涓嶆柇涓嶇矘
+	 * @return 鏄惁涓嶆柇涓嶇矘
+	 */
+	public boolean isCompleted(){
+		return this.status.intValue() == status_complete.intValue();
+	}
+	
+	/**
+	 * 杩斿洖鏁版嵁闀垮害
+	 * @return 鏁版嵁闀垮害
+	 */
+	public Integer getDataLen(){
+		return this.dataLen ;
+	}
+	
+}

--
Gitblit v1.8.0