From cf96f6bc1fb484fde16bd5ed6d49534c96958022 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 25 九月 2023 15:43:12 +0800
Subject: [PATCH] fix

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

diff --git a/constvar/const.go b/constvar/const.go
index d92f9f9..8b56942 100644
--- a/constvar/const.go
+++ b/constvar/const.go
@@ -34,15 +34,32 @@
 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"
+)

--
Gitblit v1.8.0