UNPKG

spot-sdk-ts

Version:

TypeScript bindings based on protobufs (proto3) provided by Boston Dynamics

54 lines 3.05 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.EstopServiceClientImpl = exports.protobufPackage = void 0; /* eslint-disable */ const estop_1 = require("./estop"); const minimal_1 = __importDefault(require("protobufjs/minimal")); exports.protobufPackage = "bosdyn.api"; class EstopServiceClientImpl { rpc; constructor(rpc) { this.rpc = rpc; this.RegisterEstopEndpoint = this.RegisterEstopEndpoint.bind(this); this.DeregisterEstopEndpoint = this.DeregisterEstopEndpoint.bind(this); this.EstopCheckIn = this.EstopCheckIn.bind(this); this.GetEstopConfig = this.GetEstopConfig.bind(this); this.SetEstopConfig = this.SetEstopConfig.bind(this); this.GetEstopSystemStatus = this.GetEstopSystemStatus.bind(this); } RegisterEstopEndpoint(request) { const data = estop_1.RegisterEstopEndpointRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.EstopService", "RegisterEstopEndpoint", data); return promise.then((data) => estop_1.RegisterEstopEndpointResponse.decode(new minimal_1.default.Reader(data))); } DeregisterEstopEndpoint(request) { const data = estop_1.DeregisterEstopEndpointRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.EstopService", "DeregisterEstopEndpoint", data); return promise.then((data) => estop_1.DeregisterEstopEndpointResponse.decode(new minimal_1.default.Reader(data))); } EstopCheckIn(request) { const data = estop_1.EstopCheckInRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.EstopService", "EstopCheckIn", data); return promise.then((data) => estop_1.EstopCheckInResponse.decode(new minimal_1.default.Reader(data))); } GetEstopConfig(request) { const data = estop_1.GetEstopConfigRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.EstopService", "GetEstopConfig", data); return promise.then((data) => estop_1.GetEstopConfigResponse.decode(new minimal_1.default.Reader(data))); } SetEstopConfig(request) { const data = estop_1.SetEstopConfigRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.EstopService", "SetEstopConfig", data); return promise.then((data) => estop_1.SetEstopConfigResponse.decode(new minimal_1.default.Reader(data))); } GetEstopSystemStatus(request) { const data = estop_1.GetEstopSystemStatusRequest.encode(request).finish(); const promise = this.rpc.request("bosdyn.api.EstopService", "GetEstopSystemStatus", data); return promise.then((data) => estop_1.GetEstopSystemStatusResponse.decode(new minimal_1.default.Reader(data))); } } exports.EstopServiceClientImpl = EstopServiceClientImpl; //# sourceMappingURL=estop_service.js.map