From fecd8ff508b33715cbe24ca892fc19a2d1ad1ef5 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期一, 06 十一月 2023 16:34:05 +0800 Subject: [PATCH] 加锁解决同时读串口时报的资源不可用和超时报错 --- model/common/common.go | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/model/common/common.go b/model/common/common.go index d616014..c84e16d 100644 --- a/model/common/common.go +++ b/model/common/common.go @@ -132,6 +132,7 @@ 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"` + DeviceMac string `gorm:"type:varchar(191);comment:璁惧MAC" json:"deviceMac"` PlcAddressList []*PlcAddress PlcConfig *PlcConfig } @@ -144,8 +145,9 @@ type PullDataType string const ( - PullDataTypeProcessModel = "process_model" - PullDataTypeDevice = "device" + PullDataTypeProcessModel = "process_model" + PullDataTypeDevice = "device" + PullDataTypeProcessModelPlcAddress = "process_model_plc_address" ) // MsgPullDataRequest 鎷夊彇浜戠鏁版嵁 -- Gitblit v1.8.0