summaryrefslogtreecommitdiffstats
path: root/tests/person.proto
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-07-31 12:55:09 +0000
committerPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-07-31 12:55:09 +0000
commit3959290bc77ae26772bc107128b0a4edd3930361 (patch)
treefefcf27423aeb7fd100b52802f5c519def3a8cc7 /tests/person.proto
parentf8364310d3ca85d2cf59019bb4bc5e9ff4c52dc3 (diff)
First version of header generator
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@950 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'tests/person.proto')
-rw-r--r--tests/person.proto11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/person.proto b/tests/person.proto
index ec5b4cca..01b2d4e1 100644
--- a/tests/person.proto
+++ b/tests/person.proto
@@ -1,7 +1,10 @@
+import "nanopb.proto";
+
message Person {
- required string name = 1;
+ required string name = 1 [(nanopb).max_size = 40];
required int32 id = 2;
- optional string email = 3;
+ optional string email = 3 [(nanopb).max_size = 40];
+ optional bytes test = 5 [default = "abc\x00\x01\x02"];
enum PhoneType {
MOBILE = 0;
@@ -10,9 +13,9 @@ message Person {
}
message PhoneNumber {
- required string number = 1;
+ required string number = 1 [(nanopb).max_size = 40];
optional PhoneType type = 2 [default = HOME];
}
- repeated PhoneNumber phone = 4;
+ repeated PhoneNumber phone = 4 [(nanopb).max_count = 5];
}