access.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. }