@blueyerobotics/protocol-definitions 3.4.0-eddb8a5e → 3.4.0-efe27311

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/req_rep.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { Any } from "./google/protobuf/any.js";
3
3
  import { Battery, Camera, CameraParameters, ClientInfo, ConnectedClient, CvModelInfo, HeadingMode, MultibeamColorFilter, OverlayParameters, PersistentStorageSettings, StorageLocation, SystemTime } from "./message_formats.js";
4
- import { Instruction, Mission } from "./mission_planning.js";
4
+ import { InsertInstruction, Instruction, Mission, MissionRule } from "./mission_planning.js";
5
5
  import { SlamRecordingState, SlamRequestError, SlamSensorSettings } from "./slam.js";
6
6
  /**
7
7
  * Request reply
@@ -143,6 +143,16 @@ export interface SetMissionReq {
143
143
  }
144
144
  /** Response after setting a new mission. */
145
145
  export interface SetMissionRep {
146
+ /**
147
+ * True when the mission was loaded. Drones without this field answer an empty message as soon
148
+ * as they have received the mission, before it is validated. Not accepted with no reason
149
+ * therefore only confirms receipt: wait for MissionStatusTel to show whether the mission loaded.
150
+ */
151
+ accepted: boolean;
152
+ /** Why the mission was refused. */
153
+ reason: string;
154
+ /** Mission.load_id the drone gave the mission, when it was loaded. */
155
+ loadId: number;
146
156
  }
147
157
  /** Service request to the reference_generator to get the active mission. */
