From cacf363f222e354cad6db18c4a00fb1097d35c2c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 09 十一月 2023 14:30:58 +0800
Subject: [PATCH] fix

---
 model/common/common.go |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/model/common/common.go b/model/common/common.go
index 3a8781f..628054e 100644
--- a/model/common/common.go
+++ b/model/common/common.go
@@ -132,6 +132,8 @@
 	ID                  string                 `gorm:"comment:涓婚敭ID;primaryKey;type:varchar(191);" json:"id"`
 	DeviceProcedureAttr []*DeviceProcedureAttr `json:"deviceProcedureAttr"` // 璁惧宸ュ簭灞炴�у垪琛�
 	ExtChannelAmount    int                    `gorm:"type:tinyint;comment:棰濆鐨勯�氶亾鏁伴噺;default:0;" json:"extChannelAmount"`
+	DeviceName          string                 `json:"deviceName"`
+	DeviceMac           string                 `json:"deviceMac"`
 	PlcAddressList      []*PlcAddress
 	PlcConfig           *PlcConfig
 }
@@ -144,8 +146,9 @@
 type PullDataType string
 
 const (
-	PullDataTypeProcessModel = "process_model"
-	PullDataTypeDevice       = "device"
+	PullDataTypeProcessModel           = "process_model"
+	PullDataTypeDevice                 = "device"
+	PullDataTypeProcessModelPlcAddress = "process_model_plc_address"
 )
 
 // MsgPullDataRequest 鎷夊彇浜戠鏁版嵁
@@ -157,3 +160,11 @@
 	DataType PullDataType `json:"dataType"` //瑕佹媺鍙栫殑鏁版嵁绫诲瀷
 	Data     interface{}  //杩斿洖鐨勬暟鎹�
 }
+
+type RTUConfig struct {
+	BaudRate   int             `json:"baudRate"`                     //涓插彛娉㈢壒鐜囷紝 method = serial鏃� 鐢�
+	SerialName string          `json:"serialName"`                   //涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�
+	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 鐢�
+}

--
Gitblit v1.8.0