access.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 ReplayEvent struct {
  67. Event string
  68. }
  69. type ArgsGetWeather struct {
  70. Location string
  71. }
  72. type ReplayWeatherInfo struct {
  73. Info string
  74. }
  75. type ArgsSetWeather struct {
  76. Location string
  77. Info string
  78. }