Goby v2
modem_message.proto
1 
2 import "dccl/option_extensions.proto";
3 import "goby/common/protobuf/option_extensions.proto";
4 
5 package goby.acomms.protobuf;
6 
7 message ModemTransmission
8 {
9  optional int32 src = 1 [
10  (dccl.field).min = -1,
11  (dccl.field).max = 30,
12  (goby.field).description =
13  "modem ID of message source. 0 indicates BROADCAST.",
14  default = -1
15  ]; // 0 (BROADCAST), 1-30
16 
17  optional int32 dest = 2 [
18  (dccl.field).min = -1,
19  (dccl.field).max = 30,
20  (goby.field).description =
21  "modem ID of message destination. 0 indicates BROADCAST, -1 "
22  "indicates "
23  "QUERY_DESTINATION_ID (i.e., destination is set to the destination "
24  "of "
25  "the next available packet",
26  default = -1
27  ]; // 0 (BROADCAST), 1-30, -1 (QUERY_DESTINATION_ID)
28  optional uint64 time = 3 [
29  (dccl.field).omit = true,
30  (goby.field).description =
31  "timestamp (microseconds since UNIX (1970-01-01 00:00:00 UTC) of "
32  "this "
33  "transmission",
34  (goby.field).cfg.action = NEVER
35  ];
36  enum TimeSource
37  {
38  MODEM_TIME = 1;
39  GOBY_TIME = 2;
40  }
41  optional TimeSource time_source = 5 [
42  (dccl.field).omit = true,
43  default = GOBY_TIME,
44  (goby.field).description = "source of the timestamp given",
45  (goby.field).cfg.action = NEVER
46  ];
47  optional int32 rate = 6 [
48  (dccl.field).min = -1,
49  (dccl.field).max = 14,
50  (goby.field).description =
51  "0 (lowest) - 14 (highest), -1 (QUERY_RATE). QUERY_RATE is "
52  "currently "
53  "unsupported by Goby-Queue",
54  default = 0
55  ];
56 
57  enum TransmissionType
58  {
59  // General (DriverBase) types
60  UNKNOWN = 0;
61  DATA = 1;
62  ACK = 2;
63  DRIVER_SPECIFIC = 10;
64  }
65 
66  optional TransmissionType type = 7 [
67  default = UNKNOWN,
68  (goby.field).description =
69  "Type of this transmission. DRIVER_SPECIFIC types are enumerated "
70  "in "
71  "the extensions for the selected driver."
72  ];
73 
74  // for type == DATA
75  optional uint32 max_num_frames = 11 [
76  (dccl.field).omit = true,
77  default = 1
78  ]; // set by the modem driver for the given rate
79  optional uint32 max_frame_bytes = 12 [
80  (dccl.field).omit = true
81  ]; // set by the modem driver for the given rate, omitted means no maximum
82  optional bool ack_requested = 13
83  [default = true]; // acoustic acknowledgment requested
84  repeated bytes frame = 14 [
85  (dccl.field).omit = true,
86  (goby.field).description =
87  "Data to transmit, represented as ASCII or octal bytes preceeded "
88  "by a "
89  "'\\' (e.g. \\000 is 0x00)"
90  ]; // if omitted, you will be queried for data on signal_data_request. You
91  // can also set some frames here and the rest will be filled by
92  // signalling a data request
93 
94  optional uint32 frame_start = 15 [(dccl.field).omit = true, default = 0];
95 
96  // for type == ACK
97  repeated int32 acked_frame = 20
98  [(dccl.field).omit = true, (goby.field).cfg.action = NEVER];
99 
100  // for AMAC
101  optional double slot_seconds = 30 [
102  (dccl.field).min = 0,
103  (dccl.field).max = 3600,
104  (dccl.field).precision = 1,
105  default = 10
106  ]; // length of slot (in seconds) if this transmission is part of a TDMA
107  // cycle
108  optional uint32 unique_id = 31 [
109  (dccl.field).min = 0,
110  (dccl.field).max = 100,
111  (goby.field).example = "0"
112  ]; // used to assign an ID to this slot
113  optional bool always_initiate = 32 [default = false];
114  optional int32 slot_index = 33 [(dccl.field).omit = true];
115 
116  // extensions 1000-1100 used by mm_driver.proto
117  // extensions 1201-1202 used by abc_driver.proto (example driver)
118  // extensions 1300-1320 used by ufield_sim_driver.proto
119  // extensions 1321-1340 used by pb_modem_driver.proto
120  // extensions 1341-1360 used by udp_driver.proto
121  // extensions 1361-1380 used by bluefin_driver.proto
122  // extensions 1381-1400 used by iridium_driver.proto
123  // extensions 1401-1420 used by benthos_atm900.proto
124  // extensions 1421-1440 used by mccs_driver.proto
125  extensions 1000 to max;
126 }
127 
128 message ModemRaw
129 {
130  required string raw = 7; // "$CARXD,..."
131  optional string description = 8; // "Incoming hexadecimal data"
132 }