From 8f692efa28cb68b9644d473aedc5caeee2496a61 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 26 十月 2023 17:11:17 +0800 Subject: [PATCH] 接收云端下发的modbusRTU配置 --- model/common/common.go | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/model/common/common.go b/model/common/common.go index f92ae17..3a8781f 100644 --- a/model/common/common.go +++ b/model/common/common.go @@ -78,8 +78,11 @@ Method constvar.PlcMethod `gorm:"type:varchar(191)" json:"method"` //comment:鎺ュ彛鏂瑰紡 Address string `gorm:"type:varchar(191)" json:"address"` //plc ip鍦板潃锛� method = modbusTCP鐢� Port int `gorm:"type:int(11)" json:"port"` //plc 绔彛鍙凤紝 method = modbusTCP鐢� - BaudRate int `gorm:"type:int(11)" json:"baudRate"` //涓插彛娉㈢壒鐜囷紝 method = serial鏃� 鐢� - SerialName string `gorm:"type:int(11)" json:"serialName"` //涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢� + BaudRate int `gorm:"type:int(11)" json:"baudRate"` //涓插彛娉㈢壒鐜囷紝 method = serial鎴杕odbusRTU 鏃剁敤 + SerialName string `gorm:"type:int(11)" json:"serialName"` //涓插彛鍚嶇О锛宮ethod = serial鎴杕odbusRTU 鏃剁敤 + DataBit int `gorm:"type:int(11)" json:"dataBit"` //鏁版嵁浣嶏紝method = modbusRTU 鐢� + StopBit int `gorm:"type:int(11)" json:"stopBit"` //鍋滄浣嶏紝method = modbusRTU 鐢� + Parity constvar.Parity `gorm:"type:int(11)" json:"parity"` //鏍¢獙鏂瑰紡锛宮ethod = modbusRTU 鐢� IsOpen bool `gorm:"type:tinyint(1)" json:"isOpen"` Detail string `gorm:"type:varchar(2048)" json:"-"` Details []*PlcAddress `gorm:"-" json:"details"` -- Gitblit v1.8.0