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/dist/linuxcnc.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// source: linuxcnc.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.SetLimitCommand = exports.AnalogOutputCommand = exports.DigitalOutputCommand = exports.AutoCommand = exports.ProgramCommand = exports.ToolOffsetCommand = exports.CoolantCommand = exports.MaxVelCommand = exports.RapidrateCommand = exports.FeedrateCommand = exports.BrakeCommand = exports.SpindleOverrideCommand = exports.SpindleControlCommand = exports.UnhomeCommand = exports.HomeCommand = exports.JogCommand = exports.MdiCommand = exports.ModeCommand = exports.StateCommand = exports.LinuxCNCStatus = exports.ErrorMessage = exports.LimitStatus = exports.GCodeStatus = exports.IOStatus = exports.ToolStatus = exports.ToolEntry = exports.SpindleStatus = exports.AxisStatus = exports.JointStatus = exports.PositionStatus = exports.TrajectoryStatus = exports.TaskStatus = exports.Position = exports.OperatorMessageCommand_MessageType = exports.ErrorMessage_ErrorType = exports.AutoCommandType = exports.JogType = exports.BrakeState = exports.CoolantState = exports.SpindleCommand = exports.SpindleDirection = exports.JointType = exports.KinematicsType = exports.MotionType = exports.TrajMode = exports.RcsStatus = exports.ExecState = exports.TaskState = exports.TaskMode = exports.InterpState = void 0;
|
|
9
|
-
exports.LinuxCNCServiceClient = exports.LinuxCNCServiceService = exports.DeleteFileResponse = exports.DeleteFileRequest = exports.ListFilesResponse = exports.FileInfo = exports.ListFilesRequest = exports.UploadFileResponse = exports.UploadFileRequest = exports.StreamErrorsRequest = exports.StreamStatusRequest = exports.WaitCompleteRequest = exports.GetStatusRequest = exports.CommandResponse = exports.LinuxCNCCommand = exports.OperatorMessageCommand = exports.DebugCommand = exports.TaskPlanSyncCommand = exports.LoadToolTableCommand = exports.ResetInterpreterCommand = exports.OverrideLimitsCommand = exports.TrajModeCommand = exports.TeleopCommand = exports.ProgramOptionsCommand = exports.OverrideConfigCommand = void 0;
|
|
9
|
+
exports.LinuxCNCServiceClient = exports.LinuxCNCServiceService = exports.ServerInfo = exports.GetServerInfoRequest = exports.MachineConfig = exports.AxisConfig = exports.JointConfig = exports.GetMachineConfigRequest = exports.ResolveFileResponse = exports.ResolveFileRequest = exports.ReadFileResponse = exports.ReadFileRequest = exports.DeleteFileResponse = exports.DeleteFileRequest = exports.ListFilesResponse = exports.FileInfo = exports.ListFilesRequest = exports.UploadFileResponse = exports.UploadFileRequest = exports.StreamErrorsRequest = exports.StreamStatusRequest = exports.WaitCompleteRequest = exports.GetStatusRequest = exports.CommandResponse = exports.LinuxCNCCommand = exports.OperatorMessageCommand = exports.DebugCommand = exports.TaskPlanSyncCommand = exports.LoadToolTableCommand = exports.ResetInterpreterCommand = exports.OverrideLimitsCommand = exports.TrajModeCommand = exports.TeleopCommand = exports.ProgramOptionsCommand = exports.OverrideConfigCommand = void 0;
|
|
10
10
|
exports.interpStateFromJSON = interpStateFromJSON;
|
|
11
11
|
exports.interpStateToJSON = interpStateToJSON;
|
|
12
12
|
exports.taskModeFromJSON = taskModeFromJSON;
|
|
@@ -702,7 +702,12 @@ function jogTypeToJSON(object) {
|
|
|
702
702
|
return "UNRECOGNIZED";
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
/**
|
|
705
|
+
/**
|
|
706
|
+
* Auto command type.
|
|
707
|
+
* Deprecated together with AutoCommand: SendCommand has never accepted it.
|
|
708
|
+
*
|
|
709
|
+
* @deprecated
|
|
710
|
+
*/
|
|
706
711
|
var AutoCommandType;
|
|
707
712
|
(function (AutoCommandType) {
|
|
708
713
|
AutoCommandType[AutoCommandType["AUTO_RUN"] = 0] = "AUTO_RUN";
|
|
@@ -2855,6 +2860,7 @@ function createBaseToolEntry() {
|
|
|
2855
2860
|
backAngle: 0,
|
|
2856
2861
|
orientation: 0,
|
|
2857
2862
|
comment: "",
|
|
2863
|
+
tableIndex: undefined,
|
|
2858
2864
|
};
|
|
2859
2865
|
}
|
|
2860
2866
|
exports.ToolEntry = {
|
|
@@ -2904,6 +2910,9 @@ exports.ToolEntry = {
|
|
|
2904
2910
|
if (message.comment !== "") {
|
|
2905
2911
|
writer.uint32(122).string(message.comment);
|
|
2906
2912
|
}
|
|
2913
|
+
if (message.tableIndex !== undefined) {
|
|
2914
|
+
writer.uint32(128).int32(message.tableIndex);
|
|
2915
|
+
}
|
|
2907
2916
|
return writer;
|
|
2908
2917
|
},
|
|
2909
2918
|
decode(input, length) {
|
|
@@ -3018,6 +3027,13 @@ exports.ToolEntry = {
|
|
|
3018
3027
|
message.comment = reader.string();
|
|
3019
3028
|
continue;
|
|
3020
3029
|
}
|
|
3030
|
+
case 16: {
|
|
3031
|
+
if (tag !== 128) {
|
|
3032
|
+
break;
|
|
3033
|
+
}
|
|
3034
|
+
message.tableIndex = reader.int32();
|
|
3035
|
+
continue;
|
|
3036
|
+
}
|
|
3021
3037
|
}
|
|
3022
3038
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3023
3039
|
break;
|
|
@@ -3043,6 +3059,7 @@ exports.ToolEntry = {
|
|
|
3043
3059
|
backAngle: isSet(object.backAngle) ? globalThis.Number(object.backAngle) : 0,
|
|
3044
3060
|
orientation: isSet(object.orientation) ? globalThis.Number(object.orientation) : 0,
|
|
3045
3061
|
comment: isSet(object.comment) ? globalThis.String(object.comment) : "",
|
|
3062
|
+
tableIndex: isSet(object.tableIndex) ? globalThis.Number(object.tableIndex) : undefined,
|
|
3046
3063
|
};
|
|
3047
3064
|
},
|
|
3048
3065
|
toJSON(message) {
|
|
@@ -3092,6 +3109,9 @@ exports.ToolEntry = {
|
|
|
3092
3109
|
if (message.comment !== "") {
|
|
3093
3110
|
obj.comment = message.comment;
|
|
3094
3111
|
}
|
|
3112
|
+
if (message.tableIndex !== undefined) {
|
|
3113
|
+
obj.tableIndex = Math.round(message.tableIndex);
|
|
3114
|
+
}
|
|
3095
3115
|
return obj;
|
|
3096
3116
|
},
|
|
3097
3117
|
create(base) {
|
|
@@ -3114,6 +3134,7 @@ exports.ToolEntry = {
|
|
|
3114
3134
|
message.backAngle = object.backAngle ?? 0;
|
|
3115
3135
|
message.orientation = object.orientation ?? 0;
|
|
3116
3136
|
message.comment = object.comment ?? "";
|
|
3137
|
+
message.tableIndex = object.tableIndex ?? undefined;
|
|
3117
3138
|
return message;
|
|
3118
3139
|
},
|
|
3119
3140
|
};
|
|
@@ -3700,7 +3721,7 @@ exports.LimitStatus = {
|
|
|
3700
3721
|
},
|
|
3701
3722
|
};
|
|
3702
3723
|
function createBaseErrorMessage() {
|
|
3703
|
-
return { type: 0, message: "", timestamp: 0 };
|
|
3724
|
+
return { type: 0, message: "", timestamp: 0, sequence: 0 };
|
|
3704
3725
|
}
|
|
3705
3726
|
exports.ErrorMessage = {
|
|
3706
3727
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -3713,6 +3734,9 @@ exports.ErrorMessage = {
|
|
|
3713
3734
|
if (message.timestamp !== 0) {
|
|
3714
3735
|
writer.uint32(24).int64(message.timestamp);
|
|
3715
3736
|
}
|
|
3737
|
+
if (message.sequence !== 0) {
|
|
3738
|
+
writer.uint32(32).int64(message.sequence);
|
|
3739
|
+
}
|
|
3716
3740
|
return writer;
|
|
3717
3741
|
},
|
|
3718
3742
|
decode(input, length) {
|
|
@@ -3740,7 +3764,14 @@ exports.ErrorMessage = {
|
|
|
3740
3764
|
if (tag !== 24) {
|
|
3741
3765
|
break;
|
|
3742
3766
|
}
|
|
3743
|
-
message.timestamp =
|
|
3767
|
+
message.timestamp = timestampToNumber(reader.int64());
|
|
3768
|
+
continue;
|
|
3769
|
+
}
|
|
3770
|
+
case 4: {
|
|
3771
|
+
if (tag !== 32) {
|
|
3772
|
+
break;
|
|
3773
|
+
}
|
|
3774
|
+
message.sequence = longToNumber(reader.int64());
|
|
3744
3775
|
continue;
|
|
3745
3776
|
}
|
|
3746
3777
|
}
|
|
@@ -3756,6 +3787,7 @@ exports.ErrorMessage = {
|
|
|
3756
3787
|
type: isSet(object.type) ? errorMessage_ErrorTypeFromJSON(object.type) : 0,
|
|
3757
3788
|
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
3758
3789
|
timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
|
|
3790
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
3759
3791
|
};
|
|
3760
3792
|
},
|
|
3761
3793
|
toJSON(message) {
|
|
@@ -3769,6 +3801,9 @@ exports.ErrorMessage = {
|
|
|
3769
3801
|
if (message.timestamp !== 0) {
|
|
3770
3802
|
obj.timestamp = Math.round(message.timestamp);
|
|
3771
3803
|
}
|
|
3804
|
+
if (message.sequence !== 0) {
|
|
3805
|
+
obj.sequence = Math.round(message.sequence);
|
|
3806
|
+
}
|
|
3772
3807
|
return obj;
|
|
3773
3808
|
},
|
|
3774
3809
|
create(base) {
|
|
@@ -3779,6 +3814,7 @@ exports.ErrorMessage = {
|
|
|
3779
3814
|
message.type = object.type ?? 0;
|
|
3780
3815
|
message.message = object.message ?? "";
|
|
3781
3816
|
message.timestamp = object.timestamp ?? 0;
|
|
3817
|
+
message.sequence = object.sequence ?? 0;
|
|
3782
3818
|
return message;
|
|
3783
3819
|
},
|
|
3784
3820
|
};
|
|
@@ -3857,7 +3893,7 @@ exports.LinuxCNCStatus = {
|
|
|
3857
3893
|
if (tag !== 8) {
|
|
3858
3894
|
break;
|
|
3859
3895
|
}
|
|
3860
|
-
message.timestamp =
|
|
3896
|
+
message.timestamp = timestampToNumber(reader.int64());
|
|
3861
3897
|
continue;
|
|
3862
3898
|
}
|
|
3863
3899
|
case 2: {
|
|
@@ -6144,7 +6180,7 @@ exports.LinuxCNCCommand = {
|
|
|
6144
6180
|
if (tag !== 8) {
|
|
6145
6181
|
break;
|
|
6146
6182
|
}
|
|
6147
|
-
message.timestamp =
|
|
6183
|
+
message.timestamp = timestampToNumber(reader.int64());
|
|
6148
6184
|
continue;
|
|
6149
6185
|
}
|
|
6150
6186
|
case 2: {
|
|
@@ -6583,7 +6619,7 @@ exports.LinuxCNCCommand = {
|
|
|
6583
6619
|
},
|
|
6584
6620
|
};
|
|
6585
6621
|
function createBaseCommandResponse() {
|
|
6586
|
-
return { serial: 0, status: 0, errorMessage: "" };
|
|
6622
|
+
return { serial: 0, status: 0, errorMessage: "", linuxcncSerial: undefined, acknowledged: undefined, notSent: false };
|
|
6587
6623
|
}
|
|
6588
6624
|
exports.CommandResponse = {
|
|
6589
6625
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -6596,6 +6632,15 @@ exports.CommandResponse = {
|
|
|
6596
6632
|
if (message.errorMessage !== "") {
|
|
6597
6633
|
writer.uint32(26).string(message.errorMessage);
|
|
6598
6634
|
}
|
|
6635
|
+
if (message.linuxcncSerial !== undefined) {
|
|
6636
|
+
writer.uint32(32).int32(message.linuxcncSerial);
|
|
6637
|
+
}
|
|
6638
|
+
if (message.acknowledged !== undefined) {
|
|
6639
|
+
writer.uint32(40).bool(message.acknowledged);
|
|
6640
|
+
}
|
|
6641
|
+
if (message.notSent !== false) {
|
|
6642
|
+
writer.uint32(48).bool(message.notSent);
|
|
6643
|
+
}
|
|
6599
6644
|
return writer;
|
|
6600
6645
|
},
|
|
6601
6646
|
decode(input, length) {
|
|
@@ -6626,6 +6671,27 @@ exports.CommandResponse = {
|
|
|
6626
6671
|
message.errorMessage = reader.string();
|
|
6627
6672
|
continue;
|
|
6628
6673
|
}
|
|
6674
|
+
case 4: {
|
|
6675
|
+
if (tag !== 32) {
|
|
6676
|
+
break;
|
|
6677
|
+
}
|
|
6678
|
+
message.linuxcncSerial = reader.int32();
|
|
6679
|
+
continue;
|
|
6680
|
+
}
|
|
6681
|
+
case 5: {
|
|
6682
|
+
if (tag !== 40) {
|
|
6683
|
+
break;
|
|
6684
|
+
}
|
|
6685
|
+
message.acknowledged = reader.bool();
|
|
6686
|
+
continue;
|
|
6687
|
+
}
|
|
6688
|
+
case 6: {
|
|
6689
|
+
if (tag !== 48) {
|
|
6690
|
+
break;
|
|
6691
|
+
}
|
|
6692
|
+
message.notSent = reader.bool();
|
|
6693
|
+
continue;
|
|
6694
|
+
}
|
|
6629
6695
|
}
|
|
6630
6696
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6631
6697
|
break;
|
|
@@ -6639,6 +6705,9 @@ exports.CommandResponse = {
|
|
|
6639
6705
|
serial: isSet(object.serial) ? globalThis.Number(object.serial) : 0,
|
|
6640
6706
|
status: isSet(object.status) ? rcsStatusFromJSON(object.status) : 0,
|
|
6641
6707
|
errorMessage: isSet(object.errorMessage) ? globalThis.String(object.errorMessage) : "",
|
|
6708
|
+
linuxcncSerial: isSet(object.linuxcncSerial) ? globalThis.Number(object.linuxcncSerial) : undefined,
|
|
6709
|
+
acknowledged: isSet(object.acknowledged) ? globalThis.Boolean(object.acknowledged) : undefined,
|
|
6710
|
+
notSent: isSet(object.notSent) ? globalThis.Boolean(object.notSent) : false,
|
|
6642
6711
|
};
|
|
6643
6712
|
},
|
|
6644
6713
|
toJSON(message) {
|
|
@@ -6652,6 +6721,15 @@ exports.CommandResponse = {
|
|
|
6652
6721
|
if (message.errorMessage !== "") {
|
|
6653
6722
|
obj.errorMessage = message.errorMessage;
|
|
6654
6723
|
}
|
|
6724
|
+
if (message.linuxcncSerial !== undefined) {
|
|
6725
|
+
obj.linuxcncSerial = Math.round(message.linuxcncSerial);
|
|
6726
|
+
}
|
|
6727
|
+
if (message.acknowledged !== undefined) {
|
|
6728
|
+
obj.acknowledged = message.acknowledged;
|
|
6729
|
+
}
|
|
6730
|
+
if (message.notSent !== false) {
|
|
6731
|
+
obj.notSent = message.notSent;
|
|
6732
|
+
}
|
|
6655
6733
|
return obj;
|
|
6656
6734
|
},
|
|
6657
6735
|
create(base) {
|
|
@@ -6662,6 +6740,9 @@ exports.CommandResponse = {
|
|
|
6662
6740
|
message.serial = object.serial ?? 0;
|
|
6663
6741
|
message.status = object.status ?? 0;
|
|
6664
6742
|
message.errorMessage = object.errorMessage ?? "";
|
|
6743
|
+
message.linuxcncSerial = object.linuxcncSerial ?? undefined;
|
|
6744
|
+
message.acknowledged = object.acknowledged ?? undefined;
|
|
6745
|
+
message.notSent = object.notSent ?? false;
|
|
6665
6746
|
return message;
|
|
6666
6747
|
},
|
|
6667
6748
|
};
|
|
@@ -6703,7 +6784,7 @@ exports.GetStatusRequest = {
|
|
|
6703
6784
|
},
|
|
6704
6785
|
};
|
|
6705
6786
|
function createBaseWaitCompleteRequest() {
|
|
6706
|
-
return { serial: 0, timeout: 0 };
|
|
6787
|
+
return { serial: 0, timeout: 0, linuxcncSerial: undefined };
|
|
6707
6788
|
}
|
|
6708
6789
|
exports.WaitCompleteRequest = {
|
|
6709
6790
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -6713,6 +6794,9 @@ exports.WaitCompleteRequest = {
|
|
|
6713
6794
|
if (message.timeout !== 0) {
|
|
6714
6795
|
writer.uint32(17).double(message.timeout);
|
|
6715
6796
|
}
|
|
6797
|
+
if (message.linuxcncSerial !== undefined) {
|
|
6798
|
+
writer.uint32(24).int32(message.linuxcncSerial);
|
|
6799
|
+
}
|
|
6716
6800
|
return writer;
|
|
6717
6801
|
},
|
|
6718
6802
|
decode(input, length) {
|
|
@@ -6736,6 +6820,13 @@ exports.WaitCompleteRequest = {
|
|
|
6736
6820
|
message.timeout = reader.double();
|
|
6737
6821
|
continue;
|
|
6738
6822
|
}
|
|
6823
|
+
case 3: {
|
|
6824
|
+
if (tag !== 24) {
|
|
6825
|
+
break;
|
|
6826
|
+
}
|
|
6827
|
+
message.linuxcncSerial = reader.int32();
|
|
6828
|
+
continue;
|
|
6829
|
+
}
|
|
6739
6830
|
}
|
|
6740
6831
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6741
6832
|
break;
|
|
@@ -6748,6 +6839,7 @@ exports.WaitCompleteRequest = {
|
|
|
6748
6839
|
return {
|
|
6749
6840
|
serial: isSet(object.serial) ? globalThis.Number(object.serial) : 0,
|
|
6750
6841
|
timeout: isSet(object.timeout) ? globalThis.Number(object.timeout) : 0,
|
|
6842
|
+
linuxcncSerial: isSet(object.linuxcncSerial) ? globalThis.Number(object.linuxcncSerial) : undefined,
|
|
6751
6843
|
};
|
|
6752
6844
|
},
|
|
6753
6845
|
toJSON(message) {
|
|
@@ -6758,6 +6850,9 @@ exports.WaitCompleteRequest = {
|
|
|
6758
6850
|
if (message.timeout !== 0) {
|
|
6759
6851
|
obj.timeout = message.timeout;
|
|
6760
6852
|
}
|
|
6853
|
+
if (message.linuxcncSerial !== undefined) {
|
|
6854
|
+
obj.linuxcncSerial = Math.round(message.linuxcncSerial);
|
|
6855
|
+
}
|
|
6761
6856
|
return obj;
|
|
6762
6857
|
},
|
|
6763
6858
|
create(base) {
|
|
@@ -6767,6 +6862,7 @@ exports.WaitCompleteRequest = {
|
|
|
6767
6862
|
const message = createBaseWaitCompleteRequest();
|
|
6768
6863
|
message.serial = object.serial ?? 0;
|
|
6769
6864
|
message.timeout = object.timeout ?? 0;
|
|
6865
|
+
message.linuxcncSerial = object.linuxcncSerial ?? undefined;
|
|
6770
6866
|
return message;
|
|
6771
6867
|
},
|
|
6772
6868
|
};
|
|
@@ -6822,10 +6918,13 @@ exports.StreamStatusRequest = {
|
|
|
6822
6918
|
},
|
|
6823
6919
|
};
|
|
6824
6920
|
function createBaseStreamErrorsRequest() {
|
|
6825
|
-
return {};
|
|
6921
|
+
return { replayBuffered: false };
|
|
6826
6922
|
}
|
|
6827
6923
|
exports.StreamErrorsRequest = {
|
|
6828
|
-
encode(
|
|
6924
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
6925
|
+
if (message.replayBuffered !== false) {
|
|
6926
|
+
writer.uint32(8).bool(message.replayBuffered);
|
|
6927
|
+
}
|
|
6829
6928
|
return writer;
|
|
6830
6929
|
},
|
|
6831
6930
|
decode(input, length) {
|
|
@@ -6835,6 +6934,13 @@ exports.StreamErrorsRequest = {
|
|
|
6835
6934
|
while (reader.pos < end) {
|
|
6836
6935
|
const tag = reader.uint32();
|
|
6837
6936
|
switch (tag >>> 3) {
|
|
6937
|
+
case 1: {
|
|
6938
|
+
if (tag !== 8) {
|
|
6939
|
+
break;
|
|
6940
|
+
}
|
|
6941
|
+
message.replayBuffered = reader.bool();
|
|
6942
|
+
continue;
|
|
6943
|
+
}
|
|
6838
6944
|
}
|
|
6839
6945
|
if ((tag & 7) === 4 || tag === 0) {
|
|
6840
6946
|
break;
|
|
@@ -6843,18 +6949,22 @@ exports.StreamErrorsRequest = {
|
|
|
6843
6949
|
}
|
|
6844
6950
|
return message;
|
|
6845
6951
|
},
|
|
6846
|
-
fromJSON(
|
|
6847
|
-
return {};
|
|
6952
|
+
fromJSON(object) {
|
|
6953
|
+
return { replayBuffered: isSet(object.replayBuffered) ? globalThis.Boolean(object.replayBuffered) : false };
|
|
6848
6954
|
},
|
|
6849
|
-
toJSON(
|
|
6955
|
+
toJSON(message) {
|
|
6850
6956
|
const obj = {};
|
|
6957
|
+
if (message.replayBuffered !== false) {
|
|
6958
|
+
obj.replayBuffered = message.replayBuffered;
|
|
6959
|
+
}
|
|
6851
6960
|
return obj;
|
|
6852
6961
|
},
|
|
6853
6962
|
create(base) {
|
|
6854
6963
|
return exports.StreamErrorsRequest.fromPartial(base ?? {});
|
|
6855
6964
|
},
|
|
6856
|
-
fromPartial(
|
|
6965
|
+
fromPartial(object) {
|
|
6857
6966
|
const message = createBaseStreamErrorsRequest();
|
|
6967
|
+
message.replayBuffered = object.replayBuffered ?? false;
|
|
6858
6968
|
return message;
|
|
6859
6969
|
},
|
|
6860
6970
|
};
|
|
@@ -7114,7 +7224,7 @@ exports.FileInfo = {
|
|
|
7114
7224
|
if (tag !== 32) {
|
|
7115
7225
|
break;
|
|
7116
7226
|
}
|
|
7117
|
-
message.modifiedTimestamp =
|
|
7227
|
+
message.modifiedTimestamp = timestampToNumber(reader.int64());
|
|
7118
7228
|
continue;
|
|
7119
7229
|
}
|
|
7120
7230
|
case 5: {
|
|
@@ -7343,90 +7453,1595 @@ exports.DeleteFileResponse = {
|
|
|
7343
7453
|
return message;
|
|
7344
7454
|
},
|
|
7345
7455
|
};
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
responseStream: false,
|
|
7362
|
-
requestSerialize: (value) => Buffer.from(exports.LinuxCNCCommand.encode(value).finish()),
|
|
7363
|
-
requestDeserialize: (value) => exports.LinuxCNCCommand.decode(value),
|
|
7364
|
-
responseSerialize: (value) => Buffer.from(exports.CommandResponse.encode(value).finish()),
|
|
7365
|
-
responseDeserialize: (value) => exports.CommandResponse.decode(value),
|
|
7366
|
-
},
|
|
7367
|
-
/** Wait for command completion */
|
|
7368
|
-
waitComplete: {
|
|
7369
|
-
path: "/linuxcnc.LinuxCNCService/WaitComplete",
|
|
7370
|
-
requestStream: false,
|
|
7371
|
-
responseStream: false,
|
|
7372
|
-
requestSerialize: (value) => Buffer.from(exports.WaitCompleteRequest.encode(value).finish()),
|
|
7373
|
-
requestDeserialize: (value) => exports.WaitCompleteRequest.decode(value),
|
|
7374
|
-
responseSerialize: (value) => Buffer.from(exports.CommandResponse.encode(value).finish()),
|
|
7375
|
-
responseDeserialize: (value) => exports.CommandResponse.decode(value),
|
|
7456
|
+
function createBaseReadFileRequest() {
|
|
7457
|
+
return { filename: "", offset: 0, maxBytes: 0 };
|
|
7458
|
+
}
|
|
7459
|
+
exports.ReadFileRequest = {
|
|
7460
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
7461
|
+
if (message.filename !== "") {
|
|
7462
|
+
writer.uint32(10).string(message.filename);
|
|
7463
|
+
}
|
|
7464
|
+
if (message.offset !== 0) {
|
|
7465
|
+
writer.uint32(16).int64(message.offset);
|
|
7466
|
+
}
|
|
7467
|
+
if (message.maxBytes !== 0) {
|
|
7468
|
+
writer.uint32(24).int32(message.maxBytes);
|
|
7469
|
+
}
|
|
7470
|
+
return writer;
|
|
7376
7471
|
},
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7472
|
+
decode(input, length) {
|
|
7473
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
7474
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7475
|
+
const message = createBaseReadFileRequest();
|
|
7476
|
+
while (reader.pos < end) {
|
|
7477
|
+
const tag = reader.uint32();
|
|
7478
|
+
switch (tag >>> 3) {
|
|
7479
|
+
case 1: {
|
|
7480
|
+
if (tag !== 10) {
|
|
7481
|
+
break;
|
|
7482
|
+
}
|
|
7483
|
+
message.filename = reader.string();
|
|
7484
|
+
continue;
|
|
7485
|
+
}
|
|
7486
|
+
case 2: {
|
|
7487
|
+
if (tag !== 16) {
|
|
7488
|
+
break;
|
|
7489
|
+
}
|
|
7490
|
+
message.offset = longToNumber(reader.int64());
|
|
7491
|
+
continue;
|
|
7492
|
+
}
|
|
7493
|
+
case 3: {
|
|
7494
|
+
if (tag !== 24) {
|
|
7495
|
+
break;
|
|
7496
|
+
}
|
|
7497
|
+
message.maxBytes = reader.int32();
|
|
7498
|
+
continue;
|
|
7499
|
+
}
|
|
7500
|
+
}
|
|
7501
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7502
|
+
break;
|
|
7503
|
+
}
|
|
7504
|
+
reader.skip(tag & 7);
|
|
7505
|
+
}
|
|
7506
|
+
return message;
|
|
7386
7507
|
},
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
requestDeserialize: (value) => exports.StreamErrorsRequest.decode(value),
|
|
7394
|
-
responseSerialize: (value) => Buffer.from(exports.ErrorMessage.encode(value).finish()),
|
|
7395
|
-
responseDeserialize: (value) => exports.ErrorMessage.decode(value),
|
|
7508
|
+
fromJSON(object) {
|
|
7509
|
+
return {
|
|
7510
|
+
filename: isSet(object.filename) ? globalThis.String(object.filename) : "",
|
|
7511
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
7512
|
+
maxBytes: isSet(object.maxBytes) ? globalThis.Number(object.maxBytes) : 0,
|
|
7513
|
+
};
|
|
7396
7514
|
},
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7515
|
+
toJSON(message) {
|
|
7516
|
+
const obj = {};
|
|
7517
|
+
if (message.filename !== "") {
|
|
7518
|
+
obj.filename = message.filename;
|
|
7519
|
+
}
|
|
7520
|
+
if (message.offset !== 0) {
|
|
7521
|
+
obj.offset = Math.round(message.offset);
|
|
7522
|
+
}
|
|
7523
|
+
if (message.maxBytes !== 0) {
|
|
7524
|
+
obj.maxBytes = Math.round(message.maxBytes);
|
|
7525
|
+
}
|
|
7526
|
+
return obj;
|
|
7406
7527
|
},
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
path: "/linuxcnc.LinuxCNCService/ListFiles",
|
|
7410
|
-
requestStream: false,
|
|
7411
|
-
responseStream: false,
|
|
7412
|
-
requestSerialize: (value) => Buffer.from(exports.ListFilesRequest.encode(value).finish()),
|
|
7413
|
-
requestDeserialize: (value) => exports.ListFilesRequest.decode(value),
|
|
7414
|
-
responseSerialize: (value) => Buffer.from(exports.ListFilesResponse.encode(value).finish()),
|
|
7415
|
-
responseDeserialize: (value) => exports.ListFilesResponse.decode(value),
|
|
7528
|
+
create(base) {
|
|
7529
|
+
return exports.ReadFileRequest.fromPartial(base ?? {});
|
|
7416
7530
|
},
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
requestDeserialize: (value) => exports.DeleteFileRequest.decode(value),
|
|
7424
|
-
responseSerialize: (value) => Buffer.from(exports.DeleteFileResponse.encode(value).finish()),
|
|
7425
|
-
responseDeserialize: (value) => exports.DeleteFileResponse.decode(value),
|
|
7531
|
+
fromPartial(object) {
|
|
7532
|
+
const message = createBaseReadFileRequest();
|
|
7533
|
+
message.filename = object.filename ?? "";
|
|
7534
|
+
message.offset = object.offset ?? 0;
|
|
7535
|
+
message.maxBytes = object.maxBytes ?? 0;
|
|
7536
|
+
return message;
|
|
7426
7537
|
},
|
|
7427
7538
|
};
|
|
7428
|
-
|
|
7429
|
-
|
|
7539
|
+
function createBaseReadFileResponse() {
|
|
7540
|
+
return { path: "", content: new Uint8Array(0), offset: 0, totalSizeBytes: 0, endOfFile: false, modifiedTimestamp: 0 };
|
|
7541
|
+
}
|
|
7542
|
+
exports.ReadFileResponse = {
|
|
7543
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
7544
|
+
if (message.path !== "") {
|
|
7545
|
+
writer.uint32(10).string(message.path);
|
|
7546
|
+
}
|
|
7547
|
+
if (message.content.length !== 0) {
|
|
7548
|
+
writer.uint32(18).bytes(message.content);
|
|
7549
|
+
}
|
|
7550
|
+
if (message.offset !== 0) {
|
|
7551
|
+
writer.uint32(24).int64(message.offset);
|
|
7552
|
+
}
|
|
7553
|
+
if (message.totalSizeBytes !== 0) {
|
|
7554
|
+
writer.uint32(32).int64(message.totalSizeBytes);
|
|
7555
|
+
}
|
|
7556
|
+
if (message.endOfFile !== false) {
|
|
7557
|
+
writer.uint32(40).bool(message.endOfFile);
|
|
7558
|
+
}
|
|
7559
|
+
if (message.modifiedTimestamp !== 0) {
|
|
7560
|
+
writer.uint32(48).int64(message.modifiedTimestamp);
|
|
7561
|
+
}
|
|
7562
|
+
return writer;
|
|
7563
|
+
},
|
|
7564
|
+
decode(input, length) {
|
|
7565
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
7566
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7567
|
+
const message = createBaseReadFileResponse();
|
|
7568
|
+
while (reader.pos < end) {
|
|
7569
|
+
const tag = reader.uint32();
|
|
7570
|
+
switch (tag >>> 3) {
|
|
7571
|
+
case 1: {
|
|
7572
|
+
if (tag !== 10) {
|
|
7573
|
+
break;
|
|
7574
|
+
}
|
|
7575
|
+
message.path = reader.string();
|
|
7576
|
+
continue;
|
|
7577
|
+
}
|
|
7578
|
+
case 2: {
|
|
7579
|
+
if (tag !== 18) {
|
|
7580
|
+
break;
|
|
7581
|
+
}
|
|
7582
|
+
message.content = reader.bytes();
|
|
7583
|
+
continue;
|
|
7584
|
+
}
|
|
7585
|
+
case 3: {
|
|
7586
|
+
if (tag !== 24) {
|
|
7587
|
+
break;
|
|
7588
|
+
}
|
|
7589
|
+
message.offset = longToNumber(reader.int64());
|
|
7590
|
+
continue;
|
|
7591
|
+
}
|
|
7592
|
+
case 4: {
|
|
7593
|
+
if (tag !== 32) {
|
|
7594
|
+
break;
|
|
7595
|
+
}
|
|
7596
|
+
message.totalSizeBytes = longToNumber(reader.int64());
|
|
7597
|
+
continue;
|
|
7598
|
+
}
|
|
7599
|
+
case 5: {
|
|
7600
|
+
if (tag !== 40) {
|
|
7601
|
+
break;
|
|
7602
|
+
}
|
|
7603
|
+
message.endOfFile = reader.bool();
|
|
7604
|
+
continue;
|
|
7605
|
+
}
|
|
7606
|
+
case 6: {
|
|
7607
|
+
if (tag !== 48) {
|
|
7608
|
+
break;
|
|
7609
|
+
}
|
|
7610
|
+
message.modifiedTimestamp = timestampToNumber(reader.int64());
|
|
7611
|
+
continue;
|
|
7612
|
+
}
|
|
7613
|
+
}
|
|
7614
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7615
|
+
break;
|
|
7616
|
+
}
|
|
7617
|
+
reader.skip(tag & 7);
|
|
7618
|
+
}
|
|
7619
|
+
return message;
|
|
7620
|
+
},
|
|
7621
|
+
fromJSON(object) {
|
|
7622
|
+
return {
|
|
7623
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
7624
|
+
content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(0),
|
|
7625
|
+
offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
|
|
7626
|
+
totalSizeBytes: isSet(object.totalSizeBytes) ? globalThis.Number(object.totalSizeBytes) : 0,
|
|
7627
|
+
endOfFile: isSet(object.endOfFile) ? globalThis.Boolean(object.endOfFile) : false,
|
|
7628
|
+
modifiedTimestamp: isSet(object.modifiedTimestamp) ? globalThis.Number(object.modifiedTimestamp) : 0,
|
|
7629
|
+
};
|
|
7630
|
+
},
|
|
7631
|
+
toJSON(message) {
|
|
7632
|
+
const obj = {};
|
|
7633
|
+
if (message.path !== "") {
|
|
7634
|
+
obj.path = message.path;
|
|
7635
|
+
}
|
|
7636
|
+
if (message.content.length !== 0) {
|
|
7637
|
+
obj.content = base64FromBytes(message.content);
|
|
7638
|
+
}
|
|
7639
|
+
if (message.offset !== 0) {
|
|
7640
|
+
obj.offset = Math.round(message.offset);
|
|
7641
|
+
}
|
|
7642
|
+
if (message.totalSizeBytes !== 0) {
|
|
7643
|
+
obj.totalSizeBytes = Math.round(message.totalSizeBytes);
|
|
7644
|
+
}
|
|
7645
|
+
if (message.endOfFile !== false) {
|
|
7646
|
+
obj.endOfFile = message.endOfFile;
|
|
7647
|
+
}
|
|
7648
|
+
if (message.modifiedTimestamp !== 0) {
|
|
7649
|
+
obj.modifiedTimestamp = Math.round(message.modifiedTimestamp);
|
|
7650
|
+
}
|
|
7651
|
+
return obj;
|
|
7652
|
+
},
|
|
7653
|
+
create(base) {
|
|
7654
|
+
return exports.ReadFileResponse.fromPartial(base ?? {});
|
|
7655
|
+
},
|
|
7656
|
+
fromPartial(object) {
|
|
7657
|
+
const message = createBaseReadFileResponse();
|
|
7658
|
+
message.path = object.path ?? "";
|
|
7659
|
+
message.content = object.content ?? new Uint8Array(0);
|
|
7660
|
+
message.offset = object.offset ?? 0;
|
|
7661
|
+
message.totalSizeBytes = object.totalSizeBytes ?? 0;
|
|
7662
|
+
message.endOfFile = object.endOfFile ?? false;
|
|
7663
|
+
message.modifiedTimestamp = object.modifiedTimestamp ?? 0;
|
|
7664
|
+
return message;
|
|
7665
|
+
},
|
|
7666
|
+
};
|
|
7667
|
+
function createBaseResolveFileRequest() {
|
|
7668
|
+
return { filename: "" };
|
|
7669
|
+
}
|
|
7670
|
+
exports.ResolveFileRequest = {
|
|
7671
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
7672
|
+
if (message.filename !== "") {
|
|
7673
|
+
writer.uint32(10).string(message.filename);
|
|
7674
|
+
}
|
|
7675
|
+
return writer;
|
|
7676
|
+
},
|
|
7677
|
+
decode(input, length) {
|
|
7678
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
7679
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7680
|
+
const message = createBaseResolveFileRequest();
|
|
7681
|
+
while (reader.pos < end) {
|
|
7682
|
+
const tag = reader.uint32();
|
|
7683
|
+
switch (tag >>> 3) {
|
|
7684
|
+
case 1: {
|
|
7685
|
+
if (tag !== 10) {
|
|
7686
|
+
break;
|
|
7687
|
+
}
|
|
7688
|
+
message.filename = reader.string();
|
|
7689
|
+
continue;
|
|
7690
|
+
}
|
|
7691
|
+
}
|
|
7692
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7693
|
+
break;
|
|
7694
|
+
}
|
|
7695
|
+
reader.skip(tag & 7);
|
|
7696
|
+
}
|
|
7697
|
+
return message;
|
|
7698
|
+
},
|
|
7699
|
+
fromJSON(object) {
|
|
7700
|
+
return { filename: isSet(object.filename) ? globalThis.String(object.filename) : "" };
|
|
7701
|
+
},
|
|
7702
|
+
toJSON(message) {
|
|
7703
|
+
const obj = {};
|
|
7704
|
+
if (message.filename !== "") {
|
|
7705
|
+
obj.filename = message.filename;
|
|
7706
|
+
}
|
|
7707
|
+
return obj;
|
|
7708
|
+
},
|
|
7709
|
+
create(base) {
|
|
7710
|
+
return exports.ResolveFileRequest.fromPartial(base ?? {});
|
|
7711
|
+
},
|
|
7712
|
+
fromPartial(object) {
|
|
7713
|
+
const message = createBaseResolveFileRequest();
|
|
7714
|
+
message.filename = object.filename ?? "";
|
|
7715
|
+
return message;
|
|
7716
|
+
},
|
|
7717
|
+
};
|
|
7718
|
+
function createBaseResolveFileResponse() {
|
|
7719
|
+
return {
|
|
7720
|
+
path: "",
|
|
7721
|
+
exists: false,
|
|
7722
|
+
isDirectory: false,
|
|
7723
|
+
isSymlink: false,
|
|
7724
|
+
isLoadedProgram: false,
|
|
7725
|
+
loadedProgram: "",
|
|
7726
|
+
interpState: 0,
|
|
7727
|
+
};
|
|
7728
|
+
}
|
|
7729
|
+
exports.ResolveFileResponse = {
|
|
7730
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
7731
|
+
if (message.path !== "") {
|
|
7732
|
+
writer.uint32(10).string(message.path);
|
|
7733
|
+
}
|
|
7734
|
+
if (message.exists !== false) {
|
|
7735
|
+
writer.uint32(16).bool(message.exists);
|
|
7736
|
+
}
|
|
7737
|
+
if (message.isDirectory !== false) {
|
|
7738
|
+
writer.uint32(24).bool(message.isDirectory);
|
|
7739
|
+
}
|
|
7740
|
+
if (message.isSymlink !== false) {
|
|
7741
|
+
writer.uint32(32).bool(message.isSymlink);
|
|
7742
|
+
}
|
|
7743
|
+
if (message.isLoadedProgram !== false) {
|
|
7744
|
+
writer.uint32(40).bool(message.isLoadedProgram);
|
|
7745
|
+
}
|
|
7746
|
+
if (message.loadedProgram !== "") {
|
|
7747
|
+
writer.uint32(50).string(message.loadedProgram);
|
|
7748
|
+
}
|
|
7749
|
+
if (message.interpState !== 0) {
|
|
7750
|
+
writer.uint32(56).int32(message.interpState);
|
|
7751
|
+
}
|
|
7752
|
+
return writer;
|
|
7753
|
+
},
|
|
7754
|
+
decode(input, length) {
|
|
7755
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
7756
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7757
|
+
const message = createBaseResolveFileResponse();
|
|
7758
|
+
while (reader.pos < end) {
|
|
7759
|
+
const tag = reader.uint32();
|
|
7760
|
+
switch (tag >>> 3) {
|
|
7761
|
+
case 1: {
|
|
7762
|
+
if (tag !== 10) {
|
|
7763
|
+
break;
|
|
7764
|
+
}
|
|
7765
|
+
message.path = reader.string();
|
|
7766
|
+
continue;
|
|
7767
|
+
}
|
|
7768
|
+
case 2: {
|
|
7769
|
+
if (tag !== 16) {
|
|
7770
|
+
break;
|
|
7771
|
+
}
|
|
7772
|
+
message.exists = reader.bool();
|
|
7773
|
+
continue;
|
|
7774
|
+
}
|
|
7775
|
+
case 3: {
|
|
7776
|
+
if (tag !== 24) {
|
|
7777
|
+
break;
|
|
7778
|
+
}
|
|
7779
|
+
message.isDirectory = reader.bool();
|
|
7780
|
+
continue;
|
|
7781
|
+
}
|
|
7782
|
+
case 4: {
|
|
7783
|
+
if (tag !== 32) {
|
|
7784
|
+
break;
|
|
7785
|
+
}
|
|
7786
|
+
message.isSymlink = reader.bool();
|
|
7787
|
+
continue;
|
|
7788
|
+
}
|
|
7789
|
+
case 5: {
|
|
7790
|
+
if (tag !== 40) {
|
|
7791
|
+
break;
|
|
7792
|
+
}
|
|
7793
|
+
message.isLoadedProgram = reader.bool();
|
|
7794
|
+
continue;
|
|
7795
|
+
}
|
|
7796
|
+
case 6: {
|
|
7797
|
+
if (tag !== 50) {
|
|
7798
|
+
break;
|
|
7799
|
+
}
|
|
7800
|
+
message.loadedProgram = reader.string();
|
|
7801
|
+
continue;
|
|
7802
|
+
}
|
|
7803
|
+
case 7: {
|
|
7804
|
+
if (tag !== 56) {
|
|
7805
|
+
break;
|
|
7806
|
+
}
|
|
7807
|
+
message.interpState = reader.int32();
|
|
7808
|
+
continue;
|
|
7809
|
+
}
|
|
7810
|
+
}
|
|
7811
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7812
|
+
break;
|
|
7813
|
+
}
|
|
7814
|
+
reader.skip(tag & 7);
|
|
7815
|
+
}
|
|
7816
|
+
return message;
|
|
7817
|
+
},
|
|
7818
|
+
fromJSON(object) {
|
|
7819
|
+
return {
|
|
7820
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
7821
|
+
exists: isSet(object.exists) ? globalThis.Boolean(object.exists) : false,
|
|
7822
|
+
isDirectory: isSet(object.isDirectory) ? globalThis.Boolean(object.isDirectory) : false,
|
|
7823
|
+
isSymlink: isSet(object.isSymlink) ? globalThis.Boolean(object.isSymlink) : false,
|
|
7824
|
+
isLoadedProgram: isSet(object.isLoadedProgram) ? globalThis.Boolean(object.isLoadedProgram) : false,
|
|
7825
|
+
loadedProgram: isSet(object.loadedProgram) ? globalThis.String(object.loadedProgram) : "",
|
|
7826
|
+
interpState: isSet(object.interpState) ? interpStateFromJSON(object.interpState) : 0,
|
|
7827
|
+
};
|
|
7828
|
+
},
|
|
7829
|
+
toJSON(message) {
|
|
7830
|
+
const obj = {};
|
|
7831
|
+
if (message.path !== "") {
|
|
7832
|
+
obj.path = message.path;
|
|
7833
|
+
}
|
|
7834
|
+
if (message.exists !== false) {
|
|
7835
|
+
obj.exists = message.exists;
|
|
7836
|
+
}
|
|
7837
|
+
if (message.isDirectory !== false) {
|
|
7838
|
+
obj.isDirectory = message.isDirectory;
|
|
7839
|
+
}
|
|
7840
|
+
if (message.isSymlink !== false) {
|
|
7841
|
+
obj.isSymlink = message.isSymlink;
|
|
7842
|
+
}
|
|
7843
|
+
if (message.isLoadedProgram !== false) {
|
|
7844
|
+
obj.isLoadedProgram = message.isLoadedProgram;
|
|
7845
|
+
}
|
|
7846
|
+
if (message.loadedProgram !== "") {
|
|
7847
|
+
obj.loadedProgram = message.loadedProgram;
|
|
7848
|
+
}
|
|
7849
|
+
if (message.interpState !== 0) {
|
|
7850
|
+
obj.interpState = interpStateToJSON(message.interpState);
|
|
7851
|
+
}
|
|
7852
|
+
return obj;
|
|
7853
|
+
},
|
|
7854
|
+
create(base) {
|
|
7855
|
+
return exports.ResolveFileResponse.fromPartial(base ?? {});
|
|
7856
|
+
},
|
|
7857
|
+
fromPartial(object) {
|
|
7858
|
+
const message = createBaseResolveFileResponse();
|
|
7859
|
+
message.path = object.path ?? "";
|
|
7860
|
+
message.exists = object.exists ?? false;
|
|
7861
|
+
message.isDirectory = object.isDirectory ?? false;
|
|
7862
|
+
message.isSymlink = object.isSymlink ?? false;
|
|
7863
|
+
message.isLoadedProgram = object.isLoadedProgram ?? false;
|
|
7864
|
+
message.loadedProgram = object.loadedProgram ?? "";
|
|
7865
|
+
message.interpState = object.interpState ?? 0;
|
|
7866
|
+
return message;
|
|
7867
|
+
},
|
|
7868
|
+
};
|
|
7869
|
+
function createBaseGetMachineConfigRequest() {
|
|
7870
|
+
return {};
|
|
7871
|
+
}
|
|
7872
|
+
exports.GetMachineConfigRequest = {
|
|
7873
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
7874
|
+
return writer;
|
|
7875
|
+
},
|
|
7876
|
+
decode(input, length) {
|
|
7877
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
7878
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7879
|
+
const message = createBaseGetMachineConfigRequest();
|
|
7880
|
+
while (reader.pos < end) {
|
|
7881
|
+
const tag = reader.uint32();
|
|
7882
|
+
switch (tag >>> 3) {
|
|
7883
|
+
}
|
|
7884
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
7885
|
+
break;
|
|
7886
|
+
}
|
|
7887
|
+
reader.skip(tag & 7);
|
|
7888
|
+
}
|
|
7889
|
+
return message;
|
|
7890
|
+
},
|
|
7891
|
+
fromJSON(_) {
|
|
7892
|
+
return {};
|
|
7893
|
+
},
|
|
7894
|
+
toJSON(_) {
|
|
7895
|
+
const obj = {};
|
|
7896
|
+
return obj;
|
|
7897
|
+
},
|
|
7898
|
+
create(base) {
|
|
7899
|
+
return exports.GetMachineConfigRequest.fromPartial(base ?? {});
|
|
7900
|
+
},
|
|
7901
|
+
fromPartial(_) {
|
|
7902
|
+
const message = createBaseGetMachineConfigRequest();
|
|
7903
|
+
return message;
|
|
7904
|
+
},
|
|
7905
|
+
};
|
|
7906
|
+
function createBaseJointConfig() {
|
|
7907
|
+
return {
|
|
7908
|
+
jointNumber: 0,
|
|
7909
|
+
jointType: 0,
|
|
7910
|
+
axisLetter: "",
|
|
7911
|
+
minLimit: 0,
|
|
7912
|
+
maxLimit: 0,
|
|
7913
|
+
maxVelocity: 0,
|
|
7914
|
+
maxAcceleration: 0,
|
|
7915
|
+
homeSequence: undefined,
|
|
7916
|
+
units: 0,
|
|
7917
|
+
};
|
|
7918
|
+
}
|
|
7919
|
+
exports.JointConfig = {
|
|
7920
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
7921
|
+
if (message.jointNumber !== 0) {
|
|
7922
|
+
writer.uint32(8).int32(message.jointNumber);
|
|
7923
|
+
}
|
|
7924
|
+
if (message.jointType !== 0) {
|
|
7925
|
+
writer.uint32(16).int32(message.jointType);
|
|
7926
|
+
}
|
|
7927
|
+
if (message.axisLetter !== "") {
|
|
7928
|
+
writer.uint32(26).string(message.axisLetter);
|
|
7929
|
+
}
|
|
7930
|
+
if (message.minLimit !== 0) {
|
|
7931
|
+
writer.uint32(33).double(message.minLimit);
|
|
7932
|
+
}
|
|
7933
|
+
if (message.maxLimit !== 0) {
|
|
7934
|
+
writer.uint32(41).double(message.maxLimit);
|
|
7935
|
+
}
|
|
7936
|
+
if (message.maxVelocity !== 0) {
|
|
7937
|
+
writer.uint32(49).double(message.maxVelocity);
|
|
7938
|
+
}
|
|
7939
|
+
if (message.maxAcceleration !== 0) {
|
|
7940
|
+
writer.uint32(57).double(message.maxAcceleration);
|
|
7941
|
+
}
|
|
7942
|
+
if (message.homeSequence !== undefined) {
|
|
7943
|
+
writer.uint32(64).int32(message.homeSequence);
|
|
7944
|
+
}
|
|
7945
|
+
if (message.units !== 0) {
|
|
7946
|
+
writer.uint32(73).double(message.units);
|
|
7947
|
+
}
|
|
7948
|
+
return writer;
|
|
7949
|
+
},
|
|
7950
|
+
decode(input, length) {
|
|
7951
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
7952
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
7953
|
+
const message = createBaseJointConfig();
|
|
7954
|
+
while (reader.pos < end) {
|
|
7955
|
+
const tag = reader.uint32();
|
|
7956
|
+
switch (tag >>> 3) {
|
|
7957
|
+
case 1: {
|
|
7958
|
+
if (tag !== 8) {
|
|
7959
|
+
break;
|
|
7960
|
+
}
|
|
7961
|
+
message.jointNumber = reader.int32();
|
|
7962
|
+
continue;
|
|
7963
|
+
}
|
|
7964
|
+
case 2: {
|
|
7965
|
+
if (tag !== 16) {
|
|
7966
|
+
break;
|
|
7967
|
+
}
|
|
7968
|
+
message.jointType = reader.int32();
|
|
7969
|
+
continue;
|
|
7970
|
+
}
|
|
7971
|
+
case 3: {
|
|
7972
|
+
if (tag !== 26) {
|
|
7973
|
+
break;
|
|
7974
|
+
}
|
|
7975
|
+
message.axisLetter = reader.string();
|
|
7976
|
+
continue;
|
|
7977
|
+
}
|
|
7978
|
+
case 4: {
|
|
7979
|
+
if (tag !== 33) {
|
|
7980
|
+
break;
|
|
7981
|
+
}
|
|
7982
|
+
message.minLimit = reader.double();
|
|
7983
|
+
continue;
|
|
7984
|
+
}
|
|
7985
|
+
case 5: {
|
|
7986
|
+
if (tag !== 41) {
|
|
7987
|
+
break;
|
|
7988
|
+
}
|
|
7989
|
+
message.maxLimit = reader.double();
|
|
7990
|
+
continue;
|
|
7991
|
+
}
|
|
7992
|
+
case 6: {
|
|
7993
|
+
if (tag !== 49) {
|
|
7994
|
+
break;
|
|
7995
|
+
}
|
|
7996
|
+
message.maxVelocity = reader.double();
|
|
7997
|
+
continue;
|
|
7998
|
+
}
|
|
7999
|
+
case 7: {
|
|
8000
|
+
if (tag !== 57) {
|
|
8001
|
+
break;
|
|
8002
|
+
}
|
|
8003
|
+
message.maxAcceleration = reader.double();
|
|
8004
|
+
continue;
|
|
8005
|
+
}
|
|
8006
|
+
case 8: {
|
|
8007
|
+
if (tag !== 64) {
|
|
8008
|
+
break;
|
|
8009
|
+
}
|
|
8010
|
+
message.homeSequence = reader.int32();
|
|
8011
|
+
continue;
|
|
8012
|
+
}
|
|
8013
|
+
case 9: {
|
|
8014
|
+
if (tag !== 73) {
|
|
8015
|
+
break;
|
|
8016
|
+
}
|
|
8017
|
+
message.units = reader.double();
|
|
8018
|
+
continue;
|
|
8019
|
+
}
|
|
8020
|
+
}
|
|
8021
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8022
|
+
break;
|
|
8023
|
+
}
|
|
8024
|
+
reader.skip(tag & 7);
|
|
8025
|
+
}
|
|
8026
|
+
return message;
|
|
8027
|
+
},
|
|
8028
|
+
fromJSON(object) {
|
|
8029
|
+
return {
|
|
8030
|
+
jointNumber: isSet(object.jointNumber) ? globalThis.Number(object.jointNumber) : 0,
|
|
8031
|
+
jointType: isSet(object.jointType) ? jointTypeFromJSON(object.jointType) : 0,
|
|
8032
|
+
axisLetter: isSet(object.axisLetter) ? globalThis.String(object.axisLetter) : "",
|
|
8033
|
+
minLimit: isSet(object.minLimit) ? globalThis.Number(object.minLimit) : 0,
|
|
8034
|
+
maxLimit: isSet(object.maxLimit) ? globalThis.Number(object.maxLimit) : 0,
|
|
8035
|
+
maxVelocity: isSet(object.maxVelocity) ? globalThis.Number(object.maxVelocity) : 0,
|
|
8036
|
+
maxAcceleration: isSet(object.maxAcceleration) ? globalThis.Number(object.maxAcceleration) : 0,
|
|
8037
|
+
homeSequence: isSet(object.homeSequence) ? globalThis.Number(object.homeSequence) : undefined,
|
|
8038
|
+
units: isSet(object.units) ? globalThis.Number(object.units) : 0,
|
|
8039
|
+
};
|
|
8040
|
+
},
|
|
8041
|
+
toJSON(message) {
|
|
8042
|
+
const obj = {};
|
|
8043
|
+
if (message.jointNumber !== 0) {
|
|
8044
|
+
obj.jointNumber = Math.round(message.jointNumber);
|
|
8045
|
+
}
|
|
8046
|
+
if (message.jointType !== 0) {
|
|
8047
|
+
obj.jointType = jointTypeToJSON(message.jointType);
|
|
8048
|
+
}
|
|
8049
|
+
if (message.axisLetter !== "") {
|
|
8050
|
+
obj.axisLetter = message.axisLetter;
|
|
8051
|
+
}
|
|
8052
|
+
if (message.minLimit !== 0) {
|
|
8053
|
+
obj.minLimit = message.minLimit;
|
|
8054
|
+
}
|
|
8055
|
+
if (message.maxLimit !== 0) {
|
|
8056
|
+
obj.maxLimit = message.maxLimit;
|
|
8057
|
+
}
|
|
8058
|
+
if (message.maxVelocity !== 0) {
|
|
8059
|
+
obj.maxVelocity = message.maxVelocity;
|
|
8060
|
+
}
|
|
8061
|
+
if (message.maxAcceleration !== 0) {
|
|
8062
|
+
obj.maxAcceleration = message.maxAcceleration;
|
|
8063
|
+
}
|
|
8064
|
+
if (message.homeSequence !== undefined) {
|
|
8065
|
+
obj.homeSequence = Math.round(message.homeSequence);
|
|
8066
|
+
}
|
|
8067
|
+
if (message.units !== 0) {
|
|
8068
|
+
obj.units = message.units;
|
|
8069
|
+
}
|
|
8070
|
+
return obj;
|
|
8071
|
+
},
|
|
8072
|
+
create(base) {
|
|
8073
|
+
return exports.JointConfig.fromPartial(base ?? {});
|
|
8074
|
+
},
|
|
8075
|
+
fromPartial(object) {
|
|
8076
|
+
const message = createBaseJointConfig();
|
|
8077
|
+
message.jointNumber = object.jointNumber ?? 0;
|
|
8078
|
+
message.jointType = object.jointType ?? 0;
|
|
8079
|
+
message.axisLetter = object.axisLetter ?? "";
|
|
8080
|
+
message.minLimit = object.minLimit ?? 0;
|
|
8081
|
+
message.maxLimit = object.maxLimit ?? 0;
|
|
8082
|
+
message.maxVelocity = object.maxVelocity ?? 0;
|
|
8083
|
+
message.maxAcceleration = object.maxAcceleration ?? 0;
|
|
8084
|
+
message.homeSequence = object.homeSequence ?? undefined;
|
|
8085
|
+
message.units = object.units ?? 0;
|
|
8086
|
+
return message;
|
|
8087
|
+
},
|
|
8088
|
+
};
|
|
8089
|
+
function createBaseAxisConfig() {
|
|
8090
|
+
return { axisNumber: 0, letter: "", minLimit: 0, maxLimit: 0, maxVelocity: 0, maxAcceleration: 0, joints: [] };
|
|
8091
|
+
}
|
|
8092
|
+
exports.AxisConfig = {
|
|
8093
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
8094
|
+
if (message.axisNumber !== 0) {
|
|
8095
|
+
writer.uint32(8).int32(message.axisNumber);
|
|
8096
|
+
}
|
|
8097
|
+
if (message.letter !== "") {
|
|
8098
|
+
writer.uint32(18).string(message.letter);
|
|
8099
|
+
}
|
|
8100
|
+
if (message.minLimit !== 0) {
|
|
8101
|
+
writer.uint32(25).double(message.minLimit);
|
|
8102
|
+
}
|
|
8103
|
+
if (message.maxLimit !== 0) {
|
|
8104
|
+
writer.uint32(33).double(message.maxLimit);
|
|
8105
|
+
}
|
|
8106
|
+
if (message.maxVelocity !== 0) {
|
|
8107
|
+
writer.uint32(41).double(message.maxVelocity);
|
|
8108
|
+
}
|
|
8109
|
+
if (message.maxAcceleration !== 0) {
|
|
8110
|
+
writer.uint32(49).double(message.maxAcceleration);
|
|
8111
|
+
}
|
|
8112
|
+
writer.uint32(58).fork();
|
|
8113
|
+
for (const v of message.joints) {
|
|
8114
|
+
writer.int32(v);
|
|
8115
|
+
}
|
|
8116
|
+
writer.join();
|
|
8117
|
+
return writer;
|
|
8118
|
+
},
|
|
8119
|
+
decode(input, length) {
|
|
8120
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8121
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8122
|
+
const message = createBaseAxisConfig();
|
|
8123
|
+
while (reader.pos < end) {
|
|
8124
|
+
const tag = reader.uint32();
|
|
8125
|
+
switch (tag >>> 3) {
|
|
8126
|
+
case 1: {
|
|
8127
|
+
if (tag !== 8) {
|
|
8128
|
+
break;
|
|
8129
|
+
}
|
|
8130
|
+
message.axisNumber = reader.int32();
|
|
8131
|
+
continue;
|
|
8132
|
+
}
|
|
8133
|
+
case 2: {
|
|
8134
|
+
if (tag !== 18) {
|
|
8135
|
+
break;
|
|
8136
|
+
}
|
|
8137
|
+
message.letter = reader.string();
|
|
8138
|
+
continue;
|
|
8139
|
+
}
|
|
8140
|
+
case 3: {
|
|
8141
|
+
if (tag !== 25) {
|
|
8142
|
+
break;
|
|
8143
|
+
}
|
|
8144
|
+
message.minLimit = reader.double();
|
|
8145
|
+
continue;
|
|
8146
|
+
}
|
|
8147
|
+
case 4: {
|
|
8148
|
+
if (tag !== 33) {
|
|
8149
|
+
break;
|
|
8150
|
+
}
|
|
8151
|
+
message.maxLimit = reader.double();
|
|
8152
|
+
continue;
|
|
8153
|
+
}
|
|
8154
|
+
case 5: {
|
|
8155
|
+
if (tag !== 41) {
|
|
8156
|
+
break;
|
|
8157
|
+
}
|
|
8158
|
+
message.maxVelocity = reader.double();
|
|
8159
|
+
continue;
|
|
8160
|
+
}
|
|
8161
|
+
case 6: {
|
|
8162
|
+
if (tag !== 49) {
|
|
8163
|
+
break;
|
|
8164
|
+
}
|
|
8165
|
+
message.maxAcceleration = reader.double();
|
|
8166
|
+
continue;
|
|
8167
|
+
}
|
|
8168
|
+
case 7: {
|
|
8169
|
+
if (tag === 56) {
|
|
8170
|
+
message.joints.push(reader.int32());
|
|
8171
|
+
continue;
|
|
8172
|
+
}
|
|
8173
|
+
if (tag === 58) {
|
|
8174
|
+
const end2 = reader.uint32() + reader.pos;
|
|
8175
|
+
while (reader.pos < end2) {
|
|
8176
|
+
message.joints.push(reader.int32());
|
|
8177
|
+
}
|
|
8178
|
+
continue;
|
|
8179
|
+
}
|
|
8180
|
+
break;
|
|
8181
|
+
}
|
|
8182
|
+
}
|
|
8183
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8184
|
+
break;
|
|
8185
|
+
}
|
|
8186
|
+
reader.skip(tag & 7);
|
|
8187
|
+
}
|
|
8188
|
+
return message;
|
|
8189
|
+
},
|
|
8190
|
+
fromJSON(object) {
|
|
8191
|
+
return {
|
|
8192
|
+
axisNumber: isSet(object.axisNumber) ? globalThis.Number(object.axisNumber) : 0,
|
|
8193
|
+
letter: isSet(object.letter) ? globalThis.String(object.letter) : "",
|
|
8194
|
+
minLimit: isSet(object.minLimit) ? globalThis.Number(object.minLimit) : 0,
|
|
8195
|
+
maxLimit: isSet(object.maxLimit) ? globalThis.Number(object.maxLimit) : 0,
|
|
8196
|
+
maxVelocity: isSet(object.maxVelocity) ? globalThis.Number(object.maxVelocity) : 0,
|
|
8197
|
+
maxAcceleration: isSet(object.maxAcceleration) ? globalThis.Number(object.maxAcceleration) : 0,
|
|
8198
|
+
joints: globalThis.Array.isArray(object?.joints) ? object.joints.map((e) => globalThis.Number(e)) : [],
|
|
8199
|
+
};
|
|
8200
|
+
},
|
|
8201
|
+
toJSON(message) {
|
|
8202
|
+
const obj = {};
|
|
8203
|
+
if (message.axisNumber !== 0) {
|
|
8204
|
+
obj.axisNumber = Math.round(message.axisNumber);
|
|
8205
|
+
}
|
|
8206
|
+
if (message.letter !== "") {
|
|
8207
|
+
obj.letter = message.letter;
|
|
8208
|
+
}
|
|
8209
|
+
if (message.minLimit !== 0) {
|
|
8210
|
+
obj.minLimit = message.minLimit;
|
|
8211
|
+
}
|
|
8212
|
+
if (message.maxLimit !== 0) {
|
|
8213
|
+
obj.maxLimit = message.maxLimit;
|
|
8214
|
+
}
|
|
8215
|
+
if (message.maxVelocity !== 0) {
|
|
8216
|
+
obj.maxVelocity = message.maxVelocity;
|
|
8217
|
+
}
|
|
8218
|
+
if (message.maxAcceleration !== 0) {
|
|
8219
|
+
obj.maxAcceleration = message.maxAcceleration;
|
|
8220
|
+
}
|
|
8221
|
+
if (message.joints?.length) {
|
|
8222
|
+
obj.joints = message.joints.map((e) => Math.round(e));
|
|
8223
|
+
}
|
|
8224
|
+
return obj;
|
|
8225
|
+
},
|
|
8226
|
+
create(base) {
|
|
8227
|
+
return exports.AxisConfig.fromPartial(base ?? {});
|
|
8228
|
+
},
|
|
8229
|
+
fromPartial(object) {
|
|
8230
|
+
const message = createBaseAxisConfig();
|
|
8231
|
+
message.axisNumber = object.axisNumber ?? 0;
|
|
8232
|
+
message.letter = object.letter ?? "";
|
|
8233
|
+
message.minLimit = object.minLimit ?? 0;
|
|
8234
|
+
message.maxLimit = object.maxLimit ?? 0;
|
|
8235
|
+
message.maxVelocity = object.maxVelocity ?? 0;
|
|
8236
|
+
message.maxAcceleration = object.maxAcceleration ?? 0;
|
|
8237
|
+
message.joints = object.joints?.map((e) => e) || [];
|
|
8238
|
+
return message;
|
|
8239
|
+
},
|
|
8240
|
+
};
|
|
8241
|
+
function createBaseMachineConfig() {
|
|
8242
|
+
return {
|
|
8243
|
+
iniFilename: "",
|
|
8244
|
+
iniReadable: false,
|
|
8245
|
+
machineName: "",
|
|
8246
|
+
kinematics: "",
|
|
8247
|
+
kinematicsModule: "",
|
|
8248
|
+
kinematicsType: 0,
|
|
8249
|
+
coordinates: "",
|
|
8250
|
+
axisMask: 0,
|
|
8251
|
+
jointCount: 0,
|
|
8252
|
+
spindleCount: 0,
|
|
8253
|
+
jointAxisMappingKnown: false,
|
|
8254
|
+
linearUnits: 0,
|
|
8255
|
+
angularUnits: 0,
|
|
8256
|
+
linearUnitsName: "",
|
|
8257
|
+
angularUnitsName: "",
|
|
8258
|
+
maxLinearVelocity: 0,
|
|
8259
|
+
defaultLinearVelocity: 0,
|
|
8260
|
+
maxAngularVelocity: 0,
|
|
8261
|
+
defaultAngularVelocity: 0,
|
|
8262
|
+
lathe: false,
|
|
8263
|
+
backToolLathe: false,
|
|
8264
|
+
maxFeedOverride: 0,
|
|
8265
|
+
minSpindleOverride: 0,
|
|
8266
|
+
maxSpindleOverride: 0,
|
|
8267
|
+
ncFilesDirectory: "",
|
|
8268
|
+
joints: [],
|
|
8269
|
+
axes: [],
|
|
8270
|
+
};
|
|
8271
|
+
}
|
|
8272
|
+
exports.MachineConfig = {
|
|
8273
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
8274
|
+
if (message.iniFilename !== "") {
|
|
8275
|
+
writer.uint32(10).string(message.iniFilename);
|
|
8276
|
+
}
|
|
8277
|
+
if (message.iniReadable !== false) {
|
|
8278
|
+
writer.uint32(16).bool(message.iniReadable);
|
|
8279
|
+
}
|
|
8280
|
+
if (message.machineName !== "") {
|
|
8281
|
+
writer.uint32(26).string(message.machineName);
|
|
8282
|
+
}
|
|
8283
|
+
if (message.kinematics !== "") {
|
|
8284
|
+
writer.uint32(34).string(message.kinematics);
|
|
8285
|
+
}
|
|
8286
|
+
if (message.kinematicsModule !== "") {
|
|
8287
|
+
writer.uint32(42).string(message.kinematicsModule);
|
|
8288
|
+
}
|
|
8289
|
+
if (message.kinematicsType !== 0) {
|
|
8290
|
+
writer.uint32(48).int32(message.kinematicsType);
|
|
8291
|
+
}
|
|
8292
|
+
if (message.coordinates !== "") {
|
|
8293
|
+
writer.uint32(58).string(message.coordinates);
|
|
8294
|
+
}
|
|
8295
|
+
if (message.axisMask !== 0) {
|
|
8296
|
+
writer.uint32(64).int32(message.axisMask);
|
|
8297
|
+
}
|
|
8298
|
+
if (message.jointCount !== 0) {
|
|
8299
|
+
writer.uint32(72).int32(message.jointCount);
|
|
8300
|
+
}
|
|
8301
|
+
if (message.spindleCount !== 0) {
|
|
8302
|
+
writer.uint32(80).int32(message.spindleCount);
|
|
8303
|
+
}
|
|
8304
|
+
if (message.jointAxisMappingKnown !== false) {
|
|
8305
|
+
writer.uint32(88).bool(message.jointAxisMappingKnown);
|
|
8306
|
+
}
|
|
8307
|
+
if (message.linearUnits !== 0) {
|
|
8308
|
+
writer.uint32(97).double(message.linearUnits);
|
|
8309
|
+
}
|
|
8310
|
+
if (message.angularUnits !== 0) {
|
|
8311
|
+
writer.uint32(105).double(message.angularUnits);
|
|
8312
|
+
}
|
|
8313
|
+
if (message.linearUnitsName !== "") {
|
|
8314
|
+
writer.uint32(114).string(message.linearUnitsName);
|
|
8315
|
+
}
|
|
8316
|
+
if (message.angularUnitsName !== "") {
|
|
8317
|
+
writer.uint32(122).string(message.angularUnitsName);
|
|
8318
|
+
}
|
|
8319
|
+
if (message.maxLinearVelocity !== 0) {
|
|
8320
|
+
writer.uint32(129).double(message.maxLinearVelocity);
|
|
8321
|
+
}
|
|
8322
|
+
if (message.defaultLinearVelocity !== 0) {
|
|
8323
|
+
writer.uint32(137).double(message.defaultLinearVelocity);
|
|
8324
|
+
}
|
|
8325
|
+
if (message.maxAngularVelocity !== 0) {
|
|
8326
|
+
writer.uint32(145).double(message.maxAngularVelocity);
|
|
8327
|
+
}
|
|
8328
|
+
if (message.defaultAngularVelocity !== 0) {
|
|
8329
|
+
writer.uint32(153).double(message.defaultAngularVelocity);
|
|
8330
|
+
}
|
|
8331
|
+
if (message.lathe !== false) {
|
|
8332
|
+
writer.uint32(160).bool(message.lathe);
|
|
8333
|
+
}
|
|
8334
|
+
if (message.backToolLathe !== false) {
|
|
8335
|
+
writer.uint32(168).bool(message.backToolLathe);
|
|
8336
|
+
}
|
|
8337
|
+
if (message.maxFeedOverride !== 0) {
|
|
8338
|
+
writer.uint32(177).double(message.maxFeedOverride);
|
|
8339
|
+
}
|
|
8340
|
+
if (message.minSpindleOverride !== 0) {
|
|
8341
|
+
writer.uint32(185).double(message.minSpindleOverride);
|
|
8342
|
+
}
|
|
8343
|
+
if (message.maxSpindleOverride !== 0) {
|
|
8344
|
+
writer.uint32(193).double(message.maxSpindleOverride);
|
|
8345
|
+
}
|
|
8346
|
+
if (message.ncFilesDirectory !== "") {
|
|
8347
|
+
writer.uint32(202).string(message.ncFilesDirectory);
|
|
8348
|
+
}
|
|
8349
|
+
for (const v of message.joints) {
|
|
8350
|
+
exports.JointConfig.encode(v, writer.uint32(242).fork()).join();
|
|
8351
|
+
}
|
|
8352
|
+
for (const v of message.axes) {
|
|
8353
|
+
exports.AxisConfig.encode(v, writer.uint32(250).fork()).join();
|
|
8354
|
+
}
|
|
8355
|
+
return writer;
|
|
8356
|
+
},
|
|
8357
|
+
decode(input, length) {
|
|
8358
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8359
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8360
|
+
const message = createBaseMachineConfig();
|
|
8361
|
+
while (reader.pos < end) {
|
|
8362
|
+
const tag = reader.uint32();
|
|
8363
|
+
switch (tag >>> 3) {
|
|
8364
|
+
case 1: {
|
|
8365
|
+
if (tag !== 10) {
|
|
8366
|
+
break;
|
|
8367
|
+
}
|
|
8368
|
+
message.iniFilename = reader.string();
|
|
8369
|
+
continue;
|
|
8370
|
+
}
|
|
8371
|
+
case 2: {
|
|
8372
|
+
if (tag !== 16) {
|
|
8373
|
+
break;
|
|
8374
|
+
}
|
|
8375
|
+
message.iniReadable = reader.bool();
|
|
8376
|
+
continue;
|
|
8377
|
+
}
|
|
8378
|
+
case 3: {
|
|
8379
|
+
if (tag !== 26) {
|
|
8380
|
+
break;
|
|
8381
|
+
}
|
|
8382
|
+
message.machineName = reader.string();
|
|
8383
|
+
continue;
|
|
8384
|
+
}
|
|
8385
|
+
case 4: {
|
|
8386
|
+
if (tag !== 34) {
|
|
8387
|
+
break;
|
|
8388
|
+
}
|
|
8389
|
+
message.kinematics = reader.string();
|
|
8390
|
+
continue;
|
|
8391
|
+
}
|
|
8392
|
+
case 5: {
|
|
8393
|
+
if (tag !== 42) {
|
|
8394
|
+
break;
|
|
8395
|
+
}
|
|
8396
|
+
message.kinematicsModule = reader.string();
|
|
8397
|
+
continue;
|
|
8398
|
+
}
|
|
8399
|
+
case 6: {
|
|
8400
|
+
if (tag !== 48) {
|
|
8401
|
+
break;
|
|
8402
|
+
}
|
|
8403
|
+
message.kinematicsType = reader.int32();
|
|
8404
|
+
continue;
|
|
8405
|
+
}
|
|
8406
|
+
case 7: {
|
|
8407
|
+
if (tag !== 58) {
|
|
8408
|
+
break;
|
|
8409
|
+
}
|
|
8410
|
+
message.coordinates = reader.string();
|
|
8411
|
+
continue;
|
|
8412
|
+
}
|
|
8413
|
+
case 8: {
|
|
8414
|
+
if (tag !== 64) {
|
|
8415
|
+
break;
|
|
8416
|
+
}
|
|
8417
|
+
message.axisMask = reader.int32();
|
|
8418
|
+
continue;
|
|
8419
|
+
}
|
|
8420
|
+
case 9: {
|
|
8421
|
+
if (tag !== 72) {
|
|
8422
|
+
break;
|
|
8423
|
+
}
|
|
8424
|
+
message.jointCount = reader.int32();
|
|
8425
|
+
continue;
|
|
8426
|
+
}
|
|
8427
|
+
case 10: {
|
|
8428
|
+
if (tag !== 80) {
|
|
8429
|
+
break;
|
|
8430
|
+
}
|
|
8431
|
+
message.spindleCount = reader.int32();
|
|
8432
|
+
continue;
|
|
8433
|
+
}
|
|
8434
|
+
case 11: {
|
|
8435
|
+
if (tag !== 88) {
|
|
8436
|
+
break;
|
|
8437
|
+
}
|
|
8438
|
+
message.jointAxisMappingKnown = reader.bool();
|
|
8439
|
+
continue;
|
|
8440
|
+
}
|
|
8441
|
+
case 12: {
|
|
8442
|
+
if (tag !== 97) {
|
|
8443
|
+
break;
|
|
8444
|
+
}
|
|
8445
|
+
message.linearUnits = reader.double();
|
|
8446
|
+
continue;
|
|
8447
|
+
}
|
|
8448
|
+
case 13: {
|
|
8449
|
+
if (tag !== 105) {
|
|
8450
|
+
break;
|
|
8451
|
+
}
|
|
8452
|
+
message.angularUnits = reader.double();
|
|
8453
|
+
continue;
|
|
8454
|
+
}
|
|
8455
|
+
case 14: {
|
|
8456
|
+
if (tag !== 114) {
|
|
8457
|
+
break;
|
|
8458
|
+
}
|
|
8459
|
+
message.linearUnitsName = reader.string();
|
|
8460
|
+
continue;
|
|
8461
|
+
}
|
|
8462
|
+
case 15: {
|
|
8463
|
+
if (tag !== 122) {
|
|
8464
|
+
break;
|
|
8465
|
+
}
|
|
8466
|
+
message.angularUnitsName = reader.string();
|
|
8467
|
+
continue;
|
|
8468
|
+
}
|
|
8469
|
+
case 16: {
|
|
8470
|
+
if (tag !== 129) {
|
|
8471
|
+
break;
|
|
8472
|
+
}
|
|
8473
|
+
message.maxLinearVelocity = reader.double();
|
|
8474
|
+
continue;
|
|
8475
|
+
}
|
|
8476
|
+
case 17: {
|
|
8477
|
+
if (tag !== 137) {
|
|
8478
|
+
break;
|
|
8479
|
+
}
|
|
8480
|
+
message.defaultLinearVelocity = reader.double();
|
|
8481
|
+
continue;
|
|
8482
|
+
}
|
|
8483
|
+
case 18: {
|
|
8484
|
+
if (tag !== 145) {
|
|
8485
|
+
break;
|
|
8486
|
+
}
|
|
8487
|
+
message.maxAngularVelocity = reader.double();
|
|
8488
|
+
continue;
|
|
8489
|
+
}
|
|
8490
|
+
case 19: {
|
|
8491
|
+
if (tag !== 153) {
|
|
8492
|
+
break;
|
|
8493
|
+
}
|
|
8494
|
+
message.defaultAngularVelocity = reader.double();
|
|
8495
|
+
continue;
|
|
8496
|
+
}
|
|
8497
|
+
case 20: {
|
|
8498
|
+
if (tag !== 160) {
|
|
8499
|
+
break;
|
|
8500
|
+
}
|
|
8501
|
+
message.lathe = reader.bool();
|
|
8502
|
+
continue;
|
|
8503
|
+
}
|
|
8504
|
+
case 21: {
|
|
8505
|
+
if (tag !== 168) {
|
|
8506
|
+
break;
|
|
8507
|
+
}
|
|
8508
|
+
message.backToolLathe = reader.bool();
|
|
8509
|
+
continue;
|
|
8510
|
+
}
|
|
8511
|
+
case 22: {
|
|
8512
|
+
if (tag !== 177) {
|
|
8513
|
+
break;
|
|
8514
|
+
}
|
|
8515
|
+
message.maxFeedOverride = reader.double();
|
|
8516
|
+
continue;
|
|
8517
|
+
}
|
|
8518
|
+
case 23: {
|
|
8519
|
+
if (tag !== 185) {
|
|
8520
|
+
break;
|
|
8521
|
+
}
|
|
8522
|
+
message.minSpindleOverride = reader.double();
|
|
8523
|
+
continue;
|
|
8524
|
+
}
|
|
8525
|
+
case 24: {
|
|
8526
|
+
if (tag !== 193) {
|
|
8527
|
+
break;
|
|
8528
|
+
}
|
|
8529
|
+
message.maxSpindleOverride = reader.double();
|
|
8530
|
+
continue;
|
|
8531
|
+
}
|
|
8532
|
+
case 25: {
|
|
8533
|
+
if (tag !== 202) {
|
|
8534
|
+
break;
|
|
8535
|
+
}
|
|
8536
|
+
message.ncFilesDirectory = reader.string();
|
|
8537
|
+
continue;
|
|
8538
|
+
}
|
|
8539
|
+
case 30: {
|
|
8540
|
+
if (tag !== 242) {
|
|
8541
|
+
break;
|
|
8542
|
+
}
|
|
8543
|
+
message.joints.push(exports.JointConfig.decode(reader, reader.uint32()));
|
|
8544
|
+
continue;
|
|
8545
|
+
}
|
|
8546
|
+
case 31: {
|
|
8547
|
+
if (tag !== 250) {
|
|
8548
|
+
break;
|
|
8549
|
+
}
|
|
8550
|
+
message.axes.push(exports.AxisConfig.decode(reader, reader.uint32()));
|
|
8551
|
+
continue;
|
|
8552
|
+
}
|
|
8553
|
+
}
|
|
8554
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8555
|
+
break;
|
|
8556
|
+
}
|
|
8557
|
+
reader.skip(tag & 7);
|
|
8558
|
+
}
|
|
8559
|
+
return message;
|
|
8560
|
+
},
|
|
8561
|
+
fromJSON(object) {
|
|
8562
|
+
return {
|
|
8563
|
+
iniFilename: isSet(object.iniFilename) ? globalThis.String(object.iniFilename) : "",
|
|
8564
|
+
iniReadable: isSet(object.iniReadable) ? globalThis.Boolean(object.iniReadable) : false,
|
|
8565
|
+
machineName: isSet(object.machineName) ? globalThis.String(object.machineName) : "",
|
|
8566
|
+
kinematics: isSet(object.kinematics) ? globalThis.String(object.kinematics) : "",
|
|
8567
|
+
kinematicsModule: isSet(object.kinematicsModule) ? globalThis.String(object.kinematicsModule) : "",
|
|
8568
|
+
kinematicsType: isSet(object.kinematicsType) ? kinematicsTypeFromJSON(object.kinematicsType) : 0,
|
|
8569
|
+
coordinates: isSet(object.coordinates) ? globalThis.String(object.coordinates) : "",
|
|
8570
|
+
axisMask: isSet(object.axisMask) ? globalThis.Number(object.axisMask) : 0,
|
|
8571
|
+
jointCount: isSet(object.jointCount) ? globalThis.Number(object.jointCount) : 0,
|
|
8572
|
+
spindleCount: isSet(object.spindleCount) ? globalThis.Number(object.spindleCount) : 0,
|
|
8573
|
+
jointAxisMappingKnown: isSet(object.jointAxisMappingKnown)
|
|
8574
|
+
? globalThis.Boolean(object.jointAxisMappingKnown)
|
|
8575
|
+
: false,
|
|
8576
|
+
linearUnits: isSet(object.linearUnits) ? globalThis.Number(object.linearUnits) : 0,
|
|
8577
|
+
angularUnits: isSet(object.angularUnits) ? globalThis.Number(object.angularUnits) : 0,
|
|
8578
|
+
linearUnitsName: isSet(object.linearUnitsName) ? globalThis.String(object.linearUnitsName) : "",
|
|
8579
|
+
angularUnitsName: isSet(object.angularUnitsName) ? globalThis.String(object.angularUnitsName) : "",
|
|
8580
|
+
maxLinearVelocity: isSet(object.maxLinearVelocity) ? globalThis.Number(object.maxLinearVelocity) : 0,
|
|
8581
|
+
defaultLinearVelocity: isSet(object.defaultLinearVelocity) ? globalThis.Number(object.defaultLinearVelocity) : 0,
|
|
8582
|
+
maxAngularVelocity: isSet(object.maxAngularVelocity) ? globalThis.Number(object.maxAngularVelocity) : 0,
|
|
8583
|
+
defaultAngularVelocity: isSet(object.defaultAngularVelocity)
|
|
8584
|
+
? globalThis.Number(object.defaultAngularVelocity)
|
|
8585
|
+
: 0,
|
|
8586
|
+
lathe: isSet(object.lathe) ? globalThis.Boolean(object.lathe) : false,
|
|
8587
|
+
backToolLathe: isSet(object.backToolLathe) ? globalThis.Boolean(object.backToolLathe) : false,
|
|
8588
|
+
maxFeedOverride: isSet(object.maxFeedOverride) ? globalThis.Number(object.maxFeedOverride) : 0,
|
|
8589
|
+
minSpindleOverride: isSet(object.minSpindleOverride) ? globalThis.Number(object.minSpindleOverride) : 0,
|
|
8590
|
+
maxSpindleOverride: isSet(object.maxSpindleOverride) ? globalThis.Number(object.maxSpindleOverride) : 0,
|
|
8591
|
+
ncFilesDirectory: isSet(object.ncFilesDirectory) ? globalThis.String(object.ncFilesDirectory) : "",
|
|
8592
|
+
joints: globalThis.Array.isArray(object?.joints) ? object.joints.map((e) => exports.JointConfig.fromJSON(e)) : [],
|
|
8593
|
+
axes: globalThis.Array.isArray(object?.axes) ? object.axes.map((e) => exports.AxisConfig.fromJSON(e)) : [],
|
|
8594
|
+
};
|
|
8595
|
+
},
|
|
8596
|
+
toJSON(message) {
|
|
8597
|
+
const obj = {};
|
|
8598
|
+
if (message.iniFilename !== "") {
|
|
8599
|
+
obj.iniFilename = message.iniFilename;
|
|
8600
|
+
}
|
|
8601
|
+
if (message.iniReadable !== false) {
|
|
8602
|
+
obj.iniReadable = message.iniReadable;
|
|
8603
|
+
}
|
|
8604
|
+
if (message.machineName !== "") {
|
|
8605
|
+
obj.machineName = message.machineName;
|
|
8606
|
+
}
|
|
8607
|
+
if (message.kinematics !== "") {
|
|
8608
|
+
obj.kinematics = message.kinematics;
|
|
8609
|
+
}
|
|
8610
|
+
if (message.kinematicsModule !== "") {
|
|
8611
|
+
obj.kinematicsModule = message.kinematicsModule;
|
|
8612
|
+
}
|
|
8613
|
+
if (message.kinematicsType !== 0) {
|
|
8614
|
+
obj.kinematicsType = kinematicsTypeToJSON(message.kinematicsType);
|
|
8615
|
+
}
|
|
8616
|
+
if (message.coordinates !== "") {
|
|
8617
|
+
obj.coordinates = message.coordinates;
|
|
8618
|
+
}
|
|
8619
|
+
if (message.axisMask !== 0) {
|
|
8620
|
+
obj.axisMask = Math.round(message.axisMask);
|
|
8621
|
+
}
|
|
8622
|
+
if (message.jointCount !== 0) {
|
|
8623
|
+
obj.jointCount = Math.round(message.jointCount);
|
|
8624
|
+
}
|
|
8625
|
+
if (message.spindleCount !== 0) {
|
|
8626
|
+
obj.spindleCount = Math.round(message.spindleCount);
|
|
8627
|
+
}
|
|
8628
|
+
if (message.jointAxisMappingKnown !== false) {
|
|
8629
|
+
obj.jointAxisMappingKnown = message.jointAxisMappingKnown;
|
|
8630
|
+
}
|
|
8631
|
+
if (message.linearUnits !== 0) {
|
|
8632
|
+
obj.linearUnits = message.linearUnits;
|
|
8633
|
+
}
|
|
8634
|
+
if (message.angularUnits !== 0) {
|
|
8635
|
+
obj.angularUnits = message.angularUnits;
|
|
8636
|
+
}
|
|
8637
|
+
if (message.linearUnitsName !== "") {
|
|
8638
|
+
obj.linearUnitsName = message.linearUnitsName;
|
|
8639
|
+
}
|
|
8640
|
+
if (message.angularUnitsName !== "") {
|
|
8641
|
+
obj.angularUnitsName = message.angularUnitsName;
|
|
8642
|
+
}
|
|
8643
|
+
if (message.maxLinearVelocity !== 0) {
|
|
8644
|
+
obj.maxLinearVelocity = message.maxLinearVelocity;
|
|
8645
|
+
}
|
|
8646
|
+
if (message.defaultLinearVelocity !== 0) {
|
|
8647
|
+
obj.defaultLinearVelocity = message.defaultLinearVelocity;
|
|
8648
|
+
}
|
|
8649
|
+
if (message.maxAngularVelocity !== 0) {
|
|
8650
|
+
obj.maxAngularVelocity = message.maxAngularVelocity;
|
|
8651
|
+
}
|
|
8652
|
+
if (message.defaultAngularVelocity !== 0) {
|
|
8653
|
+
obj.defaultAngularVelocity = message.defaultAngularVelocity;
|
|
8654
|
+
}
|
|
8655
|
+
if (message.lathe !== false) {
|
|
8656
|
+
obj.lathe = message.lathe;
|
|
8657
|
+
}
|
|
8658
|
+
if (message.backToolLathe !== false) {
|
|
8659
|
+
obj.backToolLathe = message.backToolLathe;
|
|
8660
|
+
}
|
|
8661
|
+
if (message.maxFeedOverride !== 0) {
|
|
8662
|
+
obj.maxFeedOverride = message.maxFeedOverride;
|
|
8663
|
+
}
|
|
8664
|
+
if (message.minSpindleOverride !== 0) {
|
|
8665
|
+
obj.minSpindleOverride = message.minSpindleOverride;
|
|
8666
|
+
}
|
|
8667
|
+
if (message.maxSpindleOverride !== 0) {
|
|
8668
|
+
obj.maxSpindleOverride = message.maxSpindleOverride;
|
|
8669
|
+
}
|
|
8670
|
+
if (message.ncFilesDirectory !== "") {
|
|
8671
|
+
obj.ncFilesDirectory = message.ncFilesDirectory;
|
|
8672
|
+
}
|
|
8673
|
+
if (message.joints?.length) {
|
|
8674
|
+
obj.joints = message.joints.map((e) => exports.JointConfig.toJSON(e));
|
|
8675
|
+
}
|
|
8676
|
+
if (message.axes?.length) {
|
|
8677
|
+
obj.axes = message.axes.map((e) => exports.AxisConfig.toJSON(e));
|
|
8678
|
+
}
|
|
8679
|
+
return obj;
|
|
8680
|
+
},
|
|
8681
|
+
create(base) {
|
|
8682
|
+
return exports.MachineConfig.fromPartial(base ?? {});
|
|
8683
|
+
},
|
|
8684
|
+
fromPartial(object) {
|
|
8685
|
+
const message = createBaseMachineConfig();
|
|
8686
|
+
message.iniFilename = object.iniFilename ?? "";
|
|
8687
|
+
message.iniReadable = object.iniReadable ?? false;
|
|
8688
|
+
message.machineName = object.machineName ?? "";
|
|
8689
|
+
message.kinematics = object.kinematics ?? "";
|
|
8690
|
+
message.kinematicsModule = object.kinematicsModule ?? "";
|
|
8691
|
+
message.kinematicsType = object.kinematicsType ?? 0;
|
|
8692
|
+
message.coordinates = object.coordinates ?? "";
|
|
8693
|
+
message.axisMask = object.axisMask ?? 0;
|
|
8694
|
+
message.jointCount = object.jointCount ?? 0;
|
|
8695
|
+
message.spindleCount = object.spindleCount ?? 0;
|
|
8696
|
+
message.jointAxisMappingKnown = object.jointAxisMappingKnown ?? false;
|
|
8697
|
+
message.linearUnits = object.linearUnits ?? 0;
|
|
8698
|
+
message.angularUnits = object.angularUnits ?? 0;
|
|
8699
|
+
message.linearUnitsName = object.linearUnitsName ?? "";
|
|
8700
|
+
message.angularUnitsName = object.angularUnitsName ?? "";
|
|
8701
|
+
message.maxLinearVelocity = object.maxLinearVelocity ?? 0;
|
|
8702
|
+
message.defaultLinearVelocity = object.defaultLinearVelocity ?? 0;
|
|
8703
|
+
message.maxAngularVelocity = object.maxAngularVelocity ?? 0;
|
|
8704
|
+
message.defaultAngularVelocity = object.defaultAngularVelocity ?? 0;
|
|
8705
|
+
message.lathe = object.lathe ?? false;
|
|
8706
|
+
message.backToolLathe = object.backToolLathe ?? false;
|
|
8707
|
+
message.maxFeedOverride = object.maxFeedOverride ?? 0;
|
|
8708
|
+
message.minSpindleOverride = object.minSpindleOverride ?? 0;
|
|
8709
|
+
message.maxSpindleOverride = object.maxSpindleOverride ?? 0;
|
|
8710
|
+
message.ncFilesDirectory = object.ncFilesDirectory ?? "";
|
|
8711
|
+
message.joints = object.joints?.map((e) => exports.JointConfig.fromPartial(e)) || [];
|
|
8712
|
+
message.axes = object.axes?.map((e) => exports.AxisConfig.fromPartial(e)) || [];
|
|
8713
|
+
return message;
|
|
8714
|
+
},
|
|
8715
|
+
};
|
|
8716
|
+
function createBaseGetServerInfoRequest() {
|
|
8717
|
+
return {};
|
|
8718
|
+
}
|
|
8719
|
+
exports.GetServerInfoRequest = {
|
|
8720
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
8721
|
+
return writer;
|
|
8722
|
+
},
|
|
8723
|
+
decode(input, length) {
|
|
8724
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8725
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8726
|
+
const message = createBaseGetServerInfoRequest();
|
|
8727
|
+
while (reader.pos < end) {
|
|
8728
|
+
const tag = reader.uint32();
|
|
8729
|
+
switch (tag >>> 3) {
|
|
8730
|
+
}
|
|
8731
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8732
|
+
break;
|
|
8733
|
+
}
|
|
8734
|
+
reader.skip(tag & 7);
|
|
8735
|
+
}
|
|
8736
|
+
return message;
|
|
8737
|
+
},
|
|
8738
|
+
fromJSON(_) {
|
|
8739
|
+
return {};
|
|
8740
|
+
},
|
|
8741
|
+
toJSON(_) {
|
|
8742
|
+
const obj = {};
|
|
8743
|
+
return obj;
|
|
8744
|
+
},
|
|
8745
|
+
create(base) {
|
|
8746
|
+
return exports.GetServerInfoRequest.fromPartial(base ?? {});
|
|
8747
|
+
},
|
|
8748
|
+
fromPartial(_) {
|
|
8749
|
+
const message = createBaseGetServerInfoRequest();
|
|
8750
|
+
return message;
|
|
8751
|
+
},
|
|
8752
|
+
};
|
|
8753
|
+
function createBaseServerInfo() {
|
|
8754
|
+
return { serverVersion: "", linuxcncConnected: false, linuxcncVersion: "", errorChannelMode: "", stopsNotTaken: 0 };
|
|
8755
|
+
}
|
|
8756
|
+
exports.ServerInfo = {
|
|
8757
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
8758
|
+
if (message.serverVersion !== "") {
|
|
8759
|
+
writer.uint32(10).string(message.serverVersion);
|
|
8760
|
+
}
|
|
8761
|
+
if (message.linuxcncConnected !== false) {
|
|
8762
|
+
writer.uint32(16).bool(message.linuxcncConnected);
|
|
8763
|
+
}
|
|
8764
|
+
if (message.linuxcncVersion !== "") {
|
|
8765
|
+
writer.uint32(26).string(message.linuxcncVersion);
|
|
8766
|
+
}
|
|
8767
|
+
if (message.errorChannelMode !== "") {
|
|
8768
|
+
writer.uint32(34).string(message.errorChannelMode);
|
|
8769
|
+
}
|
|
8770
|
+
if (message.stopsNotTaken !== 0) {
|
|
8771
|
+
writer.uint32(40).int32(message.stopsNotTaken);
|
|
8772
|
+
}
|
|
8773
|
+
return writer;
|
|
8774
|
+
},
|
|
8775
|
+
decode(input, length) {
|
|
8776
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
8777
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8778
|
+
const message = createBaseServerInfo();
|
|
8779
|
+
while (reader.pos < end) {
|
|
8780
|
+
const tag = reader.uint32();
|
|
8781
|
+
switch (tag >>> 3) {
|
|
8782
|
+
case 1: {
|
|
8783
|
+
if (tag !== 10) {
|
|
8784
|
+
break;
|
|
8785
|
+
}
|
|
8786
|
+
message.serverVersion = reader.string();
|
|
8787
|
+
continue;
|
|
8788
|
+
}
|
|
8789
|
+
case 2: {
|
|
8790
|
+
if (tag !== 16) {
|
|
8791
|
+
break;
|
|
8792
|
+
}
|
|
8793
|
+
message.linuxcncConnected = reader.bool();
|
|
8794
|
+
continue;
|
|
8795
|
+
}
|
|
8796
|
+
case 3: {
|
|
8797
|
+
if (tag !== 26) {
|
|
8798
|
+
break;
|
|
8799
|
+
}
|
|
8800
|
+
message.linuxcncVersion = reader.string();
|
|
8801
|
+
continue;
|
|
8802
|
+
}
|
|
8803
|
+
case 4: {
|
|
8804
|
+
if (tag !== 34) {
|
|
8805
|
+
break;
|
|
8806
|
+
}
|
|
8807
|
+
message.errorChannelMode = reader.string();
|
|
8808
|
+
continue;
|
|
8809
|
+
}
|
|
8810
|
+
case 5: {
|
|
8811
|
+
if (tag !== 40) {
|
|
8812
|
+
break;
|
|
8813
|
+
}
|
|
8814
|
+
message.stopsNotTaken = reader.int32();
|
|
8815
|
+
continue;
|
|
8816
|
+
}
|
|
8817
|
+
}
|
|
8818
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8819
|
+
break;
|
|
8820
|
+
}
|
|
8821
|
+
reader.skip(tag & 7);
|
|
8822
|
+
}
|
|
8823
|
+
return message;
|
|
8824
|
+
},
|
|
8825
|
+
fromJSON(object) {
|
|
8826
|
+
return {
|
|
8827
|
+
serverVersion: isSet(object.serverVersion) ? globalThis.String(object.serverVersion) : "",
|
|
8828
|
+
linuxcncConnected: isSet(object.linuxcncConnected) ? globalThis.Boolean(object.linuxcncConnected) : false,
|
|
8829
|
+
linuxcncVersion: isSet(object.linuxcncVersion) ? globalThis.String(object.linuxcncVersion) : "",
|
|
8830
|
+
errorChannelMode: isSet(object.errorChannelMode) ? globalThis.String(object.errorChannelMode) : "",
|
|
8831
|
+
stopsNotTaken: isSet(object.stopsNotTaken) ? globalThis.Number(object.stopsNotTaken) : 0,
|
|
8832
|
+
};
|
|
8833
|
+
},
|
|
8834
|
+
toJSON(message) {
|
|
8835
|
+
const obj = {};
|
|
8836
|
+
if (message.serverVersion !== "") {
|
|
8837
|
+
obj.serverVersion = message.serverVersion;
|
|
8838
|
+
}
|
|
8839
|
+
if (message.linuxcncConnected !== false) {
|
|
8840
|
+
obj.linuxcncConnected = message.linuxcncConnected;
|
|
8841
|
+
}
|
|
8842
|
+
if (message.linuxcncVersion !== "") {
|
|
8843
|
+
obj.linuxcncVersion = message.linuxcncVersion;
|
|
8844
|
+
}
|
|
8845
|
+
if (message.errorChannelMode !== "") {
|
|
8846
|
+
obj.errorChannelMode = message.errorChannelMode;
|
|
8847
|
+
}
|
|
8848
|
+
if (message.stopsNotTaken !== 0) {
|
|
8849
|
+
obj.stopsNotTaken = Math.round(message.stopsNotTaken);
|
|
8850
|
+
}
|
|
8851
|
+
return obj;
|
|
8852
|
+
},
|
|
8853
|
+
create(base) {
|
|
8854
|
+
return exports.ServerInfo.fromPartial(base ?? {});
|
|
8855
|
+
},
|
|
8856
|
+
fromPartial(object) {
|
|
8857
|
+
const message = createBaseServerInfo();
|
|
8858
|
+
message.serverVersion = object.serverVersion ?? "";
|
|
8859
|
+
message.linuxcncConnected = object.linuxcncConnected ?? false;
|
|
8860
|
+
message.linuxcncVersion = object.linuxcncVersion ?? "";
|
|
8861
|
+
message.errorChannelMode = object.errorChannelMode ?? "";
|
|
8862
|
+
message.stopsNotTaken = object.stopsNotTaken ?? 0;
|
|
8863
|
+
return message;
|
|
8864
|
+
},
|
|
8865
|
+
};
|
|
8866
|
+
exports.LinuxCNCServiceService = {
|
|
8867
|
+
/** Get current status (poll equivalent) */
|
|
8868
|
+
getStatus: {
|
|
8869
|
+
path: "/linuxcnc.LinuxCNCService/GetStatus",
|
|
8870
|
+
requestStream: false,
|
|
8871
|
+
responseStream: false,
|
|
8872
|
+
requestSerialize: (value) => Buffer.from(exports.GetStatusRequest.encode(value).finish()),
|
|
8873
|
+
requestDeserialize: (value) => exports.GetStatusRequest.decode(value),
|
|
8874
|
+
responseSerialize: (value) => Buffer.from(exports.LinuxCNCStatus.encode(value).finish()),
|
|
8875
|
+
responseDeserialize: (value) => exports.LinuxCNCStatus.decode(value),
|
|
8876
|
+
},
|
|
8877
|
+
/** Send a command */
|
|
8878
|
+
sendCommand: {
|
|
8879
|
+
path: "/linuxcnc.LinuxCNCService/SendCommand",
|
|
8880
|
+
requestStream: false,
|
|
8881
|
+
responseStream: false,
|
|
8882
|
+
requestSerialize: (value) => Buffer.from(exports.LinuxCNCCommand.encode(value).finish()),
|
|
8883
|
+
requestDeserialize: (value) => exports.LinuxCNCCommand.decode(value),
|
|
8884
|
+
responseSerialize: (value) => Buffer.from(exports.CommandResponse.encode(value).finish()),
|
|
8885
|
+
responseDeserialize: (value) => exports.CommandResponse.decode(value),
|
|
8886
|
+
},
|
|
8887
|
+
/** Wait for command completion */
|
|
8888
|
+
waitComplete: {
|
|
8889
|
+
path: "/linuxcnc.LinuxCNCService/WaitComplete",
|
|
8890
|
+
requestStream: false,
|
|
8891
|
+
responseStream: false,
|
|
8892
|
+
requestSerialize: (value) => Buffer.from(exports.WaitCompleteRequest.encode(value).finish()),
|
|
8893
|
+
requestDeserialize: (value) => exports.WaitCompleteRequest.decode(value),
|
|
8894
|
+
responseSerialize: (value) => Buffer.from(exports.CommandResponse.encode(value).finish()),
|
|
8895
|
+
responseDeserialize: (value) => exports.CommandResponse.decode(value),
|
|
8896
|
+
},
|
|
8897
|
+
/** Stream status updates */
|
|
8898
|
+
streamStatus: {
|
|
8899
|
+
path: "/linuxcnc.LinuxCNCService/StreamStatus",
|
|
8900
|
+
requestStream: false,
|
|
8901
|
+
responseStream: true,
|
|
8902
|
+
requestSerialize: (value) => Buffer.from(exports.StreamStatusRequest.encode(value).finish()),
|
|
8903
|
+
requestDeserialize: (value) => exports.StreamStatusRequest.decode(value),
|
|
8904
|
+
responseSerialize: (value) => Buffer.from(exports.LinuxCNCStatus.encode(value).finish()),
|
|
8905
|
+
responseDeserialize: (value) => exports.LinuxCNCStatus.decode(value),
|
|
8906
|
+
},
|
|
8907
|
+
/**
|
|
8908
|
+
* Stream messages from LinuxCNC's error channel. Each message the server
|
|
8909
|
+
* reads goes to every subscriber. The server keeps the newest 256 messages;
|
|
8910
|
+
* a subscriber that falls further behind loses the overflow, visible only
|
|
8911
|
+
* as a jump in ErrorMessage.sequence. Reading the channel takes messages
|
|
8912
|
+
* away from the machine's GUI; see the server's --error-channel option.
|
|
8913
|
+
*/
|
|
8914
|
+
streamErrors: {
|
|
8915
|
+
path: "/linuxcnc.LinuxCNCService/StreamErrors",
|
|
8916
|
+
requestStream: false,
|
|
8917
|
+
responseStream: true,
|
|
8918
|
+
requestSerialize: (value) => Buffer.from(exports.StreamErrorsRequest.encode(value).finish()),
|
|
8919
|
+
requestDeserialize: (value) => exports.StreamErrorsRequest.decode(value),
|
|
8920
|
+
responseSerialize: (value) => Buffer.from(exports.ErrorMessage.encode(value).finish()),
|
|
8921
|
+
responseDeserialize: (value) => exports.ErrorMessage.decode(value),
|
|
8922
|
+
},
|
|
8923
|
+
/** Upload a G-code file to the nc_files directory */
|
|
8924
|
+
uploadFile: {
|
|
8925
|
+
path: "/linuxcnc.LinuxCNCService/UploadFile",
|
|
8926
|
+
requestStream: false,
|
|
8927
|
+
responseStream: false,
|
|
8928
|
+
requestSerialize: (value) => Buffer.from(exports.UploadFileRequest.encode(value).finish()),
|
|
8929
|
+
requestDeserialize: (value) => exports.UploadFileRequest.decode(value),
|
|
8930
|
+
responseSerialize: (value) => Buffer.from(exports.UploadFileResponse.encode(value).finish()),
|
|
8931
|
+
responseDeserialize: (value) => exports.UploadFileResponse.decode(value),
|
|
8932
|
+
},
|
|
8933
|
+
/** List files in the nc_files directory */
|
|
8934
|
+
listFiles: {
|
|
8935
|
+
path: "/linuxcnc.LinuxCNCService/ListFiles",
|
|
8936
|
+
requestStream: false,
|
|
8937
|
+
responseStream: false,
|
|
8938
|
+
requestSerialize: (value) => Buffer.from(exports.ListFilesRequest.encode(value).finish()),
|
|
8939
|
+
requestDeserialize: (value) => exports.ListFilesRequest.decode(value),
|
|
8940
|
+
responseSerialize: (value) => Buffer.from(exports.ListFilesResponse.encode(value).finish()),
|
|
8941
|
+
responseDeserialize: (value) => exports.ListFilesResponse.decode(value),
|
|
8942
|
+
},
|
|
8943
|
+
/** Delete a file from the nc_files directory */
|
|
8944
|
+
deleteFile: {
|
|
8945
|
+
path: "/linuxcnc.LinuxCNCService/DeleteFile",
|
|
8946
|
+
requestStream: false,
|
|
8947
|
+
responseStream: false,
|
|
8948
|
+
requestSerialize: (value) => Buffer.from(exports.DeleteFileRequest.encode(value).finish()),
|
|
8949
|
+
requestDeserialize: (value) => exports.DeleteFileRequest.decode(value),
|
|
8950
|
+
responseSerialize: (value) => Buffer.from(exports.DeleteFileResponse.encode(value).finish()),
|
|
8951
|
+
responseDeserialize: (value) => exports.DeleteFileResponse.decode(value),
|
|
8952
|
+
},
|
|
8953
|
+
/** Read a file (or one chunk of it) from the nc_files directory */
|
|
8954
|
+
readFile: {
|
|
8955
|
+
path: "/linuxcnc.LinuxCNCService/ReadFile",
|
|
8956
|
+
requestStream: false,
|
|
8957
|
+
responseStream: false,
|
|
8958
|
+
requestSerialize: (value) => Buffer.from(exports.ReadFileRequest.encode(value).finish()),
|
|
8959
|
+
requestDeserialize: (value) => exports.ReadFileRequest.decode(value),
|
|
8960
|
+
responseSerialize: (value) => Buffer.from(exports.ReadFileResponse.encode(value).finish()),
|
|
8961
|
+
responseDeserialize: (value) => exports.ReadFileResponse.decode(value),
|
|
8962
|
+
},
|
|
8963
|
+
/**
|
|
8964
|
+
* Resolve a name in the nc_files directory to its canonical path and say
|
|
8965
|
+
* whether it is the program LinuxCNC currently has loaded
|
|
8966
|
+
*/
|
|
8967
|
+
resolveFile: {
|
|
8968
|
+
path: "/linuxcnc.LinuxCNCService/ResolveFile",
|
|
8969
|
+
requestStream: false,
|
|
8970
|
+
responseStream: false,
|
|
8971
|
+
requestSerialize: (value) => Buffer.from(exports.ResolveFileRequest.encode(value).finish()),
|
|
8972
|
+
requestDeserialize: (value) => exports.ResolveFileRequest.decode(value),
|
|
8973
|
+
responseSerialize: (value) => Buffer.from(exports.ResolveFileResponse.encode(value).finish()),
|
|
8974
|
+
responseDeserialize: (value) => exports.ResolveFileResponse.decode(value),
|
|
8975
|
+
},
|
|
8976
|
+
/**
|
|
8977
|
+
* Get the machine's static configuration: kinematics, joint-to-axis
|
|
8978
|
+
* mapping, limits, velocities and units
|
|
8979
|
+
*/
|
|
8980
|
+
getMachineConfig: {
|
|
8981
|
+
path: "/linuxcnc.LinuxCNCService/GetMachineConfig",
|
|
8982
|
+
requestStream: false,
|
|
8983
|
+
responseStream: false,
|
|
8984
|
+
requestSerialize: (value) => Buffer.from(exports.GetMachineConfigRequest.encode(value).finish()),
|
|
8985
|
+
requestDeserialize: (value) => exports.GetMachineConfigRequest.decode(value),
|
|
8986
|
+
responseSerialize: (value) => Buffer.from(exports.MachineConfig.encode(value).finish()),
|
|
8987
|
+
responseDeserialize: (value) => exports.MachineConfig.decode(value),
|
|
8988
|
+
},
|
|
8989
|
+
/**
|
|
8990
|
+
* Get the server's version and whether it is connected to LinuxCNC.
|
|
8991
|
+
* Answers also while the server is waiting for LinuxCNC, and never waits
|
|
8992
|
+
* behind a command. A 1.0 server does not have this RPC and answers
|
|
8993
|
+
* UNIMPLEMENTED, which is how a client tells a 1.0 server from a later one.
|
|
8994
|
+
*/
|
|
8995
|
+
getServerInfo: {
|
|
8996
|
+
path: "/linuxcnc.LinuxCNCService/GetServerInfo",
|
|
8997
|
+
requestStream: false,
|
|
8998
|
+
responseStream: false,
|
|
8999
|
+
requestSerialize: (value) => Buffer.from(exports.GetServerInfoRequest.encode(value).finish()),
|
|
9000
|
+
requestDeserialize: (value) => exports.GetServerInfoRequest.decode(value),
|
|
9001
|
+
responseSerialize: (value) => Buffer.from(exports.ServerInfo.encode(value).finish()),
|
|
9002
|
+
responseDeserialize: (value) => exports.ServerInfo.decode(value),
|
|
9003
|
+
},
|
|
9004
|
+
};
|
|
9005
|
+
exports.LinuxCNCServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.LinuxCNCServiceService, "linuxcnc.LinuxCNCService");
|
|
9006
|
+
function bytesFromBase64(b64) {
|
|
9007
|
+
if (globalThis.Buffer) {
|
|
9008
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
9009
|
+
}
|
|
9010
|
+
else {
|
|
9011
|
+
const bin = globalThis.atob(b64);
|
|
9012
|
+
const arr = new Uint8Array(bin.length);
|
|
9013
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
9014
|
+
arr[i] = bin.charCodeAt(i);
|
|
9015
|
+
}
|
|
9016
|
+
return arr;
|
|
9017
|
+
}
|
|
9018
|
+
}
|
|
9019
|
+
function base64FromBytes(arr) {
|
|
9020
|
+
if (globalThis.Buffer) {
|
|
9021
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
9022
|
+
}
|
|
9023
|
+
else {
|
|
9024
|
+
const bin = [];
|
|
9025
|
+
arr.forEach((byte) => {
|
|
9026
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
9027
|
+
});
|
|
9028
|
+
return globalThis.btoa(bin.join(""));
|
|
9029
|
+
}
|
|
9030
|
+
}
|
|
9031
|
+
/**
|
|
9032
|
+
* A 64-bit integer that is a value, not a timestamp. Beyond 2^53 the result
|
|
9033
|
+
* is the nearest number, so the low digits are lost; it is never scaled.
|
|
9034
|
+
* (Patched in by scripts/generate-protos.sh.)
|
|
9035
|
+
*/
|
|
9036
|
+
function longToNumber(int64) {
|
|
9037
|
+
return globalThis.Number(int64.toString());
|
|
9038
|
+
}
|
|
9039
|
+
/**
|
|
9040
|
+
* A timestamp. The server sends nanoseconds, which do not fit a number, so a
|
|
9041
|
+
* value beyond the safe integer range is scaled to milliseconds.
|
|
9042
|
+
* (Patched in by scripts/generate-protos.sh.)
|
|
9043
|
+
*/
|
|
9044
|
+
function timestampToNumber(int64) {
|
|
7430
9045
|
const num = globalThis.Number(int64.toString());
|
|
7431
9046
|
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
7432
9047
|
return Math.floor(num / 1e6);
|