2 import "dccl/option_extensions.proto";
3 import "goby/protobuf/option_extensions.proto";
4 import "goby/acomms/protobuf/driver_base.proto";
5 import "goby/acomms/protobuf/amac_config.proto";
6 import "goby/acomms/protobuf/buffer.proto";
7 import "goby/acomms/protobuf/modem_message.proto";
8 import "goby/middleware/protobuf/intervehicle_transporter_config.proto";
9 import "goby/middleware/protobuf/serializer_transporter.proto";
11 package 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" } }
50 repeated LinkConfig link = 1;
52 message PersistSubscriptions
54 required string name = 1
55 [(goby.field).description =
56 "Name to use when persisting subscriptions (must be unique "
57 "for each InterVehiclePortal on this machine)"];
58 required string dir = 2
59 [(goby.field).description =
60 "Directory to write subscription data file"];
62 optional PersistSubscriptions persist_subscriptions = 10
63 [(goby.field).description =
64 "Configuration for persisting intervehicle subscriptions between "
65 "restarts. If omitted, subscriptions will not be persisted, and "
66 "all remote subscribers will need to resubscribe when this Portal "
72 required int32 tx_queue_size = 1;
75 enum SubscriptionDCCLID
77 SUBSCRIPTION_DCCL_ID__GOBY_3_0 = 2;
78 SUBSCRIPTION_DCCL_ID__GOBY_3_1 = 3;
81 // when this changes, update GOBY_INTERVEHICLE_API_VERSION in
82 // goby3/CMakeLists.txt
87 id: 3 // SUBSCRIPTION_DCCL_ID__GOBY_3_1
92 // must be first to allow us to decode this field regardless of other
93 // message changes so we can warn when its incompatible
94 required uint32 api_version = 1
95 [(dccl.field) = { min: 1 max: 16 in_head: true }];
97 required Header header = 2;
98 optional uint64 time = 3 [(dccl.field) = {
100 units { prefix: "micro" base_dimensions: "T" }
108 required Action action = 4;
110 required uint32 dccl_id = 5
111 [(dccl.field) = { codec: "dccl.default.id" }]; // 2-byte varint
112 required uint32 group = 6
113 [(dccl.field) = { min: 0 max: 4294967295 }]; // 4-byte
115 optional TransporterConfig intervehicle = 10;
116 optional goby.middleware.protobuf.SerializerProtobufMetadata metadata = 20
117 [(dccl.field).omit = true];
122 required int32 src = 1 [(dccl.field) = { min: 0 max: 65535 }];
123 repeated int32 dest = 2
124 [(dccl.field) = { min: 0 max: 65535 max_repeat: 4 }];
125 optional goby.acomms.protobuf.ModemTransmission modem_msg = 10
126 [(dccl.field).omit = true];
131 required int32 dccl_id = 1;
132 required bytes data = 2;
135 // have to split this at the Portal as the Forwarders may not have all the DCCL
137 message DCCLForwardedData
139 required Header header = 1;
140 repeated DCCLPacket frame = 2;
145 option (dccl.msg) = {
148 required Header header = 1
149 [(goby.field).description =
150 "src is the modem from which the ack originated. dest is the "
151 "local modem that received the ack"];
153 required int64 latency = 2 [
154 (goby.field).description = "Time between queuing and acknowledgement",
155 (dccl.field) = { units { prefix: "micro" base_dimensions: "T" } }
161 option (dccl.msg) = {
165 required Header header = 1
166 [(goby.field).description =
167 "dest is the local modem that expired this message"];
169 required int64 latency = 2 [
170 (goby.field).description = "Time between queuing and expiration",
171 (dccl.field) = { units { prefix: "micro" base_dimensions: "T" } }
176 EXPIRED_NO_SUBSCRIBERS = 1;
177 EXPIRED_TIME_TO_LIVE_EXCEEDED = 2;
178 EXPIRED_BUFFER_OVERFLOW = 3;
180 required ExpireReason reason = 3;
182 // required int32 transmit_attempts = 4
183 // [(goby.field).description =
184 // "the number of times this message was transmitted"];
187 message AckMessagePair
189 required goby.middleware.protobuf.SerializerTransporterMessage serializer =
191 required AckData data = 2;
194 message ExpireMessagePair
196 required goby.middleware.protobuf.SerializerTransporterMessage serializer =
198 required ExpireData data = 2;
201 message SubscriptionReport
203 required uint32 link_modem_id = 1;
204 repeated Subscription subscription = 2;
205 optional Subscription changed = 3;
208 message SubscriptionPersistCollection
210 option (dccl.msg) = {
214 required uint64 time = 1 [(dccl.field) = {
216 units { prefix: "micro" base_dimensions: "T" }
218 repeated Subscription subscription = 2;
221 message ModemTransmissionWithLinkID
223 required uint32 link_modem_id = 1;
224 required goby.acomms.protobuf.ModemTransmission data = 2;
227 message ModemRawWithLinkID
229 required uint32 link_modem_id = 1;
230 required goby.acomms.protobuf.ModemRaw data = 2;
233 message ModemReportWithLinkID
235 required uint32 link_modem_id = 1;
236 required goby.acomms.protobuf.ModemReport data = 2;