devicemanager.go 1019 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package rpcs
  2. import (
  3. "sparrow/pkg/online"
  4. )
  5. type ArgsGenerateDeviceAccessToken ArgsDeviceId
  6. type ReplyGenerateDeviceAccessToken struct {
  7. AccessToken []byte
  8. }
  9. type ArgsValidateDeviceAccessToken struct {
  10. Id string
  11. AccessToken []byte
  12. }
  13. type ReplyValidateDeviceAccessToken ReplyEmptyResult
  14. type ArgsGetOnline struct {
  15. Id string
  16. ClientIP string
  17. AccessRPCHost string
  18. HeartbeatInterval uint32
  19. }
  20. type ReplyGetOnline ReplyEmptyResult
  21. type ArgsGetOffline struct {
  22. Id string
  23. VendorId string
  24. }
  25. type ReplyGetOffline ReplyEmptyResult
  26. type ArgsHeartBeat struct {
  27. Id string
  28. }
  29. type ReplyHeartBeat ReplyEmptyResult
  30. type ArgsGetDeviceOnlineStatus ArgsDeviceId
  31. type ReplyGetDeviceOnlineStatus online.Status
  32. type ArgsOtaFile struct {
  33. FileId int
  34. FileData []byte
  35. }
  36. type ReplyOtaFile struct {
  37. File []byte
  38. }
  39. type ArgsOtaProgress struct {
  40. DeviceId string
  41. Progress int
  42. }
  43. type ReplyOtaProgress struct {
  44. Progress int
  45. }
  46. type ReplyDeviceStatus struct {
  47. Status interface{}
  48. }