zhangzengfei
2023-08-11 742923a5512707bdfd4c0e2e9adfcb86b453be28
msg/msg.go
@@ -12,15 +12,6 @@
   Details    []*PLCAddress `gorm:"-" json:"Details"`
}
type PLCResponse struct {
   DeviceID   string    `json:"deviceId"`
   DeviceName string    `json:"deviceName"`
   DeviceIP   string    `json:"deviceIp"`
   Online     bool      `json:"online"`
   Message    string    `json:"message"`
   PLCData    []PLCData `json:"plcData"`
}
type PLCAddress struct {
   StartAddress int    `json:"startAddress"` // 数据起始地址
   Length       int    `json:"length"`       // 数据长度
@@ -28,12 +19,21 @@
   FieldName    string `json:"fieldName"`    // 对应系统字段
}
type PLCResponse struct {
   DeviceID   string    `json:"deviceId"`
   DeviceName string    `json:"deviceName"`
   DeviceIP   string    `json:"deviceIp"`
   Online     bool      `json:"online"`
   PLCData    []PLCData `json:"plcData"`
}
type PLCData struct {
   StartAddress int    `json:"startAddress"` // 数据起始地址
   Length       int    `json:"length"`       // 数据长度
   Type         string `json:"type"`         // 数据类型
   FieldName    string `json:"fieldName"`    // 对应系统字段
   Data         []byte // 从plc读取的原始数据
   RawData      []byte `json:"rawData"`      // 从plc读取的原始数据
   Message      string `json:"message"`
}
type ApsDeviceApiResponse struct {