deviceopts.fbs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. namespace deviceopts.msg;
  2. enum Result:byte { Success = 0, Failure }
  3. union Payloads { LogCollect, FileUpgrade, UpgradeRecordEvent, HeartBeatEvent, Reboot}
  4. //获取日志的 table, 设备根据下发的url直接上传日志
  5. table LogCollect {
  6. userid:string;
  7. url:string;
  8. result:Result;
  9. reason:string;
  10. reply:string;
  11. }
  12. //安装应用以及配置的 table, 设备根据下发的url直接下载应用
  13. //uid 匹配目标文件.
  14. table FileUpgrade {
  15. userid:string;
  16. url:string;
  17. uid:string;
  18. appkey:string;
  19. result:Result;
  20. reason:string;
  21. reply:string;
  22. }
  23. //主动上报事件. 非命令控制返回. file upgrade result
  24. table UpgradeRecordEvent {
  25. userid:string;
  26. url:string;
  27. uid:string;
  28. appkey:string;
  29. result:Result;
  30. reason:string;
  31. }
  32. //主动上报事件,设备心跳,包含各种设备信息.
  33. table HeartBeatEvent {
  34. serial:string;
  35. deviceip:string;
  36. serverip:string;
  37. gps:string;
  38. status:int;
  39. nettype:int;
  40. devtype:string;
  41. softver:string;
  42. }
  43. //重启设备
  44. table Reboot {
  45. reqtime:long;
  46. result:Result;
  47. reason:string;
  48. reply:string;
  49. }
  50. table Payload{
  51. type: Payloads;
  52. }
  53. root_type Payload;