UNPKG

spot-sdk-js

Version:

Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.

1,249 lines (1,067 loc) 42.7 kB
// source: bosdyn/api/mobility_command.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var bosdyn_api_basic_command_pb = require('../../bosdyn/api/basic_command_pb.js'); goog.object.extend(proto, bosdyn_api_basic_command_pb); var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); goog.exportSymbol('proto.bosdyn.api.MobilityCommand', null, global); goog.exportSymbol('proto.bosdyn.api.MobilityCommand.Feedback', null, global); goog.exportSymbol('proto.bosdyn.api.MobilityCommand.Feedback.FeedbackCase', null, global); goog.exportSymbol('proto.bosdyn.api.MobilityCommand.Request', null, global); goog.exportSymbol('proto.bosdyn.api.MobilityCommand.Request.CommandCase', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.bosdyn.api.MobilityCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.MobilityCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.MobilityCommand.displayName = 'proto.bosdyn.api.MobilityCommand'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.bosdyn.api.MobilityCommand.Request = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_); }; goog.inherits(proto.bosdyn.api.MobilityCommand.Request, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.MobilityCommand.Request.displayName = 'proto.bosdyn.api.MobilityCommand.Request'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.bosdyn.api.MobilityCommand.Feedback = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_); }; goog.inherits(proto.bosdyn.api.MobilityCommand.Feedback, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.MobilityCommand.Feedback.displayName = 'proto.bosdyn.api.MobilityCommand.Feedback'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.bosdyn.api.MobilityCommand.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.MobilityCommand.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bosdyn.api.MobilityCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MobilityCommand.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bosdyn.api.MobilityCommand} */ proto.bosdyn.api.MobilityCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.MobilityCommand; return proto.bosdyn.api.MobilityCommand.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.MobilityCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.MobilityCommand} */ proto.bosdyn.api.MobilityCommand.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.MobilityCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.MobilityCommand.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bosdyn.api.MobilityCommand} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MobilityCommand.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.bosdyn.api.MobilityCommand.Request.oneofGroups_ = [[1,2,3,4,5,6,7]]; /** * @enum {number} */ proto.bosdyn.api.MobilityCommand.Request.CommandCase = { COMMAND_NOT_SET: 0, SE2_TRAJECTORY_REQUEST: 1, SE2_VELOCITY_REQUEST: 2, SIT_REQUEST: 3, STAND_REQUEST: 4, STANCE_REQUEST: 5, STOP_REQUEST: 6, FOLLOW_ARM_REQUEST: 7 }; /** * @return {proto.bosdyn.api.MobilityCommand.Request.CommandCase} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getCommandCase = function() { return /** @type {proto.bosdyn.api.MobilityCommand.Request.CommandCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.bosdyn.api.MobilityCommand.Request.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.MobilityCommand.Request.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bosdyn.api.MobilityCommand.Request} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MobilityCommand.Request.toObject = function(includeInstance, msg) { var f, obj = { se2TrajectoryRequest: (f = msg.getSe2TrajectoryRequest()) && bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Request.toObject(includeInstance, f), se2VelocityRequest: (f = msg.getSe2VelocityRequest()) && bosdyn_api_basic_command_pb.SE2VelocityCommand.Request.toObject(includeInstance, f), sitRequest: (f = msg.getSitRequest()) && bosdyn_api_basic_command_pb.SitCommand.Request.toObject(includeInstance, f), standRequest: (f = msg.getStandRequest()) && bosdyn_api_basic_command_pb.StandCommand.Request.toObject(includeInstance, f), stanceRequest: (f = msg.getStanceRequest()) && bosdyn_api_basic_command_pb.StanceCommand.Request.toObject(includeInstance, f), stopRequest: (f = msg.getStopRequest()) && bosdyn_api_basic_command_pb.StopCommand.Request.toObject(includeInstance, f), followArmRequest: (f = msg.getFollowArmRequest()) && bosdyn_api_basic_command_pb.FollowArmCommand.Request.toObject(includeInstance, f), params: (f = msg.getParams()) && google_protobuf_any_pb.Any.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bosdyn.api.MobilityCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.MobilityCommand.Request; return proto.bosdyn.api.MobilityCommand.Request.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.MobilityCommand.Request} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.MobilityCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Request; reader.readMessage(value,bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Request.deserializeBinaryFromReader); msg.setSe2TrajectoryRequest(value); break; case 2: var value = new bosdyn_api_basic_command_pb.SE2VelocityCommand.Request; reader.readMessage(value,bosdyn_api_basic_command_pb.SE2VelocityCommand.Request.deserializeBinaryFromReader); msg.setSe2VelocityRequest(value); break; case 3: var value = new bosdyn_api_basic_command_pb.SitCommand.Request; reader.readMessage(value,bosdyn_api_basic_command_pb.SitCommand.Request.deserializeBinaryFromReader); msg.setSitRequest(value); break; case 4: var value = new bosdyn_api_basic_command_pb.StandCommand.Request; reader.readMessage(value,bosdyn_api_basic_command_pb.StandCommand.Request.deserializeBinaryFromReader); msg.setStandRequest(value); break; case 5: var value = new bosdyn_api_basic_command_pb.StanceCommand.Request; reader.readMessage(value,bosdyn_api_basic_command_pb.StanceCommand.Request.deserializeBinaryFromReader); msg.setStanceRequest(value); break; case 6: var value = new bosdyn_api_basic_command_pb.StopCommand.Request; reader.readMessage(value,bosdyn_api_basic_command_pb.StopCommand.Request.deserializeBinaryFromReader); msg.setStopRequest(value); break; case 7: var value = new bosdyn_api_basic_command_pb.FollowArmCommand.Request; reader.readMessage(value,bosdyn_api_basic_command_pb.FollowArmCommand.Request.deserializeBinaryFromReader); msg.setFollowArmRequest(value); break; case 100: var value = new google_protobuf_any_pb.Any; reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); msg.setParams(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.MobilityCommand.Request.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.MobilityCommand.Request.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bosdyn.api.MobilityCommand.Request} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MobilityCommand.Request.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSe2TrajectoryRequest(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Request.serializeBinaryToWriter ); } f = message.getSe2VelocityRequest(); if (f != null) { writer.writeMessage( 2, f, bosdyn_api_basic_command_pb.SE2VelocityCommand.Request.serializeBinaryToWriter ); } f = message.getSitRequest(); if (f != null) { writer.writeMessage( 3, f, bosdyn_api_basic_command_pb.SitCommand.Request.serializeBinaryToWriter ); } f = message.getStandRequest(); if (f != null) { writer.writeMessage( 4, f, bosdyn_api_basic_command_pb.StandCommand.Request.serializeBinaryToWriter ); } f = message.getStanceRequest(); if (f != null) { writer.writeMessage( 5, f, bosdyn_api_basic_command_pb.StanceCommand.Request.serializeBinaryToWriter ); } f = message.getStopRequest(); if (f != null) { writer.writeMessage( 6, f, bosdyn_api_basic_command_pb.StopCommand.Request.serializeBinaryToWriter ); } f = message.getFollowArmRequest(); if (f != null) { writer.writeMessage( 7, f, bosdyn_api_basic_command_pb.FollowArmCommand.Request.serializeBinaryToWriter ); } f = message.getParams(); if (f != null) { writer.writeMessage( 100, f, google_protobuf_any_pb.Any.serializeBinaryToWriter ); } }; /** * optional SE2TrajectoryCommand.Request se2_trajectory_request = 1; * @return {?proto.bosdyn.api.SE2TrajectoryCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getSe2TrajectoryRequest = function() { return /** @type{?proto.bosdyn.api.SE2TrajectoryCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Request, 1)); }; /** * @param {?proto.bosdyn.api.SE2TrajectoryCommand.Request|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setSe2TrajectoryRequest = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearSe2TrajectoryRequest = function() { return this.setSe2TrajectoryRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasSe2TrajectoryRequest = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional SE2VelocityCommand.Request se2_velocity_request = 2; * @return {?proto.bosdyn.api.SE2VelocityCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getSe2VelocityRequest = function() { return /** @type{?proto.bosdyn.api.SE2VelocityCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SE2VelocityCommand.Request, 2)); }; /** * @param {?proto.bosdyn.api.SE2VelocityCommand.Request|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setSe2VelocityRequest = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearSe2VelocityRequest = function() { return this.setSe2VelocityRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasSe2VelocityRequest = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional SitCommand.Request sit_request = 3; * @return {?proto.bosdyn.api.SitCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getSitRequest = function() { return /** @type{?proto.bosdyn.api.SitCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SitCommand.Request, 3)); }; /** * @param {?proto.bosdyn.api.SitCommand.Request|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setSitRequest = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearSitRequest = function() { return this.setSitRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasSitRequest = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional StandCommand.Request stand_request = 4; * @return {?proto.bosdyn.api.StandCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getStandRequest = function() { return /** @type{?proto.bosdyn.api.StandCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StandCommand.Request, 4)); }; /** * @param {?proto.bosdyn.api.StandCommand.Request|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setStandRequest = function(value) { return jspb.Message.setOneofWrapperField(this, 4, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearStandRequest = function() { return this.setStandRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasStandRequest = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional StanceCommand.Request stance_request = 5; * @return {?proto.bosdyn.api.StanceCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getStanceRequest = function() { return /** @type{?proto.bosdyn.api.StanceCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StanceCommand.Request, 5)); }; /** * @param {?proto.bosdyn.api.StanceCommand.Request|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setStanceRequest = function(value) { return jspb.Message.setOneofWrapperField(this, 5, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearStanceRequest = function() { return this.setStanceRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasStanceRequest = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional StopCommand.Request stop_request = 6; * @return {?proto.bosdyn.api.StopCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getStopRequest = function() { return /** @type{?proto.bosdyn.api.StopCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StopCommand.Request, 6)); }; /** * @param {?proto.bosdyn.api.StopCommand.Request|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setStopRequest = function(value) { return jspb.Message.setOneofWrapperField(this, 6, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearStopRequest = function() { return this.setStopRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasStopRequest = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional FollowArmCommand.Request follow_arm_request = 7; * @return {?proto.bosdyn.api.FollowArmCommand.Request} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getFollowArmRequest = function() { return /** @type{?proto.bosdyn.api.FollowArmCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.FollowArmCommand.Request, 7)); }; /** * @param {?proto.bosdyn.api.FollowArmCommand.Request|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setFollowArmRequest = function(value) { return jspb.Message.setOneofWrapperField(this, 7, proto.bosdyn.api.MobilityCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearFollowArmRequest = function() { return this.setFollowArmRequest(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasFollowArmRequest = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional google.protobuf.Any params = 100; * @return {?proto.google.protobuf.Any} */ proto.bosdyn.api.MobilityCommand.Request.prototype.getParams = function() { return /** @type{?proto.google.protobuf.Any} */ ( jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 100)); }; /** * @param {?proto.google.protobuf.Any|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.setParams = function(value) { return jspb.Message.setWrapperField(this, 100, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Request} returns this */ proto.bosdyn.api.MobilityCommand.Request.prototype.clearParams = function() { return this.setParams(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Request.prototype.hasParams = function() { return jspb.Message.getField(this, 100) != null; }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_ = [[1,2,3,4,5,6,7]]; /** * @enum {number} */ proto.bosdyn.api.MobilityCommand.Feedback.FeedbackCase = { FEEDBACK_NOT_SET: 0, SE2_TRAJECTORY_FEEDBACK: 1, SE2_VELOCITY_FEEDBACK: 2, SIT_FEEDBACK: 3, STAND_FEEDBACK: 4, STANCE_FEEDBACK: 5, STOP_FEEDBACK: 6, FOLLOW_ARM_FEEDBACK: 7 }; /** * @return {proto.bosdyn.api.MobilityCommand.Feedback.FeedbackCase} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getFeedbackCase = function() { return /** @type {proto.bosdyn.api.MobilityCommand.Feedback.FeedbackCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.MobilityCommand.Feedback.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.bosdyn.api.MobilityCommand.Feedback} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MobilityCommand.Feedback.toObject = function(includeInstance, msg) { var f, obj = { se2TrajectoryFeedback: (f = msg.getSe2TrajectoryFeedback()) && bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Feedback.toObject(includeInstance, f), se2VelocityFeedback: (f = msg.getSe2VelocityFeedback()) && bosdyn_api_basic_command_pb.SE2VelocityCommand.Feedback.toObject(includeInstance, f), sitFeedback: (f = msg.getSitFeedback()) && bosdyn_api_basic_command_pb.SitCommand.Feedback.toObject(includeInstance, f), standFeedback: (f = msg.getStandFeedback()) && bosdyn_api_basic_command_pb.StandCommand.Feedback.toObject(includeInstance, f), stanceFeedback: (f = msg.getStanceFeedback()) && bosdyn_api_basic_command_pb.StanceCommand.Feedback.toObject(includeInstance, f), stopFeedback: (f = msg.getStopFeedback()) && bosdyn_api_basic_command_pb.StopCommand.Feedback.toObject(includeInstance, f), followArmFeedback: (f = msg.getFollowArmFeedback()) && bosdyn_api_basic_command_pb.FollowArmCommand.Feedback.toObject(includeInstance, f), status: jspb.Message.getFieldWithDefault(msg, 100, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.MobilityCommand.Feedback; return proto.bosdyn.api.MobilityCommand.Feedback.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.MobilityCommand.Feedback} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Feedback; reader.readMessage(value,bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Feedback.deserializeBinaryFromReader); msg.setSe2TrajectoryFeedback(value); break; case 2: var value = new bosdyn_api_basic_command_pb.SE2VelocityCommand.Feedback; reader.readMessage(value,bosdyn_api_basic_command_pb.SE2VelocityCommand.Feedback.deserializeBinaryFromReader); msg.setSe2VelocityFeedback(value); break; case 3: var value = new bosdyn_api_basic_command_pb.SitCommand.Feedback; reader.readMessage(value,bosdyn_api_basic_command_pb.SitCommand.Feedback.deserializeBinaryFromReader); msg.setSitFeedback(value); break; case 4: var value = new bosdyn_api_basic_command_pb.StandCommand.Feedback; reader.readMessage(value,bosdyn_api_basic_command_pb.StandCommand.Feedback.deserializeBinaryFromReader); msg.setStandFeedback(value); break; case 5: var value = new bosdyn_api_basic_command_pb.StanceCommand.Feedback; reader.readMessage(value,bosdyn_api_basic_command_pb.StanceCommand.Feedback.deserializeBinaryFromReader); msg.setStanceFeedback(value); break; case 6: var value = new bosdyn_api_basic_command_pb.StopCommand.Feedback; reader.readMessage(value,bosdyn_api_basic_command_pb.StopCommand.Feedback.deserializeBinaryFromReader); msg.setStopFeedback(value); break; case 7: var value = new bosdyn_api_basic_command_pb.FollowArmCommand.Feedback; reader.readMessage(value,bosdyn_api_basic_command_pb.FollowArmCommand.Feedback.deserializeBinaryFromReader); msg.setFollowArmFeedback(value); break; case 100: var value = /** @type {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} */ (reader.readEnum()); msg.setStatus(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.MobilityCommand.Feedback.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bosdyn.api.MobilityCommand.Feedback} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MobilityCommand.Feedback.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSe2TrajectoryFeedback(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Feedback.serializeBinaryToWriter ); } f = message.getSe2VelocityFeedback(); if (f != null) { writer.writeMessage( 2, f, bosdyn_api_basic_command_pb.SE2VelocityCommand.Feedback.serializeBinaryToWriter ); } f = message.getSitFeedback(); if (f != null) { writer.writeMessage( 3, f, bosdyn_api_basic_command_pb.SitCommand.Feedback.serializeBinaryToWriter ); } f = message.getStandFeedback(); if (f != null) { writer.writeMessage( 4, f, bosdyn_api_basic_command_pb.StandCommand.Feedback.serializeBinaryToWriter ); } f = message.getStanceFeedback(); if (f != null) { writer.writeMessage( 5, f, bosdyn_api_basic_command_pb.StanceCommand.Feedback.serializeBinaryToWriter ); } f = message.getStopFeedback(); if (f != null) { writer.writeMessage( 6, f, bosdyn_api_basic_command_pb.StopCommand.Feedback.serializeBinaryToWriter ); } f = message.getFollowArmFeedback(); if (f != null) { writer.writeMessage( 7, f, bosdyn_api_basic_command_pb.FollowArmCommand.Feedback.serializeBinaryToWriter ); } f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 100, f ); } }; /** * optional SE2TrajectoryCommand.Feedback se2_trajectory_feedback = 1; * @return {?proto.bosdyn.api.SE2TrajectoryCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getSe2TrajectoryFeedback = function() { return /** @type{?proto.bosdyn.api.SE2TrajectoryCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SE2TrajectoryCommand.Feedback, 1)); }; /** * @param {?proto.bosdyn.api.SE2TrajectoryCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setSe2TrajectoryFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.clearSe2TrajectoryFeedback = function() { return this.setSe2TrajectoryFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.hasSe2TrajectoryFeedback = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional SE2VelocityCommand.Feedback se2_velocity_feedback = 2; * @return {?proto.bosdyn.api.SE2VelocityCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getSe2VelocityFeedback = function() { return /** @type{?proto.bosdyn.api.SE2VelocityCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SE2VelocityCommand.Feedback, 2)); }; /** * @param {?proto.bosdyn.api.SE2VelocityCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setSe2VelocityFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.clearSe2VelocityFeedback = function() { return this.setSe2VelocityFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.hasSe2VelocityFeedback = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional SitCommand.Feedback sit_feedback = 3; * @return {?proto.bosdyn.api.SitCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getSitFeedback = function() { return /** @type{?proto.bosdyn.api.SitCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SitCommand.Feedback, 3)); }; /** * @param {?proto.bosdyn.api.SitCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setSitFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.clearSitFeedback = function() { return this.setSitFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.hasSitFeedback = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional StandCommand.Feedback stand_feedback = 4; * @return {?proto.bosdyn.api.StandCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getStandFeedback = function() { return /** @type{?proto.bosdyn.api.StandCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StandCommand.Feedback, 4)); }; /** * @param {?proto.bosdyn.api.StandCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setStandFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 4, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.clearStandFeedback = function() { return this.setStandFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.hasStandFeedback = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional StanceCommand.Feedback stance_feedback = 5; * @return {?proto.bosdyn.api.StanceCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getStanceFeedback = function() { return /** @type{?proto.bosdyn.api.StanceCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StanceCommand.Feedback, 5)); }; /** * @param {?proto.bosdyn.api.StanceCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setStanceFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 5, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.clearStanceFeedback = function() { return this.setStanceFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.hasStanceFeedback = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional StopCommand.Feedback stop_feedback = 6; * @return {?proto.bosdyn.api.StopCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getStopFeedback = function() { return /** @type{?proto.bosdyn.api.StopCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StopCommand.Feedback, 6)); }; /** * @param {?proto.bosdyn.api.StopCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setStopFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 6, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.clearStopFeedback = function() { return this.setStopFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.hasStopFeedback = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional FollowArmCommand.Feedback follow_arm_feedback = 7; * @return {?proto.bosdyn.api.FollowArmCommand.Feedback} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getFollowArmFeedback = function() { return /** @type{?proto.bosdyn.api.FollowArmCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.FollowArmCommand.Feedback, 7)); }; /** * @param {?proto.bosdyn.api.FollowArmCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setFollowArmFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 7, proto.bosdyn.api.MobilityCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.clearFollowArmFeedback = function() { return this.setFollowArmFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.hasFollowArmFeedback = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional RobotCommandFeedbackStatus.Status status = 100; * @return {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.getStatus = function() { return /** @type {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} */ (jspb.Message.getFieldWithDefault(this, 100, 0)); }; /** * @param {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} value * @return {!proto.bosdyn.api.MobilityCommand.Feedback} returns this */ proto.bosdyn.api.MobilityCommand.Feedback.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 100, value); }; goog.object.extend(exports, proto.bosdyn.api);