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