// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: PMotion.proto
package messages;
/**
* Protobuf type {@code messages.PositionHeadCommand}
*/
public final class PositionHeadCommand extends
com.google.protobuf.GeneratedMessage
implements PositionHeadCommandOrBuilder {
// Use PositionHeadCommand.newBuilder() to construct.
private PositionHeadCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private PositionHeadCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final PositionHeadCommand defaultInstance;
public static PositionHeadCommand getDefaultInstance() {
return defaultInstance;
}
public PositionHeadCommand getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PositionHeadCommand(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 13: {
bitField0_ |= 0x00000001;
headYaw_ = input.readFloat();
break;
}
case 21: {
bitField0_ |= 0x00000002;
headPitch_ = input.readFloat();
break;
}
case 29: {
bitField0_ |= 0x00000004;
maxSpeedYaw_ = input.readFloat();
break;
}
case 37: {
bitField0_ |= 0x00000008;
maxSpeedPitch_ = input.readFloat();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return messages._File_PMotion.internal_static_messages_PositionHeadCommand_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return messages._File_PMotion.internal_static_messages_PositionHeadCommand_fieldAccessorTable
.ensureFieldAccessorsInitialized(
messages.PositionHeadCommand.class, messages.PositionHeadCommand.Builder.class);
}
public static com.google.protobuf.Parser<PositionHeadCommand> PARSER =
new com.google.protobuf.AbstractParser<PositionHeadCommand>() {
public PositionHeadCommand parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PositionHeadCommand(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser<PositionHeadCommand> getParserForType() {
return PARSER;
}
private int bitField0_;
// optional float head_yaw = 1;
public static final int HEAD_YAW_FIELD_NUMBER = 1;
private float headYaw_;
/**
* <code>optional float head_yaw = 1;</code>
*/
public boolean hasHeadYaw() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional float head_yaw = 1;</code>
*/
public float getHeadYaw() {
return headYaw_;
}
// optional float head_pitch = 2;
public static final int HEAD_PITCH_FIELD_NUMBER = 2;
private float headPitch_;
/**
* <code>optional float head_pitch = 2;</code>
*/
public boolean hasHeadPitch() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>optional float head_pitch = 2;</code>
*/
public float getHeadPitch() {
return headPitch_;
}
// optional float max_speed_yaw = 3 [default = -1];
public static final int MAX_SPEED_YAW_FIELD_NUMBER = 3;
private float maxSpeedYaw_;
/**
* <code>optional float max_speed_yaw = 3 [default = -1];</code>
*/
public boolean hasMaxSpeedYaw() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional float max_speed_yaw = 3 [default = -1];</code>
*/
public float getMaxSpeedYaw() {
return maxSpeedYaw_;
}
// optional float max_speed_pitch = 4 [default = -1];
public static final int MAX_SPEED_PITCH_FIELD_NUMBER = 4;
private float maxSpeedPitch_;
/**
* <code>optional float max_speed_pitch = 4 [default = -1];</code>
*/
public boolean hasMaxSpeedPitch() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional float max_speed_pitch = 4 [default = -1];</code>
*/
public float getMaxSpeedPitch() {
return maxSpeedPitch_;
}
private void initFields() {
headYaw_ = 0F;
headPitch_ = 0F;
maxSpeedYaw_ = -1F;
maxSpeedPitch_ = -1F;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeFloat(1, headYaw_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeFloat(2, headPitch_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeFloat(3, maxSpeedYaw_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeFloat(4, maxSpeedPitch_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(1, headYaw_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, headPitch_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, maxSpeedYaw_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(4, maxSpeedPitch_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static messages.PositionHeadCommand parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static messages.PositionHeadCommand parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static messages.PositionHeadCommand parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static messages.PositionHeadCommand parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static messages.PositionHeadCommand parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static messages.PositionHeadCommand parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static messages.PositionHeadCommand parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static messages.PositionHeadCommand parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static messages.PositionHeadCommand parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static messages.PositionHeadCommand parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(messages.PositionHeadCommand prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code messages.PositionHeadCommand}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder>
implements messages.PositionHeadCommandOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return messages._File_PMotion.internal_static_messages_PositionHeadCommand_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return messages._File_PMotion.internal_static_messages_PositionHeadCommand_fieldAccessorTable
.ensureFieldAccessorsInitialized(
messages.PositionHeadCommand.class, messages.PositionHeadCommand.Builder.class);
}
// Construct using messages.PositionHeadCommand.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
headYaw_ = 0F;
bitField0_ = (bitField0_ & ~0x00000001);
headPitch_ = 0F;
bitField0_ = (bitField0_ & ~0x00000002);
maxSpeedYaw_ = -1F;
bitField0_ = (bitField0_ & ~0x00000004);
maxSpeedPitch_ = -1F;
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return messages._File_PMotion.internal_static_messages_PositionHeadCommand_descriptor;
}
public messages.PositionHeadCommand getDefaultInstanceForType() {
return messages.PositionHeadCommand.getDefaultInstance();
}
public messages.PositionHeadCommand build() {
messages.PositionHeadCommand result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public messages.PositionHeadCommand buildPartial() {
messages.PositionHeadCommand result = new messages.PositionHeadCommand(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.headYaw_ = headYaw_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.headPitch_ = headPitch_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.maxSpeedYaw_ = maxSpeedYaw_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.maxSpeedPitch_ = maxSpeedPitch_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof messages.PositionHeadCommand) {
return mergeFrom((messages.PositionHeadCommand)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(messages.PositionHeadCommand other) {
if (other == messages.PositionHeadCommand.getDefaultInstance()) return this;
if (other.hasHeadYaw()) {
setHeadYaw(other.getHeadYaw());
}
if (other.hasHeadPitch()) {
setHeadPitch(other.getHeadPitch());
}
if (other.hasMaxSpeedYaw()) {
setMaxSpeedYaw(other.getMaxSpeedYaw());
}
if (other.hasMaxSpeedPitch()) {
setMaxSpeedPitch(other.getMaxSpeedPitch());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
messages.PositionHeadCommand parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (messages.PositionHeadCommand) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional float head_yaw = 1;
private float headYaw_ ;
/**
* <code>optional float head_yaw = 1;</code>
*/
public boolean hasHeadYaw() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* <code>optional float head_yaw = 1;</code>
*/
public float getHeadYaw() {
return headYaw_;
}
/**
* <code>optional float head_yaw = 1;</code>
*/
public Builder setHeadYaw(float value) {
bitField0_ |= 0x00000001;
headYaw_ = value;
onChanged();
return this;
}
/**
* <code>optional float head_yaw = 1;</code>
*/
public Builder clearHeadYaw() {
bitField0_ = (bitField0_ & ~0x00000001);
headYaw_ = 0F;
onChanged();
return this;
}
// optional float head_pitch = 2;
private float headPitch_ ;
/**
* <code>optional float head_pitch = 2;</code>
*/
public boolean hasHeadPitch() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* <code>optional float head_pitch = 2;</code>
*/
public float getHeadPitch() {
return headPitch_;
}
/**
* <code>optional float head_pitch = 2;</code>
*/
public Builder setHeadPitch(float value) {
bitField0_ |= 0x00000002;
headPitch_ = value;
onChanged();
return this;
}
/**
* <code>optional float head_pitch = 2;</code>
*/
public Builder clearHeadPitch() {
bitField0_ = (bitField0_ & ~0x00000002);
headPitch_ = 0F;
onChanged();
return this;
}
// optional float max_speed_yaw = 3 [default = -1];
private float maxSpeedYaw_ = -1F;
/**
* <code>optional float max_speed_yaw = 3 [default = -1];</code>
*/
public boolean hasMaxSpeedYaw() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional float max_speed_yaw = 3 [default = -1];</code>
*/
public float getMaxSpeedYaw() {
return maxSpeedYaw_;
}
/**
* <code>optional float max_speed_yaw = 3 [default = -1];</code>
*/
public Builder setMaxSpeedYaw(float value) {
bitField0_ |= 0x00000004;
maxSpeedYaw_ = value;
onChanged();
return this;
}
/**
* <code>optional float max_speed_yaw = 3 [default = -1];</code>
*/
public Builder clearMaxSpeedYaw() {
bitField0_ = (bitField0_ & ~0x00000004);
maxSpeedYaw_ = -1F;
onChanged();
return this;
}
// optional float max_speed_pitch = 4 [default = -1];
private float maxSpeedPitch_ = -1F;
/**
* <code>optional float max_speed_pitch = 4 [default = -1];</code>
*/
public boolean hasMaxSpeedPitch() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* <code>optional float max_speed_pitch = 4 [default = -1];</code>
*/
public float getMaxSpeedPitch() {
return maxSpeedPitch_;
}
/**
* <code>optional float max_speed_pitch = 4 [default = -1];</code>
*/
public Builder setMaxSpeedPitch(float value) {
bitField0_ |= 0x00000008;
maxSpeedPitch_ = value;
onChanged();
return this;
}
/**
* <code>optional float max_speed_pitch = 4 [default = -1];</code>
*/
public Builder clearMaxSpeedPitch() {
bitField0_ = (bitField0_ & ~0x00000008);
maxSpeedPitch_ = -1F;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:messages.PositionHeadCommand)
}
static {
defaultInstance = new PositionHeadCommand(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:messages.PositionHeadCommand)
}