model/device_plc.go
@@ -26,9 +26,14 @@ Detail string `gorm:"type:varchar(2048);comment:数据详情" json:"-"` Details []*DevicePlcAddress `gorm:"-" json:"details"` MaxTryTimes int `gorm:"-" json:"-"` //最大写入重试次数 CurrentTryTimes int `gorm:"-" json:"-"` //当前写入重试次数 CurrentErr error `gorm:"-" json:"-"` //当前报错 } DevicePlcAddress struct { Position int `json:"position"` // 数据起始地址 StartAddress int `json:"startAddress"` // 数据起始地址 Length int `json:"length"` // 数据长度 Type constvar.PlcStartAddressValueType `json:"type"` // 数据类型