From 3e72a10e4e596451efdfebf6b0b3105a0e6da39b Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 27 十月 2023 16:05:53 +0800 Subject: [PATCH] add log --- constvar/const.go | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/constvar/const.go b/constvar/const.go index ce5eac9..8976494 100644 --- a/constvar/const.go +++ b/constvar/const.go @@ -2,7 +2,6 @@ const ( NsqTopicScheduleTask = "aps.%v.scheduleTask" //鎺掔▼浠诲姟涓嬪彂 - NsqTopicSendPlcAddress = "aps.%v.sendPlcAddress" //plc address鏇存柊 NsqTopicApsProcessParams = "aps.%v.aps.processParams" //鏈変簡鏂扮殑宸ヨ壓妯″瀷 NsqTopicTaskProcedureStatusUpdate = "aps.%v.task.procedure.status" //宸ュ簭鐘舵�佹洿鏂� NsqTopicSyncTaskProgress = "aps.%v.task.procedure.progress" //宸ュ簭鐢熶骇杩涘害 @@ -35,6 +34,7 @@ const ( PlcMethodModbusTCP PlcMethod = "modbusTCP" + PlcMethodModbusRTU PlcMethod = "modbusRTU" PlcMethodSerial PlcMethod = "serial" PlcMethodModbusTCPChinese PlcMethod = "缃戠粶" PlcMethodSerialChinese PlcMethod = "涓插彛" @@ -50,7 +50,7 @@ } func (slf *PlcMethod) Valid() bool { - return *slf == PlcMethodModbusTCP || *slf == PlcMethodSerial + return *slf == PlcMethodModbusTCP || *slf == PlcMethodSerial || *slf == PlcMethodModbusRTU } const ( @@ -71,3 +71,11 @@ TaskModeCurrent TaskMode = 2 //鏈紑濮嬬殑鍜岃繘琛屼腑鐨� TaskModeLastFinished TaskMode = 3 //涓婁竴涓粨鏉熺殑 ) + +type Parity int + +const ( + ParityEven Parity = 1 //濂囨牎楠� + ParityOdd Parity = 2 //鍋舵牎楠� + ParityNull Parity = 3 //鏃犳牎楠� +) -- Gitblit v1.8.0