mqttdts.go 539 B

1234567891011121314151617181920212223242526272829
  1. package mqttcli
  2. var MaxClientIdLen = 8
  3. //single server max retry connection count.
  4. var MaxRetryCount = 3
  5. //topics
  6. var TopicListenerControl = "/control[-flat]/#"
  7. var TopicListenerEvent = "/event[-flat]/#"
  8. //device id + TopicPublish
  9. var TopicPublish = "/media"
  10. //publish cmd
  11. var CMD_GETLOG = 0
  12. var CMD_REBOOT = 1
  13. var CMD_UPGRADE = 2
  14. var CMD_PLAYLIST = 3
  15. type PublishMsg struct {
  16. Command int `json:"command"`
  17. }
  18. type Response struct {
  19. Command int `json:"command"`
  20. Result int `json:"result"`
  21. Message string `json:"message"`
  22. }