148
158
  export interface GetMissionReq {
@@ -152,13 +162,56 @@ export interface GetMissionRep {
152
162
  /** Active mission with waypoints. */
153
163
  mission: Mission | undefined;
154
164
  }
155
- /** Updates an instruction in current mission with a new instruction payload. */
165
+ /**
166
+ * Changes one instruction of the loaded mission. The mission is validated and
167
+ * planned again as a whole and Mission.revision increases. An instruction that
168
+ * has completed cannot be changed. Replacing or removing the instruction that
169
+ * is running stops it; a replacement starts from where the drone is.
170
+ *
171
+ * The change applies only to the mission load and revision the client edited.
172
+ * When load_id or revision differs from the loaded mission's, because the
173
+ * mission was replaced or changed since, the drone refuses it and changes nothing.
174
+ */
156
175
  export interface SetInstructionUpdateReq {
157
- /** instruction that will replace the desired instruction. */
158
- instruction: Instruction | undefined;
176
+ /** Replace the instruction that has the same id. */
177
+ replace?: Instruction | undefined;
178
+ /** Add an instruction. */
179
+ insert?: InsertInstruction | undefined;
180
+ /** Remove the instruction with this id. */
181
+ removeId?: number | undefined;
182
+ /** Mission.load_id of the mission the client edited. */
183
+ loadId: number;
184
+ /** Mission.revision the client edited. */
185
+ revision: number;
159
186
  }
160
187
  /** Response after updating an instruction in the current mission. */
161
188
  export interface SetInstructionUpdateRep {
189
+ /** True when the mission was changed. */
190
+ accepted: boolean;
191
+ /** Why the change was refused. */
192
+ reason: string;
193
+ /** Revision of the mission after the change. */
194
+ revision: number;
195
+ }
196
+ /** Replaces the mission rules. Rules run independently of missions. */
197
+ export interface SetMissionRulesReq {
198
+ /** The rules to run; an empty list clears them. */
199
+ rules: MissionRule[];
200
+ }
201
+ /** Response after setting the mission rules. */
202
+ export interface SetMissionRulesRep {
203
+ /** True when the rules were set. */
204
+ accepted: boolean;
205
+ /** Why the rules were refused. */
206
+ reason: string;
207
+ }
208
+ /** Get the mission rules. */
209
+ export interface GetMissionRulesReq {
210
+ }
211
+ /** The mission rules. */
212
+ export interface GetMissionRulesRep {
213
+ /** The rules currently set. */
214
+ rules: MissionRule[];
162
215
  }
163
216
  /** Set the heading mode used in dead reckoning. */
164
217
  export interface SetHeadingModeReq {
@@ -476,6 +529,10 @@ export declare const GetMissionReq: MessageFns<GetMissionReq>;
476
529
  export declare const GetMissionRep: MessageFns<GetMissionRep>;
477
530
  export declare const SetInstructionUpdateReq: MessageFns<SetInstructionUpdateReq>;
478
531
  export declare const SetInstructionUpdateRep: MessageFns<SetInstructionUpdateRep>;
532
+ export declare const SetMissionRulesReq: MessageFns<SetMissionRulesReq>;
533
+ export declare const SetMissionRulesRep: MessageFns<SetMissionRulesRep>;
534
+ export declare const GetMissionRulesReq: MessageFns<GetMissionRulesReq>;
535
+ export declare const GetMissionRulesRep: MessageFns<GetMissionRulesRep>;
479
536
  export declare const SetHeadingModeReq: MessageFns<SetHeadingModeReq>;
480
537
  export declare const SetHeadingModeRep: MessageFns<SetHeadingModeRep>;
481
538
  export declare const SetPubFrequencyReq: MessageFns<SetPubFrequencyReq>;
package/dist/req_rep.js CHANGED
@@ -7,7 +7,7 @@
7
7
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
8
  import { Any } from "./google/protobuf/any.js";
9
9
  import { Battery, cameraFromJSON, CameraParameters, cameraToJSON, ClientInfo, ConnectedClient, CvModelInfo, headingModeFromJSON, headingModeToJSON, MultibeamColorFilter, OverlayParameters, PersistentStorageSettings, storageLocationFromJSON, storageLocationToJSON, SystemTime, } from "./message_formats.js";
10
- import { Instruction, Mission } from "./mission_planning.js";
10
+ import { InsertInstruction, Instruction, Mission, MissionRule } from "./mission_planning.js";
11
11
  import { SlamRecordingState, slamRequestErrorFromJSON, slamRequestErrorToJSON, SlamSensorSettings, } from "./slam.js";
12
12
  function createBaseSetOverlayParametersReq() {
13
13
  return { overlayParameters: undefined };
@@ -1083,10 +1083,19 @@ export const SetMissionReq = {
1083
1083
  },
1084
1084
  };
1085
1085
  function createBaseSetMissionRep() {
1086
- return {};
1086
+ return { accepted: false, reason: "", loadId: 0 };
1087
1087
  }
1088
1088
  export const SetMissionRep = {
1089
- encode(_, writer = new BinaryWriter()) {
1089
+ encode(message, writer = new BinaryWriter()) {
1090
+ if (message.accepted !== false) {
1091
+ writer.uint32(8).bool(message.accepted);
1092
+ }
1093
+ if (message.reason !== "") {
1094
+ writer.uint32(18).string(message.reason);
1095
+ }
1096
+ if (message.loadId !== 0) {
1097
+ writer.uint32(24).uint64(message.loadId);
1098
+ }
1090
1099
  return writer;
1091
1100
  },
1092
1101
  decode(input, length) {
@@ -1096,6 +1105,27 @@ export const SetMissionRep = {
1096
1105
  while (reader.pos < end) {
1097
1106
  const tag = reader.uint32();
1098
1107
  switch (tag >>> 3) {
1108
+ case 1: {
1109
+ if (tag !== 8) {
1110
+ break;
1111
+ }
1112
+ message.accepted = reader.bool();
1113
+ continue;
1114
+ }
1115
+ case 2: {
1116
+ if (tag !== 18) {
1117
+ break;
1118
+ }
1119
+ message.reason = reader.string();
1120
+ continue;
1121
+ }
1122
+ case 3: {
1123
+ if (tag !== 24) {
1124
+ break;
1125
+ }
1126
+ message.loadId = longToNumber(reader.uint64());
1127
+ continue;
1128
+ }
1099
1129
  }
1100
1130
  if ((tag & 7) === 4 || tag === 0) {
1101
1131
  break;
@@ -1104,18 +1134,34 @@ export const SetMissionRep = {
1104
1134
  }
1105
1135
  return message;
1106
1136
  },
1107
- fromJSON(_) {
1108
- return {};
1137
+ fromJSON(object) {
1138
+ return {
1139
+ accepted: isSet(object.accepted) ? gt.Boolean(object.accepted) : false,
1140
+ reason: isSet(object.reason) ? gt.String(object.reason) : "",
1141
+ loadId: isSet(object.loadId) ? gt.Number(object.loadId) : 0,
1142
+ };
1109
1143
  },
1110
- toJSON(_) {
1144
+ toJSON(message) {
1111
1145
  const obj = {};
1146
+ if (message.accepted !== false) {
1147
+ obj.accepted = message.accepted;
1148
+ }
1149
+ if (message.reason !== "") {
1150
+ obj.reason = message.reason;
1151
+ }
1152
+ if (message.loadId !== 0) {
1153
+ obj.loadId = Math.round(message.loadId);
1154
+ }
1112
1155
  return obj;
1113
1156
  },
1114
1157
  create(base) {
1115
1158
  return SetMissionRep.fromPartial(base ?? {});
1116
1159
  },
1117
- fromPartial(_) {
1160
+ fromPartial(object) {
1118
1161
  const message = createBaseSetMissionRep();
1162
+ message.accepted = object.accepted ?? false;
1163
+ message.reason = object.reason ?? "";
1164
+ message.loadId = object.loadId ?? 0;
1119
1165
  return message;
1120
1166
  },
1121
1167
  };
@@ -1210,12 +1256,24 @@ export const GetMissionRep = {
1210
1256
  },
1211
1257
  };
1212
1258
  function createBaseSetInstructionUpdateReq() {
1213
- return { instruction: undefined };
1259
+ return { replace: undefined, insert: undefined, removeId: undefined, loadId: 0, revision: 0 };
1214
1260
  }
1215
1261
  export const SetInstructionUpdateReq = {
1216
1262
  encode(message, writer = new BinaryWriter()) {
1217
- if (message.instruction !== undefined) {
1218
- Instruction.encode(message.instruction, writer.uint32(10).fork()).join();
1263
+ if (message.replace !== undefined) {
1264
+ Instruction.encode(message.replace, writer.uint32(10).fork()).join();
1265
+ }
1266
+ if (message.insert !== undefined) {
1267
+ InsertInstruction.encode(message.insert, writer.uint32(18).fork()).join();
1268
+ }
1269
+ if (message.removeId !== undefined) {
1270
+ writer.uint32(24).uint32(message.removeId);
1271
+ }
1272
+ if (message.loadId !== 0) {
1273
+ writer.uint32(32).uint64(message.loadId);
1274
+ }
1275
+ if (message.revision !== 0) {
1276
+ writer.uint32(40).uint32(message.revision);
1219
1277
  }
1220
1278
  return writer;
1221
1279
  },
@@ -1230,7 +1288,35 @@ export const SetInstructionUpdateReq = {
1230
1288
  if (tag !== 10) {
1231
1289
  break;
1232
1290
  }
1233
- message.instruction = Instruction.decode(reader, reader.uint32());
1291
+ message.replace = Instruction.decode(reader, reader.uint32());
1292
+ continue;
1293
+ }
1294
+ case 2: {
1295
+ if (tag !== 18) {
1296
+ break;
1297
+ }
1298
+ message.insert = InsertInstruction.decode(reader, reader.uint32());
1299
+ continue;
1300
+ }
1301
+ case 3: {
1302
+ if (tag !== 24) {
1303
+ break;
1304
+ }
1305
+ message.removeId = reader.uint32();
1306
+ continue;
1307
+ }
1308
+ case 4: {
1309
+ if (tag !== 32) {
1310
+ break;
1311
+ }
1312
+ message.loadId = longToNumber(reader.uint64());
1313
+ continue;
1314
+ }
1315
+ case 5: {
1316
+ if (tag !== 40) {
1317
+ break;
1318
+ }
1319
+ message.revision = reader.uint32();
1234
1320
  continue;
1235
1321
  }
1236
1322
  }
@@ -1242,12 +1328,30 @@ export const SetInstructionUpdateReq = {
1242
1328
  return message;
1243
1329
  },
1244
1330
  fromJSON(object) {
1245
- return { instruction: isSet(object.instruction) ? Instruction.fromJSON(object.instruction) : undefined };
1331
+ return {
1332
+ replace: isSet(object.replace) ? Instruction.fromJSON(object.replace) : undefined,
1333
+ insert: isSet(object.insert) ? InsertInstruction.fromJSON(object.insert) : undefined,
1334
+ removeId: isSet(object.removeId) ? gt.Number(object.removeId) : undefined,
1335
+ loadId: isSet(object.loadId) ? gt.Number(object.loadId) : 0,
1336
+ revision: isSet(object.revision) ? gt.Number(object.revision) : 0,
1337
+ };
1246
1338
  },
1247
1339
  toJSON(message) {
1248
1340
  const obj = {};
1249
- if (message.instruction !== undefined) {
1250
- obj.instruction = Instruction.toJSON(message.instruction);
1341
+ if (message.replace !== undefined) {
1342
+ obj.replace = Instruction.toJSON(message.replace);
1343
+ }
1344
+ if (message.insert !== undefined) {
1345
+ obj.insert = InsertInstruction.toJSON(message.insert);
1346
+ }
1347
+ if (message.removeId !== undefined) {
1348
+ obj.removeId = Math.round(message.removeId);
1349
+ }
1350
+ if (message.loadId !== 0) {
1351
+ obj.loadId = Math.round(message.loadId);
1352
+ }
1353
+ if (message.revision !== 0) {
1354
+ obj.revision = Math.round(message.revision);
1251
1355
  }
1252
1356
  return obj;
1253
1357
  },
@@ -1256,23 +1360,231 @@ export const SetInstructionUpdateReq = {
1256
1360
  },
1257
1361
  fromPartial(object) {
1258
1362
  const message = createBaseSetInstructionUpdateReq();
1259
- message.instruction = (object.instruction !== undefined && object.instruction !== null)
1260
- ? Instruction.fromPartial(object.instruction)
1363
+ message.replace = (object.replace !== undefined && object.replace !== null)
1364
+ ? Instruction.fromPartial(object.replace)
1365
+ : undefined;
1366
+ message.insert = (object.insert !== undefined && object.insert !== null)
1367
+ ? InsertInstruction.fromPartial(object.insert)
1261
1368
  : undefined;
1369
+ message.removeId = object.removeId ?? undefined;
1370
+ message.loadId = object.loadId ?? 0;
1371
+ message.revision = object.revision ?? 0;
1262
1372
  return message;
1263
1373
  },
1264
1374
  };
1265
1375
  function createBaseSetInstructionUpdateRep() {
1266
- return {};
1376
+ return { accepted: false, reason: "", revision: 0 };
1267
1377
  }
1268
1378
  export const SetInstructionUpdateRep = {
1269
- encode(_, writer = new BinaryWriter()) {
1379
+ encode(message, writer = new BinaryWriter()) {
1380
+ if (message.accepted !== false) {
1381
+ writer.uint32(8).bool(message.accepted);
1382
+ }
1383
+ if (message.reason !== "") {
1384
+ writer.uint32(18).string(message.reason);
1385
+ }
1386
+ if (message.revision !== 0) {
1387
+ writer.uint32(24).uint32(message.revision);
1388
+ }
1270
1389
  return writer;
1271
1390
  },
1272
1391
  decode(input, length) {
1273
1392
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1274
1393
  const end = length === undefined ? reader.len : reader.pos + length;
1275
1394
  const message = createBaseSetInstructionUpdateRep();
1395
+ while (reader.pos < end) {
1396
+ const tag = reader.uint32();
1397
+ switch (tag >>> 3) {
1398
+ case 1: {
1399
+ if (tag !== 8) {
1400
+ break;
1401
+ }
1402
+ message.accepted = reader.bool();
1403
+ continue;
1404
+ }
1405
+ case 2: {
1406
+ if (tag !== 18) {
1407
+ break;
1408
+ }
1409
+ message.reason = reader.string();
1410
+ continue;
1411
+ }
1412
+ case 3: {
1413
+ if (tag !== 24) {
1414
+ break;
1415
+ }
1416
+ message.revision = reader.uint32();
1417
+ continue;
1418
+ }
1419
+ }
1420
+ if ((tag & 7) === 4 || tag === 0) {
1421
+ break;
1422
+ }
1423
+ reader.skip(tag & 7);
1424
+ }
1425
+ return message;
1426
+ },
1427
+ fromJSON(object) {
1428
+ return {
1429
+ accepted: isSet(object.accepted) ? gt.Boolean(object.accepted) : false,
1430
+ reason: isSet(object.reason) ? gt.String(object.reason) : "",
1431
+ revision: isSet(object.revision) ? gt.Number(object.revision) : 0,
1432
+ };
1433
+ },
1434
+ toJSON(message) {
1435
+ const obj = {};
1436
+ if (message.accepted !== false) {
1437
+ obj.accepted = message.accepted;
1438
+ }
1439
+ if (message.reason !== "") {
1440
+ obj.reason = message.reason;
1441
+ }
1442
+ if (message.revision !== 0) {
1443
+ obj.revision = Math.round(message.revision);
1444
+ }
1445
+ return obj;
1446
+ },
1447
+ create(base) {
1448
+ return SetInstructionUpdateRep.fromPartial(base ?? {});
1449
+ },
1450
+ fromPartial(object) {
1451
+ const message = createBaseSetInstructionUpdateRep();
1452
+ message.accepted = object.accepted ?? false;
1453
+ message.reason = object.reason ?? "";
1454
+ message.revision = object.revision ?? 0;
1455
+ return message;
1456
+ },
1457
+ };
1458
+ function createBaseSetMissionRulesReq() {
1459
+ return { rules: [] };
1460
+ }
1461
+ export const SetMissionRulesReq = {
1462
+ encode(message, writer = new BinaryWriter()) {
1463
+ for (const v of message.rules) {
1464
+ MissionRule.encode(v, writer.uint32(10).fork()).join();
1465
+ }
1466
+ return writer;
1467
+ },
1468
+ decode(input, length) {
1469
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1470
+ const end = length === undefined ? reader.len : reader.pos + length;
1471
+ const message = createBaseSetMissionRulesReq();
1472
+ while (reader.pos < end) {
1473
+ const tag = reader.uint32();
1474
+ switch (tag >>> 3) {
1475
+ case 1: {
1476
+ if (tag !== 10) {
1477
+ break;
1478
+ }
1479
+ message.rules.push(MissionRule.decode(reader, reader.uint32()));
1480
+ continue;
1481
+ }
1482
+ }
1483
+ if ((tag & 7) === 4 || tag === 0) {
1484
+ break;
1485
+ }
1486
+ reader.skip(tag & 7);
1487
+ }
1488
+ return message;
1489
+ },
1490
+ fromJSON(object) {
1491
+ return { rules: gt.Array.isArray(object?.rules) ? object.rules.map((e) => MissionRule.fromJSON(e)) : [] };
1492
+ },
1493
+ toJSON(message) {
1494
+ const obj = {};
1495
+ if (message.rules?.length) {
1496
+ obj.rules = message.rules.map((e) => MissionRule.toJSON(e));
1497
+ }
1498
+ return obj;
1499
+ },
1500
+ create(base) {
1501
+ return SetMissionRulesReq.fromPartial(base ?? {});
1502
+ },
1503
+ fromPartial(object) {
1504
+ const message = createBaseSetMissionRulesReq();
1505
+ message.rules = object.rules?.map((e) => MissionRule.fromPartial(e)) || [];
1506
+ return message;
1507
+ },
1508
+ };
1509
+ function createBaseSetMissionRulesRep() {
1510
+ return { accepted: false, reason: "" };
1511
+ }
1512
+ export const SetMissionRulesRep = {
1513
+ encode(message, writer = new BinaryWriter()) {
1514
+ if (message.accepted !== false) {
1515
+ writer.uint32(8).bool(message.accepted);
1516
+ }
1517
+ if (message.reason !== "") {
1518
+ writer.uint32(18).string(message.reason);
1519
+ }
1520
+ return writer;
1521
+ },
1522
+ decode(input, length) {
1523
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1524
+ const end = length === undefined ? reader.len : reader.pos + length;
1525
+ const message = createBaseSetMissionRulesRep();
1526
+ while (reader.pos < end) {
1527
+ const tag = reader.uint32();
1528
+ switch (tag >>> 3) {
1529
+ case 1: {
1530
+ if (tag !== 8) {
1531
+ break;
1532
+ }
1533
+ message.accepted = reader.bool();
1534
+ continue;
1535
+ }
1536
+ case 2: {
1537
+ if (tag !== 18) {
1538
+ break;
1539
+ }
1540
+ message.reason = reader.string();
1541
+ continue;
1542
+ }
1543
+ }
1544
+ if ((tag & 7) === 4 || tag === 0) {
1545
+ break;
1546
+ }
1547
+ reader.skip(tag & 7);
1548
+ }
1549
+ return message;
1550
+ },
1551
+ fromJSON(object) {
1552
+ return {
1553
+ accepted: isSet(object.accepted) ? gt.Boolean(object.accepted) : false,
1554
+ reason: isSet(object.reason) ? gt.String(object.reason) : "",
1555
+ };
1556
+ },
1557
+ toJSON(message) {
1558
+ const obj = {};
1559
+ if (message.accepted !== false) {
1560
+ obj.accepted = message.accepted;
1561
+ }
1562
+ if (message.reason !== "") {
1563
+ obj.reason = message.reason;
1564
+ }
1565
+ return obj;
1566
+ },
1567
+ create(base) {
1568
+ return SetMissionRulesRep.fromPartial(base ?? {});
1569
+ },
1570
+ fromPartial(object) {
1571
+ const message = createBaseSetMissionRulesRep();
1572
+ message.accepted = object.accepted ?? false;
1573
+ message.reason = object.reason ?? "";
1574
+ return message;
1575
+ },
1576
+ };
1577
+ function createBaseGetMissionRulesReq() {
1578
+ return {};
1579
+ }
1580
+ export const GetMissionRulesReq = {
1581
+ encode(_, writer = new BinaryWriter()) {
1582
+ return writer;
1583
+ },
1584
+ decode(input, length) {
1585
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1586
+ const end = length === undefined ? reader.len : reader.pos + length;
1587
+ const message = createBaseGetMissionRulesReq();
1276
1588
  while (reader.pos < end) {
1277
1589
  const tag = reader.uint32();
1278
1590
  switch (tag >>> 3) {
@@ -1292,10 +1604,61 @@ export const SetInstructionUpdateRep = {
1292
1604
  return obj;
1293
1605
  },
1294
1606
  create(base) {
1295
- return SetInstructionUpdateRep.fromPartial(base ?? {});
1607
+ return GetMissionRulesReq.fromPartial(base ?? {});
1296
1608
  },
1297
1609
  fromPartial(_) {
1298
- const message = createBaseSetInstructionUpdateRep();
1610
+ const message = createBaseGetMissionRulesReq();
1611
+ return message;
1612
+ },
1613
+ };
1614
+ function createBaseGetMissionRulesRep() {
1615
+ return { rules: [] };
1616
+ }
1617
+ export const GetMissionRulesRep = {
1618
+ encode(message, writer = new BinaryWriter()) {
1619
+ for (const v of message.rules) {
1620
+ MissionRule.encode(v, writer.uint32(10).fork()).join();
1621
+ }
1622
+ return writer;
1623
+ },
1624
+ decode(input, length) {
1625
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1626
+ const end = length === undefined ? reader.len : reader.pos + length;
1627
+ const message = createBaseGetMissionRulesRep();
1628
+ while (reader.pos < end) {
1629
+ const tag = reader.uint32();
1630
+ switch (tag >>> 3) {
1631
+ case 1: {
1632
+ if (tag !== 10) {
1633
+ break;
1634
+ }
1635
+ message.rules.push(MissionRule.decode(reader, reader.uint32()));
1636
+ continue;
1637
+ }
1638
+ }
1639
+ if ((tag & 7) === 4 || tag === 0) {
1640
+ break;
1641
+ }
1642
+ reader.skip(tag & 7);
1643
+ }
1644
+ return message;
1645
+ },
1646
+ fromJSON(object) {
1647
+ return { rules: gt.Array.isArray(object?.rules) ? object.rules.map((e) => MissionRule.fromJSON(e)) : [] };
1648
+ },
1649
+ toJSON(message) {
1650
+ const obj = {};
1651
+ if (message.rules?.length) {
1652
+ obj.rules = message.rules.map((e) => MissionRule.toJSON(e));
1653
+ }
1654
+ return obj;
1655
+ },
1656
+ create(base) {
1657
+ return GetMissionRulesRep.fromPartial(base ?? {});
1658
+ },
1659
+ fromPartial(object) {
1660
+ const message = createBaseGetMissionRulesRep();
1661
+ message.rules = object.rules?.map((e) => MissionRule.fromPartial(e)) || [];
1299
1662
  return message;
1300
1663
  },
1301
1664
  };
@@ -1,7 +1,7 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import { AquaTrollProbeMetadata, AquaTrollSensorMetadataArray, AquaTrollSensorParametersArray } from "./aquatroll.js";
3
3
  import { Altitude, Annotation, Attitude, Battery, BatteryBQ40Z50, CalibrationState, CameraPanTiltZoom, CanisterHumidity, CanisterTemperature, ConnectedClient, ControlForce, ControllerHealth, ControlMode, CpProbe, CPUInfo, CPUTemperature, Depth, DiveTime, DroneInfo, DvlVelocity, ErrorFlags, FilterMessage, ForwardDistance, GenericServo, GnssStatus, Gripper, GripperDiagnostics, GripperInfo, GuestPortCurrent, Imu, IperfStatus, KernelLogEntry, Laser, LaserDetection, LatLongPosition, Lights, LogEntry, MagneticDeclination, MarineSnowFilterFrames, MedusaSpectrometerData, ModelDetections, MultibeamConfig, MultibeamDiscovery, MultibeamPing, MultibeamServo, Notification, NStreamers, PositionEstimate, PowerCanister, RecordState, Reference, RemovableStorageDevice, SotState, StorageSpace, SurfaceUnitBatteryInfo, SurfaceUnitVersionInfo, SystemPerformanceInfo, SystemTime, ThicknessGauge, TiltAngle, TiltStabilizationState, TimeLapseState, WaterTemperature } from "./message_formats.js";
4
- import { MissionStatus, ReferenceAutoPilot } from "./mission_planning.js";
4
+ import { InstructionResult, MissionRuleStatus, MissionStatus, ReferenceAutoPilot } from "./mission_planning.js";
5
5
  import { SlamAiding, SlamMap, SlamMapFrame, SlamMapUpdate, SlamPoseEstimate, SlamRecordingState, SlamScan, SlamSensorStatus } from "./slam.js";
6
6
  /**
7
7
  * Telemetry
@@ -63,6 +63,21 @@ export interface NotificationTel {
63
63
  /** Notification from the control system. */
64
64
  notification: Notification | undefined;
65
65
  }
66
+ /**
67
+ * Result of an instruction started with RunInstructionCtrl.
68
+ *
69
+ * Published when the instruction is accepted or rejected, and again when it completes, fails or
70
+ * is cancelled.
71
+ */
72
+ export interface InstructionResultTel {
73
+ /** Result of the instruction. */
74
+ result: InstructionResult | undefined;
75
+ }
76
+ /** State of the mission rules. */
77
+ export interface MissionRulesTel {
78
+ /** One entry per rule. */
79
+ rules: MissionRuleStatus[];
80
+ }
66
81
  /** Control force in all directions. */
67
82
  export interface ControlForceTel {
68
83
  /** Control force in all directions. */
@@ -529,6 +544,8 @@ export declare const ReferenceTel: MessageFns<ReferenceTel>;
529
544
  export declare const ReferenceAutoPilotTel: MessageFns<ReferenceAutoPilotTel>;
530
545
  export declare const MissionStatusTel: MessageFns<MissionStatusTel>;
531
546
  export declare const NotificationTel: MessageFns<NotificationTel>;
547
+ export declare const InstructionResultTel: MessageFns<InstructionResultTel>;
548
+ export declare const MissionRulesTel: MessageFns<MissionRulesTel>;
532
549
  export declare const ControlForceTel: MessageFns<ControlForceTel>;
533
550
  export declare const ControllerHealthTel: MessageFns<ControllerHealthTel>;
534
551
  export declare const LightsTel: MessageFns<LightsTel>;