UNPKG

spot-sdk-js

Version:

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

1,218 lines (1,050 loc) 40.9 kB
// source: bosdyn/api/gripper_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 bosdyn_api_trajectory_pb = require('../../bosdyn/api/trajectory_pb.js'); goog.object.extend(proto, bosdyn_api_trajectory_pb); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); goog.exportSymbol('proto.bosdyn.api.ClawGripperCommand', null, global); goog.exportSymbol('proto.bosdyn.api.ClawGripperCommand.Feedback', null, global); goog.exportSymbol('proto.bosdyn.api.ClawGripperCommand.Feedback.Status', null, global); goog.exportSymbol('proto.bosdyn.api.ClawGripperCommand.Request', null, global); goog.exportSymbol('proto.bosdyn.api.GripperCommand', null, global); goog.exportSymbol('proto.bosdyn.api.GripperCommand.Feedback', null, global); goog.exportSymbol('proto.bosdyn.api.GripperCommand.Feedback.CommandCase', null, global); goog.exportSymbol('proto.bosdyn.api.GripperCommand.Request', null, global); goog.exportSymbol('proto.bosdyn.api.GripperCommand.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.GripperCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.GripperCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.GripperCommand.displayName = 'proto.bosdyn.api.GripperCommand'; } /** * 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.GripperCommand.Request = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.GripperCommand.Request.oneofGroups_); }; goog.inherits(proto.bosdyn.api.GripperCommand.Request, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.GripperCommand.Request.displayName = 'proto.bosdyn.api.GripperCommand.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.GripperCommand.Feedback = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.GripperCommand.Feedback.oneofGroups_); }; goog.inherits(proto.bosdyn.api.GripperCommand.Feedback, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.GripperCommand.Feedback.displayName = 'proto.bosdyn.api.GripperCommand.Feedback'; } /** * 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.ClawGripperCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ClawGripperCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ClawGripperCommand.displayName = 'proto.bosdyn.api.ClawGripperCommand'; } /** * 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.ClawGripperCommand.Request = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ClawGripperCommand.Request, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ClawGripperCommand.Request.displayName = 'proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand.Feedback = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ClawGripperCommand.Feedback, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ClawGripperCommand.Feedback.displayName = 'proto.bosdyn.api.ClawGripperCommand.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.GripperCommand.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.GripperCommand.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.GripperCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GripperCommand.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.GripperCommand} */ proto.bosdyn.api.GripperCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.GripperCommand; return proto.bosdyn.api.GripperCommand.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.GripperCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.GripperCommand} */ proto.bosdyn.api.GripperCommand.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.GripperCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.GripperCommand.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.GripperCommand} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GripperCommand.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.GripperCommand.Request.oneofGroups_ = [[1]]; /** * @enum {number} */ proto.bosdyn.api.GripperCommand.Request.CommandCase = { COMMAND_NOT_SET: 0, CLAW_GRIPPER_COMMAND: 1 }; /** * @return {proto.bosdyn.api.GripperCommand.Request.CommandCase} */ proto.bosdyn.api.GripperCommand.Request.prototype.getCommandCase = function() { return /** @type {proto.bosdyn.api.GripperCommand.Request.CommandCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.GripperCommand.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.GripperCommand.Request.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.GripperCommand.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.GripperCommand.Request} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GripperCommand.Request.toObject = function(includeInstance, msg) { var f, obj = { clawGripperCommand: (f = msg.getClawGripperCommand()) && proto.bosdyn.api.ClawGripperCommand.Request.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.GripperCommand.Request} */ proto.bosdyn.api.GripperCommand.Request.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.GripperCommand.Request; return proto.bosdyn.api.GripperCommand.Request.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.GripperCommand.Request} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.GripperCommand.Request} */ proto.bosdyn.api.GripperCommand.Request.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.bosdyn.api.ClawGripperCommand.Request; reader.readMessage(value,proto.bosdyn.api.ClawGripperCommand.Request.deserializeBinaryFromReader); msg.setClawGripperCommand(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.GripperCommand.Request.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.GripperCommand.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.GripperCommand.Request} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GripperCommand.Request.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClawGripperCommand(); if (f != null) { writer.writeMessage( 1, f, proto.bosdyn.api.ClawGripperCommand.Request.serializeBinaryToWriter ); } }; /** * optional ClawGripperCommand.Request claw_gripper_command = 1; * @return {?proto.bosdyn.api.ClawGripperCommand.Request} */ proto.bosdyn.api.GripperCommand.Request.prototype.getClawGripperCommand = function() { return /** @type{?proto.bosdyn.api.ClawGripperCommand.Request} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.ClawGripperCommand.Request, 1)); }; /** * @param {?proto.bosdyn.api.ClawGripperCommand.Request|undefined} value * @return {!proto.bosdyn.api.GripperCommand.Request} returns this */ proto.bosdyn.api.GripperCommand.Request.prototype.setClawGripperCommand = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.GripperCommand.Request.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.GripperCommand.Request} returns this */ proto.bosdyn.api.GripperCommand.Request.prototype.clearClawGripperCommand = function() { return this.setClawGripperCommand(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.GripperCommand.Request.prototype.hasClawGripperCommand = function() { return jspb.Message.getField(this, 1) != 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.GripperCommand.Feedback.oneofGroups_ = [[1]]; /** * @enum {number} */ proto.bosdyn.api.GripperCommand.Feedback.CommandCase = { COMMAND_NOT_SET: 0, CLAW_GRIPPER_FEEDBACK: 1 }; /** * @return {proto.bosdyn.api.GripperCommand.Feedback.CommandCase} */ proto.bosdyn.api.GripperCommand.Feedback.prototype.getCommandCase = function() { return /** @type {proto.bosdyn.api.GripperCommand.Feedback.CommandCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.GripperCommand.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.GripperCommand.Feedback.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.GripperCommand.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.GripperCommand.Feedback} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GripperCommand.Feedback.toObject = function(includeInstance, msg) { var f, obj = { clawGripperFeedback: (f = msg.getClawGripperFeedback()) && proto.bosdyn.api.ClawGripperCommand.Feedback.toObject(includeInstance, f), status: jspb.Message.getFieldWithDefault(msg, 2, 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.GripperCommand.Feedback} */ proto.bosdyn.api.GripperCommand.Feedback.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.GripperCommand.Feedback; return proto.bosdyn.api.GripperCommand.Feedback.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.GripperCommand.Feedback} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.GripperCommand.Feedback} */ proto.bosdyn.api.GripperCommand.Feedback.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.bosdyn.api.ClawGripperCommand.Feedback; reader.readMessage(value,proto.bosdyn.api.ClawGripperCommand.Feedback.deserializeBinaryFromReader); msg.setClawGripperFeedback(value); break; case 2: 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.GripperCommand.Feedback.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.GripperCommand.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.GripperCommand.Feedback} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.GripperCommand.Feedback.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClawGripperFeedback(); if (f != null) { writer.writeMessage( 1, f, proto.bosdyn.api.ClawGripperCommand.Feedback.serializeBinaryToWriter ); } f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 2, f ); } }; /** * optional ClawGripperCommand.Feedback claw_gripper_feedback = 1; * @return {?proto.bosdyn.api.ClawGripperCommand.Feedback} */ proto.bosdyn.api.GripperCommand.Feedback.prototype.getClawGripperFeedback = function() { return /** @type{?proto.bosdyn.api.ClawGripperCommand.Feedback} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.ClawGripperCommand.Feedback, 1)); }; /** * @param {?proto.bosdyn.api.ClawGripperCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.GripperCommand.Feedback} returns this */ proto.bosdyn.api.GripperCommand.Feedback.prototype.setClawGripperFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.GripperCommand.Feedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.GripperCommand.Feedback} returns this */ proto.bosdyn.api.GripperCommand.Feedback.prototype.clearClawGripperFeedback = function() { return this.setClawGripperFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.GripperCommand.Feedback.prototype.hasClawGripperFeedback = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional RobotCommandFeedbackStatus.Status status = 2; * @return {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} */ proto.bosdyn.api.GripperCommand.Feedback.prototype.getStatus = function() { return /** @type {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status} value * @return {!proto.bosdyn.api.GripperCommand.Feedback} returns this */ proto.bosdyn.api.GripperCommand.Feedback.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 2, value); }; 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.ClawGripperCommand.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand} */ proto.bosdyn.api.ClawGripperCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.ClawGripperCommand; return proto.bosdyn.api.ClawGripperCommand.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.ClawGripperCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.ClawGripperCommand} */ proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ClawGripperCommand.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; 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.ClawGripperCommand.Request.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand.Request} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ClawGripperCommand.Request.toObject = function(includeInstance, msg) { var f, obj = { trajectory: (f = msg.getTrajectory()) && bosdyn_api_trajectory_pb.ScalarTrajectory.toObject(includeInstance, f), maximumOpenCloseVelocity: (f = msg.getMaximumOpenCloseVelocity()) && google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, f), maximumOpenCloseAcceleration: (f = msg.getMaximumOpenCloseAcceleration()) && google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, f), maximumTorque: (f = msg.getMaximumTorque()) && google_protobuf_wrappers_pb.DoubleValue.toObject(includeInstance, f), disableForceOnContact: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; 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.ClawGripperCommand.Request} */ proto.bosdyn.api.ClawGripperCommand.Request.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.ClawGripperCommand.Request; return proto.bosdyn.api.ClawGripperCommand.Request.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.ClawGripperCommand.Request} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.ClawGripperCommand.Request} */ proto.bosdyn.api.ClawGripperCommand.Request.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 5: var value = new bosdyn_api_trajectory_pb.ScalarTrajectory; reader.readMessage(value,bosdyn_api_trajectory_pb.ScalarTrajectory.deserializeBinaryFromReader); msg.setTrajectory(value); break; case 2: var value = new google_protobuf_wrappers_pb.DoubleValue; reader.readMessage(value,google_protobuf_wrappers_pb.DoubleValue.deserializeBinaryFromReader); msg.setMaximumOpenCloseVelocity(value); break; case 3: var value = new google_protobuf_wrappers_pb.DoubleValue; reader.readMessage(value,google_protobuf_wrappers_pb.DoubleValue.deserializeBinaryFromReader); msg.setMaximumOpenCloseAcceleration(value); break; case 4: var value = new google_protobuf_wrappers_pb.DoubleValue; reader.readMessage(value,google_protobuf_wrappers_pb.DoubleValue.deserializeBinaryFromReader); msg.setMaximumTorque(value); break; case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setDisableForceOnContact(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand.Request} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ClawGripperCommand.Request.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTrajectory(); if (f != null) { writer.writeMessage( 5, f, bosdyn_api_trajectory_pb.ScalarTrajectory.serializeBinaryToWriter ); } f = message.getMaximumOpenCloseVelocity(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_wrappers_pb.DoubleValue.serializeBinaryToWriter ); } f = message.getMaximumOpenCloseAcceleration(); if (f != null) { writer.writeMessage( 3, f, google_protobuf_wrappers_pb.DoubleValue.serializeBinaryToWriter ); } f = message.getMaximumTorque(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_wrappers_pb.DoubleValue.serializeBinaryToWriter ); } f = message.getDisableForceOnContact(); if (f) { writer.writeBool( 6, f ); } }; /** * optional ScalarTrajectory trajectory = 5; * @return {?proto.bosdyn.api.ScalarTrajectory} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.getTrajectory = function() { return /** @type{?proto.bosdyn.api.ScalarTrajectory} */ ( jspb.Message.getWrapperField(this, bosdyn_api_trajectory_pb.ScalarTrajectory, 5)); }; /** * @param {?proto.bosdyn.api.ScalarTrajectory|undefined} value * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.setTrajectory = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.clearTrajectory = function() { return this.setTrajectory(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.hasTrajectory = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional google.protobuf.DoubleValue maximum_open_close_velocity = 2; * @return {?proto.google.protobuf.DoubleValue} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.getMaximumOpenCloseVelocity = function() { return /** @type{?proto.google.protobuf.DoubleValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 2)); }; /** * @param {?proto.google.protobuf.DoubleValue|undefined} value * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.setMaximumOpenCloseVelocity = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.clearMaximumOpenCloseVelocity = function() { return this.setMaximumOpenCloseVelocity(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.hasMaximumOpenCloseVelocity = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional google.protobuf.DoubleValue maximum_open_close_acceleration = 3; * @return {?proto.google.protobuf.DoubleValue} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.getMaximumOpenCloseAcceleration = function() { return /** @type{?proto.google.protobuf.DoubleValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 3)); }; /** * @param {?proto.google.protobuf.DoubleValue|undefined} value * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.setMaximumOpenCloseAcceleration = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.clearMaximumOpenCloseAcceleration = function() { return this.setMaximumOpenCloseAcceleration(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.hasMaximumOpenCloseAcceleration = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional google.protobuf.DoubleValue maximum_torque = 4; * @return {?proto.google.protobuf.DoubleValue} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.getMaximumTorque = function() { return /** @type{?proto.google.protobuf.DoubleValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.DoubleValue, 4)); }; /** * @param {?proto.google.protobuf.DoubleValue|undefined} value * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.setMaximumTorque = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.clearMaximumTorque = function() { return this.setMaximumTorque(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.hasMaximumTorque = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional bool disable_force_on_contact = 6; * @return {boolean} */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.getDisableForceOnContact = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** * @param {boolean} value * @return {!proto.bosdyn.api.ClawGripperCommand.Request} returns this */ proto.bosdyn.api.ClawGripperCommand.Request.prototype.setDisableForceOnContact = function(value) { return jspb.Message.setProto3BooleanField(this, 6, value); }; 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.ClawGripperCommand.Feedback.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand.Feedback} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ClawGripperCommand.Feedback.toObject = function(includeInstance, msg) { var f, obj = { status: jspb.Message.getFieldWithDefault(msg, 1, 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.ClawGripperCommand.Feedback} */ proto.bosdyn.api.ClawGripperCommand.Feedback.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.ClawGripperCommand.Feedback; return proto.bosdyn.api.ClawGripperCommand.Feedback.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.ClawGripperCommand.Feedback} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.ClawGripperCommand.Feedback} */ proto.bosdyn.api.ClawGripperCommand.Feedback.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bosdyn.api.ClawGripperCommand.Feedback.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.ClawGripperCommand.Feedback.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.ClawGripperCommand.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.ClawGripperCommand.Feedback} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.ClawGripperCommand.Feedback.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 1, f ); } }; /** * @enum {number} */ proto.bosdyn.api.ClawGripperCommand.Feedback.Status = { STATUS_UNKNOWN: 0, STATUS_IN_PROGRESS: 1, STATUS_AT_GOAL: 2, STATUS_APPLYING_FORCE: 3 }; /** * optional Status status = 1; * @return {!proto.bosdyn.api.ClawGripperCommand.Feedback.Status} */ proto.bosdyn.api.ClawGripperCommand.Feedback.prototype.getStatus = function() { return /** @type {!proto.bosdyn.api.ClawGripperCommand.Feedback.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.bosdyn.api.ClawGripperCommand.Feedback.Status} value * @return {!proto.bosdyn.api.ClawGripperCommand.Feedback} returns this */ proto.bosdyn.api.ClawGripperCommand.Feedback.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; goog.object.extend(exports, proto.bosdyn.api);