Goby v2
config.proto
1 
2 import "goby/common/protobuf/option_extensions.proto";
3 import "goby/common/protobuf/app_base_config.proto";
4 
5 package goby.core.proto;
6 
7 // Type of vehicle for a given node
8 enum VehicleType
9 {
10  AUV = 1;
11  USV = 2;
12  SHIP = 3;
13  GLIDER = 4;
14  TARGET = 5;
15  BUOY = 6;
16  OTHER = 7;
17 }
18 
19 // defines information and connections
20 // to a node (vehicle, ship, etc.)
21 // a node is defined by a single gobyd and collection
22 // of connected processes
23 message Platform
24 {
25  message SerialInfo
26  {
27  required string port = 1 [(goby.field).example = "/dev/ttyUSB1"];
28  required uint32 baud = 2 [(goby.field).example = "19200"];
29  }
30  message AcousticModemInfo
31  {
32  required uint32 modem_id = 1 [
33  (goby.field).description = "Micro-Modem id ($CCCFQ,SRC)",
34  (goby.field).example = "1"
35  ];
36  required SerialInfo modem_serial = 2;
37  optional bool has_coproc = 3 [
38  default = true,
39  (goby.field).description = "can handle high-rate PSK"
40  ];
41  }
42  message EthernetInfo
43  {
44  required string ipv4_addr = 1 [(goby.field).example = "192.168.1.1"];
45  required uint32 ipv4_port = 2 [(goby.field).example = "10023"];
46  }
47 
48  required string name = 1 [
49  (goby.field).description = "unique name of the node",
50  (goby.field).example = "AUV-23"
51  ];
52  optional VehicleType type = 2
53  [(goby.field).description = "type of the node", default = AUV];
54 
55  optional AcousticModemInfo acomms = 3
56  [(goby.field).description = "acoustic connectivity"];
57  optional EthernetInfo ether = 4
58  [(goby.field).description = "ethernet connectivity"];
59  optional SerialInfo serial = 5
60  [(goby.field).description = "serial connectivity "];
61 }
62 
63 message LogConfig
64 {
65  enum SQLBackend
66  {
67  SQLITE = 1;
68  }
69  optional SQLBackend backend = 1 [default = SQLITE];
70 
71  message SQLiteInfo
72  {
73  // %1% gets expanded into platform name
74  // %2% gets expanded to iso date-time stamp
75  optional string path = 2 [default = "./%1%_%2%_goby.db"];
76  }
77  // only needed if backend == SQLITE
78  optional SQLiteInfo sqlite = 2;
79 }
80 
81 // latitude and longitude can be troublesome to use, so often
82 // we want to define a local datum for doing a planar approximation
83 // in X,Y,Z coordinates (meters) of where vehicles are.
84 // This datum is the 0,0,0 point of the X,Y,Z grid
85 message LocalCartesianDatum
86 {
87  required double lat = 1; // decimal degrees
88  required double lon = 2; // decimal degrees
89  optional double depth = 3 [default = 0]; // meters
90 }
91 
92 message Config
93 {
94  optional AppBaseConfig base = 1
95  [(goby.field).description = "params shared with all goby applications"];
96  optional Platform self = 2 [(goby.field).description = "this platform"];
97  repeated Platform other = 3
98  [(goby.field).description = "the known world of platforms"];
99  // optional LogConfig log = 4 [(goby.field).description="SQL log
100  // configuration"];
101 
102  optional LocalCartesianDatum origin = 5 [
103  (goby.field).description =
104  "Convenient origin for local cartesian coordinate transformations"
105  ];
106 }