@viamrobotics/sdk 0.2.1-next.0 → 0.2.1-rc.0
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.
|
@@ -296,3 +296,53 @@ export namespace IsMovingResponse {
|
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
export class GetPropertiesRequest extends jspb.Message {
|
|
300
|
+
getName(): string;
|
|
301
|
+
setName(value: string): void;
|
|
302
|
+
|
|
303
|
+
hasExtra(): boolean;
|
|
304
|
+
clearExtra(): void;
|
|
305
|
+
getExtra(): google_protobuf_struct_pb.Struct | undefined;
|
|
306
|
+
setExtra(value?: google_protobuf_struct_pb.Struct): void;
|
|
307
|
+
|
|
308
|
+
serializeBinary(): Uint8Array;
|
|
309
|
+
toObject(includeInstance?: boolean): GetPropertiesRequest.AsObject;
|
|
310
|
+
static toObject(includeInstance: boolean, msg: GetPropertiesRequest): GetPropertiesRequest.AsObject;
|
|
311
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
312
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
313
|
+
static serializeBinaryToWriter(message: GetPropertiesRequest, writer: jspb.BinaryWriter): void;
|
|
314
|
+
static deserializeBinary(bytes: Uint8Array): GetPropertiesRequest;
|
|
315
|
+
static deserializeBinaryFromReader(message: GetPropertiesRequest, reader: jspb.BinaryReader): GetPropertiesRequest;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export namespace GetPropertiesRequest {
|
|
319
|
+
export type AsObject = {
|
|
320
|
+
name: string,
|
|
321
|
+
extra?: google_protobuf_struct_pb.Struct.AsObject,
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export class GetPropertiesResponse extends jspb.Message {
|
|
326
|
+
getWidthMeters(): number;
|
|
327
|
+
setWidthMeters(value: number): void;
|
|
328
|
+
|
|
329
|
+
getTurningRadiusMeters(): number;
|
|
330
|
+
setTurningRadiusMeters(value: number): void;
|
|
331
|
+
|
|
332
|
+
serializeBinary(): Uint8Array;
|
|
333
|
+
toObject(includeInstance?: boolean): GetPropertiesResponse.AsObject;
|
|
334
|
+
static toObject(includeInstance: boolean, msg: GetPropertiesResponse): GetPropertiesResponse.AsObject;
|
|
335
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
336
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
337
|
+
static serializeBinaryToWriter(message: GetPropertiesResponse, writer: jspb.BinaryWriter): void;
|
|
338
|
+
static deserializeBinary(bytes: Uint8Array): GetPropertiesResponse;
|
|
339
|
+
static deserializeBinaryFromReader(message: GetPropertiesResponse, reader: jspb.BinaryReader): GetPropertiesResponse;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export namespace GetPropertiesResponse {
|
|
343
|
+
export type AsObject = {
|
|
344
|
+
widthMeters: number,
|
|
345
|
+
turningRadiusMeters: number,
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
@@ -77,6 +77,15 @@ type BaseServiceGetGeometries = {
|
|
|
77
77
|
readonly responseType: typeof common_v1_common_pb.GetGeometriesResponse;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
+
type BaseServiceGetProperties = {
|
|
81
|
+
readonly methodName: string;
|
|
82
|
+
readonly service: typeof BaseService;
|
|
83
|
+
readonly requestStream: false;
|
|
84
|
+
readonly responseStream: false;
|
|
85
|
+
readonly requestType: typeof component_base_v1_base_pb.GetPropertiesRequest;
|
|
86
|
+
readonly responseType: typeof component_base_v1_base_pb.GetPropertiesResponse;
|
|
87
|
+
};
|
|
88
|
+
|
|
80
89
|
export class BaseService {
|
|
81
90
|
static readonly serviceName: string;
|
|
82
91
|
static readonly MoveStraight: BaseServiceMoveStraight;
|
|
@@ -87,6 +96,7 @@ export class BaseService {
|
|
|
87
96
|
static readonly IsMoving: BaseServiceIsMoving;
|
|
88
97
|
static readonly DoCommand: BaseServiceDoCommand;
|
|
89
98
|
static readonly GetGeometries: BaseServiceGetGeometries;
|
|
99
|
+
static readonly GetProperties: BaseServiceGetProperties;
|
|
90
100
|
}
|
|
91
101
|
|
|
92
102
|
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
|
|
@@ -193,5 +203,14 @@ export class BaseServiceClient {
|
|
|
193
203
|
requestMessage: common_v1_common_pb.GetGeometriesRequest,
|
|
194
204
|
callback: (error: ServiceError|null, responseMessage: common_v1_common_pb.GetGeometriesResponse|null) => void
|
|
195
205
|
): UnaryResponse;
|
|
206
|
+
getProperties(
|
|
207
|
+
requestMessage: component_base_v1_base_pb.GetPropertiesRequest,
|
|
208
|
+
metadata: grpc.Metadata,
|
|
209
|
+
callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.GetPropertiesResponse|null) => void
|
|
210
|
+
): UnaryResponse;
|
|
211
|
+
getProperties(
|
|
212
|
+
requestMessage: component_base_v1_base_pb.GetPropertiesRequest,
|
|
213
|
+
callback: (error: ServiceError|null, responseMessage: component_base_v1_base_pb.GetPropertiesResponse|null) => void
|
|
214
|
+
): UnaryResponse;
|
|
196
215
|
}
|
|
197
216
|
|
package/dist/main.es.js
CHANGED
|
@@ -13749,10 +13749,10 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
13749
13749
|
var C = c(this.buffer, this.position, this.position + 5), q = new DataView(C.buffer, C.byteOffset, C.byteLength), G = n(q);
|
|
13750
13750
|
if (!l(this.buffer, this.position, 5 + G))
|
|
13751
13751
|
return b;
|
|
13752
|
-
var
|
|
13752
|
+
var z = c(this.buffer, this.position + 5, this.position + 5 + G);
|
|
13753
13753
|
if (this.position += 5 + G, r(q))
|
|
13754
|
-
return b.push({ chunkType: u.TRAILERS, trailers: (f =
|
|
13755
|
-
b.push({ chunkType: u.MESSAGE, data:
|
|
13754
|
+
return b.push({ chunkType: u.TRAILERS, trailers: (f = z, new g.Metadata(o(f))) }), b;
|
|
13755
|
+
b.push({ chunkType: u.MESSAGE, data: z });
|
|
13756
13756
|
}
|
|
13757
13757
|
}, m;
|
|
13758
13758
|
}();
|
|
@@ -20329,22 +20329,22 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20329
20329
|
}
|
|
20330
20330
|
function y(h, O, w) {
|
|
20331
20331
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
20332
|
-
var C, q, G,
|
|
20332
|
+
var C, q, G, z = this;
|
|
20333
20333
|
return i.__generator(this, function(U) {
|
|
20334
20334
|
switch (U.label) {
|
|
20335
20335
|
case 0:
|
|
20336
20336
|
return C = "", q = function() {
|
|
20337
|
-
return i.__awaiter(
|
|
20338
|
-
var I,
|
|
20337
|
+
return i.__awaiter(z, void 0, void 0, function() {
|
|
20338
|
+
var I, x, k, S, R, _, E, F, P, T;
|
|
20339
20339
|
return i.__generator(this, function(j) {
|
|
20340
20340
|
switch (j.label) {
|
|
20341
20341
|
case 0:
|
|
20342
20342
|
return C != "" ? [3, 5] : (I = "", w.accessToken && w.accessToken !== "" ? [3, 2] : ((E = new n.AuthenticateRequest()).setEntity(w.authEntity ? w.authEntity : h.replace(/^(.*:\/\/)/, "")), (S = new n.Credentials()).setType((P = w.credentials) === null || P === void 0 ? void 0 : P.type), S.setPayload((T = w.credentials) === null || T === void 0 ? void 0 : T.payload), E.setCredentials(S), _ = new Promise(function(A, D) {
|
|
20343
|
-
|
|
20343
|
+
x = A, k = D;
|
|
20344
20344
|
}), u.grpc.invoke(l.AuthService.Authenticate, { request: E, host: w.externalAuthAddress ? w.externalAuthAddress : h, transport: O, onMessage: function(A) {
|
|
20345
20345
|
I = A.getAccessToken();
|
|
20346
20346
|
}, onEnd: function(A, D, B) {
|
|
20347
|
-
A == u.grpc.Code.OK ?
|
|
20347
|
+
A == u.grpc.Code.OK ? x(F) : k(D);
|
|
20348
20348
|
} }), [4, _]));
|
|
20349
20349
|
case 1:
|
|
20350
20350
|
return j.sent(), [3, 3];
|
|
@@ -20352,11 +20352,11 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20352
20352
|
I = w.accessToken, j.label = 3;
|
|
20353
20353
|
case 3:
|
|
20354
20354
|
return C = I, w.externalAuthAddress && w.externalAuthToEntity ? ((R = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(C)), _ = new Promise(function(A, D) {
|
|
20355
|
-
|
|
20355
|
+
x = A, k = D;
|
|
20356
20356
|
}), I = "", (E = new n.AuthenticateToRequest()).setEntity(w.externalAuthToEntity), u.grpc.invoke(l.ExternalAuthService.AuthenticateTo, { request: E, host: w.externalAuthAddress, transport: O, metadata: R, onMessage: function(A) {
|
|
20357
20357
|
I = A.getAccessToken();
|
|
20358
20358
|
}, onEnd: function(A, D, B) {
|
|
20359
|
-
A == u.grpc.Code.OK ?
|
|
20359
|
+
A == u.grpc.Code.OK ? x(R) : k(D);
|
|
20360
20360
|
} }), [4, _]) : [3, 5];
|
|
20361
20361
|
case 4:
|
|
20362
20362
|
j.sent(), C = I, j.label = 5;
|
|
@@ -20393,14 +20393,14 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20393
20393
|
}();
|
|
20394
20394
|
function b(h, O, w) {
|
|
20395
20395
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
20396
|
-
var C, q, G,
|
|
20397
|
-
return i.__generator(this, function(
|
|
20398
|
-
switch (
|
|
20396
|
+
var C, q, G, z, U, I;
|
|
20397
|
+
return i.__generator(this, function(x) {
|
|
20398
|
+
switch (x.label) {
|
|
20399
20399
|
case 0:
|
|
20400
20400
|
return C = i.__assign({}, w), [4, v(h, C)];
|
|
20401
20401
|
case 1:
|
|
20402
|
-
return q =
|
|
20403
|
-
G = k,
|
|
20402
|
+
return q = x.sent(), I = new Promise(function(k, S) {
|
|
20403
|
+
G = k, z = S;
|
|
20404
20404
|
}), u.grpc.unary(d.SignalingService.OptionalWebRTCConfig, { request: new c.OptionalWebRTCConfigRequest(), metadata: { "rpc-host": O }, host: h, transport: q, onEnd: function(k) {
|
|
20405
20405
|
var S = k.status, R = k.statusMessage, _ = k.message;
|
|
20406
20406
|
if (S === u.grpc.Code.OK && _) {
|
|
@@ -20408,10 +20408,10 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20408
20408
|
return void G(new c.WebRTCConfig());
|
|
20409
20409
|
G(U);
|
|
20410
20410
|
} else
|
|
20411
|
-
|
|
20411
|
+
z(R);
|
|
20412
20412
|
} }), [4, I];
|
|
20413
20413
|
case 2:
|
|
20414
|
-
if (
|
|
20414
|
+
if (x.sent(), !U)
|
|
20415
20415
|
throw new Error("no config");
|
|
20416
20416
|
return [2, U];
|
|
20417
20417
|
}
|
|
@@ -20444,7 +20444,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20444
20444
|
}
|
|
20445
20445
|
}
|
|
20446
20446
|
e.dialWebRTC = function(h, O, w) {
|
|
20447
|
-
var C, q, G,
|
|
20447
|
+
var C, q, G, z, U, I, x;
|
|
20448
20448
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
20449
20449
|
var k, S, R, _, E, F, P, T, j, A, D, B, W, V, Z, oe, re, ge, ae, ne, pe, ie, le, se, ce, ue, de = this;
|
|
20450
20450
|
return i.__generator(this, function(J) {
|
|
@@ -20458,7 +20458,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20458
20458
|
case 2:
|
|
20459
20459
|
_ = J.sent(), E = _.pc, F = _.dc, P = !1, J.label = 3;
|
|
20460
20460
|
case 3:
|
|
20461
|
-
return J.trys.push([3, , 10, 11]), T = w, w && (T = i.__assign({}, w), w.accessToken || (T.authEntity = (C = w?.webrtcOptions) === null || C === void 0 ? void 0 : C.signalingAuthEntity, T.authEntity || (T.externalAuthAddress ? T.authEntity = (q = w.externalAuthAddress) === null || q === void 0 ? void 0 : q.replace(/^(.*:\/\/)/, "") : T.authEntity = h.replace(/^(.*:\/\/)/, "")), T.credentials = (G = w?.webrtcOptions) === null || G === void 0 ? void 0 : G.signalingCredentials, T.accessToken = (
|
|
20461
|
+
return J.trys.push([3, , 10, 11]), T = w, w && (T = i.__assign({}, w), w.accessToken || (T.authEntity = (C = w?.webrtcOptions) === null || C === void 0 ? void 0 : C.signalingAuthEntity, T.authEntity || (T.externalAuthAddress ? T.authEntity = (q = w.externalAuthAddress) === null || q === void 0 ? void 0 : q.replace(/^(.*:\/\/)/, "") : T.authEntity = h.replace(/^(.*:\/\/)/, "")), T.credentials = (G = w?.webrtcOptions) === null || G === void 0 ? void 0 : G.signalingCredentials, T.accessToken = (z = w?.webrtcOptions) === null || z === void 0 ? void 0 : z.signalingAccessToken), T.externalAuthAddress = (U = w?.webrtcOptions) === null || U === void 0 ? void 0 : U.signalingExternalAuthAddress, T.externalAuthToEntity = (I = w?.webrtcOptions) === null || I === void 0 ? void 0 : I.signalingExternalAuthToEntity), [4, v(h, T)];
|
|
20462
20462
|
case 4:
|
|
20463
20463
|
return j = J.sent(), A = u.grpc.client(d.SignalingService.Call, { host: h, transport: j }), D = "", B = !1, W = function(L) {
|
|
20464
20464
|
if (!B) {
|
|
@@ -20549,7 +20549,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20549
20549
|
case 8:
|
|
20550
20550
|
return J.sent(), [4, ue.ready];
|
|
20551
20551
|
case 9:
|
|
20552
|
-
return J.sent(), re = !0, V(), w?.externalAuthAddress || (
|
|
20552
|
+
return J.sent(), re = !0, V(), w?.externalAuthAddress || (x = w?.credentials) === null || x === void 0 || x.type, P = !0, [2, { transportFactory: ue.transportFactory(), peerConnection: E }];
|
|
20553
20553
|
case 10:
|
|
20554
20554
|
return P || E.close(), [7];
|
|
20555
20555
|
case 11:
|
|
@@ -20653,7 +20653,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20653
20653
|
});
|
|
20654
20654
|
};
|
|
20655
20655
|
}, 655: (t, e, s) => {
|
|
20656
|
-
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => w, __asyncGenerator: () => O, __asyncValues: () => C, __await: () => h, __awaiter: () => l, __classPrivateFieldGet: () => I, __classPrivateFieldIn: () => k, __classPrivateFieldSet: () =>
|
|
20656
|
+
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => w, __asyncGenerator: () => O, __asyncValues: () => C, __await: () => h, __awaiter: () => l, __classPrivateFieldGet: () => I, __classPrivateFieldIn: () => k, __classPrivateFieldSet: () => x, __createBinding: () => d, __decorate: () => o, __exportStar: () => m, __extends: () => u, __generator: () => c, __importDefault: () => U, __importStar: () => z, __makeTemplateObject: () => q, __metadata: () => n, __param: () => r, __read: () => y, __rest: () => p, __spread: () => f, __spreadArray: () => M, __spreadArrays: () => b, __values: () => v });
|
|
20657
20657
|
var i = function(S, R) {
|
|
20658
20658
|
return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(_, E) {
|
|
20659
20659
|
_.__proto__ = E;
|
|
@@ -20934,7 +20934,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20934
20934
|
} : function(S, R) {
|
|
20935
20935
|
S.default = R;
|
|
20936
20936
|
};
|
|
20937
|
-
function
|
|
20937
|
+
function z(S) {
|
|
20938
20938
|
if (S && S.__esModule)
|
|
20939
20939
|
return S;
|
|
20940
20940
|
var R = {};
|
|
@@ -20953,7 +20953,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20953
20953
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20954
20954
|
return _ === "m" ? E : _ === "a" ? E.call(S) : E ? E.value : R.get(S);
|
|
20955
20955
|
}
|
|
20956
|
-
function
|
|
20956
|
+
function x(S, R, _, E, F) {
|
|
20957
20957
|
if (E === "m")
|
|
20958
20958
|
throw new TypeError("Private method is not writable");
|
|
20959
20959
|
if (E === "a" && !F)
|
|
@@ -23145,13 +23145,13 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23145
23145
|
for (; ; ) {
|
|
23146
23146
|
if (!m(this.buffer, this.position, 5))
|
|
23147
23147
|
return O;
|
|
23148
|
-
var
|
|
23148
|
+
var z = v(this.buffer, this.position, this.position + 5), U = new DataView(z.buffer, z.byteOffset, z.byteLength), I = d(U);
|
|
23149
23149
|
if (!m(this.buffer, this.position, 5 + I))
|
|
23150
23150
|
return O;
|
|
23151
|
-
var
|
|
23151
|
+
var x = v(this.buffer, this.position + 5, this.position + 5 + I);
|
|
23152
23152
|
if (this.position += 5 + I, c(U))
|
|
23153
|
-
return O.push({ chunkType: o.TRAILERS, trailers: (h =
|
|
23154
|
-
O.push({ chunkType: o.MESSAGE, data:
|
|
23153
|
+
return O.push({ chunkType: o.TRAILERS, trailers: (h = x, new r.Metadata(l(h))) }), O;
|
|
23154
|
+
O.push({ chunkType: o.MESSAGE, data: x });
|
|
23155
23155
|
}
|
|
23156
23156
|
}, f;
|
|
23157
23157
|
}();
|
|
@@ -24782,7 +24782,7 @@ var ArmServiceClient_1 = ArmServiceClient, base_pb = {};
|
|
|
24782
24782
|
var g = annotations_pb;
|
|
24783
24783
|
s.object.extend(proto, g);
|
|
24784
24784
|
var p = struct_pb;
|
|
24785
|
-
s.object.extend(proto, p), s.exportSymbol("proto.viam.component.base.v1.IsMovingRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.IsMovingResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.MoveStraightRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.MoveStraightResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.SetPowerRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.SetPowerResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.SetVelocityRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.SetVelocityResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.SpinRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.SpinResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.StopRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.StopResponse", null, i), proto.viam.component.base.v1.MoveStraightRequest = function(o) {
|
|
24785
|
+
s.object.extend(proto, p), s.exportSymbol("proto.viam.component.base.v1.GetPropertiesRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.GetPropertiesResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.IsMovingRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.IsMovingResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.MoveStraightRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.MoveStraightResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.SetPowerRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.SetPowerResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.SetVelocityRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.SetVelocityResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.SpinRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.SpinResponse", null, i), s.exportSymbol("proto.viam.component.base.v1.StopRequest", null, i), s.exportSymbol("proto.viam.component.base.v1.StopResponse", null, i), proto.viam.component.base.v1.MoveStraightRequest = function(o) {
|
|
24786
24786
|
e.Message.initialize(this, o, 0, -1, null, null);
|
|
24787
24787
|
}, s.inherits(proto.viam.component.base.v1.MoveStraightRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.base.v1.MoveStraightRequest.displayName = "proto.viam.component.base.v1.MoveStraightRequest"), proto.viam.component.base.v1.MoveStraightResponse = function(o) {
|
|
24788
24788
|
e.Message.initialize(this, o, 0, -1, null, null);
|
|
@@ -24806,7 +24806,11 @@ var ArmServiceClient_1 = ArmServiceClient, base_pb = {};
|
|
|
24806
24806
|
e.Message.initialize(this, o, 0, -1, null, null);
|
|
24807
24807
|
}, s.inherits(proto.viam.component.base.v1.IsMovingRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.base.v1.IsMovingRequest.displayName = "proto.viam.component.base.v1.IsMovingRequest"), proto.viam.component.base.v1.IsMovingResponse = function(o) {
|
|
24808
24808
|
e.Message.initialize(this, o, 0, -1, null, null);
|
|
24809
|
-
}, s.inherits(proto.viam.component.base.v1.IsMovingResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.base.v1.IsMovingResponse.displayName = "proto.viam.component.base.v1.IsMovingResponse"),
|
|
24809
|
+
}, s.inherits(proto.viam.component.base.v1.IsMovingResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.base.v1.IsMovingResponse.displayName = "proto.viam.component.base.v1.IsMovingResponse"), proto.viam.component.base.v1.GetPropertiesRequest = function(o) {
|
|
24810
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
24811
|
+
}, s.inherits(proto.viam.component.base.v1.GetPropertiesRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.base.v1.GetPropertiesRequest.displayName = "proto.viam.component.base.v1.GetPropertiesRequest"), proto.viam.component.base.v1.GetPropertiesResponse = function(o) {
|
|
24812
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
24813
|
+
}, s.inherits(proto.viam.component.base.v1.GetPropertiesResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.base.v1.GetPropertiesResponse.displayName = "proto.viam.component.base.v1.GetPropertiesResponse"), e.Message.GENERATE_TO_OBJECT && (proto.viam.component.base.v1.MoveStraightRequest.prototype.toObject = function(o) {
|
|
24810
24814
|
return proto.viam.component.base.v1.MoveStraightRequest.toObject(o, this);
|
|
24811
24815
|
}, proto.viam.component.base.v1.MoveStraightRequest.toObject = function(o, r) {
|
|
24812
24816
|
var n, l = {
|
|
@@ -25469,6 +25473,130 @@ var ArmServiceClient_1 = ArmServiceClient, base_pb = {};
|
|
|
25469
25473
|
);
|
|
25470
25474
|
}, proto.viam.component.base.v1.IsMovingResponse.prototype.setIsMoving = function(o) {
|
|
25471
25475
|
return e.Message.setProto3BooleanField(this, 1, o);
|
|
25476
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.base.v1.GetPropertiesRequest.prototype.toObject = function(o) {
|
|
25477
|
+
return proto.viam.component.base.v1.GetPropertiesRequest.toObject(o, this);
|
|
25478
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.toObject = function(o, r) {
|
|
25479
|
+
var n, l = {
|
|
25480
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
25481
|
+
extra: (n = r.getExtra()) && p.Struct.toObject(o, n)
|
|
25482
|
+
};
|
|
25483
|
+
return o && (l.$jspbMessageInstance = r), l;
|
|
25484
|
+
}), proto.viam.component.base.v1.GetPropertiesRequest.deserializeBinary = function(o) {
|
|
25485
|
+
var r = new e.BinaryReader(o), n = new proto.viam.component.base.v1.GetPropertiesRequest();
|
|
25486
|
+
return proto.viam.component.base.v1.GetPropertiesRequest.deserializeBinaryFromReader(n, r);
|
|
25487
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.deserializeBinaryFromReader = function(o, r) {
|
|
25488
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
25489
|
+
var n = r.getFieldNumber();
|
|
25490
|
+
switch (n) {
|
|
25491
|
+
case 1:
|
|
25492
|
+
var l = (
|
|
25493
|
+
/** @type {string} */
|
|
25494
|
+
r.readString()
|
|
25495
|
+
);
|
|
25496
|
+
o.setName(l);
|
|
25497
|
+
break;
|
|
25498
|
+
case 99:
|
|
25499
|
+
var l = new p.Struct();
|
|
25500
|
+
r.readMessage(l, p.Struct.deserializeBinaryFromReader), o.setExtra(l);
|
|
25501
|
+
break;
|
|
25502
|
+
default:
|
|
25503
|
+
r.skipField();
|
|
25504
|
+
break;
|
|
25505
|
+
}
|
|
25506
|
+
}
|
|
25507
|
+
return o;
|
|
25508
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.prototype.serializeBinary = function() {
|
|
25509
|
+
var o = new e.BinaryWriter();
|
|
25510
|
+
return proto.viam.component.base.v1.GetPropertiesRequest.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
25511
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.serializeBinaryToWriter = function(o, r) {
|
|
25512
|
+
var n = void 0;
|
|
25513
|
+
n = o.getName(), n.length > 0 && r.writeString(
|
|
25514
|
+
1,
|
|
25515
|
+
n
|
|
25516
|
+
), n = o.getExtra(), n != null && r.writeMessage(
|
|
25517
|
+
99,
|
|
25518
|
+
n,
|
|
25519
|
+
p.Struct.serializeBinaryToWriter
|
|
25520
|
+
);
|
|
25521
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.prototype.getName = function() {
|
|
25522
|
+
return (
|
|
25523
|
+
/** @type {string} */
|
|
25524
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
25525
|
+
);
|
|
25526
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.prototype.setName = function(o) {
|
|
25527
|
+
return e.Message.setProto3StringField(this, 1, o);
|
|
25528
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.prototype.getExtra = function() {
|
|
25529
|
+
return (
|
|
25530
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
25531
|
+
e.Message.getWrapperField(this, p.Struct, 99)
|
|
25532
|
+
);
|
|
25533
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.prototype.setExtra = function(o) {
|
|
25534
|
+
return e.Message.setWrapperField(this, 99, o);
|
|
25535
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.prototype.clearExtra = function() {
|
|
25536
|
+
return this.setExtra(void 0);
|
|
25537
|
+
}, proto.viam.component.base.v1.GetPropertiesRequest.prototype.hasExtra = function() {
|
|
25538
|
+
return e.Message.getField(this, 99) != null;
|
|
25539
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.base.v1.GetPropertiesResponse.prototype.toObject = function(o) {
|
|
25540
|
+
return proto.viam.component.base.v1.GetPropertiesResponse.toObject(o, this);
|
|
25541
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.toObject = function(o, r) {
|
|
25542
|
+
var n = {
|
|
25543
|
+
widthMeters: e.Message.getFloatingPointFieldWithDefault(r, 1, 0),
|
|
25544
|
+
turningRadiusMeters: e.Message.getFloatingPointFieldWithDefault(r, 2, 0)
|
|
25545
|
+
};
|
|
25546
|
+
return o && (n.$jspbMessageInstance = r), n;
|
|
25547
|
+
}), proto.viam.component.base.v1.GetPropertiesResponse.deserializeBinary = function(o) {
|
|
25548
|
+
var r = new e.BinaryReader(o), n = new proto.viam.component.base.v1.GetPropertiesResponse();
|
|
25549
|
+
return proto.viam.component.base.v1.GetPropertiesResponse.deserializeBinaryFromReader(n, r);
|
|
25550
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.deserializeBinaryFromReader = function(o, r) {
|
|
25551
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
25552
|
+
var n = r.getFieldNumber();
|
|
25553
|
+
switch (n) {
|
|
25554
|
+
case 1:
|
|
25555
|
+
var l = (
|
|
25556
|
+
/** @type {number} */
|
|
25557
|
+
r.readDouble()
|
|
25558
|
+
);
|
|
25559
|
+
o.setWidthMeters(l);
|
|
25560
|
+
break;
|
|
25561
|
+
case 2:
|
|
25562
|
+
var l = (
|
|
25563
|
+
/** @type {number} */
|
|
25564
|
+
r.readDouble()
|
|
25565
|
+
);
|
|
25566
|
+
o.setTurningRadiusMeters(l);
|
|
25567
|
+
break;
|
|
25568
|
+
default:
|
|
25569
|
+
r.skipField();
|
|
25570
|
+
break;
|
|
25571
|
+
}
|
|
25572
|
+
}
|
|
25573
|
+
return o;
|
|
25574
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.prototype.serializeBinary = function() {
|
|
25575
|
+
var o = new e.BinaryWriter();
|
|
25576
|
+
return proto.viam.component.base.v1.GetPropertiesResponse.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
25577
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.serializeBinaryToWriter = function(o, r) {
|
|
25578
|
+
var n = void 0;
|
|
25579
|
+
n = o.getWidthMeters(), n !== 0 && r.writeDouble(
|
|
25580
|
+
1,
|
|
25581
|
+
n
|
|
25582
|
+
), n = o.getTurningRadiusMeters(), n !== 0 && r.writeDouble(
|
|
25583
|
+
2,
|
|
25584
|
+
n
|
|
25585
|
+
);
|
|
25586
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.prototype.getWidthMeters = function() {
|
|
25587
|
+
return (
|
|
25588
|
+
/** @type {number} */
|
|
25589
|
+
e.Message.getFloatingPointFieldWithDefault(this, 1, 0)
|
|
25590
|
+
);
|
|
25591
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.prototype.setWidthMeters = function(o) {
|
|
25592
|
+
return e.Message.setProto3FloatField(this, 1, o);
|
|
25593
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.prototype.getTurningRadiusMeters = function() {
|
|
25594
|
+
return (
|
|
25595
|
+
/** @type {number} */
|
|
25596
|
+
e.Message.getFloatingPointFieldWithDefault(this, 2, 0)
|
|
25597
|
+
);
|
|
25598
|
+
}, proto.viam.component.base.v1.GetPropertiesResponse.prototype.setTurningRadiusMeters = function(o) {
|
|
25599
|
+
return e.Message.setProto3FloatField(this, 2, o);
|
|
25472
25600
|
}, s.object.extend(t, proto.viam.component.base.v1);
|
|
25473
25601
|
})(base_pb);
|
|
25474
25602
|
var component_base_v1_base_pb = base_pb, common_v1_common_pb$i = common_pb, grpc$j = grpcWebClient_umdExports.grpc, BaseService = function() {
|
|
@@ -25540,6 +25668,14 @@ BaseService.GetGeometries = {
|
|
|
25540
25668
|
requestType: common_v1_common_pb$i.GetGeometriesRequest,
|
|
25541
25669
|
responseType: common_v1_common_pb$i.GetGeometriesResponse
|
|
25542
25670
|
};
|
|
25671
|
+
BaseService.GetProperties = {
|
|
25672
|
+
methodName: "GetProperties",
|
|
25673
|
+
service: BaseService,
|
|
25674
|
+
requestStream: !1,
|
|
25675
|
+
responseStream: !1,
|
|
25676
|
+
requestType: component_base_v1_base_pb.GetPropertiesRequest,
|
|
25677
|
+
responseType: component_base_v1_base_pb.GetPropertiesResponse
|
|
25678
|
+
};
|
|
25543
25679
|
function BaseServiceClient(t, e) {
|
|
25544
25680
|
this.serviceHost = t, this.options = e || {};
|
|
25545
25681
|
}
|
|
@@ -25727,6 +25863,29 @@ BaseServiceClient.prototype.getGeometries = function t(e, s, i) {
|
|
|
25727
25863
|
}
|
|
25728
25864
|
};
|
|
25729
25865
|
};
|
|
25866
|
+
BaseServiceClient.prototype.getProperties = function t(e, s, i) {
|
|
25867
|
+
arguments.length === 2 && (i = arguments[1]);
|
|
25868
|
+
var u = grpc$j.unary(BaseService.GetProperties, {
|
|
25869
|
+
request: e,
|
|
25870
|
+
host: this.serviceHost,
|
|
25871
|
+
metadata: s,
|
|
25872
|
+
transport: this.options.transport,
|
|
25873
|
+
debug: this.options.debug,
|
|
25874
|
+
onEnd: function(g) {
|
|
25875
|
+
if (i)
|
|
25876
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
25877
|
+
var p = new Error(g.statusMessage);
|
|
25878
|
+
p.code = g.status, p.metadata = g.trailers, i(p, null);
|
|
25879
|
+
} else
|
|
25880
|
+
i(null, g.message);
|
|
25881
|
+
}
|
|
25882
|
+
});
|
|
25883
|
+
return {
|
|
25884
|
+
cancel: function() {
|
|
25885
|
+
i = null, u.close();
|
|
25886
|
+
}
|
|
25887
|
+
};
|
|
25888
|
+
};
|
|
25730
25889
|
var BaseServiceClient_1 = BaseServiceClient, board_pb = {};
|
|
25731
25890
|
(function(t) {
|
|
25732
25891
|
var e = googleProtobuf, s = e, i = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof i < "u" && i || typeof self < "u" && self || function() {
|
|
@@ -39492,24 +39651,28 @@ class RobotClient {
|
|
|
39492
39651
|
return (await promisify(e.resourceRPCSubtypes.bind(e), s)).getResourceRpcSubtypesList();
|
|
39493
39652
|
}
|
|
39494
39653
|
// STATUS
|
|
39495
|
-
async getStatus(e) {
|
|
39496
|
-
const { robotService: s } = this, i = new robot_pb.GetStatusRequest()
|
|
39497
|
-
|
|
39654
|
+
async getStatus(e = []) {
|
|
39655
|
+
const { robotService: s } = this, i = new robot_pb.GetStatusRequest(), u = e.map(
|
|
39656
|
+
(p) => encodeResourceName(p)
|
|
39657
|
+
);
|
|
39658
|
+
return i.setResourceNamesList(u), (await promisify(s.getStatus.bind(s), i)).getStatusList();
|
|
39498
39659
|
}
|
|
39499
|
-
streamStatus(e, s) {
|
|
39500
|
-
const { robotService: i } = this, u = new robot_pb.StreamStatusRequest()
|
|
39501
|
-
|
|
39502
|
-
|
|
39503
|
-
|
|
39660
|
+
streamStatus(e = [], s = 500) {
|
|
39661
|
+
const { robotService: i } = this, u = new robot_pb.StreamStatusRequest(), g = e.map(
|
|
39662
|
+
(r) => encodeResourceName(r)
|
|
39663
|
+
);
|
|
39664
|
+
u.setResourceNamesList(g), u.setEvery(new duration_pb.Duration().setNanos(s * 1e6));
|
|
39665
|
+
const p = i.streamStatus(u);
|
|
39666
|
+
if (!p)
|
|
39504
39667
|
throw new Error("no stream");
|
|
39505
|
-
const
|
|
39506
|
-
return
|
|
39507
|
-
|
|
39508
|
-
}),
|
|
39509
|
-
|
|
39510
|
-
}),
|
|
39511
|
-
|
|
39512
|
-
}),
|
|
39668
|
+
const o = new ViamResponseStream(p);
|
|
39669
|
+
return p.on("data", (r) => {
|
|
39670
|
+
o.emit("data", r.getStatusList());
|
|
39671
|
+
}), p.on("status", (r) => {
|
|
39672
|
+
o.emit("status", r);
|
|
39673
|
+
}), p.on("end", (r) => {
|
|
39674
|
+
o.emit("end", r);
|
|
39675
|
+
}), o;
|
|
39513
39676
|
}
|
|
39514
39677
|
}
|
|
39515
39678
|
const isLocalConnection = (t) => t.includes(".local"), dialDirect = async (t) => {
|
|
@@ -42324,7 +42487,7 @@ class ServoClient {
|
|
|
42324
42487
|
return doCommandFromClient(s, this.name, e, this.options);
|
|
42325
42488
|
}
|
|
42326
42489
|
}
|
|
42327
|
-
const version = "0.2.1-
|
|
42490
|
+
const version = "0.2.1-rc.0";
|
|
42328
42491
|
export {
|
|
42329
42492
|
ArmClient,
|
|
42330
42493
|
BaseClient,
|