access.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. package rpcs
  2. import (
  3. "sparrow/pkg/protocol"
  4. )
  5. type ArgsSetStatus struct {
  6. DeviceId string
  7. Status []protocol.SubData
  8. }
  9. type ReplySetStatus ReplyEmptyResult
  10. type ArgsGetStatus struct {
  11. Id string
  12. ProductId string
  13. VendorId string
  14. SubDeviceId string
  15. Key string
  16. }
  17. type ReplyGetStatus struct {
  18. Status []protocol.SubData
  19. }
  20. type ArgsSendCommand struct {
  21. DeviceId string
  22. SubDevice string
  23. Cmd string
  24. WaitTime uint32
  25. Params map[string]interface{}
  26. }
  27. type ArgsPublishMessage struct {
  28. Topic string
  29. Payload []byte
  30. }
  31. type ReplySendCommand ReplyEmptyResult
  32. type ArgsDeviceUpgrade struct {
  33. DeviceId string
  34. SudDeviceId string
  35. Url string
  36. Md5 string
  37. Version string
  38. FileSize int64
  39. }
  40. type ArgsSendByteData struct {
  41. DeviceId string
  42. SubDevice string
  43. Cmd string
  44. WaitTime uint32
  45. Data []byte
  46. Params map[string]interface{}
  47. }
  48. type ArgsUpgrade4G struct {
  49. DeviceId string
  50. FileId string
  51. FileSize int64
  52. }
  53. type ChunkUpgrade struct {
  54. DeviceId string
  55. FileId int
  56. FileSize int64
  57. Size int64
  58. Offset int
  59. }
  60. type ReplyStatus struct {
  61. Status string
  62. }
  63. type ReplayInfo struct {
  64. Info string
  65. }
  66. type ArgsGetWeather struct {
  67. Location string
  68. }
  69. type ReplayWeatherInfo struct {
  70. Info string
  71. }
  72. type ArgsSetWeather struct {
  73. Location string
  74. Info string
  75. }