zhangqian
2023-10-26 620d904921c76b6b29d1b69787da7a82121d4c31
model/common/common.go
@@ -157,3 +157,11 @@
   DataType PullDataType `json:"dataType"` //要拉取的数据类型
   Data     interface{}  //返回的数据
}
type RTUConfig struct {
   BaudRate   int             `json:"baudRate"`                     //串口波特率, method = serial时 用
   SerialName string          `json:"serialName"`                   //串口名称,method = 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"`  //校验方式,method = modbusRTU 用
}