Goby3  3.1.5
2024.05.14
iridium_driver.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 import "goby/protobuf/option_extensions.proto";
3 import "goby/acomms/protobuf/driver_base.proto";
4 import "goby/acomms/protobuf/modem_message.proto";
5 import "dccl/option_extensions.proto";
6 
7 package goby.acomms.iridium.protobuf;
8 
9 enum DeviceType
10 {
11  DEVICE_VOICE_ENABLED_ISU =
12  1; // e.g. 9523, etc.: device capable of making calls
13  DEVICE_IRIDIUM_9602_9603 = 2; // RockBLOCK, etc.
14 }
15 message Config
16 {
17  message Remote
18  {
19  required string iridium_number = 1;
20  required int32 modem_id = 2;
21  }
22 
23  optional Remote remote = 1;
24  optional uint32 max_frame_size = 2 [default = 1500];
25  optional int32 target_bit_rate = 3 [default = 2400];
26  repeated string config = 4;
27  optional int32 dial_attempts = 5 [default = 3];
28  optional int32 debug_client_port = 6;
29 
30  optional int32 hangup_seconds_after_empty = 8 [default = 30];
31  optional int32 start_timeout = 9 [default = 20];
32  optional bool use_dtr = 10 [default = false];
33  optional int32 handshake_hangup_seconds = 12 [default = 5];
34 
35  optional bool enable_sbdring_automatic_registration = 13 [default = true];
36 
37  optional DeviceType device = 14 [default = DEVICE_VOICE_ENABLED_ISU];
38 }
39 
40 extend goby.acomms.protobuf.DriverConfig
41 {
42  optional Config config = 1381;
43 }
44 
45 message RockblockReceive
46 {
47  option (dccl.msg).unit_system = "si";
48 
49  optional int32 momsn = 1;
50  optional double iridium_latitude = 2 [(dccl.field) = {
51  units { derived_dimensions: "plane_angle" system: "angle::degree" }
52  }];
53  optional double iridium_longitude = 3 [(dccl.field) = {
54  units { derived_dimensions: "plane_angle" system: "angle::degree" }
55  }];
56 
57  // Short Burst Data Developers Guide:
58  // The CEP radius provides the radius (in Kilometers) around the center
59  // point within which the IMEI is located with a 80% probability of
60  // accuracy.
61  optional double iridium_cep_radius = 4 [
62  (dccl.field) = { units { prefix: "kilo" derived_dimensions: "length" } }
63  ];
64 
65  optional int32 serial = 5;
66  optional string imei = 6;
67  optional string device_type = 7;
68  optional string transmit_time = 8;
69  optional bool jwt_verified = 9 [default = false];
70 }
71 
72 message RockblockTransmit
73 {
74  required bool success =
75  1; // true if HTTP result = 200, and body status == OK
76 
77  optional int32 mt_id = 2;
78 
79  enum Error
80  {
81  ERROR_SUCCESS = -1;
82  ERROR_PARSE_FAILURE = -2;
83 
84  // == rockblock error code
85  // https://docs.rockblock.rock7.com/reference/testinput
86  ROCKBLOCK_ERROR_INVALID_LOGIN_CREDENTIALS = 10;
87  ROCKBLOCK_ERROR_IMEI_NOT_FOUND_ON_YOUR_ACCOUNT = 11;
88  ROCKBLOCK_ERROR_HAS_NO_LINE_RENTAL = 12;
89  ROCKBLOCK_ERROR_ACCOUNT_HAS_INSUFFICIENT_CREDIT = 13;
90  ROCKBLOCK_ERROR_COULD_NOT_DECODE_HEX_DATA = 14;
91  ROCKBLOCK_ERROR_DATA_TOO_LONG = 15;
92  ROCKBLOCK_ERROR_NO_DATA = 16;
93  ROCKBLOCK_ERROR_SYSTEM_ERROR = 99;
94  ROCKBLOCK_ERROR_UNKNOWN = 100;
95 
96  // from cpp-httplib
97  HTTP_ERROR_UNKNOWN = 101;
98  HTTP_ERROR_CONNECTION = 102;
99  HTTP_ERROR_BINDIPADDRESS = 103;
100  HTTP_ERROR_READ = 104;
101  HTTP_ERROR_WRITE = 105;
102  HTTP_ERROR_EXCEEDREDIRECTCOUNT = 106;
103  HTTP_ERROR_CANCELED = 107;
104  HTTP_ERROR_SSLCONNECTION = 108;
105  HTTP_ERROR_SSLLOADINGCERTS = 109;
106  HTTP_ERROR_SSLSERVERVERIFICATION = 110;
107  HTTP_ERROR_UNSUPPORTEDMULTIPARTBOUNDARYCHARS = 111;
108  HTTP_ERROR_COMPRESSION = 112;
109  HTTP_ERROR_CONNECTIONTIMEOUT = 113;
110  HTTP_ERROR_PROXYCONNECTION = 114;
111  }
112  optional Error error = 10 [default = ERROR_SUCCESS];
113 }
114 
115 message Transmission
116 {
117  optional bool if_no_data_do_mailbox_check = 1 [default = true];
118 
119  optional RockblockReceive rockblock_rx = 10;
120  optional RockblockTransmit rockblock_tx = 11;
121 }
122 
123 extend goby.acomms.protobuf.ModemTransmission
124 {
125  optional Transmission transmission = 1381;
126 }
127 
128 message Report
129 {
130  enum RSSI
131  {
132  RSSI_0_BARS = 0;
133  RSSI_1_BARS = 1;
134  RSSI_2_BARS = 2;
135  RSSI_3_BARS = 3;
136  RSSI_4_BARS = 4;
137  RSSI_5_BARS = 5;
138  };
139  optional RSSI rssi = 1;
140 }
141 
142 extend goby.acomms.protobuf.ModemReport
143 {
144  optional Report report = 1381;
145 }
146 
147 // subset of goby.acomms.protobuf.ModemTransmission
148 message IridiumHeader
149 {
150  option (dccl.msg).id = 0;
151  option (dccl.msg).max_bytes = 7;
152  option (dccl.msg).codec_version = 3;
153 
154  required int32 src = 1 [(dccl.field).min = 0, (dccl.field).max = 30];
155 
156  required int32 dest = 2 [(dccl.field).min = 0, (dccl.field).max = 30];
157 
158  optional int32 rate = 3 [(dccl.field).min = 0, (dccl.field).max = 1];
159 
160  required goby.acomms.protobuf.ModemTransmission.TransmissionType type = 4;
161 
162  optional bool ack_requested = 5;
163  optional uint32 frame_start = 6
164  [(dccl.field).min = 0, (dccl.field).max = 0xFFFF];
165  optional int32 acked_frame = 7
166  [(dccl.field).min = 0, (dccl.field).max = 0xFFFF];
167 }