From e67802cd15e273da46bfb734e339a947b7d1eceb Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 15 九月 2023 16:01:04 +0800
Subject: [PATCH] debug

---
 constvar/const.go |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/constvar/const.go b/constvar/const.go
index 5d30c70..eb2f630 100644
--- a/constvar/const.go
+++ b/constvar/const.go
@@ -1,15 +1,28 @@
 package constvar
 
 const (
-	NsqTopicScheduleTask   = "aps.%v.scheduleTask" //鎺掔▼浠诲姟涓嬪彂
-	NsqTopicGetPlcAddress  = "aps.%v.getPlcAddress"
-	NsqTopicSendPlcAddress = "aps.%v.sendPlcAddress"
+	NsqTopicScheduleTask              = "aps.%v.scheduleTask" //鎺掔▼浠诲姟涓嬪彂
+	NsqTopicGetPlcAddress             = "aps.%v.getPlcAddress"
+	NsqTopicSendPlcAddress            = "aps.%v.sendPlcAddress"
+	NsqTopicProcessParamsRequest      = "aps.%v.processParams.request"
+	NsqTopicProcessParamsResponse     = "aps.%v.processParams.response"
+	NsqTopicApsProcessParams          = "aps.%v.aps.processParams"       //鏈変簡鏂扮殑宸ヨ壓妯″瀷
+	NsqTopicTaskProcedureStatusUpdate = "aps.%v.task.procedure.status"   //宸ュ簭鐘舵�佹洿鏂�
+	NsqTopicSyncTaskProgress          = "aps.%v.task.procedure.progress" //宸ュ簭鐢熶骇杩涘害
 )
 
-type PlcStartAddressType string
+type PlcStartAddressType int
 
 const (
-	PlcStartAddressTypeFinishNumber = "1"
+	PlcStartAddressTypeFinishNumber PlcStartAddressType = 1
+	PlcStartAddressTypeTotalNumber  PlcStartAddressType = 2
+)
+
+type PlcStartAddressValueType string
+
+const (
+	PlcStartAddressValueTypeString PlcStartAddressValueType = "string"
+	PlcStartAddressValueTypeInt    PlcStartAddressValueType = "int"
 )
 
 const (
@@ -17,3 +30,30 @@
 	PlcAddressDataKeyFileName   = "plc_address_key"
 	PlcAddressDataValueFileName = "plc_address_value"
 )
+
+type PlcMethod string
+
+const (
+	PlcMethodModbusTCP        PlcMethod = "modbusTCP"
+	PlcMethodSerial           PlcMethod = "serial"
+	PlcMethodModbusTCPChinese PlcMethod = "缃戠粶"
+	PlcMethodSerialChinese    PlcMethod = "涓插彛"
+)
+
+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"
+)

--
Gitblit v1.8.0