2005-08-29 07:23:51 +00:00
|
|
|
/* tests data packing and unpacking */
|
|
|
|
|
|
|
|
struct msg {
|
2009-07-03 17:43:26 +00:00
|
|
|
string /* sender */ from_name = 1; /* be verbose */
|
2005-08-29 07:23:51 +00:00
|
|
|
string to_name = 2;
|
2007-09-22 23:57:11 +00:00
|
|
|
optional struct[kill] attack = 3;
|
2005-08-29 07:23:51 +00:00
|
|
|
array struct[run] run = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct kill {
|
2007-12-12 04:39:42 +00:00
|
|
|
string weapon = 0x10121;
|
2005-08-29 07:23:51 +00:00
|
|
|
string action = 2;
|
2007-12-23 07:38:11 +00:00
|
|
|
array int how_often = 3;
|
2005-08-29 07:23:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
struct run {
|
|
|
|
string how = 1;
|
2007-12-23 07:38:11 +00:00
|
|
|
optional bytes some_bytes = 2;
|
|
|
|
|
|
|
|
bytes fixed_bytes[24] = 3;
|
2007-12-24 23:59:41 +00:00
|
|
|
array string notes = 4;
|
2008-06-21 02:21:25 +00:00
|
|
|
|
|
|
|
optional int64 large_number = 5;
|
|
|
|
array int other_numbers = 6;
|
2005-08-29 07:23:51 +00:00
|
|
|
}
|