spot-sdk-js
Version:
Develop applications and payloads for Spot using the unofficial Boston Dynamics Spot Node.js SDK.
1,251 lines (1,069 loc) • 44.4 kB
JavaScript
// source: bosdyn/api/full_body_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_payload_estimation_pb = require('../../bosdyn/api/payload_estimation_pb.js');
goog.object.extend(proto, bosdyn_api_payload_estimation_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.FullBodyCommand', null, global);
goog.exportSymbol('proto.bosdyn.api.FullBodyCommand.Feedback', null, global);
goog.exportSymbol('proto.bosdyn.api.FullBodyCommand.Feedback.FeedbackCase', null, global);
goog.exportSymbol('proto.bosdyn.api.FullBodyCommand.Request', null, global);
goog.exportSymbol('proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bosdyn.api.FullBodyCommand, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.FullBodyCommand.displayName = 'proto.bosdyn.api.FullBodyCommand';
}
/**
* 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.FullBodyCommand.Request = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_);
};
goog.inherits(proto.bosdyn.api.FullBodyCommand.Request, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.FullBodyCommand.Request.displayName = 'proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Feedback = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_);
};
goog.inherits(proto.bosdyn.api.FullBodyCommand.Feedback, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bosdyn.api.FullBodyCommand.Feedback.displayName = 'proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand}
*/
proto.bosdyn.api.FullBodyCommand.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.FullBodyCommand;
return proto.bosdyn.api.FullBodyCommand.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.FullBodyCommand} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.FullBodyCommand}
*/
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Request.oneofGroups_ = [[1,2,3,4,5,6,7]];
/**
* @enum {number}
*/
proto.bosdyn.api.FullBodyCommand.Request.CommandCase = {
COMMAND_NOT_SET: 0,
STOP_REQUEST: 1,
FREEZE_REQUEST: 2,
SELFRIGHT_REQUEST: 3,
SAFE_POWER_OFF_REQUEST: 4,
BATTERY_CHANGE_POSE_REQUEST: 5,
PAYLOAD_ESTIMATION_REQUEST: 6,
CONSTRAINED_MANIPULATION_REQUEST: 7
};
/**
* @return {proto.bosdyn.api.FullBodyCommand.Request.CommandCase}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getCommandCase = function() {
return /** @type {proto.bosdyn.api.FullBodyCommand.Request.CommandCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Request.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Request} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.FullBodyCommand.Request.toObject = function(includeInstance, msg) {
var f, obj = {
stopRequest: (f = msg.getStopRequest()) && bosdyn_api_basic_command_pb.StopCommand.Request.toObject(includeInstance, f),
freezeRequest: (f = msg.getFreezeRequest()) && bosdyn_api_basic_command_pb.FreezeCommand.Request.toObject(includeInstance, f),
selfrightRequest: (f = msg.getSelfrightRequest()) && bosdyn_api_basic_command_pb.SelfRightCommand.Request.toObject(includeInstance, f),
safePowerOffRequest: (f = msg.getSafePowerOffRequest()) && bosdyn_api_basic_command_pb.SafePowerOffCommand.Request.toObject(includeInstance, f),
batteryChangePoseRequest: (f = msg.getBatteryChangePoseRequest()) && bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Request.toObject(includeInstance, f),
payloadEstimationRequest: (f = msg.getPayloadEstimationRequest()) && bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Request.toObject(includeInstance, f),
constrainedManipulationRequest: (f = msg.getConstrainedManipulationRequest()) && bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.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.FullBodyCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.FullBodyCommand.Request;
return proto.bosdyn.api.FullBodyCommand.Request.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.FullBodyCommand.Request} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.FullBodyCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.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.StopCommand.Request;
reader.readMessage(value,bosdyn_api_basic_command_pb.StopCommand.Request.deserializeBinaryFromReader);
msg.setStopRequest(value);
break;
case 2:
var value = new bosdyn_api_basic_command_pb.FreezeCommand.Request;
reader.readMessage(value,bosdyn_api_basic_command_pb.FreezeCommand.Request.deserializeBinaryFromReader);
msg.setFreezeRequest(value);
break;
case 3:
var value = new bosdyn_api_basic_command_pb.SelfRightCommand.Request;
reader.readMessage(value,bosdyn_api_basic_command_pb.SelfRightCommand.Request.deserializeBinaryFromReader);
msg.setSelfrightRequest(value);
break;
case 4:
var value = new bosdyn_api_basic_command_pb.SafePowerOffCommand.Request;
reader.readMessage(value,bosdyn_api_basic_command_pb.SafePowerOffCommand.Request.deserializeBinaryFromReader);
msg.setSafePowerOffRequest(value);
break;
case 5:
var value = new bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Request;
reader.readMessage(value,bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Request.deserializeBinaryFromReader);
msg.setBatteryChangePoseRequest(value);
break;
case 6:
var value = new bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Request;
reader.readMessage(value,bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Request.deserializeBinaryFromReader);
msg.setPayloadEstimationRequest(value);
break;
case 7:
var value = new bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Request;
reader.readMessage(value,bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Request.deserializeBinaryFromReader);
msg.setConstrainedManipulationRequest(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.FullBodyCommand.Request.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Request} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.FullBodyCommand.Request.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStopRequest();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_basic_command_pb.StopCommand.Request.serializeBinaryToWriter
);
}
f = message.getFreezeRequest();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_basic_command_pb.FreezeCommand.Request.serializeBinaryToWriter
);
}
f = message.getSelfrightRequest();
if (f != null) {
writer.writeMessage(
3,
f,
bosdyn_api_basic_command_pb.SelfRightCommand.Request.serializeBinaryToWriter
);
}
f = message.getSafePowerOffRequest();
if (f != null) {
writer.writeMessage(
4,
f,
bosdyn_api_basic_command_pb.SafePowerOffCommand.Request.serializeBinaryToWriter
);
}
f = message.getBatteryChangePoseRequest();
if (f != null) {
writer.writeMessage(
5,
f,
bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Request.serializeBinaryToWriter
);
}
f = message.getPayloadEstimationRequest();
if (f != null) {
writer.writeMessage(
6,
f,
bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Request.serializeBinaryToWriter
);
}
f = message.getConstrainedManipulationRequest();
if (f != null) {
writer.writeMessage(
7,
f,
bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Request.serializeBinaryToWriter
);
}
f = message.getParams();
if (f != null) {
writer.writeMessage(
100,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
};
/**
* optional StopCommand.Request stop_request = 1;
* @return {?proto.bosdyn.api.StopCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getStopRequest = function() {
return /** @type{?proto.bosdyn.api.StopCommand.Request} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StopCommand.Request, 1));
};
/**
* @param {?proto.bosdyn.api.StopCommand.Request|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setStopRequest = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearStopRequest = function() {
return this.setStopRequest(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.hasStopRequest = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional FreezeCommand.Request freeze_request = 2;
* @return {?proto.bosdyn.api.FreezeCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getFreezeRequest = function() {
return /** @type{?proto.bosdyn.api.FreezeCommand.Request} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.FreezeCommand.Request, 2));
};
/**
* @param {?proto.bosdyn.api.FreezeCommand.Request|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setFreezeRequest = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearFreezeRequest = function() {
return this.setFreezeRequest(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.hasFreezeRequest = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional SelfRightCommand.Request selfright_request = 3;
* @return {?proto.bosdyn.api.SelfRightCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getSelfrightRequest = function() {
return /** @type{?proto.bosdyn.api.SelfRightCommand.Request} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SelfRightCommand.Request, 3));
};
/**
* @param {?proto.bosdyn.api.SelfRightCommand.Request|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setSelfrightRequest = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearSelfrightRequest = function() {
return this.setSelfrightRequest(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.hasSelfrightRequest = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional SafePowerOffCommand.Request safe_power_off_request = 4;
* @return {?proto.bosdyn.api.SafePowerOffCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getSafePowerOffRequest = function() {
return /** @type{?proto.bosdyn.api.SafePowerOffCommand.Request} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SafePowerOffCommand.Request, 4));
};
/**
* @param {?proto.bosdyn.api.SafePowerOffCommand.Request|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setSafePowerOffRequest = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearSafePowerOffRequest = function() {
return this.setSafePowerOffRequest(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.hasSafePowerOffRequest = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional BatteryChangePoseCommand.Request battery_change_pose_request = 5;
* @return {?proto.bosdyn.api.BatteryChangePoseCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getBatteryChangePoseRequest = function() {
return /** @type{?proto.bosdyn.api.BatteryChangePoseCommand.Request} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Request, 5));
};
/**
* @param {?proto.bosdyn.api.BatteryChangePoseCommand.Request|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setBatteryChangePoseRequest = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearBatteryChangePoseRequest = function() {
return this.setBatteryChangePoseRequest(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.hasBatteryChangePoseRequest = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional PayloadEstimationCommand.Request payload_estimation_request = 6;
* @return {?proto.bosdyn.api.PayloadEstimationCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getPayloadEstimationRequest = function() {
return /** @type{?proto.bosdyn.api.PayloadEstimationCommand.Request} */ (
jspb.Message.getWrapperField(this, bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Request, 6));
};
/**
* @param {?proto.bosdyn.api.PayloadEstimationCommand.Request|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setPayloadEstimationRequest = function(value) {
return jspb.Message.setOneofWrapperField(this, 6, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearPayloadEstimationRequest = function() {
return this.setPayloadEstimationRequest(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.hasPayloadEstimationRequest = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional ConstrainedManipulationCommand.Request constrained_manipulation_request = 7;
* @return {?proto.bosdyn.api.ConstrainedManipulationCommand.Request}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.getConstrainedManipulationRequest = function() {
return /** @type{?proto.bosdyn.api.ConstrainedManipulationCommand.Request} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Request, 7));
};
/**
* @param {?proto.bosdyn.api.ConstrainedManipulationCommand.Request|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setConstrainedManipulationRequest = function(value) {
return jspb.Message.setOneofWrapperField(this, 7, proto.bosdyn.api.FullBodyCommand.Request.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearConstrainedManipulationRequest = function() {
return this.setConstrainedManipulationRequest(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.hasConstrainedManipulationRequest = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional google.protobuf.Any params = 100;
* @return {?proto.google.protobuf.Any}
*/
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.setParams = function(value) {
return jspb.Message.setWrapperField(this, 100, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Request} returns this
*/
proto.bosdyn.api.FullBodyCommand.Request.prototype.clearParams = function() {
return this.setParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Feedback.oneofGroups_ = [[1,2,3,4,5,6,7]];
/**
* @enum {number}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.FeedbackCase = {
FEEDBACK_NOT_SET: 0,
STOP_FEEDBACK: 1,
FREEZE_FEEDBACK: 2,
SELFRIGHT_FEEDBACK: 3,
SAFE_POWER_OFF_FEEDBACK: 4,
BATTERY_CHANGE_POSE_FEEDBACK: 5,
PAYLOAD_ESTIMATION_FEEDBACK: 6,
CONSTRAINED_MANIPULATION_FEEDBACK: 7
};
/**
* @return {proto.bosdyn.api.FullBodyCommand.Feedback.FeedbackCase}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getFeedbackCase = function() {
return /** @type {proto.bosdyn.api.FullBodyCommand.Feedback.FeedbackCase} */(jspb.Message.computeOneofCase(this, proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Feedback.prototype.toObject = function(opt_includeInstance) {
return proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Feedback} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.FullBodyCommand.Feedback.toObject = function(includeInstance, msg) {
var f, obj = {
stopFeedback: (f = msg.getStopFeedback()) && bosdyn_api_basic_command_pb.StopCommand.Feedback.toObject(includeInstance, f),
freezeFeedback: (f = msg.getFreezeFeedback()) && bosdyn_api_basic_command_pb.FreezeCommand.Feedback.toObject(includeInstance, f),
selfrightFeedback: (f = msg.getSelfrightFeedback()) && bosdyn_api_basic_command_pb.SelfRightCommand.Feedback.toObject(includeInstance, f),
safePowerOffFeedback: (f = msg.getSafePowerOffFeedback()) && bosdyn_api_basic_command_pb.SafePowerOffCommand.Feedback.toObject(includeInstance, f),
batteryChangePoseFeedback: (f = msg.getBatteryChangePoseFeedback()) && bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Feedback.toObject(includeInstance, f),
payloadEstimationFeedback: (f = msg.getPayloadEstimationFeedback()) && bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Feedback.toObject(includeInstance, f),
constrainedManipulationFeedback: (f = msg.getConstrainedManipulationFeedback()) && bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.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.FullBodyCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bosdyn.api.FullBodyCommand.Feedback;
return proto.bosdyn.api.FullBodyCommand.Feedback.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bosdyn.api.FullBodyCommand.Feedback} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.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.StopCommand.Feedback;
reader.readMessage(value,bosdyn_api_basic_command_pb.StopCommand.Feedback.deserializeBinaryFromReader);
msg.setStopFeedback(value);
break;
case 2:
var value = new bosdyn_api_basic_command_pb.FreezeCommand.Feedback;
reader.readMessage(value,bosdyn_api_basic_command_pb.FreezeCommand.Feedback.deserializeBinaryFromReader);
msg.setFreezeFeedback(value);
break;
case 3:
var value = new bosdyn_api_basic_command_pb.SelfRightCommand.Feedback;
reader.readMessage(value,bosdyn_api_basic_command_pb.SelfRightCommand.Feedback.deserializeBinaryFromReader);
msg.setSelfrightFeedback(value);
break;
case 4:
var value = new bosdyn_api_basic_command_pb.SafePowerOffCommand.Feedback;
reader.readMessage(value,bosdyn_api_basic_command_pb.SafePowerOffCommand.Feedback.deserializeBinaryFromReader);
msg.setSafePowerOffFeedback(value);
break;
case 5:
var value = new bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Feedback;
reader.readMessage(value,bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Feedback.deserializeBinaryFromReader);
msg.setBatteryChangePoseFeedback(value);
break;
case 6:
var value = new bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Feedback;
reader.readMessage(value,bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Feedback.deserializeBinaryFromReader);
msg.setPayloadEstimationFeedback(value);
break;
case 7:
var value = new bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Feedback;
reader.readMessage(value,bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Feedback.deserializeBinaryFromReader);
msg.setConstrainedManipulationFeedback(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.FullBodyCommand.Feedback.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Feedback} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bosdyn.api.FullBodyCommand.Feedback.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStopFeedback();
if (f != null) {
writer.writeMessage(
1,
f,
bosdyn_api_basic_command_pb.StopCommand.Feedback.serializeBinaryToWriter
);
}
f = message.getFreezeFeedback();
if (f != null) {
writer.writeMessage(
2,
f,
bosdyn_api_basic_command_pb.FreezeCommand.Feedback.serializeBinaryToWriter
);
}
f = message.getSelfrightFeedback();
if (f != null) {
writer.writeMessage(
3,
f,
bosdyn_api_basic_command_pb.SelfRightCommand.Feedback.serializeBinaryToWriter
);
}
f = message.getSafePowerOffFeedback();
if (f != null) {
writer.writeMessage(
4,
f,
bosdyn_api_basic_command_pb.SafePowerOffCommand.Feedback.serializeBinaryToWriter
);
}
f = message.getBatteryChangePoseFeedback();
if (f != null) {
writer.writeMessage(
5,
f,
bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Feedback.serializeBinaryToWriter
);
}
f = message.getPayloadEstimationFeedback();
if (f != null) {
writer.writeMessage(
6,
f,
bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Feedback.serializeBinaryToWriter
);
}
f = message.getConstrainedManipulationFeedback();
if (f != null) {
writer.writeMessage(
7,
f,
bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Feedback.serializeBinaryToWriter
);
}
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
100,
f
);
}
};
/**
* optional StopCommand.Feedback stop_feedback = 1;
* @return {?proto.bosdyn.api.StopCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getStopFeedback = function() {
return /** @type{?proto.bosdyn.api.StopCommand.Feedback} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.StopCommand.Feedback, 1));
};
/**
* @param {?proto.bosdyn.api.StopCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setStopFeedback = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.clearStopFeedback = function() {
return this.setStopFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.hasStopFeedback = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional FreezeCommand.Feedback freeze_feedback = 2;
* @return {?proto.bosdyn.api.FreezeCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getFreezeFeedback = function() {
return /** @type{?proto.bosdyn.api.FreezeCommand.Feedback} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.FreezeCommand.Feedback, 2));
};
/**
* @param {?proto.bosdyn.api.FreezeCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setFreezeFeedback = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.clearFreezeFeedback = function() {
return this.setFreezeFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.hasFreezeFeedback = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional SelfRightCommand.Feedback selfright_feedback = 3;
* @return {?proto.bosdyn.api.SelfRightCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getSelfrightFeedback = function() {
return /** @type{?proto.bosdyn.api.SelfRightCommand.Feedback} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SelfRightCommand.Feedback, 3));
};
/**
* @param {?proto.bosdyn.api.SelfRightCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setSelfrightFeedback = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.clearSelfrightFeedback = function() {
return this.setSelfrightFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.hasSelfrightFeedback = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional SafePowerOffCommand.Feedback safe_power_off_feedback = 4;
* @return {?proto.bosdyn.api.SafePowerOffCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getSafePowerOffFeedback = function() {
return /** @type{?proto.bosdyn.api.SafePowerOffCommand.Feedback} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.SafePowerOffCommand.Feedback, 4));
};
/**
* @param {?proto.bosdyn.api.SafePowerOffCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setSafePowerOffFeedback = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.clearSafePowerOffFeedback = function() {
return this.setSafePowerOffFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.hasSafePowerOffFeedback = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional BatteryChangePoseCommand.Feedback battery_change_pose_feedback = 5;
* @return {?proto.bosdyn.api.BatteryChangePoseCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getBatteryChangePoseFeedback = function() {
return /** @type{?proto.bosdyn.api.BatteryChangePoseCommand.Feedback} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.BatteryChangePoseCommand.Feedback, 5));
};
/**
* @param {?proto.bosdyn.api.BatteryChangePoseCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setBatteryChangePoseFeedback = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.clearBatteryChangePoseFeedback = function() {
return this.setBatteryChangePoseFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.hasBatteryChangePoseFeedback = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional PayloadEstimationCommand.Feedback payload_estimation_feedback = 6;
* @return {?proto.bosdyn.api.PayloadEstimationCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getPayloadEstimationFeedback = function() {
return /** @type{?proto.bosdyn.api.PayloadEstimationCommand.Feedback} */ (
jspb.Message.getWrapperField(this, bosdyn_api_payload_estimation_pb.PayloadEstimationCommand.Feedback, 6));
};
/**
* @param {?proto.bosdyn.api.PayloadEstimationCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setPayloadEstimationFeedback = function(value) {
return jspb.Message.setOneofWrapperField(this, 6, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.clearPayloadEstimationFeedback = function() {
return this.setPayloadEstimationFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.hasPayloadEstimationFeedback = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional ConstrainedManipulationCommand.Feedback constrained_manipulation_feedback = 7;
* @return {?proto.bosdyn.api.ConstrainedManipulationCommand.Feedback}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.getConstrainedManipulationFeedback = function() {
return /** @type{?proto.bosdyn.api.ConstrainedManipulationCommand.Feedback} */ (
jspb.Message.getWrapperField(this, bosdyn_api_basic_command_pb.ConstrainedManipulationCommand.Feedback, 7));
};
/**
* @param {?proto.bosdyn.api.ConstrainedManipulationCommand.Feedback|undefined} value
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setConstrainedManipulationFeedback = function(value) {
return jspb.Message.setOneofWrapperField(this, 7, proto.bosdyn.api.FullBodyCommand.Feedback.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bosdyn.api.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.clearConstrainedManipulationFeedback = function() {
return this.setConstrainedManipulationFeedback(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.hasConstrainedManipulationFeedback = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional RobotCommandFeedbackStatus.Status status = 100;
* @return {!proto.bosdyn.api.RobotCommandFeedbackStatus.Status}
*/
proto.bosdyn.api.FullBodyCommand.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.FullBodyCommand.Feedback} returns this
*/
proto.bosdyn.api.FullBodyCommand.Feedback.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 100, value);
};
goog.object.extend(exports, proto.bosdyn.api);