access.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package rpcs
  2. import (
  3. "github.com/gogf/gf/encoding/gjson"
  4. "sparrow/pkg/protocol"
  5. )
  6. type ArgsSetStatus struct {
  7. DeviceId string
  8. Status []protocol.SubData
  9. }
  10. type ReplySetStatus ReplyEmptyResult
  11. type ArgsGetStatus struct {
  12. Id string
  13. VendorId string
  14. SubDeviceId string
  15. }
  16. type ReplyGetStatus struct {
  17. Status []protocol.SubData
  18. }
  19. type ArgsSendCommand struct {
  20. DeviceId string
  21. SubDevice string
  22. Cmd string
  23. WaitTime uint32
  24. Params map[string]interface{}
  25. }
  26. type ReplySendCommand ReplyEmptyResult
  27. type ArgsDeviceUpgrade struct {
  28. DeviceId string
  29. SudDeviceId string
  30. Url string
  31. Md5 string
  32. Version string
  33. FileSize int64
  34. }
  35. type ArgsSendByteData struct {
  36. DeviceId string
  37. SubDevice string
  38. Cmd string
  39. WaitTime uint32
  40. Data []byte
  41. Params map[string]interface{}
  42. }
  43. type ArgsUpgrade4G struct {
  44. DeviceId string
  45. FileId string
  46. FileSize int64
  47. }
  48. type ChunkUpgrade struct {
  49. DeviceId string
  50. FileId string
  51. FileSize int64
  52. Size int64
  53. Offset int
  54. }
  55. type ReplyStatus struct {
  56. Status gjson.Json
  57. }