unittestproto.proto 907 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. syntax = "proto2";
  2. import 'nanopb.proto';
  3. message IntegerArray {
  4. repeated int32 data = 1 [(nanopb).max_count = 10];
  5. }
  6. message FloatArray {
  7. repeated float data = 1 [(nanopb).max_count = 10];
  8. }
  9. message StringMessage {
  10. required string data = 1 [(nanopb).max_length = 10];
  11. }
  12. message BytesMessage {
  13. required bytes data = 1 [(nanopb).max_size = 16];
  14. }
  15. message CallbackArray {
  16. // We cheat a bit and use this message for testing other types, too.
  17. // Nanopb does not care about the actual defined data type for callback
  18. // fields.
  19. repeated int32 data = 1;
  20. }
  21. message IntegerContainer {
  22. required IntegerArray submsg = 1;
  23. }
  24. message CallbackContainer {
  25. required CallbackArray submsg = 1;
  26. }
  27. message CallbackContainerContainer {
  28. required CallbackContainer submsg = 1;
  29. }
  30. message StringPointerContainer {
  31. repeated string rep_str = 1 [(nanopb).type = FT_POINTER];
  32. }