UNPKG

spot-sdk-js

Version:

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

1,529 lines (1,328 loc) 74.9 kB
// source: bosdyn/api/robot_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_full_body_command_pb = require('../../bosdyn/api/full_body_command_pb.js'); goog.object.extend(proto, bosdyn_api_full_body_command_pb); var bosdyn_api_header_pb = require('../../bosdyn/api/header_pb.js'); goog.object.extend(proto, bosdyn_api_header_pb); var bosdyn_api_lease_pb = require('../../bosdyn/api/lease_pb.js'); goog.object.extend(proto, bosdyn_api_lease_pb); var bosdyn_api_mobility_command_pb = require('../../bosdyn/api/mobility_command_pb.js'); goog.object.extend(proto, bosdyn_api_mobility_command_pb); var bosdyn_api_synchronized_command_pb = require('../../bosdyn/api/synchronized_command_pb.js'); goog.object.extend(proto, bosdyn_api_synchronized_command_pb); goog.exportSymbol('proto.bosdyn.api.ClearBehaviorFaultRequest', null, global); goog.exportSymbol('proto.bosdyn.api.ClearBehaviorFaultResponse', null, global); goog.exportSymbol('proto.bosdyn.api.ClearBehaviorFaultResponse.Status', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommand', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommand.CommandCase', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandFeedback', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandFeedback.CommandCase', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandFeedbackRequest', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandFeedbackResponse', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandFeedbackResponse.Status', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandRequest', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandResponse', null, global); goog.exportSymbol('proto.bosdyn.api.RobotCommandResponse.Status', 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.RobotCommand = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.RobotCommand.oneofGroups_); }; goog.inherits(proto.bosdyn.api.RobotCommand, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.RobotCommand.displayName = 'proto.bosdyn.api.RobotCommand'; } /** * 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.RobotCommandFeedback = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.RobotCommandFeedback.oneofGroups_); }; goog.inherits(proto.bosdyn.api.RobotCommandFeedback, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.RobotCommandFeedback.displayName = 'proto.bosdyn.api.RobotCommandFeedback'; } /** * 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.RobotCommandRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.RobotCommandRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.RobotCommandRequest.displayName = 'proto.bosdyn.api.RobotCommandRequest'; } /** * 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.RobotCommandResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.RobotCommandResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.RobotCommandResponse.displayName = 'proto.bosdyn.api.RobotCommandResponse'; } /** * 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.RobotCommandFeedbackRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.RobotCommandFeedbackRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.RobotCommandFeedbackRequest.displayName = 'proto.bosdyn.api.RobotCommandFeedbackRequest'; } /** * 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.RobotCommandFeedbackResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.RobotCommandFeedbackResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.RobotCommandFeedbackResponse.displayName = 'proto.bosdyn.api.RobotCommandFeedbackResponse'; } /** * 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.ClearBehaviorFaultRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ClearBehaviorFaultRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ClearBehaviorFaultRequest.displayName = 'proto.bosdyn.api.ClearBehaviorFaultRequest'; } /** * 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.ClearBehaviorFaultResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ClearBehaviorFaultResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ClearBehaviorFaultResponse.displayName = 'proto.bosdyn.api.ClearBehaviorFaultResponse'; } /** * 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.RobotCommand.oneofGroups_ = [[1,3,2]]; /** * @enum {number} */ proto.bosdyn.api.RobotCommand.CommandCase = { COMMAND_NOT_SET: 0, FULL_BODY_COMMAND: 1, SYNCHRONIZED_COMMAND: 3, MOBILITY_COMMAND: 2 }; /** * @return {proto.bosdyn.api.RobotCommand.CommandCase} */ proto.bosdyn.api.RobotCommand.prototype.getCommandCase = function() { return /** @type {proto.bosdyn.api.RobotCommand.CommandCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.RobotCommand.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.RobotCommand.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.RobotCommand.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.RobotCommand} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommand.toObject = function(includeInstance, msg) { var f, obj = { fullBodyCommand: (f = msg.getFullBodyCommand()) && bosdyn_api_full_body_command_pb.FullBodyCommand.Request.toObject(includeInstance, f), synchronizedCommand: (f = msg.getSynchronizedCommand()) && bosdyn_api_synchronized_command_pb.SynchronizedCommand.Request.toObject(includeInstance, f), mobilityCommand: (f = msg.getMobilityCommand()) && bosdyn_api_mobility_command_pb.MobilityCommand.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.RobotCommand} */ proto.bosdyn.api.RobotCommand.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.RobotCommand; return proto.bosdyn.api.RobotCommand.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.RobotCommand} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.RobotCommand} */ proto.bosdyn.api.RobotCommand.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new bosdyn_api_full_body_command_pb.FullBodyCommand.Request; reader.readMessage(value,bosdyn_api_full_body_command_pb.FullBodyCommand.Request.deserializeBinaryFromReader); msg.setFullBodyCommand(value); break; case 3: var value = new bosdyn_api_synchronized_command_pb.SynchronizedCommand.Request; reader.readMessage(value,bosdyn_api_synchronized_command_pb.SynchronizedCommand.Request.deserializeBinaryFromReader); msg.setSynchronizedCommand(value); break; case 2: var value = new bosdyn_api_mobility_command_pb.MobilityCommand.Request; reader.readMessage(value,bosdyn_api_mobility_command_pb.MobilityCommand.Request.deserializeBinaryFromReader); msg.setMobilityCommand(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.RobotCommand.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.RobotCommand.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.RobotCommand} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommand.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFullBodyCommand(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_full_body_command_pb.FullBodyCommand.Request.serializeBinaryToWriter ); } f = message.getSynchronizedCommand(); if (f != null) { writer.writeMessage( 3, f, bosdyn_api_synchronized_command_pb.SynchronizedCommand.Request.serializeBinaryToWriter ); } f = message.getMobilityCommand(); if (f != null) { writer.writeMessage( 2, f, bosdyn_api_mobility_command_pb.MobilityCommand.Request.serializeBinaryToWriter ); } }; /** * optional FullBodyCommand.Request full_body_command = 1; * @return {?proto.bosdyn.api.FullBodyCommand.Request} */ proto.bosdyn.api.RobotCommand.prototype.getFullBodyCommand = function() { return /** @type{?proto.bosdyn.api.FullBodyCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_full_body_command_pb.FullBodyCommand.Request, 1)); }; /** * @param {?proto.bosdyn.api.FullBodyCommand.Request|undefined} value * @return {!proto.bosdyn.api.RobotCommand} returns this */ proto.bosdyn.api.RobotCommand.prototype.setFullBodyCommand = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.RobotCommand.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommand} returns this */ proto.bosdyn.api.RobotCommand.prototype.clearFullBodyCommand = function() { return this.setFullBodyCommand(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommand.prototype.hasFullBodyCommand = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional SynchronizedCommand.Request synchronized_command = 3; * @return {?proto.bosdyn.api.SynchronizedCommand.Request} */ proto.bosdyn.api.RobotCommand.prototype.getSynchronizedCommand = function() { return /** @type{?proto.bosdyn.api.SynchronizedCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_synchronized_command_pb.SynchronizedCommand.Request, 3)); }; /** * @param {?proto.bosdyn.api.SynchronizedCommand.Request|undefined} value * @return {!proto.bosdyn.api.RobotCommand} returns this */ proto.bosdyn.api.RobotCommand.prototype.setSynchronizedCommand = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.bosdyn.api.RobotCommand.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommand} returns this */ proto.bosdyn.api.RobotCommand.prototype.clearSynchronizedCommand = function() { return this.setSynchronizedCommand(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommand.prototype.hasSynchronizedCommand = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional MobilityCommand.Request mobility_command = 2; * @return {?proto.bosdyn.api.MobilityCommand.Request} */ proto.bosdyn.api.RobotCommand.prototype.getMobilityCommand = function() { return /** @type{?proto.bosdyn.api.MobilityCommand.Request} */ ( jspb.Message.getWrapperField(this, bosdyn_api_mobility_command_pb.MobilityCommand.Request, 2)); }; /** * @param {?proto.bosdyn.api.MobilityCommand.Request|undefined} value * @return {!proto.bosdyn.api.RobotCommand} returns this */ proto.bosdyn.api.RobotCommand.prototype.setMobilityCommand = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.RobotCommand.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommand} returns this */ proto.bosdyn.api.RobotCommand.prototype.clearMobilityCommand = function() { return this.setMobilityCommand(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommand.prototype.hasMobilityCommand = function() { return jspb.Message.getField(this, 2) != 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.RobotCommandFeedback.oneofGroups_ = [[2,3,1]]; /** * @enum {number} */ proto.bosdyn.api.RobotCommandFeedback.CommandCase = { COMMAND_NOT_SET: 0, FULL_BODY_FEEDBACK: 2, SYNCHRONIZED_FEEDBACK: 3, MOBILITY_FEEDBACK: 1 }; /** * @return {proto.bosdyn.api.RobotCommandFeedback.CommandCase} */ proto.bosdyn.api.RobotCommandFeedback.prototype.getCommandCase = function() { return /** @type {proto.bosdyn.api.RobotCommandFeedback.CommandCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.RobotCommandFeedback.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.RobotCommandFeedback.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.RobotCommandFeedback.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.RobotCommandFeedback} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandFeedback.toObject = function(includeInstance, msg) { var f, obj = { fullBodyFeedback: (f = msg.getFullBodyFeedback()) && bosdyn_api_full_body_command_pb.FullBodyCommand.Feedback.toObject(includeInstance, f), synchronizedFeedback: (f = msg.getSynchronizedFeedback()) && bosdyn_api_synchronized_command_pb.SynchronizedCommand.Feedback.toObject(includeInstance, f), mobilityFeedback: (f = msg.getMobilityFeedback()) && bosdyn_api_mobility_command_pb.MobilityCommand.Feedback.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.RobotCommandFeedback} */ proto.bosdyn.api.RobotCommandFeedback.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.RobotCommandFeedback; return proto.bosdyn.api.RobotCommandFeedback.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.RobotCommandFeedback} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.RobotCommandFeedback} */ proto.bosdyn.api.RobotCommandFeedback.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = new bosdyn_api_full_body_command_pb.FullBodyCommand.Feedback; reader.readMessage(value,bosdyn_api_full_body_command_pb.FullBodyCommand.Feedback.deserializeBinaryFromReader); msg.setFullBodyFeedback(value); break; case 3: var value = new bosdyn_api_synchronized_command_pb.SynchronizedCommand.Feedback; reader.readMessage(value,bosdyn_api_synchronized_command_pb.SynchronizedCommand.Feedback.deserializeBinaryFromReader); msg.setSynchronizedFeedback(value); break; case 1: var value = new bosdyn_api_mobility_command_pb.MobilityCommand.Feedback; reader.readMessage(value,bosdyn_api_mobility_command_pb.MobilityCommand.Feedback.deserializeBinaryFromReader); msg.setMobilityFeedback(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.RobotCommandFeedback.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.RobotCommandFeedback.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.RobotCommandFeedback} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandFeedback.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFullBodyFeedback(); if (f != null) { writer.writeMessage( 2, f, bosdyn_api_full_body_command_pb.FullBodyCommand.Feedback.serializeBinaryToWriter ); } f = message.getSynchronizedFeedback(); if (f != null) { writer.writeMessage( 3, f, bosdyn_api_synchronized_command_pb.SynchronizedCommand.Feedback.serializeBinaryToWriter ); } f = message.getMobilityFeedback(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_mobility_command_pb.MobilityCommand.Feedback.serializeBinaryToWriter ); } }; /** * optional FullBodyCommand.Feedback full_body_feedback = 2; * @return {?proto.bosdyn.api.FullBodyCommand.Feedback} */ proto.bosdyn.api.RobotCommandFeedback.prototype.getFullBodyFeedback = function() { return /** @type{?proto.bosdyn.api.FullBodyCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_full_body_command_pb.FullBodyCommand.Feedback, 2)); }; /** * @param {?proto.bosdyn.api.FullBodyCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.RobotCommandFeedback} returns this */ proto.bosdyn.api.RobotCommandFeedback.prototype.setFullBodyFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.RobotCommandFeedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandFeedback} returns this */ proto.bosdyn.api.RobotCommandFeedback.prototype.clearFullBodyFeedback = function() { return this.setFullBodyFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandFeedback.prototype.hasFullBodyFeedback = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional SynchronizedCommand.Feedback synchronized_feedback = 3; * @return {?proto.bosdyn.api.SynchronizedCommand.Feedback} */ proto.bosdyn.api.RobotCommandFeedback.prototype.getSynchronizedFeedback = function() { return /** @type{?proto.bosdyn.api.SynchronizedCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_synchronized_command_pb.SynchronizedCommand.Feedback, 3)); }; /** * @param {?proto.bosdyn.api.SynchronizedCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.RobotCommandFeedback} returns this */ proto.bosdyn.api.RobotCommandFeedback.prototype.setSynchronizedFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.bosdyn.api.RobotCommandFeedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandFeedback} returns this */ proto.bosdyn.api.RobotCommandFeedback.prototype.clearSynchronizedFeedback = function() { return this.setSynchronizedFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandFeedback.prototype.hasSynchronizedFeedback = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional MobilityCommand.Feedback mobility_feedback = 1; * @return {?proto.bosdyn.api.MobilityCommand.Feedback} */ proto.bosdyn.api.RobotCommandFeedback.prototype.getMobilityFeedback = function() { return /** @type{?proto.bosdyn.api.MobilityCommand.Feedback} */ ( jspb.Message.getWrapperField(this, bosdyn_api_mobility_command_pb.MobilityCommand.Feedback, 1)); }; /** * @param {?proto.bosdyn.api.MobilityCommand.Feedback|undefined} value * @return {!proto.bosdyn.api.RobotCommandFeedback} returns this */ proto.bosdyn.api.RobotCommandFeedback.prototype.setMobilityFeedback = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.RobotCommandFeedback.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandFeedback} returns this */ proto.bosdyn.api.RobotCommandFeedback.prototype.clearMobilityFeedback = function() { return this.setMobilityFeedback(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandFeedback.prototype.hasMobilityFeedback = function() { return jspb.Message.getField(this, 1) != null; }; 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.RobotCommandRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.RobotCommandRequest.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.RobotCommandRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandRequest.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f), lease: (f = msg.getLease()) && bosdyn_api_lease_pb.Lease.toObject(includeInstance, f), command: (f = msg.getCommand()) && proto.bosdyn.api.RobotCommand.toObject(includeInstance, f), clockIdentifier: jspb.Message.getFieldWithDefault(msg, 4, "") }; 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.RobotCommandRequest} */ proto.bosdyn.api.RobotCommandRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.RobotCommandRequest; return proto.bosdyn.api.RobotCommandRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.RobotCommandRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.RobotCommandRequest} */ proto.bosdyn.api.RobotCommandRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new bosdyn_api_header_pb.RequestHeader; reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader); msg.setHeader(value); break; case 2: var value = new bosdyn_api_lease_pb.Lease; reader.readMessage(value,bosdyn_api_lease_pb.Lease.deserializeBinaryFromReader); msg.setLease(value); break; case 3: var value = new proto.bosdyn.api.RobotCommand; reader.readMessage(value,proto.bosdyn.api.RobotCommand.deserializeBinaryFromReader); msg.setCommand(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setClockIdentifier(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.RobotCommandRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.RobotCommandRequest.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.RobotCommandRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeader(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter ); } f = message.getLease(); if (f != null) { writer.writeMessage( 2, f, bosdyn_api_lease_pb.Lease.serializeBinaryToWriter ); } f = message.getCommand(); if (f != null) { writer.writeMessage( 3, f, proto.bosdyn.api.RobotCommand.serializeBinaryToWriter ); } f = message.getClockIdentifier(); if (f.length > 0) { writer.writeString( 4, f ); } }; /** * optional RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.RobotCommandRequest.prototype.getHeader = function() { return /** @type{?proto.bosdyn.api.RequestHeader} */ ( jspb.Message.getWrapperField(this, bosdyn_api_header_pb.RequestHeader, 1)); }; /** * @param {?proto.bosdyn.api.RequestHeader|undefined} value * @return {!proto.bosdyn.api.RobotCommandRequest} returns this */ proto.bosdyn.api.RobotCommandRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandRequest} returns this */ proto.bosdyn.api.RobotCommandRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandRequest.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional Lease lease = 2; * @return {?proto.bosdyn.api.Lease} */ proto.bosdyn.api.RobotCommandRequest.prototype.getLease = function() { return /** @type{?proto.bosdyn.api.Lease} */ ( jspb.Message.getWrapperField(this, bosdyn_api_lease_pb.Lease, 2)); }; /** * @param {?proto.bosdyn.api.Lease|undefined} value * @return {!proto.bosdyn.api.RobotCommandRequest} returns this */ proto.bosdyn.api.RobotCommandRequest.prototype.setLease = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandRequest} returns this */ proto.bosdyn.api.RobotCommandRequest.prototype.clearLease = function() { return this.setLease(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandRequest.prototype.hasLease = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional RobotCommand command = 3; * @return {?proto.bosdyn.api.RobotCommand} */ proto.bosdyn.api.RobotCommandRequest.prototype.getCommand = function() { return /** @type{?proto.bosdyn.api.RobotCommand} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.RobotCommand, 3)); }; /** * @param {?proto.bosdyn.api.RobotCommand|undefined} value * @return {!proto.bosdyn.api.RobotCommandRequest} returns this */ proto.bosdyn.api.RobotCommandRequest.prototype.setCommand = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandRequest} returns this */ proto.bosdyn.api.RobotCommandRequest.prototype.clearCommand = function() { return this.setCommand(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandRequest.prototype.hasCommand = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional string clock_identifier = 4; * @return {string} */ proto.bosdyn.api.RobotCommandRequest.prototype.getClockIdentifier = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.RobotCommandRequest} returns this */ proto.bosdyn.api.RobotCommandRequest.prototype.setClockIdentifier = function(value) { return jspb.Message.setProto3StringField(this, 4, 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.RobotCommandResponse.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.RobotCommandResponse.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.RobotCommandResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandResponse.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.ResponseHeader.toObject(includeInstance, f), leaseUseResult: (f = msg.getLeaseUseResult()) && bosdyn_api_lease_pb.LeaseUseResult.toObject(includeInstance, f), status: jspb.Message.getFieldWithDefault(msg, 3, 0), message: jspb.Message.getFieldWithDefault(msg, 4, ""), robotCommandId: jspb.Message.getFieldWithDefault(msg, 5, 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.RobotCommandResponse} */ proto.bosdyn.api.RobotCommandResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.RobotCommandResponse; return proto.bosdyn.api.RobotCommandResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.RobotCommandResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.RobotCommandResponse} */ proto.bosdyn.api.RobotCommandResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new bosdyn_api_header_pb.ResponseHeader; reader.readMessage(value,bosdyn_api_header_pb.ResponseHeader.deserializeBinaryFromReader); msg.setHeader(value); break; case 2: var value = new bosdyn_api_lease_pb.LeaseUseResult; reader.readMessage(value,bosdyn_api_lease_pb.LeaseUseResult.deserializeBinaryFromReader); msg.setLeaseUseResult(value); break; case 3: var value = /** @type {!proto.bosdyn.api.RobotCommandResponse.Status} */ (reader.readEnum()); msg.setStatus(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); msg.setRobotCommandId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.RobotCommandResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.RobotCommandResponse.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.RobotCommandResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeader(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_header_pb.ResponseHeader.serializeBinaryToWriter ); } f = message.getLeaseUseResult(); if (f != null) { writer.writeMessage( 2, f, bosdyn_api_lease_pb.LeaseUseResult.serializeBinaryToWriter ); } f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( 3, f ); } f = message.getMessage(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getRobotCommandId(); if (f !== 0) { writer.writeUint32( 5, f ); } }; /** * @enum {number} */ proto.bosdyn.api.RobotCommandResponse.Status = { STATUS_UNKNOWN: 0, STATUS_OK: 1, STATUS_INVALID_REQUEST: 2, STATUS_UNSUPPORTED: 3, STATUS_NO_TIMESYNC: 4, STATUS_EXPIRED: 5, STATUS_TOO_DISTANT: 6, STATUS_NOT_POWERED_ON: 7, STATUS_BEHAVIOR_FAULT: 9, STATUS_UNKNOWN_FRAME: 8 }; /** * optional ResponseHeader header = 1; * @return {?proto.bosdyn.api.ResponseHeader} */ proto.bosdyn.api.RobotCommandResponse.prototype.getHeader = function() { return /** @type{?proto.bosdyn.api.ResponseHeader} */ ( jspb.Message.getWrapperField(this, bosdyn_api_header_pb.ResponseHeader, 1)); }; /** * @param {?proto.bosdyn.api.ResponseHeader|undefined} value * @return {!proto.bosdyn.api.RobotCommandResponse} returns this */ proto.bosdyn.api.RobotCommandResponse.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandResponse} returns this */ proto.bosdyn.api.RobotCommandResponse.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandResponse.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional LeaseUseResult lease_use_result = 2; * @return {?proto.bosdyn.api.LeaseUseResult} */ proto.bosdyn.api.RobotCommandResponse.prototype.getLeaseUseResult = function() { return /** @type{?proto.bosdyn.api.LeaseUseResult} */ ( jspb.Message.getWrapperField(this, bosdyn_api_lease_pb.LeaseUseResult, 2)); }; /** * @param {?proto.bosdyn.api.LeaseUseResult|undefined} value * @return {!proto.bosdyn.api.RobotCommandResponse} returns this */ proto.bosdyn.api.RobotCommandResponse.prototype.setLeaseUseResult = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandResponse} returns this */ proto.bosdyn.api.RobotCommandResponse.prototype.clearLeaseUseResult = function() { return this.setLeaseUseResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandResponse.prototype.hasLeaseUseResult = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional Status status = 3; * @return {!proto.bosdyn.api.RobotCommandResponse.Status} */ proto.bosdyn.api.RobotCommandResponse.prototype.getStatus = function() { return /** @type {!proto.bosdyn.api.RobotCommandResponse.Status} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {!proto.bosdyn.api.RobotCommandResponse.Status} value * @return {!proto.bosdyn.api.RobotCommandResponse} returns this */ proto.bosdyn.api.RobotCommandResponse.prototype.setStatus = function(value) { return jspb.Message.setProto3EnumField(this, 3, value); }; /** * optional string message = 4; * @return {string} */ proto.bosdyn.api.RobotCommandResponse.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.RobotCommandResponse} returns this */ proto.bosdyn.api.RobotCommandResponse.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional uint32 robot_command_id = 5; * @return {number} */ proto.bosdyn.api.RobotCommandResponse.prototype.getRobotCommandId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value * @return {!proto.bosdyn.api.RobotCommandResponse} returns this */ proto.bosdyn.api.RobotCommandResponse.prototype.setRobotCommandId = function(value) { return jspb.Message.setProto3IntField(this, 5, 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.RobotCommandFeedbackRequest.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.RobotCommandFeedbackRequest.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.RobotCommandFeedbackRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandFeedbackRequest.toObject = function(includeInstance, msg) { var f, obj = { header: (f = msg.getHeader()) && bosdyn_api_header_pb.RequestHeader.toObject(includeInstance, f), robotCommandId: 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.RobotCommandFeedbackRequest} */ proto.bosdyn.api.RobotCommandFeedbackRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.RobotCommandFeedbackRequest; return proto.bosdyn.api.RobotCommandFeedbackRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.RobotCommandFeedbackRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.RobotCommandFeedbackRequest} */ proto.bosdyn.api.RobotCommandFeedbackRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new bosdyn_api_header_pb.RequestHeader; reader.readMessage(value,bosdyn_api_header_pb.RequestHeader.deserializeBinaryFromReader); msg.setHeader(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setRobotCommandId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.RobotCommandFeedbackRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.RobotCommandFeedbackRequest.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.RobotCommandFeedbackRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.RobotCommandFeedbackRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getHeader(); if (f != null) { writer.writeMessage( 1, f, bosdyn_api_header_pb.RequestHeader.serializeBinaryToWriter ); } f = message.getRobotCommandId(); if (f !== 0) { writer.writeUint32( 2, f ); } }; /** * optional RequestHeader header = 1; * @return {?proto.bosdyn.api.RequestHeader} */ proto.bosdyn.api.RobotCommandFeedbackRequest.prototype.getHeader = function() { return /** @type{?proto.bosdyn.api.RequestHeader} */ ( jspb.Message.getWrapperField(this, bosdyn_api_header_pb.RequestHeader, 1)); }; /** * @param {?proto.bosdyn.api.RequestHeader|undefined} value * @return {!proto.bosdyn.api.RobotCommandFeedbackRequest} returns this */ proto.bosdyn.api.RobotCommandFeedbackRequest.prototype.setHeader = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.RobotCommandFeedbackRequest} returns this */ proto.bosdyn.api.RobotCommandFeedbackRequest.prototype.clearHeader = function() { return this.setHeader(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.RobotCommandFeedbackRequest.prototype.hasHeader = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional uint32 robot_command_id = 2; * @return {number} */ proto.bosdyn.api.RobotCommandFeedbackRequest.prototype.getRobotCommandId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); };