From 26298fa2aeb11f2c5678a05defa05d5cc0ef1d4f Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 5 Nov 2017 18:58:01 +0200 Subject: Implemented precise package names for Java compiler using a new 'UseDefaultStructure' property for all compilers! --- Software/Android-Studio/Tango.PMR/build.gradle | 2 +- .../PMR/Common/MessageContainerOuterClass.java | 602 ------------- .../Tango/PMR/Common/MessageTypeOuterClass.java | 152 ---- .../main/java/Tango/PMR/Common/RGBOuterClass.java | 629 -------------- .../main/java/Tango/PMR/Jobs/JobOuterClass.java | 952 -------------------- .../java/Tango/PMR/Jobs/SegmentOuterClass.java | 838 ------------------ .../src/main/java/Tango/PMR/dummyClass.java | 5 - .../pmr/common/MessageContainerOuterClass.java | 603 +++++++++++++ .../tango/pmr/common/MessageTypeOuterClass.java | 153 ++++ .../com/twine/tango/pmr/common/RGBOuterClass.java | 630 ++++++++++++++ .../com/twine/tango/pmr/jobs/JobOuterClass.java | 953 +++++++++++++++++++++ .../twine/tango/pmr/jobs/SegmentOuterClass.java | 838 ++++++++++++++++++ .../app/src/test/java/com/twine/tango/PMR_TST.java | 10 +- .../PMR/Messages/Common/MessageContainer.proto | 1 + Software/PMR/Messages/Common/MessageType.proto | 1 + Software/PMR/Messages/Common/RGB.proto | 1 + Software/PMR/Messages/Jobs/Job.proto | 1 + Software/PMR/Messages/Jobs/Segment.proto | 1 + .../ExtensionMethods/StringExtensions.cs | 10 + .../Tango.Protobuf/CompilerFileResult.cs | 8 +- .../Tango.Protobuf/Compilers/JavaCompiler.cs | 8 + .../Visual Studio/Tango.Protobuf/IProtoCompiler.cs | 5 + .../Visual Studio/Tango.Protobuf/ProtoCompiler.cs | 103 ++- 23 files changed, 3313 insertions(+), 3193 deletions(-) delete mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageContainerOuterClass.java delete mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageTypeOuterClass.java delete mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/RGBOuterClass.java delete mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/JobOuterClass.java delete mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/SegmentOuterClass.java delete mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/dummyClass.java create mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java create mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java create mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/RGBOuterClass.java create mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java create mode 100644 Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java (limited to 'Software') diff --git a/Software/Android-Studio/Tango.PMR/build.gradle b/Software/Android-Studio/Tango.PMR/build.gradle index 06435d18d..fccf25b66 100644 --- a/Software/Android-Studio/Tango.PMR/build.gradle +++ b/Software/Android-Studio/Tango.PMR/build.gradle @@ -10,7 +10,7 @@ targetCompatibility = "1.7" task createPMR(type: Exec, description: 'Update all PMR files') { - commandLine '..\\Visual Studio\\Build\\Debug\\proto-tc.exe', '-i' , '..\\..\\PMR\\Messages', '-o', 'src\\main\\java\\Tango\\PMR', '-l', 'Java' + commandLine '..\\Visual Studio\\Build\\Debug\\proto-tc.exe', '-i' , '..\\..\\PMR\\Messages', '-o', 'src\\main\\java', '-l', 'Java' ext.output = { return standardOutput.toString() diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageContainerOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageContainerOuterClass.java deleted file mode 100644 index 331fab637..000000000 --- a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageContainerOuterClass.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: MessageContainer.proto - -package Tango.PMR.Common; - -public final class MessageContainerOuterClass { - private MessageContainerOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface MessageContainerOrBuilder extends - // @@protoc_insertion_point(interface_extends:Tango.PMR.Common.MessageContainer) - com.google.protobuf.MessageOrBuilder { - - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - int getTypeValue(); - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - Tango.PMR.Common.MessageTypeOuterClass.MessageType getType(); - - /** - * bytes Data = 2; - */ - com.google.protobuf.ByteString getData(); - } - /** - * Protobuf type {@code Tango.PMR.Common.MessageContainer} - */ - public static final class MessageContainer extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:Tango.PMR.Common.MessageContainer) - MessageContainerOrBuilder { - private static final long serialVersionUID = 0L; - // Use MessageContainer.newBuilder() to construct. - private MessageContainer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MessageContainer() { - type_ = 0; - data_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MessageContainer( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 18: { - - data_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Common.MessageContainerOuterClass.MessageContainer.class, Tango.PMR.Common.MessageContainerOuterClass.MessageContainer.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - public int getTypeValue() { - return type_; - } - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - public Tango.PMR.Common.MessageTypeOuterClass.MessageType getType() { - Tango.PMR.Common.MessageTypeOuterClass.MessageType result = Tango.PMR.Common.MessageTypeOuterClass.MessageType.valueOf(type_); - return result == null ? Tango.PMR.Common.MessageTypeOuterClass.MessageType.UNRECOGNIZED : result; - } - - public static final int DATA_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString data_; - /** - * bytes Data = 2; - */ - public com.google.protobuf.ByteString getData() { - return data_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != Tango.PMR.Common.MessageTypeOuterClass.MessageType.RGB.getNumber()) { - output.writeEnum(1, type_); - } - if (!data_.isEmpty()) { - output.writeBytes(2, data_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != Tango.PMR.Common.MessageTypeOuterClass.MessageType.RGB.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (!data_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, data_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Tango.PMR.Common.MessageContainerOuterClass.MessageContainer)) { - return super.equals(obj); - } - Tango.PMR.Common.MessageContainerOuterClass.MessageContainer other = (Tango.PMR.Common.MessageContainerOuterClass.MessageContainer) obj; - - boolean result = true; - result = result && type_ == other.type_; - result = result && getData() - .equals(other.getData()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Tango.PMR.Common.MessageContainerOuterClass.MessageContainer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Tango.PMR.Common.MessageContainer} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Tango.PMR.Common.MessageContainer) - Tango.PMR.Common.MessageContainerOuterClass.MessageContainerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Common.MessageContainerOuterClass.MessageContainer.class, Tango.PMR.Common.MessageContainerOuterClass.MessageContainer.Builder.class); - } - - // Construct using Tango.PMR.Common.MessageContainerOuterClass.MessageContainer.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - type_ = 0; - - data_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Tango.PMR.Common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_descriptor; - } - - public Tango.PMR.Common.MessageContainerOuterClass.MessageContainer getDefaultInstanceForType() { - return Tango.PMR.Common.MessageContainerOuterClass.MessageContainer.getDefaultInstance(); - } - - public Tango.PMR.Common.MessageContainerOuterClass.MessageContainer build() { - Tango.PMR.Common.MessageContainerOuterClass.MessageContainer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public Tango.PMR.Common.MessageContainerOuterClass.MessageContainer buildPartial() { - Tango.PMR.Common.MessageContainerOuterClass.MessageContainer result = new Tango.PMR.Common.MessageContainerOuterClass.MessageContainer(this); - result.type_ = type_; - result.data_ = data_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Tango.PMR.Common.MessageContainerOuterClass.MessageContainer) { - return mergeFrom((Tango.PMR.Common.MessageContainerOuterClass.MessageContainer)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Tango.PMR.Common.MessageContainerOuterClass.MessageContainer other) { - if (other == Tango.PMR.Common.MessageContainerOuterClass.MessageContainer.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getData() != com.google.protobuf.ByteString.EMPTY) { - setData(other.getData()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Tango.PMR.Common.MessageContainerOuterClass.MessageContainer parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Tango.PMR.Common.MessageContainerOuterClass.MessageContainer) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int type_ = 0; - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - public int getTypeValue() { - return type_; - } - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - public Builder setTypeValue(int value) { - type_ = value; - onChanged(); - return this; - } - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - public Tango.PMR.Common.MessageTypeOuterClass.MessageType getType() { - Tango.PMR.Common.MessageTypeOuterClass.MessageType result = Tango.PMR.Common.MessageTypeOuterClass.MessageType.valueOf(type_); - return result == null ? Tango.PMR.Common.MessageTypeOuterClass.MessageType.UNRECOGNIZED : result; - } - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - public Builder setType(Tango.PMR.Common.MessageTypeOuterClass.MessageType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - * .Tango.PMR.Common.MessageType Type = 1; - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes Data = 2; - */ - public com.google.protobuf.ByteString getData() { - return data_; - } - /** - * bytes Data = 2; - */ - public Builder setData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - data_ = value; - onChanged(); - return this; - } - /** - * bytes Data = 2; - */ - public Builder clearData() { - - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:Tango.PMR.Common.MessageContainer) - } - - // @@protoc_insertion_point(class_scope:Tango.PMR.Common.MessageContainer) - private static final Tango.PMR.Common.MessageContainerOuterClass.MessageContainer DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Tango.PMR.Common.MessageContainerOuterClass.MessageContainer(); - } - - public static Tango.PMR.Common.MessageContainerOuterClass.MessageContainer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MessageContainer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MessageContainer(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public Tango.PMR.Common.MessageContainerOuterClass.MessageContainer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Tango_PMR_Common_MessageContainer_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026MessageContainer.proto\022\020Tango.PMR.Comm" + - "on\032\021MessageType.proto\"M\n\020MessageContaine" + - "r\022+\n\004Type\030\001 \001(\0162\035.Tango.PMR.Common.Messa" + - "geType\022\014\n\004Data\030\002 \001(\014b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - Tango.PMR.Common.MessageTypeOuterClass.getDescriptor(), - }, assigner); - internal_static_Tango_PMR_Common_MessageContainer_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Tango_PMR_Common_MessageContainer_descriptor, - new java.lang.String[] { "Type", "Data", }); - Tango.PMR.Common.MessageTypeOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageTypeOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageTypeOuterClass.java deleted file mode 100644 index dcdd6b0e3..000000000 --- a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/MessageTypeOuterClass.java +++ /dev/null @@ -1,152 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: MessageType.proto - -package Tango.PMR.Common; - -public final class MessageTypeOuterClass { - private MessageTypeOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * Protobuf enum {@code Tango.PMR.Common.MessageType} - */ - public enum MessageType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * RGB = 0; - */ - RGB(0), - /** - * Job = 1; - */ - Job(1), - /** - * Segment = 2; - */ - Segment(2), - UNRECOGNIZED(-1), - ; - - /** - * RGB = 0; - */ - public static final int RGB_VALUE = 0; - /** - * Job = 1; - */ - public static final int Job_VALUE = 1; - /** - * Segment = 2; - */ - public static final int Segment_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static MessageType valueOf(int value) { - return forNumber(value); - } - - public static MessageType forNumber(int value) { - switch (value) { - case 0: return RGB; - case 1: return Job; - case 2: return Segment; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - MessageType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public MessageType findValueByNumber(int number) { - return MessageType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return Tango.PMR.Common.MessageTypeOuterClass.getDescriptor().getEnumTypes().get(0); - } - - private static final MessageType[] VALUES = values(); - - public static MessageType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private MessageType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:Tango.PMR.Common.MessageType) - } - - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\021MessageType.proto\022\020Tango.PMR.Common*,\n" + - "\013MessageType\022\007\n\003RGB\020\000\022\007\n\003Job\020\001\022\013\n\007Segmen" + - "t\020\002b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/RGBOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/RGBOuterClass.java deleted file mode 100644 index 7838d31f6..000000000 --- a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Common/RGBOuterClass.java +++ /dev/null @@ -1,629 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: RGB.proto - -package Tango.PMR.Common; - -public final class RGBOuterClass { - private RGBOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface RGBOrBuilder extends - // @@protoc_insertion_point(interface_extends:Tango.PMR.Common.RGB) - com.google.protobuf.MessageOrBuilder { - - /** - * int32 R = 1; - */ - int getR(); - - /** - * int32 G = 2; - */ - int getG(); - - /** - * int32 B = 3; - */ - int getB(); - } - /** - * Protobuf type {@code Tango.PMR.Common.RGB} - */ - public static final class RGB extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:Tango.PMR.Common.RGB) - RGBOrBuilder { - private static final long serialVersionUID = 0L; - // Use RGB.newBuilder() to construct. - private RGB(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RGB() { - r_ = 0; - g_ = 0; - b_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RGB( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - - r_ = input.readInt32(); - break; - } - case 16: { - - g_ = input.readInt32(); - break; - } - case 24: { - - b_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Common.RGBOuterClass.RGB.class, Tango.PMR.Common.RGBOuterClass.RGB.Builder.class); - } - - public static final int R_FIELD_NUMBER = 1; - private int r_; - /** - * int32 R = 1; - */ - public int getR() { - return r_; - } - - public static final int G_FIELD_NUMBER = 2; - private int g_; - /** - * int32 G = 2; - */ - public int getG() { - return g_; - } - - public static final int B_FIELD_NUMBER = 3; - private int b_; - /** - * int32 B = 3; - */ - public int getB() { - return b_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (r_ != 0) { - output.writeInt32(1, r_); - } - if (g_ != 0) { - output.writeInt32(2, g_); - } - if (b_ != 0) { - output.writeInt32(3, b_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (r_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, r_); - } - if (g_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, g_); - } - if (b_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, b_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Tango.PMR.Common.RGBOuterClass.RGB)) { - return super.equals(obj); - } - Tango.PMR.Common.RGBOuterClass.RGB other = (Tango.PMR.Common.RGBOuterClass.RGB) obj; - - boolean result = true; - result = result && (getR() - == other.getR()); - result = result && (getG() - == other.getG()); - result = result && (getB() - == other.getB()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + R_FIELD_NUMBER; - hash = (53 * hash) + getR(); - hash = (37 * hash) + G_FIELD_NUMBER; - hash = (53 * hash) + getG(); - hash = (37 * hash) + B_FIELD_NUMBER; - hash = (53 * hash) + getB(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Common.RGBOuterClass.RGB parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Tango.PMR.Common.RGBOuterClass.RGB prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Tango.PMR.Common.RGB} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Tango.PMR.Common.RGB) - Tango.PMR.Common.RGBOuterClass.RGBOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Common.RGBOuterClass.RGB.class, Tango.PMR.Common.RGBOuterClass.RGB.Builder.class); - } - - // Construct using Tango.PMR.Common.RGBOuterClass.RGB.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - r_ = 0; - - g_ = 0; - - b_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Tango.PMR.Common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_descriptor; - } - - public Tango.PMR.Common.RGBOuterClass.RGB getDefaultInstanceForType() { - return Tango.PMR.Common.RGBOuterClass.RGB.getDefaultInstance(); - } - - public Tango.PMR.Common.RGBOuterClass.RGB build() { - Tango.PMR.Common.RGBOuterClass.RGB result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public Tango.PMR.Common.RGBOuterClass.RGB buildPartial() { - Tango.PMR.Common.RGBOuterClass.RGB result = new Tango.PMR.Common.RGBOuterClass.RGB(this); - result.r_ = r_; - result.g_ = g_; - result.b_ = b_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Tango.PMR.Common.RGBOuterClass.RGB) { - return mergeFrom((Tango.PMR.Common.RGBOuterClass.RGB)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Tango.PMR.Common.RGBOuterClass.RGB other) { - if (other == Tango.PMR.Common.RGBOuterClass.RGB.getDefaultInstance()) return this; - if (other.getR() != 0) { - setR(other.getR()); - } - if (other.getG() != 0) { - setG(other.getG()); - } - if (other.getB() != 0) { - setB(other.getB()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Tango.PMR.Common.RGBOuterClass.RGB parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Tango.PMR.Common.RGBOuterClass.RGB) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int r_ ; - /** - * int32 R = 1; - */ - public int getR() { - return r_; - } - /** - * int32 R = 1; - */ - public Builder setR(int value) { - - r_ = value; - onChanged(); - return this; - } - /** - * int32 R = 1; - */ - public Builder clearR() { - - r_ = 0; - onChanged(); - return this; - } - - private int g_ ; - /** - * int32 G = 2; - */ - public int getG() { - return g_; - } - /** - * int32 G = 2; - */ - public Builder setG(int value) { - - g_ = value; - onChanged(); - return this; - } - /** - * int32 G = 2; - */ - public Builder clearG() { - - g_ = 0; - onChanged(); - return this; - } - - private int b_ ; - /** - * int32 B = 3; - */ - public int getB() { - return b_; - } - /** - * int32 B = 3; - */ - public Builder setB(int value) { - - b_ = value; - onChanged(); - return this; - } - /** - * int32 B = 3; - */ - public Builder clearB() { - - b_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:Tango.PMR.Common.RGB) - } - - // @@protoc_insertion_point(class_scope:Tango.PMR.Common.RGB) - private static final Tango.PMR.Common.RGBOuterClass.RGB DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Tango.PMR.Common.RGBOuterClass.RGB(); - } - - public static Tango.PMR.Common.RGBOuterClass.RGB getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public RGB parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RGB(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public Tango.PMR.Common.RGBOuterClass.RGB getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Tango_PMR_Common_RGB_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Tango_PMR_Common_RGB_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\tRGB.proto\022\020Tango.PMR.Common\"&\n\003RGB\022\t\n\001" + - "R\030\001 \001(\005\022\t\n\001G\030\002 \001(\005\022\t\n\001B\030\003 \001(\005b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_Tango_PMR_Common_RGB_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_Tango_PMR_Common_RGB_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Tango_PMR_Common_RGB_descriptor, - new java.lang.String[] { "R", "G", "B", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/JobOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/JobOuterClass.java deleted file mode 100644 index 827ab3f95..000000000 --- a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/JobOuterClass.java +++ /dev/null @@ -1,952 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: Job.proto - -package Tango.PMR.Jobs; - -public final class JobOuterClass { - private JobOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface JobOrBuilder extends - // @@protoc_insertion_point(interface_extends:Tango.PMR.Jobs.Job) - com.google.protobuf.MessageOrBuilder { - - /** - * string Name = 1; - */ - java.lang.String getName(); - /** - * string Name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - java.util.List - getSegmentsList(); - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - Tango.PMR.Jobs.SegmentOuterClass.Segment getSegments(int index); - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - int getSegmentsCount(); - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - java.util.List - getSegmentsOrBuilderList(); - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - Tango.PMR.Jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( - int index); - } - /** - * Protobuf type {@code Tango.PMR.Jobs.Job} - */ - public static final class Job extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:Tango.PMR.Jobs.Job) - JobOrBuilder { - private static final long serialVersionUID = 0L; - // Use Job.newBuilder() to construct. - private Job(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Job() { - name_ = ""; - segments_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Job( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - segments_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - segments_.add( - input.readMessage(Tango.PMR.Jobs.SegmentOuterClass.Segment.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Jobs.JobOuterClass.Job.class, Tango.PMR.Jobs.JobOuterClass.Job.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * string Name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * string Name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SEGMENTS_FIELD_NUMBER = 2; - private java.util.List segments_; - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public java.util.List getSegmentsList() { - return segments_; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public java.util.List - getSegmentsOrBuilderList() { - return segments_; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public int getSegmentsCount() { - return segments_.size(); - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Tango.PMR.Jobs.SegmentOuterClass.Segment getSegments(int index) { - return segments_.get(index); - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Tango.PMR.Jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( - int index) { - return segments_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < segments_.size(); i++) { - output.writeMessage(2, segments_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < segments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, segments_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Tango.PMR.Jobs.JobOuterClass.Job)) { - return super.equals(obj); - } - Tango.PMR.Jobs.JobOuterClass.Job other = (Tango.PMR.Jobs.JobOuterClass.Job) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && getSegmentsList() - .equals(other.getSegmentsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getSegmentsCount() > 0) { - hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getSegmentsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Jobs.JobOuterClass.Job parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Tango.PMR.Jobs.JobOuterClass.Job prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Tango.PMR.Jobs.Job} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Tango.PMR.Jobs.Job) - Tango.PMR.Jobs.JobOuterClass.JobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Jobs.JobOuterClass.Job.class, Tango.PMR.Jobs.JobOuterClass.Job.Builder.class); - } - - // Construct using Tango.PMR.Jobs.JobOuterClass.Job.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSegmentsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - segmentsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Tango.PMR.Jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_descriptor; - } - - public Tango.PMR.Jobs.JobOuterClass.Job getDefaultInstanceForType() { - return Tango.PMR.Jobs.JobOuterClass.Job.getDefaultInstance(); - } - - public Tango.PMR.Jobs.JobOuterClass.Job build() { - Tango.PMR.Jobs.JobOuterClass.Job result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public Tango.PMR.Jobs.JobOuterClass.Job buildPartial() { - Tango.PMR.Jobs.JobOuterClass.Job result = new Tango.PMR.Jobs.JobOuterClass.Job(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (segmentsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - segments_ = java.util.Collections.unmodifiableList(segments_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.segments_ = segments_; - } else { - result.segments_ = segmentsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Tango.PMR.Jobs.JobOuterClass.Job) { - return mergeFrom((Tango.PMR.Jobs.JobOuterClass.Job)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Tango.PMR.Jobs.JobOuterClass.Job other) { - if (other == Tango.PMR.Jobs.JobOuterClass.Job.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (segmentsBuilder_ == null) { - if (!other.segments_.isEmpty()) { - if (segments_.isEmpty()) { - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSegmentsIsMutable(); - segments_.addAll(other.segments_); - } - onChanged(); - } - } else { - if (!other.segments_.isEmpty()) { - if (segmentsBuilder_.isEmpty()) { - segmentsBuilder_.dispose(); - segmentsBuilder_ = null; - segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000002); - segmentsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSegmentsFieldBuilder() : null; - } else { - segmentsBuilder_.addAllMessages(other.segments_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Tango.PMR.Jobs.JobOuterClass.Job parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Tango.PMR.Jobs.JobOuterClass.Job) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * string Name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string Name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string Name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string Name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string Name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.util.List segments_ = - java.util.Collections.emptyList(); - private void ensureSegmentsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - segments_ = new java.util.ArrayList(segments_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - Tango.PMR.Jobs.SegmentOuterClass.Segment, Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder, Tango.PMR.Jobs.SegmentOuterClass.SegmentOrBuilder> segmentsBuilder_; - - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public java.util.List getSegmentsList() { - if (segmentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(segments_); - } else { - return segmentsBuilder_.getMessageList(); - } - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public int getSegmentsCount() { - if (segmentsBuilder_ == null) { - return segments_.size(); - } else { - return segmentsBuilder_.getCount(); - } - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Tango.PMR.Jobs.SegmentOuterClass.Segment getSegments(int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); - } else { - return segmentsBuilder_.getMessage(index); - } - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder setSegments( - int index, Tango.PMR.Jobs.SegmentOuterClass.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.set(index, value); - onChanged(); - } else { - segmentsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder setSegments( - int index, Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.set(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder addSegments(Tango.PMR.Jobs.SegmentOuterClass.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.add(value); - onChanged(); - } else { - segmentsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder addSegments( - int index, Tango.PMR.Jobs.SegmentOuterClass.Segment value) { - if (segmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSegmentsIsMutable(); - segments_.add(index, value); - onChanged(); - } else { - segmentsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder addSegments( - Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder addSegments( - int index, Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder builderForValue) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.add(index, builderForValue.build()); - onChanged(); - } else { - segmentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder addAllSegments( - java.lang.Iterable values) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, segments_); - onChanged(); - } else { - segmentsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder clearSegments() { - if (segmentsBuilder_ == null) { - segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - segmentsBuilder_.clear(); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Builder removeSegments(int index) { - if (segmentsBuilder_ == null) { - ensureSegmentsIsMutable(); - segments_.remove(index); - onChanged(); - } else { - segmentsBuilder_.remove(index); - } - return this; - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder getSegmentsBuilder( - int index) { - return getSegmentsFieldBuilder().getBuilder(index); - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Tango.PMR.Jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( - int index) { - if (segmentsBuilder_ == null) { - return segments_.get(index); } else { - return segmentsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public java.util.List - getSegmentsOrBuilderList() { - if (segmentsBuilder_ != null) { - return segmentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(segments_); - } - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder addSegmentsBuilder() { - return getSegmentsFieldBuilder().addBuilder( - Tango.PMR.Jobs.SegmentOuterClass.Segment.getDefaultInstance()); - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder addSegmentsBuilder( - int index) { - return getSegmentsFieldBuilder().addBuilder( - index, Tango.PMR.Jobs.SegmentOuterClass.Segment.getDefaultInstance()); - } - /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; - */ - public java.util.List - getSegmentsBuilderList() { - return getSegmentsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - Tango.PMR.Jobs.SegmentOuterClass.Segment, Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder, Tango.PMR.Jobs.SegmentOuterClass.SegmentOrBuilder> - getSegmentsFieldBuilder() { - if (segmentsBuilder_ == null) { - segmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Tango.PMR.Jobs.SegmentOuterClass.Segment, Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder, Tango.PMR.Jobs.SegmentOuterClass.SegmentOrBuilder>( - segments_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - segments_ = null; - } - return segmentsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:Tango.PMR.Jobs.Job) - } - - // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.Job) - private static final Tango.PMR.Jobs.JobOuterClass.Job DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Tango.PMR.Jobs.JobOuterClass.Job(); - } - - public static Tango.PMR.Jobs.JobOuterClass.Job getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Job parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Job(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public Tango.PMR.Jobs.JobOuterClass.Job getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Tango_PMR_Jobs_Job_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\tJob.proto\022\016Tango.PMR.Jobs\032\rSegment.pro" + - "to\">\n\003Job\022\014\n\004Name\030\001 \001(\t\022)\n\010Segments\030\002 \003(" + - "\0132\027.Tango.PMR.Jobs.Segmentb\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - Tango.PMR.Jobs.SegmentOuterClass.getDescriptor(), - }, assigner); - internal_static_Tango_PMR_Jobs_Job_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Tango_PMR_Jobs_Job_descriptor, - new java.lang.String[] { "Name", "Segments", }); - Tango.PMR.Jobs.SegmentOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/SegmentOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/SegmentOuterClass.java deleted file mode 100644 index bca42e8b0..000000000 --- a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/Jobs/SegmentOuterClass.java +++ /dev/null @@ -1,838 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: Segment.proto - -package Tango.PMR.Jobs; - -public final class SegmentOuterClass { - private SegmentOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface SegmentOrBuilder extends - // @@protoc_insertion_point(interface_extends:Tango.PMR.Jobs.Segment) - com.google.protobuf.MessageOrBuilder { - - /** - * string Name = 1; - */ - java.lang.String getName(); - /** - * string Name = 1; - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * int32 Length = 2; - */ - int getLength(); - - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - boolean hasColor(); - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - Tango.PMR.Common.RGBOuterClass.RGB getColor(); - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - Tango.PMR.Common.RGBOuterClass.RGBOrBuilder getColorOrBuilder(); - } - /** - * Protobuf type {@code Tango.PMR.Jobs.Segment} - */ - public static final class Segment extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:Tango.PMR.Jobs.Segment) - SegmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Segment.newBuilder() to construct. - private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Segment() { - name_ = ""; - length_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Segment( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - length_ = input.readInt32(); - break; - } - case 26: { - Tango.PMR.Common.RGBOuterClass.RGB.Builder subBuilder = null; - if (color_ != null) { - subBuilder = color_.toBuilder(); - } - color_ = input.readMessage(Tango.PMR.Common.RGBOuterClass.RGB.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(color_); - color_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Jobs.SegmentOuterClass.Segment.class, Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * string Name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * string Name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LENGTH_FIELD_NUMBER = 2; - private int length_; - /** - * int32 Length = 2; - */ - public int getLength() { - return length_; - } - - public static final int COLOR_FIELD_NUMBER = 3; - private Tango.PMR.Common.RGBOuterClass.RGB color_; - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public boolean hasColor() { - return color_ != null; - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Tango.PMR.Common.RGBOuterClass.RGB getColor() { - return color_ == null ? Tango.PMR.Common.RGBOuterClass.RGB.getDefaultInstance() : color_; - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Tango.PMR.Common.RGBOuterClass.RGBOrBuilder getColorOrBuilder() { - return getColor(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (length_ != 0) { - output.writeInt32(2, length_); - } - if (color_ != null) { - output.writeMessage(3, getColor()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (length_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, length_); - } - if (color_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getColor()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof Tango.PMR.Jobs.SegmentOuterClass.Segment)) { - return super.equals(obj); - } - Tango.PMR.Jobs.SegmentOuterClass.Segment other = (Tango.PMR.Jobs.SegmentOuterClass.Segment) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && (getLength() - == other.getLength()); - result = result && (hasColor() == other.hasColor()); - if (hasColor()) { - result = result && getColor() - .equals(other.getColor()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + LENGTH_FIELD_NUMBER; - hash = (53 * hash) + getLength(); - if (hasColor()) { - hash = (37 * hash) + COLOR_FIELD_NUMBER; - hash = (53 * hash) + getColor().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static Tango.PMR.Jobs.SegmentOuterClass.Segment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(Tango.PMR.Jobs.SegmentOuterClass.Segment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Tango.PMR.Jobs.Segment} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Tango.PMR.Jobs.Segment) - Tango.PMR.Jobs.SegmentOuterClass.SegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Tango.PMR.Jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Tango.PMR.Jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Tango.PMR.Jobs.SegmentOuterClass.Segment.class, Tango.PMR.Jobs.SegmentOuterClass.Segment.Builder.class); - } - - // Construct using Tango.PMR.Jobs.SegmentOuterClass.Segment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - length_ = 0; - - if (colorBuilder_ == null) { - color_ = null; - } else { - color_ = null; - colorBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Tango.PMR.Jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_descriptor; - } - - public Tango.PMR.Jobs.SegmentOuterClass.Segment getDefaultInstanceForType() { - return Tango.PMR.Jobs.SegmentOuterClass.Segment.getDefaultInstance(); - } - - public Tango.PMR.Jobs.SegmentOuterClass.Segment build() { - Tango.PMR.Jobs.SegmentOuterClass.Segment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public Tango.PMR.Jobs.SegmentOuterClass.Segment buildPartial() { - Tango.PMR.Jobs.SegmentOuterClass.Segment result = new Tango.PMR.Jobs.SegmentOuterClass.Segment(this); - result.name_ = name_; - result.length_ = length_; - if (colorBuilder_ == null) { - result.color_ = color_; - } else { - result.color_ = colorBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Tango.PMR.Jobs.SegmentOuterClass.Segment) { - return mergeFrom((Tango.PMR.Jobs.SegmentOuterClass.Segment)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(Tango.PMR.Jobs.SegmentOuterClass.Segment other) { - if (other == Tango.PMR.Jobs.SegmentOuterClass.Segment.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getLength() != 0) { - setLength(other.getLength()); - } - if (other.hasColor()) { - mergeColor(other.getColor()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Tango.PMR.Jobs.SegmentOuterClass.Segment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Tango.PMR.Jobs.SegmentOuterClass.Segment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * string Name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string Name = 1; - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string Name = 1; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * string Name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * string Name = 1; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private int length_ ; - /** - * int32 Length = 2; - */ - public int getLength() { - return length_; - } - /** - * int32 Length = 2; - */ - public Builder setLength(int value) { - - length_ = value; - onChanged(); - return this; - } - /** - * int32 Length = 2; - */ - public Builder clearLength() { - - length_ = 0; - onChanged(); - return this; - } - - private Tango.PMR.Common.RGBOuterClass.RGB color_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - Tango.PMR.Common.RGBOuterClass.RGB, Tango.PMR.Common.RGBOuterClass.RGB.Builder, Tango.PMR.Common.RGBOuterClass.RGBOrBuilder> colorBuilder_; - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public boolean hasColor() { - return colorBuilder_ != null || color_ != null; - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Tango.PMR.Common.RGBOuterClass.RGB getColor() { - if (colorBuilder_ == null) { - return color_ == null ? Tango.PMR.Common.RGBOuterClass.RGB.getDefaultInstance() : color_; - } else { - return colorBuilder_.getMessage(); - } - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Builder setColor(Tango.PMR.Common.RGBOuterClass.RGB value) { - if (colorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - color_ = value; - onChanged(); - } else { - colorBuilder_.setMessage(value); - } - - return this; - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Builder setColor( - Tango.PMR.Common.RGBOuterClass.RGB.Builder builderForValue) { - if (colorBuilder_ == null) { - color_ = builderForValue.build(); - onChanged(); - } else { - colorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Builder mergeColor(Tango.PMR.Common.RGBOuterClass.RGB value) { - if (colorBuilder_ == null) { - if (color_ != null) { - color_ = - Tango.PMR.Common.RGBOuterClass.RGB.newBuilder(color_).mergeFrom(value).buildPartial(); - } else { - color_ = value; - } - onChanged(); - } else { - colorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Builder clearColor() { - if (colorBuilder_ == null) { - color_ = null; - onChanged(); - } else { - color_ = null; - colorBuilder_ = null; - } - - return this; - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Tango.PMR.Common.RGBOuterClass.RGB.Builder getColorBuilder() { - - onChanged(); - return getColorFieldBuilder().getBuilder(); - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - public Tango.PMR.Common.RGBOuterClass.RGBOrBuilder getColorOrBuilder() { - if (colorBuilder_ != null) { - return colorBuilder_.getMessageOrBuilder(); - } else { - return color_ == null ? - Tango.PMR.Common.RGBOuterClass.RGB.getDefaultInstance() : color_; - } - } - /** - * .Tango.PMR.Common.RGB Color = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - Tango.PMR.Common.RGBOuterClass.RGB, Tango.PMR.Common.RGBOuterClass.RGB.Builder, Tango.PMR.Common.RGBOuterClass.RGBOrBuilder> - getColorFieldBuilder() { - if (colorBuilder_ == null) { - colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - Tango.PMR.Common.RGBOuterClass.RGB, Tango.PMR.Common.RGBOuterClass.RGB.Builder, Tango.PMR.Common.RGBOuterClass.RGBOrBuilder>( - getColor(), - getParentForChildren(), - isClean()); - color_ = null; - } - return colorBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:Tango.PMR.Jobs.Segment) - } - - // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.Segment) - private static final Tango.PMR.Jobs.SegmentOuterClass.Segment DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new Tango.PMR.Jobs.SegmentOuterClass.Segment(); - } - - public static Tango.PMR.Jobs.SegmentOuterClass.Segment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Segment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Segment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public Tango.PMR.Jobs.SegmentOuterClass.Segment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Tango_PMR_Jobs_Segment_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\rSegment.proto\022\016Tango.PMR.Jobs\032\tRGB.pro" + - "to\"M\n\007Segment\022\014\n\004Name\030\001 \001(\t\022\016\n\006Length\030\002 " + - "\001(\005\022$\n\005Color\030\003 \001(\0132\025.Tango.PMR.Common.RG" + - "Bb\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - Tango.PMR.Common.RGBOuterClass.getDescriptor(), - }, assigner); - internal_static_Tango_PMR_Jobs_Segment_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Tango_PMR_Jobs_Segment_descriptor, - new java.lang.String[] { "Name", "Length", "Color", }); - Tango.PMR.Common.RGBOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/dummyClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/dummyClass.java deleted file mode 100644 index f1cfd7e74..000000000 --- a/Software/Android-Studio/Tango.PMR/src/main/java/Tango/PMR/dummyClass.java +++ /dev/null @@ -1,5 +0,0 @@ -package Tango.PMR; - -public class dummyClass { - -} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java new file mode 100644 index 000000000..6e6a3df01 --- /dev/null +++ b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java @@ -0,0 +1,603 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MessageContainer.proto + +package com.twine.tango.pmr.common; + +public final class MessageContainerOuterClass { + private MessageContainerOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface MessageContainerOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Common.MessageContainer) + com.google.protobuf.MessageOrBuilder { + + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + int getTypeValue(); + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType getType(); + + /** + * bytes Data = 2; + */ + com.google.protobuf.ByteString getData(); + } + /** + * Protobuf type {@code Tango.PMR.Common.MessageContainer} + */ + public static final class MessageContainer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Common.MessageContainer) + MessageContainerOrBuilder { + private static final long serialVersionUID = 0L; + // Use MessageContainer.newBuilder() to construct. + private MessageContainer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MessageContainer() { + type_ = 0; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MessageContainer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: { + + data_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer.class, com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + public int getTypeValue() { + return type_; + } + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + public com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType getType() { + com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType result = com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType.valueOf(type_); + return result == null ? com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType.UNRECOGNIZED : result; + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_; + /** + * bytes Data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType.RGB.getNumber()) { + output.writeEnum(1, type_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType.RGB.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, data_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer)) { + return super.equals(obj); + } + com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer other = (com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer) obj; + + boolean result = true; + result = result && type_ == other.type_; + result = result && getData() + .equals(other.getData()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Common.MessageContainer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Common.MessageContainer) + com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer.class, com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer.Builder.class); + } + + // Construct using com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + type_ = 0; + + data_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.common.MessageContainerOuterClass.internal_static_Tango_PMR_Common_MessageContainer_descriptor; + } + + public com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer getDefaultInstanceForType() { + return com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer.getDefaultInstance(); + } + + public com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer build() { + com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer buildPartial() { + com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer result = new com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer(this); + result.type_ = type_; + result.data_ = data_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer) { + return mergeFrom((com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer other) { + if (other == com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + public int getTypeValue() { + return type_; + } + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + public com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType getType() { + com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType result = com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType.valueOf(type_); + return result == null ? com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType.UNRECOGNIZED : result; + } + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + public Builder setType(com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Tango.PMR.Common.MessageType Type = 1; + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes Data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + * bytes Data = 2; + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + * bytes Data = 2; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Common.MessageContainer) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Common.MessageContainer) + private static final com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer(); + } + + public static com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MessageContainer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MessageContainer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Common_MessageContainer_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026MessageContainer.proto\022\020Tango.PMR.Comm" + + "on\032\021MessageType.proto\"M\n\020MessageContaine" + + "r\022+\n\004Type\030\001 \001(\0162\035.Tango.PMR.Common.Messa" + + "geType\022\014\n\004Data\030\002 \001(\014B\034\n\032com.twine.tango." + + "pmr.commonb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.twine.tango.pmr.common.MessageTypeOuterClass.getDescriptor(), + }, assigner); + internal_static_Tango_PMR_Common_MessageContainer_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Common_MessageContainer_descriptor, + new java.lang.String[] { "Type", "Data", }); + com.twine.tango.pmr.common.MessageTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java new file mode 100644 index 000000000..c34d789d0 --- /dev/null +++ b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java @@ -0,0 +1,153 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MessageType.proto + +package com.twine.tango.pmr.common; + +public final class MessageTypeOuterClass { + private MessageTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code Tango.PMR.Common.MessageType} + */ + public enum MessageType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * RGB = 0; + */ + RGB(0), + /** + * Job = 1; + */ + Job(1), + /** + * Segment = 2; + */ + Segment(2), + UNRECOGNIZED(-1), + ; + + /** + * RGB = 0; + */ + public static final int RGB_VALUE = 0; + /** + * Job = 1; + */ + public static final int Job_VALUE = 1; + /** + * Segment = 2; + */ + public static final int Segment_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MessageType valueOf(int value) { + return forNumber(value); + } + + public static MessageType forNumber(int value) { + switch (value) { + case 0: return RGB; + case 1: return Job; + case 2: return Segment; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MessageType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MessageType findValueByNumber(int number) { + return MessageType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.twine.tango.pmr.common.MessageTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final MessageType[] VALUES = values(); + + public static MessageType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MessageType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:Tango.PMR.Common.MessageType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021MessageType.proto\022\020Tango.PMR.Common*,\n" + + "\013MessageType\022\007\n\003RGB\020\000\022\007\n\003Job\020\001\022\013\n\007Segmen" + + "t\020\002B\034\n\032com.twine.tango.pmr.commonb\006proto" + + "3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/RGBOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/RGBOuterClass.java new file mode 100644 index 000000000..4e751dd48 --- /dev/null +++ b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/RGBOuterClass.java @@ -0,0 +1,630 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: RGB.proto + +package com.twine.tango.pmr.common; + +public final class RGBOuterClass { + private RGBOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RGBOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Common.RGB) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 R = 1; + */ + int getR(); + + /** + * int32 G = 2; + */ + int getG(); + + /** + * int32 B = 3; + */ + int getB(); + } + /** + * Protobuf type {@code Tango.PMR.Common.RGB} + */ + public static final class RGB extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Common.RGB) + RGBOrBuilder { + private static final long serialVersionUID = 0L; + // Use RGB.newBuilder() to construct. + private RGB(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RGB() { + r_ = 0; + g_ = 0; + b_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RGB( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + r_ = input.readInt32(); + break; + } + case 16: { + + g_ = input.readInt32(); + break; + } + case 24: { + + b_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.common.RGBOuterClass.RGB.class, com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder.class); + } + + public static final int R_FIELD_NUMBER = 1; + private int r_; + /** + * int32 R = 1; + */ + public int getR() { + return r_; + } + + public static final int G_FIELD_NUMBER = 2; + private int g_; + /** + * int32 G = 2; + */ + public int getG() { + return g_; + } + + public static final int B_FIELD_NUMBER = 3; + private int b_; + /** + * int32 B = 3; + */ + public int getB() { + return b_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (r_ != 0) { + output.writeInt32(1, r_); + } + if (g_ != 0) { + output.writeInt32(2, g_); + } + if (b_ != 0) { + output.writeInt32(3, b_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (r_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, r_); + } + if (g_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, g_); + } + if (b_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, b_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.common.RGBOuterClass.RGB)) { + return super.equals(obj); + } + com.twine.tango.pmr.common.RGBOuterClass.RGB other = (com.twine.tango.pmr.common.RGBOuterClass.RGB) obj; + + boolean result = true; + result = result && (getR() + == other.getR()); + result = result && (getG() + == other.getG()); + result = result && (getB() + == other.getB()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + R_FIELD_NUMBER; + hash = (53 * hash) + getR(); + hash = (37 * hash) + G_FIELD_NUMBER; + hash = (53 * hash) + getG(); + hash = (37 * hash) + B_FIELD_NUMBER; + hash = (53 * hash) + getB(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.common.RGBOuterClass.RGB parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.common.RGBOuterClass.RGB prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Common.RGB} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Common.RGB) + com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.common.RGBOuterClass.RGB.class, com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder.class); + } + + // Construct using com.twine.tango.pmr.common.RGBOuterClass.RGB.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + r_ = 0; + + g_ = 0; + + b_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.common.RGBOuterClass.internal_static_Tango_PMR_Common_RGB_descriptor; + } + + public com.twine.tango.pmr.common.RGBOuterClass.RGB getDefaultInstanceForType() { + return com.twine.tango.pmr.common.RGBOuterClass.RGB.getDefaultInstance(); + } + + public com.twine.tango.pmr.common.RGBOuterClass.RGB build() { + com.twine.tango.pmr.common.RGBOuterClass.RGB result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.common.RGBOuterClass.RGB buildPartial() { + com.twine.tango.pmr.common.RGBOuterClass.RGB result = new com.twine.tango.pmr.common.RGBOuterClass.RGB(this); + result.r_ = r_; + result.g_ = g_; + result.b_ = b_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.common.RGBOuterClass.RGB) { + return mergeFrom((com.twine.tango.pmr.common.RGBOuterClass.RGB)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.common.RGBOuterClass.RGB other) { + if (other == com.twine.tango.pmr.common.RGBOuterClass.RGB.getDefaultInstance()) return this; + if (other.getR() != 0) { + setR(other.getR()); + } + if (other.getG() != 0) { + setG(other.getG()); + } + if (other.getB() != 0) { + setB(other.getB()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.common.RGBOuterClass.RGB parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.common.RGBOuterClass.RGB) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int r_ ; + /** + * int32 R = 1; + */ + public int getR() { + return r_; + } + /** + * int32 R = 1; + */ + public Builder setR(int value) { + + r_ = value; + onChanged(); + return this; + } + /** + * int32 R = 1; + */ + public Builder clearR() { + + r_ = 0; + onChanged(); + return this; + } + + private int g_ ; + /** + * int32 G = 2; + */ + public int getG() { + return g_; + } + /** + * int32 G = 2; + */ + public Builder setG(int value) { + + g_ = value; + onChanged(); + return this; + } + /** + * int32 G = 2; + */ + public Builder clearG() { + + g_ = 0; + onChanged(); + return this; + } + + private int b_ ; + /** + * int32 B = 3; + */ + public int getB() { + return b_; + } + /** + * int32 B = 3; + */ + public Builder setB(int value) { + + b_ = value; + onChanged(); + return this; + } + /** + * int32 B = 3; + */ + public Builder clearB() { + + b_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Common.RGB) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Common.RGB) + private static final com.twine.tango.pmr.common.RGBOuterClass.RGB DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.common.RGBOuterClass.RGB(); + } + + public static com.twine.tango.pmr.common.RGBOuterClass.RGB getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RGB parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RGB(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.common.RGBOuterClass.RGB getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Common_RGB_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Common_RGB_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\tRGB.proto\022\020Tango.PMR.Common\"&\n\003RGB\022\t\n\001" + + "R\030\001 \001(\005\022\t\n\001G\030\002 \001(\005\022\t\n\001B\030\003 \001(\005B\034\n\032com.twi" + + "ne.tango.pmr.commonb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Tango_PMR_Common_RGB_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Common_RGB_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Common_RGB_descriptor, + new java.lang.String[] { "R", "G", "B", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java new file mode 100644 index 000000000..79c17d6a8 --- /dev/null +++ b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java @@ -0,0 +1,953 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Job.proto + +package com.twine.tango.pmr.jobs; + +public final class JobOuterClass { + private JobOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface JobOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Jobs.Job) + com.google.protobuf.MessageOrBuilder { + + /** + * string Name = 1; + */ + java.lang.String getName(); + /** + * string Name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + java.util.List + getSegmentsList(); + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getSegments(int index); + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + int getSegmentsCount(); + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + java.util.List + getSegmentsOrBuilderList(); + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( + int index); + } + /** + * Protobuf type {@code Tango.PMR.Jobs.Job} + */ + public static final class Job extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Jobs.Job) + JobOrBuilder { + private static final long serialVersionUID = 0L; + // Use Job.newBuilder() to construct. + private Job(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Job() { + name_ = ""; + segments_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Job( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + segments_.add( + input.readMessage(com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.JobOuterClass.Job.class, com.twine.tango.pmr.jobs.JobOuterClass.Job.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * string Name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string Name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEGMENTS_FIELD_NUMBER = 2; + private java.util.List segments_; + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public java.util.List getSegmentsList() { + return segments_; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public java.util.List + getSegmentsOrBuilderList() { + return segments_; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public int getSegmentsCount() { + return segments_.size(); + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getSegments(int index) { + return segments_.get(index); + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( + int index) { + return segments_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(2, segments_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, segments_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.jobs.JobOuterClass.Job)) { + return super.equals(obj); + } + com.twine.tango.pmr.jobs.JobOuterClass.Job other = (com.twine.tango.pmr.jobs.JobOuterClass.Job) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && getSegmentsList() + .equals(other.getSegmentsList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.JobOuterClass.Job parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.jobs.JobOuterClass.Job prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Jobs.Job} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Jobs.Job) + com.twine.tango.pmr.jobs.JobOuterClass.JobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.JobOuterClass.Job.class, com.twine.tango.pmr.jobs.JobOuterClass.Job.Builder.class); + } + + // Construct using com.twine.tango.pmr.jobs.JobOuterClass.Job.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSegmentsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + segmentsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.jobs.JobOuterClass.internal_static_Tango_PMR_Jobs_Job_descriptor; + } + + public com.twine.tango.pmr.jobs.JobOuterClass.Job getDefaultInstanceForType() { + return com.twine.tango.pmr.jobs.JobOuterClass.Job.getDefaultInstance(); + } + + public com.twine.tango.pmr.jobs.JobOuterClass.Job build() { + com.twine.tango.pmr.jobs.JobOuterClass.Job result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.jobs.JobOuterClass.Job buildPartial() { + com.twine.tango.pmr.jobs.JobOuterClass.Job result = new com.twine.tango.pmr.jobs.JobOuterClass.Job(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.jobs.JobOuterClass.Job) { + return mergeFrom((com.twine.tango.pmr.jobs.JobOuterClass.Job)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.jobs.JobOuterClass.Job other) { + if (other == com.twine.tango.pmr.jobs.JobOuterClass.Job.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000002); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSegmentsFieldBuilder() : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.jobs.JobOuterClass.Job parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.jobs.JobOuterClass.Job) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string Name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string Name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string Name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string Name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string Name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List segments_ = + java.util.Collections.emptyList(); + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + segments_ = new java.util.ArrayList(segments_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder, com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder> segmentsBuilder_; + + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public java.util.List getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getSegments(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder setSegments( + int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder setSegments( + int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder addSegments(com.twine.tango.pmr.jobs.SegmentOuterClass.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder addSegments( + int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder addSegments( + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder addSegments( + int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder addAllSegments( + java.lang.Iterable values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, segments_); + onChanged(); + } else { + segmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + segmentsBuilder_.clear(); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder getSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder().getBuilder(index); + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( + int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); } else { + return segmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public java.util.List + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder addSegmentsBuilder() { + return getSegmentsFieldBuilder().addBuilder( + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder addSegmentsBuilder( + int index) { + return getSegmentsFieldBuilder().addBuilder( + index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 2; + */ + public java.util.List + getSegmentsBuilderList() { + return getSegmentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder, com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder> + getSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder, com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder>( + segments_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + segments_ = null; + } + return segmentsBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Jobs.Job) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.Job) + private static final com.twine.tango.pmr.jobs.JobOuterClass.Job DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.jobs.JobOuterClass.Job(); + } + + public static com.twine.tango.pmr.jobs.JobOuterClass.Job getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Job parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Job(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.jobs.JobOuterClass.Job getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Jobs_Job_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\tJob.proto\022\016Tango.PMR.Jobs\032\rSegment.pro" + + "to\">\n\003Job\022\014\n\004Name\030\001 \001(\t\022)\n\010Segments\030\002 \003(" + + "\0132\027.Tango.PMR.Jobs.SegmentB\032\n\030com.twine." + + "tango.pmr.jobsb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.twine.tango.pmr.jobs.SegmentOuterClass.getDescriptor(), + }, assigner); + internal_static_Tango_PMR_Jobs_Job_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Jobs_Job_descriptor, + new java.lang.String[] { "Name", "Segments", }); + com.twine.tango.pmr.jobs.SegmentOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java new file mode 100644 index 000000000..eb19e884e --- /dev/null +++ b/Software/Android-Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java @@ -0,0 +1,838 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Segment.proto + +package com.twine.tango.pmr.jobs; + +public final class SegmentOuterClass { + private SegmentOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SegmentOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Jobs.Segment) + com.google.protobuf.MessageOrBuilder { + + /** + * string Name = 1; + */ + java.lang.String getName(); + /** + * string Name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * int32 Length = 2; + */ + int getLength(); + + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + boolean hasColor(); + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + com.twine.tango.pmr.common.RGBOuterClass.RGB getColor(); + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder getColorOrBuilder(); + } + /** + * Protobuf type {@code Tango.PMR.Jobs.Segment} + */ + public static final class Segment extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Jobs.Segment) + SegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Segment.newBuilder() to construct. + private Segment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Segment() { + name_ = ""; + length_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Segment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + length_ = input.readInt32(); + break; + } + case 26: { + com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder subBuilder = null; + if (color_ != null) { + subBuilder = color_.toBuilder(); + } + color_ = input.readMessage(com.twine.tango.pmr.common.RGBOuterClass.RGB.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(color_); + color_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.class, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * string Name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string Name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LENGTH_FIELD_NUMBER = 2; + private int length_; + /** + * int32 Length = 2; + */ + public int getLength() { + return length_; + } + + public static final int COLOR_FIELD_NUMBER = 3; + private com.twine.tango.pmr.common.RGBOuterClass.RGB color_; + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public boolean hasColor() { + return color_ != null; + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public com.twine.tango.pmr.common.RGBOuterClass.RGB getColor() { + return color_ == null ? com.twine.tango.pmr.common.RGBOuterClass.RGB.getDefaultInstance() : color_; + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder getColorOrBuilder() { + return getColor(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (length_ != 0) { + output.writeInt32(2, length_); + } + if (color_ != null) { + output.writeMessage(3, getColor()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (length_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, length_); + } + if (color_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getColor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.jobs.SegmentOuterClass.Segment)) { + return super.equals(obj); + } + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment other = (com.twine.tango.pmr.jobs.SegmentOuterClass.Segment) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (getLength() + == other.getLength()); + result = result && (hasColor() == other.hasColor()); + if (hasColor()) { + result = result && getColor() + .equals(other.getColor()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getLength(); + if (hasColor()) { + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.jobs.SegmentOuterClass.Segment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Jobs.Segment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Jobs.Segment) + com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.class, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder.class); + } + + // Construct using com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + length_ = 0; + + if (colorBuilder_ == null) { + color_ = null; + } else { + color_ = null; + colorBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.jobs.SegmentOuterClass.internal_static_Tango_PMR_Jobs_Segment_descriptor; + } + + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getDefaultInstanceForType() { + return com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.getDefaultInstance(); + } + + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment build() { + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment buildPartial() { + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment result = new com.twine.tango.pmr.jobs.SegmentOuterClass.Segment(this); + result.name_ = name_; + result.length_ = length_; + if (colorBuilder_ == null) { + result.color_ = color_; + } else { + result.color_ = colorBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.jobs.SegmentOuterClass.Segment) { + return mergeFrom((com.twine.tango.pmr.jobs.SegmentOuterClass.Segment)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.jobs.SegmentOuterClass.Segment other) { + if (other == com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getLength() != 0) { + setLength(other.getLength()); + } + if (other.hasColor()) { + mergeColor(other.getColor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.jobs.SegmentOuterClass.Segment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.jobs.SegmentOuterClass.Segment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * string Name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string Name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string Name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string Name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string Name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int length_ ; + /** + * int32 Length = 2; + */ + public int getLength() { + return length_; + } + /** + * int32 Length = 2; + */ + public Builder setLength(int value) { + + length_ = value; + onChanged(); + return this; + } + /** + * int32 Length = 2; + */ + public Builder clearLength() { + + length_ = 0; + onChanged(); + return this; + } + + private com.twine.tango.pmr.common.RGBOuterClass.RGB color_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.common.RGBOuterClass.RGB, com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder, com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder> colorBuilder_; + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public boolean hasColor() { + return colorBuilder_ != null || color_ != null; + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public com.twine.tango.pmr.common.RGBOuterClass.RGB getColor() { + if (colorBuilder_ == null) { + return color_ == null ? com.twine.tango.pmr.common.RGBOuterClass.RGB.getDefaultInstance() : color_; + } else { + return colorBuilder_.getMessage(); + } + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public Builder setColor(com.twine.tango.pmr.common.RGBOuterClass.RGB value) { + if (colorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + color_ = value; + onChanged(); + } else { + colorBuilder_.setMessage(value); + } + + return this; + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public Builder setColor( + com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder builderForValue) { + if (colorBuilder_ == null) { + color_ = builderForValue.build(); + onChanged(); + } else { + colorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public Builder mergeColor(com.twine.tango.pmr.common.RGBOuterClass.RGB value) { + if (colorBuilder_ == null) { + if (color_ != null) { + color_ = + com.twine.tango.pmr.common.RGBOuterClass.RGB.newBuilder(color_).mergeFrom(value).buildPartial(); + } else { + color_ = value; + } + onChanged(); + } else { + colorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public Builder clearColor() { + if (colorBuilder_ == null) { + color_ = null; + onChanged(); + } else { + color_ = null; + colorBuilder_ = null; + } + + return this; + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder getColorBuilder() { + + onChanged(); + return getColorFieldBuilder().getBuilder(); + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + public com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder getColorOrBuilder() { + if (colorBuilder_ != null) { + return colorBuilder_.getMessageOrBuilder(); + } else { + return color_ == null ? + com.twine.tango.pmr.common.RGBOuterClass.RGB.getDefaultInstance() : color_; + } + } + /** + * .Tango.PMR.Common.RGB Color = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.common.RGBOuterClass.RGB, com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder, com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder> + getColorFieldBuilder() { + if (colorBuilder_ == null) { + colorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.common.RGBOuterClass.RGB, com.twine.tango.pmr.common.RGBOuterClass.RGB.Builder, com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder>( + getColor(), + getParentForChildren(), + isClean()); + color_ = null; + } + return colorBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Jobs.Segment) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.Segment) + private static final com.twine.tango.pmr.jobs.SegmentOuterClass.Segment DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.jobs.SegmentOuterClass.Segment(); + } + + public static com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Segment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Segment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Jobs_Segment_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\rSegment.proto\022\016Tango.PMR.Jobs\032\tRGB.pro" + + "to\"M\n\007Segment\022\014\n\004Name\030\001 \001(\t\022\016\n\006Length\030\002 " + + "\001(\005\022$\n\005Color\030\003 \001(\0132\025.Tango.PMR.Common.RG" + + "BB\032\n\030com.twine.tango.pmr.jobsb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.twine.tango.pmr.common.RGBOuterClass.getDescriptor(), + }, assigner); + internal_static_Tango_PMR_Jobs_Segment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Jobs_Segment_descriptor, + new java.lang.String[] { "Name", "Length", "Color", }); + com.twine.tango.pmr.common.RGBOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android-Studio/app/src/test/java/com/twine/tango/PMR_TST.java b/Software/Android-Studio/app/src/test/java/com/twine/tango/PMR_TST.java index e37996343..78799bc74 100644 --- a/Software/Android-Studio/app/src/test/java/com/twine/tango/PMR_TST.java +++ b/Software/Android-Studio/app/src/test/java/com/twine/tango/PMR_TST.java @@ -2,11 +2,11 @@ package com.twine.tango; import org.junit.Test; -import Tango.PMR.Common.MessageContainerOuterClass.MessageContainer; -import Tango.PMR.Common.MessageTypeOuterClass.MessageType; -import Tango.PMR.Common.RGBOuterClass.RGB; -import Tango.PMR.Jobs.JobOuterClass.Job; -import Tango.PMR.Jobs.SegmentOuterClass.Segment; +import com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer; +import com.twine.tango.pmr.common.MessageTypeOuterClass.MessageType; +import com.twine.tango.pmr.common.RGBOuterClass.RGB; +import com.twine.tango.pmr.jobs.JobOuterClass.Job; +import com.twine.tango.pmr.jobs.SegmentOuterClass.Segment; import static org.junit.Assert.assertEquals; diff --git a/Software/PMR/Messages/Common/MessageContainer.proto b/Software/PMR/Messages/Common/MessageContainer.proto index 319f3fd8f..ac76d28dd 100644 --- a/Software/PMR/Messages/Common/MessageContainer.proto +++ b/Software/PMR/Messages/Common/MessageContainer.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package Tango.PMR.Common; +option java_package = "com.twine.tango.pmr.common"; import "MessageType.proto"; diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index a4e84b9b1..f1a284679 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package Tango.PMR.Common; +option java_package = "com.twine.tango.pmr.common"; enum MessageType { diff --git a/Software/PMR/Messages/Common/RGB.proto b/Software/PMR/Messages/Common/RGB.proto index 827c362c4..aefc6dc0a 100644 --- a/Software/PMR/Messages/Common/RGB.proto +++ b/Software/PMR/Messages/Common/RGB.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package Tango.PMR.Common; +option java_package = "com.twine.tango.pmr.common"; message RGB { diff --git a/Software/PMR/Messages/Jobs/Job.proto b/Software/PMR/Messages/Jobs/Job.proto index 13e5a91aa..29f3b112b 100644 --- a/Software/PMR/Messages/Jobs/Job.proto +++ b/Software/PMR/Messages/Jobs/Job.proto @@ -3,6 +3,7 @@ syntax = "proto3"; import "Segment.proto"; package Tango.PMR.Jobs; +option java_package = "com.twine.tango.pmr.jobs"; message Job { diff --git a/Software/PMR/Messages/Jobs/Segment.proto b/Software/PMR/Messages/Jobs/Segment.proto index 14986170f..1e608aae9 100644 --- a/Software/PMR/Messages/Jobs/Segment.proto +++ b/Software/PMR/Messages/Jobs/Segment.proto @@ -3,6 +3,7 @@ syntax = "proto3"; import "RGB.proto"; package Tango.PMR.Jobs; +option java_package = "com.twine.tango.pmr.jobs"; message Segment diff --git a/Software/Visual Studio/Tango.Core/ExtensionMethods/StringExtensions.cs b/Software/Visual Studio/Tango.Core/ExtensionMethods/StringExtensions.cs index 5baaac72b..049c9c4af 100644 --- a/Software/Visual Studio/Tango.Core/ExtensionMethods/StringExtensions.cs +++ b/Software/Visual Studio/Tango.Core/ExtensionMethods/StringExtensions.cs @@ -15,4 +15,14 @@ public static class StringExtensions { return obj != null ? obj.ToString() : String.Empty; } + + /// + /// Splits the string to lines. + /// + /// The string. + /// + public static List ToLines(this String str) + { + return str.Split(new[] { '\r', '\n' }).ToList(); + } } diff --git a/Software/Visual Studio/Tango.Protobuf/CompilerFileResult.cs b/Software/Visual Studio/Tango.Protobuf/CompilerFileResult.cs index a72ae28e5..244ee3857 100644 --- a/Software/Visual Studio/Tango.Protobuf/CompilerFileResult.cs +++ b/Software/Visual Studio/Tango.Protobuf/CompilerFileResult.cs @@ -34,6 +34,11 @@ namespace Tango.Protobuf /// public String Content { get; private set; } + /// + /// Gets or sets the relative file path. + /// + internal String RelativePath { get; private set; } + /// /// Initializes a new instance of the class. /// @@ -41,11 +46,12 @@ namespace Tango.Protobuf /// The source path. /// Name of the file. /// File contents. - public CompilerFileResult(CompilerLanguage language, String sourcePath, String fileName, String content) + public CompilerFileResult(CompilerLanguage language, String sourcePath, String fileName, String relativePath, String content) { Language = language; SourcePath = sourcePath; Name = fileName; + RelativePath = relativePath; Content = content; } diff --git a/Software/Visual Studio/Tango.Protobuf/Compilers/JavaCompiler.cs b/Software/Visual Studio/Tango.Protobuf/Compilers/JavaCompiler.cs index 78d754aa5..55f0cf77f 100644 --- a/Software/Visual Studio/Tango.Protobuf/Compilers/JavaCompiler.cs +++ b/Software/Visual Studio/Tango.Protobuf/Compilers/JavaCompiler.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.Core.Helpers; +using Tango.Logging; namespace Tango.Protobuf.Compilers { @@ -25,5 +28,10 @@ namespace Tango.Protobuf.Compilers { return "--java_out"; } + + /// + /// Gets a value indicating whether this compiler uses the default folder structure when generating code. + /// + public override bool UsesDefaultStructure => true; } } diff --git a/Software/Visual Studio/Tango.Protobuf/IProtoCompiler.cs b/Software/Visual Studio/Tango.Protobuf/IProtoCompiler.cs index ede2f79fb..db5303515 100644 --- a/Software/Visual Studio/Tango.Protobuf/IProtoCompiler.cs +++ b/Software/Visual Studio/Tango.Protobuf/IProtoCompiler.cs @@ -48,5 +48,10 @@ namespace Tango.Protobuf /// Gets the proto imports folders. /// List ImportsFolders { get; } + + /// + /// Gets a value indicating whether this compiler uses the default folder structure when generating code. + /// + bool UsesDefaultStructure { get; } } } diff --git a/Software/Visual Studio/Tango.Protobuf/ProtoCompiler.cs b/Software/Visual Studio/Tango.Protobuf/ProtoCompiler.cs index c48ec6a70..3501dfe76 100644 --- a/Software/Visual Studio/Tango.Protobuf/ProtoCompiler.cs +++ b/Software/Visual Studio/Tango.Protobuf/ProtoCompiler.cs @@ -20,6 +20,7 @@ namespace Tango.Protobuf { private const String COMPILERS_FOLDER_NAME = "ProtoCompilers"; //Compilers folder name. protected String _compilersPath; //Compilers folder path. + private Dictionary _lastResults; /// /// Gets the compiler language. @@ -31,6 +32,11 @@ namespace Tango.Protobuf /// public List ImportsFolders { get; private set; } + /// + /// Gets a value indicating whether this compiler uses the default folder structure when generating code. + /// + public virtual bool UsesDefaultStructure { get; } + /// /// Initializes a new instance of the class. /// @@ -113,7 +119,7 @@ namespace Tango.Protobuf foreach (var file in Directory.GetFiles(tmpPath, "*.*", SearchOption.AllDirectories)) { - CompilerFileResult result = new CompilerFileResult(Language, inputFile, Path.GetFileName(file), File.ReadAllText(file)); + CompilerFileResult result = new CompilerFileResult(Language, inputFile, Path.GetFileName(file), Path.GetDirectoryName(file).Replace(tmpPath, "").TrimStart('\\','\\'), File.ReadAllText(file)); results.Add(result); } @@ -153,15 +159,22 @@ namespace Tango.Protobuf /// public virtual CompilerFolderResult CompileFolder(string sourceFolder) { - LogManager.Log("Compiling folder: " + sourceFolder); + if (!UsesDefaultStructure) + { + LogManager.Log("Compiling folder: " + sourceFolder); - ImportsFolders.Clear(); - ImportsFolders.AddRange(Directory.GetDirectories(sourceFolder, "*.*", SearchOption.AllDirectories)); - var result = CompileFolder(sourceFolder, sourceFolder); + ImportsFolders.Clear(); + ImportsFolders.AddRange(Directory.GetDirectories(sourceFolder, "*.*", SearchOption.AllDirectories)); + var result = CompileFolder(sourceFolder, sourceFolder); - LogManager.Log(Path.GetFileName(sourceFolder) + "compiled!"); + LogManager.Log(Path.GetFileName(sourceFolder) + "compiled!"); - return result; + return OnPostProcessFolderCompilation(result); + } + else + { + return CompileFolderDefault(sourceFolder); + } } /// @@ -171,7 +184,7 @@ namespace Tango.Protobuf /// /// Compilation result. /// - private CompilerFolderResult CompileFolder(string rootFolder, string sourceFolder) + protected virtual CompilerFolderResult CompileFolder(string rootFolder, string sourceFolder) { List currentFolderResults = new List(); CompilerFolderResult currentFolder = new CompilerFolderResult(currentFolderResults, Language, sourceFolder, sourceFolder.Replace(rootFolder, "")); @@ -203,6 +216,80 @@ namespace Tango.Protobuf return await new Task(() => { return CompileFolder(sourceFolder); }); } + /// + /// Compiles all files in the specified folder recursively using the default structure. + /// + /// The source folder + /// + /// Compilation result. + /// + private CompilerFolderResult CompileFolderDefault(string sourceFolder) + { + LogManager.Log("Compiling folder: " + sourceFolder); + + _lastResults = new Dictionary(); + ImportsFolders.Clear(); + ImportsFolders.AddRange(Directory.GetDirectories(sourceFolder, "*.*", SearchOption.AllDirectories)); + + String tempPath = PathHelper.GetTempFolderPath(); + + foreach (var file in Directory.GetFiles(sourceFolder, "*.proto", SearchOption.AllDirectories)) + { + foreach (var fileResult in CompileFile(file)) + { + String targetFolder = Path.Combine(tempPath, fileResult.RelativePath); + String targetFile = Path.Combine(targetFolder, fileResult.Name); + Directory.CreateDirectory(targetFolder); + File.WriteAllText(targetFile, fileResult.Content); + + _lastResults.Add(targetFile, fileResult); + } + } + + var result = CompileFolderDefault(tempPath, tempPath); + + PathHelper.TryDeleteFolder(tempPath); + + LogManager.Log(Path.GetFileName(sourceFolder) + "compiled!"); + + return OnPostProcessFolderCompilation(result); + } + + /// + /// Compiles all files in the specified folder recursively using the default structure. + /// + /// + /// The source folder + /// + /// Compilation result. + /// + private CompilerFolderResult CompileFolderDefault(string rootFolder, string sourceFolder) + { + List currentFolderResults = new List(); + CompilerFolderResult currentFolder = new CompilerFolderResult(currentFolderResults, Language, sourceFolder, Path.GetFileName(sourceFolder)); + + foreach (String file in Directory.GetFiles(sourceFolder, "*.*")) + { + currentFolderResults.Add(_lastResults[file]); + } + foreach (string folder in Directory.GetDirectories(sourceFolder)) + { + currentFolderResults.Add(CompileFolderDefault(rootFolder, folder)); + } + + return currentFolder; + } + + /// + /// Override in order to manipulate the folder compilation result. + /// + /// The result. + /// + protected virtual CompilerFolderResult OnPostProcessFolderCompilation(CompilerFolderResult result) + { + return result; + } + /// /// Gets the protobuf compiler CLI arguments (without input/output files!). /// -- cgit v1.3.1