Goby v2
driver_base.proto
1 
2 import "goby/common/protobuf/option_extensions.proto";
3 
4 package goby.acomms.protobuf;
5 
6 // known drivers - should make this somehow extensible outside Goby
7 enum DriverType
8 {
9  DRIVER_NONE = 1;
10  DRIVER_WHOI_MICROMODEM = 2;
11  DRIVER_ABC_EXAMPLE_MODEM = 3;
12  DRIVER_UFIELD_SIM_DRIVER = 4;
13  DRIVER_PB_STORE_SERVER = 5;
14  DRIVER_UDP = 6;
15  DRIVER_BLUEFIN_MOOS = 7;
16  DRIVER_IRIDIUM = 8;
17  DRIVER_IRIDIUM_SHORE = 9;
18  DRIVER_BENTHOS_ATM900 = 10;
19 }
20 
21 message DriverConfig
22 {
23  optional int32 modem_id = 1 [
24  (goby.field).description = "Unique number 1-31 to identify this node",
25  (goby.field).example = "1"
26  ];
27 
28  enum ConnectionType
29  {
30  CONNECTION_SERIAL =
31  1; // Modem is connected by a tty serial line (e.g. RS-232)
32  CONNECTION_TCP_AS_CLIENT =
33  2; // Modem is connected by ethernet and is serving clients
34  CONNECTION_TCP_AS_SERVER =
35  3; // Modem is connected by ethernet and expects us to serve it
36  }
37 
38  optional ConnectionType connection_type = 2 [
39  default = CONNECTION_SERIAL,
40  (goby.field).description =
41  "Physical connection type from this computer (running Goby) to the "
42  "acoustic modem"
43  ];
44  optional string line_delimiter = 3 [
45  default = "\r\n",
46  (goby.field).description =
47  "String used to delimit new lines for this acoustic modem"
48  ]; // delimits lines on the serial or tcp interface
49 
50  // required if connection_type == CONNECTION_SERIAL
51  optional string serial_port = 4 [
52  (goby.field).description = "Serial port for CONNECTION_SERIAL",
53  (goby.field).example = "/dev/ttyS0"
54  ];
55  optional uint32 serial_baud = 5 [
56  (goby.field).description = "Baud rate for CONNECTION_SERIAL",
57  (goby.field).example = "19200"
58  ];
59 
60  // required if connection_type == CONNECTION_TCP_AS_CLIENT
61  optional string tcp_server = 6 [
62  (goby.field).description =
63  "IP Address or domain name for the server if "
64  "CONNECTION_TCP_AS_CLIENT",
65  (goby.field).example = "192.168.1.111"
66  ];
67 
68  // required if connection_type == CONNECTION_TCP_AS_CLIENT or
69  // CONNECTION_TCP_AS_SERVER
70  optional uint32 tcp_port = 7 [
71  (goby.field).description =
72  "Port to serve on (for CONNECTION_TCP_AS_SERVER) or to connect to "
73  "(for "
74  "CONNECTION_TCP_AS_CLIENT)",
75  (goby.field).example = "50010"
76  ];
77 
78  optional uint32 reconnect_interval = 8 [
79  (goby.field).description = "Seconds between TCP reconnect attempts",
80  default = 10
81  ];
82 
83  optional string raw_log = 9
84  [(goby.field).description =
85  "File to write raw modem log to. If %1% is present, is replaced "
86  "with the current timestamp."];
87 
88  optional string driver_name = 10
89  [(goby.field).description = "Driver name to load from plugin library"];
90 
91  extensions 1000 to max;
92  // extensions 1000-1100 used by acomms_mm_driver.proto
93  // extensions 1201-1202 used by acomms_abc_driver.proto (example driver)
94  // extensions 1300-1320 used by ufield_sim_driver.proto
95  // extensions 1321-1340 used by pb_modem_driver.proto
96  // extensions 1341-1360 used by udp_driver.proto
97  // extensions 1361-1380 used by bluefin_sim_driver.proto
98  // extensions 1381-1400 used by iridium_driver.proto
99  // extensions 1401-1420 used by MOOSSafir (external)
100  // extensions 1421-1440 used by iridium_shore_driver.proto
101  // extensions 1441-1460 used by benthos_atm900.proto
102 }