From cacf363f222e354cad6db18c4a00fb1097d35c2c Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 09 十一月 2023 14:30:58 +0800 Subject: [PATCH] fix --- constvar/const.go | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/constvar/const.go b/constvar/const.go index bb73e7e..e6f9b85 100644 --- a/constvar/const.go +++ b/constvar/const.go @@ -21,7 +21,8 @@ const ( PlcStartAddressValueTypeString PlcStartAddressValueType = "string" - PlcStartAddressValueTypeInt PlcStartAddressValueType = "int" + PlcStartAddressValueTypeInt16 PlcStartAddressValueType = "int16" + PlcStartAddressValueTypeInt32 PlcStartAddressValueType = "int32" ) const ( @@ -80,7 +81,7 @@ ParityNull Parity = 3 //鏃犳牎楠� ) -func (p Parity) String() string { +func (p Parity) ToString() string { switch p { case ParityEven: return "E" @@ -97,3 +98,32 @@ SerfClusterStatusMaster = "master" //闆嗙兢master SerfClusterStatusSlave = "slave" //闆嗙兢slave ) + +type ProblemCode string + +const ( + ProblemCodeService ProblemCode = "service" //鏈嶅姟涓嶅彲鐢� + ProblemCodeNetwork ProblemCode = "network" //缃戠粶閿欒 + ProblemCodeDB ProblemCode = "db" //鏁版嵁搴撹繛鎺ラ敊璇� + ProblemCodeSerf ProblemCode = "serf" //鏈姞鍏erf闆嗙兢 + ProblemCodeCloud ProblemCode = "cloud" //鏈繛鎺ヤ簯绔� + ProblemCodeDevice ProblemCode = "device" //鏈粦瀹氳澶� + ProblemCodeProcessModel ProblemCode = "process_model" //宸ヨ壓鍙傛暟缂哄け + ProblemCodePlcConfig ProblemCode = "plc_config" //plc閰嶇疆缂哄け + ProblemCodePlcAddressList ProblemCode = "plc_address_list" //plc鍦板潃琛ㄧ己澶� + ProblemCodePlcProcessModelAddressList ProblemCode = "plc_process_model_address_list" //plc鍦板潃琛ㄧ己澶� + ProblemCodePlcConnect ProblemCode = "plc_connect" //plc杩炴帴澶辫触 +) + +type SystemStatusKey string + +const ( + SystemStatusKeyNsq SystemStatusKey = "nsq" +) + +type SystemStatusValue string + +const ( + SystemStatusValueNormal SystemStatusValue = "1" + SystemStatusValueUnNormal SystemStatusValue = "2" +) -- Gitblit v1.8.0