From 4935c0cfe8689652133043b9a78aafc12effe723 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 27 九月 2023 16:19:53 +0800
Subject: [PATCH] fix

---
 constvar/const.go |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/constvar/const.go b/constvar/const.go
index d92f9f9..db3a8a6 100644
--- a/constvar/const.go
+++ b/constvar/const.go
@@ -34,15 +34,40 @@
 type PlcMethod string
 
 const (
-	PlcMethodModbusTCP PlcMethod = "modbusTCP"
-	PlcMethodSerial    PlcMethod = "serial"
+	PlcMethodModbusTCP        PlcMethod = "modbusTCP"
+	PlcMethodSerial           PlcMethod = "serial"
+	PlcMethodModbusTCPChinese PlcMethod = "缃戠粶"
+	PlcMethodSerialChinese    PlcMethod = "涓插彛"
 )
 
-func (slf PlcMethod) Valid() bool {
-	return slf == PlcMethodModbusTCP || slf == PlcMethodSerial
+func (slf *PlcMethod) ConvertToEnglish() {
+	if *slf == PlcMethodModbusTCPChinese {
+		*slf = PlcMethodModbusTCP
+	}
+	if *slf == PlcMethodSerialChinese {
+		*slf = PlcMethodSerial
+	}
+}
+
+func (slf *PlcMethod) Valid() bool {
+	return *slf == PlcMethodModbusTCP || *slf == PlcMethodSerial
 }
 
 const (
 	PlcCacheKeyFinishNumber = "finish_number"
 	PlcCacheKeyTotalNumber  = "total_number"
 )
+
+const (
+	PlcPackageApache               = "apache"
+	PlcPackageGoBurrow             = "goBurrow"
+	PlcPackageApacheLongConnection = "apacheLong"
+)
+
+type TaskMode int
+
+const (
+	TaskModeUnStarted    TaskMode = 1 //鏈紑濮嬬殑
+	TaskModeCurrent      TaskMode = 2 //鏈紑濮嬬殑鍜岃繘琛屼腑鐨�
+	TaskModeLastFinished TaskMode = 3 //涓婁竴涓粨鏉熺殑
+)

--
Gitblit v1.8.0