spot-sdk-ts
Version:
TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics
30 lines • 1.51 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PointCloudServiceClientImpl = exports.protobufPackage = void 0;
/* eslint-disable */
const point_cloud_1 = require("./point_cloud");
const minimal_1 = __importDefault(require("protobufjs/minimal"));
exports.protobufPackage = "bosdyn.api";
class PointCloudServiceClientImpl {
rpc;
constructor(rpc) {
this.rpc = rpc;
this.ListPointCloudSources = this.ListPointCloudSources.bind(this);
this.GetPointCloud = this.GetPointCloud.bind(this);
}
ListPointCloudSources(request) {
const data = point_cloud_1.ListPointCloudSourcesRequest.encode(request).finish();
const promise = this.rpc.request("bosdyn.api.PointCloudService", "ListPointCloudSources", data);
return promise.then((data) => point_cloud_1.ListPointCloudSourcesResponse.decode(new minimal_1.default.Reader(data)));
}
GetPointCloud(request) {
const data = point_cloud_1.GetPointCloudRequest.encode(request).finish();
const promise = this.rpc.request("bosdyn.api.PointCloudService", "GetPointCloud", data);
return promise.then((data) => point_cloud_1.GetPointCloudResponse.decode(new minimal_1.default.Reader(data)));
}
}
exports.PointCloudServiceClientImpl = PointCloudServiceClientImpl;
//# sourceMappingURL=point_cloud_service.js.map