@viamrobotics/sdk 0.0.42 → 0.0.43
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 +7 -3
- package/dist/components/encoder/Client.d.ts +19 -0
- package/dist/components/encoder/Encoder.d.ts +18 -0
- package/dist/components/encoder.d.ts +2 -0
- package/dist/main.d.ts +12 -1
- package/dist/main.es.js +818 -265
- package/dist/main.umd.js +5 -5
- package/dist/robot/Client.d.ts +3 -0
- package/dist/robot/dial.d.ts +17 -2
- package/dist/robot.d.ts +1 -1
- package/dist/types.d.ts +5 -0
- package/package.json +2 -2
package/dist/main.es.js
CHANGED
|
@@ -12626,9 +12626,9 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12626
12626
|
return f.slice(b, h);
|
|
12627
12627
|
var R = f.length;
|
|
12628
12628
|
h !== void 0 && (R = h);
|
|
12629
|
-
for (var
|
|
12630
|
-
|
|
12631
|
-
return
|
|
12629
|
+
for (var _ = new Uint8Array(R - b), P = 0, D = b; D < R; D++)
|
|
12630
|
+
_[P++] = f[D];
|
|
12631
|
+
return _;
|
|
12632
12632
|
}
|
|
12633
12633
|
g.decodeASCII = l, g.encodeASCII = function(f) {
|
|
12634
12634
|
for (var b = new Uint8Array(f.length), h = 0; h !== f.length; ++h) {
|
|
@@ -12648,27 +12648,27 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12648
12648
|
return f.prototype.parse = function(b, h) {
|
|
12649
12649
|
if (b.length === 0 && h)
|
|
12650
12650
|
return [];
|
|
12651
|
-
var R,
|
|
12651
|
+
var R, _ = [];
|
|
12652
12652
|
if (this.buffer == null)
|
|
12653
12653
|
this.buffer = b, this.position = 0;
|
|
12654
12654
|
else if (this.position === this.buffer.byteLength)
|
|
12655
12655
|
this.buffer = b, this.position = 0;
|
|
12656
12656
|
else {
|
|
12657
|
-
var P = this.buffer.byteLength - this.position, D = new Uint8Array(P + b.byteLength),
|
|
12658
|
-
D.set(
|
|
12657
|
+
var P = this.buffer.byteLength - this.position, D = new Uint8Array(P + b.byteLength), I = v(this.buffer, this.position);
|
|
12658
|
+
D.set(I, 0);
|
|
12659
12659
|
var z = new Uint8Array(b);
|
|
12660
12660
|
D.set(z, P), this.buffer = D, this.position = 0;
|
|
12661
12661
|
}
|
|
12662
12662
|
for (; ; ) {
|
|
12663
12663
|
if (!m(this.buffer, this.position, 5))
|
|
12664
|
-
return
|
|
12665
|
-
var x = v(this.buffer, this.position, this.position + 5),
|
|
12664
|
+
return _;
|
|
12665
|
+
var x = v(this.buffer, this.position, this.position + 5), q = new DataView(x.buffer, x.byteOffset, x.byteLength), k = d(q);
|
|
12666
12666
|
if (!m(this.buffer, this.position, 5 + k))
|
|
12667
|
-
return
|
|
12667
|
+
return _;
|
|
12668
12668
|
var W = v(this.buffer, this.position + 5, this.position + 5 + k);
|
|
12669
|
-
if (this.position += 5 + k, c(
|
|
12670
|
-
return
|
|
12671
|
-
|
|
12669
|
+
if (this.position += 5 + k, c(q))
|
|
12670
|
+
return _.push({ chunkType: o.TRAILERS, trailers: (R = W, new r.Metadata(l(R))) }), _;
|
|
12671
|
+
_.push({ chunkType: o.MESSAGE, data: W });
|
|
12672
12672
|
}
|
|
12673
12673
|
}, f;
|
|
12674
12674
|
}();
|
|
@@ -12733,9 +12733,9 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12733
12733
|
this.props.debug && l.debug("onHeaders.gRPCStatus", h);
|
|
12734
12734
|
var R = h && h >= 0 ? h : i.httpStatusToCode(b);
|
|
12735
12735
|
this.props.debug && l.debug("onHeaders.code", R);
|
|
12736
|
-
var
|
|
12737
|
-
if (this.props.debug && l.debug("onHeaders.gRPCMessage",
|
|
12738
|
-
var P = this.decodeGRPCStatus(
|
|
12736
|
+
var _ = f.get("grpc-message") || [];
|
|
12737
|
+
if (this.props.debug && l.debug("onHeaders.gRPCMessage", _), this.rawOnHeaders(f), R !== i.Code.OK) {
|
|
12738
|
+
var P = this.decodeGRPCStatus(_[0]);
|
|
12739
12739
|
this.rawOnError(R, P, f);
|
|
12740
12740
|
}
|
|
12741
12741
|
}
|
|
@@ -12752,8 +12752,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12752
12752
|
}
|
|
12753
12753
|
h.forEach(function(R) {
|
|
12754
12754
|
if (R.chunkType === r.ChunkType.MESSAGE) {
|
|
12755
|
-
var
|
|
12756
|
-
b.rawOnMessage(
|
|
12755
|
+
var _ = b.methodDefinition.responseType.deserializeBinary(R.data);
|
|
12756
|
+
b.rawOnMessage(_);
|
|
12757
12757
|
} else
|
|
12758
12758
|
R.chunkType === r.ChunkType.TRAILERS && (b.responseHeaders ? (b.responseTrailers = new o.Metadata(R.trailers), b.props.debug && l.debug("onChunk.trailers", b.responseTrailers)) : (b.responseHeaders = new o.Metadata(R.trailers), b.rawOnHeaders(b.responseHeaders)));
|
|
12759
12759
|
});
|
|
@@ -12771,10 +12771,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12771
12771
|
} else {
|
|
12772
12772
|
if (this.responseHeaders === void 0)
|
|
12773
12773
|
return void this.rawOnError(i.Code.Unknown, "Response closed without headers");
|
|
12774
|
-
var R = v(this.responseHeaders),
|
|
12775
|
-
if (this.props.debug && l.debug("grpc.headers only response ", R,
|
|
12774
|
+
var R = v(this.responseHeaders), _ = this.responseHeaders.get("grpc-message");
|
|
12775
|
+
if (this.props.debug && l.debug("grpc.headers only response ", R, _), R === null)
|
|
12776
12776
|
return void this.rawOnEnd(i.Code.Unknown, "Response closed without grpc-status (Headers only)", this.responseHeaders);
|
|
12777
|
-
var P = this.decodeGRPCStatus(
|
|
12777
|
+
var P = this.decodeGRPCStatus(_[0]);
|
|
12778
12778
|
this.rawOnEnd(R, P, this.responseHeaders);
|
|
12779
12779
|
}
|
|
12780
12780
|
}, y.prototype.decodeGRPCStatus = function(f) {
|
|
@@ -12787,10 +12787,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12787
12787
|
}
|
|
12788
12788
|
}, y.prototype.rawOnEnd = function(f, b, h) {
|
|
12789
12789
|
var R = this;
|
|
12790
|
-
this.props.debug && l.debug("rawOnEnd", f, b, h), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
12790
|
+
this.props.debug && l.debug("rawOnEnd", f, b, h), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(_) {
|
|
12791
12791
|
if (!R.closed)
|
|
12792
12792
|
try {
|
|
12793
|
-
|
|
12793
|
+
_(f, b, h);
|
|
12794
12794
|
} catch (P) {
|
|
12795
12795
|
setTimeout(function() {
|
|
12796
12796
|
throw P;
|
|
@@ -12809,10 +12809,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12809
12809
|
});
|
|
12810
12810
|
}, y.prototype.rawOnError = function(f, b, h) {
|
|
12811
12811
|
var R = this;
|
|
12812
|
-
h === void 0 && (h = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
12812
|
+
h === void 0 && (h = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(_) {
|
|
12813
12813
|
if (!R.closed)
|
|
12814
12814
|
try {
|
|
12815
|
-
|
|
12815
|
+
_(f, b, h);
|
|
12816
12816
|
} catch (P) {
|
|
12817
12817
|
setTimeout(function() {
|
|
12818
12818
|
throw P;
|
|
@@ -12995,8 +12995,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12995
12995
|
return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, R) {
|
|
12996
12996
|
h.__proto__ = R;
|
|
12997
12997
|
} || function(h, R) {
|
|
12998
|
-
for (var
|
|
12999
|
-
Object.prototype.hasOwnProperty.call(R,
|
|
12998
|
+
for (var _ in R)
|
|
12999
|
+
Object.prototype.hasOwnProperty.call(R, _) && (h[_] = R[_]);
|
|
13000
13000
|
})(f, b);
|
|
13001
13001
|
}, function(f, b) {
|
|
13002
13002
|
function h() {
|
|
@@ -13036,10 +13036,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13036
13036
|
var h = this;
|
|
13037
13037
|
this.metadata = b;
|
|
13038
13038
|
var R = new XMLHttpRequest();
|
|
13039
|
-
this.xhr = R, R.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(
|
|
13040
|
-
R.setRequestHeader(
|
|
13041
|
-
}), R.withCredentials = !!this.init.withCredentials, R.addEventListener("readystatechange", this.onStateChange.bind(this)), R.addEventListener("progress", this.onProgressEvent.bind(this)), R.addEventListener("loadend", this.onLoadEvent.bind(this)), R.addEventListener("error", function(
|
|
13042
|
-
h.options.debug && l.debug("XHR.error",
|
|
13039
|
+
this.xhr = R, R.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(_, P) {
|
|
13040
|
+
R.setRequestHeader(_, P.join(", "));
|
|
13041
|
+
}), R.withCredentials = !!this.init.withCredentials, R.addEventListener("readystatechange", this.onStateChange.bind(this)), R.addEventListener("progress", this.onProgressEvent.bind(this)), R.addEventListener("loadend", this.onLoadEvent.bind(this)), R.addEventListener("error", function(_) {
|
|
13042
|
+
h.options.debug && l.debug("XHR.error", _), h.options.onEnd(_.error);
|
|
13043
13043
|
});
|
|
13044
13044
|
}, f.prototype.configureXhr = function() {
|
|
13045
13045
|
this.xhr.responseType = "text", this.xhr.overrideMimeType("text/plain; charset=x-user-defined");
|
|
@@ -13069,8 +13069,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13069
13069
|
}
|
|
13070
13070
|
function y(f) {
|
|
13071
13071
|
for (var b = new Uint8Array(f.length), h = 0, R = 0; R < f.length; R++) {
|
|
13072
|
-
var
|
|
13073
|
-
b[h++] = 255 &
|
|
13072
|
+
var _ = String.prototype.codePointAt ? f.codePointAt(R) : v(f, R);
|
|
13073
|
+
b[h++] = 255 & _;
|
|
13074
13074
|
}
|
|
13075
13075
|
return b;
|
|
13076
13076
|
}
|
|
@@ -13137,8 +13137,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13137
13137
|
}, start: function(b) {
|
|
13138
13138
|
(m = new WebSocket(v, ["grpc-websockets"])).binaryType = "arraybuffer", m.onopen = function() {
|
|
13139
13139
|
var h;
|
|
13140
|
-
d.debug && r.debug("websocketRequest.onopen"), m.send((h = "", b.forEach(function(R,
|
|
13141
|
-
h += R + ": " +
|
|
13140
|
+
d.debug && r.debug("websocketRequest.onopen"), m.send((h = "", b.forEach(function(R, _) {
|
|
13141
|
+
h += R + ": " + _.join(", ") + `\r
|
|
13142
13142
|
`;
|
|
13143
13143
|
}), i.encodeASCII(h))), y.forEach(function(R) {
|
|
13144
13144
|
f(R);
|
|
@@ -13826,19 +13826,19 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13826
13826
|
else if (this.position === this.buffer.byteLength)
|
|
13827
13827
|
this.buffer = v, this.position = 0;
|
|
13828
13828
|
else {
|
|
13829
|
-
var h = this.buffer.byteLength - this.position, R = new Uint8Array(h + v.byteLength),
|
|
13830
|
-
R.set(
|
|
13829
|
+
var h = this.buffer.byteLength - this.position, R = new Uint8Array(h + v.byteLength), _ = c(this.buffer, this.position);
|
|
13830
|
+
R.set(_, 0);
|
|
13831
13831
|
var P = new Uint8Array(v);
|
|
13832
13832
|
R.set(P, h), this.buffer = R, this.position = 0;
|
|
13833
13833
|
}
|
|
13834
13834
|
for (; ; ) {
|
|
13835
13835
|
if (!l(this.buffer, this.position, 5))
|
|
13836
13836
|
return b;
|
|
13837
|
-
var D = c(this.buffer, this.position, this.position + 5),
|
|
13837
|
+
var D = c(this.buffer, this.position, this.position + 5), I = new DataView(D.buffer, D.byteOffset, D.byteLength), z = i(I);
|
|
13838
13838
|
if (!l(this.buffer, this.position, 5 + z))
|
|
13839
13839
|
return b;
|
|
13840
13840
|
var x = c(this.buffer, this.position + 5, this.position + 5 + z);
|
|
13841
|
-
if (this.position += 5 + z, r(
|
|
13841
|
+
if (this.position += 5 + z, r(I))
|
|
13842
13842
|
return b.push({ chunkType: u.TRAILERS, trailers: (f = x, new g.Metadata(o(f))) }), b;
|
|
13843
13843
|
b.push({ chunkType: u.MESSAGE, data: x });
|
|
13844
13844
|
}
|
|
@@ -20367,12 +20367,12 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20367
20367
|
h ? (y = h.getCode(), f = h.getMessage(), b.set("grpc-status", "".concat(h.getCode())), f !== void 0 && b.set("grpc-message", h.getMessage())) : (y = 0, b.set("grpc-status", "0"), f = "");
|
|
20368
20368
|
var R = function(P) {
|
|
20369
20369
|
var D = "";
|
|
20370
|
-
return P.forEach(function(
|
|
20371
|
-
D += "".concat(
|
|
20370
|
+
return P.forEach(function(I, z) {
|
|
20371
|
+
D += "".concat(I, ": ").concat(z.join(", "), `\r
|
|
20372
20372
|
`);
|
|
20373
20373
|
}), i(D);
|
|
20374
|
-
}(b),
|
|
20375
|
-
new DataView(
|
|
20374
|
+
}(b), _ = new ArrayBuffer(R.length + 5);
|
|
20375
|
+
new DataView(_, 0, 1).setUint8(0, 128), new DataView(_, 1, 4).setUint32(0, R.length, !1), new Uint8Array(_, 5).set(R), this.opts.onChunk(new Uint8Array(_)), y !== 0 ? this.closeWithRecvError(new p.GRPCError(y, f)) : this.closeWithRecvError();
|
|
20376
20376
|
} }), m;
|
|
20377
20377
|
}(g.BaseStream);
|
|
20378
20378
|
function i(d) {
|
|
@@ -20405,49 +20405,49 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20405
20405
|
var n = s(655), u = s(37), g = s(138), p = s(758), o = s(743), r = s(34), i = s(165), l = s(400), c = s(982), d = s(958), m = s(93);
|
|
20406
20406
|
function v(h, R) {
|
|
20407
20407
|
return n.__awaiter(this, void 0, void 0, function() {
|
|
20408
|
-
var
|
|
20408
|
+
var _, P;
|
|
20409
20409
|
return n.__generator(this, function(D) {
|
|
20410
|
-
return b(R),
|
|
20411
|
-
return u.grpc.CrossBrowserHttpTransport({ withCredentials: !1 })(
|
|
20412
|
-
}, !R?.accessToken || R?.externalAuthAddress && R?.externalAuthToEntity ? R && (R?.credentials || R?.accessToken) ? [2, y(h,
|
|
20413
|
-
return new f(
|
|
20410
|
+
return b(R), _ = function(I) {
|
|
20411
|
+
return u.grpc.CrossBrowserHttpTransport({ withCredentials: !1 })(I);
|
|
20412
|
+
}, !R?.accessToken || R?.externalAuthAddress && R?.externalAuthToEntity ? R && (R?.credentials || R?.accessToken) ? [2, y(h, _, R)] : [2, _] : ((P = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(R.accessToken)), [2, function(I) {
|
|
20413
|
+
return new f(I, _, P);
|
|
20414
20414
|
}]);
|
|
20415
20415
|
});
|
|
20416
20416
|
});
|
|
20417
20417
|
}
|
|
20418
|
-
function y(h, R,
|
|
20418
|
+
function y(h, R, _) {
|
|
20419
20419
|
return n.__awaiter(this, void 0, void 0, function() {
|
|
20420
|
-
var P, D,
|
|
20420
|
+
var P, D, I, z = this;
|
|
20421
20421
|
return n.__generator(this, function(x) {
|
|
20422
20422
|
switch (x.label) {
|
|
20423
20423
|
case 0:
|
|
20424
20424
|
return P = "", D = function() {
|
|
20425
20425
|
return n.__awaiter(z, void 0, void 0, function() {
|
|
20426
|
-
var
|
|
20427
|
-
return n.__generator(this, function(
|
|
20428
|
-
switch (
|
|
20426
|
+
var q, k, W, X, S, M, O, E, F, w;
|
|
20427
|
+
return n.__generator(this, function(T) {
|
|
20428
|
+
switch (T.label) {
|
|
20429
20429
|
case 0:
|
|
20430
|
-
return P != "" ? [3, 5] : (
|
|
20430
|
+
return P != "" ? [3, 5] : (q = "", _.accessToken && _.accessToken !== "" ? [3, 2] : ((O = new i.AuthenticateRequest()).setEntity(_.authEntity ? _.authEntity : h.replace(/^(.*:\/\/)/, "")), (X = new i.Credentials()).setType((F = _.credentials) === null || F === void 0 ? void 0 : F.type), X.setPayload((w = _.credentials) === null || w === void 0 ? void 0 : w.payload), O.setCredentials(X), M = new Promise(function(C, j) {
|
|
20431
20431
|
k = C, W = j;
|
|
20432
|
-
}), u.grpc.invoke(l.AuthService.Authenticate, { request:
|
|
20433
|
-
|
|
20434
|
-
}, onEnd: function(C, j,
|
|
20432
|
+
}), u.grpc.invoke(l.AuthService.Authenticate, { request: O, host: _.externalAuthAddress ? _.externalAuthAddress : h, transport: R, onMessage: function(C) {
|
|
20433
|
+
q = C.getAccessToken();
|
|
20434
|
+
}, onEnd: function(C, j, G) {
|
|
20435
20435
|
C == u.grpc.Code.OK ? k(E) : W(j);
|
|
20436
20436
|
} }), [4, M]));
|
|
20437
20437
|
case 1:
|
|
20438
|
-
return
|
|
20438
|
+
return T.sent(), [3, 3];
|
|
20439
20439
|
case 2:
|
|
20440
|
-
|
|
20440
|
+
q = _.accessToken, T.label = 3;
|
|
20441
20441
|
case 3:
|
|
20442
|
-
return P =
|
|
20442
|
+
return P = q, _.externalAuthAddress && _.externalAuthToEntity ? ((S = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(P)), M = new Promise(function(C, j) {
|
|
20443
20443
|
k = C, W = j;
|
|
20444
|
-
}),
|
|
20445
|
-
|
|
20446
|
-
}, onEnd: function(C, j,
|
|
20444
|
+
}), q = "", (O = new i.AuthenticateToRequest()).setEntity(_.externalAuthToEntity), u.grpc.invoke(l.ExternalAuthService.AuthenticateTo, { request: O, host: _.externalAuthAddress, transport: R, metadata: S, onMessage: function(C) {
|
|
20445
|
+
q = C.getAccessToken();
|
|
20446
|
+
}, onEnd: function(C, j, G) {
|
|
20447
20447
|
C == u.grpc.Code.OK ? k(S) : W(j);
|
|
20448
20448
|
} }), [4, M]) : [3, 5];
|
|
20449
20449
|
case 4:
|
|
20450
|
-
|
|
20450
|
+
T.sent(), P = q, T.label = 5;
|
|
20451
20451
|
case 5:
|
|
20452
20452
|
return (E = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(P)), [2, E];
|
|
20453
20453
|
}
|
|
@@ -20455,8 +20455,8 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20455
20455
|
});
|
|
20456
20456
|
}, [4, D()];
|
|
20457
20457
|
case 1:
|
|
20458
|
-
return
|
|
20459
|
-
return new f(
|
|
20458
|
+
return I = x.sent(), [2, function(q) {
|
|
20459
|
+
return new f(q, R, I);
|
|
20460
20460
|
}];
|
|
20461
20461
|
}
|
|
20462
20462
|
});
|
|
@@ -20464,12 +20464,12 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20464
20464
|
}
|
|
20465
20465
|
e.dialDirect = v;
|
|
20466
20466
|
var f = function() {
|
|
20467
|
-
function h(R,
|
|
20468
|
-
Object.defineProperty(this, "opts", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "transport", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "extraMetadata", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), this.opts = R, this.extraMetadata = P, this.transport =
|
|
20467
|
+
function h(R, _, P) {
|
|
20468
|
+
Object.defineProperty(this, "opts", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "transport", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "extraMetadata", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), this.opts = R, this.extraMetadata = P, this.transport = _(R);
|
|
20469
20469
|
}
|
|
20470
20470
|
return Object.defineProperty(h.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(R) {
|
|
20471
|
-
this.extraMetadata.forEach(function(
|
|
20472
|
-
R.set(
|
|
20471
|
+
this.extraMetadata.forEach(function(_, P) {
|
|
20472
|
+
R.set(_, P);
|
|
20473
20473
|
}), this.transport.start(R);
|
|
20474
20474
|
} }), Object.defineProperty(h.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(R) {
|
|
20475
20475
|
this.transport.sendMessage(R);
|
|
@@ -20504,44 +20504,44 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20504
20504
|
}
|
|
20505
20505
|
}
|
|
20506
20506
|
}
|
|
20507
|
-
e.dialWebRTC = function(h, R,
|
|
20508
|
-
var P, D,
|
|
20507
|
+
e.dialWebRTC = function(h, R, _) {
|
|
20508
|
+
var P, D, I, z, x, q, k;
|
|
20509
20509
|
return n.__awaiter(this, void 0, void 0, function() {
|
|
20510
|
-
var W, X, S, M,
|
|
20510
|
+
var W, X, S, M, O, E, F, w, T, C, j, G, B, N, H, Z, ee, re, se, ie, pe, ne, ue, ae, ge = this;
|
|
20511
20511
|
return n.__generator(this, function(J) {
|
|
20512
20512
|
switch (J.label) {
|
|
20513
20513
|
case 0:
|
|
20514
|
-
return b(
|
|
20514
|
+
return b(_), W = _?.webrtcOptions, [4, (0, m.newPeerConnectionForClient)(W !== void 0 && W.disableTrickleICE, W?.rtcConfig)];
|
|
20515
20515
|
case 1:
|
|
20516
|
-
X = J.sent(), S = X.pc, M = X.dc,
|
|
20516
|
+
X = J.sent(), S = X.pc, M = X.dc, O = !1, J.label = 2;
|
|
20517
20517
|
case 2:
|
|
20518
|
-
return J.trys.push([2, , 9, 10]), E =
|
|
20518
|
+
return J.trys.push([2, , 9, 10]), E = _, _ && (E = n.__assign({}, _), _.accessToken || (E.authEntity = (P = _?.webrtcOptions) === null || P === void 0 ? void 0 : P.signalingAuthEntity, E.authEntity || (E.externalAuthAddress ? E.authEntity = (D = _.externalAuthAddress) === null || D === void 0 ? void 0 : D.replace(/^(.*:\/\/)/, "") : E.authEntity = h.replace(/^(.*:\/\/)/, "")), E.credentials = (I = _?.webrtcOptions) === null || I === void 0 ? void 0 : I.signalingCredentials, E.accessToken = (z = _?.webrtcOptions) === null || z === void 0 ? void 0 : z.signalingAccessToken), E.externalAuthAddress = (x = _?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingExternalAuthAddress, E.externalAuthToEntity = (q = _?.webrtcOptions) === null || q === void 0 ? void 0 : q.signalingExternalAuthToEntity), [4, v(h, E)];
|
|
20519
20519
|
case 3:
|
|
20520
|
-
return F = J.sent(),
|
|
20520
|
+
return F = J.sent(), w = u.grpc.client(d.SignalingService.Call, { host: h, transport: F }), T = "", C = !1, j = function(L) {
|
|
20521
20521
|
if (!C) {
|
|
20522
20522
|
C = !0;
|
|
20523
20523
|
var A = new c.CallUpdateRequest();
|
|
20524
|
-
A.setUuid(
|
|
20524
|
+
A.setUuid(T);
|
|
20525
20525
|
var V = new r.Status();
|
|
20526
|
-
V.setCode(o.Code.UNKNOWN), V.setMessage(
|
|
20526
|
+
V.setCode(o.Code.UNKNOWN), V.setMessage(L), A.setError(V), u.grpc.unary(d.SignalingService.CallUpdate, { request: A, metadata: { "rpc-host": R }, host: h, transport: F, onEnd: function($) {
|
|
20527
20527
|
var U = $.status, Y = $.statusMessage, Q = $.message;
|
|
20528
20528
|
U === u.grpc.Code.OK && Q || console.error(Y);
|
|
20529
20529
|
} });
|
|
20530
20530
|
}
|
|
20531
|
-
},
|
|
20531
|
+
}, G = function() {
|
|
20532
20532
|
if (!C) {
|
|
20533
20533
|
C = !0;
|
|
20534
|
-
var
|
|
20535
|
-
|
|
20534
|
+
var L = new c.CallUpdateRequest();
|
|
20535
|
+
L.setUuid(T), L.setDone(!0), u.grpc.unary(d.SignalingService.CallUpdate, { request: L, metadata: { "rpc-host": R }, host: h, transport: F, onEnd: function(A) {
|
|
20536
20536
|
var V = A.status, $ = A.statusMessage, U = A.message;
|
|
20537
20537
|
V === u.grpc.Code.OK && U || console.error($);
|
|
20538
20538
|
} });
|
|
20539
20539
|
}
|
|
20540
|
-
}, N = new Promise(function(
|
|
20541
|
-
B =
|
|
20540
|
+
}, N = new Promise(function(L) {
|
|
20541
|
+
B = L;
|
|
20542
20542
|
}), H = !1, W?.disableTrickleICE ? [3, 6] : [4, S.createOffer()];
|
|
20543
20543
|
case 4:
|
|
20544
|
-
return Z = J.sent(), ee = !1, S.onicecandidate = function(
|
|
20544
|
+
return Z = J.sent(), ee = !1, S.onicecandidate = function(L) {
|
|
20545
20545
|
return n.__awaiter(ge, void 0, void 0, function() {
|
|
20546
20546
|
var A, V;
|
|
20547
20547
|
return n.__generator(this, function($) {
|
|
@@ -20549,7 +20549,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20549
20549
|
case 0:
|
|
20550
20550
|
return [4, N];
|
|
20551
20551
|
case 1:
|
|
20552
|
-
return $.sent(), H ? [2] :
|
|
20552
|
+
return $.sent(), H ? [2] : L.candidate === null ? (ee = !0, G(), [2]) : (U = L.candidate, (Y = new c.ICECandidate()).setCandidate(U.candidate), U.sdpMid && Y.setSdpMid(U.sdpMid), U.sdpMLineIndex && Y.setSdpmLineIndex(U.sdpMLineIndex), U.usernameFragment && Y.setUsernameFragment(U.usernameFragment), A = Y, (V = new c.CallUpdateRequest()).setUuid(T), V.setCandidate(A), u.grpc.unary(d.SignalingService.CallUpdate, { request: V, metadata: { "rpc-host": R }, host: h, transport: F, onEnd: function(Q) {
|
|
20553
20553
|
var te = Q.status, K = Q.statusMessage, oe = Q.message;
|
|
20554
20554
|
te === u.grpc.Code.OK && oe || H || ee || console.error("error sending candidate", K);
|
|
20555
20555
|
} }), [2]);
|
|
@@ -20561,20 +20561,20 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20561
20561
|
case 5:
|
|
20562
20562
|
J.sent(), J.label = 6;
|
|
20563
20563
|
case 6:
|
|
20564
|
-
return re = !1,
|
|
20564
|
+
return re = !1, w.onMessage(function(L) {
|
|
20565
20565
|
return n.__awaiter(ge, void 0, void 0, function() {
|
|
20566
20566
|
var A, V, $, U, Y, Q;
|
|
20567
20567
|
return n.__generator(this, function(te) {
|
|
20568
20568
|
switch (te.label) {
|
|
20569
20569
|
case 0:
|
|
20570
|
-
return (A =
|
|
20570
|
+
return (A = L).hasInit() ? re ? (j("got init stage more than once"), [2]) : (V = A.getInit(), re = !0, T = A.getUuid(), $ = new RTCSessionDescription(JSON.parse(atob(V.getSdp()))), S.setRemoteDescription($), B(!0), W?.disableTrickleICE ? (H = !0, G(), [2]) : [3, 7]) : [3, 1];
|
|
20571
20571
|
case 1:
|
|
20572
20572
|
if (!A.hasUpdate())
|
|
20573
20573
|
return [3, 6];
|
|
20574
20574
|
if (!re)
|
|
20575
20575
|
return j("got update stage before init stage"), [2];
|
|
20576
|
-
if (A.getUuid() !==
|
|
20577
|
-
return j("uuid mismatch; have=".concat(A.getUuid(), " want=").concat(
|
|
20576
|
+
if (A.getUuid() !== T)
|
|
20577
|
+
return j("uuid mismatch; have=".concat(A.getUuid(), " want=").concat(T)), [2];
|
|
20578
20578
|
U = A.getUpdate(), K = U.getCandidate(), oe = { candidate: K.getCandidate() }, K.hasSdpMid() && (oe.sdpMid = K.getSdpMid()), K.hasSdpmLineIndex() && (oe.sdpMLineIndex = K.getSdpmLineIndex()), K.hasUsernameFragment() && (oe.usernameFragment = K.getUsernameFragment()), Y = oe, te.label = 2;
|
|
20579
20579
|
case 2:
|
|
20580
20580
|
return te.trys.push([2, 4, , 5]), [4, S.addIceCandidate(Y)];
|
|
@@ -20592,21 +20592,21 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20592
20592
|
var K, oe;
|
|
20593
20593
|
});
|
|
20594
20594
|
});
|
|
20595
|
-
}), pe = new Promise(function(
|
|
20596
|
-
se =
|
|
20597
|
-
}),
|
|
20598
|
-
|
|
20599
|
-
}),
|
|
20595
|
+
}), pe = new Promise(function(L, A) {
|
|
20596
|
+
se = L, ie = A;
|
|
20597
|
+
}), w.onEnd(function(L, A, V) {
|
|
20598
|
+
L !== u.grpc.Code.OK ? A !== "Response closed without headers" ? (console.error(A), ie(A)) : ie(new p.ConnectionClosedError("failed to dial")) : se();
|
|
20599
|
+
}), w.start({ "rpc-host": R }), ne = new c.CallRequest(), ue = btoa(JSON.stringify(S.localDescription)), ne.setSdp(ue), W && W.disableTrickleICE && ne.setDisableTrickle(W.disableTrickleICE), w.send(ne), (ae = new g.ClientChannel(S, M)).ready.then(function() {
|
|
20600
20600
|
return se();
|
|
20601
|
-
}).catch(function(
|
|
20602
|
-
return ie(
|
|
20601
|
+
}).catch(function(L) {
|
|
20602
|
+
return ie(L);
|
|
20603
20603
|
}), [4, pe];
|
|
20604
20604
|
case 7:
|
|
20605
20605
|
return J.sent(), [4, ae.ready];
|
|
20606
20606
|
case 8:
|
|
20607
|
-
return J.sent(), H = !0,
|
|
20607
|
+
return J.sent(), H = !0, G(), _?.externalAuthAddress || (k = _?.credentials) === null || k === void 0 || k.type, O = !0, [2, { transportFactory: ae.transportFactory(), peerConnection: S }];
|
|
20608
20608
|
case 9:
|
|
20609
|
-
return
|
|
20609
|
+
return O || S.close(), [7];
|
|
20610
20610
|
case 10:
|
|
20611
20611
|
return [2];
|
|
20612
20612
|
}
|
|
@@ -20708,102 +20708,102 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20708
20708
|
});
|
|
20709
20709
|
};
|
|
20710
20710
|
}, 655: (t, e, s) => {
|
|
20711
|
-
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => P, __asyncGenerator: () =>
|
|
20711
|
+
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => P, __asyncGenerator: () => _, __asyncValues: () => D, __await: () => R, __awaiter: () => l, __classPrivateFieldGet: () => k, __classPrivateFieldIn: () => X, __classPrivateFieldSet: () => W, __createBinding: () => d, __decorate: () => o, __exportStar: () => m, __extends: () => u, __generator: () => c, __importDefault: () => q, __importStar: () => x, __makeTemplateObject: () => I, __metadata: () => i, __param: () => r, __read: () => y, __rest: () => p, __spread: () => f, __spreadArray: () => h, __spreadArrays: () => b, __values: () => v });
|
|
20712
20712
|
var n = function(S, M) {
|
|
20713
|
-
return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
20714
|
-
|
|
20715
|
-
} || function(
|
|
20713
|
+
return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(O, E) {
|
|
20714
|
+
O.__proto__ = E;
|
|
20715
|
+
} || function(O, E) {
|
|
20716
20716
|
for (var F in E)
|
|
20717
|
-
Object.prototype.hasOwnProperty.call(E, F) && (
|
|
20717
|
+
Object.prototype.hasOwnProperty.call(E, F) && (O[F] = E[F]);
|
|
20718
20718
|
}, n(S, M);
|
|
20719
20719
|
};
|
|
20720
20720
|
function u(S, M) {
|
|
20721
20721
|
if (typeof M != "function" && M !== null)
|
|
20722
20722
|
throw new TypeError("Class extends value " + String(M) + " is not a constructor or null");
|
|
20723
|
-
function
|
|
20723
|
+
function O() {
|
|
20724
20724
|
this.constructor = S;
|
|
20725
20725
|
}
|
|
20726
|
-
n(S, M), S.prototype = M === null ? Object.create(M) : (
|
|
20726
|
+
n(S, M), S.prototype = M === null ? Object.create(M) : (O.prototype = M.prototype, new O());
|
|
20727
20727
|
}
|
|
20728
20728
|
var g = function() {
|
|
20729
20729
|
return g = Object.assign || function(S) {
|
|
20730
|
-
for (var M,
|
|
20731
|
-
for (var F in M = arguments[
|
|
20730
|
+
for (var M, O = 1, E = arguments.length; O < E; O++)
|
|
20731
|
+
for (var F in M = arguments[O])
|
|
20732
20732
|
Object.prototype.hasOwnProperty.call(M, F) && (S[F] = M[F]);
|
|
20733
20733
|
return S;
|
|
20734
20734
|
}, g.apply(this, arguments);
|
|
20735
20735
|
};
|
|
20736
20736
|
function p(S, M) {
|
|
20737
|
-
var
|
|
20737
|
+
var O = {};
|
|
20738
20738
|
for (var E in S)
|
|
20739
|
-
Object.prototype.hasOwnProperty.call(S, E) && M.indexOf(E) < 0 && (
|
|
20739
|
+
Object.prototype.hasOwnProperty.call(S, E) && M.indexOf(E) < 0 && (O[E] = S[E]);
|
|
20740
20740
|
if (S != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
20741
20741
|
var F = 0;
|
|
20742
20742
|
for (E = Object.getOwnPropertySymbols(S); F < E.length; F++)
|
|
20743
|
-
M.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (
|
|
20743
|
+
M.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (O[E[F]] = S[E[F]]);
|
|
20744
20744
|
}
|
|
20745
|
-
return
|
|
20745
|
+
return O;
|
|
20746
20746
|
}
|
|
20747
|
-
function o(S, M,
|
|
20748
|
-
var F,
|
|
20747
|
+
function o(S, M, O, E) {
|
|
20748
|
+
var F, w = arguments.length, T = w < 3 ? M : E === null ? E = Object.getOwnPropertyDescriptor(M, O) : E;
|
|
20749
20749
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
20750
|
-
|
|
20750
|
+
T = Reflect.decorate(S, M, O, E);
|
|
20751
20751
|
else
|
|
20752
20752
|
for (var C = S.length - 1; C >= 0; C--)
|
|
20753
|
-
(F = S[C]) && (
|
|
20754
|
-
return
|
|
20753
|
+
(F = S[C]) && (T = (w < 3 ? F(T) : w > 3 ? F(M, O, T) : F(M, O)) || T);
|
|
20754
|
+
return w > 3 && T && Object.defineProperty(M, O, T), T;
|
|
20755
20755
|
}
|
|
20756
20756
|
function r(S, M) {
|
|
20757
|
-
return function(
|
|
20758
|
-
M(
|
|
20757
|
+
return function(O, E) {
|
|
20758
|
+
M(O, E, S);
|
|
20759
20759
|
};
|
|
20760
20760
|
}
|
|
20761
20761
|
function i(S, M) {
|
|
20762
20762
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
20763
20763
|
return Reflect.metadata(S, M);
|
|
20764
20764
|
}
|
|
20765
|
-
function l(S, M,
|
|
20766
|
-
return new (
|
|
20767
|
-
function
|
|
20765
|
+
function l(S, M, O, E) {
|
|
20766
|
+
return new (O || (O = Promise))(function(F, w) {
|
|
20767
|
+
function T(G) {
|
|
20768
20768
|
try {
|
|
20769
|
-
j(E.next(
|
|
20769
|
+
j(E.next(G));
|
|
20770
20770
|
} catch (B) {
|
|
20771
|
-
|
|
20771
|
+
w(B);
|
|
20772
20772
|
}
|
|
20773
20773
|
}
|
|
20774
|
-
function C(
|
|
20774
|
+
function C(G) {
|
|
20775
20775
|
try {
|
|
20776
|
-
j(E.throw(
|
|
20776
|
+
j(E.throw(G));
|
|
20777
20777
|
} catch (B) {
|
|
20778
|
-
|
|
20778
|
+
w(B);
|
|
20779
20779
|
}
|
|
20780
20780
|
}
|
|
20781
|
-
function j(
|
|
20781
|
+
function j(G) {
|
|
20782
20782
|
var B;
|
|
20783
|
-
|
|
20783
|
+
G.done ? F(G.value) : (B = G.value, B instanceof O ? B : new O(function(N) {
|
|
20784
20784
|
N(B);
|
|
20785
|
-
})).then(
|
|
20785
|
+
})).then(T, C);
|
|
20786
20786
|
}
|
|
20787
20787
|
j((E = E.apply(S, M || [])).next());
|
|
20788
20788
|
});
|
|
20789
20789
|
}
|
|
20790
20790
|
function c(S, M) {
|
|
20791
|
-
var
|
|
20791
|
+
var O, E, F, w, T = { label: 0, sent: function() {
|
|
20792
20792
|
if (1 & F[0])
|
|
20793
20793
|
throw F[1];
|
|
20794
20794
|
return F[1];
|
|
20795
20795
|
}, trys: [], ops: [] };
|
|
20796
|
-
return
|
|
20796
|
+
return w = { next: C(0), throw: C(1), return: C(2) }, typeof Symbol == "function" && (w[Symbol.iterator] = function() {
|
|
20797
20797
|
return this;
|
|
20798
|
-
}),
|
|
20798
|
+
}), w;
|
|
20799
20799
|
function C(j) {
|
|
20800
|
-
return function(
|
|
20800
|
+
return function(G) {
|
|
20801
20801
|
return function(B) {
|
|
20802
|
-
if (
|
|
20802
|
+
if (O)
|
|
20803
20803
|
throw new TypeError("Generator is already executing.");
|
|
20804
|
-
for (;
|
|
20804
|
+
for (; w && (w = 0, B[0] && (T = 0)), T; )
|
|
20805
20805
|
try {
|
|
20806
|
-
if (
|
|
20806
|
+
if (O = 1, E && (F = 2 & B[0] ? E.return : B[0] ? E.throw || ((F = E.return) && F.call(E), 0) : E.next) && !(F = F.call(E, B[1])).done)
|
|
20807
20807
|
return F;
|
|
20808
20808
|
switch (E = 0, F && (B = [2 & B[0], F.value]), B[0]) {
|
|
20809
20809
|
case 0:
|
|
@@ -20811,63 +20811,63 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20811
20811
|
F = B;
|
|
20812
20812
|
break;
|
|
20813
20813
|
case 4:
|
|
20814
|
-
return
|
|
20814
|
+
return T.label++, { value: B[1], done: !1 };
|
|
20815
20815
|
case 5:
|
|
20816
|
-
|
|
20816
|
+
T.label++, E = B[1], B = [0];
|
|
20817
20817
|
continue;
|
|
20818
20818
|
case 7:
|
|
20819
|
-
B =
|
|
20819
|
+
B = T.ops.pop(), T.trys.pop();
|
|
20820
20820
|
continue;
|
|
20821
20821
|
default:
|
|
20822
|
-
if (!((F = (F =
|
|
20823
|
-
|
|
20822
|
+
if (!((F = (F = T.trys).length > 0 && F[F.length - 1]) || B[0] !== 6 && B[0] !== 2)) {
|
|
20823
|
+
T = 0;
|
|
20824
20824
|
continue;
|
|
20825
20825
|
}
|
|
20826
20826
|
if (B[0] === 3 && (!F || B[1] > F[0] && B[1] < F[3])) {
|
|
20827
|
-
|
|
20827
|
+
T.label = B[1];
|
|
20828
20828
|
break;
|
|
20829
20829
|
}
|
|
20830
|
-
if (B[0] === 6 &&
|
|
20831
|
-
|
|
20830
|
+
if (B[0] === 6 && T.label < F[1]) {
|
|
20831
|
+
T.label = F[1], F = B;
|
|
20832
20832
|
break;
|
|
20833
20833
|
}
|
|
20834
|
-
if (F &&
|
|
20835
|
-
|
|
20834
|
+
if (F && T.label < F[2]) {
|
|
20835
|
+
T.label = F[2], T.ops.push(B);
|
|
20836
20836
|
break;
|
|
20837
20837
|
}
|
|
20838
|
-
F[2] &&
|
|
20838
|
+
F[2] && T.ops.pop(), T.trys.pop();
|
|
20839
20839
|
continue;
|
|
20840
20840
|
}
|
|
20841
|
-
B = M.call(S,
|
|
20841
|
+
B = M.call(S, T);
|
|
20842
20842
|
} catch (N) {
|
|
20843
20843
|
B = [6, N], E = 0;
|
|
20844
20844
|
} finally {
|
|
20845
|
-
|
|
20845
|
+
O = F = 0;
|
|
20846
20846
|
}
|
|
20847
20847
|
if (5 & B[0])
|
|
20848
20848
|
throw B[1];
|
|
20849
20849
|
return { value: B[0] ? B[1] : void 0, done: !0 };
|
|
20850
|
-
}([j,
|
|
20850
|
+
}([j, G]);
|
|
20851
20851
|
};
|
|
20852
20852
|
}
|
|
20853
20853
|
}
|
|
20854
|
-
var d = Object.create ? function(S, M,
|
|
20855
|
-
E === void 0 && (E =
|
|
20856
|
-
var F = Object.getOwnPropertyDescriptor(M,
|
|
20854
|
+
var d = Object.create ? function(S, M, O, E) {
|
|
20855
|
+
E === void 0 && (E = O);
|
|
20856
|
+
var F = Object.getOwnPropertyDescriptor(M, O);
|
|
20857
20857
|
F && !("get" in F ? !M.__esModule : F.writable || F.configurable) || (F = { enumerable: !0, get: function() {
|
|
20858
|
-
return M[
|
|
20858
|
+
return M[O];
|
|
20859
20859
|
} }), Object.defineProperty(S, E, F);
|
|
20860
|
-
} : function(S, M,
|
|
20861
|
-
E === void 0 && (E =
|
|
20860
|
+
} : function(S, M, O, E) {
|
|
20861
|
+
E === void 0 && (E = O), S[E] = M[O];
|
|
20862
20862
|
};
|
|
20863
20863
|
function m(S, M) {
|
|
20864
|
-
for (var
|
|
20865
|
-
|
|
20864
|
+
for (var O in S)
|
|
20865
|
+
O === "default" || Object.prototype.hasOwnProperty.call(M, O) || d(M, S, O);
|
|
20866
20866
|
}
|
|
20867
20867
|
function v(S) {
|
|
20868
|
-
var M = typeof Symbol == "function" && Symbol.iterator,
|
|
20869
|
-
if (
|
|
20870
|
-
return
|
|
20868
|
+
var M = typeof Symbol == "function" && Symbol.iterator, O = M && S[M], E = 0;
|
|
20869
|
+
if (O)
|
|
20870
|
+
return O.call(S);
|
|
20871
20871
|
if (S && typeof S.length == "number")
|
|
20872
20872
|
return { next: function() {
|
|
20873
20873
|
return S && E >= S.length && (S = void 0), { value: S && S[E++], done: !S };
|
|
@@ -20875,24 +20875,24 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20875
20875
|
throw new TypeError(M ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
20876
20876
|
}
|
|
20877
20877
|
function y(S, M) {
|
|
20878
|
-
var
|
|
20879
|
-
if (!
|
|
20878
|
+
var O = typeof Symbol == "function" && S[Symbol.iterator];
|
|
20879
|
+
if (!O)
|
|
20880
20880
|
return S;
|
|
20881
|
-
var E, F,
|
|
20881
|
+
var E, F, w = O.call(S), T = [];
|
|
20882
20882
|
try {
|
|
20883
|
-
for (; (M === void 0 || M-- > 0) && !(E =
|
|
20884
|
-
|
|
20883
|
+
for (; (M === void 0 || M-- > 0) && !(E = w.next()).done; )
|
|
20884
|
+
T.push(E.value);
|
|
20885
20885
|
} catch (C) {
|
|
20886
20886
|
F = { error: C };
|
|
20887
20887
|
} finally {
|
|
20888
20888
|
try {
|
|
20889
|
-
E && !E.done && (
|
|
20889
|
+
E && !E.done && (O = w.return) && O.call(w);
|
|
20890
20890
|
} finally {
|
|
20891
20891
|
if (F)
|
|
20892
20892
|
throw F.error;
|
|
20893
20893
|
}
|
|
20894
20894
|
}
|
|
20895
|
-
return
|
|
20895
|
+
return T;
|
|
20896
20896
|
}
|
|
20897
20897
|
function f() {
|
|
20898
20898
|
for (var S = [], M = 0; M < arguments.length; M++)
|
|
@@ -20900,88 +20900,88 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20900
20900
|
return S;
|
|
20901
20901
|
}
|
|
20902
20902
|
function b() {
|
|
20903
|
-
for (var S = 0, M = 0,
|
|
20903
|
+
for (var S = 0, M = 0, O = arguments.length; M < O; M++)
|
|
20904
20904
|
S += arguments[M].length;
|
|
20905
20905
|
var E = Array(S), F = 0;
|
|
20906
|
-
for (M = 0; M <
|
|
20907
|
-
for (var
|
|
20908
|
-
E[F] = T
|
|
20906
|
+
for (M = 0; M < O; M++)
|
|
20907
|
+
for (var w = arguments[M], T = 0, C = w.length; T < C; T++, F++)
|
|
20908
|
+
E[F] = w[T];
|
|
20909
20909
|
return E;
|
|
20910
20910
|
}
|
|
20911
|
-
function h(S, M,
|
|
20912
|
-
if (
|
|
20913
|
-
for (var E, F = 0,
|
|
20911
|
+
function h(S, M, O) {
|
|
20912
|
+
if (O || arguments.length === 2)
|
|
20913
|
+
for (var E, F = 0, w = M.length; F < w; F++)
|
|
20914
20914
|
!E && F in M || (E || (E = Array.prototype.slice.call(M, 0, F)), E[F] = M[F]);
|
|
20915
20915
|
return S.concat(E || Array.prototype.slice.call(M));
|
|
20916
20916
|
}
|
|
20917
20917
|
function R(S) {
|
|
20918
20918
|
return this instanceof R ? (this.v = S, this) : new R(S);
|
|
20919
20919
|
}
|
|
20920
|
-
function
|
|
20920
|
+
function _(S, M, O) {
|
|
20921
20921
|
if (!Symbol.asyncIterator)
|
|
20922
20922
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20923
|
-
var E, F =
|
|
20924
|
-
return E = {},
|
|
20923
|
+
var E, F = O.apply(S, M || []), w = [];
|
|
20924
|
+
return E = {}, T("next"), T("throw"), T("return"), E[Symbol.asyncIterator] = function() {
|
|
20925
20925
|
return this;
|
|
20926
20926
|
}, E;
|
|
20927
|
-
function
|
|
20927
|
+
function T(N) {
|
|
20928
20928
|
F[N] && (E[N] = function(H) {
|
|
20929
20929
|
return new Promise(function(Z, ee) {
|
|
20930
|
-
|
|
20930
|
+
w.push([N, H, Z, ee]) > 1 || C(N, H);
|
|
20931
20931
|
});
|
|
20932
20932
|
});
|
|
20933
20933
|
}
|
|
20934
20934
|
function C(N, H) {
|
|
20935
20935
|
try {
|
|
20936
|
-
(Z = F[N](H)).value instanceof R ? Promise.resolve(Z.value.v).then(j,
|
|
20936
|
+
(Z = F[N](H)).value instanceof R ? Promise.resolve(Z.value.v).then(j, G) : B(w[0][2], Z);
|
|
20937
20937
|
} catch (ee) {
|
|
20938
|
-
B(
|
|
20938
|
+
B(w[0][3], ee);
|
|
20939
20939
|
}
|
|
20940
20940
|
var Z;
|
|
20941
20941
|
}
|
|
20942
20942
|
function j(N) {
|
|
20943
20943
|
C("next", N);
|
|
20944
20944
|
}
|
|
20945
|
-
function
|
|
20945
|
+
function G(N) {
|
|
20946
20946
|
C("throw", N);
|
|
20947
20947
|
}
|
|
20948
20948
|
function B(N, H) {
|
|
20949
|
-
N(H),
|
|
20949
|
+
N(H), w.shift(), w.length && C(w[0][0], w[0][1]);
|
|
20950
20950
|
}
|
|
20951
20951
|
}
|
|
20952
20952
|
function P(S) {
|
|
20953
|
-
var M,
|
|
20953
|
+
var M, O;
|
|
20954
20954
|
return M = {}, E("next"), E("throw", function(F) {
|
|
20955
20955
|
throw F;
|
|
20956
20956
|
}), E("return"), M[Symbol.iterator] = function() {
|
|
20957
20957
|
return this;
|
|
20958
20958
|
}, M;
|
|
20959
|
-
function E(F,
|
|
20960
|
-
M[F] = S[F] ? function(
|
|
20961
|
-
return (
|
|
20962
|
-
} :
|
|
20959
|
+
function E(F, w) {
|
|
20960
|
+
M[F] = S[F] ? function(T) {
|
|
20961
|
+
return (O = !O) ? { value: R(S[F](T)), done: F === "return" } : w ? w(T) : T;
|
|
20962
|
+
} : w;
|
|
20963
20963
|
}
|
|
20964
20964
|
}
|
|
20965
20965
|
function D(S) {
|
|
20966
20966
|
if (!Symbol.asyncIterator)
|
|
20967
20967
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20968
|
-
var M,
|
|
20969
|
-
return
|
|
20968
|
+
var M, O = S[Symbol.asyncIterator];
|
|
20969
|
+
return O ? O.call(S) : (S = v(S), M = {}, E("next"), E("throw"), E("return"), M[Symbol.asyncIterator] = function() {
|
|
20970
20970
|
return this;
|
|
20971
20971
|
}, M);
|
|
20972
20972
|
function E(F) {
|
|
20973
|
-
M[F] = S[F] && function(
|
|
20974
|
-
return new Promise(function(
|
|
20975
|
-
(function(j,
|
|
20973
|
+
M[F] = S[F] && function(w) {
|
|
20974
|
+
return new Promise(function(T, C) {
|
|
20975
|
+
(function(j, G, B, N) {
|
|
20976
20976
|
Promise.resolve(N).then(function(H) {
|
|
20977
20977
|
j({ value: H, done: B });
|
|
20978
|
-
},
|
|
20979
|
-
})(
|
|
20978
|
+
}, G);
|
|
20979
|
+
})(T, C, (w = S[F](w)).done, w.value);
|
|
20980
20980
|
});
|
|
20981
20981
|
};
|
|
20982
20982
|
}
|
|
20983
20983
|
}
|
|
20984
|
-
function
|
|
20984
|
+
function I(S, M) {
|
|
20985
20985
|
return Object.defineProperty ? Object.defineProperty(S, "raw", { value: M }) : S.raw = M, S;
|
|
20986
20986
|
}
|
|
20987
20987
|
var z = Object.create ? function(S, M) {
|
|
@@ -20994,28 +20994,28 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20994
20994
|
return S;
|
|
20995
20995
|
var M = {};
|
|
20996
20996
|
if (S != null)
|
|
20997
|
-
for (var
|
|
20998
|
-
|
|
20997
|
+
for (var O in S)
|
|
20998
|
+
O !== "default" && Object.prototype.hasOwnProperty.call(S, O) && d(M, S, O);
|
|
20999
20999
|
return z(M, S), M;
|
|
21000
21000
|
}
|
|
21001
|
-
function
|
|
21001
|
+
function q(S) {
|
|
21002
21002
|
return S && S.__esModule ? S : { default: S };
|
|
21003
21003
|
}
|
|
21004
|
-
function k(S, M,
|
|
21005
|
-
if (
|
|
21004
|
+
function k(S, M, O, E) {
|
|
21005
|
+
if (O === "a" && !E)
|
|
21006
21006
|
throw new TypeError("Private accessor was defined without a getter");
|
|
21007
21007
|
if (typeof M == "function" ? S !== M || !E : !M.has(S))
|
|
21008
21008
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
21009
|
-
return
|
|
21009
|
+
return O === "m" ? E : O === "a" ? E.call(S) : E ? E.value : M.get(S);
|
|
21010
21010
|
}
|
|
21011
|
-
function W(S, M,
|
|
21011
|
+
function W(S, M, O, E, F) {
|
|
21012
21012
|
if (E === "m")
|
|
21013
21013
|
throw new TypeError("Private method is not writable");
|
|
21014
21014
|
if (E === "a" && !F)
|
|
21015
21015
|
throw new TypeError("Private accessor was defined without a setter");
|
|
21016
21016
|
if (typeof M == "function" ? S !== M || !F : !M.has(S))
|
|
21017
21017
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
21018
|
-
return E === "a" ? F.call(S,
|
|
21018
|
+
return E === "a" ? F.call(S, O) : F ? F.value = O : M.set(S, O), O;
|
|
21019
21019
|
}
|
|
21020
21020
|
function X(S, M) {
|
|
21021
21021
|
if (M === null || typeof M != "object" && typeof M != "function")
|
|
@@ -23734,7 +23734,7 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23734
23734
|
return e.Message.setProto3BooleanField(this, 1, o);
|
|
23735
23735
|
}, s.object.extend(t, proto.viam.component.arm.v1);
|
|
23736
23736
|
})(arm_pb);
|
|
23737
|
-
var component_arm_v1_arm_pb = arm_pb, common_v1_common_pb$
|
|
23737
|
+
var component_arm_v1_arm_pb = arm_pb, common_v1_common_pb$i = common_pb, grpc$j = grpcWebClient_umdExports.grpc, ArmService = function() {
|
|
23738
23738
|
function t() {
|
|
23739
23739
|
}
|
|
23740
23740
|
return t.serviceName = "viam.component.arm.v1.ArmService", t;
|
|
@@ -23792,15 +23792,15 @@ ArmService.DoCommand = {
|
|
|
23792
23792
|
service: ArmService,
|
|
23793
23793
|
requestStream: !1,
|
|
23794
23794
|
responseStream: !1,
|
|
23795
|
-
requestType: common_v1_common_pb$
|
|
23796
|
-
responseType: common_v1_common_pb$
|
|
23795
|
+
requestType: common_v1_common_pb$i.DoCommandRequest,
|
|
23796
|
+
responseType: common_v1_common_pb$i.DoCommandResponse
|
|
23797
23797
|
};
|
|
23798
23798
|
function ArmServiceClient(t, e) {
|
|
23799
23799
|
this.serviceHost = t, this.options = e || {};
|
|
23800
23800
|
}
|
|
23801
23801
|
ArmServiceClient.prototype.getEndPosition = function t(e, s, n) {
|
|
23802
23802
|
arguments.length === 2 && (n = arguments[1]);
|
|
23803
|
-
var u = grpc$
|
|
23803
|
+
var u = grpc$j.unary(ArmService.GetEndPosition, {
|
|
23804
23804
|
request: e,
|
|
23805
23805
|
host: this.serviceHost,
|
|
23806
23806
|
metadata: s,
|
|
@@ -23808,7 +23808,7 @@ ArmServiceClient.prototype.getEndPosition = function t(e, s, n) {
|
|
|
23808
23808
|
debug: this.options.debug,
|
|
23809
23809
|
onEnd: function(g) {
|
|
23810
23810
|
if (n)
|
|
23811
|
-
if (g.status !== grpc$
|
|
23811
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23812
23812
|
var p = new Error(g.statusMessage);
|
|
23813
23813
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23814
23814
|
} else
|
|
@@ -23823,7 +23823,7 @@ ArmServiceClient.prototype.getEndPosition = function t(e, s, n) {
|
|
|
23823
23823
|
};
|
|
23824
23824
|
ArmServiceClient.prototype.moveToPosition = function t(e, s, n) {
|
|
23825
23825
|
arguments.length === 2 && (n = arguments[1]);
|
|
23826
|
-
var u = grpc$
|
|
23826
|
+
var u = grpc$j.unary(ArmService.MoveToPosition, {
|
|
23827
23827
|
request: e,
|
|
23828
23828
|
host: this.serviceHost,
|
|
23829
23829
|
metadata: s,
|
|
@@ -23831,7 +23831,7 @@ ArmServiceClient.prototype.moveToPosition = function t(e, s, n) {
|
|
|
23831
23831
|
debug: this.options.debug,
|
|
23832
23832
|
onEnd: function(g) {
|
|
23833
23833
|
if (n)
|
|
23834
|
-
if (g.status !== grpc$
|
|
23834
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23835
23835
|
var p = new Error(g.statusMessage);
|
|
23836
23836
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23837
23837
|
} else
|
|
@@ -23846,7 +23846,7 @@ ArmServiceClient.prototype.moveToPosition = function t(e, s, n) {
|
|
|
23846
23846
|
};
|
|
23847
23847
|
ArmServiceClient.prototype.getJointPositions = function t(e, s, n) {
|
|
23848
23848
|
arguments.length === 2 && (n = arguments[1]);
|
|
23849
|
-
var u = grpc$
|
|
23849
|
+
var u = grpc$j.unary(ArmService.GetJointPositions, {
|
|
23850
23850
|
request: e,
|
|
23851
23851
|
host: this.serviceHost,
|
|
23852
23852
|
metadata: s,
|
|
@@ -23854,7 +23854,7 @@ ArmServiceClient.prototype.getJointPositions = function t(e, s, n) {
|
|
|
23854
23854
|
debug: this.options.debug,
|
|
23855
23855
|
onEnd: function(g) {
|
|
23856
23856
|
if (n)
|
|
23857
|
-
if (g.status !== grpc$
|
|
23857
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23858
23858
|
var p = new Error(g.statusMessage);
|
|
23859
23859
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23860
23860
|
} else
|
|
@@ -23869,7 +23869,7 @@ ArmServiceClient.prototype.getJointPositions = function t(e, s, n) {
|
|
|
23869
23869
|
};
|
|
23870
23870
|
ArmServiceClient.prototype.moveToJointPositions = function t(e, s, n) {
|
|
23871
23871
|
arguments.length === 2 && (n = arguments[1]);
|
|
23872
|
-
var u = grpc$
|
|
23872
|
+
var u = grpc$j.unary(ArmService.MoveToJointPositions, {
|
|
23873
23873
|
request: e,
|
|
23874
23874
|
host: this.serviceHost,
|
|
23875
23875
|
metadata: s,
|
|
@@ -23877,7 +23877,7 @@ ArmServiceClient.prototype.moveToJointPositions = function t(e, s, n) {
|
|
|
23877
23877
|
debug: this.options.debug,
|
|
23878
23878
|
onEnd: function(g) {
|
|
23879
23879
|
if (n)
|
|
23880
|
-
if (g.status !== grpc$
|
|
23880
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23881
23881
|
var p = new Error(g.statusMessage);
|
|
23882
23882
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23883
23883
|
} else
|
|
@@ -23892,7 +23892,7 @@ ArmServiceClient.prototype.moveToJointPositions = function t(e, s, n) {
|
|
|
23892
23892
|
};
|
|
23893
23893
|
ArmServiceClient.prototype.stop = function t(e, s, n) {
|
|
23894
23894
|
arguments.length === 2 && (n = arguments[1]);
|
|
23895
|
-
var u = grpc$
|
|
23895
|
+
var u = grpc$j.unary(ArmService.Stop, {
|
|
23896
23896
|
request: e,
|
|
23897
23897
|
host: this.serviceHost,
|
|
23898
23898
|
metadata: s,
|
|
@@ -23900,7 +23900,7 @@ ArmServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
23900
23900
|
debug: this.options.debug,
|
|
23901
23901
|
onEnd: function(g) {
|
|
23902
23902
|
if (n)
|
|
23903
|
-
if (g.status !== grpc$
|
|
23903
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23904
23904
|
var p = new Error(g.statusMessage);
|
|
23905
23905
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23906
23906
|
} else
|
|
@@ -23915,7 +23915,7 @@ ArmServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
23915
23915
|
};
|
|
23916
23916
|
ArmServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
23917
23917
|
arguments.length === 2 && (n = arguments[1]);
|
|
23918
|
-
var u = grpc$
|
|
23918
|
+
var u = grpc$j.unary(ArmService.IsMoving, {
|
|
23919
23919
|
request: e,
|
|
23920
23920
|
host: this.serviceHost,
|
|
23921
23921
|
metadata: s,
|
|
@@ -23923,7 +23923,7 @@ ArmServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
23923
23923
|
debug: this.options.debug,
|
|
23924
23924
|
onEnd: function(g) {
|
|
23925
23925
|
if (n)
|
|
23926
|
-
if (g.status !== grpc$
|
|
23926
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23927
23927
|
var p = new Error(g.statusMessage);
|
|
23928
23928
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23929
23929
|
} else
|
|
@@ -23938,7 +23938,7 @@ ArmServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
23938
23938
|
};
|
|
23939
23939
|
ArmServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
23940
23940
|
arguments.length === 2 && (n = arguments[1]);
|
|
23941
|
-
var u = grpc$
|
|
23941
|
+
var u = grpc$j.unary(ArmService.DoCommand, {
|
|
23942
23942
|
request: e,
|
|
23943
23943
|
host: this.serviceHost,
|
|
23944
23944
|
metadata: s,
|
|
@@ -23946,7 +23946,7 @@ ArmServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
23946
23946
|
debug: this.options.debug,
|
|
23947
23947
|
onEnd: function(g) {
|
|
23948
23948
|
if (n)
|
|
23949
|
-
if (g.status !== grpc$
|
|
23949
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23950
23950
|
var p = new Error(g.statusMessage);
|
|
23951
23951
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23952
23952
|
} else
|
|
@@ -24657,7 +24657,7 @@ var ArmServiceClient_1 = ArmServiceClient, base_pb = {};
|
|
|
24657
24657
|
return e.Message.setProto3BooleanField(this, 1, o);
|
|
24658
24658
|
}, s.object.extend(t, proto.viam.component.base.v1);
|
|
24659
24659
|
})(base_pb);
|
|
24660
|
-
var component_base_v1_base_pb = base_pb, common_v1_common_pb$
|
|
24660
|
+
var component_base_v1_base_pb = base_pb, common_v1_common_pb$h = common_pb, grpc$i = grpcWebClient_umdExports.grpc, BaseService = function() {
|
|
24661
24661
|
function t() {
|
|
24662
24662
|
}
|
|
24663
24663
|
return t.serviceName = "viam.component.base.v1.BaseService", t;
|
|
@@ -24715,15 +24715,15 @@ BaseService.DoCommand = {
|
|
|
24715
24715
|
service: BaseService,
|
|
24716
24716
|
requestStream: !1,
|
|
24717
24717
|
responseStream: !1,
|
|
24718
|
-
requestType: common_v1_common_pb$
|
|
24719
|
-
responseType: common_v1_common_pb$
|
|
24718
|
+
requestType: common_v1_common_pb$h.DoCommandRequest,
|
|
24719
|
+
responseType: common_v1_common_pb$h.DoCommandResponse
|
|
24720
24720
|
};
|
|
24721
24721
|
function BaseServiceClient(t, e) {
|
|
24722
24722
|
this.serviceHost = t, this.options = e || {};
|
|
24723
24723
|
}
|
|
24724
24724
|
BaseServiceClient.prototype.moveStraight = function t(e, s, n) {
|
|
24725
24725
|
arguments.length === 2 && (n = arguments[1]);
|
|
24726
|
-
var u = grpc$
|
|
24726
|
+
var u = grpc$i.unary(BaseService.MoveStraight, {
|
|
24727
24727
|
request: e,
|
|
24728
24728
|
host: this.serviceHost,
|
|
24729
24729
|
metadata: s,
|
|
@@ -24731,7 +24731,7 @@ BaseServiceClient.prototype.moveStraight = function t(e, s, n) {
|
|
|
24731
24731
|
debug: this.options.debug,
|
|
24732
24732
|
onEnd: function(g) {
|
|
24733
24733
|
if (n)
|
|
24734
|
-
if (g.status !== grpc$
|
|
24734
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24735
24735
|
var p = new Error(g.statusMessage);
|
|
24736
24736
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24737
24737
|
} else
|
|
@@ -24746,7 +24746,7 @@ BaseServiceClient.prototype.moveStraight = function t(e, s, n) {
|
|
|
24746
24746
|
};
|
|
24747
24747
|
BaseServiceClient.prototype.spin = function t(e, s, n) {
|
|
24748
24748
|
arguments.length === 2 && (n = arguments[1]);
|
|
24749
|
-
var u = grpc$
|
|
24749
|
+
var u = grpc$i.unary(BaseService.Spin, {
|
|
24750
24750
|
request: e,
|
|
24751
24751
|
host: this.serviceHost,
|
|
24752
24752
|
metadata: s,
|
|
@@ -24754,7 +24754,7 @@ BaseServiceClient.prototype.spin = function t(e, s, n) {
|
|
|
24754
24754
|
debug: this.options.debug,
|
|
24755
24755
|
onEnd: function(g) {
|
|
24756
24756
|
if (n)
|
|
24757
|
-
if (g.status !== grpc$
|
|
24757
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24758
24758
|
var p = new Error(g.statusMessage);
|
|
24759
24759
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24760
24760
|
} else
|
|
@@ -24769,7 +24769,7 @@ BaseServiceClient.prototype.spin = function t(e, s, n) {
|
|
|
24769
24769
|
};
|
|
24770
24770
|
BaseServiceClient.prototype.setPower = function t(e, s, n) {
|
|
24771
24771
|
arguments.length === 2 && (n = arguments[1]);
|
|
24772
|
-
var u = grpc$
|
|
24772
|
+
var u = grpc$i.unary(BaseService.SetPower, {
|
|
24773
24773
|
request: e,
|
|
24774
24774
|
host: this.serviceHost,
|
|
24775
24775
|
metadata: s,
|
|
@@ -24777,7 +24777,7 @@ BaseServiceClient.prototype.setPower = function t(e, s, n) {
|
|
|
24777
24777
|
debug: this.options.debug,
|
|
24778
24778
|
onEnd: function(g) {
|
|
24779
24779
|
if (n)
|
|
24780
|
-
if (g.status !== grpc$
|
|
24780
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24781
24781
|
var p = new Error(g.statusMessage);
|
|
24782
24782
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24783
24783
|
} else
|
|
@@ -24792,7 +24792,7 @@ BaseServiceClient.prototype.setPower = function t(e, s, n) {
|
|
|
24792
24792
|
};
|
|
24793
24793
|
BaseServiceClient.prototype.setVelocity = function t(e, s, n) {
|
|
24794
24794
|
arguments.length === 2 && (n = arguments[1]);
|
|
24795
|
-
var u = grpc$
|
|
24795
|
+
var u = grpc$i.unary(BaseService.SetVelocity, {
|
|
24796
24796
|
request: e,
|
|
24797
24797
|
host: this.serviceHost,
|
|
24798
24798
|
metadata: s,
|
|
@@ -24800,7 +24800,7 @@ BaseServiceClient.prototype.setVelocity = function t(e, s, n) {
|
|
|
24800
24800
|
debug: this.options.debug,
|
|
24801
24801
|
onEnd: function(g) {
|
|
24802
24802
|
if (n)
|
|
24803
|
-
if (g.status !== grpc$
|
|
24803
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24804
24804
|
var p = new Error(g.statusMessage);
|
|
24805
24805
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24806
24806
|
} else
|
|
@@ -24815,7 +24815,7 @@ BaseServiceClient.prototype.setVelocity = function t(e, s, n) {
|
|
|
24815
24815
|
};
|
|
24816
24816
|
BaseServiceClient.prototype.stop = function t(e, s, n) {
|
|
24817
24817
|
arguments.length === 2 && (n = arguments[1]);
|
|
24818
|
-
var u = grpc$
|
|
24818
|
+
var u = grpc$i.unary(BaseService.Stop, {
|
|
24819
24819
|
request: e,
|
|
24820
24820
|
host: this.serviceHost,
|
|
24821
24821
|
metadata: s,
|
|
@@ -24823,7 +24823,7 @@ BaseServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
24823
24823
|
debug: this.options.debug,
|
|
24824
24824
|
onEnd: function(g) {
|
|
24825
24825
|
if (n)
|
|
24826
|
-
if (g.status !== grpc$
|
|
24826
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24827
24827
|
var p = new Error(g.statusMessage);
|
|
24828
24828
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24829
24829
|
} else
|
|
@@ -24838,7 +24838,7 @@ BaseServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
24838
24838
|
};
|
|
24839
24839
|
BaseServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
24840
24840
|
arguments.length === 2 && (n = arguments[1]);
|
|
24841
|
-
var u = grpc$
|
|
24841
|
+
var u = grpc$i.unary(BaseService.IsMoving, {
|
|
24842
24842
|
request: e,
|
|
24843
24843
|
host: this.serviceHost,
|
|
24844
24844
|
metadata: s,
|
|
@@ -24846,7 +24846,7 @@ BaseServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
24846
24846
|
debug: this.options.debug,
|
|
24847
24847
|
onEnd: function(g) {
|
|
24848
24848
|
if (n)
|
|
24849
|
-
if (g.status !== grpc$
|
|
24849
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24850
24850
|
var p = new Error(g.statusMessage);
|
|
24851
24851
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24852
24852
|
} else
|
|
@@ -24861,7 +24861,7 @@ BaseServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
24861
24861
|
};
|
|
24862
24862
|
BaseServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
24863
24863
|
arguments.length === 2 && (n = arguments[1]);
|
|
24864
|
-
var u = grpc$
|
|
24864
|
+
var u = grpc$i.unary(BaseService.DoCommand, {
|
|
24865
24865
|
request: e,
|
|
24866
24866
|
host: this.serviceHost,
|
|
24867
24867
|
metadata: s,
|
|
@@ -24869,7 +24869,7 @@ BaseServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
24869
24869
|
debug: this.options.debug,
|
|
24870
24870
|
onEnd: function(g) {
|
|
24871
24871
|
if (n)
|
|
24872
|
-
if (g.status !== grpc$
|
|
24872
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24873
24873
|
var p = new Error(g.statusMessage);
|
|
24874
24874
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24875
24875
|
} else
|
|
@@ -26153,7 +26153,7 @@ var BaseServiceClient_1 = BaseServiceClient, board_pb = {};
|
|
|
26153
26153
|
POWER_MODE_OFFLINE_DEEP: 2
|
|
26154
26154
|
}, s.object.extend(t, proto.viam.component.board.v1);
|
|
26155
26155
|
})(board_pb);
|
|
26156
|
-
var component_board_v1_board_pb = board_pb, common_v1_common_pb$
|
|
26156
|
+
var component_board_v1_board_pb = board_pb, common_v1_common_pb$g = common_pb, grpc$h = grpcWebClient_umdExports.grpc, BoardService = function() {
|
|
26157
26157
|
function t() {
|
|
26158
26158
|
}
|
|
26159
26159
|
return t.serviceName = "viam.component.board.v1.BoardService", t;
|
|
@@ -26219,8 +26219,8 @@ BoardService.DoCommand = {
|
|
|
26219
26219
|
service: BoardService,
|
|
26220
26220
|
requestStream: !1,
|
|
26221
26221
|
responseStream: !1,
|
|
26222
|
-
requestType: common_v1_common_pb$
|
|
26223
|
-
responseType: common_v1_common_pb$
|
|
26222
|
+
requestType: common_v1_common_pb$g.DoCommandRequest,
|
|
26223
|
+
responseType: common_v1_common_pb$g.DoCommandResponse
|
|
26224
26224
|
};
|
|
26225
26225
|
BoardService.ReadAnalogReader = {
|
|
26226
26226
|
methodName: "ReadAnalogReader",
|
|
@@ -26251,7 +26251,7 @@ function BoardServiceClient(t, e) {
|
|
|
26251
26251
|
}
|
|
26252
26252
|
BoardServiceClient.prototype.status = function t(e, s, n) {
|
|
26253
26253
|
arguments.length === 2 && (n = arguments[1]);
|
|
26254
|
-
var u = grpc$
|
|
26254
|
+
var u = grpc$h.unary(BoardService.Status, {
|
|
26255
26255
|
request: e,
|
|
26256
26256
|
host: this.serviceHost,
|
|
26257
26257
|
metadata: s,
|
|
@@ -26259,7 +26259,7 @@ BoardServiceClient.prototype.status = function t(e, s, n) {
|
|
|
26259
26259
|
debug: this.options.debug,
|
|
26260
26260
|
onEnd: function(g) {
|
|
26261
26261
|
if (n)
|
|
26262
|
-
if (g.status !== grpc$
|
|
26262
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26263
26263
|
var p = new Error(g.statusMessage);
|
|
26264
26264
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26265
26265
|
} else
|
|
@@ -26274,7 +26274,7 @@ BoardServiceClient.prototype.status = function t(e, s, n) {
|
|
|
26274
26274
|
};
|
|
26275
26275
|
BoardServiceClient.prototype.setGPIO = function t(e, s, n) {
|
|
26276
26276
|
arguments.length === 2 && (n = arguments[1]);
|
|
26277
|
-
var u = grpc$
|
|
26277
|
+
var u = grpc$h.unary(BoardService.SetGPIO, {
|
|
26278
26278
|
request: e,
|
|
26279
26279
|
host: this.serviceHost,
|
|
26280
26280
|
metadata: s,
|
|
@@ -26282,7 +26282,7 @@ BoardServiceClient.prototype.setGPIO = function t(e, s, n) {
|
|
|
26282
26282
|
debug: this.options.debug,
|
|
26283
26283
|
onEnd: function(g) {
|
|
26284
26284
|
if (n)
|
|
26285
|
-
if (g.status !== grpc$
|
|
26285
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26286
26286
|
var p = new Error(g.statusMessage);
|
|
26287
26287
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26288
26288
|
} else
|
|
@@ -26297,7 +26297,7 @@ BoardServiceClient.prototype.setGPIO = function t(e, s, n) {
|
|
|
26297
26297
|
};
|
|
26298
26298
|
BoardServiceClient.prototype.getGPIO = function t(e, s, n) {
|
|
26299
26299
|
arguments.length === 2 && (n = arguments[1]);
|
|
26300
|
-
var u = grpc$
|
|
26300
|
+
var u = grpc$h.unary(BoardService.GetGPIO, {
|
|
26301
26301
|
request: e,
|
|
26302
26302
|
host: this.serviceHost,
|
|
26303
26303
|
metadata: s,
|
|
@@ -26305,7 +26305,7 @@ BoardServiceClient.prototype.getGPIO = function t(e, s, n) {
|
|
|
26305
26305
|
debug: this.options.debug,
|
|
26306
26306
|
onEnd: function(g) {
|
|
26307
26307
|
if (n)
|
|
26308
|
-
if (g.status !== grpc$
|
|
26308
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26309
26309
|
var p = new Error(g.statusMessage);
|
|
26310
26310
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26311
26311
|
} else
|
|
@@ -26320,7 +26320,7 @@ BoardServiceClient.prototype.getGPIO = function t(e, s, n) {
|
|
|
26320
26320
|
};
|
|
26321
26321
|
BoardServiceClient.prototype.pWM = function t(e, s, n) {
|
|
26322
26322
|
arguments.length === 2 && (n = arguments[1]);
|
|
26323
|
-
var u = grpc$
|
|
26323
|
+
var u = grpc$h.unary(BoardService.PWM, {
|
|
26324
26324
|
request: e,
|
|
26325
26325
|
host: this.serviceHost,
|
|
26326
26326
|
metadata: s,
|
|
@@ -26328,7 +26328,7 @@ BoardServiceClient.prototype.pWM = function t(e, s, n) {
|
|
|
26328
26328
|
debug: this.options.debug,
|
|
26329
26329
|
onEnd: function(g) {
|
|
26330
26330
|
if (n)
|
|
26331
|
-
if (g.status !== grpc$
|
|
26331
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26332
26332
|
var p = new Error(g.statusMessage);
|
|
26333
26333
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26334
26334
|
} else
|
|
@@ -26343,7 +26343,7 @@ BoardServiceClient.prototype.pWM = function t(e, s, n) {
|
|
|
26343
26343
|
};
|
|
26344
26344
|
BoardServiceClient.prototype.setPWM = function t(e, s, n) {
|
|
26345
26345
|
arguments.length === 2 && (n = arguments[1]);
|
|
26346
|
-
var u = grpc$
|
|
26346
|
+
var u = grpc$h.unary(BoardService.SetPWM, {
|
|
26347
26347
|
request: e,
|
|
26348
26348
|
host: this.serviceHost,
|
|
26349
26349
|
metadata: s,
|
|
@@ -26351,7 +26351,7 @@ BoardServiceClient.prototype.setPWM = function t(e, s, n) {
|
|
|
26351
26351
|
debug: this.options.debug,
|
|
26352
26352
|
onEnd: function(g) {
|
|
26353
26353
|
if (n)
|
|
26354
|
-
if (g.status !== grpc$
|
|
26354
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26355
26355
|
var p = new Error(g.statusMessage);
|
|
26356
26356
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26357
26357
|
} else
|
|
@@ -26366,7 +26366,7 @@ BoardServiceClient.prototype.setPWM = function t(e, s, n) {
|
|
|
26366
26366
|
};
|
|
26367
26367
|
BoardServiceClient.prototype.pWMFrequency = function t(e, s, n) {
|
|
26368
26368
|
arguments.length === 2 && (n = arguments[1]);
|
|
26369
|
-
var u = grpc$
|
|
26369
|
+
var u = grpc$h.unary(BoardService.PWMFrequency, {
|
|
26370
26370
|
request: e,
|
|
26371
26371
|
host: this.serviceHost,
|
|
26372
26372
|
metadata: s,
|
|
@@ -26374,7 +26374,7 @@ BoardServiceClient.prototype.pWMFrequency = function t(e, s, n) {
|
|
|
26374
26374
|
debug: this.options.debug,
|
|
26375
26375
|
onEnd: function(g) {
|
|
26376
26376
|
if (n)
|
|
26377
|
-
if (g.status !== grpc$
|
|
26377
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26378
26378
|
var p = new Error(g.statusMessage);
|
|
26379
26379
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26380
26380
|
} else
|
|
@@ -26389,7 +26389,7 @@ BoardServiceClient.prototype.pWMFrequency = function t(e, s, n) {
|
|
|
26389
26389
|
};
|
|
26390
26390
|
BoardServiceClient.prototype.setPWMFrequency = function t(e, s, n) {
|
|
26391
26391
|
arguments.length === 2 && (n = arguments[1]);
|
|
26392
|
-
var u = grpc$
|
|
26392
|
+
var u = grpc$h.unary(BoardService.SetPWMFrequency, {
|
|
26393
26393
|
request: e,
|
|
26394
26394
|
host: this.serviceHost,
|
|
26395
26395
|
metadata: s,
|
|
@@ -26397,7 +26397,7 @@ BoardServiceClient.prototype.setPWMFrequency = function t(e, s, n) {
|
|
|
26397
26397
|
debug: this.options.debug,
|
|
26398
26398
|
onEnd: function(g) {
|
|
26399
26399
|
if (n)
|
|
26400
|
-
if (g.status !== grpc$
|
|
26400
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26401
26401
|
var p = new Error(g.statusMessage);
|
|
26402
26402
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26403
26403
|
} else
|
|
@@ -26412,7 +26412,7 @@ BoardServiceClient.prototype.setPWMFrequency = function t(e, s, n) {
|
|
|
26412
26412
|
};
|
|
26413
26413
|
BoardServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
26414
26414
|
arguments.length === 2 && (n = arguments[1]);
|
|
26415
|
-
var u = grpc$
|
|
26415
|
+
var u = grpc$h.unary(BoardService.DoCommand, {
|
|
26416
26416
|
request: e,
|
|
26417
26417
|
host: this.serviceHost,
|
|
26418
26418
|
metadata: s,
|
|
@@ -26420,7 +26420,7 @@ BoardServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
26420
26420
|
debug: this.options.debug,
|
|
26421
26421
|
onEnd: function(g) {
|
|
26422
26422
|
if (n)
|
|
26423
|
-
if (g.status !== grpc$
|
|
26423
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26424
26424
|
var p = new Error(g.statusMessage);
|
|
26425
26425
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26426
26426
|
} else
|
|
@@ -26435,7 +26435,7 @@ BoardServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
26435
26435
|
};
|
|
26436
26436
|
BoardServiceClient.prototype.readAnalogReader = function t(e, s, n) {
|
|
26437
26437
|
arguments.length === 2 && (n = arguments[1]);
|
|
26438
|
-
var u = grpc$
|
|
26438
|
+
var u = grpc$h.unary(BoardService.ReadAnalogReader, {
|
|
26439
26439
|
request: e,
|
|
26440
26440
|
host: this.serviceHost,
|
|
26441
26441
|
metadata: s,
|
|
@@ -26443,7 +26443,7 @@ BoardServiceClient.prototype.readAnalogReader = function t(e, s, n) {
|
|
|
26443
26443
|
debug: this.options.debug,
|
|
26444
26444
|
onEnd: function(g) {
|
|
26445
26445
|
if (n)
|
|
26446
|
-
if (g.status !== grpc$
|
|
26446
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26447
26447
|
var p = new Error(g.statusMessage);
|
|
26448
26448
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26449
26449
|
} else
|
|
@@ -26458,7 +26458,7 @@ BoardServiceClient.prototype.readAnalogReader = function t(e, s, n) {
|
|
|
26458
26458
|
};
|
|
26459
26459
|
BoardServiceClient.prototype.getDigitalInterruptValue = function t(e, s, n) {
|
|
26460
26460
|
arguments.length === 2 && (n = arguments[1]);
|
|
26461
|
-
var u = grpc$
|
|
26461
|
+
var u = grpc$h.unary(BoardService.GetDigitalInterruptValue, {
|
|
26462
26462
|
request: e,
|
|
26463
26463
|
host: this.serviceHost,
|
|
26464
26464
|
metadata: s,
|
|
@@ -26466,7 +26466,7 @@ BoardServiceClient.prototype.getDigitalInterruptValue = function t(e, s, n) {
|
|
|
26466
26466
|
debug: this.options.debug,
|
|
26467
26467
|
onEnd: function(g) {
|
|
26468
26468
|
if (n)
|
|
26469
|
-
if (g.status !== grpc$
|
|
26469
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26470
26470
|
var p = new Error(g.statusMessage);
|
|
26471
26471
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26472
26472
|
} else
|
|
@@ -26481,7 +26481,522 @@ BoardServiceClient.prototype.getDigitalInterruptValue = function t(e, s, n) {
|
|
|
26481
26481
|
};
|
|
26482
26482
|
BoardServiceClient.prototype.setPowerMode = function t(e, s, n) {
|
|
26483
26483
|
arguments.length === 2 && (n = arguments[1]);
|
|
26484
|
-
var u = grpc$
|
|
26484
|
+
var u = grpc$h.unary(BoardService.SetPowerMode, {
|
|
26485
|
+
request: e,
|
|
26486
|
+
host: this.serviceHost,
|
|
26487
|
+
metadata: s,
|
|
26488
|
+
transport: this.options.transport,
|
|
26489
|
+
debug: this.options.debug,
|
|
26490
|
+
onEnd: function(g) {
|
|
26491
|
+
if (n)
|
|
26492
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26493
|
+
var p = new Error(g.statusMessage);
|
|
26494
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26495
|
+
} else
|
|
26496
|
+
n(null, g.message);
|
|
26497
|
+
}
|
|
26498
|
+
});
|
|
26499
|
+
return {
|
|
26500
|
+
cancel: function() {
|
|
26501
|
+
n = null, u.close();
|
|
26502
|
+
}
|
|
26503
|
+
};
|
|
26504
|
+
};
|
|
26505
|
+
var BoardServiceClient_1 = BoardServiceClient, encoder_pb = {};
|
|
26506
|
+
(function(t) {
|
|
26507
|
+
var e = googleProtobuf, s = e, n = function() {
|
|
26508
|
+
return this || window || n || self || Function("return this")();
|
|
26509
|
+
}.call(null), u = common_pb;
|
|
26510
|
+
s.object.extend(proto, u);
|
|
26511
|
+
var g = annotations_pb;
|
|
26512
|
+
s.object.extend(proto, g);
|
|
26513
|
+
var p = struct_pb;
|
|
26514
|
+
s.object.extend(proto, p), s.exportSymbol("proto.viam.component.encoder.v1.GetPositionRequest", null, n), s.exportSymbol("proto.viam.component.encoder.v1.GetPositionResponse", null, n), s.exportSymbol("proto.viam.component.encoder.v1.GetPropertiesRequest", null, n), s.exportSymbol("proto.viam.component.encoder.v1.GetPropertiesResponse", null, n), s.exportSymbol("proto.viam.component.encoder.v1.PositionType", null, n), s.exportSymbol("proto.viam.component.encoder.v1.ResetPositionRequest", null, n), s.exportSymbol("proto.viam.component.encoder.v1.ResetPositionResponse", null, n), proto.viam.component.encoder.v1.GetPositionRequest = function(o) {
|
|
26515
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26516
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPositionRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPositionRequest.displayName = "proto.viam.component.encoder.v1.GetPositionRequest"), proto.viam.component.encoder.v1.GetPositionResponse = function(o) {
|
|
26517
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26518
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPositionResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPositionResponse.displayName = "proto.viam.component.encoder.v1.GetPositionResponse"), proto.viam.component.encoder.v1.ResetPositionRequest = function(o) {
|
|
26519
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26520
|
+
}, s.inherits(proto.viam.component.encoder.v1.ResetPositionRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.ResetPositionRequest.displayName = "proto.viam.component.encoder.v1.ResetPositionRequest"), proto.viam.component.encoder.v1.ResetPositionResponse = function(o) {
|
|
26521
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26522
|
+
}, s.inherits(proto.viam.component.encoder.v1.ResetPositionResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.ResetPositionResponse.displayName = "proto.viam.component.encoder.v1.ResetPositionResponse"), proto.viam.component.encoder.v1.GetPropertiesRequest = function(o) {
|
|
26523
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26524
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPropertiesRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPropertiesRequest.displayName = "proto.viam.component.encoder.v1.GetPropertiesRequest"), proto.viam.component.encoder.v1.GetPropertiesResponse = function(o) {
|
|
26525
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26526
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPropertiesResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPropertiesResponse.displayName = "proto.viam.component.encoder.v1.GetPropertiesResponse"), e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPositionRequest.prototype.toObject = function(o) {
|
|
26527
|
+
return proto.viam.component.encoder.v1.GetPositionRequest.toObject(o, this);
|
|
26528
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.toObject = function(o, r) {
|
|
26529
|
+
var i, l = {
|
|
26530
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
26531
|
+
positionType: e.Message.getFieldWithDefault(r, 2, 0),
|
|
26532
|
+
extra: (i = r.getExtra()) && p.Struct.toObject(o, i)
|
|
26533
|
+
};
|
|
26534
|
+
return o && (l.$jspbMessageInstance = r), l;
|
|
26535
|
+
}), proto.viam.component.encoder.v1.GetPositionRequest.deserializeBinary = function(o) {
|
|
26536
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPositionRequest();
|
|
26537
|
+
return proto.viam.component.encoder.v1.GetPositionRequest.deserializeBinaryFromReader(i, r);
|
|
26538
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.deserializeBinaryFromReader = function(o, r) {
|
|
26539
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26540
|
+
var i = r.getFieldNumber();
|
|
26541
|
+
switch (i) {
|
|
26542
|
+
case 1:
|
|
26543
|
+
var l = (
|
|
26544
|
+
/** @type {string} */
|
|
26545
|
+
r.readString()
|
|
26546
|
+
);
|
|
26547
|
+
o.setName(l);
|
|
26548
|
+
break;
|
|
26549
|
+
case 2:
|
|
26550
|
+
var l = (
|
|
26551
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26552
|
+
r.readEnum()
|
|
26553
|
+
);
|
|
26554
|
+
o.setPositionType(l);
|
|
26555
|
+
break;
|
|
26556
|
+
case 99:
|
|
26557
|
+
var l = new p.Struct();
|
|
26558
|
+
r.readMessage(l, p.Struct.deserializeBinaryFromReader), o.setExtra(l);
|
|
26559
|
+
break;
|
|
26560
|
+
default:
|
|
26561
|
+
r.skipField();
|
|
26562
|
+
break;
|
|
26563
|
+
}
|
|
26564
|
+
}
|
|
26565
|
+
return o;
|
|
26566
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.serializeBinary = function() {
|
|
26567
|
+
var o = new e.BinaryWriter();
|
|
26568
|
+
return proto.viam.component.encoder.v1.GetPositionRequest.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26569
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.serializeBinaryToWriter = function(o, r) {
|
|
26570
|
+
var i = void 0;
|
|
26571
|
+
i = o.getName(), i.length > 0 && r.writeString(
|
|
26572
|
+
1,
|
|
26573
|
+
i
|
|
26574
|
+
), i = /** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26575
|
+
e.Message.getField(o, 2), i != null && r.writeEnum(
|
|
26576
|
+
2,
|
|
26577
|
+
i
|
|
26578
|
+
), i = o.getExtra(), i != null && r.writeMessage(
|
|
26579
|
+
99,
|
|
26580
|
+
i,
|
|
26581
|
+
p.Struct.serializeBinaryToWriter
|
|
26582
|
+
);
|
|
26583
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.getName = function() {
|
|
26584
|
+
return (
|
|
26585
|
+
/** @type {string} */
|
|
26586
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
26587
|
+
);
|
|
26588
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.setName = function(o) {
|
|
26589
|
+
return e.Message.setProto3StringField(this, 1, o);
|
|
26590
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.getPositionType = function() {
|
|
26591
|
+
return (
|
|
26592
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26593
|
+
e.Message.getFieldWithDefault(this, 2, 0)
|
|
26594
|
+
);
|
|
26595
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.setPositionType = function(o) {
|
|
26596
|
+
return e.Message.setField(this, 2, o);
|
|
26597
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.clearPositionType = function() {
|
|
26598
|
+
return e.Message.setField(this, 2, void 0);
|
|
26599
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.hasPositionType = function() {
|
|
26600
|
+
return e.Message.getField(this, 2) != null;
|
|
26601
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.getExtra = function() {
|
|
26602
|
+
return (
|
|
26603
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
26604
|
+
e.Message.getWrapperField(this, p.Struct, 99)
|
|
26605
|
+
);
|
|
26606
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.setExtra = function(o) {
|
|
26607
|
+
return e.Message.setWrapperField(this, 99, o);
|
|
26608
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.clearExtra = function() {
|
|
26609
|
+
return this.setExtra(void 0);
|
|
26610
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.hasExtra = function() {
|
|
26611
|
+
return e.Message.getField(this, 99) != null;
|
|
26612
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPositionResponse.prototype.toObject = function(o) {
|
|
26613
|
+
return proto.viam.component.encoder.v1.GetPositionResponse.toObject(o, this);
|
|
26614
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.toObject = function(o, r) {
|
|
26615
|
+
var i = {
|
|
26616
|
+
value: e.Message.getFloatingPointFieldWithDefault(r, 1, 0),
|
|
26617
|
+
positionType: e.Message.getFieldWithDefault(r, 2, 0)
|
|
26618
|
+
};
|
|
26619
|
+
return o && (i.$jspbMessageInstance = r), i;
|
|
26620
|
+
}), proto.viam.component.encoder.v1.GetPositionResponse.deserializeBinary = function(o) {
|
|
26621
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPositionResponse();
|
|
26622
|
+
return proto.viam.component.encoder.v1.GetPositionResponse.deserializeBinaryFromReader(i, r);
|
|
26623
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.deserializeBinaryFromReader = function(o, r) {
|
|
26624
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26625
|
+
var i = r.getFieldNumber();
|
|
26626
|
+
switch (i) {
|
|
26627
|
+
case 1:
|
|
26628
|
+
var l = (
|
|
26629
|
+
/** @type {number} */
|
|
26630
|
+
r.readFloat()
|
|
26631
|
+
);
|
|
26632
|
+
o.setValue(l);
|
|
26633
|
+
break;
|
|
26634
|
+
case 2:
|
|
26635
|
+
var l = (
|
|
26636
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26637
|
+
r.readEnum()
|
|
26638
|
+
);
|
|
26639
|
+
o.setPositionType(l);
|
|
26640
|
+
break;
|
|
26641
|
+
default:
|
|
26642
|
+
r.skipField();
|
|
26643
|
+
break;
|
|
26644
|
+
}
|
|
26645
|
+
}
|
|
26646
|
+
return o;
|
|
26647
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.serializeBinary = function() {
|
|
26648
|
+
var o = new e.BinaryWriter();
|
|
26649
|
+
return proto.viam.component.encoder.v1.GetPositionResponse.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26650
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.serializeBinaryToWriter = function(o, r) {
|
|
26651
|
+
var i = void 0;
|
|
26652
|
+
i = o.getValue(), i !== 0 && r.writeFloat(
|
|
26653
|
+
1,
|
|
26654
|
+
i
|
|
26655
|
+
), i = o.getPositionType(), i !== 0 && r.writeEnum(
|
|
26656
|
+
2,
|
|
26657
|
+
i
|
|
26658
|
+
);
|
|
26659
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.getValue = function() {
|
|
26660
|
+
return (
|
|
26661
|
+
/** @type {number} */
|
|
26662
|
+
e.Message.getFloatingPointFieldWithDefault(this, 1, 0)
|
|
26663
|
+
);
|
|
26664
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.setValue = function(o) {
|
|
26665
|
+
return e.Message.setProto3FloatField(this, 1, o);
|
|
26666
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.getPositionType = function() {
|
|
26667
|
+
return (
|
|
26668
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26669
|
+
e.Message.getFieldWithDefault(this, 2, 0)
|
|
26670
|
+
);
|
|
26671
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.setPositionType = function(o) {
|
|
26672
|
+
return e.Message.setProto3EnumField(this, 2, o);
|
|
26673
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.ResetPositionRequest.prototype.toObject = function(o) {
|
|
26674
|
+
return proto.viam.component.encoder.v1.ResetPositionRequest.toObject(o, this);
|
|
26675
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.toObject = function(o, r) {
|
|
26676
|
+
var i, l = {
|
|
26677
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
26678
|
+
extra: (i = r.getExtra()) && p.Struct.toObject(o, i)
|
|
26679
|
+
};
|
|
26680
|
+
return o && (l.$jspbMessageInstance = r), l;
|
|
26681
|
+
}), proto.viam.component.encoder.v1.ResetPositionRequest.deserializeBinary = function(o) {
|
|
26682
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.ResetPositionRequest();
|
|
26683
|
+
return proto.viam.component.encoder.v1.ResetPositionRequest.deserializeBinaryFromReader(i, r);
|
|
26684
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.deserializeBinaryFromReader = function(o, r) {
|
|
26685
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26686
|
+
var i = r.getFieldNumber();
|
|
26687
|
+
switch (i) {
|
|
26688
|
+
case 1:
|
|
26689
|
+
var l = (
|
|
26690
|
+
/** @type {string} */
|
|
26691
|
+
r.readString()
|
|
26692
|
+
);
|
|
26693
|
+
o.setName(l);
|
|
26694
|
+
break;
|
|
26695
|
+
case 99:
|
|
26696
|
+
var l = new p.Struct();
|
|
26697
|
+
r.readMessage(l, p.Struct.deserializeBinaryFromReader), o.setExtra(l);
|
|
26698
|
+
break;
|
|
26699
|
+
default:
|
|
26700
|
+
r.skipField();
|
|
26701
|
+
break;
|
|
26702
|
+
}
|
|
26703
|
+
}
|
|
26704
|
+
return o;
|
|
26705
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.serializeBinary = function() {
|
|
26706
|
+
var o = new e.BinaryWriter();
|
|
26707
|
+
return proto.viam.component.encoder.v1.ResetPositionRequest.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26708
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.serializeBinaryToWriter = function(o, r) {
|
|
26709
|
+
var i = void 0;
|
|
26710
|
+
i = o.getName(), i.length > 0 && r.writeString(
|
|
26711
|
+
1,
|
|
26712
|
+
i
|
|
26713
|
+
), i = o.getExtra(), i != null && r.writeMessage(
|
|
26714
|
+
99,
|
|
26715
|
+
i,
|
|
26716
|
+
p.Struct.serializeBinaryToWriter
|
|
26717
|
+
);
|
|
26718
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.getName = function() {
|
|
26719
|
+
return (
|
|
26720
|
+
/** @type {string} */
|
|
26721
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
26722
|
+
);
|
|
26723
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.setName = function(o) {
|
|
26724
|
+
return e.Message.setProto3StringField(this, 1, o);
|
|
26725
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.getExtra = function() {
|
|
26726
|
+
return (
|
|
26727
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
26728
|
+
e.Message.getWrapperField(this, p.Struct, 99)
|
|
26729
|
+
);
|
|
26730
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.setExtra = function(o) {
|
|
26731
|
+
return e.Message.setWrapperField(this, 99, o);
|
|
26732
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.clearExtra = function() {
|
|
26733
|
+
return this.setExtra(void 0);
|
|
26734
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.hasExtra = function() {
|
|
26735
|
+
return e.Message.getField(this, 99) != null;
|
|
26736
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.ResetPositionResponse.prototype.toObject = function(o) {
|
|
26737
|
+
return proto.viam.component.encoder.v1.ResetPositionResponse.toObject(o, this);
|
|
26738
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.toObject = function(o, r) {
|
|
26739
|
+
var i = {};
|
|
26740
|
+
return o && (i.$jspbMessageInstance = r), i;
|
|
26741
|
+
}), proto.viam.component.encoder.v1.ResetPositionResponse.deserializeBinary = function(o) {
|
|
26742
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.ResetPositionResponse();
|
|
26743
|
+
return proto.viam.component.encoder.v1.ResetPositionResponse.deserializeBinaryFromReader(i, r);
|
|
26744
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.deserializeBinaryFromReader = function(o, r) {
|
|
26745
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26746
|
+
var i = r.getFieldNumber();
|
|
26747
|
+
switch (i) {
|
|
26748
|
+
default:
|
|
26749
|
+
r.skipField();
|
|
26750
|
+
break;
|
|
26751
|
+
}
|
|
26752
|
+
}
|
|
26753
|
+
return o;
|
|
26754
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.prototype.serializeBinary = function() {
|
|
26755
|
+
var o = new e.BinaryWriter();
|
|
26756
|
+
return proto.viam.component.encoder.v1.ResetPositionResponse.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26757
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.serializeBinaryToWriter = function(o, r) {
|
|
26758
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.toObject = function(o) {
|
|
26759
|
+
return proto.viam.component.encoder.v1.GetPropertiesRequest.toObject(o, this);
|
|
26760
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.toObject = function(o, r) {
|
|
26761
|
+
var i, l = {
|
|
26762
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
26763
|
+
extra: (i = r.getExtra()) && p.Struct.toObject(o, i)
|
|
26764
|
+
};
|
|
26765
|
+
return o && (l.$jspbMessageInstance = r), l;
|
|
26766
|
+
}), proto.viam.component.encoder.v1.GetPropertiesRequest.deserializeBinary = function(o) {
|
|
26767
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPropertiesRequest();
|
|
26768
|
+
return proto.viam.component.encoder.v1.GetPropertiesRequest.deserializeBinaryFromReader(i, r);
|
|
26769
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.deserializeBinaryFromReader = function(o, r) {
|
|
26770
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26771
|
+
var i = r.getFieldNumber();
|
|
26772
|
+
switch (i) {
|
|
26773
|
+
case 1:
|
|
26774
|
+
var l = (
|
|
26775
|
+
/** @type {string} */
|
|
26776
|
+
r.readString()
|
|
26777
|
+
);
|
|
26778
|
+
o.setName(l);
|
|
26779
|
+
break;
|
|
26780
|
+
case 99:
|
|
26781
|
+
var l = new p.Struct();
|
|
26782
|
+
r.readMessage(l, p.Struct.deserializeBinaryFromReader), o.setExtra(l);
|
|
26783
|
+
break;
|
|
26784
|
+
default:
|
|
26785
|
+
r.skipField();
|
|
26786
|
+
break;
|
|
26787
|
+
}
|
|
26788
|
+
}
|
|
26789
|
+
return o;
|
|
26790
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.serializeBinary = function() {
|
|
26791
|
+
var o = new e.BinaryWriter();
|
|
26792
|
+
return proto.viam.component.encoder.v1.GetPropertiesRequest.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26793
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.serializeBinaryToWriter = function(o, r) {
|
|
26794
|
+
var i = void 0;
|
|
26795
|
+
i = o.getName(), i.length > 0 && r.writeString(
|
|
26796
|
+
1,
|
|
26797
|
+
i
|
|
26798
|
+
), i = o.getExtra(), i != null && r.writeMessage(
|
|
26799
|
+
99,
|
|
26800
|
+
i,
|
|
26801
|
+
p.Struct.serializeBinaryToWriter
|
|
26802
|
+
);
|
|
26803
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.getName = function() {
|
|
26804
|
+
return (
|
|
26805
|
+
/** @type {string} */
|
|
26806
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
26807
|
+
);
|
|
26808
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.setName = function(o) {
|
|
26809
|
+
return e.Message.setProto3StringField(this, 1, o);
|
|
26810
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.getExtra = function() {
|
|
26811
|
+
return (
|
|
26812
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
26813
|
+
e.Message.getWrapperField(this, p.Struct, 99)
|
|
26814
|
+
);
|
|
26815
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.setExtra = function(o) {
|
|
26816
|
+
return e.Message.setWrapperField(this, 99, o);
|
|
26817
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.clearExtra = function() {
|
|
26818
|
+
return this.setExtra(void 0);
|
|
26819
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.hasExtra = function() {
|
|
26820
|
+
return e.Message.getField(this, 99) != null;
|
|
26821
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.toObject = function(o) {
|
|
26822
|
+
return proto.viam.component.encoder.v1.GetPropertiesResponse.toObject(o, this);
|
|
26823
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.toObject = function(o, r) {
|
|
26824
|
+
var i = {
|
|
26825
|
+
ticksCountSupported: e.Message.getBooleanFieldWithDefault(r, 1, !1),
|
|
26826
|
+
angleDegreesSupported: e.Message.getBooleanFieldWithDefault(r, 2, !1)
|
|
26827
|
+
};
|
|
26828
|
+
return o && (i.$jspbMessageInstance = r), i;
|
|
26829
|
+
}), proto.viam.component.encoder.v1.GetPropertiesResponse.deserializeBinary = function(o) {
|
|
26830
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPropertiesResponse();
|
|
26831
|
+
return proto.viam.component.encoder.v1.GetPropertiesResponse.deserializeBinaryFromReader(i, r);
|
|
26832
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.deserializeBinaryFromReader = function(o, r) {
|
|
26833
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26834
|
+
var i = r.getFieldNumber();
|
|
26835
|
+
switch (i) {
|
|
26836
|
+
case 1:
|
|
26837
|
+
var l = (
|
|
26838
|
+
/** @type {boolean} */
|
|
26839
|
+
r.readBool()
|
|
26840
|
+
);
|
|
26841
|
+
o.setTicksCountSupported(l);
|
|
26842
|
+
break;
|
|
26843
|
+
case 2:
|
|
26844
|
+
var l = (
|
|
26845
|
+
/** @type {boolean} */
|
|
26846
|
+
r.readBool()
|
|
26847
|
+
);
|
|
26848
|
+
o.setAngleDegreesSupported(l);
|
|
26849
|
+
break;
|
|
26850
|
+
default:
|
|
26851
|
+
r.skipField();
|
|
26852
|
+
break;
|
|
26853
|
+
}
|
|
26854
|
+
}
|
|
26855
|
+
return o;
|
|
26856
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.serializeBinary = function() {
|
|
26857
|
+
var o = new e.BinaryWriter();
|
|
26858
|
+
return proto.viam.component.encoder.v1.GetPropertiesResponse.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26859
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.serializeBinaryToWriter = function(o, r) {
|
|
26860
|
+
var i = void 0;
|
|
26861
|
+
i = o.getTicksCountSupported(), i && r.writeBool(
|
|
26862
|
+
1,
|
|
26863
|
+
i
|
|
26864
|
+
), i = o.getAngleDegreesSupported(), i && r.writeBool(
|
|
26865
|
+
2,
|
|
26866
|
+
i
|
|
26867
|
+
);
|
|
26868
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.getTicksCountSupported = function() {
|
|
26869
|
+
return (
|
|
26870
|
+
/** @type {boolean} */
|
|
26871
|
+
e.Message.getBooleanFieldWithDefault(this, 1, !1)
|
|
26872
|
+
);
|
|
26873
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.setTicksCountSupported = function(o) {
|
|
26874
|
+
return e.Message.setProto3BooleanField(this, 1, o);
|
|
26875
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.getAngleDegreesSupported = function() {
|
|
26876
|
+
return (
|
|
26877
|
+
/** @type {boolean} */
|
|
26878
|
+
e.Message.getBooleanFieldWithDefault(this, 2, !1)
|
|
26879
|
+
);
|
|
26880
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.setAngleDegreesSupported = function(o) {
|
|
26881
|
+
return e.Message.setProto3BooleanField(this, 2, o);
|
|
26882
|
+
}, proto.viam.component.encoder.v1.PositionType = {
|
|
26883
|
+
POSITION_TYPE_UNSPECIFIED: 0,
|
|
26884
|
+
POSITION_TYPE_TICKS_COUNT: 1,
|
|
26885
|
+
POSITION_TYPE_ANGLE_DEGREES: 2
|
|
26886
|
+
}, s.object.extend(t, proto.viam.component.encoder.v1);
|
|
26887
|
+
})(encoder_pb);
|
|
26888
|
+
var component_encoder_v1_encoder_pb = encoder_pb, common_v1_common_pb$f = common_pb, grpc$g = grpcWebClient_umdExports.grpc, EncoderService = function() {
|
|
26889
|
+
function t() {
|
|
26890
|
+
}
|
|
26891
|
+
return t.serviceName = "viam.component.encoder.v1.EncoderService", t;
|
|
26892
|
+
}();
|
|
26893
|
+
EncoderService.GetPosition = {
|
|
26894
|
+
methodName: "GetPosition",
|
|
26895
|
+
service: EncoderService,
|
|
26896
|
+
requestStream: !1,
|
|
26897
|
+
responseStream: !1,
|
|
26898
|
+
requestType: component_encoder_v1_encoder_pb.GetPositionRequest,
|
|
26899
|
+
responseType: component_encoder_v1_encoder_pb.GetPositionResponse
|
|
26900
|
+
};
|
|
26901
|
+
EncoderService.ResetPosition = {
|
|
26902
|
+
methodName: "ResetPosition",
|
|
26903
|
+
service: EncoderService,
|
|
26904
|
+
requestStream: !1,
|
|
26905
|
+
responseStream: !1,
|
|
26906
|
+
requestType: component_encoder_v1_encoder_pb.ResetPositionRequest,
|
|
26907
|
+
responseType: component_encoder_v1_encoder_pb.ResetPositionResponse
|
|
26908
|
+
};
|
|
26909
|
+
EncoderService.GetProperties = {
|
|
26910
|
+
methodName: "GetProperties",
|
|
26911
|
+
service: EncoderService,
|
|
26912
|
+
requestStream: !1,
|
|
26913
|
+
responseStream: !1,
|
|
26914
|
+
requestType: component_encoder_v1_encoder_pb.GetPropertiesRequest,
|
|
26915
|
+
responseType: component_encoder_v1_encoder_pb.GetPropertiesResponse
|
|
26916
|
+
};
|
|
26917
|
+
EncoderService.DoCommand = {
|
|
26918
|
+
methodName: "DoCommand",
|
|
26919
|
+
service: EncoderService,
|
|
26920
|
+
requestStream: !1,
|
|
26921
|
+
responseStream: !1,
|
|
26922
|
+
requestType: common_v1_common_pb$f.DoCommandRequest,
|
|
26923
|
+
responseType: common_v1_common_pb$f.DoCommandResponse
|
|
26924
|
+
};
|
|
26925
|
+
function EncoderServiceClient(t, e) {
|
|
26926
|
+
this.serviceHost = t, this.options = e || {};
|
|
26927
|
+
}
|
|
26928
|
+
EncoderServiceClient.prototype.getPosition = function t(e, s, n) {
|
|
26929
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26930
|
+
var u = grpc$g.unary(EncoderService.GetPosition, {
|
|
26931
|
+
request: e,
|
|
26932
|
+
host: this.serviceHost,
|
|
26933
|
+
metadata: s,
|
|
26934
|
+
transport: this.options.transport,
|
|
26935
|
+
debug: this.options.debug,
|
|
26936
|
+
onEnd: function(g) {
|
|
26937
|
+
if (n)
|
|
26938
|
+
if (g.status !== grpc$g.Code.OK) {
|
|
26939
|
+
var p = new Error(g.statusMessage);
|
|
26940
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26941
|
+
} else
|
|
26942
|
+
n(null, g.message);
|
|
26943
|
+
}
|
|
26944
|
+
});
|
|
26945
|
+
return {
|
|
26946
|
+
cancel: function() {
|
|
26947
|
+
n = null, u.close();
|
|
26948
|
+
}
|
|
26949
|
+
};
|
|
26950
|
+
};
|
|
26951
|
+
EncoderServiceClient.prototype.resetPosition = function t(e, s, n) {
|
|
26952
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26953
|
+
var u = grpc$g.unary(EncoderService.ResetPosition, {
|
|
26954
|
+
request: e,
|
|
26955
|
+
host: this.serviceHost,
|
|
26956
|
+
metadata: s,
|
|
26957
|
+
transport: this.options.transport,
|
|
26958
|
+
debug: this.options.debug,
|
|
26959
|
+
onEnd: function(g) {
|
|
26960
|
+
if (n)
|
|
26961
|
+
if (g.status !== grpc$g.Code.OK) {
|
|
26962
|
+
var p = new Error(g.statusMessage);
|
|
26963
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26964
|
+
} else
|
|
26965
|
+
n(null, g.message);
|
|
26966
|
+
}
|
|
26967
|
+
});
|
|
26968
|
+
return {
|
|
26969
|
+
cancel: function() {
|
|
26970
|
+
n = null, u.close();
|
|
26971
|
+
}
|
|
26972
|
+
};
|
|
26973
|
+
};
|
|
26974
|
+
EncoderServiceClient.prototype.getProperties = function t(e, s, n) {
|
|
26975
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26976
|
+
var u = grpc$g.unary(EncoderService.GetProperties, {
|
|
26977
|
+
request: e,
|
|
26978
|
+
host: this.serviceHost,
|
|
26979
|
+
metadata: s,
|
|
26980
|
+
transport: this.options.transport,
|
|
26981
|
+
debug: this.options.debug,
|
|
26982
|
+
onEnd: function(g) {
|
|
26983
|
+
if (n)
|
|
26984
|
+
if (g.status !== grpc$g.Code.OK) {
|
|
26985
|
+
var p = new Error(g.statusMessage);
|
|
26986
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26987
|
+
} else
|
|
26988
|
+
n(null, g.message);
|
|
26989
|
+
}
|
|
26990
|
+
});
|
|
26991
|
+
return {
|
|
26992
|
+
cancel: function() {
|
|
26993
|
+
n = null, u.close();
|
|
26994
|
+
}
|
|
26995
|
+
};
|
|
26996
|
+
};
|
|
26997
|
+
EncoderServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
26998
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26999
|
+
var u = grpc$g.unary(EncoderService.DoCommand, {
|
|
26485
27000
|
request: e,
|
|
26486
27001
|
host: this.serviceHost,
|
|
26487
27002
|
metadata: s,
|
|
@@ -26502,7 +27017,7 @@ BoardServiceClient.prototype.setPowerMode = function t(e, s, n) {
|
|
|
26502
27017
|
}
|
|
26503
27018
|
};
|
|
26504
27019
|
};
|
|
26505
|
-
var
|
|
27020
|
+
var EncoderServiceClient_1 = EncoderServiceClient, gantry_pb = {};
|
|
26506
27021
|
(function(t) {
|
|
26507
27022
|
var e = googleProtobuf, s = e, n = function() {
|
|
26508
27023
|
return this || window || n || self || Function("return this")();
|
|
@@ -38898,6 +39413,7 @@ class RobotClient {
|
|
|
38898
39413
|
armServiceClient;
|
|
38899
39414
|
baseServiceClient;
|
|
38900
39415
|
boardServiceClient;
|
|
39416
|
+
encoderServiceClient;
|
|
38901
39417
|
gantryServiceClient;
|
|
38902
39418
|
genericServiceClient;
|
|
38903
39419
|
gripperServiceClient;
|
|
@@ -38944,6 +39460,11 @@ class RobotClient {
|
|
|
38944
39460
|
throw new Error(RobotClient.notConnectedYetStr);
|
|
38945
39461
|
return this.boardServiceClient;
|
|
38946
39462
|
}
|
|
39463
|
+
get encoderService() {
|
|
39464
|
+
if (!this.encoderServiceClient)
|
|
39465
|
+
throw new Error(RobotClient.notConnectedYetStr);
|
|
39466
|
+
return this.encoderServiceClient;
|
|
39467
|
+
}
|
|
38947
39468
|
get gantryService() {
|
|
38948
39469
|
if (!this.gantryServiceClient)
|
|
38949
39470
|
throw new Error(RobotClient.notConnectedYetStr);
|
|
@@ -39065,6 +39586,9 @@ class RobotClient {
|
|
|
39065
39586
|
), this.boardServiceClient = new BoardServiceClient_1(
|
|
39066
39587
|
this.serviceHost,
|
|
39067
39588
|
g
|
|
39589
|
+
), this.encoderServiceClient = new EncoderServiceClient_1(
|
|
39590
|
+
this.serviceHost,
|
|
39591
|
+
g
|
|
39068
39592
|
), this.gantryServiceClient = new GantryServiceClient_1(
|
|
39069
39593
|
this.serviceHost,
|
|
39070
39594
|
g
|
|
@@ -40692,6 +41216,32 @@ class CameraClient {
|
|
|
40692
41216
|
return s.setName(this.name), this.options.requestLogger?.(s), (await promisify(e.getProperties.bind(e), s)).toObject();
|
|
40693
41217
|
}
|
|
40694
41218
|
}
|
|
41219
|
+
var PositionType = /* @__PURE__ */ ((t) => (t[t.POSITION_TYPE_UNSPECIFIED = 0] = "POSITION_TYPE_UNSPECIFIED", t[t.POSITION_TYPE_TICKS_COUNT = 1] = "POSITION_TYPE_TICKS_COUNT", t[t.POSITION_TYPE_ANGLE_DEGREES = 2] = "POSITION_TYPE_ANGLE_DEGREES", t))(PositionType || {});
|
|
41220
|
+
class EncoderClient {
|
|
41221
|
+
client;
|
|
41222
|
+
name;
|
|
41223
|
+
options;
|
|
41224
|
+
constructor(e, s, n = {}) {
|
|
41225
|
+
this.client = e.createServiceClient(EncoderServiceClient_1), this.name = s, this.options = n;
|
|
41226
|
+
}
|
|
41227
|
+
get encoderService() {
|
|
41228
|
+
return this.client;
|
|
41229
|
+
}
|
|
41230
|
+
async resetPosition(e = {}) {
|
|
41231
|
+
const s = this.encoderService, n = new encoder_pb.ResetPositionRequest();
|
|
41232
|
+
n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(s.resetPosition.bind(s), n);
|
|
41233
|
+
}
|
|
41234
|
+
async getProperties(e = {}) {
|
|
41235
|
+
const s = this.encoderService, n = new encoder_pb.GetPropertiesRequest();
|
|
41236
|
+
return n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), (await promisify(s.getProperties.bind(s), n)).toObject();
|
|
41237
|
+
}
|
|
41238
|
+
async getPosition(e = PositionType.POSITION_TYPE_UNSPECIFIED, s = {}) {
|
|
41239
|
+
const n = this.encoderService, u = new encoder_pb.GetPositionRequest();
|
|
41240
|
+
u.setName(this.name), u.setPositionType(e), u.setExtra(struct_pb.Struct.fromJavaScript(s)), this.options.requestLogger?.(u);
|
|
41241
|
+
const g = await promisify(n.getPosition.bind(n), u);
|
|
41242
|
+
return [g.getValue(), g.getPositionType()];
|
|
41243
|
+
}
|
|
41244
|
+
}
|
|
40695
41245
|
class MotorClient {
|
|
40696
41246
|
client;
|
|
40697
41247
|
name;
|
|
@@ -41494,16 +42044,18 @@ class MotionClient {
|
|
|
41494
42044
|
return r.toObject();
|
|
41495
42045
|
}
|
|
41496
42046
|
}
|
|
41497
|
-
const version = "0.0.
|
|
42047
|
+
const version = "0.0.43";
|
|
41498
42048
|
export {
|
|
41499
42049
|
ArmClient,
|
|
41500
42050
|
BaseClient,
|
|
41501
42051
|
BoardClient,
|
|
41502
42052
|
CameraClient,
|
|
41503
42053
|
RobotClient as Client,
|
|
42054
|
+
EncoderClient,
|
|
41504
42055
|
MotionClient,
|
|
41505
42056
|
MotorClient,
|
|
41506
42057
|
MovementSensorClient,
|
|
42058
|
+
PositionType,
|
|
41507
42059
|
RobotClient,
|
|
41508
42060
|
SensorClient,
|
|
41509
42061
|
StreamClient,
|
|
@@ -41513,6 +42065,7 @@ export {
|
|
|
41513
42065
|
camera_pb as cameraApi,
|
|
41514
42066
|
common_pb as commonApi,
|
|
41515
42067
|
createRobotClient,
|
|
42068
|
+
encoder_pb as encoderApi,
|
|
41516
42069
|
gantry_pb as gantryApi,
|
|
41517
42070
|
generic_pb as genericApi,
|
|
41518
42071
|
gripper_pb as gripperApi,
|