UNPKG

spot-sdk-js

Version:

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

1,648 lines (1,432 loc) 71 kB
// source: bosdyn/api/payload.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_geometry_pb = require('../../bosdyn/api/geometry_pb.js'); goog.object.extend(proto, bosdyn_api_geometry_pb); var bosdyn_api_header_pb = require('../../bosdyn/api/header_pb.js'); goog.object.extend(proto, bosdyn_api_header_pb); var bosdyn_api_robot_id_pb = require('../../bosdyn/api/robot_id_pb.js'); goog.object.extend(proto, bosdyn_api_robot_id_pb); goog.exportSymbol('proto.bosdyn.api.JointLimits', null, global); goog.exportSymbol('proto.bosdyn.api.ListPayloadsRequest', null, global); goog.exportSymbol('proto.bosdyn.api.ListPayloadsResponse', null, global); goog.exportSymbol('proto.bosdyn.api.MomentOfIntertia', null, global); goog.exportSymbol('proto.bosdyn.api.MountFrameName', null, global); goog.exportSymbol('proto.bosdyn.api.Payload', null, global); goog.exportSymbol('proto.bosdyn.api.PayloadMassVolumeProperties', null, global); goog.exportSymbol('proto.bosdyn.api.PayloadPreset', 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.Payload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.Payload.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.Payload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.Payload.displayName = 'proto.bosdyn.api.Payload'; } /** * 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.PayloadPreset = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.PayloadPreset.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.PayloadPreset, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.PayloadPreset.displayName = 'proto.bosdyn.api.PayloadPreset'; } /** * 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.PayloadMassVolumeProperties = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.PayloadMassVolumeProperties.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.PayloadMassVolumeProperties, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.PayloadMassVolumeProperties.displayName = 'proto.bosdyn.api.PayloadMassVolumeProperties'; } /** * 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.MomentOfIntertia = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.MomentOfIntertia, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.MomentOfIntertia.displayName = 'proto.bosdyn.api.MomentOfIntertia'; } /** * 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.JointLimits = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.JointLimits.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.JointLimits, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.JointLimits.displayName = 'proto.bosdyn.api.JointLimits'; } /** * 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.ListPayloadsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bosdyn.api.ListPayloadsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ListPayloadsRequest.displayName = 'proto.bosdyn.api.ListPayloadsRequest'; } /** * 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.ListPayloadsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bosdyn.api.ListPayloadsResponse.repeatedFields_, null); }; goog.inherits(proto.bosdyn.api.ListPayloadsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.bosdyn.api.ListPayloadsResponse.displayName = 'proto.bosdyn.api.ListPayloadsResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.bosdyn.api.Payload.repeatedFields_ = [9,11]; 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.Payload.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.Payload.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.Payload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.Payload.toObject = function(includeInstance, msg) { var f, obj = { guid: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, ""), description: jspb.Message.getFieldWithDefault(msg, 3, ""), labelPrefixList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, isAuthorized: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), isEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), isNoncomputePayload: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), version: (f = msg.getVersion()) && bosdyn_api_robot_id_pb.SoftwareVersion.toObject(includeInstance, f), bodyTformPayload: (f = msg.getBodyTformPayload()) && bosdyn_api_geometry_pb.SE3Pose.toObject(includeInstance, f), mountTformPayload: (f = msg.getMountTformPayload()) && bosdyn_api_geometry_pb.SE3Pose.toObject(includeInstance, f), mountFrameName: jspb.Message.getFieldWithDefault(msg, 13, 0), massVolumeProperties: (f = msg.getMassVolumeProperties()) && proto.bosdyn.api.PayloadMassVolumeProperties.toObject(includeInstance, f), presetConfigurationsList: jspb.Message.toObjectList(msg.getPresetConfigurationsList(), proto.bosdyn.api.PayloadPreset.toObject, includeInstance) }; 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.Payload} */ proto.bosdyn.api.Payload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.Payload; return proto.bosdyn.api.Payload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.Payload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.Payload} */ proto.bosdyn.api.Payload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setGuid(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; case 9: var value = /** @type {string} */ (reader.readString()); msg.addLabelPrefix(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsAuthorized(value); break; case 5: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsEnabled(value); break; case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsNoncomputePayload(value); break; case 12: var value = new bosdyn_api_robot_id_pb.SoftwareVersion; reader.readMessage(value,bosdyn_api_robot_id_pb.SoftwareVersion.deserializeBinaryFromReader); msg.setVersion(value); break; case 7: var value = new bosdyn_api_geometry_pb.SE3Pose; reader.readMessage(value,bosdyn_api_geometry_pb.SE3Pose.deserializeBinaryFromReader); msg.setBodyTformPayload(value); break; case 8: var value = new bosdyn_api_geometry_pb.SE3Pose; reader.readMessage(value,bosdyn_api_geometry_pb.SE3Pose.deserializeBinaryFromReader); msg.setMountTformPayload(value); break; case 13: var value = /** @type {!proto.bosdyn.api.MountFrameName} */ (reader.readEnum()); msg.setMountFrameName(value); break; case 10: var value = new proto.bosdyn.api.PayloadMassVolumeProperties; reader.readMessage(value,proto.bosdyn.api.PayloadMassVolumeProperties.deserializeBinaryFromReader); msg.setMassVolumeProperties(value); break; case 11: var value = new proto.bosdyn.api.PayloadPreset; reader.readMessage(value,proto.bosdyn.api.PayloadPreset.deserializeBinaryFromReader); msg.addPresetConfigurations(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.Payload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.Payload.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.Payload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.Payload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGuid(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getName(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getDescription(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getLabelPrefixList(); if (f.length > 0) { writer.writeRepeatedString( 9, f ); } f = message.getIsAuthorized(); if (f) { writer.writeBool( 4, f ); } f = message.getIsEnabled(); if (f) { writer.writeBool( 5, f ); } f = message.getIsNoncomputePayload(); if (f) { writer.writeBool( 6, f ); } f = message.getVersion(); if (f != null) { writer.writeMessage( 12, f, bosdyn_api_robot_id_pb.SoftwareVersion.serializeBinaryToWriter ); } f = message.getBodyTformPayload(); if (f != null) { writer.writeMessage( 7, f, bosdyn_api_geometry_pb.SE3Pose.serializeBinaryToWriter ); } f = message.getMountTformPayload(); if (f != null) { writer.writeMessage( 8, f, bosdyn_api_geometry_pb.SE3Pose.serializeBinaryToWriter ); } f = message.getMountFrameName(); if (f !== 0.0) { writer.writeEnum( 13, f ); } f = message.getMassVolumeProperties(); if (f != null) { writer.writeMessage( 10, f, proto.bosdyn.api.PayloadMassVolumeProperties.serializeBinaryToWriter ); } f = message.getPresetConfigurationsList(); if (f.length > 0) { writer.writeRepeatedMessage( 11, f, proto.bosdyn.api.PayloadPreset.serializeBinaryToWriter ); } }; /** * optional string GUID = 1; * @return {string} */ proto.bosdyn.api.Payload.prototype.getGuid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setGuid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string name = 2; * @return {string} */ proto.bosdyn.api.Payload.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string description = 3; * @return {string} */ proto.bosdyn.api.Payload.prototype.getDescription = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setDescription = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * repeated string label_prefix = 9; * @return {!Array<string>} */ proto.bosdyn.api.Payload.prototype.getLabelPrefixList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 9)); }; /** * @param {!Array<string>} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setLabelPrefixList = function(value) { return jspb.Message.setField(this, 9, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.addLabelPrefix = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 9, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.clearLabelPrefixList = function() { return this.setLabelPrefixList([]); }; /** * optional bool is_authorized = 4; * @return {boolean} */ proto.bosdyn.api.Payload.prototype.getIsAuthorized = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setIsAuthorized = function(value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; /** * optional bool is_enabled = 5; * @return {boolean} */ proto.bosdyn.api.Payload.prototype.getIsEnabled = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** * @param {boolean} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setIsEnabled = function(value) { return jspb.Message.setProto3BooleanField(this, 5, value); }; /** * optional bool is_noncompute_payload = 6; * @return {boolean} */ proto.bosdyn.api.Payload.prototype.getIsNoncomputePayload = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** * @param {boolean} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setIsNoncomputePayload = function(value) { return jspb.Message.setProto3BooleanField(this, 6, value); }; /** * optional SoftwareVersion version = 12; * @return {?proto.bosdyn.api.SoftwareVersion} */ proto.bosdyn.api.Payload.prototype.getVersion = function() { return /** @type{?proto.bosdyn.api.SoftwareVersion} */ ( jspb.Message.getWrapperField(this, bosdyn_api_robot_id_pb.SoftwareVersion, 12)); }; /** * @param {?proto.bosdyn.api.SoftwareVersion|undefined} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setVersion = function(value) { return jspb.Message.setWrapperField(this, 12, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.clearVersion = function() { return this.setVersion(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.Payload.prototype.hasVersion = function() { return jspb.Message.getField(this, 12) != null; }; /** * optional SE3Pose body_tform_payload = 7; * @return {?proto.bosdyn.api.SE3Pose} */ proto.bosdyn.api.Payload.prototype.getBodyTformPayload = function() { return /** @type{?proto.bosdyn.api.SE3Pose} */ ( jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.SE3Pose, 7)); }; /** * @param {?proto.bosdyn.api.SE3Pose|undefined} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setBodyTformPayload = function(value) { return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.clearBodyTformPayload = function() { return this.setBodyTformPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.Payload.prototype.hasBodyTformPayload = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional SE3Pose mount_tform_payload = 8; * @return {?proto.bosdyn.api.SE3Pose} */ proto.bosdyn.api.Payload.prototype.getMountTformPayload = function() { return /** @type{?proto.bosdyn.api.SE3Pose} */ ( jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.SE3Pose, 8)); }; /** * @param {?proto.bosdyn.api.SE3Pose|undefined} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setMountTformPayload = function(value) { return jspb.Message.setWrapperField(this, 8, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.clearMountTformPayload = function() { return this.setMountTformPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.Payload.prototype.hasMountTformPayload = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional MountFrameName mount_frame_name = 13; * @return {!proto.bosdyn.api.MountFrameName} */ proto.bosdyn.api.Payload.prototype.getMountFrameName = function() { return /** @type {!proto.bosdyn.api.MountFrameName} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** * @param {!proto.bosdyn.api.MountFrameName} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setMountFrameName = function(value) { return jspb.Message.setProto3EnumField(this, 13, value); }; /** * optional PayloadMassVolumeProperties mass_volume_properties = 10; * @return {?proto.bosdyn.api.PayloadMassVolumeProperties} */ proto.bosdyn.api.Payload.prototype.getMassVolumeProperties = function() { return /** @type{?proto.bosdyn.api.PayloadMassVolumeProperties} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.PayloadMassVolumeProperties, 10)); }; /** * @param {?proto.bosdyn.api.PayloadMassVolumeProperties|undefined} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setMassVolumeProperties = function(value) { return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.clearMassVolumeProperties = function() { return this.setMassVolumeProperties(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.Payload.prototype.hasMassVolumeProperties = function() { return jspb.Message.getField(this, 10) != null; }; /** * repeated PayloadPreset preset_configurations = 11; * @return {!Array<!proto.bosdyn.api.PayloadPreset>} */ proto.bosdyn.api.Payload.prototype.getPresetConfigurationsList = function() { return /** @type{!Array<!proto.bosdyn.api.PayloadPreset>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.bosdyn.api.PayloadPreset, 11)); }; /** * @param {!Array<!proto.bosdyn.api.PayloadPreset>} value * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.setPresetConfigurationsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 11, value); }; /** * @param {!proto.bosdyn.api.PayloadPreset=} opt_value * @param {number=} opt_index * @return {!proto.bosdyn.api.PayloadPreset} */ proto.bosdyn.api.Payload.prototype.addPresetConfigurations = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.bosdyn.api.PayloadPreset, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.bosdyn.api.Payload} returns this */ proto.bosdyn.api.Payload.prototype.clearPresetConfigurationsList = function() { return this.setPresetConfigurationsList([]); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.bosdyn.api.PayloadPreset.repeatedFields_ = [5]; 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.PayloadPreset.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.PayloadPreset.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.PayloadPreset} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.PayloadPreset.toObject = function(includeInstance, msg) { var f, obj = { presetName: jspb.Message.getFieldWithDefault(msg, 1, ""), description: jspb.Message.getFieldWithDefault(msg, 2, ""), mountTformPayload: (f = msg.getMountTformPayload()) && bosdyn_api_geometry_pb.SE3Pose.toObject(includeInstance, f), mountFrameName: jspb.Message.getFieldWithDefault(msg, 6, 0), massVolumeProperties: (f = msg.getMassVolumeProperties()) && proto.bosdyn.api.PayloadMassVolumeProperties.toObject(includeInstance, f), labelPrefixList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : 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.PayloadPreset} */ proto.bosdyn.api.PayloadPreset.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.PayloadPreset; return proto.bosdyn.api.PayloadPreset.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.PayloadPreset} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.PayloadPreset} */ proto.bosdyn.api.PayloadPreset.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setPresetName(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; case 3: var value = new bosdyn_api_geometry_pb.SE3Pose; reader.readMessage(value,bosdyn_api_geometry_pb.SE3Pose.deserializeBinaryFromReader); msg.setMountTformPayload(value); break; case 6: var value = /** @type {!proto.bosdyn.api.MountFrameName} */ (reader.readEnum()); msg.setMountFrameName(value); break; case 4: var value = new proto.bosdyn.api.PayloadMassVolumeProperties; reader.readMessage(value,proto.bosdyn.api.PayloadMassVolumeProperties.deserializeBinaryFromReader); msg.setMassVolumeProperties(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.addLabelPrefix(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.PayloadPreset.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.PayloadPreset.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.PayloadPreset} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.PayloadPreset.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPresetName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDescription(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getMountTformPayload(); if (f != null) { writer.writeMessage( 3, f, bosdyn_api_geometry_pb.SE3Pose.serializeBinaryToWriter ); } f = message.getMountFrameName(); if (f !== 0.0) { writer.writeEnum( 6, f ); } f = message.getMassVolumeProperties(); if (f != null) { writer.writeMessage( 4, f, proto.bosdyn.api.PayloadMassVolumeProperties.serializeBinaryToWriter ); } f = message.getLabelPrefixList(); if (f.length > 0) { writer.writeRepeatedString( 5, f ); } }; /** * optional string preset_name = 1; * @return {string} */ proto.bosdyn.api.PayloadPreset.prototype.getPresetName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.setPresetName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string description = 2; * @return {string} */ proto.bosdyn.api.PayloadPreset.prototype.getDescription = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.setDescription = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional SE3Pose mount_tform_payload = 3; * @return {?proto.bosdyn.api.SE3Pose} */ proto.bosdyn.api.PayloadPreset.prototype.getMountTformPayload = function() { return /** @type{?proto.bosdyn.api.SE3Pose} */ ( jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.SE3Pose, 3)); }; /** * @param {?proto.bosdyn.api.SE3Pose|undefined} value * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.setMountTformPayload = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.clearMountTformPayload = function() { return this.setMountTformPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.PayloadPreset.prototype.hasMountTformPayload = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional MountFrameName mount_frame_name = 6; * @return {!proto.bosdyn.api.MountFrameName} */ proto.bosdyn.api.PayloadPreset.prototype.getMountFrameName = function() { return /** @type {!proto.bosdyn.api.MountFrameName} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {!proto.bosdyn.api.MountFrameName} value * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.setMountFrameName = function(value) { return jspb.Message.setProto3EnumField(this, 6, value); }; /** * optional PayloadMassVolumeProperties mass_volume_properties = 4; * @return {?proto.bosdyn.api.PayloadMassVolumeProperties} */ proto.bosdyn.api.PayloadPreset.prototype.getMassVolumeProperties = function() { return /** @type{?proto.bosdyn.api.PayloadMassVolumeProperties} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.PayloadMassVolumeProperties, 4)); }; /** * @param {?proto.bosdyn.api.PayloadMassVolumeProperties|undefined} value * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.setMassVolumeProperties = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.clearMassVolumeProperties = function() { return this.setMassVolumeProperties(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.PayloadPreset.prototype.hasMassVolumeProperties = function() { return jspb.Message.getField(this, 4) != null; }; /** * repeated string label_prefix = 5; * @return {!Array<string>} */ proto.bosdyn.api.PayloadPreset.prototype.getLabelPrefixList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5)); }; /** * @param {!Array<string>} value * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.setLabelPrefixList = function(value) { return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.addLabelPrefix = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.bosdyn.api.PayloadPreset} returns this */ proto.bosdyn.api.PayloadPreset.prototype.clearLabelPrefixList = function() { return this.setLabelPrefixList([]); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.bosdyn.api.PayloadMassVolumeProperties.repeatedFields_ = [5,6]; 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.PayloadMassVolumeProperties.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.PayloadMassVolumeProperties.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.PayloadMassVolumeProperties} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.PayloadMassVolumeProperties.toObject = function(includeInstance, msg) { var f, obj = { totalMass: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), comPosRtPayload: (f = msg.getComPosRtPayload()) && bosdyn_api_geometry_pb.Vec3.toObject(includeInstance, f), moiTensor: (f = msg.getMoiTensor()) && proto.bosdyn.api.MomentOfIntertia.toObject(includeInstance, f), boundingBoxList: jspb.Message.toObjectList(msg.getBoundingBoxList(), bosdyn_api_geometry_pb.Box3WithFrame.toObject, includeInstance), jointLimitsList: jspb.Message.toObjectList(msg.getJointLimitsList(), proto.bosdyn.api.JointLimits.toObject, includeInstance) }; 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.PayloadMassVolumeProperties} */ proto.bosdyn.api.PayloadMassVolumeProperties.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.PayloadMassVolumeProperties; return proto.bosdyn.api.PayloadMassVolumeProperties.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.PayloadMassVolumeProperties} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} */ proto.bosdyn.api.PayloadMassVolumeProperties.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = /** @type {number} */ (reader.readFloat()); msg.setTotalMass(value); break; case 3: var value = new bosdyn_api_geometry_pb.Vec3; reader.readMessage(value,bosdyn_api_geometry_pb.Vec3.deserializeBinaryFromReader); msg.setComPosRtPayload(value); break; case 4: var value = new proto.bosdyn.api.MomentOfIntertia; reader.readMessage(value,proto.bosdyn.api.MomentOfIntertia.deserializeBinaryFromReader); msg.setMoiTensor(value); break; case 5: var value = new bosdyn_api_geometry_pb.Box3WithFrame; reader.readMessage(value,bosdyn_api_geometry_pb.Box3WithFrame.deserializeBinaryFromReader); msg.addBoundingBox(value); break; case 6: var value = new proto.bosdyn.api.JointLimits; reader.readMessage(value,proto.bosdyn.api.JointLimits.deserializeBinaryFromReader); msg.addJointLimits(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.PayloadMassVolumeProperties.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.PayloadMassVolumeProperties} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.PayloadMassVolumeProperties.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTotalMass(); if (f !== 0.0) { writer.writeFloat( 2, f ); } f = message.getComPosRtPayload(); if (f != null) { writer.writeMessage( 3, f, bosdyn_api_geometry_pb.Vec3.serializeBinaryToWriter ); } f = message.getMoiTensor(); if (f != null) { writer.writeMessage( 4, f, proto.bosdyn.api.MomentOfIntertia.serializeBinaryToWriter ); } f = message.getBoundingBoxList(); if (f.length > 0) { writer.writeRepeatedMessage( 5, f, bosdyn_api_geometry_pb.Box3WithFrame.serializeBinaryToWriter ); } f = message.getJointLimitsList(); if (f.length > 0) { writer.writeRepeatedMessage( 6, f, proto.bosdyn.api.JointLimits.serializeBinaryToWriter ); } }; /** * optional float total_mass = 2; * @return {number} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.getTotalMass = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); }; /** * @param {number} value * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.setTotalMass = function(value) { return jspb.Message.setProto3FloatField(this, 2, value); }; /** * optional Vec3 com_pos_rt_payload = 3; * @return {?proto.bosdyn.api.Vec3} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.getComPosRtPayload = function() { return /** @type{?proto.bosdyn.api.Vec3} */ ( jspb.Message.getWrapperField(this, bosdyn_api_geometry_pb.Vec3, 3)); }; /** * @param {?proto.bosdyn.api.Vec3|undefined} value * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.setComPosRtPayload = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.clearComPosRtPayload = function() { return this.setComPosRtPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.hasComPosRtPayload = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional MomentOfIntertia moi_tensor = 4; * @return {?proto.bosdyn.api.MomentOfIntertia} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.getMoiTensor = function() { return /** @type{?proto.bosdyn.api.MomentOfIntertia} */ ( jspb.Message.getWrapperField(this, proto.bosdyn.api.MomentOfIntertia, 4)); }; /** * @param {?proto.bosdyn.api.MomentOfIntertia|undefined} value * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.setMoiTensor = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.clearMoiTensor = function() { return this.setMoiTensor(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.hasMoiTensor = function() { return jspb.Message.getField(this, 4) != null; }; /** * repeated Box3WithFrame bounding_box = 5; * @return {!Array<!proto.bosdyn.api.Box3WithFrame>} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.getBoundingBoxList = function() { return /** @type{!Array<!proto.bosdyn.api.Box3WithFrame>} */ ( jspb.Message.getRepeatedWrapperField(this, bosdyn_api_geometry_pb.Box3WithFrame, 5)); }; /** * @param {!Array<!proto.bosdyn.api.Box3WithFrame>} value * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.setBoundingBoxList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** * @param {!proto.bosdyn.api.Box3WithFrame=} opt_value * @param {number=} opt_index * @return {!proto.bosdyn.api.Box3WithFrame} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.addBoundingBox = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.bosdyn.api.Box3WithFrame, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.clearBoundingBoxList = function() { return this.setBoundingBoxList([]); }; /** * repeated JointLimits joint_limits = 6; * @return {!Array<!proto.bosdyn.api.JointLimits>} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.getJointLimitsList = function() { return /** @type{!Array<!proto.bosdyn.api.JointLimits>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.bosdyn.api.JointLimits, 6)); }; /** * @param {!Array<!proto.bosdyn.api.JointLimits>} value * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.setJointLimitsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 6, value); }; /** * @param {!proto.bosdyn.api.JointLimits=} opt_value * @param {number=} opt_index * @return {!proto.bosdyn.api.JointLimits} */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.addJointLimits = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.bosdyn.api.JointLimits, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.bosdyn.api.PayloadMassVolumeProperties} returns this */ proto.bosdyn.api.PayloadMassVolumeProperties.prototype.clearJointLimitsList = function() { return this.setJointLimitsList([]); }; 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.MomentOfIntertia.prototype.toObject = function(opt_includeInstance) { return proto.bosdyn.api.MomentOfIntertia.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.MomentOfIntertia} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MomentOfIntertia.toObject = function(includeInstance, msg) { var f, obj = { xx: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), yy: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), zz: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), xy: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), xz: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0), yz: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.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.MomentOfIntertia} */ proto.bosdyn.api.MomentOfIntertia.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bosdyn.api.MomentOfIntertia; return proto.bosdyn.api.MomentOfIntertia.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bosdyn.api.MomentOfIntertia} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bosdyn.api.MomentOfIntertia} */ proto.bosdyn.api.MomentOfIntertia.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = /** @type {number} */ (reader.readFloat()); msg.setXx(value); break; case 3: var value = /** @type {number} */ (reader.readFloat()); msg.setYy(value); break; case 4: var value = /** @type {number} */ (reader.readFloat()); msg.setZz(value); break; case 5: var value = /** @type {number} */ (reader.readFloat()); msg.setXy(value); break; case 6: var value = /** @type {number} */ (reader.readFloat()); msg.setXz(value); break; case 7: var value = /** @type {number} */ (reader.readFloat()); msg.setYz(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bosdyn.api.MomentOfIntertia.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bosdyn.api.MomentOfIntertia.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.MomentOfIntertia} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bosdyn.api.MomentOfIntertia.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getXx(); if (f !== 0.0) { writer.writeFloat( 2, f ); } f = message.getYy(); if (f !== 0.0) { writer.writeFloat( 3, f ); } f = message.getZz(); if (f !== 0.0) { writer.writeFloat( 4, f ); } f = message.getXy(); if (f !== 0.0) { writer.writeFloat( 5, f