ota_send_file.proto 903 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. syntax = "proto3";
  2. import "constants.proto";
  3. message CmdSendFile {
  4. bytes data = 1;
  5. }
  6. message RespSendFile {
  7. }
  8. message CmdStartOTA {
  9. uint64 file_size = 1;
  10. uint64 block_size = 2;
  11. string partition_name = 3;
  12. }
  13. message RespStartOTA {
  14. }
  15. message CmdFinishOTA {
  16. }
  17. message RespFinishOTA {
  18. }
  19. enum SendFileMsgType {
  20. TypeReserved = 0;
  21. TypeCmdSendFile = 1;
  22. TypeRespSendFile = 2;
  23. TypeCmdStartOTA = 3;
  24. TypeRespStartOTA = 4;
  25. TypeCmdFinishOTA = 5;
  26. TypeRespFinishOTA = 6;
  27. }
  28. message SendFilePayload {
  29. SendFileMsgType msg = 1;
  30. Status status = 2;
  31. oneof payload {
  32. CmdSendFile cmd_send_file = 10;
  33. RespSendFile resp_send_file = 11;
  34. CmdStartOTA cmd_start_ota = 12;
  35. RespStartOTA resp_start_ota = 13;
  36. CmdFinishOTA cmd_finish_ota = 14;
  37. RespFinishOTA resp_finish_ota = 15;
  38. }
  39. }