diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/Controller.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/Controller.java deleted file mode 100644 index 4250beab54..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/Controller.java +++ /dev/null @@ -1,2552 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; - -public final class Controller { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1894, - "ChBjb250cm9sbGVyLnByb3RvEgl3cGkucHJvdG8iaAoWUHJvdG9idWZBcm1GZWVkZm9yd2FyZBIOCgJr" + - "cxgBIAEoAVICa3MSDgoCa2cYAiABKAFSAmtnEg4KAmt2GAMgASgBUgJrdhIOCgJrYRgEIAEoAVICa2ES" + - "DgoCZHQYBSABKAFSAmR0Ip4BCiRQcm90b2J1ZkRpZmZlcmVudGlhbERyaXZlRmVlZGZvcndhcmQSGwoJ" + - "a3ZfbGluZWFyGAEgASgBUghrdkxpbmVhchIbCglrYV9saW5lYXIYAiABKAFSCGthTGluZWFyEh0KCmt2" + - "X2FuZ3VsYXIYAyABKAFSCWt2QW5ndWxhchIdCgprYV9hbmd1bGFyGAQgASgBUglrYUFuZ3VsYXIibQob" + - "UHJvdG9idWZFbGV2YXRvckZlZWRmb3J3YXJkEg4KAmtzGAEgASgBUgJrcxIOCgJrZxgCIAEoAVICa2cS" + - "DgoCa3YYAyABKAFSAmt2Eg4KAmthGAQgASgBUgJrYRIOCgJkdBgFIAEoAVICZHQiYAoeUHJvdG9idWZT" + - "aW1wbGVNb3RvckZlZWRmb3J3YXJkEg4KAmtzGAEgASgBUgJrcxIOCgJrdhgCIAEoAVICa3YSDgoCa2EY" + - "AyABKAFSAmthEg4KAmR0GAQgASgBUgJkdCJSCiZQcm90b2J1ZkRpZmZlcmVudGlhbERyaXZlV2hlZWxW" + - "b2x0YWdlcxISCgRsZWZ0GAEgASgBUgRsZWZ0EhQKBXJpZ2h0GAIgASgBUgVyaWdodEIXChVvcmcud3Bp" + - "bGliLm1hdGgucHJvdG9K9QkKBhIEAAAnAQoICgEMEgMAABIKCAoBAhIDAgASCggKAQgSAwQALgoJCgII" + - "ARIDBAAuCgoKAgQAEgQGAAwBCgoKAwQAARIDBggeCgsKBAQAAgASAwcCEAoMCgUEAAIABRIDBwIICgwK" + - "BQQAAgABEgMHCQsKDAoFBAACAAMSAwcODwoLCgQEAAIBEgMIAhAKDAoFBAACAQUSAwgCCAoMCgUEAAIB" + - "ARIDCAkLCgwKBQQAAgEDEgMIDg8KCwoEBAACAhIDCQIQCgwKBQQAAgIFEgMJAggKDAoFBAACAgESAwkJ" + - "CwoMCgUEAAICAxIDCQ4PCgsKBAQAAgMSAwoCEAoMCgUEAAIDBRIDCgIICgwKBQQAAgMBEgMKCQsKDAoF" + - "BAACAwMSAwoODwoLCgQEAAIEEgMLAhAKDAoFBAACBAUSAwsCCAoMCgUEAAIEARIDCwkLCgwKBQQAAgQD" + - "EgMLDg8KCgoCBAESBA4AEwEKCgoDBAEBEgMOCCwKCwoEBAECABIDDwIXCgwKBQQBAgAFEgMPAggKDAoF" + - "BAECAAESAw8JEgoMCgUEAQIAAxIDDxUWCgsKBAQBAgESAxACFwoMCgUEAQIBBRIDEAIICgwKBQQBAgEB" + - "EgMQCRIKDAoFBAECAQMSAxAVFgoLCgQEAQICEgMRAhgKDAoFBAECAgUSAxECCAoMCgUEAQICARIDEQkT" + - "CgwKBQQBAgIDEgMRFhcKCwoEBAECAxIDEgIYCgwKBQQBAgMFEgMSAggKDAoFBAECAwESAxIJEwoMCgUE", - "AQIDAxIDEhYXCgoKAgQCEgQVABsBCgoKAwQCARIDFQgjCgsKBAQCAgASAxYCEAoMCgUEAgIABRIDFgII" + - "CgwKBQQCAgABEgMWCQsKDAoFBAICAAMSAxYODwoLCgQEAgIBEgMXAhAKDAoFBAICAQUSAxcCCAoMCgUE" + - "AgIBARIDFwkLCgwKBQQCAgEDEgMXDg8KCwoEBAICAhIDGAIQCgwKBQQCAgIFEgMYAggKDAoFBAICAgES" + - "AxgJCwoMCgUEAgICAxIDGA4PCgsKBAQCAgMSAxkCEAoMCgUEAgIDBRIDGQIICgwKBQQCAgMBEgMZCQsK" + - "DAoFBAICAwMSAxkODwoLCgQEAgIEEgMaAhAKDAoFBAICBAUSAxoCCAoMCgUEAgIEARIDGgkLCgwKBQQC" + - "AgQDEgMaDg8KCgoCBAMSBB0AIgEKCgoDBAMBEgMdCCYKCwoEBAMCABIDHgIQCgwKBQQDAgAFEgMeAggK" + - "DAoFBAMCAAESAx4JCwoMCgUEAwIAAxIDHg4PCgsKBAQDAgESAx8CEAoMCgUEAwIBBRIDHwIICgwKBQQD" + - "AgEBEgMfCQsKDAoFBAMCAQMSAx8ODwoLCgQEAwICEgMgAhAKDAoFBAMCAgUSAyACCAoMCgUEAwICARID" + - "IAkLCgwKBQQDAgIDEgMgDg8KCwoEBAMCAxIDIQIQCgwKBQQDAgMFEgMhAggKDAoFBAMCAwESAyEJCwoM" + - "CgUEAwIDAxIDIQ4PCgoKAgQEEgQkACcBCgoKAwQEARIDJAguCgsKBAQEAgASAyUCEgoMCgUEBAIABRID" + - "JQIICgwKBQQEAgABEgMlCQ0KDAoFBAQCAAMSAyUQEQoLCgQEBAIBEgMmAhMKDAoFBAQCAQUSAyYCCAoM" + - "CgUEBAIBARIDJgkOCgwKBQQEAgEDEgMmERJiBnByb3RvMw=="); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("controller.proto", "wpi.proto", descriptorData); - - static final Descriptors.Descriptor wpi_proto_ProtobufArmFeedforward_descriptor = descriptor.internalContainedType(31, 104, "ProtobufArmFeedforward", "wpi.proto.ProtobufArmFeedforward"); - - static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveFeedforward_descriptor = descriptor.internalContainedType(138, 158, "ProtobufDifferentialDriveFeedforward", "wpi.proto.ProtobufDifferentialDriveFeedforward"); - - static final Descriptors.Descriptor wpi_proto_ProtobufElevatorFeedforward_descriptor = descriptor.internalContainedType(298, 109, "ProtobufElevatorFeedforward", "wpi.proto.ProtobufElevatorFeedforward"); - - static final Descriptors.Descriptor wpi_proto_ProtobufSimpleMotorFeedforward_descriptor = descriptor.internalContainedType(409, 96, "ProtobufSimpleMotorFeedforward", "wpi.proto.ProtobufSimpleMotorFeedforward"); - - static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelVoltages_descriptor = descriptor.internalContainedType(507, 82, "ProtobufDifferentialDriveWheelVoltages", "wpi.proto.ProtobufDifferentialDriveWheelVoltages"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufArmFeedforward} - */ - public static final class ProtobufArmFeedforward extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double ks = 1; - */ - private double ks; - - /** - * optional double kg = 2; - */ - private double kg; - - /** - * optional double kv = 3; - */ - private double kv; - - /** - * optional double ka = 4; - */ - private double ka; - - /** - * optional double dt = 5; - */ - private double dt; - - private ProtobufArmFeedforward() { - } - - /** - * @return a new empty instance of {@code ProtobufArmFeedforward} - */ - public static ProtobufArmFeedforward newInstance() { - return new ProtobufArmFeedforward(); - } - - /** - * optional double ks = 1; - * @return whether the ks field is set - */ - public boolean hasKs() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double ks = 1; - * @return this - */ - public ProtobufArmFeedforward clearKs() { - bitField0_ &= ~0x00000001; - ks = 0D; - return this; - } - - /** - * optional double ks = 1; - * @return the ks - */ - public double getKs() { - return ks; - } - - /** - * optional double ks = 1; - * @param value the ks to set - * @return this - */ - public ProtobufArmFeedforward setKs(final double value) { - bitField0_ |= 0x00000001; - ks = value; - return this; - } - - /** - * optional double kg = 2; - * @return whether the kg field is set - */ - public boolean hasKg() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double kg = 2; - * @return this - */ - public ProtobufArmFeedforward clearKg() { - bitField0_ &= ~0x00000002; - kg = 0D; - return this; - } - - /** - * optional double kg = 2; - * @return the kg - */ - public double getKg() { - return kg; - } - - /** - * optional double kg = 2; - * @param value the kg to set - * @return this - */ - public ProtobufArmFeedforward setKg(final double value) { - bitField0_ |= 0x00000002; - kg = value; - return this; - } - - /** - * optional double kv = 3; - * @return whether the kv field is set - */ - public boolean hasKv() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double kv = 3; - * @return this - */ - public ProtobufArmFeedforward clearKv() { - bitField0_ &= ~0x00000004; - kv = 0D; - return this; - } - - /** - * optional double kv = 3; - * @return the kv - */ - public double getKv() { - return kv; - } - - /** - * optional double kv = 3; - * @param value the kv to set - * @return this - */ - public ProtobufArmFeedforward setKv(final double value) { - bitField0_ |= 0x00000004; - kv = value; - return this; - } - - /** - * optional double ka = 4; - * @return whether the ka field is set - */ - public boolean hasKa() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double ka = 4; - * @return this - */ - public ProtobufArmFeedforward clearKa() { - bitField0_ &= ~0x00000008; - ka = 0D; - return this; - } - - /** - * optional double ka = 4; - * @return the ka - */ - public double getKa() { - return ka; - } - - /** - * optional double ka = 4; - * @param value the ka to set - * @return this - */ - public ProtobufArmFeedforward setKa(final double value) { - bitField0_ |= 0x00000008; - ka = value; - return this; - } - - /** - * optional double dt = 5; - * @return whether the dt field is set - */ - public boolean hasDt() { - return (bitField0_ & 0x00000010) != 0; - } - - /** - * optional double dt = 5; - * @return this - */ - public ProtobufArmFeedforward clearDt() { - bitField0_ &= ~0x00000010; - dt = 0D; - return this; - } - - /** - * optional double dt = 5; - * @return the dt - */ - public double getDt() { - return dt; - } - - /** - * optional double dt = 5; - * @param value the dt to set - * @return this - */ - public ProtobufArmFeedforward setDt(final double value) { - bitField0_ |= 0x00000010; - dt = value; - return this; - } - - @Override - public ProtobufArmFeedforward copyFrom(final ProtobufArmFeedforward other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - ks = other.ks; - kg = other.kg; - kv = other.kv; - ka = other.ka; - dt = other.dt; - } - return this; - } - - @Override - public ProtobufArmFeedforward mergeFrom(final ProtobufArmFeedforward other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasKs()) { - setKs(other.ks); - } - if (other.hasKg()) { - setKg(other.kg); - } - if (other.hasKv()) { - setKv(other.kv); - } - if (other.hasKa()) { - setKa(other.ka); - } - if (other.hasDt()) { - setDt(other.dt); - } - return this; - } - - @Override - public ProtobufArmFeedforward clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - ks = 0D; - kg = 0D; - kv = 0D; - ka = 0D; - dt = 0D; - return this; - } - - @Override - public ProtobufArmFeedforward clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufArmFeedforward)) { - return false; - } - ProtobufArmFeedforward other = (ProtobufArmFeedforward) o; - return bitField0_ == other.bitField0_ - && (!hasKs() || ProtoUtil.isEqual(ks, other.ks)) - && (!hasKg() || ProtoUtil.isEqual(kg, other.kg)) - && (!hasKv() || ProtoUtil.isEqual(kv, other.kv)) - && (!hasKa() || ProtoUtil.isEqual(ka, other.ka)) - && (!hasDt() || ProtoUtil.isEqual(dt, other.dt)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(ks); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(kg); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(kv); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(ka); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeRawByte((byte) 41); - output.writeDoubleNoTag(dt); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000010) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufArmFeedforward mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // ks - ks = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // kg - kg = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // kv - kv = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // ka - ka = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 41) { - break; - } - } - case 41: { - // dt - dt = input.readDouble(); - bitField0_ |= 0x00000010; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.ks, ks); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.kg, kg); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.kv, kv); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.ka, ka); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeDouble(FieldNames.dt, dt); - } - output.endObject(); - } - - @Override - public ProtobufArmFeedforward mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3432: { - if (input.isAtField(FieldNames.ks)) { - if (!input.trySkipNullValue()) { - ks = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3420: { - if (input.isAtField(FieldNames.kg)) { - if (!input.trySkipNullValue()) { - kg = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3435: { - if (input.isAtField(FieldNames.kv)) { - if (!input.trySkipNullValue()) { - kv = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3414: { - if (input.isAtField(FieldNames.ka)) { - if (!input.trySkipNullValue()) { - ka = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3216: { - if (input.isAtField(FieldNames.dt)) { - if (!input.trySkipNullValue()) { - dt = input.readDouble(); - bitField0_ |= 0x00000010; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufArmFeedforward clone() { - return new ProtobufArmFeedforward().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufArmFeedforward parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), data).checkInitialized(); - } - - public static ProtobufArmFeedforward parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), input).checkInitialized(); - } - - public static ProtobufArmFeedforward parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufArmFeedforward messages - */ - public static MessageFactory getFactory() { - return ProtobufArmFeedforwardFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Controller.wpi_proto_ProtobufArmFeedforward_descriptor; - } - - private enum ProtobufArmFeedforwardFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufArmFeedforward create() { - return ProtobufArmFeedforward.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName ks = FieldName.forField("ks"); - - static final FieldName kg = FieldName.forField("kg"); - - static final FieldName kv = FieldName.forField("kv"); - - static final FieldName ka = FieldName.forField("ka"); - - static final FieldName dt = FieldName.forField("dt"); - } - } - - /** - * Protobuf type {@code ProtobufDifferentialDriveFeedforward} - */ - public static final class ProtobufDifferentialDriveFeedforward extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double kv_linear = 1; - */ - private double kvLinear; - - /** - * optional double ka_linear = 2; - */ - private double kaLinear; - - /** - * optional double kv_angular = 3; - */ - private double kvAngular; - - /** - * optional double ka_angular = 4; - */ - private double kaAngular; - - private ProtobufDifferentialDriveFeedforward() { - } - - /** - * @return a new empty instance of {@code ProtobufDifferentialDriveFeedforward} - */ - public static ProtobufDifferentialDriveFeedforward newInstance() { - return new ProtobufDifferentialDriveFeedforward(); - } - - /** - * optional double kv_linear = 1; - * @return whether the kvLinear field is set - */ - public boolean hasKvLinear() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double kv_linear = 1; - * @return this - */ - public ProtobufDifferentialDriveFeedforward clearKvLinear() { - bitField0_ &= ~0x00000001; - kvLinear = 0D; - return this; - } - - /** - * optional double kv_linear = 1; - * @return the kvLinear - */ - public double getKvLinear() { - return kvLinear; - } - - /** - * optional double kv_linear = 1; - * @param value the kvLinear to set - * @return this - */ - public ProtobufDifferentialDriveFeedforward setKvLinear(final double value) { - bitField0_ |= 0x00000001; - kvLinear = value; - return this; - } - - /** - * optional double ka_linear = 2; - * @return whether the kaLinear field is set - */ - public boolean hasKaLinear() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double ka_linear = 2; - * @return this - */ - public ProtobufDifferentialDriveFeedforward clearKaLinear() { - bitField0_ &= ~0x00000002; - kaLinear = 0D; - return this; - } - - /** - * optional double ka_linear = 2; - * @return the kaLinear - */ - public double getKaLinear() { - return kaLinear; - } - - /** - * optional double ka_linear = 2; - * @param value the kaLinear to set - * @return this - */ - public ProtobufDifferentialDriveFeedforward setKaLinear(final double value) { - bitField0_ |= 0x00000002; - kaLinear = value; - return this; - } - - /** - * optional double kv_angular = 3; - * @return whether the kvAngular field is set - */ - public boolean hasKvAngular() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double kv_angular = 3; - * @return this - */ - public ProtobufDifferentialDriveFeedforward clearKvAngular() { - bitField0_ &= ~0x00000004; - kvAngular = 0D; - return this; - } - - /** - * optional double kv_angular = 3; - * @return the kvAngular - */ - public double getKvAngular() { - return kvAngular; - } - - /** - * optional double kv_angular = 3; - * @param value the kvAngular to set - * @return this - */ - public ProtobufDifferentialDriveFeedforward setKvAngular(final double value) { - bitField0_ |= 0x00000004; - kvAngular = value; - return this; - } - - /** - * optional double ka_angular = 4; - * @return whether the kaAngular field is set - */ - public boolean hasKaAngular() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double ka_angular = 4; - * @return this - */ - public ProtobufDifferentialDriveFeedforward clearKaAngular() { - bitField0_ &= ~0x00000008; - kaAngular = 0D; - return this; - } - - /** - * optional double ka_angular = 4; - * @return the kaAngular - */ - public double getKaAngular() { - return kaAngular; - } - - /** - * optional double ka_angular = 4; - * @param value the kaAngular to set - * @return this - */ - public ProtobufDifferentialDriveFeedforward setKaAngular(final double value) { - bitField0_ |= 0x00000008; - kaAngular = value; - return this; - } - - @Override - public ProtobufDifferentialDriveFeedforward copyFrom( - final ProtobufDifferentialDriveFeedforward other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - kvLinear = other.kvLinear; - kaLinear = other.kaLinear; - kvAngular = other.kvAngular; - kaAngular = other.kaAngular; - } - return this; - } - - @Override - public ProtobufDifferentialDriveFeedforward mergeFrom( - final ProtobufDifferentialDriveFeedforward other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasKvLinear()) { - setKvLinear(other.kvLinear); - } - if (other.hasKaLinear()) { - setKaLinear(other.kaLinear); - } - if (other.hasKvAngular()) { - setKvAngular(other.kvAngular); - } - if (other.hasKaAngular()) { - setKaAngular(other.kaAngular); - } - return this; - } - - @Override - public ProtobufDifferentialDriveFeedforward clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - kvLinear = 0D; - kaLinear = 0D; - kvAngular = 0D; - kaAngular = 0D; - return this; - } - - @Override - public ProtobufDifferentialDriveFeedforward clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufDifferentialDriveFeedforward)) { - return false; - } - ProtobufDifferentialDriveFeedforward other = (ProtobufDifferentialDriveFeedforward) o; - return bitField0_ == other.bitField0_ - && (!hasKvLinear() || ProtoUtil.isEqual(kvLinear, other.kvLinear)) - && (!hasKaLinear() || ProtoUtil.isEqual(kaLinear, other.kaLinear)) - && (!hasKvAngular() || ProtoUtil.isEqual(kvAngular, other.kvAngular)) - && (!hasKaAngular() || ProtoUtil.isEqual(kaAngular, other.kaAngular)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(kvLinear); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(kaLinear); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(kvAngular); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(kaAngular); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufDifferentialDriveFeedforward mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // kvLinear - kvLinear = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // kaLinear - kaLinear = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // kvAngular - kvAngular = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // kaAngular - kaAngular = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.kvLinear, kvLinear); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.kaLinear, kaLinear); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.kvAngular, kvAngular); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.kaAngular, kaAngular); - } - output.endObject(); - } - - @Override - public ProtobufDifferentialDriveFeedforward mergeFrom(final JsonSource input) throws - IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 1424526448: - case 974889081: { - if (input.isAtField(FieldNames.kvLinear)) { - if (!input.trySkipNullValue()) { - kvLinear = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -33181669: - case -1264389586: { - if (input.isAtField(FieldNames.kaLinear)) { - if (!input.trySkipNullValue()) { - kaLinear = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 175208951: - case -878647538: { - if (input.isAtField(FieldNames.kvAngular)) { - if (!input.trySkipNullValue()) { - kvAngular = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case -2064069716: - case -1576809479: { - if (input.isAtField(FieldNames.kaAngular)) { - if (!input.trySkipNullValue()) { - kaAngular = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufDifferentialDriveFeedforward clone() { - return new ProtobufDifferentialDriveFeedforward().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufDifferentialDriveFeedforward parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), data).checkInitialized(); - } - - public static ProtobufDifferentialDriveFeedforward parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), input).checkInitialized(); - } - - public static ProtobufDifferentialDriveFeedforward parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufDifferentialDriveFeedforward messages - */ - public static MessageFactory getFactory() { - return ProtobufDifferentialDriveFeedforwardFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Controller.wpi_proto_ProtobufDifferentialDriveFeedforward_descriptor; - } - - private enum ProtobufDifferentialDriveFeedforwardFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufDifferentialDriveFeedforward create() { - return ProtobufDifferentialDriveFeedforward.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName kvLinear = FieldName.forField("kvLinear", "kv_linear"); - - static final FieldName kaLinear = FieldName.forField("kaLinear", "ka_linear"); - - static final FieldName kvAngular = FieldName.forField("kvAngular", "kv_angular"); - - static final FieldName kaAngular = FieldName.forField("kaAngular", "ka_angular"); - } - } - - /** - * Protobuf type {@code ProtobufElevatorFeedforward} - */ - public static final class ProtobufElevatorFeedforward extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double ks = 1; - */ - private double ks; - - /** - * optional double kg = 2; - */ - private double kg; - - /** - * optional double kv = 3; - */ - private double kv; - - /** - * optional double ka = 4; - */ - private double ka; - - /** - * optional double dt = 5; - */ - private double dt; - - private ProtobufElevatorFeedforward() { - } - - /** - * @return a new empty instance of {@code ProtobufElevatorFeedforward} - */ - public static ProtobufElevatorFeedforward newInstance() { - return new ProtobufElevatorFeedforward(); - } - - /** - * optional double ks = 1; - * @return whether the ks field is set - */ - public boolean hasKs() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double ks = 1; - * @return this - */ - public ProtobufElevatorFeedforward clearKs() { - bitField0_ &= ~0x00000001; - ks = 0D; - return this; - } - - /** - * optional double ks = 1; - * @return the ks - */ - public double getKs() { - return ks; - } - - /** - * optional double ks = 1; - * @param value the ks to set - * @return this - */ - public ProtobufElevatorFeedforward setKs(final double value) { - bitField0_ |= 0x00000001; - ks = value; - return this; - } - - /** - * optional double kg = 2; - * @return whether the kg field is set - */ - public boolean hasKg() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double kg = 2; - * @return this - */ - public ProtobufElevatorFeedforward clearKg() { - bitField0_ &= ~0x00000002; - kg = 0D; - return this; - } - - /** - * optional double kg = 2; - * @return the kg - */ - public double getKg() { - return kg; - } - - /** - * optional double kg = 2; - * @param value the kg to set - * @return this - */ - public ProtobufElevatorFeedforward setKg(final double value) { - bitField0_ |= 0x00000002; - kg = value; - return this; - } - - /** - * optional double kv = 3; - * @return whether the kv field is set - */ - public boolean hasKv() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double kv = 3; - * @return this - */ - public ProtobufElevatorFeedforward clearKv() { - bitField0_ &= ~0x00000004; - kv = 0D; - return this; - } - - /** - * optional double kv = 3; - * @return the kv - */ - public double getKv() { - return kv; - } - - /** - * optional double kv = 3; - * @param value the kv to set - * @return this - */ - public ProtobufElevatorFeedforward setKv(final double value) { - bitField0_ |= 0x00000004; - kv = value; - return this; - } - - /** - * optional double ka = 4; - * @return whether the ka field is set - */ - public boolean hasKa() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double ka = 4; - * @return this - */ - public ProtobufElevatorFeedforward clearKa() { - bitField0_ &= ~0x00000008; - ka = 0D; - return this; - } - - /** - * optional double ka = 4; - * @return the ka - */ - public double getKa() { - return ka; - } - - /** - * optional double ka = 4; - * @param value the ka to set - * @return this - */ - public ProtobufElevatorFeedforward setKa(final double value) { - bitField0_ |= 0x00000008; - ka = value; - return this; - } - - /** - * optional double dt = 5; - * @return whether the dt field is set - */ - public boolean hasDt() { - return (bitField0_ & 0x00000010) != 0; - } - - /** - * optional double dt = 5; - * @return this - */ - public ProtobufElevatorFeedforward clearDt() { - bitField0_ &= ~0x00000010; - dt = 0D; - return this; - } - - /** - * optional double dt = 5; - * @return the dt - */ - public double getDt() { - return dt; - } - - /** - * optional double dt = 5; - * @param value the dt to set - * @return this - */ - public ProtobufElevatorFeedforward setDt(final double value) { - bitField0_ |= 0x00000010; - dt = value; - return this; - } - - @Override - public ProtobufElevatorFeedforward copyFrom(final ProtobufElevatorFeedforward other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - ks = other.ks; - kg = other.kg; - kv = other.kv; - ka = other.ka; - dt = other.dt; - } - return this; - } - - @Override - public ProtobufElevatorFeedforward mergeFrom(final ProtobufElevatorFeedforward other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasKs()) { - setKs(other.ks); - } - if (other.hasKg()) { - setKg(other.kg); - } - if (other.hasKv()) { - setKv(other.kv); - } - if (other.hasKa()) { - setKa(other.ka); - } - if (other.hasDt()) { - setDt(other.dt); - } - return this; - } - - @Override - public ProtobufElevatorFeedforward clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - ks = 0D; - kg = 0D; - kv = 0D; - ka = 0D; - dt = 0D; - return this; - } - - @Override - public ProtobufElevatorFeedforward clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufElevatorFeedforward)) { - return false; - } - ProtobufElevatorFeedforward other = (ProtobufElevatorFeedforward) o; - return bitField0_ == other.bitField0_ - && (!hasKs() || ProtoUtil.isEqual(ks, other.ks)) - && (!hasKg() || ProtoUtil.isEqual(kg, other.kg)) - && (!hasKv() || ProtoUtil.isEqual(kv, other.kv)) - && (!hasKa() || ProtoUtil.isEqual(ka, other.ka)) - && (!hasDt() || ProtoUtil.isEqual(dt, other.dt)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(ks); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(kg); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(kv); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(ka); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeRawByte((byte) 41); - output.writeDoubleNoTag(dt); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000010) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufElevatorFeedforward mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // ks - ks = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // kg - kg = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // kv - kv = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // ka - ka = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 41) { - break; - } - } - case 41: { - // dt - dt = input.readDouble(); - bitField0_ |= 0x00000010; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.ks, ks); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.kg, kg); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.kv, kv); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.ka, ka); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeDouble(FieldNames.dt, dt); - } - output.endObject(); - } - - @Override - public ProtobufElevatorFeedforward mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3432: { - if (input.isAtField(FieldNames.ks)) { - if (!input.trySkipNullValue()) { - ks = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3420: { - if (input.isAtField(FieldNames.kg)) { - if (!input.trySkipNullValue()) { - kg = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3435: { - if (input.isAtField(FieldNames.kv)) { - if (!input.trySkipNullValue()) { - kv = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3414: { - if (input.isAtField(FieldNames.ka)) { - if (!input.trySkipNullValue()) { - ka = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3216: { - if (input.isAtField(FieldNames.dt)) { - if (!input.trySkipNullValue()) { - dt = input.readDouble(); - bitField0_ |= 0x00000010; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufElevatorFeedforward clone() { - return new ProtobufElevatorFeedforward().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufElevatorFeedforward parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), data).checkInitialized(); - } - - public static ProtobufElevatorFeedforward parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), input).checkInitialized(); - } - - public static ProtobufElevatorFeedforward parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufElevatorFeedforward messages - */ - public static MessageFactory getFactory() { - return ProtobufElevatorFeedforwardFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Controller.wpi_proto_ProtobufElevatorFeedforward_descriptor; - } - - private enum ProtobufElevatorFeedforwardFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufElevatorFeedforward create() { - return ProtobufElevatorFeedforward.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName ks = FieldName.forField("ks"); - - static final FieldName kg = FieldName.forField("kg"); - - static final FieldName kv = FieldName.forField("kv"); - - static final FieldName ka = FieldName.forField("ka"); - - static final FieldName dt = FieldName.forField("dt"); - } - } - - /** - * Protobuf type {@code ProtobufSimpleMotorFeedforward} - */ - public static final class ProtobufSimpleMotorFeedforward extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double ks = 1; - */ - private double ks; - - /** - * optional double kv = 2; - */ - private double kv; - - /** - * optional double ka = 3; - */ - private double ka; - - /** - * optional double dt = 4; - */ - private double dt; - - private ProtobufSimpleMotorFeedforward() { - } - - /** - * @return a new empty instance of {@code ProtobufSimpleMotorFeedforward} - */ - public static ProtobufSimpleMotorFeedforward newInstance() { - return new ProtobufSimpleMotorFeedforward(); - } - - /** - * optional double ks = 1; - * @return whether the ks field is set - */ - public boolean hasKs() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double ks = 1; - * @return this - */ - public ProtobufSimpleMotorFeedforward clearKs() { - bitField0_ &= ~0x00000001; - ks = 0D; - return this; - } - - /** - * optional double ks = 1; - * @return the ks - */ - public double getKs() { - return ks; - } - - /** - * optional double ks = 1; - * @param value the ks to set - * @return this - */ - public ProtobufSimpleMotorFeedforward setKs(final double value) { - bitField0_ |= 0x00000001; - ks = value; - return this; - } - - /** - * optional double kv = 2; - * @return whether the kv field is set - */ - public boolean hasKv() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double kv = 2; - * @return this - */ - public ProtobufSimpleMotorFeedforward clearKv() { - bitField0_ &= ~0x00000002; - kv = 0D; - return this; - } - - /** - * optional double kv = 2; - * @return the kv - */ - public double getKv() { - return kv; - } - - /** - * optional double kv = 2; - * @param value the kv to set - * @return this - */ - public ProtobufSimpleMotorFeedforward setKv(final double value) { - bitField0_ |= 0x00000002; - kv = value; - return this; - } - - /** - * optional double ka = 3; - * @return whether the ka field is set - */ - public boolean hasKa() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double ka = 3; - * @return this - */ - public ProtobufSimpleMotorFeedforward clearKa() { - bitField0_ &= ~0x00000004; - ka = 0D; - return this; - } - - /** - * optional double ka = 3; - * @return the ka - */ - public double getKa() { - return ka; - } - - /** - * optional double ka = 3; - * @param value the ka to set - * @return this - */ - public ProtobufSimpleMotorFeedforward setKa(final double value) { - bitField0_ |= 0x00000004; - ka = value; - return this; - } - - /** - * optional double dt = 4; - * @return whether the dt field is set - */ - public boolean hasDt() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double dt = 4; - * @return this - */ - public ProtobufSimpleMotorFeedforward clearDt() { - bitField0_ &= ~0x00000008; - dt = 0D; - return this; - } - - /** - * optional double dt = 4; - * @return the dt - */ - public double getDt() { - return dt; - } - - /** - * optional double dt = 4; - * @param value the dt to set - * @return this - */ - public ProtobufSimpleMotorFeedforward setDt(final double value) { - bitField0_ |= 0x00000008; - dt = value; - return this; - } - - @Override - public ProtobufSimpleMotorFeedforward copyFrom(final ProtobufSimpleMotorFeedforward other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - ks = other.ks; - kv = other.kv; - ka = other.ka; - dt = other.dt; - } - return this; - } - - @Override - public ProtobufSimpleMotorFeedforward mergeFrom(final ProtobufSimpleMotorFeedforward other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasKs()) { - setKs(other.ks); - } - if (other.hasKv()) { - setKv(other.kv); - } - if (other.hasKa()) { - setKa(other.ka); - } - if (other.hasDt()) { - setDt(other.dt); - } - return this; - } - - @Override - public ProtobufSimpleMotorFeedforward clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - ks = 0D; - kv = 0D; - ka = 0D; - dt = 0D; - return this; - } - - @Override - public ProtobufSimpleMotorFeedforward clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufSimpleMotorFeedforward)) { - return false; - } - ProtobufSimpleMotorFeedforward other = (ProtobufSimpleMotorFeedforward) o; - return bitField0_ == other.bitField0_ - && (!hasKs() || ProtoUtil.isEqual(ks, other.ks)) - && (!hasKv() || ProtoUtil.isEqual(kv, other.kv)) - && (!hasKa() || ProtoUtil.isEqual(ka, other.ka)) - && (!hasDt() || ProtoUtil.isEqual(dt, other.dt)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(ks); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(kv); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(ka); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(dt); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufSimpleMotorFeedforward mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // ks - ks = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // kv - kv = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // ka - ka = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // dt - dt = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.ks, ks); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.kv, kv); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.ka, ka); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.dt, dt); - } - output.endObject(); - } - - @Override - public ProtobufSimpleMotorFeedforward mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3432: { - if (input.isAtField(FieldNames.ks)) { - if (!input.trySkipNullValue()) { - ks = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3435: { - if (input.isAtField(FieldNames.kv)) { - if (!input.trySkipNullValue()) { - kv = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3414: { - if (input.isAtField(FieldNames.ka)) { - if (!input.trySkipNullValue()) { - ka = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3216: { - if (input.isAtField(FieldNames.dt)) { - if (!input.trySkipNullValue()) { - dt = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufSimpleMotorFeedforward clone() { - return new ProtobufSimpleMotorFeedforward().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufSimpleMotorFeedforward parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), data).checkInitialized(); - } - - public static ProtobufSimpleMotorFeedforward parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), input).checkInitialized(); - } - - public static ProtobufSimpleMotorFeedforward parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufSimpleMotorFeedforward messages - */ - public static MessageFactory getFactory() { - return ProtobufSimpleMotorFeedforwardFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Controller.wpi_proto_ProtobufSimpleMotorFeedforward_descriptor; - } - - private enum ProtobufSimpleMotorFeedforwardFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufSimpleMotorFeedforward create() { - return ProtobufSimpleMotorFeedforward.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName ks = FieldName.forField("ks"); - - static final FieldName kv = FieldName.forField("kv"); - - static final FieldName ka = FieldName.forField("ka"); - - static final FieldName dt = FieldName.forField("dt"); - } - } - - /** - * Protobuf type {@code ProtobufDifferentialDriveWheelVoltages} - */ - public static final class ProtobufDifferentialDriveWheelVoltages extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double left = 1; - */ - private double left; - - /** - * optional double right = 2; - */ - private double right; - - private ProtobufDifferentialDriveWheelVoltages() { - } - - /** - * @return a new empty instance of {@code ProtobufDifferentialDriveWheelVoltages} - */ - public static ProtobufDifferentialDriveWheelVoltages newInstance() { - return new ProtobufDifferentialDriveWheelVoltages(); - } - - /** - * optional double left = 1; - * @return whether the left field is set - */ - public boolean hasLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double left = 1; - * @return this - */ - public ProtobufDifferentialDriveWheelVoltages clearLeft() { - bitField0_ &= ~0x00000001; - left = 0D; - return this; - } - - /** - * optional double left = 1; - * @return the left - */ - public double getLeft() { - return left; - } - - /** - * optional double left = 1; - * @param value the left to set - * @return this - */ - public ProtobufDifferentialDriveWheelVoltages setLeft(final double value) { - bitField0_ |= 0x00000001; - left = value; - return this; - } - - /** - * optional double right = 2; - * @return whether the right field is set - */ - public boolean hasRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double right = 2; - * @return this - */ - public ProtobufDifferentialDriveWheelVoltages clearRight() { - bitField0_ &= ~0x00000002; - right = 0D; - return this; - } - - /** - * optional double right = 2; - * @return the right - */ - public double getRight() { - return right; - } - - /** - * optional double right = 2; - * @param value the right to set - * @return this - */ - public ProtobufDifferentialDriveWheelVoltages setRight(final double value) { - bitField0_ |= 0x00000002; - right = value; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelVoltages copyFrom( - final ProtobufDifferentialDriveWheelVoltages other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - left = other.left; - right = other.right; - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelVoltages mergeFrom( - final ProtobufDifferentialDriveWheelVoltages other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasLeft()) { - setLeft(other.left); - } - if (other.hasRight()) { - setRight(other.right); - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelVoltages clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - left = 0D; - right = 0D; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelVoltages clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufDifferentialDriveWheelVoltages)) { - return false; - } - ProtobufDifferentialDriveWheelVoltages other = (ProtobufDifferentialDriveWheelVoltages) o; - return bitField0_ == other.bitField0_ - && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) - && (!hasRight() || ProtoUtil.isEqual(right, other.right)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(right); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufDifferentialDriveWheelVoltages mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // left - left = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // right - right = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.left, left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.right, right); - } - output.endObject(); - } - - @Override - public ProtobufDifferentialDriveWheelVoltages mergeFrom(final JsonSource input) throws - IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3317767: { - if (input.isAtField(FieldNames.left)) { - if (!input.trySkipNullValue()) { - left = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 108511772: { - if (input.isAtField(FieldNames.right)) { - if (!input.trySkipNullValue()) { - right = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufDifferentialDriveWheelVoltages clone() { - return new ProtobufDifferentialDriveWheelVoltages().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufDifferentialDriveWheelVoltages parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), data).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelVoltages parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), input).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelVoltages parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufDifferentialDriveWheelVoltages messages - */ - public static MessageFactory getFactory() { - return ProtobufDifferentialDriveWheelVoltagesFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Controller.wpi_proto_ProtobufDifferentialDriveWheelVoltages_descriptor; - } - - private enum ProtobufDifferentialDriveWheelVoltagesFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufDifferentialDriveWheelVoltages create() { - return ProtobufDifferentialDriveWheelVoltages.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName left = FieldName.forField("left"); - - static final FieldName right = FieldName.forField("right"); - } - } -} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/Geometry2D.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/Geometry2D.java deleted file mode 100644 index 9fb5129964..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/Geometry2D.java +++ /dev/null @@ -1,2687 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; - -public final class Geometry2D { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1886, - "ChBnZW9tZXRyeTJkLnByb3RvEgl3cGkucHJvdG8iMwoVUHJvdG9idWZUcmFuc2xhdGlvbjJkEgwKAXgY" + - "ASABKAFSAXgSDAoBeRgCIAEoAVIBeSIqChJQcm90b2J1ZlJvdGF0aW9uMmQSFAoFdmFsdWUYASABKAFS" + - "BXZhbHVlIo8BCg5Qcm90b2J1ZlBvc2UyZBJCCgt0cmFuc2xhdGlvbhgBIAEoCzIgLndwaS5wcm90by5Q" + - "cm90b2J1ZlRyYW5zbGF0aW9uMmRSC3RyYW5zbGF0aW9uEjkKCHJvdGF0aW9uGAIgASgLMh0ud3BpLnBy" + - "b3RvLlByb3RvYnVmUm90YXRpb24yZFIIcm90YXRpb24ilAEKE1Byb3RvYnVmVHJhbnNmb3JtMmQSQgoL" + - "dHJhbnNsYXRpb24YASABKAsyIC53cGkucHJvdG8uUHJvdG9idWZUcmFuc2xhdGlvbjJkUgt0cmFuc2xh" + - "dGlvbhI5Cghyb3RhdGlvbhgCIAEoCzIdLndwaS5wcm90by5Qcm90b2J1ZlJvdGF0aW9uMmRSCHJvdGF0" + - "aW9uIkkKD1Byb3RvYnVmVHdpc3QyZBIOCgJkeBgBIAEoAVICZHgSDgoCZHkYAiABKAFSAmR5EhYKBmR0" + - "aGV0YRgDIAEoAVIGZHRoZXRhIngKE1Byb3RvYnVmUmVjdGFuZ2xlMmQSMQoGY2VudGVyGAEgASgLMhku" + - "d3BpLnByb3RvLlByb3RvYnVmUG9zZTJkUgZjZW50ZXISFgoGeFdpZHRoGAIgASgBUgZ4V2lkdGgSFgoG" + - "eVdpZHRoGAMgASgBUgZ5V2lkdGgiggEKEVByb3RvYnVmRWxsaXBzZTJkEjEKBmNlbnRlchgBIAEoCzIZ" + - "LndwaS5wcm90by5Qcm90b2J1ZlBvc2UyZFIGY2VudGVyEhwKCXhTZW1pQXhpcxgCIAEoAVIJeFNlbWlB" + - "eGlzEhwKCXlTZW1pQXhpcxgDIAEoAVIJeVNlbWlBeGlzQhcKFW9yZy53cGlsaWIubWF0aC5wcm90b0rJ" + - "CAoGEgQAACkBCggKAQwSAwAAEgoICgECEgMCABIKCAoBCBIDBAAuCgkKAggBEgMEAC4KCgoCBAASBAYA" + - "CQEKCgoDBAABEgMGCB0KCwoEBAACABIDBwIPCgwKBQQAAgAFEgMHAggKDAoFBAACAAESAwcJCgoMCgUE" + - "AAIAAxIDBw0OCgsKBAQAAgESAwgCDwoMCgUEAAIBBRIDCAIICgwKBQQAAgEBEgMICQoKDAoFBAACAQMS" + - "AwgNDgoKCgIEARIECwANAQoKCgMEAQESAwsIGgoLCgQEAQIAEgMMAhMKDAoFBAECAAUSAwwCCAoMCgUE" + - "AQIAARIDDAkOCgwKBQQBAgADEgMMERIKCgoCBAISBA8AEgEKCgoDBAIBEgMPCBYKCwoEBAICABIDEAIo" + - "CgwKBQQCAgAGEgMQAhcKDAoFBAICAAESAxAYIwoMCgUEAgIAAxIDECYnCgsKBAQCAgESAxECIgoMCgUE" + - "AgIBBhIDEQIUCgwKBQQCAgEBEgMRFR0KDAoFBAICAQMSAxEgIQoKCgIEAxIEFAAXAQoKCgMEAwESAxQI", - "GwoLCgQEAwIAEgMVAigKDAoFBAMCAAYSAxUCFwoMCgUEAwIAARIDFRgjCgwKBQQDAgADEgMVJicKCwoE" + - "BAMCARIDFgIiCgwKBQQDAgEGEgMWAhQKDAoFBAMCAQESAxYVHQoMCgUEAwIBAxIDFiAhCgoKAgQEEgQZ" + - "AB0BCgoKAwQEARIDGQgXCgsKBAQEAgASAxoCEAoMCgUEBAIABRIDGgIICgwKBQQEAgABEgMaCQsKDAoF" + - "BAQCAAMSAxoODwoLCgQEBAIBEgMbAhAKDAoFBAQCAQUSAxsCCAoMCgUEBAIBARIDGwkLCgwKBQQEAgED" + - "EgMbDg8KCwoEBAQCAhIDHAIUCgwKBQQEAgIFEgMcAggKDAoFBAQCAgESAxwJDwoMCgUEBAICAxIDHBIT" + - "CgoKAgQFEgQfACMBCgoKAwQFARIDHwgbCgsKBAQFAgASAyACHAoMCgUEBQIABhIDIAIQCgwKBQQFAgAB" + - "EgMgERcKDAoFBAUCAAMSAyAaGwoLCgQEBQIBEgMhAhQKDAoFBAUCAQUSAyECCAoMCgUEBQIBARIDIQkP" + - "CgwKBQQFAgEDEgMhEhMKCwoEBAUCAhIDIgIUCgwKBQQFAgIFEgMiAggKDAoFBAUCAgESAyIJDwoMCgUE" + - "BQICAxIDIhITCgoKAgQGEgQlACkBCgoKAwQGARIDJQgZCgsKBAQGAgASAyYCHAoMCgUEBgIABhIDJgIQ" + - "CgwKBQQGAgABEgMmERcKDAoFBAYCAAMSAyYaGwoLCgQEBgIBEgMnAhcKDAoFBAYCAQUSAycCCAoMCgUE" + - "BgIBARIDJwkSCgwKBQQGAgEDEgMnFRYKCwoEBAYCAhIDKAIXCgwKBQQGAgIFEgMoAggKDAoFBAYCAgES" + - "AygJEgoMCgUEBgICAxIDKBUWYgZwcm90bzM="); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("geometry2d.proto", "wpi.proto", descriptorData); - - static final Descriptors.Descriptor wpi_proto_ProtobufTranslation2d_descriptor = descriptor.internalContainedType(31, 51, "ProtobufTranslation2d", "wpi.proto.ProtobufTranslation2d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufRotation2d_descriptor = descriptor.internalContainedType(84, 42, "ProtobufRotation2d", "wpi.proto.ProtobufRotation2d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufPose2d_descriptor = descriptor.internalContainedType(129, 143, "ProtobufPose2d", "wpi.proto.ProtobufPose2d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufTransform2d_descriptor = descriptor.internalContainedType(275, 148, "ProtobufTransform2d", "wpi.proto.ProtobufTransform2d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufTwist2d_descriptor = descriptor.internalContainedType(425, 73, "ProtobufTwist2d", "wpi.proto.ProtobufTwist2d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufRectangle2d_descriptor = descriptor.internalContainedType(500, 120, "ProtobufRectangle2d", "wpi.proto.ProtobufRectangle2d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufEllipse2d_descriptor = descriptor.internalContainedType(623, 130, "ProtobufEllipse2d", "wpi.proto.ProtobufEllipse2d"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufTranslation2d} - */ - public static final class ProtobufTranslation2d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double x = 1; - */ - private double x; - - /** - * optional double y = 2; - */ - private double y; - - private ProtobufTranslation2d() { - } - - /** - * @return a new empty instance of {@code ProtobufTranslation2d} - */ - public static ProtobufTranslation2d newInstance() { - return new ProtobufTranslation2d(); - } - - /** - * optional double x = 1; - * @return whether the x field is set - */ - public boolean hasX() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double x = 1; - * @return this - */ - public ProtobufTranslation2d clearX() { - bitField0_ &= ~0x00000001; - x = 0D; - return this; - } - - /** - * optional double x = 1; - * @return the x - */ - public double getX() { - return x; - } - - /** - * optional double x = 1; - * @param value the x to set - * @return this - */ - public ProtobufTranslation2d setX(final double value) { - bitField0_ |= 0x00000001; - x = value; - return this; - } - - /** - * optional double y = 2; - * @return whether the y field is set - */ - public boolean hasY() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double y = 2; - * @return this - */ - public ProtobufTranslation2d clearY() { - bitField0_ &= ~0x00000002; - y = 0D; - return this; - } - - /** - * optional double y = 2; - * @return the y - */ - public double getY() { - return y; - } - - /** - * optional double y = 2; - * @param value the y to set - * @return this - */ - public ProtobufTranslation2d setY(final double value) { - bitField0_ |= 0x00000002; - y = value; - return this; - } - - @Override - public ProtobufTranslation2d copyFrom(final ProtobufTranslation2d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - x = other.x; - y = other.y; - } - return this; - } - - @Override - public ProtobufTranslation2d mergeFrom(final ProtobufTranslation2d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasX()) { - setX(other.x); - } - if (other.hasY()) { - setY(other.y); - } - return this; - } - - @Override - public ProtobufTranslation2d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - x = 0D; - y = 0D; - return this; - } - - @Override - public ProtobufTranslation2d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTranslation2d)) { - return false; - } - ProtobufTranslation2d other = (ProtobufTranslation2d) o; - return bitField0_ == other.bitField0_ - && (!hasX() || ProtoUtil.isEqual(x, other.x)) - && (!hasY() || ProtoUtil.isEqual(y, other.y)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(x); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(y); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTranslation2d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // x - x = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // y - y = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.x, x); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.y, y); - } - output.endObject(); - } - - @Override - public ProtobufTranslation2d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 120: { - if (input.isAtField(FieldNames.x)) { - if (!input.trySkipNullValue()) { - x = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 121: { - if (input.isAtField(FieldNames.y)) { - if (!input.trySkipNullValue()) { - y = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTranslation2d clone() { - return new ProtobufTranslation2d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTranslation2d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTranslation2d(), data).checkInitialized(); - } - - public static ProtobufTranslation2d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTranslation2d(), input).checkInitialized(); - } - - public static ProtobufTranslation2d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTranslation2d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTranslation2d messages - */ - public static MessageFactory getFactory() { - return ProtobufTranslation2dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry2D.wpi_proto_ProtobufTranslation2d_descriptor; - } - - private enum ProtobufTranslation2dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTranslation2d create() { - return ProtobufTranslation2d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName x = FieldName.forField("x"); - - static final FieldName y = FieldName.forField("y"); - } - } - - /** - * Protobuf type {@code ProtobufRotation2d} - */ - public static final class ProtobufRotation2d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double value = 1; - */ - private double value_; - - private ProtobufRotation2d() { - } - - /** - * @return a new empty instance of {@code ProtobufRotation2d} - */ - public static ProtobufRotation2d newInstance() { - return new ProtobufRotation2d(); - } - - /** - * optional double value = 1; - * @return whether the value_ field is set - */ - public boolean hasValue() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double value = 1; - * @return this - */ - public ProtobufRotation2d clearValue() { - bitField0_ &= ~0x00000001; - value_ = 0D; - return this; - } - - /** - * optional double value = 1; - * @return the value_ - */ - public double getValue() { - return value_; - } - - /** - * optional double value = 1; - * @param value the value_ to set - * @return this - */ - public ProtobufRotation2d setValue(final double value) { - bitField0_ |= 0x00000001; - value_ = value; - return this; - } - - @Override - public ProtobufRotation2d copyFrom(final ProtobufRotation2d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - value_ = other.value_; - } - return this; - } - - @Override - public ProtobufRotation2d mergeFrom(final ProtobufRotation2d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasValue()) { - setValue(other.value_); - } - return this; - } - - @Override - public ProtobufRotation2d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - value_ = 0D; - return this; - } - - @Override - public ProtobufRotation2d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufRotation2d)) { - return false; - } - ProtobufRotation2d other = (ProtobufRotation2d) o; - return bitField0_ == other.bitField0_ - && (!hasValue() || ProtoUtil.isEqual(value_, other.value_)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(value_); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufRotation2d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // value_ - value_ = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.value_, value_); - } - output.endObject(); - } - - @Override - public ProtobufRotation2d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 111972721: { - if (input.isAtField(FieldNames.value_)) { - if (!input.trySkipNullValue()) { - value_ = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufRotation2d clone() { - return new ProtobufRotation2d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufRotation2d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufRotation2d(), data).checkInitialized(); - } - - public static ProtobufRotation2d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufRotation2d(), input).checkInitialized(); - } - - public static ProtobufRotation2d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufRotation2d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufRotation2d messages - */ - public static MessageFactory getFactory() { - return ProtobufRotation2dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry2D.wpi_proto_ProtobufRotation2d_descriptor; - } - - private enum ProtobufRotation2dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufRotation2d create() { - return ProtobufRotation2d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName value_ = FieldName.forField("value"); - } - } - - /** - * Protobuf type {@code ProtobufPose2d} - */ - public static final class ProtobufPose2d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - */ - private final ProtobufTranslation2d translation = ProtobufTranslation2d.newInstance(); - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - */ - private final ProtobufRotation2d rotation = ProtobufRotation2d.newInstance(); - - private ProtobufPose2d() { - } - - /** - * @return a new empty instance of {@code ProtobufPose2d} - */ - public static ProtobufPose2d newInstance() { - return new ProtobufPose2d(); - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * @return whether the translation field is set - */ - public boolean hasTranslation() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * @return this - */ - public ProtobufPose2d clearTranslation() { - bitField0_ &= ~0x00000001; - translation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableTranslation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufTranslation2d getTranslation() { - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufTranslation2d getMutableTranslation() { - bitField0_ |= 0x00000001; - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * @param value the translation to set - * @return this - */ - public ProtobufPose2d setTranslation(final ProtobufTranslation2d value) { - bitField0_ |= 0x00000001; - translation.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * @return whether the rotation field is set - */ - public boolean hasRotation() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * @return this - */ - public ProtobufPose2d clearRotation() { - bitField0_ &= ~0x00000002; - rotation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableRotation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufRotation2d getRotation() { - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufRotation2d getMutableRotation() { - bitField0_ |= 0x00000002; - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * @param value the rotation to set - * @return this - */ - public ProtobufPose2d setRotation(final ProtobufRotation2d value) { - bitField0_ |= 0x00000002; - rotation.copyFrom(value); - return this; - } - - @Override - public ProtobufPose2d copyFrom(final ProtobufPose2d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - translation.copyFrom(other.translation); - rotation.copyFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufPose2d mergeFrom(final ProtobufPose2d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasTranslation()) { - getMutableTranslation().mergeFrom(other.translation); - } - if (other.hasRotation()) { - getMutableRotation().mergeFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufPose2d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clear(); - rotation.clear(); - return this; - } - - @Override - public ProtobufPose2d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clearQuick(); - rotation.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufPose2d)) { - return false; - } - ProtobufPose2d other = (ProtobufPose2d) o; - return bitField0_ == other.bitField0_ - && (!hasTranslation() || translation.equals(other.translation)) - && (!hasRotation() || rotation.equals(other.rotation)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(rotation); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufPose2d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // translation - input.readMessage(translation); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // rotation - input.readMessage(rotation); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeMessage(FieldNames.translation, translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.rotation, rotation); - } - output.endObject(); - } - - @Override - public ProtobufPose2d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -1840647503: { - if (input.isAtField(FieldNames.translation)) { - if (!input.trySkipNullValue()) { - input.readMessage(translation); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -40300674: { - if (input.isAtField(FieldNames.rotation)) { - if (!input.trySkipNullValue()) { - input.readMessage(rotation); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufPose2d clone() { - return new ProtobufPose2d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufPose2d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufPose2d(), data).checkInitialized(); - } - - public static ProtobufPose2d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufPose2d(), input).checkInitialized(); - } - - public static ProtobufPose2d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufPose2d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufPose2d messages - */ - public static MessageFactory getFactory() { - return ProtobufPose2dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry2D.wpi_proto_ProtobufPose2d_descriptor; - } - - private enum ProtobufPose2dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufPose2d create() { - return ProtobufPose2d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName translation = FieldName.forField("translation"); - - static final FieldName rotation = FieldName.forField("rotation"); - } - } - - /** - * Protobuf type {@code ProtobufTransform2d} - */ - public static final class ProtobufTransform2d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - */ - private final ProtobufTranslation2d translation = ProtobufTranslation2d.newInstance(); - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - */ - private final ProtobufRotation2d rotation = ProtobufRotation2d.newInstance(); - - private ProtobufTransform2d() { - } - - /** - * @return a new empty instance of {@code ProtobufTransform2d} - */ - public static ProtobufTransform2d newInstance() { - return new ProtobufTransform2d(); - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * @return whether the translation field is set - */ - public boolean hasTranslation() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * @return this - */ - public ProtobufTransform2d clearTranslation() { - bitField0_ &= ~0x00000001; - translation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableTranslation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufTranslation2d getTranslation() { - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufTranslation2d getMutableTranslation() { - bitField0_ |= 0x00000001; - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d translation = 1; - * @param value the translation to set - * @return this - */ - public ProtobufTransform2d setTranslation(final ProtobufTranslation2d value) { - bitField0_ |= 0x00000001; - translation.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * @return whether the rotation field is set - */ - public boolean hasRotation() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * @return this - */ - public ProtobufTransform2d clearRotation() { - bitField0_ &= ~0x00000002; - rotation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableRotation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufRotation2d getRotation() { - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufRotation2d getMutableRotation() { - bitField0_ |= 0x00000002; - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation2d rotation = 2; - * @param value the rotation to set - * @return this - */ - public ProtobufTransform2d setRotation(final ProtobufRotation2d value) { - bitField0_ |= 0x00000002; - rotation.copyFrom(value); - return this; - } - - @Override - public ProtobufTransform2d copyFrom(final ProtobufTransform2d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - translation.copyFrom(other.translation); - rotation.copyFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufTransform2d mergeFrom(final ProtobufTransform2d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasTranslation()) { - getMutableTranslation().mergeFrom(other.translation); - } - if (other.hasRotation()) { - getMutableRotation().mergeFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufTransform2d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clear(); - rotation.clear(); - return this; - } - - @Override - public ProtobufTransform2d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clearQuick(); - rotation.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTransform2d)) { - return false; - } - ProtobufTransform2d other = (ProtobufTransform2d) o; - return bitField0_ == other.bitField0_ - && (!hasTranslation() || translation.equals(other.translation)) - && (!hasRotation() || rotation.equals(other.rotation)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(rotation); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTransform2d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // translation - input.readMessage(translation); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // rotation - input.readMessage(rotation); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeMessage(FieldNames.translation, translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.rotation, rotation); - } - output.endObject(); - } - - @Override - public ProtobufTransform2d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -1840647503: { - if (input.isAtField(FieldNames.translation)) { - if (!input.trySkipNullValue()) { - input.readMessage(translation); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -40300674: { - if (input.isAtField(FieldNames.rotation)) { - if (!input.trySkipNullValue()) { - input.readMessage(rotation); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTransform2d clone() { - return new ProtobufTransform2d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTransform2d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTransform2d(), data).checkInitialized(); - } - - public static ProtobufTransform2d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTransform2d(), input).checkInitialized(); - } - - public static ProtobufTransform2d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTransform2d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTransform2d messages - */ - public static MessageFactory getFactory() { - return ProtobufTransform2dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry2D.wpi_proto_ProtobufTransform2d_descriptor; - } - - private enum ProtobufTransform2dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTransform2d create() { - return ProtobufTransform2d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName translation = FieldName.forField("translation"); - - static final FieldName rotation = FieldName.forField("rotation"); - } - } - - /** - * Protobuf type {@code ProtobufTwist2d} - */ - public static final class ProtobufTwist2d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double dx = 1; - */ - private double dx; - - /** - * optional double dy = 2; - */ - private double dy; - - /** - * optional double dtheta = 3; - */ - private double dtheta; - - private ProtobufTwist2d() { - } - - /** - * @return a new empty instance of {@code ProtobufTwist2d} - */ - public static ProtobufTwist2d newInstance() { - return new ProtobufTwist2d(); - } - - /** - * optional double dx = 1; - * @return whether the dx field is set - */ - public boolean hasDx() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double dx = 1; - * @return this - */ - public ProtobufTwist2d clearDx() { - bitField0_ &= ~0x00000001; - dx = 0D; - return this; - } - - /** - * optional double dx = 1; - * @return the dx - */ - public double getDx() { - return dx; - } - - /** - * optional double dx = 1; - * @param value the dx to set - * @return this - */ - public ProtobufTwist2d setDx(final double value) { - bitField0_ |= 0x00000001; - dx = value; - return this; - } - - /** - * optional double dy = 2; - * @return whether the dy field is set - */ - public boolean hasDy() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double dy = 2; - * @return this - */ - public ProtobufTwist2d clearDy() { - bitField0_ &= ~0x00000002; - dy = 0D; - return this; - } - - /** - * optional double dy = 2; - * @return the dy - */ - public double getDy() { - return dy; - } - - /** - * optional double dy = 2; - * @param value the dy to set - * @return this - */ - public ProtobufTwist2d setDy(final double value) { - bitField0_ |= 0x00000002; - dy = value; - return this; - } - - /** - * optional double dtheta = 3; - * @return whether the dtheta field is set - */ - public boolean hasDtheta() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double dtheta = 3; - * @return this - */ - public ProtobufTwist2d clearDtheta() { - bitField0_ &= ~0x00000004; - dtheta = 0D; - return this; - } - - /** - * optional double dtheta = 3; - * @return the dtheta - */ - public double getDtheta() { - return dtheta; - } - - /** - * optional double dtheta = 3; - * @param value the dtheta to set - * @return this - */ - public ProtobufTwist2d setDtheta(final double value) { - bitField0_ |= 0x00000004; - dtheta = value; - return this; - } - - @Override - public ProtobufTwist2d copyFrom(final ProtobufTwist2d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - dx = other.dx; - dy = other.dy; - dtheta = other.dtheta; - } - return this; - } - - @Override - public ProtobufTwist2d mergeFrom(final ProtobufTwist2d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasDx()) { - setDx(other.dx); - } - if (other.hasDy()) { - setDy(other.dy); - } - if (other.hasDtheta()) { - setDtheta(other.dtheta); - } - return this; - } - - @Override - public ProtobufTwist2d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - dx = 0D; - dy = 0D; - dtheta = 0D; - return this; - } - - @Override - public ProtobufTwist2d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTwist2d)) { - return false; - } - ProtobufTwist2d other = (ProtobufTwist2d) o; - return bitField0_ == other.bitField0_ - && (!hasDx() || ProtoUtil.isEqual(dx, other.dx)) - && (!hasDy() || ProtoUtil.isEqual(dy, other.dy)) - && (!hasDtheta() || ProtoUtil.isEqual(dtheta, other.dtheta)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(dx); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(dy); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(dtheta); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTwist2d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // dx - dx = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // dy - dy = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // dtheta - dtheta = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.dx, dx); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.dy, dy); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.dtheta, dtheta); - } - output.endObject(); - } - - @Override - public ProtobufTwist2d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3220: { - if (input.isAtField(FieldNames.dx)) { - if (!input.trySkipNullValue()) { - dx = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3221: { - if (input.isAtField(FieldNames.dy)) { - if (!input.trySkipNullValue()) { - dy = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -1321724742: { - if (input.isAtField(FieldNames.dtheta)) { - if (!input.trySkipNullValue()) { - dtheta = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTwist2d clone() { - return new ProtobufTwist2d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTwist2d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTwist2d(), data).checkInitialized(); - } - - public static ProtobufTwist2d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTwist2d(), input).checkInitialized(); - } - - public static ProtobufTwist2d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTwist2d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTwist2d messages - */ - public static MessageFactory getFactory() { - return ProtobufTwist2dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry2D.wpi_proto_ProtobufTwist2d_descriptor; - } - - private enum ProtobufTwist2dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTwist2d create() { - return ProtobufTwist2d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName dx = FieldName.forField("dx"); - - static final FieldName dy = FieldName.forField("dy"); - - static final FieldName dtheta = FieldName.forField("dtheta"); - } - } - - /** - * Protobuf type {@code ProtobufRectangle2d} - */ - public static final class ProtobufRectangle2d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double xWidth = 2; - */ - private double xWidth; - - /** - * optional double yWidth = 3; - */ - private double yWidth; - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - */ - private final ProtobufPose2d center = ProtobufPose2d.newInstance(); - - private ProtobufRectangle2d() { - } - - /** - * @return a new empty instance of {@code ProtobufRectangle2d} - */ - public static ProtobufRectangle2d newInstance() { - return new ProtobufRectangle2d(); - } - - /** - * optional double xWidth = 2; - * @return whether the xWidth field is set - */ - public boolean hasXWidth() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double xWidth = 2; - * @return this - */ - public ProtobufRectangle2d clearXWidth() { - bitField0_ &= ~0x00000001; - xWidth = 0D; - return this; - } - - /** - * optional double xWidth = 2; - * @return the xWidth - */ - public double getXWidth() { - return xWidth; - } - - /** - * optional double xWidth = 2; - * @param value the xWidth to set - * @return this - */ - public ProtobufRectangle2d setXWidth(final double value) { - bitField0_ |= 0x00000001; - xWidth = value; - return this; - } - - /** - * optional double yWidth = 3; - * @return whether the yWidth field is set - */ - public boolean hasYWidth() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double yWidth = 3; - * @return this - */ - public ProtobufRectangle2d clearYWidth() { - bitField0_ &= ~0x00000002; - yWidth = 0D; - return this; - } - - /** - * optional double yWidth = 3; - * @return the yWidth - */ - public double getYWidth() { - return yWidth; - } - - /** - * optional double yWidth = 3; - * @param value the yWidth to set - * @return this - */ - public ProtobufRectangle2d setYWidth(final double value) { - bitField0_ |= 0x00000002; - yWidth = value; - return this; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * @return whether the center field is set - */ - public boolean hasCenter() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * @return this - */ - public ProtobufRectangle2d clearCenter() { - bitField0_ &= ~0x00000004; - center.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableCenter()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufPose2d getCenter() { - return center; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufPose2d getMutableCenter() { - bitField0_ |= 0x00000004; - return center; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * @param value the center to set - * @return this - */ - public ProtobufRectangle2d setCenter(final ProtobufPose2d value) { - bitField0_ |= 0x00000004; - center.copyFrom(value); - return this; - } - - @Override - public ProtobufRectangle2d copyFrom(final ProtobufRectangle2d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - xWidth = other.xWidth; - yWidth = other.yWidth; - center.copyFrom(other.center); - } - return this; - } - - @Override - public ProtobufRectangle2d mergeFrom(final ProtobufRectangle2d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasXWidth()) { - setXWidth(other.xWidth); - } - if (other.hasYWidth()) { - setYWidth(other.yWidth); - } - if (other.hasCenter()) { - getMutableCenter().mergeFrom(other.center); - } - return this; - } - - @Override - public ProtobufRectangle2d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - xWidth = 0D; - yWidth = 0D; - center.clear(); - return this; - } - - @Override - public ProtobufRectangle2d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - center.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufRectangle2d)) { - return false; - } - ProtobufRectangle2d other = (ProtobufRectangle2d) o; - return bitField0_ == other.bitField0_ - && (!hasXWidth() || ProtoUtil.isEqual(xWidth, other.xWidth)) - && (!hasYWidth() || ProtoUtil.isEqual(yWidth, other.yWidth)) - && (!hasCenter() || center.equals(other.center)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(xWidth); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(yWidth); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(center); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(center); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufRectangle2d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 17: { - // xWidth - xWidth = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // yWidth - yWidth = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 10) { - break; - } - } - case 10: { - // center - input.readMessage(center); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.xWidth, xWidth); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.yWidth, yWidth); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeMessage(FieldNames.center, center); - } - output.endObject(); - } - - @Override - public ProtobufRectangle2d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -775894994: { - if (input.isAtField(FieldNames.xWidth)) { - if (!input.trySkipNullValue()) { - xWidth = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -747265843: { - if (input.isAtField(FieldNames.yWidth)) { - if (!input.trySkipNullValue()) { - yWidth = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -1364013995: { - if (input.isAtField(FieldNames.center)) { - if (!input.trySkipNullValue()) { - input.readMessage(center); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufRectangle2d clone() { - return new ProtobufRectangle2d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufRectangle2d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufRectangle2d(), data).checkInitialized(); - } - - public static ProtobufRectangle2d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufRectangle2d(), input).checkInitialized(); - } - - public static ProtobufRectangle2d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufRectangle2d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufRectangle2d messages - */ - public static MessageFactory getFactory() { - return ProtobufRectangle2dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry2D.wpi_proto_ProtobufRectangle2d_descriptor; - } - - private enum ProtobufRectangle2dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufRectangle2d create() { - return ProtobufRectangle2d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName xWidth = FieldName.forField("xWidth"); - - static final FieldName yWidth = FieldName.forField("yWidth"); - - static final FieldName center = FieldName.forField("center"); - } - } - - /** - * Protobuf type {@code ProtobufEllipse2d} - */ - public static final class ProtobufEllipse2d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double xSemiAxis = 2; - */ - private double xSemiAxis; - - /** - * optional double ySemiAxis = 3; - */ - private double ySemiAxis; - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - */ - private final ProtobufPose2d center = ProtobufPose2d.newInstance(); - - private ProtobufEllipse2d() { - } - - /** - * @return a new empty instance of {@code ProtobufEllipse2d} - */ - public static ProtobufEllipse2d newInstance() { - return new ProtobufEllipse2d(); - } - - /** - * optional double xSemiAxis = 2; - * @return whether the xSemiAxis field is set - */ - public boolean hasXSemiAxis() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double xSemiAxis = 2; - * @return this - */ - public ProtobufEllipse2d clearXSemiAxis() { - bitField0_ &= ~0x00000001; - xSemiAxis = 0D; - return this; - } - - /** - * optional double xSemiAxis = 2; - * @return the xSemiAxis - */ - public double getXSemiAxis() { - return xSemiAxis; - } - - /** - * optional double xSemiAxis = 2; - * @param value the xSemiAxis to set - * @return this - */ - public ProtobufEllipse2d setXSemiAxis(final double value) { - bitField0_ |= 0x00000001; - xSemiAxis = value; - return this; - } - - /** - * optional double ySemiAxis = 3; - * @return whether the ySemiAxis field is set - */ - public boolean hasYSemiAxis() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double ySemiAxis = 3; - * @return this - */ - public ProtobufEllipse2d clearYSemiAxis() { - bitField0_ &= ~0x00000002; - ySemiAxis = 0D; - return this; - } - - /** - * optional double ySemiAxis = 3; - * @return the ySemiAxis - */ - public double getYSemiAxis() { - return ySemiAxis; - } - - /** - * optional double ySemiAxis = 3; - * @param value the ySemiAxis to set - * @return this - */ - public ProtobufEllipse2d setYSemiAxis(final double value) { - bitField0_ |= 0x00000002; - ySemiAxis = value; - return this; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * @return whether the center field is set - */ - public boolean hasCenter() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * @return this - */ - public ProtobufEllipse2d clearCenter() { - bitField0_ &= ~0x00000004; - center.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableCenter()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufPose2d getCenter() { - return center; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufPose2d getMutableCenter() { - bitField0_ |= 0x00000004; - return center; - } - - /** - * optional .wpi.proto.ProtobufPose2d center = 1; - * @param value the center to set - * @return this - */ - public ProtobufEllipse2d setCenter(final ProtobufPose2d value) { - bitField0_ |= 0x00000004; - center.copyFrom(value); - return this; - } - - @Override - public ProtobufEllipse2d copyFrom(final ProtobufEllipse2d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - xSemiAxis = other.xSemiAxis; - ySemiAxis = other.ySemiAxis; - center.copyFrom(other.center); - } - return this; - } - - @Override - public ProtobufEllipse2d mergeFrom(final ProtobufEllipse2d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasXSemiAxis()) { - setXSemiAxis(other.xSemiAxis); - } - if (other.hasYSemiAxis()) { - setYSemiAxis(other.ySemiAxis); - } - if (other.hasCenter()) { - getMutableCenter().mergeFrom(other.center); - } - return this; - } - - @Override - public ProtobufEllipse2d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - xSemiAxis = 0D; - ySemiAxis = 0D; - center.clear(); - return this; - } - - @Override - public ProtobufEllipse2d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - center.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufEllipse2d)) { - return false; - } - ProtobufEllipse2d other = (ProtobufEllipse2d) o; - return bitField0_ == other.bitField0_ - && (!hasXSemiAxis() || ProtoUtil.isEqual(xSemiAxis, other.xSemiAxis)) - && (!hasYSemiAxis() || ProtoUtil.isEqual(ySemiAxis, other.ySemiAxis)) - && (!hasCenter() || center.equals(other.center)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(xSemiAxis); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(ySemiAxis); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(center); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(center); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufEllipse2d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 17: { - // xSemiAxis - xSemiAxis = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // ySemiAxis - ySemiAxis = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 10) { - break; - } - } - case 10: { - // center - input.readMessage(center); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.xSemiAxis, xSemiAxis); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.ySemiAxis, ySemiAxis); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeMessage(FieldNames.center, center); - } - output.endObject(); - } - - @Override - public ProtobufEllipse2d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -858640185: { - if (input.isAtField(FieldNames.xSemiAxis)) { - if (!input.trySkipNullValue()) { - xSemiAxis = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 1628872648: { - if (input.isAtField(FieldNames.ySemiAxis)) { - if (!input.trySkipNullValue()) { - ySemiAxis = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -1364013995: { - if (input.isAtField(FieldNames.center)) { - if (!input.trySkipNullValue()) { - input.readMessage(center); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufEllipse2d clone() { - return new ProtobufEllipse2d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufEllipse2d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufEllipse2d(), data).checkInitialized(); - } - - public static ProtobufEllipse2d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufEllipse2d(), input).checkInitialized(); - } - - public static ProtobufEllipse2d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufEllipse2d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufEllipse2d messages - */ - public static MessageFactory getFactory() { - return ProtobufEllipse2dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry2D.wpi_proto_ProtobufEllipse2d_descriptor; - } - - private enum ProtobufEllipse2dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufEllipse2d create() { - return ProtobufEllipse2d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName xSemiAxis = FieldName.forField("xSemiAxis"); - - static final FieldName ySemiAxis = FieldName.forField("ySemiAxis"); - - static final FieldName center = FieldName.forField("center"); - } - } -} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/Geometry3D.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/Geometry3D.java deleted file mode 100644 index ad20d11ce6..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/Geometry3D.java +++ /dev/null @@ -1,2652 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; - -public final class Geometry3D { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1872, - "ChBnZW9tZXRyeTNkLnByb3RvEgl3cGkucHJvdG8iQQoVUHJvdG9idWZUcmFuc2xhdGlvbjNkEgwKAXgY" + - "ASABKAFSAXgSDAoBeRgCIAEoAVIBeRIMCgF6GAMgASgBUgF6IkwKElByb3RvYnVmUXVhdGVybmlvbhIM" + - "CgF3GAEgASgBUgF3EgwKAXgYAiABKAFSAXgSDAoBeRgDIAEoAVIBeRIMCgF6GAQgASgBUgF6IkEKElBy" + - "b3RvYnVmUm90YXRpb24zZBIrCgFxGAEgASgLMh0ud3BpLnByb3RvLlByb3RvYnVmUXVhdGVybmlvblIB" + - "cSKPAQoOUHJvdG9idWZQb3NlM2QSQgoLdHJhbnNsYXRpb24YASABKAsyIC53cGkucHJvdG8uUHJvdG9i" + - "dWZUcmFuc2xhdGlvbjNkUgt0cmFuc2xhdGlvbhI5Cghyb3RhdGlvbhgCIAEoCzIdLndwaS5wcm90by5Q" + - "cm90b2J1ZlJvdGF0aW9uM2RSCHJvdGF0aW9uIpQBChNQcm90b2J1ZlRyYW5zZm9ybTNkEkIKC3RyYW5z" + - "bGF0aW9uGAEgASgLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24zZFILdHJhbnNsYXRpb24S" + - "OQoIcm90YXRpb24YAiABKAsyHS53cGkucHJvdG8uUHJvdG9idWZSb3RhdGlvbjNkUghyb3RhdGlvbiJx" + - "Cg9Qcm90b2J1ZlR3aXN0M2QSDgoCZHgYASABKAFSAmR4Eg4KAmR5GAIgASgBUgJkeRIOCgJkehgDIAEo" + - "AVICZHoSDgoCcngYBCABKAFSAnJ4Eg4KAnJ5GAUgASgBUgJyeRIOCgJyehgGIAEoAVICcnpCFwoVb3Jn" + - "LndwaWxpYi5tYXRoLnByb3RvSp8JCgYSBAAAKAEKCAoBDBIDAAASCggKAQISAwIAEgoICgEIEgMEAC4K" + - "CQoCCAESAwQALgoKCgIEABIEBgAKAQoKCgMEAAESAwYIHQoLCgQEAAIAEgMHAg8KDAoFBAACAAUSAwcC" + - "CAoMCgUEAAIAARIDBwkKCgwKBQQAAgADEgMHDQ4KCwoEBAACARIDCAIPCgwKBQQAAgEFEgMIAggKDAoF" + - "BAACAQESAwgJCgoMCgUEAAIBAxIDCA0OCgsKBAQAAgISAwkCDwoMCgUEAAICBRIDCQIICgwKBQQAAgIB" + - "EgMJCQoKDAoFBAACAgMSAwkNDgoKCgIEARIEDAARAQoKCgMEAQESAwwIGgoLCgQEAQIAEgMNAg8KDAoF" + - "BAECAAUSAw0CCAoMCgUEAQIAARIDDQkKCgwKBQQBAgADEgMNDQ4KCwoEBAECARIDDgIPCgwKBQQBAgEF" + - "EgMOAggKDAoFBAECAQESAw4JCgoMCgUEAQIBAxIDDg0OCgsKBAQBAgISAw8CDwoMCgUEAQICBRIDDwII" + - "CgwKBQQBAgIBEgMPCQoKDAoFBAECAgMSAw8NDgoLCgQEAQIDEgMQAg8KDAoFBAECAwUSAxACCAoMCgUE" + - "AQIDARIDEAkKCgwKBQQBAgMDEgMQDQ4KCgoCBAISBBMAFQEKCgoDBAIBEgMTCBoKCwoEBAICABIDFAIb", - "CgwKBQQCAgAGEgMUAhQKDAoFBAICAAESAxQVFgoMCgUEAgIAAxIDFBkaCgoKAgQDEgQXABoBCgoKAwQD" + - "ARIDFwgWCgsKBAQDAgASAxgCKAoMCgUEAwIABhIDGAIXCgwKBQQDAgABEgMYGCMKDAoFBAMCAAMSAxgm" + - "JwoLCgQEAwIBEgMZAiIKDAoFBAMCAQYSAxkCFAoMCgUEAwIBARIDGRUdCgwKBQQDAgEDEgMZICEKCgoC" + - "BAQSBBwAHwEKCgoDBAQBEgMcCBsKCwoEBAQCABIDHQIoCgwKBQQEAgAGEgMdAhcKDAoFBAQCAAESAx0Y" + - "IwoMCgUEBAIAAxIDHSYnCgsKBAQEAgESAx4CIgoMCgUEBAIBBhIDHgIUCgwKBQQEAgEBEgMeFR0KDAoF" + - "BAQCAQMSAx4gIQoKCgIEBRIEIQAoAQoKCgMEBQESAyEIFwoLCgQEBQIAEgMiAhAKDAoFBAUCAAUSAyIC" + - "CAoMCgUEBQIAARIDIgkLCgwKBQQFAgADEgMiDg8KCwoEBAUCARIDIwIQCgwKBQQFAgEFEgMjAggKDAoF" + - "BAUCAQESAyMJCwoMCgUEBQIBAxIDIw4PCgsKBAQFAgISAyQCEAoMCgUEBQICBRIDJAIICgwKBQQFAgIB" + - "EgMkCQsKDAoFBAUCAgMSAyQODwoLCgQEBQIDEgMlAhAKDAoFBAUCAwUSAyUCCAoMCgUEBQIDARIDJQkL" + - "CgwKBQQFAgMDEgMlDg8KCwoEBAUCBBIDJgIQCgwKBQQFAgQFEgMmAggKDAoFBAUCBAESAyYJCwoMCgUE" + - "BQIEAxIDJg4PCgsKBAQFAgUSAycCEAoMCgUEBQIFBRIDJwIICgwKBQQFAgUBEgMnCQsKDAoFBAUCBQMS" + - "AycOD2IGcHJvdG8z"); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("geometry3d.proto", "wpi.proto", descriptorData); - - static final Descriptors.Descriptor wpi_proto_ProtobufTranslation3d_descriptor = descriptor.internalContainedType(31, 65, "ProtobufTranslation3d", "wpi.proto.ProtobufTranslation3d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufQuaternion_descriptor = descriptor.internalContainedType(98, 76, "ProtobufQuaternion", "wpi.proto.ProtobufQuaternion"); - - static final Descriptors.Descriptor wpi_proto_ProtobufRotation3d_descriptor = descriptor.internalContainedType(176, 65, "ProtobufRotation3d", "wpi.proto.ProtobufRotation3d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufPose3d_descriptor = descriptor.internalContainedType(244, 143, "ProtobufPose3d", "wpi.proto.ProtobufPose3d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufTransform3d_descriptor = descriptor.internalContainedType(390, 148, "ProtobufTransform3d", "wpi.proto.ProtobufTransform3d"); - - static final Descriptors.Descriptor wpi_proto_ProtobufTwist3d_descriptor = descriptor.internalContainedType(540, 113, "ProtobufTwist3d", "wpi.proto.ProtobufTwist3d"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufTranslation3d} - */ - public static final class ProtobufTranslation3d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double x = 1; - */ - private double x; - - /** - * optional double y = 2; - */ - private double y; - - /** - * optional double z = 3; - */ - private double z; - - private ProtobufTranslation3d() { - } - - /** - * @return a new empty instance of {@code ProtobufTranslation3d} - */ - public static ProtobufTranslation3d newInstance() { - return new ProtobufTranslation3d(); - } - - /** - * optional double x = 1; - * @return whether the x field is set - */ - public boolean hasX() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double x = 1; - * @return this - */ - public ProtobufTranslation3d clearX() { - bitField0_ &= ~0x00000001; - x = 0D; - return this; - } - - /** - * optional double x = 1; - * @return the x - */ - public double getX() { - return x; - } - - /** - * optional double x = 1; - * @param value the x to set - * @return this - */ - public ProtobufTranslation3d setX(final double value) { - bitField0_ |= 0x00000001; - x = value; - return this; - } - - /** - * optional double y = 2; - * @return whether the y field is set - */ - public boolean hasY() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double y = 2; - * @return this - */ - public ProtobufTranslation3d clearY() { - bitField0_ &= ~0x00000002; - y = 0D; - return this; - } - - /** - * optional double y = 2; - * @return the y - */ - public double getY() { - return y; - } - - /** - * optional double y = 2; - * @param value the y to set - * @return this - */ - public ProtobufTranslation3d setY(final double value) { - bitField0_ |= 0x00000002; - y = value; - return this; - } - - /** - * optional double z = 3; - * @return whether the z field is set - */ - public boolean hasZ() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double z = 3; - * @return this - */ - public ProtobufTranslation3d clearZ() { - bitField0_ &= ~0x00000004; - z = 0D; - return this; - } - - /** - * optional double z = 3; - * @return the z - */ - public double getZ() { - return z; - } - - /** - * optional double z = 3; - * @param value the z to set - * @return this - */ - public ProtobufTranslation3d setZ(final double value) { - bitField0_ |= 0x00000004; - z = value; - return this; - } - - @Override - public ProtobufTranslation3d copyFrom(final ProtobufTranslation3d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - x = other.x; - y = other.y; - z = other.z; - } - return this; - } - - @Override - public ProtobufTranslation3d mergeFrom(final ProtobufTranslation3d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasX()) { - setX(other.x); - } - if (other.hasY()) { - setY(other.y); - } - if (other.hasZ()) { - setZ(other.z); - } - return this; - } - - @Override - public ProtobufTranslation3d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - x = 0D; - y = 0D; - z = 0D; - return this; - } - - @Override - public ProtobufTranslation3d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTranslation3d)) { - return false; - } - ProtobufTranslation3d other = (ProtobufTranslation3d) o; - return bitField0_ == other.bitField0_ - && (!hasX() || ProtoUtil.isEqual(x, other.x)) - && (!hasY() || ProtoUtil.isEqual(y, other.y)) - && (!hasZ() || ProtoUtil.isEqual(z, other.z)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(x); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(y); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(z); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTranslation3d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // x - x = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // y - y = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // z - z = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.x, x); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.y, y); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.z, z); - } - output.endObject(); - } - - @Override - public ProtobufTranslation3d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 120: { - if (input.isAtField(FieldNames.x)) { - if (!input.trySkipNullValue()) { - x = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 121: { - if (input.isAtField(FieldNames.y)) { - if (!input.trySkipNullValue()) { - y = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 122: { - if (input.isAtField(FieldNames.z)) { - if (!input.trySkipNullValue()) { - z = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTranslation3d clone() { - return new ProtobufTranslation3d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTranslation3d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), data).checkInitialized(); - } - - public static ProtobufTranslation3d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), input).checkInitialized(); - } - - public static ProtobufTranslation3d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTranslation3d messages - */ - public static MessageFactory getFactory() { - return ProtobufTranslation3dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry3D.wpi_proto_ProtobufTranslation3d_descriptor; - } - - private enum ProtobufTranslation3dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTranslation3d create() { - return ProtobufTranslation3d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName x = FieldName.forField("x"); - - static final FieldName y = FieldName.forField("y"); - - static final FieldName z = FieldName.forField("z"); - } - } - - /** - * Protobuf type {@code ProtobufQuaternion} - */ - public static final class ProtobufQuaternion extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double w = 1; - */ - private double w; - - /** - * optional double x = 2; - */ - private double x; - - /** - * optional double y = 3; - */ - private double y; - - /** - * optional double z = 4; - */ - private double z; - - private ProtobufQuaternion() { - } - - /** - * @return a new empty instance of {@code ProtobufQuaternion} - */ - public static ProtobufQuaternion newInstance() { - return new ProtobufQuaternion(); - } - - /** - * optional double w = 1; - * @return whether the w field is set - */ - public boolean hasW() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double w = 1; - * @return this - */ - public ProtobufQuaternion clearW() { - bitField0_ &= ~0x00000001; - w = 0D; - return this; - } - - /** - * optional double w = 1; - * @return the w - */ - public double getW() { - return w; - } - - /** - * optional double w = 1; - * @param value the w to set - * @return this - */ - public ProtobufQuaternion setW(final double value) { - bitField0_ |= 0x00000001; - w = value; - return this; - } - - /** - * optional double x = 2; - * @return whether the x field is set - */ - public boolean hasX() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double x = 2; - * @return this - */ - public ProtobufQuaternion clearX() { - bitField0_ &= ~0x00000002; - x = 0D; - return this; - } - - /** - * optional double x = 2; - * @return the x - */ - public double getX() { - return x; - } - - /** - * optional double x = 2; - * @param value the x to set - * @return this - */ - public ProtobufQuaternion setX(final double value) { - bitField0_ |= 0x00000002; - x = value; - return this; - } - - /** - * optional double y = 3; - * @return whether the y field is set - */ - public boolean hasY() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double y = 3; - * @return this - */ - public ProtobufQuaternion clearY() { - bitField0_ &= ~0x00000004; - y = 0D; - return this; - } - - /** - * optional double y = 3; - * @return the y - */ - public double getY() { - return y; - } - - /** - * optional double y = 3; - * @param value the y to set - * @return this - */ - public ProtobufQuaternion setY(final double value) { - bitField0_ |= 0x00000004; - y = value; - return this; - } - - /** - * optional double z = 4; - * @return whether the z field is set - */ - public boolean hasZ() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double z = 4; - * @return this - */ - public ProtobufQuaternion clearZ() { - bitField0_ &= ~0x00000008; - z = 0D; - return this; - } - - /** - * optional double z = 4; - * @return the z - */ - public double getZ() { - return z; - } - - /** - * optional double z = 4; - * @param value the z to set - * @return this - */ - public ProtobufQuaternion setZ(final double value) { - bitField0_ |= 0x00000008; - z = value; - return this; - } - - @Override - public ProtobufQuaternion copyFrom(final ProtobufQuaternion other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - w = other.w; - x = other.x; - y = other.y; - z = other.z; - } - return this; - } - - @Override - public ProtobufQuaternion mergeFrom(final ProtobufQuaternion other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasW()) { - setW(other.w); - } - if (other.hasX()) { - setX(other.x); - } - if (other.hasY()) { - setY(other.y); - } - if (other.hasZ()) { - setZ(other.z); - } - return this; - } - - @Override - public ProtobufQuaternion clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - w = 0D; - x = 0D; - y = 0D; - z = 0D; - return this; - } - - @Override - public ProtobufQuaternion clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufQuaternion)) { - return false; - } - ProtobufQuaternion other = (ProtobufQuaternion) o; - return bitField0_ == other.bitField0_ - && (!hasW() || ProtoUtil.isEqual(w, other.w)) - && (!hasX() || ProtoUtil.isEqual(x, other.x)) - && (!hasY() || ProtoUtil.isEqual(y, other.y)) - && (!hasZ() || ProtoUtil.isEqual(z, other.z)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(w); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(x); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(y); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(z); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufQuaternion mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // w - w = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // x - x = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // y - y = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // z - z = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.w, w); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.x, x); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.y, y); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.z, z); - } - output.endObject(); - } - - @Override - public ProtobufQuaternion mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 119: { - if (input.isAtField(FieldNames.w)) { - if (!input.trySkipNullValue()) { - w = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 120: { - if (input.isAtField(FieldNames.x)) { - if (!input.trySkipNullValue()) { - x = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 121: { - if (input.isAtField(FieldNames.y)) { - if (!input.trySkipNullValue()) { - y = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 122: { - if (input.isAtField(FieldNames.z)) { - if (!input.trySkipNullValue()) { - z = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufQuaternion clone() { - return new ProtobufQuaternion().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufQuaternion parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufQuaternion(), data).checkInitialized(); - } - - public static ProtobufQuaternion parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufQuaternion(), input).checkInitialized(); - } - - public static ProtobufQuaternion parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufQuaternion(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufQuaternion messages - */ - public static MessageFactory getFactory() { - return ProtobufQuaternionFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry3D.wpi_proto_ProtobufQuaternion_descriptor; - } - - private enum ProtobufQuaternionFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufQuaternion create() { - return ProtobufQuaternion.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName w = FieldName.forField("w"); - - static final FieldName x = FieldName.forField("x"); - - static final FieldName y = FieldName.forField("y"); - - static final FieldName z = FieldName.forField("z"); - } - } - - /** - * Protobuf type {@code ProtobufRotation3d} - */ - public static final class ProtobufRotation3d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional .wpi.proto.ProtobufQuaternion q = 1; - */ - private final ProtobufQuaternion q = ProtobufQuaternion.newInstance(); - - private ProtobufRotation3d() { - } - - /** - * @return a new empty instance of {@code ProtobufRotation3d} - */ - public static ProtobufRotation3d newInstance() { - return new ProtobufRotation3d(); - } - - /** - * optional .wpi.proto.ProtobufQuaternion q = 1; - * @return whether the q field is set - */ - public boolean hasQ() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional .wpi.proto.ProtobufQuaternion q = 1; - * @return this - */ - public ProtobufRotation3d clearQ() { - bitField0_ &= ~0x00000001; - q.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufQuaternion q = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableQ()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufQuaternion getQ() { - return q; - } - - /** - * optional .wpi.proto.ProtobufQuaternion q = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufQuaternion getMutableQ() { - bitField0_ |= 0x00000001; - return q; - } - - /** - * optional .wpi.proto.ProtobufQuaternion q = 1; - * @param value the q to set - * @return this - */ - public ProtobufRotation3d setQ(final ProtobufQuaternion value) { - bitField0_ |= 0x00000001; - q.copyFrom(value); - return this; - } - - @Override - public ProtobufRotation3d copyFrom(final ProtobufRotation3d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - q.copyFrom(other.q); - } - return this; - } - - @Override - public ProtobufRotation3d mergeFrom(final ProtobufRotation3d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasQ()) { - getMutableQ().mergeFrom(other.q); - } - return this; - } - - @Override - public ProtobufRotation3d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - q.clear(); - return this; - } - - @Override - public ProtobufRotation3d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - q.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufRotation3d)) { - return false; - } - ProtobufRotation3d other = (ProtobufRotation3d) o; - return bitField0_ == other.bitField0_ - && (!hasQ() || q.equals(other.q)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(q); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(q); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufRotation3d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // q - input.readMessage(q); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeMessage(FieldNames.q, q); - } - output.endObject(); - } - - @Override - public ProtobufRotation3d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 113: { - if (input.isAtField(FieldNames.q)) { - if (!input.trySkipNullValue()) { - input.readMessage(q); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufRotation3d clone() { - return new ProtobufRotation3d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufRotation3d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufRotation3d(), data).checkInitialized(); - } - - public static ProtobufRotation3d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufRotation3d(), input).checkInitialized(); - } - - public static ProtobufRotation3d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufRotation3d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufRotation3d messages - */ - public static MessageFactory getFactory() { - return ProtobufRotation3dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry3D.wpi_proto_ProtobufRotation3d_descriptor; - } - - private enum ProtobufRotation3dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufRotation3d create() { - return ProtobufRotation3d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName q = FieldName.forField("q"); - } - } - - /** - * Protobuf type {@code ProtobufPose3d} - */ - public static final class ProtobufPose3d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - */ - private final ProtobufTranslation3d translation = ProtobufTranslation3d.newInstance(); - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - */ - private final ProtobufRotation3d rotation = ProtobufRotation3d.newInstance(); - - private ProtobufPose3d() { - } - - /** - * @return a new empty instance of {@code ProtobufPose3d} - */ - public static ProtobufPose3d newInstance() { - return new ProtobufPose3d(); - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * @return whether the translation field is set - */ - public boolean hasTranslation() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * @return this - */ - public ProtobufPose3d clearTranslation() { - bitField0_ &= ~0x00000001; - translation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableTranslation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufTranslation3d getTranslation() { - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufTranslation3d getMutableTranslation() { - bitField0_ |= 0x00000001; - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * @param value the translation to set - * @return this - */ - public ProtobufPose3d setTranslation(final ProtobufTranslation3d value) { - bitField0_ |= 0x00000001; - translation.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * @return whether the rotation field is set - */ - public boolean hasRotation() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * @return this - */ - public ProtobufPose3d clearRotation() { - bitField0_ &= ~0x00000002; - rotation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableRotation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufRotation3d getRotation() { - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufRotation3d getMutableRotation() { - bitField0_ |= 0x00000002; - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * @param value the rotation to set - * @return this - */ - public ProtobufPose3d setRotation(final ProtobufRotation3d value) { - bitField0_ |= 0x00000002; - rotation.copyFrom(value); - return this; - } - - @Override - public ProtobufPose3d copyFrom(final ProtobufPose3d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - translation.copyFrom(other.translation); - rotation.copyFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufPose3d mergeFrom(final ProtobufPose3d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasTranslation()) { - getMutableTranslation().mergeFrom(other.translation); - } - if (other.hasRotation()) { - getMutableRotation().mergeFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufPose3d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clear(); - rotation.clear(); - return this; - } - - @Override - public ProtobufPose3d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clearQuick(); - rotation.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufPose3d)) { - return false; - } - ProtobufPose3d other = (ProtobufPose3d) o; - return bitField0_ == other.bitField0_ - && (!hasTranslation() || translation.equals(other.translation)) - && (!hasRotation() || rotation.equals(other.rotation)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(rotation); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufPose3d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // translation - input.readMessage(translation); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // rotation - input.readMessage(rotation); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeMessage(FieldNames.translation, translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.rotation, rotation); - } - output.endObject(); - } - - @Override - public ProtobufPose3d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -1840647503: { - if (input.isAtField(FieldNames.translation)) { - if (!input.trySkipNullValue()) { - input.readMessage(translation); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -40300674: { - if (input.isAtField(FieldNames.rotation)) { - if (!input.trySkipNullValue()) { - input.readMessage(rotation); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufPose3d clone() { - return new ProtobufPose3d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufPose3d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufPose3d(), data).checkInitialized(); - } - - public static ProtobufPose3d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufPose3d(), input).checkInitialized(); - } - - public static ProtobufPose3d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufPose3d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufPose3d messages - */ - public static MessageFactory getFactory() { - return ProtobufPose3dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry3D.wpi_proto_ProtobufPose3d_descriptor; - } - - private enum ProtobufPose3dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufPose3d create() { - return ProtobufPose3d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName translation = FieldName.forField("translation"); - - static final FieldName rotation = FieldName.forField("rotation"); - } - } - - /** - * Protobuf type {@code ProtobufTransform3d} - */ - public static final class ProtobufTransform3d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - */ - private final ProtobufTranslation3d translation = ProtobufTranslation3d.newInstance(); - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - */ - private final ProtobufRotation3d rotation = ProtobufRotation3d.newInstance(); - - private ProtobufTransform3d() { - } - - /** - * @return a new empty instance of {@code ProtobufTransform3d} - */ - public static ProtobufTransform3d newInstance() { - return new ProtobufTransform3d(); - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * @return whether the translation field is set - */ - public boolean hasTranslation() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * @return this - */ - public ProtobufTransform3d clearTranslation() { - bitField0_ &= ~0x00000001; - translation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableTranslation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufTranslation3d getTranslation() { - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufTranslation3d getMutableTranslation() { - bitField0_ |= 0x00000001; - return translation; - } - - /** - * optional .wpi.proto.ProtobufTranslation3d translation = 1; - * @param value the translation to set - * @return this - */ - public ProtobufTransform3d setTranslation(final ProtobufTranslation3d value) { - bitField0_ |= 0x00000001; - translation.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * @return whether the rotation field is set - */ - public boolean hasRotation() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * @return this - */ - public ProtobufTransform3d clearRotation() { - bitField0_ &= ~0x00000002; - rotation.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableRotation()} if you want to modify it. - * - * @return internal storage object for reading - */ - public ProtobufRotation3d getRotation() { - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public ProtobufRotation3d getMutableRotation() { - bitField0_ |= 0x00000002; - return rotation; - } - - /** - * optional .wpi.proto.ProtobufRotation3d rotation = 2; - * @param value the rotation to set - * @return this - */ - public ProtobufTransform3d setRotation(final ProtobufRotation3d value) { - bitField0_ |= 0x00000002; - rotation.copyFrom(value); - return this; - } - - @Override - public ProtobufTransform3d copyFrom(final ProtobufTransform3d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - translation.copyFrom(other.translation); - rotation.copyFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufTransform3d mergeFrom(final ProtobufTransform3d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasTranslation()) { - getMutableTranslation().mergeFrom(other.translation); - } - if (other.hasRotation()) { - getMutableRotation().mergeFrom(other.rotation); - } - return this; - } - - @Override - public ProtobufTransform3d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clear(); - rotation.clear(); - return this; - } - - @Override - public ProtobufTransform3d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - translation.clearQuick(); - rotation.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTransform3d)) { - return false; - } - ProtobufTransform3d other = (ProtobufTransform3d) o; - return bitField0_ == other.bitField0_ - && (!hasTranslation() || translation.equals(other.translation)) - && (!hasRotation() || rotation.equals(other.rotation)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(rotation); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(translation); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTransform3d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // translation - input.readMessage(translation); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // rotation - input.readMessage(rotation); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeMessage(FieldNames.translation, translation); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.rotation, rotation); - } - output.endObject(); - } - - @Override - public ProtobufTransform3d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -1840647503: { - if (input.isAtField(FieldNames.translation)) { - if (!input.trySkipNullValue()) { - input.readMessage(translation); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -40300674: { - if (input.isAtField(FieldNames.rotation)) { - if (!input.trySkipNullValue()) { - input.readMessage(rotation); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTransform3d clone() { - return new ProtobufTransform3d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTransform3d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTransform3d(), data).checkInitialized(); - } - - public static ProtobufTransform3d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTransform3d(), input).checkInitialized(); - } - - public static ProtobufTransform3d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTransform3d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTransform3d messages - */ - public static MessageFactory getFactory() { - return ProtobufTransform3dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry3D.wpi_proto_ProtobufTransform3d_descriptor; - } - - private enum ProtobufTransform3dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTransform3d create() { - return ProtobufTransform3d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName translation = FieldName.forField("translation"); - - static final FieldName rotation = FieldName.forField("rotation"); - } - } - - /** - * Protobuf type {@code ProtobufTwist3d} - */ - public static final class ProtobufTwist3d extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double dx = 1; - */ - private double dx; - - /** - * optional double dy = 2; - */ - private double dy; - - /** - * optional double dz = 3; - */ - private double dz; - - /** - * optional double rx = 4; - */ - private double rx; - - /** - * optional double ry = 5; - */ - private double ry; - - /** - * optional double rz = 6; - */ - private double rz; - - private ProtobufTwist3d() { - } - - /** - * @return a new empty instance of {@code ProtobufTwist3d} - */ - public static ProtobufTwist3d newInstance() { - return new ProtobufTwist3d(); - } - - /** - * optional double dx = 1; - * @return whether the dx field is set - */ - public boolean hasDx() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double dx = 1; - * @return this - */ - public ProtobufTwist3d clearDx() { - bitField0_ &= ~0x00000001; - dx = 0D; - return this; - } - - /** - * optional double dx = 1; - * @return the dx - */ - public double getDx() { - return dx; - } - - /** - * optional double dx = 1; - * @param value the dx to set - * @return this - */ - public ProtobufTwist3d setDx(final double value) { - bitField0_ |= 0x00000001; - dx = value; - return this; - } - - /** - * optional double dy = 2; - * @return whether the dy field is set - */ - public boolean hasDy() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double dy = 2; - * @return this - */ - public ProtobufTwist3d clearDy() { - bitField0_ &= ~0x00000002; - dy = 0D; - return this; - } - - /** - * optional double dy = 2; - * @return the dy - */ - public double getDy() { - return dy; - } - - /** - * optional double dy = 2; - * @param value the dy to set - * @return this - */ - public ProtobufTwist3d setDy(final double value) { - bitField0_ |= 0x00000002; - dy = value; - return this; - } - - /** - * optional double dz = 3; - * @return whether the dz field is set - */ - public boolean hasDz() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double dz = 3; - * @return this - */ - public ProtobufTwist3d clearDz() { - bitField0_ &= ~0x00000004; - dz = 0D; - return this; - } - - /** - * optional double dz = 3; - * @return the dz - */ - public double getDz() { - return dz; - } - - /** - * optional double dz = 3; - * @param value the dz to set - * @return this - */ - public ProtobufTwist3d setDz(final double value) { - bitField0_ |= 0x00000004; - dz = value; - return this; - } - - /** - * optional double rx = 4; - * @return whether the rx field is set - */ - public boolean hasRx() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double rx = 4; - * @return this - */ - public ProtobufTwist3d clearRx() { - bitField0_ &= ~0x00000008; - rx = 0D; - return this; - } - - /** - * optional double rx = 4; - * @return the rx - */ - public double getRx() { - return rx; - } - - /** - * optional double rx = 4; - * @param value the rx to set - * @return this - */ - public ProtobufTwist3d setRx(final double value) { - bitField0_ |= 0x00000008; - rx = value; - return this; - } - - /** - * optional double ry = 5; - * @return whether the ry field is set - */ - public boolean hasRy() { - return (bitField0_ & 0x00000010) != 0; - } - - /** - * optional double ry = 5; - * @return this - */ - public ProtobufTwist3d clearRy() { - bitField0_ &= ~0x00000010; - ry = 0D; - return this; - } - - /** - * optional double ry = 5; - * @return the ry - */ - public double getRy() { - return ry; - } - - /** - * optional double ry = 5; - * @param value the ry to set - * @return this - */ - public ProtobufTwist3d setRy(final double value) { - bitField0_ |= 0x00000010; - ry = value; - return this; - } - - /** - * optional double rz = 6; - * @return whether the rz field is set - */ - public boolean hasRz() { - return (bitField0_ & 0x00000020) != 0; - } - - /** - * optional double rz = 6; - * @return this - */ - public ProtobufTwist3d clearRz() { - bitField0_ &= ~0x00000020; - rz = 0D; - return this; - } - - /** - * optional double rz = 6; - * @return the rz - */ - public double getRz() { - return rz; - } - - /** - * optional double rz = 6; - * @param value the rz to set - * @return this - */ - public ProtobufTwist3d setRz(final double value) { - bitField0_ |= 0x00000020; - rz = value; - return this; - } - - @Override - public ProtobufTwist3d copyFrom(final ProtobufTwist3d other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - dx = other.dx; - dy = other.dy; - dz = other.dz; - rx = other.rx; - ry = other.ry; - rz = other.rz; - } - return this; - } - - @Override - public ProtobufTwist3d mergeFrom(final ProtobufTwist3d other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasDx()) { - setDx(other.dx); - } - if (other.hasDy()) { - setDy(other.dy); - } - if (other.hasDz()) { - setDz(other.dz); - } - if (other.hasRx()) { - setRx(other.rx); - } - if (other.hasRy()) { - setRy(other.ry); - } - if (other.hasRz()) { - setRz(other.rz); - } - return this; - } - - @Override - public ProtobufTwist3d clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - dx = 0D; - dy = 0D; - dz = 0D; - rx = 0D; - ry = 0D; - rz = 0D; - return this; - } - - @Override - public ProtobufTwist3d clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTwist3d)) { - return false; - } - ProtobufTwist3d other = (ProtobufTwist3d) o; - return bitField0_ == other.bitField0_ - && (!hasDx() || ProtoUtil.isEqual(dx, other.dx)) - && (!hasDy() || ProtoUtil.isEqual(dy, other.dy)) - && (!hasDz() || ProtoUtil.isEqual(dz, other.dz)) - && (!hasRx() || ProtoUtil.isEqual(rx, other.rx)) - && (!hasRy() || ProtoUtil.isEqual(ry, other.ry)) - && (!hasRz() || ProtoUtil.isEqual(rz, other.rz)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(dx); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(dy); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(dz); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(rx); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeRawByte((byte) 41); - output.writeDoubleNoTag(ry); - } - if ((bitField0_ & 0x00000020) != 0) { - output.writeRawByte((byte) 49); - output.writeDoubleNoTag(rz); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000010) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000020) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTwist3d mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // dx - dx = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // dy - dy = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // dz - dz = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // rx - rx = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 41) { - break; - } - } - case 41: { - // ry - ry = input.readDouble(); - bitField0_ |= 0x00000010; - tag = input.readTag(); - if (tag != 49) { - break; - } - } - case 49: { - // rz - rz = input.readDouble(); - bitField0_ |= 0x00000020; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.dx, dx); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.dy, dy); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.dz, dz); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.rx, rx); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeDouble(FieldNames.ry, ry); - } - if ((bitField0_ & 0x00000020) != 0) { - output.writeDouble(FieldNames.rz, rz); - } - output.endObject(); - } - - @Override - public ProtobufTwist3d mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3220: { - if (input.isAtField(FieldNames.dx)) { - if (!input.trySkipNullValue()) { - dx = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3221: { - if (input.isAtField(FieldNames.dy)) { - if (!input.trySkipNullValue()) { - dy = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3222: { - if (input.isAtField(FieldNames.dz)) { - if (!input.trySkipNullValue()) { - dz = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3654: { - if (input.isAtField(FieldNames.rx)) { - if (!input.trySkipNullValue()) { - rx = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3655: { - if (input.isAtField(FieldNames.ry)) { - if (!input.trySkipNullValue()) { - ry = input.readDouble(); - bitField0_ |= 0x00000010; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3656: { - if (input.isAtField(FieldNames.rz)) { - if (!input.trySkipNullValue()) { - rz = input.readDouble(); - bitField0_ |= 0x00000020; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTwist3d clone() { - return new ProtobufTwist3d().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTwist3d parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTwist3d(), data).checkInitialized(); - } - - public static ProtobufTwist3d parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTwist3d(), input).checkInitialized(); - } - - public static ProtobufTwist3d parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTwist3d(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTwist3d messages - */ - public static MessageFactory getFactory() { - return ProtobufTwist3dFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Geometry3D.wpi_proto_ProtobufTwist3d_descriptor; - } - - private enum ProtobufTwist3dFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTwist3d create() { - return ProtobufTwist3d.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName dx = FieldName.forField("dx"); - - static final FieldName dy = FieldName.forField("dy"); - - static final FieldName dz = FieldName.forField("dz"); - - static final FieldName rx = FieldName.forField("rx"); - - static final FieldName ry = FieldName.forField("ry"); - - static final FieldName rz = FieldName.forField("rz"); - } - } -} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/Kinematics.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/Kinematics.java deleted file mode 100644 index 0969647a8d..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/Kinematics.java +++ /dev/null @@ -1,5667 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; -import us.hebi.quickbuf.RepeatedMessage; - -public final class Kinematics { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(4185, - "ChBraW5lbWF0aWNzLnByb3RvEgl3cGkucHJvdG8aEGdlb21ldHJ5MmQucHJvdG8iTQoVUHJvdG9idWZD" + - "aGFzc2lzU3BlZWRzEg4KAnZ4GAEgASgBUgJ2eBIOCgJ2eRgCIAEoAVICdnkSFAoFb21lZ2EYAyABKAFS" + - "BW9tZWdhIlQKHFByb3RvYnVmQ2hhc3Npc0FjY2VsZXJhdGlvbnMSDgoCYXgYASABKAFSAmF4Eg4KAmF5" + - "GAIgASgBUgJheRIUCgVhbHBoYRgDIAEoAVIFYWxwaGEiRQojUHJvdG9idWZEaWZmZXJlbnRpYWxEcml2" + - "ZUtpbmVtYXRpY3MSHgoKdHJhY2t3aWR0aBgBIAEoAVIKdHJhY2t3aWR0aCJQCiRQcm90b2J1ZkRpZmZl" + - "cmVudGlhbERyaXZlV2hlZWxTcGVlZHMSEgoEbGVmdBgBIAEoAVIEbGVmdBIUCgVyaWdodBgCIAEoAVIF" + - "cmlnaHQiVworUHJvdG9idWZEaWZmZXJlbnRpYWxEcml2ZVdoZWVsQWNjZWxlcmF0aW9ucxISCgRsZWZ0" + - "GAEgASgBUgRsZWZ0EhQKBXJpZ2h0GAIgASgBUgVyaWdodCJTCidQcm90b2J1ZkRpZmZlcmVudGlhbERy" + - "aXZlV2hlZWxQb3NpdGlvbnMSEgoEbGVmdBgBIAEoAVIEbGVmdBIUCgVyaWdodBgCIAEoAVIFcmlnaHQi" + - "pAIKHlByb3RvYnVmTWVjYW51bURyaXZlS2luZW1hdGljcxI/Cgpmcm9udF9sZWZ0GAEgASgLMiAud3Bp" + - "LnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIJZnJvbnRMZWZ0EkEKC2Zyb250X3JpZ2h0GAIgASgL" + - "MiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIKZnJvbnRSaWdodBI9CglyZWFyX2xlZnQY" + - "AyABKAsyIC53cGkucHJvdG8uUHJvdG9idWZUcmFuc2xhdGlvbjJkUghyZWFyTGVmdBI/CgpyZWFyX3Jp" + - "Z2h0GAQgASgLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIJcmVhclJpZ2h0IqABCiJQ" + - "cm90b2J1Zk1lY2FudW1Ecml2ZVdoZWVsUG9zaXRpb25zEh0KCmZyb250X2xlZnQYASABKAFSCWZyb250" + - "TGVmdBIfCgtmcm9udF9yaWdodBgCIAEoAVIKZnJvbnRSaWdodBIbCglyZWFyX2xlZnQYAyABKAFSCHJl" + - "YXJMZWZ0Eh0KCnJlYXJfcmlnaHQYBCABKAFSCXJlYXJSaWdodCKdAQofUHJvdG9idWZNZWNhbnVtRHJp" + - "dmVXaGVlbFNwZWVkcxIdCgpmcm9udF9sZWZ0GAEgASgBUglmcm9udExlZnQSHwoLZnJvbnRfcmlnaHQY" + - "AiABKAFSCmZyb250UmlnaHQSGwoJcmVhcl9sZWZ0GAMgASgBUghyZWFyTGVmdBIdCgpyZWFyX3JpZ2h0" + - "GAQgASgBUglyZWFyUmlnaHQipAEKJlByb3RvYnVmTWVjYW51bURyaXZlV2hlZWxBY2NlbGVyYXRpb25z", - "Eh0KCmZyb250X2xlZnQYASABKAFSCWZyb250TGVmdBIfCgtmcm9udF9yaWdodBgCIAEoAVIKZnJvbnRS" + - "aWdodBIbCglyZWFyX2xlZnQYAyABKAFSCHJlYXJMZWZ0Eh0KCnJlYXJfcmlnaHQYBCABKAFSCXJlYXJS" + - "aWdodCJbCh1Qcm90b2J1ZlN3ZXJ2ZURyaXZlS2luZW1hdGljcxI6Cgdtb2R1bGVzGAEgAygLMiAud3Bp" + - "LnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIHbW9kdWxlcyJvChxQcm90b2J1ZlN3ZXJ2ZU1vZHVs" + - "ZVBvc2l0aW9uEhoKCGRpc3RhbmNlGAEgASgBUghkaXN0YW5jZRIzCgVhbmdsZRgCIAEoCzIdLndwaS5w" + - "cm90by5Qcm90b2J1ZlJvdGF0aW9uMmRSBWFuZ2xlImYKGVByb3RvYnVmU3dlcnZlTW9kdWxlU3RhdGUS" + - "FAoFc3BlZWQYASABKAFSBXNwZWVkEjMKBWFuZ2xlGAIgASgLMh0ud3BpLnByb3RvLlByb3RvYnVmUm90" + - "YXRpb24yZFIFYW5nbGUiewogUHJvdG9idWZTd2VydmVNb2R1bGVBY2NlbGVyYXRpb24SIgoMYWNjZWxl" + - "cmF0aW9uGAEgASgBUgxhY2NlbGVyYXRpb24SMwoFYW5nbGUYAiABKAsyHS53cGkucHJvdG8uUHJvdG9i" + - "dWZSb3RhdGlvbjJkUgVhbmdsZUIXChVvcmcud3BpbGliLm1hdGgucHJvdG9K1hIKBhIEAABUAQoICgEM" + - "EgMAABIKCAoBAhIDAgASCgkKAgMAEgMEABoKCAoBCBIDBgAuCgkKAggBEgMGAC4KCgoCBAASBAgADAEK" + - "CgoDBAABEgMICB0KCwoEBAACABIDCQIQCgwKBQQAAgAFEgMJAggKDAoFBAACAAESAwkJCwoMCgUEAAIA" + - "AxIDCQ4PCgsKBAQAAgESAwoCEAoMCgUEAAIBBRIDCgIICgwKBQQAAgEBEgMKCQsKDAoFBAACAQMSAwoO" + - "DwoLCgQEAAICEgMLAhMKDAoFBAACAgUSAwsCCAoMCgUEAAICARIDCwkOCgwKBQQAAgIDEgMLERIKCgoC" + - "BAESBA4AEgEKCgoDBAEBEgMOCCQKCwoEBAECABIDDwIQCgwKBQQBAgAFEgMPAggKDAoFBAECAAESAw8J" + - "CwoMCgUEAQIAAxIDDw4PCgsKBAQBAgESAxACEAoMCgUEAQIBBRIDEAIICgwKBQQBAgEBEgMQCQsKDAoF" + - "BAECAQMSAxAODwoLCgQEAQICEgMRAhMKDAoFBAECAgUSAxECCAoMCgUEAQICARIDEQkOCgwKBQQBAgID" + - "EgMRERIKCgoCBAISBBQAFgEKCgoDBAIBEgMUCCsKCwoEBAICABIDFQIYCgwKBQQCAgAFEgMVAggKDAoF" + - "BAICAAESAxUJEwoMCgUEAgIAAxIDFRYXCgoKAgQDEgQYABsBCgoKAwQDARIDGAgsCgsKBAQDAgASAxkC" + - "EgoMCgUEAwIABRIDGQIICgwKBQQDAgABEgMZCQ0KDAoFBAMCAAMSAxkQEQoLCgQEAwIBEgMaAhMKDAoF", - "BAMCAQUSAxoCCAoMCgUEAwIBARIDGgkOCgwKBQQDAgEDEgMaERIKCgoCBAQSBB0AIAEKCgoDBAQBEgMd" + - "CDMKCwoEBAQCABIDHgISCgwKBQQEAgAFEgMeAggKDAoFBAQCAAESAx4JDQoMCgUEBAIAAxIDHhARCgsK" + - "BAQEAgESAx8CEwoMCgUEBAIBBRIDHwIICgwKBQQEAgEBEgMfCQ4KDAoFBAQCAQMSAx8REgoKCgIEBRIE" + - "IgAlAQoKCgMEBQESAyIILwoLCgQEBQIAEgMjAhIKDAoFBAUCAAUSAyMCCAoMCgUEBQIAARIDIwkNCgwK" + - "BQQFAgADEgMjEBEKCwoEBAUCARIDJAITCgwKBQQFAgEFEgMkAggKDAoFBAUCAQESAyQJDgoMCgUEBQIB" + - "AxIDJBESCgoKAgQGEgQnACwBCgoKAwQGARIDJwgmCgsKBAQGAgASAygCJwoMCgUEBgIABhIDKAIXCgwK" + - "BQQGAgABEgMoGCIKDAoFBAYCAAMSAyglJgoLCgQEBgIBEgMpAigKDAoFBAYCAQYSAykCFwoMCgUEBgIB" + - "ARIDKRgjCgwKBQQGAgEDEgMpJicKCwoEBAYCAhIDKgImCgwKBQQGAgIGEgMqAhcKDAoFBAYCAgESAyoY" + - "IQoMCgUEBgICAxIDKiQlCgsKBAQGAgMSAysCJwoMCgUEBgIDBhIDKwIXCgwKBQQGAgMBEgMrGCIKDAoF" + - "BAYCAwMSAyslJgoKCgIEBxIELgAzAQoKCgMEBwESAy4IKgoLCgQEBwIAEgMvAhgKDAoFBAcCAAUSAy8C" + - "CAoMCgUEBwIAARIDLwkTCgwKBQQHAgADEgMvFhcKCwoEBAcCARIDMAIZCgwKBQQHAgEFEgMwAggKDAoF" + - "BAcCAQESAzAJFAoMCgUEBwIBAxIDMBcYCgsKBAQHAgISAzECFwoMCgUEBwICBRIDMQIICgwKBQQHAgIB" + - "EgMxCRIKDAoFBAcCAgMSAzEVFgoLCgQEBwIDEgMyAhgKDAoFBAcCAwUSAzICCAoMCgUEBwIDARIDMgkT" + - "CgwKBQQHAgMDEgMyFhcKCgoCBAgSBDUAOgEKCgoDBAgBEgM1CCcKCwoEBAgCABIDNgIYCgwKBQQIAgAF" + - "EgM2AggKDAoFBAgCAAESAzYJEwoMCgUECAIAAxIDNhYXCgsKBAQIAgESAzcCGQoMCgUECAIBBRIDNwII" + - "CgwKBQQIAgEBEgM3CRQKDAoFBAgCAQMSAzcXGAoLCgQECAICEgM4AhcKDAoFBAgCAgUSAzgCCAoMCgUE" + - "CAICARIDOAkSCgwKBQQIAgIDEgM4FRYKCwoEBAgCAxIDOQIYCgwKBQQIAgMFEgM5AggKDAoFBAgCAwES" + - "AzkJEwoMCgUECAIDAxIDORYXCgoKAgQJEgQ8AEEBCgoKAwQJARIDPAguCgsKBAQJAgASAz0CGAoMCgUE" + - "CQIABRIDPQIICgwKBQQJAgABEgM9CRMKDAoFBAkCAAMSAz0WFwoLCgQECQIBEgM+AhkKDAoFBAkCAQUS" + - "Az4CCAoMCgUECQIBARIDPgkUCgwKBQQJAgEDEgM+FxgKCwoEBAkCAhIDPwIXCgwKBQQJAgIFEgM/AggK", - "DAoFBAkCAgESAz8JEgoMCgUECQICAxIDPxUWCgsKBAQJAgMSA0ACGAoMCgUECQIDBRIDQAIICgwKBQQJ" + - "AgMBEgNACRMKDAoFBAkCAwMSA0AWFwoKCgIEChIEQwBFAQoKCgMECgESA0MIJQoLCgQECgIAEgNEAi0K" + - "DAoFBAoCAAQSA0QCCgoMCgUECgIABhIDRAsgCgwKBQQKAgABEgNEISgKDAoFBAoCAAMSA0QrLAoKCgIE" + - "CxIERwBKAQoKCgMECwESA0cIJAoLCgQECwIAEgNIAhYKDAoFBAsCAAUSA0gCCAoMCgUECwIAARIDSAkR" + - "CgwKBQQLAgADEgNIFBUKCwoEBAsCARIDSQIfCgwKBQQLAgEGEgNJAhQKDAoFBAsCAQESA0kVGgoMCgUE" + - "CwIBAxIDSR0eCgoKAgQMEgRMAE8BCgoKAwQMARIDTAghCgsKBAQMAgASA00CEwoMCgUEDAIABRIDTQII" + - "CgwKBQQMAgABEgNNCQ4KDAoFBAwCAAMSA00REgoLCgQEDAIBEgNOAh8KDAoFBAwCAQYSA04CFAoMCgUE" + - "DAIBARIDThUaCgwKBQQMAgEDEgNOHR4KCgoCBA0SBFEAVAEKCgoDBA0BEgNRCCgKCwoEBA0CABIDUgIa" + - "CgwKBQQNAgAFEgNSAggKDAoFBA0CAAESA1IJFQoMCgUEDQIAAxIDUhgZCgsKBAQNAgESA1MCHwoMCgUE" + - "DQIBBhIDUwIUCgwKBQQNAgEBEgNTFRoKDAoFBA0CAQMSA1MdHmIGcHJvdG8z"); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("kinematics.proto", "wpi.proto", descriptorData, Geometry2D.getDescriptor()); - - static final Descriptors.Descriptor wpi_proto_ProtobufChassisSpeeds_descriptor = descriptor.internalContainedType(49, 77, "ProtobufChassisSpeeds", "wpi.proto.ProtobufChassisSpeeds"); - - static final Descriptors.Descriptor wpi_proto_ProtobufChassisAccelerations_descriptor = descriptor.internalContainedType(128, 84, "ProtobufChassisAccelerations", "wpi.proto.ProtobufChassisAccelerations"); - - static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveKinematics_descriptor = descriptor.internalContainedType(214, 69, "ProtobufDifferentialDriveKinematics", "wpi.proto.ProtobufDifferentialDriveKinematics"); - - static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor = descriptor.internalContainedType(285, 80, "ProtobufDifferentialDriveWheelSpeeds", "wpi.proto.ProtobufDifferentialDriveWheelSpeeds"); - - static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelAccelerations_descriptor = descriptor.internalContainedType(367, 87, "ProtobufDifferentialDriveWheelAccelerations", "wpi.proto.ProtobufDifferentialDriveWheelAccelerations"); - - static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelPositions_descriptor = descriptor.internalContainedType(456, 83, "ProtobufDifferentialDriveWheelPositions", "wpi.proto.ProtobufDifferentialDriveWheelPositions"); - - static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveKinematics_descriptor = descriptor.internalContainedType(542, 292, "ProtobufMecanumDriveKinematics", "wpi.proto.ProtobufMecanumDriveKinematics"); - - static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor = descriptor.internalContainedType(837, 160, "ProtobufMecanumDriveWheelPositions", "wpi.proto.ProtobufMecanumDriveWheelPositions"); - - static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor = descriptor.internalContainedType(1000, 157, "ProtobufMecanumDriveWheelSpeeds", "wpi.proto.ProtobufMecanumDriveWheelSpeeds"); - - static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelAccelerations_descriptor = descriptor.internalContainedType(1160, 164, "ProtobufMecanumDriveWheelAccelerations", "wpi.proto.ProtobufMecanumDriveWheelAccelerations"); - - static final Descriptors.Descriptor wpi_proto_ProtobufSwerveDriveKinematics_descriptor = descriptor.internalContainedType(1326, 91, "ProtobufSwerveDriveKinematics", "wpi.proto.ProtobufSwerveDriveKinematics"); - - static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModulePosition_descriptor = descriptor.internalContainedType(1419, 111, "ProtobufSwerveModulePosition", "wpi.proto.ProtobufSwerveModulePosition"); - - static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModuleState_descriptor = descriptor.internalContainedType(1532, 102, "ProtobufSwerveModuleState", "wpi.proto.ProtobufSwerveModuleState"); - - static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModuleAcceleration_descriptor = descriptor.internalContainedType(1636, 123, "ProtobufSwerveModuleAcceleration", "wpi.proto.ProtobufSwerveModuleAcceleration"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufChassisSpeeds} - */ - public static final class ProtobufChassisSpeeds extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double vx = 1; - */ - private double vx; - - /** - * optional double vy = 2; - */ - private double vy; - - /** - * optional double omega = 3; - */ - private double omega; - - private ProtobufChassisSpeeds() { - } - - /** - * @return a new empty instance of {@code ProtobufChassisSpeeds} - */ - public static ProtobufChassisSpeeds newInstance() { - return new ProtobufChassisSpeeds(); - } - - /** - * optional double vx = 1; - * @return whether the vx field is set - */ - public boolean hasVx() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double vx = 1; - * @return this - */ - public ProtobufChassisSpeeds clearVx() { - bitField0_ &= ~0x00000001; - vx = 0D; - return this; - } - - /** - * optional double vx = 1; - * @return the vx - */ - public double getVx() { - return vx; - } - - /** - * optional double vx = 1; - * @param value the vx to set - * @return this - */ - public ProtobufChassisSpeeds setVx(final double value) { - bitField0_ |= 0x00000001; - vx = value; - return this; - } - - /** - * optional double vy = 2; - * @return whether the vy field is set - */ - public boolean hasVy() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double vy = 2; - * @return this - */ - public ProtobufChassisSpeeds clearVy() { - bitField0_ &= ~0x00000002; - vy = 0D; - return this; - } - - /** - * optional double vy = 2; - * @return the vy - */ - public double getVy() { - return vy; - } - - /** - * optional double vy = 2; - * @param value the vy to set - * @return this - */ - public ProtobufChassisSpeeds setVy(final double value) { - bitField0_ |= 0x00000002; - vy = value; - return this; - } - - /** - * optional double omega = 3; - * @return whether the omega field is set - */ - public boolean hasOmega() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double omega = 3; - * @return this - */ - public ProtobufChassisSpeeds clearOmega() { - bitField0_ &= ~0x00000004; - omega = 0D; - return this; - } - - /** - * optional double omega = 3; - * @return the omega - */ - public double getOmega() { - return omega; - } - - /** - * optional double omega = 3; - * @param value the omega to set - * @return this - */ - public ProtobufChassisSpeeds setOmega(final double value) { - bitField0_ |= 0x00000004; - omega = value; - return this; - } - - @Override - public ProtobufChassisSpeeds copyFrom(final ProtobufChassisSpeeds other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - vx = other.vx; - vy = other.vy; - omega = other.omega; - } - return this; - } - - @Override - public ProtobufChassisSpeeds mergeFrom(final ProtobufChassisSpeeds other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasVx()) { - setVx(other.vx); - } - if (other.hasVy()) { - setVy(other.vy); - } - if (other.hasOmega()) { - setOmega(other.omega); - } - return this; - } - - @Override - public ProtobufChassisSpeeds clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - vx = 0D; - vy = 0D; - omega = 0D; - return this; - } - - @Override - public ProtobufChassisSpeeds clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufChassisSpeeds)) { - return false; - } - ProtobufChassisSpeeds other = (ProtobufChassisSpeeds) o; - return bitField0_ == other.bitField0_ - && (!hasVx() || ProtoUtil.isEqual(vx, other.vx)) - && (!hasVy() || ProtoUtil.isEqual(vy, other.vy)) - && (!hasOmega() || ProtoUtil.isEqual(omega, other.omega)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(vx); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(vy); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(omega); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufChassisSpeeds mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // vx - vx = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // vy - vy = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // omega - omega = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.vx, vx); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.vy, vy); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.omega, omega); - } - output.endObject(); - } - - @Override - public ProtobufChassisSpeeds mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3778: { - if (input.isAtField(FieldNames.vx)) { - if (!input.trySkipNullValue()) { - vx = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3779: { - if (input.isAtField(FieldNames.vy)) { - if (!input.trySkipNullValue()) { - vy = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 105858401: { - if (input.isAtField(FieldNames.omega)) { - if (!input.trySkipNullValue()) { - omega = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufChassisSpeeds clone() { - return new ProtobufChassisSpeeds().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufChassisSpeeds parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), data).checkInitialized(); - } - - public static ProtobufChassisSpeeds parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), input).checkInitialized(); - } - - public static ProtobufChassisSpeeds parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufChassisSpeeds messages - */ - public static MessageFactory getFactory() { - return ProtobufChassisSpeedsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufChassisSpeeds_descriptor; - } - - private enum ProtobufChassisSpeedsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufChassisSpeeds create() { - return ProtobufChassisSpeeds.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName vx = FieldName.forField("vx"); - - static final FieldName vy = FieldName.forField("vy"); - - static final FieldName omega = FieldName.forField("omega"); - } - } - - /** - * Protobuf type {@code ProtobufChassisAccelerations} - */ - public static final class ProtobufChassisAccelerations extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double ax = 1; - */ - private double ax; - - /** - * optional double ay = 2; - */ - private double ay; - - /** - * optional double alpha = 3; - */ - private double alpha; - - private ProtobufChassisAccelerations() { - } - - /** - * @return a new empty instance of {@code ProtobufChassisAccelerations} - */ - public static ProtobufChassisAccelerations newInstance() { - return new ProtobufChassisAccelerations(); - } - - /** - * optional double ax = 1; - * @return whether the ax field is set - */ - public boolean hasAx() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double ax = 1; - * @return this - */ - public ProtobufChassisAccelerations clearAx() { - bitField0_ &= ~0x00000001; - ax = 0D; - return this; - } - - /** - * optional double ax = 1; - * @return the ax - */ - public double getAx() { - return ax; - } - - /** - * optional double ax = 1; - * @param value the ax to set - * @return this - */ - public ProtobufChassisAccelerations setAx(final double value) { - bitField0_ |= 0x00000001; - ax = value; - return this; - } - - /** - * optional double ay = 2; - * @return whether the ay field is set - */ - public boolean hasAy() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double ay = 2; - * @return this - */ - public ProtobufChassisAccelerations clearAy() { - bitField0_ &= ~0x00000002; - ay = 0D; - return this; - } - - /** - * optional double ay = 2; - * @return the ay - */ - public double getAy() { - return ay; - } - - /** - * optional double ay = 2; - * @param value the ay to set - * @return this - */ - public ProtobufChassisAccelerations setAy(final double value) { - bitField0_ |= 0x00000002; - ay = value; - return this; - } - - /** - * optional double alpha = 3; - * @return whether the alpha field is set - */ - public boolean hasAlpha() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double alpha = 3; - * @return this - */ - public ProtobufChassisAccelerations clearAlpha() { - bitField0_ &= ~0x00000004; - alpha = 0D; - return this; - } - - /** - * optional double alpha = 3; - * @return the alpha - */ - public double getAlpha() { - return alpha; - } - - /** - * optional double alpha = 3; - * @param value the alpha to set - * @return this - */ - public ProtobufChassisAccelerations setAlpha(final double value) { - bitField0_ |= 0x00000004; - alpha = value; - return this; - } - - @Override - public ProtobufChassisAccelerations copyFrom(final ProtobufChassisAccelerations other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - ax = other.ax; - ay = other.ay; - alpha = other.alpha; - } - return this; - } - - @Override - public ProtobufChassisAccelerations mergeFrom(final ProtobufChassisAccelerations other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasAx()) { - setAx(other.ax); - } - if (other.hasAy()) { - setAy(other.ay); - } - if (other.hasAlpha()) { - setAlpha(other.alpha); - } - return this; - } - - @Override - public ProtobufChassisAccelerations clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - ax = 0D; - ay = 0D; - alpha = 0D; - return this; - } - - @Override - public ProtobufChassisAccelerations clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufChassisAccelerations)) { - return false; - } - ProtobufChassisAccelerations other = (ProtobufChassisAccelerations) o; - return bitField0_ == other.bitField0_ - && (!hasAx() || ProtoUtil.isEqual(ax, other.ax)) - && (!hasAy() || ProtoUtil.isEqual(ay, other.ay)) - && (!hasAlpha() || ProtoUtil.isEqual(alpha, other.alpha)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(ax); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(ay); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(alpha); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufChassisAccelerations mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // ax - ax = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // ay - ay = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // alpha - alpha = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.ax, ax); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.ay, ay); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.alpha, alpha); - } - output.endObject(); - } - - @Override - public ProtobufChassisAccelerations mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3127: { - if (input.isAtField(FieldNames.ax)) { - if (!input.trySkipNullValue()) { - ax = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3128: { - if (input.isAtField(FieldNames.ay)) { - if (!input.trySkipNullValue()) { - ay = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 92909918: { - if (input.isAtField(FieldNames.alpha)) { - if (!input.trySkipNullValue()) { - alpha = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufChassisAccelerations clone() { - return new ProtobufChassisAccelerations().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufChassisAccelerations parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufChassisAccelerations(), data).checkInitialized(); - } - - public static ProtobufChassisAccelerations parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufChassisAccelerations(), input).checkInitialized(); - } - - public static ProtobufChassisAccelerations parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufChassisAccelerations(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufChassisAccelerations messages - */ - public static MessageFactory getFactory() { - return ProtobufChassisAccelerationsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufChassisAccelerations_descriptor; - } - - private enum ProtobufChassisAccelerationsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufChassisAccelerations create() { - return ProtobufChassisAccelerations.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName ax = FieldName.forField("ax"); - - static final FieldName ay = FieldName.forField("ay"); - - static final FieldName alpha = FieldName.forField("alpha"); - } - } - - /** - * Protobuf type {@code ProtobufDifferentialDriveKinematics} - */ - public static final class ProtobufDifferentialDriveKinematics extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double trackwidth = 1; - */ - private double trackwidth; - - private ProtobufDifferentialDriveKinematics() { - } - - /** - * @return a new empty instance of {@code ProtobufDifferentialDriveKinematics} - */ - public static ProtobufDifferentialDriveKinematics newInstance() { - return new ProtobufDifferentialDriveKinematics(); - } - - /** - * optional double trackwidth = 1; - * @return whether the trackwidth field is set - */ - public boolean hasTrackwidth() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double trackwidth = 1; - * @return this - */ - public ProtobufDifferentialDriveKinematics clearTrackwidth() { - bitField0_ &= ~0x00000001; - trackwidth = 0D; - return this; - } - - /** - * optional double trackwidth = 1; - * @return the trackwidth - */ - public double getTrackwidth() { - return trackwidth; - } - - /** - * optional double trackwidth = 1; - * @param value the trackwidth to set - * @return this - */ - public ProtobufDifferentialDriveKinematics setTrackwidth(final double value) { - bitField0_ |= 0x00000001; - trackwidth = value; - return this; - } - - @Override - public ProtobufDifferentialDriveKinematics copyFrom( - final ProtobufDifferentialDriveKinematics other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - trackwidth = other.trackwidth; - } - return this; - } - - @Override - public ProtobufDifferentialDriveKinematics mergeFrom( - final ProtobufDifferentialDriveKinematics other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasTrackwidth()) { - setTrackwidth(other.trackwidth); - } - return this; - } - - @Override - public ProtobufDifferentialDriveKinematics clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - trackwidth = 0D; - return this; - } - - @Override - public ProtobufDifferentialDriveKinematics clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufDifferentialDriveKinematics)) { - return false; - } - ProtobufDifferentialDriveKinematics other = (ProtobufDifferentialDriveKinematics) o; - return bitField0_ == other.bitField0_ - && (!hasTrackwidth() || ProtoUtil.isEqual(trackwidth, other.trackwidth)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(trackwidth); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufDifferentialDriveKinematics mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // trackwidth - trackwidth = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.trackwidth, trackwidth); - } - output.endObject(); - } - - @Override - public ProtobufDifferentialDriveKinematics mergeFrom(final JsonSource input) throws - IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 1181766491: { - if (input.isAtField(FieldNames.trackwidth)) { - if (!input.trySkipNullValue()) { - trackwidth = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufDifferentialDriveKinematics clone() { - return new ProtobufDifferentialDriveKinematics().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufDifferentialDriveKinematics parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), data).checkInitialized(); - } - - public static ProtobufDifferentialDriveKinematics parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), input).checkInitialized(); - } - - public static ProtobufDifferentialDriveKinematics parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufDifferentialDriveKinematics messages - */ - public static MessageFactory getFactory() { - return ProtobufDifferentialDriveKinematicsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufDifferentialDriveKinematics_descriptor; - } - - private enum ProtobufDifferentialDriveKinematicsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufDifferentialDriveKinematics create() { - return ProtobufDifferentialDriveKinematics.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName trackwidth = FieldName.forField("trackwidth"); - } - } - - /** - * Protobuf type {@code ProtobufDifferentialDriveWheelSpeeds} - */ - public static final class ProtobufDifferentialDriveWheelSpeeds extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double left = 1; - */ - private double left; - - /** - * optional double right = 2; - */ - private double right; - - private ProtobufDifferentialDriveWheelSpeeds() { - } - - /** - * @return a new empty instance of {@code ProtobufDifferentialDriveWheelSpeeds} - */ - public static ProtobufDifferentialDriveWheelSpeeds newInstance() { - return new ProtobufDifferentialDriveWheelSpeeds(); - } - - /** - * optional double left = 1; - * @return whether the left field is set - */ - public boolean hasLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double left = 1; - * @return this - */ - public ProtobufDifferentialDriveWheelSpeeds clearLeft() { - bitField0_ &= ~0x00000001; - left = 0D; - return this; - } - - /** - * optional double left = 1; - * @return the left - */ - public double getLeft() { - return left; - } - - /** - * optional double left = 1; - * @param value the left to set - * @return this - */ - public ProtobufDifferentialDriveWheelSpeeds setLeft(final double value) { - bitField0_ |= 0x00000001; - left = value; - return this; - } - - /** - * optional double right = 2; - * @return whether the right field is set - */ - public boolean hasRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double right = 2; - * @return this - */ - public ProtobufDifferentialDriveWheelSpeeds clearRight() { - bitField0_ &= ~0x00000002; - right = 0D; - return this; - } - - /** - * optional double right = 2; - * @return the right - */ - public double getRight() { - return right; - } - - /** - * optional double right = 2; - * @param value the right to set - * @return this - */ - public ProtobufDifferentialDriveWheelSpeeds setRight(final double value) { - bitField0_ |= 0x00000002; - right = value; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelSpeeds copyFrom( - final ProtobufDifferentialDriveWheelSpeeds other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - left = other.left; - right = other.right; - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelSpeeds mergeFrom( - final ProtobufDifferentialDriveWheelSpeeds other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasLeft()) { - setLeft(other.left); - } - if (other.hasRight()) { - setRight(other.right); - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelSpeeds clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - left = 0D; - right = 0D; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelSpeeds clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufDifferentialDriveWheelSpeeds)) { - return false; - } - ProtobufDifferentialDriveWheelSpeeds other = (ProtobufDifferentialDriveWheelSpeeds) o; - return bitField0_ == other.bitField0_ - && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) - && (!hasRight() || ProtoUtil.isEqual(right, other.right)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(right); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // left - left = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // right - right = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.left, left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.right, right); - } - output.endObject(); - } - - @Override - public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final JsonSource input) throws - IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3317767: { - if (input.isAtField(FieldNames.left)) { - if (!input.trySkipNullValue()) { - left = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 108511772: { - if (input.isAtField(FieldNames.right)) { - if (!input.trySkipNullValue()) { - right = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufDifferentialDriveWheelSpeeds clone() { - return new ProtobufDifferentialDriveWheelSpeeds().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), data).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), input).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufDifferentialDriveWheelSpeeds messages - */ - public static MessageFactory getFactory() { - return ProtobufDifferentialDriveWheelSpeedsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor; - } - - private enum ProtobufDifferentialDriveWheelSpeedsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufDifferentialDriveWheelSpeeds create() { - return ProtobufDifferentialDriveWheelSpeeds.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName left = FieldName.forField("left"); - - static final FieldName right = FieldName.forField("right"); - } - } - - /** - * Protobuf type {@code ProtobufDifferentialDriveWheelAccelerations} - */ - public static final class ProtobufDifferentialDriveWheelAccelerations extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double left = 1; - */ - private double left; - - /** - * optional double right = 2; - */ - private double right; - - private ProtobufDifferentialDriveWheelAccelerations() { - } - - /** - * @return a new empty instance of {@code ProtobufDifferentialDriveWheelAccelerations} - */ - public static ProtobufDifferentialDriveWheelAccelerations newInstance() { - return new ProtobufDifferentialDriveWheelAccelerations(); - } - - /** - * optional double left = 1; - * @return whether the left field is set - */ - public boolean hasLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double left = 1; - * @return this - */ - public ProtobufDifferentialDriveWheelAccelerations clearLeft() { - bitField0_ &= ~0x00000001; - left = 0D; - return this; - } - - /** - * optional double left = 1; - * @return the left - */ - public double getLeft() { - return left; - } - - /** - * optional double left = 1; - * @param value the left to set - * @return this - */ - public ProtobufDifferentialDriveWheelAccelerations setLeft(final double value) { - bitField0_ |= 0x00000001; - left = value; - return this; - } - - /** - * optional double right = 2; - * @return whether the right field is set - */ - public boolean hasRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double right = 2; - * @return this - */ - public ProtobufDifferentialDriveWheelAccelerations clearRight() { - bitField0_ &= ~0x00000002; - right = 0D; - return this; - } - - /** - * optional double right = 2; - * @return the right - */ - public double getRight() { - return right; - } - - /** - * optional double right = 2; - * @param value the right to set - * @return this - */ - public ProtobufDifferentialDriveWheelAccelerations setRight(final double value) { - bitField0_ |= 0x00000002; - right = value; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelAccelerations copyFrom( - final ProtobufDifferentialDriveWheelAccelerations other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - left = other.left; - right = other.right; - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelAccelerations mergeFrom( - final ProtobufDifferentialDriveWheelAccelerations other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasLeft()) { - setLeft(other.left); - } - if (other.hasRight()) { - setRight(other.right); - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelAccelerations clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - left = 0D; - right = 0D; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelAccelerations clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufDifferentialDriveWheelAccelerations)) { - return false; - } - ProtobufDifferentialDriveWheelAccelerations other = (ProtobufDifferentialDriveWheelAccelerations) o; - return bitField0_ == other.bitField0_ - && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) - && (!hasRight() || ProtoUtil.isEqual(right, other.right)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(right); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufDifferentialDriveWheelAccelerations mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // left - left = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // right - right = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.left, left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.right, right); - } - output.endObject(); - } - - @Override - public ProtobufDifferentialDriveWheelAccelerations mergeFrom(final JsonSource input) throws - IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3317767: { - if (input.isAtField(FieldNames.left)) { - if (!input.trySkipNullValue()) { - left = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 108511772: { - if (input.isAtField(FieldNames.right)) { - if (!input.trySkipNullValue()) { - right = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufDifferentialDriveWheelAccelerations clone() { - return new ProtobufDifferentialDriveWheelAccelerations().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufDifferentialDriveWheelAccelerations parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelAccelerations(), data).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelAccelerations parseFrom(final ProtoSource input) - throws IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelAccelerations(), input).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelAccelerations parseFrom(final JsonSource input) - throws IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelAccelerations(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufDifferentialDriveWheelAccelerations messages - */ - public static MessageFactory getFactory() { - return ProtobufDifferentialDriveWheelAccelerationsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufDifferentialDriveWheelAccelerations_descriptor; - } - - private enum ProtobufDifferentialDriveWheelAccelerationsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufDifferentialDriveWheelAccelerations create() { - return ProtobufDifferentialDriveWheelAccelerations.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName left = FieldName.forField("left"); - - static final FieldName right = FieldName.forField("right"); - } - } - - /** - * Protobuf type {@code ProtobufDifferentialDriveWheelPositions} - */ - public static final class ProtobufDifferentialDriveWheelPositions extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double left = 1; - */ - private double left; - - /** - * optional double right = 2; - */ - private double right; - - private ProtobufDifferentialDriveWheelPositions() { - } - - /** - * @return a new empty instance of {@code ProtobufDifferentialDriveWheelPositions} - */ - public static ProtobufDifferentialDriveWheelPositions newInstance() { - return new ProtobufDifferentialDriveWheelPositions(); - } - - /** - * optional double left = 1; - * @return whether the left field is set - */ - public boolean hasLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double left = 1; - * @return this - */ - public ProtobufDifferentialDriveWheelPositions clearLeft() { - bitField0_ &= ~0x00000001; - left = 0D; - return this; - } - - /** - * optional double left = 1; - * @return the left - */ - public double getLeft() { - return left; - } - - /** - * optional double left = 1; - * @param value the left to set - * @return this - */ - public ProtobufDifferentialDriveWheelPositions setLeft(final double value) { - bitField0_ |= 0x00000001; - left = value; - return this; - } - - /** - * optional double right = 2; - * @return whether the right field is set - */ - public boolean hasRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double right = 2; - * @return this - */ - public ProtobufDifferentialDriveWheelPositions clearRight() { - bitField0_ &= ~0x00000002; - right = 0D; - return this; - } - - /** - * optional double right = 2; - * @return the right - */ - public double getRight() { - return right; - } - - /** - * optional double right = 2; - * @param value the right to set - * @return this - */ - public ProtobufDifferentialDriveWheelPositions setRight(final double value) { - bitField0_ |= 0x00000002; - right = value; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelPositions copyFrom( - final ProtobufDifferentialDriveWheelPositions other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - left = other.left; - right = other.right; - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelPositions mergeFrom( - final ProtobufDifferentialDriveWheelPositions other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasLeft()) { - setLeft(other.left); - } - if (other.hasRight()) { - setRight(other.right); - } - return this; - } - - @Override - public ProtobufDifferentialDriveWheelPositions clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - left = 0D; - right = 0D; - return this; - } - - @Override - public ProtobufDifferentialDriveWheelPositions clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufDifferentialDriveWheelPositions)) { - return false; - } - ProtobufDifferentialDriveWheelPositions other = (ProtobufDifferentialDriveWheelPositions) o; - return bitField0_ == other.bitField0_ - && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) - && (!hasRight() || ProtoUtil.isEqual(right, other.right)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(right); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufDifferentialDriveWheelPositions mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // left - left = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // right - right = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.left, left); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.right, right); - } - output.endObject(); - } - - @Override - public ProtobufDifferentialDriveWheelPositions mergeFrom(final JsonSource input) throws - IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3317767: { - if (input.isAtField(FieldNames.left)) { - if (!input.trySkipNullValue()) { - left = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 108511772: { - if (input.isAtField(FieldNames.right)) { - if (!input.trySkipNullValue()) { - right = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufDifferentialDriveWheelPositions clone() { - return new ProtobufDifferentialDriveWheelPositions().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufDifferentialDriveWheelPositions parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelPositions(), data).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelPositions parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelPositions(), input).checkInitialized(); - } - - public static ProtobufDifferentialDriveWheelPositions parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelPositions(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufDifferentialDriveWheelPositions messages - */ - public static MessageFactory getFactory() { - return ProtobufDifferentialDriveWheelPositionsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufDifferentialDriveWheelPositions_descriptor; - } - - private enum ProtobufDifferentialDriveWheelPositionsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufDifferentialDriveWheelPositions create() { - return ProtobufDifferentialDriveWheelPositions.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName left = FieldName.forField("left"); - - static final FieldName right = FieldName.forField("right"); - } - } - - /** - * Protobuf type {@code ProtobufMecanumDriveKinematics} - */ - public static final class ProtobufMecanumDriveKinematics extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional .wpi.proto.ProtobufTranslation2d front_left = 1; - */ - private final Geometry2D.ProtobufTranslation2d frontLeft = Geometry2D.ProtobufTranslation2d.newInstance(); - - /** - * optional .wpi.proto.ProtobufTranslation2d front_right = 2; - */ - private final Geometry2D.ProtobufTranslation2d frontRight = Geometry2D.ProtobufTranslation2d.newInstance(); - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; - */ - private final Geometry2D.ProtobufTranslation2d rearLeft = Geometry2D.ProtobufTranslation2d.newInstance(); - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; - */ - private final Geometry2D.ProtobufTranslation2d rearRight = Geometry2D.ProtobufTranslation2d.newInstance(); - - private ProtobufMecanumDriveKinematics() { - } - - /** - * @return a new empty instance of {@code ProtobufMecanumDriveKinematics} - */ - public static ProtobufMecanumDriveKinematics newInstance() { - return new ProtobufMecanumDriveKinematics(); - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_left = 1; - * @return whether the frontLeft field is set - */ - public boolean hasFrontLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_left = 1; - * @return this - */ - public ProtobufMecanumDriveKinematics clearFrontLeft() { - bitField0_ &= ~0x00000001; - frontLeft.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_left = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableFrontLeft()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufTranslation2d getFrontLeft() { - return frontLeft; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_left = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufTranslation2d getMutableFrontLeft() { - bitField0_ |= 0x00000001; - return frontLeft; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_left = 1; - * @param value the frontLeft to set - * @return this - */ - public ProtobufMecanumDriveKinematics setFrontLeft( - final Geometry2D.ProtobufTranslation2d value) { - bitField0_ |= 0x00000001; - frontLeft.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_right = 2; - * @return whether the frontRight field is set - */ - public boolean hasFrontRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_right = 2; - * @return this - */ - public ProtobufMecanumDriveKinematics clearFrontRight() { - bitField0_ &= ~0x00000002; - frontRight.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_right = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableFrontRight()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufTranslation2d getFrontRight() { - return frontRight; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_right = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufTranslation2d getMutableFrontRight() { - bitField0_ |= 0x00000002; - return frontRight; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d front_right = 2; - * @param value the frontRight to set - * @return this - */ - public ProtobufMecanumDriveKinematics setFrontRight( - final Geometry2D.ProtobufTranslation2d value) { - bitField0_ |= 0x00000002; - frontRight.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; - * @return whether the rearLeft field is set - */ - public boolean hasRearLeft() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; - * @return this - */ - public ProtobufMecanumDriveKinematics clearRearLeft() { - bitField0_ &= ~0x00000004; - rearLeft.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableRearLeft()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufTranslation2d getRearLeft() { - return rearLeft; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufTranslation2d getMutableRearLeft() { - bitField0_ |= 0x00000004; - return rearLeft; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; - * @param value the rearLeft to set - * @return this - */ - public ProtobufMecanumDriveKinematics setRearLeft( - final Geometry2D.ProtobufTranslation2d value) { - bitField0_ |= 0x00000004; - rearLeft.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; - * @return whether the rearRight field is set - */ - public boolean hasRearRight() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; - * @return this - */ - public ProtobufMecanumDriveKinematics clearRearRight() { - bitField0_ &= ~0x00000008; - rearRight.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableRearRight()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufTranslation2d getRearRight() { - return rearRight; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufTranslation2d getMutableRearRight() { - bitField0_ |= 0x00000008; - return rearRight; - } - - /** - * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; - * @param value the rearRight to set - * @return this - */ - public ProtobufMecanumDriveKinematics setRearRight( - final Geometry2D.ProtobufTranslation2d value) { - bitField0_ |= 0x00000008; - rearRight.copyFrom(value); - return this; - } - - @Override - public ProtobufMecanumDriveKinematics copyFrom(final ProtobufMecanumDriveKinematics other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - frontLeft.copyFrom(other.frontLeft); - frontRight.copyFrom(other.frontRight); - rearLeft.copyFrom(other.rearLeft); - rearRight.copyFrom(other.rearRight); - } - return this; - } - - @Override - public ProtobufMecanumDriveKinematics mergeFrom(final ProtobufMecanumDriveKinematics other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasFrontLeft()) { - getMutableFrontLeft().mergeFrom(other.frontLeft); - } - if (other.hasFrontRight()) { - getMutableFrontRight().mergeFrom(other.frontRight); - } - if (other.hasRearLeft()) { - getMutableRearLeft().mergeFrom(other.rearLeft); - } - if (other.hasRearRight()) { - getMutableRearRight().mergeFrom(other.rearRight); - } - return this; - } - - @Override - public ProtobufMecanumDriveKinematics clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - frontLeft.clear(); - frontRight.clear(); - rearLeft.clear(); - rearRight.clear(); - return this; - } - - @Override - public ProtobufMecanumDriveKinematics clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - frontLeft.clearQuick(); - frontRight.clearQuick(); - rearLeft.clearQuick(); - rearRight.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufMecanumDriveKinematics)) { - return false; - } - ProtobufMecanumDriveKinematics other = (ProtobufMecanumDriveKinematics) o; - return bitField0_ == other.bitField0_ - && (!hasFrontLeft() || frontLeft.equals(other.frontLeft)) - && (!hasFrontRight() || frontRight.equals(other.frontRight)) - && (!hasRearLeft() || rearLeft.equals(other.rearLeft)) - && (!hasRearRight() || rearRight.equals(other.rearRight)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 26); - output.writeMessageNoTag(rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 34); - output.writeMessageNoTag(rearRight); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(rearRight); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufMecanumDriveKinematics mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // frontLeft - input.readMessage(frontLeft); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // frontRight - input.readMessage(frontRight); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 26) { - break; - } - } - case 26: { - // rearLeft - input.readMessage(rearLeft); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 34) { - break; - } - } - case 34: { - // rearRight - input.readMessage(rearRight); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeMessage(FieldNames.frontLeft, frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.frontRight, frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeMessage(FieldNames.rearLeft, rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeMessage(FieldNames.rearRight, rearRight); - } - output.endObject(); - } - - @Override - public ProtobufMecanumDriveKinematics mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 127514064: - case -324277155: { - if (input.isAtField(FieldNames.frontLeft)) { - if (!input.trySkipNullValue()) { - input.readMessage(frontLeft); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -336370317: - case -1456996218: { - if (input.isAtField(FieldNames.frontRight)) { - if (!input.trySkipNullValue()) { - input.readMessage(frontRight); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -854852661: - case -712874558: { - if (input.isAtField(FieldNames.rearLeft)) { - if (!input.trySkipNullValue()) { - input.readMessage(rearLeft); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case -724967720: - case -618613823: { - if (input.isAtField(FieldNames.rearRight)) { - if (!input.trySkipNullValue()) { - input.readMessage(rearRight); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufMecanumDriveKinematics clone() { - return new ProtobufMecanumDriveKinematics().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufMecanumDriveKinematics parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), data).checkInitialized(); - } - - public static ProtobufMecanumDriveKinematics parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), input).checkInitialized(); - } - - public static ProtobufMecanumDriveKinematics parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufMecanumDriveKinematics messages - */ - public static MessageFactory getFactory() { - return ProtobufMecanumDriveKinematicsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufMecanumDriveKinematics_descriptor; - } - - private enum ProtobufMecanumDriveKinematicsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufMecanumDriveKinematics create() { - return ProtobufMecanumDriveKinematics.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); - - static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); - - static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); - - static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); - } - } - - /** - * Protobuf type {@code ProtobufMecanumDriveWheelPositions} - */ - public static final class ProtobufMecanumDriveWheelPositions extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double front_left = 1; - */ - private double frontLeft; - - /** - * optional double front_right = 2; - */ - private double frontRight; - - /** - * optional double rear_left = 3; - */ - private double rearLeft; - - /** - * optional double rear_right = 4; - */ - private double rearRight; - - private ProtobufMecanumDriveWheelPositions() { - } - - /** - * @return a new empty instance of {@code ProtobufMecanumDriveWheelPositions} - */ - public static ProtobufMecanumDriveWheelPositions newInstance() { - return new ProtobufMecanumDriveWheelPositions(); - } - - /** - * optional double front_left = 1; - * @return whether the frontLeft field is set - */ - public boolean hasFrontLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double front_left = 1; - * @return this - */ - public ProtobufMecanumDriveWheelPositions clearFrontLeft() { - bitField0_ &= ~0x00000001; - frontLeft = 0D; - return this; - } - - /** - * optional double front_left = 1; - * @return the frontLeft - */ - public double getFrontLeft() { - return frontLeft; - } - - /** - * optional double front_left = 1; - * @param value the frontLeft to set - * @return this - */ - public ProtobufMecanumDriveWheelPositions setFrontLeft(final double value) { - bitField0_ |= 0x00000001; - frontLeft = value; - return this; - } - - /** - * optional double front_right = 2; - * @return whether the frontRight field is set - */ - public boolean hasFrontRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double front_right = 2; - * @return this - */ - public ProtobufMecanumDriveWheelPositions clearFrontRight() { - bitField0_ &= ~0x00000002; - frontRight = 0D; - return this; - } - - /** - * optional double front_right = 2; - * @return the frontRight - */ - public double getFrontRight() { - return frontRight; - } - - /** - * optional double front_right = 2; - * @param value the frontRight to set - * @return this - */ - public ProtobufMecanumDriveWheelPositions setFrontRight(final double value) { - bitField0_ |= 0x00000002; - frontRight = value; - return this; - } - - /** - * optional double rear_left = 3; - * @return whether the rearLeft field is set - */ - public boolean hasRearLeft() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double rear_left = 3; - * @return this - */ - public ProtobufMecanumDriveWheelPositions clearRearLeft() { - bitField0_ &= ~0x00000004; - rearLeft = 0D; - return this; - } - - /** - * optional double rear_left = 3; - * @return the rearLeft - */ - public double getRearLeft() { - return rearLeft; - } - - /** - * optional double rear_left = 3; - * @param value the rearLeft to set - * @return this - */ - public ProtobufMecanumDriveWheelPositions setRearLeft(final double value) { - bitField0_ |= 0x00000004; - rearLeft = value; - return this; - } - - /** - * optional double rear_right = 4; - * @return whether the rearRight field is set - */ - public boolean hasRearRight() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double rear_right = 4; - * @return this - */ - public ProtobufMecanumDriveWheelPositions clearRearRight() { - bitField0_ &= ~0x00000008; - rearRight = 0D; - return this; - } - - /** - * optional double rear_right = 4; - * @return the rearRight - */ - public double getRearRight() { - return rearRight; - } - - /** - * optional double rear_right = 4; - * @param value the rearRight to set - * @return this - */ - public ProtobufMecanumDriveWheelPositions setRearRight(final double value) { - bitField0_ |= 0x00000008; - rearRight = value; - return this; - } - - @Override - public ProtobufMecanumDriveWheelPositions copyFrom( - final ProtobufMecanumDriveWheelPositions other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - frontLeft = other.frontLeft; - frontRight = other.frontRight; - rearLeft = other.rearLeft; - rearRight = other.rearRight; - } - return this; - } - - @Override - public ProtobufMecanumDriveWheelPositions mergeFrom( - final ProtobufMecanumDriveWheelPositions other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasFrontLeft()) { - setFrontLeft(other.frontLeft); - } - if (other.hasFrontRight()) { - setFrontRight(other.frontRight); - } - if (other.hasRearLeft()) { - setRearLeft(other.rearLeft); - } - if (other.hasRearRight()) { - setRearRight(other.rearRight); - } - return this; - } - - @Override - public ProtobufMecanumDriveWheelPositions clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - frontLeft = 0D; - frontRight = 0D; - rearLeft = 0D; - rearRight = 0D; - return this; - } - - @Override - public ProtobufMecanumDriveWheelPositions clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufMecanumDriveWheelPositions)) { - return false; - } - ProtobufMecanumDriveWheelPositions other = (ProtobufMecanumDriveWheelPositions) o; - return bitField0_ == other.bitField0_ - && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft)) - && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight)) - && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft)) - && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(rearRight); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufMecanumDriveWheelPositions mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // frontLeft - frontLeft = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // frontRight - frontRight = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // rearLeft - rearLeft = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // rearRight - rearRight = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.frontLeft, frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.frontRight, frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.rearLeft, rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.rearRight, rearRight); - } - output.endObject(); - } - - @Override - public ProtobufMecanumDriveWheelPositions mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 127514064: - case -324277155: { - if (input.isAtField(FieldNames.frontLeft)) { - if (!input.trySkipNullValue()) { - frontLeft = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -336370317: - case -1456996218: { - if (input.isAtField(FieldNames.frontRight)) { - if (!input.trySkipNullValue()) { - frontRight = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -854852661: - case -712874558: { - if (input.isAtField(FieldNames.rearLeft)) { - if (!input.trySkipNullValue()) { - rearLeft = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case -724967720: - case -618613823: { - if (input.isAtField(FieldNames.rearRight)) { - if (!input.trySkipNullValue()) { - rearRight = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufMecanumDriveWheelPositions clone() { - return new ProtobufMecanumDriveWheelPositions().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufMecanumDriveWheelPositions parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), data).checkInitialized(); - } - - public static ProtobufMecanumDriveWheelPositions parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), input).checkInitialized(); - } - - public static ProtobufMecanumDriveWheelPositions parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufMecanumDriveWheelPositions messages - */ - public static MessageFactory getFactory() { - return ProtobufMecanumDriveWheelPositionsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor; - } - - private enum ProtobufMecanumDriveWheelPositionsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufMecanumDriveWheelPositions create() { - return ProtobufMecanumDriveWheelPositions.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); - - static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); - - static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); - - static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); - } - } - - /** - * Protobuf type {@code ProtobufMecanumDriveWheelSpeeds} - */ - public static final class ProtobufMecanumDriveWheelSpeeds extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double front_left = 1; - */ - private double frontLeft; - - /** - * optional double front_right = 2; - */ - private double frontRight; - - /** - * optional double rear_left = 3; - */ - private double rearLeft; - - /** - * optional double rear_right = 4; - */ - private double rearRight; - - private ProtobufMecanumDriveWheelSpeeds() { - } - - /** - * @return a new empty instance of {@code ProtobufMecanumDriveWheelSpeeds} - */ - public static ProtobufMecanumDriveWheelSpeeds newInstance() { - return new ProtobufMecanumDriveWheelSpeeds(); - } - - /** - * optional double front_left = 1; - * @return whether the frontLeft field is set - */ - public boolean hasFrontLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double front_left = 1; - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds clearFrontLeft() { - bitField0_ &= ~0x00000001; - frontLeft = 0D; - return this; - } - - /** - * optional double front_left = 1; - * @return the frontLeft - */ - public double getFrontLeft() { - return frontLeft; - } - - /** - * optional double front_left = 1; - * @param value the frontLeft to set - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds setFrontLeft(final double value) { - bitField0_ |= 0x00000001; - frontLeft = value; - return this; - } - - /** - * optional double front_right = 2; - * @return whether the frontRight field is set - */ - public boolean hasFrontRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double front_right = 2; - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds clearFrontRight() { - bitField0_ &= ~0x00000002; - frontRight = 0D; - return this; - } - - /** - * optional double front_right = 2; - * @return the frontRight - */ - public double getFrontRight() { - return frontRight; - } - - /** - * optional double front_right = 2; - * @param value the frontRight to set - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds setFrontRight(final double value) { - bitField0_ |= 0x00000002; - frontRight = value; - return this; - } - - /** - * optional double rear_left = 3; - * @return whether the rearLeft field is set - */ - public boolean hasRearLeft() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double rear_left = 3; - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds clearRearLeft() { - bitField0_ &= ~0x00000004; - rearLeft = 0D; - return this; - } - - /** - * optional double rear_left = 3; - * @return the rearLeft - */ - public double getRearLeft() { - return rearLeft; - } - - /** - * optional double rear_left = 3; - * @param value the rearLeft to set - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds setRearLeft(final double value) { - bitField0_ |= 0x00000004; - rearLeft = value; - return this; - } - - /** - * optional double rear_right = 4; - * @return whether the rearRight field is set - */ - public boolean hasRearRight() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double rear_right = 4; - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds clearRearRight() { - bitField0_ &= ~0x00000008; - rearRight = 0D; - return this; - } - - /** - * optional double rear_right = 4; - * @return the rearRight - */ - public double getRearRight() { - return rearRight; - } - - /** - * optional double rear_right = 4; - * @param value the rearRight to set - * @return this - */ - public ProtobufMecanumDriveWheelSpeeds setRearRight(final double value) { - bitField0_ |= 0x00000008; - rearRight = value; - return this; - } - - @Override - public ProtobufMecanumDriveWheelSpeeds copyFrom(final ProtobufMecanumDriveWheelSpeeds other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - frontLeft = other.frontLeft; - frontRight = other.frontRight; - rearLeft = other.rearLeft; - rearRight = other.rearRight; - } - return this; - } - - @Override - public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtobufMecanumDriveWheelSpeeds other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasFrontLeft()) { - setFrontLeft(other.frontLeft); - } - if (other.hasFrontRight()) { - setFrontRight(other.frontRight); - } - if (other.hasRearLeft()) { - setRearLeft(other.rearLeft); - } - if (other.hasRearRight()) { - setRearRight(other.rearRight); - } - return this; - } - - @Override - public ProtobufMecanumDriveWheelSpeeds clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - frontLeft = 0D; - frontRight = 0D; - rearLeft = 0D; - rearRight = 0D; - return this; - } - - @Override - public ProtobufMecanumDriveWheelSpeeds clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufMecanumDriveWheelSpeeds)) { - return false; - } - ProtobufMecanumDriveWheelSpeeds other = (ProtobufMecanumDriveWheelSpeeds) o; - return bitField0_ == other.bitField0_ - && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft)) - && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight)) - && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft)) - && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(rearRight); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // frontLeft - frontLeft = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // frontRight - frontRight = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // rearLeft - rearLeft = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // rearRight - rearRight = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.frontLeft, frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.frontRight, frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.rearLeft, rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.rearRight, rearRight); - } - output.endObject(); - } - - @Override - public ProtobufMecanumDriveWheelSpeeds mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 127514064: - case -324277155: { - if (input.isAtField(FieldNames.frontLeft)) { - if (!input.trySkipNullValue()) { - frontLeft = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -336370317: - case -1456996218: { - if (input.isAtField(FieldNames.frontRight)) { - if (!input.trySkipNullValue()) { - frontRight = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -854852661: - case -712874558: { - if (input.isAtField(FieldNames.rearLeft)) { - if (!input.trySkipNullValue()) { - rearLeft = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case -724967720: - case -618613823: { - if (input.isAtField(FieldNames.rearRight)) { - if (!input.trySkipNullValue()) { - rearRight = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufMecanumDriveWheelSpeeds clone() { - return new ProtobufMecanumDriveWheelSpeeds().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufMecanumDriveWheelSpeeds parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), data).checkInitialized(); - } - - public static ProtobufMecanumDriveWheelSpeeds parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), input).checkInitialized(); - } - - public static ProtobufMecanumDriveWheelSpeeds parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufMecanumDriveWheelSpeeds messages - */ - public static MessageFactory getFactory() { - return ProtobufMecanumDriveWheelSpeedsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor; - } - - private enum ProtobufMecanumDriveWheelSpeedsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufMecanumDriveWheelSpeeds create() { - return ProtobufMecanumDriveWheelSpeeds.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); - - static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); - - static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); - - static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); - } - } - - /** - * Protobuf type {@code ProtobufMecanumDriveWheelAccelerations} - */ - public static final class ProtobufMecanumDriveWheelAccelerations extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double front_left = 1; - */ - private double frontLeft; - - /** - * optional double front_right = 2; - */ - private double frontRight; - - /** - * optional double rear_left = 3; - */ - private double rearLeft; - - /** - * optional double rear_right = 4; - */ - private double rearRight; - - private ProtobufMecanumDriveWheelAccelerations() { - } - - /** - * @return a new empty instance of {@code ProtobufMecanumDriveWheelAccelerations} - */ - public static ProtobufMecanumDriveWheelAccelerations newInstance() { - return new ProtobufMecanumDriveWheelAccelerations(); - } - - /** - * optional double front_left = 1; - * @return whether the frontLeft field is set - */ - public boolean hasFrontLeft() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double front_left = 1; - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations clearFrontLeft() { - bitField0_ &= ~0x00000001; - frontLeft = 0D; - return this; - } - - /** - * optional double front_left = 1; - * @return the frontLeft - */ - public double getFrontLeft() { - return frontLeft; - } - - /** - * optional double front_left = 1; - * @param value the frontLeft to set - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations setFrontLeft(final double value) { - bitField0_ |= 0x00000001; - frontLeft = value; - return this; - } - - /** - * optional double front_right = 2; - * @return whether the frontRight field is set - */ - public boolean hasFrontRight() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double front_right = 2; - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations clearFrontRight() { - bitField0_ &= ~0x00000002; - frontRight = 0D; - return this; - } - - /** - * optional double front_right = 2; - * @return the frontRight - */ - public double getFrontRight() { - return frontRight; - } - - /** - * optional double front_right = 2; - * @param value the frontRight to set - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations setFrontRight(final double value) { - bitField0_ |= 0x00000002; - frontRight = value; - return this; - } - - /** - * optional double rear_left = 3; - * @return whether the rearLeft field is set - */ - public boolean hasRearLeft() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double rear_left = 3; - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations clearRearLeft() { - bitField0_ &= ~0x00000004; - rearLeft = 0D; - return this; - } - - /** - * optional double rear_left = 3; - * @return the rearLeft - */ - public double getRearLeft() { - return rearLeft; - } - - /** - * optional double rear_left = 3; - * @param value the rearLeft to set - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations setRearLeft(final double value) { - bitField0_ |= 0x00000004; - rearLeft = value; - return this; - } - - /** - * optional double rear_right = 4; - * @return whether the rearRight field is set - */ - public boolean hasRearRight() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double rear_right = 4; - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations clearRearRight() { - bitField0_ &= ~0x00000008; - rearRight = 0D; - return this; - } - - /** - * optional double rear_right = 4; - * @return the rearRight - */ - public double getRearRight() { - return rearRight; - } - - /** - * optional double rear_right = 4; - * @param value the rearRight to set - * @return this - */ - public ProtobufMecanumDriveWheelAccelerations setRearRight(final double value) { - bitField0_ |= 0x00000008; - rearRight = value; - return this; - } - - @Override - public ProtobufMecanumDriveWheelAccelerations copyFrom( - final ProtobufMecanumDriveWheelAccelerations other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - frontLeft = other.frontLeft; - frontRight = other.frontRight; - rearLeft = other.rearLeft; - rearRight = other.rearRight; - } - return this; - } - - @Override - public ProtobufMecanumDriveWheelAccelerations mergeFrom( - final ProtobufMecanumDriveWheelAccelerations other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasFrontLeft()) { - setFrontLeft(other.frontLeft); - } - if (other.hasFrontRight()) { - setFrontRight(other.frontRight); - } - if (other.hasRearLeft()) { - setRearLeft(other.rearLeft); - } - if (other.hasRearRight()) { - setRearRight(other.rearRight); - } - return this; - } - - @Override - public ProtobufMecanumDriveWheelAccelerations clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - frontLeft = 0D; - frontRight = 0D; - rearLeft = 0D; - rearRight = 0D; - return this; - } - - @Override - public ProtobufMecanumDriveWheelAccelerations clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufMecanumDriveWheelAccelerations)) { - return false; - } - ProtobufMecanumDriveWheelAccelerations other = (ProtobufMecanumDriveWheelAccelerations) o; - return bitField0_ == other.bitField0_ - && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft)) - && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight)) - && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft)) - && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(rearRight); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufMecanumDriveWheelAccelerations mergeFrom(final ProtoSource input) throws - IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // frontLeft - frontLeft = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // frontRight - frontRight = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // rearLeft - rearLeft = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // rearRight - rearRight = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.frontLeft, frontLeft); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.frontRight, frontRight); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.rearLeft, rearLeft); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.rearRight, rearRight); - } - output.endObject(); - } - - @Override - public ProtobufMecanumDriveWheelAccelerations mergeFrom(final JsonSource input) throws - IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 127514064: - case -324277155: { - if (input.isAtField(FieldNames.frontLeft)) { - if (!input.trySkipNullValue()) { - frontLeft = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -336370317: - case -1456996218: { - if (input.isAtField(FieldNames.frontRight)) { - if (!input.trySkipNullValue()) { - frontRight = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -854852661: - case -712874558: { - if (input.isAtField(FieldNames.rearLeft)) { - if (!input.trySkipNullValue()) { - rearLeft = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case -724967720: - case -618613823: { - if (input.isAtField(FieldNames.rearRight)) { - if (!input.trySkipNullValue()) { - rearRight = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufMecanumDriveWheelAccelerations clone() { - return new ProtobufMecanumDriveWheelAccelerations().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufMecanumDriveWheelAccelerations parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelAccelerations(), data).checkInitialized(); - } - - public static ProtobufMecanumDriveWheelAccelerations parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelAccelerations(), input).checkInitialized(); - } - - public static ProtobufMecanumDriveWheelAccelerations parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelAccelerations(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufMecanumDriveWheelAccelerations messages - */ - public static MessageFactory getFactory() { - return ProtobufMecanumDriveWheelAccelerationsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufMecanumDriveWheelAccelerations_descriptor; - } - - private enum ProtobufMecanumDriveWheelAccelerationsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufMecanumDriveWheelAccelerations create() { - return ProtobufMecanumDriveWheelAccelerations.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); - - static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); - - static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); - - static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); - } - } - - /** - * Protobuf type {@code ProtobufSwerveDriveKinematics} - */ - public static final class ProtobufSwerveDriveKinematics extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * repeated .wpi.proto.ProtobufTranslation2d modules = 1; - */ - private final RepeatedMessage modules = RepeatedMessage.newEmptyInstance(Geometry2D.ProtobufTranslation2d.getFactory()); - - private ProtobufSwerveDriveKinematics() { - } - - /** - * @return a new empty instance of {@code ProtobufSwerveDriveKinematics} - */ - public static ProtobufSwerveDriveKinematics newInstance() { - return new ProtobufSwerveDriveKinematics(); - } - - /** - * repeated .wpi.proto.ProtobufTranslation2d modules = 1; - * @return whether the modules field is set - */ - public boolean hasModules() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * repeated .wpi.proto.ProtobufTranslation2d modules = 1; - * @return this - */ - public ProtobufSwerveDriveKinematics clearModules() { - bitField0_ &= ~0x00000001; - modules.clear(); - return this; - } - - /** - * repeated .wpi.proto.ProtobufTranslation2d modules = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableModules()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedMessage getModules() { - return modules; - } - - /** - * repeated .wpi.proto.ProtobufTranslation2d modules = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedMessage getMutableModules() { - bitField0_ |= 0x00000001; - return modules; - } - - /** - * repeated .wpi.proto.ProtobufTranslation2d modules = 1; - * @param value the modules to add - * @return this - */ - public ProtobufSwerveDriveKinematics addModules(final Geometry2D.ProtobufTranslation2d value) { - bitField0_ |= 0x00000001; - modules.add(value); - return this; - } - - /** - * repeated .wpi.proto.ProtobufTranslation2d modules = 1; - * @param values the modules to add - * @return this - */ - public ProtobufSwerveDriveKinematics addAllModules( - final Geometry2D.ProtobufTranslation2d... values) { - bitField0_ |= 0x00000001; - modules.addAll(values); - return this; - } - - @Override - public ProtobufSwerveDriveKinematics copyFrom(final ProtobufSwerveDriveKinematics other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - modules.copyFrom(other.modules); - } - return this; - } - - @Override - public ProtobufSwerveDriveKinematics mergeFrom(final ProtobufSwerveDriveKinematics other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasModules()) { - getMutableModules().addAll(other.modules); - } - return this; - } - - @Override - public ProtobufSwerveDriveKinematics clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - modules.clear(); - return this; - } - - @Override - public ProtobufSwerveDriveKinematics clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - modules.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufSwerveDriveKinematics)) { - return false; - } - ProtobufSwerveDriveKinematics other = (ProtobufSwerveDriveKinematics) o; - return bitField0_ == other.bitField0_ - && (!hasModules() || modules.equals(other.modules)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - for (int i = 0; i < modules.length(); i++) { - output.writeRawByte((byte) 10); - output.writeMessageNoTag(modules.get(i)); - } - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += (1 * modules.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(modules); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufSwerveDriveKinematics mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // modules - tag = input.readRepeatedMessage(modules, tag); - bitField0_ |= 0x00000001; - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeRepeatedMessage(FieldNames.modules, modules); - } - output.endObject(); - } - - @Override - public ProtobufSwerveDriveKinematics mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 1227433863: { - if (input.isAtField(FieldNames.modules)) { - if (!input.trySkipNullValue()) { - input.readRepeatedMessage(modules); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufSwerveDriveKinematics clone() { - return new ProtobufSwerveDriveKinematics().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufSwerveDriveKinematics parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), data).checkInitialized(); - } - - public static ProtobufSwerveDriveKinematics parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), input).checkInitialized(); - } - - public static ProtobufSwerveDriveKinematics parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufSwerveDriveKinematics messages - */ - public static MessageFactory getFactory() { - return ProtobufSwerveDriveKinematicsFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufSwerveDriveKinematics_descriptor; - } - - private enum ProtobufSwerveDriveKinematicsFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufSwerveDriveKinematics create() { - return ProtobufSwerveDriveKinematics.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName modules = FieldName.forField("modules"); - } - } - - /** - * Protobuf type {@code ProtobufSwerveModulePosition} - */ - public static final class ProtobufSwerveModulePosition extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double distance = 1; - */ - private double distance; - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - */ - private final Geometry2D.ProtobufRotation2d angle = Geometry2D.ProtobufRotation2d.newInstance(); - - private ProtobufSwerveModulePosition() { - } - - /** - * @return a new empty instance of {@code ProtobufSwerveModulePosition} - */ - public static ProtobufSwerveModulePosition newInstance() { - return new ProtobufSwerveModulePosition(); - } - - /** - * optional double distance = 1; - * @return whether the distance field is set - */ - public boolean hasDistance() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double distance = 1; - * @return this - */ - public ProtobufSwerveModulePosition clearDistance() { - bitField0_ &= ~0x00000001; - distance = 0D; - return this; - } - - /** - * optional double distance = 1; - * @return the distance - */ - public double getDistance() { - return distance; - } - - /** - * optional double distance = 1; - * @param value the distance to set - * @return this - */ - public ProtobufSwerveModulePosition setDistance(final double value) { - bitField0_ |= 0x00000001; - distance = value; - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @return whether the angle field is set - */ - public boolean hasAngle() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @return this - */ - public ProtobufSwerveModulePosition clearAngle() { - bitField0_ &= ~0x00000002; - angle.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableAngle()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufRotation2d getAngle() { - return angle; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufRotation2d getMutableAngle() { - bitField0_ |= 0x00000002; - return angle; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @param value the angle to set - * @return this - */ - public ProtobufSwerveModulePosition setAngle(final Geometry2D.ProtobufRotation2d value) { - bitField0_ |= 0x00000002; - angle.copyFrom(value); - return this; - } - - @Override - public ProtobufSwerveModulePosition copyFrom(final ProtobufSwerveModulePosition other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - distance = other.distance; - angle.copyFrom(other.angle); - } - return this; - } - - @Override - public ProtobufSwerveModulePosition mergeFrom(final ProtobufSwerveModulePosition other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasDistance()) { - setDistance(other.distance); - } - if (other.hasAngle()) { - getMutableAngle().mergeFrom(other.angle); - } - return this; - } - - @Override - public ProtobufSwerveModulePosition clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - distance = 0D; - angle.clear(); - return this; - } - - @Override - public ProtobufSwerveModulePosition clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - angle.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufSwerveModulePosition)) { - return false; - } - ProtobufSwerveModulePosition other = (ProtobufSwerveModulePosition) o; - return bitField0_ == other.bitField0_ - && (!hasDistance() || ProtoUtil.isEqual(distance, other.distance)) - && (!hasAngle() || angle.equals(other.angle)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(distance); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(angle); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(angle); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufSwerveModulePosition mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // distance - distance = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // angle - input.readMessage(angle); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.distance, distance); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.angle, angle); - } - output.endObject(); - } - - @Override - public ProtobufSwerveModulePosition mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 288459765: { - if (input.isAtField(FieldNames.distance)) { - if (!input.trySkipNullValue()) { - distance = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 92960979: { - if (input.isAtField(FieldNames.angle)) { - if (!input.trySkipNullValue()) { - input.readMessage(angle); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufSwerveModulePosition clone() { - return new ProtobufSwerveModulePosition().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufSwerveModulePosition parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), data).checkInitialized(); - } - - public static ProtobufSwerveModulePosition parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), input).checkInitialized(); - } - - public static ProtobufSwerveModulePosition parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufSwerveModulePosition messages - */ - public static MessageFactory getFactory() { - return ProtobufSwerveModulePositionFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufSwerveModulePosition_descriptor; - } - - private enum ProtobufSwerveModulePositionFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufSwerveModulePosition create() { - return ProtobufSwerveModulePosition.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName distance = FieldName.forField("distance"); - - static final FieldName angle = FieldName.forField("angle"); - } - } - - /** - * Protobuf type {@code ProtobufSwerveModuleState} - */ - public static final class ProtobufSwerveModuleState extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double speed = 1; - */ - private double speed; - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - */ - private final Geometry2D.ProtobufRotation2d angle = Geometry2D.ProtobufRotation2d.newInstance(); - - private ProtobufSwerveModuleState() { - } - - /** - * @return a new empty instance of {@code ProtobufSwerveModuleState} - */ - public static ProtobufSwerveModuleState newInstance() { - return new ProtobufSwerveModuleState(); - } - - /** - * optional double speed = 1; - * @return whether the speed field is set - */ - public boolean hasSpeed() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double speed = 1; - * @return this - */ - public ProtobufSwerveModuleState clearSpeed() { - bitField0_ &= ~0x00000001; - speed = 0D; - return this; - } - - /** - * optional double speed = 1; - * @return the speed - */ - public double getSpeed() { - return speed; - } - - /** - * optional double speed = 1; - * @param value the speed to set - * @return this - */ - public ProtobufSwerveModuleState setSpeed(final double value) { - bitField0_ |= 0x00000001; - speed = value; - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @return whether the angle field is set - */ - public boolean hasAngle() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @return this - */ - public ProtobufSwerveModuleState clearAngle() { - bitField0_ &= ~0x00000002; - angle.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableAngle()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufRotation2d getAngle() { - return angle; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufRotation2d getMutableAngle() { - bitField0_ |= 0x00000002; - return angle; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @param value the angle to set - * @return this - */ - public ProtobufSwerveModuleState setAngle(final Geometry2D.ProtobufRotation2d value) { - bitField0_ |= 0x00000002; - angle.copyFrom(value); - return this; - } - - @Override - public ProtobufSwerveModuleState copyFrom(final ProtobufSwerveModuleState other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - speed = other.speed; - angle.copyFrom(other.angle); - } - return this; - } - - @Override - public ProtobufSwerveModuleState mergeFrom(final ProtobufSwerveModuleState other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasSpeed()) { - setSpeed(other.speed); - } - if (other.hasAngle()) { - getMutableAngle().mergeFrom(other.angle); - } - return this; - } - - @Override - public ProtobufSwerveModuleState clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - speed = 0D; - angle.clear(); - return this; - } - - @Override - public ProtobufSwerveModuleState clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - angle.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufSwerveModuleState)) { - return false; - } - ProtobufSwerveModuleState other = (ProtobufSwerveModuleState) o; - return bitField0_ == other.bitField0_ - && (!hasSpeed() || ProtoUtil.isEqual(speed, other.speed)) - && (!hasAngle() || angle.equals(other.angle)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(speed); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(angle); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(angle); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufSwerveModuleState mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // speed - speed = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // angle - input.readMessage(angle); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.speed, speed); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.angle, angle); - } - output.endObject(); - } - - @Override - public ProtobufSwerveModuleState mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 109641799: { - if (input.isAtField(FieldNames.speed)) { - if (!input.trySkipNullValue()) { - speed = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 92960979: { - if (input.isAtField(FieldNames.angle)) { - if (!input.trySkipNullValue()) { - input.readMessage(angle); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufSwerveModuleState clone() { - return new ProtobufSwerveModuleState().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufSwerveModuleState parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), data).checkInitialized(); - } - - public static ProtobufSwerveModuleState parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), input).checkInitialized(); - } - - public static ProtobufSwerveModuleState parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufSwerveModuleState messages - */ - public static MessageFactory getFactory() { - return ProtobufSwerveModuleStateFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufSwerveModuleState_descriptor; - } - - private enum ProtobufSwerveModuleStateFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufSwerveModuleState create() { - return ProtobufSwerveModuleState.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName speed = FieldName.forField("speed"); - - static final FieldName angle = FieldName.forField("angle"); - } - } - - /** - * Protobuf type {@code ProtobufSwerveModuleAcceleration} - */ - public static final class ProtobufSwerveModuleAcceleration extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double acceleration = 1; - */ - private double acceleration; - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - */ - private final Geometry2D.ProtobufRotation2d angle = Geometry2D.ProtobufRotation2d.newInstance(); - - private ProtobufSwerveModuleAcceleration() { - } - - /** - * @return a new empty instance of {@code ProtobufSwerveModuleAcceleration} - */ - public static ProtobufSwerveModuleAcceleration newInstance() { - return new ProtobufSwerveModuleAcceleration(); - } - - /** - * optional double acceleration = 1; - * @return whether the acceleration field is set - */ - public boolean hasAcceleration() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double acceleration = 1; - * @return this - */ - public ProtobufSwerveModuleAcceleration clearAcceleration() { - bitField0_ &= ~0x00000001; - acceleration = 0D; - return this; - } - - /** - * optional double acceleration = 1; - * @return the acceleration - */ - public double getAcceleration() { - return acceleration; - } - - /** - * optional double acceleration = 1; - * @param value the acceleration to set - * @return this - */ - public ProtobufSwerveModuleAcceleration setAcceleration(final double value) { - bitField0_ |= 0x00000001; - acceleration = value; - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @return whether the angle field is set - */ - public boolean hasAngle() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @return this - */ - public ProtobufSwerveModuleAcceleration clearAngle() { - bitField0_ &= ~0x00000002; - angle.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableAngle()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufRotation2d getAngle() { - return angle; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufRotation2d getMutableAngle() { - bitField0_ |= 0x00000002; - return angle; - } - - /** - * optional .wpi.proto.ProtobufRotation2d angle = 2; - * @param value the angle to set - * @return this - */ - public ProtobufSwerveModuleAcceleration setAngle(final Geometry2D.ProtobufRotation2d value) { - bitField0_ |= 0x00000002; - angle.copyFrom(value); - return this; - } - - @Override - public ProtobufSwerveModuleAcceleration copyFrom(final ProtobufSwerveModuleAcceleration other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - acceleration = other.acceleration; - angle.copyFrom(other.angle); - } - return this; - } - - @Override - public ProtobufSwerveModuleAcceleration mergeFrom( - final ProtobufSwerveModuleAcceleration other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasAcceleration()) { - setAcceleration(other.acceleration); - } - if (other.hasAngle()) { - getMutableAngle().mergeFrom(other.angle); - } - return this; - } - - @Override - public ProtobufSwerveModuleAcceleration clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - acceleration = 0D; - angle.clear(); - return this; - } - - @Override - public ProtobufSwerveModuleAcceleration clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - angle.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufSwerveModuleAcceleration)) { - return false; - } - ProtobufSwerveModuleAcceleration other = (ProtobufSwerveModuleAcceleration) o; - return bitField0_ == other.bitField0_ - && (!hasAcceleration() || ProtoUtil.isEqual(acceleration, other.acceleration)) - && (!hasAngle() || angle.equals(other.angle)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(acceleration); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(angle); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(angle); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufSwerveModuleAcceleration mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // acceleration - acceleration = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // angle - input.readMessage(angle); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.acceleration, acceleration); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeMessage(FieldNames.angle, angle); - } - output.endObject(); - } - - @Override - public ProtobufSwerveModuleAcceleration mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -267299712: { - if (input.isAtField(FieldNames.acceleration)) { - if (!input.trySkipNullValue()) { - acceleration = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 92960979: { - if (input.isAtField(FieldNames.angle)) { - if (!input.trySkipNullValue()) { - input.readMessage(angle); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufSwerveModuleAcceleration clone() { - return new ProtobufSwerveModuleAcceleration().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufSwerveModuleAcceleration parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModuleAcceleration(), data).checkInitialized(); - } - - public static ProtobufSwerveModuleAcceleration parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModuleAcceleration(), input).checkInitialized(); - } - - public static ProtobufSwerveModuleAcceleration parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufSwerveModuleAcceleration(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufSwerveModuleAcceleration messages - */ - public static MessageFactory getFactory() { - return ProtobufSwerveModuleAccelerationFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Kinematics.wpi_proto_ProtobufSwerveModuleAcceleration_descriptor; - } - - private enum ProtobufSwerveModuleAccelerationFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufSwerveModuleAcceleration create() { - return ProtobufSwerveModuleAcceleration.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName acceleration = FieldName.forField("acceleration"); - - static final FieldName angle = FieldName.forField("angle"); - } - } -} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufArmFeedforward.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufArmFeedforward.java new file mode 100644 index 0000000000..368d17a3f1 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufArmFeedforward.java @@ -0,0 +1,590 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufArmFeedforward} + */ +@SuppressWarnings("hiding") +public final class ProtobufArmFeedforward extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double ks = 1; + */ + private double ks; + + /** + * optional double kg = 2; + */ + private double kg; + + /** + * optional double kv = 3; + */ + private double kv; + + /** + * optional double ka = 4; + */ + private double ka; + + /** + * optional double dt = 5; + */ + private double dt; + + private ProtobufArmFeedforward() { + } + + /** + * @return a new empty instance of {@code ProtobufArmFeedforward} + */ + public static ProtobufArmFeedforward newInstance() { + return new ProtobufArmFeedforward(); + } + + /** + * optional double ks = 1; + * @return whether the ks field is set + */ + public boolean hasKs() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double ks = 1; + * @return this + */ + public ProtobufArmFeedforward clearKs() { + bitField0_ &= ~0x00000001; + ks = 0D; + return this; + } + + /** + * optional double ks = 1; + * @return the ks + */ + public double getKs() { + return ks; + } + + /** + * optional double ks = 1; + * @param value the ks to set + * @return this + */ + public ProtobufArmFeedforward setKs(final double value) { + bitField0_ |= 0x00000001; + ks = value; + return this; + } + + /** + * optional double kg = 2; + * @return whether the kg field is set + */ + public boolean hasKg() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double kg = 2; + * @return this + */ + public ProtobufArmFeedforward clearKg() { + bitField0_ &= ~0x00000002; + kg = 0D; + return this; + } + + /** + * optional double kg = 2; + * @return the kg + */ + public double getKg() { + return kg; + } + + /** + * optional double kg = 2; + * @param value the kg to set + * @return this + */ + public ProtobufArmFeedforward setKg(final double value) { + bitField0_ |= 0x00000002; + kg = value; + return this; + } + + /** + * optional double kv = 3; + * @return whether the kv field is set + */ + public boolean hasKv() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double kv = 3; + * @return this + */ + public ProtobufArmFeedforward clearKv() { + bitField0_ &= ~0x00000004; + kv = 0D; + return this; + } + + /** + * optional double kv = 3; + * @return the kv + */ + public double getKv() { + return kv; + } + + /** + * optional double kv = 3; + * @param value the kv to set + * @return this + */ + public ProtobufArmFeedforward setKv(final double value) { + bitField0_ |= 0x00000004; + kv = value; + return this; + } + + /** + * optional double ka = 4; + * @return whether the ka field is set + */ + public boolean hasKa() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double ka = 4; + * @return this + */ + public ProtobufArmFeedforward clearKa() { + bitField0_ &= ~0x00000008; + ka = 0D; + return this; + } + + /** + * optional double ka = 4; + * @return the ka + */ + public double getKa() { + return ka; + } + + /** + * optional double ka = 4; + * @param value the ka to set + * @return this + */ + public ProtobufArmFeedforward setKa(final double value) { + bitField0_ |= 0x00000008; + ka = value; + return this; + } + + /** + * optional double dt = 5; + * @return whether the dt field is set + */ + public boolean hasDt() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional double dt = 5; + * @return this + */ + public ProtobufArmFeedforward clearDt() { + bitField0_ &= ~0x00000010; + dt = 0D; + return this; + } + + /** + * optional double dt = 5; + * @return the dt + */ + public double getDt() { + return dt; + } + + /** + * optional double dt = 5; + * @param value the dt to set + * @return this + */ + public ProtobufArmFeedforward setDt(final double value) { + bitField0_ |= 0x00000010; + dt = value; + return this; + } + + @Override + public ProtobufArmFeedforward copyFrom(final ProtobufArmFeedforward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + ks = other.ks; + kg = other.kg; + kv = other.kv; + ka = other.ka; + dt = other.dt; + } + return this; + } + + @Override + public ProtobufArmFeedforward mergeFrom(final ProtobufArmFeedforward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasKs()) { + setKs(other.ks); + } + if (other.hasKg()) { + setKg(other.kg); + } + if (other.hasKv()) { + setKv(other.kv); + } + if (other.hasKa()) { + setKa(other.ka); + } + if (other.hasDt()) { + setDt(other.dt); + } + return this; + } + + @Override + public ProtobufArmFeedforward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + ks = 0D; + kg = 0D; + kv = 0D; + ka = 0D; + dt = 0D; + return this; + } + + @Override + public ProtobufArmFeedforward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufArmFeedforward)) { + return false; + } + ProtobufArmFeedforward other = (ProtobufArmFeedforward) o; + return bitField0_ == other.bitField0_ + && (!hasKs() || ProtoUtil.isEqual(ks, other.ks)) + && (!hasKg() || ProtoUtil.isEqual(kg, other.kg)) + && (!hasKv() || ProtoUtil.isEqual(kv, other.kv)) + && (!hasKa() || ProtoUtil.isEqual(ka, other.ka)) + && (!hasDt() || ProtoUtil.isEqual(dt, other.dt)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(ks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(kg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(kv); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(ka); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 41); + output.writeDoubleNoTag(dt); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufArmFeedforward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // ks + ks = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // kg + kg = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // kv + kv = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // ka + ka = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 41) { + break; + } + } + case 41: { + // dt + dt = input.readDouble(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.ks, ks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.kg, kg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.kv, kv); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.ka, ka); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeDouble(FieldNames.dt, dt); + } + output.endObject(); + } + + @Override + public ProtobufArmFeedforward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3432: { + if (input.isAtField(FieldNames.ks)) { + if (!input.trySkipNullValue()) { + ks = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3420: { + if (input.isAtField(FieldNames.kg)) { + if (!input.trySkipNullValue()) { + kg = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3435: { + if (input.isAtField(FieldNames.kv)) { + if (!input.trySkipNullValue()) { + kv = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3414: { + if (input.isAtField(FieldNames.ka)) { + if (!input.trySkipNullValue()) { + ka = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3216: { + if (input.isAtField(FieldNames.dt)) { + if (!input.trySkipNullValue()) { + dt = input.readDouble(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufArmFeedforward clone() { + return new ProtobufArmFeedforward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufArmFeedforward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), data).checkInitialized(); + } + + public static ProtobufArmFeedforward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), input).checkInitialized(); + } + + public static ProtobufArmFeedforward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufArmFeedforward(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufArmFeedforward messages + */ + public static MessageFactory getFactory() { + return ProtobufArmFeedforwardFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufControllerDescriptor.wpi_proto_ProtobufArmFeedforward_descriptor; + } + + private enum ProtobufArmFeedforwardFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufArmFeedforward create() { + return ProtobufArmFeedforward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName ks = FieldName.forField("ks"); + + static final FieldName kg = FieldName.forField("kg"); + + static final FieldName kv = FieldName.forField("kv"); + + static final FieldName ka = FieldName.forField("ka"); + + static final FieldName dt = FieldName.forField("dt"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufChassisAccelerations.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufChassisAccelerations.java new file mode 100644 index 0000000000..ca091c45b0 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufChassisAccelerations.java @@ -0,0 +1,430 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufChassisAccelerations} + */ +@SuppressWarnings("hiding") +public final class ProtobufChassisAccelerations extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double ax = 1; + */ + private double ax; + + /** + * optional double ay = 2; + */ + private double ay; + + /** + * optional double alpha = 3; + */ + private double alpha; + + private ProtobufChassisAccelerations() { + } + + /** + * @return a new empty instance of {@code ProtobufChassisAccelerations} + */ + public static ProtobufChassisAccelerations newInstance() { + return new ProtobufChassisAccelerations(); + } + + /** + * optional double ax = 1; + * @return whether the ax field is set + */ + public boolean hasAx() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double ax = 1; + * @return this + */ + public ProtobufChassisAccelerations clearAx() { + bitField0_ &= ~0x00000001; + ax = 0D; + return this; + } + + /** + * optional double ax = 1; + * @return the ax + */ + public double getAx() { + return ax; + } + + /** + * optional double ax = 1; + * @param value the ax to set + * @return this + */ + public ProtobufChassisAccelerations setAx(final double value) { + bitField0_ |= 0x00000001; + ax = value; + return this; + } + + /** + * optional double ay = 2; + * @return whether the ay field is set + */ + public boolean hasAy() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double ay = 2; + * @return this + */ + public ProtobufChassisAccelerations clearAy() { + bitField0_ &= ~0x00000002; + ay = 0D; + return this; + } + + /** + * optional double ay = 2; + * @return the ay + */ + public double getAy() { + return ay; + } + + /** + * optional double ay = 2; + * @param value the ay to set + * @return this + */ + public ProtobufChassisAccelerations setAy(final double value) { + bitField0_ |= 0x00000002; + ay = value; + return this; + } + + /** + * optional double alpha = 3; + * @return whether the alpha field is set + */ + public boolean hasAlpha() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double alpha = 3; + * @return this + */ + public ProtobufChassisAccelerations clearAlpha() { + bitField0_ &= ~0x00000004; + alpha = 0D; + return this; + } + + /** + * optional double alpha = 3; + * @return the alpha + */ + public double getAlpha() { + return alpha; + } + + /** + * optional double alpha = 3; + * @param value the alpha to set + * @return this + */ + public ProtobufChassisAccelerations setAlpha(final double value) { + bitField0_ |= 0x00000004; + alpha = value; + return this; + } + + @Override + public ProtobufChassisAccelerations copyFrom(final ProtobufChassisAccelerations other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + ax = other.ax; + ay = other.ay; + alpha = other.alpha; + } + return this; + } + + @Override + public ProtobufChassisAccelerations mergeFrom(final ProtobufChassisAccelerations other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasAx()) { + setAx(other.ax); + } + if (other.hasAy()) { + setAy(other.ay); + } + if (other.hasAlpha()) { + setAlpha(other.alpha); + } + return this; + } + + @Override + public ProtobufChassisAccelerations clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + ax = 0D; + ay = 0D; + alpha = 0D; + return this; + } + + @Override + public ProtobufChassisAccelerations clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufChassisAccelerations)) { + return false; + } + ProtobufChassisAccelerations other = (ProtobufChassisAccelerations) o; + return bitField0_ == other.bitField0_ + && (!hasAx() || ProtoUtil.isEqual(ax, other.ax)) + && (!hasAy() || ProtoUtil.isEqual(ay, other.ay)) + && (!hasAlpha() || ProtoUtil.isEqual(alpha, other.alpha)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(ax); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(ay); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(alpha); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufChassisAccelerations mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // ax + ax = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // ay + ay = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // alpha + alpha = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.ax, ax); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.ay, ay); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.alpha, alpha); + } + output.endObject(); + } + + @Override + public ProtobufChassisAccelerations mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3127: { + if (input.isAtField(FieldNames.ax)) { + if (!input.trySkipNullValue()) { + ax = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3128: { + if (input.isAtField(FieldNames.ay)) { + if (!input.trySkipNullValue()) { + ay = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 92909918: { + if (input.isAtField(FieldNames.alpha)) { + if (!input.trySkipNullValue()) { + alpha = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufChassisAccelerations clone() { + return new ProtobufChassisAccelerations().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufChassisAccelerations parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufChassisAccelerations(), data).checkInitialized(); + } + + public static ProtobufChassisAccelerations parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufChassisAccelerations(), input).checkInitialized(); + } + + public static ProtobufChassisAccelerations parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufChassisAccelerations(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufChassisAccelerations messages + */ + public static MessageFactory getFactory() { + return ProtobufChassisAccelerationsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufChassisAccelerations_descriptor; + } + + private enum ProtobufChassisAccelerationsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufChassisAccelerations create() { + return ProtobufChassisAccelerations.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName ax = FieldName.forField("ax"); + + static final FieldName ay = FieldName.forField("ay"); + + static final FieldName alpha = FieldName.forField("alpha"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufChassisSpeeds.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufChassisSpeeds.java new file mode 100644 index 0000000000..28a7bec3c0 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufChassisSpeeds.java @@ -0,0 +1,430 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufChassisSpeeds} + */ +@SuppressWarnings("hiding") +public final class ProtobufChassisSpeeds extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double vx = 1; + */ + private double vx; + + /** + * optional double vy = 2; + */ + private double vy; + + /** + * optional double omega = 3; + */ + private double omega; + + private ProtobufChassisSpeeds() { + } + + /** + * @return a new empty instance of {@code ProtobufChassisSpeeds} + */ + public static ProtobufChassisSpeeds newInstance() { + return new ProtobufChassisSpeeds(); + } + + /** + * optional double vx = 1; + * @return whether the vx field is set + */ + public boolean hasVx() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double vx = 1; + * @return this + */ + public ProtobufChassisSpeeds clearVx() { + bitField0_ &= ~0x00000001; + vx = 0D; + return this; + } + + /** + * optional double vx = 1; + * @return the vx + */ + public double getVx() { + return vx; + } + + /** + * optional double vx = 1; + * @param value the vx to set + * @return this + */ + public ProtobufChassisSpeeds setVx(final double value) { + bitField0_ |= 0x00000001; + vx = value; + return this; + } + + /** + * optional double vy = 2; + * @return whether the vy field is set + */ + public boolean hasVy() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double vy = 2; + * @return this + */ + public ProtobufChassisSpeeds clearVy() { + bitField0_ &= ~0x00000002; + vy = 0D; + return this; + } + + /** + * optional double vy = 2; + * @return the vy + */ + public double getVy() { + return vy; + } + + /** + * optional double vy = 2; + * @param value the vy to set + * @return this + */ + public ProtobufChassisSpeeds setVy(final double value) { + bitField0_ |= 0x00000002; + vy = value; + return this; + } + + /** + * optional double omega = 3; + * @return whether the omega field is set + */ + public boolean hasOmega() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double omega = 3; + * @return this + */ + public ProtobufChassisSpeeds clearOmega() { + bitField0_ &= ~0x00000004; + omega = 0D; + return this; + } + + /** + * optional double omega = 3; + * @return the omega + */ + public double getOmega() { + return omega; + } + + /** + * optional double omega = 3; + * @param value the omega to set + * @return this + */ + public ProtobufChassisSpeeds setOmega(final double value) { + bitField0_ |= 0x00000004; + omega = value; + return this; + } + + @Override + public ProtobufChassisSpeeds copyFrom(final ProtobufChassisSpeeds other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + vx = other.vx; + vy = other.vy; + omega = other.omega; + } + return this; + } + + @Override + public ProtobufChassisSpeeds mergeFrom(final ProtobufChassisSpeeds other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasVx()) { + setVx(other.vx); + } + if (other.hasVy()) { + setVy(other.vy); + } + if (other.hasOmega()) { + setOmega(other.omega); + } + return this; + } + + @Override + public ProtobufChassisSpeeds clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + vx = 0D; + vy = 0D; + omega = 0D; + return this; + } + + @Override + public ProtobufChassisSpeeds clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufChassisSpeeds)) { + return false; + } + ProtobufChassisSpeeds other = (ProtobufChassisSpeeds) o; + return bitField0_ == other.bitField0_ + && (!hasVx() || ProtoUtil.isEqual(vx, other.vx)) + && (!hasVy() || ProtoUtil.isEqual(vy, other.vy)) + && (!hasOmega() || ProtoUtil.isEqual(omega, other.omega)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(vx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(vy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(omega); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufChassisSpeeds mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // vx + vx = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // vy + vy = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // omega + omega = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.vx, vx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.vy, vy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.omega, omega); + } + output.endObject(); + } + + @Override + public ProtobufChassisSpeeds mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3778: { + if (input.isAtField(FieldNames.vx)) { + if (!input.trySkipNullValue()) { + vx = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3779: { + if (input.isAtField(FieldNames.vy)) { + if (!input.trySkipNullValue()) { + vy = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 105858401: { + if (input.isAtField(FieldNames.omega)) { + if (!input.trySkipNullValue()) { + omega = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufChassisSpeeds clone() { + return new ProtobufChassisSpeeds().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufChassisSpeeds parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), data).checkInitialized(); + } + + public static ProtobufChassisSpeeds parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), input).checkInitialized(); + } + + public static ProtobufChassisSpeeds parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufChassisSpeeds(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufChassisSpeeds messages + */ + public static MessageFactory getFactory() { + return ProtobufChassisSpeedsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufChassisSpeeds_descriptor; + } + + private enum ProtobufChassisSpeedsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufChassisSpeeds create() { + return ProtobufChassisSpeeds.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName vx = FieldName.forField("vx"); + + static final FieldName vy = FieldName.forField("vy"); + + static final FieldName omega = FieldName.forField("omega"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufControllerDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufControllerDescriptor.java new file mode 100644 index 0000000000..a08fad0a40 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufControllerDescriptor.java @@ -0,0 +1,65 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufControllerDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1968, + "ChBjb250cm9sbGVyLnByb3RvEgl3cGkucHJvdG8iaAoWUHJvdG9idWZBcm1GZWVkZm9yd2FyZBIOCgJr" + + "cxgBIAEoAVICa3MSDgoCa2cYAiABKAFSAmtnEg4KAmt2GAMgASgBUgJrdhIOCgJrYRgEIAEoAVICa2ES" + + "DgoCZHQYBSABKAFSAmR0Ip4BCiRQcm90b2J1ZkRpZmZlcmVudGlhbERyaXZlRmVlZGZvcndhcmQSGwoJ" + + "a3ZfbGluZWFyGAEgASgBUghrdkxpbmVhchIbCglrYV9saW5lYXIYAiABKAFSCGthTGluZWFyEh0KCmt2" + + "X2FuZ3VsYXIYAyABKAFSCWt2QW5ndWxhchIdCgprYV9hbmd1bGFyGAQgASgBUglrYUFuZ3VsYXIibQob" + + "UHJvdG9idWZFbGV2YXRvckZlZWRmb3J3YXJkEg4KAmtzGAEgASgBUgJrcxIOCgJrZxgCIAEoAVICa2cS" + + "DgoCa3YYAyABKAFSAmt2Eg4KAmthGAQgASgBUgJrYRIOCgJkdBgFIAEoAVICZHQiYAoeUHJvdG9idWZT" + + "aW1wbGVNb3RvckZlZWRmb3J3YXJkEg4KAmtzGAEgASgBUgJrcxIOCgJrdhgCIAEoAVICa3YSDgoCa2EY" + + "AyABKAFSAmthEg4KAmR0GAQgASgBUgJkdCJSCiZQcm90b2J1ZkRpZmZlcmVudGlhbERyaXZlV2hlZWxW" + + "b2x0YWdlcxISCgRsZWZ0GAEgASgBUgRsZWZ0EhQKBXJpZ2h0GAIgASgBUgVyaWdodEI3ChVvcmcud3Bp" + + "bGliLm1hdGgucHJvdG9CHFByb3RvYnVmQ29udHJvbGxlckRlc2NyaXB0b3JQAUqfCgoGEgQAACsBCggK" + + "AQwSAwAAEgoICgECEgMCABIKCAoBCBIDBAAuCgkKAggBEgMEAC4KCAoBCBIDBgA9CgkKAggIEgMGAD0K" + + "CAoBCBIDCAAiCgkKAggKEgMIACIKCgoCBAASBAoAEAEKCgoDBAABEgMKCB4KCwoEBAACABIDCwIQCgwK" + + "BQQAAgAFEgMLAggKDAoFBAACAAESAwsJCwoMCgUEAAIAAxIDCw4PCgsKBAQAAgESAwwCEAoMCgUEAAIB" + + "BRIDDAIICgwKBQQAAgEBEgMMCQsKDAoFBAACAQMSAwwODwoLCgQEAAICEgMNAhAKDAoFBAACAgUSAw0C" + + "CAoMCgUEAAICARIDDQkLCgwKBQQAAgIDEgMNDg8KCwoEBAACAxIDDgIQCgwKBQQAAgMFEgMOAggKDAoF" + + "BAACAwESAw4JCwoMCgUEAAIDAxIDDg4PCgsKBAQAAgQSAw8CEAoMCgUEAAIEBRIDDwIICgwKBQQAAgQB" + + "EgMPCQsKDAoFBAACBAMSAw8ODwoKCgIEARIEEgAXAQoKCgMEAQESAxIILAoLCgQEAQIAEgMTAhcKDAoF" + + "BAECAAUSAxMCCAoMCgUEAQIAARIDEwkSCgwKBQQBAgADEgMTFRYKCwoEBAECARIDFAIXCgwKBQQBAgEF" + + "EgMUAggKDAoFBAECAQESAxQJEgoMCgUEAQIBAxIDFBUWCgsKBAQBAgISAxUCGAoMCgUEAQICBRIDFQII", + "CgwKBQQBAgIBEgMVCRMKDAoFBAECAgMSAxUWFwoLCgQEAQIDEgMWAhgKDAoFBAECAwUSAxYCCAoMCgUE" + + "AQIDARIDFgkTCgwKBQQBAgMDEgMWFhcKCgoCBAISBBkAHwEKCgoDBAIBEgMZCCMKCwoEBAICABIDGgIQ" + + "CgwKBQQCAgAFEgMaAggKDAoFBAICAAESAxoJCwoMCgUEAgIAAxIDGg4PCgsKBAQCAgESAxsCEAoMCgUE" + + "AgIBBRIDGwIICgwKBQQCAgEBEgMbCQsKDAoFBAICAQMSAxsODwoLCgQEAgICEgMcAhAKDAoFBAICAgUS" + + "AxwCCAoMCgUEAgICARIDHAkLCgwKBQQCAgIDEgMcDg8KCwoEBAICAxIDHQIQCgwKBQQCAgMFEgMdAggK" + + "DAoFBAICAwESAx0JCwoMCgUEAgIDAxIDHQ4PCgsKBAQCAgQSAx4CEAoMCgUEAgIEBRIDHgIICgwKBQQC" + + "AgQBEgMeCQsKDAoFBAICBAMSAx4ODwoKCgIEAxIEIQAmAQoKCgMEAwESAyEIJgoLCgQEAwIAEgMiAhAK" + + "DAoFBAMCAAUSAyICCAoMCgUEAwIAARIDIgkLCgwKBQQDAgADEgMiDg8KCwoEBAMCARIDIwIQCgwKBQQD" + + "AgEFEgMjAggKDAoFBAMCAQESAyMJCwoMCgUEAwIBAxIDIw4PCgsKBAQDAgISAyQCEAoMCgUEAwICBRID" + + "JAIICgwKBQQDAgIBEgMkCQsKDAoFBAMCAgMSAyQODwoLCgQEAwIDEgMlAhAKDAoFBAMCAwUSAyUCCAoM" + + "CgUEAwIDARIDJQkLCgwKBQQDAgMDEgMlDg8KCgoCBAQSBCgAKwEKCgoDBAQBEgMoCC4KCwoEBAQCABID" + + "KQISCgwKBQQEAgAFEgMpAggKDAoFBAQCAAESAykJDQoMCgUEBAIAAxIDKRARCgsKBAQEAgESAyoCEwoM" + + "CgUEBAIBBRIDKgIICgwKBQQEAgEBEgMqCQ4KDAoFBAQCAQMSAyoREmIGcHJvdG8z"); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("controller.proto", "wpi.proto", descriptorData); + + static final Descriptors.Descriptor wpi_proto_ProtobufArmFeedforward_descriptor = descriptor.internalContainedType(31, 104, "ProtobufArmFeedforward", "wpi.proto.ProtobufArmFeedforward"); + + static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveFeedforward_descriptor = descriptor.internalContainedType(138, 158, "ProtobufDifferentialDriveFeedforward", "wpi.proto.ProtobufDifferentialDriveFeedforward"); + + static final Descriptors.Descriptor wpi_proto_ProtobufElevatorFeedforward_descriptor = descriptor.internalContainedType(298, 109, "ProtobufElevatorFeedforward", "wpi.proto.ProtobufElevatorFeedforward"); + + static final Descriptors.Descriptor wpi_proto_ProtobufSimpleMotorFeedforward_descriptor = descriptor.internalContainedType(409, 96, "ProtobufSimpleMotorFeedforward", "wpi.proto.ProtobufSimpleMotorFeedforward"); + + static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelVoltages_descriptor = descriptor.internalContainedType(507, 82, "ProtobufDifferentialDriveWheelVoltages", "wpi.proto.ProtobufDifferentialDriveWheelVoltages"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufCubicHermiteSpline.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufCubicHermiteSpline.java new file mode 100644 index 0000000000..4a1b0b8e25 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufCubicHermiteSpline.java @@ -0,0 +1,674 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedDouble; + +/** + * Protobuf type {@code ProtobufCubicHermiteSpline} + */ +@SuppressWarnings("hiding") +public final class ProtobufCubicHermiteSpline extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * repeated double x_initial = 1; + */ + private final RepeatedDouble xInitial = RepeatedDouble.newEmptyInstance(); + + /** + * repeated double x_final = 2; + */ + private final RepeatedDouble xFinal = RepeatedDouble.newEmptyInstance(); + + /** + * repeated double y_initial = 3; + */ + private final RepeatedDouble yInitial = RepeatedDouble.newEmptyInstance(); + + /** + * repeated double y_final = 4; + */ + private final RepeatedDouble yFinal = RepeatedDouble.newEmptyInstance(); + + private ProtobufCubicHermiteSpline() { + } + + /** + * @return a new empty instance of {@code ProtobufCubicHermiteSpline} + */ + public static ProtobufCubicHermiteSpline newInstance() { + return new ProtobufCubicHermiteSpline(); + } + + /** + * repeated double x_initial = 1; + * @return whether the xInitial field is set + */ + public boolean hasXInitial() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * repeated double x_initial = 1; + * @return this + */ + public ProtobufCubicHermiteSpline clearXInitial() { + bitField0_ &= ~0x00000001; + xInitial.clear(); + return this; + } + + /** + * repeated double x_initial = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableXInitial()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getXInitial() { + return xInitial; + } + + /** + * repeated double x_initial = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableXInitial() { + bitField0_ |= 0x00000001; + return xInitial; + } + + /** + * repeated double x_initial = 1; + * @param value the xInitial to add + * @return this + */ + public ProtobufCubicHermiteSpline addXInitial(final double value) { + bitField0_ |= 0x00000001; + xInitial.add(value); + return this; + } + + /** + * repeated double x_initial = 1; + * @param values the xInitial to add + * @return this + */ + public ProtobufCubicHermiteSpline addAllXInitial(final double... values) { + bitField0_ |= 0x00000001; + xInitial.addAll(values); + return this; + } + + /** + * repeated double x_final = 2; + * @return whether the xFinal field is set + */ + public boolean hasXFinal() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated double x_final = 2; + * @return this + */ + public ProtobufCubicHermiteSpline clearXFinal() { + bitField0_ &= ~0x00000002; + xFinal.clear(); + return this; + } + + /** + * repeated double x_final = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableXFinal()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getXFinal() { + return xFinal; + } + + /** + * repeated double x_final = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableXFinal() { + bitField0_ |= 0x00000002; + return xFinal; + } + + /** + * repeated double x_final = 2; + * @param value the xFinal to add + * @return this + */ + public ProtobufCubicHermiteSpline addXFinal(final double value) { + bitField0_ |= 0x00000002; + xFinal.add(value); + return this; + } + + /** + * repeated double x_final = 2; + * @param values the xFinal to add + * @return this + */ + public ProtobufCubicHermiteSpline addAllXFinal(final double... values) { + bitField0_ |= 0x00000002; + xFinal.addAll(values); + return this; + } + + /** + * repeated double y_initial = 3; + * @return whether the yInitial field is set + */ + public boolean hasYInitial() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated double y_initial = 3; + * @return this + */ + public ProtobufCubicHermiteSpline clearYInitial() { + bitField0_ &= ~0x00000004; + yInitial.clear(); + return this; + } + + /** + * repeated double y_initial = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableYInitial()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getYInitial() { + return yInitial; + } + + /** + * repeated double y_initial = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableYInitial() { + bitField0_ |= 0x00000004; + return yInitial; + } + + /** + * repeated double y_initial = 3; + * @param value the yInitial to add + * @return this + */ + public ProtobufCubicHermiteSpline addYInitial(final double value) { + bitField0_ |= 0x00000004; + yInitial.add(value); + return this; + } + + /** + * repeated double y_initial = 3; + * @param values the yInitial to add + * @return this + */ + public ProtobufCubicHermiteSpline addAllYInitial(final double... values) { + bitField0_ |= 0x00000004; + yInitial.addAll(values); + return this; + } + + /** + * repeated double y_final = 4; + * @return whether the yFinal field is set + */ + public boolean hasYFinal() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated double y_final = 4; + * @return this + */ + public ProtobufCubicHermiteSpline clearYFinal() { + bitField0_ &= ~0x00000008; + yFinal.clear(); + return this; + } + + /** + * repeated double y_final = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableYFinal()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getYFinal() { + return yFinal; + } + + /** + * repeated double y_final = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableYFinal() { + bitField0_ |= 0x00000008; + return yFinal; + } + + /** + * repeated double y_final = 4; + * @param value the yFinal to add + * @return this + */ + public ProtobufCubicHermiteSpline addYFinal(final double value) { + bitField0_ |= 0x00000008; + yFinal.add(value); + return this; + } + + /** + * repeated double y_final = 4; + * @param values the yFinal to add + * @return this + */ + public ProtobufCubicHermiteSpline addAllYFinal(final double... values) { + bitField0_ |= 0x00000008; + yFinal.addAll(values); + return this; + } + + @Override + public ProtobufCubicHermiteSpline copyFrom(final ProtobufCubicHermiteSpline other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + xInitial.copyFrom(other.xInitial); + xFinal.copyFrom(other.xFinal); + yInitial.copyFrom(other.yInitial); + yFinal.copyFrom(other.yFinal); + } + return this; + } + + @Override + public ProtobufCubicHermiteSpline mergeFrom(final ProtobufCubicHermiteSpline other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasXInitial()) { + getMutableXInitial().addAll(other.xInitial); + } + if (other.hasXFinal()) { + getMutableXFinal().addAll(other.xFinal); + } + if (other.hasYInitial()) { + getMutableYInitial().addAll(other.yInitial); + } + if (other.hasYFinal()) { + getMutableYFinal().addAll(other.yFinal); + } + return this; + } + + @Override + public ProtobufCubicHermiteSpline clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + xInitial.clear(); + xFinal.clear(); + yInitial.clear(); + yFinal.clear(); + return this; + } + + @Override + public ProtobufCubicHermiteSpline clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + xInitial.clear(); + xFinal.clear(); + yInitial.clear(); + yFinal.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufCubicHermiteSpline)) { + return false; + } + ProtobufCubicHermiteSpline other = (ProtobufCubicHermiteSpline) o; + return bitField0_ == other.bitField0_ + && (!hasXInitial() || xInitial.equals(other.xInitial)) + && (!hasXFinal() || xFinal.equals(other.xFinal)) + && (!hasYInitial() || yInitial.equals(other.yInitial)) + && (!hasYFinal() || yFinal.equals(other.yFinal)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + for (int i = 0; i < xInitial.length(); i++) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(xInitial.array()[i]); + } + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < xFinal.length(); i++) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(xFinal.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < yInitial.length(); i++) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(yInitial.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < yFinal.length(); i++) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(yFinal.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += (1 + 8) * xInitial.length(); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 + 8) * xFinal.length(); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 + 8) * yInitial.length(); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 + 8) * yFinal.length(); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufCubicHermiteSpline mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // xInitial [packed=true] + input.readPackedDouble(xInitial); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // xFinal [packed=true] + input.readPackedDouble(xFinal); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // yInitial [packed=true] + input.readPackedDouble(yInitial); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // yFinal [packed=true] + input.readPackedDouble(yFinal); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 9: { + // xInitial [packed=false] + tag = input.readRepeatedDouble(xInitial, tag); + bitField0_ |= 0x00000001; + break; + } + case 17: { + // xFinal [packed=false] + tag = input.readRepeatedDouble(xFinal, tag); + bitField0_ |= 0x00000002; + break; + } + case 25: { + // yInitial [packed=false] + tag = input.readRepeatedDouble(yInitial, tag); + bitField0_ |= 0x00000004; + break; + } + case 33: { + // yFinal [packed=false] + tag = input.readRepeatedDouble(yFinal, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeRepeatedDouble(FieldNames.xInitial, xInitial); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedDouble(FieldNames.xFinal, xFinal); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedDouble(FieldNames.yInitial, yInitial); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedDouble(FieldNames.yFinal, yFinal); + } + output.endObject(); + } + + @Override + public ProtobufCubicHermiteSpline mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1998129236: + case -2134571395: { + if (input.isAtField(FieldNames.xInitial)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(xInitial); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -791585826: + case 1943464687: { + if (input.isAtField(FieldNames.xFinal)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(xFinal); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -255318901: + case 352941438: { + if (input.isAtField(FieldNames.yInitial)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(yInitial); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -762956675: + case -1463998928: { + if (input.isAtField(FieldNames.yFinal)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(yFinal); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufCubicHermiteSpline clone() { + return new ProtobufCubicHermiteSpline().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufCubicHermiteSpline parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufCubicHermiteSpline(), data).checkInitialized(); + } + + public static ProtobufCubicHermiteSpline parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufCubicHermiteSpline(), input).checkInitialized(); + } + + public static ProtobufCubicHermiteSpline parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufCubicHermiteSpline(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufCubicHermiteSpline messages + */ + public static MessageFactory getFactory() { + return ProtobufCubicHermiteSplineFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufSplineDescriptor.wpi_proto_ProtobufCubicHermiteSpline_descriptor; + } + + private enum ProtobufCubicHermiteSplineFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufCubicHermiteSpline create() { + return ProtobufCubicHermiteSpline.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName xInitial = FieldName.forField("xInitial", "x_initial"); + + static final FieldName xFinal = FieldName.forField("xFinal", "x_final"); + + static final FieldName yInitial = FieldName.forField("yInitial", "y_initial"); + + static final FieldName yFinal = FieldName.forField("yFinal", "y_final"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDCMotor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDCMotor.java new file mode 100644 index 0000000000..1015c12bf3 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDCMotor.java @@ -0,0 +1,594 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufDCMotor} + */ +@SuppressWarnings("hiding") +public final class ProtobufDCMotor extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double nominal_voltage = 1; + */ + private double nominalVoltage; + + /** + * optional double stall_torque = 2; + */ + private double stallTorque; + + /** + * optional double stall_current = 3; + */ + private double stallCurrent; + + /** + * optional double free_current = 4; + */ + private double freeCurrent; + + /** + * optional double free_speed = 5; + */ + private double freeSpeed; + + private ProtobufDCMotor() { + } + + /** + * @return a new empty instance of {@code ProtobufDCMotor} + */ + public static ProtobufDCMotor newInstance() { + return new ProtobufDCMotor(); + } + + /** + * optional double nominal_voltage = 1; + * @return whether the nominalVoltage field is set + */ + public boolean hasNominalVoltage() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double nominal_voltage = 1; + * @return this + */ + public ProtobufDCMotor clearNominalVoltage() { + bitField0_ &= ~0x00000001; + nominalVoltage = 0D; + return this; + } + + /** + * optional double nominal_voltage = 1; + * @return the nominalVoltage + */ + public double getNominalVoltage() { + return nominalVoltage; + } + + /** + * optional double nominal_voltage = 1; + * @param value the nominalVoltage to set + * @return this + */ + public ProtobufDCMotor setNominalVoltage(final double value) { + bitField0_ |= 0x00000001; + nominalVoltage = value; + return this; + } + + /** + * optional double stall_torque = 2; + * @return whether the stallTorque field is set + */ + public boolean hasStallTorque() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double stall_torque = 2; + * @return this + */ + public ProtobufDCMotor clearStallTorque() { + bitField0_ &= ~0x00000002; + stallTorque = 0D; + return this; + } + + /** + * optional double stall_torque = 2; + * @return the stallTorque + */ + public double getStallTorque() { + return stallTorque; + } + + /** + * optional double stall_torque = 2; + * @param value the stallTorque to set + * @return this + */ + public ProtobufDCMotor setStallTorque(final double value) { + bitField0_ |= 0x00000002; + stallTorque = value; + return this; + } + + /** + * optional double stall_current = 3; + * @return whether the stallCurrent field is set + */ + public boolean hasStallCurrent() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double stall_current = 3; + * @return this + */ + public ProtobufDCMotor clearStallCurrent() { + bitField0_ &= ~0x00000004; + stallCurrent = 0D; + return this; + } + + /** + * optional double stall_current = 3; + * @return the stallCurrent + */ + public double getStallCurrent() { + return stallCurrent; + } + + /** + * optional double stall_current = 3; + * @param value the stallCurrent to set + * @return this + */ + public ProtobufDCMotor setStallCurrent(final double value) { + bitField0_ |= 0x00000004; + stallCurrent = value; + return this; + } + + /** + * optional double free_current = 4; + * @return whether the freeCurrent field is set + */ + public boolean hasFreeCurrent() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double free_current = 4; + * @return this + */ + public ProtobufDCMotor clearFreeCurrent() { + bitField0_ &= ~0x00000008; + freeCurrent = 0D; + return this; + } + + /** + * optional double free_current = 4; + * @return the freeCurrent + */ + public double getFreeCurrent() { + return freeCurrent; + } + + /** + * optional double free_current = 4; + * @param value the freeCurrent to set + * @return this + */ + public ProtobufDCMotor setFreeCurrent(final double value) { + bitField0_ |= 0x00000008; + freeCurrent = value; + return this; + } + + /** + * optional double free_speed = 5; + * @return whether the freeSpeed field is set + */ + public boolean hasFreeSpeed() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional double free_speed = 5; + * @return this + */ + public ProtobufDCMotor clearFreeSpeed() { + bitField0_ &= ~0x00000010; + freeSpeed = 0D; + return this; + } + + /** + * optional double free_speed = 5; + * @return the freeSpeed + */ + public double getFreeSpeed() { + return freeSpeed; + } + + /** + * optional double free_speed = 5; + * @param value the freeSpeed to set + * @return this + */ + public ProtobufDCMotor setFreeSpeed(final double value) { + bitField0_ |= 0x00000010; + freeSpeed = value; + return this; + } + + @Override + public ProtobufDCMotor copyFrom(final ProtobufDCMotor other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + nominalVoltage = other.nominalVoltage; + stallTorque = other.stallTorque; + stallCurrent = other.stallCurrent; + freeCurrent = other.freeCurrent; + freeSpeed = other.freeSpeed; + } + return this; + } + + @Override + public ProtobufDCMotor mergeFrom(final ProtobufDCMotor other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNominalVoltage()) { + setNominalVoltage(other.nominalVoltage); + } + if (other.hasStallTorque()) { + setStallTorque(other.stallTorque); + } + if (other.hasStallCurrent()) { + setStallCurrent(other.stallCurrent); + } + if (other.hasFreeCurrent()) { + setFreeCurrent(other.freeCurrent); + } + if (other.hasFreeSpeed()) { + setFreeSpeed(other.freeSpeed); + } + return this; + } + + @Override + public ProtobufDCMotor clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + nominalVoltage = 0D; + stallTorque = 0D; + stallCurrent = 0D; + freeCurrent = 0D; + freeSpeed = 0D; + return this; + } + + @Override + public ProtobufDCMotor clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufDCMotor)) { + return false; + } + ProtobufDCMotor other = (ProtobufDCMotor) o; + return bitField0_ == other.bitField0_ + && (!hasNominalVoltage() || ProtoUtil.isEqual(nominalVoltage, other.nominalVoltage)) + && (!hasStallTorque() || ProtoUtil.isEqual(stallTorque, other.stallTorque)) + && (!hasStallCurrent() || ProtoUtil.isEqual(stallCurrent, other.stallCurrent)) + && (!hasFreeCurrent() || ProtoUtil.isEqual(freeCurrent, other.freeCurrent)) + && (!hasFreeSpeed() || ProtoUtil.isEqual(freeSpeed, other.freeSpeed)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(nominalVoltage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(stallTorque); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(stallCurrent); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(freeCurrent); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 41); + output.writeDoubleNoTag(freeSpeed); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufDCMotor mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // nominalVoltage + nominalVoltage = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // stallTorque + stallTorque = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // stallCurrent + stallCurrent = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // freeCurrent + freeCurrent = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 41) { + break; + } + } + case 41: { + // freeSpeed + freeSpeed = input.readDouble(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.nominalVoltage, nominalVoltage); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.stallTorque, stallTorque); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.stallCurrent, stallCurrent); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.freeCurrent, freeCurrent); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeDouble(FieldNames.freeSpeed, freeSpeed); + } + output.endObject(); + } + + @Override + public ProtobufDCMotor mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1374862050: + case 173092603: { + if (input.isAtField(FieldNames.nominalVoltage)) { + if (!input.trySkipNullValue()) { + nominalVoltage = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2075810250: + case 1238615945: { + if (input.isAtField(FieldNames.stallTorque)) { + if (!input.trySkipNullValue()) { + stallTorque = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2105262663: + case 2006484954: { + if (input.isAtField(FieldNames.stallCurrent)) { + if (!input.trySkipNullValue()) { + stallCurrent = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1024355693: + case 240406182: { + if (input.isAtField(FieldNames.freeCurrent)) { + if (!input.trySkipNullValue()) { + freeCurrent = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case -444654277: + case -552732492: { + if (input.isAtField(FieldNames.freeSpeed)) { + if (!input.trySkipNullValue()) { + freeSpeed = input.readDouble(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufDCMotor clone() { + return new ProtobufDCMotor().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufDCMotor parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufDCMotor(), data).checkInitialized(); + } + + public static ProtobufDCMotor parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufDCMotor(), input).checkInitialized(); + } + + public static ProtobufDCMotor parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufDCMotor(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufDCMotor messages + */ + public static MessageFactory getFactory() { + return ProtobufDCMotorFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufSystemDescriptor.wpi_proto_ProtobufDCMotor_descriptor; + } + + private enum ProtobufDCMotorFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufDCMotor create() { + return ProtobufDCMotor.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName nominalVoltage = FieldName.forField("nominalVoltage", "nominal_voltage"); + + static final FieldName stallTorque = FieldName.forField("stallTorque", "stall_torque"); + + static final FieldName stallCurrent = FieldName.forField("stallCurrent", "stall_current"); + + static final FieldName freeCurrent = FieldName.forField("freeCurrent", "free_current"); + + static final FieldName freeSpeed = FieldName.forField("freeSpeed", "free_speed"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveFeedforward.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveFeedforward.java new file mode 100644 index 0000000000..ad6fd7300b --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveFeedforward.java @@ -0,0 +1,519 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufDifferentialDriveFeedforward} + */ +@SuppressWarnings("hiding") +public final class ProtobufDifferentialDriveFeedforward extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double kv_linear = 1; + */ + private double kvLinear; + + /** + * optional double ka_linear = 2; + */ + private double kaLinear; + + /** + * optional double kv_angular = 3; + */ + private double kvAngular; + + /** + * optional double ka_angular = 4; + */ + private double kaAngular; + + private ProtobufDifferentialDriveFeedforward() { + } + + /** + * @return a new empty instance of {@code ProtobufDifferentialDriveFeedforward} + */ + public static ProtobufDifferentialDriveFeedforward newInstance() { + return new ProtobufDifferentialDriveFeedforward(); + } + + /** + * optional double kv_linear = 1; + * @return whether the kvLinear field is set + */ + public boolean hasKvLinear() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double kv_linear = 1; + * @return this + */ + public ProtobufDifferentialDriveFeedforward clearKvLinear() { + bitField0_ &= ~0x00000001; + kvLinear = 0D; + return this; + } + + /** + * optional double kv_linear = 1; + * @return the kvLinear + */ + public double getKvLinear() { + return kvLinear; + } + + /** + * optional double kv_linear = 1; + * @param value the kvLinear to set + * @return this + */ + public ProtobufDifferentialDriveFeedforward setKvLinear(final double value) { + bitField0_ |= 0x00000001; + kvLinear = value; + return this; + } + + /** + * optional double ka_linear = 2; + * @return whether the kaLinear field is set + */ + public boolean hasKaLinear() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double ka_linear = 2; + * @return this + */ + public ProtobufDifferentialDriveFeedforward clearKaLinear() { + bitField0_ &= ~0x00000002; + kaLinear = 0D; + return this; + } + + /** + * optional double ka_linear = 2; + * @return the kaLinear + */ + public double getKaLinear() { + return kaLinear; + } + + /** + * optional double ka_linear = 2; + * @param value the kaLinear to set + * @return this + */ + public ProtobufDifferentialDriveFeedforward setKaLinear(final double value) { + bitField0_ |= 0x00000002; + kaLinear = value; + return this; + } + + /** + * optional double kv_angular = 3; + * @return whether the kvAngular field is set + */ + public boolean hasKvAngular() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double kv_angular = 3; + * @return this + */ + public ProtobufDifferentialDriveFeedforward clearKvAngular() { + bitField0_ &= ~0x00000004; + kvAngular = 0D; + return this; + } + + /** + * optional double kv_angular = 3; + * @return the kvAngular + */ + public double getKvAngular() { + return kvAngular; + } + + /** + * optional double kv_angular = 3; + * @param value the kvAngular to set + * @return this + */ + public ProtobufDifferentialDriveFeedforward setKvAngular(final double value) { + bitField0_ |= 0x00000004; + kvAngular = value; + return this; + } + + /** + * optional double ka_angular = 4; + * @return whether the kaAngular field is set + */ + public boolean hasKaAngular() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double ka_angular = 4; + * @return this + */ + public ProtobufDifferentialDriveFeedforward clearKaAngular() { + bitField0_ &= ~0x00000008; + kaAngular = 0D; + return this; + } + + /** + * optional double ka_angular = 4; + * @return the kaAngular + */ + public double getKaAngular() { + return kaAngular; + } + + /** + * optional double ka_angular = 4; + * @param value the kaAngular to set + * @return this + */ + public ProtobufDifferentialDriveFeedforward setKaAngular(final double value) { + bitField0_ |= 0x00000008; + kaAngular = value; + return this; + } + + @Override + public ProtobufDifferentialDriveFeedforward copyFrom( + final ProtobufDifferentialDriveFeedforward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + kvLinear = other.kvLinear; + kaLinear = other.kaLinear; + kvAngular = other.kvAngular; + kaAngular = other.kaAngular; + } + return this; + } + + @Override + public ProtobufDifferentialDriveFeedforward mergeFrom( + final ProtobufDifferentialDriveFeedforward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasKvLinear()) { + setKvLinear(other.kvLinear); + } + if (other.hasKaLinear()) { + setKaLinear(other.kaLinear); + } + if (other.hasKvAngular()) { + setKvAngular(other.kvAngular); + } + if (other.hasKaAngular()) { + setKaAngular(other.kaAngular); + } + return this; + } + + @Override + public ProtobufDifferentialDriveFeedforward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + kvLinear = 0D; + kaLinear = 0D; + kvAngular = 0D; + kaAngular = 0D; + return this; + } + + @Override + public ProtobufDifferentialDriveFeedforward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufDifferentialDriveFeedforward)) { + return false; + } + ProtobufDifferentialDriveFeedforward other = (ProtobufDifferentialDriveFeedforward) o; + return bitField0_ == other.bitField0_ + && (!hasKvLinear() || ProtoUtil.isEqual(kvLinear, other.kvLinear)) + && (!hasKaLinear() || ProtoUtil.isEqual(kaLinear, other.kaLinear)) + && (!hasKvAngular() || ProtoUtil.isEqual(kvAngular, other.kvAngular)) + && (!hasKaAngular() || ProtoUtil.isEqual(kaAngular, other.kaAngular)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(kvLinear); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(kaLinear); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(kvAngular); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(kaAngular); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufDifferentialDriveFeedforward mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // kvLinear + kvLinear = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // kaLinear + kaLinear = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // kvAngular + kvAngular = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // kaAngular + kaAngular = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.kvLinear, kvLinear); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.kaLinear, kaLinear); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.kvAngular, kvAngular); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.kaAngular, kaAngular); + } + output.endObject(); + } + + @Override + public ProtobufDifferentialDriveFeedforward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1424526448: + case 974889081: { + if (input.isAtField(FieldNames.kvLinear)) { + if (!input.trySkipNullValue()) { + kvLinear = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -33181669: + case -1264389586: { + if (input.isAtField(FieldNames.kaLinear)) { + if (!input.trySkipNullValue()) { + kaLinear = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 175208951: + case -878647538: { + if (input.isAtField(FieldNames.kvAngular)) { + if (!input.trySkipNullValue()) { + kvAngular = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2064069716: + case -1576809479: { + if (input.isAtField(FieldNames.kaAngular)) { + if (!input.trySkipNullValue()) { + kaAngular = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufDifferentialDriveFeedforward clone() { + return new ProtobufDifferentialDriveFeedforward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufDifferentialDriveFeedforward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), data).checkInitialized(); + } + + public static ProtobufDifferentialDriveFeedforward parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), input).checkInitialized(); + } + + public static ProtobufDifferentialDriveFeedforward parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveFeedforward(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufDifferentialDriveFeedforward messages + */ + public static MessageFactory getFactory() { + return ProtobufDifferentialDriveFeedforwardFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufControllerDescriptor.wpi_proto_ProtobufDifferentialDriveFeedforward_descriptor; + } + + private enum ProtobufDifferentialDriveFeedforwardFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufDifferentialDriveFeedforward create() { + return ProtobufDifferentialDriveFeedforward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName kvLinear = FieldName.forField("kvLinear", "kv_linear"); + + static final FieldName kaLinear = FieldName.forField("kaLinear", "ka_linear"); + + static final FieldName kvAngular = FieldName.forField("kvAngular", "kv_angular"); + + static final FieldName kaAngular = FieldName.forField("kaAngular", "ka_angular"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveKinematics.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveKinematics.java new file mode 100644 index 0000000000..b271864b5c --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveKinematics.java @@ -0,0 +1,274 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufDifferentialDriveKinematics} + */ +@SuppressWarnings("hiding") +public final class ProtobufDifferentialDriveKinematics extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double trackwidth = 1; + */ + private double trackwidth; + + private ProtobufDifferentialDriveKinematics() { + } + + /** + * @return a new empty instance of {@code ProtobufDifferentialDriveKinematics} + */ + public static ProtobufDifferentialDriveKinematics newInstance() { + return new ProtobufDifferentialDriveKinematics(); + } + + /** + * optional double trackwidth = 1; + * @return whether the trackwidth field is set + */ + public boolean hasTrackwidth() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double trackwidth = 1; + * @return this + */ + public ProtobufDifferentialDriveKinematics clearTrackwidth() { + bitField0_ &= ~0x00000001; + trackwidth = 0D; + return this; + } + + /** + * optional double trackwidth = 1; + * @return the trackwidth + */ + public double getTrackwidth() { + return trackwidth; + } + + /** + * optional double trackwidth = 1; + * @param value the trackwidth to set + * @return this + */ + public ProtobufDifferentialDriveKinematics setTrackwidth(final double value) { + bitField0_ |= 0x00000001; + trackwidth = value; + return this; + } + + @Override + public ProtobufDifferentialDriveKinematics copyFrom( + final ProtobufDifferentialDriveKinematics other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + trackwidth = other.trackwidth; + } + return this; + } + + @Override + public ProtobufDifferentialDriveKinematics mergeFrom( + final ProtobufDifferentialDriveKinematics other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTrackwidth()) { + setTrackwidth(other.trackwidth); + } + return this; + } + + @Override + public ProtobufDifferentialDriveKinematics clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + trackwidth = 0D; + return this; + } + + @Override + public ProtobufDifferentialDriveKinematics clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufDifferentialDriveKinematics)) { + return false; + } + ProtobufDifferentialDriveKinematics other = (ProtobufDifferentialDriveKinematics) o; + return bitField0_ == other.bitField0_ + && (!hasTrackwidth() || ProtoUtil.isEqual(trackwidth, other.trackwidth)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(trackwidth); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufDifferentialDriveKinematics mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // trackwidth + trackwidth = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.trackwidth, trackwidth); + } + output.endObject(); + } + + @Override + public ProtobufDifferentialDriveKinematics mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1181766491: { + if (input.isAtField(FieldNames.trackwidth)) { + if (!input.trySkipNullValue()) { + trackwidth = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufDifferentialDriveKinematics clone() { + return new ProtobufDifferentialDriveKinematics().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufDifferentialDriveKinematics parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), data).checkInitialized(); + } + + public static ProtobufDifferentialDriveKinematics parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), input).checkInitialized(); + } + + public static ProtobufDifferentialDriveKinematics parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveKinematics(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufDifferentialDriveKinematics messages + */ + public static MessageFactory getFactory() { + return ProtobufDifferentialDriveKinematicsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufDifferentialDriveKinematics_descriptor; + } + + private enum ProtobufDifferentialDriveKinematicsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufDifferentialDriveKinematics create() { + return ProtobufDifferentialDriveKinematics.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName trackwidth = FieldName.forField("trackwidth"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelAccelerations.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelAccelerations.java new file mode 100644 index 0000000000..ed5627a4af --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelAccelerations.java @@ -0,0 +1,356 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufDifferentialDriveWheelAccelerations} + */ +@SuppressWarnings("hiding") +public final class ProtobufDifferentialDriveWheelAccelerations extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double left = 1; + */ + private double left; + + /** + * optional double right = 2; + */ + private double right; + + private ProtobufDifferentialDriveWheelAccelerations() { + } + + /** + * @return a new empty instance of {@code ProtobufDifferentialDriveWheelAccelerations} + */ + public static ProtobufDifferentialDriveWheelAccelerations newInstance() { + return new ProtobufDifferentialDriveWheelAccelerations(); + } + + /** + * optional double left = 1; + * @return whether the left field is set + */ + public boolean hasLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double left = 1; + * @return this + */ + public ProtobufDifferentialDriveWheelAccelerations clearLeft() { + bitField0_ &= ~0x00000001; + left = 0D; + return this; + } + + /** + * optional double left = 1; + * @return the left + */ + public double getLeft() { + return left; + } + + /** + * optional double left = 1; + * @param value the left to set + * @return this + */ + public ProtobufDifferentialDriveWheelAccelerations setLeft(final double value) { + bitField0_ |= 0x00000001; + left = value; + return this; + } + + /** + * optional double right = 2; + * @return whether the right field is set + */ + public boolean hasRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double right = 2; + * @return this + */ + public ProtobufDifferentialDriveWheelAccelerations clearRight() { + bitField0_ &= ~0x00000002; + right = 0D; + return this; + } + + /** + * optional double right = 2; + * @return the right + */ + public double getRight() { + return right; + } + + /** + * optional double right = 2; + * @param value the right to set + * @return this + */ + public ProtobufDifferentialDriveWheelAccelerations setRight(final double value) { + bitField0_ |= 0x00000002; + right = value; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelAccelerations copyFrom( + final ProtobufDifferentialDriveWheelAccelerations other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + left = other.left; + right = other.right; + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelAccelerations mergeFrom( + final ProtobufDifferentialDriveWheelAccelerations other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLeft()) { + setLeft(other.left); + } + if (other.hasRight()) { + setRight(other.right); + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelAccelerations clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + left = 0D; + right = 0D; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelAccelerations clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufDifferentialDriveWheelAccelerations)) { + return false; + } + ProtobufDifferentialDriveWheelAccelerations other = (ProtobufDifferentialDriveWheelAccelerations) o; + return bitField0_ == other.bitField0_ + && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) + && (!hasRight() || ProtoUtil.isEqual(right, other.right)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(right); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufDifferentialDriveWheelAccelerations mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // left + left = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // right + right = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.left, left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.right, right); + } + output.endObject(); + } + + @Override + public ProtobufDifferentialDriveWheelAccelerations mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3317767: { + if (input.isAtField(FieldNames.left)) { + if (!input.trySkipNullValue()) { + left = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 108511772: { + if (input.isAtField(FieldNames.right)) { + if (!input.trySkipNullValue()) { + right = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufDifferentialDriveWheelAccelerations clone() { + return new ProtobufDifferentialDriveWheelAccelerations().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufDifferentialDriveWheelAccelerations parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelAccelerations(), data).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelAccelerations parseFrom(final ProtoSource input) + throws IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelAccelerations(), input).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelAccelerations parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelAccelerations(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufDifferentialDriveWheelAccelerations messages + */ + public static MessageFactory getFactory() { + return ProtobufDifferentialDriveWheelAccelerationsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufDifferentialDriveWheelAccelerations_descriptor; + } + + private enum ProtobufDifferentialDriveWheelAccelerationsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufDifferentialDriveWheelAccelerations create() { + return ProtobufDifferentialDriveWheelAccelerations.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName left = FieldName.forField("left"); + + static final FieldName right = FieldName.forField("right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelPositions.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelPositions.java new file mode 100644 index 0000000000..80b7c2351b --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelPositions.java @@ -0,0 +1,356 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufDifferentialDriveWheelPositions} + */ +@SuppressWarnings("hiding") +public final class ProtobufDifferentialDriveWheelPositions extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double left = 1; + */ + private double left; + + /** + * optional double right = 2; + */ + private double right; + + private ProtobufDifferentialDriveWheelPositions() { + } + + /** + * @return a new empty instance of {@code ProtobufDifferentialDriveWheelPositions} + */ + public static ProtobufDifferentialDriveWheelPositions newInstance() { + return new ProtobufDifferentialDriveWheelPositions(); + } + + /** + * optional double left = 1; + * @return whether the left field is set + */ + public boolean hasLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double left = 1; + * @return this + */ + public ProtobufDifferentialDriveWheelPositions clearLeft() { + bitField0_ &= ~0x00000001; + left = 0D; + return this; + } + + /** + * optional double left = 1; + * @return the left + */ + public double getLeft() { + return left; + } + + /** + * optional double left = 1; + * @param value the left to set + * @return this + */ + public ProtobufDifferentialDriveWheelPositions setLeft(final double value) { + bitField0_ |= 0x00000001; + left = value; + return this; + } + + /** + * optional double right = 2; + * @return whether the right field is set + */ + public boolean hasRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double right = 2; + * @return this + */ + public ProtobufDifferentialDriveWheelPositions clearRight() { + bitField0_ &= ~0x00000002; + right = 0D; + return this; + } + + /** + * optional double right = 2; + * @return the right + */ + public double getRight() { + return right; + } + + /** + * optional double right = 2; + * @param value the right to set + * @return this + */ + public ProtobufDifferentialDriveWheelPositions setRight(final double value) { + bitField0_ |= 0x00000002; + right = value; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelPositions copyFrom( + final ProtobufDifferentialDriveWheelPositions other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + left = other.left; + right = other.right; + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelPositions mergeFrom( + final ProtobufDifferentialDriveWheelPositions other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLeft()) { + setLeft(other.left); + } + if (other.hasRight()) { + setRight(other.right); + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelPositions clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + left = 0D; + right = 0D; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelPositions clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufDifferentialDriveWheelPositions)) { + return false; + } + ProtobufDifferentialDriveWheelPositions other = (ProtobufDifferentialDriveWheelPositions) o; + return bitField0_ == other.bitField0_ + && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) + && (!hasRight() || ProtoUtil.isEqual(right, other.right)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(right); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufDifferentialDriveWheelPositions mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // left + left = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // right + right = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.left, left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.right, right); + } + output.endObject(); + } + + @Override + public ProtobufDifferentialDriveWheelPositions mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3317767: { + if (input.isAtField(FieldNames.left)) { + if (!input.trySkipNullValue()) { + left = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 108511772: { + if (input.isAtField(FieldNames.right)) { + if (!input.trySkipNullValue()) { + right = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufDifferentialDriveWheelPositions clone() { + return new ProtobufDifferentialDriveWheelPositions().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufDifferentialDriveWheelPositions parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelPositions(), data).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelPositions parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelPositions(), input).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelPositions parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelPositions(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufDifferentialDriveWheelPositions messages + */ + public static MessageFactory getFactory() { + return ProtobufDifferentialDriveWheelPositionsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufDifferentialDriveWheelPositions_descriptor; + } + + private enum ProtobufDifferentialDriveWheelPositionsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufDifferentialDriveWheelPositions create() { + return ProtobufDifferentialDriveWheelPositions.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName left = FieldName.forField("left"); + + static final FieldName right = FieldName.forField("right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelSpeeds.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelSpeeds.java new file mode 100644 index 0000000000..a84bbbe845 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelSpeeds.java @@ -0,0 +1,355 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufDifferentialDriveWheelSpeeds} + */ +@SuppressWarnings("hiding") +public final class ProtobufDifferentialDriveWheelSpeeds extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double left = 1; + */ + private double left; + + /** + * optional double right = 2; + */ + private double right; + + private ProtobufDifferentialDriveWheelSpeeds() { + } + + /** + * @return a new empty instance of {@code ProtobufDifferentialDriveWheelSpeeds} + */ + public static ProtobufDifferentialDriveWheelSpeeds newInstance() { + return new ProtobufDifferentialDriveWheelSpeeds(); + } + + /** + * optional double left = 1; + * @return whether the left field is set + */ + public boolean hasLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double left = 1; + * @return this + */ + public ProtobufDifferentialDriveWheelSpeeds clearLeft() { + bitField0_ &= ~0x00000001; + left = 0D; + return this; + } + + /** + * optional double left = 1; + * @return the left + */ + public double getLeft() { + return left; + } + + /** + * optional double left = 1; + * @param value the left to set + * @return this + */ + public ProtobufDifferentialDriveWheelSpeeds setLeft(final double value) { + bitField0_ |= 0x00000001; + left = value; + return this; + } + + /** + * optional double right = 2; + * @return whether the right field is set + */ + public boolean hasRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double right = 2; + * @return this + */ + public ProtobufDifferentialDriveWheelSpeeds clearRight() { + bitField0_ &= ~0x00000002; + right = 0D; + return this; + } + + /** + * optional double right = 2; + * @return the right + */ + public double getRight() { + return right; + } + + /** + * optional double right = 2; + * @param value the right to set + * @return this + */ + public ProtobufDifferentialDriveWheelSpeeds setRight(final double value) { + bitField0_ |= 0x00000002; + right = value; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelSpeeds copyFrom( + final ProtobufDifferentialDriveWheelSpeeds other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + left = other.left; + right = other.right; + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelSpeeds mergeFrom( + final ProtobufDifferentialDriveWheelSpeeds other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLeft()) { + setLeft(other.left); + } + if (other.hasRight()) { + setRight(other.right); + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelSpeeds clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + left = 0D; + right = 0D; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelSpeeds clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufDifferentialDriveWheelSpeeds)) { + return false; + } + ProtobufDifferentialDriveWheelSpeeds other = (ProtobufDifferentialDriveWheelSpeeds) o; + return bitField0_ == other.bitField0_ + && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) + && (!hasRight() || ProtoUtil.isEqual(right, other.right)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(right); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // left + left = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // right + right = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.left, left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.right, right); + } + output.endObject(); + } + + @Override + public ProtobufDifferentialDriveWheelSpeeds mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3317767: { + if (input.isAtField(FieldNames.left)) { + if (!input.trySkipNullValue()) { + left = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 108511772: { + if (input.isAtField(FieldNames.right)) { + if (!input.trySkipNullValue()) { + right = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufDifferentialDriveWheelSpeeds clone() { + return new ProtobufDifferentialDriveWheelSpeeds().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), data).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), input).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelSpeeds parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelSpeeds(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufDifferentialDriveWheelSpeeds messages + */ + public static MessageFactory getFactory() { + return ProtobufDifferentialDriveWheelSpeedsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor; + } + + private enum ProtobufDifferentialDriveWheelSpeedsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufDifferentialDriveWheelSpeeds create() { + return ProtobufDifferentialDriveWheelSpeeds.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName left = FieldName.forField("left"); + + static final FieldName right = FieldName.forField("right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelVoltages.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelVoltages.java new file mode 100644 index 0000000000..efedd83d4c --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufDifferentialDriveWheelVoltages.java @@ -0,0 +1,356 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufDifferentialDriveWheelVoltages} + */ +@SuppressWarnings("hiding") +public final class ProtobufDifferentialDriveWheelVoltages extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double left = 1; + */ + private double left; + + /** + * optional double right = 2; + */ + private double right; + + private ProtobufDifferentialDriveWheelVoltages() { + } + + /** + * @return a new empty instance of {@code ProtobufDifferentialDriveWheelVoltages} + */ + public static ProtobufDifferentialDriveWheelVoltages newInstance() { + return new ProtobufDifferentialDriveWheelVoltages(); + } + + /** + * optional double left = 1; + * @return whether the left field is set + */ + public boolean hasLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double left = 1; + * @return this + */ + public ProtobufDifferentialDriveWheelVoltages clearLeft() { + bitField0_ &= ~0x00000001; + left = 0D; + return this; + } + + /** + * optional double left = 1; + * @return the left + */ + public double getLeft() { + return left; + } + + /** + * optional double left = 1; + * @param value the left to set + * @return this + */ + public ProtobufDifferentialDriveWheelVoltages setLeft(final double value) { + bitField0_ |= 0x00000001; + left = value; + return this; + } + + /** + * optional double right = 2; + * @return whether the right field is set + */ + public boolean hasRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double right = 2; + * @return this + */ + public ProtobufDifferentialDriveWheelVoltages clearRight() { + bitField0_ &= ~0x00000002; + right = 0D; + return this; + } + + /** + * optional double right = 2; + * @return the right + */ + public double getRight() { + return right; + } + + /** + * optional double right = 2; + * @param value the right to set + * @return this + */ + public ProtobufDifferentialDriveWheelVoltages setRight(final double value) { + bitField0_ |= 0x00000002; + right = value; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelVoltages copyFrom( + final ProtobufDifferentialDriveWheelVoltages other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + left = other.left; + right = other.right; + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelVoltages mergeFrom( + final ProtobufDifferentialDriveWheelVoltages other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasLeft()) { + setLeft(other.left); + } + if (other.hasRight()) { + setRight(other.right); + } + return this; + } + + @Override + public ProtobufDifferentialDriveWheelVoltages clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + left = 0D; + right = 0D; + return this; + } + + @Override + public ProtobufDifferentialDriveWheelVoltages clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufDifferentialDriveWheelVoltages)) { + return false; + } + ProtobufDifferentialDriveWheelVoltages other = (ProtobufDifferentialDriveWheelVoltages) o; + return bitField0_ == other.bitField0_ + && (!hasLeft() || ProtoUtil.isEqual(left, other.left)) + && (!hasRight() || ProtoUtil.isEqual(right, other.right)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(right); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufDifferentialDriveWheelVoltages mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // left + left = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // right + right = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.left, left); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.right, right); + } + output.endObject(); + } + + @Override + public ProtobufDifferentialDriveWheelVoltages mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3317767: { + if (input.isAtField(FieldNames.left)) { + if (!input.trySkipNullValue()) { + left = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 108511772: { + if (input.isAtField(FieldNames.right)) { + if (!input.trySkipNullValue()) { + right = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufDifferentialDriveWheelVoltages clone() { + return new ProtobufDifferentialDriveWheelVoltages().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufDifferentialDriveWheelVoltages parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), data).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelVoltages parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), input).checkInitialized(); + } + + public static ProtobufDifferentialDriveWheelVoltages parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufDifferentialDriveWheelVoltages(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufDifferentialDriveWheelVoltages messages + */ + public static MessageFactory getFactory() { + return ProtobufDifferentialDriveWheelVoltagesFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufControllerDescriptor.wpi_proto_ProtobufDifferentialDriveWheelVoltages_descriptor; + } + + private enum ProtobufDifferentialDriveWheelVoltagesFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufDifferentialDriveWheelVoltages create() { + return ProtobufDifferentialDriveWheelVoltages.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName left = FieldName.forField("left"); + + static final FieldName right = FieldName.forField("right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufElevatorFeedforward.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufElevatorFeedforward.java new file mode 100644 index 0000000000..486aa1a6c3 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufElevatorFeedforward.java @@ -0,0 +1,590 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufElevatorFeedforward} + */ +@SuppressWarnings("hiding") +public final class ProtobufElevatorFeedforward extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double ks = 1; + */ + private double ks; + + /** + * optional double kg = 2; + */ + private double kg; + + /** + * optional double kv = 3; + */ + private double kv; + + /** + * optional double ka = 4; + */ + private double ka; + + /** + * optional double dt = 5; + */ + private double dt; + + private ProtobufElevatorFeedforward() { + } + + /** + * @return a new empty instance of {@code ProtobufElevatorFeedforward} + */ + public static ProtobufElevatorFeedforward newInstance() { + return new ProtobufElevatorFeedforward(); + } + + /** + * optional double ks = 1; + * @return whether the ks field is set + */ + public boolean hasKs() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double ks = 1; + * @return this + */ + public ProtobufElevatorFeedforward clearKs() { + bitField0_ &= ~0x00000001; + ks = 0D; + return this; + } + + /** + * optional double ks = 1; + * @return the ks + */ + public double getKs() { + return ks; + } + + /** + * optional double ks = 1; + * @param value the ks to set + * @return this + */ + public ProtobufElevatorFeedforward setKs(final double value) { + bitField0_ |= 0x00000001; + ks = value; + return this; + } + + /** + * optional double kg = 2; + * @return whether the kg field is set + */ + public boolean hasKg() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double kg = 2; + * @return this + */ + public ProtobufElevatorFeedforward clearKg() { + bitField0_ &= ~0x00000002; + kg = 0D; + return this; + } + + /** + * optional double kg = 2; + * @return the kg + */ + public double getKg() { + return kg; + } + + /** + * optional double kg = 2; + * @param value the kg to set + * @return this + */ + public ProtobufElevatorFeedforward setKg(final double value) { + bitField0_ |= 0x00000002; + kg = value; + return this; + } + + /** + * optional double kv = 3; + * @return whether the kv field is set + */ + public boolean hasKv() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double kv = 3; + * @return this + */ + public ProtobufElevatorFeedforward clearKv() { + bitField0_ &= ~0x00000004; + kv = 0D; + return this; + } + + /** + * optional double kv = 3; + * @return the kv + */ + public double getKv() { + return kv; + } + + /** + * optional double kv = 3; + * @param value the kv to set + * @return this + */ + public ProtobufElevatorFeedforward setKv(final double value) { + bitField0_ |= 0x00000004; + kv = value; + return this; + } + + /** + * optional double ka = 4; + * @return whether the ka field is set + */ + public boolean hasKa() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double ka = 4; + * @return this + */ + public ProtobufElevatorFeedforward clearKa() { + bitField0_ &= ~0x00000008; + ka = 0D; + return this; + } + + /** + * optional double ka = 4; + * @return the ka + */ + public double getKa() { + return ka; + } + + /** + * optional double ka = 4; + * @param value the ka to set + * @return this + */ + public ProtobufElevatorFeedforward setKa(final double value) { + bitField0_ |= 0x00000008; + ka = value; + return this; + } + + /** + * optional double dt = 5; + * @return whether the dt field is set + */ + public boolean hasDt() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional double dt = 5; + * @return this + */ + public ProtobufElevatorFeedforward clearDt() { + bitField0_ &= ~0x00000010; + dt = 0D; + return this; + } + + /** + * optional double dt = 5; + * @return the dt + */ + public double getDt() { + return dt; + } + + /** + * optional double dt = 5; + * @param value the dt to set + * @return this + */ + public ProtobufElevatorFeedforward setDt(final double value) { + bitField0_ |= 0x00000010; + dt = value; + return this; + } + + @Override + public ProtobufElevatorFeedforward copyFrom(final ProtobufElevatorFeedforward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + ks = other.ks; + kg = other.kg; + kv = other.kv; + ka = other.ka; + dt = other.dt; + } + return this; + } + + @Override + public ProtobufElevatorFeedforward mergeFrom(final ProtobufElevatorFeedforward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasKs()) { + setKs(other.ks); + } + if (other.hasKg()) { + setKg(other.kg); + } + if (other.hasKv()) { + setKv(other.kv); + } + if (other.hasKa()) { + setKa(other.ka); + } + if (other.hasDt()) { + setDt(other.dt); + } + return this; + } + + @Override + public ProtobufElevatorFeedforward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + ks = 0D; + kg = 0D; + kv = 0D; + ka = 0D; + dt = 0D; + return this; + } + + @Override + public ProtobufElevatorFeedforward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufElevatorFeedforward)) { + return false; + } + ProtobufElevatorFeedforward other = (ProtobufElevatorFeedforward) o; + return bitField0_ == other.bitField0_ + && (!hasKs() || ProtoUtil.isEqual(ks, other.ks)) + && (!hasKg() || ProtoUtil.isEqual(kg, other.kg)) + && (!hasKv() || ProtoUtil.isEqual(kv, other.kv)) + && (!hasKa() || ProtoUtil.isEqual(ka, other.ka)) + && (!hasDt() || ProtoUtil.isEqual(dt, other.dt)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(ks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(kg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(kv); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(ka); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 41); + output.writeDoubleNoTag(dt); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufElevatorFeedforward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // ks + ks = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // kg + kg = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // kv + kv = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // ka + ka = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 41) { + break; + } + } + case 41: { + // dt + dt = input.readDouble(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.ks, ks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.kg, kg); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.kv, kv); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.ka, ka); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeDouble(FieldNames.dt, dt); + } + output.endObject(); + } + + @Override + public ProtobufElevatorFeedforward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3432: { + if (input.isAtField(FieldNames.ks)) { + if (!input.trySkipNullValue()) { + ks = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3420: { + if (input.isAtField(FieldNames.kg)) { + if (!input.trySkipNullValue()) { + kg = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3435: { + if (input.isAtField(FieldNames.kv)) { + if (!input.trySkipNullValue()) { + kv = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3414: { + if (input.isAtField(FieldNames.ka)) { + if (!input.trySkipNullValue()) { + ka = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3216: { + if (input.isAtField(FieldNames.dt)) { + if (!input.trySkipNullValue()) { + dt = input.readDouble(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufElevatorFeedforward clone() { + return new ProtobufElevatorFeedforward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufElevatorFeedforward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), data).checkInitialized(); + } + + public static ProtobufElevatorFeedforward parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), input).checkInitialized(); + } + + public static ProtobufElevatorFeedforward parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufElevatorFeedforward(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufElevatorFeedforward messages + */ + public static MessageFactory getFactory() { + return ProtobufElevatorFeedforwardFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufControllerDescriptor.wpi_proto_ProtobufElevatorFeedforward_descriptor; + } + + private enum ProtobufElevatorFeedforwardFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufElevatorFeedforward create() { + return ProtobufElevatorFeedforward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName ks = FieldName.forField("ks"); + + static final FieldName kg = FieldName.forField("kg"); + + static final FieldName kv = FieldName.forField("kv"); + + static final FieldName ka = FieldName.forField("ka"); + + static final FieldName dt = FieldName.forField("dt"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufEllipse2d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufEllipse2d.java new file mode 100644 index 0000000000..04ac7ae01a --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufEllipse2d.java @@ -0,0 +1,451 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufEllipse2d} + */ +@SuppressWarnings("hiding") +public final class ProtobufEllipse2d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double xSemiAxis = 2; + */ + private double xSemiAxis; + + /** + * optional double ySemiAxis = 3; + */ + private double ySemiAxis; + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + */ + private final ProtobufPose2d center = ProtobufPose2d.newInstance(); + + private ProtobufEllipse2d() { + } + + /** + * @return a new empty instance of {@code ProtobufEllipse2d} + */ + public static ProtobufEllipse2d newInstance() { + return new ProtobufEllipse2d(); + } + + /** + * optional double xSemiAxis = 2; + * @return whether the xSemiAxis field is set + */ + public boolean hasXSemiAxis() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double xSemiAxis = 2; + * @return this + */ + public ProtobufEllipse2d clearXSemiAxis() { + bitField0_ &= ~0x00000001; + xSemiAxis = 0D; + return this; + } + + /** + * optional double xSemiAxis = 2; + * @return the xSemiAxis + */ + public double getXSemiAxis() { + return xSemiAxis; + } + + /** + * optional double xSemiAxis = 2; + * @param value the xSemiAxis to set + * @return this + */ + public ProtobufEllipse2d setXSemiAxis(final double value) { + bitField0_ |= 0x00000001; + xSemiAxis = value; + return this; + } + + /** + * optional double ySemiAxis = 3; + * @return whether the ySemiAxis field is set + */ + public boolean hasYSemiAxis() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double ySemiAxis = 3; + * @return this + */ + public ProtobufEllipse2d clearYSemiAxis() { + bitField0_ &= ~0x00000002; + ySemiAxis = 0D; + return this; + } + + /** + * optional double ySemiAxis = 3; + * @return the ySemiAxis + */ + public double getYSemiAxis() { + return ySemiAxis; + } + + /** + * optional double ySemiAxis = 3; + * @param value the ySemiAxis to set + * @return this + */ + public ProtobufEllipse2d setYSemiAxis(final double value) { + bitField0_ |= 0x00000002; + ySemiAxis = value; + return this; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * @return whether the center field is set + */ + public boolean hasCenter() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * @return this + */ + public ProtobufEllipse2d clearCenter() { + bitField0_ &= ~0x00000004; + center.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCenter()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufPose2d getCenter() { + return center; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufPose2d getMutableCenter() { + bitField0_ |= 0x00000004; + return center; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * @param value the center to set + * @return this + */ + public ProtobufEllipse2d setCenter(final ProtobufPose2d value) { + bitField0_ |= 0x00000004; + center.copyFrom(value); + return this; + } + + @Override + public ProtobufEllipse2d copyFrom(final ProtobufEllipse2d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + xSemiAxis = other.xSemiAxis; + ySemiAxis = other.ySemiAxis; + center.copyFrom(other.center); + } + return this; + } + + @Override + public ProtobufEllipse2d mergeFrom(final ProtobufEllipse2d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasXSemiAxis()) { + setXSemiAxis(other.xSemiAxis); + } + if (other.hasYSemiAxis()) { + setYSemiAxis(other.ySemiAxis); + } + if (other.hasCenter()) { + getMutableCenter().mergeFrom(other.center); + } + return this; + } + + @Override + public ProtobufEllipse2d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + xSemiAxis = 0D; + ySemiAxis = 0D; + center.clear(); + return this; + } + + @Override + public ProtobufEllipse2d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + center.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufEllipse2d)) { + return false; + } + ProtobufEllipse2d other = (ProtobufEllipse2d) o; + return bitField0_ == other.bitField0_ + && (!hasXSemiAxis() || ProtoUtil.isEqual(xSemiAxis, other.xSemiAxis)) + && (!hasYSemiAxis() || ProtoUtil.isEqual(ySemiAxis, other.ySemiAxis)) + && (!hasCenter() || center.equals(other.center)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(xSemiAxis); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(ySemiAxis); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(center); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(center); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufEllipse2d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 17: { + // xSemiAxis + xSemiAxis = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // ySemiAxis + ySemiAxis = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // center + input.readMessage(center); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.xSemiAxis, xSemiAxis); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.ySemiAxis, ySemiAxis); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.center, center); + } + output.endObject(); + } + + @Override + public ProtobufEllipse2d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -858640185: { + if (input.isAtField(FieldNames.xSemiAxis)) { + if (!input.trySkipNullValue()) { + xSemiAxis = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 1628872648: { + if (input.isAtField(FieldNames.ySemiAxis)) { + if (!input.trySkipNullValue()) { + ySemiAxis = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1364013995: { + if (input.isAtField(FieldNames.center)) { + if (!input.trySkipNullValue()) { + input.readMessage(center); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufEllipse2d clone() { + return new ProtobufEllipse2d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufEllipse2d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufEllipse2d(), data).checkInitialized(); + } + + public static ProtobufEllipse2d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufEllipse2d(), input).checkInitialized(); + } + + public static ProtobufEllipse2d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufEllipse2d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufEllipse2d messages + */ + public static MessageFactory getFactory() { + return ProtobufEllipse2dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry2dDescriptor.wpi_proto_ProtobufEllipse2d_descriptor; + } + + private enum ProtobufEllipse2dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufEllipse2d create() { + return ProtobufEllipse2d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName xSemiAxis = FieldName.forField("xSemiAxis"); + + static final FieldName ySemiAxis = FieldName.forField("ySemiAxis"); + + static final FieldName center = FieldName.forField("center"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufGeometry2dDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufGeometry2dDescriptor.java new file mode 100644 index 0000000000..42b0b31ba2 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufGeometry2dDescriptor.java @@ -0,0 +1,69 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufGeometry2dDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1960, + "ChBnZW9tZXRyeTJkLnByb3RvEgl3cGkucHJvdG8iMwoVUHJvdG9idWZUcmFuc2xhdGlvbjJkEgwKAXgY" + + "ASABKAFSAXgSDAoBeRgCIAEoAVIBeSIqChJQcm90b2J1ZlJvdGF0aW9uMmQSFAoFdmFsdWUYASABKAFS" + + "BXZhbHVlIo8BCg5Qcm90b2J1ZlBvc2UyZBJCCgt0cmFuc2xhdGlvbhgBIAEoCzIgLndwaS5wcm90by5Q" + + "cm90b2J1ZlRyYW5zbGF0aW9uMmRSC3RyYW5zbGF0aW9uEjkKCHJvdGF0aW9uGAIgASgLMh0ud3BpLnBy" + + "b3RvLlByb3RvYnVmUm90YXRpb24yZFIIcm90YXRpb24ilAEKE1Byb3RvYnVmVHJhbnNmb3JtMmQSQgoL" + + "dHJhbnNsYXRpb24YASABKAsyIC53cGkucHJvdG8uUHJvdG9idWZUcmFuc2xhdGlvbjJkUgt0cmFuc2xh" + + "dGlvbhI5Cghyb3RhdGlvbhgCIAEoCzIdLndwaS5wcm90by5Qcm90b2J1ZlJvdGF0aW9uMmRSCHJvdGF0" + + "aW9uIkkKD1Byb3RvYnVmVHdpc3QyZBIOCgJkeBgBIAEoAVICZHgSDgoCZHkYAiABKAFSAmR5EhYKBmR0" + + "aGV0YRgDIAEoAVIGZHRoZXRhIngKE1Byb3RvYnVmUmVjdGFuZ2xlMmQSMQoGY2VudGVyGAEgASgLMhku" + + "d3BpLnByb3RvLlByb3RvYnVmUG9zZTJkUgZjZW50ZXISFgoGeFdpZHRoGAIgASgBUgZ4V2lkdGgSFgoG" + + "eVdpZHRoGAMgASgBUgZ5V2lkdGgiggEKEVByb3RvYnVmRWxsaXBzZTJkEjEKBmNlbnRlchgBIAEoCzIZ" + + "LndwaS5wcm90by5Qcm90b2J1ZlBvc2UyZFIGY2VudGVyEhwKCXhTZW1pQXhpcxgCIAEoAVIJeFNlbWlB" + + "eGlzEhwKCXlTZW1pQXhpcxgDIAEoAVIJeVNlbWlBeGlzQjcKFW9yZy53cGlsaWIubWF0aC5wcm90b0Ic" + + "UHJvdG9idWZHZW9tZXRyeTJkRGVzY3JpcHRvclABSvMICgYSBAAALQEKCAoBDBIDAAASCggKAQISAwIA" + + "EgoICgEIEgMEAC4KCQoCCAESAwQALgoICgEIEgMGAD0KCQoCCAgSAwYAPQoICgEIEgMIACIKCQoCCAoS" + + "AwgAIgoKCgIEABIECgANAQoKCgMEAAESAwoIHQoLCgQEAAIAEgMLAg8KDAoFBAACAAUSAwsCCAoMCgUE" + + "AAIAARIDCwkKCgwKBQQAAgADEgMLDQ4KCwoEBAACARIDDAIPCgwKBQQAAgEFEgMMAggKDAoFBAACAQES" + + "AwwJCgoMCgUEAAIBAxIDDA0OCgoKAgQBEgQPABEBCgoKAwQBARIDDwgaCgsKBAQBAgASAxACEwoMCgUE" + + "AQIABRIDEAIICgwKBQQBAgABEgMQCQ4KDAoFBAECAAMSAxAREgoKCgIEAhIEEwAWAQoKCgMEAgESAxMI" + + "FgoLCgQEAgIAEgMUAigKDAoFBAICAAYSAxQCFwoMCgUEAgIAARIDFBgjCgwKBQQCAgADEgMUJicKCwoE", + "BAICARIDFQIiCgwKBQQCAgEGEgMVAhQKDAoFBAICAQESAxUVHQoMCgUEAgIBAxIDFSAhCgoKAgQDEgQY" + + "ABsBCgoKAwQDARIDGAgbCgsKBAQDAgASAxkCKAoMCgUEAwIABhIDGQIXCgwKBQQDAgABEgMZGCMKDAoF" + + "BAMCAAMSAxkmJwoLCgQEAwIBEgMaAiIKDAoFBAMCAQYSAxoCFAoMCgUEAwIBARIDGhUdCgwKBQQDAgED" + + "EgMaICEKCgoCBAQSBB0AIQEKCgoDBAQBEgMdCBcKCwoEBAQCABIDHgIQCgwKBQQEAgAFEgMeAggKDAoF" + + "BAQCAAESAx4JCwoMCgUEBAIAAxIDHg4PCgsKBAQEAgESAx8CEAoMCgUEBAIBBRIDHwIICgwKBQQEAgEB" + + "EgMfCQsKDAoFBAQCAQMSAx8ODwoLCgQEBAICEgMgAhQKDAoFBAQCAgUSAyACCAoMCgUEBAICARIDIAkP" + + "CgwKBQQEAgIDEgMgEhMKCgoCBAUSBCMAJwEKCgoDBAUBEgMjCBsKCwoEBAUCABIDJAIcCgwKBQQFAgAG" + + "EgMkAhAKDAoFBAUCAAESAyQRFwoMCgUEBQIAAxIDJBobCgsKBAQFAgESAyUCFAoMCgUEBQIBBRIDJQII" + + "CgwKBQQFAgEBEgMlCQ8KDAoFBAUCAQMSAyUSEwoLCgQEBQICEgMmAhQKDAoFBAUCAgUSAyYCCAoMCgUE" + + "BQICARIDJgkPCgwKBQQFAgIDEgMmEhMKCgoCBAYSBCkALQEKCgoDBAYBEgMpCBkKCwoEBAYCABIDKgIc" + + "CgwKBQQGAgAGEgMqAhAKDAoFBAYCAAESAyoRFwoMCgUEBgIAAxIDKhobCgsKBAQGAgESAysCFwoMCgUE" + + "BgIBBRIDKwIICgwKBQQGAgEBEgMrCRIKDAoFBAYCAQMSAysVFgoLCgQEBgICEgMsAhcKDAoFBAYCAgUS" + + "AywCCAoMCgUEBgICARIDLAkSCgwKBQQGAgIDEgMsFRZiBnByb3RvMw=="); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("geometry2d.proto", "wpi.proto", descriptorData); + + static final Descriptors.Descriptor wpi_proto_ProtobufTranslation2d_descriptor = descriptor.internalContainedType(31, 51, "ProtobufTranslation2d", "wpi.proto.ProtobufTranslation2d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufRotation2d_descriptor = descriptor.internalContainedType(84, 42, "ProtobufRotation2d", "wpi.proto.ProtobufRotation2d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufPose2d_descriptor = descriptor.internalContainedType(129, 143, "ProtobufPose2d", "wpi.proto.ProtobufPose2d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufTransform2d_descriptor = descriptor.internalContainedType(275, 148, "ProtobufTransform2d", "wpi.proto.ProtobufTransform2d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufTwist2d_descriptor = descriptor.internalContainedType(425, 73, "ProtobufTwist2d", "wpi.proto.ProtobufTwist2d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufRectangle2d_descriptor = descriptor.internalContainedType(500, 120, "ProtobufRectangle2d", "wpi.proto.ProtobufRectangle2d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufEllipse2d_descriptor = descriptor.internalContainedType(623, 130, "ProtobufEllipse2d", "wpi.proto.ProtobufEllipse2d"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufGeometry3dDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufGeometry3dDescriptor.java new file mode 100644 index 0000000000..e53f7c13dc --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufGeometry3dDescriptor.java @@ -0,0 +1,67 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufGeometry3dDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1946, + "ChBnZW9tZXRyeTNkLnByb3RvEgl3cGkucHJvdG8iQQoVUHJvdG9idWZUcmFuc2xhdGlvbjNkEgwKAXgY" + + "ASABKAFSAXgSDAoBeRgCIAEoAVIBeRIMCgF6GAMgASgBUgF6IkwKElByb3RvYnVmUXVhdGVybmlvbhIM" + + "CgF3GAEgASgBUgF3EgwKAXgYAiABKAFSAXgSDAoBeRgDIAEoAVIBeRIMCgF6GAQgASgBUgF6IkEKElBy" + + "b3RvYnVmUm90YXRpb24zZBIrCgFxGAEgASgLMh0ud3BpLnByb3RvLlByb3RvYnVmUXVhdGVybmlvblIB" + + "cSKPAQoOUHJvdG9idWZQb3NlM2QSQgoLdHJhbnNsYXRpb24YASABKAsyIC53cGkucHJvdG8uUHJvdG9i" + + "dWZUcmFuc2xhdGlvbjNkUgt0cmFuc2xhdGlvbhI5Cghyb3RhdGlvbhgCIAEoCzIdLndwaS5wcm90by5Q" + + "cm90b2J1ZlJvdGF0aW9uM2RSCHJvdGF0aW9uIpQBChNQcm90b2J1ZlRyYW5zZm9ybTNkEkIKC3RyYW5z" + + "bGF0aW9uGAEgASgLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24zZFILdHJhbnNsYXRpb24S" + + "OQoIcm90YXRpb24YAiABKAsyHS53cGkucHJvdG8uUHJvdG9idWZSb3RhdGlvbjNkUghyb3RhdGlvbiJx" + + "Cg9Qcm90b2J1ZlR3aXN0M2QSDgoCZHgYASABKAFSAmR4Eg4KAmR5GAIgASgBUgJkeRIOCgJkehgDIAEo" + + "AVICZHoSDgoCcngYBCABKAFSAnJ4Eg4KAnJ5GAUgASgBUgJyeRIOCgJyehgGIAEoAVICcnpCNwoVb3Jn" + + "LndwaWxpYi5tYXRoLnByb3RvQhxQcm90b2J1Zkdlb21ldHJ5M2REZXNjcmlwdG9yUAFKyQkKBhIEAAAs" + + "AQoICgEMEgMAABIKCAoBAhIDAgASCggKAQgSAwQALgoJCgIIARIDBAAuCggKAQgSAwYAPQoJCgIICBID" + + "BgA9CggKAQgSAwgAIgoJCgIIChIDCAAiCgoKAgQAEgQKAA4BCgoKAwQAARIDCggdCgsKBAQAAgASAwsC" + + "DwoMCgUEAAIABRIDCwIICgwKBQQAAgABEgMLCQoKDAoFBAACAAMSAwsNDgoLCgQEAAIBEgMMAg8KDAoF" + + "BAACAQUSAwwCCAoMCgUEAAIBARIDDAkKCgwKBQQAAgEDEgMMDQ4KCwoEBAACAhIDDQIPCgwKBQQAAgIF" + + "EgMNAggKDAoFBAACAgESAw0JCgoMCgUEAAICAxIDDQ0OCgoKAgQBEgQQABUBCgoKAwQBARIDEAgaCgsK" + + "BAQBAgASAxECDwoMCgUEAQIABRIDEQIICgwKBQQBAgABEgMRCQoKDAoFBAECAAMSAxENDgoLCgQEAQIB" + + "EgMSAg8KDAoFBAECAQUSAxICCAoMCgUEAQIBARIDEgkKCgwKBQQBAgEDEgMSDQ4KCwoEBAECAhIDEwIP" + + "CgwKBQQBAgIFEgMTAggKDAoFBAECAgESAxMJCgoMCgUEAQICAxIDEw0OCgsKBAQBAgMSAxQCDwoMCgUE", + "AQIDBRIDFAIICgwKBQQBAgMBEgMUCQoKDAoFBAECAwMSAxQNDgoKCgIEAhIEFwAZAQoKCgMEAgESAxcI" + + "GgoLCgQEAgIAEgMYAhsKDAoFBAICAAYSAxgCFAoMCgUEAgIAARIDGBUWCgwKBQQCAgADEgMYGRoKCgoC" + + "BAMSBBsAHgEKCgoDBAMBEgMbCBYKCwoEBAMCABIDHAIoCgwKBQQDAgAGEgMcAhcKDAoFBAMCAAESAxwY" + + "IwoMCgUEAwIAAxIDHCYnCgsKBAQDAgESAx0CIgoMCgUEAwIBBhIDHQIUCgwKBQQDAgEBEgMdFR0KDAoF" + + "BAMCAQMSAx0gIQoKCgIEBBIEIAAjAQoKCgMEBAESAyAIGwoLCgQEBAIAEgMhAigKDAoFBAQCAAYSAyEC" + + "FwoMCgUEBAIAARIDIRgjCgwKBQQEAgADEgMhJicKCwoEBAQCARIDIgIiCgwKBQQEAgEGEgMiAhQKDAoF" + + "BAQCAQESAyIVHQoMCgUEBAIBAxIDIiAhCgoKAgQFEgQlACwBCgoKAwQFARIDJQgXCgsKBAQFAgASAyYC" + + "EAoMCgUEBQIABRIDJgIICgwKBQQFAgABEgMmCQsKDAoFBAUCAAMSAyYODwoLCgQEBQIBEgMnAhAKDAoF" + + "BAUCAQUSAycCCAoMCgUEBQIBARIDJwkLCgwKBQQFAgEDEgMnDg8KCwoEBAUCAhIDKAIQCgwKBQQFAgIF" + + "EgMoAggKDAoFBAUCAgESAygJCwoMCgUEBQICAxIDKA4PCgsKBAQFAgMSAykCEAoMCgUEBQIDBRIDKQII" + + "CgwKBQQFAgMBEgMpCQsKDAoFBAUCAwMSAykODwoLCgQEBQIEEgMqAhAKDAoFBAUCBAUSAyoCCAoMCgUE" + + "BQIEARIDKgkLCgwKBQQFAgQDEgMqDg8KCwoEBAUCBRIDKwIQCgwKBQQFAgUFEgMrAggKDAoFBAUCBQES" + + "AysJCwoMCgUEBQIFAxIDKw4PYgZwcm90bzM="); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("geometry3d.proto", "wpi.proto", descriptorData); + + static final Descriptors.Descriptor wpi_proto_ProtobufTranslation3d_descriptor = descriptor.internalContainedType(31, 65, "ProtobufTranslation3d", "wpi.proto.ProtobufTranslation3d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufQuaternion_descriptor = descriptor.internalContainedType(98, 76, "ProtobufQuaternion", "wpi.proto.ProtobufQuaternion"); + + static final Descriptors.Descriptor wpi_proto_ProtobufRotation3d_descriptor = descriptor.internalContainedType(176, 65, "ProtobufRotation3d", "wpi.proto.ProtobufRotation3d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufPose3d_descriptor = descriptor.internalContainedType(244, 143, "ProtobufPose3d", "wpi.proto.ProtobufPose3d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufTransform3d_descriptor = descriptor.internalContainedType(390, 148, "ProtobufTransform3d", "wpi.proto.ProtobufTransform3d"); + + static final Descriptors.Descriptor wpi_proto_ProtobufTwist3d_descriptor = descriptor.internalContainedType(540, 113, "ProtobufTwist3d", "wpi.proto.ProtobufTwist3d"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufKinematicsDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufKinematicsDescriptor.java new file mode 100644 index 0000000000..4e9425071c --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufKinematicsDescriptor.java @@ -0,0 +1,121 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufKinematicsDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(4259, + "ChBraW5lbWF0aWNzLnByb3RvEgl3cGkucHJvdG8aEGdlb21ldHJ5MmQucHJvdG8iTQoVUHJvdG9idWZD" + + "aGFzc2lzU3BlZWRzEg4KAnZ4GAEgASgBUgJ2eBIOCgJ2eRgCIAEoAVICdnkSFAoFb21lZ2EYAyABKAFS" + + "BW9tZWdhIlQKHFByb3RvYnVmQ2hhc3Npc0FjY2VsZXJhdGlvbnMSDgoCYXgYASABKAFSAmF4Eg4KAmF5" + + "GAIgASgBUgJheRIUCgVhbHBoYRgDIAEoAVIFYWxwaGEiRQojUHJvdG9idWZEaWZmZXJlbnRpYWxEcml2" + + "ZUtpbmVtYXRpY3MSHgoKdHJhY2t3aWR0aBgBIAEoAVIKdHJhY2t3aWR0aCJQCiRQcm90b2J1ZkRpZmZl" + + "cmVudGlhbERyaXZlV2hlZWxTcGVlZHMSEgoEbGVmdBgBIAEoAVIEbGVmdBIUCgVyaWdodBgCIAEoAVIF" + + "cmlnaHQiVworUHJvdG9idWZEaWZmZXJlbnRpYWxEcml2ZVdoZWVsQWNjZWxlcmF0aW9ucxISCgRsZWZ0" + + "GAEgASgBUgRsZWZ0EhQKBXJpZ2h0GAIgASgBUgVyaWdodCJTCidQcm90b2J1ZkRpZmZlcmVudGlhbERy" + + "aXZlV2hlZWxQb3NpdGlvbnMSEgoEbGVmdBgBIAEoAVIEbGVmdBIUCgVyaWdodBgCIAEoAVIFcmlnaHQi" + + "pAIKHlByb3RvYnVmTWVjYW51bURyaXZlS2luZW1hdGljcxI/Cgpmcm9udF9sZWZ0GAEgASgLMiAud3Bp" + + "LnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIJZnJvbnRMZWZ0EkEKC2Zyb250X3JpZ2h0GAIgASgL" + + "MiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIKZnJvbnRSaWdodBI9CglyZWFyX2xlZnQY" + + "AyABKAsyIC53cGkucHJvdG8uUHJvdG9idWZUcmFuc2xhdGlvbjJkUghyZWFyTGVmdBI/CgpyZWFyX3Jp" + + "Z2h0GAQgASgLMiAud3BpLnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIJcmVhclJpZ2h0IqABCiJQ" + + "cm90b2J1Zk1lY2FudW1Ecml2ZVdoZWVsUG9zaXRpb25zEh0KCmZyb250X2xlZnQYASABKAFSCWZyb250" + + "TGVmdBIfCgtmcm9udF9yaWdodBgCIAEoAVIKZnJvbnRSaWdodBIbCglyZWFyX2xlZnQYAyABKAFSCHJl" + + "YXJMZWZ0Eh0KCnJlYXJfcmlnaHQYBCABKAFSCXJlYXJSaWdodCKdAQofUHJvdG9idWZNZWNhbnVtRHJp" + + "dmVXaGVlbFNwZWVkcxIdCgpmcm9udF9sZWZ0GAEgASgBUglmcm9udExlZnQSHwoLZnJvbnRfcmlnaHQY" + + "AiABKAFSCmZyb250UmlnaHQSGwoJcmVhcl9sZWZ0GAMgASgBUghyZWFyTGVmdBIdCgpyZWFyX3JpZ2h0" + + "GAQgASgBUglyZWFyUmlnaHQipAEKJlByb3RvYnVmTWVjYW51bURyaXZlV2hlZWxBY2NlbGVyYXRpb25z", + "Eh0KCmZyb250X2xlZnQYASABKAFSCWZyb250TGVmdBIfCgtmcm9udF9yaWdodBgCIAEoAVIKZnJvbnRS" + + "aWdodBIbCglyZWFyX2xlZnQYAyABKAFSCHJlYXJMZWZ0Eh0KCnJlYXJfcmlnaHQYBCABKAFSCXJlYXJS" + + "aWdodCJbCh1Qcm90b2J1ZlN3ZXJ2ZURyaXZlS2luZW1hdGljcxI6Cgdtb2R1bGVzGAEgAygLMiAud3Bp" + + "LnByb3RvLlByb3RvYnVmVHJhbnNsYXRpb24yZFIHbW9kdWxlcyJvChxQcm90b2J1ZlN3ZXJ2ZU1vZHVs" + + "ZVBvc2l0aW9uEhoKCGRpc3RhbmNlGAEgASgBUghkaXN0YW5jZRIzCgVhbmdsZRgCIAEoCzIdLndwaS5w" + + "cm90by5Qcm90b2J1ZlJvdGF0aW9uMmRSBWFuZ2xlImYKGVByb3RvYnVmU3dlcnZlTW9kdWxlU3RhdGUS" + + "FAoFc3BlZWQYASABKAFSBXNwZWVkEjMKBWFuZ2xlGAIgASgLMh0ud3BpLnByb3RvLlByb3RvYnVmUm90" + + "YXRpb24yZFIFYW5nbGUiewogUHJvdG9idWZTd2VydmVNb2R1bGVBY2NlbGVyYXRpb24SIgoMYWNjZWxl" + + "cmF0aW9uGAEgASgBUgxhY2NlbGVyYXRpb24SMwoFYW5nbGUYAiABKAsyHS53cGkucHJvdG8uUHJvdG9i" + + "dWZSb3RhdGlvbjJkUgVhbmdsZUI3ChVvcmcud3BpbGliLm1hdGgucHJvdG9CHFByb3RvYnVmS2luZW1h" + + "dGljc0Rlc2NyaXB0b3JQAUqAEwoGEgQAAFgBCggKAQwSAwAAEgoICgECEgMCABIKCQoCAwASAwQAGgoI" + + "CgEIEgMGAC4KCQoCCAESAwYALgoICgEIEgMIAD0KCQoCCAgSAwgAPQoICgEIEgMKACIKCQoCCAoSAwoA" + + "IgoKCgIEABIEDAAQAQoKCgMEAAESAwwIHQoLCgQEAAIAEgMNAhAKDAoFBAACAAUSAw0CCAoMCgUEAAIA" + + "ARIDDQkLCgwKBQQAAgADEgMNDg8KCwoEBAACARIDDgIQCgwKBQQAAgEFEgMOAggKDAoFBAACAQESAw4J" + + "CwoMCgUEAAIBAxIDDg4PCgsKBAQAAgISAw8CEwoMCgUEAAICBRIDDwIICgwKBQQAAgIBEgMPCQ4KDAoF" + + "BAACAgMSAw8REgoKCgIEARIEEgAWAQoKCgMEAQESAxIIJAoLCgQEAQIAEgMTAhAKDAoFBAECAAUSAxMC" + + "CAoMCgUEAQIAARIDEwkLCgwKBQQBAgADEgMTDg8KCwoEBAECARIDFAIQCgwKBQQBAgEFEgMUAggKDAoF" + + "BAECAQESAxQJCwoMCgUEAQIBAxIDFA4PCgsKBAQBAgISAxUCEwoMCgUEAQICBRIDFQIICgwKBQQBAgIB" + + "EgMVCQ4KDAoFBAECAgMSAxUREgoKCgIEAhIEGAAaAQoKCgMEAgESAxgIKwoLCgQEAgIAEgMZAhgKDAoF" + + "BAICAAUSAxkCCAoMCgUEAgIAARIDGQkTCgwKBQQCAgADEgMZFhcKCgoCBAMSBBwAHwEKCgoDBAMBEgMc", + "CCwKCwoEBAMCABIDHQISCgwKBQQDAgAFEgMdAggKDAoFBAMCAAESAx0JDQoMCgUEAwIAAxIDHRARCgsK" + + "BAQDAgESAx4CEwoMCgUEAwIBBRIDHgIICgwKBQQDAgEBEgMeCQ4KDAoFBAMCAQMSAx4REgoKCgIEBBIE" + + "IQAkAQoKCgMEBAESAyEIMwoLCgQEBAIAEgMiAhIKDAoFBAQCAAUSAyICCAoMCgUEBAIAARIDIgkNCgwK" + + "BQQEAgADEgMiEBEKCwoEBAQCARIDIwITCgwKBQQEAgEFEgMjAggKDAoFBAQCAQESAyMJDgoMCgUEBAIB" + + "AxIDIxESCgoKAgQFEgQmACkBCgoKAwQFARIDJggvCgsKBAQFAgASAycCEgoMCgUEBQIABRIDJwIICgwK" + + "BQQFAgABEgMnCQ0KDAoFBAUCAAMSAycQEQoLCgQEBQIBEgMoAhMKDAoFBAUCAQUSAygCCAoMCgUEBQIB" + + "ARIDKAkOCgwKBQQFAgEDEgMoERIKCgoCBAYSBCsAMAEKCgoDBAYBEgMrCCYKCwoEBAYCABIDLAInCgwK" + + "BQQGAgAGEgMsAhcKDAoFBAYCAAESAywYIgoMCgUEBgIAAxIDLCUmCgsKBAQGAgESAy0CKAoMCgUEBgIB" + + "BhIDLQIXCgwKBQQGAgEBEgMtGCMKDAoFBAYCAQMSAy0mJwoLCgQEBgICEgMuAiYKDAoFBAYCAgYSAy4C" + + "FwoMCgUEBgICARIDLhghCgwKBQQGAgIDEgMuJCUKCwoEBAYCAxIDLwInCgwKBQQGAgMGEgMvAhcKDAoF" + + "BAYCAwESAy8YIgoMCgUEBgIDAxIDLyUmCgoKAgQHEgQyADcBCgoKAwQHARIDMggqCgsKBAQHAgASAzMC" + + "GAoMCgUEBwIABRIDMwIICgwKBQQHAgABEgMzCRMKDAoFBAcCAAMSAzMWFwoLCgQEBwIBEgM0AhkKDAoF" + + "BAcCAQUSAzQCCAoMCgUEBwIBARIDNAkUCgwKBQQHAgEDEgM0FxgKCwoEBAcCAhIDNQIXCgwKBQQHAgIF" + + "EgM1AggKDAoFBAcCAgESAzUJEgoMCgUEBwICAxIDNRUWCgsKBAQHAgMSAzYCGAoMCgUEBwIDBRIDNgII" + + "CgwKBQQHAgMBEgM2CRMKDAoFBAcCAwMSAzYWFwoKCgIECBIEOQA+AQoKCgMECAESAzkIJwoLCgQECAIA" + + "EgM6AhgKDAoFBAgCAAUSAzoCCAoMCgUECAIAARIDOgkTCgwKBQQIAgADEgM6FhcKCwoEBAgCARIDOwIZ" + + "CgwKBQQIAgEFEgM7AggKDAoFBAgCAQESAzsJFAoMCgUECAIBAxIDOxcYCgsKBAQIAgISAzwCFwoMCgUE" + + "CAICBRIDPAIICgwKBQQIAgIBEgM8CRIKDAoFBAgCAgMSAzwVFgoLCgQECAIDEgM9AhgKDAoFBAgCAwUS" + + "Az0CCAoMCgUECAIDARIDPQkTCgwKBQQIAgMDEgM9FhcKCgoCBAkSBEAARQEKCgoDBAkBEgNACC4KCwoE" + + "BAkCABIDQQIYCgwKBQQJAgAFEgNBAggKDAoFBAkCAAESA0EJEwoMCgUECQIAAxIDQRYXCgsKBAQJAgES", + "A0ICGQoMCgUECQIBBRIDQgIICgwKBQQJAgEBEgNCCRQKDAoFBAkCAQMSA0IXGAoLCgQECQICEgNDAhcK" + + "DAoFBAkCAgUSA0MCCAoMCgUECQICARIDQwkSCgwKBQQJAgIDEgNDFRYKCwoEBAkCAxIDRAIYCgwKBQQJ" + + "AgMFEgNEAggKDAoFBAkCAwESA0QJEwoMCgUECQIDAxIDRBYXCgoKAgQKEgRHAEkBCgoKAwQKARIDRwgl" + + "CgsKBAQKAgASA0gCLQoMCgUECgIABBIDSAIKCgwKBQQKAgAGEgNICyAKDAoFBAoCAAESA0ghKAoMCgUE" + + "CgIAAxIDSCssCgoKAgQLEgRLAE4BCgoKAwQLARIDSwgkCgsKBAQLAgASA0wCFgoMCgUECwIABRIDTAII" + + "CgwKBQQLAgABEgNMCREKDAoFBAsCAAMSA0wUFQoLCgQECwIBEgNNAh8KDAoFBAsCAQYSA00CFAoMCgUE" + + "CwIBARIDTRUaCgwKBQQLAgEDEgNNHR4KCgoCBAwSBFAAUwEKCgoDBAwBEgNQCCEKCwoEBAwCABIDUQIT" + + "CgwKBQQMAgAFEgNRAggKDAoFBAwCAAESA1EJDgoMCgUEDAIAAxIDURESCgsKBAQMAgESA1ICHwoMCgUE" + + "DAIBBhIDUgIUCgwKBQQMAgEBEgNSFRoKDAoFBAwCAQMSA1IdHgoKCgIEDRIEVQBYAQoKCgMEDQESA1UI" + + "KAoLCgQEDQIAEgNWAhoKDAoFBA0CAAUSA1YCCAoMCgUEDQIAARIDVgkVCgwKBQQNAgADEgNWGBkKCwoE" + + "BA0CARIDVwIfCgwKBQQNAgEGEgNXAhQKDAoFBA0CAQESA1cVGgoMCgUEDQIBAxIDVx0eYgZwcm90bzM="); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("kinematics.proto", "wpi.proto", descriptorData, ProtobufGeometry2dDescriptor.getDescriptor()); + + static final Descriptors.Descriptor wpi_proto_ProtobufChassisSpeeds_descriptor = descriptor.internalContainedType(49, 77, "ProtobufChassisSpeeds", "wpi.proto.ProtobufChassisSpeeds"); + + static final Descriptors.Descriptor wpi_proto_ProtobufChassisAccelerations_descriptor = descriptor.internalContainedType(128, 84, "ProtobufChassisAccelerations", "wpi.proto.ProtobufChassisAccelerations"); + + static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveKinematics_descriptor = descriptor.internalContainedType(214, 69, "ProtobufDifferentialDriveKinematics", "wpi.proto.ProtobufDifferentialDriveKinematics"); + + static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelSpeeds_descriptor = descriptor.internalContainedType(285, 80, "ProtobufDifferentialDriveWheelSpeeds", "wpi.proto.ProtobufDifferentialDriveWheelSpeeds"); + + static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelAccelerations_descriptor = descriptor.internalContainedType(367, 87, "ProtobufDifferentialDriveWheelAccelerations", "wpi.proto.ProtobufDifferentialDriveWheelAccelerations"); + + static final Descriptors.Descriptor wpi_proto_ProtobufDifferentialDriveWheelPositions_descriptor = descriptor.internalContainedType(456, 83, "ProtobufDifferentialDriveWheelPositions", "wpi.proto.ProtobufDifferentialDriveWheelPositions"); + + static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveKinematics_descriptor = descriptor.internalContainedType(542, 292, "ProtobufMecanumDriveKinematics", "wpi.proto.ProtobufMecanumDriveKinematics"); + + static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor = descriptor.internalContainedType(837, 160, "ProtobufMecanumDriveWheelPositions", "wpi.proto.ProtobufMecanumDriveWheelPositions"); + + static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor = descriptor.internalContainedType(1000, 157, "ProtobufMecanumDriveWheelSpeeds", "wpi.proto.ProtobufMecanumDriveWheelSpeeds"); + + static final Descriptors.Descriptor wpi_proto_ProtobufMecanumDriveWheelAccelerations_descriptor = descriptor.internalContainedType(1160, 164, "ProtobufMecanumDriveWheelAccelerations", "wpi.proto.ProtobufMecanumDriveWheelAccelerations"); + + static final Descriptors.Descriptor wpi_proto_ProtobufSwerveDriveKinematics_descriptor = descriptor.internalContainedType(1326, 91, "ProtobufSwerveDriveKinematics", "wpi.proto.ProtobufSwerveDriveKinematics"); + + static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModulePosition_descriptor = descriptor.internalContainedType(1419, 111, "ProtobufSwerveModulePosition", "wpi.proto.ProtobufSwerveModulePosition"); + + static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModuleState_descriptor = descriptor.internalContainedType(1532, 102, "ProtobufSwerveModuleState", "wpi.proto.ProtobufSwerveModuleState"); + + static final Descriptors.Descriptor wpi_proto_ProtobufSwerveModuleAcceleration_descriptor = descriptor.internalContainedType(1636, 123, "ProtobufSwerveModuleAcceleration", "wpi.proto.ProtobufSwerveModuleAcceleration"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufLinearSystem.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufLinearSystem.java new file mode 100644 index 0000000000..40e52ca4cb --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufLinearSystem.java @@ -0,0 +1,836 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +/** + * Protobuf type {@code ProtobufLinearSystem} + */ +@SuppressWarnings("hiding") +public final class ProtobufLinearSystem extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 num_states = 1; + */ + private int numStates; + + /** + * optional uint32 num_inputs = 2; + */ + private int numInputs; + + /** + * optional uint32 num_outputs = 3; + */ + private int numOutputs; + + /** + * optional .wpi.proto.ProtobufMatrix a = 4; + */ + private final ProtobufMatrix a = ProtobufMatrix.newInstance(); + + /** + * optional .wpi.proto.ProtobufMatrix b = 5; + */ + private final ProtobufMatrix b = ProtobufMatrix.newInstance(); + + /** + * optional .wpi.proto.ProtobufMatrix c = 6; + */ + private final ProtobufMatrix c = ProtobufMatrix.newInstance(); + + /** + * optional .wpi.proto.ProtobufMatrix d = 7; + */ + private final ProtobufMatrix d = ProtobufMatrix.newInstance(); + + private ProtobufLinearSystem() { + } + + /** + * @return a new empty instance of {@code ProtobufLinearSystem} + */ + public static ProtobufLinearSystem newInstance() { + return new ProtobufLinearSystem(); + } + + /** + * optional uint32 num_states = 1; + * @return whether the numStates field is set + */ + public boolean hasNumStates() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 num_states = 1; + * @return this + */ + public ProtobufLinearSystem clearNumStates() { + bitField0_ &= ~0x00000001; + numStates = 0; + return this; + } + + /** + * optional uint32 num_states = 1; + * @return the numStates + */ + public int getNumStates() { + return numStates; + } + + /** + * optional uint32 num_states = 1; + * @param value the numStates to set + * @return this + */ + public ProtobufLinearSystem setNumStates(final int value) { + bitField0_ |= 0x00000001; + numStates = value; + return this; + } + + /** + * optional uint32 num_inputs = 2; + * @return whether the numInputs field is set + */ + public boolean hasNumInputs() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 num_inputs = 2; + * @return this + */ + public ProtobufLinearSystem clearNumInputs() { + bitField0_ &= ~0x00000002; + numInputs = 0; + return this; + } + + /** + * optional uint32 num_inputs = 2; + * @return the numInputs + */ + public int getNumInputs() { + return numInputs; + } + + /** + * optional uint32 num_inputs = 2; + * @param value the numInputs to set + * @return this + */ + public ProtobufLinearSystem setNumInputs(final int value) { + bitField0_ |= 0x00000002; + numInputs = value; + return this; + } + + /** + * optional uint32 num_outputs = 3; + * @return whether the numOutputs field is set + */ + public boolean hasNumOutputs() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional uint32 num_outputs = 3; + * @return this + */ + public ProtobufLinearSystem clearNumOutputs() { + bitField0_ &= ~0x00000004; + numOutputs = 0; + return this; + } + + /** + * optional uint32 num_outputs = 3; + * @return the numOutputs + */ + public int getNumOutputs() { + return numOutputs; + } + + /** + * optional uint32 num_outputs = 3; + * @param value the numOutputs to set + * @return this + */ + public ProtobufLinearSystem setNumOutputs(final int value) { + bitField0_ |= 0x00000004; + numOutputs = value; + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix a = 4; + * @return whether the a field is set + */ + public boolean hasA() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .wpi.proto.ProtobufMatrix a = 4; + * @return this + */ + public ProtobufLinearSystem clearA() { + bitField0_ &= ~0x00000008; + a.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix a = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableA()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufMatrix getA() { + return a; + } + + /** + * optional .wpi.proto.ProtobufMatrix a = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufMatrix getMutableA() { + bitField0_ |= 0x00000008; + return a; + } + + /** + * optional .wpi.proto.ProtobufMatrix a = 4; + * @param value the a to set + * @return this + */ + public ProtobufLinearSystem setA(final ProtobufMatrix value) { + bitField0_ |= 0x00000008; + a.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix b = 5; + * @return whether the b field is set + */ + public boolean hasB() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional .wpi.proto.ProtobufMatrix b = 5; + * @return this + */ + public ProtobufLinearSystem clearB() { + bitField0_ &= ~0x00000010; + b.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix b = 5; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableB()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufMatrix getB() { + return b; + } + + /** + * optional .wpi.proto.ProtobufMatrix b = 5; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufMatrix getMutableB() { + bitField0_ |= 0x00000010; + return b; + } + + /** + * optional .wpi.proto.ProtobufMatrix b = 5; + * @param value the b to set + * @return this + */ + public ProtobufLinearSystem setB(final ProtobufMatrix value) { + bitField0_ |= 0x00000010; + b.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix c = 6; + * @return whether the c field is set + */ + public boolean hasC() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional .wpi.proto.ProtobufMatrix c = 6; + * @return this + */ + public ProtobufLinearSystem clearC() { + bitField0_ &= ~0x00000020; + c.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix c = 6; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableC()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufMatrix getC() { + return c; + } + + /** + * optional .wpi.proto.ProtobufMatrix c = 6; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufMatrix getMutableC() { + bitField0_ |= 0x00000020; + return c; + } + + /** + * optional .wpi.proto.ProtobufMatrix c = 6; + * @param value the c to set + * @return this + */ + public ProtobufLinearSystem setC(final ProtobufMatrix value) { + bitField0_ |= 0x00000020; + c.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix d = 7; + * @return whether the d field is set + */ + public boolean hasD() { + return (bitField0_ & 0x00000040) != 0; + } + + /** + * optional .wpi.proto.ProtobufMatrix d = 7; + * @return this + */ + public ProtobufLinearSystem clearD() { + bitField0_ &= ~0x00000040; + d.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufMatrix d = 7; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableD()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufMatrix getD() { + return d; + } + + /** + * optional .wpi.proto.ProtobufMatrix d = 7; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufMatrix getMutableD() { + bitField0_ |= 0x00000040; + return d; + } + + /** + * optional .wpi.proto.ProtobufMatrix d = 7; + * @param value the d to set + * @return this + */ + public ProtobufLinearSystem setD(final ProtobufMatrix value) { + bitField0_ |= 0x00000040; + d.copyFrom(value); + return this; + } + + @Override + public ProtobufLinearSystem copyFrom(final ProtobufLinearSystem other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + numStates = other.numStates; + numInputs = other.numInputs; + numOutputs = other.numOutputs; + a.copyFrom(other.a); + b.copyFrom(other.b); + c.copyFrom(other.c); + d.copyFrom(other.d); + } + return this; + } + + @Override + public ProtobufLinearSystem mergeFrom(final ProtobufLinearSystem other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNumStates()) { + setNumStates(other.numStates); + } + if (other.hasNumInputs()) { + setNumInputs(other.numInputs); + } + if (other.hasNumOutputs()) { + setNumOutputs(other.numOutputs); + } + if (other.hasA()) { + getMutableA().mergeFrom(other.a); + } + if (other.hasB()) { + getMutableB().mergeFrom(other.b); + } + if (other.hasC()) { + getMutableC().mergeFrom(other.c); + } + if (other.hasD()) { + getMutableD().mergeFrom(other.d); + } + return this; + } + + @Override + public ProtobufLinearSystem clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + numStates = 0; + numInputs = 0; + numOutputs = 0; + a.clear(); + b.clear(); + c.clear(); + d.clear(); + return this; + } + + @Override + public ProtobufLinearSystem clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + a.clearQuick(); + b.clearQuick(); + c.clearQuick(); + d.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufLinearSystem)) { + return false; + } + ProtobufLinearSystem other = (ProtobufLinearSystem) o; + return bitField0_ == other.bitField0_ + && (!hasNumStates() || numStates == other.numStates) + && (!hasNumInputs() || numInputs == other.numInputs) + && (!hasNumOutputs() || numOutputs == other.numOutputs) + && (!hasA() || a.equals(other.a)) + && (!hasB() || b.equals(other.b)) + && (!hasC() || c.equals(other.c)) + && (!hasD() || d.equals(other.d)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(numStates); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(numInputs); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 24); + output.writeUInt32NoTag(numOutputs); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(a); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 42); + output.writeMessageNoTag(b); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 50); + output.writeMessageNoTag(c); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeRawByte((byte) 58); + output.writeMessageNoTag(d); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(numStates); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(numInputs); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(numOutputs); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(a); + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(b); + } + if ((bitField0_ & 0x00000020) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(c); + } + if ((bitField0_ & 0x00000040) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(d); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufLinearSystem mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // numStates + numStates = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // numInputs + numInputs = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 24) { + break; + } + } + case 24: { + // numOutputs + numOutputs = input.readUInt32(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // a + input.readMessage(a); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 42) { + break; + } + } + case 42: { + // b + input.readMessage(b); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 50) { + break; + } + } + case 50: { + // c + input.readMessage(c); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 58) { + break; + } + } + case 58: { + // d + input.readMessage(d); + bitField0_ |= 0x00000040; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.numStates, numStates); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.numInputs, numInputs); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeUInt32(FieldNames.numOutputs, numOutputs); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.a, a); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.b, b); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeMessage(FieldNames.c, c); + } + if ((bitField0_ & 0x00000040) != 0) { + output.writeMessage(FieldNames.d, d); + } + output.endObject(); + } + + @Override + public ProtobufLinearSystem mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1233856808: + case 1643330779: { + if (input.isAtField(FieldNames.numStates)) { + if (!input.trySkipNullValue()) { + numStates = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 942472463: + case 1351946434: { + if (input.isAtField(FieldNames.numInputs)) { + if (!input.trySkipNullValue()) { + numInputs = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 385880364: + case 194671577: { + if (input.isAtField(FieldNames.numOutputs)) { + if (!input.trySkipNullValue()) { + numOutputs = input.readUInt32(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 97: { + if (input.isAtField(FieldNames.a)) { + if (!input.trySkipNullValue()) { + input.readMessage(a); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 98: { + if (input.isAtField(FieldNames.b)) { + if (!input.trySkipNullValue()) { + input.readMessage(b); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 99: { + if (input.isAtField(FieldNames.c)) { + if (!input.trySkipNullValue()) { + input.readMessage(c); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + case 100: { + if (input.isAtField(FieldNames.d)) { + if (!input.trySkipNullValue()) { + input.readMessage(d); + bitField0_ |= 0x00000040; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufLinearSystem clone() { + return new ProtobufLinearSystem().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufLinearSystem parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufLinearSystem(), data).checkInitialized(); + } + + public static ProtobufLinearSystem parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufLinearSystem(), input).checkInitialized(); + } + + public static ProtobufLinearSystem parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufLinearSystem(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufLinearSystem messages + */ + public static MessageFactory getFactory() { + return ProtobufLinearSystemFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufSystemDescriptor.wpi_proto_ProtobufLinearSystem_descriptor; + } + + private enum ProtobufLinearSystemFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufLinearSystem create() { + return ProtobufLinearSystem.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName numStates = FieldName.forField("numStates", "num_states"); + + static final FieldName numInputs = FieldName.forField("numInputs", "num_inputs"); + + static final FieldName numOutputs = FieldName.forField("numOutputs", "num_outputs"); + + static final FieldName a = FieldName.forField("a"); + + static final FieldName b = FieldName.forField("b"); + + static final FieldName c = FieldName.forField("c"); + + static final FieldName d = FieldName.forField("d"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMatrix.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMatrix.java new file mode 100644 index 0000000000..c78966f642 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMatrix.java @@ -0,0 +1,471 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedDouble; + +/** + * Protobuf type {@code ProtobufMatrix} + */ +@SuppressWarnings("hiding") +public final class ProtobufMatrix extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional uint32 num_rows = 1; + */ + private int numRows; + + /** + * optional uint32 num_cols = 2; + */ + private int numCols; + + /** + * repeated double data = 3; + */ + private final RepeatedDouble data = RepeatedDouble.newEmptyInstance(); + + private ProtobufMatrix() { + } + + /** + * @return a new empty instance of {@code ProtobufMatrix} + */ + public static ProtobufMatrix newInstance() { + return new ProtobufMatrix(); + } + + /** + * optional uint32 num_rows = 1; + * @return whether the numRows field is set + */ + public boolean hasNumRows() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional uint32 num_rows = 1; + * @return this + */ + public ProtobufMatrix clearNumRows() { + bitField0_ &= ~0x00000001; + numRows = 0; + return this; + } + + /** + * optional uint32 num_rows = 1; + * @return the numRows + */ + public int getNumRows() { + return numRows; + } + + /** + * optional uint32 num_rows = 1; + * @param value the numRows to set + * @return this + */ + public ProtobufMatrix setNumRows(final int value) { + bitField0_ |= 0x00000001; + numRows = value; + return this; + } + + /** + * optional uint32 num_cols = 2; + * @return whether the numCols field is set + */ + public boolean hasNumCols() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional uint32 num_cols = 2; + * @return this + */ + public ProtobufMatrix clearNumCols() { + bitField0_ &= ~0x00000002; + numCols = 0; + return this; + } + + /** + * optional uint32 num_cols = 2; + * @return the numCols + */ + public int getNumCols() { + return numCols; + } + + /** + * optional uint32 num_cols = 2; + * @param value the numCols to set + * @return this + */ + public ProtobufMatrix setNumCols(final int value) { + bitField0_ |= 0x00000002; + numCols = value; + return this; + } + + /** + * repeated double data = 3; + * @return whether the data field is set + */ + public boolean hasData() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated double data = 3; + * @return this + */ + public ProtobufMatrix clearData() { + bitField0_ &= ~0x00000004; + data.clear(); + return this; + } + + /** + * repeated double data = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableData()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getData() { + return data; + } + + /** + * repeated double data = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableData() { + bitField0_ |= 0x00000004; + return data; + } + + /** + * repeated double data = 3; + * @param value the data to add + * @return this + */ + public ProtobufMatrix addData(final double value) { + bitField0_ |= 0x00000004; + data.add(value); + return this; + } + + /** + * repeated double data = 3; + * @param values the data to add + * @return this + */ + public ProtobufMatrix addAllData(final double... values) { + bitField0_ |= 0x00000004; + data.addAll(values); + return this; + } + + @Override + public ProtobufMatrix copyFrom(final ProtobufMatrix other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + numRows = other.numRows; + numCols = other.numCols; + data.copyFrom(other.data); + } + return this; + } + + @Override + public ProtobufMatrix mergeFrom(final ProtobufMatrix other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasNumRows()) { + setNumRows(other.numRows); + } + if (other.hasNumCols()) { + setNumCols(other.numCols); + } + if (other.hasData()) { + getMutableData().addAll(other.data); + } + return this; + } + + @Override + public ProtobufMatrix clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + numRows = 0; + numCols = 0; + data.clear(); + return this; + } + + @Override + public ProtobufMatrix clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + data.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufMatrix)) { + return false; + } + ProtobufMatrix other = (ProtobufMatrix) o; + return bitField0_ == other.bitField0_ + && (!hasNumRows() || numRows == other.numRows) + && (!hasNumCols() || numCols == other.numCols) + && (!hasData() || data.equals(other.data)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 8); + output.writeUInt32NoTag(numRows); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 16); + output.writeUInt32NoTag(numCols); + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < data.length(); i++) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(data.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(numRows); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeUInt32SizeNoTag(numCols); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 + 8) * data.length(); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufMatrix mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 8: { + // numRows + numRows = input.readUInt32(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 16) { + break; + } + } + case 16: { + // numCols + numCols = input.readUInt32(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // data [packed=true] + input.readPackedDouble(data); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 25: { + // data [packed=false] + tag = input.readRepeatedDouble(data, tag); + bitField0_ |= 0x00000004; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeUInt32(FieldNames.numRows, numRows); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeUInt32(FieldNames.numCols, numCols); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedDouble(FieldNames.data, data); + } + output.endObject(); + } + + @Override + public ProtobufMatrix mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -2000982401: + case -1888824590: { + if (input.isAtField(FieldNames.numRows)) { + if (!input.trySkipNullValue()) { + numRows = input.readUInt32(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -2001429607: + case -1889271796: { + if (input.isAtField(FieldNames.numCols)) { + if (!input.trySkipNullValue()) { + numCols = input.readUInt32(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3076010: { + if (input.isAtField(FieldNames.data)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(data); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufMatrix clone() { + return new ProtobufMatrix().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufMatrix parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufMatrix(), data).checkInitialized(); + } + + public static ProtobufMatrix parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufMatrix(), input).checkInitialized(); + } + + public static ProtobufMatrix parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufMatrix(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufMatrix messages + */ + public static MessageFactory getFactory() { + return ProtobufMatrixFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufWPIMathDescriptor.wpi_proto_ProtobufMatrix_descriptor; + } + + private enum ProtobufMatrixFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufMatrix create() { + return ProtobufMatrix.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName numRows = FieldName.forField("numRows", "num_rows"); + + static final FieldName numCols = FieldName.forField("numCols", "num_cols"); + + static final FieldName data = FieldName.forField("data"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveKinematics.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveKinematics.java new file mode 100644 index 0000000000..eb1c680ab9 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveKinematics.java @@ -0,0 +1,599 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +/** + * Protobuf type {@code ProtobufMecanumDriveKinematics} + */ +@SuppressWarnings("hiding") +public final class ProtobufMecanumDriveKinematics extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .wpi.proto.ProtobufTranslation2d front_left = 1; + */ + private final ProtobufTranslation2d frontLeft = ProtobufTranslation2d.newInstance(); + + /** + * optional .wpi.proto.ProtobufTranslation2d front_right = 2; + */ + private final ProtobufTranslation2d frontRight = ProtobufTranslation2d.newInstance(); + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; + */ + private final ProtobufTranslation2d rearLeft = ProtobufTranslation2d.newInstance(); + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; + */ + private final ProtobufTranslation2d rearRight = ProtobufTranslation2d.newInstance(); + + private ProtobufMecanumDriveKinematics() { + } + + /** + * @return a new empty instance of {@code ProtobufMecanumDriveKinematics} + */ + public static ProtobufMecanumDriveKinematics newInstance() { + return new ProtobufMecanumDriveKinematics(); + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_left = 1; + * @return whether the frontLeft field is set + */ + public boolean hasFrontLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_left = 1; + * @return this + */ + public ProtobufMecanumDriveKinematics clearFrontLeft() { + bitField0_ &= ~0x00000001; + frontLeft.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_left = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFrontLeft()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation2d getFrontLeft() { + return frontLeft; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_left = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation2d getMutableFrontLeft() { + bitField0_ |= 0x00000001; + return frontLeft; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_left = 1; + * @param value the frontLeft to set + * @return this + */ + public ProtobufMecanumDriveKinematics setFrontLeft(final ProtobufTranslation2d value) { + bitField0_ |= 0x00000001; + frontLeft.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_right = 2; + * @return whether the frontRight field is set + */ + public boolean hasFrontRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_right = 2; + * @return this + */ + public ProtobufMecanumDriveKinematics clearFrontRight() { + bitField0_ &= ~0x00000002; + frontRight.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_right = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableFrontRight()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation2d getFrontRight() { + return frontRight; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_right = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation2d getMutableFrontRight() { + bitField0_ |= 0x00000002; + return frontRight; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d front_right = 2; + * @param value the frontRight to set + * @return this + */ + public ProtobufMecanumDriveKinematics setFrontRight(final ProtobufTranslation2d value) { + bitField0_ |= 0x00000002; + frontRight.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; + * @return whether the rearLeft field is set + */ + public boolean hasRearLeft() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; + * @return this + */ + public ProtobufMecanumDriveKinematics clearRearLeft() { + bitField0_ &= ~0x00000004; + rearLeft.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRearLeft()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation2d getRearLeft() { + return rearLeft; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation2d getMutableRearLeft() { + bitField0_ |= 0x00000004; + return rearLeft; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_left = 3; + * @param value the rearLeft to set + * @return this + */ + public ProtobufMecanumDriveKinematics setRearLeft(final ProtobufTranslation2d value) { + bitField0_ |= 0x00000004; + rearLeft.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; + * @return whether the rearRight field is set + */ + public boolean hasRearRight() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; + * @return this + */ + public ProtobufMecanumDriveKinematics clearRearRight() { + bitField0_ &= ~0x00000008; + rearRight.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRearRight()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation2d getRearRight() { + return rearRight; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation2d getMutableRearRight() { + bitField0_ |= 0x00000008; + return rearRight; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d rear_right = 4; + * @param value the rearRight to set + * @return this + */ + public ProtobufMecanumDriveKinematics setRearRight(final ProtobufTranslation2d value) { + bitField0_ |= 0x00000008; + rearRight.copyFrom(value); + return this; + } + + @Override + public ProtobufMecanumDriveKinematics copyFrom(final ProtobufMecanumDriveKinematics other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + frontLeft.copyFrom(other.frontLeft); + frontRight.copyFrom(other.frontRight); + rearLeft.copyFrom(other.rearLeft); + rearRight.copyFrom(other.rearRight); + } + return this; + } + + @Override + public ProtobufMecanumDriveKinematics mergeFrom(final ProtobufMecanumDriveKinematics other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFrontLeft()) { + getMutableFrontLeft().mergeFrom(other.frontLeft); + } + if (other.hasFrontRight()) { + getMutableFrontRight().mergeFrom(other.frontRight); + } + if (other.hasRearLeft()) { + getMutableRearLeft().mergeFrom(other.rearLeft); + } + if (other.hasRearRight()) { + getMutableRearRight().mergeFrom(other.rearRight); + } + return this; + } + + @Override + public ProtobufMecanumDriveKinematics clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + frontLeft.clear(); + frontRight.clear(); + rearLeft.clear(); + rearRight.clear(); + return this; + } + + @Override + public ProtobufMecanumDriveKinematics clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + frontLeft.clearQuick(); + frontRight.clearQuick(); + rearLeft.clearQuick(); + rearRight.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufMecanumDriveKinematics)) { + return false; + } + ProtobufMecanumDriveKinematics other = (ProtobufMecanumDriveKinematics) o; + return bitField0_ == other.bitField0_ + && (!hasFrontLeft() || frontLeft.equals(other.frontLeft)) + && (!hasFrontRight() || frontRight.equals(other.frontRight)) + && (!hasRearLeft() || rearLeft.equals(other.rearLeft)) + && (!hasRearRight() || rearRight.equals(other.rearRight)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 26); + output.writeMessageNoTag(rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(rearRight); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(rearRight); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufMecanumDriveKinematics mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // frontLeft + input.readMessage(frontLeft); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // frontRight + input.readMessage(frontRight); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // rearLeft + input.readMessage(rearLeft); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // rearRight + input.readMessage(rearRight); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.frontLeft, frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.frontRight, frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.rearLeft, rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeMessage(FieldNames.rearRight, rearRight); + } + output.endObject(); + } + + @Override + public ProtobufMecanumDriveKinematics mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 127514064: + case -324277155: { + if (input.isAtField(FieldNames.frontLeft)) { + if (!input.trySkipNullValue()) { + input.readMessage(frontLeft); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -336370317: + case -1456996218: { + if (input.isAtField(FieldNames.frontRight)) { + if (!input.trySkipNullValue()) { + input.readMessage(frontRight); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -854852661: + case -712874558: { + if (input.isAtField(FieldNames.rearLeft)) { + if (!input.trySkipNullValue()) { + input.readMessage(rearLeft); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -724967720: + case -618613823: { + if (input.isAtField(FieldNames.rearRight)) { + if (!input.trySkipNullValue()) { + input.readMessage(rearRight); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufMecanumDriveKinematics clone() { + return new ProtobufMecanumDriveKinematics().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufMecanumDriveKinematics parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), data).checkInitialized(); + } + + public static ProtobufMecanumDriveKinematics parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), input).checkInitialized(); + } + + public static ProtobufMecanumDriveKinematics parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveKinematics(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufMecanumDriveKinematics messages + */ + public static MessageFactory getFactory() { + return ProtobufMecanumDriveKinematicsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufMecanumDriveKinematics_descriptor; + } + + private enum ProtobufMecanumDriveKinematicsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufMecanumDriveKinematics create() { + return ProtobufMecanumDriveKinematics.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); + + static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); + + static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); + + static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelAccelerations.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelAccelerations.java new file mode 100644 index 0000000000..f4ddeff696 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelAccelerations.java @@ -0,0 +1,520 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufMecanumDriveWheelAccelerations} + */ +@SuppressWarnings("hiding") +public final class ProtobufMecanumDriveWheelAccelerations extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double front_left = 1; + */ + private double frontLeft; + + /** + * optional double front_right = 2; + */ + private double frontRight; + + /** + * optional double rear_left = 3; + */ + private double rearLeft; + + /** + * optional double rear_right = 4; + */ + private double rearRight; + + private ProtobufMecanumDriveWheelAccelerations() { + } + + /** + * @return a new empty instance of {@code ProtobufMecanumDriveWheelAccelerations} + */ + public static ProtobufMecanumDriveWheelAccelerations newInstance() { + return new ProtobufMecanumDriveWheelAccelerations(); + } + + /** + * optional double front_left = 1; + * @return whether the frontLeft field is set + */ + public boolean hasFrontLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double front_left = 1; + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations clearFrontLeft() { + bitField0_ &= ~0x00000001; + frontLeft = 0D; + return this; + } + + /** + * optional double front_left = 1; + * @return the frontLeft + */ + public double getFrontLeft() { + return frontLeft; + } + + /** + * optional double front_left = 1; + * @param value the frontLeft to set + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations setFrontLeft(final double value) { + bitField0_ |= 0x00000001; + frontLeft = value; + return this; + } + + /** + * optional double front_right = 2; + * @return whether the frontRight field is set + */ + public boolean hasFrontRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double front_right = 2; + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations clearFrontRight() { + bitField0_ &= ~0x00000002; + frontRight = 0D; + return this; + } + + /** + * optional double front_right = 2; + * @return the frontRight + */ + public double getFrontRight() { + return frontRight; + } + + /** + * optional double front_right = 2; + * @param value the frontRight to set + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations setFrontRight(final double value) { + bitField0_ |= 0x00000002; + frontRight = value; + return this; + } + + /** + * optional double rear_left = 3; + * @return whether the rearLeft field is set + */ + public boolean hasRearLeft() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double rear_left = 3; + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations clearRearLeft() { + bitField0_ &= ~0x00000004; + rearLeft = 0D; + return this; + } + + /** + * optional double rear_left = 3; + * @return the rearLeft + */ + public double getRearLeft() { + return rearLeft; + } + + /** + * optional double rear_left = 3; + * @param value the rearLeft to set + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations setRearLeft(final double value) { + bitField0_ |= 0x00000004; + rearLeft = value; + return this; + } + + /** + * optional double rear_right = 4; + * @return whether the rearRight field is set + */ + public boolean hasRearRight() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double rear_right = 4; + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations clearRearRight() { + bitField0_ &= ~0x00000008; + rearRight = 0D; + return this; + } + + /** + * optional double rear_right = 4; + * @return the rearRight + */ + public double getRearRight() { + return rearRight; + } + + /** + * optional double rear_right = 4; + * @param value the rearRight to set + * @return this + */ + public ProtobufMecanumDriveWheelAccelerations setRearRight(final double value) { + bitField0_ |= 0x00000008; + rearRight = value; + return this; + } + + @Override + public ProtobufMecanumDriveWheelAccelerations copyFrom( + final ProtobufMecanumDriveWheelAccelerations other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + frontLeft = other.frontLeft; + frontRight = other.frontRight; + rearLeft = other.rearLeft; + rearRight = other.rearRight; + } + return this; + } + + @Override + public ProtobufMecanumDriveWheelAccelerations mergeFrom( + final ProtobufMecanumDriveWheelAccelerations other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFrontLeft()) { + setFrontLeft(other.frontLeft); + } + if (other.hasFrontRight()) { + setFrontRight(other.frontRight); + } + if (other.hasRearLeft()) { + setRearLeft(other.rearLeft); + } + if (other.hasRearRight()) { + setRearRight(other.rearRight); + } + return this; + } + + @Override + public ProtobufMecanumDriveWheelAccelerations clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + frontLeft = 0D; + frontRight = 0D; + rearLeft = 0D; + rearRight = 0D; + return this; + } + + @Override + public ProtobufMecanumDriveWheelAccelerations clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufMecanumDriveWheelAccelerations)) { + return false; + } + ProtobufMecanumDriveWheelAccelerations other = (ProtobufMecanumDriveWheelAccelerations) o; + return bitField0_ == other.bitField0_ + && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft)) + && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight)) + && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft)) + && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(rearRight); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufMecanumDriveWheelAccelerations mergeFrom(final ProtoSource input) throws + IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // frontLeft + frontLeft = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // frontRight + frontRight = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // rearLeft + rearLeft = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // rearRight + rearRight = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.frontLeft, frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.frontRight, frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.rearLeft, rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.rearRight, rearRight); + } + output.endObject(); + } + + @Override + public ProtobufMecanumDriveWheelAccelerations mergeFrom(final JsonSource input) throws + IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 127514064: + case -324277155: { + if (input.isAtField(FieldNames.frontLeft)) { + if (!input.trySkipNullValue()) { + frontLeft = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -336370317: + case -1456996218: { + if (input.isAtField(FieldNames.frontRight)) { + if (!input.trySkipNullValue()) { + frontRight = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -854852661: + case -712874558: { + if (input.isAtField(FieldNames.rearLeft)) { + if (!input.trySkipNullValue()) { + rearLeft = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -724967720: + case -618613823: { + if (input.isAtField(FieldNames.rearRight)) { + if (!input.trySkipNullValue()) { + rearRight = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufMecanumDriveWheelAccelerations clone() { + return new ProtobufMecanumDriveWheelAccelerations().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufMecanumDriveWheelAccelerations parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelAccelerations(), data).checkInitialized(); + } + + public static ProtobufMecanumDriveWheelAccelerations parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelAccelerations(), input).checkInitialized(); + } + + public static ProtobufMecanumDriveWheelAccelerations parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelAccelerations(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufMecanumDriveWheelAccelerations messages + */ + public static MessageFactory getFactory() { + return ProtobufMecanumDriveWheelAccelerationsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufMecanumDriveWheelAccelerations_descriptor; + } + + private enum ProtobufMecanumDriveWheelAccelerationsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufMecanumDriveWheelAccelerations create() { + return ProtobufMecanumDriveWheelAccelerations.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); + + static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); + + static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); + + static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelPositions.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelPositions.java new file mode 100644 index 0000000000..a335f2eff4 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelPositions.java @@ -0,0 +1,518 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufMecanumDriveWheelPositions} + */ +@SuppressWarnings("hiding") +public final class ProtobufMecanumDriveWheelPositions extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double front_left = 1; + */ + private double frontLeft; + + /** + * optional double front_right = 2; + */ + private double frontRight; + + /** + * optional double rear_left = 3; + */ + private double rearLeft; + + /** + * optional double rear_right = 4; + */ + private double rearRight; + + private ProtobufMecanumDriveWheelPositions() { + } + + /** + * @return a new empty instance of {@code ProtobufMecanumDriveWheelPositions} + */ + public static ProtobufMecanumDriveWheelPositions newInstance() { + return new ProtobufMecanumDriveWheelPositions(); + } + + /** + * optional double front_left = 1; + * @return whether the frontLeft field is set + */ + public boolean hasFrontLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double front_left = 1; + * @return this + */ + public ProtobufMecanumDriveWheelPositions clearFrontLeft() { + bitField0_ &= ~0x00000001; + frontLeft = 0D; + return this; + } + + /** + * optional double front_left = 1; + * @return the frontLeft + */ + public double getFrontLeft() { + return frontLeft; + } + + /** + * optional double front_left = 1; + * @param value the frontLeft to set + * @return this + */ + public ProtobufMecanumDriveWheelPositions setFrontLeft(final double value) { + bitField0_ |= 0x00000001; + frontLeft = value; + return this; + } + + /** + * optional double front_right = 2; + * @return whether the frontRight field is set + */ + public boolean hasFrontRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double front_right = 2; + * @return this + */ + public ProtobufMecanumDriveWheelPositions clearFrontRight() { + bitField0_ &= ~0x00000002; + frontRight = 0D; + return this; + } + + /** + * optional double front_right = 2; + * @return the frontRight + */ + public double getFrontRight() { + return frontRight; + } + + /** + * optional double front_right = 2; + * @param value the frontRight to set + * @return this + */ + public ProtobufMecanumDriveWheelPositions setFrontRight(final double value) { + bitField0_ |= 0x00000002; + frontRight = value; + return this; + } + + /** + * optional double rear_left = 3; + * @return whether the rearLeft field is set + */ + public boolean hasRearLeft() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double rear_left = 3; + * @return this + */ + public ProtobufMecanumDriveWheelPositions clearRearLeft() { + bitField0_ &= ~0x00000004; + rearLeft = 0D; + return this; + } + + /** + * optional double rear_left = 3; + * @return the rearLeft + */ + public double getRearLeft() { + return rearLeft; + } + + /** + * optional double rear_left = 3; + * @param value the rearLeft to set + * @return this + */ + public ProtobufMecanumDriveWheelPositions setRearLeft(final double value) { + bitField0_ |= 0x00000004; + rearLeft = value; + return this; + } + + /** + * optional double rear_right = 4; + * @return whether the rearRight field is set + */ + public boolean hasRearRight() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double rear_right = 4; + * @return this + */ + public ProtobufMecanumDriveWheelPositions clearRearRight() { + bitField0_ &= ~0x00000008; + rearRight = 0D; + return this; + } + + /** + * optional double rear_right = 4; + * @return the rearRight + */ + public double getRearRight() { + return rearRight; + } + + /** + * optional double rear_right = 4; + * @param value the rearRight to set + * @return this + */ + public ProtobufMecanumDriveWheelPositions setRearRight(final double value) { + bitField0_ |= 0x00000008; + rearRight = value; + return this; + } + + @Override + public ProtobufMecanumDriveWheelPositions copyFrom( + final ProtobufMecanumDriveWheelPositions other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + frontLeft = other.frontLeft; + frontRight = other.frontRight; + rearLeft = other.rearLeft; + rearRight = other.rearRight; + } + return this; + } + + @Override + public ProtobufMecanumDriveWheelPositions mergeFrom( + final ProtobufMecanumDriveWheelPositions other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFrontLeft()) { + setFrontLeft(other.frontLeft); + } + if (other.hasFrontRight()) { + setFrontRight(other.frontRight); + } + if (other.hasRearLeft()) { + setRearLeft(other.rearLeft); + } + if (other.hasRearRight()) { + setRearRight(other.rearRight); + } + return this; + } + + @Override + public ProtobufMecanumDriveWheelPositions clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + frontLeft = 0D; + frontRight = 0D; + rearLeft = 0D; + rearRight = 0D; + return this; + } + + @Override + public ProtobufMecanumDriveWheelPositions clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufMecanumDriveWheelPositions)) { + return false; + } + ProtobufMecanumDriveWheelPositions other = (ProtobufMecanumDriveWheelPositions) o; + return bitField0_ == other.bitField0_ + && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft)) + && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight)) + && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft)) + && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(rearRight); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufMecanumDriveWheelPositions mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // frontLeft + frontLeft = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // frontRight + frontRight = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // rearLeft + rearLeft = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // rearRight + rearRight = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.frontLeft, frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.frontRight, frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.rearLeft, rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.rearRight, rearRight); + } + output.endObject(); + } + + @Override + public ProtobufMecanumDriveWheelPositions mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 127514064: + case -324277155: { + if (input.isAtField(FieldNames.frontLeft)) { + if (!input.trySkipNullValue()) { + frontLeft = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -336370317: + case -1456996218: { + if (input.isAtField(FieldNames.frontRight)) { + if (!input.trySkipNullValue()) { + frontRight = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -854852661: + case -712874558: { + if (input.isAtField(FieldNames.rearLeft)) { + if (!input.trySkipNullValue()) { + rearLeft = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -724967720: + case -618613823: { + if (input.isAtField(FieldNames.rearRight)) { + if (!input.trySkipNullValue()) { + rearRight = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufMecanumDriveWheelPositions clone() { + return new ProtobufMecanumDriveWheelPositions().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufMecanumDriveWheelPositions parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), data).checkInitialized(); + } + + public static ProtobufMecanumDriveWheelPositions parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), input).checkInitialized(); + } + + public static ProtobufMecanumDriveWheelPositions parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelPositions(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufMecanumDriveWheelPositions messages + */ + public static MessageFactory getFactory() { + return ProtobufMecanumDriveWheelPositionsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufMecanumDriveWheelPositions_descriptor; + } + + private enum ProtobufMecanumDriveWheelPositionsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufMecanumDriveWheelPositions create() { + return ProtobufMecanumDriveWheelPositions.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); + + static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); + + static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); + + static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelSpeeds.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelSpeeds.java new file mode 100644 index 0000000000..b2a4f5ab9c --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufMecanumDriveWheelSpeeds.java @@ -0,0 +1,516 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufMecanumDriveWheelSpeeds} + */ +@SuppressWarnings("hiding") +public final class ProtobufMecanumDriveWheelSpeeds extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double front_left = 1; + */ + private double frontLeft; + + /** + * optional double front_right = 2; + */ + private double frontRight; + + /** + * optional double rear_left = 3; + */ + private double rearLeft; + + /** + * optional double rear_right = 4; + */ + private double rearRight; + + private ProtobufMecanumDriveWheelSpeeds() { + } + + /** + * @return a new empty instance of {@code ProtobufMecanumDriveWheelSpeeds} + */ + public static ProtobufMecanumDriveWheelSpeeds newInstance() { + return new ProtobufMecanumDriveWheelSpeeds(); + } + + /** + * optional double front_left = 1; + * @return whether the frontLeft field is set + */ + public boolean hasFrontLeft() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double front_left = 1; + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds clearFrontLeft() { + bitField0_ &= ~0x00000001; + frontLeft = 0D; + return this; + } + + /** + * optional double front_left = 1; + * @return the frontLeft + */ + public double getFrontLeft() { + return frontLeft; + } + + /** + * optional double front_left = 1; + * @param value the frontLeft to set + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds setFrontLeft(final double value) { + bitField0_ |= 0x00000001; + frontLeft = value; + return this; + } + + /** + * optional double front_right = 2; + * @return whether the frontRight field is set + */ + public boolean hasFrontRight() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double front_right = 2; + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds clearFrontRight() { + bitField0_ &= ~0x00000002; + frontRight = 0D; + return this; + } + + /** + * optional double front_right = 2; + * @return the frontRight + */ + public double getFrontRight() { + return frontRight; + } + + /** + * optional double front_right = 2; + * @param value the frontRight to set + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds setFrontRight(final double value) { + bitField0_ |= 0x00000002; + frontRight = value; + return this; + } + + /** + * optional double rear_left = 3; + * @return whether the rearLeft field is set + */ + public boolean hasRearLeft() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double rear_left = 3; + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds clearRearLeft() { + bitField0_ &= ~0x00000004; + rearLeft = 0D; + return this; + } + + /** + * optional double rear_left = 3; + * @return the rearLeft + */ + public double getRearLeft() { + return rearLeft; + } + + /** + * optional double rear_left = 3; + * @param value the rearLeft to set + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds setRearLeft(final double value) { + bitField0_ |= 0x00000004; + rearLeft = value; + return this; + } + + /** + * optional double rear_right = 4; + * @return whether the rearRight field is set + */ + public boolean hasRearRight() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double rear_right = 4; + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds clearRearRight() { + bitField0_ &= ~0x00000008; + rearRight = 0D; + return this; + } + + /** + * optional double rear_right = 4; + * @return the rearRight + */ + public double getRearRight() { + return rearRight; + } + + /** + * optional double rear_right = 4; + * @param value the rearRight to set + * @return this + */ + public ProtobufMecanumDriveWheelSpeeds setRearRight(final double value) { + bitField0_ |= 0x00000008; + rearRight = value; + return this; + } + + @Override + public ProtobufMecanumDriveWheelSpeeds copyFrom(final ProtobufMecanumDriveWheelSpeeds other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + frontLeft = other.frontLeft; + frontRight = other.frontRight; + rearLeft = other.rearLeft; + rearRight = other.rearRight; + } + return this; + } + + @Override + public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtobufMecanumDriveWheelSpeeds other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasFrontLeft()) { + setFrontLeft(other.frontLeft); + } + if (other.hasFrontRight()) { + setFrontRight(other.frontRight); + } + if (other.hasRearLeft()) { + setRearLeft(other.rearLeft); + } + if (other.hasRearRight()) { + setRearRight(other.rearRight); + } + return this; + } + + @Override + public ProtobufMecanumDriveWheelSpeeds clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + frontLeft = 0D; + frontRight = 0D; + rearLeft = 0D; + rearRight = 0D; + return this; + } + + @Override + public ProtobufMecanumDriveWheelSpeeds clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufMecanumDriveWheelSpeeds)) { + return false; + } + ProtobufMecanumDriveWheelSpeeds other = (ProtobufMecanumDriveWheelSpeeds) o; + return bitField0_ == other.bitField0_ + && (!hasFrontLeft() || ProtoUtil.isEqual(frontLeft, other.frontLeft)) + && (!hasFrontRight() || ProtoUtil.isEqual(frontRight, other.frontRight)) + && (!hasRearLeft() || ProtoUtil.isEqual(rearLeft, other.rearLeft)) + && (!hasRearRight() || ProtoUtil.isEqual(rearRight, other.rearRight)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(rearRight); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufMecanumDriveWheelSpeeds mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // frontLeft + frontLeft = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // frontRight + frontRight = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // rearLeft + rearLeft = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // rearRight + rearRight = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.frontLeft, frontLeft); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.frontRight, frontRight); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.rearLeft, rearLeft); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.rearRight, rearRight); + } + output.endObject(); + } + + @Override + public ProtobufMecanumDriveWheelSpeeds mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 127514064: + case -324277155: { + if (input.isAtField(FieldNames.frontLeft)) { + if (!input.trySkipNullValue()) { + frontLeft = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -336370317: + case -1456996218: { + if (input.isAtField(FieldNames.frontRight)) { + if (!input.trySkipNullValue()) { + frontRight = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -854852661: + case -712874558: { + if (input.isAtField(FieldNames.rearLeft)) { + if (!input.trySkipNullValue()) { + rearLeft = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -724967720: + case -618613823: { + if (input.isAtField(FieldNames.rearRight)) { + if (!input.trySkipNullValue()) { + rearRight = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufMecanumDriveWheelSpeeds clone() { + return new ProtobufMecanumDriveWheelSpeeds().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufMecanumDriveWheelSpeeds parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), data).checkInitialized(); + } + + public static ProtobufMecanumDriveWheelSpeeds parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), input).checkInitialized(); + } + + public static ProtobufMecanumDriveWheelSpeeds parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufMecanumDriveWheelSpeeds(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufMecanumDriveWheelSpeeds messages + */ + public static MessageFactory getFactory() { + return ProtobufMecanumDriveWheelSpeedsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufMecanumDriveWheelSpeeds_descriptor; + } + + private enum ProtobufMecanumDriveWheelSpeedsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufMecanumDriveWheelSpeeds create() { + return ProtobufMecanumDriveWheelSpeeds.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName frontLeft = FieldName.forField("frontLeft", "front_left"); + + static final FieldName frontRight = FieldName.forField("frontRight", "front_right"); + + static final FieldName rearLeft = FieldName.forField("rearLeft", "rear_left"); + + static final FieldName rearRight = FieldName.forField("rearRight", "rear_right"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufPose2d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufPose2d.java new file mode 100644 index 0000000000..55e7a65140 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufPose2d.java @@ -0,0 +1,390 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +/** + * Protobuf type {@code ProtobufPose2d} + */ +@SuppressWarnings("hiding") +public final class ProtobufPose2d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + */ + private final ProtobufTranslation2d translation = ProtobufTranslation2d.newInstance(); + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + */ + private final ProtobufRotation2d rotation = ProtobufRotation2d.newInstance(); + + private ProtobufPose2d() { + } + + /** + * @return a new empty instance of {@code ProtobufPose2d} + */ + public static ProtobufPose2d newInstance() { + return new ProtobufPose2d(); + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * @return whether the translation field is set + */ + public boolean hasTranslation() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * @return this + */ + public ProtobufPose2d clearTranslation() { + bitField0_ &= ~0x00000001; + translation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTranslation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation2d getTranslation() { + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation2d getMutableTranslation() { + bitField0_ |= 0x00000001; + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * @param value the translation to set + * @return this + */ + public ProtobufPose2d setTranslation(final ProtobufTranslation2d value) { + bitField0_ |= 0x00000001; + translation.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * @return whether the rotation field is set + */ + public boolean hasRotation() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * @return this + */ + public ProtobufPose2d clearRotation() { + bitField0_ &= ~0x00000002; + rotation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRotation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufRotation2d getRotation() { + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufRotation2d getMutableRotation() { + bitField0_ |= 0x00000002; + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * @param value the rotation to set + * @return this + */ + public ProtobufPose2d setRotation(final ProtobufRotation2d value) { + bitField0_ |= 0x00000002; + rotation.copyFrom(value); + return this; + } + + @Override + public ProtobufPose2d copyFrom(final ProtobufPose2d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + translation.copyFrom(other.translation); + rotation.copyFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufPose2d mergeFrom(final ProtobufPose2d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTranslation()) { + getMutableTranslation().mergeFrom(other.translation); + } + if (other.hasRotation()) { + getMutableRotation().mergeFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufPose2d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clear(); + rotation.clear(); + return this; + } + + @Override + public ProtobufPose2d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clearQuick(); + rotation.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufPose2d)) { + return false; + } + ProtobufPose2d other = (ProtobufPose2d) o; + return bitField0_ == other.bitField0_ + && (!hasTranslation() || translation.equals(other.translation)) + && (!hasRotation() || rotation.equals(other.rotation)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rotation); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufPose2d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // translation + input.readMessage(translation); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rotation + input.readMessage(rotation); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.translation, translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.rotation, rotation); + } + output.endObject(); + } + + @Override + public ProtobufPose2d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1840647503: { + if (input.isAtField(FieldNames.translation)) { + if (!input.trySkipNullValue()) { + input.readMessage(translation); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -40300674: { + if (input.isAtField(FieldNames.rotation)) { + if (!input.trySkipNullValue()) { + input.readMessage(rotation); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufPose2d clone() { + return new ProtobufPose2d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufPose2d parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufPose2d(), data).checkInitialized(); + } + + public static ProtobufPose2d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufPose2d(), input).checkInitialized(); + } + + public static ProtobufPose2d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufPose2d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufPose2d messages + */ + public static MessageFactory getFactory() { + return ProtobufPose2dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry2dDescriptor.wpi_proto_ProtobufPose2d_descriptor; + } + + private enum ProtobufPose2dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufPose2d create() { + return ProtobufPose2d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName translation = FieldName.forField("translation"); + + static final FieldName rotation = FieldName.forField("rotation"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufPose3d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufPose3d.java new file mode 100644 index 0000000000..71cddf0641 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufPose3d.java @@ -0,0 +1,390 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +/** + * Protobuf type {@code ProtobufPose3d} + */ +@SuppressWarnings("hiding") +public final class ProtobufPose3d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + */ + private final ProtobufTranslation3d translation = ProtobufTranslation3d.newInstance(); + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + */ + private final ProtobufRotation3d rotation = ProtobufRotation3d.newInstance(); + + private ProtobufPose3d() { + } + + /** + * @return a new empty instance of {@code ProtobufPose3d} + */ + public static ProtobufPose3d newInstance() { + return new ProtobufPose3d(); + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * @return whether the translation field is set + */ + public boolean hasTranslation() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * @return this + */ + public ProtobufPose3d clearTranslation() { + bitField0_ &= ~0x00000001; + translation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTranslation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation3d getTranslation() { + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation3d getMutableTranslation() { + bitField0_ |= 0x00000001; + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * @param value the translation to set + * @return this + */ + public ProtobufPose3d setTranslation(final ProtobufTranslation3d value) { + bitField0_ |= 0x00000001; + translation.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * @return whether the rotation field is set + */ + public boolean hasRotation() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * @return this + */ + public ProtobufPose3d clearRotation() { + bitField0_ &= ~0x00000002; + rotation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRotation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufRotation3d getRotation() { + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufRotation3d getMutableRotation() { + bitField0_ |= 0x00000002; + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * @param value the rotation to set + * @return this + */ + public ProtobufPose3d setRotation(final ProtobufRotation3d value) { + bitField0_ |= 0x00000002; + rotation.copyFrom(value); + return this; + } + + @Override + public ProtobufPose3d copyFrom(final ProtobufPose3d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + translation.copyFrom(other.translation); + rotation.copyFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufPose3d mergeFrom(final ProtobufPose3d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTranslation()) { + getMutableTranslation().mergeFrom(other.translation); + } + if (other.hasRotation()) { + getMutableRotation().mergeFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufPose3d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clear(); + rotation.clear(); + return this; + } + + @Override + public ProtobufPose3d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clearQuick(); + rotation.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufPose3d)) { + return false; + } + ProtobufPose3d other = (ProtobufPose3d) o; + return bitField0_ == other.bitField0_ + && (!hasTranslation() || translation.equals(other.translation)) + && (!hasRotation() || rotation.equals(other.rotation)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rotation); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufPose3d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // translation + input.readMessage(translation); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rotation + input.readMessage(rotation); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.translation, translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.rotation, rotation); + } + output.endObject(); + } + + @Override + public ProtobufPose3d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1840647503: { + if (input.isAtField(FieldNames.translation)) { + if (!input.trySkipNullValue()) { + input.readMessage(translation); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -40300674: { + if (input.isAtField(FieldNames.rotation)) { + if (!input.trySkipNullValue()) { + input.readMessage(rotation); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufPose3d clone() { + return new ProtobufPose3d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufPose3d parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufPose3d(), data).checkInitialized(); + } + + public static ProtobufPose3d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufPose3d(), input).checkInitialized(); + } + + public static ProtobufPose3d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufPose3d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufPose3d messages + */ + public static MessageFactory getFactory() { + return ProtobufPose3dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry3dDescriptor.wpi_proto_ProtobufPose3d_descriptor; + } + + private enum ProtobufPose3dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufPose3d create() { + return ProtobufPose3d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName translation = FieldName.forField("translation"); + + static final FieldName rotation = FieldName.forField("rotation"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufQuaternion.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufQuaternion.java new file mode 100644 index 0000000000..fcfffb12c0 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufQuaternion.java @@ -0,0 +1,510 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufQuaternion} + */ +@SuppressWarnings("hiding") +public final class ProtobufQuaternion extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double w = 1; + */ + private double w; + + /** + * optional double x = 2; + */ + private double x; + + /** + * optional double y = 3; + */ + private double y; + + /** + * optional double z = 4; + */ + private double z; + + private ProtobufQuaternion() { + } + + /** + * @return a new empty instance of {@code ProtobufQuaternion} + */ + public static ProtobufQuaternion newInstance() { + return new ProtobufQuaternion(); + } + + /** + * optional double w = 1; + * @return whether the w field is set + */ + public boolean hasW() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double w = 1; + * @return this + */ + public ProtobufQuaternion clearW() { + bitField0_ &= ~0x00000001; + w = 0D; + return this; + } + + /** + * optional double w = 1; + * @return the w + */ + public double getW() { + return w; + } + + /** + * optional double w = 1; + * @param value the w to set + * @return this + */ + public ProtobufQuaternion setW(final double value) { + bitField0_ |= 0x00000001; + w = value; + return this; + } + + /** + * optional double x = 2; + * @return whether the x field is set + */ + public boolean hasX() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double x = 2; + * @return this + */ + public ProtobufQuaternion clearX() { + bitField0_ &= ~0x00000002; + x = 0D; + return this; + } + + /** + * optional double x = 2; + * @return the x + */ + public double getX() { + return x; + } + + /** + * optional double x = 2; + * @param value the x to set + * @return this + */ + public ProtobufQuaternion setX(final double value) { + bitField0_ |= 0x00000002; + x = value; + return this; + } + + /** + * optional double y = 3; + * @return whether the y field is set + */ + public boolean hasY() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double y = 3; + * @return this + */ + public ProtobufQuaternion clearY() { + bitField0_ &= ~0x00000004; + y = 0D; + return this; + } + + /** + * optional double y = 3; + * @return the y + */ + public double getY() { + return y; + } + + /** + * optional double y = 3; + * @param value the y to set + * @return this + */ + public ProtobufQuaternion setY(final double value) { + bitField0_ |= 0x00000004; + y = value; + return this; + } + + /** + * optional double z = 4; + * @return whether the z field is set + */ + public boolean hasZ() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double z = 4; + * @return this + */ + public ProtobufQuaternion clearZ() { + bitField0_ &= ~0x00000008; + z = 0D; + return this; + } + + /** + * optional double z = 4; + * @return the z + */ + public double getZ() { + return z; + } + + /** + * optional double z = 4; + * @param value the z to set + * @return this + */ + public ProtobufQuaternion setZ(final double value) { + bitField0_ |= 0x00000008; + z = value; + return this; + } + + @Override + public ProtobufQuaternion copyFrom(final ProtobufQuaternion other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + w = other.w; + x = other.x; + y = other.y; + z = other.z; + } + return this; + } + + @Override + public ProtobufQuaternion mergeFrom(final ProtobufQuaternion other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasW()) { + setW(other.w); + } + if (other.hasX()) { + setX(other.x); + } + if (other.hasY()) { + setY(other.y); + } + if (other.hasZ()) { + setZ(other.z); + } + return this; + } + + @Override + public ProtobufQuaternion clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + w = 0D; + x = 0D; + y = 0D; + z = 0D; + return this; + } + + @Override + public ProtobufQuaternion clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufQuaternion)) { + return false; + } + ProtobufQuaternion other = (ProtobufQuaternion) o; + return bitField0_ == other.bitField0_ + && (!hasW() || ProtoUtil.isEqual(w, other.w)) + && (!hasX() || ProtoUtil.isEqual(x, other.x)) + && (!hasY() || ProtoUtil.isEqual(y, other.y)) + && (!hasZ() || ProtoUtil.isEqual(z, other.z)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(w); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(x); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(y); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(z); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufQuaternion mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // w + w = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // x + x = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // y + y = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // z + z = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.w, w); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.x, x); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.y, y); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.z, z); + } + output.endObject(); + } + + @Override + public ProtobufQuaternion mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 119: { + if (input.isAtField(FieldNames.w)) { + if (!input.trySkipNullValue()) { + w = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 120: { + if (input.isAtField(FieldNames.x)) { + if (!input.trySkipNullValue()) { + x = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 121: { + if (input.isAtField(FieldNames.y)) { + if (!input.trySkipNullValue()) { + y = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 122: { + if (input.isAtField(FieldNames.z)) { + if (!input.trySkipNullValue()) { + z = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufQuaternion clone() { + return new ProtobufQuaternion().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufQuaternion parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufQuaternion(), data).checkInitialized(); + } + + public static ProtobufQuaternion parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufQuaternion(), input).checkInitialized(); + } + + public static ProtobufQuaternion parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufQuaternion(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufQuaternion messages + */ + public static MessageFactory getFactory() { + return ProtobufQuaternionFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry3dDescriptor.wpi_proto_ProtobufQuaternion_descriptor; + } + + private enum ProtobufQuaternionFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufQuaternion create() { + return ProtobufQuaternion.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName w = FieldName.forField("w"); + + static final FieldName x = FieldName.forField("x"); + + static final FieldName y = FieldName.forField("y"); + + static final FieldName z = FieldName.forField("z"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufQuinticHermiteSpline.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufQuinticHermiteSpline.java new file mode 100644 index 0000000000..3576e15168 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufQuinticHermiteSpline.java @@ -0,0 +1,674 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedDouble; + +/** + * Protobuf type {@code ProtobufQuinticHermiteSpline} + */ +@SuppressWarnings("hiding") +public final class ProtobufQuinticHermiteSpline extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * repeated double x_initial = 1; + */ + private final RepeatedDouble xInitial = RepeatedDouble.newEmptyInstance(); + + /** + * repeated double x_final = 2; + */ + private final RepeatedDouble xFinal = RepeatedDouble.newEmptyInstance(); + + /** + * repeated double y_initial = 3; + */ + private final RepeatedDouble yInitial = RepeatedDouble.newEmptyInstance(); + + /** + * repeated double y_final = 4; + */ + private final RepeatedDouble yFinal = RepeatedDouble.newEmptyInstance(); + + private ProtobufQuinticHermiteSpline() { + } + + /** + * @return a new empty instance of {@code ProtobufQuinticHermiteSpline} + */ + public static ProtobufQuinticHermiteSpline newInstance() { + return new ProtobufQuinticHermiteSpline(); + } + + /** + * repeated double x_initial = 1; + * @return whether the xInitial field is set + */ + public boolean hasXInitial() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * repeated double x_initial = 1; + * @return this + */ + public ProtobufQuinticHermiteSpline clearXInitial() { + bitField0_ &= ~0x00000001; + xInitial.clear(); + return this; + } + + /** + * repeated double x_initial = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableXInitial()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getXInitial() { + return xInitial; + } + + /** + * repeated double x_initial = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableXInitial() { + bitField0_ |= 0x00000001; + return xInitial; + } + + /** + * repeated double x_initial = 1; + * @param value the xInitial to add + * @return this + */ + public ProtobufQuinticHermiteSpline addXInitial(final double value) { + bitField0_ |= 0x00000001; + xInitial.add(value); + return this; + } + + /** + * repeated double x_initial = 1; + * @param values the xInitial to add + * @return this + */ + public ProtobufQuinticHermiteSpline addAllXInitial(final double... values) { + bitField0_ |= 0x00000001; + xInitial.addAll(values); + return this; + } + + /** + * repeated double x_final = 2; + * @return whether the xFinal field is set + */ + public boolean hasXFinal() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * repeated double x_final = 2; + * @return this + */ + public ProtobufQuinticHermiteSpline clearXFinal() { + bitField0_ &= ~0x00000002; + xFinal.clear(); + return this; + } + + /** + * repeated double x_final = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableXFinal()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getXFinal() { + return xFinal; + } + + /** + * repeated double x_final = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableXFinal() { + bitField0_ |= 0x00000002; + return xFinal; + } + + /** + * repeated double x_final = 2; + * @param value the xFinal to add + * @return this + */ + public ProtobufQuinticHermiteSpline addXFinal(final double value) { + bitField0_ |= 0x00000002; + xFinal.add(value); + return this; + } + + /** + * repeated double x_final = 2; + * @param values the xFinal to add + * @return this + */ + public ProtobufQuinticHermiteSpline addAllXFinal(final double... values) { + bitField0_ |= 0x00000002; + xFinal.addAll(values); + return this; + } + + /** + * repeated double y_initial = 3; + * @return whether the yInitial field is set + */ + public boolean hasYInitial() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * repeated double y_initial = 3; + * @return this + */ + public ProtobufQuinticHermiteSpline clearYInitial() { + bitField0_ &= ~0x00000004; + yInitial.clear(); + return this; + } + + /** + * repeated double y_initial = 3; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableYInitial()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getYInitial() { + return yInitial; + } + + /** + * repeated double y_initial = 3; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableYInitial() { + bitField0_ |= 0x00000004; + return yInitial; + } + + /** + * repeated double y_initial = 3; + * @param value the yInitial to add + * @return this + */ + public ProtobufQuinticHermiteSpline addYInitial(final double value) { + bitField0_ |= 0x00000004; + yInitial.add(value); + return this; + } + + /** + * repeated double y_initial = 3; + * @param values the yInitial to add + * @return this + */ + public ProtobufQuinticHermiteSpline addAllYInitial(final double... values) { + bitField0_ |= 0x00000004; + yInitial.addAll(values); + return this; + } + + /** + * repeated double y_final = 4; + * @return whether the yFinal field is set + */ + public boolean hasYFinal() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * repeated double y_final = 4; + * @return this + */ + public ProtobufQuinticHermiteSpline clearYFinal() { + bitField0_ &= ~0x00000008; + yFinal.clear(); + return this; + } + + /** + * repeated double y_final = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableYFinal()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getYFinal() { + return yFinal; + } + + /** + * repeated double y_final = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableYFinal() { + bitField0_ |= 0x00000008; + return yFinal; + } + + /** + * repeated double y_final = 4; + * @param value the yFinal to add + * @return this + */ + public ProtobufQuinticHermiteSpline addYFinal(final double value) { + bitField0_ |= 0x00000008; + yFinal.add(value); + return this; + } + + /** + * repeated double y_final = 4; + * @param values the yFinal to add + * @return this + */ + public ProtobufQuinticHermiteSpline addAllYFinal(final double... values) { + bitField0_ |= 0x00000008; + yFinal.addAll(values); + return this; + } + + @Override + public ProtobufQuinticHermiteSpline copyFrom(final ProtobufQuinticHermiteSpline other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + xInitial.copyFrom(other.xInitial); + xFinal.copyFrom(other.xFinal); + yInitial.copyFrom(other.yInitial); + yFinal.copyFrom(other.yFinal); + } + return this; + } + + @Override + public ProtobufQuinticHermiteSpline mergeFrom(final ProtobufQuinticHermiteSpline other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasXInitial()) { + getMutableXInitial().addAll(other.xInitial); + } + if (other.hasXFinal()) { + getMutableXFinal().addAll(other.xFinal); + } + if (other.hasYInitial()) { + getMutableYInitial().addAll(other.yInitial); + } + if (other.hasYFinal()) { + getMutableYFinal().addAll(other.yFinal); + } + return this; + } + + @Override + public ProtobufQuinticHermiteSpline clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + xInitial.clear(); + xFinal.clear(); + yInitial.clear(); + yFinal.clear(); + return this; + } + + @Override + public ProtobufQuinticHermiteSpline clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + xInitial.clear(); + xFinal.clear(); + yInitial.clear(); + yFinal.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufQuinticHermiteSpline)) { + return false; + } + ProtobufQuinticHermiteSpline other = (ProtobufQuinticHermiteSpline) o; + return bitField0_ == other.bitField0_ + && (!hasXInitial() || xInitial.equals(other.xInitial)) + && (!hasXFinal() || xFinal.equals(other.xFinal)) + && (!hasYInitial() || yInitial.equals(other.yInitial)) + && (!hasYFinal() || yFinal.equals(other.yFinal)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + for (int i = 0; i < xInitial.length(); i++) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(xInitial.array()[i]); + } + } + if ((bitField0_ & 0x00000002) != 0) { + for (int i = 0; i < xFinal.length(); i++) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(xFinal.array()[i]); + } + } + if ((bitField0_ & 0x00000004) != 0) { + for (int i = 0; i < yInitial.length(); i++) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(yInitial.array()[i]); + } + } + if ((bitField0_ & 0x00000008) != 0) { + for (int i = 0; i < yFinal.length(); i++) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(yFinal.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += (1 + 8) * xInitial.length(); + } + if ((bitField0_ & 0x00000002) != 0) { + size += (1 + 8) * xFinal.length(); + } + if ((bitField0_ & 0x00000004) != 0) { + size += (1 + 8) * yInitial.length(); + } + if ((bitField0_ & 0x00000008) != 0) { + size += (1 + 8) * yFinal.length(); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufQuinticHermiteSpline mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // xInitial [packed=true] + input.readPackedDouble(xInitial); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // xFinal [packed=true] + input.readPackedDouble(xFinal); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 26) { + break; + } + } + case 26: { + // yInitial [packed=true] + input.readPackedDouble(yInitial); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // yFinal [packed=true] + input.readPackedDouble(yFinal); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 9: { + // xInitial [packed=false] + tag = input.readRepeatedDouble(xInitial, tag); + bitField0_ |= 0x00000001; + break; + } + case 17: { + // xFinal [packed=false] + tag = input.readRepeatedDouble(xFinal, tag); + bitField0_ |= 0x00000002; + break; + } + case 25: { + // yInitial [packed=false] + tag = input.readRepeatedDouble(yInitial, tag); + bitField0_ |= 0x00000004; + break; + } + case 33: { + // yFinal [packed=false] + tag = input.readRepeatedDouble(yFinal, tag); + bitField0_ |= 0x00000008; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeRepeatedDouble(FieldNames.xInitial, xInitial); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRepeatedDouble(FieldNames.xFinal, xFinal); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRepeatedDouble(FieldNames.yInitial, yInitial); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRepeatedDouble(FieldNames.yFinal, yFinal); + } + output.endObject(); + } + + @Override + public ProtobufQuinticHermiteSpline mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1998129236: + case -2134571395: { + if (input.isAtField(FieldNames.xInitial)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(xInitial); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -791585826: + case 1943464687: { + if (input.isAtField(FieldNames.xFinal)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(xFinal); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -255318901: + case 352941438: { + if (input.isAtField(FieldNames.yInitial)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(yInitial); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case -762956675: + case -1463998928: { + if (input.isAtField(FieldNames.yFinal)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(yFinal); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufQuinticHermiteSpline clone() { + return new ProtobufQuinticHermiteSpline().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufQuinticHermiteSpline parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufQuinticHermiteSpline(), data).checkInitialized(); + } + + public static ProtobufQuinticHermiteSpline parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufQuinticHermiteSpline(), input).checkInitialized(); + } + + public static ProtobufQuinticHermiteSpline parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufQuinticHermiteSpline(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufQuinticHermiteSpline messages + */ + public static MessageFactory getFactory() { + return ProtobufQuinticHermiteSplineFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufSplineDescriptor.wpi_proto_ProtobufQuinticHermiteSpline_descriptor; + } + + private enum ProtobufQuinticHermiteSplineFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufQuinticHermiteSpline create() { + return ProtobufQuinticHermiteSpline.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName xInitial = FieldName.forField("xInitial", "x_initial"); + + static final FieldName xFinal = FieldName.forField("xFinal", "x_final"); + + static final FieldName yInitial = FieldName.forField("yInitial", "y_initial"); + + static final FieldName yFinal = FieldName.forField("yFinal", "y_final"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRectangle2d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRectangle2d.java new file mode 100644 index 0000000000..988d7dcdd1 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRectangle2d.java @@ -0,0 +1,451 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufRectangle2d} + */ +@SuppressWarnings("hiding") +public final class ProtobufRectangle2d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double xWidth = 2; + */ + private double xWidth; + + /** + * optional double yWidth = 3; + */ + private double yWidth; + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + */ + private final ProtobufPose2d center = ProtobufPose2d.newInstance(); + + private ProtobufRectangle2d() { + } + + /** + * @return a new empty instance of {@code ProtobufRectangle2d} + */ + public static ProtobufRectangle2d newInstance() { + return new ProtobufRectangle2d(); + } + + /** + * optional double xWidth = 2; + * @return whether the xWidth field is set + */ + public boolean hasXWidth() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double xWidth = 2; + * @return this + */ + public ProtobufRectangle2d clearXWidth() { + bitField0_ &= ~0x00000001; + xWidth = 0D; + return this; + } + + /** + * optional double xWidth = 2; + * @return the xWidth + */ + public double getXWidth() { + return xWidth; + } + + /** + * optional double xWidth = 2; + * @param value the xWidth to set + * @return this + */ + public ProtobufRectangle2d setXWidth(final double value) { + bitField0_ |= 0x00000001; + xWidth = value; + return this; + } + + /** + * optional double yWidth = 3; + * @return whether the yWidth field is set + */ + public boolean hasYWidth() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double yWidth = 3; + * @return this + */ + public ProtobufRectangle2d clearYWidth() { + bitField0_ &= ~0x00000002; + yWidth = 0D; + return this; + } + + /** + * optional double yWidth = 3; + * @return the yWidth + */ + public double getYWidth() { + return yWidth; + } + + /** + * optional double yWidth = 3; + * @param value the yWidth to set + * @return this + */ + public ProtobufRectangle2d setYWidth(final double value) { + bitField0_ |= 0x00000002; + yWidth = value; + return this; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * @return whether the center field is set + */ + public boolean hasCenter() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * @return this + */ + public ProtobufRectangle2d clearCenter() { + bitField0_ &= ~0x00000004; + center.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableCenter()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufPose2d getCenter() { + return center; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufPose2d getMutableCenter() { + bitField0_ |= 0x00000004; + return center; + } + + /** + * optional .wpi.proto.ProtobufPose2d center = 1; + * @param value the center to set + * @return this + */ + public ProtobufRectangle2d setCenter(final ProtobufPose2d value) { + bitField0_ |= 0x00000004; + center.copyFrom(value); + return this; + } + + @Override + public ProtobufRectangle2d copyFrom(final ProtobufRectangle2d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + xWidth = other.xWidth; + yWidth = other.yWidth; + center.copyFrom(other.center); + } + return this; + } + + @Override + public ProtobufRectangle2d mergeFrom(final ProtobufRectangle2d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasXWidth()) { + setXWidth(other.xWidth); + } + if (other.hasYWidth()) { + setYWidth(other.yWidth); + } + if (other.hasCenter()) { + getMutableCenter().mergeFrom(other.center); + } + return this; + } + + @Override + public ProtobufRectangle2d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + xWidth = 0D; + yWidth = 0D; + center.clear(); + return this; + } + + @Override + public ProtobufRectangle2d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + center.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufRectangle2d)) { + return false; + } + ProtobufRectangle2d other = (ProtobufRectangle2d) o; + return bitField0_ == other.bitField0_ + && (!hasXWidth() || ProtoUtil.isEqual(xWidth, other.xWidth)) + && (!hasYWidth() || ProtoUtil.isEqual(yWidth, other.yWidth)) + && (!hasCenter() || center.equals(other.center)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(xWidth); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(yWidth); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(center); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(center); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufRectangle2d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 17: { + // xWidth + xWidth = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // yWidth + yWidth = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 10) { + break; + } + } + case 10: { + // center + input.readMessage(center); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.xWidth, xWidth); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.yWidth, yWidth); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeMessage(FieldNames.center, center); + } + output.endObject(); + } + + @Override + public ProtobufRectangle2d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -775894994: { + if (input.isAtField(FieldNames.xWidth)) { + if (!input.trySkipNullValue()) { + xWidth = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -747265843: { + if (input.isAtField(FieldNames.yWidth)) { + if (!input.trySkipNullValue()) { + yWidth = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1364013995: { + if (input.isAtField(FieldNames.center)) { + if (!input.trySkipNullValue()) { + input.readMessage(center); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufRectangle2d clone() { + return new ProtobufRectangle2d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufRectangle2d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufRectangle2d(), data).checkInitialized(); + } + + public static ProtobufRectangle2d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufRectangle2d(), input).checkInitialized(); + } + + public static ProtobufRectangle2d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufRectangle2d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufRectangle2d messages + */ + public static MessageFactory getFactory() { + return ProtobufRectangle2dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry2dDescriptor.wpi_proto_ProtobufRectangle2d_descriptor; + } + + private enum ProtobufRectangle2dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufRectangle2d create() { + return ProtobufRectangle2d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName xWidth = FieldName.forField("xWidth"); + + static final FieldName yWidth = FieldName.forField("yWidth"); + + static final FieldName center = FieldName.forField("center"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRotation2d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRotation2d.java new file mode 100644 index 0000000000..2fbbf9310a --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRotation2d.java @@ -0,0 +1,270 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufRotation2d} + */ +@SuppressWarnings("hiding") +public final class ProtobufRotation2d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double value = 1; + */ + private double value_; + + private ProtobufRotation2d() { + } + + /** + * @return a new empty instance of {@code ProtobufRotation2d} + */ + public static ProtobufRotation2d newInstance() { + return new ProtobufRotation2d(); + } + + /** + * optional double value = 1; + * @return whether the value_ field is set + */ + public boolean hasValue() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double value = 1; + * @return this + */ + public ProtobufRotation2d clearValue() { + bitField0_ &= ~0x00000001; + value_ = 0D; + return this; + } + + /** + * optional double value = 1; + * @return the value_ + */ + public double getValue() { + return value_; + } + + /** + * optional double value = 1; + * @param value the value_ to set + * @return this + */ + public ProtobufRotation2d setValue(final double value) { + bitField0_ |= 0x00000001; + value_ = value; + return this; + } + + @Override + public ProtobufRotation2d copyFrom(final ProtobufRotation2d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + value_ = other.value_; + } + return this; + } + + @Override + public ProtobufRotation2d mergeFrom(final ProtobufRotation2d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasValue()) { + setValue(other.value_); + } + return this; + } + + @Override + public ProtobufRotation2d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + value_ = 0D; + return this; + } + + @Override + public ProtobufRotation2d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufRotation2d)) { + return false; + } + ProtobufRotation2d other = (ProtobufRotation2d) o; + return bitField0_ == other.bitField0_ + && (!hasValue() || ProtoUtil.isEqual(value_, other.value_)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(value_); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufRotation2d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // value_ + value_ = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.value_, value_); + } + output.endObject(); + } + + @Override + public ProtobufRotation2d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 111972721: { + if (input.isAtField(FieldNames.value_)) { + if (!input.trySkipNullValue()) { + value_ = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufRotation2d clone() { + return new ProtobufRotation2d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufRotation2d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufRotation2d(), data).checkInitialized(); + } + + public static ProtobufRotation2d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufRotation2d(), input).checkInitialized(); + } + + public static ProtobufRotation2d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufRotation2d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufRotation2d messages + */ + public static MessageFactory getFactory() { + return ProtobufRotation2dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry2dDescriptor.wpi_proto_ProtobufRotation2d_descriptor; + } + + private enum ProtobufRotation2dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufRotation2d create() { + return ProtobufRotation2d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName value_ = FieldName.forField("value"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRotation3d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRotation3d.java new file mode 100644 index 0000000000..505516a8bf --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufRotation3d.java @@ -0,0 +1,290 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +/** + * Protobuf type {@code ProtobufRotation3d} + */ +@SuppressWarnings("hiding") +public final class ProtobufRotation3d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .wpi.proto.ProtobufQuaternion q = 1; + */ + private final ProtobufQuaternion q = ProtobufQuaternion.newInstance(); + + private ProtobufRotation3d() { + } + + /** + * @return a new empty instance of {@code ProtobufRotation3d} + */ + public static ProtobufRotation3d newInstance() { + return new ProtobufRotation3d(); + } + + /** + * optional .wpi.proto.ProtobufQuaternion q = 1; + * @return whether the q field is set + */ + public boolean hasQ() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .wpi.proto.ProtobufQuaternion q = 1; + * @return this + */ + public ProtobufRotation3d clearQ() { + bitField0_ &= ~0x00000001; + q.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufQuaternion q = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableQ()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufQuaternion getQ() { + return q; + } + + /** + * optional .wpi.proto.ProtobufQuaternion q = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufQuaternion getMutableQ() { + bitField0_ |= 0x00000001; + return q; + } + + /** + * optional .wpi.proto.ProtobufQuaternion q = 1; + * @param value the q to set + * @return this + */ + public ProtobufRotation3d setQ(final ProtobufQuaternion value) { + bitField0_ |= 0x00000001; + q.copyFrom(value); + return this; + } + + @Override + public ProtobufRotation3d copyFrom(final ProtobufRotation3d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + q.copyFrom(other.q); + } + return this; + } + + @Override + public ProtobufRotation3d mergeFrom(final ProtobufRotation3d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasQ()) { + getMutableQ().mergeFrom(other.q); + } + return this; + } + + @Override + public ProtobufRotation3d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + q.clear(); + return this; + } + + @Override + public ProtobufRotation3d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + q.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufRotation3d)) { + return false; + } + ProtobufRotation3d other = (ProtobufRotation3d) o; + return bitField0_ == other.bitField0_ + && (!hasQ() || q.equals(other.q)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(q); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(q); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufRotation3d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // q + input.readMessage(q); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.q, q); + } + output.endObject(); + } + + @Override + public ProtobufRotation3d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 113: { + if (input.isAtField(FieldNames.q)) { + if (!input.trySkipNullValue()) { + input.readMessage(q); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufRotation3d clone() { + return new ProtobufRotation3d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufRotation3d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufRotation3d(), data).checkInitialized(); + } + + public static ProtobufRotation3d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufRotation3d(), input).checkInitialized(); + } + + public static ProtobufRotation3d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufRotation3d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufRotation3d messages + */ + public static MessageFactory getFactory() { + return ProtobufRotation3dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry3dDescriptor.wpi_proto_ProtobufRotation3d_descriptor; + } + + private enum ProtobufRotation3dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufRotation3d create() { + return ProtobufRotation3d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName q = FieldName.forField("q"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSimpleMotorFeedforward.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSimpleMotorFeedforward.java new file mode 100644 index 0000000000..a624dda8c7 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSimpleMotorFeedforward.java @@ -0,0 +1,512 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufSimpleMotorFeedforward} + */ +@SuppressWarnings("hiding") +public final class ProtobufSimpleMotorFeedforward extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double ks = 1; + */ + private double ks; + + /** + * optional double kv = 2; + */ + private double kv; + + /** + * optional double ka = 3; + */ + private double ka; + + /** + * optional double dt = 4; + */ + private double dt; + + private ProtobufSimpleMotorFeedforward() { + } + + /** + * @return a new empty instance of {@code ProtobufSimpleMotorFeedforward} + */ + public static ProtobufSimpleMotorFeedforward newInstance() { + return new ProtobufSimpleMotorFeedforward(); + } + + /** + * optional double ks = 1; + * @return whether the ks field is set + */ + public boolean hasKs() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double ks = 1; + * @return this + */ + public ProtobufSimpleMotorFeedforward clearKs() { + bitField0_ &= ~0x00000001; + ks = 0D; + return this; + } + + /** + * optional double ks = 1; + * @return the ks + */ + public double getKs() { + return ks; + } + + /** + * optional double ks = 1; + * @param value the ks to set + * @return this + */ + public ProtobufSimpleMotorFeedforward setKs(final double value) { + bitField0_ |= 0x00000001; + ks = value; + return this; + } + + /** + * optional double kv = 2; + * @return whether the kv field is set + */ + public boolean hasKv() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double kv = 2; + * @return this + */ + public ProtobufSimpleMotorFeedforward clearKv() { + bitField0_ &= ~0x00000002; + kv = 0D; + return this; + } + + /** + * optional double kv = 2; + * @return the kv + */ + public double getKv() { + return kv; + } + + /** + * optional double kv = 2; + * @param value the kv to set + * @return this + */ + public ProtobufSimpleMotorFeedforward setKv(final double value) { + bitField0_ |= 0x00000002; + kv = value; + return this; + } + + /** + * optional double ka = 3; + * @return whether the ka field is set + */ + public boolean hasKa() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double ka = 3; + * @return this + */ + public ProtobufSimpleMotorFeedforward clearKa() { + bitField0_ &= ~0x00000004; + ka = 0D; + return this; + } + + /** + * optional double ka = 3; + * @return the ka + */ + public double getKa() { + return ka; + } + + /** + * optional double ka = 3; + * @param value the ka to set + * @return this + */ + public ProtobufSimpleMotorFeedforward setKa(final double value) { + bitField0_ |= 0x00000004; + ka = value; + return this; + } + + /** + * optional double dt = 4; + * @return whether the dt field is set + */ + public boolean hasDt() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double dt = 4; + * @return this + */ + public ProtobufSimpleMotorFeedforward clearDt() { + bitField0_ &= ~0x00000008; + dt = 0D; + return this; + } + + /** + * optional double dt = 4; + * @return the dt + */ + public double getDt() { + return dt; + } + + /** + * optional double dt = 4; + * @param value the dt to set + * @return this + */ + public ProtobufSimpleMotorFeedforward setDt(final double value) { + bitField0_ |= 0x00000008; + dt = value; + return this; + } + + @Override + public ProtobufSimpleMotorFeedforward copyFrom(final ProtobufSimpleMotorFeedforward other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + ks = other.ks; + kv = other.kv; + ka = other.ka; + dt = other.dt; + } + return this; + } + + @Override + public ProtobufSimpleMotorFeedforward mergeFrom(final ProtobufSimpleMotorFeedforward other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasKs()) { + setKs(other.ks); + } + if (other.hasKv()) { + setKv(other.kv); + } + if (other.hasKa()) { + setKa(other.ka); + } + if (other.hasDt()) { + setDt(other.dt); + } + return this; + } + + @Override + public ProtobufSimpleMotorFeedforward clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + ks = 0D; + kv = 0D; + ka = 0D; + dt = 0D; + return this; + } + + @Override + public ProtobufSimpleMotorFeedforward clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufSimpleMotorFeedforward)) { + return false; + } + ProtobufSimpleMotorFeedforward other = (ProtobufSimpleMotorFeedforward) o; + return bitField0_ == other.bitField0_ + && (!hasKs() || ProtoUtil.isEqual(ks, other.ks)) + && (!hasKv() || ProtoUtil.isEqual(kv, other.kv)) + && (!hasKa() || ProtoUtil.isEqual(ka, other.ka)) + && (!hasDt() || ProtoUtil.isEqual(dt, other.dt)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(ks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(kv); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(ka); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(dt); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufSimpleMotorFeedforward mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // ks + ks = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // kv + kv = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // ka + ka = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // dt + dt = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.ks, ks); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.kv, kv); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.ka, ka); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.dt, dt); + } + output.endObject(); + } + + @Override + public ProtobufSimpleMotorFeedforward mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3432: { + if (input.isAtField(FieldNames.ks)) { + if (!input.trySkipNullValue()) { + ks = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3435: { + if (input.isAtField(FieldNames.kv)) { + if (!input.trySkipNullValue()) { + kv = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3414: { + if (input.isAtField(FieldNames.ka)) { + if (!input.trySkipNullValue()) { + ka = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3216: { + if (input.isAtField(FieldNames.dt)) { + if (!input.trySkipNullValue()) { + dt = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufSimpleMotorFeedforward clone() { + return new ProtobufSimpleMotorFeedforward().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufSimpleMotorFeedforward parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), data).checkInitialized(); + } + + public static ProtobufSimpleMotorFeedforward parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), input).checkInitialized(); + } + + public static ProtobufSimpleMotorFeedforward parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufSimpleMotorFeedforward(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufSimpleMotorFeedforward messages + */ + public static MessageFactory getFactory() { + return ProtobufSimpleMotorFeedforwardFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufControllerDescriptor.wpi_proto_ProtobufSimpleMotorFeedforward_descriptor; + } + + private enum ProtobufSimpleMotorFeedforwardFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufSimpleMotorFeedforward create() { + return ProtobufSimpleMotorFeedforward.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName ks = FieldName.forField("ks"); + + static final FieldName kv = FieldName.forField("kv"); + + static final FieldName ka = FieldName.forField("ka"); + + static final FieldName dt = FieldName.forField("dt"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSplineDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSplineDescriptor.java new file mode 100644 index 0000000000..288b920374 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSplineDescriptor.java @@ -0,0 +1,44 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufSplineDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1060, + "CgxzcGxpbmUucHJvdG8SCXdwaS5wcm90byKIAQoaUHJvdG9idWZDdWJpY0hlcm1pdGVTcGxpbmUSGwoJ" + + "eF9pbml0aWFsGAEgAygBUgh4SW5pdGlhbBIXCgd4X2ZpbmFsGAIgAygBUgZ4RmluYWwSGwoJeV9pbml0" + + "aWFsGAMgAygBUgh5SW5pdGlhbBIXCgd5X2ZpbmFsGAQgAygBUgZ5RmluYWwiigEKHFByb3RvYnVmUXVp" + + "bnRpY0hlcm1pdGVTcGxpbmUSGwoJeF9pbml0aWFsGAEgAygBUgh4SW5pdGlhbBIXCgd4X2ZpbmFsGAIg" + + "AygBUgZ4RmluYWwSGwoJeV9pbml0aWFsGAMgAygBUgh5SW5pdGlhbBIXCgd5X2ZpbmFsGAQgAygBUgZ5" + + "RmluYWxCMwoVb3JnLndwaWxpYi5tYXRoLnByb3RvQhhQcm90b2J1ZlNwbGluZURlc2NyaXB0b3JQAUqz" + + "BQoGEgQAABYBCggKAQwSAwAAEgoICgECEgMCABIKCAoBCBIDBAAuCgkKAggBEgMEAC4KCAoBCBIDBgA5" + + "CgkKAggIEgMGADkKCAoBCBIDCAAiCgkKAggKEgMIACIKCgoCBAASBAoADwEKCgoDBAABEgMKCCIKCwoE" + + "BAACABIDCwIgCgwKBQQAAgAEEgMLAgoKDAoFBAACAAUSAwsLEQoMCgUEAAIAARIDCxIbCgwKBQQAAgAD" + + "EgMLHh8KCwoEBAACARIDDAIeCgwKBQQAAgEEEgMMAgoKDAoFBAACAQUSAwwLEQoMCgUEAAIBARIDDBIZ" + + "CgwKBQQAAgEDEgMMHB0KCwoEBAACAhIDDQIgCgwKBQQAAgIEEgMNAgoKDAoFBAACAgUSAw0LEQoMCgUE" + + "AAICARIDDRIbCgwKBQQAAgIDEgMNHh8KCwoEBAACAxIDDgIeCgwKBQQAAgMEEgMOAgoKDAoFBAACAwUS" + + "Aw4LEQoMCgUEAAIDARIDDhIZCgwKBQQAAgMDEgMOHB0KCgoCBAESBBEAFgEKCgoDBAEBEgMRCCQKCwoE" + + "BAECABIDEgIgCgwKBQQBAgAEEgMSAgoKDAoFBAECAAUSAxILEQoMCgUEAQIAARIDEhIbCgwKBQQBAgAD" + + "EgMSHh8KCwoEBAECARIDEwIeCgwKBQQBAgEEEgMTAgoKDAoFBAECAQUSAxMLEQoMCgUEAQIBARIDExIZ" + + "CgwKBQQBAgEDEgMTHB0KCwoEBAECAhIDFAIgCgwKBQQBAgIEEgMUAgoKDAoFBAECAgUSAxQLEQoMCgUE" + + "AQICARIDFBIbCgwKBQQBAgIDEgMUHh8KCwoEBAECAxIDFQIeCgwKBQQBAgMEEgMVAgoKDAoFBAECAwUS" + + "AxULEQoMCgUEAQIDARIDFRIZCgwKBQQBAgMDEgMVHB1iBnByb3RvMw=="); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("spline.proto", "wpi.proto", descriptorData); + + static final Descriptors.Descriptor wpi_proto_ProtobufCubicHermiteSpline_descriptor = descriptor.internalContainedType(28, 136, "ProtobufCubicHermiteSpline", "wpi.proto.ProtobufCubicHermiteSpline"); + + static final Descriptors.Descriptor wpi_proto_ProtobufQuinticHermiteSpline_descriptor = descriptor.internalContainedType(167, 138, "ProtobufQuinticHermiteSpline", "wpi.proto.ProtobufQuinticHermiteSpline"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveDriveKinematics.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveDriveKinematics.java new file mode 100644 index 0000000000..0549fb6b95 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveDriveKinematics.java @@ -0,0 +1,304 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedMessage; + +/** + * Protobuf type {@code ProtobufSwerveDriveKinematics} + */ +@SuppressWarnings("hiding") +public final class ProtobufSwerveDriveKinematics extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * repeated .wpi.proto.ProtobufTranslation2d modules = 1; + */ + private final RepeatedMessage modules = RepeatedMessage.newEmptyInstance(ProtobufTranslation2d.getFactory()); + + private ProtobufSwerveDriveKinematics() { + } + + /** + * @return a new empty instance of {@code ProtobufSwerveDriveKinematics} + */ + public static ProtobufSwerveDriveKinematics newInstance() { + return new ProtobufSwerveDriveKinematics(); + } + + /** + * repeated .wpi.proto.ProtobufTranslation2d modules = 1; + * @return whether the modules field is set + */ + public boolean hasModules() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * repeated .wpi.proto.ProtobufTranslation2d modules = 1; + * @return this + */ + public ProtobufSwerveDriveKinematics clearModules() { + bitField0_ &= ~0x00000001; + modules.clear(); + return this; + } + + /** + * repeated .wpi.proto.ProtobufTranslation2d modules = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableModules()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getModules() { + return modules; + } + + /** + * repeated .wpi.proto.ProtobufTranslation2d modules = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableModules() { + bitField0_ |= 0x00000001; + return modules; + } + + /** + * repeated .wpi.proto.ProtobufTranslation2d modules = 1; + * @param value the modules to add + * @return this + */ + public ProtobufSwerveDriveKinematics addModules(final ProtobufTranslation2d value) { + bitField0_ |= 0x00000001; + modules.add(value); + return this; + } + + /** + * repeated .wpi.proto.ProtobufTranslation2d modules = 1; + * @param values the modules to add + * @return this + */ + public ProtobufSwerveDriveKinematics addAllModules(final ProtobufTranslation2d... values) { + bitField0_ |= 0x00000001; + modules.addAll(values); + return this; + } + + @Override + public ProtobufSwerveDriveKinematics copyFrom(final ProtobufSwerveDriveKinematics other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + modules.copyFrom(other.modules); + } + return this; + } + + @Override + public ProtobufSwerveDriveKinematics mergeFrom(final ProtobufSwerveDriveKinematics other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasModules()) { + getMutableModules().addAll(other.modules); + } + return this; + } + + @Override + public ProtobufSwerveDriveKinematics clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + modules.clear(); + return this; + } + + @Override + public ProtobufSwerveDriveKinematics clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + modules.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufSwerveDriveKinematics)) { + return false; + } + ProtobufSwerveDriveKinematics other = (ProtobufSwerveDriveKinematics) o; + return bitField0_ == other.bitField0_ + && (!hasModules() || modules.equals(other.modules)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + for (int i = 0; i < modules.length(); i++) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(modules.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += (1 * modules.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(modules); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufSwerveDriveKinematics mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // modules + tag = input.readRepeatedMessage(modules, tag); + bitField0_ |= 0x00000001; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeRepeatedMessage(FieldNames.modules, modules); + } + output.endObject(); + } + + @Override + public ProtobufSwerveDriveKinematics mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 1227433863: { + if (input.isAtField(FieldNames.modules)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(modules); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufSwerveDriveKinematics clone() { + return new ProtobufSwerveDriveKinematics().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufSwerveDriveKinematics parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), data).checkInitialized(); + } + + public static ProtobufSwerveDriveKinematics parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), input).checkInitialized(); + } + + public static ProtobufSwerveDriveKinematics parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveDriveKinematics(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufSwerveDriveKinematics messages + */ + public static MessageFactory getFactory() { + return ProtobufSwerveDriveKinematicsFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufSwerveDriveKinematics_descriptor; + } + + private enum ProtobufSwerveDriveKinematicsFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufSwerveDriveKinematics create() { + return ProtobufSwerveDriveKinematics.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName modules = FieldName.forField("modules"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModuleAcceleration.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModuleAcceleration.java new file mode 100644 index 0000000000..6db0cc2177 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModuleAcceleration.java @@ -0,0 +1,373 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufSwerveModuleAcceleration} + */ +@SuppressWarnings("hiding") +public final class ProtobufSwerveModuleAcceleration extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double acceleration = 1; + */ + private double acceleration; + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + */ + private final ProtobufRotation2d angle = ProtobufRotation2d.newInstance(); + + private ProtobufSwerveModuleAcceleration() { + } + + /** + * @return a new empty instance of {@code ProtobufSwerveModuleAcceleration} + */ + public static ProtobufSwerveModuleAcceleration newInstance() { + return new ProtobufSwerveModuleAcceleration(); + } + + /** + * optional double acceleration = 1; + * @return whether the acceleration field is set + */ + public boolean hasAcceleration() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double acceleration = 1; + * @return this + */ + public ProtobufSwerveModuleAcceleration clearAcceleration() { + bitField0_ &= ~0x00000001; + acceleration = 0D; + return this; + } + + /** + * optional double acceleration = 1; + * @return the acceleration + */ + public double getAcceleration() { + return acceleration; + } + + /** + * optional double acceleration = 1; + * @param value the acceleration to set + * @return this + */ + public ProtobufSwerveModuleAcceleration setAcceleration(final double value) { + bitField0_ |= 0x00000001; + acceleration = value; + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @return whether the angle field is set + */ + public boolean hasAngle() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @return this + */ + public ProtobufSwerveModuleAcceleration clearAngle() { + bitField0_ &= ~0x00000002; + angle.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAngle()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufRotation2d getAngle() { + return angle; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufRotation2d getMutableAngle() { + bitField0_ |= 0x00000002; + return angle; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @param value the angle to set + * @return this + */ + public ProtobufSwerveModuleAcceleration setAngle(final ProtobufRotation2d value) { + bitField0_ |= 0x00000002; + angle.copyFrom(value); + return this; + } + + @Override + public ProtobufSwerveModuleAcceleration copyFrom(final ProtobufSwerveModuleAcceleration other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + acceleration = other.acceleration; + angle.copyFrom(other.angle); + } + return this; + } + + @Override + public ProtobufSwerveModuleAcceleration mergeFrom(final ProtobufSwerveModuleAcceleration other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasAcceleration()) { + setAcceleration(other.acceleration); + } + if (other.hasAngle()) { + getMutableAngle().mergeFrom(other.angle); + } + return this; + } + + @Override + public ProtobufSwerveModuleAcceleration clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + acceleration = 0D; + angle.clear(); + return this; + } + + @Override + public ProtobufSwerveModuleAcceleration clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + angle.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufSwerveModuleAcceleration)) { + return false; + } + ProtobufSwerveModuleAcceleration other = (ProtobufSwerveModuleAcceleration) o; + return bitField0_ == other.bitField0_ + && (!hasAcceleration() || ProtoUtil.isEqual(acceleration, other.acceleration)) + && (!hasAngle() || angle.equals(other.angle)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(acceleration); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(angle); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(angle); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufSwerveModuleAcceleration mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // acceleration + acceleration = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // angle + input.readMessage(angle); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.acceleration, acceleration); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.angle, angle); + } + output.endObject(); + } + + @Override + public ProtobufSwerveModuleAcceleration mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -267299712: { + if (input.isAtField(FieldNames.acceleration)) { + if (!input.trySkipNullValue()) { + acceleration = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 92960979: { + if (input.isAtField(FieldNames.angle)) { + if (!input.trySkipNullValue()) { + input.readMessage(angle); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufSwerveModuleAcceleration clone() { + return new ProtobufSwerveModuleAcceleration().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufSwerveModuleAcceleration parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModuleAcceleration(), data).checkInitialized(); + } + + public static ProtobufSwerveModuleAcceleration parseFrom(final ProtoSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModuleAcceleration(), input).checkInitialized(); + } + + public static ProtobufSwerveModuleAcceleration parseFrom(final JsonSource input) throws + IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModuleAcceleration(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufSwerveModuleAcceleration messages + */ + public static MessageFactory getFactory() { + return ProtobufSwerveModuleAccelerationFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufSwerveModuleAcceleration_descriptor; + } + + private enum ProtobufSwerveModuleAccelerationFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufSwerveModuleAcceleration create() { + return ProtobufSwerveModuleAcceleration.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName acceleration = FieldName.forField("acceleration"); + + static final FieldName angle = FieldName.forField("angle"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModulePosition.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModulePosition.java new file mode 100644 index 0000000000..f25ba6b5e9 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModulePosition.java @@ -0,0 +1,371 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufSwerveModulePosition} + */ +@SuppressWarnings("hiding") +public final class ProtobufSwerveModulePosition extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double distance = 1; + */ + private double distance; + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + */ + private final ProtobufRotation2d angle = ProtobufRotation2d.newInstance(); + + private ProtobufSwerveModulePosition() { + } + + /** + * @return a new empty instance of {@code ProtobufSwerveModulePosition} + */ + public static ProtobufSwerveModulePosition newInstance() { + return new ProtobufSwerveModulePosition(); + } + + /** + * optional double distance = 1; + * @return whether the distance field is set + */ + public boolean hasDistance() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double distance = 1; + * @return this + */ + public ProtobufSwerveModulePosition clearDistance() { + bitField0_ &= ~0x00000001; + distance = 0D; + return this; + } + + /** + * optional double distance = 1; + * @return the distance + */ + public double getDistance() { + return distance; + } + + /** + * optional double distance = 1; + * @param value the distance to set + * @return this + */ + public ProtobufSwerveModulePosition setDistance(final double value) { + bitField0_ |= 0x00000001; + distance = value; + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @return whether the angle field is set + */ + public boolean hasAngle() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @return this + */ + public ProtobufSwerveModulePosition clearAngle() { + bitField0_ &= ~0x00000002; + angle.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAngle()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufRotation2d getAngle() { + return angle; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufRotation2d getMutableAngle() { + bitField0_ |= 0x00000002; + return angle; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @param value the angle to set + * @return this + */ + public ProtobufSwerveModulePosition setAngle(final ProtobufRotation2d value) { + bitField0_ |= 0x00000002; + angle.copyFrom(value); + return this; + } + + @Override + public ProtobufSwerveModulePosition copyFrom(final ProtobufSwerveModulePosition other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + distance = other.distance; + angle.copyFrom(other.angle); + } + return this; + } + + @Override + public ProtobufSwerveModulePosition mergeFrom(final ProtobufSwerveModulePosition other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDistance()) { + setDistance(other.distance); + } + if (other.hasAngle()) { + getMutableAngle().mergeFrom(other.angle); + } + return this; + } + + @Override + public ProtobufSwerveModulePosition clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + distance = 0D; + angle.clear(); + return this; + } + + @Override + public ProtobufSwerveModulePosition clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + angle.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufSwerveModulePosition)) { + return false; + } + ProtobufSwerveModulePosition other = (ProtobufSwerveModulePosition) o; + return bitField0_ == other.bitField0_ + && (!hasDistance() || ProtoUtil.isEqual(distance, other.distance)) + && (!hasAngle() || angle.equals(other.angle)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(distance); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(angle); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(angle); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufSwerveModulePosition mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // distance + distance = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // angle + input.readMessage(angle); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.distance, distance); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.angle, angle); + } + output.endObject(); + } + + @Override + public ProtobufSwerveModulePosition mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 288459765: { + if (input.isAtField(FieldNames.distance)) { + if (!input.trySkipNullValue()) { + distance = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 92960979: { + if (input.isAtField(FieldNames.angle)) { + if (!input.trySkipNullValue()) { + input.readMessage(angle); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufSwerveModulePosition clone() { + return new ProtobufSwerveModulePosition().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufSwerveModulePosition parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), data).checkInitialized(); + } + + public static ProtobufSwerveModulePosition parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), input).checkInitialized(); + } + + public static ProtobufSwerveModulePosition parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModulePosition(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufSwerveModulePosition messages + */ + public static MessageFactory getFactory() { + return ProtobufSwerveModulePositionFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufSwerveModulePosition_descriptor; + } + + private enum ProtobufSwerveModulePositionFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufSwerveModulePosition create() { + return ProtobufSwerveModulePosition.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName distance = FieldName.forField("distance"); + + static final FieldName angle = FieldName.forField("angle"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModuleState.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModuleState.java new file mode 100644 index 0000000000..2ea2658c76 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSwerveModuleState.java @@ -0,0 +1,371 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufSwerveModuleState} + */ +@SuppressWarnings("hiding") +public final class ProtobufSwerveModuleState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double speed = 1; + */ + private double speed; + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + */ + private final ProtobufRotation2d angle = ProtobufRotation2d.newInstance(); + + private ProtobufSwerveModuleState() { + } + + /** + * @return a new empty instance of {@code ProtobufSwerveModuleState} + */ + public static ProtobufSwerveModuleState newInstance() { + return new ProtobufSwerveModuleState(); + } + + /** + * optional double speed = 1; + * @return whether the speed field is set + */ + public boolean hasSpeed() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double speed = 1; + * @return this + */ + public ProtobufSwerveModuleState clearSpeed() { + bitField0_ &= ~0x00000001; + speed = 0D; + return this; + } + + /** + * optional double speed = 1; + * @return the speed + */ + public double getSpeed() { + return speed; + } + + /** + * optional double speed = 1; + * @param value the speed to set + * @return this + */ + public ProtobufSwerveModuleState setSpeed(final double value) { + bitField0_ |= 0x00000001; + speed = value; + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @return whether the angle field is set + */ + public boolean hasAngle() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @return this + */ + public ProtobufSwerveModuleState clearAngle() { + bitField0_ &= ~0x00000002; + angle.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableAngle()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufRotation2d getAngle() { + return angle; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufRotation2d getMutableAngle() { + bitField0_ |= 0x00000002; + return angle; + } + + /** + * optional .wpi.proto.ProtobufRotation2d angle = 2; + * @param value the angle to set + * @return this + */ + public ProtobufSwerveModuleState setAngle(final ProtobufRotation2d value) { + bitField0_ |= 0x00000002; + angle.copyFrom(value); + return this; + } + + @Override + public ProtobufSwerveModuleState copyFrom(final ProtobufSwerveModuleState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + speed = other.speed; + angle.copyFrom(other.angle); + } + return this; + } + + @Override + public ProtobufSwerveModuleState mergeFrom(final ProtobufSwerveModuleState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasSpeed()) { + setSpeed(other.speed); + } + if (other.hasAngle()) { + getMutableAngle().mergeFrom(other.angle); + } + return this; + } + + @Override + public ProtobufSwerveModuleState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + speed = 0D; + angle.clear(); + return this; + } + + @Override + public ProtobufSwerveModuleState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + angle.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufSwerveModuleState)) { + return false; + } + ProtobufSwerveModuleState other = (ProtobufSwerveModuleState) o; + return bitField0_ == other.bitField0_ + && (!hasSpeed() || ProtoUtil.isEqual(speed, other.speed)) + && (!hasAngle() || angle.equals(other.angle)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(speed); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(angle); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(angle); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufSwerveModuleState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // speed + speed = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // angle + input.readMessage(angle); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.speed, speed); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.angle, angle); + } + output.endObject(); + } + + @Override + public ProtobufSwerveModuleState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 109641799: { + if (input.isAtField(FieldNames.speed)) { + if (!input.trySkipNullValue()) { + speed = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 92960979: { + if (input.isAtField(FieldNames.angle)) { + if (!input.trySkipNullValue()) { + input.readMessage(angle); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufSwerveModuleState clone() { + return new ProtobufSwerveModuleState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufSwerveModuleState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), data).checkInitialized(); + } + + public static ProtobufSwerveModuleState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), input).checkInitialized(); + } + + public static ProtobufSwerveModuleState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufSwerveModuleState(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufSwerveModuleState messages + */ + public static MessageFactory getFactory() { + return ProtobufSwerveModuleStateFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufKinematicsDescriptor.wpi_proto_ProtobufSwerveModuleState_descriptor; + } + + private enum ProtobufSwerveModuleStateFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufSwerveModuleState create() { + return ProtobufSwerveModuleState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName speed = FieldName.forField("speed"); + + static final FieldName angle = FieldName.forField("angle"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSystemDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSystemDescriptor.java new file mode 100644 index 0000000000..615f7cf69f --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufSystemDescriptor.java @@ -0,0 +1,50 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufSystemDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1397, + "CgxzeXN0ZW0ucHJvdG8SCXdwaS5wcm90bxoNd3BpbWF0aC5wcm90byLEAQoPUHJvdG9idWZEQ01vdG9y" + + "EicKD25vbWluYWxfdm9sdGFnZRgBIAEoAVIObm9taW5hbFZvbHRhZ2USIQoMc3RhbGxfdG9ycXVlGAIg" + + "ASgBUgtzdGFsbFRvcnF1ZRIjCg1zdGFsbF9jdXJyZW50GAMgASgBUgxzdGFsbEN1cnJlbnQSIQoMZnJl" + + "ZV9jdXJyZW50GAQgASgBUgtmcmVlQ3VycmVudBIdCgpmcmVlX3NwZWVkGAUgASgBUglmcmVlU3BlZWQi" + + "mQIKFFByb3RvYnVmTGluZWFyU3lzdGVtEh0KCm51bV9zdGF0ZXMYASABKA1SCW51bVN0YXRlcxIdCgpu" + + "dW1faW5wdXRzGAIgASgNUgludW1JbnB1dHMSHwoLbnVtX291dHB1dHMYAyABKA1SCm51bU91dHB1dHMS" + + "JwoBYRgEIAEoCzIZLndwaS5wcm90by5Qcm90b2J1Zk1hdHJpeFIBYRInCgFiGAUgASgLMhkud3BpLnBy" + + "b3RvLlByb3RvYnVmTWF0cml4UgFiEicKAWMYBiABKAsyGS53cGkucHJvdG8uUHJvdG9idWZNYXRyaXhS" + + "AWMSJwoBZBgHIAEoCzIZLndwaS5wcm90by5Qcm90b2J1Zk1hdHJpeFIBZEIzChVvcmcud3BpbGliLm1h" + + "dGgucHJvdG9CGFByb3RvYnVmU3lzdGVtRGVzY3JpcHRvclABSqoGCgYSBAAAHAEKCAoBDBIDAAASCggK" + + "AQISAwIAEgoJCgIDABIDBAAXCggKAQgSAwYALgoJCgIIARIDBgAuCggKAQgSAwgAOQoJCgIICBIDCAA5" + + "CggKAQgSAwoAIgoJCgIIChIDCgAiCgoKAgQAEgQMABIBCgoKAwQAARIDDAgXCgsKBAQAAgASAw0CHQoM" + + "CgUEAAIABRIDDQIICgwKBQQAAgABEgMNCRgKDAoFBAACAAMSAw0bHAoLCgQEAAIBEgMOAhoKDAoFBAAC" + + "AQUSAw4CCAoMCgUEAAIBARIDDgkVCgwKBQQAAgEDEgMOGBkKCwoEBAACAhIDDwIbCgwKBQQAAgIFEgMP" + + "AggKDAoFBAACAgESAw8JFgoMCgUEAAICAxIDDxkaCgsKBAQAAgMSAxACGgoMCgUEAAIDBRIDEAIICgwK" + + "BQQAAgMBEgMQCRUKDAoFBAACAwMSAxAYGQoLCgQEAAIEEgMRAhgKDAoFBAACBAUSAxECCAoMCgUEAAIE" + + "ARIDEQkTCgwKBQQAAgQDEgMRFhcKCgoCBAESBBQAHAEKCgoDBAEBEgMUCBwKCwoEBAECABIDFQIYCgwK" + + "BQQBAgAFEgMVAggKDAoFBAECAAESAxUJEwoMCgUEAQIAAxIDFRYXCgsKBAQBAgESAxYCGAoMCgUEAQIB" + + "BRIDFgIICgwKBQQBAgEBEgMWCRMKDAoFBAECAQMSAxYWFwoLCgQEAQICEgMXAhkKDAoFBAECAgUSAxcC" + + "CAoMCgUEAQICARIDFwkUCgwKBQQBAgIDEgMXFxgKCwoEBAECAxIDGAIXCgwKBQQBAgMGEgMYAhAKDAoF", + "BAECAwESAxgREgoMCgUEAQIDAxIDGBUWCgsKBAQBAgQSAxkCFwoMCgUEAQIEBhIDGQIQCgwKBQQBAgQB" + + "EgMZERIKDAoFBAECBAMSAxkVFgoLCgQEAQIFEgMaAhcKDAoFBAECBQYSAxoCEAoMCgUEAQIFARIDGhES" + + "CgwKBQQBAgUDEgMaFRYKCwoEBAECBhIDGwIXCgwKBQQBAgYGEgMbAhAKDAoFBAECBgESAxsREgoMCgUE" + + "AQIGAxIDGxUWYgZwcm90bzM="); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("system.proto", "wpi.proto", descriptorData, ProtobufWPIMathDescriptor.getDescriptor()); + + static final Descriptors.Descriptor wpi_proto_ProtobufDCMotor_descriptor = descriptor.internalContainedType(43, 196, "ProtobufDCMotor", "wpi.proto.ProtobufDCMotor"); + + static final Descriptors.Descriptor wpi_proto_ProtobufLinearSystem_descriptor = descriptor.internalContainedType(242, 281, "ProtobufLinearSystem", "wpi.proto.ProtobufLinearSystem"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectory.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectory.java new file mode 100644 index 0000000000..11c2ba72fd --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectory.java @@ -0,0 +1,303 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedMessage; + +/** + * Protobuf type {@code ProtobufTrajectory} + */ +@SuppressWarnings("hiding") +public final class ProtobufTrajectory extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * repeated .wpi.proto.ProtobufTrajectoryState states = 2; + */ + private final RepeatedMessage states = RepeatedMessage.newEmptyInstance(ProtobufTrajectoryState.getFactory()); + + private ProtobufTrajectory() { + } + + /** + * @return a new empty instance of {@code ProtobufTrajectory} + */ + public static ProtobufTrajectory newInstance() { + return new ProtobufTrajectory(); + } + + /** + * repeated .wpi.proto.ProtobufTrajectoryState states = 2; + * @return whether the states field is set + */ + public boolean hasStates() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * repeated .wpi.proto.ProtobufTrajectoryState states = 2; + * @return this + */ + public ProtobufTrajectory clearStates() { + bitField0_ &= ~0x00000001; + states.clear(); + return this; + } + + /** + * repeated .wpi.proto.ProtobufTrajectoryState states = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableStates()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedMessage getStates() { + return states; + } + + /** + * repeated .wpi.proto.ProtobufTrajectoryState states = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedMessage getMutableStates() { + bitField0_ |= 0x00000001; + return states; + } + + /** + * repeated .wpi.proto.ProtobufTrajectoryState states = 2; + * @param value the states to add + * @return this + */ + public ProtobufTrajectory addStates(final ProtobufTrajectoryState value) { + bitField0_ |= 0x00000001; + states.add(value); + return this; + } + + /** + * repeated .wpi.proto.ProtobufTrajectoryState states = 2; + * @param values the states to add + * @return this + */ + public ProtobufTrajectory addAllStates(final ProtobufTrajectoryState... values) { + bitField0_ |= 0x00000001; + states.addAll(values); + return this; + } + + @Override + public ProtobufTrajectory copyFrom(final ProtobufTrajectory other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + states.copyFrom(other.states); + } + return this; + } + + @Override + public ProtobufTrajectory mergeFrom(final ProtobufTrajectory other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasStates()) { + getMutableStates().addAll(other.states); + } + return this; + } + + @Override + public ProtobufTrajectory clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + states.clear(); + return this; + } + + @Override + public ProtobufTrajectory clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + states.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTrajectory)) { + return false; + } + ProtobufTrajectory other = (ProtobufTrajectory) o; + return bitField0_ == other.bitField0_ + && (!hasStates() || states.equals(other.states)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + for (int i = 0; i < states.length(); i++) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(states.get(i)); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += (1 * states.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(states); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTrajectory mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 18: { + // states + tag = input.readRepeatedMessage(states, tag); + bitField0_ |= 0x00000001; + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeRepeatedMessage(FieldNames.states, states); + } + output.endObject(); + } + + @Override + public ProtobufTrajectory mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -892482046: { + if (input.isAtField(FieldNames.states)) { + if (!input.trySkipNullValue()) { + input.readRepeatedMessage(states); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTrajectory clone() { + return new ProtobufTrajectory().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTrajectory parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTrajectory(), data).checkInitialized(); + } + + public static ProtobufTrajectory parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTrajectory(), input).checkInitialized(); + } + + public static ProtobufTrajectory parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTrajectory(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTrajectory messages + */ + public static MessageFactory getFactory() { + return ProtobufTrajectoryFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufTrajectoryDescriptor.wpi_proto_ProtobufTrajectory_descriptor; + } + + private enum ProtobufTrajectoryFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTrajectory create() { + return ProtobufTrajectory.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName states = FieldName.forField("states"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectoryDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectoryDescriptor.java new file mode 100644 index 0000000000..688a5091bf --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectoryDescriptor.java @@ -0,0 +1,41 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufTrajectoryDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(880, + "ChB0cmFqZWN0b3J5LnByb3RvEgl3cGkucHJvdG8aEGdlb21ldHJ5MmQucHJvdG8iugEKF1Byb3RvYnVm" + + "VHJhamVjdG9yeVN0YXRlEhIKBHRpbWUYASABKAFSBHRpbWUSGgoIdmVsb2NpdHkYAiABKAFSCHZlbG9j" + + "aXR5EiIKDGFjY2VsZXJhdGlvbhgDIAEoAVIMYWNjZWxlcmF0aW9uEi0KBHBvc2UYBCABKAsyGS53cGku" + + "cHJvdG8uUHJvdG9idWZQb3NlMmRSBHBvc2USHAoJY3VydmF0dXJlGAUgASgBUgljdXJ2YXR1cmUiUAoS" + + "UHJvdG9idWZUcmFqZWN0b3J5EjoKBnN0YXRlcxgCIAMoCzIiLndwaS5wcm90by5Qcm90b2J1ZlRyYWpl" + + "Y3RvcnlTdGF0ZVIGc3RhdGVzQjcKFW9yZy53cGlsaWIubWF0aC5wcm90b0IcUHJvdG9idWZUcmFqZWN0" + + "b3J5RGVzY3JpcHRvclABSu4DCgYSBAAAFgEKCAoBDBIDAAASCggKAQISAwIAEgoJCgIDABIDBAAaCggK" + + "AQgSAwYALgoJCgIIARIDBgAuCggKAQgSAwgAPQoJCgIICBIDCAA9CggKAQgSAwoAIgoJCgIIChIDCgAi" + + "CgoKAgQAEgQMABIBCgoKAwQAARIDDAgfCgsKBAQAAgASAw0CEgoMCgUEAAIABRIDDQIICgwKBQQAAgAB" + + "EgMNCQ0KDAoFBAACAAMSAw0QEQoLCgQEAAIBEgMOAhYKDAoFBAACAQUSAw4CCAoMCgUEAAIBARIDDgkR" + + "CgwKBQQAAgEDEgMOFBUKCwoEBAACAhIDDwIaCgwKBQQAAgIFEgMPAggKDAoFBAACAgESAw8JFQoMCgUE" + + "AAICAxIDDxgZCgsKBAQAAgMSAxACGgoMCgUEAAIDBhIDEAIQCgwKBQQAAgMBEgMQERUKDAoFBAACAwMS" + + "AxAYGQoLCgQEAAIEEgMRAhcKDAoFBAACBAUSAxECCAoMCgUEAAIEARIDEQkSCgwKBQQAAgQDEgMRFRYK" + + "CgoCBAESBBQAFgEKCgoDBAEBEgMUCBoKCwoEBAECABIDFQIuCgwKBQQBAgAEEgMVAgoKDAoFBAECAAYS" + + "AxULIgoMCgUEAQIAARIDFSMpCgwKBQQBAgADEgMVLC1iBnByb3RvMw=="); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("trajectory.proto", "wpi.proto", descriptorData, ProtobufGeometry2dDescriptor.getDescriptor()); + + static final Descriptors.Descriptor wpi_proto_ProtobufTrajectoryState_descriptor = descriptor.internalContainedType(50, 186, "ProtobufTrajectoryState", "wpi.proto.ProtobufTrajectoryState"); + + static final Descriptors.Descriptor wpi_proto_ProtobufTrajectory_descriptor = descriptor.internalContainedType(238, 80, "ProtobufTrajectory", "wpi.proto.ProtobufTrajectory"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectoryState.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectoryState.java new file mode 100644 index 0000000000..3c297b33e1 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTrajectoryState.java @@ -0,0 +1,611 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufTrajectoryState} + */ +@SuppressWarnings("hiding") +public final class ProtobufTrajectoryState extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double time = 1; + */ + private double time; + + /** + * optional double velocity = 2; + */ + private double velocity; + + /** + * optional double acceleration = 3; + */ + private double acceleration; + + /** + * optional double curvature = 5; + */ + private double curvature; + + /** + * optional .wpi.proto.ProtobufPose2d pose = 4; + */ + private final ProtobufPose2d pose = ProtobufPose2d.newInstance(); + + private ProtobufTrajectoryState() { + } + + /** + * @return a new empty instance of {@code ProtobufTrajectoryState} + */ + public static ProtobufTrajectoryState newInstance() { + return new ProtobufTrajectoryState(); + } + + /** + * optional double time = 1; + * @return whether the time field is set + */ + public boolean hasTime() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double time = 1; + * @return this + */ + public ProtobufTrajectoryState clearTime() { + bitField0_ &= ~0x00000001; + time = 0D; + return this; + } + + /** + * optional double time = 1; + * @return the time + */ + public double getTime() { + return time; + } + + /** + * optional double time = 1; + * @param value the time to set + * @return this + */ + public ProtobufTrajectoryState setTime(final double value) { + bitField0_ |= 0x00000001; + time = value; + return this; + } + + /** + * optional double velocity = 2; + * @return whether the velocity field is set + */ + public boolean hasVelocity() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double velocity = 2; + * @return this + */ + public ProtobufTrajectoryState clearVelocity() { + bitField0_ &= ~0x00000002; + velocity = 0D; + return this; + } + + /** + * optional double velocity = 2; + * @return the velocity + */ + public double getVelocity() { + return velocity; + } + + /** + * optional double velocity = 2; + * @param value the velocity to set + * @return this + */ + public ProtobufTrajectoryState setVelocity(final double value) { + bitField0_ |= 0x00000002; + velocity = value; + return this; + } + + /** + * optional double acceleration = 3; + * @return whether the acceleration field is set + */ + public boolean hasAcceleration() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double acceleration = 3; + * @return this + */ + public ProtobufTrajectoryState clearAcceleration() { + bitField0_ &= ~0x00000004; + acceleration = 0D; + return this; + } + + /** + * optional double acceleration = 3; + * @return the acceleration + */ + public double getAcceleration() { + return acceleration; + } + + /** + * optional double acceleration = 3; + * @param value the acceleration to set + * @return this + */ + public ProtobufTrajectoryState setAcceleration(final double value) { + bitField0_ |= 0x00000004; + acceleration = value; + return this; + } + + /** + * optional double curvature = 5; + * @return whether the curvature field is set + */ + public boolean hasCurvature() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double curvature = 5; + * @return this + */ + public ProtobufTrajectoryState clearCurvature() { + bitField0_ &= ~0x00000008; + curvature = 0D; + return this; + } + + /** + * optional double curvature = 5; + * @return the curvature + */ + public double getCurvature() { + return curvature; + } + + /** + * optional double curvature = 5; + * @param value the curvature to set + * @return this + */ + public ProtobufTrajectoryState setCurvature(final double value) { + bitField0_ |= 0x00000008; + curvature = value; + return this; + } + + /** + * optional .wpi.proto.ProtobufPose2d pose = 4; + * @return whether the pose field is set + */ + public boolean hasPose() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional .wpi.proto.ProtobufPose2d pose = 4; + * @return this + */ + public ProtobufTrajectoryState clearPose() { + bitField0_ &= ~0x00000010; + pose.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufPose2d pose = 4; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutablePose()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufPose2d getPose() { + return pose; + } + + /** + * optional .wpi.proto.ProtobufPose2d pose = 4; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufPose2d getMutablePose() { + bitField0_ |= 0x00000010; + return pose; + } + + /** + * optional .wpi.proto.ProtobufPose2d pose = 4; + * @param value the pose to set + * @return this + */ + public ProtobufTrajectoryState setPose(final ProtobufPose2d value) { + bitField0_ |= 0x00000010; + pose.copyFrom(value); + return this; + } + + @Override + public ProtobufTrajectoryState copyFrom(final ProtobufTrajectoryState other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + time = other.time; + velocity = other.velocity; + acceleration = other.acceleration; + curvature = other.curvature; + pose.copyFrom(other.pose); + } + return this; + } + + @Override + public ProtobufTrajectoryState mergeFrom(final ProtobufTrajectoryState other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTime()) { + setTime(other.time); + } + if (other.hasVelocity()) { + setVelocity(other.velocity); + } + if (other.hasAcceleration()) { + setAcceleration(other.acceleration); + } + if (other.hasCurvature()) { + setCurvature(other.curvature); + } + if (other.hasPose()) { + getMutablePose().mergeFrom(other.pose); + } + return this; + } + + @Override + public ProtobufTrajectoryState clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + time = 0D; + velocity = 0D; + acceleration = 0D; + curvature = 0D; + pose.clear(); + return this; + } + + @Override + public ProtobufTrajectoryState clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + pose.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTrajectoryState)) { + return false; + } + ProtobufTrajectoryState other = (ProtobufTrajectoryState) o; + return bitField0_ == other.bitField0_ + && (!hasTime() || ProtoUtil.isEqual(time, other.time)) + && (!hasVelocity() || ProtoUtil.isEqual(velocity, other.velocity)) + && (!hasAcceleration() || ProtoUtil.isEqual(acceleration, other.acceleration)) + && (!hasCurvature() || ProtoUtil.isEqual(curvature, other.curvature)) + && (!hasPose() || pose.equals(other.pose)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(velocity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(acceleration); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 41); + output.writeDoubleNoTag(curvature); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 34); + output.writeMessageNoTag(pose); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(pose); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTrajectoryState mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // time + time = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // velocity + velocity = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // acceleration + acceleration = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 41) { + break; + } + } + case 41: { + // curvature + curvature = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 34) { + break; + } + } + case 34: { + // pose + input.readMessage(pose); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.time, time); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.velocity, velocity); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.acceleration, acceleration); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.curvature, curvature); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeMessage(FieldNames.pose, pose); + } + output.endObject(); + } + + @Override + public ProtobufTrajectoryState mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3560141: { + if (input.isAtField(FieldNames.time)) { + if (!input.trySkipNullValue()) { + time = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 2134260957: { + if (input.isAtField(FieldNames.velocity)) { + if (!input.trySkipNullValue()) { + velocity = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -267299712: { + if (input.isAtField(FieldNames.acceleration)) { + if (!input.trySkipNullValue()) { + acceleration = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 768611295: { + if (input.isAtField(FieldNames.curvature)) { + if (!input.trySkipNullValue()) { + curvature = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3446929: { + if (input.isAtField(FieldNames.pose)) { + if (!input.trySkipNullValue()) { + input.readMessage(pose); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTrajectoryState clone() { + return new ProtobufTrajectoryState().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTrajectoryState parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTrajectoryState(), data).checkInitialized(); + } + + public static ProtobufTrajectoryState parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTrajectoryState(), input).checkInitialized(); + } + + public static ProtobufTrajectoryState parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTrajectoryState(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTrajectoryState messages + */ + public static MessageFactory getFactory() { + return ProtobufTrajectoryStateFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufTrajectoryDescriptor.wpi_proto_ProtobufTrajectoryState_descriptor; + } + + private enum ProtobufTrajectoryStateFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTrajectoryState create() { + return ProtobufTrajectoryState.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName time = FieldName.forField("time"); + + static final FieldName velocity = FieldName.forField("velocity"); + + static final FieldName acceleration = FieldName.forField("acceleration"); + + static final FieldName curvature = FieldName.forField("curvature"); + + static final FieldName pose = FieldName.forField("pose"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTransform2d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTransform2d.java new file mode 100644 index 0000000000..b09e5d077a --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTransform2d.java @@ -0,0 +1,391 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +/** + * Protobuf type {@code ProtobufTransform2d} + */ +@SuppressWarnings("hiding") +public final class ProtobufTransform2d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + */ + private final ProtobufTranslation2d translation = ProtobufTranslation2d.newInstance(); + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + */ + private final ProtobufRotation2d rotation = ProtobufRotation2d.newInstance(); + + private ProtobufTransform2d() { + } + + /** + * @return a new empty instance of {@code ProtobufTransform2d} + */ + public static ProtobufTransform2d newInstance() { + return new ProtobufTransform2d(); + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * @return whether the translation field is set + */ + public boolean hasTranslation() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * @return this + */ + public ProtobufTransform2d clearTranslation() { + bitField0_ &= ~0x00000001; + translation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTranslation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation2d getTranslation() { + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation2d getMutableTranslation() { + bitField0_ |= 0x00000001; + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation2d translation = 1; + * @param value the translation to set + * @return this + */ + public ProtobufTransform2d setTranslation(final ProtobufTranslation2d value) { + bitField0_ |= 0x00000001; + translation.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * @return whether the rotation field is set + */ + public boolean hasRotation() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * @return this + */ + public ProtobufTransform2d clearRotation() { + bitField0_ &= ~0x00000002; + rotation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRotation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufRotation2d getRotation() { + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufRotation2d getMutableRotation() { + bitField0_ |= 0x00000002; + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation2d rotation = 2; + * @param value the rotation to set + * @return this + */ + public ProtobufTransform2d setRotation(final ProtobufRotation2d value) { + bitField0_ |= 0x00000002; + rotation.copyFrom(value); + return this; + } + + @Override + public ProtobufTransform2d copyFrom(final ProtobufTransform2d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + translation.copyFrom(other.translation); + rotation.copyFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufTransform2d mergeFrom(final ProtobufTransform2d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTranslation()) { + getMutableTranslation().mergeFrom(other.translation); + } + if (other.hasRotation()) { + getMutableRotation().mergeFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufTransform2d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clear(); + rotation.clear(); + return this; + } + + @Override + public ProtobufTransform2d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clearQuick(); + rotation.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTransform2d)) { + return false; + } + ProtobufTransform2d other = (ProtobufTransform2d) o; + return bitField0_ == other.bitField0_ + && (!hasTranslation() || translation.equals(other.translation)) + && (!hasRotation() || rotation.equals(other.rotation)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rotation); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTransform2d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // translation + input.readMessage(translation); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rotation + input.readMessage(rotation); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.translation, translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.rotation, rotation); + } + output.endObject(); + } + + @Override + public ProtobufTransform2d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1840647503: { + if (input.isAtField(FieldNames.translation)) { + if (!input.trySkipNullValue()) { + input.readMessage(translation); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -40300674: { + if (input.isAtField(FieldNames.rotation)) { + if (!input.trySkipNullValue()) { + input.readMessage(rotation); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTransform2d clone() { + return new ProtobufTransform2d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTransform2d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTransform2d(), data).checkInitialized(); + } + + public static ProtobufTransform2d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTransform2d(), input).checkInitialized(); + } + + public static ProtobufTransform2d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTransform2d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTransform2d messages + */ + public static MessageFactory getFactory() { + return ProtobufTransform2dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry2dDescriptor.wpi_proto_ProtobufTransform2d_descriptor; + } + + private enum ProtobufTransform2dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTransform2d create() { + return ProtobufTransform2d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName translation = FieldName.forField("translation"); + + static final FieldName rotation = FieldName.forField("rotation"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTransform3d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTransform3d.java new file mode 100644 index 0000000000..6485b1cc58 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTransform3d.java @@ -0,0 +1,391 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; + +/** + * Protobuf type {@code ProtobufTransform3d} + */ +@SuppressWarnings("hiding") +public final class ProtobufTransform3d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + */ + private final ProtobufTranslation3d translation = ProtobufTranslation3d.newInstance(); + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + */ + private final ProtobufRotation3d rotation = ProtobufRotation3d.newInstance(); + + private ProtobufTransform3d() { + } + + /** + * @return a new empty instance of {@code ProtobufTransform3d} + */ + public static ProtobufTransform3d newInstance() { + return new ProtobufTransform3d(); + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * @return whether the translation field is set + */ + public boolean hasTranslation() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * @return this + */ + public ProtobufTransform3d clearTranslation() { + bitField0_ &= ~0x00000001; + translation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableTranslation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufTranslation3d getTranslation() { + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufTranslation3d getMutableTranslation() { + bitField0_ |= 0x00000001; + return translation; + } + + /** + * optional .wpi.proto.ProtobufTranslation3d translation = 1; + * @param value the translation to set + * @return this + */ + public ProtobufTransform3d setTranslation(final ProtobufTranslation3d value) { + bitField0_ |= 0x00000001; + translation.copyFrom(value); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * @return whether the rotation field is set + */ + public boolean hasRotation() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * @return this + */ + public ProtobufTransform3d clearRotation() { + bitField0_ &= ~0x00000002; + rotation.clear(); + return this; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRotation()} if you want to modify it. + * + * @return internal storage object for reading + */ + public ProtobufRotation3d getRotation() { + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public ProtobufRotation3d getMutableRotation() { + bitField0_ |= 0x00000002; + return rotation; + } + + /** + * optional .wpi.proto.ProtobufRotation3d rotation = 2; + * @param value the rotation to set + * @return this + */ + public ProtobufTransform3d setRotation(final ProtobufRotation3d value) { + bitField0_ |= 0x00000002; + rotation.copyFrom(value); + return this; + } + + @Override + public ProtobufTransform3d copyFrom(final ProtobufTransform3d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + translation.copyFrom(other.translation); + rotation.copyFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufTransform3d mergeFrom(final ProtobufTransform3d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasTranslation()) { + getMutableTranslation().mergeFrom(other.translation); + } + if (other.hasRotation()) { + getMutableRotation().mergeFrom(other.rotation); + } + return this; + } + + @Override + public ProtobufTransform3d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clear(); + rotation.clear(); + return this; + } + + @Override + public ProtobufTransform3d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + translation.clearQuick(); + rotation.clearQuick(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTransform3d)) { + return false; + } + ProtobufTransform3d other = (ProtobufTransform3d) o; + return bitField0_ == other.bitField0_ + && (!hasTranslation() || translation.equals(other.translation)) + && (!hasRotation() || rotation.equals(other.rotation)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 10); + output.writeMessageNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 18); + output.writeMessageNoTag(rotation); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(translation); + } + if ((bitField0_ & 0x00000002) != 0) { + size += 1 + ProtoSink.computeMessageSizeNoTag(rotation); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTransform3d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // translation + input.readMessage(translation); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 18) { + break; + } + } + case 18: { + // rotation + input.readMessage(rotation); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeMessage(FieldNames.translation, translation); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeMessage(FieldNames.rotation, rotation); + } + output.endObject(); + } + + @Override + public ProtobufTransform3d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case -1840647503: { + if (input.isAtField(FieldNames.translation)) { + if (!input.trySkipNullValue()) { + input.readMessage(translation); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case -40300674: { + if (input.isAtField(FieldNames.rotation)) { + if (!input.trySkipNullValue()) { + input.readMessage(rotation); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTransform3d clone() { + return new ProtobufTransform3d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTransform3d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTransform3d(), data).checkInitialized(); + } + + public static ProtobufTransform3d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTransform3d(), input).checkInitialized(); + } + + public static ProtobufTransform3d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTransform3d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTransform3d messages + */ + public static MessageFactory getFactory() { + return ProtobufTransform3dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry3dDescriptor.wpi_proto_ProtobufTransform3d_descriptor; + } + + private enum ProtobufTransform3dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTransform3d create() { + return ProtobufTransform3d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName translation = FieldName.forField("translation"); + + static final FieldName rotation = FieldName.forField("rotation"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTranslation2d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTranslation2d.java new file mode 100644 index 0000000000..a52186229e --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTranslation2d.java @@ -0,0 +1,350 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufTranslation2d} + */ +@SuppressWarnings("hiding") +public final class ProtobufTranslation2d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double x = 1; + */ + private double x; + + /** + * optional double y = 2; + */ + private double y; + + private ProtobufTranslation2d() { + } + + /** + * @return a new empty instance of {@code ProtobufTranslation2d} + */ + public static ProtobufTranslation2d newInstance() { + return new ProtobufTranslation2d(); + } + + /** + * optional double x = 1; + * @return whether the x field is set + */ + public boolean hasX() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double x = 1; + * @return this + */ + public ProtobufTranslation2d clearX() { + bitField0_ &= ~0x00000001; + x = 0D; + return this; + } + + /** + * optional double x = 1; + * @return the x + */ + public double getX() { + return x; + } + + /** + * optional double x = 1; + * @param value the x to set + * @return this + */ + public ProtobufTranslation2d setX(final double value) { + bitField0_ |= 0x00000001; + x = value; + return this; + } + + /** + * optional double y = 2; + * @return whether the y field is set + */ + public boolean hasY() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double y = 2; + * @return this + */ + public ProtobufTranslation2d clearY() { + bitField0_ &= ~0x00000002; + y = 0D; + return this; + } + + /** + * optional double y = 2; + * @return the y + */ + public double getY() { + return y; + } + + /** + * optional double y = 2; + * @param value the y to set + * @return this + */ + public ProtobufTranslation2d setY(final double value) { + bitField0_ |= 0x00000002; + y = value; + return this; + } + + @Override + public ProtobufTranslation2d copyFrom(final ProtobufTranslation2d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + x = other.x; + y = other.y; + } + return this; + } + + @Override + public ProtobufTranslation2d mergeFrom(final ProtobufTranslation2d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasX()) { + setX(other.x); + } + if (other.hasY()) { + setY(other.y); + } + return this; + } + + @Override + public ProtobufTranslation2d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + x = 0D; + y = 0D; + return this; + } + + @Override + public ProtobufTranslation2d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTranslation2d)) { + return false; + } + ProtobufTranslation2d other = (ProtobufTranslation2d) o; + return bitField0_ == other.bitField0_ + && (!hasX() || ProtoUtil.isEqual(x, other.x)) + && (!hasY() || ProtoUtil.isEqual(y, other.y)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(x); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(y); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTranslation2d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // x + x = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // y + y = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.x, x); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.y, y); + } + output.endObject(); + } + + @Override + public ProtobufTranslation2d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 120: { + if (input.isAtField(FieldNames.x)) { + if (!input.trySkipNullValue()) { + x = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 121: { + if (input.isAtField(FieldNames.y)) { + if (!input.trySkipNullValue()) { + y = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTranslation2d clone() { + return new ProtobufTranslation2d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTranslation2d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTranslation2d(), data).checkInitialized(); + } + + public static ProtobufTranslation2d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTranslation2d(), input).checkInitialized(); + } + + public static ProtobufTranslation2d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTranslation2d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTranslation2d messages + */ + public static MessageFactory getFactory() { + return ProtobufTranslation2dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry2dDescriptor.wpi_proto_ProtobufTranslation2d_descriptor; + } + + private enum ProtobufTranslation2dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTranslation2d create() { + return ProtobufTranslation2d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName x = FieldName.forField("x"); + + static final FieldName y = FieldName.forField("y"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTranslation3d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTranslation3d.java new file mode 100644 index 0000000000..407ef17422 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTranslation3d.java @@ -0,0 +1,430 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufTranslation3d} + */ +@SuppressWarnings("hiding") +public final class ProtobufTranslation3d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double x = 1; + */ + private double x; + + /** + * optional double y = 2; + */ + private double y; + + /** + * optional double z = 3; + */ + private double z; + + private ProtobufTranslation3d() { + } + + /** + * @return a new empty instance of {@code ProtobufTranslation3d} + */ + public static ProtobufTranslation3d newInstance() { + return new ProtobufTranslation3d(); + } + + /** + * optional double x = 1; + * @return whether the x field is set + */ + public boolean hasX() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double x = 1; + * @return this + */ + public ProtobufTranslation3d clearX() { + bitField0_ &= ~0x00000001; + x = 0D; + return this; + } + + /** + * optional double x = 1; + * @return the x + */ + public double getX() { + return x; + } + + /** + * optional double x = 1; + * @param value the x to set + * @return this + */ + public ProtobufTranslation3d setX(final double value) { + bitField0_ |= 0x00000001; + x = value; + return this; + } + + /** + * optional double y = 2; + * @return whether the y field is set + */ + public boolean hasY() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double y = 2; + * @return this + */ + public ProtobufTranslation3d clearY() { + bitField0_ &= ~0x00000002; + y = 0D; + return this; + } + + /** + * optional double y = 2; + * @return the y + */ + public double getY() { + return y; + } + + /** + * optional double y = 2; + * @param value the y to set + * @return this + */ + public ProtobufTranslation3d setY(final double value) { + bitField0_ |= 0x00000002; + y = value; + return this; + } + + /** + * optional double z = 3; + * @return whether the z field is set + */ + public boolean hasZ() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double z = 3; + * @return this + */ + public ProtobufTranslation3d clearZ() { + bitField0_ &= ~0x00000004; + z = 0D; + return this; + } + + /** + * optional double z = 3; + * @return the z + */ + public double getZ() { + return z; + } + + /** + * optional double z = 3; + * @param value the z to set + * @return this + */ + public ProtobufTranslation3d setZ(final double value) { + bitField0_ |= 0x00000004; + z = value; + return this; + } + + @Override + public ProtobufTranslation3d copyFrom(final ProtobufTranslation3d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + x = other.x; + y = other.y; + z = other.z; + } + return this; + } + + @Override + public ProtobufTranslation3d mergeFrom(final ProtobufTranslation3d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasX()) { + setX(other.x); + } + if (other.hasY()) { + setY(other.y); + } + if (other.hasZ()) { + setZ(other.z); + } + return this; + } + + @Override + public ProtobufTranslation3d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + x = 0D; + y = 0D; + z = 0D; + return this; + } + + @Override + public ProtobufTranslation3d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTranslation3d)) { + return false; + } + ProtobufTranslation3d other = (ProtobufTranslation3d) o; + return bitField0_ == other.bitField0_ + && (!hasX() || ProtoUtil.isEqual(x, other.x)) + && (!hasY() || ProtoUtil.isEqual(y, other.y)) + && (!hasZ() || ProtoUtil.isEqual(z, other.z)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(x); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(y); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(z); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTranslation3d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // x + x = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // y + y = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // z + z = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.x, x); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.y, y); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.z, z); + } + output.endObject(); + } + + @Override + public ProtobufTranslation3d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 120: { + if (input.isAtField(FieldNames.x)) { + if (!input.trySkipNullValue()) { + x = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 121: { + if (input.isAtField(FieldNames.y)) { + if (!input.trySkipNullValue()) { + y = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 122: { + if (input.isAtField(FieldNames.z)) { + if (!input.trySkipNullValue()) { + z = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTranslation3d clone() { + return new ProtobufTranslation3d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTranslation3d parseFrom(final byte[] data) throws + InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), data).checkInitialized(); + } + + public static ProtobufTranslation3d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), input).checkInitialized(); + } + + public static ProtobufTranslation3d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTranslation3d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTranslation3d messages + */ + public static MessageFactory getFactory() { + return ProtobufTranslation3dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry3dDescriptor.wpi_proto_ProtobufTranslation3d_descriptor; + } + + private enum ProtobufTranslation3dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTranslation3d create() { + return ProtobufTranslation3d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName x = FieldName.forField("x"); + + static final FieldName y = FieldName.forField("y"); + + static final FieldName z = FieldName.forField("z"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTwist2d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTwist2d.java new file mode 100644 index 0000000000..ec4a9bbad2 --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTwist2d.java @@ -0,0 +1,429 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufTwist2d} + */ +@SuppressWarnings("hiding") +public final class ProtobufTwist2d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double dx = 1; + */ + private double dx; + + /** + * optional double dy = 2; + */ + private double dy; + + /** + * optional double dtheta = 3; + */ + private double dtheta; + + private ProtobufTwist2d() { + } + + /** + * @return a new empty instance of {@code ProtobufTwist2d} + */ + public static ProtobufTwist2d newInstance() { + return new ProtobufTwist2d(); + } + + /** + * optional double dx = 1; + * @return whether the dx field is set + */ + public boolean hasDx() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double dx = 1; + * @return this + */ + public ProtobufTwist2d clearDx() { + bitField0_ &= ~0x00000001; + dx = 0D; + return this; + } + + /** + * optional double dx = 1; + * @return the dx + */ + public double getDx() { + return dx; + } + + /** + * optional double dx = 1; + * @param value the dx to set + * @return this + */ + public ProtobufTwist2d setDx(final double value) { + bitField0_ |= 0x00000001; + dx = value; + return this; + } + + /** + * optional double dy = 2; + * @return whether the dy field is set + */ + public boolean hasDy() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double dy = 2; + * @return this + */ + public ProtobufTwist2d clearDy() { + bitField0_ &= ~0x00000002; + dy = 0D; + return this; + } + + /** + * optional double dy = 2; + * @return the dy + */ + public double getDy() { + return dy; + } + + /** + * optional double dy = 2; + * @param value the dy to set + * @return this + */ + public ProtobufTwist2d setDy(final double value) { + bitField0_ |= 0x00000002; + dy = value; + return this; + } + + /** + * optional double dtheta = 3; + * @return whether the dtheta field is set + */ + public boolean hasDtheta() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double dtheta = 3; + * @return this + */ + public ProtobufTwist2d clearDtheta() { + bitField0_ &= ~0x00000004; + dtheta = 0D; + return this; + } + + /** + * optional double dtheta = 3; + * @return the dtheta + */ + public double getDtheta() { + return dtheta; + } + + /** + * optional double dtheta = 3; + * @param value the dtheta to set + * @return this + */ + public ProtobufTwist2d setDtheta(final double value) { + bitField0_ |= 0x00000004; + dtheta = value; + return this; + } + + @Override + public ProtobufTwist2d copyFrom(final ProtobufTwist2d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + dx = other.dx; + dy = other.dy; + dtheta = other.dtheta; + } + return this; + } + + @Override + public ProtobufTwist2d mergeFrom(final ProtobufTwist2d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDx()) { + setDx(other.dx); + } + if (other.hasDy()) { + setDy(other.dy); + } + if (other.hasDtheta()) { + setDtheta(other.dtheta); + } + return this; + } + + @Override + public ProtobufTwist2d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + dx = 0D; + dy = 0D; + dtheta = 0D; + return this; + } + + @Override + public ProtobufTwist2d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTwist2d)) { + return false; + } + ProtobufTwist2d other = (ProtobufTwist2d) o; + return bitField0_ == other.bitField0_ + && (!hasDx() || ProtoUtil.isEqual(dx, other.dx)) + && (!hasDy() || ProtoUtil.isEqual(dy, other.dy)) + && (!hasDtheta() || ProtoUtil.isEqual(dtheta, other.dtheta)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(dx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(dy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(dtheta); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTwist2d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // dx + dx = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // dy + dy = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // dtheta + dtheta = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.dx, dx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.dy, dy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.dtheta, dtheta); + } + output.endObject(); + } + + @Override + public ProtobufTwist2d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3220: { + if (input.isAtField(FieldNames.dx)) { + if (!input.trySkipNullValue()) { + dx = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3221: { + if (input.isAtField(FieldNames.dy)) { + if (!input.trySkipNullValue()) { + dy = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case -1321724742: { + if (input.isAtField(FieldNames.dtheta)) { + if (!input.trySkipNullValue()) { + dtheta = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTwist2d clone() { + return new ProtobufTwist2d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTwist2d parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTwist2d(), data).checkInitialized(); + } + + public static ProtobufTwist2d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTwist2d(), input).checkInitialized(); + } + + public static ProtobufTwist2d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTwist2d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTwist2d messages + */ + public static MessageFactory getFactory() { + return ProtobufTwist2dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry2dDescriptor.wpi_proto_ProtobufTwist2d_descriptor; + } + + private enum ProtobufTwist2dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTwist2d create() { + return ProtobufTwist2d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName dx = FieldName.forField("dx"); + + static final FieldName dy = FieldName.forField("dy"); + + static final FieldName dtheta = FieldName.forField("dtheta"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTwist3d.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTwist3d.java new file mode 100644 index 0000000000..6c0cc7e11c --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufTwist3d.java @@ -0,0 +1,669 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.ProtoUtil; + +/** + * Protobuf type {@code ProtobufTwist3d} + */ +@SuppressWarnings("hiding") +public final class ProtobufTwist3d extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * optional double dx = 1; + */ + private double dx; + + /** + * optional double dy = 2; + */ + private double dy; + + /** + * optional double dz = 3; + */ + private double dz; + + /** + * optional double rx = 4; + */ + private double rx; + + /** + * optional double ry = 5; + */ + private double ry; + + /** + * optional double rz = 6; + */ + private double rz; + + private ProtobufTwist3d() { + } + + /** + * @return a new empty instance of {@code ProtobufTwist3d} + */ + public static ProtobufTwist3d newInstance() { + return new ProtobufTwist3d(); + } + + /** + * optional double dx = 1; + * @return whether the dx field is set + */ + public boolean hasDx() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * optional double dx = 1; + * @return this + */ + public ProtobufTwist3d clearDx() { + bitField0_ &= ~0x00000001; + dx = 0D; + return this; + } + + /** + * optional double dx = 1; + * @return the dx + */ + public double getDx() { + return dx; + } + + /** + * optional double dx = 1; + * @param value the dx to set + * @return this + */ + public ProtobufTwist3d setDx(final double value) { + bitField0_ |= 0x00000001; + dx = value; + return this; + } + + /** + * optional double dy = 2; + * @return whether the dy field is set + */ + public boolean hasDy() { + return (bitField0_ & 0x00000002) != 0; + } + + /** + * optional double dy = 2; + * @return this + */ + public ProtobufTwist3d clearDy() { + bitField0_ &= ~0x00000002; + dy = 0D; + return this; + } + + /** + * optional double dy = 2; + * @return the dy + */ + public double getDy() { + return dy; + } + + /** + * optional double dy = 2; + * @param value the dy to set + * @return this + */ + public ProtobufTwist3d setDy(final double value) { + bitField0_ |= 0x00000002; + dy = value; + return this; + } + + /** + * optional double dz = 3; + * @return whether the dz field is set + */ + public boolean hasDz() { + return (bitField0_ & 0x00000004) != 0; + } + + /** + * optional double dz = 3; + * @return this + */ + public ProtobufTwist3d clearDz() { + bitField0_ &= ~0x00000004; + dz = 0D; + return this; + } + + /** + * optional double dz = 3; + * @return the dz + */ + public double getDz() { + return dz; + } + + /** + * optional double dz = 3; + * @param value the dz to set + * @return this + */ + public ProtobufTwist3d setDz(final double value) { + bitField0_ |= 0x00000004; + dz = value; + return this; + } + + /** + * optional double rx = 4; + * @return whether the rx field is set + */ + public boolean hasRx() { + return (bitField0_ & 0x00000008) != 0; + } + + /** + * optional double rx = 4; + * @return this + */ + public ProtobufTwist3d clearRx() { + bitField0_ &= ~0x00000008; + rx = 0D; + return this; + } + + /** + * optional double rx = 4; + * @return the rx + */ + public double getRx() { + return rx; + } + + /** + * optional double rx = 4; + * @param value the rx to set + * @return this + */ + public ProtobufTwist3d setRx(final double value) { + bitField0_ |= 0x00000008; + rx = value; + return this; + } + + /** + * optional double ry = 5; + * @return whether the ry field is set + */ + public boolean hasRy() { + return (bitField0_ & 0x00000010) != 0; + } + + /** + * optional double ry = 5; + * @return this + */ + public ProtobufTwist3d clearRy() { + bitField0_ &= ~0x00000010; + ry = 0D; + return this; + } + + /** + * optional double ry = 5; + * @return the ry + */ + public double getRy() { + return ry; + } + + /** + * optional double ry = 5; + * @param value the ry to set + * @return this + */ + public ProtobufTwist3d setRy(final double value) { + bitField0_ |= 0x00000010; + ry = value; + return this; + } + + /** + * optional double rz = 6; + * @return whether the rz field is set + */ + public boolean hasRz() { + return (bitField0_ & 0x00000020) != 0; + } + + /** + * optional double rz = 6; + * @return this + */ + public ProtobufTwist3d clearRz() { + bitField0_ &= ~0x00000020; + rz = 0D; + return this; + } + + /** + * optional double rz = 6; + * @return the rz + */ + public double getRz() { + return rz; + } + + /** + * optional double rz = 6; + * @param value the rz to set + * @return this + */ + public ProtobufTwist3d setRz(final double value) { + bitField0_ |= 0x00000020; + rz = value; + return this; + } + + @Override + public ProtobufTwist3d copyFrom(final ProtobufTwist3d other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + dx = other.dx; + dy = other.dy; + dz = other.dz; + rx = other.rx; + ry = other.ry; + rz = other.rz; + } + return this; + } + + @Override + public ProtobufTwist3d mergeFrom(final ProtobufTwist3d other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasDx()) { + setDx(other.dx); + } + if (other.hasDy()) { + setDy(other.dy); + } + if (other.hasDz()) { + setDz(other.dz); + } + if (other.hasRx()) { + setRx(other.rx); + } + if (other.hasRy()) { + setRy(other.ry); + } + if (other.hasRz()) { + setRz(other.rz); + } + return this; + } + + @Override + public ProtobufTwist3d clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + dx = 0D; + dy = 0D; + dz = 0D; + rx = 0D; + ry = 0D; + rz = 0D; + return this; + } + + @Override + public ProtobufTwist3d clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufTwist3d)) { + return false; + } + ProtobufTwist3d other = (ProtobufTwist3d) o; + return bitField0_ == other.bitField0_ + && (!hasDx() || ProtoUtil.isEqual(dx, other.dx)) + && (!hasDy() || ProtoUtil.isEqual(dy, other.dy)) + && (!hasDz() || ProtoUtil.isEqual(dz, other.dz)) + && (!hasRx() || ProtoUtil.isEqual(rx, other.rx)) + && (!hasRy() || ProtoUtil.isEqual(ry, other.ry)) + && (!hasRz() || ProtoUtil.isEqual(rz, other.rz)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(dx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeRawByte((byte) 17); + output.writeDoubleNoTag(dy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeRawByte((byte) 25); + output.writeDoubleNoTag(dz); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeRawByte((byte) 33); + output.writeDoubleNoTag(rx); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeRawByte((byte) 41); + output.writeDoubleNoTag(ry); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeRawByte((byte) 49); + output.writeDoubleNoTag(rz); + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000002) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000004) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000008) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000010) != 0) { + size += 9; + } + if ((bitField0_ & 0x00000020) != 0) { + size += 9; + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufTwist3d mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 9: { + // dx + dx = input.readDouble(); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 17) { + break; + } + } + case 17: { + // dy + dy = input.readDouble(); + bitField0_ |= 0x00000002; + tag = input.readTag(); + if (tag != 25) { + break; + } + } + case 25: { + // dz + dz = input.readDouble(); + bitField0_ |= 0x00000004; + tag = input.readTag(); + if (tag != 33) { + break; + } + } + case 33: { + // rx + rx = input.readDouble(); + bitField0_ |= 0x00000008; + tag = input.readTag(); + if (tag != 41) { + break; + } + } + case 41: { + // ry + ry = input.readDouble(); + bitField0_ |= 0x00000010; + tag = input.readTag(); + if (tag != 49) { + break; + } + } + case 49: { + // rz + rz = input.readDouble(); + bitField0_ |= 0x00000020; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeDouble(FieldNames.dx, dx); + } + if ((bitField0_ & 0x00000002) != 0) { + output.writeDouble(FieldNames.dy, dy); + } + if ((bitField0_ & 0x00000004) != 0) { + output.writeDouble(FieldNames.dz, dz); + } + if ((bitField0_ & 0x00000008) != 0) { + output.writeDouble(FieldNames.rx, rx); + } + if ((bitField0_ & 0x00000010) != 0) { + output.writeDouble(FieldNames.ry, ry); + } + if ((bitField0_ & 0x00000020) != 0) { + output.writeDouble(FieldNames.rz, rz); + } + output.endObject(); + } + + @Override + public ProtobufTwist3d mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3220: { + if (input.isAtField(FieldNames.dx)) { + if (!input.trySkipNullValue()) { + dx = input.readDouble(); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3221: { + if (input.isAtField(FieldNames.dy)) { + if (!input.trySkipNullValue()) { + dy = input.readDouble(); + bitField0_ |= 0x00000002; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3222: { + if (input.isAtField(FieldNames.dz)) { + if (!input.trySkipNullValue()) { + dz = input.readDouble(); + bitField0_ |= 0x00000004; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3654: { + if (input.isAtField(FieldNames.rx)) { + if (!input.trySkipNullValue()) { + rx = input.readDouble(); + bitField0_ |= 0x00000008; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3655: { + if (input.isAtField(FieldNames.ry)) { + if (!input.trySkipNullValue()) { + ry = input.readDouble(); + bitField0_ |= 0x00000010; + } + } else { + input.skipUnknownField(); + } + break; + } + case 3656: { + if (input.isAtField(FieldNames.rz)) { + if (!input.trySkipNullValue()) { + rz = input.readDouble(); + bitField0_ |= 0x00000020; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufTwist3d clone() { + return new ProtobufTwist3d().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufTwist3d parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufTwist3d(), data).checkInitialized(); + } + + public static ProtobufTwist3d parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTwist3d(), input).checkInitialized(); + } + + public static ProtobufTwist3d parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufTwist3d(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufTwist3d messages + */ + public static MessageFactory getFactory() { + return ProtobufTwist3dFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufGeometry3dDescriptor.wpi_proto_ProtobufTwist3d_descriptor; + } + + private enum ProtobufTwist3dFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufTwist3d create() { + return ProtobufTwist3d.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName dx = FieldName.forField("dx"); + + static final FieldName dy = FieldName.forField("dy"); + + static final FieldName dz = FieldName.forField("dz"); + + static final FieldName rx = FieldName.forField("rx"); + + static final FieldName ry = FieldName.forField("ry"); + + static final FieldName rz = FieldName.forField("rz"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufVector.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufVector.java new file mode 100644 index 0000000000..0f75d16ecb --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufVector.java @@ -0,0 +1,309 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import java.io.IOException; +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.FieldName; +import us.hebi.quickbuf.InvalidProtocolBufferException; +import us.hebi.quickbuf.JsonSink; +import us.hebi.quickbuf.JsonSource; +import us.hebi.quickbuf.MessageFactory; +import us.hebi.quickbuf.ProtoMessage; +import us.hebi.quickbuf.ProtoSink; +import us.hebi.quickbuf.ProtoSource; +import us.hebi.quickbuf.RepeatedDouble; + +/** + * Protobuf type {@code ProtobufVector} + */ +@SuppressWarnings("hiding") +public final class ProtobufVector extends ProtoMessage implements Cloneable { + private static final long serialVersionUID = 0L; + + /** + * repeated double rows = 1; + */ + private final RepeatedDouble rows = RepeatedDouble.newEmptyInstance(); + + private ProtobufVector() { + } + + /** + * @return a new empty instance of {@code ProtobufVector} + */ + public static ProtobufVector newInstance() { + return new ProtobufVector(); + } + + /** + * repeated double rows = 1; + * @return whether the rows field is set + */ + public boolean hasRows() { + return (bitField0_ & 0x00000001) != 0; + } + + /** + * repeated double rows = 1; + * @return this + */ + public ProtobufVector clearRows() { + bitField0_ &= ~0x00000001; + rows.clear(); + return this; + } + + /** + * repeated double rows = 1; + * + * This method returns the internal storage object without modifying any has state. + * The returned object should not be modified and be treated as read-only. + * + * Use {@link #getMutableRows()} if you want to modify it. + * + * @return internal storage object for reading + */ + public RepeatedDouble getRows() { + return rows; + } + + /** + * repeated double rows = 1; + * + * This method returns the internal storage object and sets the corresponding + * has state. The returned object will become part of this message and its + * contents may be modified as long as the has state is not cleared. + * + * @return internal storage object for modifications + */ + public RepeatedDouble getMutableRows() { + bitField0_ |= 0x00000001; + return rows; + } + + /** + * repeated double rows = 1; + * @param value the rows to add + * @return this + */ + public ProtobufVector addRows(final double value) { + bitField0_ |= 0x00000001; + rows.add(value); + return this; + } + + /** + * repeated double rows = 1; + * @param values the rows to add + * @return this + */ + public ProtobufVector addAllRows(final double... values) { + bitField0_ |= 0x00000001; + rows.addAll(values); + return this; + } + + @Override + public ProtobufVector copyFrom(final ProtobufVector other) { + cachedSize = other.cachedSize; + if ((bitField0_ | other.bitField0_) != 0) { + bitField0_ = other.bitField0_; + rows.copyFrom(other.rows); + } + return this; + } + + @Override + public ProtobufVector mergeFrom(final ProtobufVector other) { + if (other.isEmpty()) { + return this; + } + cachedSize = -1; + if (other.hasRows()) { + getMutableRows().addAll(other.rows); + } + return this; + } + + @Override + public ProtobufVector clear() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + rows.clear(); + return this; + } + + @Override + public ProtobufVector clearQuick() { + if (isEmpty()) { + return this; + } + cachedSize = -1; + bitField0_ = 0; + rows.clear(); + return this; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof ProtobufVector)) { + return false; + } + ProtobufVector other = (ProtobufVector) o; + return bitField0_ == other.bitField0_ + && (!hasRows() || rows.equals(other.rows)); + } + + @Override + public void writeTo(final ProtoSink output) throws IOException { + if ((bitField0_ & 0x00000001) != 0) { + for (int i = 0; i < rows.length(); i++) { + output.writeRawByte((byte) 9); + output.writeDoubleNoTag(rows.array()[i]); + } + } + } + + @Override + protected int computeSerializedSize() { + int size = 0; + if ((bitField0_ & 0x00000001) != 0) { + size += (1 + 8) * rows.length(); + } + return size; + } + + @Override + @SuppressWarnings("fallthrough") + public ProtobufVector mergeFrom(final ProtoSource input) throws IOException { + // Enabled Fall-Through Optimization (QuickBuffers) + int tag = input.readTag(); + while (true) { + switch (tag) { + case 10: { + // rows [packed=true] + input.readPackedDouble(rows); + bitField0_ |= 0x00000001; + tag = input.readTag(); + if (tag != 0) { + break; + } + } + case 0: { + return this; + } + default: { + if (!input.skipField(tag)) { + return this; + } + tag = input.readTag(); + break; + } + case 9: { + // rows [packed=false] + tag = input.readRepeatedDouble(rows, tag); + bitField0_ |= 0x00000001; + break; + } + } + } + } + + @Override + public void writeTo(final JsonSink output) throws IOException { + output.beginObject(); + if ((bitField0_ & 0x00000001) != 0) { + output.writeRepeatedDouble(FieldNames.rows, rows); + } + output.endObject(); + } + + @Override + public ProtobufVector mergeFrom(final JsonSource input) throws IOException { + if (!input.beginObject()) { + return this; + } + while (!input.isAtEnd()) { + switch (input.readFieldHash()) { + case 3506649: { + if (input.isAtField(FieldNames.rows)) { + if (!input.trySkipNullValue()) { + input.readRepeatedDouble(rows); + bitField0_ |= 0x00000001; + } + } else { + input.skipUnknownField(); + } + break; + } + default: { + input.skipUnknownField(); + break; + } + } + } + input.endObject(); + return this; + } + + @Override + public ProtobufVector clone() { + return new ProtobufVector().copyFrom(this); + } + + @Override + public boolean isEmpty() { + return ((bitField0_) == 0); + } + + public static ProtobufVector parseFrom(final byte[] data) throws InvalidProtocolBufferException { + return ProtoMessage.mergeFrom(new ProtobufVector(), data).checkInitialized(); + } + + public static ProtobufVector parseFrom(final ProtoSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufVector(), input).checkInitialized(); + } + + public static ProtobufVector parseFrom(final JsonSource input) throws IOException { + return ProtoMessage.mergeFrom(new ProtobufVector(), input).checkInitialized(); + } + + /** + * @return factory for creating ProtobufVector messages + */ + public static MessageFactory getFactory() { + return ProtobufVectorFactory.INSTANCE; + } + + /** + * @return this type's descriptor. + */ + public static Descriptors.Descriptor getDescriptor() { + return ProtobufWPIMathDescriptor.wpi_proto_ProtobufVector_descriptor; + } + + private enum ProtobufVectorFactory implements MessageFactory { + INSTANCE; + + @Override + public ProtobufVector create() { + return ProtobufVector.newInstance(); + } + } + + /** + * Contains name constants used for serializing JSON + */ + static class FieldNames { + static final FieldName rows = FieldName.forField("rows"); + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufWPIMathDescriptor.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufWPIMathDescriptor.java new file mode 100644 index 0000000000..55270e225d --- /dev/null +++ b/wpimath/src/generated/main/java/org/wpilib/math/proto/ProtobufWPIMathDescriptor.java @@ -0,0 +1,37 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. +// Code generated by protocol buffer compiler. Do not edit! +package org.wpilib.math.proto; + +import us.hebi.quickbuf.Descriptors; +import us.hebi.quickbuf.ProtoUtil; +import us.hebi.quickbuf.RepeatedByte; + +public final class ProtobufWPIMathDescriptor { + private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(608, + "Cg13cGltYXRoLnByb3RvEgl3cGkucHJvdG8iWgoOUHJvdG9idWZNYXRyaXgSGQoIbnVtX3Jvd3MYASAB" + + "KA1SB251bVJvd3MSGQoIbnVtX2NvbHMYAiABKA1SB251bUNvbHMSEgoEZGF0YRgDIAMoAVIEZGF0YSIk" + + "Cg5Qcm90b2J1ZlZlY3RvchISCgRyb3dzGAEgAygBUgRyb3dzQjQKFW9yZy53cGlsaWIubWF0aC5wcm90" + + "b0IZUHJvdG9idWZXUElNYXRoRGVzY3JpcHRvclABSoMDCgYSBAAAEgEKCAoBDBIDAAASCggKAQISAwIA" + + "EgoICgEIEgMEAC4KCQoCCAESAwQALgoICgEIEgMGADoKCQoCCAgSAwYAOgoICgEIEgMIACIKCQoCCAoS" + + "AwgAIgoKCgIEABIECgAOAQoKCgMEAAESAwoIFgoLCgQEAAIAEgMLAhYKDAoFBAACAAUSAwsCCAoMCgUE" + + "AAIAARIDCwkRCgwKBQQAAgADEgMLFBUKCwoEBAACARIDDAIWCgwKBQQAAgEFEgMMAggKDAoFBAACAQES" + + "AwwJEQoMCgUEAAIBAxIDDBQVCgsKBAQAAgISAw0CGwoMCgUEAAICBBIDDQIKCgwKBQQAAgIFEgMNCxEK" + + "DAoFBAACAgESAw0SFgoMCgUEAAICAxIDDRkaCgoKAgQBEgQQABIBCgoKAwQBARIDEAgWCgsKBAQBAgAS" + + "AxECGwoMCgUEAQIABBIDEQIKCgwKBQQBAgAFEgMRCxEKDAoFBAECAAESAxESFgoMCgUEAQIAAxIDERka" + + "YgZwcm90bzM="); + + static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("wpimath.proto", "wpi.proto", descriptorData); + + static final Descriptors.Descriptor wpi_proto_ProtobufMatrix_descriptor = descriptor.internalContainedType(28, 90, "ProtobufMatrix", "wpi.proto.ProtobufMatrix"); + + static final Descriptors.Descriptor wpi_proto_ProtobufVector_descriptor = descriptor.internalContainedType(120, 36, "ProtobufVector", "wpi.proto.ProtobufVector"); + + /** + * @return this proto file's descriptor. + */ + public static Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } +} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/Spline.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/Spline.java deleted file mode 100644 index 5ca33d6c19..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/Spline.java +++ /dev/null @@ -1,1367 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; -import us.hebi.quickbuf.RepeatedDouble; - -public final class Spline { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(990, - "CgxzcGxpbmUucHJvdG8SCXdwaS5wcm90byKIAQoaUHJvdG9idWZDdWJpY0hlcm1pdGVTcGxpbmUSGwoJ" + - "eF9pbml0aWFsGAEgAygBUgh4SW5pdGlhbBIXCgd4X2ZpbmFsGAIgAygBUgZ4RmluYWwSGwoJeV9pbml0" + - "aWFsGAMgAygBUgh5SW5pdGlhbBIXCgd5X2ZpbmFsGAQgAygBUgZ5RmluYWwiigEKHFByb3RvYnVmUXVp" + - "bnRpY0hlcm1pdGVTcGxpbmUSGwoJeF9pbml0aWFsGAEgAygBUgh4SW5pdGlhbBIXCgd4X2ZpbmFsGAIg" + - "AygBUgZ4RmluYWwSGwoJeV9pbml0aWFsGAMgAygBUgh5SW5pdGlhbBIXCgd5X2ZpbmFsGAQgAygBUgZ5" + - "RmluYWxCFwoVb3JnLndwaWxpYi5tYXRoLnByb3RvSokFCgYSBAAAEgEKCAoBDBIDAAASCggKAQISAwIA" + - "EgoICgEIEgMEAC4KCQoCCAESAwQALgoKCgIEABIEBgALAQoKCgMEAAESAwYIIgoLCgQEAAIAEgMHAiAK" + - "DAoFBAACAAQSAwcCCgoMCgUEAAIABRIDBwsRCgwKBQQAAgABEgMHEhsKDAoFBAACAAMSAwceHwoLCgQE" + - "AAIBEgMIAh4KDAoFBAACAQQSAwgCCgoMCgUEAAIBBRIDCAsRCgwKBQQAAgEBEgMIEhkKDAoFBAACAQMS" + - "AwgcHQoLCgQEAAICEgMJAiAKDAoFBAACAgQSAwkCCgoMCgUEAAICBRIDCQsRCgwKBQQAAgIBEgMJEhsK" + - "DAoFBAACAgMSAwkeHwoLCgQEAAIDEgMKAh4KDAoFBAACAwQSAwoCCgoMCgUEAAIDBRIDCgsRCgwKBQQA" + - "AgMBEgMKEhkKDAoFBAACAwMSAwocHQoKCgIEARIEDQASAQoKCgMEAQESAw0IJAoLCgQEAQIAEgMOAiAK" + - "DAoFBAECAAQSAw4CCgoMCgUEAQIABRIDDgsRCgwKBQQBAgABEgMOEhsKDAoFBAECAAMSAw4eHwoLCgQE" + - "AQIBEgMPAh4KDAoFBAECAQQSAw8CCgoMCgUEAQIBBRIDDwsRCgwKBQQBAgEBEgMPEhkKDAoFBAECAQMS" + - "Aw8cHQoLCgQEAQICEgMQAiAKDAoFBAECAgQSAxACCgoMCgUEAQICBRIDEAsRCgwKBQQBAgIBEgMQEhsK" + - "DAoFBAECAgMSAxAeHwoLCgQEAQIDEgMRAh4KDAoFBAECAwQSAxECCgoMCgUEAQIDBRIDEQsRCgwKBQQB" + - "AgMBEgMREhkKDAoFBAECAwMSAxEcHWIGcHJvdG8z"); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("spline.proto", "wpi.proto", descriptorData); - - static final Descriptors.Descriptor wpi_proto_ProtobufCubicHermiteSpline_descriptor = descriptor.internalContainedType(28, 136, "ProtobufCubicHermiteSpline", "wpi.proto.ProtobufCubicHermiteSpline"); - - static final Descriptors.Descriptor wpi_proto_ProtobufQuinticHermiteSpline_descriptor = descriptor.internalContainedType(167, 138, "ProtobufQuinticHermiteSpline", "wpi.proto.ProtobufQuinticHermiteSpline"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufCubicHermiteSpline} - */ - public static final class ProtobufCubicHermiteSpline extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * repeated double x_initial = 1; - */ - private final RepeatedDouble xInitial = RepeatedDouble.newEmptyInstance(); - - /** - * repeated double x_final = 2; - */ - private final RepeatedDouble xFinal = RepeatedDouble.newEmptyInstance(); - - /** - * repeated double y_initial = 3; - */ - private final RepeatedDouble yInitial = RepeatedDouble.newEmptyInstance(); - - /** - * repeated double y_final = 4; - */ - private final RepeatedDouble yFinal = RepeatedDouble.newEmptyInstance(); - - private ProtobufCubicHermiteSpline() { - } - - /** - * @return a new empty instance of {@code ProtobufCubicHermiteSpline} - */ - public static ProtobufCubicHermiteSpline newInstance() { - return new ProtobufCubicHermiteSpline(); - } - - /** - * repeated double x_initial = 1; - * @return whether the xInitial field is set - */ - public boolean hasXInitial() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * repeated double x_initial = 1; - * @return this - */ - public ProtobufCubicHermiteSpline clearXInitial() { - bitField0_ &= ~0x00000001; - xInitial.clear(); - return this; - } - - /** - * repeated double x_initial = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableXInitial()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getXInitial() { - return xInitial; - } - - /** - * repeated double x_initial = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableXInitial() { - bitField0_ |= 0x00000001; - return xInitial; - } - - /** - * repeated double x_initial = 1; - * @param value the xInitial to add - * @return this - */ - public ProtobufCubicHermiteSpline addXInitial(final double value) { - bitField0_ |= 0x00000001; - xInitial.add(value); - return this; - } - - /** - * repeated double x_initial = 1; - * @param values the xInitial to add - * @return this - */ - public ProtobufCubicHermiteSpline addAllXInitial(final double... values) { - bitField0_ |= 0x00000001; - xInitial.addAll(values); - return this; - } - - /** - * repeated double x_final = 2; - * @return whether the xFinal field is set - */ - public boolean hasXFinal() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * repeated double x_final = 2; - * @return this - */ - public ProtobufCubicHermiteSpline clearXFinal() { - bitField0_ &= ~0x00000002; - xFinal.clear(); - return this; - } - - /** - * repeated double x_final = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableXFinal()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getXFinal() { - return xFinal; - } - - /** - * repeated double x_final = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableXFinal() { - bitField0_ |= 0x00000002; - return xFinal; - } - - /** - * repeated double x_final = 2; - * @param value the xFinal to add - * @return this - */ - public ProtobufCubicHermiteSpline addXFinal(final double value) { - bitField0_ |= 0x00000002; - xFinal.add(value); - return this; - } - - /** - * repeated double x_final = 2; - * @param values the xFinal to add - * @return this - */ - public ProtobufCubicHermiteSpline addAllXFinal(final double... values) { - bitField0_ |= 0x00000002; - xFinal.addAll(values); - return this; - } - - /** - * repeated double y_initial = 3; - * @return whether the yInitial field is set - */ - public boolean hasYInitial() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * repeated double y_initial = 3; - * @return this - */ - public ProtobufCubicHermiteSpline clearYInitial() { - bitField0_ &= ~0x00000004; - yInitial.clear(); - return this; - } - - /** - * repeated double y_initial = 3; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableYInitial()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getYInitial() { - return yInitial; - } - - /** - * repeated double y_initial = 3; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableYInitial() { - bitField0_ |= 0x00000004; - return yInitial; - } - - /** - * repeated double y_initial = 3; - * @param value the yInitial to add - * @return this - */ - public ProtobufCubicHermiteSpline addYInitial(final double value) { - bitField0_ |= 0x00000004; - yInitial.add(value); - return this; - } - - /** - * repeated double y_initial = 3; - * @param values the yInitial to add - * @return this - */ - public ProtobufCubicHermiteSpline addAllYInitial(final double... values) { - bitField0_ |= 0x00000004; - yInitial.addAll(values); - return this; - } - - /** - * repeated double y_final = 4; - * @return whether the yFinal field is set - */ - public boolean hasYFinal() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * repeated double y_final = 4; - * @return this - */ - public ProtobufCubicHermiteSpline clearYFinal() { - bitField0_ &= ~0x00000008; - yFinal.clear(); - return this; - } - - /** - * repeated double y_final = 4; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableYFinal()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getYFinal() { - return yFinal; - } - - /** - * repeated double y_final = 4; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableYFinal() { - bitField0_ |= 0x00000008; - return yFinal; - } - - /** - * repeated double y_final = 4; - * @param value the yFinal to add - * @return this - */ - public ProtobufCubicHermiteSpline addYFinal(final double value) { - bitField0_ |= 0x00000008; - yFinal.add(value); - return this; - } - - /** - * repeated double y_final = 4; - * @param values the yFinal to add - * @return this - */ - public ProtobufCubicHermiteSpline addAllYFinal(final double... values) { - bitField0_ |= 0x00000008; - yFinal.addAll(values); - return this; - } - - @Override - public ProtobufCubicHermiteSpline copyFrom(final ProtobufCubicHermiteSpline other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - xInitial.copyFrom(other.xInitial); - xFinal.copyFrom(other.xFinal); - yInitial.copyFrom(other.yInitial); - yFinal.copyFrom(other.yFinal); - } - return this; - } - - @Override - public ProtobufCubicHermiteSpline mergeFrom(final ProtobufCubicHermiteSpline other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasXInitial()) { - getMutableXInitial().addAll(other.xInitial); - } - if (other.hasXFinal()) { - getMutableXFinal().addAll(other.xFinal); - } - if (other.hasYInitial()) { - getMutableYInitial().addAll(other.yInitial); - } - if (other.hasYFinal()) { - getMutableYFinal().addAll(other.yFinal); - } - return this; - } - - @Override - public ProtobufCubicHermiteSpline clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - xInitial.clear(); - xFinal.clear(); - yInitial.clear(); - yFinal.clear(); - return this; - } - - @Override - public ProtobufCubicHermiteSpline clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - xInitial.clear(); - xFinal.clear(); - yInitial.clear(); - yFinal.clear(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufCubicHermiteSpline)) { - return false; - } - ProtobufCubicHermiteSpline other = (ProtobufCubicHermiteSpline) o; - return bitField0_ == other.bitField0_ - && (!hasXInitial() || xInitial.equals(other.xInitial)) - && (!hasXFinal() || xFinal.equals(other.xFinal)) - && (!hasYInitial() || yInitial.equals(other.yInitial)) - && (!hasYFinal() || yFinal.equals(other.yFinal)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - for (int i = 0; i < xInitial.length(); i++) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(xInitial.array()[i]); - } - } - if ((bitField0_ & 0x00000002) != 0) { - for (int i = 0; i < xFinal.length(); i++) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(xFinal.array()[i]); - } - } - if ((bitField0_ & 0x00000004) != 0) { - for (int i = 0; i < yInitial.length(); i++) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(yInitial.array()[i]); - } - } - if ((bitField0_ & 0x00000008) != 0) { - for (int i = 0; i < yFinal.length(); i++) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(yFinal.array()[i]); - } - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += (1 + 8) * xInitial.length(); - } - if ((bitField0_ & 0x00000002) != 0) { - size += (1 + 8) * xFinal.length(); - } - if ((bitField0_ & 0x00000004) != 0) { - size += (1 + 8) * yInitial.length(); - } - if ((bitField0_ & 0x00000008) != 0) { - size += (1 + 8) * yFinal.length(); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufCubicHermiteSpline mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // xInitial [packed=true] - input.readPackedDouble(xInitial); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // xFinal [packed=true] - input.readPackedDouble(xFinal); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 26) { - break; - } - } - case 26: { - // yInitial [packed=true] - input.readPackedDouble(yInitial); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 34) { - break; - } - } - case 34: { - // yFinal [packed=true] - input.readPackedDouble(yFinal); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - case 9: { - // xInitial [packed=false] - tag = input.readRepeatedDouble(xInitial, tag); - bitField0_ |= 0x00000001; - break; - } - case 17: { - // xFinal [packed=false] - tag = input.readRepeatedDouble(xFinal, tag); - bitField0_ |= 0x00000002; - break; - } - case 25: { - // yInitial [packed=false] - tag = input.readRepeatedDouble(yInitial, tag); - bitField0_ |= 0x00000004; - break; - } - case 33: { - // yFinal [packed=false] - tag = input.readRepeatedDouble(yFinal, tag); - bitField0_ |= 0x00000008; - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeRepeatedDouble(FieldNames.xInitial, xInitial); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRepeatedDouble(FieldNames.xFinal, xFinal); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRepeatedDouble(FieldNames.yInitial, yInitial); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRepeatedDouble(FieldNames.yFinal, yFinal); - } - output.endObject(); - } - - @Override - public ProtobufCubicHermiteSpline mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -1998129236: - case -2134571395: { - if (input.isAtField(FieldNames.xInitial)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(xInitial); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -791585826: - case 1943464687: { - if (input.isAtField(FieldNames.xFinal)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(xFinal); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -255318901: - case 352941438: { - if (input.isAtField(FieldNames.yInitial)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(yInitial); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case -762956675: - case -1463998928: { - if (input.isAtField(FieldNames.yFinal)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(yFinal); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufCubicHermiteSpline clone() { - return new ProtobufCubicHermiteSpline().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufCubicHermiteSpline parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufCubicHermiteSpline(), data).checkInitialized(); - } - - public static ProtobufCubicHermiteSpline parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufCubicHermiteSpline(), input).checkInitialized(); - } - - public static ProtobufCubicHermiteSpline parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufCubicHermiteSpline(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufCubicHermiteSpline messages - */ - public static MessageFactory getFactory() { - return ProtobufCubicHermiteSplineFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Spline.wpi_proto_ProtobufCubicHermiteSpline_descriptor; - } - - private enum ProtobufCubicHermiteSplineFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufCubicHermiteSpline create() { - return ProtobufCubicHermiteSpline.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName xInitial = FieldName.forField("xInitial", "x_initial"); - - static final FieldName xFinal = FieldName.forField("xFinal", "x_final"); - - static final FieldName yInitial = FieldName.forField("yInitial", "y_initial"); - - static final FieldName yFinal = FieldName.forField("yFinal", "y_final"); - } - } - - /** - * Protobuf type {@code ProtobufQuinticHermiteSpline} - */ - public static final class ProtobufQuinticHermiteSpline extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * repeated double x_initial = 1; - */ - private final RepeatedDouble xInitial = RepeatedDouble.newEmptyInstance(); - - /** - * repeated double x_final = 2; - */ - private final RepeatedDouble xFinal = RepeatedDouble.newEmptyInstance(); - - /** - * repeated double y_initial = 3; - */ - private final RepeatedDouble yInitial = RepeatedDouble.newEmptyInstance(); - - /** - * repeated double y_final = 4; - */ - private final RepeatedDouble yFinal = RepeatedDouble.newEmptyInstance(); - - private ProtobufQuinticHermiteSpline() { - } - - /** - * @return a new empty instance of {@code ProtobufQuinticHermiteSpline} - */ - public static ProtobufQuinticHermiteSpline newInstance() { - return new ProtobufQuinticHermiteSpline(); - } - - /** - * repeated double x_initial = 1; - * @return whether the xInitial field is set - */ - public boolean hasXInitial() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * repeated double x_initial = 1; - * @return this - */ - public ProtobufQuinticHermiteSpline clearXInitial() { - bitField0_ &= ~0x00000001; - xInitial.clear(); - return this; - } - - /** - * repeated double x_initial = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableXInitial()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getXInitial() { - return xInitial; - } - - /** - * repeated double x_initial = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableXInitial() { - bitField0_ |= 0x00000001; - return xInitial; - } - - /** - * repeated double x_initial = 1; - * @param value the xInitial to add - * @return this - */ - public ProtobufQuinticHermiteSpline addXInitial(final double value) { - bitField0_ |= 0x00000001; - xInitial.add(value); - return this; - } - - /** - * repeated double x_initial = 1; - * @param values the xInitial to add - * @return this - */ - public ProtobufQuinticHermiteSpline addAllXInitial(final double... values) { - bitField0_ |= 0x00000001; - xInitial.addAll(values); - return this; - } - - /** - * repeated double x_final = 2; - * @return whether the xFinal field is set - */ - public boolean hasXFinal() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * repeated double x_final = 2; - * @return this - */ - public ProtobufQuinticHermiteSpline clearXFinal() { - bitField0_ &= ~0x00000002; - xFinal.clear(); - return this; - } - - /** - * repeated double x_final = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableXFinal()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getXFinal() { - return xFinal; - } - - /** - * repeated double x_final = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableXFinal() { - bitField0_ |= 0x00000002; - return xFinal; - } - - /** - * repeated double x_final = 2; - * @param value the xFinal to add - * @return this - */ - public ProtobufQuinticHermiteSpline addXFinal(final double value) { - bitField0_ |= 0x00000002; - xFinal.add(value); - return this; - } - - /** - * repeated double x_final = 2; - * @param values the xFinal to add - * @return this - */ - public ProtobufQuinticHermiteSpline addAllXFinal(final double... values) { - bitField0_ |= 0x00000002; - xFinal.addAll(values); - return this; - } - - /** - * repeated double y_initial = 3; - * @return whether the yInitial field is set - */ - public boolean hasYInitial() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * repeated double y_initial = 3; - * @return this - */ - public ProtobufQuinticHermiteSpline clearYInitial() { - bitField0_ &= ~0x00000004; - yInitial.clear(); - return this; - } - - /** - * repeated double y_initial = 3; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableYInitial()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getYInitial() { - return yInitial; - } - - /** - * repeated double y_initial = 3; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableYInitial() { - bitField0_ |= 0x00000004; - return yInitial; - } - - /** - * repeated double y_initial = 3; - * @param value the yInitial to add - * @return this - */ - public ProtobufQuinticHermiteSpline addYInitial(final double value) { - bitField0_ |= 0x00000004; - yInitial.add(value); - return this; - } - - /** - * repeated double y_initial = 3; - * @param values the yInitial to add - * @return this - */ - public ProtobufQuinticHermiteSpline addAllYInitial(final double... values) { - bitField0_ |= 0x00000004; - yInitial.addAll(values); - return this; - } - - /** - * repeated double y_final = 4; - * @return whether the yFinal field is set - */ - public boolean hasYFinal() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * repeated double y_final = 4; - * @return this - */ - public ProtobufQuinticHermiteSpline clearYFinal() { - bitField0_ &= ~0x00000008; - yFinal.clear(); - return this; - } - - /** - * repeated double y_final = 4; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableYFinal()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getYFinal() { - return yFinal; - } - - /** - * repeated double y_final = 4; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableYFinal() { - bitField0_ |= 0x00000008; - return yFinal; - } - - /** - * repeated double y_final = 4; - * @param value the yFinal to add - * @return this - */ - public ProtobufQuinticHermiteSpline addYFinal(final double value) { - bitField0_ |= 0x00000008; - yFinal.add(value); - return this; - } - - /** - * repeated double y_final = 4; - * @param values the yFinal to add - * @return this - */ - public ProtobufQuinticHermiteSpline addAllYFinal(final double... values) { - bitField0_ |= 0x00000008; - yFinal.addAll(values); - return this; - } - - @Override - public ProtobufQuinticHermiteSpline copyFrom(final ProtobufQuinticHermiteSpline other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - xInitial.copyFrom(other.xInitial); - xFinal.copyFrom(other.xFinal); - yInitial.copyFrom(other.yInitial); - yFinal.copyFrom(other.yFinal); - } - return this; - } - - @Override - public ProtobufQuinticHermiteSpline mergeFrom(final ProtobufQuinticHermiteSpline other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasXInitial()) { - getMutableXInitial().addAll(other.xInitial); - } - if (other.hasXFinal()) { - getMutableXFinal().addAll(other.xFinal); - } - if (other.hasYInitial()) { - getMutableYInitial().addAll(other.yInitial); - } - if (other.hasYFinal()) { - getMutableYFinal().addAll(other.yFinal); - } - return this; - } - - @Override - public ProtobufQuinticHermiteSpline clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - xInitial.clear(); - xFinal.clear(); - yInitial.clear(); - yFinal.clear(); - return this; - } - - @Override - public ProtobufQuinticHermiteSpline clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - xInitial.clear(); - xFinal.clear(); - yInitial.clear(); - yFinal.clear(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufQuinticHermiteSpline)) { - return false; - } - ProtobufQuinticHermiteSpline other = (ProtobufQuinticHermiteSpline) o; - return bitField0_ == other.bitField0_ - && (!hasXInitial() || xInitial.equals(other.xInitial)) - && (!hasXFinal() || xFinal.equals(other.xFinal)) - && (!hasYInitial() || yInitial.equals(other.yInitial)) - && (!hasYFinal() || yFinal.equals(other.yFinal)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - for (int i = 0; i < xInitial.length(); i++) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(xInitial.array()[i]); - } - } - if ((bitField0_ & 0x00000002) != 0) { - for (int i = 0; i < xFinal.length(); i++) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(xFinal.array()[i]); - } - } - if ((bitField0_ & 0x00000004) != 0) { - for (int i = 0; i < yInitial.length(); i++) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(yInitial.array()[i]); - } - } - if ((bitField0_ & 0x00000008) != 0) { - for (int i = 0; i < yFinal.length(); i++) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(yFinal.array()[i]); - } - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += (1 + 8) * xInitial.length(); - } - if ((bitField0_ & 0x00000002) != 0) { - size += (1 + 8) * xFinal.length(); - } - if ((bitField0_ & 0x00000004) != 0) { - size += (1 + 8) * yInitial.length(); - } - if ((bitField0_ & 0x00000008) != 0) { - size += (1 + 8) * yFinal.length(); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufQuinticHermiteSpline mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // xInitial [packed=true] - input.readPackedDouble(xInitial); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 18) { - break; - } - } - case 18: { - // xFinal [packed=true] - input.readPackedDouble(xFinal); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 26) { - break; - } - } - case 26: { - // yInitial [packed=true] - input.readPackedDouble(yInitial); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 34) { - break; - } - } - case 34: { - // yFinal [packed=true] - input.readPackedDouble(yFinal); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - case 9: { - // xInitial [packed=false] - tag = input.readRepeatedDouble(xInitial, tag); - bitField0_ |= 0x00000001; - break; - } - case 17: { - // xFinal [packed=false] - tag = input.readRepeatedDouble(xFinal, tag); - bitField0_ |= 0x00000002; - break; - } - case 25: { - // yInitial [packed=false] - tag = input.readRepeatedDouble(yInitial, tag); - bitField0_ |= 0x00000004; - break; - } - case 33: { - // yFinal [packed=false] - tag = input.readRepeatedDouble(yFinal, tag); - bitField0_ |= 0x00000008; - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeRepeatedDouble(FieldNames.xInitial, xInitial); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRepeatedDouble(FieldNames.xFinal, xFinal); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRepeatedDouble(FieldNames.yInitial, yInitial); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRepeatedDouble(FieldNames.yFinal, yFinal); - } - output.endObject(); - } - - @Override - public ProtobufQuinticHermiteSpline mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -1998129236: - case -2134571395: { - if (input.isAtField(FieldNames.xInitial)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(xInitial); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -791585826: - case 1943464687: { - if (input.isAtField(FieldNames.xFinal)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(xFinal); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -255318901: - case 352941438: { - if (input.isAtField(FieldNames.yInitial)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(yInitial); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case -762956675: - case -1463998928: { - if (input.isAtField(FieldNames.yFinal)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(yFinal); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufQuinticHermiteSpline clone() { - return new ProtobufQuinticHermiteSpline().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufQuinticHermiteSpline parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufQuinticHermiteSpline(), data).checkInitialized(); - } - - public static ProtobufQuinticHermiteSpline parseFrom(final ProtoSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufQuinticHermiteSpline(), input).checkInitialized(); - } - - public static ProtobufQuinticHermiteSpline parseFrom(final JsonSource input) throws - IOException { - return ProtoMessage.mergeFrom(new ProtobufQuinticHermiteSpline(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufQuinticHermiteSpline messages - */ - public static MessageFactory getFactory() { - return ProtobufQuinticHermiteSplineFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Spline.wpi_proto_ProtobufQuinticHermiteSpline_descriptor; - } - - private enum ProtobufQuinticHermiteSplineFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufQuinticHermiteSpline create() { - return ProtobufQuinticHermiteSpline.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName xInitial = FieldName.forField("xInitial", "x_initial"); - - static final FieldName xFinal = FieldName.forField("xFinal", "x_final"); - - static final FieldName yInitial = FieldName.forField("yInitial", "y_initial"); - - static final FieldName yFinal = FieldName.forField("yFinal", "y_final"); - } - } -} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/System.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/System.java deleted file mode 100644 index 06a2df7a40..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/System.java +++ /dev/null @@ -1,1454 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; - -public final class System { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(1327, - "CgxzeXN0ZW0ucHJvdG8SCXdwaS5wcm90bxoNd3BpbWF0aC5wcm90byLEAQoPUHJvdG9idWZEQ01vdG9y" + - "EicKD25vbWluYWxfdm9sdGFnZRgBIAEoAVIObm9taW5hbFZvbHRhZ2USIQoMc3RhbGxfdG9ycXVlGAIg" + - "ASgBUgtzdGFsbFRvcnF1ZRIjCg1zdGFsbF9jdXJyZW50GAMgASgBUgxzdGFsbEN1cnJlbnQSIQoMZnJl" + - "ZV9jdXJyZW50GAQgASgBUgtmcmVlQ3VycmVudBIdCgpmcmVlX3NwZWVkGAUgASgBUglmcmVlU3BlZWQi" + - "mQIKFFByb3RvYnVmTGluZWFyU3lzdGVtEh0KCm51bV9zdGF0ZXMYASABKA1SCW51bVN0YXRlcxIdCgpu" + - "dW1faW5wdXRzGAIgASgNUgludW1JbnB1dHMSHwoLbnVtX291dHB1dHMYAyABKA1SCm51bU91dHB1dHMS" + - "JwoBYRgEIAEoCzIZLndwaS5wcm90by5Qcm90b2J1Zk1hdHJpeFIBYRInCgFiGAUgASgLMhkud3BpLnBy" + - "b3RvLlByb3RvYnVmTWF0cml4UgFiEicKAWMYBiABKAsyGS53cGkucHJvdG8uUHJvdG9idWZNYXRyaXhS" + - "AWMSJwoBZBgHIAEoCzIZLndwaS5wcm90by5Qcm90b2J1Zk1hdHJpeFIBZEIXChVvcmcud3BpbGliLm1h" + - "dGgucHJvdG9KgAYKBhIEAAAYAQoICgEMEgMAABIKCAoBAhIDAgASCgkKAgMAEgMEABcKCAoBCBIDBgAu" + - "CgkKAggBEgMGAC4KCgoCBAASBAgADgEKCgoDBAABEgMICBcKCwoEBAACABIDCQIdCgwKBQQAAgAFEgMJ" + - "AggKDAoFBAACAAESAwkJGAoMCgUEAAIAAxIDCRscCgsKBAQAAgESAwoCGgoMCgUEAAIBBRIDCgIICgwK" + - "BQQAAgEBEgMKCRUKDAoFBAACAQMSAwoYGQoLCgQEAAICEgMLAhsKDAoFBAACAgUSAwsCCAoMCgUEAAIC" + - "ARIDCwkWCgwKBQQAAgIDEgMLGRoKCwoEBAACAxIDDAIaCgwKBQQAAgMFEgMMAggKDAoFBAACAwESAwwJ" + - "FQoMCgUEAAIDAxIDDBgZCgsKBAQAAgQSAw0CGAoMCgUEAAIEBRIDDQIICgwKBQQAAgQBEgMNCRMKDAoF" + - "BAACBAMSAw0WFwoKCgIEARIEEAAYAQoKCgMEAQESAxAIHAoLCgQEAQIAEgMRAhgKDAoFBAECAAUSAxEC" + - "CAoMCgUEAQIAARIDEQkTCgwKBQQBAgADEgMRFhcKCwoEBAECARIDEgIYCgwKBQQBAgEFEgMSAggKDAoF" + - "BAECAQESAxIJEwoMCgUEAQIBAxIDEhYXCgsKBAQBAgISAxMCGQoMCgUEAQICBRIDEwIICgwKBQQBAgIB" + - "EgMTCRQKDAoFBAECAgMSAxMXGAoLCgQEAQIDEgMUAhcKDAoFBAECAwYSAxQCEAoMCgUEAQIDARIDFBES" + - "CgwKBQQBAgMDEgMUFRYKCwoEBAECBBIDFQIXCgwKBQQBAgQGEgMVAhAKDAoFBAECBAESAxUREgoMCgUE", - "AQIEAxIDFRUWCgsKBAQBAgUSAxYCFwoMCgUEAQIFBhIDFgIQCgwKBQQBAgUBEgMWERIKDAoFBAECBQMS" + - "AxYVFgoLCgQEAQIGEgMXAhcKDAoFBAECBgYSAxcCEAoMCgUEAQIGARIDFxESCgwKBQQBAgYDEgMXFRZi" + - "BnByb3RvMw=="); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("system.proto", "wpi.proto", descriptorData, Wpimath.getDescriptor()); - - static final Descriptors.Descriptor wpi_proto_ProtobufDCMotor_descriptor = descriptor.internalContainedType(43, 196, "ProtobufDCMotor", "wpi.proto.ProtobufDCMotor"); - - static final Descriptors.Descriptor wpi_proto_ProtobufLinearSystem_descriptor = descriptor.internalContainedType(242, 281, "ProtobufLinearSystem", "wpi.proto.ProtobufLinearSystem"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufDCMotor} - */ - public static final class ProtobufDCMotor extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double nominal_voltage = 1; - */ - private double nominalVoltage; - - /** - * optional double stall_torque = 2; - */ - private double stallTorque; - - /** - * optional double stall_current = 3; - */ - private double stallCurrent; - - /** - * optional double free_current = 4; - */ - private double freeCurrent; - - /** - * optional double free_speed = 5; - */ - private double freeSpeed; - - private ProtobufDCMotor() { - } - - /** - * @return a new empty instance of {@code ProtobufDCMotor} - */ - public static ProtobufDCMotor newInstance() { - return new ProtobufDCMotor(); - } - - /** - * optional double nominal_voltage = 1; - * @return whether the nominalVoltage field is set - */ - public boolean hasNominalVoltage() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double nominal_voltage = 1; - * @return this - */ - public ProtobufDCMotor clearNominalVoltage() { - bitField0_ &= ~0x00000001; - nominalVoltage = 0D; - return this; - } - - /** - * optional double nominal_voltage = 1; - * @return the nominalVoltage - */ - public double getNominalVoltage() { - return nominalVoltage; - } - - /** - * optional double nominal_voltage = 1; - * @param value the nominalVoltage to set - * @return this - */ - public ProtobufDCMotor setNominalVoltage(final double value) { - bitField0_ |= 0x00000001; - nominalVoltage = value; - return this; - } - - /** - * optional double stall_torque = 2; - * @return whether the stallTorque field is set - */ - public boolean hasStallTorque() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double stall_torque = 2; - * @return this - */ - public ProtobufDCMotor clearStallTorque() { - bitField0_ &= ~0x00000002; - stallTorque = 0D; - return this; - } - - /** - * optional double stall_torque = 2; - * @return the stallTorque - */ - public double getStallTorque() { - return stallTorque; - } - - /** - * optional double stall_torque = 2; - * @param value the stallTorque to set - * @return this - */ - public ProtobufDCMotor setStallTorque(final double value) { - bitField0_ |= 0x00000002; - stallTorque = value; - return this; - } - - /** - * optional double stall_current = 3; - * @return whether the stallCurrent field is set - */ - public boolean hasStallCurrent() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double stall_current = 3; - * @return this - */ - public ProtobufDCMotor clearStallCurrent() { - bitField0_ &= ~0x00000004; - stallCurrent = 0D; - return this; - } - - /** - * optional double stall_current = 3; - * @return the stallCurrent - */ - public double getStallCurrent() { - return stallCurrent; - } - - /** - * optional double stall_current = 3; - * @param value the stallCurrent to set - * @return this - */ - public ProtobufDCMotor setStallCurrent(final double value) { - bitField0_ |= 0x00000004; - stallCurrent = value; - return this; - } - - /** - * optional double free_current = 4; - * @return whether the freeCurrent field is set - */ - public boolean hasFreeCurrent() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double free_current = 4; - * @return this - */ - public ProtobufDCMotor clearFreeCurrent() { - bitField0_ &= ~0x00000008; - freeCurrent = 0D; - return this; - } - - /** - * optional double free_current = 4; - * @return the freeCurrent - */ - public double getFreeCurrent() { - return freeCurrent; - } - - /** - * optional double free_current = 4; - * @param value the freeCurrent to set - * @return this - */ - public ProtobufDCMotor setFreeCurrent(final double value) { - bitField0_ |= 0x00000008; - freeCurrent = value; - return this; - } - - /** - * optional double free_speed = 5; - * @return whether the freeSpeed field is set - */ - public boolean hasFreeSpeed() { - return (bitField0_ & 0x00000010) != 0; - } - - /** - * optional double free_speed = 5; - * @return this - */ - public ProtobufDCMotor clearFreeSpeed() { - bitField0_ &= ~0x00000010; - freeSpeed = 0D; - return this; - } - - /** - * optional double free_speed = 5; - * @return the freeSpeed - */ - public double getFreeSpeed() { - return freeSpeed; - } - - /** - * optional double free_speed = 5; - * @param value the freeSpeed to set - * @return this - */ - public ProtobufDCMotor setFreeSpeed(final double value) { - bitField0_ |= 0x00000010; - freeSpeed = value; - return this; - } - - @Override - public ProtobufDCMotor copyFrom(final ProtobufDCMotor other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - nominalVoltage = other.nominalVoltage; - stallTorque = other.stallTorque; - stallCurrent = other.stallCurrent; - freeCurrent = other.freeCurrent; - freeSpeed = other.freeSpeed; - } - return this; - } - - @Override - public ProtobufDCMotor mergeFrom(final ProtobufDCMotor other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasNominalVoltage()) { - setNominalVoltage(other.nominalVoltage); - } - if (other.hasStallTorque()) { - setStallTorque(other.stallTorque); - } - if (other.hasStallCurrent()) { - setStallCurrent(other.stallCurrent); - } - if (other.hasFreeCurrent()) { - setFreeCurrent(other.freeCurrent); - } - if (other.hasFreeSpeed()) { - setFreeSpeed(other.freeSpeed); - } - return this; - } - - @Override - public ProtobufDCMotor clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - nominalVoltage = 0D; - stallTorque = 0D; - stallCurrent = 0D; - freeCurrent = 0D; - freeSpeed = 0D; - return this; - } - - @Override - public ProtobufDCMotor clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufDCMotor)) { - return false; - } - ProtobufDCMotor other = (ProtobufDCMotor) o; - return bitField0_ == other.bitField0_ - && (!hasNominalVoltage() || ProtoUtil.isEqual(nominalVoltage, other.nominalVoltage)) - && (!hasStallTorque() || ProtoUtil.isEqual(stallTorque, other.stallTorque)) - && (!hasStallCurrent() || ProtoUtil.isEqual(stallCurrent, other.stallCurrent)) - && (!hasFreeCurrent() || ProtoUtil.isEqual(freeCurrent, other.freeCurrent)) - && (!hasFreeSpeed() || ProtoUtil.isEqual(freeSpeed, other.freeSpeed)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(nominalVoltage); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(stallTorque); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(stallCurrent); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 33); - output.writeDoubleNoTag(freeCurrent); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeRawByte((byte) 41); - output.writeDoubleNoTag(freeSpeed); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000010) != 0) { - size += 9; - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufDCMotor mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // nominalVoltage - nominalVoltage = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // stallTorque - stallTorque = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // stallCurrent - stallCurrent = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 33) { - break; - } - } - case 33: { - // freeCurrent - freeCurrent = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 41) { - break; - } - } - case 41: { - // freeSpeed - freeSpeed = input.readDouble(); - bitField0_ |= 0x00000010; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.nominalVoltage, nominalVoltage); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.stallTorque, stallTorque); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.stallCurrent, stallCurrent); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.freeCurrent, freeCurrent); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeDouble(FieldNames.freeSpeed, freeSpeed); - } - output.endObject(); - } - - @Override - public ProtobufDCMotor mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 1374862050: - case 173092603: { - if (input.isAtField(FieldNames.nominalVoltage)) { - if (!input.trySkipNullValue()) { - nominalVoltage = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 2075810250: - case 1238615945: { - if (input.isAtField(FieldNames.stallTorque)) { - if (!input.trySkipNullValue()) { - stallTorque = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -2105262663: - case 2006484954: { - if (input.isAtField(FieldNames.stallCurrent)) { - if (!input.trySkipNullValue()) { - stallCurrent = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 1024355693: - case 240406182: { - if (input.isAtField(FieldNames.freeCurrent)) { - if (!input.trySkipNullValue()) { - freeCurrent = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - case -444654277: - case -552732492: { - if (input.isAtField(FieldNames.freeSpeed)) { - if (!input.trySkipNullValue()) { - freeSpeed = input.readDouble(); - bitField0_ |= 0x00000010; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufDCMotor clone() { - return new ProtobufDCMotor().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufDCMotor parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufDCMotor(), data).checkInitialized(); - } - - public static ProtobufDCMotor parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufDCMotor(), input).checkInitialized(); - } - - public static ProtobufDCMotor parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufDCMotor(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufDCMotor messages - */ - public static MessageFactory getFactory() { - return ProtobufDCMotorFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return System.wpi_proto_ProtobufDCMotor_descriptor; - } - - private enum ProtobufDCMotorFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufDCMotor create() { - return ProtobufDCMotor.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName nominalVoltage = FieldName.forField("nominalVoltage", "nominal_voltage"); - - static final FieldName stallTorque = FieldName.forField("stallTorque", "stall_torque"); - - static final FieldName stallCurrent = FieldName.forField("stallCurrent", "stall_current"); - - static final FieldName freeCurrent = FieldName.forField("freeCurrent", "free_current"); - - static final FieldName freeSpeed = FieldName.forField("freeSpeed", "free_speed"); - } - } - - /** - * Protobuf type {@code ProtobufLinearSystem} - */ - public static final class ProtobufLinearSystem extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional uint32 num_states = 1; - */ - private int numStates; - - /** - * optional uint32 num_inputs = 2; - */ - private int numInputs; - - /** - * optional uint32 num_outputs = 3; - */ - private int numOutputs; - - /** - * optional .wpi.proto.ProtobufMatrix a = 4; - */ - private final Wpimath.ProtobufMatrix a = Wpimath.ProtobufMatrix.newInstance(); - - /** - * optional .wpi.proto.ProtobufMatrix b = 5; - */ - private final Wpimath.ProtobufMatrix b = Wpimath.ProtobufMatrix.newInstance(); - - /** - * optional .wpi.proto.ProtobufMatrix c = 6; - */ - private final Wpimath.ProtobufMatrix c = Wpimath.ProtobufMatrix.newInstance(); - - /** - * optional .wpi.proto.ProtobufMatrix d = 7; - */ - private final Wpimath.ProtobufMatrix d = Wpimath.ProtobufMatrix.newInstance(); - - private ProtobufLinearSystem() { - } - - /** - * @return a new empty instance of {@code ProtobufLinearSystem} - */ - public static ProtobufLinearSystem newInstance() { - return new ProtobufLinearSystem(); - } - - /** - * optional uint32 num_states = 1; - * @return whether the numStates field is set - */ - public boolean hasNumStates() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional uint32 num_states = 1; - * @return this - */ - public ProtobufLinearSystem clearNumStates() { - bitField0_ &= ~0x00000001; - numStates = 0; - return this; - } - - /** - * optional uint32 num_states = 1; - * @return the numStates - */ - public int getNumStates() { - return numStates; - } - - /** - * optional uint32 num_states = 1; - * @param value the numStates to set - * @return this - */ - public ProtobufLinearSystem setNumStates(final int value) { - bitField0_ |= 0x00000001; - numStates = value; - return this; - } - - /** - * optional uint32 num_inputs = 2; - * @return whether the numInputs field is set - */ - public boolean hasNumInputs() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional uint32 num_inputs = 2; - * @return this - */ - public ProtobufLinearSystem clearNumInputs() { - bitField0_ &= ~0x00000002; - numInputs = 0; - return this; - } - - /** - * optional uint32 num_inputs = 2; - * @return the numInputs - */ - public int getNumInputs() { - return numInputs; - } - - /** - * optional uint32 num_inputs = 2; - * @param value the numInputs to set - * @return this - */ - public ProtobufLinearSystem setNumInputs(final int value) { - bitField0_ |= 0x00000002; - numInputs = value; - return this; - } - - /** - * optional uint32 num_outputs = 3; - * @return whether the numOutputs field is set - */ - public boolean hasNumOutputs() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional uint32 num_outputs = 3; - * @return this - */ - public ProtobufLinearSystem clearNumOutputs() { - bitField0_ &= ~0x00000004; - numOutputs = 0; - return this; - } - - /** - * optional uint32 num_outputs = 3; - * @return the numOutputs - */ - public int getNumOutputs() { - return numOutputs; - } - - /** - * optional uint32 num_outputs = 3; - * @param value the numOutputs to set - * @return this - */ - public ProtobufLinearSystem setNumOutputs(final int value) { - bitField0_ |= 0x00000004; - numOutputs = value; - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix a = 4; - * @return whether the a field is set - */ - public boolean hasA() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional .wpi.proto.ProtobufMatrix a = 4; - * @return this - */ - public ProtobufLinearSystem clearA() { - bitField0_ &= ~0x00000008; - a.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix a = 4; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableA()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Wpimath.ProtobufMatrix getA() { - return a; - } - - /** - * optional .wpi.proto.ProtobufMatrix a = 4; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Wpimath.ProtobufMatrix getMutableA() { - bitField0_ |= 0x00000008; - return a; - } - - /** - * optional .wpi.proto.ProtobufMatrix a = 4; - * @param value the a to set - * @return this - */ - public ProtobufLinearSystem setA(final Wpimath.ProtobufMatrix value) { - bitField0_ |= 0x00000008; - a.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix b = 5; - * @return whether the b field is set - */ - public boolean hasB() { - return (bitField0_ & 0x00000010) != 0; - } - - /** - * optional .wpi.proto.ProtobufMatrix b = 5; - * @return this - */ - public ProtobufLinearSystem clearB() { - bitField0_ &= ~0x00000010; - b.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix b = 5; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableB()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Wpimath.ProtobufMatrix getB() { - return b; - } - - /** - * optional .wpi.proto.ProtobufMatrix b = 5; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Wpimath.ProtobufMatrix getMutableB() { - bitField0_ |= 0x00000010; - return b; - } - - /** - * optional .wpi.proto.ProtobufMatrix b = 5; - * @param value the b to set - * @return this - */ - public ProtobufLinearSystem setB(final Wpimath.ProtobufMatrix value) { - bitField0_ |= 0x00000010; - b.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix c = 6; - * @return whether the c field is set - */ - public boolean hasC() { - return (bitField0_ & 0x00000020) != 0; - } - - /** - * optional .wpi.proto.ProtobufMatrix c = 6; - * @return this - */ - public ProtobufLinearSystem clearC() { - bitField0_ &= ~0x00000020; - c.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix c = 6; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableC()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Wpimath.ProtobufMatrix getC() { - return c; - } - - /** - * optional .wpi.proto.ProtobufMatrix c = 6; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Wpimath.ProtobufMatrix getMutableC() { - bitField0_ |= 0x00000020; - return c; - } - - /** - * optional .wpi.proto.ProtobufMatrix c = 6; - * @param value the c to set - * @return this - */ - public ProtobufLinearSystem setC(final Wpimath.ProtobufMatrix value) { - bitField0_ |= 0x00000020; - c.copyFrom(value); - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix d = 7; - * @return whether the d field is set - */ - public boolean hasD() { - return (bitField0_ & 0x00000040) != 0; - } - - /** - * optional .wpi.proto.ProtobufMatrix d = 7; - * @return this - */ - public ProtobufLinearSystem clearD() { - bitField0_ &= ~0x00000040; - d.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufMatrix d = 7; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableD()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Wpimath.ProtobufMatrix getD() { - return d; - } - - /** - * optional .wpi.proto.ProtobufMatrix d = 7; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Wpimath.ProtobufMatrix getMutableD() { - bitField0_ |= 0x00000040; - return d; - } - - /** - * optional .wpi.proto.ProtobufMatrix d = 7; - * @param value the d to set - * @return this - */ - public ProtobufLinearSystem setD(final Wpimath.ProtobufMatrix value) { - bitField0_ |= 0x00000040; - d.copyFrom(value); - return this; - } - - @Override - public ProtobufLinearSystem copyFrom(final ProtobufLinearSystem other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - numStates = other.numStates; - numInputs = other.numInputs; - numOutputs = other.numOutputs; - a.copyFrom(other.a); - b.copyFrom(other.b); - c.copyFrom(other.c); - d.copyFrom(other.d); - } - return this; - } - - @Override - public ProtobufLinearSystem mergeFrom(final ProtobufLinearSystem other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasNumStates()) { - setNumStates(other.numStates); - } - if (other.hasNumInputs()) { - setNumInputs(other.numInputs); - } - if (other.hasNumOutputs()) { - setNumOutputs(other.numOutputs); - } - if (other.hasA()) { - getMutableA().mergeFrom(other.a); - } - if (other.hasB()) { - getMutableB().mergeFrom(other.b); - } - if (other.hasC()) { - getMutableC().mergeFrom(other.c); - } - if (other.hasD()) { - getMutableD().mergeFrom(other.d); - } - return this; - } - - @Override - public ProtobufLinearSystem clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - numStates = 0; - numInputs = 0; - numOutputs = 0; - a.clear(); - b.clear(); - c.clear(); - d.clear(); - return this; - } - - @Override - public ProtobufLinearSystem clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - a.clearQuick(); - b.clearQuick(); - c.clearQuick(); - d.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufLinearSystem)) { - return false; - } - ProtobufLinearSystem other = (ProtobufLinearSystem) o; - return bitField0_ == other.bitField0_ - && (!hasNumStates() || numStates == other.numStates) - && (!hasNumInputs() || numInputs == other.numInputs) - && (!hasNumOutputs() || numOutputs == other.numOutputs) - && (!hasA() || a.equals(other.a)) - && (!hasB() || b.equals(other.b)) - && (!hasC() || c.equals(other.c)) - && (!hasD() || d.equals(other.d)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 8); - output.writeUInt32NoTag(numStates); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 16); - output.writeUInt32NoTag(numInputs); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 24); - output.writeUInt32NoTag(numOutputs); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 34); - output.writeMessageNoTag(a); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeRawByte((byte) 42); - output.writeMessageNoTag(b); - } - if ((bitField0_ & 0x00000020) != 0) { - output.writeRawByte((byte) 50); - output.writeMessageNoTag(c); - } - if ((bitField0_ & 0x00000040) != 0) { - output.writeRawByte((byte) 58); - output.writeMessageNoTag(d); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(numStates); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(numInputs); - } - if ((bitField0_ & 0x00000004) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(numOutputs); - } - if ((bitField0_ & 0x00000008) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(a); - } - if ((bitField0_ & 0x00000010) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(b); - } - if ((bitField0_ & 0x00000020) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(c); - } - if ((bitField0_ & 0x00000040) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(d); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufLinearSystem mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 8: { - // numStates - numStates = input.readUInt32(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 16) { - break; - } - } - case 16: { - // numInputs - numInputs = input.readUInt32(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 24) { - break; - } - } - case 24: { - // numOutputs - numOutputs = input.readUInt32(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 34) { - break; - } - } - case 34: { - // a - input.readMessage(a); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 42) { - break; - } - } - case 42: { - // b - input.readMessage(b); - bitField0_ |= 0x00000010; - tag = input.readTag(); - if (tag != 50) { - break; - } - } - case 50: { - // c - input.readMessage(c); - bitField0_ |= 0x00000020; - tag = input.readTag(); - if (tag != 58) { - break; - } - } - case 58: { - // d - input.readMessage(d); - bitField0_ |= 0x00000040; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeUInt32(FieldNames.numStates, numStates); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeUInt32(FieldNames.numInputs, numInputs); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeUInt32(FieldNames.numOutputs, numOutputs); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeMessage(FieldNames.a, a); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeMessage(FieldNames.b, b); - } - if ((bitField0_ & 0x00000020) != 0) { - output.writeMessage(FieldNames.c, c); - } - if ((bitField0_ & 0x00000040) != 0) { - output.writeMessage(FieldNames.d, d); - } - output.endObject(); - } - - @Override - public ProtobufLinearSystem mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 1233856808: - case 1643330779: { - if (input.isAtField(FieldNames.numStates)) { - if (!input.trySkipNullValue()) { - numStates = input.readUInt32(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 942472463: - case 1351946434: { - if (input.isAtField(FieldNames.numInputs)) { - if (!input.trySkipNullValue()) { - numInputs = input.readUInt32(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 385880364: - case 194671577: { - if (input.isAtField(FieldNames.numOutputs)) { - if (!input.trySkipNullValue()) { - numOutputs = input.readUInt32(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 97: { - if (input.isAtField(FieldNames.a)) { - if (!input.trySkipNullValue()) { - input.readMessage(a); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - case 98: { - if (input.isAtField(FieldNames.b)) { - if (!input.trySkipNullValue()) { - input.readMessage(b); - bitField0_ |= 0x00000010; - } - } else { - input.skipUnknownField(); - } - break; - } - case 99: { - if (input.isAtField(FieldNames.c)) { - if (!input.trySkipNullValue()) { - input.readMessage(c); - bitField0_ |= 0x00000020; - } - } else { - input.skipUnknownField(); - } - break; - } - case 100: { - if (input.isAtField(FieldNames.d)) { - if (!input.trySkipNullValue()) { - input.readMessage(d); - bitField0_ |= 0x00000040; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufLinearSystem clone() { - return new ProtobufLinearSystem().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufLinearSystem parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufLinearSystem(), data).checkInitialized(); - } - - public static ProtobufLinearSystem parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufLinearSystem(), input).checkInitialized(); - } - - public static ProtobufLinearSystem parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufLinearSystem(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufLinearSystem messages - */ - public static MessageFactory getFactory() { - return ProtobufLinearSystemFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return System.wpi_proto_ProtobufLinearSystem_descriptor; - } - - private enum ProtobufLinearSystemFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufLinearSystem create() { - return ProtobufLinearSystem.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName numStates = FieldName.forField("numStates", "num_states"); - - static final FieldName numInputs = FieldName.forField("numInputs", "num_inputs"); - - static final FieldName numOutputs = FieldName.forField("numOutputs", "num_outputs"); - - static final FieldName a = FieldName.forField("a"); - - static final FieldName b = FieldName.forField("b"); - - static final FieldName c = FieldName.forField("c"); - - static final FieldName d = FieldName.forField("d"); - } - } -} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/Trajectory.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/Trajectory.java deleted file mode 100644 index 72e5975f58..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/Trajectory.java +++ /dev/null @@ -1,928 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; -import us.hebi.quickbuf.RepeatedMessage; - -public final class Trajectory { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(806, - "ChB0cmFqZWN0b3J5LnByb3RvEgl3cGkucHJvdG8aEGdlb21ldHJ5MmQucHJvdG8iugEKF1Byb3RvYnVm" + - "VHJhamVjdG9yeVN0YXRlEhIKBHRpbWUYASABKAFSBHRpbWUSGgoIdmVsb2NpdHkYAiABKAFSCHZlbG9j" + - "aXR5EiIKDGFjY2VsZXJhdGlvbhgDIAEoAVIMYWNjZWxlcmF0aW9uEi0KBHBvc2UYBCABKAsyGS53cGku" + - "cHJvdG8uUHJvdG9idWZQb3NlMmRSBHBvc2USHAoJY3VydmF0dXJlGAUgASgBUgljdXJ2YXR1cmUiUAoS" + - "UHJvdG9idWZUcmFqZWN0b3J5EjoKBnN0YXRlcxgCIAMoCzIiLndwaS5wcm90by5Qcm90b2J1ZlRyYWpl" + - "Y3RvcnlTdGF0ZVIGc3RhdGVzQhcKFW9yZy53cGlsaWIubWF0aC5wcm90b0rEAwoGEgQAABIBCggKAQwS" + - "AwAAEgoICgECEgMCABIKCQoCAwASAwQAGgoICgEIEgMGAC4KCQoCCAESAwYALgoKCgIEABIECAAOAQoK" + - "CgMEAAESAwgIHwoLCgQEAAIAEgMJAhIKDAoFBAACAAUSAwkCCAoMCgUEAAIAARIDCQkNCgwKBQQAAgAD" + - "EgMJEBEKCwoEBAACARIDCgIWCgwKBQQAAgEFEgMKAggKDAoFBAACAQESAwoJEQoMCgUEAAIBAxIDChQV" + - "CgsKBAQAAgISAwsCGgoMCgUEAAICBRIDCwIICgwKBQQAAgIBEgMLCRUKDAoFBAACAgMSAwsYGQoLCgQE" + - "AAIDEgMMAhoKDAoFBAACAwYSAwwCEAoMCgUEAAIDARIDDBEVCgwKBQQAAgMDEgMMGBkKCwoEBAACBBID" + - "DQIXCgwKBQQAAgQFEgMNAggKDAoFBAACBAESAw0JEgoMCgUEAAIEAxIDDRUWCgoKAgQBEgQQABIBCgoK" + - "AwQBARIDEAgaCgsKBAQBAgASAxECLgoMCgUEAQIABBIDEQIKCgwKBQQBAgAGEgMRCyIKDAoFBAECAAES" + - "AxEjKQoMCgUEAQIAAxIDESwtYgZwcm90bzM="); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("trajectory.proto", "wpi.proto", descriptorData, Geometry2D.getDescriptor()); - - static final Descriptors.Descriptor wpi_proto_ProtobufTrajectoryState_descriptor = descriptor.internalContainedType(50, 186, "ProtobufTrajectoryState", "wpi.proto.ProtobufTrajectoryState"); - - static final Descriptors.Descriptor wpi_proto_ProtobufTrajectory_descriptor = descriptor.internalContainedType(238, 80, "ProtobufTrajectory", "wpi.proto.ProtobufTrajectory"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufTrajectoryState} - */ - public static final class ProtobufTrajectoryState extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional double time = 1; - */ - private double time; - - /** - * optional double velocity = 2; - */ - private double velocity; - - /** - * optional double acceleration = 3; - */ - private double acceleration; - - /** - * optional double curvature = 5; - */ - private double curvature; - - /** - * optional .wpi.proto.ProtobufPose2d pose = 4; - */ - private final Geometry2D.ProtobufPose2d pose = Geometry2D.ProtobufPose2d.newInstance(); - - private ProtobufTrajectoryState() { - } - - /** - * @return a new empty instance of {@code ProtobufTrajectoryState} - */ - public static ProtobufTrajectoryState newInstance() { - return new ProtobufTrajectoryState(); - } - - /** - * optional double time = 1; - * @return whether the time field is set - */ - public boolean hasTime() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional double time = 1; - * @return this - */ - public ProtobufTrajectoryState clearTime() { - bitField0_ &= ~0x00000001; - time = 0D; - return this; - } - - /** - * optional double time = 1; - * @return the time - */ - public double getTime() { - return time; - } - - /** - * optional double time = 1; - * @param value the time to set - * @return this - */ - public ProtobufTrajectoryState setTime(final double value) { - bitField0_ |= 0x00000001; - time = value; - return this; - } - - /** - * optional double velocity = 2; - * @return whether the velocity field is set - */ - public boolean hasVelocity() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional double velocity = 2; - * @return this - */ - public ProtobufTrajectoryState clearVelocity() { - bitField0_ &= ~0x00000002; - velocity = 0D; - return this; - } - - /** - * optional double velocity = 2; - * @return the velocity - */ - public double getVelocity() { - return velocity; - } - - /** - * optional double velocity = 2; - * @param value the velocity to set - * @return this - */ - public ProtobufTrajectoryState setVelocity(final double value) { - bitField0_ |= 0x00000002; - velocity = value; - return this; - } - - /** - * optional double acceleration = 3; - * @return whether the acceleration field is set - */ - public boolean hasAcceleration() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * optional double acceleration = 3; - * @return this - */ - public ProtobufTrajectoryState clearAcceleration() { - bitField0_ &= ~0x00000004; - acceleration = 0D; - return this; - } - - /** - * optional double acceleration = 3; - * @return the acceleration - */ - public double getAcceleration() { - return acceleration; - } - - /** - * optional double acceleration = 3; - * @param value the acceleration to set - * @return this - */ - public ProtobufTrajectoryState setAcceleration(final double value) { - bitField0_ |= 0x00000004; - acceleration = value; - return this; - } - - /** - * optional double curvature = 5; - * @return whether the curvature field is set - */ - public boolean hasCurvature() { - return (bitField0_ & 0x00000008) != 0; - } - - /** - * optional double curvature = 5; - * @return this - */ - public ProtobufTrajectoryState clearCurvature() { - bitField0_ &= ~0x00000008; - curvature = 0D; - return this; - } - - /** - * optional double curvature = 5; - * @return the curvature - */ - public double getCurvature() { - return curvature; - } - - /** - * optional double curvature = 5; - * @param value the curvature to set - * @return this - */ - public ProtobufTrajectoryState setCurvature(final double value) { - bitField0_ |= 0x00000008; - curvature = value; - return this; - } - - /** - * optional .wpi.proto.ProtobufPose2d pose = 4; - * @return whether the pose field is set - */ - public boolean hasPose() { - return (bitField0_ & 0x00000010) != 0; - } - - /** - * optional .wpi.proto.ProtobufPose2d pose = 4; - * @return this - */ - public ProtobufTrajectoryState clearPose() { - bitField0_ &= ~0x00000010; - pose.clear(); - return this; - } - - /** - * optional .wpi.proto.ProtobufPose2d pose = 4; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutablePose()} if you want to modify it. - * - * @return internal storage object for reading - */ - public Geometry2D.ProtobufPose2d getPose() { - return pose; - } - - /** - * optional .wpi.proto.ProtobufPose2d pose = 4; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public Geometry2D.ProtobufPose2d getMutablePose() { - bitField0_ |= 0x00000010; - return pose; - } - - /** - * optional .wpi.proto.ProtobufPose2d pose = 4; - * @param value the pose to set - * @return this - */ - public ProtobufTrajectoryState setPose(final Geometry2D.ProtobufPose2d value) { - bitField0_ |= 0x00000010; - pose.copyFrom(value); - return this; - } - - @Override - public ProtobufTrajectoryState copyFrom(final ProtobufTrajectoryState other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - time = other.time; - velocity = other.velocity; - acceleration = other.acceleration; - curvature = other.curvature; - pose.copyFrom(other.pose); - } - return this; - } - - @Override - public ProtobufTrajectoryState mergeFrom(final ProtobufTrajectoryState other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasTime()) { - setTime(other.time); - } - if (other.hasVelocity()) { - setVelocity(other.velocity); - } - if (other.hasAcceleration()) { - setAcceleration(other.acceleration); - } - if (other.hasCurvature()) { - setCurvature(other.curvature); - } - if (other.hasPose()) { - getMutablePose().mergeFrom(other.pose); - } - return this; - } - - @Override - public ProtobufTrajectoryState clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - time = 0D; - velocity = 0D; - acceleration = 0D; - curvature = 0D; - pose.clear(); - return this; - } - - @Override - public ProtobufTrajectoryState clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - pose.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTrajectoryState)) { - return false; - } - ProtobufTrajectoryState other = (ProtobufTrajectoryState) o; - return bitField0_ == other.bitField0_ - && (!hasTime() || ProtoUtil.isEqual(time, other.time)) - && (!hasVelocity() || ProtoUtil.isEqual(velocity, other.velocity)) - && (!hasAcceleration() || ProtoUtil.isEqual(acceleration, other.acceleration)) - && (!hasCurvature() || ProtoUtil.isEqual(curvature, other.curvature)) - && (!hasPose() || pose.equals(other.pose)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(time); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 17); - output.writeDoubleNoTag(velocity); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(acceleration); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeRawByte((byte) 41); - output.writeDoubleNoTag(curvature); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeRawByte((byte) 34); - output.writeMessageNoTag(pose); - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000002) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000004) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000008) != 0) { - size += 9; - } - if ((bitField0_ & 0x00000010) != 0) { - size += 1 + ProtoSink.computeMessageSizeNoTag(pose); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTrajectoryState mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 9: { - // time - time = input.readDouble(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 17) { - break; - } - } - case 17: { - // velocity - velocity = input.readDouble(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 25) { - break; - } - } - case 25: { - // acceleration - acceleration = input.readDouble(); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 41) { - break; - } - } - case 41: { - // curvature - curvature = input.readDouble(); - bitField0_ |= 0x00000008; - tag = input.readTag(); - if (tag != 34) { - break; - } - } - case 34: { - // pose - input.readMessage(pose); - bitField0_ |= 0x00000010; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeDouble(FieldNames.time, time); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeDouble(FieldNames.velocity, velocity); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeDouble(FieldNames.acceleration, acceleration); - } - if ((bitField0_ & 0x00000008) != 0) { - output.writeDouble(FieldNames.curvature, curvature); - } - if ((bitField0_ & 0x00000010) != 0) { - output.writeMessage(FieldNames.pose, pose); - } - output.endObject(); - } - - @Override - public ProtobufTrajectoryState mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3560141: { - if (input.isAtField(FieldNames.time)) { - if (!input.trySkipNullValue()) { - time = input.readDouble(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case 2134260957: { - if (input.isAtField(FieldNames.velocity)) { - if (!input.trySkipNullValue()) { - velocity = input.readDouble(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case -267299712: { - if (input.isAtField(FieldNames.acceleration)) { - if (!input.trySkipNullValue()) { - acceleration = input.readDouble(); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - case 768611295: { - if (input.isAtField(FieldNames.curvature)) { - if (!input.trySkipNullValue()) { - curvature = input.readDouble(); - bitField0_ |= 0x00000008; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3446929: { - if (input.isAtField(FieldNames.pose)) { - if (!input.trySkipNullValue()) { - input.readMessage(pose); - bitField0_ |= 0x00000010; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTrajectoryState clone() { - return new ProtobufTrajectoryState().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTrajectoryState parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTrajectoryState(), data).checkInitialized(); - } - - public static ProtobufTrajectoryState parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTrajectoryState(), input).checkInitialized(); - } - - public static ProtobufTrajectoryState parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTrajectoryState(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTrajectoryState messages - */ - public static MessageFactory getFactory() { - return ProtobufTrajectoryStateFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Trajectory.wpi_proto_ProtobufTrajectoryState_descriptor; - } - - private enum ProtobufTrajectoryStateFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTrajectoryState create() { - return ProtobufTrajectoryState.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName time = FieldName.forField("time"); - - static final FieldName velocity = FieldName.forField("velocity"); - - static final FieldName acceleration = FieldName.forField("acceleration"); - - static final FieldName curvature = FieldName.forField("curvature"); - - static final FieldName pose = FieldName.forField("pose"); - } - } - - /** - * Protobuf type {@code ProtobufTrajectory} - */ - public static final class ProtobufTrajectory extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * repeated .wpi.proto.ProtobufTrajectoryState states = 2; - */ - private final RepeatedMessage states = RepeatedMessage.newEmptyInstance(ProtobufTrajectoryState.getFactory()); - - private ProtobufTrajectory() { - } - - /** - * @return a new empty instance of {@code ProtobufTrajectory} - */ - public static ProtobufTrajectory newInstance() { - return new ProtobufTrajectory(); - } - - /** - * repeated .wpi.proto.ProtobufTrajectoryState states = 2; - * @return whether the states field is set - */ - public boolean hasStates() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * repeated .wpi.proto.ProtobufTrajectoryState states = 2; - * @return this - */ - public ProtobufTrajectory clearStates() { - bitField0_ &= ~0x00000001; - states.clear(); - return this; - } - - /** - * repeated .wpi.proto.ProtobufTrajectoryState states = 2; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableStates()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedMessage getStates() { - return states; - } - - /** - * repeated .wpi.proto.ProtobufTrajectoryState states = 2; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedMessage getMutableStates() { - bitField0_ |= 0x00000001; - return states; - } - - /** - * repeated .wpi.proto.ProtobufTrajectoryState states = 2; - * @param value the states to add - * @return this - */ - public ProtobufTrajectory addStates(final ProtobufTrajectoryState value) { - bitField0_ |= 0x00000001; - states.add(value); - return this; - } - - /** - * repeated .wpi.proto.ProtobufTrajectoryState states = 2; - * @param values the states to add - * @return this - */ - public ProtobufTrajectory addAllStates(final ProtobufTrajectoryState... values) { - bitField0_ |= 0x00000001; - states.addAll(values); - return this; - } - - @Override - public ProtobufTrajectory copyFrom(final ProtobufTrajectory other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - states.copyFrom(other.states); - } - return this; - } - - @Override - public ProtobufTrajectory mergeFrom(final ProtobufTrajectory other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasStates()) { - getMutableStates().addAll(other.states); - } - return this; - } - - @Override - public ProtobufTrajectory clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - states.clear(); - return this; - } - - @Override - public ProtobufTrajectory clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - states.clearQuick(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufTrajectory)) { - return false; - } - ProtobufTrajectory other = (ProtobufTrajectory) o; - return bitField0_ == other.bitField0_ - && (!hasStates() || states.equals(other.states)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - for (int i = 0; i < states.length(); i++) { - output.writeRawByte((byte) 18); - output.writeMessageNoTag(states.get(i)); - } - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += (1 * states.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(states); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufTrajectory mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 18: { - // states - tag = input.readRepeatedMessage(states, tag); - bitField0_ |= 0x00000001; - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeRepeatedMessage(FieldNames.states, states); - } - output.endObject(); - } - - @Override - public ProtobufTrajectory mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -892482046: { - if (input.isAtField(FieldNames.states)) { - if (!input.trySkipNullValue()) { - input.readRepeatedMessage(states); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufTrajectory clone() { - return new ProtobufTrajectory().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufTrajectory parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufTrajectory(), data).checkInitialized(); - } - - public static ProtobufTrajectory parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTrajectory(), input).checkInitialized(); - } - - public static ProtobufTrajectory parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufTrajectory(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufTrajectory messages - */ - public static MessageFactory getFactory() { - return ProtobufTrajectoryFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Trajectory.wpi_proto_ProtobufTrajectory_descriptor; - } - - private enum ProtobufTrajectoryFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufTrajectory create() { - return ProtobufTrajectory.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName states = FieldName.forField("states"); - } - } -} diff --git a/wpimath/src/generated/main/java/org/wpilib/math/proto/Wpimath.java b/wpimath/src/generated/main/java/org/wpilib/math/proto/Wpimath.java deleted file mode 100644 index 005f0660f2..0000000000 --- a/wpimath/src/generated/main/java/org/wpilib/math/proto/Wpimath.java +++ /dev/null @@ -1,791 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. -// Code generated by protocol buffer compiler. Do not edit! -package org.wpilib.math.proto; - -import java.io.IOException; -import us.hebi.quickbuf.Descriptors; -import us.hebi.quickbuf.FieldName; -import us.hebi.quickbuf.InvalidProtocolBufferException; -import us.hebi.quickbuf.JsonSink; -import us.hebi.quickbuf.JsonSource; -import us.hebi.quickbuf.MessageFactory; -import us.hebi.quickbuf.ProtoMessage; -import us.hebi.quickbuf.ProtoSink; -import us.hebi.quickbuf.ProtoSource; -import us.hebi.quickbuf.ProtoUtil; -import us.hebi.quickbuf.RepeatedByte; -import us.hebi.quickbuf.RepeatedDouble; - -public final class Wpimath { - private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(537, - "Cg13cGltYXRoLnByb3RvEgl3cGkucHJvdG8iWgoOUHJvdG9idWZNYXRyaXgSGQoIbnVtX3Jvd3MYASAB" + - "KA1SB251bVJvd3MSGQoIbnVtX2NvbHMYAiABKA1SB251bUNvbHMSEgoEZGF0YRgDIAMoAVIEZGF0YSIk" + - "Cg5Qcm90b2J1ZlZlY3RvchISCgRyb3dzGAEgAygBUgRyb3dzQhcKFW9yZy53cGlsaWIubWF0aC5wcm90" + - "b0rZAgoGEgQAAA4BCggKAQwSAwAAEgoICgECEgMCABIKCAoBCBIDBAAuCgkKAggBEgMEAC4KCgoCBAAS" + - "BAYACgEKCgoDBAABEgMGCBYKCwoEBAACABIDBwIWCgwKBQQAAgAFEgMHAggKDAoFBAACAAESAwcJEQoM" + - "CgUEAAIAAxIDBxQVCgsKBAQAAgESAwgCFgoMCgUEAAIBBRIDCAIICgwKBQQAAgEBEgMICREKDAoFBAAC" + - "AQMSAwgUFQoLCgQEAAICEgMJAhsKDAoFBAACAgQSAwkCCgoMCgUEAAICBRIDCQsRCgwKBQQAAgIBEgMJ" + - "EhYKDAoFBAACAgMSAwkZGgoKCgIEARIEDAAOAQoKCgMEAQESAwwIFgoLCgQEAQIAEgMNAhsKDAoFBAEC" + - "AAQSAw0CCgoMCgUEAQIABRIDDQsRCgwKBQQBAgABEgMNEhYKDAoFBAECAAMSAw0ZGmIGcHJvdG8z"); - - static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("wpimath.proto", "wpi.proto", descriptorData); - - static final Descriptors.Descriptor wpi_proto_ProtobufMatrix_descriptor = descriptor.internalContainedType(28, 90, "ProtobufMatrix", "wpi.proto.ProtobufMatrix"); - - static final Descriptors.Descriptor wpi_proto_ProtobufVector_descriptor = descriptor.internalContainedType(120, 36, "ProtobufVector", "wpi.proto.ProtobufVector"); - - /** - * @return this proto file's descriptor. - */ - public static Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - /** - * Protobuf type {@code ProtobufMatrix} - */ - public static final class ProtobufMatrix extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * optional uint32 num_rows = 1; - */ - private int numRows; - - /** - * optional uint32 num_cols = 2; - */ - private int numCols; - - /** - * repeated double data = 3; - */ - private final RepeatedDouble data = RepeatedDouble.newEmptyInstance(); - - private ProtobufMatrix() { - } - - /** - * @return a new empty instance of {@code ProtobufMatrix} - */ - public static ProtobufMatrix newInstance() { - return new ProtobufMatrix(); - } - - /** - * optional uint32 num_rows = 1; - * @return whether the numRows field is set - */ - public boolean hasNumRows() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * optional uint32 num_rows = 1; - * @return this - */ - public ProtobufMatrix clearNumRows() { - bitField0_ &= ~0x00000001; - numRows = 0; - return this; - } - - /** - * optional uint32 num_rows = 1; - * @return the numRows - */ - public int getNumRows() { - return numRows; - } - - /** - * optional uint32 num_rows = 1; - * @param value the numRows to set - * @return this - */ - public ProtobufMatrix setNumRows(final int value) { - bitField0_ |= 0x00000001; - numRows = value; - return this; - } - - /** - * optional uint32 num_cols = 2; - * @return whether the numCols field is set - */ - public boolean hasNumCols() { - return (bitField0_ & 0x00000002) != 0; - } - - /** - * optional uint32 num_cols = 2; - * @return this - */ - public ProtobufMatrix clearNumCols() { - bitField0_ &= ~0x00000002; - numCols = 0; - return this; - } - - /** - * optional uint32 num_cols = 2; - * @return the numCols - */ - public int getNumCols() { - return numCols; - } - - /** - * optional uint32 num_cols = 2; - * @param value the numCols to set - * @return this - */ - public ProtobufMatrix setNumCols(final int value) { - bitField0_ |= 0x00000002; - numCols = value; - return this; - } - - /** - * repeated double data = 3; - * @return whether the data field is set - */ - public boolean hasData() { - return (bitField0_ & 0x00000004) != 0; - } - - /** - * repeated double data = 3; - * @return this - */ - public ProtobufMatrix clearData() { - bitField0_ &= ~0x00000004; - data.clear(); - return this; - } - - /** - * repeated double data = 3; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableData()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getData() { - return data; - } - - /** - * repeated double data = 3; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableData() { - bitField0_ |= 0x00000004; - return data; - } - - /** - * repeated double data = 3; - * @param value the data to add - * @return this - */ - public ProtobufMatrix addData(final double value) { - bitField0_ |= 0x00000004; - data.add(value); - return this; - } - - /** - * repeated double data = 3; - * @param values the data to add - * @return this - */ - public ProtobufMatrix addAllData(final double... values) { - bitField0_ |= 0x00000004; - data.addAll(values); - return this; - } - - @Override - public ProtobufMatrix copyFrom(final ProtobufMatrix other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - numRows = other.numRows; - numCols = other.numCols; - data.copyFrom(other.data); - } - return this; - } - - @Override - public ProtobufMatrix mergeFrom(final ProtobufMatrix other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasNumRows()) { - setNumRows(other.numRows); - } - if (other.hasNumCols()) { - setNumCols(other.numCols); - } - if (other.hasData()) { - getMutableData().addAll(other.data); - } - return this; - } - - @Override - public ProtobufMatrix clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - numRows = 0; - numCols = 0; - data.clear(); - return this; - } - - @Override - public ProtobufMatrix clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - data.clear(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufMatrix)) { - return false; - } - ProtobufMatrix other = (ProtobufMatrix) o; - return bitField0_ == other.bitField0_ - && (!hasNumRows() || numRows == other.numRows) - && (!hasNumCols() || numCols == other.numCols) - && (!hasData() || data.equals(other.data)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - output.writeRawByte((byte) 8); - output.writeUInt32NoTag(numRows); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeRawByte((byte) 16); - output.writeUInt32NoTag(numCols); - } - if ((bitField0_ & 0x00000004) != 0) { - for (int i = 0; i < data.length(); i++) { - output.writeRawByte((byte) 25); - output.writeDoubleNoTag(data.array()[i]); - } - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(numRows); - } - if ((bitField0_ & 0x00000002) != 0) { - size += 1 + ProtoSink.computeUInt32SizeNoTag(numCols); - } - if ((bitField0_ & 0x00000004) != 0) { - size += (1 + 8) * data.length(); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufMatrix mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 8: { - // numRows - numRows = input.readUInt32(); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 16) { - break; - } - } - case 16: { - // numCols - numCols = input.readUInt32(); - bitField0_ |= 0x00000002; - tag = input.readTag(); - if (tag != 26) { - break; - } - } - case 26: { - // data [packed=true] - input.readPackedDouble(data); - bitField0_ |= 0x00000004; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - case 25: { - // data [packed=false] - tag = input.readRepeatedDouble(data, tag); - bitField0_ |= 0x00000004; - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeUInt32(FieldNames.numRows, numRows); - } - if ((bitField0_ & 0x00000002) != 0) { - output.writeUInt32(FieldNames.numCols, numCols); - } - if ((bitField0_ & 0x00000004) != 0) { - output.writeRepeatedDouble(FieldNames.data, data); - } - output.endObject(); - } - - @Override - public ProtobufMatrix mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case -2000982401: - case -1888824590: { - if (input.isAtField(FieldNames.numRows)) { - if (!input.trySkipNullValue()) { - numRows = input.readUInt32(); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - case -2001429607: - case -1889271796: { - if (input.isAtField(FieldNames.numCols)) { - if (!input.trySkipNullValue()) { - numCols = input.readUInt32(); - bitField0_ |= 0x00000002; - } - } else { - input.skipUnknownField(); - } - break; - } - case 3076010: { - if (input.isAtField(FieldNames.data)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(data); - bitField0_ |= 0x00000004; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufMatrix clone() { - return new ProtobufMatrix().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufMatrix parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufMatrix(), data).checkInitialized(); - } - - public static ProtobufMatrix parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufMatrix(), input).checkInitialized(); - } - - public static ProtobufMatrix parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufMatrix(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufMatrix messages - */ - public static MessageFactory getFactory() { - return ProtobufMatrixFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Wpimath.wpi_proto_ProtobufMatrix_descriptor; - } - - private enum ProtobufMatrixFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufMatrix create() { - return ProtobufMatrix.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName numRows = FieldName.forField("numRows", "num_rows"); - - static final FieldName numCols = FieldName.forField("numCols", "num_cols"); - - static final FieldName data = FieldName.forField("data"); - } - } - - /** - * Protobuf type {@code ProtobufVector} - */ - public static final class ProtobufVector extends ProtoMessage implements Cloneable { - private static final long serialVersionUID = 0L; - - /** - * repeated double rows = 1; - */ - private final RepeatedDouble rows = RepeatedDouble.newEmptyInstance(); - - private ProtobufVector() { - } - - /** - * @return a new empty instance of {@code ProtobufVector} - */ - public static ProtobufVector newInstance() { - return new ProtobufVector(); - } - - /** - * repeated double rows = 1; - * @return whether the rows field is set - */ - public boolean hasRows() { - return (bitField0_ & 0x00000001) != 0; - } - - /** - * repeated double rows = 1; - * @return this - */ - public ProtobufVector clearRows() { - bitField0_ &= ~0x00000001; - rows.clear(); - return this; - } - - /** - * repeated double rows = 1; - * - * This method returns the internal storage object without modifying any has state. - * The returned object should not be modified and be treated as read-only. - * - * Use {@link #getMutableRows()} if you want to modify it. - * - * @return internal storage object for reading - */ - public RepeatedDouble getRows() { - return rows; - } - - /** - * repeated double rows = 1; - * - * This method returns the internal storage object and sets the corresponding - * has state. The returned object will become part of this message and its - * contents may be modified as long as the has state is not cleared. - * - * @return internal storage object for modifications - */ - public RepeatedDouble getMutableRows() { - bitField0_ |= 0x00000001; - return rows; - } - - /** - * repeated double rows = 1; - * @param value the rows to add - * @return this - */ - public ProtobufVector addRows(final double value) { - bitField0_ |= 0x00000001; - rows.add(value); - return this; - } - - /** - * repeated double rows = 1; - * @param values the rows to add - * @return this - */ - public ProtobufVector addAllRows(final double... values) { - bitField0_ |= 0x00000001; - rows.addAll(values); - return this; - } - - @Override - public ProtobufVector copyFrom(final ProtobufVector other) { - cachedSize = other.cachedSize; - if ((bitField0_ | other.bitField0_) != 0) { - bitField0_ = other.bitField0_; - rows.copyFrom(other.rows); - } - return this; - } - - @Override - public ProtobufVector mergeFrom(final ProtobufVector other) { - if (other.isEmpty()) { - return this; - } - cachedSize = -1; - if (other.hasRows()) { - getMutableRows().addAll(other.rows); - } - return this; - } - - @Override - public ProtobufVector clear() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - rows.clear(); - return this; - } - - @Override - public ProtobufVector clearQuick() { - if (isEmpty()) { - return this; - } - cachedSize = -1; - bitField0_ = 0; - rows.clear(); - return this; - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (!(o instanceof ProtobufVector)) { - return false; - } - ProtobufVector other = (ProtobufVector) o; - return bitField0_ == other.bitField0_ - && (!hasRows() || rows.equals(other.rows)); - } - - @Override - public void writeTo(final ProtoSink output) throws IOException { - if ((bitField0_ & 0x00000001) != 0) { - for (int i = 0; i < rows.length(); i++) { - output.writeRawByte((byte) 9); - output.writeDoubleNoTag(rows.array()[i]); - } - } - } - - @Override - protected int computeSerializedSize() { - int size = 0; - if ((bitField0_ & 0x00000001) != 0) { - size += (1 + 8) * rows.length(); - } - return size; - } - - @Override - @SuppressWarnings("fallthrough") - public ProtobufVector mergeFrom(final ProtoSource input) throws IOException { - // Enabled Fall-Through Optimization (QuickBuffers) - int tag = input.readTag(); - while (true) { - switch (tag) { - case 10: { - // rows [packed=true] - input.readPackedDouble(rows); - bitField0_ |= 0x00000001; - tag = input.readTag(); - if (tag != 0) { - break; - } - } - case 0: { - return this; - } - default: { - if (!input.skipField(tag)) { - return this; - } - tag = input.readTag(); - break; - } - case 9: { - // rows [packed=false] - tag = input.readRepeatedDouble(rows, tag); - bitField0_ |= 0x00000001; - break; - } - } - } - } - - @Override - public void writeTo(final JsonSink output) throws IOException { - output.beginObject(); - if ((bitField0_ & 0x00000001) != 0) { - output.writeRepeatedDouble(FieldNames.rows, rows); - } - output.endObject(); - } - - @Override - public ProtobufVector mergeFrom(final JsonSource input) throws IOException { - if (!input.beginObject()) { - return this; - } - while (!input.isAtEnd()) { - switch (input.readFieldHash()) { - case 3506649: { - if (input.isAtField(FieldNames.rows)) { - if (!input.trySkipNullValue()) { - input.readRepeatedDouble(rows); - bitField0_ |= 0x00000001; - } - } else { - input.skipUnknownField(); - } - break; - } - default: { - input.skipUnknownField(); - break; - } - } - } - input.endObject(); - return this; - } - - @Override - public ProtobufVector clone() { - return new ProtobufVector().copyFrom(this); - } - - @Override - public boolean isEmpty() { - return ((bitField0_) == 0); - } - - public static ProtobufVector parseFrom(final byte[] data) throws - InvalidProtocolBufferException { - return ProtoMessage.mergeFrom(new ProtobufVector(), data).checkInitialized(); - } - - public static ProtobufVector parseFrom(final ProtoSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufVector(), input).checkInitialized(); - } - - public static ProtobufVector parseFrom(final JsonSource input) throws IOException { - return ProtoMessage.mergeFrom(new ProtobufVector(), input).checkInitialized(); - } - - /** - * @return factory for creating ProtobufVector messages - */ - public static MessageFactory getFactory() { - return ProtobufVectorFactory.INSTANCE; - } - - /** - * @return this type's descriptor. - */ - public static Descriptors.Descriptor getDescriptor() { - return Wpimath.wpi_proto_ProtobufVector_descriptor; - } - - private enum ProtobufVectorFactory implements MessageFactory { - INSTANCE; - - @Override - public ProtobufVector create() { - return ProtobufVector.newInstance(); - } - } - - /** - * Contains name constants used for serializing JSON - */ - static class FieldNames { - static final FieldName rows = FieldName.forField("rows"); - } - } -} diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/controller.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/controller.npb.cpp index c30dd2ea03..6186877305 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/controller.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/controller.npb.cpp @@ -71,137 +71,144 @@ static const uint8_t file_descriptor[] { 0x01,0x52,0x04,0x6c,0x65,0x66,0x74,0x12,0x14,0x0a, 0x05,0x72,0x69,0x67,0x68,0x74,0x18,0x02,0x20,0x01, 0x28,0x01,0x52,0x05,0x72,0x69,0x67,0x68,0x74,0x42, -0x17,0x0a,0x15,0x6f,0x72,0x67,0x2e,0x77,0x70,0x69, +0x37,0x0a,0x15,0x6f,0x72,0x67,0x2e,0x77,0x70,0x69, 0x6c,0x69,0x62,0x2e,0x6d,0x61,0x74,0x68,0x2e,0x70, -0x72,0x6f,0x74,0x6f,0x4a,0xf5,0x09,0x0a,0x06,0x12, -0x04,0x00,0x00,0x27,0x01,0x0a,0x08,0x0a,0x01,0x0c, -0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a,0x01,0x02, -0x12,0x03,0x02,0x00,0x12,0x0a,0x08,0x0a,0x01,0x08, -0x12,0x03,0x04,0x00,0x2e,0x0a,0x09,0x0a,0x02,0x08, -0x01,0x12,0x03,0x04,0x00,0x2e,0x0a,0x0a,0x0a,0x02, -0x04,0x00,0x12,0x04,0x06,0x00,0x0c,0x01,0x0a,0x0a, -0x0a,0x03,0x04,0x00,0x01,0x12,0x03,0x06,0x08,0x1e, -0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x00,0x12,0x03, -0x07,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x00,0x05,0x12,0x03,0x07,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x00,0x01,0x12,0x03,0x07,0x09, -0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x03, -0x12,0x03,0x07,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x01,0x12,0x03,0x08,0x02,0x10,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x01,0x05,0x12,0x03,0x08, -0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01, -0x01,0x12,0x03,0x08,0x09,0x0b,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x01,0x03,0x12,0x03,0x08,0x0e,0x0f, -0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x02,0x12,0x03, -0x09,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x02,0x05,0x12,0x03,0x09,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x02,0x01,0x12,0x03,0x09,0x09, -0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x03, -0x12,0x03,0x09,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x03,0x12,0x03,0x0a,0x02,0x10,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x03,0x05,0x12,0x03,0x0a, -0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03, -0x01,0x12,0x03,0x0a,0x09,0x0b,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x03,0x03,0x12,0x03,0x0a,0x0e,0x0f, -0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x04,0x12,0x03, -0x0b,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x04,0x05,0x12,0x03,0x0b,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x04,0x01,0x12,0x03,0x0b,0x09, -0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x04,0x03, -0x12,0x03,0x0b,0x0e,0x0f,0x0a,0x0a,0x0a,0x02,0x04, -0x01,0x12,0x04,0x0e,0x00,0x13,0x01,0x0a,0x0a,0x0a, -0x03,0x04,0x01,0x01,0x12,0x03,0x0e,0x08,0x2c,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x00,0x12,0x03,0x0f, -0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00, -0x05,0x12,0x03,0x0f,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x00,0x01,0x12,0x03,0x0f,0x09,0x12, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x03,0x12, -0x03,0x0f,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x01,0x12,0x03,0x10,0x02,0x17,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x01,0x05,0x12,0x03,0x10,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x01, -0x12,0x03,0x10,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x01,0x03,0x12,0x03,0x10,0x15,0x16,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x02,0x12,0x03,0x11, -0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02, -0x05,0x12,0x03,0x11,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x02,0x01,0x12,0x03,0x11,0x09,0x13, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x03,0x12, -0x03,0x11,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x03,0x12,0x03,0x12,0x02,0x18,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x03,0x05,0x12,0x03,0x12,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x01, -0x12,0x03,0x12,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x03,0x03,0x12,0x03,0x12,0x16,0x17,0x0a, -0x0a,0x0a,0x02,0x04,0x02,0x12,0x04,0x15,0x00,0x1b, -0x01,0x0a,0x0a,0x0a,0x03,0x04,0x02,0x01,0x12,0x03, -0x15,0x08,0x23,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, -0x00,0x12,0x03,0x16,0x02,0x10,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x00,0x05,0x12,0x03,0x16,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x01,0x12, -0x03,0x16,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x00,0x03,0x12,0x03,0x16,0x0e,0x0f,0x0a,0x0b, -0x0a,0x04,0x04,0x02,0x02,0x01,0x12,0x03,0x17,0x02, -0x10,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x01,0x05, -0x12,0x03,0x17,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x01,0x01,0x12,0x03,0x17,0x09,0x0b,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x01,0x03,0x12,0x03, -0x17,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, -0x02,0x12,0x03,0x18,0x02,0x10,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x02,0x05,0x12,0x03,0x18,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x02,0x01,0x12, -0x03,0x18,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x02,0x03,0x12,0x03,0x18,0x0e,0x0f,0x0a,0x0b, -0x0a,0x04,0x04,0x02,0x02,0x03,0x12,0x03,0x19,0x02, -0x10,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x03,0x05, -0x12,0x03,0x19,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x03,0x01,0x12,0x03,0x19,0x09,0x0b,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x03,0x03,0x12,0x03, -0x19,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, -0x04,0x12,0x03,0x1a,0x02,0x10,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x04,0x05,0x12,0x03,0x1a,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x04,0x01,0x12, -0x03,0x1a,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x04,0x03,0x12,0x03,0x1a,0x0e,0x0f,0x0a,0x0a, -0x0a,0x02,0x04,0x03,0x12,0x04,0x1d,0x00,0x22,0x01, -0x0a,0x0a,0x0a,0x03,0x04,0x03,0x01,0x12,0x03,0x1d, -0x08,0x26,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x00, -0x12,0x03,0x1e,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x00,0x05,0x12,0x03,0x1e,0x02,0x08,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x01,0x12,0x03, -0x1e,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x00,0x03,0x12,0x03,0x1e,0x0e,0x0f,0x0a,0x0b,0x0a, -0x04,0x04,0x03,0x02,0x01,0x12,0x03,0x1f,0x02,0x10, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01,0x05,0x12, -0x03,0x1f,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x01,0x01,0x12,0x03,0x1f,0x09,0x0b,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x01,0x03,0x12,0x03,0x1f, -0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x02, -0x12,0x03,0x20,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x02,0x05,0x12,0x03,0x20,0x02,0x08,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x02,0x01,0x12,0x03, -0x20,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x02,0x03,0x12,0x03,0x20,0x0e,0x0f,0x0a,0x0b,0x0a, -0x04,0x04,0x03,0x02,0x03,0x12,0x03,0x21,0x02,0x10, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x03,0x05,0x12, -0x03,0x21,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x03,0x01,0x12,0x03,0x21,0x09,0x0b,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x03,0x03,0x12,0x03,0x21, -0x0e,0x0f,0x0a,0x0a,0x0a,0x02,0x04,0x04,0x12,0x04, -0x24,0x00,0x27,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x04, -0x01,0x12,0x03,0x24,0x08,0x2e,0x0a,0x0b,0x0a,0x04, -0x04,0x04,0x02,0x00,0x12,0x03,0x25,0x02,0x12,0x0a, -0x0c,0x0a,0x05,0x04,0x04,0x02,0x00,0x05,0x12,0x03, -0x25,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02, -0x00,0x01,0x12,0x03,0x25,0x09,0x0d,0x0a,0x0c,0x0a, -0x05,0x04,0x04,0x02,0x00,0x03,0x12,0x03,0x25,0x10, -0x11,0x0a,0x0b,0x0a,0x04,0x04,0x04,0x02,0x01,0x12, -0x03,0x26,0x02,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x04, -0x02,0x01,0x05,0x12,0x03,0x26,0x02,0x08,0x0a,0x0c, -0x0a,0x05,0x04,0x04,0x02,0x01,0x01,0x12,0x03,0x26, -0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01, -0x03,0x12,0x03,0x26,0x11,0x12,0x62,0x06,0x70,0x72, -0x6f,0x74,0x6f,0x33, +0x72,0x6f,0x74,0x6f,0x42,0x1c,0x50,0x72,0x6f,0x74, +0x6f,0x62,0x75,0x66,0x43,0x6f,0x6e,0x74,0x72,0x6f, +0x6c,0x6c,0x65,0x72,0x44,0x65,0x73,0x63,0x72,0x69, +0x70,0x74,0x6f,0x72,0x50,0x01,0x4a,0x9f,0x0a,0x0a, +0x06,0x12,0x04,0x00,0x00,0x2b,0x01,0x0a,0x08,0x0a, +0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a, +0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a,0x08,0x0a, +0x01,0x08,0x12,0x03,0x04,0x00,0x2e,0x0a,0x09,0x0a, +0x02,0x08,0x01,0x12,0x03,0x04,0x00,0x2e,0x0a,0x08, +0x0a,0x01,0x08,0x12,0x03,0x06,0x00,0x3d,0x0a,0x09, +0x0a,0x02,0x08,0x08,0x12,0x03,0x06,0x00,0x3d,0x0a, +0x08,0x0a,0x01,0x08,0x12,0x03,0x08,0x00,0x22,0x0a, +0x09,0x0a,0x02,0x08,0x0a,0x12,0x03,0x08,0x00,0x22, +0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x0a,0x00, +0x10,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01,0x12, +0x03,0x0a,0x08,0x1e,0x0a,0x0b,0x0a,0x04,0x04,0x00, +0x02,0x00,0x12,0x03,0x0b,0x02,0x10,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x0b,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x01, +0x12,0x03,0x0b,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x00,0x03,0x12,0x03,0x0b,0x0e,0x0f,0x0a, +0x0b,0x0a,0x04,0x04,0x00,0x02,0x01,0x12,0x03,0x0c, +0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01, +0x05,0x12,0x03,0x0c,0x02,0x08,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x0c,0x09,0x0b, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x03,0x12, +0x03,0x0c,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x00, +0x02,0x02,0x12,0x03,0x0d,0x02,0x10,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x02,0x05,0x12,0x03,0x0d,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x01, +0x12,0x03,0x0d,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x02,0x03,0x12,0x03,0x0d,0x0e,0x0f,0x0a, +0x0b,0x0a,0x04,0x04,0x00,0x02,0x03,0x12,0x03,0x0e, +0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03, +0x05,0x12,0x03,0x0e,0x02,0x08,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x03,0x01,0x12,0x03,0x0e,0x09,0x0b, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03,0x03,0x12, +0x03,0x0e,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x00, +0x02,0x04,0x12,0x03,0x0f,0x02,0x10,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x04,0x05,0x12,0x03,0x0f,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x04,0x01, +0x12,0x03,0x0f,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x04,0x03,0x12,0x03,0x0f,0x0e,0x0f,0x0a, +0x0a,0x0a,0x02,0x04,0x01,0x12,0x04,0x12,0x00,0x17, +0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12,0x03, +0x12,0x08,0x2c,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02, +0x00,0x12,0x03,0x13,0x02,0x17,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x00,0x05,0x12,0x03,0x13,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01,0x12, +0x03,0x13,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x00,0x03,0x12,0x03,0x13,0x15,0x16,0x0a,0x0b, +0x0a,0x04,0x04,0x01,0x02,0x01,0x12,0x03,0x14,0x02, +0x17,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x05, +0x12,0x03,0x14,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x01,0x01,0x12,0x03,0x14,0x09,0x12,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x03,0x12,0x03, +0x14,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02, +0x02,0x12,0x03,0x15,0x02,0x18,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x02,0x05,0x12,0x03,0x15,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x01,0x12, +0x03,0x15,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x02,0x03,0x12,0x03,0x15,0x16,0x17,0x0a,0x0b, +0x0a,0x04,0x04,0x01,0x02,0x03,0x12,0x03,0x16,0x02, +0x18,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x05, +0x12,0x03,0x16,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x03,0x01,0x12,0x03,0x16,0x09,0x13,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x03,0x12,0x03, +0x16,0x16,0x17,0x0a,0x0a,0x0a,0x02,0x04,0x02,0x12, +0x04,0x19,0x00,0x1f,0x01,0x0a,0x0a,0x0a,0x03,0x04, +0x02,0x01,0x12,0x03,0x19,0x08,0x23,0x0a,0x0b,0x0a, +0x04,0x04,0x02,0x02,0x00,0x12,0x03,0x1a,0x02,0x10, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x05,0x12, +0x03,0x1a,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x00,0x01,0x12,0x03,0x1a,0x09,0x0b,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x00,0x03,0x12,0x03,0x1a, +0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x01, +0x12,0x03,0x1b,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x01,0x05,0x12,0x03,0x1b,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x01,0x01,0x12,0x03, +0x1b,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x01,0x03,0x12,0x03,0x1b,0x0e,0x0f,0x0a,0x0b,0x0a, +0x04,0x04,0x02,0x02,0x02,0x12,0x03,0x1c,0x02,0x10, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x02,0x05,0x12, +0x03,0x1c,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x02,0x01,0x12,0x03,0x1c,0x09,0x0b,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x02,0x03,0x12,0x03,0x1c, +0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x03, +0x12,0x03,0x1d,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x03,0x05,0x12,0x03,0x1d,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x03,0x01,0x12,0x03, +0x1d,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x03,0x03,0x12,0x03,0x1d,0x0e,0x0f,0x0a,0x0b,0x0a, +0x04,0x04,0x02,0x02,0x04,0x12,0x03,0x1e,0x02,0x10, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x04,0x05,0x12, +0x03,0x1e,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x04,0x01,0x12,0x03,0x1e,0x09,0x0b,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x04,0x03,0x12,0x03,0x1e, +0x0e,0x0f,0x0a,0x0a,0x0a,0x02,0x04,0x03,0x12,0x04, +0x21,0x00,0x26,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x03, +0x01,0x12,0x03,0x21,0x08,0x26,0x0a,0x0b,0x0a,0x04, +0x04,0x03,0x02,0x00,0x12,0x03,0x22,0x02,0x10,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x05,0x12,0x03, +0x22,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x00,0x01,0x12,0x03,0x22,0x09,0x0b,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x00,0x03,0x12,0x03,0x22,0x0e, +0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x01,0x12, +0x03,0x23,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x01,0x05,0x12,0x03,0x23,0x02,0x08,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x01,0x01,0x12,0x03,0x23, +0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01, +0x03,0x12,0x03,0x23,0x0e,0x0f,0x0a,0x0b,0x0a,0x04, +0x04,0x03,0x02,0x02,0x12,0x03,0x24,0x02,0x10,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x02,0x05,0x12,0x03, +0x24,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x02,0x01,0x12,0x03,0x24,0x09,0x0b,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x02,0x03,0x12,0x03,0x24,0x0e, +0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x03,0x12, +0x03,0x25,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x03,0x05,0x12,0x03,0x25,0x02,0x08,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x03,0x01,0x12,0x03,0x25, +0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x03, +0x03,0x12,0x03,0x25,0x0e,0x0f,0x0a,0x0a,0x0a,0x02, +0x04,0x04,0x12,0x04,0x28,0x00,0x2b,0x01,0x0a,0x0a, +0x0a,0x03,0x04,0x04,0x01,0x12,0x03,0x28,0x08,0x2e, +0x0a,0x0b,0x0a,0x04,0x04,0x04,0x02,0x00,0x12,0x03, +0x29,0x02,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02, +0x00,0x05,0x12,0x03,0x29,0x02,0x08,0x0a,0x0c,0x0a, +0x05,0x04,0x04,0x02,0x00,0x01,0x12,0x03,0x29,0x09, +0x0d,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x00,0x03, +0x12,0x03,0x29,0x10,0x11,0x0a,0x0b,0x0a,0x04,0x04, +0x04,0x02,0x01,0x12,0x03,0x2a,0x02,0x13,0x0a,0x0c, +0x0a,0x05,0x04,0x04,0x02,0x01,0x05,0x12,0x03,0x2a, +0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01, +0x01,0x12,0x03,0x2a,0x09,0x0e,0x0a,0x0c,0x0a,0x05, +0x04,0x04,0x02,0x01,0x03,0x12,0x03,0x2a,0x11,0x12, +0x62,0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, }; static const char file_name[] = "controller.proto"; static const char wpi_proto_ProtobufArmFeedforward_name[] = "wpi.proto.ProtobufArmFeedforward"; diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry2d.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry2d.npb.cpp index bc78315310..3cce11926b 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry2d.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry2d.npb.cpp @@ -87,120 +87,128 @@ static const uint8_t file_descriptor[] { 0x78,0x69,0x73,0x12,0x1c,0x0a,0x09,0x79,0x53,0x65, 0x6d,0x69,0x41,0x78,0x69,0x73,0x18,0x03,0x20,0x01, 0x28,0x01,0x52,0x09,0x79,0x53,0x65,0x6d,0x69,0x41, -0x78,0x69,0x73,0x42,0x17,0x0a,0x15,0x6f,0x72,0x67, +0x78,0x69,0x73,0x42,0x37,0x0a,0x15,0x6f,0x72,0x67, 0x2e,0x77,0x70,0x69,0x6c,0x69,0x62,0x2e,0x6d,0x61, -0x74,0x68,0x2e,0x70,0x72,0x6f,0x74,0x6f,0x4a,0xc9, -0x08,0x0a,0x06,0x12,0x04,0x00,0x00,0x29,0x01,0x0a, -0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a, -0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a, -0x08,0x0a,0x01,0x08,0x12,0x03,0x04,0x00,0x2e,0x0a, -0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x04,0x00,0x2e, -0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x06,0x00, -0x09,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01,0x12, -0x03,0x06,0x08,0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x00, -0x02,0x00,0x12,0x03,0x07,0x02,0x0f,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x07,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x01, -0x12,0x03,0x07,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04, -0x00,0x02,0x00,0x03,0x12,0x03,0x07,0x0d,0x0e,0x0a, -0x0b,0x0a,0x04,0x04,0x00,0x02,0x01,0x12,0x03,0x08, -0x02,0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01, -0x05,0x12,0x03,0x08,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x08,0x09,0x0a, -0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x03,0x12, -0x03,0x08,0x0d,0x0e,0x0a,0x0a,0x0a,0x02,0x04,0x01, -0x12,0x04,0x0b,0x00,0x0d,0x01,0x0a,0x0a,0x0a,0x03, -0x04,0x01,0x01,0x12,0x03,0x0b,0x08,0x1a,0x0a,0x0b, -0x0a,0x04,0x04,0x01,0x02,0x00,0x12,0x03,0x0c,0x02, -0x13,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x05, -0x12,0x03,0x0c,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x00,0x01,0x12,0x03,0x0c,0x09,0x0e,0x0a, -0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x03,0x12,0x03, -0x0c,0x11,0x12,0x0a,0x0a,0x0a,0x02,0x04,0x02,0x12, -0x04,0x0f,0x00,0x12,0x01,0x0a,0x0a,0x0a,0x03,0x04, -0x02,0x01,0x12,0x03,0x0f,0x08,0x16,0x0a,0x0b,0x0a, -0x04,0x04,0x02,0x02,0x00,0x12,0x03,0x10,0x02,0x28, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x06,0x12, -0x03,0x10,0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x00,0x01,0x12,0x03,0x10,0x18,0x23,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x00,0x03,0x12,0x03,0x10, -0x26,0x27,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x01, -0x12,0x03,0x11,0x02,0x22,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x01,0x06,0x12,0x03,0x11,0x02,0x14,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x01,0x01,0x12,0x03, -0x11,0x15,0x1d,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x01,0x03,0x12,0x03,0x11,0x20,0x21,0x0a,0x0a,0x0a, -0x02,0x04,0x03,0x12,0x04,0x14,0x00,0x17,0x01,0x0a, -0x0a,0x0a,0x03,0x04,0x03,0x01,0x12,0x03,0x14,0x08, -0x1b,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x00,0x12, -0x03,0x15,0x02,0x28,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x00,0x06,0x12,0x03,0x15,0x02,0x17,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x00,0x01,0x12,0x03,0x15, -0x18,0x23,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x00, -0x03,0x12,0x03,0x15,0x26,0x27,0x0a,0x0b,0x0a,0x04, -0x04,0x03,0x02,0x01,0x12,0x03,0x16,0x02,0x22,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x01,0x06,0x12,0x03, -0x16,0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x01,0x01,0x12,0x03,0x16,0x15,0x1d,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x01,0x03,0x12,0x03,0x16,0x20, -0x21,0x0a,0x0a,0x0a,0x02,0x04,0x04,0x12,0x04,0x19, -0x00,0x1d,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x04,0x01, -0x12,0x03,0x19,0x08,0x17,0x0a,0x0b,0x0a,0x04,0x04, -0x04,0x02,0x00,0x12,0x03,0x1a,0x02,0x10,0x0a,0x0c, -0x0a,0x05,0x04,0x04,0x02,0x00,0x05,0x12,0x03,0x1a, -0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x00, -0x01,0x12,0x03,0x1a,0x09,0x0b,0x0a,0x0c,0x0a,0x05, -0x04,0x04,0x02,0x00,0x03,0x12,0x03,0x1a,0x0e,0x0f, -0x0a,0x0b,0x0a,0x04,0x04,0x04,0x02,0x01,0x12,0x03, -0x1b,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02, -0x01,0x05,0x12,0x03,0x1b,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x04,0x02,0x01,0x01,0x12,0x03,0x1b,0x09, -0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01,0x03, -0x12,0x03,0x1b,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04, -0x04,0x02,0x02,0x12,0x03,0x1c,0x02,0x14,0x0a,0x0c, -0x0a,0x05,0x04,0x04,0x02,0x02,0x05,0x12,0x03,0x1c, -0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x02, -0x01,0x12,0x03,0x1c,0x09,0x0f,0x0a,0x0c,0x0a,0x05, -0x04,0x04,0x02,0x02,0x03,0x12,0x03,0x1c,0x12,0x13, -0x0a,0x0a,0x0a,0x02,0x04,0x05,0x12,0x04,0x1f,0x00, -0x23,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x05,0x01,0x12, -0x03,0x1f,0x08,0x1b,0x0a,0x0b,0x0a,0x04,0x04,0x05, -0x02,0x00,0x12,0x03,0x20,0x02,0x1c,0x0a,0x0c,0x0a, -0x05,0x04,0x05,0x02,0x00,0x06,0x12,0x03,0x20,0x02, -0x10,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x01, -0x12,0x03,0x20,0x11,0x17,0x0a,0x0c,0x0a,0x05,0x04, -0x05,0x02,0x00,0x03,0x12,0x03,0x20,0x1a,0x1b,0x0a, -0x0b,0x0a,0x04,0x04,0x05,0x02,0x01,0x12,0x03,0x21, -0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01, -0x05,0x12,0x03,0x21,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x05,0x02,0x01,0x01,0x12,0x03,0x21,0x09,0x0f, -0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01,0x03,0x12, -0x03,0x21,0x12,0x13,0x0a,0x0b,0x0a,0x04,0x04,0x05, -0x02,0x02,0x12,0x03,0x22,0x02,0x14,0x0a,0x0c,0x0a, -0x05,0x04,0x05,0x02,0x02,0x05,0x12,0x03,0x22,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x02,0x01, -0x12,0x03,0x22,0x09,0x0f,0x0a,0x0c,0x0a,0x05,0x04, -0x05,0x02,0x02,0x03,0x12,0x03,0x22,0x12,0x13,0x0a, -0x0a,0x0a,0x02,0x04,0x06,0x12,0x04,0x25,0x00,0x29, -0x01,0x0a,0x0a,0x0a,0x03,0x04,0x06,0x01,0x12,0x03, -0x25,0x08,0x19,0x0a,0x0b,0x0a,0x04,0x04,0x06,0x02, -0x00,0x12,0x03,0x26,0x02,0x1c,0x0a,0x0c,0x0a,0x05, -0x04,0x06,0x02,0x00,0x06,0x12,0x03,0x26,0x02,0x10, -0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x00,0x01,0x12, -0x03,0x26,0x11,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x06, -0x02,0x00,0x03,0x12,0x03,0x26,0x1a,0x1b,0x0a,0x0b, -0x0a,0x04,0x04,0x06,0x02,0x01,0x12,0x03,0x27,0x02, -0x17,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x01,0x05, -0x12,0x03,0x27,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x06,0x02,0x01,0x01,0x12,0x03,0x27,0x09,0x12,0x0a, -0x0c,0x0a,0x05,0x04,0x06,0x02,0x01,0x03,0x12,0x03, -0x27,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x06,0x02, -0x02,0x12,0x03,0x28,0x02,0x17,0x0a,0x0c,0x0a,0x05, -0x04,0x06,0x02,0x02,0x05,0x12,0x03,0x28,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x02,0x01,0x12, -0x03,0x28,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x06, -0x02,0x02,0x03,0x12,0x03,0x28,0x15,0x16,0x62,0x06, -0x70,0x72,0x6f,0x74,0x6f,0x33, +0x74,0x68,0x2e,0x70,0x72,0x6f,0x74,0x6f,0x42,0x1c, +0x50,0x72,0x6f,0x74,0x6f,0x62,0x75,0x66,0x47,0x65, +0x6f,0x6d,0x65,0x74,0x72,0x79,0x32,0x64,0x44,0x65, +0x73,0x63,0x72,0x69,0x70,0x74,0x6f,0x72,0x50,0x01, +0x4a,0xf3,0x08,0x0a,0x06,0x12,0x04,0x00,0x00,0x2d, +0x01,0x0a,0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00, +0x12,0x0a,0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00, +0x12,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x04,0x00, +0x2e,0x0a,0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x04, +0x00,0x2e,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x06, +0x00,0x3d,0x0a,0x09,0x0a,0x02,0x08,0x08,0x12,0x03, +0x06,0x00,0x3d,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03, +0x08,0x00,0x22,0x0a,0x09,0x0a,0x02,0x08,0x0a,0x12, +0x03,0x08,0x00,0x22,0x0a,0x0a,0x0a,0x02,0x04,0x00, +0x12,0x04,0x0a,0x00,0x0d,0x01,0x0a,0x0a,0x0a,0x03, +0x04,0x00,0x01,0x12,0x03,0x0a,0x08,0x1d,0x0a,0x0b, +0x0a,0x04,0x04,0x00,0x02,0x00,0x12,0x03,0x0b,0x02, +0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x05, +0x12,0x03,0x0b,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x00,0x01,0x12,0x03,0x0b,0x09,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x03,0x12,0x03, +0x0b,0x0d,0x0e,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02, +0x01,0x12,0x03,0x0c,0x02,0x0f,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x01,0x05,0x12,0x03,0x0c,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x01,0x12, +0x03,0x0c,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00, +0x02,0x01,0x03,0x12,0x03,0x0c,0x0d,0x0e,0x0a,0x0a, +0x0a,0x02,0x04,0x01,0x12,0x04,0x0f,0x00,0x11,0x01, +0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12,0x03,0x0f, +0x08,0x1a,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x00, +0x12,0x03,0x10,0x02,0x13,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x00,0x05,0x12,0x03,0x10,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01,0x12,0x03, +0x10,0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x00,0x03,0x12,0x03,0x10,0x11,0x12,0x0a,0x0a,0x0a, +0x02,0x04,0x02,0x12,0x04,0x13,0x00,0x16,0x01,0x0a, +0x0a,0x0a,0x03,0x04,0x02,0x01,0x12,0x03,0x13,0x08, +0x16,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x00,0x12, +0x03,0x14,0x02,0x28,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x00,0x06,0x12,0x03,0x14,0x02,0x17,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x00,0x01,0x12,0x03,0x14, +0x18,0x23,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00, +0x03,0x12,0x03,0x14,0x26,0x27,0x0a,0x0b,0x0a,0x04, +0x04,0x02,0x02,0x01,0x12,0x03,0x15,0x02,0x22,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x01,0x06,0x12,0x03, +0x15,0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x01,0x01,0x12,0x03,0x15,0x15,0x1d,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x01,0x03,0x12,0x03,0x15,0x20, +0x21,0x0a,0x0a,0x0a,0x02,0x04,0x03,0x12,0x04,0x18, +0x00,0x1b,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x03,0x01, +0x12,0x03,0x18,0x08,0x1b,0x0a,0x0b,0x0a,0x04,0x04, +0x03,0x02,0x00,0x12,0x03,0x19,0x02,0x28,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x00,0x06,0x12,0x03,0x19, +0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x00, +0x01,0x12,0x03,0x19,0x18,0x23,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x00,0x03,0x12,0x03,0x19,0x26,0x27, +0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x01,0x12,0x03, +0x1a,0x02,0x22,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x01,0x06,0x12,0x03,0x1a,0x02,0x14,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x01,0x01,0x12,0x03,0x1a,0x15, +0x1d,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01,0x03, +0x12,0x03,0x1a,0x20,0x21,0x0a,0x0a,0x0a,0x02,0x04, +0x04,0x12,0x04,0x1d,0x00,0x21,0x01,0x0a,0x0a,0x0a, +0x03,0x04,0x04,0x01,0x12,0x03,0x1d,0x08,0x17,0x0a, +0x0b,0x0a,0x04,0x04,0x04,0x02,0x00,0x12,0x03,0x1e, +0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x00, +0x05,0x12,0x03,0x1e,0x02,0x08,0x0a,0x0c,0x0a,0x05, +0x04,0x04,0x02,0x00,0x01,0x12,0x03,0x1e,0x09,0x0b, +0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x00,0x03,0x12, +0x03,0x1e,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x04, +0x02,0x01,0x12,0x03,0x1f,0x02,0x10,0x0a,0x0c,0x0a, +0x05,0x04,0x04,0x02,0x01,0x05,0x12,0x03,0x1f,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01,0x01, +0x12,0x03,0x1f,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, +0x04,0x02,0x01,0x03,0x12,0x03,0x1f,0x0e,0x0f,0x0a, +0x0b,0x0a,0x04,0x04,0x04,0x02,0x02,0x12,0x03,0x20, +0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x02, +0x05,0x12,0x03,0x20,0x02,0x08,0x0a,0x0c,0x0a,0x05, +0x04,0x04,0x02,0x02,0x01,0x12,0x03,0x20,0x09,0x0f, +0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x02,0x03,0x12, +0x03,0x20,0x12,0x13,0x0a,0x0a,0x0a,0x02,0x04,0x05, +0x12,0x04,0x23,0x00,0x27,0x01,0x0a,0x0a,0x0a,0x03, +0x04,0x05,0x01,0x12,0x03,0x23,0x08,0x1b,0x0a,0x0b, +0x0a,0x04,0x04,0x05,0x02,0x00,0x12,0x03,0x24,0x02, +0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x06, +0x12,0x03,0x24,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04, +0x05,0x02,0x00,0x01,0x12,0x03,0x24,0x11,0x17,0x0a, +0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x03,0x12,0x03, +0x24,0x1a,0x1b,0x0a,0x0b,0x0a,0x04,0x04,0x05,0x02, +0x01,0x12,0x03,0x25,0x02,0x14,0x0a,0x0c,0x0a,0x05, +0x04,0x05,0x02,0x01,0x05,0x12,0x03,0x25,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01,0x01,0x12, +0x03,0x25,0x09,0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x05, +0x02,0x01,0x03,0x12,0x03,0x25,0x12,0x13,0x0a,0x0b, +0x0a,0x04,0x04,0x05,0x02,0x02,0x12,0x03,0x26,0x02, +0x14,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x02,0x05, +0x12,0x03,0x26,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x05,0x02,0x02,0x01,0x12,0x03,0x26,0x09,0x0f,0x0a, +0x0c,0x0a,0x05,0x04,0x05,0x02,0x02,0x03,0x12,0x03, +0x26,0x12,0x13,0x0a,0x0a,0x0a,0x02,0x04,0x06,0x12, +0x04,0x29,0x00,0x2d,0x01,0x0a,0x0a,0x0a,0x03,0x04, +0x06,0x01,0x12,0x03,0x29,0x08,0x19,0x0a,0x0b,0x0a, +0x04,0x04,0x06,0x02,0x00,0x12,0x03,0x2a,0x02,0x1c, +0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x00,0x06,0x12, +0x03,0x2a,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x06, +0x02,0x00,0x01,0x12,0x03,0x2a,0x11,0x17,0x0a,0x0c, +0x0a,0x05,0x04,0x06,0x02,0x00,0x03,0x12,0x03,0x2a, +0x1a,0x1b,0x0a,0x0b,0x0a,0x04,0x04,0x06,0x02,0x01, +0x12,0x03,0x2b,0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04, +0x06,0x02,0x01,0x05,0x12,0x03,0x2b,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x06,0x02,0x01,0x01,0x12,0x03, +0x2b,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02, +0x01,0x03,0x12,0x03,0x2b,0x15,0x16,0x0a,0x0b,0x0a, +0x04,0x04,0x06,0x02,0x02,0x12,0x03,0x2c,0x02,0x17, +0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x02,0x05,0x12, +0x03,0x2c,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x06, +0x02,0x02,0x01,0x12,0x03,0x2c,0x09,0x12,0x0a,0x0c, +0x0a,0x05,0x04,0x06,0x02,0x02,0x03,0x12,0x03,0x2c, +0x15,0x16,0x62,0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, + }; static const char file_name[] = "geometry2d.proto"; static const char wpi_proto_ProtobufTranslation2d_name[] = "wpi.proto.ProtobufTranslation2d"; diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry3d.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry3d.npb.cpp index 2cdce5aabd..3625343e3c 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry3d.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/geometry3d.npb.cpp @@ -77,129 +77,136 @@ static const uint8_t file_descriptor[] { 0x78,0x12,0x0e,0x0a,0x02,0x72,0x79,0x18,0x05,0x20, 0x01,0x28,0x01,0x52,0x02,0x72,0x79,0x12,0x0e,0x0a, 0x02,0x72,0x7a,0x18,0x06,0x20,0x01,0x28,0x01,0x52, -0x02,0x72,0x7a,0x42,0x17,0x0a,0x15,0x6f,0x72,0x67, +0x02,0x72,0x7a,0x42,0x37,0x0a,0x15,0x6f,0x72,0x67, 0x2e,0x77,0x70,0x69,0x6c,0x69,0x62,0x2e,0x6d,0x61, -0x74,0x68,0x2e,0x70,0x72,0x6f,0x74,0x6f,0x4a,0x9f, -0x09,0x0a,0x06,0x12,0x04,0x00,0x00,0x28,0x01,0x0a, -0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a, -0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a, -0x08,0x0a,0x01,0x08,0x12,0x03,0x04,0x00,0x2e,0x0a, -0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x04,0x00,0x2e, -0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x06,0x00, -0x0a,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01,0x12, -0x03,0x06,0x08,0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x00, -0x02,0x00,0x12,0x03,0x07,0x02,0x0f,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x07,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x01, -0x12,0x03,0x07,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04, -0x00,0x02,0x00,0x03,0x12,0x03,0x07,0x0d,0x0e,0x0a, -0x0b,0x0a,0x04,0x04,0x00,0x02,0x01,0x12,0x03,0x08, -0x02,0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01, -0x05,0x12,0x03,0x08,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x08,0x09,0x0a, -0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x03,0x12, -0x03,0x08,0x0d,0x0e,0x0a,0x0b,0x0a,0x04,0x04,0x00, -0x02,0x02,0x12,0x03,0x09,0x02,0x0f,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x02,0x05,0x12,0x03,0x09,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x01, -0x12,0x03,0x09,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04, -0x00,0x02,0x02,0x03,0x12,0x03,0x09,0x0d,0x0e,0x0a, -0x0a,0x0a,0x02,0x04,0x01,0x12,0x04,0x0c,0x00,0x11, -0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12,0x03, -0x0c,0x08,0x1a,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02, -0x00,0x12,0x03,0x0d,0x02,0x0f,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x00,0x05,0x12,0x03,0x0d,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01,0x12, -0x03,0x0d,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01, -0x02,0x00,0x03,0x12,0x03,0x0d,0x0d,0x0e,0x0a,0x0b, -0x0a,0x04,0x04,0x01,0x02,0x01,0x12,0x03,0x0e,0x02, -0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x05, -0x12,0x03,0x0e,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x01,0x01,0x12,0x03,0x0e,0x09,0x0a,0x0a, -0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x03,0x12,0x03, -0x0e,0x0d,0x0e,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02, -0x02,0x12,0x03,0x0f,0x02,0x0f,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x02,0x05,0x12,0x03,0x0f,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x01,0x12, -0x03,0x0f,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01, -0x02,0x02,0x03,0x12,0x03,0x0f,0x0d,0x0e,0x0a,0x0b, -0x0a,0x04,0x04,0x01,0x02,0x03,0x12,0x03,0x10,0x02, -0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x05, -0x12,0x03,0x10,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x03,0x01,0x12,0x03,0x10,0x09,0x0a,0x0a, -0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x03,0x12,0x03, -0x10,0x0d,0x0e,0x0a,0x0a,0x0a,0x02,0x04,0x02,0x12, -0x04,0x13,0x00,0x15,0x01,0x0a,0x0a,0x0a,0x03,0x04, -0x02,0x01,0x12,0x03,0x13,0x08,0x1a,0x0a,0x0b,0x0a, -0x04,0x04,0x02,0x02,0x00,0x12,0x03,0x14,0x02,0x1b, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x06,0x12, -0x03,0x14,0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x00,0x01,0x12,0x03,0x14,0x15,0x16,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x00,0x03,0x12,0x03,0x14, -0x19,0x1a,0x0a,0x0a,0x0a,0x02,0x04,0x03,0x12,0x04, -0x17,0x00,0x1a,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x03, -0x01,0x12,0x03,0x17,0x08,0x16,0x0a,0x0b,0x0a,0x04, -0x04,0x03,0x02,0x00,0x12,0x03,0x18,0x02,0x28,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x06,0x12,0x03, -0x18,0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x00,0x01,0x12,0x03,0x18,0x18,0x23,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x00,0x03,0x12,0x03,0x18,0x26, -0x27,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x01,0x12, -0x03,0x19,0x02,0x22,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x01,0x06,0x12,0x03,0x19,0x02,0x14,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x01,0x01,0x12,0x03,0x19, -0x15,0x1d,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01, -0x03,0x12,0x03,0x19,0x20,0x21,0x0a,0x0a,0x0a,0x02, -0x04,0x04,0x12,0x04,0x1c,0x00,0x1f,0x01,0x0a,0x0a, -0x0a,0x03,0x04,0x04,0x01,0x12,0x03,0x1c,0x08,0x1b, -0x0a,0x0b,0x0a,0x04,0x04,0x04,0x02,0x00,0x12,0x03, -0x1d,0x02,0x28,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02, -0x00,0x06,0x12,0x03,0x1d,0x02,0x17,0x0a,0x0c,0x0a, -0x05,0x04,0x04,0x02,0x00,0x01,0x12,0x03,0x1d,0x18, -0x23,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x00,0x03, -0x12,0x03,0x1d,0x26,0x27,0x0a,0x0b,0x0a,0x04,0x04, -0x04,0x02,0x01,0x12,0x03,0x1e,0x02,0x22,0x0a,0x0c, -0x0a,0x05,0x04,0x04,0x02,0x01,0x06,0x12,0x03,0x1e, -0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01, -0x01,0x12,0x03,0x1e,0x15,0x1d,0x0a,0x0c,0x0a,0x05, -0x04,0x04,0x02,0x01,0x03,0x12,0x03,0x1e,0x20,0x21, -0x0a,0x0a,0x0a,0x02,0x04,0x05,0x12,0x04,0x21,0x00, -0x28,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x05,0x01,0x12, -0x03,0x21,0x08,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x05, -0x02,0x00,0x12,0x03,0x22,0x02,0x10,0x0a,0x0c,0x0a, -0x05,0x04,0x05,0x02,0x00,0x05,0x12,0x03,0x22,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x01, -0x12,0x03,0x22,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, -0x05,0x02,0x00,0x03,0x12,0x03,0x22,0x0e,0x0f,0x0a, -0x0b,0x0a,0x04,0x04,0x05,0x02,0x01,0x12,0x03,0x23, -0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01, -0x05,0x12,0x03,0x23,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x05,0x02,0x01,0x01,0x12,0x03,0x23,0x09,0x0b, -0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01,0x03,0x12, -0x03,0x23,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x05, -0x02,0x02,0x12,0x03,0x24,0x02,0x10,0x0a,0x0c,0x0a, -0x05,0x04,0x05,0x02,0x02,0x05,0x12,0x03,0x24,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x02,0x01, -0x12,0x03,0x24,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, -0x05,0x02,0x02,0x03,0x12,0x03,0x24,0x0e,0x0f,0x0a, -0x0b,0x0a,0x04,0x04,0x05,0x02,0x03,0x12,0x03,0x25, -0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x03, -0x05,0x12,0x03,0x25,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x05,0x02,0x03,0x01,0x12,0x03,0x25,0x09,0x0b, -0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x03,0x03,0x12, -0x03,0x25,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x05, -0x02,0x04,0x12,0x03,0x26,0x02,0x10,0x0a,0x0c,0x0a, -0x05,0x04,0x05,0x02,0x04,0x05,0x12,0x03,0x26,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x04,0x01, -0x12,0x03,0x26,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, -0x05,0x02,0x04,0x03,0x12,0x03,0x26,0x0e,0x0f,0x0a, -0x0b,0x0a,0x04,0x04,0x05,0x02,0x05,0x12,0x03,0x27, -0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x05, -0x05,0x12,0x03,0x27,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x05,0x02,0x05,0x01,0x12,0x03,0x27,0x09,0x0b, -0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x05,0x03,0x12, -0x03,0x27,0x0e,0x0f,0x62,0x06,0x70,0x72,0x6f,0x74, -0x6f,0x33, +0x74,0x68,0x2e,0x70,0x72,0x6f,0x74,0x6f,0x42,0x1c, +0x50,0x72,0x6f,0x74,0x6f,0x62,0x75,0x66,0x47,0x65, +0x6f,0x6d,0x65,0x74,0x72,0x79,0x33,0x64,0x44,0x65, +0x73,0x63,0x72,0x69,0x70,0x74,0x6f,0x72,0x50,0x01, +0x4a,0xc9,0x09,0x0a,0x06,0x12,0x04,0x00,0x00,0x2c, +0x01,0x0a,0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00, +0x12,0x0a,0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00, +0x12,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x04,0x00, +0x2e,0x0a,0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x04, +0x00,0x2e,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x06, +0x00,0x3d,0x0a,0x09,0x0a,0x02,0x08,0x08,0x12,0x03, +0x06,0x00,0x3d,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03, +0x08,0x00,0x22,0x0a,0x09,0x0a,0x02,0x08,0x0a,0x12, +0x03,0x08,0x00,0x22,0x0a,0x0a,0x0a,0x02,0x04,0x00, +0x12,0x04,0x0a,0x00,0x0e,0x01,0x0a,0x0a,0x0a,0x03, +0x04,0x00,0x01,0x12,0x03,0x0a,0x08,0x1d,0x0a,0x0b, +0x0a,0x04,0x04,0x00,0x02,0x00,0x12,0x03,0x0b,0x02, +0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x05, +0x12,0x03,0x0b,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x00,0x01,0x12,0x03,0x0b,0x09,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x03,0x12,0x03, +0x0b,0x0d,0x0e,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02, +0x01,0x12,0x03,0x0c,0x02,0x0f,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x01,0x05,0x12,0x03,0x0c,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x01,0x12, +0x03,0x0c,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00, +0x02,0x01,0x03,0x12,0x03,0x0c,0x0d,0x0e,0x0a,0x0b, +0x0a,0x04,0x04,0x00,0x02,0x02,0x12,0x03,0x0d,0x02, +0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x05, +0x12,0x03,0x0d,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x02,0x01,0x12,0x03,0x0d,0x09,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x03,0x12,0x03, +0x0d,0x0d,0x0e,0x0a,0x0a,0x0a,0x02,0x04,0x01,0x12, +0x04,0x10,0x00,0x15,0x01,0x0a,0x0a,0x0a,0x03,0x04, +0x01,0x01,0x12,0x03,0x10,0x08,0x1a,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x00,0x12,0x03,0x11,0x02,0x0f, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x05,0x12, +0x03,0x11,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x00,0x01,0x12,0x03,0x11,0x09,0x0a,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x00,0x03,0x12,0x03,0x11, +0x0d,0x0e,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x01, +0x12,0x03,0x12,0x02,0x0f,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x01,0x05,0x12,0x03,0x12,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x01,0x12,0x03, +0x12,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x01,0x03,0x12,0x03,0x12,0x0d,0x0e,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x02,0x12,0x03,0x13,0x02,0x0f, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x05,0x12, +0x03,0x13,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x02,0x01,0x12,0x03,0x13,0x09,0x0a,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x02,0x03,0x12,0x03,0x13, +0x0d,0x0e,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x03, +0x12,0x03,0x14,0x02,0x0f,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x03,0x05,0x12,0x03,0x14,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x01,0x12,0x03, +0x14,0x09,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x03,0x03,0x12,0x03,0x14,0x0d,0x0e,0x0a,0x0a,0x0a, +0x02,0x04,0x02,0x12,0x04,0x17,0x00,0x19,0x01,0x0a, +0x0a,0x0a,0x03,0x04,0x02,0x01,0x12,0x03,0x17,0x08, +0x1a,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x00,0x12, +0x03,0x18,0x02,0x1b,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x00,0x06,0x12,0x03,0x18,0x02,0x14,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x00,0x01,0x12,0x03,0x18, +0x15,0x16,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00, +0x03,0x12,0x03,0x18,0x19,0x1a,0x0a,0x0a,0x0a,0x02, +0x04,0x03,0x12,0x04,0x1b,0x00,0x1e,0x01,0x0a,0x0a, +0x0a,0x03,0x04,0x03,0x01,0x12,0x03,0x1b,0x08,0x16, +0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x00,0x12,0x03, +0x1c,0x02,0x28,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x00,0x06,0x12,0x03,0x1c,0x02,0x17,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x00,0x01,0x12,0x03,0x1c,0x18, +0x23,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x03, +0x12,0x03,0x1c,0x26,0x27,0x0a,0x0b,0x0a,0x04,0x04, +0x03,0x02,0x01,0x12,0x03,0x1d,0x02,0x22,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x01,0x06,0x12,0x03,0x1d, +0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01, +0x01,0x12,0x03,0x1d,0x15,0x1d,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x01,0x03,0x12,0x03,0x1d,0x20,0x21, +0x0a,0x0a,0x0a,0x02,0x04,0x04,0x12,0x04,0x20,0x00, +0x23,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x04,0x01,0x12, +0x03,0x20,0x08,0x1b,0x0a,0x0b,0x0a,0x04,0x04,0x04, +0x02,0x00,0x12,0x03,0x21,0x02,0x28,0x0a,0x0c,0x0a, +0x05,0x04,0x04,0x02,0x00,0x06,0x12,0x03,0x21,0x02, +0x17,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x00,0x01, +0x12,0x03,0x21,0x18,0x23,0x0a,0x0c,0x0a,0x05,0x04, +0x04,0x02,0x00,0x03,0x12,0x03,0x21,0x26,0x27,0x0a, +0x0b,0x0a,0x04,0x04,0x04,0x02,0x01,0x12,0x03,0x22, +0x02,0x22,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01, +0x06,0x12,0x03,0x22,0x02,0x14,0x0a,0x0c,0x0a,0x05, +0x04,0x04,0x02,0x01,0x01,0x12,0x03,0x22,0x15,0x1d, +0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01,0x03,0x12, +0x03,0x22,0x20,0x21,0x0a,0x0a,0x0a,0x02,0x04,0x05, +0x12,0x04,0x25,0x00,0x2c,0x01,0x0a,0x0a,0x0a,0x03, +0x04,0x05,0x01,0x12,0x03,0x25,0x08,0x17,0x0a,0x0b, +0x0a,0x04,0x04,0x05,0x02,0x00,0x12,0x03,0x26,0x02, +0x10,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x05, +0x12,0x03,0x26,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x05,0x02,0x00,0x01,0x12,0x03,0x26,0x09,0x0b,0x0a, +0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x03,0x12,0x03, +0x26,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x05,0x02, +0x01,0x12,0x03,0x27,0x02,0x10,0x0a,0x0c,0x0a,0x05, +0x04,0x05,0x02,0x01,0x05,0x12,0x03,0x27,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01,0x01,0x12, +0x03,0x27,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x05, +0x02,0x01,0x03,0x12,0x03,0x27,0x0e,0x0f,0x0a,0x0b, +0x0a,0x04,0x04,0x05,0x02,0x02,0x12,0x03,0x28,0x02, +0x10,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x02,0x05, +0x12,0x03,0x28,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x05,0x02,0x02,0x01,0x12,0x03,0x28,0x09,0x0b,0x0a, +0x0c,0x0a,0x05,0x04,0x05,0x02,0x02,0x03,0x12,0x03, +0x28,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x05,0x02, +0x03,0x12,0x03,0x29,0x02,0x10,0x0a,0x0c,0x0a,0x05, +0x04,0x05,0x02,0x03,0x05,0x12,0x03,0x29,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x03,0x01,0x12, +0x03,0x29,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x05, +0x02,0x03,0x03,0x12,0x03,0x29,0x0e,0x0f,0x0a,0x0b, +0x0a,0x04,0x04,0x05,0x02,0x04,0x12,0x03,0x2a,0x02, +0x10,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x04,0x05, +0x12,0x03,0x2a,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x05,0x02,0x04,0x01,0x12,0x03,0x2a,0x09,0x0b,0x0a, +0x0c,0x0a,0x05,0x04,0x05,0x02,0x04,0x03,0x12,0x03, +0x2a,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x05,0x02, +0x05,0x12,0x03,0x2b,0x02,0x10,0x0a,0x0c,0x0a,0x05, +0x04,0x05,0x02,0x05,0x05,0x12,0x03,0x2b,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x05,0x01,0x12, +0x03,0x2b,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x05, +0x02,0x05,0x03,0x12,0x03,0x2b,0x0e,0x0f,0x62,0x06, +0x70,0x72,0x6f,0x74,0x6f,0x33, }; static const char file_name[] = "geometry3d.proto"; static const char wpi_proto_ProtobufTranslation3d_name[] = "wpi.proto.ProtobufTranslation3d"; diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/kinematics.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/kinematics.npb.cpp index e60b09a19e..d27e3f5208 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/kinematics.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/kinematics.npb.cpp @@ -188,249 +188,256 @@ static const uint8_t file_descriptor[] { 0x6f,0x74,0x6f,0x2e,0x50,0x72,0x6f,0x74,0x6f,0x62, 0x75,0x66,0x52,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e, 0x32,0x64,0x52,0x05,0x61,0x6e,0x67,0x6c,0x65,0x42, -0x17,0x0a,0x15,0x6f,0x72,0x67,0x2e,0x77,0x70,0x69, +0x37,0x0a,0x15,0x6f,0x72,0x67,0x2e,0x77,0x70,0x69, 0x6c,0x69,0x62,0x2e,0x6d,0x61,0x74,0x68,0x2e,0x70, -0x72,0x6f,0x74,0x6f,0x4a,0xd6,0x12,0x0a,0x06,0x12, -0x04,0x00,0x00,0x54,0x01,0x0a,0x08,0x0a,0x01,0x0c, -0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a,0x01,0x02, -0x12,0x03,0x02,0x00,0x12,0x0a,0x09,0x0a,0x02,0x03, -0x00,0x12,0x03,0x04,0x00,0x1a,0x0a,0x08,0x0a,0x01, -0x08,0x12,0x03,0x06,0x00,0x2e,0x0a,0x09,0x0a,0x02, -0x08,0x01,0x12,0x03,0x06,0x00,0x2e,0x0a,0x0a,0x0a, -0x02,0x04,0x00,0x12,0x04,0x08,0x00,0x0c,0x01,0x0a, -0x0a,0x0a,0x03,0x04,0x00,0x01,0x12,0x03,0x08,0x08, -0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x00,0x12, -0x03,0x09,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00, -0x02,0x00,0x05,0x12,0x03,0x09,0x02,0x08,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x00,0x01,0x12,0x03,0x09, -0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00, -0x03,0x12,0x03,0x09,0x0e,0x0f,0x0a,0x0b,0x0a,0x04, -0x04,0x00,0x02,0x01,0x12,0x03,0x0a,0x02,0x10,0x0a, -0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x05,0x12,0x03, -0x0a,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x01,0x01,0x12,0x03,0x0a,0x09,0x0b,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x01,0x03,0x12,0x03,0x0a,0x0e, -0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x02,0x12, -0x03,0x0b,0x02,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x00, -0x02,0x02,0x05,0x12,0x03,0x0b,0x02,0x08,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x02,0x01,0x12,0x03,0x0b, -0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02, -0x03,0x12,0x03,0x0b,0x11,0x12,0x0a,0x0a,0x0a,0x02, -0x04,0x01,0x12,0x04,0x0e,0x00,0x12,0x01,0x0a,0x0a, -0x0a,0x03,0x04,0x01,0x01,0x12,0x03,0x0e,0x08,0x24, -0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x00,0x12,0x03, -0x0f,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, -0x00,0x05,0x12,0x03,0x0f,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x00,0x01,0x12,0x03,0x0f,0x09, -0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x03, -0x12,0x03,0x0f,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04, -0x01,0x02,0x01,0x12,0x03,0x10,0x02,0x10,0x0a,0x0c, -0x0a,0x05,0x04,0x01,0x02,0x01,0x05,0x12,0x03,0x10, -0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01, -0x01,0x12,0x03,0x10,0x09,0x0b,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x01,0x03,0x12,0x03,0x10,0x0e,0x0f, -0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x02,0x12,0x03, -0x11,0x02,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, -0x02,0x05,0x12,0x03,0x11,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x02,0x01,0x12,0x03,0x11,0x09, -0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x03, -0x12,0x03,0x11,0x11,0x12,0x0a,0x0a,0x0a,0x02,0x04, -0x02,0x12,0x04,0x14,0x00,0x16,0x01,0x0a,0x0a,0x0a, -0x03,0x04,0x02,0x01,0x12,0x03,0x14,0x08,0x2b,0x0a, -0x0b,0x0a,0x04,0x04,0x02,0x02,0x00,0x12,0x03,0x15, -0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00, -0x05,0x12,0x03,0x15,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x00,0x01,0x12,0x03,0x15,0x09,0x13, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x03,0x12, -0x03,0x15,0x16,0x17,0x0a,0x0a,0x0a,0x02,0x04,0x03, -0x12,0x04,0x18,0x00,0x1b,0x01,0x0a,0x0a,0x0a,0x03, -0x04,0x03,0x01,0x12,0x03,0x18,0x08,0x2c,0x0a,0x0b, -0x0a,0x04,0x04,0x03,0x02,0x00,0x12,0x03,0x19,0x02, -0x12,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x05, -0x12,0x03,0x19,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x00,0x01,0x12,0x03,0x19,0x09,0x0d,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x03,0x12,0x03, -0x19,0x10,0x11,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02, -0x01,0x12,0x03,0x1a,0x02,0x13,0x0a,0x0c,0x0a,0x05, -0x04,0x03,0x02,0x01,0x05,0x12,0x03,0x1a,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01,0x01,0x12, -0x03,0x1a,0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x01,0x03,0x12,0x03,0x1a,0x11,0x12,0x0a,0x0a, -0x0a,0x02,0x04,0x04,0x12,0x04,0x1d,0x00,0x20,0x01, -0x0a,0x0a,0x0a,0x03,0x04,0x04,0x01,0x12,0x03,0x1d, -0x08,0x33,0x0a,0x0b,0x0a,0x04,0x04,0x04,0x02,0x00, -0x12,0x03,0x1e,0x02,0x12,0x0a,0x0c,0x0a,0x05,0x04, -0x04,0x02,0x00,0x05,0x12,0x03,0x1e,0x02,0x08,0x0a, -0x0c,0x0a,0x05,0x04,0x04,0x02,0x00,0x01,0x12,0x03, -0x1e,0x09,0x0d,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02, -0x00,0x03,0x12,0x03,0x1e,0x10,0x11,0x0a,0x0b,0x0a, -0x04,0x04,0x04,0x02,0x01,0x12,0x03,0x1f,0x02,0x13, -0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01,0x05,0x12, -0x03,0x1f,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x04, -0x02,0x01,0x01,0x12,0x03,0x1f,0x09,0x0e,0x0a,0x0c, -0x0a,0x05,0x04,0x04,0x02,0x01,0x03,0x12,0x03,0x1f, -0x11,0x12,0x0a,0x0a,0x0a,0x02,0x04,0x05,0x12,0x04, -0x22,0x00,0x25,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x05, -0x01,0x12,0x03,0x22,0x08,0x2f,0x0a,0x0b,0x0a,0x04, -0x04,0x05,0x02,0x00,0x12,0x03,0x23,0x02,0x12,0x0a, -0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x05,0x12,0x03, -0x23,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02, -0x00,0x01,0x12,0x03,0x23,0x09,0x0d,0x0a,0x0c,0x0a, -0x05,0x04,0x05,0x02,0x00,0x03,0x12,0x03,0x23,0x10, -0x11,0x0a,0x0b,0x0a,0x04,0x04,0x05,0x02,0x01,0x12, -0x03,0x24,0x02,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x05, -0x02,0x01,0x05,0x12,0x03,0x24,0x02,0x08,0x0a,0x0c, -0x0a,0x05,0x04,0x05,0x02,0x01,0x01,0x12,0x03,0x24, -0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01, -0x03,0x12,0x03,0x24,0x11,0x12,0x0a,0x0a,0x0a,0x02, -0x04,0x06,0x12,0x04,0x27,0x00,0x2c,0x01,0x0a,0x0a, -0x0a,0x03,0x04,0x06,0x01,0x12,0x03,0x27,0x08,0x26, -0x0a,0x0b,0x0a,0x04,0x04,0x06,0x02,0x00,0x12,0x03, -0x28,0x02,0x27,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02, -0x00,0x06,0x12,0x03,0x28,0x02,0x17,0x0a,0x0c,0x0a, -0x05,0x04,0x06,0x02,0x00,0x01,0x12,0x03,0x28,0x18, -0x22,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x00,0x03, -0x12,0x03,0x28,0x25,0x26,0x0a,0x0b,0x0a,0x04,0x04, -0x06,0x02,0x01,0x12,0x03,0x29,0x02,0x28,0x0a,0x0c, -0x0a,0x05,0x04,0x06,0x02,0x01,0x06,0x12,0x03,0x29, -0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x01, -0x01,0x12,0x03,0x29,0x18,0x23,0x0a,0x0c,0x0a,0x05, -0x04,0x06,0x02,0x01,0x03,0x12,0x03,0x29,0x26,0x27, -0x0a,0x0b,0x0a,0x04,0x04,0x06,0x02,0x02,0x12,0x03, -0x2a,0x02,0x26,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02, -0x02,0x06,0x12,0x03,0x2a,0x02,0x17,0x0a,0x0c,0x0a, -0x05,0x04,0x06,0x02,0x02,0x01,0x12,0x03,0x2a,0x18, -0x21,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x02,0x03, -0x12,0x03,0x2a,0x24,0x25,0x0a,0x0b,0x0a,0x04,0x04, -0x06,0x02,0x03,0x12,0x03,0x2b,0x02,0x27,0x0a,0x0c, -0x0a,0x05,0x04,0x06,0x02,0x03,0x06,0x12,0x03,0x2b, -0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x03, -0x01,0x12,0x03,0x2b,0x18,0x22,0x0a,0x0c,0x0a,0x05, -0x04,0x06,0x02,0x03,0x03,0x12,0x03,0x2b,0x25,0x26, -0x0a,0x0a,0x0a,0x02,0x04,0x07,0x12,0x04,0x2e,0x00, -0x33,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x07,0x01,0x12, -0x03,0x2e,0x08,0x2a,0x0a,0x0b,0x0a,0x04,0x04,0x07, -0x02,0x00,0x12,0x03,0x2f,0x02,0x18,0x0a,0x0c,0x0a, -0x05,0x04,0x07,0x02,0x00,0x05,0x12,0x03,0x2f,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x00,0x01, -0x12,0x03,0x2f,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04, -0x07,0x02,0x00,0x03,0x12,0x03,0x2f,0x16,0x17,0x0a, -0x0b,0x0a,0x04,0x04,0x07,0x02,0x01,0x12,0x03,0x30, -0x02,0x19,0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x01, -0x05,0x12,0x03,0x30,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x07,0x02,0x01,0x01,0x12,0x03,0x30,0x09,0x14, -0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x01,0x03,0x12, -0x03,0x30,0x17,0x18,0x0a,0x0b,0x0a,0x04,0x04,0x07, -0x02,0x02,0x12,0x03,0x31,0x02,0x17,0x0a,0x0c,0x0a, -0x05,0x04,0x07,0x02,0x02,0x05,0x12,0x03,0x31,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x02,0x01, -0x12,0x03,0x31,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04, -0x07,0x02,0x02,0x03,0x12,0x03,0x31,0x15,0x16,0x0a, -0x0b,0x0a,0x04,0x04,0x07,0x02,0x03,0x12,0x03,0x32, -0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x03, -0x05,0x12,0x03,0x32,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x07,0x02,0x03,0x01,0x12,0x03,0x32,0x09,0x13, -0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x03,0x03,0x12, -0x03,0x32,0x16,0x17,0x0a,0x0a,0x0a,0x02,0x04,0x08, -0x12,0x04,0x35,0x00,0x3a,0x01,0x0a,0x0a,0x0a,0x03, -0x04,0x08,0x01,0x12,0x03,0x35,0x08,0x27,0x0a,0x0b, -0x0a,0x04,0x04,0x08,0x02,0x00,0x12,0x03,0x36,0x02, -0x18,0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02,0x00,0x05, -0x12,0x03,0x36,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x08,0x02,0x00,0x01,0x12,0x03,0x36,0x09,0x13,0x0a, -0x0c,0x0a,0x05,0x04,0x08,0x02,0x00,0x03,0x12,0x03, -0x36,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x08,0x02, -0x01,0x12,0x03,0x37,0x02,0x19,0x0a,0x0c,0x0a,0x05, -0x04,0x08,0x02,0x01,0x05,0x12,0x03,0x37,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02,0x01,0x01,0x12, -0x03,0x37,0x09,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x08, -0x02,0x01,0x03,0x12,0x03,0x37,0x17,0x18,0x0a,0x0b, -0x0a,0x04,0x04,0x08,0x02,0x02,0x12,0x03,0x38,0x02, -0x17,0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02,0x02,0x05, -0x12,0x03,0x38,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, -0x08,0x02,0x02,0x01,0x12,0x03,0x38,0x09,0x12,0x0a, -0x0c,0x0a,0x05,0x04,0x08,0x02,0x02,0x03,0x12,0x03, -0x38,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x08,0x02, -0x03,0x12,0x03,0x39,0x02,0x18,0x0a,0x0c,0x0a,0x05, -0x04,0x08,0x02,0x03,0x05,0x12,0x03,0x39,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02,0x03,0x01,0x12, -0x03,0x39,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x08, -0x02,0x03,0x03,0x12,0x03,0x39,0x16,0x17,0x0a,0x0a, -0x0a,0x02,0x04,0x09,0x12,0x04,0x3c,0x00,0x41,0x01, -0x0a,0x0a,0x0a,0x03,0x04,0x09,0x01,0x12,0x03,0x3c, -0x08,0x2e,0x0a,0x0b,0x0a,0x04,0x04,0x09,0x02,0x00, -0x12,0x03,0x3d,0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04, -0x09,0x02,0x00,0x05,0x12,0x03,0x3d,0x02,0x08,0x0a, -0x0c,0x0a,0x05,0x04,0x09,0x02,0x00,0x01,0x12,0x03, -0x3d,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02, -0x00,0x03,0x12,0x03,0x3d,0x16,0x17,0x0a,0x0b,0x0a, -0x04,0x04,0x09,0x02,0x01,0x12,0x03,0x3e,0x02,0x19, -0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02,0x01,0x05,0x12, -0x03,0x3e,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x09, -0x02,0x01,0x01,0x12,0x03,0x3e,0x09,0x14,0x0a,0x0c, -0x0a,0x05,0x04,0x09,0x02,0x01,0x03,0x12,0x03,0x3e, -0x17,0x18,0x0a,0x0b,0x0a,0x04,0x04,0x09,0x02,0x02, -0x12,0x03,0x3f,0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04, -0x09,0x02,0x02,0x05,0x12,0x03,0x3f,0x02,0x08,0x0a, -0x0c,0x0a,0x05,0x04,0x09,0x02,0x02,0x01,0x12,0x03, -0x3f,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02, -0x02,0x03,0x12,0x03,0x3f,0x15,0x16,0x0a,0x0b,0x0a, -0x04,0x04,0x09,0x02,0x03,0x12,0x03,0x40,0x02,0x18, -0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02,0x03,0x05,0x12, -0x03,0x40,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x09, -0x02,0x03,0x01,0x12,0x03,0x40,0x09,0x13,0x0a,0x0c, -0x0a,0x05,0x04,0x09,0x02,0x03,0x03,0x12,0x03,0x40, -0x16,0x17,0x0a,0x0a,0x0a,0x02,0x04,0x0a,0x12,0x04, -0x43,0x00,0x45,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x0a, -0x01,0x12,0x03,0x43,0x08,0x25,0x0a,0x0b,0x0a,0x04, -0x04,0x0a,0x02,0x00,0x12,0x03,0x44,0x02,0x2d,0x0a, -0x0c,0x0a,0x05,0x04,0x0a,0x02,0x00,0x04,0x12,0x03, -0x44,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x0a,0x02, -0x00,0x06,0x12,0x03,0x44,0x0b,0x20,0x0a,0x0c,0x0a, -0x05,0x04,0x0a,0x02,0x00,0x01,0x12,0x03,0x44,0x21, -0x28,0x0a,0x0c,0x0a,0x05,0x04,0x0a,0x02,0x00,0x03, -0x12,0x03,0x44,0x2b,0x2c,0x0a,0x0a,0x0a,0x02,0x04, -0x0b,0x12,0x04,0x47,0x00,0x4a,0x01,0x0a,0x0a,0x0a, -0x03,0x04,0x0b,0x01,0x12,0x03,0x47,0x08,0x24,0x0a, -0x0b,0x0a,0x04,0x04,0x0b,0x02,0x00,0x12,0x03,0x48, -0x02,0x16,0x0a,0x0c,0x0a,0x05,0x04,0x0b,0x02,0x00, -0x05,0x12,0x03,0x48,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x0b,0x02,0x00,0x01,0x12,0x03,0x48,0x09,0x11, -0x0a,0x0c,0x0a,0x05,0x04,0x0b,0x02,0x00,0x03,0x12, -0x03,0x48,0x14,0x15,0x0a,0x0b,0x0a,0x04,0x04,0x0b, -0x02,0x01,0x12,0x03,0x49,0x02,0x1f,0x0a,0x0c,0x0a, -0x05,0x04,0x0b,0x02,0x01,0x06,0x12,0x03,0x49,0x02, -0x14,0x0a,0x0c,0x0a,0x05,0x04,0x0b,0x02,0x01,0x01, -0x12,0x03,0x49,0x15,0x1a,0x0a,0x0c,0x0a,0x05,0x04, -0x0b,0x02,0x01,0x03,0x12,0x03,0x49,0x1d,0x1e,0x0a, -0x0a,0x0a,0x02,0x04,0x0c,0x12,0x04,0x4c,0x00,0x4f, -0x01,0x0a,0x0a,0x0a,0x03,0x04,0x0c,0x01,0x12,0x03, -0x4c,0x08,0x21,0x0a,0x0b,0x0a,0x04,0x04,0x0c,0x02, -0x00,0x12,0x03,0x4d,0x02,0x13,0x0a,0x0c,0x0a,0x05, -0x04,0x0c,0x02,0x00,0x05,0x12,0x03,0x4d,0x02,0x08, -0x0a,0x0c,0x0a,0x05,0x04,0x0c,0x02,0x00,0x01,0x12, -0x03,0x4d,0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x0c, -0x02,0x00,0x03,0x12,0x03,0x4d,0x11,0x12,0x0a,0x0b, -0x0a,0x04,0x04,0x0c,0x02,0x01,0x12,0x03,0x4e,0x02, -0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x0c,0x02,0x01,0x06, -0x12,0x03,0x4e,0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04, -0x0c,0x02,0x01,0x01,0x12,0x03,0x4e,0x15,0x1a,0x0a, -0x0c,0x0a,0x05,0x04,0x0c,0x02,0x01,0x03,0x12,0x03, -0x4e,0x1d,0x1e,0x0a,0x0a,0x0a,0x02,0x04,0x0d,0x12, -0x04,0x51,0x00,0x54,0x01,0x0a,0x0a,0x0a,0x03,0x04, -0x0d,0x01,0x12,0x03,0x51,0x08,0x28,0x0a,0x0b,0x0a, -0x04,0x04,0x0d,0x02,0x00,0x12,0x03,0x52,0x02,0x1a, -0x0a,0x0c,0x0a,0x05,0x04,0x0d,0x02,0x00,0x05,0x12, -0x03,0x52,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x0d, -0x02,0x00,0x01,0x12,0x03,0x52,0x09,0x15,0x0a,0x0c, -0x0a,0x05,0x04,0x0d,0x02,0x00,0x03,0x12,0x03,0x52, -0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04,0x0d,0x02,0x01, -0x12,0x03,0x53,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04, -0x0d,0x02,0x01,0x06,0x12,0x03,0x53,0x02,0x14,0x0a, -0x0c,0x0a,0x05,0x04,0x0d,0x02,0x01,0x01,0x12,0x03, -0x53,0x15,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x0d,0x02, -0x01,0x03,0x12,0x03,0x53,0x1d,0x1e,0x62,0x06,0x70, -0x72,0x6f,0x74,0x6f,0x33, +0x72,0x6f,0x74,0x6f,0x42,0x1c,0x50,0x72,0x6f,0x74, +0x6f,0x62,0x75,0x66,0x4b,0x69,0x6e,0x65,0x6d,0x61, +0x74,0x69,0x63,0x73,0x44,0x65,0x73,0x63,0x72,0x69, +0x70,0x74,0x6f,0x72,0x50,0x01,0x4a,0x80,0x13,0x0a, +0x06,0x12,0x04,0x00,0x00,0x58,0x01,0x0a,0x08,0x0a, +0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a, +0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a,0x09,0x0a, +0x02,0x03,0x00,0x12,0x03,0x04,0x00,0x1a,0x0a,0x08, +0x0a,0x01,0x08,0x12,0x03,0x06,0x00,0x2e,0x0a,0x09, +0x0a,0x02,0x08,0x01,0x12,0x03,0x06,0x00,0x2e,0x0a, +0x08,0x0a,0x01,0x08,0x12,0x03,0x08,0x00,0x3d,0x0a, +0x09,0x0a,0x02,0x08,0x08,0x12,0x03,0x08,0x00,0x3d, +0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x0a,0x00,0x22, +0x0a,0x09,0x0a,0x02,0x08,0x0a,0x12,0x03,0x0a,0x00, +0x22,0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x0c, +0x00,0x10,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01, +0x12,0x03,0x0c,0x08,0x1d,0x0a,0x0b,0x0a,0x04,0x04, +0x00,0x02,0x00,0x12,0x03,0x0d,0x02,0x10,0x0a,0x0c, +0x0a,0x05,0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x0d, +0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00, +0x01,0x12,0x03,0x0d,0x09,0x0b,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x00,0x03,0x12,0x03,0x0d,0x0e,0x0f, +0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x01,0x12,0x03, +0x0e,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, +0x01,0x05,0x12,0x03,0x0e,0x02,0x08,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x0e,0x09, +0x0b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x03, +0x12,0x03,0x0e,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04, +0x00,0x02,0x02,0x12,0x03,0x0f,0x02,0x13,0x0a,0x0c, +0x0a,0x05,0x04,0x00,0x02,0x02,0x05,0x12,0x03,0x0f, +0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02, +0x01,0x12,0x03,0x0f,0x09,0x0e,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x02,0x03,0x12,0x03,0x0f,0x11,0x12, +0x0a,0x0a,0x0a,0x02,0x04,0x01,0x12,0x04,0x12,0x00, +0x16,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12, +0x03,0x12,0x08,0x24,0x0a,0x0b,0x0a,0x04,0x04,0x01, +0x02,0x00,0x12,0x03,0x13,0x02,0x10,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x00,0x05,0x12,0x03,0x13,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01, +0x12,0x03,0x13,0x09,0x0b,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x00,0x03,0x12,0x03,0x13,0x0e,0x0f,0x0a, +0x0b,0x0a,0x04,0x04,0x01,0x02,0x01,0x12,0x03,0x14, +0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01, +0x05,0x12,0x03,0x14,0x02,0x08,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x01,0x01,0x12,0x03,0x14,0x09,0x0b, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x03,0x12, +0x03,0x14,0x0e,0x0f,0x0a,0x0b,0x0a,0x04,0x04,0x01, +0x02,0x02,0x12,0x03,0x15,0x02,0x13,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x02,0x05,0x12,0x03,0x15,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x01, +0x12,0x03,0x15,0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x02,0x03,0x12,0x03,0x15,0x11,0x12,0x0a, +0x0a,0x0a,0x02,0x04,0x02,0x12,0x04,0x18,0x00,0x1a, +0x01,0x0a,0x0a,0x0a,0x03,0x04,0x02,0x01,0x12,0x03, +0x18,0x08,0x2b,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, +0x00,0x12,0x03,0x19,0x02,0x18,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x00,0x05,0x12,0x03,0x19,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x01,0x12, +0x03,0x19,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x00,0x03,0x12,0x03,0x19,0x16,0x17,0x0a,0x0a, +0x0a,0x02,0x04,0x03,0x12,0x04,0x1c,0x00,0x1f,0x01, +0x0a,0x0a,0x0a,0x03,0x04,0x03,0x01,0x12,0x03,0x1c, +0x08,0x2c,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x00, +0x12,0x03,0x1d,0x02,0x12,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x00,0x05,0x12,0x03,0x1d,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x01,0x12,0x03, +0x1d,0x09,0x0d,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x00,0x03,0x12,0x03,0x1d,0x10,0x11,0x0a,0x0b,0x0a, +0x04,0x04,0x03,0x02,0x01,0x12,0x03,0x1e,0x02,0x13, +0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01,0x05,0x12, +0x03,0x1e,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x01,0x01,0x12,0x03,0x1e,0x09,0x0e,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x01,0x03,0x12,0x03,0x1e, +0x11,0x12,0x0a,0x0a,0x0a,0x02,0x04,0x04,0x12,0x04, +0x21,0x00,0x24,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x04, +0x01,0x12,0x03,0x21,0x08,0x33,0x0a,0x0b,0x0a,0x04, +0x04,0x04,0x02,0x00,0x12,0x03,0x22,0x02,0x12,0x0a, +0x0c,0x0a,0x05,0x04,0x04,0x02,0x00,0x05,0x12,0x03, +0x22,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02, +0x00,0x01,0x12,0x03,0x22,0x09,0x0d,0x0a,0x0c,0x0a, +0x05,0x04,0x04,0x02,0x00,0x03,0x12,0x03,0x22,0x10, +0x11,0x0a,0x0b,0x0a,0x04,0x04,0x04,0x02,0x01,0x12, +0x03,0x23,0x02,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x04, +0x02,0x01,0x05,0x12,0x03,0x23,0x02,0x08,0x0a,0x0c, +0x0a,0x05,0x04,0x04,0x02,0x01,0x01,0x12,0x03,0x23, +0x09,0x0e,0x0a,0x0c,0x0a,0x05,0x04,0x04,0x02,0x01, +0x03,0x12,0x03,0x23,0x11,0x12,0x0a,0x0a,0x0a,0x02, +0x04,0x05,0x12,0x04,0x26,0x00,0x29,0x01,0x0a,0x0a, +0x0a,0x03,0x04,0x05,0x01,0x12,0x03,0x26,0x08,0x2f, +0x0a,0x0b,0x0a,0x04,0x04,0x05,0x02,0x00,0x12,0x03, +0x27,0x02,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02, +0x00,0x05,0x12,0x03,0x27,0x02,0x08,0x0a,0x0c,0x0a, +0x05,0x04,0x05,0x02,0x00,0x01,0x12,0x03,0x27,0x09, +0x0d,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x00,0x03, +0x12,0x03,0x27,0x10,0x11,0x0a,0x0b,0x0a,0x04,0x04, +0x05,0x02,0x01,0x12,0x03,0x28,0x02,0x13,0x0a,0x0c, +0x0a,0x05,0x04,0x05,0x02,0x01,0x05,0x12,0x03,0x28, +0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x05,0x02,0x01, +0x01,0x12,0x03,0x28,0x09,0x0e,0x0a,0x0c,0x0a,0x05, +0x04,0x05,0x02,0x01,0x03,0x12,0x03,0x28,0x11,0x12, +0x0a,0x0a,0x0a,0x02,0x04,0x06,0x12,0x04,0x2b,0x00, +0x30,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x06,0x01,0x12, +0x03,0x2b,0x08,0x26,0x0a,0x0b,0x0a,0x04,0x04,0x06, +0x02,0x00,0x12,0x03,0x2c,0x02,0x27,0x0a,0x0c,0x0a, +0x05,0x04,0x06,0x02,0x00,0x06,0x12,0x03,0x2c,0x02, +0x17,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x00,0x01, +0x12,0x03,0x2c,0x18,0x22,0x0a,0x0c,0x0a,0x05,0x04, +0x06,0x02,0x00,0x03,0x12,0x03,0x2c,0x25,0x26,0x0a, +0x0b,0x0a,0x04,0x04,0x06,0x02,0x01,0x12,0x03,0x2d, +0x02,0x28,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x01, +0x06,0x12,0x03,0x2d,0x02,0x17,0x0a,0x0c,0x0a,0x05, +0x04,0x06,0x02,0x01,0x01,0x12,0x03,0x2d,0x18,0x23, +0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x01,0x03,0x12, +0x03,0x2d,0x26,0x27,0x0a,0x0b,0x0a,0x04,0x04,0x06, +0x02,0x02,0x12,0x03,0x2e,0x02,0x26,0x0a,0x0c,0x0a, +0x05,0x04,0x06,0x02,0x02,0x06,0x12,0x03,0x2e,0x02, +0x17,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x02,0x01, +0x12,0x03,0x2e,0x18,0x21,0x0a,0x0c,0x0a,0x05,0x04, +0x06,0x02,0x02,0x03,0x12,0x03,0x2e,0x24,0x25,0x0a, +0x0b,0x0a,0x04,0x04,0x06,0x02,0x03,0x12,0x03,0x2f, +0x02,0x27,0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x03, +0x06,0x12,0x03,0x2f,0x02,0x17,0x0a,0x0c,0x0a,0x05, +0x04,0x06,0x02,0x03,0x01,0x12,0x03,0x2f,0x18,0x22, +0x0a,0x0c,0x0a,0x05,0x04,0x06,0x02,0x03,0x03,0x12, +0x03,0x2f,0x25,0x26,0x0a,0x0a,0x0a,0x02,0x04,0x07, +0x12,0x04,0x32,0x00,0x37,0x01,0x0a,0x0a,0x0a,0x03, +0x04,0x07,0x01,0x12,0x03,0x32,0x08,0x2a,0x0a,0x0b, +0x0a,0x04,0x04,0x07,0x02,0x00,0x12,0x03,0x33,0x02, +0x18,0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x00,0x05, +0x12,0x03,0x33,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x07,0x02,0x00,0x01,0x12,0x03,0x33,0x09,0x13,0x0a, +0x0c,0x0a,0x05,0x04,0x07,0x02,0x00,0x03,0x12,0x03, +0x33,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x07,0x02, +0x01,0x12,0x03,0x34,0x02,0x19,0x0a,0x0c,0x0a,0x05, +0x04,0x07,0x02,0x01,0x05,0x12,0x03,0x34,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x01,0x01,0x12, +0x03,0x34,0x09,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x07, +0x02,0x01,0x03,0x12,0x03,0x34,0x17,0x18,0x0a,0x0b, +0x0a,0x04,0x04,0x07,0x02,0x02,0x12,0x03,0x35,0x02, +0x17,0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x02,0x05, +0x12,0x03,0x35,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x07,0x02,0x02,0x01,0x12,0x03,0x35,0x09,0x12,0x0a, +0x0c,0x0a,0x05,0x04,0x07,0x02,0x02,0x03,0x12,0x03, +0x35,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x07,0x02, +0x03,0x12,0x03,0x36,0x02,0x18,0x0a,0x0c,0x0a,0x05, +0x04,0x07,0x02,0x03,0x05,0x12,0x03,0x36,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x07,0x02,0x03,0x01,0x12, +0x03,0x36,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x07, +0x02,0x03,0x03,0x12,0x03,0x36,0x16,0x17,0x0a,0x0a, +0x0a,0x02,0x04,0x08,0x12,0x04,0x39,0x00,0x3e,0x01, +0x0a,0x0a,0x0a,0x03,0x04,0x08,0x01,0x12,0x03,0x39, +0x08,0x27,0x0a,0x0b,0x0a,0x04,0x04,0x08,0x02,0x00, +0x12,0x03,0x3a,0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04, +0x08,0x02,0x00,0x05,0x12,0x03,0x3a,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x08,0x02,0x00,0x01,0x12,0x03, +0x3a,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02, +0x00,0x03,0x12,0x03,0x3a,0x16,0x17,0x0a,0x0b,0x0a, +0x04,0x04,0x08,0x02,0x01,0x12,0x03,0x3b,0x02,0x19, +0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02,0x01,0x05,0x12, +0x03,0x3b,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x08, +0x02,0x01,0x01,0x12,0x03,0x3b,0x09,0x14,0x0a,0x0c, +0x0a,0x05,0x04,0x08,0x02,0x01,0x03,0x12,0x03,0x3b, +0x17,0x18,0x0a,0x0b,0x0a,0x04,0x04,0x08,0x02,0x02, +0x12,0x03,0x3c,0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04, +0x08,0x02,0x02,0x05,0x12,0x03,0x3c,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x08,0x02,0x02,0x01,0x12,0x03, +0x3c,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02, +0x02,0x03,0x12,0x03,0x3c,0x15,0x16,0x0a,0x0b,0x0a, +0x04,0x04,0x08,0x02,0x03,0x12,0x03,0x3d,0x02,0x18, +0x0a,0x0c,0x0a,0x05,0x04,0x08,0x02,0x03,0x05,0x12, +0x03,0x3d,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x08, +0x02,0x03,0x01,0x12,0x03,0x3d,0x09,0x13,0x0a,0x0c, +0x0a,0x05,0x04,0x08,0x02,0x03,0x03,0x12,0x03,0x3d, +0x16,0x17,0x0a,0x0a,0x0a,0x02,0x04,0x09,0x12,0x04, +0x40,0x00,0x45,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x09, +0x01,0x12,0x03,0x40,0x08,0x2e,0x0a,0x0b,0x0a,0x04, +0x04,0x09,0x02,0x00,0x12,0x03,0x41,0x02,0x18,0x0a, +0x0c,0x0a,0x05,0x04,0x09,0x02,0x00,0x05,0x12,0x03, +0x41,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02, +0x00,0x01,0x12,0x03,0x41,0x09,0x13,0x0a,0x0c,0x0a, +0x05,0x04,0x09,0x02,0x00,0x03,0x12,0x03,0x41,0x16, +0x17,0x0a,0x0b,0x0a,0x04,0x04,0x09,0x02,0x01,0x12, +0x03,0x42,0x02,0x19,0x0a,0x0c,0x0a,0x05,0x04,0x09, +0x02,0x01,0x05,0x12,0x03,0x42,0x02,0x08,0x0a,0x0c, +0x0a,0x05,0x04,0x09,0x02,0x01,0x01,0x12,0x03,0x42, +0x09,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02,0x01, +0x03,0x12,0x03,0x42,0x17,0x18,0x0a,0x0b,0x0a,0x04, +0x04,0x09,0x02,0x02,0x12,0x03,0x43,0x02,0x17,0x0a, +0x0c,0x0a,0x05,0x04,0x09,0x02,0x02,0x05,0x12,0x03, +0x43,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02, +0x02,0x01,0x12,0x03,0x43,0x09,0x12,0x0a,0x0c,0x0a, +0x05,0x04,0x09,0x02,0x02,0x03,0x12,0x03,0x43,0x15, +0x16,0x0a,0x0b,0x0a,0x04,0x04,0x09,0x02,0x03,0x12, +0x03,0x44,0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x09, +0x02,0x03,0x05,0x12,0x03,0x44,0x02,0x08,0x0a,0x0c, +0x0a,0x05,0x04,0x09,0x02,0x03,0x01,0x12,0x03,0x44, +0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x09,0x02,0x03, +0x03,0x12,0x03,0x44,0x16,0x17,0x0a,0x0a,0x0a,0x02, +0x04,0x0a,0x12,0x04,0x47,0x00,0x49,0x01,0x0a,0x0a, +0x0a,0x03,0x04,0x0a,0x01,0x12,0x03,0x47,0x08,0x25, +0x0a,0x0b,0x0a,0x04,0x04,0x0a,0x02,0x00,0x12,0x03, +0x48,0x02,0x2d,0x0a,0x0c,0x0a,0x05,0x04,0x0a,0x02, +0x00,0x04,0x12,0x03,0x48,0x02,0x0a,0x0a,0x0c,0x0a, +0x05,0x04,0x0a,0x02,0x00,0x06,0x12,0x03,0x48,0x0b, +0x20,0x0a,0x0c,0x0a,0x05,0x04,0x0a,0x02,0x00,0x01, +0x12,0x03,0x48,0x21,0x28,0x0a,0x0c,0x0a,0x05,0x04, +0x0a,0x02,0x00,0x03,0x12,0x03,0x48,0x2b,0x2c,0x0a, +0x0a,0x0a,0x02,0x04,0x0b,0x12,0x04,0x4b,0x00,0x4e, +0x01,0x0a,0x0a,0x0a,0x03,0x04,0x0b,0x01,0x12,0x03, +0x4b,0x08,0x24,0x0a,0x0b,0x0a,0x04,0x04,0x0b,0x02, +0x00,0x12,0x03,0x4c,0x02,0x16,0x0a,0x0c,0x0a,0x05, +0x04,0x0b,0x02,0x00,0x05,0x12,0x03,0x4c,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x0b,0x02,0x00,0x01,0x12, +0x03,0x4c,0x09,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x0b, +0x02,0x00,0x03,0x12,0x03,0x4c,0x14,0x15,0x0a,0x0b, +0x0a,0x04,0x04,0x0b,0x02,0x01,0x12,0x03,0x4d,0x02, +0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x0b,0x02,0x01,0x06, +0x12,0x03,0x4d,0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04, +0x0b,0x02,0x01,0x01,0x12,0x03,0x4d,0x15,0x1a,0x0a, +0x0c,0x0a,0x05,0x04,0x0b,0x02,0x01,0x03,0x12,0x03, +0x4d,0x1d,0x1e,0x0a,0x0a,0x0a,0x02,0x04,0x0c,0x12, +0x04,0x50,0x00,0x53,0x01,0x0a,0x0a,0x0a,0x03,0x04, +0x0c,0x01,0x12,0x03,0x50,0x08,0x21,0x0a,0x0b,0x0a, +0x04,0x04,0x0c,0x02,0x00,0x12,0x03,0x51,0x02,0x13, +0x0a,0x0c,0x0a,0x05,0x04,0x0c,0x02,0x00,0x05,0x12, +0x03,0x51,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x0c, +0x02,0x00,0x01,0x12,0x03,0x51,0x09,0x0e,0x0a,0x0c, +0x0a,0x05,0x04,0x0c,0x02,0x00,0x03,0x12,0x03,0x51, +0x11,0x12,0x0a,0x0b,0x0a,0x04,0x04,0x0c,0x02,0x01, +0x12,0x03,0x52,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04, +0x0c,0x02,0x01,0x06,0x12,0x03,0x52,0x02,0x14,0x0a, +0x0c,0x0a,0x05,0x04,0x0c,0x02,0x01,0x01,0x12,0x03, +0x52,0x15,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x0c,0x02, +0x01,0x03,0x12,0x03,0x52,0x1d,0x1e,0x0a,0x0a,0x0a, +0x02,0x04,0x0d,0x12,0x04,0x55,0x00,0x58,0x01,0x0a, +0x0a,0x0a,0x03,0x04,0x0d,0x01,0x12,0x03,0x55,0x08, +0x28,0x0a,0x0b,0x0a,0x04,0x04,0x0d,0x02,0x00,0x12, +0x03,0x56,0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x0d, +0x02,0x00,0x05,0x12,0x03,0x56,0x02,0x08,0x0a,0x0c, +0x0a,0x05,0x04,0x0d,0x02,0x00,0x01,0x12,0x03,0x56, +0x09,0x15,0x0a,0x0c,0x0a,0x05,0x04,0x0d,0x02,0x00, +0x03,0x12,0x03,0x56,0x18,0x19,0x0a,0x0b,0x0a,0x04, +0x04,0x0d,0x02,0x01,0x12,0x03,0x57,0x02,0x1f,0x0a, +0x0c,0x0a,0x05,0x04,0x0d,0x02,0x01,0x06,0x12,0x03, +0x57,0x02,0x14,0x0a,0x0c,0x0a,0x05,0x04,0x0d,0x02, +0x01,0x01,0x12,0x03,0x57,0x15,0x1a,0x0a,0x0c,0x0a, +0x05,0x04,0x0d,0x02,0x01,0x03,0x12,0x03,0x57,0x1d, +0x1e,0x62,0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, }; static const char file_name[] = "kinematics.proto"; static const char wpi_proto_ProtobufChassisSpeeds_name[] = "wpi.proto.ProtobufChassisSpeeds"; diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/spline.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/spline.npb.cpp index 5cb34b0623..c8ff5c5e2f 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/spline.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/spline.npb.cpp @@ -42,74 +42,81 @@ static const uint8_t file_descriptor[] { 0x52,0x08,0x79,0x49,0x6e,0x69,0x74,0x69,0x61,0x6c, 0x12,0x17,0x0a,0x07,0x79,0x5f,0x66,0x69,0x6e,0x61, 0x6c,0x18,0x04,0x20,0x03,0x28,0x01,0x52,0x06,0x79, -0x46,0x69,0x6e,0x61,0x6c,0x42,0x17,0x0a,0x15,0x6f, +0x46,0x69,0x6e,0x61,0x6c,0x42,0x33,0x0a,0x15,0x6f, 0x72,0x67,0x2e,0x77,0x70,0x69,0x6c,0x69,0x62,0x2e, 0x6d,0x61,0x74,0x68,0x2e,0x70,0x72,0x6f,0x74,0x6f, -0x4a,0x89,0x05,0x0a,0x06,0x12,0x04,0x00,0x00,0x12, -0x01,0x0a,0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00, -0x12,0x0a,0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00, -0x12,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x04,0x00, -0x2e,0x0a,0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x04, -0x00,0x2e,0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04, -0x06,0x00,0x0b,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00, -0x01,0x12,0x03,0x06,0x08,0x22,0x0a,0x0b,0x0a,0x04, -0x04,0x00,0x02,0x00,0x12,0x03,0x07,0x02,0x20,0x0a, +0x42,0x18,0x50,0x72,0x6f,0x74,0x6f,0x62,0x75,0x66, +0x53,0x70,0x6c,0x69,0x6e,0x65,0x44,0x65,0x73,0x63, +0x72,0x69,0x70,0x74,0x6f,0x72,0x50,0x01,0x4a,0xb3, +0x05,0x0a,0x06,0x12,0x04,0x00,0x00,0x16,0x01,0x0a, +0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a, +0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a, +0x08,0x0a,0x01,0x08,0x12,0x03,0x04,0x00,0x2e,0x0a, +0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x04,0x00,0x2e, +0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x06,0x00,0x39, +0x0a,0x09,0x0a,0x02,0x08,0x08,0x12,0x03,0x06,0x00, +0x39,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x08,0x00, +0x22,0x0a,0x09,0x0a,0x02,0x08,0x0a,0x12,0x03,0x08, +0x00,0x22,0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04, +0x0a,0x00,0x0f,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00, +0x01,0x12,0x03,0x0a,0x08,0x22,0x0a,0x0b,0x0a,0x04, +0x04,0x00,0x02,0x00,0x12,0x03,0x0b,0x02,0x20,0x0a, 0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x04,0x12,0x03, -0x07,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x00,0x05,0x12,0x03,0x07,0x0b,0x11,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x00,0x01,0x12,0x03,0x07,0x12, +0x0b,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, +0x00,0x05,0x12,0x03,0x0b,0x0b,0x11,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x00,0x01,0x12,0x03,0x0b,0x12, 0x1b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x03, -0x12,0x03,0x07,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x01,0x12,0x03,0x08,0x02,0x1e,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x01,0x04,0x12,0x03,0x08, +0x12,0x03,0x0b,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04, +0x00,0x02,0x01,0x12,0x03,0x0c,0x02,0x1e,0x0a,0x0c, +0x0a,0x05,0x04,0x00,0x02,0x01,0x04,0x12,0x03,0x0c, 0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01, -0x05,0x12,0x03,0x08,0x0b,0x11,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x08,0x12,0x19, +0x05,0x12,0x03,0x0c,0x0b,0x11,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x0c,0x12,0x19, 0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x03,0x12, -0x03,0x08,0x1c,0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x00, -0x02,0x02,0x12,0x03,0x09,0x02,0x20,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x02,0x04,0x12,0x03,0x09,0x02, +0x03,0x0c,0x1c,0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x00, +0x02,0x02,0x12,0x03,0x0d,0x02,0x20,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x02,0x04,0x12,0x03,0x0d,0x02, 0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x05, -0x12,0x03,0x09,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04, -0x00,0x02,0x02,0x01,0x12,0x03,0x09,0x12,0x1b,0x0a, +0x12,0x03,0x0d,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x02,0x01,0x12,0x03,0x0d,0x12,0x1b,0x0a, 0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x03,0x12,0x03, -0x09,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02, -0x03,0x12,0x03,0x0a,0x02,0x1e,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x03,0x04,0x12,0x03,0x0a,0x02,0x0a, +0x0d,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02, +0x03,0x12,0x03,0x0e,0x02,0x1e,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x03,0x04,0x12,0x03,0x0e,0x02,0x0a, 0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03,0x05,0x12, -0x03,0x0a,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x00, -0x02,0x03,0x01,0x12,0x03,0x0a,0x12,0x19,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x03,0x03,0x12,0x03,0x0a, +0x03,0x0e,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x00, +0x02,0x03,0x01,0x12,0x03,0x0e,0x12,0x19,0x0a,0x0c, +0x0a,0x05,0x04,0x00,0x02,0x03,0x03,0x12,0x03,0x0e, 0x1c,0x1d,0x0a,0x0a,0x0a,0x02,0x04,0x01,0x12,0x04, -0x0d,0x00,0x12,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01, -0x01,0x12,0x03,0x0d,0x08,0x24,0x0a,0x0b,0x0a,0x04, -0x04,0x01,0x02,0x00,0x12,0x03,0x0e,0x02,0x20,0x0a, +0x11,0x00,0x16,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01, +0x01,0x12,0x03,0x11,0x08,0x24,0x0a,0x0b,0x0a,0x04, +0x04,0x01,0x02,0x00,0x12,0x03,0x12,0x02,0x20,0x0a, 0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x04,0x12,0x03, -0x0e,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, -0x00,0x05,0x12,0x03,0x0e,0x0b,0x11,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x00,0x01,0x12,0x03,0x0e,0x12, +0x12,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x00,0x05,0x12,0x03,0x12,0x0b,0x11,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x00,0x01,0x12,0x03,0x12,0x12, 0x1b,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x03, -0x12,0x03,0x0e,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04, -0x01,0x02,0x01,0x12,0x03,0x0f,0x02,0x1e,0x0a,0x0c, -0x0a,0x05,0x04,0x01,0x02,0x01,0x04,0x12,0x03,0x0f, +0x12,0x03,0x12,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04, +0x01,0x02,0x01,0x12,0x03,0x13,0x02,0x1e,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x01,0x04,0x12,0x03,0x13, 0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01, -0x05,0x12,0x03,0x0f,0x0b,0x11,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x01,0x01,0x12,0x03,0x0f,0x12,0x19, +0x05,0x12,0x03,0x13,0x0b,0x11,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x01,0x01,0x12,0x03,0x13,0x12,0x19, 0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x03,0x12, -0x03,0x0f,0x1c,0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x02,0x12,0x03,0x10,0x02,0x20,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x02,0x04,0x12,0x03,0x10,0x02, +0x03,0x13,0x1c,0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x01, +0x02,0x02,0x12,0x03,0x14,0x02,0x20,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x02,0x04,0x12,0x03,0x14,0x02, 0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x05, -0x12,0x03,0x10,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x02,0x01,0x12,0x03,0x10,0x12,0x1b,0x0a, +0x12,0x03,0x14,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x02,0x01,0x12,0x03,0x14,0x12,0x1b,0x0a, 0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x03,0x12,0x03, -0x10,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02, -0x03,0x12,0x03,0x11,0x02,0x1e,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x03,0x04,0x12,0x03,0x11,0x02,0x0a, +0x14,0x1e,0x1f,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02, +0x03,0x12,0x03,0x15,0x02,0x1e,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x03,0x04,0x12,0x03,0x15,0x02,0x0a, 0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x05,0x12, -0x03,0x11,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x01, -0x02,0x03,0x01,0x12,0x03,0x11,0x12,0x19,0x0a,0x0c, -0x0a,0x05,0x04,0x01,0x02,0x03,0x03,0x12,0x03,0x11, +0x03,0x15,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x03,0x01,0x12,0x03,0x15,0x12,0x19,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x03,0x03,0x12,0x03,0x15, 0x1c,0x1d,0x62,0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, }; diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/system.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/system.npb.cpp index f9e8537f9e..2e19d181d5 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/system.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/system.npb.cpp @@ -64,86 +64,93 @@ static const uint8_t file_descriptor[] { 0x01,0x28,0x0b,0x32,0x19,0x2e,0x77,0x70,0x69,0x2e, 0x70,0x72,0x6f,0x74,0x6f,0x2e,0x50,0x72,0x6f,0x74, 0x6f,0x62,0x75,0x66,0x4d,0x61,0x74,0x72,0x69,0x78, -0x52,0x01,0x64,0x42,0x17,0x0a,0x15,0x6f,0x72,0x67, +0x52,0x01,0x64,0x42,0x33,0x0a,0x15,0x6f,0x72,0x67, 0x2e,0x77,0x70,0x69,0x6c,0x69,0x62,0x2e,0x6d,0x61, -0x74,0x68,0x2e,0x70,0x72,0x6f,0x74,0x6f,0x4a,0x80, -0x06,0x0a,0x06,0x12,0x04,0x00,0x00,0x18,0x01,0x0a, -0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a, -0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a, -0x09,0x0a,0x02,0x03,0x00,0x12,0x03,0x04,0x00,0x17, -0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x06,0x00,0x2e, -0x0a,0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x06,0x00, -0x2e,0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x08, -0x00,0x0e,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01, -0x12,0x03,0x08,0x08,0x17,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x00,0x12,0x03,0x09,0x02,0x1d,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x09, +0x74,0x68,0x2e,0x70,0x72,0x6f,0x74,0x6f,0x42,0x18, +0x50,0x72,0x6f,0x74,0x6f,0x62,0x75,0x66,0x53,0x79, +0x73,0x74,0x65,0x6d,0x44,0x65,0x73,0x63,0x72,0x69, +0x70,0x74,0x6f,0x72,0x50,0x01,0x4a,0xaa,0x06,0x0a, +0x06,0x12,0x04,0x00,0x00,0x1c,0x01,0x0a,0x08,0x0a, +0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a, +0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a,0x09,0x0a, +0x02,0x03,0x00,0x12,0x03,0x04,0x00,0x17,0x0a,0x08, +0x0a,0x01,0x08,0x12,0x03,0x06,0x00,0x2e,0x0a,0x09, +0x0a,0x02,0x08,0x01,0x12,0x03,0x06,0x00,0x2e,0x0a, +0x08,0x0a,0x01,0x08,0x12,0x03,0x08,0x00,0x39,0x0a, +0x09,0x0a,0x02,0x08,0x08,0x12,0x03,0x08,0x00,0x39, +0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x0a,0x00,0x22, +0x0a,0x09,0x0a,0x02,0x08,0x0a,0x12,0x03,0x0a,0x00, +0x22,0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x0c, +0x00,0x12,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01, +0x12,0x03,0x0c,0x08,0x17,0x0a,0x0b,0x0a,0x04,0x04, +0x00,0x02,0x00,0x12,0x03,0x0d,0x02,0x1d,0x0a,0x0c, +0x0a,0x05,0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x0d, 0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00, -0x01,0x12,0x03,0x09,0x09,0x18,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x00,0x03,0x12,0x03,0x09,0x1b,0x1c, +0x01,0x12,0x03,0x0d,0x09,0x18,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x00,0x03,0x12,0x03,0x0d,0x1b,0x1c, 0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x01,0x12,0x03, -0x0a,0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x01,0x05,0x12,0x03,0x0a,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x0a,0x09, +0x0e,0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, +0x01,0x05,0x12,0x03,0x0e,0x02,0x08,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x0e,0x09, 0x15,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x03, -0x12,0x03,0x0a,0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x02,0x12,0x03,0x0b,0x02,0x1b,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x02,0x05,0x12,0x03,0x0b, +0x12,0x03,0x0e,0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04, +0x00,0x02,0x02,0x12,0x03,0x0f,0x02,0x1b,0x0a,0x0c, +0x0a,0x05,0x04,0x00,0x02,0x02,0x05,0x12,0x03,0x0f, 0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02, -0x01,0x12,0x03,0x0b,0x09,0x16,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x02,0x03,0x12,0x03,0x0b,0x19,0x1a, +0x01,0x12,0x03,0x0f,0x09,0x16,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x02,0x03,0x12,0x03,0x0f,0x19,0x1a, 0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x03,0x12,0x03, -0x0c,0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x03,0x05,0x12,0x03,0x0c,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x03,0x01,0x12,0x03,0x0c,0x09, +0x10,0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, +0x03,0x05,0x12,0x03,0x10,0x02,0x08,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x03,0x01,0x12,0x03,0x10,0x09, 0x15,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03,0x03, -0x12,0x03,0x0c,0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x04,0x12,0x03,0x0d,0x02,0x18,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x04,0x05,0x12,0x03,0x0d, +0x12,0x03,0x10,0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04, +0x00,0x02,0x04,0x12,0x03,0x11,0x02,0x18,0x0a,0x0c, +0x0a,0x05,0x04,0x00,0x02,0x04,0x05,0x12,0x03,0x11, 0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x04, -0x01,0x12,0x03,0x0d,0x09,0x13,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x04,0x03,0x12,0x03,0x0d,0x16,0x17, -0x0a,0x0a,0x0a,0x02,0x04,0x01,0x12,0x04,0x10,0x00, -0x18,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12, -0x03,0x10,0x08,0x1c,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x00,0x12,0x03,0x11,0x02,0x18,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x00,0x05,0x12,0x03,0x11,0x02, +0x01,0x12,0x03,0x11,0x09,0x13,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x04,0x03,0x12,0x03,0x11,0x16,0x17, +0x0a,0x0a,0x0a,0x02,0x04,0x01,0x12,0x04,0x14,0x00, +0x1c,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12, +0x03,0x14,0x08,0x1c,0x0a,0x0b,0x0a,0x04,0x04,0x01, +0x02,0x00,0x12,0x03,0x15,0x02,0x18,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x00,0x05,0x12,0x03,0x15,0x02, 0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01, -0x12,0x03,0x11,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x00,0x03,0x12,0x03,0x11,0x16,0x17,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x01,0x12,0x03,0x12, +0x12,0x03,0x15,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x00,0x03,0x12,0x03,0x15,0x16,0x17,0x0a, +0x0b,0x0a,0x04,0x04,0x01,0x02,0x01,0x12,0x03,0x16, 0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01, -0x05,0x12,0x03,0x12,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x01,0x01,0x12,0x03,0x12,0x09,0x13, +0x05,0x12,0x03,0x16,0x02,0x08,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x01,0x01,0x12,0x03,0x16,0x09,0x13, 0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x03,0x12, -0x03,0x12,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x02,0x12,0x03,0x13,0x02,0x19,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x02,0x05,0x12,0x03,0x13,0x02, +0x03,0x16,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01, +0x02,0x02,0x12,0x03,0x17,0x02,0x19,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x02,0x05,0x12,0x03,0x17,0x02, 0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x01, -0x12,0x03,0x13,0x09,0x14,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x02,0x03,0x12,0x03,0x13,0x17,0x18,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x03,0x12,0x03,0x14, +0x12,0x03,0x17,0x09,0x14,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x02,0x03,0x12,0x03,0x17,0x17,0x18,0x0a, +0x0b,0x0a,0x04,0x04,0x01,0x02,0x03,0x12,0x03,0x18, 0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03, -0x06,0x12,0x03,0x14,0x02,0x10,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x03,0x01,0x12,0x03,0x14,0x11,0x12, +0x06,0x12,0x03,0x18,0x02,0x10,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x03,0x01,0x12,0x03,0x18,0x11,0x12, 0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x03,0x12, -0x03,0x14,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x04,0x12,0x03,0x15,0x02,0x17,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x04,0x06,0x12,0x03,0x15,0x02, +0x03,0x18,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01, +0x02,0x04,0x12,0x03,0x19,0x02,0x17,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x04,0x06,0x12,0x03,0x19,0x02, 0x10,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x04,0x01, -0x12,0x03,0x15,0x11,0x12,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x04,0x03,0x12,0x03,0x15,0x15,0x16,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x05,0x12,0x03,0x16, +0x12,0x03,0x19,0x11,0x12,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x04,0x03,0x12,0x03,0x19,0x15,0x16,0x0a, +0x0b,0x0a,0x04,0x04,0x01,0x02,0x05,0x12,0x03,0x1a, 0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x05, -0x06,0x12,0x03,0x16,0x02,0x10,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x05,0x01,0x12,0x03,0x16,0x11,0x12, +0x06,0x12,0x03,0x1a,0x02,0x10,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x05,0x01,0x12,0x03,0x1a,0x11,0x12, 0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x05,0x03,0x12, -0x03,0x16,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x06,0x12,0x03,0x17,0x02,0x17,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x06,0x06,0x12,0x03,0x17,0x02, +0x03,0x1a,0x15,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01, +0x02,0x06,0x12,0x03,0x1b,0x02,0x17,0x0a,0x0c,0x0a, +0x05,0x04,0x01,0x02,0x06,0x06,0x12,0x03,0x1b,0x02, 0x10,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x06,0x01, -0x12,0x03,0x17,0x11,0x12,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x06,0x03,0x12,0x03,0x17,0x15,0x16,0x62, +0x12,0x03,0x1b,0x11,0x12,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x06,0x03,0x12,0x03,0x1b,0x15,0x16,0x62, 0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, }; static const char file_name[] = "system.proto"; diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/trajectory.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/trajectory.npb.cpp index 15a1bb65df..3cce54a32f 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/trajectory.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/trajectory.npb.cpp @@ -43,56 +43,64 @@ static const uint8_t file_descriptor[] { 0x2e,0x70,0x72,0x6f,0x74,0x6f,0x2e,0x50,0x72,0x6f, 0x74,0x6f,0x62,0x75,0x66,0x54,0x72,0x61,0x6a,0x65, 0x63,0x74,0x6f,0x72,0x79,0x53,0x74,0x61,0x74,0x65, -0x52,0x06,0x73,0x74,0x61,0x74,0x65,0x73,0x42,0x17, +0x52,0x06,0x73,0x74,0x61,0x74,0x65,0x73,0x42,0x37, 0x0a,0x15,0x6f,0x72,0x67,0x2e,0x77,0x70,0x69,0x6c, 0x69,0x62,0x2e,0x6d,0x61,0x74,0x68,0x2e,0x70,0x72, -0x6f,0x74,0x6f,0x4a,0xc4,0x03,0x0a,0x06,0x12,0x04, -0x00,0x00,0x12,0x01,0x0a,0x08,0x0a,0x01,0x0c,0x12, -0x03,0x00,0x00,0x12,0x0a,0x08,0x0a,0x01,0x02,0x12, -0x03,0x02,0x00,0x12,0x0a,0x09,0x0a,0x02,0x03,0x00, -0x12,0x03,0x04,0x00,0x1a,0x0a,0x08,0x0a,0x01,0x08, -0x12,0x03,0x06,0x00,0x2e,0x0a,0x09,0x0a,0x02,0x08, -0x01,0x12,0x03,0x06,0x00,0x2e,0x0a,0x0a,0x0a,0x02, -0x04,0x00,0x12,0x04,0x08,0x00,0x0e,0x01,0x0a,0x0a, -0x0a,0x03,0x04,0x00,0x01,0x12,0x03,0x08,0x08,0x1f, -0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x00,0x12,0x03, -0x09,0x02,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x00,0x05,0x12,0x03,0x09,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x00,0x01,0x12,0x03,0x09,0x09, -0x0d,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x03, -0x12,0x03,0x09,0x10,0x11,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x01,0x12,0x03,0x0a,0x02,0x16,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x01,0x05,0x12,0x03,0x0a, -0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01, -0x01,0x12,0x03,0x0a,0x09,0x11,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x01,0x03,0x12,0x03,0x0a,0x14,0x15, -0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x02,0x12,0x03, -0x0b,0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x02,0x05,0x12,0x03,0x0b,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x02,0x01,0x12,0x03,0x0b,0x09, -0x15,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x03, -0x12,0x03,0x0b,0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04, -0x00,0x02,0x03,0x12,0x03,0x0c,0x02,0x1a,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x03,0x06,0x12,0x03,0x0c, -0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03, -0x01,0x12,0x03,0x0c,0x11,0x15,0x0a,0x0c,0x0a,0x05, -0x04,0x00,0x02,0x03,0x03,0x12,0x03,0x0c,0x18,0x19, -0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x04,0x12,0x03, -0x0d,0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x04,0x05,0x12,0x03,0x0d,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x04,0x01,0x12,0x03,0x0d,0x09, -0x12,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x04,0x03, -0x12,0x03,0x0d,0x15,0x16,0x0a,0x0a,0x0a,0x02,0x04, -0x01,0x12,0x04,0x10,0x00,0x12,0x01,0x0a,0x0a,0x0a, -0x03,0x04,0x01,0x01,0x12,0x03,0x10,0x08,0x1a,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x00,0x12,0x03,0x11, -0x02,0x2e,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00, -0x04,0x12,0x03,0x11,0x02,0x0a,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x00,0x06,0x12,0x03,0x11,0x0b,0x22, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01,0x12, -0x03,0x11,0x23,0x29,0x0a,0x0c,0x0a,0x05,0x04,0x01, -0x02,0x00,0x03,0x12,0x03,0x11,0x2c,0x2d,0x62,0x06, -0x70,0x72,0x6f,0x74,0x6f,0x33, +0x6f,0x74,0x6f,0x42,0x1c,0x50,0x72,0x6f,0x74,0x6f, +0x62,0x75,0x66,0x54,0x72,0x61,0x6a,0x65,0x63,0x74, +0x6f,0x72,0x79,0x44,0x65,0x73,0x63,0x72,0x69,0x70, +0x74,0x6f,0x72,0x50,0x01,0x4a,0xee,0x03,0x0a,0x06, +0x12,0x04,0x00,0x00,0x16,0x01,0x0a,0x08,0x0a,0x01, +0x0c,0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a,0x01, +0x02,0x12,0x03,0x02,0x00,0x12,0x0a,0x09,0x0a,0x02, +0x03,0x00,0x12,0x03,0x04,0x00,0x1a,0x0a,0x08,0x0a, +0x01,0x08,0x12,0x03,0x06,0x00,0x2e,0x0a,0x09,0x0a, +0x02,0x08,0x01,0x12,0x03,0x06,0x00,0x2e,0x0a,0x08, +0x0a,0x01,0x08,0x12,0x03,0x08,0x00,0x3d,0x0a,0x09, +0x0a,0x02,0x08,0x08,0x12,0x03,0x08,0x00,0x3d,0x0a, +0x08,0x0a,0x01,0x08,0x12,0x03,0x0a,0x00,0x22,0x0a, +0x09,0x0a,0x02,0x08,0x0a,0x12,0x03,0x0a,0x00,0x22, +0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x0c,0x00, +0x12,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01,0x12, +0x03,0x0c,0x08,0x1f,0x0a,0x0b,0x0a,0x04,0x04,0x00, +0x02,0x00,0x12,0x03,0x0d,0x02,0x12,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x0d,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x01, +0x12,0x03,0x0d,0x09,0x0d,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x00,0x03,0x12,0x03,0x0d,0x10,0x11,0x0a, +0x0b,0x0a,0x04,0x04,0x00,0x02,0x01,0x12,0x03,0x0e, +0x02,0x16,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01, +0x05,0x12,0x03,0x0e,0x02,0x08,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x01,0x01,0x12,0x03,0x0e,0x09,0x11, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x03,0x12, +0x03,0x0e,0x14,0x15,0x0a,0x0b,0x0a,0x04,0x04,0x00, +0x02,0x02,0x12,0x03,0x0f,0x02,0x1a,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x02,0x05,0x12,0x03,0x0f,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x01, +0x12,0x03,0x0f,0x09,0x15,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x02,0x03,0x12,0x03,0x0f,0x18,0x19,0x0a, +0x0b,0x0a,0x04,0x04,0x00,0x02,0x03,0x12,0x03,0x10, +0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03, +0x06,0x12,0x03,0x10,0x02,0x10,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x03,0x01,0x12,0x03,0x10,0x11,0x15, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x03,0x03,0x12, +0x03,0x10,0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04,0x00, +0x02,0x04,0x12,0x03,0x11,0x02,0x17,0x0a,0x0c,0x0a, +0x05,0x04,0x00,0x02,0x04,0x05,0x12,0x03,0x11,0x02, +0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x04,0x01, +0x12,0x03,0x11,0x09,0x12,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x04,0x03,0x12,0x03,0x11,0x15,0x16,0x0a, +0x0a,0x0a,0x02,0x04,0x01,0x12,0x04,0x14,0x00,0x16, +0x01,0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12,0x03, +0x14,0x08,0x1a,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02, +0x00,0x12,0x03,0x15,0x02,0x2e,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x00,0x04,0x12,0x03,0x15,0x02,0x0a, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x06,0x12, +0x03,0x15,0x0b,0x22,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x00,0x01,0x12,0x03,0x15,0x23,0x29,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x00,0x03,0x12,0x03,0x15, +0x2c,0x2d,0x62,0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, + }; static const char file_name[] = "trajectory.proto"; static const char wpi_proto_ProtobufTrajectoryState_name[] = "wpi.proto.ProtobufTrajectoryState"; diff --git a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/wpimath.npb.cpp b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/wpimath.npb.cpp index 348eca1fc0..28aed8c754 100644 --- a/wpimath/src/generated/main/native/cpp/wpimath/protobuf/wpimath.npb.cpp +++ b/wpimath/src/generated/main/native/cpp/wpimath/protobuf/wpimath.npb.cpp @@ -27,45 +27,52 @@ static const uint8_t file_descriptor[] { 0x0a,0x0e,0x50,0x72,0x6f,0x74,0x6f,0x62,0x75,0x66, 0x56,0x65,0x63,0x74,0x6f,0x72,0x12,0x12,0x0a,0x04, 0x72,0x6f,0x77,0x73,0x18,0x01,0x20,0x03,0x28,0x01, -0x52,0x04,0x72,0x6f,0x77,0x73,0x42,0x17,0x0a,0x15, +0x52,0x04,0x72,0x6f,0x77,0x73,0x42,0x34,0x0a,0x15, 0x6f,0x72,0x67,0x2e,0x77,0x70,0x69,0x6c,0x69,0x62, 0x2e,0x6d,0x61,0x74,0x68,0x2e,0x70,0x72,0x6f,0x74, -0x6f,0x4a,0xd9,0x02,0x0a,0x06,0x12,0x04,0x00,0x00, -0x0e,0x01,0x0a,0x08,0x0a,0x01,0x0c,0x12,0x03,0x00, -0x00,0x12,0x0a,0x08,0x0a,0x01,0x02,0x12,0x03,0x02, -0x00,0x12,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x04, -0x00,0x2e,0x0a,0x09,0x0a,0x02,0x08,0x01,0x12,0x03, -0x04,0x00,0x2e,0x0a,0x0a,0x0a,0x02,0x04,0x00,0x12, -0x04,0x06,0x00,0x0a,0x01,0x0a,0x0a,0x0a,0x03,0x04, -0x00,0x01,0x12,0x03,0x06,0x08,0x16,0x0a,0x0b,0x0a, -0x04,0x04,0x00,0x02,0x00,0x12,0x03,0x07,0x02,0x16, -0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x05,0x12, -0x03,0x07,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x00, -0x02,0x00,0x01,0x12,0x03,0x07,0x09,0x11,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x00,0x03,0x12,0x03,0x07, -0x14,0x15,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x01, -0x12,0x03,0x08,0x02,0x16,0x0a,0x0c,0x0a,0x05,0x04, -0x00,0x02,0x01,0x05,0x12,0x03,0x08,0x02,0x08,0x0a, -0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x01,0x12,0x03, -0x08,0x09,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x01,0x03,0x12,0x03,0x08,0x14,0x15,0x0a,0x0b,0x0a, -0x04,0x04,0x00,0x02,0x02,0x12,0x03,0x09,0x02,0x1b, -0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x04,0x12, -0x03,0x09,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x00, -0x02,0x02,0x05,0x12,0x03,0x09,0x0b,0x11,0x0a,0x0c, -0x0a,0x05,0x04,0x00,0x02,0x02,0x01,0x12,0x03,0x09, -0x12,0x16,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02, -0x03,0x12,0x03,0x09,0x19,0x1a,0x0a,0x0a,0x0a,0x02, -0x04,0x01,0x12,0x04,0x0c,0x00,0x0e,0x01,0x0a,0x0a, -0x0a,0x03,0x04,0x01,0x01,0x12,0x03,0x0c,0x08,0x16, -0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x00,0x12,0x03, -0x0d,0x02,0x1b,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, -0x00,0x04,0x12,0x03,0x0d,0x02,0x0a,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x00,0x05,0x12,0x03,0x0d,0x0b, -0x11,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01, -0x12,0x03,0x0d,0x12,0x16,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x00,0x03,0x12,0x03,0x0d,0x19,0x1a,0x62, -0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, +0x6f,0x42,0x19,0x50,0x72,0x6f,0x74,0x6f,0x62,0x75, +0x66,0x57,0x50,0x49,0x4d,0x61,0x74,0x68,0x44,0x65, +0x73,0x63,0x72,0x69,0x70,0x74,0x6f,0x72,0x50,0x01, +0x4a,0x83,0x03,0x0a,0x06,0x12,0x04,0x00,0x00,0x12, +0x01,0x0a,0x08,0x0a,0x01,0x0c,0x12,0x03,0x00,0x00, +0x12,0x0a,0x08,0x0a,0x01,0x02,0x12,0x03,0x02,0x00, +0x12,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x04,0x00, +0x2e,0x0a,0x09,0x0a,0x02,0x08,0x01,0x12,0x03,0x04, +0x00,0x2e,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03,0x06, +0x00,0x3a,0x0a,0x09,0x0a,0x02,0x08,0x08,0x12,0x03, +0x06,0x00,0x3a,0x0a,0x08,0x0a,0x01,0x08,0x12,0x03, +0x08,0x00,0x22,0x0a,0x09,0x0a,0x02,0x08,0x0a,0x12, +0x03,0x08,0x00,0x22,0x0a,0x0a,0x0a,0x02,0x04,0x00, +0x12,0x04,0x0a,0x00,0x0e,0x01,0x0a,0x0a,0x0a,0x03, +0x04,0x00,0x01,0x12,0x03,0x0a,0x08,0x16,0x0a,0x0b, +0x0a,0x04,0x04,0x00,0x02,0x00,0x12,0x03,0x0b,0x02, +0x16,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x05, +0x12,0x03,0x0b,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x00,0x01,0x12,0x03,0x0b,0x09,0x11,0x0a, +0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x03,0x12,0x03, +0x0b,0x14,0x15,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02, +0x01,0x12,0x03,0x0c,0x02,0x16,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x01,0x05,0x12,0x03,0x0c,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x01,0x01,0x12, +0x03,0x0c,0x09,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x00, +0x02,0x01,0x03,0x12,0x03,0x0c,0x14,0x15,0x0a,0x0b, +0x0a,0x04,0x04,0x00,0x02,0x02,0x12,0x03,0x0d,0x02, +0x1b,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x04, +0x12,0x03,0x0d,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04, +0x00,0x02,0x02,0x05,0x12,0x03,0x0d,0x0b,0x11,0x0a, +0x0c,0x0a,0x05,0x04,0x00,0x02,0x02,0x01,0x12,0x03, +0x0d,0x12,0x16,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, +0x02,0x03,0x12,0x03,0x0d,0x19,0x1a,0x0a,0x0a,0x0a, +0x02,0x04,0x01,0x12,0x04,0x10,0x00,0x12,0x01,0x0a, +0x0a,0x0a,0x03,0x04,0x01,0x01,0x12,0x03,0x10,0x08, +0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x00,0x12, +0x03,0x11,0x02,0x1b,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x00,0x04,0x12,0x03,0x11,0x02,0x0a,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x00,0x05,0x12,0x03,0x11, +0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00, +0x01,0x12,0x03,0x11,0x12,0x16,0x0a,0x0c,0x0a,0x05, +0x04,0x01,0x02,0x00,0x03,0x12,0x03,0x11,0x19,0x1a, +0x62,0x06,0x70,0x72,0x6f,0x74,0x6f,0x33, }; static const char file_name[] = "wpimath.proto"; static const char wpi_proto_ProtobufMatrix_name[] = "wpi.proto.ProtobufMatrix"; diff --git a/wpimath/src/main/java/org/wpilib/math/controller/proto/ArmFeedforwardProto.java b/wpimath/src/main/java/org/wpilib/math/controller/proto/ArmFeedforwardProto.java index e32d3d8e29..bbe3db7cb7 100644 --- a/wpimath/src/main/java/org/wpilib/math/controller/proto/ArmFeedforwardProto.java +++ b/wpimath/src/main/java/org/wpilib/math/controller/proto/ArmFeedforwardProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.controller.proto; import org.wpilib.math.controller.ArmFeedforward; -import org.wpilib.math.proto.Controller.ProtobufArmFeedforward; +import org.wpilib.math.proto.ProtobufArmFeedforward; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProto.java b/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProto.java index 55a1396029..f1a2cfa8e0 100644 --- a/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProto.java +++ b/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.controller.proto; import org.wpilib.math.controller.DifferentialDriveFeedforward; -import org.wpilib.math.proto.Controller.ProtobufDifferentialDriveFeedforward; +import org.wpilib.math.proto.ProtobufDifferentialDriveFeedforward; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProto.java b/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProto.java index cb7cc7ca49..16c538ccc8 100644 --- a/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProto.java +++ b/wpimath/src/main/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.controller.proto; import org.wpilib.math.controller.DifferentialDriveWheelVoltages; -import org.wpilib.math.proto.Controller.ProtobufDifferentialDriveWheelVoltages; +import org.wpilib.math.proto.ProtobufDifferentialDriveWheelVoltages; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProto.java b/wpimath/src/main/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProto.java index 9028e51149..fd3b4985eb 100644 --- a/wpimath/src/main/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProto.java +++ b/wpimath/src/main/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.controller.proto; import org.wpilib.math.controller.ElevatorFeedforward; -import org.wpilib.math.proto.Controller.ProtobufElevatorFeedforward; +import org.wpilib.math.proto.ProtobufElevatorFeedforward; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProto.java b/wpimath/src/main/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProto.java index 54879e5d32..330a51484c 100644 --- a/wpimath/src/main/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProto.java +++ b/wpimath/src/main/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.controller.proto; import org.wpilib.math.controller.SimpleMotorFeedforward; -import org.wpilib.math.proto.Controller.ProtobufSimpleMotorFeedforward; +import org.wpilib.math.proto.ProtobufSimpleMotorFeedforward; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Ellipse2dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Ellipse2dProto.java index 5a0d2db26d..c23bca7ca2 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Ellipse2dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Ellipse2dProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Ellipse2d; import org.wpilib.math.geometry.Pose2d; -import org.wpilib.math.proto.Geometry2D.ProtobufEllipse2d; +import org.wpilib.math.proto.ProtobufEllipse2d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose2dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose2dProto.java index fa38663e8f..426ce1c698 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose2dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose2dProto.java @@ -7,7 +7,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Pose2d; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufPose2d; +import org.wpilib.math.proto.ProtobufPose2d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose3dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose3dProto.java index 107fabea2c..3f8e3d66f2 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose3dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Pose3dProto.java @@ -7,7 +7,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Pose3d; import org.wpilib.math.geometry.Rotation3d; import org.wpilib.math.geometry.Translation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufPose3d; +import org.wpilib.math.proto.ProtobufPose3d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/QuaternionProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/QuaternionProto.java index 7a6e848216..3690fa310f 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/QuaternionProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/QuaternionProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Quaternion; -import org.wpilib.math.proto.Geometry3D.ProtobufQuaternion; +import org.wpilib.math.proto.ProtobufQuaternion; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rectangle2dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rectangle2dProto.java index 5a8aed7a54..00d35ab358 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rectangle2dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rectangle2dProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Pose2d; import org.wpilib.math.geometry.Rectangle2d; -import org.wpilib.math.proto.Geometry2D.ProtobufRectangle2d; +import org.wpilib.math.proto.ProtobufRectangle2d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation2dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation2dProto.java index d672879406..77f59d6bca 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation2dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation2dProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Rotation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufRotation2d; +import org.wpilib.math.proto.ProtobufRotation2d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation3dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation3dProto.java index 20ec4fe755..79bab53193 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation3dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Rotation3dProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Quaternion; import org.wpilib.math.geometry.Rotation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufRotation3d; +import org.wpilib.math.proto.ProtobufRotation3d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform2dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform2dProto.java index 17da5b4be4..0c95440ca5 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform2dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform2dProto.java @@ -7,7 +7,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.geometry.Transform2d; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufTransform2d; +import org.wpilib.math.proto.ProtobufTransform2d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform3dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform3dProto.java index 54d9b263bd..4fa09e5b18 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform3dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Transform3dProto.java @@ -7,7 +7,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Rotation3d; import org.wpilib.math.geometry.Transform3d; import org.wpilib.math.geometry.Translation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufTransform3d; +import org.wpilib.math.proto.ProtobufTransform3d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation2dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation2dProto.java index e4941868a4..69bb4ee6f6 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation2dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation2dProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufTranslation2d; +import org.wpilib.math.proto.ProtobufTranslation2d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation3dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation3dProto.java index 8fcdb0ec1c..d14e4af340 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation3dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Translation3dProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Translation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufTranslation3d; +import org.wpilib.math.proto.ProtobufTranslation3d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist2dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist2dProto.java index 5ab5b66812..613c34f6cb 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist2dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist2dProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Twist2d; -import org.wpilib.math.proto.Geometry2D.ProtobufTwist2d; +import org.wpilib.math.proto.ProtobufTwist2d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist3dProto.java b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist3dProto.java index 8193821d36..7d47af42f8 100644 --- a/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist3dProto.java +++ b/wpimath/src/main/java/org/wpilib/math/geometry/proto/Twist3dProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.geometry.proto; import org.wpilib.math.geometry.Twist3d; -import org.wpilib.math.proto.Geometry3D.ProtobufTwist3d; +import org.wpilib.math.proto.ProtobufTwist3d; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisAccelerationsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisAccelerationsProto.java index 0a33c7688a..22a26be3a1 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisAccelerationsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisAccelerationsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.ChassisAccelerations; -import org.wpilib.math.proto.Kinematics.ProtobufChassisAccelerations; +import org.wpilib.math.proto.ProtobufChassisAccelerations; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProto.java index 80c99d43f7..daa73ce119 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.ChassisSpeeds; -import org.wpilib.math.proto.Kinematics.ProtobufChassisSpeeds; +import org.wpilib.math.proto.ProtobufChassisSpeeds; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProto.java index e6cb1d8552..83b7a7f7c3 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.DifferentialDriveKinematics; -import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveKinematics; +import org.wpilib.math.proto.ProtobufDifferentialDriveKinematics; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelAccelerationsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelAccelerationsProto.java index 27103c9d42..79098cae77 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelAccelerationsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelAccelerationsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.DifferentialDriveWheelAccelerations; -import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveWheelAccelerations; +import org.wpilib.math.proto.ProtobufDifferentialDriveWheelAccelerations; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelPositionsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelPositionsProto.java index f27c9dcc2d..f448676219 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelPositionsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelPositionsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.DifferentialDriveWheelPositions; -import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveWheelPositions; +import org.wpilib.math.proto.ProtobufDifferentialDriveWheelPositions; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProto.java index 8fbf754c76..5e1da0b1c5 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.DifferentialDriveWheelSpeeds; -import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveWheelSpeeds; +import org.wpilib.math.proto.ProtobufDifferentialDriveWheelSpeeds; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProto.java index 8feaa81ac4..d1e7dec312 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.geometry.Translation2d; import org.wpilib.math.kinematics.MecanumDriveKinematics; -import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveKinematics; +import org.wpilib.math.proto.ProtobufMecanumDriveKinematics; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelAccelerationsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelAccelerationsProto.java index cecbd2cce3..b0bd26ee4b 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelAccelerationsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelAccelerationsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.MecanumDriveWheelAccelerations; -import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveWheelAccelerations; +import org.wpilib.math.proto.ProtobufMecanumDriveWheelAccelerations; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProto.java index 559b336352..89a20f0b96 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.MecanumDriveWheelPositions; -import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveWheelPositions; +import org.wpilib.math.proto.ProtobufMecanumDriveWheelPositions; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProto.java index e2aa1fca8b..be33451388 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.kinematics.MecanumDriveWheelSpeeds; -import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveWheelSpeeds; +import org.wpilib.math.proto.ProtobufMecanumDriveWheelSpeeds; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProto.java index 33cceb3fc6..f448251524 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.geometry.Translation2d; import org.wpilib.math.kinematics.SwerveDriveKinematics; -import org.wpilib.math.proto.Kinematics.ProtobufSwerveDriveKinematics; +import org.wpilib.math.proto.ProtobufSwerveDriveKinematics; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleAccelerationProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleAccelerationProto.java index 00fa8930da..a9e2a96462 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleAccelerationProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleAccelerationProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.kinematics.SwerveModuleAcceleration; -import org.wpilib.math.proto.Kinematics.ProtobufSwerveModuleAcceleration; +import org.wpilib.math.proto.ProtobufSwerveModuleAcceleration; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProto.java index 06eaeac19b..931ab6f253 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.kinematics.SwerveModulePosition; -import org.wpilib.math.proto.Kinematics.ProtobufSwerveModulePosition; +import org.wpilib.math.proto.ProtobufSwerveModulePosition; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProto.java b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProto.java index bb68b930d7..cf374a980e 100644 --- a/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProto.java +++ b/wpimath/src/main/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.kinematics.proto; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.kinematics.SwerveModuleState; -import org.wpilib.math.proto.Kinematics.ProtobufSwerveModuleState; +import org.wpilib.math.proto.ProtobufSwerveModuleState; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/linalg/proto/MatrixProto.java b/wpimath/src/main/java/org/wpilib/math/linalg/proto/MatrixProto.java index 6d63fcb942..5a3349aa8a 100644 --- a/wpimath/src/main/java/org/wpilib/math/linalg/proto/MatrixProto.java +++ b/wpimath/src/main/java/org/wpilib/math/linalg/proto/MatrixProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.linalg.proto; import org.wpilib.math.linalg.MatBuilder; import org.wpilib.math.linalg.Matrix; -import org.wpilib.math.proto.Wpimath.ProtobufMatrix; +import org.wpilib.math.proto.ProtobufMatrix; import org.wpilib.math.util.Nat; import org.wpilib.math.util.Num; import org.wpilib.util.protobuf.Protobuf; diff --git a/wpimath/src/main/java/org/wpilib/math/linalg/proto/VectorProto.java b/wpimath/src/main/java/org/wpilib/math/linalg/proto/VectorProto.java index 23d0185a2f..b797b4965b 100644 --- a/wpimath/src/main/java/org/wpilib/math/linalg/proto/VectorProto.java +++ b/wpimath/src/main/java/org/wpilib/math/linalg/proto/VectorProto.java @@ -6,7 +6,7 @@ package org.wpilib.math.linalg.proto; import org.ejml.simple.SimpleMatrix; import org.wpilib.math.linalg.Vector; -import org.wpilib.math.proto.Wpimath.ProtobufVector; +import org.wpilib.math.proto.ProtobufVector; import org.wpilib.math.util.Nat; import org.wpilib.math.util.Num; import org.wpilib.util.protobuf.Protobuf; diff --git a/wpimath/src/main/java/org/wpilib/math/spline/proto/CubicHermiteSplineProto.java b/wpimath/src/main/java/org/wpilib/math/spline/proto/CubicHermiteSplineProto.java index 3708571cc0..20d7f3f010 100644 --- a/wpimath/src/main/java/org/wpilib/math/spline/proto/CubicHermiteSplineProto.java +++ b/wpimath/src/main/java/org/wpilib/math/spline/proto/CubicHermiteSplineProto.java @@ -4,7 +4,7 @@ package org.wpilib.math.spline.proto; -import org.wpilib.math.proto.Spline.ProtobufCubicHermiteSpline; +import org.wpilib.math.proto.ProtobufCubicHermiteSpline; import org.wpilib.math.spline.CubicHermiteSpline; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProto.java b/wpimath/src/main/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProto.java index 44c5658705..ccbf05beb0 100644 --- a/wpimath/src/main/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProto.java +++ b/wpimath/src/main/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProto.java @@ -4,7 +4,7 @@ package org.wpilib.math.spline.proto; -import org.wpilib.math.proto.Spline.ProtobufQuinticHermiteSpline; +import org.wpilib.math.proto.ProtobufQuinticHermiteSpline; import org.wpilib.math.spline.QuinticHermiteSpline; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/system/proto/DCMotorProto.java b/wpimath/src/main/java/org/wpilib/math/system/proto/DCMotorProto.java index bd183b7395..19e2ed4d55 100644 --- a/wpimath/src/main/java/org/wpilib/math/system/proto/DCMotorProto.java +++ b/wpimath/src/main/java/org/wpilib/math/system/proto/DCMotorProto.java @@ -4,7 +4,7 @@ package org.wpilib.math.system.proto; -import org.wpilib.math.proto.System.ProtobufDCMotor; +import org.wpilib.math.proto.ProtobufDCMotor; import org.wpilib.math.system.DCMotor; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/system/proto/LinearSystemProto.java b/wpimath/src/main/java/org/wpilib/math/system/proto/LinearSystemProto.java index 019b0427ef..fa970de5c7 100644 --- a/wpimath/src/main/java/org/wpilib/math/system/proto/LinearSystemProto.java +++ b/wpimath/src/main/java/org/wpilib/math/system/proto/LinearSystemProto.java @@ -5,8 +5,8 @@ package org.wpilib.math.system.proto; import org.wpilib.math.linalg.Matrix; -import org.wpilib.math.proto.System.ProtobufLinearSystem; -import org.wpilib.math.proto.Wpimath.ProtobufMatrix; +import org.wpilib.math.proto.ProtobufLinearSystem; +import org.wpilib.math.proto.ProtobufMatrix; import org.wpilib.math.system.LinearSystem; import org.wpilib.math.util.Nat; import org.wpilib.math.util.Num; diff --git a/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryProto.java b/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryProto.java index 6db57493f8..df132f8c04 100644 --- a/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryProto.java +++ b/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryProto.java @@ -5,8 +5,8 @@ package org.wpilib.math.trajectory.proto; import java.util.ArrayList; -import org.wpilib.math.proto.Trajectory.ProtobufTrajectory; -import org.wpilib.math.proto.Trajectory.ProtobufTrajectoryState; +import org.wpilib.math.proto.ProtobufTrajectory; +import org.wpilib.math.proto.ProtobufTrajectoryState; import org.wpilib.math.trajectory.Trajectory; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryStateProto.java b/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryStateProto.java index f21efce3c7..30345db687 100644 --- a/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryStateProto.java +++ b/wpimath/src/main/java/org/wpilib/math/trajectory/proto/TrajectoryStateProto.java @@ -5,7 +5,7 @@ package org.wpilib.math.trajectory.proto; import org.wpilib.math.geometry.Pose2d; -import org.wpilib.math.proto.Trajectory.ProtobufTrajectoryState; +import org.wpilib.math.proto.ProtobufTrajectoryState; import org.wpilib.math.trajectory.Trajectory; import org.wpilib.util.protobuf.Protobuf; import us.hebi.quickbuf.Descriptors.Descriptor; diff --git a/wpimath/src/main/proto/controller.proto b/wpimath/src/main/proto/controller.proto index 3b2bb37578..82373753d5 100644 --- a/wpimath/src/main/proto/controller.proto +++ b/wpimath/src/main/proto/controller.proto @@ -4,6 +4,10 @@ package wpi.proto; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufControllerDescriptor"; + +option java_multiple_files = true; + message ProtobufArmFeedforward { double ks = 1; double kg = 2; diff --git a/wpimath/src/main/proto/geometry2d.proto b/wpimath/src/main/proto/geometry2d.proto index c6d13764a3..b445f533bb 100644 --- a/wpimath/src/main/proto/geometry2d.proto +++ b/wpimath/src/main/proto/geometry2d.proto @@ -4,6 +4,10 @@ package wpi.proto; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufGeometry2dDescriptor"; + +option java_multiple_files = true; + message ProtobufTranslation2d { double x = 1; double y = 2; diff --git a/wpimath/src/main/proto/geometry3d.proto b/wpimath/src/main/proto/geometry3d.proto index 27d256b881..ed81135c89 100644 --- a/wpimath/src/main/proto/geometry3d.proto +++ b/wpimath/src/main/proto/geometry3d.proto @@ -4,6 +4,10 @@ package wpi.proto; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufGeometry3dDescriptor"; + +option java_multiple_files = true; + message ProtobufTranslation3d { double x = 1; double y = 2; diff --git a/wpimath/src/main/proto/kinematics.proto b/wpimath/src/main/proto/kinematics.proto index 5e5e20527c..a438f39c39 100644 --- a/wpimath/src/main/proto/kinematics.proto +++ b/wpimath/src/main/proto/kinematics.proto @@ -6,6 +6,10 @@ import "geometry2d.proto"; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufKinematicsDescriptor"; + +option java_multiple_files = true; + message ProtobufChassisSpeeds { double vx = 1; double vy = 2; diff --git a/wpimath/src/main/proto/spline.proto b/wpimath/src/main/proto/spline.proto index b7b173a058..4523570788 100644 --- a/wpimath/src/main/proto/spline.proto +++ b/wpimath/src/main/proto/spline.proto @@ -4,6 +4,10 @@ package wpi.proto; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufSplineDescriptor"; + +option java_multiple_files = true; + message ProtobufCubicHermiteSpline { repeated double x_initial = 1; repeated double x_final = 2; diff --git a/wpimath/src/main/proto/system.proto b/wpimath/src/main/proto/system.proto index a28ba936a4..001b7f27b3 100644 --- a/wpimath/src/main/proto/system.proto +++ b/wpimath/src/main/proto/system.proto @@ -6,6 +6,10 @@ import "wpimath.proto"; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufSystemDescriptor"; + +option java_multiple_files = true; + message ProtobufDCMotor { double nominal_voltage = 1; double stall_torque = 2; diff --git a/wpimath/src/main/proto/trajectory.proto b/wpimath/src/main/proto/trajectory.proto index ee8615c4e5..45f97b1b78 100644 --- a/wpimath/src/main/proto/trajectory.proto +++ b/wpimath/src/main/proto/trajectory.proto @@ -6,6 +6,10 @@ import "geometry2d.proto"; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufTrajectoryDescriptor"; + +option java_multiple_files = true; + message ProtobufTrajectoryState { double time = 1; double velocity = 2; diff --git a/wpimath/src/main/proto/wpimath.proto b/wpimath/src/main/proto/wpimath.proto index 3b5a19f4e7..7aa95fcede 100644 --- a/wpimath/src/main/proto/wpimath.proto +++ b/wpimath/src/main/proto/wpimath.proto @@ -4,6 +4,10 @@ package wpi.proto; option java_package = "org.wpilib.math.proto"; +option java_outer_classname = "ProtobufWPIMathDescriptor"; + +option java_multiple_files = true; + message ProtobufMatrix { uint32 num_rows = 1; uint32 num_cols = 2; diff --git a/wpimath/src/test/java/org/wpilib/math/controller/proto/ArmFeedforwardProtoTest.java b/wpimath/src/test/java/org/wpilib/math/controller/proto/ArmFeedforwardProtoTest.java index 2b0b152979..01c8f24d6c 100644 --- a/wpimath/src/test/java/org/wpilib/math/controller/proto/ArmFeedforwardProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/controller/proto/ArmFeedforwardProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.controller.ArmFeedforward; -import org.wpilib.math.proto.Controller.ProtobufArmFeedforward; +import org.wpilib.math.proto.ProtobufArmFeedforward; class ArmFeedforwardProtoTest { private static final ArmFeedforward DATA = new ArmFeedforward(0.174, 0.229, 4.4, 4.4); diff --git a/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProtoTest.java b/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProtoTest.java index 6a7620e03c..a1da6199cb 100644 --- a/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveFeedforwardProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.wpilib.ProtoTestBase; import org.wpilib.math.controller.DifferentialDriveFeedforward; -import org.wpilib.math.proto.Controller.ProtobufDifferentialDriveFeedforward; +import org.wpilib.math.proto.ProtobufDifferentialDriveFeedforward; @SuppressWarnings("PMD.TestClassWithoutTestCases") class DifferentialDriveFeedforwardProtoTest diff --git a/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProtoTest.java b/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProtoTest.java index 5759da6156..8432959c4b 100644 --- a/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/controller/proto/DifferentialDriveWheelVoltagesProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.controller.DifferentialDriveWheelVoltages; -import org.wpilib.math.proto.Controller.ProtobufDifferentialDriveWheelVoltages; +import org.wpilib.math.proto.ProtobufDifferentialDriveWheelVoltages; class DifferentialDriveWheelVoltagesProtoTest { private static final DifferentialDriveWheelVoltages DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProtoTest.java b/wpimath/src/test/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProtoTest.java index 1e2bc3c0bf..89f5ba5c48 100644 --- a/wpimath/src/test/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/controller/proto/ElevatorFeedforwardProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.controller.ElevatorFeedforward; -import org.wpilib.math.proto.Controller.ProtobufElevatorFeedforward; +import org.wpilib.math.proto.ProtobufElevatorFeedforward; class ElevatorFeedforwardProtoTest { private static final ElevatorFeedforward DATA = new ElevatorFeedforward(1.91, 1.1, 1.1, 0.229); diff --git a/wpimath/src/test/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProtoTest.java b/wpimath/src/test/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProtoTest.java index 6920131766..7781f61f27 100644 --- a/wpimath/src/test/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/controller/proto/SimpleMotorFeedforwardProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.wpilib.ProtoTestBase; import org.wpilib.math.controller.SimpleMotorFeedforward; -import org.wpilib.math.proto.Controller.ProtobufSimpleMotorFeedforward; +import org.wpilib.math.proto.ProtobufSimpleMotorFeedforward; @SuppressWarnings("PMD.TestClassWithoutTestCases") class SimpleMotorFeedforwardProtoTest diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Ellipse2dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Ellipse2dProtoTest.java index b4b0378404..1376ec6cb8 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Ellipse2dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Ellipse2dProtoTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Ellipse2d; import org.wpilib.math.geometry.Pose2d; import org.wpilib.math.geometry.Rotation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufEllipse2d; +import org.wpilib.math.proto.ProtobufEllipse2d; class Ellipse2dProtoTest { private static final Ellipse2d DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose2dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose2dProtoTest.java index 5e800f2c8e..eedbd983d9 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose2dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose2dProtoTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Pose2d; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufPose2d; +import org.wpilib.math.proto.ProtobufPose2d; class Pose2dProtoTest { private static final Pose2d DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose3dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose3dProtoTest.java index 56d00d9930..70c512bbd5 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose3dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Pose3dProtoTest.java @@ -11,7 +11,7 @@ import org.wpilib.math.geometry.Pose3d; import org.wpilib.math.geometry.Quaternion; import org.wpilib.math.geometry.Rotation3d; import org.wpilib.math.geometry.Translation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufPose3d; +import org.wpilib.math.proto.ProtobufPose3d; class Pose3dProtoTest { private static final Pose3d DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/QuaternionProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/QuaternionProtoTest.java index 161d5bfe7b..15cafbb166 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/QuaternionProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/QuaternionProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Quaternion; -import org.wpilib.math.proto.Geometry3D.ProtobufQuaternion; +import org.wpilib.math.proto.ProtobufQuaternion; class QuaternionProtoTest { private static final Quaternion DATA = new Quaternion(1.1, 0.191, 35.04, 19.1); diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rectangle2dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rectangle2dProtoTest.java index 6ad6069be5..246f1b6593 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rectangle2dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rectangle2dProtoTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Pose2d; import org.wpilib.math.geometry.Rectangle2d; import org.wpilib.math.geometry.Rotation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufRectangle2d; +import org.wpilib.math.proto.ProtobufRectangle2d; class Rectangle2dProtoTest { private static final Rectangle2d DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation2dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation2dProtoTest.java index 609011afbb..60d558af4d 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation2dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation2dProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Rotation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufRotation2d; +import org.wpilib.math.proto.ProtobufRotation2d; class Rotation2dProtoTest { private static final Rotation2d DATA = new Rotation2d(1.91); diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation3dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation3dProtoTest.java index 640c4c4e25..2d91f438a7 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation3dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Rotation3dProtoTest.java @@ -9,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Quaternion; import org.wpilib.math.geometry.Rotation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufRotation3d; +import org.wpilib.math.proto.ProtobufRotation3d; class Rotation3dProtoTest { private static final Rotation3d DATA = new Rotation3d(new Quaternion(2.29, 0.191, 0.191, 17.4)); diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform2dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform2dProtoTest.java index cbee91d157..742b549930 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform2dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform2dProtoTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.geometry.Transform2d; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufTransform2d; +import org.wpilib.math.proto.ProtobufTransform2d; class Transform2dProtoTest { private static final Transform2d DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform3dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform3dProtoTest.java index 1b3ac8ab13..b38f37d832 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform3dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Transform3dProtoTest.java @@ -11,7 +11,7 @@ import org.wpilib.math.geometry.Quaternion; import org.wpilib.math.geometry.Rotation3d; import org.wpilib.math.geometry.Transform3d; import org.wpilib.math.geometry.Translation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufTransform3d; +import org.wpilib.math.proto.ProtobufTransform3d; class Transform3dProtoTest { private static final Transform3d DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation2dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation2dProtoTest.java index 31a79997a3..f55e2e530e 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation2dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation2dProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Geometry2D.ProtobufTranslation2d; +import org.wpilib.math.proto.ProtobufTranslation2d; class Translation2dProtoTest { private static final Translation2d DATA = new Translation2d(3.504, 22.9); diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation3dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation3dProtoTest.java index 2dc7cb20c6..57578f125a 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation3dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Translation3dProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Translation3d; -import org.wpilib.math.proto.Geometry3D.ProtobufTranslation3d; +import org.wpilib.math.proto.ProtobufTranslation3d; class Translation3dProtoTest { private static final Translation3d DATA = new Translation3d(35.04, 22.9, 3.504); diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist2dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist2dProtoTest.java index 50a91c0ec9..aa1b208cb1 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist2dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist2dProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Twist2d; -import org.wpilib.math.proto.Geometry2D.ProtobufTwist2d; +import org.wpilib.math.proto.ProtobufTwist2d; class Twist2dProtoTest { private static final Twist2d DATA = new Twist2d(2.29, 35.04, 35.04); diff --git a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist3dProtoTest.java b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist3dProtoTest.java index 95f7474c43..a525f6cf68 100644 --- a/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist3dProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/geometry/proto/Twist3dProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Twist3d; -import org.wpilib.math.proto.Geometry3D.ProtobufTwist3d; +import org.wpilib.math.proto.ProtobufTwist3d; class Twist3dProtoTest { private static final Twist3d DATA = new Twist3d(1.1, 2.29, 35.04, 0.174, 19.1, 4.4); diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProtoTest.java index 6cdd068bad..5dc5d19f15 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/ChassisSpeedsProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.kinematics.ChassisSpeeds; -import org.wpilib.math.proto.Kinematics.ProtobufChassisSpeeds; +import org.wpilib.math.proto.ProtobufChassisSpeeds; class ChassisSpeedsProtoTest { private static final ChassisSpeeds DATA = new ChassisSpeeds(2.29, 2.2, 0.3504); diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProtoTest.java index b359af684c..2745c7911f 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveKinematicsProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.kinematics.DifferentialDriveKinematics; -import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveKinematics; +import org.wpilib.math.proto.ProtobufDifferentialDriveKinematics; class DifferentialDriveKinematicsProtoTest { private static final DifferentialDriveKinematics DATA = new DifferentialDriveKinematics(1.74); diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProtoTest.java index d281e324a1..bdff316030 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/DifferentialDriveWheelSpeedsProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.kinematics.DifferentialDriveWheelSpeeds; -import org.wpilib.math.proto.Kinematics.ProtobufDifferentialDriveWheelSpeeds; +import org.wpilib.math.proto.ProtobufDifferentialDriveWheelSpeeds; class DifferentialDriveWheelSpeedsProtoTest { private static final DifferentialDriveWheelSpeeds DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProtoTest.java index 0d11918ffa..6513da81fb 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveKinematicsProtoTest.java @@ -9,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Translation2d; import org.wpilib.math.kinematics.MecanumDriveKinematics; -import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveKinematics; +import org.wpilib.math.proto.ProtobufMecanumDriveKinematics; class MecanumDriveKinematicsProtoTest { private static final MecanumDriveKinematics DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProtoTest.java index 9342bae23b..45475ab9fb 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelPositionsProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.kinematics.MecanumDriveWheelPositions; -import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveWheelPositions; +import org.wpilib.math.proto.ProtobufMecanumDriveWheelPositions; class MecanumDriveWheelPositionsProtoTest { private static final MecanumDriveWheelPositions DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProtoTest.java index 958338e74f..9b04614e43 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/MecanumDriveWheelSpeedsProtoTest.java @@ -8,7 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.kinematics.MecanumDriveWheelSpeeds; -import org.wpilib.math.proto.Kinematics.ProtobufMecanumDriveWheelSpeeds; +import org.wpilib.math.proto.ProtobufMecanumDriveWheelSpeeds; class MecanumDriveWheelSpeedsProtoTest { private static final MecanumDriveWheelSpeeds DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProtoTest.java index ce8485598a..174c224739 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveDriveKinematicsProtoTest.java @@ -9,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertArrayEquals; import org.wpilib.ProtoTestBase; import org.wpilib.math.geometry.Translation2d; import org.wpilib.math.kinematics.SwerveDriveKinematics; -import org.wpilib.math.proto.Kinematics.ProtobufSwerveDriveKinematics; +import org.wpilib.math.proto.ProtobufSwerveDriveKinematics; @SuppressWarnings("PMD.TestClassWithoutTestCases") class SwerveDriveKinematicsProtoTest diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProtoTest.java index ef348817e0..8ddbe37bb0 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModulePositionProtoTest.java @@ -9,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.kinematics.SwerveModulePosition; -import org.wpilib.math.proto.Kinematics.ProtobufSwerveModulePosition; +import org.wpilib.math.proto.ProtobufSwerveModulePosition; class SwerveModulePositionProtoTest { private static final SwerveModulePosition DATA = diff --git a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProtoTest.java b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProtoTest.java index b0fa3acda5..f87687c747 100644 --- a/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/kinematics/proto/SwerveModuleStateProtoTest.java @@ -9,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.kinematics.SwerveModuleState; -import org.wpilib.math.proto.Kinematics.ProtobufSwerveModuleState; +import org.wpilib.math.proto.ProtobufSwerveModuleState; class SwerveModuleStateProtoTest { private static final SwerveModuleState DATA = new SwerveModuleState(22.9, new Rotation2d(3.3)); diff --git a/wpimath/src/test/java/org/wpilib/math/linalg/proto/MatrixProtoTest.java b/wpimath/src/test/java/org/wpilib/math/linalg/proto/MatrixProtoTest.java index d9b73c8618..862691f05c 100644 --- a/wpimath/src/test/java/org/wpilib/math/linalg/proto/MatrixProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/linalg/proto/MatrixProtoTest.java @@ -11,7 +11,7 @@ import org.wpilib.math.linalg.MatBuilder; import org.wpilib.math.linalg.Matrix; import org.wpilib.math.numbers.N2; import org.wpilib.math.numbers.N3; -import org.wpilib.math.proto.Wpimath.ProtobufMatrix; +import org.wpilib.math.proto.ProtobufMatrix; import org.wpilib.math.util.Nat; @SuppressWarnings("PMD.TestClassWithoutTestCases") diff --git a/wpimath/src/test/java/org/wpilib/math/linalg/proto/VectorProtoTest.java b/wpimath/src/test/java/org/wpilib/math/linalg/proto/VectorProtoTest.java index c2344a595e..549bf18542 100644 --- a/wpimath/src/test/java/org/wpilib/math/linalg/proto/VectorProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/linalg/proto/VectorProtoTest.java @@ -10,7 +10,7 @@ import org.wpilib.ProtoTestBase; import org.wpilib.math.linalg.VecBuilder; import org.wpilib.math.linalg.Vector; import org.wpilib.math.numbers.N2; -import org.wpilib.math.proto.Wpimath.ProtobufVector; +import org.wpilib.math.proto.ProtobufVector; import org.wpilib.math.util.Nat; @SuppressWarnings("PMD.TestClassWithoutTestCases") diff --git a/wpimath/src/test/java/org/wpilib/math/spline/proto/CubicHermiteSplineProtoTest.java b/wpimath/src/test/java/org/wpilib/math/spline/proto/CubicHermiteSplineProtoTest.java index 34c411f197..8bfd2c33b1 100644 --- a/wpimath/src/test/java/org/wpilib/math/spline/proto/CubicHermiteSplineProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/spline/proto/CubicHermiteSplineProtoTest.java @@ -7,7 +7,7 @@ package org.wpilib.math.spline.proto; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import org.wpilib.ProtoTestBase; -import org.wpilib.math.proto.Spline.ProtobufCubicHermiteSpline; +import org.wpilib.math.proto.ProtobufCubicHermiteSpline; import org.wpilib.math.spline.CubicHermiteSpline; @SuppressWarnings("PMD.TestClassWithoutTestCases") diff --git a/wpimath/src/test/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProtoTest.java b/wpimath/src/test/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProtoTest.java index 57475733ab..683536e760 100644 --- a/wpimath/src/test/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/spline/proto/QuinticHermiteSplineProtoTest.java @@ -7,7 +7,7 @@ package org.wpilib.math.spline.proto; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import org.wpilib.ProtoTestBase; -import org.wpilib.math.proto.Spline.ProtobufQuinticHermiteSpline; +import org.wpilib.math.proto.ProtobufQuinticHermiteSpline; import org.wpilib.math.spline.QuinticHermiteSpline; @SuppressWarnings("PMD.TestClassWithoutTestCases") diff --git a/wpimath/src/test/java/org/wpilib/math/system/proto/DCMotorProtoTest.java b/wpimath/src/test/java/org/wpilib/math/system/proto/DCMotorProtoTest.java index 36a360e341..0090397869 100644 --- a/wpimath/src/test/java/org/wpilib/math/system/proto/DCMotorProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/system/proto/DCMotorProtoTest.java @@ -7,7 +7,7 @@ package org.wpilib.math.system.proto; import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; -import org.wpilib.math.proto.System.ProtobufDCMotor; +import org.wpilib.math.proto.ProtobufDCMotor; import org.wpilib.math.system.DCMotor; class DCMotorProtoTest { diff --git a/wpimath/src/test/java/org/wpilib/math/system/proto/LinearSystemProtoTest.java b/wpimath/src/test/java/org/wpilib/math/system/proto/LinearSystemProtoTest.java index 9ddbc8a8a2..8869993071 100644 --- a/wpimath/src/test/java/org/wpilib/math/system/proto/LinearSystemProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/system/proto/LinearSystemProtoTest.java @@ -11,7 +11,7 @@ import org.wpilib.math.linalg.MatBuilder; import org.wpilib.math.numbers.N2; import org.wpilib.math.numbers.N3; import org.wpilib.math.numbers.N4; -import org.wpilib.math.proto.System.ProtobufLinearSystem; +import org.wpilib.math.proto.ProtobufLinearSystem; import org.wpilib.math.system.LinearSystem; import org.wpilib.math.util.Nat; diff --git a/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryProtoTest.java b/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryProtoTest.java index c93dc69330..a4a4b53bae 100644 --- a/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryProtoTest.java @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Pose2d; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Trajectory.ProtobufTrajectory; +import org.wpilib.math.proto.ProtobufTrajectory; import org.wpilib.math.trajectory.Trajectory; class TrajectoryProtoTest { diff --git a/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryStateProtoTest.java b/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryStateProtoTest.java index 8a705eb1b0..f9a8778ad3 100644 --- a/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryStateProtoTest.java +++ b/wpimath/src/test/java/org/wpilib/math/trajectory/proto/TrajectoryStateProtoTest.java @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Test; import org.wpilib.math.geometry.Pose2d; import org.wpilib.math.geometry.Rotation2d; import org.wpilib.math.geometry.Translation2d; -import org.wpilib.math.proto.Trajectory.ProtobufTrajectoryState; +import org.wpilib.math.proto.ProtobufTrajectoryState; import org.wpilib.math.trajectory.Trajectory; class TrajectoryStateProtoTest { diff --git a/wpiutil/src/generated/test/native/cpp/wpiutil.npb.cpp b/wpiutil/src/generated/test/native/cpp/wpiutil.npb.cpp index d2f52da5da..39f814ec02 100644 --- a/wpiutil/src/generated/test/native/cpp/wpiutil.npb.cpp +++ b/wpiutil/src/generated/test/native/cpp/wpiutil.npb.cpp @@ -218,335 +218,342 @@ static const uint8_t file_descriptor[] { 0x6f,0x2e,0x54,0x65,0x73,0x74,0x50,0x72,0x6f,0x74, 0x6f,0x49,0x6e,0x6e,0x65,0x72,0x52,0x11,0x54,0x65, 0x73,0x74,0x50,0x72,0x6f,0x74,0x6f,0x49,0x6e,0x6e, -0x65,0x72,0x4d,0x73,0x67,0x4a,0xc3,0x19,0x0a,0x06, -0x12,0x04,0x00,0x00,0x3f,0x01,0x0a,0x08,0x0a,0x01, -0x0c,0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a,0x01, -0x02,0x12,0x03,0x02,0x00,0x12,0x0a,0x0a,0x0a,0x02, -0x04,0x00,0x12,0x04,0x04,0x00,0x06,0x01,0x0a,0x0a, -0x0a,0x03,0x04,0x00,0x01,0x12,0x03,0x04,0x08,0x16, -0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02,0x00,0x12,0x03, -0x05,0x02,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02, -0x00,0x05,0x12,0x03,0x05,0x02,0x08,0x0a,0x0c,0x0a, -0x05,0x04,0x00,0x02,0x00,0x01,0x12,0x03,0x05,0x09, -0x0c,0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x03, -0x12,0x03,0x05,0x0f,0x10,0x0a,0x0a,0x0a,0x02,0x04, -0x01,0x12,0x04,0x08,0x00,0x19,0x01,0x0a,0x0a,0x0a, -0x03,0x04,0x01,0x01,0x12,0x03,0x08,0x08,0x11,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x00,0x12,0x03,0x09, -0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00, -0x05,0x12,0x03,0x09,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x00,0x01,0x12,0x03,0x09,0x09,0x13, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x03,0x12, -0x03,0x09,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x01,0x12,0x03,0x0a,0x02,0x16,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x01,0x05,0x12,0x03,0x0a,0x02, -0x07,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x01, -0x12,0x03,0x0a,0x08,0x11,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x01,0x03,0x12,0x03,0x0a,0x14,0x15,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x02,0x12,0x03,0x0b, -0x02,0x16,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02, -0x05,0x12,0x03,0x0b,0x02,0x07,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x02,0x01,0x12,0x03,0x0b,0x08,0x11, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x03,0x12, -0x03,0x0b,0x14,0x15,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x03,0x12,0x03,0x0c,0x02,0x16,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x03,0x05,0x12,0x03,0x0c,0x02, -0x07,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x01, -0x12,0x03,0x0c,0x08,0x11,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x03,0x03,0x12,0x03,0x0c,0x14,0x15,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x04,0x12,0x03,0x0d, -0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x04, -0x05,0x12,0x03,0x0d,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x04,0x01,0x12,0x03,0x0d,0x09,0x13, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x04,0x03,0x12, -0x03,0x0d,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x05,0x12,0x03,0x0e,0x02,0x18,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x05,0x05,0x12,0x03,0x0e,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x05,0x01, -0x12,0x03,0x0e,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x05,0x03,0x12,0x03,0x0e,0x16,0x17,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x06,0x12,0x03,0x0f, -0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x06, -0x05,0x12,0x03,0x0f,0x02,0x08,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x06,0x01,0x12,0x03,0x0f,0x09,0x13, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x06,0x03,0x12, -0x03,0x0f,0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x07,0x12,0x03,0x10,0x02,0x18,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x07,0x05,0x12,0x03,0x10,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x07,0x01, -0x12,0x03,0x10,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x07,0x03,0x12,0x03,0x10,0x16,0x17,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x08,0x12,0x03,0x11, -0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x08, -0x05,0x12,0x03,0x11,0x02,0x09,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x08,0x01,0x12,0x03,0x11,0x0a,0x15, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x08,0x03,0x12, -0x03,0x11,0x18,0x19,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x09,0x12,0x03,0x12,0x02,0x1b,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x09,0x05,0x12,0x03,0x12,0x02, -0x09,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x09,0x01, -0x12,0x03,0x12,0x0a,0x15,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x09,0x03,0x12,0x03,0x12,0x18,0x1a,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x0a,0x12,0x03,0x13, -0x02,0x1d,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0a, -0x05,0x12,0x03,0x13,0x02,0x0a,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x0a,0x01,0x12,0x03,0x13,0x0b,0x17, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0a,0x03,0x12, -0x03,0x13,0x1a,0x1c,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x0b,0x12,0x03,0x14,0x02,0x1d,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x0b,0x05,0x12,0x03,0x14,0x02, -0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0b,0x01, -0x12,0x03,0x14,0x0b,0x17,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x0b,0x03,0x12,0x03,0x14,0x1a,0x1c,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x0c,0x12,0x03,0x15, -0x02,0x15,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0c, -0x05,0x12,0x03,0x15,0x02,0x06,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x0c,0x01,0x12,0x03,0x15,0x07,0x0f, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0c,0x03,0x12, -0x03,0x15,0x12,0x14,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x0d,0x12,0x03,0x16,0x02,0x19,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x0d,0x05,0x12,0x03,0x16,0x02, -0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0d,0x01, -0x12,0x03,0x16,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x0d,0x03,0x12,0x03,0x16,0x16,0x18,0x0a, -0x0b,0x0a,0x04,0x04,0x01,0x02,0x0e,0x12,0x03,0x17, -0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0e, -0x05,0x12,0x03,0x17,0x02,0x07,0x0a,0x0c,0x0a,0x05, -0x04,0x01,0x02,0x0e,0x01,0x12,0x03,0x17,0x08,0x11, -0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0e,0x03,0x12, -0x03,0x17,0x14,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x01, -0x02,0x0f,0x12,0x03,0x18,0x02,0x29,0x0a,0x0c,0x0a, -0x05,0x04,0x01,0x02,0x0f,0x06,0x12,0x03,0x18,0x02, -0x10,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0f,0x01, -0x12,0x03,0x18,0x11,0x23,0x0a,0x0c,0x0a,0x05,0x04, -0x01,0x02,0x0f,0x03,0x12,0x03,0x18,0x26,0x28,0x0a, -0x0a,0x0a,0x02,0x04,0x02,0x12,0x04,0x1b,0x00,0x2c, -0x01,0x0a,0x0a,0x0a,0x03,0x04,0x02,0x01,0x12,0x03, -0x1b,0x08,0x19,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, -0x00,0x12,0x03,0x1c,0x02,0x21,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x00,0x04,0x12,0x03,0x1c,0x02,0x0a, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x05,0x12, -0x03,0x1c,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x00,0x01,0x12,0x03,0x1c,0x12,0x1c,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x00,0x03,0x12,0x03,0x1c, -0x1f,0x20,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x01, -0x12,0x03,0x1d,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x01,0x04,0x12,0x03,0x1d,0x02,0x0a,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x01,0x05,0x12,0x03, -0x1d,0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x01,0x01,0x12,0x03,0x1d,0x11,0x1a,0x0a,0x0c,0x0a, -0x05,0x04,0x02,0x02,0x01,0x03,0x12,0x03,0x1d,0x1d, -0x1e,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x02,0x12, -0x03,0x1e,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x02,0x04,0x12,0x03,0x1e,0x02,0x0a,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x02,0x05,0x12,0x03,0x1e, -0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x02, -0x01,0x12,0x03,0x1e,0x11,0x1a,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x02,0x03,0x12,0x03,0x1e,0x1d,0x1e, -0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x03,0x12,0x03, -0x1f,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x03,0x04,0x12,0x03,0x1f,0x02,0x0a,0x0a,0x0c,0x0a, -0x05,0x04,0x02,0x02,0x03,0x05,0x12,0x03,0x1f,0x0b, -0x10,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x03,0x01, -0x12,0x03,0x1f,0x11,0x1a,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x03,0x03,0x12,0x03,0x1f,0x1d,0x1e,0x0a, -0x0b,0x0a,0x04,0x04,0x02,0x02,0x04,0x12,0x03,0x20, -0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x04, -0x04,0x12,0x03,0x20,0x02,0x0a,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x04,0x05,0x12,0x03,0x20,0x0b,0x11, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x04,0x01,0x12, -0x03,0x20,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x04,0x03,0x12,0x03,0x20,0x1f,0x20,0x0a,0x0b, -0x0a,0x04,0x04,0x02,0x02,0x05,0x12,0x03,0x21,0x02, -0x21,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x05,0x04, -0x12,0x03,0x21,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x05,0x05,0x12,0x03,0x21,0x0b,0x11,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x05,0x01,0x12,0x03, -0x21,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x05,0x03,0x12,0x03,0x21,0x1f,0x20,0x0a,0x0b,0x0a, -0x04,0x04,0x02,0x02,0x06,0x12,0x03,0x22,0x02,0x21, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x06,0x04,0x12, -0x03,0x22,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x06,0x05,0x12,0x03,0x22,0x0b,0x11,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x06,0x01,0x12,0x03,0x22, -0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x06, -0x03,0x12,0x03,0x22,0x1f,0x20,0x0a,0x0b,0x0a,0x04, -0x04,0x02,0x02,0x07,0x12,0x03,0x23,0x02,0x21,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x07,0x04,0x12,0x03, -0x23,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x07,0x05,0x12,0x03,0x23,0x0b,0x11,0x0a,0x0c,0x0a, -0x05,0x04,0x02,0x02,0x07,0x01,0x12,0x03,0x23,0x12, -0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x07,0x03, -0x12,0x03,0x23,0x1f,0x20,0x0a,0x0b,0x0a,0x04,0x04, -0x02,0x02,0x08,0x12,0x03,0x24,0x02,0x23,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x08,0x04,0x12,0x03,0x24, -0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x08, -0x05,0x12,0x03,0x24,0x0b,0x12,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x08,0x01,0x12,0x03,0x24,0x13,0x1e, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x08,0x03,0x12, -0x03,0x24,0x21,0x22,0x0a,0x0b,0x0a,0x04,0x04,0x02, -0x02,0x09,0x12,0x03,0x25,0x02,0x24,0x0a,0x0c,0x0a, -0x05,0x04,0x02,0x02,0x09,0x04,0x12,0x03,0x25,0x02, -0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x09,0x05, -0x12,0x03,0x25,0x0b,0x12,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x09,0x01,0x12,0x03,0x25,0x13,0x1e,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x09,0x03,0x12,0x03, -0x25,0x21,0x23,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, -0x0a,0x12,0x03,0x26,0x02,0x26,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x0a,0x04,0x12,0x03,0x26,0x02,0x0a, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0a,0x05,0x12, -0x03,0x26,0x0b,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x0a,0x01,0x12,0x03,0x26,0x14,0x20,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x0a,0x03,0x12,0x03,0x26, -0x23,0x25,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x0b, -0x12,0x03,0x27,0x02,0x26,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x0b,0x04,0x12,0x03,0x27,0x02,0x0a,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x0b,0x05,0x12,0x03, -0x27,0x0b,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x0b,0x01,0x12,0x03,0x27,0x14,0x20,0x0a,0x0c,0x0a, -0x05,0x04,0x02,0x02,0x0b,0x03,0x12,0x03,0x27,0x23, -0x25,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x0c,0x12, -0x03,0x28,0x02,0x1e,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x0c,0x04,0x12,0x03,0x28,0x02,0x0a,0x0a,0x0c, -0x0a,0x05,0x04,0x02,0x02,0x0c,0x05,0x12,0x03,0x28, -0x0b,0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0c, -0x01,0x12,0x03,0x28,0x10,0x18,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x0c,0x03,0x12,0x03,0x28,0x1b,0x1d, -0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x0d,0x12,0x03, -0x29,0x02,0x22,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x0d,0x04,0x12,0x03,0x29,0x02,0x0a,0x0a,0x0c,0x0a, -0x05,0x04,0x02,0x02,0x0d,0x05,0x12,0x03,0x29,0x0b, -0x11,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0d,0x01, -0x12,0x03,0x29,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x0d,0x03,0x12,0x03,0x29,0x1f,0x21,0x0a, -0x0b,0x0a,0x04,0x04,0x02,0x02,0x0e,0x12,0x03,0x2a, -0x02,0x20,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0e, -0x04,0x12,0x03,0x2a,0x02,0x0a,0x0a,0x0c,0x0a,0x05, -0x04,0x02,0x02,0x0e,0x05,0x12,0x03,0x2a,0x0b,0x10, -0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0e,0x01,0x12, -0x03,0x2a,0x11,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x02, -0x02,0x0e,0x03,0x12,0x03,0x2a,0x1d,0x1f,0x0a,0x0b, -0x0a,0x04,0x04,0x02,0x02,0x0f,0x12,0x03,0x2b,0x02, -0x32,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0f,0x04, -0x12,0x03,0x2b,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04, -0x02,0x02,0x0f,0x06,0x12,0x03,0x2b,0x0b,0x19,0x0a, -0x0c,0x0a,0x05,0x04,0x02,0x02,0x0f,0x01,0x12,0x03, -0x2b,0x1a,0x2c,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, -0x0f,0x03,0x12,0x03,0x2b,0x2f,0x31,0x0a,0x0a,0x0a, -0x02,0x04,0x03,0x12,0x04,0x2e,0x00,0x3f,0x01,0x0a, -0x0a,0x0a,0x03,0x04,0x03,0x01,0x12,0x03,0x2e,0x08, -0x19,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x00,0x12, -0x03,0x2f,0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x00,0x04,0x12,0x03,0x2f,0x02,0x0a,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x00,0x05,0x12,0x03,0x2f, -0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x00, -0x01,0x12,0x03,0x2f,0x12,0x1c,0x0a,0x0c,0x0a,0x05, -0x04,0x03,0x02,0x00,0x03,0x12,0x03,0x2f,0x1f,0x20, -0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x01,0x12,0x03, -0x30,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x01,0x04,0x12,0x03,0x30,0x02,0x0a,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x01,0x05,0x12,0x03,0x30,0x0b, -0x10,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01,0x01, -0x12,0x03,0x30,0x11,0x1a,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x01,0x03,0x12,0x03,0x30,0x1d,0x1e,0x0a, -0x0b,0x0a,0x04,0x04,0x03,0x02,0x02,0x12,0x03,0x31, -0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x02, -0x04,0x12,0x03,0x31,0x02,0x0a,0x0a,0x0c,0x0a,0x05, -0x04,0x03,0x02,0x02,0x05,0x12,0x03,0x31,0x0b,0x10, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x02,0x01,0x12, -0x03,0x31,0x11,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x02,0x03,0x12,0x03,0x31,0x1d,0x1e,0x0a,0x0b, -0x0a,0x04,0x04,0x03,0x02,0x03,0x12,0x03,0x32,0x02, -0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x03,0x04, -0x12,0x03,0x32,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x03,0x05,0x12,0x03,0x32,0x0b,0x10,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x03,0x01,0x12,0x03, -0x32,0x11,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x03,0x03,0x12,0x03,0x32,0x1d,0x1e,0x0a,0x0b,0x0a, -0x04,0x04,0x03,0x02,0x04,0x12,0x03,0x33,0x02,0x21, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x04,0x04,0x12, -0x03,0x33,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x04,0x05,0x12,0x03,0x33,0x0b,0x11,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x04,0x01,0x12,0x03,0x33, -0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x04, -0x03,0x12,0x03,0x33,0x1f,0x20,0x0a,0x0b,0x0a,0x04, -0x04,0x03,0x02,0x05,0x12,0x03,0x34,0x02,0x21,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x05,0x04,0x12,0x03, -0x34,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x05,0x05,0x12,0x03,0x34,0x0b,0x11,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x05,0x01,0x12,0x03,0x34,0x12, -0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x05,0x03, -0x12,0x03,0x34,0x1f,0x20,0x0a,0x0b,0x0a,0x04,0x04, -0x03,0x02,0x06,0x12,0x03,0x35,0x02,0x21,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x06,0x04,0x12,0x03,0x35, -0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x06, -0x05,0x12,0x03,0x35,0x0b,0x11,0x0a,0x0c,0x0a,0x05, -0x04,0x03,0x02,0x06,0x01,0x12,0x03,0x35,0x12,0x1c, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x06,0x03,0x12, -0x03,0x35,0x1f,0x20,0x0a,0x0b,0x0a,0x04,0x04,0x03, -0x02,0x07,0x12,0x03,0x36,0x02,0x21,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x07,0x04,0x12,0x03,0x36,0x02, -0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x07,0x05, -0x12,0x03,0x36,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x07,0x01,0x12,0x03,0x36,0x12,0x1c,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x07,0x03,0x12,0x03, -0x36,0x1f,0x20,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02, -0x08,0x12,0x03,0x37,0x02,0x23,0x0a,0x0c,0x0a,0x05, -0x04,0x03,0x02,0x08,0x04,0x12,0x03,0x37,0x02,0x0a, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x08,0x05,0x12, -0x03,0x37,0x0b,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x08,0x01,0x12,0x03,0x37,0x13,0x1e,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x08,0x03,0x12,0x03,0x37, -0x21,0x22,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x09, -0x12,0x03,0x38,0x02,0x24,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x09,0x04,0x12,0x03,0x38,0x02,0x0a,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x09,0x05,0x12,0x03, -0x38,0x0b,0x12,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x09,0x01,0x12,0x03,0x38,0x13,0x1e,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x09,0x03,0x12,0x03,0x38,0x21, -0x23,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x0a,0x12, -0x03,0x39,0x02,0x26,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x0a,0x04,0x12,0x03,0x39,0x02,0x0a,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x0a,0x05,0x12,0x03,0x39, -0x0b,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0a, -0x01,0x12,0x03,0x39,0x14,0x20,0x0a,0x0c,0x0a,0x05, -0x04,0x03,0x02,0x0a,0x03,0x12,0x03,0x39,0x23,0x25, -0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x0b,0x12,0x03, -0x3a,0x02,0x26,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x0b,0x04,0x12,0x03,0x3a,0x02,0x0a,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x0b,0x05,0x12,0x03,0x3a,0x0b, -0x13,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0b,0x01, -0x12,0x03,0x3a,0x14,0x20,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x0b,0x03,0x12,0x03,0x3a,0x23,0x25,0x0a, -0x0b,0x0a,0x04,0x04,0x03,0x02,0x0c,0x12,0x03,0x3b, -0x02,0x1e,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0c, -0x04,0x12,0x03,0x3b,0x02,0x0a,0x0a,0x0c,0x0a,0x05, -0x04,0x03,0x02,0x0c,0x05,0x12,0x03,0x3b,0x0b,0x0f, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0c,0x01,0x12, -0x03,0x3b,0x10,0x18,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x0c,0x03,0x12,0x03,0x3b,0x1b,0x1d,0x0a,0x0b, -0x0a,0x04,0x04,0x03,0x02,0x0d,0x12,0x03,0x3c,0x02, -0x22,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0d,0x04, -0x12,0x03,0x3c,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04, -0x03,0x02,0x0d,0x05,0x12,0x03,0x3c,0x0b,0x11,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x0d,0x01,0x12,0x03, -0x3c,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x0d,0x03,0x12,0x03,0x3c,0x1f,0x21,0x0a,0x0b,0x0a, -0x04,0x04,0x03,0x02,0x0e,0x12,0x03,0x3d,0x02,0x20, -0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0e,0x04,0x12, -0x03,0x3d,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03, -0x02,0x0e,0x05,0x12,0x03,0x3d,0x0b,0x10,0x0a,0x0c, -0x0a,0x05,0x04,0x03,0x02,0x0e,0x01,0x12,0x03,0x3d, -0x11,0x1a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0e, -0x03,0x12,0x03,0x3d,0x1d,0x1f,0x0a,0x0b,0x0a,0x04, -0x04,0x03,0x02,0x0f,0x12,0x03,0x3e,0x02,0x32,0x0a, -0x0c,0x0a,0x05,0x04,0x03,0x02,0x0f,0x04,0x12,0x03, -0x3e,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, -0x0f,0x06,0x12,0x03,0x3e,0x0b,0x19,0x0a,0x0c,0x0a, -0x05,0x04,0x03,0x02,0x0f,0x01,0x12,0x03,0x3e,0x1a, -0x2c,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0f,0x03, -0x12,0x03,0x3e,0x2f,0x31,0x62,0x06,0x70,0x72,0x6f, -0x74,0x6f,0x33, +0x65,0x72,0x4d,0x73,0x67,0x42,0x1d,0x42,0x19,0x50, +0x72,0x6f,0x74,0x6f,0x62,0x75,0x66,0x57,0x50,0x49, +0x55,0x74,0x69,0x6c,0x44,0x65,0x73,0x63,0x72,0x69, +0x70,0x74,0x6f,0x72,0x50,0x01,0x4a,0xed,0x19,0x0a, +0x06,0x12,0x04,0x00,0x00,0x43,0x01,0x0a,0x08,0x0a, +0x01,0x0c,0x12,0x03,0x00,0x00,0x12,0x0a,0x08,0x0a, +0x01,0x02,0x12,0x03,0x02,0x00,0x12,0x0a,0x08,0x0a, +0x01,0x08,0x12,0x03,0x04,0x00,0x3a,0x0a,0x09,0x0a, +0x02,0x08,0x08,0x12,0x03,0x04,0x00,0x3a,0x0a,0x08, +0x0a,0x01,0x08,0x12,0x03,0x06,0x00,0x22,0x0a,0x09, +0x0a,0x02,0x08,0x0a,0x12,0x03,0x06,0x00,0x22,0x0a, +0x0a,0x0a,0x02,0x04,0x00,0x12,0x04,0x08,0x00,0x0a, +0x01,0x0a,0x0a,0x0a,0x03,0x04,0x00,0x01,0x12,0x03, +0x08,0x08,0x16,0x0a,0x0b,0x0a,0x04,0x04,0x00,0x02, +0x00,0x12,0x03,0x09,0x02,0x11,0x0a,0x0c,0x0a,0x05, +0x04,0x00,0x02,0x00,0x05,0x12,0x03,0x09,0x02,0x08, +0x0a,0x0c,0x0a,0x05,0x04,0x00,0x02,0x00,0x01,0x12, +0x03,0x09,0x09,0x0c,0x0a,0x0c,0x0a,0x05,0x04,0x00, +0x02,0x00,0x03,0x12,0x03,0x09,0x0f,0x10,0x0a,0x0a, +0x0a,0x02,0x04,0x01,0x12,0x04,0x0c,0x00,0x1d,0x01, +0x0a,0x0a,0x0a,0x03,0x04,0x01,0x01,0x12,0x03,0x0c, +0x08,0x11,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x00, +0x12,0x03,0x0d,0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x00,0x05,0x12,0x03,0x0d,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x00,0x01,0x12,0x03, +0x0d,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x00,0x03,0x12,0x03,0x0d,0x16,0x17,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x01,0x12,0x03,0x0e,0x02,0x16, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x01,0x05,0x12, +0x03,0x0e,0x02,0x07,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x01,0x01,0x12,0x03,0x0e,0x08,0x11,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x01,0x03,0x12,0x03,0x0e, +0x14,0x15,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x02, +0x12,0x03,0x0f,0x02,0x16,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x02,0x05,0x12,0x03,0x0f,0x02,0x07,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x02,0x01,0x12,0x03, +0x0f,0x08,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x02,0x03,0x12,0x03,0x0f,0x14,0x15,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x03,0x12,0x03,0x10,0x02,0x16, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x03,0x05,0x12, +0x03,0x10,0x02,0x07,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x03,0x01,0x12,0x03,0x10,0x08,0x11,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x03,0x03,0x12,0x03,0x10, +0x14,0x15,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x04, +0x12,0x03,0x11,0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x04,0x05,0x12,0x03,0x11,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x04,0x01,0x12,0x03, +0x11,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x04,0x03,0x12,0x03,0x11,0x16,0x17,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x05,0x12,0x03,0x12,0x02,0x18, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x05,0x05,0x12, +0x03,0x12,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x05,0x01,0x12,0x03,0x12,0x09,0x13,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x05,0x03,0x12,0x03,0x12, +0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x06, +0x12,0x03,0x13,0x02,0x18,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x06,0x05,0x12,0x03,0x13,0x02,0x08,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x06,0x01,0x12,0x03, +0x13,0x09,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x06,0x03,0x12,0x03,0x13,0x16,0x17,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x07,0x12,0x03,0x14,0x02,0x18, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x07,0x05,0x12, +0x03,0x14,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x07,0x01,0x12,0x03,0x14,0x09,0x13,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x07,0x03,0x12,0x03,0x14, +0x16,0x17,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x08, +0x12,0x03,0x15,0x02,0x1a,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x08,0x05,0x12,0x03,0x15,0x02,0x09,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x08,0x01,0x12,0x03, +0x15,0x0a,0x15,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x08,0x03,0x12,0x03,0x15,0x18,0x19,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x09,0x12,0x03,0x16,0x02,0x1b, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x09,0x05,0x12, +0x03,0x16,0x02,0x09,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x09,0x01,0x12,0x03,0x16,0x0a,0x15,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x09,0x03,0x12,0x03,0x16, +0x18,0x1a,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x0a, +0x12,0x03,0x17,0x02,0x1d,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x0a,0x05,0x12,0x03,0x17,0x02,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x0a,0x01,0x12,0x03, +0x17,0x0b,0x17,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x0a,0x03,0x12,0x03,0x17,0x1a,0x1c,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x0b,0x12,0x03,0x18,0x02,0x1d, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0b,0x05,0x12, +0x03,0x18,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x0b,0x01,0x12,0x03,0x18,0x0b,0x17,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x0b,0x03,0x12,0x03,0x18, +0x1a,0x1c,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x0c, +0x12,0x03,0x19,0x02,0x15,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x0c,0x05,0x12,0x03,0x19,0x02,0x06,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x0c,0x01,0x12,0x03, +0x19,0x07,0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x0c,0x03,0x12,0x03,0x19,0x12,0x14,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x0d,0x12,0x03,0x1a,0x02,0x19, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0d,0x05,0x12, +0x03,0x1a,0x02,0x08,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x0d,0x01,0x12,0x03,0x1a,0x09,0x13,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x0d,0x03,0x12,0x03,0x1a, +0x16,0x18,0x0a,0x0b,0x0a,0x04,0x04,0x01,0x02,0x0e, +0x12,0x03,0x1b,0x02,0x17,0x0a,0x0c,0x0a,0x05,0x04, +0x01,0x02,0x0e,0x05,0x12,0x03,0x1b,0x02,0x07,0x0a, +0x0c,0x0a,0x05,0x04,0x01,0x02,0x0e,0x01,0x12,0x03, +0x1b,0x08,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02, +0x0e,0x03,0x12,0x03,0x1b,0x14,0x16,0x0a,0x0b,0x0a, +0x04,0x04,0x01,0x02,0x0f,0x12,0x03,0x1c,0x02,0x29, +0x0a,0x0c,0x0a,0x05,0x04,0x01,0x02,0x0f,0x06,0x12, +0x03,0x1c,0x02,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x01, +0x02,0x0f,0x01,0x12,0x03,0x1c,0x11,0x23,0x0a,0x0c, +0x0a,0x05,0x04,0x01,0x02,0x0f,0x03,0x12,0x03,0x1c, +0x26,0x28,0x0a,0x0a,0x0a,0x02,0x04,0x02,0x12,0x04, +0x1f,0x00,0x30,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x02, +0x01,0x12,0x03,0x1f,0x08,0x19,0x0a,0x0b,0x0a,0x04, +0x04,0x02,0x02,0x00,0x12,0x03,0x20,0x02,0x21,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x04,0x12,0x03, +0x20,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x00,0x05,0x12,0x03,0x20,0x0b,0x11,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x00,0x01,0x12,0x03,0x20,0x12, +0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x00,0x03, +0x12,0x03,0x20,0x1f,0x20,0x0a,0x0b,0x0a,0x04,0x04, +0x02,0x02,0x01,0x12,0x03,0x21,0x02,0x1f,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x01,0x04,0x12,0x03,0x21, +0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x01, +0x05,0x12,0x03,0x21,0x0b,0x10,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x01,0x01,0x12,0x03,0x21,0x11,0x1a, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x01,0x03,0x12, +0x03,0x21,0x1d,0x1e,0x0a,0x0b,0x0a,0x04,0x04,0x02, +0x02,0x02,0x12,0x03,0x22,0x02,0x1f,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x02,0x04,0x12,0x03,0x22,0x02, +0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x02,0x05, +0x12,0x03,0x22,0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x02,0x01,0x12,0x03,0x22,0x11,0x1a,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x02,0x03,0x12,0x03, +0x22,0x1d,0x1e,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, +0x03,0x12,0x03,0x23,0x02,0x1f,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x03,0x04,0x12,0x03,0x23,0x02,0x0a, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x03,0x05,0x12, +0x03,0x23,0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x03,0x01,0x12,0x03,0x23,0x11,0x1a,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x03,0x03,0x12,0x03,0x23, +0x1d,0x1e,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x04, +0x12,0x03,0x24,0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x04,0x04,0x12,0x03,0x24,0x02,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x04,0x05,0x12,0x03, +0x24,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x04,0x01,0x12,0x03,0x24,0x12,0x1c,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x04,0x03,0x12,0x03,0x24,0x1f, +0x20,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x05,0x12, +0x03,0x25,0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x05,0x04,0x12,0x03,0x25,0x02,0x0a,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x05,0x05,0x12,0x03,0x25, +0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x05, +0x01,0x12,0x03,0x25,0x12,0x1c,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x05,0x03,0x12,0x03,0x25,0x1f,0x20, +0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x06,0x12,0x03, +0x26,0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x06,0x04,0x12,0x03,0x26,0x02,0x0a,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x06,0x05,0x12,0x03,0x26,0x0b, +0x11,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x06,0x01, +0x12,0x03,0x26,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x06,0x03,0x12,0x03,0x26,0x1f,0x20,0x0a, +0x0b,0x0a,0x04,0x04,0x02,0x02,0x07,0x12,0x03,0x27, +0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x07, +0x04,0x12,0x03,0x27,0x02,0x0a,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x07,0x05,0x12,0x03,0x27,0x0b,0x11, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x07,0x01,0x12, +0x03,0x27,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x07,0x03,0x12,0x03,0x27,0x1f,0x20,0x0a,0x0b, +0x0a,0x04,0x04,0x02,0x02,0x08,0x12,0x03,0x28,0x02, +0x23,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x08,0x04, +0x12,0x03,0x28,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x08,0x05,0x12,0x03,0x28,0x0b,0x12,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x08,0x01,0x12,0x03, +0x28,0x13,0x1e,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x08,0x03,0x12,0x03,0x28,0x21,0x22,0x0a,0x0b,0x0a, +0x04,0x04,0x02,0x02,0x09,0x12,0x03,0x29,0x02,0x24, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x09,0x04,0x12, +0x03,0x29,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x09,0x05,0x12,0x03,0x29,0x0b,0x12,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x09,0x01,0x12,0x03,0x29, +0x13,0x1e,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x09, +0x03,0x12,0x03,0x29,0x21,0x23,0x0a,0x0b,0x0a,0x04, +0x04,0x02,0x02,0x0a,0x12,0x03,0x2a,0x02,0x26,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x0a,0x04,0x12,0x03, +0x2a,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x0a,0x05,0x12,0x03,0x2a,0x0b,0x13,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x0a,0x01,0x12,0x03,0x2a,0x14, +0x20,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0a,0x03, +0x12,0x03,0x2a,0x23,0x25,0x0a,0x0b,0x0a,0x04,0x04, +0x02,0x02,0x0b,0x12,0x03,0x2b,0x02,0x26,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x0b,0x04,0x12,0x03,0x2b, +0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0b, +0x05,0x12,0x03,0x2b,0x0b,0x13,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x0b,0x01,0x12,0x03,0x2b,0x14,0x20, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0b,0x03,0x12, +0x03,0x2b,0x23,0x25,0x0a,0x0b,0x0a,0x04,0x04,0x02, +0x02,0x0c,0x12,0x03,0x2c,0x02,0x1e,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x0c,0x04,0x12,0x03,0x2c,0x02, +0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0c,0x05, +0x12,0x03,0x2c,0x0b,0x0f,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x0c,0x01,0x12,0x03,0x2c,0x10,0x18,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x0c,0x03,0x12,0x03, +0x2c,0x1b,0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02, +0x0d,0x12,0x03,0x2d,0x02,0x22,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x0d,0x04,0x12,0x03,0x2d,0x02,0x0a, +0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0d,0x05,0x12, +0x03,0x2d,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x0d,0x01,0x12,0x03,0x2d,0x12,0x1c,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x0d,0x03,0x12,0x03,0x2d, +0x1f,0x21,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x0e, +0x12,0x03,0x2e,0x02,0x20,0x0a,0x0c,0x0a,0x05,0x04, +0x02,0x02,0x0e,0x04,0x12,0x03,0x2e,0x02,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x02,0x02,0x0e,0x05,0x12,0x03, +0x2e,0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02, +0x0e,0x01,0x12,0x03,0x2e,0x11,0x1a,0x0a,0x0c,0x0a, +0x05,0x04,0x02,0x02,0x0e,0x03,0x12,0x03,0x2e,0x1d, +0x1f,0x0a,0x0b,0x0a,0x04,0x04,0x02,0x02,0x0f,0x12, +0x03,0x2f,0x02,0x32,0x0a,0x0c,0x0a,0x05,0x04,0x02, +0x02,0x0f,0x04,0x12,0x03,0x2f,0x02,0x0a,0x0a,0x0c, +0x0a,0x05,0x04,0x02,0x02,0x0f,0x06,0x12,0x03,0x2f, +0x0b,0x19,0x0a,0x0c,0x0a,0x05,0x04,0x02,0x02,0x0f, +0x01,0x12,0x03,0x2f,0x1a,0x2c,0x0a,0x0c,0x0a,0x05, +0x04,0x02,0x02,0x0f,0x03,0x12,0x03,0x2f,0x2f,0x31, +0x0a,0x0a,0x0a,0x02,0x04,0x03,0x12,0x04,0x32,0x00, +0x43,0x01,0x0a,0x0a,0x0a,0x03,0x04,0x03,0x01,0x12, +0x03,0x32,0x08,0x19,0x0a,0x0b,0x0a,0x04,0x04,0x03, +0x02,0x00,0x12,0x03,0x33,0x02,0x21,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x00,0x04,0x12,0x03,0x33,0x02, +0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x05, +0x12,0x03,0x33,0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x00,0x01,0x12,0x03,0x33,0x12,0x1c,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x00,0x03,0x12,0x03, +0x33,0x1f,0x20,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02, +0x01,0x12,0x03,0x34,0x02,0x1f,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x01,0x04,0x12,0x03,0x34,0x02,0x0a, +0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x01,0x05,0x12, +0x03,0x34,0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x01,0x01,0x12,0x03,0x34,0x11,0x1a,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x01,0x03,0x12,0x03,0x34, +0x1d,0x1e,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x02, +0x12,0x03,0x35,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x02,0x04,0x12,0x03,0x35,0x02,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x02,0x05,0x12,0x03, +0x35,0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x02,0x01,0x12,0x03,0x35,0x11,0x1a,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x02,0x03,0x12,0x03,0x35,0x1d, +0x1e,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x03,0x12, +0x03,0x36,0x02,0x1f,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x03,0x04,0x12,0x03,0x36,0x02,0x0a,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x03,0x05,0x12,0x03,0x36, +0x0b,0x10,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x03, +0x01,0x12,0x03,0x36,0x11,0x1a,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x03,0x03,0x12,0x03,0x36,0x1d,0x1e, +0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x04,0x12,0x03, +0x37,0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x04,0x04,0x12,0x03,0x37,0x02,0x0a,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x04,0x05,0x12,0x03,0x37,0x0b, +0x11,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x04,0x01, +0x12,0x03,0x37,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x04,0x03,0x12,0x03,0x37,0x1f,0x20,0x0a, +0x0b,0x0a,0x04,0x04,0x03,0x02,0x05,0x12,0x03,0x38, +0x02,0x21,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x05, +0x04,0x12,0x03,0x38,0x02,0x0a,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x05,0x05,0x12,0x03,0x38,0x0b,0x11, +0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x05,0x01,0x12, +0x03,0x38,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x05,0x03,0x12,0x03,0x38,0x1f,0x20,0x0a,0x0b, +0x0a,0x04,0x04,0x03,0x02,0x06,0x12,0x03,0x39,0x02, +0x21,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x06,0x04, +0x12,0x03,0x39,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x06,0x05,0x12,0x03,0x39,0x0b,0x11,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x06,0x01,0x12,0x03, +0x39,0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x06,0x03,0x12,0x03,0x39,0x1f,0x20,0x0a,0x0b,0x0a, +0x04,0x04,0x03,0x02,0x07,0x12,0x03,0x3a,0x02,0x21, +0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x07,0x04,0x12, +0x03,0x3a,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x07,0x05,0x12,0x03,0x3a,0x0b,0x11,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x07,0x01,0x12,0x03,0x3a, +0x12,0x1c,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x07, +0x03,0x12,0x03,0x3a,0x1f,0x20,0x0a,0x0b,0x0a,0x04, +0x04,0x03,0x02,0x08,0x12,0x03,0x3b,0x02,0x23,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x08,0x04,0x12,0x03, +0x3b,0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x08,0x05,0x12,0x03,0x3b,0x0b,0x12,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x08,0x01,0x12,0x03,0x3b,0x13, +0x1e,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x08,0x03, +0x12,0x03,0x3b,0x21,0x22,0x0a,0x0b,0x0a,0x04,0x04, +0x03,0x02,0x09,0x12,0x03,0x3c,0x02,0x24,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x09,0x04,0x12,0x03,0x3c, +0x02,0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x09, +0x05,0x12,0x03,0x3c,0x0b,0x12,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x09,0x01,0x12,0x03,0x3c,0x13,0x1e, +0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x09,0x03,0x12, +0x03,0x3c,0x21,0x23,0x0a,0x0b,0x0a,0x04,0x04,0x03, +0x02,0x0a,0x12,0x03,0x3d,0x02,0x26,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x0a,0x04,0x12,0x03,0x3d,0x02, +0x0a,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0a,0x05, +0x12,0x03,0x3d,0x0b,0x13,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x0a,0x01,0x12,0x03,0x3d,0x14,0x20,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x0a,0x03,0x12,0x03, +0x3d,0x23,0x25,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02, +0x0b,0x12,0x03,0x3e,0x02,0x26,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x0b,0x04,0x12,0x03,0x3e,0x02,0x0a, +0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0b,0x05,0x12, +0x03,0x3e,0x0b,0x13,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x0b,0x01,0x12,0x03,0x3e,0x14,0x20,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x0b,0x03,0x12,0x03,0x3e, +0x23,0x25,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x0c, +0x12,0x03,0x3f,0x02,0x1e,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x0c,0x04,0x12,0x03,0x3f,0x02,0x0a,0x0a, +0x0c,0x0a,0x05,0x04,0x03,0x02,0x0c,0x05,0x12,0x03, +0x3f,0x0b,0x0f,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x0c,0x01,0x12,0x03,0x3f,0x10,0x18,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x0c,0x03,0x12,0x03,0x3f,0x1b, +0x1d,0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x0d,0x12, +0x03,0x40,0x02,0x22,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x0d,0x04,0x12,0x03,0x40,0x02,0x0a,0x0a,0x0c, +0x0a,0x05,0x04,0x03,0x02,0x0d,0x05,0x12,0x03,0x40, +0x0b,0x11,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0d, +0x01,0x12,0x03,0x40,0x12,0x1c,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x0d,0x03,0x12,0x03,0x40,0x1f,0x21, +0x0a,0x0b,0x0a,0x04,0x04,0x03,0x02,0x0e,0x12,0x03, +0x41,0x02,0x20,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02, +0x0e,0x04,0x12,0x03,0x41,0x02,0x0a,0x0a,0x0c,0x0a, +0x05,0x04,0x03,0x02,0x0e,0x05,0x12,0x03,0x41,0x0b, +0x10,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0e,0x01, +0x12,0x03,0x41,0x11,0x1a,0x0a,0x0c,0x0a,0x05,0x04, +0x03,0x02,0x0e,0x03,0x12,0x03,0x41,0x1d,0x1f,0x0a, +0x0b,0x0a,0x04,0x04,0x03,0x02,0x0f,0x12,0x03,0x42, +0x02,0x32,0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0f, +0x04,0x12,0x03,0x42,0x02,0x0a,0x0a,0x0c,0x0a,0x05, +0x04,0x03,0x02,0x0f,0x06,0x12,0x03,0x42,0x0b,0x19, +0x0a,0x0c,0x0a,0x05,0x04,0x03,0x02,0x0f,0x01,0x12, +0x03,0x42,0x1a,0x2c,0x0a,0x0c,0x0a,0x05,0x04,0x03, +0x02,0x0f,0x03,0x12,0x03,0x42,0x2f,0x31,0x62,0x06, +0x70,0x72,0x6f,0x74,0x6f,0x33, }; static const char file_name[] = "wpiutil.proto"; static const char wpi_proto_TestProtoInner_name[] = "wpi.proto.TestProtoInner"; diff --git a/wpiutil/src/test/proto/wpiutil.proto b/wpiutil/src/test/proto/wpiutil.proto index 2c5b99586b..3092e45019 100644 --- a/wpiutil/src/test/proto/wpiutil.proto +++ b/wpiutil/src/test/proto/wpiutil.proto @@ -2,6 +2,10 @@ syntax = "proto3"; package wpi.proto; +option java_outer_classname = "ProtobufWPIUtilDescriptor"; + +option java_multiple_files = true; + message TestProtoInner { string msg = 1; }