mem_release.proto 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. syntax = "proto2";
  2. import "nanopb.proto";
  3. message SubMessage
  4. {
  5. optional string dynamic_str = 1 [(nanopb).type = FT_POINTER];
  6. repeated string dynamic_str_arr = 2 [(nanopb).type = FT_POINTER];
  7. repeated SubMessage dynamic_submsg = 3 [(nanopb).type = FT_POINTER];
  8. }
  9. message TestMessage
  10. {
  11. required SubMessage static_req_submsg = 1 [(nanopb).type = FT_STATIC];
  12. optional SubMessage dynamic_submsg = 2 [(nanopb).type = FT_POINTER];
  13. optional SubMessage static_opt_submsg = 3 [(nanopb).type = FT_STATIC];
  14. repeated SubMessage static_rep_submsg = 4 [(nanopb).type = FT_STATIC, (nanopb).max_count=2];
  15. extensions 100 to 200;
  16. }
  17. extend TestMessage
  18. {
  19. optional SubMessage dynamic_ext = 100 [(nanopb).type = FT_POINTER];
  20. optional SubMessage static_ext = 101 [(nanopb).type = FT_STATIC];
  21. }
  22. message OneofMessage
  23. {
  24. required int32 first = 1;
  25. oneof msgs
  26. {
  27. TestMessage msg1 = 2;
  28. SubMessage msg2 = 3;
  29. }
  30. required int32 last = 4;
  31. }
  32. message RepeatedMessage
  33. {
  34. required int32 first = 1;
  35. repeated SubMessage subs = 2;
  36. }