protocol.go 691 B

123456789101112131415161718
  1. package protocol
  2. type Data struct {
  3. Temperature float32 `json:"temperature"` // 温度
  4. Humidly float32 `json:"humidly"` // 湿度
  5. }
  6. type OffsetData struct {
  7. TemOffset int `json:"tem_offset"` // 温度使能校准 1 开 2 关闭
  8. TemOffsetValue float32 `json:"tem_offset_value"` // 温度校准值
  9. HumOffset int `json:"hum_offset"` // 湿度使能校准 1 开 2 关
  10. HumOffsetValue float32 `json:"hum_offset_value"` // 湿度校准值
  11. }
  12. type SetOffSetParams struct {
  13. Act int `json:"act"` // 操作类型:(1:使能温度校准2:关闭温度校准 3:使能湿度校准 4:关闭湿度校准)
  14. Value float32 `json:"value"` // 偏移值
  15. }