Goby v2
two_message.proto
1 import "dccl/option_extensions.proto";
2 message GoToCommand
3 {
4  option (dccl.msg).id = 125;
5  option (dccl.msg).max_bytes = 32;
6  required int32 destination = 1 [
7  (dccl.field).max = 31,
8  (dccl.field).min = 0,
9  (dccl.field).precision = 0
10  ];
11  optional string type = 2
12  [(dccl.field).static_value = "goto", (dccl.field).codec = "_static"];
13  required int32 goto_x = 3 [
14  (dccl.field).max = 10000,
15  (dccl.field).min = 0,
16  (dccl.field).precision = 0
17  ];
18  required int32 goto_y = 4 [
19  (dccl.field).max = 10000,
20  (dccl.field).min = 0,
21  (dccl.field).precision = 0
22  ];
23  required bool lights_on = 5;
24  required string new_instructions = 6 [(dccl.field).max_length = 10];
25  required double goto_speed = 7 [
26  (dccl.field).max = 3,
27  (dccl.field).min = 0,
28  (dccl.field).precision = 2
29  ];
30 }
31 
32 message VehicleStatus
33 {
34  option (dccl.msg).id = 126;
35  option (dccl.msg).max_bytes = 32;
36  required double nav_x = 1 [
37  (dccl.field).max = 10000,
38  (dccl.field).min = 0,
39  (dccl.field).precision = 1
40  ];
41  required double nav_y = 2 [
42  (dccl.field).max = 10000,
43  (dccl.field).min = 0,
44  (dccl.field).precision = 1
45  ];
46  required HealthEnum health = 3;
47  enum HealthEnum
48  {
49  HEALTH_GOOD = 0;
50  HEALTH_LOW_BATTERY = 1;
51  HEALTH_ABORT = 2;
52  }
53 }