linuxcnc-grpc 1.0.0 → 1.1.0-rc.1
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/README.md +3 -1
- package/dist/__tests__/client.test.js +52 -10
- package/dist/__tests__/int64.test.d.ts +11 -0
- package/dist/__tests__/int64.test.js +135 -0
- package/dist/hal.d.ts +43 -19
- package/dist/hal.js +20 -7
- package/dist/linuxcnc.d.ts +490 -25
- package/dist/linuxcnc.js +1707 -92
- package/package.json +2 -2
- package/src/__tests__/client.test.ts +78 -10
- package/src/__tests__/int64.test.ts +183 -0
- package/src/hal.ts +64 -24
- package/src/linuxcnc.ts +2327 -118
package/src/linuxcnc.ts
CHANGED
|
@@ -707,7 +707,12 @@ export function jogTypeToJSON(object: JogType): string {
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
-
/**
|
|
710
|
+
/**
|
|
711
|
+
* Auto command type.
|
|
712
|
+
* Deprecated together with AutoCommand: SendCommand has never accepted it.
|
|
713
|
+
*
|
|
714
|
+
* @deprecated
|
|
715
|
+
*/
|
|
711
716
|
export enum AutoCommandType {
|
|
712
717
|
AUTO_RUN = 0,
|
|
713
718
|
AUTO_PAUSE = 1,
|
|
@@ -918,7 +923,7 @@ export interface AxisStatus {
|
|
|
918
923
|
export interface SpindleStatus {
|
|
919
924
|
spindleNumber: number;
|
|
920
925
|
brake: boolean;
|
|
921
|
-
/** 0=stopped, 1=forward
|
|
926
|
+
/** LinuxCNC's value: -1=reverse, 0=stopped, 1=forward */
|
|
922
927
|
direction: number;
|
|
923
928
|
enabled: boolean;
|
|
924
929
|
overrideEnabled: boolean;
|
|
@@ -949,16 +954,29 @@ export interface ToolEntry {
|
|
|
949
954
|
backAngle: number;
|
|
950
955
|
orientation: number;
|
|
951
956
|
comment: string;
|
|
957
|
+
/**
|
|
958
|
+
* Index of this entry in the tool table as LinuxCNC's status lists it.
|
|
959
|
+
* tool_table leaves out entries without a tool, so an entry's position in
|
|
960
|
+
* that list is not this index. Unset when the server is older than 1.1.
|
|
961
|
+
* An entry's id can be -1 for an empty slot (index 0 is the spindle, and
|
|
962
|
+
* holds -1 when no tool is loaded): ignore entries whose id is not positive.
|
|
963
|
+
*/
|
|
964
|
+
tableIndex?: number | undefined;
|
|
952
965
|
}
|
|
953
966
|
|
|
954
967
|
/** Tool status */
|
|
955
968
|
export interface ToolStatus {
|
|
956
|
-
/**
|
|
969
|
+
/**
|
|
970
|
+
* Index, in LinuxCNC's own tool table, of the entry prepared for the next
|
|
971
|
+
* tool change (-1 if none). It is not an index into tool_table below: find
|
|
972
|
+
* the entry whose table_index equals it.
|
|
973
|
+
*/
|
|
957
974
|
pocketPrepped: number;
|
|
958
975
|
/** Tool number in spindle (0 if none) */
|
|
959
976
|
toolInSpindle: number;
|
|
960
977
|
/** Pocket of current tool (0 if none) */
|
|
961
978
|
toolFromPocket: number;
|
|
979
|
+
/** Entries that hold a tool (tool number not 0); see ToolEntry.table_index */
|
|
962
980
|
toolTable: ToolEntry[];
|
|
963
981
|
}
|
|
964
982
|
|
|
@@ -992,11 +1010,14 @@ export interface GCodeStatus {
|
|
|
992
1010
|
|
|
993
1011
|
/** Limit status for a joint (bitmask: 1=min_hard, 2=max_hard, 4=min_soft, 8=max_soft) */
|
|
994
1012
|
export interface LimitStatus {
|
|
995
|
-
/** One per joint */
|
|
1013
|
+
/** One per joint the machine has, in joint order */
|
|
996
1014
|
limitFlags: number[];
|
|
997
|
-
/** Homed status per joint */
|
|
1015
|
+
/** Homed status, one per joint the machine has */
|
|
998
1016
|
homed: boolean[];
|
|
999
|
-
/**
|
|
1017
|
+
/**
|
|
1018
|
+
* LinuxCNC's misc error inputs. The length is that of LinuxCNC's own array,
|
|
1019
|
+
* not one entry per joint. Empty if LinuxCNC's status does not report it.
|
|
1020
|
+
*/
|
|
1000
1021
|
miscError: number[];
|
|
1001
1022
|
}
|
|
1002
1023
|
|
|
@@ -1004,8 +1025,15 @@ export interface LimitStatus {
|
|
|
1004
1025
|
export interface ErrorMessage {
|
|
1005
1026
|
type: ErrorMessage_ErrorType;
|
|
1006
1027
|
message: string;
|
|
1007
|
-
/**
|
|
1028
|
+
/** When the server read the message, unix timestamp in nanoseconds */
|
|
1008
1029
|
timestamp: number;
|
|
1030
|
+
/**
|
|
1031
|
+
* Position in the order the server read messages: starts at 1 and grows by
|
|
1032
|
+
* one per message while the server runs. The same message has the same
|
|
1033
|
+
* sequence in StreamErrors and in LinuxCNCStatus.errors, so clients can
|
|
1034
|
+
* drop duplicates and notice gaps. It restarts when the server restarts.
|
|
1035
|
+
*/
|
|
1036
|
+
sequence: number;
|
|
1009
1037
|
}
|
|
1010
1038
|
|
|
1011
1039
|
export enum ErrorMessage_ErrorType {
|
|
@@ -1084,11 +1112,11 @@ export interface LinuxCNCStatus {
|
|
|
1084
1112
|
position:
|
|
1085
1113
|
| PositionStatus
|
|
1086
1114
|
| undefined;
|
|
1087
|
-
/**
|
|
1115
|
+
/** One per joint the machine has (trajectory.joints of them); 1.0 servers sent 16 */
|
|
1088
1116
|
joints: JointStatus[];
|
|
1089
1117
|
/** Up to 9 axes (XYZABCUVW) */
|
|
1090
1118
|
axes: AxisStatus[];
|
|
1091
|
-
/**
|
|
1119
|
+
/** One per spindle the machine has (trajectory.spindles of them); 1.0 servers sent 8 */
|
|
1092
1120
|
spindles: SpindleStatus[];
|
|
1093
1121
|
tool: ToolStatus | undefined;
|
|
1094
1122
|
io: IOStatus | undefined;
|
|
@@ -1096,7 +1124,13 @@ export interface LinuxCNCStatus {
|
|
|
1096
1124
|
limits:
|
|
1097
1125
|
| LimitStatus
|
|
1098
1126
|
| undefined;
|
|
1099
|
-
/**
|
|
1127
|
+
/**
|
|
1128
|
+
* The most recent messages the server has read from LinuxCNC's error
|
|
1129
|
+
* channel (at most 20, oldest first). They stay here until newer ones push
|
|
1130
|
+
* them out, so use ErrorMessage.sequence to tell new from already seen.
|
|
1131
|
+
* Empty unless the server reads the error channel: see the server's
|
|
1132
|
+
* --error-channel option.
|
|
1133
|
+
*/
|
|
1100
1134
|
errors: ErrorMessage[];
|
|
1101
1135
|
}
|
|
1102
1136
|
|
|
@@ -1142,7 +1176,11 @@ export interface UnhomeCommand {
|
|
|
1142
1176
|
/** Spindle command */
|
|
1143
1177
|
export interface SpindleControlCommand {
|
|
1144
1178
|
command: SpindleCommand;
|
|
1145
|
-
/**
|
|
1179
|
+
/**
|
|
1180
|
+
* For FORWARD/REVERSE only, where it must be zero or more and finite. The
|
|
1181
|
+
* direction comes from the command, not from the sign. The other commands
|
|
1182
|
+
* ignore it.
|
|
1183
|
+
*/
|
|
1146
1184
|
speed: number;
|
|
1147
1185
|
/** Spindle number (default 0) */
|
|
1148
1186
|
spindle: number;
|
|
@@ -1152,7 +1190,7 @@ export interface SpindleControlCommand {
|
|
|
1152
1190
|
|
|
1153
1191
|
/** Spindle override command */
|
|
1154
1192
|
export interface SpindleOverrideCommand {
|
|
1155
|
-
/** Override scale */
|
|
1193
|
+
/** Override scale; must be finite and not negative */
|
|
1156
1194
|
scale: number;
|
|
1157
1195
|
/** Spindle number */
|
|
1158
1196
|
spindle: number;
|
|
@@ -1166,18 +1204,19 @@ export interface BrakeCommand {
|
|
|
1166
1204
|
|
|
1167
1205
|
/** Feed rate override command */
|
|
1168
1206
|
export interface FeedrateCommand {
|
|
1169
|
-
/** Feed rate scale (0.0-2.0+) */
|
|
1207
|
+
/** Feed rate scale (0.0-2.0+); must be finite and not negative */
|
|
1170
1208
|
scale: number;
|
|
1171
1209
|
}
|
|
1172
1210
|
|
|
1173
1211
|
/** Rapid rate override command */
|
|
1174
1212
|
export interface RapidrateCommand {
|
|
1175
|
-
/** Rapid rate scale (0.0-1.0) */
|
|
1213
|
+
/** Rapid rate scale (0.0-1.0); must be finite and not negative */
|
|
1176
1214
|
scale: number;
|
|
1177
1215
|
}
|
|
1178
1216
|
|
|
1179
1217
|
/** Maximum velocity command */
|
|
1180
1218
|
export interface MaxVelCommand {
|
|
1219
|
+
/** Must be finite and not negative */
|
|
1181
1220
|
velocity: number;
|
|
1182
1221
|
}
|
|
1183
1222
|
|
|
@@ -1224,7 +1263,15 @@ export interface ProgramCommand {
|
|
|
1224
1263
|
abort?: boolean | undefined;
|
|
1225
1264
|
}
|
|
1226
1265
|
|
|
1227
|
-
/**
|
|
1266
|
+
/**
|
|
1267
|
+
* Auto mode command.
|
|
1268
|
+
* Deprecated: LinuxCNCCommand has no field for this message, so SendCommand
|
|
1269
|
+
* has never been able to carry it. Use ProgramCommand to run, pause, resume,
|
|
1270
|
+
* step or abort a program. The message stays in the 1.x protos only so that
|
|
1271
|
+
* code referring to it keeps compiling; it will be removed in 2.0.
|
|
1272
|
+
*
|
|
1273
|
+
* @deprecated
|
|
1274
|
+
*/
|
|
1228
1275
|
export interface AutoCommand {
|
|
1229
1276
|
command: AutoCommandType;
|
|
1230
1277
|
/** For AUTO_RUN, starting line */
|
|
@@ -1243,7 +1290,10 @@ export interface AnalogOutputCommand {
|
|
|
1243
1290
|
value: number;
|
|
1244
1291
|
}
|
|
1245
1292
|
|
|
1246
|
-
/**
|
|
1293
|
+
/**
|
|
1294
|
+
* Set joint limits. min_limit must be below max_limit and both must be finite;
|
|
1295
|
+
* otherwise neither is sent.
|
|
1296
|
+
*/
|
|
1247
1297
|
export interface SetLimitCommand {
|
|
1248
1298
|
joint: number;
|
|
1249
1299
|
minLimit: number;
|
|
@@ -1378,12 +1428,67 @@ export interface LinuxCNCCommand {
|
|
|
1378
1428
|
}
|
|
1379
1429
|
|
|
1380
1430
|
export interface CommandResponse {
|
|
1381
|
-
/**
|
|
1431
|
+
/**
|
|
1432
|
+
* The request's serial, or one from the server's own counter if the request
|
|
1433
|
+
* left it at 0. A label only: it is NOT LinuxCNC's serial.
|
|
1434
|
+
*/
|
|
1382
1435
|
serial: number;
|
|
1383
|
-
/**
|
|
1436
|
+
/**
|
|
1437
|
+
* From SendCommand: RCS_DONE means the command was dispatched to LinuxCNC,
|
|
1438
|
+
* not that it finished (a stop is answered the same way, once its send
|
|
1439
|
+
* has returned). From WaitComplete: the outcome of the wait.
|
|
1440
|
+
*/
|
|
1384
1441
|
status: RcsStatus;
|
|
1385
1442
|
/** Error message if status is RCS_ERROR */
|
|
1386
1443
|
errorMessage: string;
|
|
1444
|
+
/**
|
|
1445
|
+
* LinuxCNC's own serial number for the command the server handed to
|
|
1446
|
+
* LinuxCNC, set by SendCommand when the command was dispatched. It
|
|
1447
|
+
* identifies the command; it does not prove the task received it.
|
|
1448
|
+
* LinuxCNC's send normally returns once the task has echoed the serial
|
|
1449
|
+
* (TaskStatus.echo_serial_number), but it gives up after about 5 seconds
|
|
1450
|
+
* without an error if the task does not answer; acknowledged says which
|
|
1451
|
+
* of the two happened. Use WaitComplete, or the status, to confirm
|
|
1452
|
+
* completion: compare this value with echo_serial_number, or pass it to
|
|
1453
|
+
* WaitComplete. For a command sent as several LinuxCNC messages (coolant,
|
|
1454
|
+
* set_limit, override_config, program_options, and program open, a close
|
|
1455
|
+
* followed by the open) it is the serial of the last one LinuxCNC took. Unset
|
|
1456
|
+
* when the command was not dispatched, which includes a command LinuxCNC
|
|
1457
|
+
* did not take.
|
|
1458
|
+
*/
|
|
1459
|
+
linuxcncSerial?:
|
|
1460
|
+
| number
|
|
1461
|
+
| undefined;
|
|
1462
|
+
/**
|
|
1463
|
+
* From SendCommand: what a good status read made after the server's send
|
|
1464
|
+
* returned showed. True: the task had echoed linuxcnc_serial. False: the
|
|
1465
|
+
* command was written to LinuxCNC's command queue, but the task had not
|
|
1466
|
+
* echoed it (LinuxCNC's own wait of about 5 seconds ran out), so the task
|
|
1467
|
+
* is not answering. The command is not withdrawn: it stays in the queue
|
|
1468
|
+
* and runs when the task answers again, unless that LinuxCNC has shut
|
|
1469
|
+
* down or been restarted meanwhile. Unset when the server cannot tell:
|
|
1470
|
+
* nothing was dispatched, no good status read was made after the send
|
|
1471
|
+
* (the status could not be read), the server's status turned out to belong to another LinuxCNC than the one
|
|
1472
|
+
* that took the command (the server then stops), or the server is older
|
|
1473
|
+
* than this field. It does not change status: RCS_DONE still means
|
|
1474
|
+
* "dispatched". For a command sent as several LinuxCNC messages it
|
|
1475
|
+
* describes the last one LinuxCNC took.
|
|
1476
|
+
*/
|
|
1477
|
+
acknowledged?:
|
|
1478
|
+
| boolean
|
|
1479
|
+
| undefined;
|
|
1480
|
+
/**
|
|
1481
|
+
* From SendCommand, with RCS_ERROR: true when the server is certain that
|
|
1482
|
+
* nothing was written to LinuxCNC for this request, so sending it again
|
|
1483
|
+
* cannot run it twice. False does not mean that something was written,
|
|
1484
|
+
* only that the server cannot rule it out (a failure during a send, a
|
|
1485
|
+
* command of several messages that failed part-way or that a stop cut
|
|
1486
|
+
* short, a command helper process that died while it had the command). A
|
|
1487
|
+
* command refused because of a stop before any of its messages was
|
|
1488
|
+
* written is true. A server older than this
|
|
1489
|
+
* field never sets it.
|
|
1490
|
+
*/
|
|
1491
|
+
notSent: boolean;
|
|
1387
1492
|
}
|
|
1388
1493
|
|
|
1389
1494
|
/** Empty - returns full status */
|
|
@@ -1391,19 +1496,43 @@ export interface GetStatusRequest {
|
|
|
1391
1496
|
}
|
|
1392
1497
|
|
|
1393
1498
|
export interface WaitCompleteRequest {
|
|
1394
|
-
/**
|
|
1499
|
+
/**
|
|
1500
|
+
* Ignored by the server and only echoed back in the response. Without
|
|
1501
|
+
* linuxcnc_serial, the wait is on the latest command sent through the server.
|
|
1502
|
+
*/
|
|
1395
1503
|
serial: number;
|
|
1396
|
-
/** Timeout in seconds */
|
|
1504
|
+
/** Timeout in seconds (default 5) */
|
|
1397
1505
|
timeout: number;
|
|
1506
|
+
/**
|
|
1507
|
+
* Wait on this serial: the linuxcnc_serial that SendCommand returned for a
|
|
1508
|
+
* command. The wait follows LinuxCNC's own serial rule. While the task's
|
|
1509
|
+
* echo serial equals this value, the answer is that command's outcome. Once
|
|
1510
|
+
* a later command has been echoed, sent through this server or by any other
|
|
1511
|
+
* client of the same LinuxCNC, the answer is RCS_DONE and does not say how
|
|
1512
|
+
* the earlier command ended. So the wait is exact only as long as nothing
|
|
1513
|
+
* else is sent to LinuxCNC meanwhile; read the status as well to know that
|
|
1514
|
+
* a motion has finished. A value this server did not issue on its current
|
|
1515
|
+
* connection to LinuxCNC gets RCS_ERROR. When unset, the wait is on the
|
|
1516
|
+
* latest command sent through the server, as it always was.
|
|
1517
|
+
*/
|
|
1518
|
+
linuxcncSerial?: number | undefined;
|
|
1398
1519
|
}
|
|
1399
1520
|
|
|
1400
1521
|
export interface StreamStatusRequest {
|
|
1401
|
-
/**
|
|
1522
|
+
/**
|
|
1523
|
+
* Update interval in milliseconds (default: 100). Values above 60000 are
|
|
1524
|
+
* treated as 60000.
|
|
1525
|
+
*/
|
|
1402
1526
|
intervalMs: number;
|
|
1403
1527
|
}
|
|
1404
1528
|
|
|
1405
|
-
/** Empty - streams all errors */
|
|
1406
1529
|
export interface StreamErrorsRequest {
|
|
1530
|
+
/**
|
|
1531
|
+
* If true, the stream starts with the messages the server already holds in
|
|
1532
|
+
* its buffer (the most recent 256), oldest first, and then continues with
|
|
1533
|
+
* new ones. If false, only messages read from now on are sent.
|
|
1534
|
+
*/
|
|
1535
|
+
replayBuffered: boolean;
|
|
1407
1536
|
}
|
|
1408
1537
|
|
|
1409
1538
|
/** Upload a G-code file */
|
|
@@ -1460,6 +1589,233 @@ export interface DeleteFileResponse {
|
|
|
1460
1589
|
path: string;
|
|
1461
1590
|
}
|
|
1462
1591
|
|
|
1592
|
+
/**
|
|
1593
|
+
* Read a file from the nc_files directory, whole or in chunks.
|
|
1594
|
+
* One response carries at most 1 MiB of content, so every response fits in a
|
|
1595
|
+
* client's default 4 MB receive limit. To read a larger file, call again with
|
|
1596
|
+
* offset advanced by len(content) until end_of_file is true.
|
|
1597
|
+
*/
|
|
1598
|
+
export interface ReadFileRequest {
|
|
1599
|
+
/** Relative path within nc_files dir */
|
|
1600
|
+
filename: string;
|
|
1601
|
+
/** Byte offset to start reading from (default 0) */
|
|
1602
|
+
offset: number;
|
|
1603
|
+
/** Most bytes to return (0 or more than 1 MiB means 1 MiB) */
|
|
1604
|
+
maxBytes: number;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
export interface ReadFileResponse {
|
|
1608
|
+
/** Absolute, canonical path of the file read */
|
|
1609
|
+
path: string;
|
|
1610
|
+
/** File bytes from offset (a chunk may end inside a UTF-8 character) */
|
|
1611
|
+
content: Uint8Array;
|
|
1612
|
+
/** Offset this content starts at */
|
|
1613
|
+
offset: number;
|
|
1614
|
+
/** Size of the whole file when it was read */
|
|
1615
|
+
totalSizeBytes: number;
|
|
1616
|
+
/** True if this content reaches the end of the file */
|
|
1617
|
+
endOfFile: boolean;
|
|
1618
|
+
/** Last modified time (unix timestamp in nanoseconds). A change in it or in total_size_bytes between chunks means the file was modified */
|
|
1619
|
+
modifiedTimestamp: number;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
/** Resolve a name in the nc_files directory */
|
|
1623
|
+
export interface ResolveFileRequest {
|
|
1624
|
+
/** Relative path within nc_files dir */
|
|
1625
|
+
filename: string;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
export interface ResolveFileResponse {
|
|
1629
|
+
/** Absolute, canonical path (symlinks resolved): the file UploadFile, DeleteFile and ReadFile act on for this name */
|
|
1630
|
+
path: string;
|
|
1631
|
+
/** True if something exists at that path */
|
|
1632
|
+
exists: boolean;
|
|
1633
|
+
/** True if it is a directory */
|
|
1634
|
+
isDirectory: boolean;
|
|
1635
|
+
/** True if resolving the name goes through a symbolic link at any component */
|
|
1636
|
+
isSymlink: boolean;
|
|
1637
|
+
/** True if this is the file LinuxCNC has loaded (TaskStatus.file), by canonical path or by being the same file on disk */
|
|
1638
|
+
isLoadedProgram: boolean;
|
|
1639
|
+
/** Canonical path of the loaded program, empty if none */
|
|
1640
|
+
loadedProgram: string;
|
|
1641
|
+
/** Interpreter state when checked; anything but INTERP_IDLE means the loaded program is in use */
|
|
1642
|
+
interpState: InterpState;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
/** Empty - returns the full configuration */
|
|
1646
|
+
export interface GetMachineConfigRequest {
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* Configuration of one joint.
|
|
1651
|
+
* Limits come from live status; velocity, acceleration and home sequence come
|
|
1652
|
+
* from the [JOINT_n] section of the INI file.
|
|
1653
|
+
*/
|
|
1654
|
+
export interface JointConfig {
|
|
1655
|
+
jointNumber: number;
|
|
1656
|
+
/** Linear or angular */
|
|
1657
|
+
jointType: JointType;
|
|
1658
|
+
/**
|
|
1659
|
+
* Axis this joint drives ("X", "Y", ...). Empty if the mapping is not known
|
|
1660
|
+
* (joint_axis_mapping_known is false), and empty with the mapping known if
|
|
1661
|
+
* the joint drives no axis, which is the case for an extra joint.
|
|
1662
|
+
*/
|
|
1663
|
+
axisLetter: string;
|
|
1664
|
+
/** Soft limit, machine units */
|
|
1665
|
+
minLimit: number;
|
|
1666
|
+
/** Soft limit, machine units */
|
|
1667
|
+
maxLimit: number;
|
|
1668
|
+
/** [JOINT_n]MAX_VELOCITY, machine units per second; 0 if not set or the INI is unreadable */
|
|
1669
|
+
maxVelocity: number;
|
|
1670
|
+
/** [JOINT_n]MAX_ACCELERATION, machine units per second squared; 0 if not set */
|
|
1671
|
+
maxAcceleration: number;
|
|
1672
|
+
/** [JOINT_n]HOME_SEQUENCE; unset if the INI has none */
|
|
1673
|
+
homeSequence?:
|
|
1674
|
+
| number
|
|
1675
|
+
| undefined;
|
|
1676
|
+
/** Joint units per mm (linear) or per degree (angular) */
|
|
1677
|
+
units: number;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* Configuration of one axis in the machine's axis mask.
|
|
1682
|
+
* Limits come from live status; velocity and acceleration come from the
|
|
1683
|
+
* [AXIS_<letter>] section of the INI file.
|
|
1684
|
+
*/
|
|
1685
|
+
export interface AxisConfig {
|
|
1686
|
+
/** 0=X, 1=Y, 2=Z, 3=A, 4=B, 5=C, 6=U, 7=V, 8=W */
|
|
1687
|
+
axisNumber: number;
|
|
1688
|
+
/** "X", "Y", ... */
|
|
1689
|
+
letter: string;
|
|
1690
|
+
/** Soft limit, machine units */
|
|
1691
|
+
minLimit: number;
|
|
1692
|
+
/** Soft limit, machine units */
|
|
1693
|
+
maxLimit: number;
|
|
1694
|
+
/** [AXIS_<letter>]MAX_VELOCITY; 0 if not set or the INI is unreadable */
|
|
1695
|
+
maxVelocity: number;
|
|
1696
|
+
/** [AXIS_<letter>]MAX_ACCELERATION; 0 if not set */
|
|
1697
|
+
maxAcceleration: number;
|
|
1698
|
+
/** Joints that drive this axis (two for a gantry); empty if the mapping is not known or no joint drives it */
|
|
1699
|
+
joints: number[];
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
export interface MachineConfig {
|
|
1703
|
+
/** INI file LinuxCNC was started with */
|
|
1704
|
+
iniFilename: string;
|
|
1705
|
+
/** False if the server could not read that file; INI-based fields are then empty or 0 */
|
|
1706
|
+
iniReadable: boolean;
|
|
1707
|
+
/** [EMC]MACHINE */
|
|
1708
|
+
machineName: string;
|
|
1709
|
+
/** Kinematics */
|
|
1710
|
+
kinematics: string;
|
|
1711
|
+
/** Its first word, e.g. "trivkins" */
|
|
1712
|
+
kinematicsModule: string;
|
|
1713
|
+
/** From status */
|
|
1714
|
+
kinematicsType: KinematicsType;
|
|
1715
|
+
/** [TRAJ]COORDINATES without spaces, upper case, e.g. "XYZ" or "XYYZ" */
|
|
1716
|
+
coordinates: string;
|
|
1717
|
+
/** Bit 0=X ... bit 8=W, from status */
|
|
1718
|
+
axisMask: number;
|
|
1719
|
+
jointCount: number;
|
|
1720
|
+
spindleCount: number;
|
|
1721
|
+
/**
|
|
1722
|
+
* True when the server could work out which axis each joint drives. That
|
|
1723
|
+
* is the case for trivkins, where joints follow the coordinates= letters in
|
|
1724
|
+
* order. For other kinematics modules there is no fixed joint-to-axis
|
|
1725
|
+
* relation, so JointConfig.axis_letter and AxisConfig.joints stay empty.
|
|
1726
|
+
*
|
|
1727
|
+
* Extra joints (motmod's num_extrajoints, the machine's last joints) are
|
|
1728
|
+
* not part of the kinematics. They are listed in joints like any other
|
|
1729
|
+
* joint, but with an empty axis_letter even when this is true, and they are
|
|
1730
|
+
* in no AxisConfig.joints. TrajectoryStatus.num_extrajoints says how many
|
|
1731
|
+
* of the last joints they are.
|
|
1732
|
+
*/
|
|
1733
|
+
jointAxisMappingKnown: boolean;
|
|
1734
|
+
/** Units */
|
|
1735
|
+
linearUnits: number;
|
|
1736
|
+
/** Machine units per degree, from status */
|
|
1737
|
+
angularUnits: number;
|
|
1738
|
+
/** "mm", "inch" or "cm", derived from linear_units; empty if it is none of these */
|
|
1739
|
+
linearUnitsName: string;
|
|
1740
|
+
/** "degree", "radian" or "grad", derived from angular_units; empty if none of these */
|
|
1741
|
+
angularUnitsName: string;
|
|
1742
|
+
/** Velocities, in machine units per second; 0 if not set in the INI */
|
|
1743
|
+
maxLinearVelocity: number;
|
|
1744
|
+
/** [TRAJ]DEFAULT_LINEAR_VELOCITY */
|
|
1745
|
+
defaultLinearVelocity: number;
|
|
1746
|
+
/** [TRAJ]MAX_ANGULAR_VELOCITY */
|
|
1747
|
+
maxAngularVelocity: number;
|
|
1748
|
+
/** [TRAJ]DEFAULT_ANGULAR_VELOCITY */
|
|
1749
|
+
defaultAngularVelocity: number;
|
|
1750
|
+
/** Display hints from the [DISPLAY] section */
|
|
1751
|
+
lathe: boolean;
|
|
1752
|
+
/** [DISPLAY]BACK_TOOL_LATHE = 1 */
|
|
1753
|
+
backToolLathe: boolean;
|
|
1754
|
+
/** [DISPLAY]MAX_FEED_OVERRIDE (1.2 = 120%); 0 if not set */
|
|
1755
|
+
maxFeedOverride: number;
|
|
1756
|
+
/** [DISPLAY]MIN_SPINDLE_OVERRIDE; 0 if not set */
|
|
1757
|
+
minSpindleOverride: number;
|
|
1758
|
+
/** [DISPLAY]MAX_SPINDLE_OVERRIDE; 0 if not set */
|
|
1759
|
+
maxSpindleOverride: number;
|
|
1760
|
+
/** Directory the server's file RPCs and program open work in */
|
|
1761
|
+
ncFilesDirectory: string;
|
|
1762
|
+
/** One per joint */
|
|
1763
|
+
joints: JointConfig[];
|
|
1764
|
+
/** One per axis in axis_mask */
|
|
1765
|
+
axes: AxisConfig[];
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/** Empty - returns the server information */
|
|
1769
|
+
export interface GetServerInfoRequest {
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* What the server is and whether it has LinuxCNC. Returned by GetServerInfo,
|
|
1774
|
+
* which a 1.0 server answers with UNIMPLEMENTED.
|
|
1775
|
+
*/
|
|
1776
|
+
export interface ServerInfo {
|
|
1777
|
+
/**
|
|
1778
|
+
* Version of the linuxcnc-grpc package the server runs, e.g. "1.1.0".
|
|
1779
|
+
* The package version is the API version.
|
|
1780
|
+
*/
|
|
1781
|
+
serverVersion: string;
|
|
1782
|
+
/**
|
|
1783
|
+
* True once the server has connected to LinuxCNC. False while it is waiting
|
|
1784
|
+
* for LinuxCNC to start; the RPCs that need LinuxCNC answer UNAVAILABLE then.
|
|
1785
|
+
* It is what the server holds, not a check of LinuxCNC made for this call.
|
|
1786
|
+
*/
|
|
1787
|
+
linuxcncConnected: boolean;
|
|
1788
|
+
/**
|
|
1789
|
+
* Version of LinuxCNC as its Python module on the server's machine reports
|
|
1790
|
+
* it, e.g. "2.9.4"; empty if the module does not say. It comes from the
|
|
1791
|
+
* installed module, so it is also set while linuxcnc_connected is false and
|
|
1792
|
+
* does not by itself mean that LinuxCNC is running.
|
|
1793
|
+
*/
|
|
1794
|
+
linuxcncVersion: string;
|
|
1795
|
+
/**
|
|
1796
|
+
* When the server reads LinuxCNC's error channel right now: "on-demand"
|
|
1797
|
+
* (only while a StreamErrors client is connected, so without one
|
|
1798
|
+
* status.errors holds only what earlier streams read), "always" (from the
|
|
1799
|
+
* connect on) or "off" (never; StreamErrors is refused). A server started with "auto", the default,
|
|
1800
|
+
* reports "auto" until it has connected and then the mode it chose from the
|
|
1801
|
+
* INI file's [DISPLAY]DISPLAY.
|
|
1802
|
+
*/
|
|
1803
|
+
errorChannelMode: string;
|
|
1804
|
+
/**
|
|
1805
|
+
* How many stops this server wrote to LinuxCNC that its task is not
|
|
1806
|
+
* known to have taken: a stop whose send returned with the echo behind
|
|
1807
|
+
* its serial (CommandResponse.acknowledged false) counts until a good
|
|
1808
|
+
* status read shows the echo at or past it; a stop lost with the
|
|
1809
|
+
* server's command helper process (it may still be in LinuxCNC's queue)
|
|
1810
|
+
* counts until a stop written after it has been taken. While it is above
|
|
1811
|
+
* 0, commands that are not stops are held and then refused (see
|
|
1812
|
+
* SendCommand). A reconnect to the same LinuxCNC keeps it; one that
|
|
1813
|
+
* finds an echo serial that went backwards (a LinuxCNC that started
|
|
1814
|
+
* again) clears it.
|
|
1815
|
+
*/
|
|
1816
|
+
stopsNotTaken: number;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1463
1819
|
function createBasePosition(): Position {
|
|
1464
1820
|
return { x: 0, y: 0, z: 0, a: 0, b: 0, c: 0, u: 0, v: 0, w: 0 };
|
|
1465
1821
|
}
|
|
@@ -3608,6 +3964,7 @@ function createBaseToolEntry(): ToolEntry {
|
|
|
3608
3964
|
backAngle: 0,
|
|
3609
3965
|
orientation: 0,
|
|
3610
3966
|
comment: "",
|
|
3967
|
+
tableIndex: undefined,
|
|
3611
3968
|
};
|
|
3612
3969
|
}
|
|
3613
3970
|
|
|
@@ -3658,6 +4015,9 @@ export const ToolEntry: MessageFns<ToolEntry> = {
|
|
|
3658
4015
|
if (message.comment !== "") {
|
|
3659
4016
|
writer.uint32(122).string(message.comment);
|
|
3660
4017
|
}
|
|
4018
|
+
if (message.tableIndex !== undefined) {
|
|
4019
|
+
writer.uint32(128).int32(message.tableIndex);
|
|
4020
|
+
}
|
|
3661
4021
|
return writer;
|
|
3662
4022
|
},
|
|
3663
4023
|
|
|
@@ -3788,6 +4148,14 @@ export const ToolEntry: MessageFns<ToolEntry> = {
|
|
|
3788
4148
|
message.comment = reader.string();
|
|
3789
4149
|
continue;
|
|
3790
4150
|
}
|
|
4151
|
+
case 16: {
|
|
4152
|
+
if (tag !== 128) {
|
|
4153
|
+
break;
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
message.tableIndex = reader.int32();
|
|
4157
|
+
continue;
|
|
4158
|
+
}
|
|
3791
4159
|
}
|
|
3792
4160
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3793
4161
|
break;
|
|
@@ -3814,6 +4182,7 @@ export const ToolEntry: MessageFns<ToolEntry> = {
|
|
|
3814
4182
|
backAngle: isSet(object.backAngle) ? globalThis.Number(object.backAngle) : 0,
|
|
3815
4183
|
orientation: isSet(object.orientation) ? globalThis.Number(object.orientation) : 0,
|
|
3816
4184
|
comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
|
|
4185
|
+
tableIndex: isSet(object.tableIndex) ? globalThis.Number(object.tableIndex) : undefined,
|
|
3817
4186
|
};
|
|
3818
4187
|
},
|
|
3819
4188
|
|
|
@@ -3864,6 +4233,9 @@ export const ToolEntry: MessageFns<ToolEntry> = {
|
|
|
3864
4233
|
if (message.comment !== "") {
|
|
3865
4234
|
obj.comment = message.comment;
|
|
3866
4235
|
}
|
|
4236
|
+
if (message.tableIndex !== undefined) {
|
|
4237
|
+
obj.tableIndex = Math.round(message.tableIndex);
|
|
4238
|
+
}
|
|
3867
4239
|
return obj;
|
|
3868
4240
|
},
|
|
3869
4241
|
|
|
@@ -3887,6 +4259,7 @@ export const ToolEntry: MessageFns<ToolEntry> = {
|
|
|
3887
4259
|
message.backAngle = object.backAngle ?? 0;
|
|
3888
4260
|
message.orientation = object.orientation ?? 0;
|
|
3889
4261
|
message.comment = object.comment ?? "";
|
|
4262
|
+
message.tableIndex = object.tableIndex ?? undefined;
|
|
3890
4263
|
return message;
|
|
3891
4264
|
},
|
|
3892
4265
|
};
|
|
@@ -4546,7 +4919,7 @@ export const LimitStatus: MessageFns<LimitStatus> = {
|
|
|
4546
4919
|
};
|
|
4547
4920
|
|
|
4548
4921
|
function createBaseErrorMessage(): ErrorMessage {
|
|
4549
|
-
return { type: 0, message: "", timestamp: 0 };
|
|
4922
|
+
return { type: 0, message: "", timestamp: 0, sequence: 0 };
|
|
4550
4923
|
}
|
|
4551
4924
|
|
|
4552
4925
|
export const ErrorMessage: MessageFns<ErrorMessage> = {
|
|
@@ -4560,6 +4933,9 @@ export const ErrorMessage: MessageFns<ErrorMessage> = {
|
|
|
4560
4933
|
if (message.timestamp !== 0) {
|
|
4561
4934
|
writer.uint32(24).int64(message.timestamp);
|
|
4562
4935
|
}
|
|
4936
|
+
if (message.sequence !== 0) {
|
|
4937
|
+
writer.uint32(32).int64(message.sequence);
|
|
4938
|
+
}
|
|
4563
4939
|
return writer;
|
|
4564
4940
|
},
|
|
4565
4941
|
|
|
@@ -4591,7 +4967,15 @@ export const ErrorMessage: MessageFns<ErrorMessage> = {
|
|
|
4591
4967
|
break;
|
|
4592
4968
|
}
|
|
4593
4969
|
|
|
4594
|
-
message.timestamp =
|
|
4970
|
+
message.timestamp = timestampToNumber(reader.int64());
|
|
4971
|
+
continue;
|
|
4972
|
+
}
|
|
4973
|
+
case 4: {
|
|
4974
|
+
if (tag !== 32) {
|
|
4975
|
+
break;
|
|
4976
|
+
}
|
|
4977
|
+
|
|
4978
|
+
message.sequence = longToNumber(reader.int64());
|
|
4595
4979
|
continue;
|
|
4596
4980
|
}
|
|
4597
4981
|
}
|
|
@@ -4608,6 +4992,7 @@ export const ErrorMessage: MessageFns<ErrorMessage> = {
|
|
|
4608
4992
|
type: isSet(object.type) ? errorMessage_ErrorTypeFromJSON(object.type) : 0,
|
|
4609
4993
|
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
4610
4994
|
timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
|
|
4995
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
4611
4996
|
};
|
|
4612
4997
|
},
|
|
4613
4998
|
|
|
@@ -4622,6 +5007,9 @@ export const ErrorMessage: MessageFns<ErrorMessage> = {
|
|
|
4622
5007
|
if (message.timestamp !== 0) {
|
|
4623
5008
|
obj.timestamp = Math.round(message.timestamp);
|
|
4624
5009
|
}
|
|
5010
|
+
if (message.sequence !== 0) {
|
|
5011
|
+
obj.sequence = Math.round(message.sequence);
|
|
5012
|
+
}
|
|
4625
5013
|
return obj;
|
|
4626
5014
|
},
|
|
4627
5015
|
|
|
@@ -4633,6 +5021,7 @@ export const ErrorMessage: MessageFns<ErrorMessage> = {
|
|
|
4633
5021
|
message.type = object.type ?? 0;
|
|
4634
5022
|
message.message = object.message ?? "";
|
|
4635
5023
|
message.timestamp = object.timestamp ?? 0;
|
|
5024
|
+
message.sequence = object.sequence ?? 0;
|
|
4636
5025
|
return message;
|
|
4637
5026
|
},
|
|
4638
5027
|
};
|
|
@@ -4715,7 +5104,7 @@ export const LinuxCNCStatus: MessageFns<LinuxCNCStatus> = {
|
|
|
4715
5104
|
break;
|
|
4716
5105
|
}
|
|
4717
5106
|
|
|
4718
|
-
message.timestamp =
|
|
5107
|
+
message.timestamp = timestampToNumber(reader.int64());
|
|
4719
5108
|
continue;
|
|
4720
5109
|
}
|
|
4721
5110
|
case 2: {
|
|
@@ -7253,7 +7642,7 @@ export const LinuxCNCCommand: MessageFns<LinuxCNCCommand> = {
|
|
|
7253
7642
|
break;
|
|
7254
7643
|
}
|
|
7255
7644
|
|
|
7256
|
-
message.timestamp =
|
|
7645
|
+
message.timestamp = timestampToNumber(reader.int64());
|
|
7257
7646
|
continue;
|
|
7258
7647
|
}
|
|
7259
7648
|
case 2: {
|
|
@@ -7725,7 +8114,7 @@ export const LinuxCNCCommand: MessageFns<LinuxCNCCommand> = {
|
|
|
7725
8114
|
};
|
|
7726
8115
|
|
|
7727
8116
|
function createBaseCommandResponse(): CommandResponse {
|
|
7728
|
-
return { serial: 0, status: 0, errorMessage: "" };
|
|
8117
|
+
return { serial: 0, status: 0, errorMessage: "", linuxcncSerial: undefined, acknowledged: undefined, notSent: false };
|
|
7729
8118
|
}
|
|
7730
8119
|
|
|
7731
8120
|
export const CommandResponse: MessageFns<CommandResponse> = {
|
|
@@ -7739,6 +8128,15 @@ export const CommandResponse: MessageFns<CommandResponse> = {
|
|
|
7739
8128
|
if (message.errorMessage !== "") {
|
|
7740
8129
|
writer.uint32(26).string(message.errorMessage);
|
|
7741
8130
|
}
|
|
8131
|
+
if (message.linuxcncSerial !== undefined) {
|
|
8132
|
+
writer.uint32(32).int32(message.linuxcncSerial);
|
|
8133
|
+
}
|
|
8134
|
+
if (message.acknowledged !== undefined) {
|
|
8135
|
+
writer.uint32(40).bool(message.acknowledged);
|
|
8136
|
+
}
|
|
8137
|
+
if (message.notSent !== false) {
|
|
8138
|
+
writer.uint32(48).bool(message.notSent);
|
|
8139
|
+
}
|
|
7742
8140
|
return writer;
|
|
7743
8141
|
},
|
|
7744
8142
|
|
|
@@ -7773,6 +8171,30 @@ export const CommandResponse: MessageFns<CommandResponse> = {
|
|
|
7773
8171
|
message.errorMessage = reader.string();
|
|
7774
8172
|
continue;
|
|
7775
8173
|
}
|
|
8174
|
+
case 4: {
|
|
8175
|
+
if (tag !== 32) {
|
|
8176
|
+
break;
|
|
8177
|
+
}
|
|
8178
|
+
|
|
8179
|
+
message.linuxcncSerial = reader.int32();
|
|
8180
|
+
continue;
|
|
8181
|
+
}
|
|
8182
|
+
case 5: {
|
|
8183
|
+
if (tag !== 40) {
|
|
8184
|
+
break;
|
|
8185
|
+
}
|
|
8186
|
+
|
|
8187
|
+
message.acknowledged = reader.bool();
|
|
8188
|
+
continue;
|
|
8189
|
+
}
|
|
8190
|
+
case 6: {
|
|
8191
|
+
if (tag !== 48) {
|
|
8192
|
+
break;
|
|
8193
|
+
}
|
|
8194
|
+
|
|
8195
|
+
message.notSent = reader.bool();
|
|
8196
|
+
continue;
|
|
8197
|
+
}
|
|
7776
8198
|
}
|
|
7777
8199
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7778
8200
|
break;
|
|
@@ -7787,6 +8209,9 @@ export const CommandResponse: MessageFns<CommandResponse> = {
|
|
|
7787
8209
|
serial: isSet(object.serial) ? globalThis.Number(object.serial) : 0,
|
|
7788
8210
|
status: isSet(object.status) ? rcsStatusFromJSON(object.status) : 0,
|
|
7789
8211
|
errorMessage: isSet(object.errorMessage) ? globalThis.String(object.errorMessage) : "",
|
|
8212
|
+
linuxcncSerial: isSet(object.linuxcncSerial) ? globalThis.Number(object.linuxcncSerial) : undefined,
|
|
8213
|
+
acknowledged: isSet(object.acknowledged) ? globalThis.Boolean(object.acknowledged) : undefined,
|
|
8214
|
+
notSent: isSet(object.notSent) ? globalThis.Boolean(object.notSent) : false,
|
|
7790
8215
|
};
|
|
7791
8216
|
},
|
|
7792
8217
|
|
|
@@ -7801,6 +8226,15 @@ export const CommandResponse: MessageFns<CommandResponse> = {
|
|
|
7801
8226
|
if (message.errorMessage !== "") {
|
|
7802
8227
|
obj.errorMessage = message.errorMessage;
|
|
7803
8228
|
}
|
|
8229
|
+
if (message.linuxcncSerial !== undefined) {
|
|
8230
|
+
obj.linuxcncSerial = Math.round(message.linuxcncSerial);
|
|
8231
|
+
}
|
|
8232
|
+
if (message.acknowledged !== undefined) {
|
|
8233
|
+
obj.acknowledged = message.acknowledged;
|
|
8234
|
+
}
|
|
8235
|
+
if (message.notSent !== false) {
|
|
8236
|
+
obj.notSent = message.notSent;
|
|
8237
|
+
}
|
|
7804
8238
|
return obj;
|
|
7805
8239
|
},
|
|
7806
8240
|
|
|
@@ -7812,6 +8246,9 @@ export const CommandResponse: MessageFns<CommandResponse> = {
|
|
|
7812
8246
|
message.serial = object.serial ?? 0;
|
|
7813
8247
|
message.status = object.status ?? 0;
|
|
7814
8248
|
message.errorMessage = object.errorMessage ?? "";
|
|
8249
|
+
message.linuxcncSerial = object.linuxcncSerial ?? undefined;
|
|
8250
|
+
message.acknowledged = object.acknowledged ?? undefined;
|
|
8251
|
+
message.notSent = object.notSent ?? false;
|
|
7815
8252
|
return message;
|
|
7816
8253
|
},
|
|
7817
8254
|
};
|
|
@@ -7860,7 +8297,7 @@ export const GetStatusRequest: MessageFns<GetStatusRequest> = {
|
|
|
7860
8297
|
};
|
|
7861
8298
|
|
|
7862
8299
|
function createBaseWaitCompleteRequest(): WaitCompleteRequest {
|
|
7863
|
-
return { serial: 0, timeout: 0 };
|
|
8300
|
+
return { serial: 0, timeout: 0, linuxcncSerial: undefined };
|
|
7864
8301
|
}
|
|
7865
8302
|
|
|
7866
8303
|
export const WaitCompleteRequest: MessageFns<WaitCompleteRequest> = {
|
|
@@ -7871,6 +8308,9 @@ export const WaitCompleteRequest: MessageFns<WaitCompleteRequest> = {
|
|
|
7871
8308
|
if (message.timeout !== 0) {
|
|
7872
8309
|
writer.uint32(17).double(message.timeout);
|
|
7873
8310
|
}
|
|
8311
|
+
if (message.linuxcncSerial !== undefined) {
|
|
8312
|
+
writer.uint32(24).int32(message.linuxcncSerial);
|
|
8313
|
+
}
|
|
7874
8314
|
return writer;
|
|
7875
8315
|
},
|
|
7876
8316
|
|
|
@@ -7897,6 +8337,14 @@ export const WaitCompleteRequest: MessageFns<WaitCompleteRequest> = {
|
|
|
7897
8337
|
message.timeout = reader.double();
|
|
7898
8338
|
continue;
|
|
7899
8339
|
}
|
|
8340
|
+
case 3: {
|
|
8341
|
+
if (tag !== 24) {
|
|
8342
|
+
break;
|
|
8343
|
+
}
|
|
8344
|
+
|
|
8345
|
+
message.linuxcncSerial = reader.int32();
|
|
8346
|
+
continue;
|
|
8347
|
+
}
|
|
7900
8348
|
}
|
|
7901
8349
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7902
8350
|
break;
|
|
@@ -7910,6 +8358,7 @@ export const WaitCompleteRequest: MessageFns<WaitCompleteRequest> = {
|
|
|
7910
8358
|
return {
|
|
7911
8359
|
serial: isSet(object.serial) ? globalThis.Number(object.serial) : 0,
|
|
7912
8360
|
timeout: isSet(object.timeout) ? globalThis.Number(object.timeout) : 0,
|
|
8361
|
+
linuxcncSerial: isSet(object.linuxcncSerial) ? globalThis.Number(object.linuxcncSerial) : undefined,
|
|
7913
8362
|
};
|
|
7914
8363
|
},
|
|
7915
8364
|
|
|
@@ -7921,6 +8370,9 @@ export const WaitCompleteRequest: MessageFns<WaitCompleteRequest> = {
|
|
|
7921
8370
|
if (message.timeout !== 0) {
|
|
7922
8371
|
obj.timeout = message.timeout;
|
|
7923
8372
|
}
|
|
8373
|
+
if (message.linuxcncSerial !== undefined) {
|
|
8374
|
+
obj.linuxcncSerial = Math.round(message.linuxcncSerial);
|
|
8375
|
+
}
|
|
7924
8376
|
return obj;
|
|
7925
8377
|
},
|
|
7926
8378
|
|
|
@@ -7931,6 +8383,7 @@ export const WaitCompleteRequest: MessageFns<WaitCompleteRequest> = {
|
|
|
7931
8383
|
const message = createBaseWaitCompleteRequest();
|
|
7932
8384
|
message.serial = object.serial ?? 0;
|
|
7933
8385
|
message.timeout = object.timeout ?? 0;
|
|
8386
|
+
message.linuxcncSerial = object.linuxcncSerial ?? undefined;
|
|
7934
8387
|
return message;
|
|
7935
8388
|
},
|
|
7936
8389
|
};
|
|
@@ -7994,11 +8447,14 @@ export const StreamStatusRequest: MessageFns<StreamStatusRequest> = {
|
|
|
7994
8447
|
};
|
|
7995
8448
|
|
|
7996
8449
|
function createBaseStreamErrorsRequest(): StreamErrorsRequest {
|
|
7997
|
-
return {};
|
|
8450
|
+
return { replayBuffered: false };
|
|
7998
8451
|
}
|
|
7999
8452
|
|
|
8000
8453
|
export const StreamErrorsRequest: MessageFns<StreamErrorsRequest> = {
|
|
8001
|
-
encode(
|
|
8454
|
+
encode(message: StreamErrorsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
8455
|
+
if (message.replayBuffered !== false) {
|
|
8456
|
+
writer.uint32(8).bool(message.replayBuffered);
|
|
8457
|
+
}
|
|
8002
8458
|
return writer;
|
|
8003
8459
|
},
|
|
8004
8460
|
|
|
@@ -8009,6 +8465,14 @@ export const StreamErrorsRequest: MessageFns<StreamErrorsRequest> = {
|
|
|
8009
8465
|
while (reader.pos < end) {
|
|
8010
8466
|
const tag = reader.uint32();
|
|
8011
8467
|
switch (tag >>> 3) {
|
|
8468
|
+
case 1: {
|
|
8469
|
+
if (tag !== 8) {
|
|
8470
|
+
break;
|
|
8471
|
+
}
|
|
8472
|
+
|
|
8473
|
+
message.replayBuffered = reader.bool();
|
|
8474
|
+
continue;
|
|
8475
|
+
}
|
|
8012
8476
|
}
|
|
8013
8477
|
if ((tag & 7) === 4 || tag === 0) {
|
|
8014
8478
|
break;
|
|
@@ -8018,20 +8482,24 @@ export const StreamErrorsRequest: MessageFns<StreamErrorsRequest> = {
|
|
|
8018
8482
|
return message;
|
|
8019
8483
|
},
|
|
8020
8484
|
|
|
8021
|
-
fromJSON(
|
|
8022
|
-
return {};
|
|
8485
|
+
fromJSON(object: any): StreamErrorsRequest {
|
|
8486
|
+
return { replayBuffered: isSet(object.replayBuffered) ? globalThis.Boolean(object.replayBuffered) : false };
|
|
8023
8487
|
},
|
|
8024
8488
|
|
|
8025
|
-
toJSON(
|
|
8489
|
+
toJSON(message: StreamErrorsRequest): unknown {
|
|
8026
8490
|
const obj: any = {};
|
|
8491
|
+
if (message.replayBuffered !== false) {
|
|
8492
|
+
obj.replayBuffered = message.replayBuffered;
|
|
8493
|
+
}
|
|
8027
8494
|
return obj;
|
|
8028
8495
|
},
|
|
8029
8496
|
|
|
8030
8497
|
create<I extends Exact<DeepPartial<StreamErrorsRequest>, I>>(base?: I): StreamErrorsRequest {
|
|
8031
8498
|
return StreamErrorsRequest.fromPartial(base ?? ({} as any));
|
|
8032
8499
|
},
|
|
8033
|
-
fromPartial<I extends Exact<DeepPartial<StreamErrorsRequest>, I>>(
|
|
8500
|
+
fromPartial<I extends Exact<DeepPartial<StreamErrorsRequest>, I>>(object: I): StreamErrorsRequest {
|
|
8034
8501
|
const message = createBaseStreamErrorsRequest();
|
|
8502
|
+
message.replayBuffered = object.replayBuffered ?? false;
|
|
8035
8503
|
return message;
|
|
8036
8504
|
},
|
|
8037
8505
|
};
|
|
@@ -8322,7 +8790,7 @@ export const FileInfo: MessageFns<FileInfo> = {
|
|
|
8322
8790
|
break;
|
|
8323
8791
|
}
|
|
8324
8792
|
|
|
8325
|
-
message.modifiedTimestamp =
|
|
8793
|
+
message.modifiedTimestamp = timestampToNumber(reader.int64());
|
|
8326
8794
|
continue;
|
|
8327
8795
|
}
|
|
8328
8796
|
case 5: {
|
|
@@ -8578,100 +9046,1702 @@ export const DeleteFileResponse: MessageFns<DeleteFileResponse> = {
|
|
|
8578
9046
|
},
|
|
8579
9047
|
};
|
|
8580
9048
|
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
responseStream: false,
|
|
8598
|
-
requestSerialize: (value: LinuxCNCCommand): Buffer => Buffer.from(LinuxCNCCommand.encode(value).finish()),
|
|
8599
|
-
requestDeserialize: (value: Buffer): LinuxCNCCommand => LinuxCNCCommand.decode(value),
|
|
8600
|
-
responseSerialize: (value: CommandResponse): Buffer => Buffer.from(CommandResponse.encode(value).finish()),
|
|
8601
|
-
responseDeserialize: (value: Buffer): CommandResponse => CommandResponse.decode(value),
|
|
8602
|
-
},
|
|
8603
|
-
/** Wait for command completion */
|
|
8604
|
-
waitComplete: {
|
|
8605
|
-
path: "/linuxcnc.LinuxCNCService/WaitComplete",
|
|
8606
|
-
requestStream: false,
|
|
8607
|
-
responseStream: false,
|
|
8608
|
-
requestSerialize: (value: WaitCompleteRequest): Buffer => Buffer.from(WaitCompleteRequest.encode(value).finish()),
|
|
8609
|
-
requestDeserialize: (value: Buffer): WaitCompleteRequest => WaitCompleteRequest.decode(value),
|
|
8610
|
-
responseSerialize: (value: CommandResponse): Buffer => Buffer.from(CommandResponse.encode(value).finish()),
|
|
8611
|
-
responseDeserialize: (value: Buffer): CommandResponse => CommandResponse.decode(value),
|
|
9049
|
+
function createBaseReadFileRequest(): ReadFileRequest {
|
|
9050
|
+
return { filename: "", offset: 0, maxBytes: 0 };
|
|
9051
|
+
}
|
|
9052
|
+
|
|
9053
|
+
export const ReadFileRequest: MessageFns<ReadFileRequest> = {
|
|
9054
|
+
encode(message: ReadFileRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9055
|
+
if (message.filename !== "") {
|
|
9056
|
+
writer.uint32(10).string(message.filename);
|
|
9057
|
+
}
|
|
9058
|
+
if (message.offset !== 0) {
|
|
9059
|
+
writer.uint32(16).int64(message.offset);
|
|
9060
|
+
}
|
|
9061
|
+
if (message.maxBytes !== 0) {
|
|
9062
|
+
writer.uint32(24).int32(message.maxBytes);
|
|
9063
|
+
}
|
|
9064
|
+
return writer;
|
|
8612
9065
|
},
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
9066
|
+
|
|
9067
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ReadFileRequest {
|
|
9068
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9069
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9070
|
+
const message = createBaseReadFileRequest();
|
|
9071
|
+
while (reader.pos < end) {
|
|
9072
|
+
const tag = reader.uint32();
|
|
9073
|
+
switch (tag >>> 3) {
|
|
9074
|
+
case 1: {
|
|
9075
|
+
if (tag !== 10) {
|
|
9076
|
+
break;
|
|
9077
|
+
}
|
|
9078
|
+
|
|
9079
|
+
message.filename = reader.string();
|
|
9080
|
+
continue;
|
|
9081
|
+
}
|
|
9082
|
+
case 2: {
|
|
9083
|
+
if (tag !== 16) {
|
|
9084
|
+
break;
|
|
9085
|
+
}
|
|
9086
|
+
|
|
9087
|
+
message.offset = longToNumber(reader.int64());
|
|
9088
|
+
continue;
|
|
9089
|
+
}
|
|
9090
|
+
case 3: {
|
|
9091
|
+
if (tag !== 24) {
|
|
9092
|
+
break;
|
|
9093
|
+
}
|
|
9094
|
+
|
|
9095
|
+
message.maxBytes = reader.int32();
|
|
9096
|
+
continue;
|
|
9097
|
+
}
|
|
9098
|
+
}
|
|
9099
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9100
|
+
break;
|
|
9101
|
+
}
|
|
9102
|
+
reader.skip(tag & 7);
|
|
9103
|
+
}
|
|
9104
|
+
return message;
|
|
8622
9105
|
},
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
responseSerialize: (value: ErrorMessage): Buffer => Buffer.from(ErrorMessage.encode(value).finish()),
|
|
8631
|
-
responseDeserialize: (value: Buffer): ErrorMessage => ErrorMessage.decode(value),
|
|
9106
|
+
|
|
9107
|
+
fromJSON(object: any): ReadFileRequest {
|
|
9108
|
+
return {
|
|
9109
|
+
filename: isSet(object.filename) ? globalThis.String(object.filename) : "",
|
|
9110
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
9111
|
+
maxBytes: isSet(object.maxBytes) ? globalThis.Number(object.maxBytes) : 0,
|
|
9112
|
+
};
|
|
8632
9113
|
},
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
9114
|
+
|
|
9115
|
+
toJSON(message: ReadFileRequest): unknown {
|
|
9116
|
+
const obj: any = {};
|
|
9117
|
+
if (message.filename !== "") {
|
|
9118
|
+
obj.filename = message.filename;
|
|
9119
|
+
}
|
|
9120
|
+
if (message.offset !== 0) {
|
|
9121
|
+
obj.offset = Math.round(message.offset);
|
|
9122
|
+
}
|
|
9123
|
+
if (message.maxBytes !== 0) {
|
|
9124
|
+
obj.maxBytes = Math.round(message.maxBytes);
|
|
9125
|
+
}
|
|
9126
|
+
return obj;
|
|
8642
9127
|
},
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
requestStream: false,
|
|
8647
|
-
responseStream: false,
|
|
8648
|
-
requestSerialize: (value: ListFilesRequest): Buffer => Buffer.from(ListFilesRequest.encode(value).finish()),
|
|
8649
|
-
requestDeserialize: (value: Buffer): ListFilesRequest => ListFilesRequest.decode(value),
|
|
8650
|
-
responseSerialize: (value: ListFilesResponse): Buffer => Buffer.from(ListFilesResponse.encode(value).finish()),
|
|
8651
|
-
responseDeserialize: (value: Buffer): ListFilesResponse => ListFilesResponse.decode(value),
|
|
9128
|
+
|
|
9129
|
+
create<I extends Exact<DeepPartial<ReadFileRequest>, I>>(base?: I): ReadFileRequest {
|
|
9130
|
+
return ReadFileRequest.fromPartial(base ?? ({} as any));
|
|
8652
9131
|
},
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
requestDeserialize: (value: Buffer): DeleteFileRequest => DeleteFileRequest.decode(value),
|
|
8660
|
-
responseSerialize: (value: DeleteFileResponse): Buffer => Buffer.from(DeleteFileResponse.encode(value).finish()),
|
|
8661
|
-
responseDeserialize: (value: Buffer): DeleteFileResponse => DeleteFileResponse.decode(value),
|
|
9132
|
+
fromPartial<I extends Exact<DeepPartial<ReadFileRequest>, I>>(object: I): ReadFileRequest {
|
|
9133
|
+
const message = createBaseReadFileRequest();
|
|
9134
|
+
message.filename = object.filename ?? "";
|
|
9135
|
+
message.offset = object.offset ?? 0;
|
|
9136
|
+
message.maxBytes = object.maxBytes ?? 0;
|
|
9137
|
+
return message;
|
|
8662
9138
|
},
|
|
8663
|
-
}
|
|
9139
|
+
};
|
|
8664
9140
|
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
9141
|
+
function createBaseReadFileResponse(): ReadFileResponse {
|
|
9142
|
+
return { path: "", content: new Uint8Array(0), offset: 0, totalSizeBytes: 0, endOfFile: false, modifiedTimestamp: 0 };
|
|
9143
|
+
}
|
|
9144
|
+
|
|
9145
|
+
export const ReadFileResponse: MessageFns<ReadFileResponse> = {
|
|
9146
|
+
encode(message: ReadFileResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9147
|
+
if (message.path !== "") {
|
|
9148
|
+
writer.uint32(10).string(message.path);
|
|
9149
|
+
}
|
|
9150
|
+
if (message.content.length !== 0) {
|
|
9151
|
+
writer.uint32(18).bytes(message.content);
|
|
9152
|
+
}
|
|
9153
|
+
if (message.offset !== 0) {
|
|
9154
|
+
writer.uint32(24).int64(message.offset);
|
|
9155
|
+
}
|
|
9156
|
+
if (message.totalSizeBytes !== 0) {
|
|
9157
|
+
writer.uint32(32).int64(message.totalSizeBytes);
|
|
9158
|
+
}
|
|
9159
|
+
if (message.endOfFile !== false) {
|
|
9160
|
+
writer.uint32(40).bool(message.endOfFile);
|
|
9161
|
+
}
|
|
9162
|
+
if (message.modifiedTimestamp !== 0) {
|
|
9163
|
+
writer.uint32(48).int64(message.modifiedTimestamp);
|
|
9164
|
+
}
|
|
9165
|
+
return writer;
|
|
9166
|
+
},
|
|
9167
|
+
|
|
9168
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ReadFileResponse {
|
|
9169
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9170
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9171
|
+
const message = createBaseReadFileResponse();
|
|
9172
|
+
while (reader.pos < end) {
|
|
9173
|
+
const tag = reader.uint32();
|
|
9174
|
+
switch (tag >>> 3) {
|
|
9175
|
+
case 1: {
|
|
9176
|
+
if (tag !== 10) {
|
|
9177
|
+
break;
|
|
9178
|
+
}
|
|
9179
|
+
|
|
9180
|
+
message.path = reader.string();
|
|
9181
|
+
continue;
|
|
9182
|
+
}
|
|
9183
|
+
case 2: {
|
|
9184
|
+
if (tag !== 18) {
|
|
9185
|
+
break;
|
|
9186
|
+
}
|
|
9187
|
+
|
|
9188
|
+
message.content = reader.bytes();
|
|
9189
|
+
continue;
|
|
9190
|
+
}
|
|
9191
|
+
case 3: {
|
|
9192
|
+
if (tag !== 24) {
|
|
9193
|
+
break;
|
|
9194
|
+
}
|
|
9195
|
+
|
|
9196
|
+
message.offset = longToNumber(reader.int64());
|
|
9197
|
+
continue;
|
|
9198
|
+
}
|
|
9199
|
+
case 4: {
|
|
9200
|
+
if (tag !== 32) {
|
|
9201
|
+
break;
|
|
9202
|
+
}
|
|
9203
|
+
|
|
9204
|
+
message.totalSizeBytes = longToNumber(reader.int64());
|
|
9205
|
+
continue;
|
|
9206
|
+
}
|
|
9207
|
+
case 5: {
|
|
9208
|
+
if (tag !== 40) {
|
|
9209
|
+
break;
|
|
9210
|
+
}
|
|
9211
|
+
|
|
9212
|
+
message.endOfFile = reader.bool();
|
|
9213
|
+
continue;
|
|
9214
|
+
}
|
|
9215
|
+
case 6: {
|
|
9216
|
+
if (tag !== 48) {
|
|
9217
|
+
break;
|
|
9218
|
+
}
|
|
9219
|
+
|
|
9220
|
+
message.modifiedTimestamp = timestampToNumber(reader.int64());
|
|
9221
|
+
continue;
|
|
9222
|
+
}
|
|
9223
|
+
}
|
|
9224
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9225
|
+
break;
|
|
9226
|
+
}
|
|
9227
|
+
reader.skip(tag & 7);
|
|
9228
|
+
}
|
|
9229
|
+
return message;
|
|
9230
|
+
},
|
|
9231
|
+
|
|
9232
|
+
fromJSON(object: any): ReadFileResponse {
|
|
9233
|
+
return {
|
|
9234
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
9235
|
+
content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0),
|
|
9236
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
9237
|
+
totalSizeBytes: isSet(object.totalSizeBytes) ? globalThis.Number(object.totalSizeBytes) : 0,
|
|
9238
|
+
endOfFile: isSet(object.endOfFile) ? globalThis.Boolean(object.endOfFile) : false,
|
|
9239
|
+
modifiedTimestamp: isSet(object.modifiedTimestamp) ? globalThis.Number(object.modifiedTimestamp) : 0,
|
|
9240
|
+
};
|
|
9241
|
+
},
|
|
9242
|
+
|
|
9243
|
+
toJSON(message: ReadFileResponse): unknown {
|
|
9244
|
+
const obj: any = {};
|
|
9245
|
+
if (message.path !== "") {
|
|
9246
|
+
obj.path = message.path;
|
|
9247
|
+
}
|
|
9248
|
+
if (message.content.length !== 0) {
|
|
9249
|
+
obj.content = base64FromBytes(message.content);
|
|
9250
|
+
}
|
|
9251
|
+
if (message.offset !== 0) {
|
|
9252
|
+
obj.offset = Math.round(message.offset);
|
|
9253
|
+
}
|
|
9254
|
+
if (message.totalSizeBytes !== 0) {
|
|
9255
|
+
obj.totalSizeBytes = Math.round(message.totalSizeBytes);
|
|
9256
|
+
}
|
|
9257
|
+
if (message.endOfFile !== false) {
|
|
9258
|
+
obj.endOfFile = message.endOfFile;
|
|
9259
|
+
}
|
|
9260
|
+
if (message.modifiedTimestamp !== 0) {
|
|
9261
|
+
obj.modifiedTimestamp = Math.round(message.modifiedTimestamp);
|
|
9262
|
+
}
|
|
9263
|
+
return obj;
|
|
9264
|
+
},
|
|
9265
|
+
|
|
9266
|
+
create<I extends Exact<DeepPartial<ReadFileResponse>, I>>(base?: I): ReadFileResponse {
|
|
9267
|
+
return ReadFileResponse.fromPartial(base ?? ({} as any));
|
|
9268
|
+
},
|
|
9269
|
+
fromPartial<I extends Exact<DeepPartial<ReadFileResponse>, I>>(object: I): ReadFileResponse {
|
|
9270
|
+
const message = createBaseReadFileResponse();
|
|
9271
|
+
message.path = object.path ?? "";
|
|
9272
|
+
message.content = object.content ?? new Uint8Array(0);
|
|
9273
|
+
message.offset = object.offset ?? 0;
|
|
9274
|
+
message.totalSizeBytes = object.totalSizeBytes ?? 0;
|
|
9275
|
+
message.endOfFile = object.endOfFile ?? false;
|
|
9276
|
+
message.modifiedTimestamp = object.modifiedTimestamp ?? 0;
|
|
9277
|
+
return message;
|
|
9278
|
+
},
|
|
9279
|
+
};
|
|
9280
|
+
|
|
9281
|
+
function createBaseResolveFileRequest(): ResolveFileRequest {
|
|
9282
|
+
return { filename: "" };
|
|
9283
|
+
}
|
|
9284
|
+
|
|
9285
|
+
export const ResolveFileRequest: MessageFns<ResolveFileRequest> = {
|
|
9286
|
+
encode(message: ResolveFileRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9287
|
+
if (message.filename !== "") {
|
|
9288
|
+
writer.uint32(10).string(message.filename);
|
|
9289
|
+
}
|
|
9290
|
+
return writer;
|
|
9291
|
+
},
|
|
9292
|
+
|
|
9293
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveFileRequest {
|
|
9294
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9295
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9296
|
+
const message = createBaseResolveFileRequest();
|
|
9297
|
+
while (reader.pos < end) {
|
|
9298
|
+
const tag = reader.uint32();
|
|
9299
|
+
switch (tag >>> 3) {
|
|
9300
|
+
case 1: {
|
|
9301
|
+
if (tag !== 10) {
|
|
9302
|
+
break;
|
|
9303
|
+
}
|
|
9304
|
+
|
|
9305
|
+
message.filename = reader.string();
|
|
9306
|
+
continue;
|
|
9307
|
+
}
|
|
9308
|
+
}
|
|
9309
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9310
|
+
break;
|
|
9311
|
+
}
|
|
9312
|
+
reader.skip(tag & 7);
|
|
9313
|
+
}
|
|
9314
|
+
return message;
|
|
9315
|
+
},
|
|
9316
|
+
|
|
9317
|
+
fromJSON(object: any): ResolveFileRequest {
|
|
9318
|
+
return { filename: isSet(object.filename) ? globalThis.String(object.filename) : "" };
|
|
9319
|
+
},
|
|
9320
|
+
|
|
9321
|
+
toJSON(message: ResolveFileRequest): unknown {
|
|
9322
|
+
const obj: any = {};
|
|
9323
|
+
if (message.filename !== "") {
|
|
9324
|
+
obj.filename = message.filename;
|
|
9325
|
+
}
|
|
9326
|
+
return obj;
|
|
9327
|
+
},
|
|
9328
|
+
|
|
9329
|
+
create<I extends Exact<DeepPartial<ResolveFileRequest>, I>>(base?: I): ResolveFileRequest {
|
|
9330
|
+
return ResolveFileRequest.fromPartial(base ?? ({} as any));
|
|
9331
|
+
},
|
|
9332
|
+
fromPartial<I extends Exact<DeepPartial<ResolveFileRequest>, I>>(object: I): ResolveFileRequest {
|
|
9333
|
+
const message = createBaseResolveFileRequest();
|
|
9334
|
+
message.filename = object.filename ?? "";
|
|
9335
|
+
return message;
|
|
9336
|
+
},
|
|
9337
|
+
};
|
|
9338
|
+
|
|
9339
|
+
function createBaseResolveFileResponse(): ResolveFileResponse {
|
|
9340
|
+
return {
|
|
9341
|
+
path: "",
|
|
9342
|
+
exists: false,
|
|
9343
|
+
isDirectory: false,
|
|
9344
|
+
isSymlink: false,
|
|
9345
|
+
isLoadedProgram: false,
|
|
9346
|
+
loadedProgram: "",
|
|
9347
|
+
interpState: 0,
|
|
9348
|
+
};
|
|
9349
|
+
}
|
|
9350
|
+
|
|
9351
|
+
export const ResolveFileResponse: MessageFns<ResolveFileResponse> = {
|
|
9352
|
+
encode(message: ResolveFileResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9353
|
+
if (message.path !== "") {
|
|
9354
|
+
writer.uint32(10).string(message.path);
|
|
9355
|
+
}
|
|
9356
|
+
if (message.exists !== false) {
|
|
9357
|
+
writer.uint32(16).bool(message.exists);
|
|
9358
|
+
}
|
|
9359
|
+
if (message.isDirectory !== false) {
|
|
9360
|
+
writer.uint32(24).bool(message.isDirectory);
|
|
9361
|
+
}
|
|
9362
|
+
if (message.isSymlink !== false) {
|
|
9363
|
+
writer.uint32(32).bool(message.isSymlink);
|
|
9364
|
+
}
|
|
9365
|
+
if (message.isLoadedProgram !== false) {
|
|
9366
|
+
writer.uint32(40).bool(message.isLoadedProgram);
|
|
9367
|
+
}
|
|
9368
|
+
if (message.loadedProgram !== "") {
|
|
9369
|
+
writer.uint32(50).string(message.loadedProgram);
|
|
9370
|
+
}
|
|
9371
|
+
if (message.interpState !== 0) {
|
|
9372
|
+
writer.uint32(56).int32(message.interpState);
|
|
9373
|
+
}
|
|
9374
|
+
return writer;
|
|
9375
|
+
},
|
|
9376
|
+
|
|
9377
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ResolveFileResponse {
|
|
9378
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9379
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9380
|
+
const message = createBaseResolveFileResponse();
|
|
9381
|
+
while (reader.pos < end) {
|
|
9382
|
+
const tag = reader.uint32();
|
|
9383
|
+
switch (tag >>> 3) {
|
|
9384
|
+
case 1: {
|
|
9385
|
+
if (tag !== 10) {
|
|
9386
|
+
break;
|
|
9387
|
+
}
|
|
9388
|
+
|
|
9389
|
+
message.path = reader.string();
|
|
9390
|
+
continue;
|
|
9391
|
+
}
|
|
9392
|
+
case 2: {
|
|
9393
|
+
if (tag !== 16) {
|
|
9394
|
+
break;
|
|
9395
|
+
}
|
|
9396
|
+
|
|
9397
|
+
message.exists = reader.bool();
|
|
9398
|
+
continue;
|
|
9399
|
+
}
|
|
9400
|
+
case 3: {
|
|
9401
|
+
if (tag !== 24) {
|
|
9402
|
+
break;
|
|
9403
|
+
}
|
|
9404
|
+
|
|
9405
|
+
message.isDirectory = reader.bool();
|
|
9406
|
+
continue;
|
|
9407
|
+
}
|
|
9408
|
+
case 4: {
|
|
9409
|
+
if (tag !== 32) {
|
|
9410
|
+
break;
|
|
9411
|
+
}
|
|
9412
|
+
|
|
9413
|
+
message.isSymlink = reader.bool();
|
|
9414
|
+
continue;
|
|
9415
|
+
}
|
|
9416
|
+
case 5: {
|
|
9417
|
+
if (tag !== 40) {
|
|
9418
|
+
break;
|
|
9419
|
+
}
|
|
9420
|
+
|
|
9421
|
+
message.isLoadedProgram = reader.bool();
|
|
9422
|
+
continue;
|
|
9423
|
+
}
|
|
9424
|
+
case 6: {
|
|
9425
|
+
if (tag !== 50) {
|
|
9426
|
+
break;
|
|
9427
|
+
}
|
|
9428
|
+
|
|
9429
|
+
message.loadedProgram = reader.string();
|
|
9430
|
+
continue;
|
|
9431
|
+
}
|
|
9432
|
+
case 7: {
|
|
9433
|
+
if (tag !== 56) {
|
|
9434
|
+
break;
|
|
9435
|
+
}
|
|
9436
|
+
|
|
9437
|
+
message.interpState = reader.int32() as any;
|
|
9438
|
+
continue;
|
|
9439
|
+
}
|
|
9440
|
+
}
|
|
9441
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9442
|
+
break;
|
|
9443
|
+
}
|
|
9444
|
+
reader.skip(tag & 7);
|
|
9445
|
+
}
|
|
9446
|
+
return message;
|
|
9447
|
+
},
|
|
9448
|
+
|
|
9449
|
+
fromJSON(object: any): ResolveFileResponse {
|
|
9450
|
+
return {
|
|
9451
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
9452
|
+
exists: isSet(object.exists) ? globalThis.Boolean(object.exists) : false,
|
|
9453
|
+
isDirectory: isSet(object.isDirectory) ? globalThis.Boolean(object.isDirectory) : false,
|
|
9454
|
+
isSymlink: isSet(object.isSymlink) ? globalThis.Boolean(object.isSymlink) : false,
|
|
9455
|
+
isLoadedProgram: isSet(object.isLoadedProgram) ? globalThis.Boolean(object.isLoadedProgram) : false,
|
|
9456
|
+
loadedProgram: isSet(object.loadedProgram) ? globalThis.String(object.loadedProgram) : "",
|
|
9457
|
+
interpState: isSet(object.interpState) ? interpStateFromJSON(object.interpState) : 0,
|
|
9458
|
+
};
|
|
9459
|
+
},
|
|
9460
|
+
|
|
9461
|
+
toJSON(message: ResolveFileResponse): unknown {
|
|
9462
|
+
const obj: any = {};
|
|
9463
|
+
if (message.path !== "") {
|
|
9464
|
+
obj.path = message.path;
|
|
9465
|
+
}
|
|
9466
|
+
if (message.exists !== false) {
|
|
9467
|
+
obj.exists = message.exists;
|
|
9468
|
+
}
|
|
9469
|
+
if (message.isDirectory !== false) {
|
|
9470
|
+
obj.isDirectory = message.isDirectory;
|
|
9471
|
+
}
|
|
9472
|
+
if (message.isSymlink !== false) {
|
|
9473
|
+
obj.isSymlink = message.isSymlink;
|
|
9474
|
+
}
|
|
9475
|
+
if (message.isLoadedProgram !== false) {
|
|
9476
|
+
obj.isLoadedProgram = message.isLoadedProgram;
|
|
9477
|
+
}
|
|
9478
|
+
if (message.loadedProgram !== "") {
|
|
9479
|
+
obj.loadedProgram = message.loadedProgram;
|
|
9480
|
+
}
|
|
9481
|
+
if (message.interpState !== 0) {
|
|
9482
|
+
obj.interpState = interpStateToJSON(message.interpState);
|
|
9483
|
+
}
|
|
9484
|
+
return obj;
|
|
9485
|
+
},
|
|
9486
|
+
|
|
9487
|
+
create<I extends Exact<DeepPartial<ResolveFileResponse>, I>>(base?: I): ResolveFileResponse {
|
|
9488
|
+
return ResolveFileResponse.fromPartial(base ?? ({} as any));
|
|
9489
|
+
},
|
|
9490
|
+
fromPartial<I extends Exact<DeepPartial<ResolveFileResponse>, I>>(object: I): ResolveFileResponse {
|
|
9491
|
+
const message = createBaseResolveFileResponse();
|
|
9492
|
+
message.path = object.path ?? "";
|
|
9493
|
+
message.exists = object.exists ?? false;
|
|
9494
|
+
message.isDirectory = object.isDirectory ?? false;
|
|
9495
|
+
message.isSymlink = object.isSymlink ?? false;
|
|
9496
|
+
message.isLoadedProgram = object.isLoadedProgram ?? false;
|
|
9497
|
+
message.loadedProgram = object.loadedProgram ?? "";
|
|
9498
|
+
message.interpState = object.interpState ?? 0;
|
|
9499
|
+
return message;
|
|
9500
|
+
},
|
|
9501
|
+
};
|
|
9502
|
+
|
|
9503
|
+
function createBaseGetMachineConfigRequest(): GetMachineConfigRequest {
|
|
9504
|
+
return {};
|
|
9505
|
+
}
|
|
9506
|
+
|
|
9507
|
+
export const GetMachineConfigRequest: MessageFns<GetMachineConfigRequest> = {
|
|
9508
|
+
encode(_: GetMachineConfigRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9509
|
+
return writer;
|
|
9510
|
+
},
|
|
9511
|
+
|
|
9512
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetMachineConfigRequest {
|
|
9513
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9514
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9515
|
+
const message = createBaseGetMachineConfigRequest();
|
|
9516
|
+
while (reader.pos < end) {
|
|
9517
|
+
const tag = reader.uint32();
|
|
9518
|
+
switch (tag >>> 3) {
|
|
9519
|
+
}
|
|
9520
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9521
|
+
break;
|
|
9522
|
+
}
|
|
9523
|
+
reader.skip(tag & 7);
|
|
9524
|
+
}
|
|
9525
|
+
return message;
|
|
9526
|
+
},
|
|
9527
|
+
|
|
9528
|
+
fromJSON(_: any): GetMachineConfigRequest {
|
|
9529
|
+
return {};
|
|
9530
|
+
},
|
|
9531
|
+
|
|
9532
|
+
toJSON(_: GetMachineConfigRequest): unknown {
|
|
9533
|
+
const obj: any = {};
|
|
9534
|
+
return obj;
|
|
9535
|
+
},
|
|
9536
|
+
|
|
9537
|
+
create<I extends Exact<DeepPartial<GetMachineConfigRequest>, I>>(base?: I): GetMachineConfigRequest {
|
|
9538
|
+
return GetMachineConfigRequest.fromPartial(base ?? ({} as any));
|
|
9539
|
+
},
|
|
9540
|
+
fromPartial<I extends Exact<DeepPartial<GetMachineConfigRequest>, I>>(_: I): GetMachineConfigRequest {
|
|
9541
|
+
const message = createBaseGetMachineConfigRequest();
|
|
9542
|
+
return message;
|
|
9543
|
+
},
|
|
9544
|
+
};
|
|
9545
|
+
|
|
9546
|
+
function createBaseJointConfig(): JointConfig {
|
|
9547
|
+
return {
|
|
9548
|
+
jointNumber: 0,
|
|
9549
|
+
jointType: 0,
|
|
9550
|
+
axisLetter: "",
|
|
9551
|
+
minLimit: 0,
|
|
9552
|
+
maxLimit: 0,
|
|
9553
|
+
maxVelocity: 0,
|
|
9554
|
+
maxAcceleration: 0,
|
|
9555
|
+
homeSequence: undefined,
|
|
9556
|
+
units: 0,
|
|
9557
|
+
};
|
|
9558
|
+
}
|
|
9559
|
+
|
|
9560
|
+
export const JointConfig: MessageFns<JointConfig> = {
|
|
9561
|
+
encode(message: JointConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9562
|
+
if (message.jointNumber !== 0) {
|
|
9563
|
+
writer.uint32(8).int32(message.jointNumber);
|
|
9564
|
+
}
|
|
9565
|
+
if (message.jointType !== 0) {
|
|
9566
|
+
writer.uint32(16).int32(message.jointType);
|
|
9567
|
+
}
|
|
9568
|
+
if (message.axisLetter !== "") {
|
|
9569
|
+
writer.uint32(26).string(message.axisLetter);
|
|
9570
|
+
}
|
|
9571
|
+
if (message.minLimit !== 0) {
|
|
9572
|
+
writer.uint32(33).double(message.minLimit);
|
|
9573
|
+
}
|
|
9574
|
+
if (message.maxLimit !== 0) {
|
|
9575
|
+
writer.uint32(41).double(message.maxLimit);
|
|
9576
|
+
}
|
|
9577
|
+
if (message.maxVelocity !== 0) {
|
|
9578
|
+
writer.uint32(49).double(message.maxVelocity);
|
|
9579
|
+
}
|
|
9580
|
+
if (message.maxAcceleration !== 0) {
|
|
9581
|
+
writer.uint32(57).double(message.maxAcceleration);
|
|
9582
|
+
}
|
|
9583
|
+
if (message.homeSequence !== undefined) {
|
|
9584
|
+
writer.uint32(64).int32(message.homeSequence);
|
|
9585
|
+
}
|
|
9586
|
+
if (message.units !== 0) {
|
|
9587
|
+
writer.uint32(73).double(message.units);
|
|
9588
|
+
}
|
|
9589
|
+
return writer;
|
|
9590
|
+
},
|
|
9591
|
+
|
|
9592
|
+
decode(input: BinaryReader | Uint8Array, length?: number): JointConfig {
|
|
9593
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9594
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9595
|
+
const message = createBaseJointConfig();
|
|
9596
|
+
while (reader.pos < end) {
|
|
9597
|
+
const tag = reader.uint32();
|
|
9598
|
+
switch (tag >>> 3) {
|
|
9599
|
+
case 1: {
|
|
9600
|
+
if (tag !== 8) {
|
|
9601
|
+
break;
|
|
9602
|
+
}
|
|
9603
|
+
|
|
9604
|
+
message.jointNumber = reader.int32();
|
|
9605
|
+
continue;
|
|
9606
|
+
}
|
|
9607
|
+
case 2: {
|
|
9608
|
+
if (tag !== 16) {
|
|
9609
|
+
break;
|
|
9610
|
+
}
|
|
9611
|
+
|
|
9612
|
+
message.jointType = reader.int32() as any;
|
|
9613
|
+
continue;
|
|
9614
|
+
}
|
|
9615
|
+
case 3: {
|
|
9616
|
+
if (tag !== 26) {
|
|
9617
|
+
break;
|
|
9618
|
+
}
|
|
9619
|
+
|
|
9620
|
+
message.axisLetter = reader.string();
|
|
9621
|
+
continue;
|
|
9622
|
+
}
|
|
9623
|
+
case 4: {
|
|
9624
|
+
if (tag !== 33) {
|
|
9625
|
+
break;
|
|
9626
|
+
}
|
|
9627
|
+
|
|
9628
|
+
message.minLimit = reader.double();
|
|
9629
|
+
continue;
|
|
9630
|
+
}
|
|
9631
|
+
case 5: {
|
|
9632
|
+
if (tag !== 41) {
|
|
9633
|
+
break;
|
|
9634
|
+
}
|
|
9635
|
+
|
|
9636
|
+
message.maxLimit = reader.double();
|
|
9637
|
+
continue;
|
|
9638
|
+
}
|
|
9639
|
+
case 6: {
|
|
9640
|
+
if (tag !== 49) {
|
|
9641
|
+
break;
|
|
9642
|
+
}
|
|
9643
|
+
|
|
9644
|
+
message.maxVelocity = reader.double();
|
|
9645
|
+
continue;
|
|
9646
|
+
}
|
|
9647
|
+
case 7: {
|
|
9648
|
+
if (tag !== 57) {
|
|
9649
|
+
break;
|
|
9650
|
+
}
|
|
9651
|
+
|
|
9652
|
+
message.maxAcceleration = reader.double();
|
|
9653
|
+
continue;
|
|
9654
|
+
}
|
|
9655
|
+
case 8: {
|
|
9656
|
+
if (tag !== 64) {
|
|
9657
|
+
break;
|
|
9658
|
+
}
|
|
9659
|
+
|
|
9660
|
+
message.homeSequence = reader.int32();
|
|
9661
|
+
continue;
|
|
9662
|
+
}
|
|
9663
|
+
case 9: {
|
|
9664
|
+
if (tag !== 73) {
|
|
9665
|
+
break;
|
|
9666
|
+
}
|
|
9667
|
+
|
|
9668
|
+
message.units = reader.double();
|
|
9669
|
+
continue;
|
|
9670
|
+
}
|
|
9671
|
+
}
|
|
9672
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9673
|
+
break;
|
|
9674
|
+
}
|
|
9675
|
+
reader.skip(tag & 7);
|
|
9676
|
+
}
|
|
9677
|
+
return message;
|
|
9678
|
+
},
|
|
9679
|
+
|
|
9680
|
+
fromJSON(object: any): JointConfig {
|
|
9681
|
+
return {
|
|
9682
|
+
jointNumber: isSet(object.jointNumber) ? globalThis.Number(object.jointNumber) : 0,
|
|
9683
|
+
jointType: isSet(object.jointType) ? jointTypeFromJSON(object.jointType) : 0,
|
|
9684
|
+
axisLetter: isSet(object.axisLetter) ? globalThis.String(object.axisLetter) : "",
|
|
9685
|
+
minLimit: isSet(object.minLimit) ? globalThis.Number(object.minLimit) : 0,
|
|
9686
|
+
maxLimit: isSet(object.maxLimit) ? globalThis.Number(object.maxLimit) : 0,
|
|
9687
|
+
maxVelocity: isSet(object.maxVelocity) ? globalThis.Number(object.maxVelocity) : 0,
|
|
9688
|
+
maxAcceleration: isSet(object.maxAcceleration) ? globalThis.Number(object.maxAcceleration) : 0,
|
|
9689
|
+
homeSequence: isSet(object.homeSequence) ? globalThis.Number(object.homeSequence) : undefined,
|
|
9690
|
+
units: isSet(object.units) ? globalThis.Number(object.units) : 0,
|
|
9691
|
+
};
|
|
9692
|
+
},
|
|
9693
|
+
|
|
9694
|
+
toJSON(message: JointConfig): unknown {
|
|
9695
|
+
const obj: any = {};
|
|
9696
|
+
if (message.jointNumber !== 0) {
|
|
9697
|
+
obj.jointNumber = Math.round(message.jointNumber);
|
|
9698
|
+
}
|
|
9699
|
+
if (message.jointType !== 0) {
|
|
9700
|
+
obj.jointType = jointTypeToJSON(message.jointType);
|
|
9701
|
+
}
|
|
9702
|
+
if (message.axisLetter !== "") {
|
|
9703
|
+
obj.axisLetter = message.axisLetter;
|
|
9704
|
+
}
|
|
9705
|
+
if (message.minLimit !== 0) {
|
|
9706
|
+
obj.minLimit = message.minLimit;
|
|
9707
|
+
}
|
|
9708
|
+
if (message.maxLimit !== 0) {
|
|
9709
|
+
obj.maxLimit = message.maxLimit;
|
|
9710
|
+
}
|
|
9711
|
+
if (message.maxVelocity !== 0) {
|
|
9712
|
+
obj.maxVelocity = message.maxVelocity;
|
|
9713
|
+
}
|
|
9714
|
+
if (message.maxAcceleration !== 0) {
|
|
9715
|
+
obj.maxAcceleration = message.maxAcceleration;
|
|
9716
|
+
}
|
|
9717
|
+
if (message.homeSequence !== undefined) {
|
|
9718
|
+
obj.homeSequence = Math.round(message.homeSequence);
|
|
9719
|
+
}
|
|
9720
|
+
if (message.units !== 0) {
|
|
9721
|
+
obj.units = message.units;
|
|
9722
|
+
}
|
|
9723
|
+
return obj;
|
|
9724
|
+
},
|
|
9725
|
+
|
|
9726
|
+
create<I extends Exact<DeepPartial<JointConfig>, I>>(base?: I): JointConfig {
|
|
9727
|
+
return JointConfig.fromPartial(base ?? ({} as any));
|
|
9728
|
+
},
|
|
9729
|
+
fromPartial<I extends Exact<DeepPartial<JointConfig>, I>>(object: I): JointConfig {
|
|
9730
|
+
const message = createBaseJointConfig();
|
|
9731
|
+
message.jointNumber = object.jointNumber ?? 0;
|
|
9732
|
+
message.jointType = object.jointType ?? 0;
|
|
9733
|
+
message.axisLetter = object.axisLetter ?? "";
|
|
9734
|
+
message.minLimit = object.minLimit ?? 0;
|
|
9735
|
+
message.maxLimit = object.maxLimit ?? 0;
|
|
9736
|
+
message.maxVelocity = object.maxVelocity ?? 0;
|
|
9737
|
+
message.maxAcceleration = object.maxAcceleration ?? 0;
|
|
9738
|
+
message.homeSequence = object.homeSequence ?? undefined;
|
|
9739
|
+
message.units = object.units ?? 0;
|
|
9740
|
+
return message;
|
|
9741
|
+
},
|
|
9742
|
+
};
|
|
9743
|
+
|
|
9744
|
+
function createBaseAxisConfig(): AxisConfig {
|
|
9745
|
+
return { axisNumber: 0, letter: "", minLimit: 0, maxLimit: 0, maxVelocity: 0, maxAcceleration: 0, joints: [] };
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
export const AxisConfig: MessageFns<AxisConfig> = {
|
|
9749
|
+
encode(message: AxisConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9750
|
+
if (message.axisNumber !== 0) {
|
|
9751
|
+
writer.uint32(8).int32(message.axisNumber);
|
|
9752
|
+
}
|
|
9753
|
+
if (message.letter !== "") {
|
|
9754
|
+
writer.uint32(18).string(message.letter);
|
|
9755
|
+
}
|
|
9756
|
+
if (message.minLimit !== 0) {
|
|
9757
|
+
writer.uint32(25).double(message.minLimit);
|
|
9758
|
+
}
|
|
9759
|
+
if (message.maxLimit !== 0) {
|
|
9760
|
+
writer.uint32(33).double(message.maxLimit);
|
|
9761
|
+
}
|
|
9762
|
+
if (message.maxVelocity !== 0) {
|
|
9763
|
+
writer.uint32(41).double(message.maxVelocity);
|
|
9764
|
+
}
|
|
9765
|
+
if (message.maxAcceleration !== 0) {
|
|
9766
|
+
writer.uint32(49).double(message.maxAcceleration);
|
|
9767
|
+
}
|
|
9768
|
+
writer.uint32(58).fork();
|
|
9769
|
+
for (const v of message.joints) {
|
|
9770
|
+
writer.int32(v);
|
|
9771
|
+
}
|
|
9772
|
+
writer.join();
|
|
9773
|
+
return writer;
|
|
9774
|
+
},
|
|
9775
|
+
|
|
9776
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AxisConfig {
|
|
9777
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
9778
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
9779
|
+
const message = createBaseAxisConfig();
|
|
9780
|
+
while (reader.pos < end) {
|
|
9781
|
+
const tag = reader.uint32();
|
|
9782
|
+
switch (tag >>> 3) {
|
|
9783
|
+
case 1: {
|
|
9784
|
+
if (tag !== 8) {
|
|
9785
|
+
break;
|
|
9786
|
+
}
|
|
9787
|
+
|
|
9788
|
+
message.axisNumber = reader.int32();
|
|
9789
|
+
continue;
|
|
9790
|
+
}
|
|
9791
|
+
case 2: {
|
|
9792
|
+
if (tag !== 18) {
|
|
9793
|
+
break;
|
|
9794
|
+
}
|
|
9795
|
+
|
|
9796
|
+
message.letter = reader.string();
|
|
9797
|
+
continue;
|
|
9798
|
+
}
|
|
9799
|
+
case 3: {
|
|
9800
|
+
if (tag !== 25) {
|
|
9801
|
+
break;
|
|
9802
|
+
}
|
|
9803
|
+
|
|
9804
|
+
message.minLimit = reader.double();
|
|
9805
|
+
continue;
|
|
9806
|
+
}
|
|
9807
|
+
case 4: {
|
|
9808
|
+
if (tag !== 33) {
|
|
9809
|
+
break;
|
|
9810
|
+
}
|
|
9811
|
+
|
|
9812
|
+
message.maxLimit = reader.double();
|
|
9813
|
+
continue;
|
|
9814
|
+
}
|
|
9815
|
+
case 5: {
|
|
9816
|
+
if (tag !== 41) {
|
|
9817
|
+
break;
|
|
9818
|
+
}
|
|
9819
|
+
|
|
9820
|
+
message.maxVelocity = reader.double();
|
|
9821
|
+
continue;
|
|
9822
|
+
}
|
|
9823
|
+
case 6: {
|
|
9824
|
+
if (tag !== 49) {
|
|
9825
|
+
break;
|
|
9826
|
+
}
|
|
9827
|
+
|
|
9828
|
+
message.maxAcceleration = reader.double();
|
|
9829
|
+
continue;
|
|
9830
|
+
}
|
|
9831
|
+
case 7: {
|
|
9832
|
+
if (tag === 56) {
|
|
9833
|
+
message.joints.push(reader.int32());
|
|
9834
|
+
|
|
9835
|
+
continue;
|
|
9836
|
+
}
|
|
9837
|
+
|
|
9838
|
+
if (tag === 58) {
|
|
9839
|
+
const end2 = reader.uint32() + reader.pos;
|
|
9840
|
+
while (reader.pos < end2) {
|
|
9841
|
+
message.joints.push(reader.int32());
|
|
9842
|
+
}
|
|
9843
|
+
|
|
9844
|
+
continue;
|
|
9845
|
+
}
|
|
9846
|
+
|
|
9847
|
+
break;
|
|
9848
|
+
}
|
|
9849
|
+
}
|
|
9850
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
9851
|
+
break;
|
|
9852
|
+
}
|
|
9853
|
+
reader.skip(tag & 7);
|
|
9854
|
+
}
|
|
9855
|
+
return message;
|
|
9856
|
+
},
|
|
9857
|
+
|
|
9858
|
+
fromJSON(object: any): AxisConfig {
|
|
9859
|
+
return {
|
|
9860
|
+
axisNumber: isSet(object.axisNumber) ? globalThis.Number(object.axisNumber) : 0,
|
|
9861
|
+
letter: isSet(object.letter) ? globalThis.String(object.letter) : "",
|
|
9862
|
+
minLimit: isSet(object.minLimit) ? globalThis.Number(object.minLimit) : 0,
|
|
9863
|
+
maxLimit: isSet(object.maxLimit) ? globalThis.Number(object.maxLimit) : 0,
|
|
9864
|
+
maxVelocity: isSet(object.maxVelocity) ? globalThis.Number(object.maxVelocity) : 0,
|
|
9865
|
+
maxAcceleration: isSet(object.maxAcceleration) ? globalThis.Number(object.maxAcceleration) : 0,
|
|
9866
|
+
joints: globalThis.Array.isArray(object?.joints) ? object.joints.map((e: any) => globalThis.Number(e)) : [],
|
|
9867
|
+
};
|
|
9868
|
+
},
|
|
9869
|
+
|
|
9870
|
+
toJSON(message: AxisConfig): unknown {
|
|
9871
|
+
const obj: any = {};
|
|
9872
|
+
if (message.axisNumber !== 0) {
|
|
9873
|
+
obj.axisNumber = Math.round(message.axisNumber);
|
|
9874
|
+
}
|
|
9875
|
+
if (message.letter !== "") {
|
|
9876
|
+
obj.letter = message.letter;
|
|
9877
|
+
}
|
|
9878
|
+
if (message.minLimit !== 0) {
|
|
9879
|
+
obj.minLimit = message.minLimit;
|
|
9880
|
+
}
|
|
9881
|
+
if (message.maxLimit !== 0) {
|
|
9882
|
+
obj.maxLimit = message.maxLimit;
|
|
9883
|
+
}
|
|
9884
|
+
if (message.maxVelocity !== 0) {
|
|
9885
|
+
obj.maxVelocity = message.maxVelocity;
|
|
9886
|
+
}
|
|
9887
|
+
if (message.maxAcceleration !== 0) {
|
|
9888
|
+
obj.maxAcceleration = message.maxAcceleration;
|
|
9889
|
+
}
|
|
9890
|
+
if (message.joints?.length) {
|
|
9891
|
+
obj.joints = message.joints.map((e) => Math.round(e));
|
|
9892
|
+
}
|
|
9893
|
+
return obj;
|
|
9894
|
+
},
|
|
9895
|
+
|
|
9896
|
+
create<I extends Exact<DeepPartial<AxisConfig>, I>>(base?: I): AxisConfig {
|
|
9897
|
+
return AxisConfig.fromPartial(base ?? ({} as any));
|
|
9898
|
+
},
|
|
9899
|
+
fromPartial<I extends Exact<DeepPartial<AxisConfig>, I>>(object: I): AxisConfig {
|
|
9900
|
+
const message = createBaseAxisConfig();
|
|
9901
|
+
message.axisNumber = object.axisNumber ?? 0;
|
|
9902
|
+
message.letter = object.letter ?? "";
|
|
9903
|
+
message.minLimit = object.minLimit ?? 0;
|
|
9904
|
+
message.maxLimit = object.maxLimit ?? 0;
|
|
9905
|
+
message.maxVelocity = object.maxVelocity ?? 0;
|
|
9906
|
+
message.maxAcceleration = object.maxAcceleration ?? 0;
|
|
9907
|
+
message.joints = object.joints?.map((e) => e) || [];
|
|
9908
|
+
return message;
|
|
9909
|
+
},
|
|
9910
|
+
};
|
|
9911
|
+
|
|
9912
|
+
function createBaseMachineConfig(): MachineConfig {
|
|
9913
|
+
return {
|
|
9914
|
+
iniFilename: "",
|
|
9915
|
+
iniReadable: false,
|
|
9916
|
+
machineName: "",
|
|
9917
|
+
kinematics: "",
|
|
9918
|
+
kinematicsModule: "",
|
|
9919
|
+
kinematicsType: 0,
|
|
9920
|
+
coordinates: "",
|
|
9921
|
+
axisMask: 0,
|
|
9922
|
+
jointCount: 0,
|
|
9923
|
+
spindleCount: 0,
|
|
9924
|
+
jointAxisMappingKnown: false,
|
|
9925
|
+
linearUnits: 0,
|
|
9926
|
+
angularUnits: 0,
|
|
9927
|
+
linearUnitsName: "",
|
|
9928
|
+
angularUnitsName: "",
|
|
9929
|
+
maxLinearVelocity: 0,
|
|
9930
|
+
defaultLinearVelocity: 0,
|
|
9931
|
+
maxAngularVelocity: 0,
|
|
9932
|
+
defaultAngularVelocity: 0,
|
|
9933
|
+
lathe: false,
|
|
9934
|
+
backToolLathe: false,
|
|
9935
|
+
maxFeedOverride: 0,
|
|
9936
|
+
minSpindleOverride: 0,
|
|
9937
|
+
maxSpindleOverride: 0,
|
|
9938
|
+
ncFilesDirectory: "",
|
|
9939
|
+
joints: [],
|
|
9940
|
+
axes: [],
|
|
9941
|
+
};
|
|
9942
|
+
}
|
|
9943
|
+
|
|
9944
|
+
export const MachineConfig: MessageFns<MachineConfig> = {
|
|
9945
|
+
encode(message: MachineConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
9946
|
+
if (message.iniFilename !== "") {
|
|
9947
|
+
writer.uint32(10).string(message.iniFilename);
|
|
9948
|
+
}
|
|
9949
|
+
if (message.iniReadable !== false) {
|
|
9950
|
+
writer.uint32(16).bool(message.iniReadable);
|
|
9951
|
+
}
|
|
9952
|
+
if (message.machineName !== "") {
|
|
9953
|
+
writer.uint32(26).string(message.machineName);
|
|
9954
|
+
}
|
|
9955
|
+
if (message.kinematics !== "") {
|
|
9956
|
+
writer.uint32(34).string(message.kinematics);
|
|
9957
|
+
}
|
|
9958
|
+
if (message.kinematicsModule !== "") {
|
|
9959
|
+
writer.uint32(42).string(message.kinematicsModule);
|
|
9960
|
+
}
|
|
9961
|
+
if (message.kinematicsType !== 0) {
|
|
9962
|
+
writer.uint32(48).int32(message.kinematicsType);
|
|
9963
|
+
}
|
|
9964
|
+
if (message.coordinates !== "") {
|
|
9965
|
+
writer.uint32(58).string(message.coordinates);
|
|
9966
|
+
}
|
|
9967
|
+
if (message.axisMask !== 0) {
|
|
9968
|
+
writer.uint32(64).int32(message.axisMask);
|
|
9969
|
+
}
|
|
9970
|
+
if (message.jointCount !== 0) {
|
|
9971
|
+
writer.uint32(72).int32(message.jointCount);
|
|
9972
|
+
}
|
|
9973
|
+
if (message.spindleCount !== 0) {
|
|
9974
|
+
writer.uint32(80).int32(message.spindleCount);
|
|
9975
|
+
}
|
|
9976
|
+
if (message.jointAxisMappingKnown !== false) {
|
|
9977
|
+
writer.uint32(88).bool(message.jointAxisMappingKnown);
|
|
9978
|
+
}
|
|
9979
|
+
if (message.linearUnits !== 0) {
|
|
9980
|
+
writer.uint32(97).double(message.linearUnits);
|
|
9981
|
+
}
|
|
9982
|
+
if (message.angularUnits !== 0) {
|
|
9983
|
+
writer.uint32(105).double(message.angularUnits);
|
|
9984
|
+
}
|
|
9985
|
+
if (message.linearUnitsName !== "") {
|
|
9986
|
+
writer.uint32(114).string(message.linearUnitsName);
|
|
9987
|
+
}
|
|
9988
|
+
if (message.angularUnitsName !== "") {
|
|
9989
|
+
writer.uint32(122).string(message.angularUnitsName);
|
|
9990
|
+
}
|
|
9991
|
+
if (message.maxLinearVelocity !== 0) {
|
|
9992
|
+
writer.uint32(129).double(message.maxLinearVelocity);
|
|
9993
|
+
}
|
|
9994
|
+
if (message.defaultLinearVelocity !== 0) {
|
|
9995
|
+
writer.uint32(137).double(message.defaultLinearVelocity);
|
|
9996
|
+
}
|
|
9997
|
+
if (message.maxAngularVelocity !== 0) {
|
|
9998
|
+
writer.uint32(145).double(message.maxAngularVelocity);
|
|
9999
|
+
}
|
|
10000
|
+
if (message.defaultAngularVelocity !== 0) {
|
|
10001
|
+
writer.uint32(153).double(message.defaultAngularVelocity);
|
|
10002
|
+
}
|
|
10003
|
+
if (message.lathe !== false) {
|
|
10004
|
+
writer.uint32(160).bool(message.lathe);
|
|
10005
|
+
}
|
|
10006
|
+
if (message.backToolLathe !== false) {
|
|
10007
|
+
writer.uint32(168).bool(message.backToolLathe);
|
|
10008
|
+
}
|
|
10009
|
+
if (message.maxFeedOverride !== 0) {
|
|
10010
|
+
writer.uint32(177).double(message.maxFeedOverride);
|
|
10011
|
+
}
|
|
10012
|
+
if (message.minSpindleOverride !== 0) {
|
|
10013
|
+
writer.uint32(185).double(message.minSpindleOverride);
|
|
10014
|
+
}
|
|
10015
|
+
if (message.maxSpindleOverride !== 0) {
|
|
10016
|
+
writer.uint32(193).double(message.maxSpindleOverride);
|
|
10017
|
+
}
|
|
10018
|
+
if (message.ncFilesDirectory !== "") {
|
|
10019
|
+
writer.uint32(202).string(message.ncFilesDirectory);
|
|
10020
|
+
}
|
|
10021
|
+
for (const v of message.joints) {
|
|
10022
|
+
JointConfig.encode(v!, writer.uint32(242).fork()).join();
|
|
10023
|
+
}
|
|
10024
|
+
for (const v of message.axes) {
|
|
10025
|
+
AxisConfig.encode(v!, writer.uint32(250).fork()).join();
|
|
10026
|
+
}
|
|
10027
|
+
return writer;
|
|
10028
|
+
},
|
|
10029
|
+
|
|
10030
|
+
decode(input: BinaryReader | Uint8Array, length?: number): MachineConfig {
|
|
10031
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
10032
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
10033
|
+
const message = createBaseMachineConfig();
|
|
10034
|
+
while (reader.pos < end) {
|
|
10035
|
+
const tag = reader.uint32();
|
|
10036
|
+
switch (tag >>> 3) {
|
|
10037
|
+
case 1: {
|
|
10038
|
+
if (tag !== 10) {
|
|
10039
|
+
break;
|
|
10040
|
+
}
|
|
10041
|
+
|
|
10042
|
+
message.iniFilename = reader.string();
|
|
10043
|
+
continue;
|
|
10044
|
+
}
|
|
10045
|
+
case 2: {
|
|
10046
|
+
if (tag !== 16) {
|
|
10047
|
+
break;
|
|
10048
|
+
}
|
|
10049
|
+
|
|
10050
|
+
message.iniReadable = reader.bool();
|
|
10051
|
+
continue;
|
|
10052
|
+
}
|
|
10053
|
+
case 3: {
|
|
10054
|
+
if (tag !== 26) {
|
|
10055
|
+
break;
|
|
10056
|
+
}
|
|
10057
|
+
|
|
10058
|
+
message.machineName = reader.string();
|
|
10059
|
+
continue;
|
|
10060
|
+
}
|
|
10061
|
+
case 4: {
|
|
10062
|
+
if (tag !== 34) {
|
|
10063
|
+
break;
|
|
10064
|
+
}
|
|
10065
|
+
|
|
10066
|
+
message.kinematics = reader.string();
|
|
10067
|
+
continue;
|
|
10068
|
+
}
|
|
10069
|
+
case 5: {
|
|
10070
|
+
if (tag !== 42) {
|
|
10071
|
+
break;
|
|
10072
|
+
}
|
|
10073
|
+
|
|
10074
|
+
message.kinematicsModule = reader.string();
|
|
10075
|
+
continue;
|
|
10076
|
+
}
|
|
10077
|
+
case 6: {
|
|
10078
|
+
if (tag !== 48) {
|
|
10079
|
+
break;
|
|
10080
|
+
}
|
|
10081
|
+
|
|
10082
|
+
message.kinematicsType = reader.int32() as any;
|
|
10083
|
+
continue;
|
|
10084
|
+
}
|
|
10085
|
+
case 7: {
|
|
10086
|
+
if (tag !== 58) {
|
|
10087
|
+
break;
|
|
10088
|
+
}
|
|
10089
|
+
|
|
10090
|
+
message.coordinates = reader.string();
|
|
10091
|
+
continue;
|
|
10092
|
+
}
|
|
10093
|
+
case 8: {
|
|
10094
|
+
if (tag !== 64) {
|
|
10095
|
+
break;
|
|
10096
|
+
}
|
|
10097
|
+
|
|
10098
|
+
message.axisMask = reader.int32();
|
|
10099
|
+
continue;
|
|
10100
|
+
}
|
|
10101
|
+
case 9: {
|
|
10102
|
+
if (tag !== 72) {
|
|
10103
|
+
break;
|
|
10104
|
+
}
|
|
10105
|
+
|
|
10106
|
+
message.jointCount = reader.int32();
|
|
10107
|
+
continue;
|
|
10108
|
+
}
|
|
10109
|
+
case 10: {
|
|
10110
|
+
if (tag !== 80) {
|
|
10111
|
+
break;
|
|
10112
|
+
}
|
|
10113
|
+
|
|
10114
|
+
message.spindleCount = reader.int32();
|
|
10115
|
+
continue;
|
|
10116
|
+
}
|
|
10117
|
+
case 11: {
|
|
10118
|
+
if (tag !== 88) {
|
|
10119
|
+
break;
|
|
10120
|
+
}
|
|
10121
|
+
|
|
10122
|
+
message.jointAxisMappingKnown = reader.bool();
|
|
10123
|
+
continue;
|
|
10124
|
+
}
|
|
10125
|
+
case 12: {
|
|
10126
|
+
if (tag !== 97) {
|
|
10127
|
+
break;
|
|
10128
|
+
}
|
|
10129
|
+
|
|
10130
|
+
message.linearUnits = reader.double();
|
|
10131
|
+
continue;
|
|
10132
|
+
}
|
|
10133
|
+
case 13: {
|
|
10134
|
+
if (tag !== 105) {
|
|
10135
|
+
break;
|
|
10136
|
+
}
|
|
10137
|
+
|
|
10138
|
+
message.angularUnits = reader.double();
|
|
10139
|
+
continue;
|
|
10140
|
+
}
|
|
10141
|
+
case 14: {
|
|
10142
|
+
if (tag !== 114) {
|
|
10143
|
+
break;
|
|
10144
|
+
}
|
|
10145
|
+
|
|
10146
|
+
message.linearUnitsName = reader.string();
|
|
10147
|
+
continue;
|
|
10148
|
+
}
|
|
10149
|
+
case 15: {
|
|
10150
|
+
if (tag !== 122) {
|
|
10151
|
+
break;
|
|
10152
|
+
}
|
|
10153
|
+
|
|
10154
|
+
message.angularUnitsName = reader.string();
|
|
10155
|
+
continue;
|
|
10156
|
+
}
|
|
10157
|
+
case 16: {
|
|
10158
|
+
if (tag !== 129) {
|
|
10159
|
+
break;
|
|
10160
|
+
}
|
|
10161
|
+
|
|
10162
|
+
message.maxLinearVelocity = reader.double();
|
|
10163
|
+
continue;
|
|
10164
|
+
}
|
|
10165
|
+
case 17: {
|
|
10166
|
+
if (tag !== 137) {
|
|
10167
|
+
break;
|
|
10168
|
+
}
|
|
10169
|
+
|
|
10170
|
+
message.defaultLinearVelocity = reader.double();
|
|
10171
|
+
continue;
|
|
10172
|
+
}
|
|
10173
|
+
case 18: {
|
|
10174
|
+
if (tag !== 145) {
|
|
10175
|
+
break;
|
|
10176
|
+
}
|
|
10177
|
+
|
|
10178
|
+
message.maxAngularVelocity = reader.double();
|
|
10179
|
+
continue;
|
|
10180
|
+
}
|
|
10181
|
+
case 19: {
|
|
10182
|
+
if (tag !== 153) {
|
|
10183
|
+
break;
|
|
10184
|
+
}
|
|
10185
|
+
|
|
10186
|
+
message.defaultAngularVelocity = reader.double();
|
|
10187
|
+
continue;
|
|
10188
|
+
}
|
|
10189
|
+
case 20: {
|
|
10190
|
+
if (tag !== 160) {
|
|
10191
|
+
break;
|
|
10192
|
+
}
|
|
10193
|
+
|
|
10194
|
+
message.lathe = reader.bool();
|
|
10195
|
+
continue;
|
|
10196
|
+
}
|
|
10197
|
+
case 21: {
|
|
10198
|
+
if (tag !== 168) {
|
|
10199
|
+
break;
|
|
10200
|
+
}
|
|
10201
|
+
|
|
10202
|
+
message.backToolLathe = reader.bool();
|
|
10203
|
+
continue;
|
|
10204
|
+
}
|
|
10205
|
+
case 22: {
|
|
10206
|
+
if (tag !== 177) {
|
|
10207
|
+
break;
|
|
10208
|
+
}
|
|
10209
|
+
|
|
10210
|
+
message.maxFeedOverride = reader.double();
|
|
10211
|
+
continue;
|
|
10212
|
+
}
|
|
10213
|
+
case 23: {
|
|
10214
|
+
if (tag !== 185) {
|
|
10215
|
+
break;
|
|
10216
|
+
}
|
|
10217
|
+
|
|
10218
|
+
message.minSpindleOverride = reader.double();
|
|
10219
|
+
continue;
|
|
10220
|
+
}
|
|
10221
|
+
case 24: {
|
|
10222
|
+
if (tag !== 193) {
|
|
10223
|
+
break;
|
|
10224
|
+
}
|
|
10225
|
+
|
|
10226
|
+
message.maxSpindleOverride = reader.double();
|
|
10227
|
+
continue;
|
|
10228
|
+
}
|
|
10229
|
+
case 25: {
|
|
10230
|
+
if (tag !== 202) {
|
|
10231
|
+
break;
|
|
10232
|
+
}
|
|
10233
|
+
|
|
10234
|
+
message.ncFilesDirectory = reader.string();
|
|
10235
|
+
continue;
|
|
10236
|
+
}
|
|
10237
|
+
case 30: {
|
|
10238
|
+
if (tag !== 242) {
|
|
10239
|
+
break;
|
|
10240
|
+
}
|
|
10241
|
+
|
|
10242
|
+
message.joints.push(JointConfig.decode(reader, reader.uint32()));
|
|
10243
|
+
continue;
|
|
10244
|
+
}
|
|
10245
|
+
case 31: {
|
|
10246
|
+
if (tag !== 250) {
|
|
10247
|
+
break;
|
|
10248
|
+
}
|
|
10249
|
+
|
|
10250
|
+
message.axes.push(AxisConfig.decode(reader, reader.uint32()));
|
|
10251
|
+
continue;
|
|
10252
|
+
}
|
|
10253
|
+
}
|
|
10254
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
10255
|
+
break;
|
|
10256
|
+
}
|
|
10257
|
+
reader.skip(tag & 7);
|
|
10258
|
+
}
|
|
10259
|
+
return message;
|
|
10260
|
+
},
|
|
10261
|
+
|
|
10262
|
+
fromJSON(object: any): MachineConfig {
|
|
10263
|
+
return {
|
|
10264
|
+
iniFilename: isSet(object.iniFilename) ? globalThis.String(object.iniFilename) : "",
|
|
10265
|
+
iniReadable: isSet(object.iniReadable) ? globalThis.Boolean(object.iniReadable) : false,
|
|
10266
|
+
machineName: isSet(object.machineName) ? globalThis.String(object.machineName) : "",
|
|
10267
|
+
kinematics: isSet(object.kinematics) ? globalThis.String(object.kinematics) : "",
|
|
10268
|
+
kinematicsModule: isSet(object.kinematicsModule) ? globalThis.String(object.kinematicsModule) : "",
|
|
10269
|
+
kinematicsType: isSet(object.kinematicsType) ? kinematicsTypeFromJSON(object.kinematicsType) : 0,
|
|
10270
|
+
coordinates: isSet(object.coordinates) ? globalThis.String(object.coordinates) : "",
|
|
10271
|
+
axisMask: isSet(object.axisMask) ? globalThis.Number(object.axisMask) : 0,
|
|
10272
|
+
jointCount: isSet(object.jointCount) ? globalThis.Number(object.jointCount) : 0,
|
|
10273
|
+
spindleCount: isSet(object.spindleCount) ? globalThis.Number(object.spindleCount) : 0,
|
|
10274
|
+
jointAxisMappingKnown: isSet(object.jointAxisMappingKnown)
|
|
10275
|
+
? globalThis.Boolean(object.jointAxisMappingKnown)
|
|
10276
|
+
: false,
|
|
10277
|
+
linearUnits: isSet(object.linearUnits) ? globalThis.Number(object.linearUnits) : 0,
|
|
10278
|
+
angularUnits: isSet(object.angularUnits) ? globalThis.Number(object.angularUnits) : 0,
|
|
10279
|
+
linearUnitsName: isSet(object.linearUnitsName) ? globalThis.String(object.linearUnitsName) : "",
|
|
10280
|
+
angularUnitsName: isSet(object.angularUnitsName) ? globalThis.String(object.angularUnitsName) : "",
|
|
10281
|
+
maxLinearVelocity: isSet(object.maxLinearVelocity) ? globalThis.Number(object.maxLinearVelocity) : 0,
|
|
10282
|
+
defaultLinearVelocity: isSet(object.defaultLinearVelocity) ? globalThis.Number(object.defaultLinearVelocity) : 0,
|
|
10283
|
+
maxAngularVelocity: isSet(object.maxAngularVelocity) ? globalThis.Number(object.maxAngularVelocity) : 0,
|
|
10284
|
+
defaultAngularVelocity: isSet(object.defaultAngularVelocity)
|
|
10285
|
+
? globalThis.Number(object.defaultAngularVelocity)
|
|
10286
|
+
: 0,
|
|
10287
|
+
lathe: isSet(object.lathe) ? globalThis.Boolean(object.lathe) : false,
|
|
10288
|
+
backToolLathe: isSet(object.backToolLathe) ? globalThis.Boolean(object.backToolLathe) : false,
|
|
10289
|
+
maxFeedOverride: isSet(object.maxFeedOverride) ? globalThis.Number(object.maxFeedOverride) : 0,
|
|
10290
|
+
minSpindleOverride: isSet(object.minSpindleOverride) ? globalThis.Number(object.minSpindleOverride) : 0,
|
|
10291
|
+
maxSpindleOverride: isSet(object.maxSpindleOverride) ? globalThis.Number(object.maxSpindleOverride) : 0,
|
|
10292
|
+
ncFilesDirectory: isSet(object.ncFilesDirectory) ? globalThis.String(object.ncFilesDirectory) : "",
|
|
10293
|
+
joints: globalThis.Array.isArray(object?.joints) ? object.joints.map((e: any) => JointConfig.fromJSON(e)) : [],
|
|
10294
|
+
axes: globalThis.Array.isArray(object?.axes) ? object.axes.map((e: any) => AxisConfig.fromJSON(e)) : [],
|
|
10295
|
+
};
|
|
10296
|
+
},
|
|
10297
|
+
|
|
10298
|
+
toJSON(message: MachineConfig): unknown {
|
|
10299
|
+
const obj: any = {};
|
|
10300
|
+
if (message.iniFilename !== "") {
|
|
10301
|
+
obj.iniFilename = message.iniFilename;
|
|
10302
|
+
}
|
|
10303
|
+
if (message.iniReadable !== false) {
|
|
10304
|
+
obj.iniReadable = message.iniReadable;
|
|
10305
|
+
}
|
|
10306
|
+
if (message.machineName !== "") {
|
|
10307
|
+
obj.machineName = message.machineName;
|
|
10308
|
+
}
|
|
10309
|
+
if (message.kinematics !== "") {
|
|
10310
|
+
obj.kinematics = message.kinematics;
|
|
10311
|
+
}
|
|
10312
|
+
if (message.kinematicsModule !== "") {
|
|
10313
|
+
obj.kinematicsModule = message.kinematicsModule;
|
|
10314
|
+
}
|
|
10315
|
+
if (message.kinematicsType !== 0) {
|
|
10316
|
+
obj.kinematicsType = kinematicsTypeToJSON(message.kinematicsType);
|
|
10317
|
+
}
|
|
10318
|
+
if (message.coordinates !== "") {
|
|
10319
|
+
obj.coordinates = message.coordinates;
|
|
10320
|
+
}
|
|
10321
|
+
if (message.axisMask !== 0) {
|
|
10322
|
+
obj.axisMask = Math.round(message.axisMask);
|
|
10323
|
+
}
|
|
10324
|
+
if (message.jointCount !== 0) {
|
|
10325
|
+
obj.jointCount = Math.round(message.jointCount);
|
|
10326
|
+
}
|
|
10327
|
+
if (message.spindleCount !== 0) {
|
|
10328
|
+
obj.spindleCount = Math.round(message.spindleCount);
|
|
10329
|
+
}
|
|
10330
|
+
if (message.jointAxisMappingKnown !== false) {
|
|
10331
|
+
obj.jointAxisMappingKnown = message.jointAxisMappingKnown;
|
|
10332
|
+
}
|
|
10333
|
+
if (message.linearUnits !== 0) {
|
|
10334
|
+
obj.linearUnits = message.linearUnits;
|
|
10335
|
+
}
|
|
10336
|
+
if (message.angularUnits !== 0) {
|
|
10337
|
+
obj.angularUnits = message.angularUnits;
|
|
10338
|
+
}
|
|
10339
|
+
if (message.linearUnitsName !== "") {
|
|
10340
|
+
obj.linearUnitsName = message.linearUnitsName;
|
|
10341
|
+
}
|
|
10342
|
+
if (message.angularUnitsName !== "") {
|
|
10343
|
+
obj.angularUnitsName = message.angularUnitsName;
|
|
10344
|
+
}
|
|
10345
|
+
if (message.maxLinearVelocity !== 0) {
|
|
10346
|
+
obj.maxLinearVelocity = message.maxLinearVelocity;
|
|
10347
|
+
}
|
|
10348
|
+
if (message.defaultLinearVelocity !== 0) {
|
|
10349
|
+
obj.defaultLinearVelocity = message.defaultLinearVelocity;
|
|
10350
|
+
}
|
|
10351
|
+
if (message.maxAngularVelocity !== 0) {
|
|
10352
|
+
obj.maxAngularVelocity = message.maxAngularVelocity;
|
|
10353
|
+
}
|
|
10354
|
+
if (message.defaultAngularVelocity !== 0) {
|
|
10355
|
+
obj.defaultAngularVelocity = message.defaultAngularVelocity;
|
|
10356
|
+
}
|
|
10357
|
+
if (message.lathe !== false) {
|
|
10358
|
+
obj.lathe = message.lathe;
|
|
10359
|
+
}
|
|
10360
|
+
if (message.backToolLathe !== false) {
|
|
10361
|
+
obj.backToolLathe = message.backToolLathe;
|
|
10362
|
+
}
|
|
10363
|
+
if (message.maxFeedOverride !== 0) {
|
|
10364
|
+
obj.maxFeedOverride = message.maxFeedOverride;
|
|
10365
|
+
}
|
|
10366
|
+
if (message.minSpindleOverride !== 0) {
|
|
10367
|
+
obj.minSpindleOverride = message.minSpindleOverride;
|
|
10368
|
+
}
|
|
10369
|
+
if (message.maxSpindleOverride !== 0) {
|
|
10370
|
+
obj.maxSpindleOverride = message.maxSpindleOverride;
|
|
10371
|
+
}
|
|
10372
|
+
if (message.ncFilesDirectory !== "") {
|
|
10373
|
+
obj.ncFilesDirectory = message.ncFilesDirectory;
|
|
10374
|
+
}
|
|
10375
|
+
if (message.joints?.length) {
|
|
10376
|
+
obj.joints = message.joints.map((e) => JointConfig.toJSON(e));
|
|
10377
|
+
}
|
|
10378
|
+
if (message.axes?.length) {
|
|
10379
|
+
obj.axes = message.axes.map((e) => AxisConfig.toJSON(e));
|
|
10380
|
+
}
|
|
10381
|
+
return obj;
|
|
10382
|
+
},
|
|
10383
|
+
|
|
10384
|
+
create<I extends Exact<DeepPartial<MachineConfig>, I>>(base?: I): MachineConfig {
|
|
10385
|
+
return MachineConfig.fromPartial(base ?? ({} as any));
|
|
10386
|
+
},
|
|
10387
|
+
fromPartial<I extends Exact<DeepPartial<MachineConfig>, I>>(object: I): MachineConfig {
|
|
10388
|
+
const message = createBaseMachineConfig();
|
|
10389
|
+
message.iniFilename = object.iniFilename ?? "";
|
|
10390
|
+
message.iniReadable = object.iniReadable ?? false;
|
|
10391
|
+
message.machineName = object.machineName ?? "";
|
|
10392
|
+
message.kinematics = object.kinematics ?? "";
|
|
10393
|
+
message.kinematicsModule = object.kinematicsModule ?? "";
|
|
10394
|
+
message.kinematicsType = object.kinematicsType ?? 0;
|
|
10395
|
+
message.coordinates = object.coordinates ?? "";
|
|
10396
|
+
message.axisMask = object.axisMask ?? 0;
|
|
10397
|
+
message.jointCount = object.jointCount ?? 0;
|
|
10398
|
+
message.spindleCount = object.spindleCount ?? 0;
|
|
10399
|
+
message.jointAxisMappingKnown = object.jointAxisMappingKnown ?? false;
|
|
10400
|
+
message.linearUnits = object.linearUnits ?? 0;
|
|
10401
|
+
message.angularUnits = object.angularUnits ?? 0;
|
|
10402
|
+
message.linearUnitsName = object.linearUnitsName ?? "";
|
|
10403
|
+
message.angularUnitsName = object.angularUnitsName ?? "";
|
|
10404
|
+
message.maxLinearVelocity = object.maxLinearVelocity ?? 0;
|
|
10405
|
+
message.defaultLinearVelocity = object.defaultLinearVelocity ?? 0;
|
|
10406
|
+
message.maxAngularVelocity = object.maxAngularVelocity ?? 0;
|
|
10407
|
+
message.defaultAngularVelocity = object.defaultAngularVelocity ?? 0;
|
|
10408
|
+
message.lathe = object.lathe ?? false;
|
|
10409
|
+
message.backToolLathe = object.backToolLathe ?? false;
|
|
10410
|
+
message.maxFeedOverride = object.maxFeedOverride ?? 0;
|
|
10411
|
+
message.minSpindleOverride = object.minSpindleOverride ?? 0;
|
|
10412
|
+
message.maxSpindleOverride = object.maxSpindleOverride ?? 0;
|
|
10413
|
+
message.ncFilesDirectory = object.ncFilesDirectory ?? "";
|
|
10414
|
+
message.joints = object.joints?.map((e) => JointConfig.fromPartial(e)) || [];
|
|
10415
|
+
message.axes = object.axes?.map((e) => AxisConfig.fromPartial(e)) || [];
|
|
10416
|
+
return message;
|
|
10417
|
+
},
|
|
10418
|
+
};
|
|
10419
|
+
|
|
10420
|
+
function createBaseGetServerInfoRequest(): GetServerInfoRequest {
|
|
10421
|
+
return {};
|
|
10422
|
+
}
|
|
10423
|
+
|
|
10424
|
+
export const GetServerInfoRequest: MessageFns<GetServerInfoRequest> = {
|
|
10425
|
+
encode(_: GetServerInfoRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
10426
|
+
return writer;
|
|
10427
|
+
},
|
|
10428
|
+
|
|
10429
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetServerInfoRequest {
|
|
10430
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
10431
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
10432
|
+
const message = createBaseGetServerInfoRequest();
|
|
10433
|
+
while (reader.pos < end) {
|
|
10434
|
+
const tag = reader.uint32();
|
|
10435
|
+
switch (tag >>> 3) {
|
|
10436
|
+
}
|
|
10437
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
10438
|
+
break;
|
|
10439
|
+
}
|
|
10440
|
+
reader.skip(tag & 7);
|
|
10441
|
+
}
|
|
10442
|
+
return message;
|
|
10443
|
+
},
|
|
10444
|
+
|
|
10445
|
+
fromJSON(_: any): GetServerInfoRequest {
|
|
10446
|
+
return {};
|
|
10447
|
+
},
|
|
10448
|
+
|
|
10449
|
+
toJSON(_: GetServerInfoRequest): unknown {
|
|
10450
|
+
const obj: any = {};
|
|
10451
|
+
return obj;
|
|
10452
|
+
},
|
|
10453
|
+
|
|
10454
|
+
create<I extends Exact<DeepPartial<GetServerInfoRequest>, I>>(base?: I): GetServerInfoRequest {
|
|
10455
|
+
return GetServerInfoRequest.fromPartial(base ?? ({} as any));
|
|
10456
|
+
},
|
|
10457
|
+
fromPartial<I extends Exact<DeepPartial<GetServerInfoRequest>, I>>(_: I): GetServerInfoRequest {
|
|
10458
|
+
const message = createBaseGetServerInfoRequest();
|
|
10459
|
+
return message;
|
|
10460
|
+
},
|
|
10461
|
+
};
|
|
10462
|
+
|
|
10463
|
+
function createBaseServerInfo(): ServerInfo {
|
|
10464
|
+
return { serverVersion: "", linuxcncConnected: false, linuxcncVersion: "", errorChannelMode: "", stopsNotTaken: 0 };
|
|
10465
|
+
}
|
|
10466
|
+
|
|
10467
|
+
export const ServerInfo: MessageFns<ServerInfo> = {
|
|
10468
|
+
encode(message: ServerInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
10469
|
+
if (message.serverVersion !== "") {
|
|
10470
|
+
writer.uint32(10).string(message.serverVersion);
|
|
10471
|
+
}
|
|
10472
|
+
if (message.linuxcncConnected !== false) {
|
|
10473
|
+
writer.uint32(16).bool(message.linuxcncConnected);
|
|
10474
|
+
}
|
|
10475
|
+
if (message.linuxcncVersion !== "") {
|
|
10476
|
+
writer.uint32(26).string(message.linuxcncVersion);
|
|
10477
|
+
}
|
|
10478
|
+
if (message.errorChannelMode !== "") {
|
|
10479
|
+
writer.uint32(34).string(message.errorChannelMode);
|
|
10480
|
+
}
|
|
10481
|
+
if (message.stopsNotTaken !== 0) {
|
|
10482
|
+
writer.uint32(40).int32(message.stopsNotTaken);
|
|
10483
|
+
}
|
|
10484
|
+
return writer;
|
|
10485
|
+
},
|
|
10486
|
+
|
|
10487
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ServerInfo {
|
|
10488
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
10489
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
10490
|
+
const message = createBaseServerInfo();
|
|
10491
|
+
while (reader.pos < end) {
|
|
10492
|
+
const tag = reader.uint32();
|
|
10493
|
+
switch (tag >>> 3) {
|
|
10494
|
+
case 1: {
|
|
10495
|
+
if (tag !== 10) {
|
|
10496
|
+
break;
|
|
10497
|
+
}
|
|
10498
|
+
|
|
10499
|
+
message.serverVersion = reader.string();
|
|
10500
|
+
continue;
|
|
10501
|
+
}
|
|
10502
|
+
case 2: {
|
|
10503
|
+
if (tag !== 16) {
|
|
10504
|
+
break;
|
|
10505
|
+
}
|
|
10506
|
+
|
|
10507
|
+
message.linuxcncConnected = reader.bool();
|
|
10508
|
+
continue;
|
|
10509
|
+
}
|
|
10510
|
+
case 3: {
|
|
10511
|
+
if (tag !== 26) {
|
|
10512
|
+
break;
|
|
10513
|
+
}
|
|
10514
|
+
|
|
10515
|
+
message.linuxcncVersion = reader.string();
|
|
10516
|
+
continue;
|
|
10517
|
+
}
|
|
10518
|
+
case 4: {
|
|
10519
|
+
if (tag !== 34) {
|
|
10520
|
+
break;
|
|
10521
|
+
}
|
|
10522
|
+
|
|
10523
|
+
message.errorChannelMode = reader.string();
|
|
10524
|
+
continue;
|
|
10525
|
+
}
|
|
10526
|
+
case 5: {
|
|
10527
|
+
if (tag !== 40) {
|
|
10528
|
+
break;
|
|
10529
|
+
}
|
|
10530
|
+
|
|
10531
|
+
message.stopsNotTaken = reader.int32();
|
|
10532
|
+
continue;
|
|
10533
|
+
}
|
|
10534
|
+
}
|
|
10535
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
10536
|
+
break;
|
|
10537
|
+
}
|
|
10538
|
+
reader.skip(tag & 7);
|
|
10539
|
+
}
|
|
10540
|
+
return message;
|
|
10541
|
+
},
|
|
10542
|
+
|
|
10543
|
+
fromJSON(object: any): ServerInfo {
|
|
10544
|
+
return {
|
|
10545
|
+
serverVersion: isSet(object.serverVersion) ? globalThis.String(object.serverVersion) : "",
|
|
10546
|
+
linuxcncConnected: isSet(object.linuxcncConnected) ? globalThis.Boolean(object.linuxcncConnected) : false,
|
|
10547
|
+
linuxcncVersion: isSet(object.linuxcncVersion) ? globalThis.String(object.linuxcncVersion) : "",
|
|
10548
|
+
errorChannelMode: isSet(object.errorChannelMode) ? globalThis.String(object.errorChannelMode) : "",
|
|
10549
|
+
stopsNotTaken: isSet(object.stopsNotTaken) ? globalThis.Number(object.stopsNotTaken) : 0,
|
|
10550
|
+
};
|
|
10551
|
+
},
|
|
10552
|
+
|
|
10553
|
+
toJSON(message: ServerInfo): unknown {
|
|
10554
|
+
const obj: any = {};
|
|
10555
|
+
if (message.serverVersion !== "") {
|
|
10556
|
+
obj.serverVersion = message.serverVersion;
|
|
10557
|
+
}
|
|
10558
|
+
if (message.linuxcncConnected !== false) {
|
|
10559
|
+
obj.linuxcncConnected = message.linuxcncConnected;
|
|
10560
|
+
}
|
|
10561
|
+
if (message.linuxcncVersion !== "") {
|
|
10562
|
+
obj.linuxcncVersion = message.linuxcncVersion;
|
|
10563
|
+
}
|
|
10564
|
+
if (message.errorChannelMode !== "") {
|
|
10565
|
+
obj.errorChannelMode = message.errorChannelMode;
|
|
10566
|
+
}
|
|
10567
|
+
if (message.stopsNotTaken !== 0) {
|
|
10568
|
+
obj.stopsNotTaken = Math.round(message.stopsNotTaken);
|
|
10569
|
+
}
|
|
10570
|
+
return obj;
|
|
10571
|
+
},
|
|
10572
|
+
|
|
10573
|
+
create<I extends Exact<DeepPartial<ServerInfo>, I>>(base?: I): ServerInfo {
|
|
10574
|
+
return ServerInfo.fromPartial(base ?? ({} as any));
|
|
10575
|
+
},
|
|
10576
|
+
fromPartial<I extends Exact<DeepPartial<ServerInfo>, I>>(object: I): ServerInfo {
|
|
10577
|
+
const message = createBaseServerInfo();
|
|
10578
|
+
message.serverVersion = object.serverVersion ?? "";
|
|
10579
|
+
message.linuxcncConnected = object.linuxcncConnected ?? false;
|
|
10580
|
+
message.linuxcncVersion = object.linuxcncVersion ?? "";
|
|
10581
|
+
message.errorChannelMode = object.errorChannelMode ?? "";
|
|
10582
|
+
message.stopsNotTaken = object.stopsNotTaken ?? 0;
|
|
10583
|
+
return message;
|
|
10584
|
+
},
|
|
10585
|
+
};
|
|
10586
|
+
|
|
10587
|
+
export type LinuxCNCServiceService = typeof LinuxCNCServiceService;
|
|
10588
|
+
export const LinuxCNCServiceService = {
|
|
10589
|
+
/** Get current status (poll equivalent) */
|
|
10590
|
+
getStatus: {
|
|
10591
|
+
path: "/linuxcnc.LinuxCNCService/GetStatus",
|
|
10592
|
+
requestStream: false,
|
|
10593
|
+
responseStream: false,
|
|
10594
|
+
requestSerialize: (value: GetStatusRequest): Buffer => Buffer.from(GetStatusRequest.encode(value).finish()),
|
|
10595
|
+
requestDeserialize: (value: Buffer): GetStatusRequest => GetStatusRequest.decode(value),
|
|
10596
|
+
responseSerialize: (value: LinuxCNCStatus): Buffer => Buffer.from(LinuxCNCStatus.encode(value).finish()),
|
|
10597
|
+
responseDeserialize: (value: Buffer): LinuxCNCStatus => LinuxCNCStatus.decode(value),
|
|
10598
|
+
},
|
|
10599
|
+
/** Send a command */
|
|
10600
|
+
sendCommand: {
|
|
10601
|
+
path: "/linuxcnc.LinuxCNCService/SendCommand",
|
|
10602
|
+
requestStream: false,
|
|
10603
|
+
responseStream: false,
|
|
10604
|
+
requestSerialize: (value: LinuxCNCCommand): Buffer => Buffer.from(LinuxCNCCommand.encode(value).finish()),
|
|
10605
|
+
requestDeserialize: (value: Buffer): LinuxCNCCommand => LinuxCNCCommand.decode(value),
|
|
10606
|
+
responseSerialize: (value: CommandResponse): Buffer => Buffer.from(CommandResponse.encode(value).finish()),
|
|
10607
|
+
responseDeserialize: (value: Buffer): CommandResponse => CommandResponse.decode(value),
|
|
10608
|
+
},
|
|
10609
|
+
/** Wait for command completion */
|
|
10610
|
+
waitComplete: {
|
|
10611
|
+
path: "/linuxcnc.LinuxCNCService/WaitComplete",
|
|
10612
|
+
requestStream: false,
|
|
10613
|
+
responseStream: false,
|
|
10614
|
+
requestSerialize: (value: WaitCompleteRequest): Buffer => Buffer.from(WaitCompleteRequest.encode(value).finish()),
|
|
10615
|
+
requestDeserialize: (value: Buffer): WaitCompleteRequest => WaitCompleteRequest.decode(value),
|
|
10616
|
+
responseSerialize: (value: CommandResponse): Buffer => Buffer.from(CommandResponse.encode(value).finish()),
|
|
10617
|
+
responseDeserialize: (value: Buffer): CommandResponse => CommandResponse.decode(value),
|
|
10618
|
+
},
|
|
10619
|
+
/** Stream status updates */
|
|
10620
|
+
streamStatus: {
|
|
10621
|
+
path: "/linuxcnc.LinuxCNCService/StreamStatus",
|
|
10622
|
+
requestStream: false,
|
|
10623
|
+
responseStream: true,
|
|
10624
|
+
requestSerialize: (value: StreamStatusRequest): Buffer => Buffer.from(StreamStatusRequest.encode(value).finish()),
|
|
10625
|
+
requestDeserialize: (value: Buffer): StreamStatusRequest => StreamStatusRequest.decode(value),
|
|
10626
|
+
responseSerialize: (value: LinuxCNCStatus): Buffer => Buffer.from(LinuxCNCStatus.encode(value).finish()),
|
|
10627
|
+
responseDeserialize: (value: Buffer): LinuxCNCStatus => LinuxCNCStatus.decode(value),
|
|
10628
|
+
},
|
|
10629
|
+
/**
|
|
10630
|
+
* Stream messages from LinuxCNC's error channel. Each message the server
|
|
10631
|
+
* reads goes to every subscriber. The server keeps the newest 256 messages;
|
|
10632
|
+
* a subscriber that falls further behind loses the overflow, visible only
|
|
10633
|
+
* as a jump in ErrorMessage.sequence. Reading the channel takes messages
|
|
10634
|
+
* away from the machine's GUI; see the server's --error-channel option.
|
|
10635
|
+
*/
|
|
10636
|
+
streamErrors: {
|
|
10637
|
+
path: "/linuxcnc.LinuxCNCService/StreamErrors",
|
|
10638
|
+
requestStream: false,
|
|
10639
|
+
responseStream: true,
|
|
10640
|
+
requestSerialize: (value: StreamErrorsRequest): Buffer => Buffer.from(StreamErrorsRequest.encode(value).finish()),
|
|
10641
|
+
requestDeserialize: (value: Buffer): StreamErrorsRequest => StreamErrorsRequest.decode(value),
|
|
10642
|
+
responseSerialize: (value: ErrorMessage): Buffer => Buffer.from(ErrorMessage.encode(value).finish()),
|
|
10643
|
+
responseDeserialize: (value: Buffer): ErrorMessage => ErrorMessage.decode(value),
|
|
10644
|
+
},
|
|
10645
|
+
/** Upload a G-code file to the nc_files directory */
|
|
10646
|
+
uploadFile: {
|
|
10647
|
+
path: "/linuxcnc.LinuxCNCService/UploadFile",
|
|
10648
|
+
requestStream: false,
|
|
10649
|
+
responseStream: false,
|
|
10650
|
+
requestSerialize: (value: UploadFileRequest): Buffer => Buffer.from(UploadFileRequest.encode(value).finish()),
|
|
10651
|
+
requestDeserialize: (value: Buffer): UploadFileRequest => UploadFileRequest.decode(value),
|
|
10652
|
+
responseSerialize: (value: UploadFileResponse): Buffer => Buffer.from(UploadFileResponse.encode(value).finish()),
|
|
10653
|
+
responseDeserialize: (value: Buffer): UploadFileResponse => UploadFileResponse.decode(value),
|
|
10654
|
+
},
|
|
10655
|
+
/** List files in the nc_files directory */
|
|
10656
|
+
listFiles: {
|
|
10657
|
+
path: "/linuxcnc.LinuxCNCService/ListFiles",
|
|
10658
|
+
requestStream: false,
|
|
10659
|
+
responseStream: false,
|
|
10660
|
+
requestSerialize: (value: ListFilesRequest): Buffer => Buffer.from(ListFilesRequest.encode(value).finish()),
|
|
10661
|
+
requestDeserialize: (value: Buffer): ListFilesRequest => ListFilesRequest.decode(value),
|
|
10662
|
+
responseSerialize: (value: ListFilesResponse): Buffer => Buffer.from(ListFilesResponse.encode(value).finish()),
|
|
10663
|
+
responseDeserialize: (value: Buffer): ListFilesResponse => ListFilesResponse.decode(value),
|
|
10664
|
+
},
|
|
10665
|
+
/** Delete a file from the nc_files directory */
|
|
10666
|
+
deleteFile: {
|
|
10667
|
+
path: "/linuxcnc.LinuxCNCService/DeleteFile",
|
|
10668
|
+
requestStream: false,
|
|
10669
|
+
responseStream: false,
|
|
10670
|
+
requestSerialize: (value: DeleteFileRequest): Buffer => Buffer.from(DeleteFileRequest.encode(value).finish()),
|
|
10671
|
+
requestDeserialize: (value: Buffer): DeleteFileRequest => DeleteFileRequest.decode(value),
|
|
10672
|
+
responseSerialize: (value: DeleteFileResponse): Buffer => Buffer.from(DeleteFileResponse.encode(value).finish()),
|
|
10673
|
+
responseDeserialize: (value: Buffer): DeleteFileResponse => DeleteFileResponse.decode(value),
|
|
10674
|
+
},
|
|
10675
|
+
/** Read a file (or one chunk of it) from the nc_files directory */
|
|
10676
|
+
readFile: {
|
|
10677
|
+
path: "/linuxcnc.LinuxCNCService/ReadFile",
|
|
10678
|
+
requestStream: false,
|
|
10679
|
+
responseStream: false,
|
|
10680
|
+
requestSerialize: (value: ReadFileRequest): Buffer => Buffer.from(ReadFileRequest.encode(value).finish()),
|
|
10681
|
+
requestDeserialize: (value: Buffer): ReadFileRequest => ReadFileRequest.decode(value),
|
|
10682
|
+
responseSerialize: (value: ReadFileResponse): Buffer => Buffer.from(ReadFileResponse.encode(value).finish()),
|
|
10683
|
+
responseDeserialize: (value: Buffer): ReadFileResponse => ReadFileResponse.decode(value),
|
|
10684
|
+
},
|
|
10685
|
+
/**
|
|
10686
|
+
* Resolve a name in the nc_files directory to its canonical path and say
|
|
10687
|
+
* whether it is the program LinuxCNC currently has loaded
|
|
10688
|
+
*/
|
|
10689
|
+
resolveFile: {
|
|
10690
|
+
path: "/linuxcnc.LinuxCNCService/ResolveFile",
|
|
10691
|
+
requestStream: false,
|
|
10692
|
+
responseStream: false,
|
|
10693
|
+
requestSerialize: (value: ResolveFileRequest): Buffer => Buffer.from(ResolveFileRequest.encode(value).finish()),
|
|
10694
|
+
requestDeserialize: (value: Buffer): ResolveFileRequest => ResolveFileRequest.decode(value),
|
|
10695
|
+
responseSerialize: (value: ResolveFileResponse): Buffer => Buffer.from(ResolveFileResponse.encode(value).finish()),
|
|
10696
|
+
responseDeserialize: (value: Buffer): ResolveFileResponse => ResolveFileResponse.decode(value),
|
|
10697
|
+
},
|
|
10698
|
+
/**
|
|
10699
|
+
* Get the machine's static configuration: kinematics, joint-to-axis
|
|
10700
|
+
* mapping, limits, velocities and units
|
|
10701
|
+
*/
|
|
10702
|
+
getMachineConfig: {
|
|
10703
|
+
path: "/linuxcnc.LinuxCNCService/GetMachineConfig",
|
|
10704
|
+
requestStream: false,
|
|
10705
|
+
responseStream: false,
|
|
10706
|
+
requestSerialize: (value: GetMachineConfigRequest): Buffer =>
|
|
10707
|
+
Buffer.from(GetMachineConfigRequest.encode(value).finish()),
|
|
10708
|
+
requestDeserialize: (value: Buffer): GetMachineConfigRequest => GetMachineConfigRequest.decode(value),
|
|
10709
|
+
responseSerialize: (value: MachineConfig): Buffer => Buffer.from(MachineConfig.encode(value).finish()),
|
|
10710
|
+
responseDeserialize: (value: Buffer): MachineConfig => MachineConfig.decode(value),
|
|
10711
|
+
},
|
|
10712
|
+
/**
|
|
10713
|
+
* Get the server's version and whether it is connected to LinuxCNC.
|
|
10714
|
+
* Answers also while the server is waiting for LinuxCNC, and never waits
|
|
10715
|
+
* behind a command. A 1.0 server does not have this RPC and answers
|
|
10716
|
+
* UNIMPLEMENTED, which is how a client tells a 1.0 server from a later one.
|
|
10717
|
+
*/
|
|
10718
|
+
getServerInfo: {
|
|
10719
|
+
path: "/linuxcnc.LinuxCNCService/GetServerInfo",
|
|
10720
|
+
requestStream: false,
|
|
10721
|
+
responseStream: false,
|
|
10722
|
+
requestSerialize: (value: GetServerInfoRequest): Buffer => Buffer.from(GetServerInfoRequest.encode(value).finish()),
|
|
10723
|
+
requestDeserialize: (value: Buffer): GetServerInfoRequest => GetServerInfoRequest.decode(value),
|
|
10724
|
+
responseSerialize: (value: ServerInfo): Buffer => Buffer.from(ServerInfo.encode(value).finish()),
|
|
10725
|
+
responseDeserialize: (value: Buffer): ServerInfo => ServerInfo.decode(value),
|
|
10726
|
+
},
|
|
10727
|
+
} as const;
|
|
10728
|
+
|
|
10729
|
+
export interface LinuxCNCServiceServer extends UntypedServiceImplementation {
|
|
10730
|
+
/** Get current status (poll equivalent) */
|
|
10731
|
+
getStatus: handleUnaryCall<GetStatusRequest, LinuxCNCStatus>;
|
|
10732
|
+
/** Send a command */
|
|
8669
10733
|
sendCommand: handleUnaryCall<LinuxCNCCommand, CommandResponse>;
|
|
8670
10734
|
/** Wait for command completion */
|
|
8671
10735
|
waitComplete: handleUnaryCall<WaitCompleteRequest, CommandResponse>;
|
|
8672
10736
|
/** Stream status updates */
|
|
8673
10737
|
streamStatus: handleServerStreamingCall<StreamStatusRequest, LinuxCNCStatus>;
|
|
8674
|
-
/**
|
|
10738
|
+
/**
|
|
10739
|
+
* Stream messages from LinuxCNC's error channel. Each message the server
|
|
10740
|
+
* reads goes to every subscriber. The server keeps the newest 256 messages;
|
|
10741
|
+
* a subscriber that falls further behind loses the overflow, visible only
|
|
10742
|
+
* as a jump in ErrorMessage.sequence. Reading the channel takes messages
|
|
10743
|
+
* away from the machine's GUI; see the server's --error-channel option.
|
|
10744
|
+
*/
|
|
8675
10745
|
streamErrors: handleServerStreamingCall<StreamErrorsRequest, ErrorMessage>;
|
|
8676
10746
|
/** Upload a G-code file to the nc_files directory */
|
|
8677
10747
|
uploadFile: handleUnaryCall<UploadFileRequest, UploadFileResponse>;
|
|
@@ -8679,6 +10749,25 @@ export interface LinuxCNCServiceServer extends UntypedServiceImplementation {
|
|
|
8679
10749
|
listFiles: handleUnaryCall<ListFilesRequest, ListFilesResponse>;
|
|
8680
10750
|
/** Delete a file from the nc_files directory */
|
|
8681
10751
|
deleteFile: handleUnaryCall<DeleteFileRequest, DeleteFileResponse>;
|
|
10752
|
+
/** Read a file (or one chunk of it) from the nc_files directory */
|
|
10753
|
+
readFile: handleUnaryCall<ReadFileRequest, ReadFileResponse>;
|
|
10754
|
+
/**
|
|
10755
|
+
* Resolve a name in the nc_files directory to its canonical path and say
|
|
10756
|
+
* whether it is the program LinuxCNC currently has loaded
|
|
10757
|
+
*/
|
|
10758
|
+
resolveFile: handleUnaryCall<ResolveFileRequest, ResolveFileResponse>;
|
|
10759
|
+
/**
|
|
10760
|
+
* Get the machine's static configuration: kinematics, joint-to-axis
|
|
10761
|
+
* mapping, limits, velocities and units
|
|
10762
|
+
*/
|
|
10763
|
+
getMachineConfig: handleUnaryCall<GetMachineConfigRequest, MachineConfig>;
|
|
10764
|
+
/**
|
|
10765
|
+
* Get the server's version and whether it is connected to LinuxCNC.
|
|
10766
|
+
* Answers also while the server is waiting for LinuxCNC, and never waits
|
|
10767
|
+
* behind a command. A 1.0 server does not have this RPC and answers
|
|
10768
|
+
* UNIMPLEMENTED, which is how a client tells a 1.0 server from a later one.
|
|
10769
|
+
*/
|
|
10770
|
+
getServerInfo: handleUnaryCall<GetServerInfoRequest, ServerInfo>;
|
|
8682
10771
|
}
|
|
8683
10772
|
|
|
8684
10773
|
export interface LinuxCNCServiceClient extends Client {
|
|
@@ -8737,7 +10826,13 @@ export interface LinuxCNCServiceClient extends Client {
|
|
|
8737
10826
|
metadata?: Metadata,
|
|
8738
10827
|
options?: Partial<CallOptions>,
|
|
8739
10828
|
): ClientReadableStream<LinuxCNCStatus>;
|
|
8740
|
-
/**
|
|
10829
|
+
/**
|
|
10830
|
+
* Stream messages from LinuxCNC's error channel. Each message the server
|
|
10831
|
+
* reads goes to every subscriber. The server keeps the newest 256 messages;
|
|
10832
|
+
* a subscriber that falls further behind loses the overflow, visible only
|
|
10833
|
+
* as a jump in ErrorMessage.sequence. Reading the channel takes messages
|
|
10834
|
+
* away from the machine's GUI; see the server's --error-channel option.
|
|
10835
|
+
*/
|
|
8741
10836
|
streamErrors(request: StreamErrorsRequest, options?: Partial<CallOptions>): ClientReadableStream<ErrorMessage>;
|
|
8742
10837
|
streamErrors(
|
|
8743
10838
|
request: StreamErrorsRequest,
|
|
@@ -8792,6 +10887,81 @@ export interface LinuxCNCServiceClient extends Client {
|
|
|
8792
10887
|
options: Partial<CallOptions>,
|
|
8793
10888
|
callback: (error: ServiceError | null, response: DeleteFileResponse) => void,
|
|
8794
10889
|
): ClientUnaryCall;
|
|
10890
|
+
/** Read a file (or one chunk of it) from the nc_files directory */
|
|
10891
|
+
readFile(
|
|
10892
|
+
request: ReadFileRequest,
|
|
10893
|
+
callback: (error: ServiceError | null, response: ReadFileResponse) => void,
|
|
10894
|
+
): ClientUnaryCall;
|
|
10895
|
+
readFile(
|
|
10896
|
+
request: ReadFileRequest,
|
|
10897
|
+
metadata: Metadata,
|
|
10898
|
+
callback: (error: ServiceError | null, response: ReadFileResponse) => void,
|
|
10899
|
+
): ClientUnaryCall;
|
|
10900
|
+
readFile(
|
|
10901
|
+
request: ReadFileRequest,
|
|
10902
|
+
metadata: Metadata,
|
|
10903
|
+
options: Partial<CallOptions>,
|
|
10904
|
+
callback: (error: ServiceError | null, response: ReadFileResponse) => void,
|
|
10905
|
+
): ClientUnaryCall;
|
|
10906
|
+
/**
|
|
10907
|
+
* Resolve a name in the nc_files directory to its canonical path and say
|
|
10908
|
+
* whether it is the program LinuxCNC currently has loaded
|
|
10909
|
+
*/
|
|
10910
|
+
resolveFile(
|
|
10911
|
+
request: ResolveFileRequest,
|
|
10912
|
+
callback: (error: ServiceError | null, response: ResolveFileResponse) => void,
|
|
10913
|
+
): ClientUnaryCall;
|
|
10914
|
+
resolveFile(
|
|
10915
|
+
request: ResolveFileRequest,
|
|
10916
|
+
metadata: Metadata,
|
|
10917
|
+
callback: (error: ServiceError | null, response: ResolveFileResponse) => void,
|
|
10918
|
+
): ClientUnaryCall;
|
|
10919
|
+
resolveFile(
|
|
10920
|
+
request: ResolveFileRequest,
|
|
10921
|
+
metadata: Metadata,
|
|
10922
|
+
options: Partial<CallOptions>,
|
|
10923
|
+
callback: (error: ServiceError | null, response: ResolveFileResponse) => void,
|
|
10924
|
+
): ClientUnaryCall;
|
|
10925
|
+
/**
|
|
10926
|
+
* Get the machine's static configuration: kinematics, joint-to-axis
|
|
10927
|
+
* mapping, limits, velocities and units
|
|
10928
|
+
*/
|
|
10929
|
+
getMachineConfig(
|
|
10930
|
+
request: GetMachineConfigRequest,
|
|
10931
|
+
callback: (error: ServiceError | null, response: MachineConfig) => void,
|
|
10932
|
+
): ClientUnaryCall;
|
|
10933
|
+
getMachineConfig(
|
|
10934
|
+
request: GetMachineConfigRequest,
|
|
10935
|
+
metadata: Metadata,
|
|
10936
|
+
callback: (error: ServiceError | null, response: MachineConfig) => void,
|
|
10937
|
+
): ClientUnaryCall;
|
|
10938
|
+
getMachineConfig(
|
|
10939
|
+
request: GetMachineConfigRequest,
|
|
10940
|
+
metadata: Metadata,
|
|
10941
|
+
options: Partial<CallOptions>,
|
|
10942
|
+
callback: (error: ServiceError | null, response: MachineConfig) => void,
|
|
10943
|
+
): ClientUnaryCall;
|
|
10944
|
+
/**
|
|
10945
|
+
* Get the server's version and whether it is connected to LinuxCNC.
|
|
10946
|
+
* Answers also while the server is waiting for LinuxCNC, and never waits
|
|
10947
|
+
* behind a command. A 1.0 server does not have this RPC and answers
|
|
10948
|
+
* UNIMPLEMENTED, which is how a client tells a 1.0 server from a later one.
|
|
10949
|
+
*/
|
|
10950
|
+
getServerInfo(
|
|
10951
|
+
request: GetServerInfoRequest,
|
|
10952
|
+
callback: (error: ServiceError | null, response: ServerInfo) => void,
|
|
10953
|
+
): ClientUnaryCall;
|
|
10954
|
+
getServerInfo(
|
|
10955
|
+
request: GetServerInfoRequest,
|
|
10956
|
+
metadata: Metadata,
|
|
10957
|
+
callback: (error: ServiceError | null, response: ServerInfo) => void,
|
|
10958
|
+
): ClientUnaryCall;
|
|
10959
|
+
getServerInfo(
|
|
10960
|
+
request: GetServerInfoRequest,
|
|
10961
|
+
metadata: Metadata,
|
|
10962
|
+
options: Partial<CallOptions>,
|
|
10963
|
+
callback: (error: ServiceError | null, response: ServerInfo) => void,
|
|
10964
|
+
): ClientUnaryCall;
|
|
8795
10965
|
}
|
|
8796
10966
|
|
|
8797
10967
|
export const LinuxCNCServiceClient = makeGenericClientConstructor(
|
|
@@ -8803,6 +10973,31 @@ export const LinuxCNCServiceClient = makeGenericClientConstructor(
|
|
|
8803
10973
|
serviceName: string;
|
|
8804
10974
|
};
|
|
8805
10975
|
|
|
10976
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
10977
|
+
if ((globalThis as any).Buffer) {
|
|
10978
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
10979
|
+
} else {
|
|
10980
|
+
const bin = globalThis.atob(b64);
|
|
10981
|
+
const arr = new Uint8Array(bin.length);
|
|
10982
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
10983
|
+
arr[i] = bin.charCodeAt(i);
|
|
10984
|
+
}
|
|
10985
|
+
return arr;
|
|
10986
|
+
}
|
|
10987
|
+
}
|
|
10988
|
+
|
|
10989
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
10990
|
+
if ((globalThis as any).Buffer) {
|
|
10991
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
10992
|
+
} else {
|
|
10993
|
+
const bin: string[] = [];
|
|
10994
|
+
arr.forEach((byte) => {
|
|
10995
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
10996
|
+
});
|
|
10997
|
+
return globalThis.btoa(bin.join(""));
|
|
10998
|
+
}
|
|
10999
|
+
}
|
|
11000
|
+
|
|
8806
11001
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
8807
11002
|
|
|
8808
11003
|
type DeepPartial<T> = T extends Builtin ? T
|
|
@@ -8815,7 +11010,21 @@ type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
|
8815
11010
|
type Exact<P, I extends P> = P extends Builtin ? P
|
|
8816
11011
|
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
8817
11012
|
|
|
11013
|
+
/**
|
|
11014
|
+
* A 64-bit integer that is a value, not a timestamp. Beyond 2^53 the result
|
|
11015
|
+
* is the nearest number, so the low digits are lost; it is never scaled.
|
|
11016
|
+
* (Patched in by scripts/generate-protos.sh.)
|
|
11017
|
+
*/
|
|
8818
11018
|
function longToNumber(int64: { toString(): string }): number {
|
|
11019
|
+
return globalThis.Number(int64.toString());
|
|
11020
|
+
}
|
|
11021
|
+
|
|
11022
|
+
/**
|
|
11023
|
+
* A timestamp. The server sends nanoseconds, which do not fit a number, so a
|
|
11024
|
+
* value beyond the safe integer range is scaled to milliseconds.
|
|
11025
|
+
* (Patched in by scripts/generate-protos.sh.)
|
|
11026
|
+
*/
|
|
11027
|
+
function timestampToNumber(int64: { toString(): string }): number {
|
|
8819
11028
|
const num = globalThis.Number(int64.toString());
|
|
8820
11029
|
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
8821
11030
|
return Math.floor(num / 1e6);
|