2import "dccl/option_extensions.proto";
3import "goby/protobuf/option_extensions.proto";
4import "goby/acomms/protobuf/driver_base.proto";
5import "goby/acomms/protobuf/amac_config.proto";
6import "goby/acomms/protobuf/buffer.proto";
7import "goby/acomms/protobuf/modem_message.proto";
8import "goby/middleware/protobuf/intervehicle_transporter_config.proto";
9import "goby/middleware/protobuf/serializer_transporter.proto";
11package goby.middleware.intervehicle.protobuf;
21 required uint32 modem_id = 1;
22 optional uint32 subnet_mask = 2 [default = 0xFFF0];
24 required goby.acomms.protobuf.DriverConfig driver = 11
25 [(goby.field).description =
26 "Configure the modem driver(s) in use by this portal"];
28 optional goby.acomms.protobuf.MACConfig mac = 12
29 [(goby.field).description =
30 "Configure the acoustic Medium Access Control"];
32 optional goby.acomms.protobuf.DynamicBufferConfig subscription_buffer =
33 13 [(goby.field).description =
34 "Buffer configuration for subscription forwarding"];
36 optional double ack_timeout = 20 [
38 (goby.field).description =
39 "Time to wait before resending the same data (ARQ wait).",
40 (dccl.field) = { units { base_dimensions: "T" } }
43 optional double modem_report_interval = 21 [
45 (goby.field).description = "Time between modem reports",
46 (dccl.field) = { units { base_dimensions: "T" } }
49 message RestartOnFailure
51 optional double interval = 1 [
53 (goby.field).description =
54 "Time from a driver failure to the next attempt to "
56 (dccl.field) = { units { base_dimensions: "T" } }
59 optional RestartOnFailure restart_on_failure = 22
60 [(goby.field).description =
61 "If set, a driver that fails, at startup or while running, is "
62 "replaced by a new one after restart_on_failure.interval, "
63 "while the portal's other links keep running. If omitted, a "
64 "driver failure terminates the portal."];
66 optional bool shutdown_driver_on_exit = 23 [
68 (goby.field).description =
69 "Call the driver's shutdown() when the portal exits, so the "
70 "driver can finish what is in progress (e.g. an Iridium SBD "
71 "session) before the modem is released"
75 repeated LinkConfig link = 1;
77 message PersistSubscriptions
79 required string name = 1
80 [(goby.field).description =
81 "Name to use when persisting subscriptions (must be unique "
82 "for each InterVehiclePortal on this machine)"];
83 required string dir = 2
84 [(goby.field).description =
85 "Directory to write subscription data file"];
87 optional PersistSubscriptions persist_subscriptions = 10
88 [(goby.field).description =
89 "Configuration for persisting intervehicle subscriptions between "
90 "restarts. If omitted, subscriptions will not be persisted, and "
91 "all remote subscribers will need to resubscribe when this Portal "
97 required int32 tx_queue_size = 1;
100enum SubscriptionDCCLID
102 SUBSCRIPTION_DCCL_ID__GOBY_3_0 = 2;
103 SUBSCRIPTION_DCCL_ID__GOBY_3_1 = 3;
106// when this changes, update GOBY_INTERVEHICLE_API_VERSION in
107// goby3/CMakeLists.txt
110 option (dccl.msg) = {
112 id: 3 // SUBSCRIPTION_DCCL_ID__GOBY_3_1
117 // must be first to allow us to decode this field regardless of other
118 // message changes so we can warn when its incompatible
119 required uint32 api_version = 1
120 [(dccl.field) = { min: 1 max: 16 in_head: true }];
122 required Header header = 2;
123 optional uint64 time = 3 [(dccl.field) = {
125 units { prefix: "micro" base_dimensions: "T" }
133 required Action action = 4;
135 required uint32 dccl_id = 5
136 [(dccl.field) = { codec: "dccl.default.id" }]; // 2-byte varint
137 required uint32 group = 6
138 [(dccl.field) = { min: 0 max: 4294967295 }]; // 4-byte
140 optional TransporterConfig intervehicle = 10;
141 optional goby.middleware.protobuf.SerializerProtobufMetadata metadata = 20
142 [(dccl.field).omit = true];
147 required int32 src = 1 [(dccl.field) = { min: 0 max: 65535 }];
148 repeated int32 dest = 2
149 [(dccl.field) = { min: 0 max: 65535 max_repeat: 4 }];
150 optional goby.acomms.protobuf.ModemTransmission modem_msg = 10
151 [(dccl.field).omit = true];
156 required int32 dccl_id = 1;
157 required bytes data = 2;
160// have to split this at the Portal as the Forwarders may not have all the DCCL
162message DCCLForwardedData
164 required Header header = 1;
165 repeated DCCLPacket frame = 2;
170 option (dccl.msg) = {
173 required Header header = 1
174 [(goby.field).description =
175 "src is the modem from which the ack originated. dest is the "
176 "local modem that received the ack"];
178 required int64 latency = 2 [
179 (goby.field).description = "Time between queuing and acknowledgement",
180 (dccl.field) = { units { prefix: "micro" base_dimensions: "T" } }
186 option (dccl.msg) = {
190 required Header header = 1
191 [(goby.field).description =
192 "dest is the local modem that expired this message"];
194 required int64 latency = 2 [
195 (goby.field).description = "Time between queuing and expiration",
196 (dccl.field) = { units { prefix: "micro" base_dimensions: "T" } }
201 EXPIRED_NO_SUBSCRIBERS = 1;
202 EXPIRED_TIME_TO_LIVE_EXCEEDED = 2;
203 EXPIRED_BUFFER_OVERFLOW = 3;
204 // replaced before transmission: a publication by a newer one with
205 // clear_pending, or a queued subscription by one with the opposite
206 // action for the same type, group and configuration. A queued
207 // subscription replaced by an equivalent one (possibly from another
208 // local subscriber) is not expired but acked or expired with it.
209 EXPIRED_SUPERSEDED = 4;
211 required ExpireReason reason = 3;
213 // required int32 transmit_attempts = 4
214 // [(goby.field).description =
215 // "the number of times this message was transmitted"];
218message AckMessagePair
220 required goby.middleware.protobuf.SerializerTransporterMessage serializer =
222 required AckData data = 2;
225message ExpireMessagePair
227 required goby.middleware.protobuf.SerializerTransporterMessage serializer =
229 required ExpireData data = 2;
232message SubscriptionReport
234 required uint32 link_modem_id = 1;
235 repeated Subscription subscription = 2;
236 optional Subscription changed = 3;
239message SubscriptionPersistCollection
241 option (dccl.msg) = {
245 required uint64 time = 1 [(dccl.field) = {
247 units { prefix: "micro" base_dimensions: "T" }
249 repeated Subscription subscription = 2;
252message ModemTransmissionWithLinkID
254 required uint32 link_modem_id = 1;
255 required goby.acomms.protobuf.ModemTransmission data = 2;
258message ModemRawWithLinkID
260 required uint32 link_modem_id = 1;
261 required goby.acomms.protobuf.ModemRaw data = 2;
264message ModemReportWithLinkID
266 required uint32 link_modem_id = 1;
267 required goby.acomms.protobuf.ModemReport data = 2;