linuxcnc-grpc 0.6.0-beta.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.
@@ -0,0 +1,903 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientReadableStream, type ClientUnaryCall, type handleServerStreamingCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
3
+ /** Interpreter state */
4
+ export declare enum InterpState {
5
+ INTERP_STATE_UNSPECIFIED = 0,
6
+ INTERP_IDLE = 1,
7
+ INTERP_READING = 2,
8
+ INTERP_PAUSED = 3,
9
+ INTERP_WAITING = 4,
10
+ UNRECOGNIZED = -1
11
+ }
12
+ export declare function interpStateFromJSON(object: any): InterpState;
13
+ export declare function interpStateToJSON(object: InterpState): string;
14
+ /** Task mode */
15
+ export declare enum TaskMode {
16
+ TASK_MODE_UNSPECIFIED = 0,
17
+ MODE_MANUAL = 1,
18
+ MODE_AUTO = 2,
19
+ MODE_MDI = 3,
20
+ UNRECOGNIZED = -1
21
+ }
22
+ export declare function taskModeFromJSON(object: any): TaskMode;
23
+ export declare function taskModeToJSON(object: TaskMode): string;
24
+ /** Task state */
25
+ export declare enum TaskState {
26
+ TASK_STATE_UNSPECIFIED = 0,
27
+ STATE_ESTOP = 1,
28
+ STATE_ESTOP_RESET = 2,
29
+ STATE_ON = 3,
30
+ STATE_OFF = 4,
31
+ UNRECOGNIZED = -1
32
+ }
33
+ export declare function taskStateFromJSON(object: any): TaskState;
34
+ export declare function taskStateToJSON(object: TaskState): string;
35
+ /** Execution state */
36
+ export declare enum ExecState {
37
+ EXEC_STATE_UNSPECIFIED = 0,
38
+ EXEC_ERROR = 1,
39
+ EXEC_DONE = 2,
40
+ EXEC_WAITING_FOR_MOTION = 3,
41
+ EXEC_WAITING_FOR_MOTION_QUEUE = 4,
42
+ EXEC_WAITING_FOR_IO = 5,
43
+ EXEC_WAITING_FOR_MOTION_AND_IO = 6,
44
+ EXEC_WAITING_FOR_DELAY = 7,
45
+ EXEC_WAITING_FOR_SYSTEM_CMD = 8,
46
+ EXEC_WAITING_FOR_SPINDLE_ORIENTED = 9,
47
+ UNRECOGNIZED = -1
48
+ }
49
+ export declare function execStateFromJSON(object: any): ExecState;
50
+ export declare function execStateToJSON(object: ExecState): string;
51
+ /** RCS status */
52
+ export declare enum RcsStatus {
53
+ RCS_STATUS_UNSPECIFIED = 0,
54
+ RCS_DONE = 1,
55
+ RCS_EXEC = 2,
56
+ RCS_ERROR = 3,
57
+ UNRECOGNIZED = -1
58
+ }
59
+ export declare function rcsStatusFromJSON(object: any): RcsStatus;
60
+ export declare function rcsStatusToJSON(object: RcsStatus): string;
61
+ /** Trajectory mode */
62
+ export declare enum TrajMode {
63
+ TRAJ_MODE_UNSPECIFIED = 0,
64
+ TRAJ_MODE_FREE = 1,
65
+ TRAJ_MODE_COORD = 2,
66
+ TRAJ_MODE_TELEOP = 3,
67
+ UNRECOGNIZED = -1
68
+ }
69
+ export declare function trajModeFromJSON(object: any): TrajMode;
70
+ export declare function trajModeToJSON(object: TrajMode): string;
71
+ /** Motion type */
72
+ export declare enum MotionType {
73
+ MOTION_TYPE_NONE = 0,
74
+ MOTION_TYPE_TRAVERSE = 1,
75
+ MOTION_TYPE_FEED = 2,
76
+ MOTION_TYPE_ARC = 3,
77
+ MOTION_TYPE_TOOLCHANGE = 4,
78
+ MOTION_TYPE_PROBING = 5,
79
+ MOTION_TYPE_INDEXROTARY = 6,
80
+ UNRECOGNIZED = -1
81
+ }
82
+ export declare function motionTypeFromJSON(object: any): MotionType;
83
+ export declare function motionTypeToJSON(object: MotionType): string;
84
+ /** Kinematics type */
85
+ export declare enum KinematicsType {
86
+ KINEMATICS_UNSPECIFIED = 0,
87
+ KINEMATICS_IDENTITY = 1,
88
+ KINEMATICS_FORWARD_ONLY = 2,
89
+ KINEMATICS_INVERSE_ONLY = 3,
90
+ KINEMATICS_BOTH = 4,
91
+ UNRECOGNIZED = -1
92
+ }
93
+ export declare function kinematicsTypeFromJSON(object: any): KinematicsType;
94
+ export declare function kinematicsTypeToJSON(object: KinematicsType): string;
95
+ /** Joint type */
96
+ export declare enum JointType {
97
+ JOINT_TYPE_UNSPECIFIED = 0,
98
+ JOINT_LINEAR = 1,
99
+ JOINT_ANGULAR = 2,
100
+ UNRECOGNIZED = -1
101
+ }
102
+ export declare function jointTypeFromJSON(object: any): JointType;
103
+ export declare function jointTypeToJSON(object: JointType): string;
104
+ /** Spindle direction */
105
+ export declare enum SpindleDirection {
106
+ SPINDLE_STOPPED = 0,
107
+ SPINDLE_FORWARD = 1,
108
+ SPINDLE_REVERSE = 2,
109
+ UNRECOGNIZED = -1
110
+ }
111
+ export declare function spindleDirectionFromJSON(object: any): SpindleDirection;
112
+ export declare function spindleDirectionToJSON(object: SpindleDirection): string;
113
+ /** Spindle command */
114
+ export declare enum SpindleCommand {
115
+ SPINDLE_CMD_OFF = 0,
116
+ SPINDLE_CMD_FORWARD = 1,
117
+ SPINDLE_CMD_REVERSE = 2,
118
+ SPINDLE_CMD_INCREASE = 3,
119
+ SPINDLE_CMD_DECREASE = 4,
120
+ SPINDLE_CMD_CONSTANT = 5,
121
+ UNRECOGNIZED = -1
122
+ }
123
+ export declare function spindleCommandFromJSON(object: any): SpindleCommand;
124
+ export declare function spindleCommandToJSON(object: SpindleCommand): string;
125
+ /** Coolant state */
126
+ export declare enum CoolantState {
127
+ COOLANT_OFF = 0,
128
+ COOLANT_ON = 1,
129
+ UNRECOGNIZED = -1
130
+ }
131
+ export declare function coolantStateFromJSON(object: any): CoolantState;
132
+ export declare function coolantStateToJSON(object: CoolantState): string;
133
+ /** Brake state */
134
+ export declare enum BrakeState {
135
+ BRAKE_RELEASE = 0,
136
+ BRAKE_ENGAGE = 1,
137
+ UNRECOGNIZED = -1
138
+ }
139
+ export declare function brakeStateFromJSON(object: any): BrakeState;
140
+ export declare function brakeStateToJSON(object: BrakeState): string;
141
+ /** Jog type */
142
+ export declare enum JogType {
143
+ JOG_STOP = 0,
144
+ JOG_CONTINUOUS = 1,
145
+ JOG_INCREMENT = 2,
146
+ UNRECOGNIZED = -1
147
+ }
148
+ export declare function jogTypeFromJSON(object: any): JogType;
149
+ export declare function jogTypeToJSON(object: JogType): string;
150
+ /** Auto command type */
151
+ export declare enum AutoCommandType {
152
+ AUTO_RUN = 0,
153
+ AUTO_PAUSE = 1,
154
+ AUTO_RESUME = 2,
155
+ AUTO_STEP = 3,
156
+ AUTO_REVERSE = 4,
157
+ AUTO_FORWARD = 5,
158
+ UNRECOGNIZED = -1
159
+ }
160
+ export declare function autoCommandTypeFromJSON(object: any): AutoCommandType;
161
+ export declare function autoCommandTypeToJSON(object: AutoCommandType): string;
162
+ /** 9-axis position (X, Y, Z, A, B, C, U, V, W) */
163
+ export interface Position {
164
+ x: number;
165
+ y: number;
166
+ z: number;
167
+ a: number;
168
+ b: number;
169
+ c: number;
170
+ u: number;
171
+ v: number;
172
+ w: number;
173
+ }
174
+ /** Task status information */
175
+ export interface TaskStatus {
176
+ echoSerialNumber: number;
177
+ state: RcsStatus;
178
+ taskMode: TaskMode;
179
+ taskState: TaskState;
180
+ execState: ExecState;
181
+ interpState: InterpState;
182
+ callLevel: number;
183
+ readLine: number;
184
+ motionLine: number;
185
+ currentLine: number;
186
+ file: string;
187
+ command: string;
188
+ /** 1=inch, 2=mm, 3=cm */
189
+ programUnits: number;
190
+ interpreterErrcode: number;
191
+ optionalStop: boolean;
192
+ blockDelete: boolean;
193
+ taskPaused: number;
194
+ inputTimeout: boolean;
195
+ rotationXy: number;
196
+ iniFilename: string;
197
+ delayLeft: number;
198
+ queuedMdiCommands: number;
199
+ }
200
+ /** Trajectory status information */
201
+ export interface TrajectoryStatus {
202
+ linearUnits: number;
203
+ angularUnits: number;
204
+ cycleTime: number;
205
+ joints: number;
206
+ spindles: number;
207
+ axisMask: number;
208
+ motionMode: TrajMode;
209
+ enabled: boolean;
210
+ inpos: boolean;
211
+ queue: number;
212
+ activeQueue: number;
213
+ queueFull: boolean;
214
+ motionId: number;
215
+ paused: boolean;
216
+ /** Feed override scale (0.0-1.0+) */
217
+ feedrate: number;
218
+ /** Rapid override scale (0.0-1.0) */
219
+ rapidrate: number;
220
+ velocity: number;
221
+ acceleration: number;
222
+ maxVelocity: number;
223
+ maxAcceleration: number;
224
+ probeTripped: boolean;
225
+ probing: boolean;
226
+ probeVal: number;
227
+ kinematicsType: KinematicsType;
228
+ motionType: MotionType;
229
+ distanceToGo: number;
230
+ currentVel: number;
231
+ feedOverrideEnabled: boolean;
232
+ adaptiveFeedEnabled: boolean;
233
+ feedHoldEnabled: boolean;
234
+ numExtrajoints: number;
235
+ }
236
+ /** Position status */
237
+ export interface PositionStatus {
238
+ /** Commanded position */
239
+ position: Position | undefined;
240
+ /** Actual/feedback position */
241
+ actualPosition: Position | undefined;
242
+ /** Position where probe tripped */
243
+ probedPosition: Position | undefined;
244
+ /** Distance to go */
245
+ dtg: Position | undefined;
246
+ /** Current work offset (G54-G59.3) */
247
+ g5xOffset: Position | undefined;
248
+ /** G92 offset */
249
+ g92Offset: Position | undefined;
250
+ /** Current tool offset */
251
+ toolOffset: Position | undefined;
252
+ /** Work coordinate system (1=G54, 2=G55, ...) */
253
+ g5xIndex: number;
254
+ }
255
+ /** Joint status */
256
+ export interface JointStatus {
257
+ jointNumber: number;
258
+ jointType: JointType;
259
+ units: number;
260
+ backlash: number;
261
+ minPositionLimit: number;
262
+ maxPositionLimit: number;
263
+ maxFerror: number;
264
+ minFerror: number;
265
+ ferrorCurrent: number;
266
+ ferrorHighmark: number;
267
+ /** Commanded position */
268
+ output: number;
269
+ /** Feedback position */
270
+ input: number;
271
+ velocity: number;
272
+ inpos: boolean;
273
+ homing: boolean;
274
+ homed: boolean;
275
+ fault: boolean;
276
+ enabled: boolean;
277
+ minSoftLimit: boolean;
278
+ maxSoftLimit: boolean;
279
+ minHardLimit: boolean;
280
+ maxHardLimit: boolean;
281
+ overrideLimits: boolean;
282
+ }
283
+ /** Axis status */
284
+ export interface AxisStatus {
285
+ /** 0=X, 1=Y, 2=Z, 3=A, 4=B, 5=C, 6=U, 7=V, 8=W */
286
+ axisNumber: number;
287
+ velocity: number;
288
+ minPositionLimit: number;
289
+ maxPositionLimit: number;
290
+ }
291
+ /** Spindle status */
292
+ export interface SpindleStatus {
293
+ spindleNumber: number;
294
+ brake: boolean;
295
+ /** 0=stopped, 1=forward, 2=reverse */
296
+ direction: number;
297
+ enabled: boolean;
298
+ overrideEnabled: boolean;
299
+ /** Commanded speed (RPM) */
300
+ speed: number;
301
+ /** Override scale */
302
+ override: number;
303
+ homed: boolean;
304
+ orientState: number;
305
+ orientFault: number;
306
+ }
307
+ /** Tool entry in tool table */
308
+ export interface ToolEntry {
309
+ /** Tool number */
310
+ id: number;
311
+ xOffset: number;
312
+ yOffset: number;
313
+ zOffset: number;
314
+ aOffset: number;
315
+ bOffset: number;
316
+ cOffset: number;
317
+ uOffset: number;
318
+ vOffset: number;
319
+ wOffset: number;
320
+ diameter: number;
321
+ frontAngle: number;
322
+ backAngle: number;
323
+ orientation: number;
324
+ comment: string;
325
+ }
326
+ /** Tool status */
327
+ export interface ToolStatus {
328
+ /** Pocket index prepped for change (-1 if none) */
329
+ pocketPrepped: number;
330
+ /** Tool number in spindle (0 if none) */
331
+ toolInSpindle: number;
332
+ /** Pocket of current tool (0 if none) */
333
+ toolFromPocket: number;
334
+ toolTable: ToolEntry[];
335
+ }
336
+ /** I/O status */
337
+ export interface IOStatus {
338
+ estop: boolean;
339
+ mist: CoolantState;
340
+ flood: CoolantState;
341
+ /** 64 analog inputs */
342
+ analogInputs: number[];
343
+ /** 64 analog outputs */
344
+ analogOutputs: number[];
345
+ /** 64 digital inputs */
346
+ digitalInputs: boolean[];
347
+ /** 64 digital outputs */
348
+ digitalOutputs: boolean[];
349
+ }
350
+ /** G-code and M-code status */
351
+ export interface GCodeStatus {
352
+ /** Active G-codes (multiplied by 10) */
353
+ activeGcodes: number[];
354
+ /** Active M-codes */
355
+ activeMcodes: number[];
356
+ sequenceNumber: number;
357
+ feedRate: number;
358
+ spindleSpeed: number;
359
+ g64PTolerance: number;
360
+ g64QTolerance: number;
361
+ }
362
+ /** Limit status for a joint (bitmask: 1=min_hard, 2=max_hard, 4=min_soft, 8=max_soft) */
363
+ export interface LimitStatus {
364
+ /** One per joint */
365
+ limitFlags: number[];
366
+ /** Homed status per joint */
367
+ homed: boolean[];
368
+ /** Misc error codes */
369
+ miscError: number[];
370
+ }
371
+ /** Error/message from error channel */
372
+ export interface ErrorMessage {
373
+ type: ErrorMessage_ErrorType;
374
+ message: string;
375
+ /** Unix timestamp in nanoseconds */
376
+ timestamp: number;
377
+ }
378
+ export declare enum ErrorMessage_ErrorType {
379
+ ERROR_TYPE_UNSPECIFIED = 0,
380
+ OPERATOR_ERROR = 1,
381
+ OPERATOR_TEXT = 2,
382
+ OPERATOR_DISPLAY = 3,
383
+ NML_ERROR = 4,
384
+ NML_TEXT = 5,
385
+ NML_DISPLAY = 6,
386
+ UNRECOGNIZED = -1
387
+ }
388
+ export declare function errorMessage_ErrorTypeFromJSON(object: any): ErrorMessage_ErrorType;
389
+ export declare function errorMessage_ErrorTypeToJSON(object: ErrorMessage_ErrorType): string;
390
+ export interface LinuxCNCStatus {
391
+ /** Metadata */
392
+ timestamp: number;
393
+ /** LinuxCNC version */
394
+ version: string;
395
+ /** Debug flags */
396
+ debug: number;
397
+ /** Status sections */
398
+ task: TaskStatus | undefined;
399
+ trajectory: TrajectoryStatus | undefined;
400
+ position: PositionStatus | undefined;
401
+ /** Up to 16 joints */
402
+ joints: JointStatus[];
403
+ /** Up to 9 axes (XYZABCUVW) */
404
+ axes: AxisStatus[];
405
+ /** Up to 8 spindles */
406
+ spindles: SpindleStatus[];
407
+ tool: ToolStatus | undefined;
408
+ io: IOStatus | undefined;
409
+ gcode: GCodeStatus | undefined;
410
+ limits: LimitStatus | undefined;
411
+ /** Errors (if any) */
412
+ errors: ErrorMessage[];
413
+ }
414
+ /** Set machine state (estop, on, off) */
415
+ export interface StateCommand {
416
+ state: TaskState;
417
+ }
418
+ /** Set task mode (manual, auto, mdi) */
419
+ export interface ModeCommand {
420
+ mode: TaskMode;
421
+ }
422
+ /** Execute MDI command */
423
+ export interface MdiCommand {
424
+ command: string;
425
+ }
426
+ /** Jog command */
427
+ export interface JogCommand {
428
+ type: JogType;
429
+ /** True for joint, false for axis */
430
+ isJoint: boolean;
431
+ /** Joint or axis number */
432
+ index: number;
433
+ /** Jog velocity */
434
+ velocity: number;
435
+ /** For JOG_INCREMENT only */
436
+ increment: number;
437
+ }
438
+ /** Home command */
439
+ export interface HomeCommand {
440
+ /** Joint number, or -1 for all */
441
+ joint: number;
442
+ }
443
+ /** Unhome command */
444
+ export interface UnhomeCommand {
445
+ joint: number;
446
+ }
447
+ /** Spindle command */
448
+ export interface SpindleControlCommand {
449
+ command: SpindleCommand;
450
+ /** For FORWARD/REVERSE */
451
+ speed: number;
452
+ /** Spindle number (default 0) */
453
+ spindle: number;
454
+ /** Wait for spindle to reach speed */
455
+ waitForAtSpeed: boolean;
456
+ }
457
+ /** Spindle override command */
458
+ export interface SpindleOverrideCommand {
459
+ /** Override scale */
460
+ scale: number;
461
+ /** Spindle number */
462
+ spindle: number;
463
+ }
464
+ /** Brake command */
465
+ export interface BrakeCommand {
466
+ state: BrakeState;
467
+ spindle: number;
468
+ }
469
+ /** Feed rate override command */
470
+ export interface FeedrateCommand {
471
+ /** Feed rate scale (0.0-2.0+) */
472
+ scale: number;
473
+ }
474
+ /** Rapid rate override command */
475
+ export interface RapidrateCommand {
476
+ /** Rapid rate scale (0.0-1.0) */
477
+ scale: number;
478
+ }
479
+ /** Maximum velocity command */
480
+ export interface MaxVelCommand {
481
+ velocity: number;
482
+ }
483
+ /** Coolant command */
484
+ export interface CoolantCommand {
485
+ mist: boolean;
486
+ flood: boolean;
487
+ }
488
+ /** Tool offset command */
489
+ export interface ToolOffsetCommand {
490
+ toolNumber: number;
491
+ zOffset: number;
492
+ xOffset: number;
493
+ diameter: number;
494
+ frontAngle: number;
495
+ backAngle: number;
496
+ orientation: number;
497
+ }
498
+ /** Program control commands */
499
+ export interface ProgramCommand {
500
+ /** Open program file */
501
+ open?: string | undefined;
502
+ /** Run from line number */
503
+ runFromLine?: number | undefined;
504
+ /** Pause program */
505
+ pause?: boolean | undefined;
506
+ /** Resume program */
507
+ resume?: boolean | undefined;
508
+ /** Single step */
509
+ step?: boolean | undefined;
510
+ /** Abort program */
511
+ abort?: boolean | undefined;
512
+ }
513
+ /** Auto mode command */
514
+ export interface AutoCommand {
515
+ command: AutoCommandType;
516
+ /** For AUTO_RUN, starting line */
517
+ line: number;
518
+ }
519
+ /** Set digital output */
520
+ export interface DigitalOutputCommand {
521
+ index: number;
522
+ value: boolean;
523
+ }
524
+ /** Set analog output */
525
+ export interface AnalogOutputCommand {
526
+ index: number;
527
+ value: number;
528
+ }
529
+ /** Set joint limits */
530
+ export interface SetLimitCommand {
531
+ joint: number;
532
+ minLimit: number;
533
+ maxLimit: number;
534
+ }
535
+ /** Override configuration */
536
+ export interface OverrideConfigCommand {
537
+ feedOverrideEnable: boolean;
538
+ spindleOverrideEnable: boolean;
539
+ /** For spindle override */
540
+ spindle: number;
541
+ feedHoldEnable: boolean;
542
+ adaptiveFeedEnable: boolean;
543
+ }
544
+ /** Optional stop and block delete */
545
+ export interface ProgramOptionsCommand {
546
+ optionalStop: boolean;
547
+ blockDelete: boolean;
548
+ }
549
+ /** Teleop enable */
550
+ export interface TeleopCommand {
551
+ enable: boolean;
552
+ }
553
+ /** Trajectory mode */
554
+ export interface TrajModeCommand {
555
+ mode: TrajMode;
556
+ }
557
+ /** Override limits (for recovery from limit switches) */
558
+ export interface OverrideLimitsCommand {
559
+ }
560
+ /** Reset interpreter */
561
+ export interface ResetInterpreterCommand {
562
+ }
563
+ /** Load tool table */
564
+ export interface LoadToolTableCommand {
565
+ }
566
+ /** Task plan sync */
567
+ export interface TaskPlanSyncCommand {
568
+ }
569
+ /** Debug level */
570
+ export interface DebugCommand {
571
+ level: number;
572
+ }
573
+ /** Operator messages */
574
+ export interface OperatorMessageCommand {
575
+ type: OperatorMessageCommand_MessageType;
576
+ message: string;
577
+ }
578
+ export declare enum OperatorMessageCommand_MessageType {
579
+ ERROR = 0,
580
+ TEXT = 1,
581
+ DISPLAY = 2,
582
+ UNRECOGNIZED = -1
583
+ }
584
+ export declare function operatorMessageCommand_MessageTypeFromJSON(object: any): OperatorMessageCommand_MessageType;
585
+ export declare function operatorMessageCommand_MessageTypeToJSON(object: OperatorMessageCommand_MessageType): string;
586
+ export interface LinuxCNCCommand {
587
+ /** Command timestamp */
588
+ timestamp: number;
589
+ /** Command serial number */
590
+ serial: number;
591
+ state?: StateCommand | undefined;
592
+ mode?: ModeCommand | undefined;
593
+ mdi?: MdiCommand | undefined;
594
+ jog?: JogCommand | undefined;
595
+ home?: HomeCommand | undefined;
596
+ unhome?: UnhomeCommand | undefined;
597
+ spindle?: SpindleControlCommand | undefined;
598
+ spindleOverride?: SpindleOverrideCommand | undefined;
599
+ brake?: BrakeCommand | undefined;
600
+ feedrate?: FeedrateCommand | undefined;
601
+ rapidrate?: RapidrateCommand | undefined;
602
+ maxvel?: MaxVelCommand | undefined;
603
+ coolant?: CoolantCommand | undefined;
604
+ toolOffset?: ToolOffsetCommand | undefined;
605
+ program?: ProgramCommand | undefined;
606
+ digitalOutput?: DigitalOutputCommand | undefined;
607
+ analogOutput?: AnalogOutputCommand | undefined;
608
+ setLimit?: SetLimitCommand | undefined;
609
+ overrideConfig?: OverrideConfigCommand | undefined;
610
+ programOptions?: ProgramOptionsCommand | undefined;
611
+ teleop?: TeleopCommand | undefined;
612
+ trajMode?: TrajModeCommand | undefined;
613
+ overrideLimits?: OverrideLimitsCommand | undefined;
614
+ resetInterpreter?: ResetInterpreterCommand | undefined;
615
+ loadToolTable?: LoadToolTableCommand | undefined;
616
+ taskPlanSync?: TaskPlanSyncCommand | undefined;
617
+ debug?: DebugCommand | undefined;
618
+ operatorMessage?: OperatorMessageCommand | undefined;
619
+ }
620
+ export interface CommandResponse {
621
+ /** Echo of command serial */
622
+ serial: number;
623
+ /** Command status */
624
+ status: RcsStatus;
625
+ /** Error message if status is RCS_ERROR */
626
+ errorMessage: string;
627
+ }
628
+ /** Empty - returns full status */
629
+ export interface GetStatusRequest {
630
+ }
631
+ export interface WaitCompleteRequest {
632
+ /** Command serial to wait for */
633
+ serial: number;
634
+ /** Timeout in seconds */
635
+ timeout: number;
636
+ }
637
+ export interface StreamStatusRequest {
638
+ /** Update interval in milliseconds (default: 100) */
639
+ intervalMs: number;
640
+ }
641
+ /** Empty - streams all errors */
642
+ export interface StreamErrorsRequest {
643
+ }
644
+ /** Upload a G-code file */
645
+ export interface UploadFileRequest {
646
+ /** Relative path within nc_files dir (e.g. "part1.ngc") */
647
+ filename: string;
648
+ /** G-code text content */
649
+ content: string;
650
+ /** If true, fail when file already exists */
651
+ failIfExists: boolean;
652
+ }
653
+ export interface UploadFileResponse {
654
+ /** Absolute path where file was written */
655
+ path: string;
656
+ /** True if an existing file was replaced */
657
+ overwritten: boolean;
658
+ }
659
+ /** List files in the nc_files directory */
660
+ export interface ListFilesRequest {
661
+ /** Optional subdirectory (relative to nc_files) */
662
+ subdirectory: string;
663
+ }
664
+ export interface FileInfo {
665
+ /** Filename */
666
+ name: string;
667
+ /** Relative path from nc_files root */
668
+ path: string;
669
+ /** File size in bytes */
670
+ sizeBytes: number;
671
+ /** Last modified time (unix timestamp in nanoseconds) */
672
+ modifiedTimestamp: number;
673
+ /** True if this entry is a directory */
674
+ isDirectory: boolean;
675
+ }
676
+ export interface ListFilesResponse {
677
+ /** Files in the directory */
678
+ files: FileInfo[];
679
+ /** Absolute path of listed directory */
680
+ directory: string;
681
+ }
682
+ /** Delete a file from the nc_files directory */
683
+ export interface DeleteFileRequest {
684
+ /** Relative path within nc_files dir */
685
+ filename: string;
686
+ }
687
+ export interface DeleteFileResponse {
688
+ /** Absolute path of deleted file */
689
+ path: string;
690
+ }
691
+ export declare const Position: MessageFns<Position>;
692
+ export declare const TaskStatus: MessageFns<TaskStatus>;
693
+ export declare const TrajectoryStatus: MessageFns<TrajectoryStatus>;
694
+ export declare const PositionStatus: MessageFns<PositionStatus>;
695
+ export declare const JointStatus: MessageFns<JointStatus>;
696
+ export declare const AxisStatus: MessageFns<AxisStatus>;
697
+ export declare const SpindleStatus: MessageFns<SpindleStatus>;
698
+ export declare const ToolEntry: MessageFns<ToolEntry>;
699
+ export declare const ToolStatus: MessageFns<ToolStatus>;
700
+ export declare const IOStatus: MessageFns<IOStatus>;
701
+ export declare const GCodeStatus: MessageFns<GCodeStatus>;
702
+ export declare const LimitStatus: MessageFns<LimitStatus>;
703
+ export declare const ErrorMessage: MessageFns<ErrorMessage>;
704
+ export declare const LinuxCNCStatus: MessageFns<LinuxCNCStatus>;
705
+ export declare const StateCommand: MessageFns<StateCommand>;
706
+ export declare const ModeCommand: MessageFns<ModeCommand>;
707
+ export declare const MdiCommand: MessageFns<MdiCommand>;
708
+ export declare const JogCommand: MessageFns<JogCommand>;
709
+ export declare const HomeCommand: MessageFns<HomeCommand>;
710
+ export declare const UnhomeCommand: MessageFns<UnhomeCommand>;
711
+ export declare const SpindleControlCommand: MessageFns<SpindleControlCommand>;
712
+ export declare const SpindleOverrideCommand: MessageFns<SpindleOverrideCommand>;
713
+ export declare const BrakeCommand: MessageFns<BrakeCommand>;
714
+ export declare const FeedrateCommand: MessageFns<FeedrateCommand>;
715
+ export declare const RapidrateCommand: MessageFns<RapidrateCommand>;
716
+ export declare const MaxVelCommand: MessageFns<MaxVelCommand>;
717
+ export declare const CoolantCommand: MessageFns<CoolantCommand>;
718
+ export declare const ToolOffsetCommand: MessageFns<ToolOffsetCommand>;
719
+ export declare const ProgramCommand: MessageFns<ProgramCommand>;
720
+ export declare const AutoCommand: MessageFns<AutoCommand>;
721
+ export declare const DigitalOutputCommand: MessageFns<DigitalOutputCommand>;
722
+ export declare const AnalogOutputCommand: MessageFns<AnalogOutputCommand>;
723
+ export declare const SetLimitCommand: MessageFns<SetLimitCommand>;
724
+ export declare const OverrideConfigCommand: MessageFns<OverrideConfigCommand>;
725
+ export declare const ProgramOptionsCommand: MessageFns<ProgramOptionsCommand>;
726
+ export declare const TeleopCommand: MessageFns<TeleopCommand>;
727
+ export declare const TrajModeCommand: MessageFns<TrajModeCommand>;
728
+ export declare const OverrideLimitsCommand: MessageFns<OverrideLimitsCommand>;
729
+ export declare const ResetInterpreterCommand: MessageFns<ResetInterpreterCommand>;
730
+ export declare const LoadToolTableCommand: MessageFns<LoadToolTableCommand>;
731
+ export declare const TaskPlanSyncCommand: MessageFns<TaskPlanSyncCommand>;
732
+ export declare const DebugCommand: MessageFns<DebugCommand>;
733
+ export declare const OperatorMessageCommand: MessageFns<OperatorMessageCommand>;
734
+ export declare const LinuxCNCCommand: MessageFns<LinuxCNCCommand>;
735
+ export declare const CommandResponse: MessageFns<CommandResponse>;
736
+ export declare const GetStatusRequest: MessageFns<GetStatusRequest>;
737
+ export declare const WaitCompleteRequest: MessageFns<WaitCompleteRequest>;
738
+ export declare const StreamStatusRequest: MessageFns<StreamStatusRequest>;
739
+ export declare const StreamErrorsRequest: MessageFns<StreamErrorsRequest>;
740
+ export declare const UploadFileRequest: MessageFns<UploadFileRequest>;
741
+ export declare const UploadFileResponse: MessageFns<UploadFileResponse>;
742
+ export declare const ListFilesRequest: MessageFns<ListFilesRequest>;
743
+ export declare const FileInfo: MessageFns<FileInfo>;
744
+ export declare const ListFilesResponse: MessageFns<ListFilesResponse>;
745
+ export declare const DeleteFileRequest: MessageFns<DeleteFileRequest>;
746
+ export declare const DeleteFileResponse: MessageFns<DeleteFileResponse>;
747
+ export type LinuxCNCServiceService = typeof LinuxCNCServiceService;
748
+ export declare const LinuxCNCServiceService: {
749
+ /** Get current status (poll equivalent) */
750
+ readonly getStatus: {
751
+ readonly path: "/linuxcnc.LinuxCNCService/GetStatus";
752
+ readonly requestStream: false;
753
+ readonly responseStream: false;
754
+ readonly requestSerialize: (value: GetStatusRequest) => Buffer;
755
+ readonly requestDeserialize: (value: Buffer) => GetStatusRequest;
756
+ readonly responseSerialize: (value: LinuxCNCStatus) => Buffer;
757
+ readonly responseDeserialize: (value: Buffer) => LinuxCNCStatus;
758
+ };
759
+ /** Send a command */
760
+ readonly sendCommand: {
761
+ readonly path: "/linuxcnc.LinuxCNCService/SendCommand";
762
+ readonly requestStream: false;
763
+ readonly responseStream: false;
764
+ readonly requestSerialize: (value: LinuxCNCCommand) => Buffer;
765
+ readonly requestDeserialize: (value: Buffer) => LinuxCNCCommand;
766
+ readonly responseSerialize: (value: CommandResponse) => Buffer;
767
+ readonly responseDeserialize: (value: Buffer) => CommandResponse;
768
+ };
769
+ /** Wait for command completion */
770
+ readonly waitComplete: {
771
+ readonly path: "/linuxcnc.LinuxCNCService/WaitComplete";
772
+ readonly requestStream: false;
773
+ readonly responseStream: false;
774
+ readonly requestSerialize: (value: WaitCompleteRequest) => Buffer;
775
+ readonly requestDeserialize: (value: Buffer) => WaitCompleteRequest;
776
+ readonly responseSerialize: (value: CommandResponse) => Buffer;
777
+ readonly responseDeserialize: (value: Buffer) => CommandResponse;
778
+ };
779
+ /** Stream status updates */
780
+ readonly streamStatus: {
781
+ readonly path: "/linuxcnc.LinuxCNCService/StreamStatus";
782
+ readonly requestStream: false;
783
+ readonly responseStream: true;
784
+ readonly requestSerialize: (value: StreamStatusRequest) => Buffer;
785
+ readonly requestDeserialize: (value: Buffer) => StreamStatusRequest;
786
+ readonly responseSerialize: (value: LinuxCNCStatus) => Buffer;
787
+ readonly responseDeserialize: (value: Buffer) => LinuxCNCStatus;
788
+ };
789
+ /** Stream errors */
790
+ readonly streamErrors: {
791
+ readonly path: "/linuxcnc.LinuxCNCService/StreamErrors";
792
+ readonly requestStream: false;
793
+ readonly responseStream: true;
794
+ readonly requestSerialize: (value: StreamErrorsRequest) => Buffer;
795
+ readonly requestDeserialize: (value: Buffer) => StreamErrorsRequest;
796
+ readonly responseSerialize: (value: ErrorMessage) => Buffer;
797
+ readonly responseDeserialize: (value: Buffer) => ErrorMessage;
798
+ };
799
+ /** Upload a G-code file to the nc_files directory */
800
+ readonly uploadFile: {
801
+ readonly path: "/linuxcnc.LinuxCNCService/UploadFile";
802
+ readonly requestStream: false;
803
+ readonly responseStream: false;
804
+ readonly requestSerialize: (value: UploadFileRequest) => Buffer;
805
+ readonly requestDeserialize: (value: Buffer) => UploadFileRequest;
806
+ readonly responseSerialize: (value: UploadFileResponse) => Buffer;
807
+ readonly responseDeserialize: (value: Buffer) => UploadFileResponse;
808
+ };
809
+ /** List files in the nc_files directory */
810
+ readonly listFiles: {
811
+ readonly path: "/linuxcnc.LinuxCNCService/ListFiles";
812
+ readonly requestStream: false;
813
+ readonly responseStream: false;
814
+ readonly requestSerialize: (value: ListFilesRequest) => Buffer;
815
+ readonly requestDeserialize: (value: Buffer) => ListFilesRequest;
816
+ readonly responseSerialize: (value: ListFilesResponse) => Buffer;
817
+ readonly responseDeserialize: (value: Buffer) => ListFilesResponse;
818
+ };
819
+ /** Delete a file from the nc_files directory */
820
+ readonly deleteFile: {
821
+ readonly path: "/linuxcnc.LinuxCNCService/DeleteFile";
822
+ readonly requestStream: false;
823
+ readonly responseStream: false;
824
+ readonly requestSerialize: (value: DeleteFileRequest) => Buffer;
825
+ readonly requestDeserialize: (value: Buffer) => DeleteFileRequest;
826
+ readonly responseSerialize: (value: DeleteFileResponse) => Buffer;
827
+ readonly responseDeserialize: (value: Buffer) => DeleteFileResponse;
828
+ };
829
+ };
830
+ export interface LinuxCNCServiceServer extends UntypedServiceImplementation {
831
+ /** Get current status (poll equivalent) */
832
+ getStatus: handleUnaryCall<GetStatusRequest, LinuxCNCStatus>;
833
+ /** Send a command */
834
+ sendCommand: handleUnaryCall<LinuxCNCCommand, CommandResponse>;
835
+ /** Wait for command completion */
836
+ waitComplete: handleUnaryCall<WaitCompleteRequest, CommandResponse>;
837
+ /** Stream status updates */
838
+ streamStatus: handleServerStreamingCall<StreamStatusRequest, LinuxCNCStatus>;
839
+ /** Stream errors */
840
+ streamErrors: handleServerStreamingCall<StreamErrorsRequest, ErrorMessage>;
841
+ /** Upload a G-code file to the nc_files directory */
842
+ uploadFile: handleUnaryCall<UploadFileRequest, UploadFileResponse>;
843
+ /** List files in the nc_files directory */
844
+ listFiles: handleUnaryCall<ListFilesRequest, ListFilesResponse>;
845
+ /** Delete a file from the nc_files directory */
846
+ deleteFile: handleUnaryCall<DeleteFileRequest, DeleteFileResponse>;
847
+ }
848
+ export interface LinuxCNCServiceClient extends Client {
849
+ /** Get current status (poll equivalent) */
850
+ getStatus(request: GetStatusRequest, callback: (error: ServiceError | null, response: LinuxCNCStatus) => void): ClientUnaryCall;
851
+ getStatus(request: GetStatusRequest, metadata: Metadata, callback: (error: ServiceError | null, response: LinuxCNCStatus) => void): ClientUnaryCall;
852
+ getStatus(request: GetStatusRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: LinuxCNCStatus) => void): ClientUnaryCall;
853
+ /** Send a command */
854
+ sendCommand(request: LinuxCNCCommand, callback: (error: ServiceError | null, response: CommandResponse) => void): ClientUnaryCall;
855
+ sendCommand(request: LinuxCNCCommand, metadata: Metadata, callback: (error: ServiceError | null, response: CommandResponse) => void): ClientUnaryCall;
856
+ sendCommand(request: LinuxCNCCommand, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CommandResponse) => void): ClientUnaryCall;
857
+ /** Wait for command completion */
858
+ waitComplete(request: WaitCompleteRequest, callback: (error: ServiceError | null, response: CommandResponse) => void): ClientUnaryCall;
859
+ waitComplete(request: WaitCompleteRequest, metadata: Metadata, callback: (error: ServiceError | null, response: CommandResponse) => void): ClientUnaryCall;
860
+ waitComplete(request: WaitCompleteRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: CommandResponse) => void): ClientUnaryCall;
861
+ /** Stream status updates */
862
+ streamStatus(request: StreamStatusRequest, options?: Partial<CallOptions>): ClientReadableStream<LinuxCNCStatus>;
863
+ streamStatus(request: StreamStatusRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<LinuxCNCStatus>;
864
+ /** Stream errors */
865
+ streamErrors(request: StreamErrorsRequest, options?: Partial<CallOptions>): ClientReadableStream<ErrorMessage>;
866
+ streamErrors(request: StreamErrorsRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<ErrorMessage>;
867
+ /** Upload a G-code file to the nc_files directory */
868
+ uploadFile(request: UploadFileRequest, callback: (error: ServiceError | null, response: UploadFileResponse) => void): ClientUnaryCall;
869
+ uploadFile(request: UploadFileRequest, metadata: Metadata, callback: (error: ServiceError | null, response: UploadFileResponse) => void): ClientUnaryCall;
870
+ uploadFile(request: UploadFileRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: UploadFileResponse) => void): ClientUnaryCall;
871
+ /** List files in the nc_files directory */
872
+ listFiles(request: ListFilesRequest, callback: (error: ServiceError | null, response: ListFilesResponse) => void): ClientUnaryCall;
873
+ listFiles(request: ListFilesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListFilesResponse) => void): ClientUnaryCall;
874
+ listFiles(request: ListFilesRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListFilesResponse) => void): ClientUnaryCall;
875
+ /** Delete a file from the nc_files directory */
876
+ deleteFile(request: DeleteFileRequest, callback: (error: ServiceError | null, response: DeleteFileResponse) => void): ClientUnaryCall;
877
+ deleteFile(request: DeleteFileRequest, metadata: Metadata, callback: (error: ServiceError | null, response: DeleteFileResponse) => void): ClientUnaryCall;
878
+ deleteFile(request: DeleteFileRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: DeleteFileResponse) => void): ClientUnaryCall;
879
+ }
880
+ export declare const LinuxCNCServiceClient: {
881
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): LinuxCNCServiceClient;
882
+ service: typeof LinuxCNCServiceService;
883
+ serviceName: string;
884
+ };
885
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
886
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
887
+ [K in keyof T]?: DeepPartial<T[K]>;
888
+ } : Partial<T>;
889
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
890
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
891
+ [K in keyof P]: Exact<P[K], I[K]>;
892
+ } & {
893
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
894
+ };
895
+ interface MessageFns<T> {
896
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
897
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
898
+ fromJSON(object: any): T;
899
+ toJSON(message: T): unknown;
900
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
901
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
902
+ }
903
+ export {};