access.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. VendorId string
  13. SubDeviceId string
  14. }
  15. type ReplyGetStatus struct {
  16. Status []protocol.SubData
  17. }
  18. type ArgsSendCommand struct {
  19. DeviceId string
  20. SubDevice string
  21. Cmd string
  22. WaitTime uint32
  23. Params map[string]interface{}
  24. }
  25. type ReplySendCommand ReplyEmptyResult
  26. type ArgsDeviceUpgrade struct {
  27. DeviceId string
  28. SudDeviceId string
  29. Url string
  30. Md5 string
  31. Version string
  32. FileSize int64
  33. }
  34. type ArgsSendByteData struct {
  35. DeviceId string
  36. SubDevice string
  37. Cmd string
  38. WaitTime uint32
  39. Data []byte
  40. Params map[string]interface{}
  41. }
  42. type ArgsUpgrade4G struct {
  43. DeviceId string
  44. FileId string
  45. FileSize int64
  46. }
  47. type ChunkUpgrade struct {
  48. DeviceId string
  49. FileId int
  50. FileSize int64
  51. Size int64
  52. Offset int
  53. }
  54. type ReplyStatus struct {
  55. Status string
  56. }
  57. type ReplayInfo struct {
  58. Info string
  59. }