Add a draft protobuf format for diagnostic requests.
[apps/agl-service-can-low-level.git] / gen / java / com / openxc / BinaryMessages.java
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: openxc.proto
3
4 package com.openxc;
5
6 public final class BinaryMessages {
7   private BinaryMessages() {}
8   public static void registerAllExtensions(
9       com.google.protobuf.ExtensionRegistry registry) {
10   }
11   public interface VehicleMessageOrBuilder
12       extends com.google.protobuf.MessageOrBuilder {
13
14     // optional .openxc.VehicleMessage.Type type = 1;
15     /**
16      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
17      */
18     boolean hasType();
19     /**
20      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
21      */
22     com.openxc.BinaryMessages.VehicleMessage.Type getType();
23
24     // optional .openxc.RawMessage raw_message = 2;
25     /**
26      * <code>optional .openxc.RawMessage raw_message = 2;</code>
27      */
28     boolean hasRawMessage();
29     /**
30      * <code>optional .openxc.RawMessage raw_message = 2;</code>
31      */
32     com.openxc.BinaryMessages.RawMessage getRawMessage();
33     /**
34      * <code>optional .openxc.RawMessage raw_message = 2;</code>
35      */
36     com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder();
37
38     // optional .openxc.TranslatedMessage translated_message = 3;
39     /**
40      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
41      */
42     boolean hasTranslatedMessage();
43     /**
44      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
45      */
46     com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage();
47     /**
48      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
49      */
50     com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder();
51
52     // optional .openxc.DiagnosticResponse diagnostic_response = 4;
53     /**
54      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
55      */
56     boolean hasDiagnosticResponse();
57     /**
58      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
59      */
60     com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse();
61     /**
62      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
63      */
64     com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder();
65   }
66   /**
67    * Protobuf type {@code openxc.VehicleMessage}
68    */
69   public static final class VehicleMessage extends
70       com.google.protobuf.GeneratedMessage
71       implements VehicleMessageOrBuilder {
72     // Use VehicleMessage.newBuilder() to construct.
73     private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
74       super(builder);
75       this.unknownFields = builder.getUnknownFields();
76     }
77     private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
78
79     private static final VehicleMessage defaultInstance;
80     public static VehicleMessage getDefaultInstance() {
81       return defaultInstance;
82     }
83
84     public VehicleMessage getDefaultInstanceForType() {
85       return defaultInstance;
86     }
87
88     private final com.google.protobuf.UnknownFieldSet unknownFields;
89     @java.lang.Override
90     public final com.google.protobuf.UnknownFieldSet
91         getUnknownFields() {
92       return this.unknownFields;
93     }
94     private VehicleMessage(
95         com.google.protobuf.CodedInputStream input,
96         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
97         throws com.google.protobuf.InvalidProtocolBufferException {
98       initFields();
99       int mutable_bitField0_ = 0;
100       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
101           com.google.protobuf.UnknownFieldSet.newBuilder();
102       try {
103         boolean done = false;
104         while (!done) {
105           int tag = input.readTag();
106           switch (tag) {
107             case 0:
108               done = true;
109               break;
110             default: {
111               if (!parseUnknownField(input, unknownFields,
112                                      extensionRegistry, tag)) {
113                 done = true;
114               }
115               break;
116             }
117             case 8: {
118               int rawValue = input.readEnum();
119               com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue);
120               if (value == null) {
121                 unknownFields.mergeVarintField(1, rawValue);
122               } else {
123                 bitField0_ |= 0x00000001;
124                 type_ = value;
125               }
126               break;
127             }
128             case 18: {
129               com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null;
130               if (((bitField0_ & 0x00000002) == 0x00000002)) {
131                 subBuilder = rawMessage_.toBuilder();
132               }
133               rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry);
134               if (subBuilder != null) {
135                 subBuilder.mergeFrom(rawMessage_);
136                 rawMessage_ = subBuilder.buildPartial();
137               }
138               bitField0_ |= 0x00000002;
139               break;
140             }
141             case 26: {
142               com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null;
143               if (((bitField0_ & 0x00000004) == 0x00000004)) {
144                 subBuilder = translatedMessage_.toBuilder();
145               }
146               translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry);
147               if (subBuilder != null) {
148                 subBuilder.mergeFrom(translatedMessage_);
149                 translatedMessage_ = subBuilder.buildPartial();
150               }
151               bitField0_ |= 0x00000004;
152               break;
153             }
154             case 34: {
155               com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null;
156               if (((bitField0_ & 0x00000008) == 0x00000008)) {
157                 subBuilder = diagnosticResponse_.toBuilder();
158               }
159               diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry);
160               if (subBuilder != null) {
161                 subBuilder.mergeFrom(diagnosticResponse_);
162                 diagnosticResponse_ = subBuilder.buildPartial();
163               }
164               bitField0_ |= 0x00000008;
165               break;
166             }
167           }
168         }
169       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
170         throw e.setUnfinishedMessage(this);
171       } catch (java.io.IOException e) {
172         throw new com.google.protobuf.InvalidProtocolBufferException(
173             e.getMessage()).setUnfinishedMessage(this);
174       } finally {
175         this.unknownFields = unknownFields.build();
176         makeExtensionsImmutable();
177       }
178     }
179     public static final com.google.protobuf.Descriptors.Descriptor
180         getDescriptor() {
181       return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
182     }
183
184     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
185         internalGetFieldAccessorTable() {
186       return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
187           .ensureFieldAccessorsInitialized(
188               com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
189     }
190
191     public static com.google.protobuf.Parser<VehicleMessage> PARSER =
192         new com.google.protobuf.AbstractParser<VehicleMessage>() {
193       public VehicleMessage parsePartialFrom(
194           com.google.protobuf.CodedInputStream input,
195           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
196           throws com.google.protobuf.InvalidProtocolBufferException {
197         return new VehicleMessage(input, extensionRegistry);
198       }
199     };
200
201     @java.lang.Override
202     public com.google.protobuf.Parser<VehicleMessage> getParserForType() {
203       return PARSER;
204     }
205
206     /**
207      * Protobuf enum {@code openxc.VehicleMessage.Type}
208      */
209     public enum Type
210         implements com.google.protobuf.ProtocolMessageEnum {
211       /**
212        * <code>RAW = 1;</code>
213        */
214       RAW(0, 1),
215       /**
216        * <code>TRANSLATED = 2;</code>
217        */
218       TRANSLATED(1, 2),
219       /**
220        * <code>DIAGNOSTIC = 3;</code>
221        */
222       DIAGNOSTIC(2, 3),
223       ;
224
225       /**
226        * <code>RAW = 1;</code>
227        */
228       public static final int RAW_VALUE = 1;
229       /**
230        * <code>TRANSLATED = 2;</code>
231        */
232       public static final int TRANSLATED_VALUE = 2;
233       /**
234        * <code>DIAGNOSTIC = 3;</code>
235        */
236       public static final int DIAGNOSTIC_VALUE = 3;
237
238
239       public final int getNumber() { return value; }
240
241       public static Type valueOf(int value) {
242         switch (value) {
243           case 1: return RAW;
244           case 2: return TRANSLATED;
245           case 3: return DIAGNOSTIC;
246           default: return null;
247         }
248       }
249
250       public static com.google.protobuf.Internal.EnumLiteMap<Type>
251           internalGetValueMap() {
252         return internalValueMap;
253       }
254       private static com.google.protobuf.Internal.EnumLiteMap<Type>
255           internalValueMap =
256             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
257               public Type findValueByNumber(int number) {
258                 return Type.valueOf(number);
259               }
260             };
261
262       public final com.google.protobuf.Descriptors.EnumValueDescriptor
263           getValueDescriptor() {
264         return getDescriptor().getValues().get(index);
265       }
266       public final com.google.protobuf.Descriptors.EnumDescriptor
267           getDescriptorForType() {
268         return getDescriptor();
269       }
270       public static final com.google.protobuf.Descriptors.EnumDescriptor
271           getDescriptor() {
272         return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0);
273       }
274
275       private static final Type[] VALUES = values();
276
277       public static Type valueOf(
278           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
279         if (desc.getType() != getDescriptor()) {
280           throw new java.lang.IllegalArgumentException(
281             "EnumValueDescriptor is not for this type.");
282         }
283         return VALUES[desc.getIndex()];
284       }
285
286       private final int index;
287       private final int value;
288
289       private Type(int index, int value) {
290         this.index = index;
291         this.value = value;
292       }
293
294       // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type)
295     }
296
297     private int bitField0_;
298     // optional .openxc.VehicleMessage.Type type = 1;
299     public static final int TYPE_FIELD_NUMBER = 1;
300     private com.openxc.BinaryMessages.VehicleMessage.Type type_;
301     /**
302      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
303      */
304     public boolean hasType() {
305       return ((bitField0_ & 0x00000001) == 0x00000001);
306     }
307     /**
308      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
309      */
310     public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
311       return type_;
312     }
313
314     // optional .openxc.RawMessage raw_message = 2;
315     public static final int RAW_MESSAGE_FIELD_NUMBER = 2;
316     private com.openxc.BinaryMessages.RawMessage rawMessage_;
317     /**
318      * <code>optional .openxc.RawMessage raw_message = 2;</code>
319      */
320     public boolean hasRawMessage() {
321       return ((bitField0_ & 0x00000002) == 0x00000002);
322     }
323     /**
324      * <code>optional .openxc.RawMessage raw_message = 2;</code>
325      */
326     public com.openxc.BinaryMessages.RawMessage getRawMessage() {
327       return rawMessage_;
328     }
329     /**
330      * <code>optional .openxc.RawMessage raw_message = 2;</code>
331      */
332     public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
333       return rawMessage_;
334     }
335
336     // optional .openxc.TranslatedMessage translated_message = 3;
337     public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3;
338     private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_;
339     /**
340      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
341      */
342     public boolean hasTranslatedMessage() {
343       return ((bitField0_ & 0x00000004) == 0x00000004);
344     }
345     /**
346      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
347      */
348     public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
349       return translatedMessage_;
350     }
351     /**
352      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
353      */
354     public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
355       return translatedMessage_;
356     }
357
358     // optional .openxc.DiagnosticResponse diagnostic_response = 4;
359     public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4;
360     private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_;
361     /**
362      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
363      */
364     public boolean hasDiagnosticResponse() {
365       return ((bitField0_ & 0x00000008) == 0x00000008);
366     }
367     /**
368      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
369      */
370     public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
371       return diagnosticResponse_;
372     }
373     /**
374      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
375      */
376     public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
377       return diagnosticResponse_;
378     }
379
380     private void initFields() {
381       type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
382       rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
383       translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
384       diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
385     }
386     private byte memoizedIsInitialized = -1;
387     public final boolean isInitialized() {
388       byte isInitialized = memoizedIsInitialized;
389       if (isInitialized != -1) return isInitialized == 1;
390
391       memoizedIsInitialized = 1;
392       return true;
393     }
394
395     public void writeTo(com.google.protobuf.CodedOutputStream output)
396                         throws java.io.IOException {
397       getSerializedSize();
398       if (((bitField0_ & 0x00000001) == 0x00000001)) {
399         output.writeEnum(1, type_.getNumber());
400       }
401       if (((bitField0_ & 0x00000002) == 0x00000002)) {
402         output.writeMessage(2, rawMessage_);
403       }
404       if (((bitField0_ & 0x00000004) == 0x00000004)) {
405         output.writeMessage(3, translatedMessage_);
406       }
407       if (((bitField0_ & 0x00000008) == 0x00000008)) {
408         output.writeMessage(4, diagnosticResponse_);
409       }
410       getUnknownFields().writeTo(output);
411     }
412
413     private int memoizedSerializedSize = -1;
414     public int getSerializedSize() {
415       int size = memoizedSerializedSize;
416       if (size != -1) return size;
417
418       size = 0;
419       if (((bitField0_ & 0x00000001) == 0x00000001)) {
420         size += com.google.protobuf.CodedOutputStream
421           .computeEnumSize(1, type_.getNumber());
422       }
423       if (((bitField0_ & 0x00000002) == 0x00000002)) {
424         size += com.google.protobuf.CodedOutputStream
425           .computeMessageSize(2, rawMessage_);
426       }
427       if (((bitField0_ & 0x00000004) == 0x00000004)) {
428         size += com.google.protobuf.CodedOutputStream
429           .computeMessageSize(3, translatedMessage_);
430       }
431       if (((bitField0_ & 0x00000008) == 0x00000008)) {
432         size += com.google.protobuf.CodedOutputStream
433           .computeMessageSize(4, diagnosticResponse_);
434       }
435       size += getUnknownFields().getSerializedSize();
436       memoizedSerializedSize = size;
437       return size;
438     }
439
440     private static final long serialVersionUID = 0L;
441     @java.lang.Override
442     protected java.lang.Object writeReplace()
443         throws java.io.ObjectStreamException {
444       return super.writeReplace();
445     }
446
447     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
448         com.google.protobuf.ByteString data)
449         throws com.google.protobuf.InvalidProtocolBufferException {
450       return PARSER.parseFrom(data);
451     }
452     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
453         com.google.protobuf.ByteString data,
454         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
455         throws com.google.protobuf.InvalidProtocolBufferException {
456       return PARSER.parseFrom(data, extensionRegistry);
457     }
458     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data)
459         throws com.google.protobuf.InvalidProtocolBufferException {
460       return PARSER.parseFrom(data);
461     }
462     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
463         byte[] data,
464         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
465         throws com.google.protobuf.InvalidProtocolBufferException {
466       return PARSER.parseFrom(data, extensionRegistry);
467     }
468     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input)
469         throws java.io.IOException {
470       return PARSER.parseFrom(input);
471     }
472     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
473         java.io.InputStream input,
474         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
475         throws java.io.IOException {
476       return PARSER.parseFrom(input, extensionRegistry);
477     }
478     public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input)
479         throws java.io.IOException {
480       return PARSER.parseDelimitedFrom(input);
481     }
482     public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(
483         java.io.InputStream input,
484         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
485         throws java.io.IOException {
486       return PARSER.parseDelimitedFrom(input, extensionRegistry);
487     }
488     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
489         com.google.protobuf.CodedInputStream input)
490         throws java.io.IOException {
491       return PARSER.parseFrom(input);
492     }
493     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
494         com.google.protobuf.CodedInputStream input,
495         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
496         throws java.io.IOException {
497       return PARSER.parseFrom(input, extensionRegistry);
498     }
499
500     public static Builder newBuilder() { return Builder.create(); }
501     public Builder newBuilderForType() { return newBuilder(); }
502     public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) {
503       return newBuilder().mergeFrom(prototype);
504     }
505     public Builder toBuilder() { return newBuilder(this); }
506
507     @java.lang.Override
508     protected Builder newBuilderForType(
509         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
510       Builder builder = new Builder(parent);
511       return builder;
512     }
513     /**
514      * Protobuf type {@code openxc.VehicleMessage}
515      */
516     public static final class Builder extends
517         com.google.protobuf.GeneratedMessage.Builder<Builder>
518        implements com.openxc.BinaryMessages.VehicleMessageOrBuilder {
519       public static final com.google.protobuf.Descriptors.Descriptor
520           getDescriptor() {
521         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
522       }
523
524       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
525           internalGetFieldAccessorTable() {
526         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
527             .ensureFieldAccessorsInitialized(
528                 com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
529       }
530
531       // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder()
532       private Builder() {
533         maybeForceBuilderInitialization();
534       }
535
536       private Builder(
537           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
538         super(parent);
539         maybeForceBuilderInitialization();
540       }
541       private void maybeForceBuilderInitialization() {
542         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
543           getRawMessageFieldBuilder();
544           getTranslatedMessageFieldBuilder();
545           getDiagnosticResponseFieldBuilder();
546         }
547       }
548       private static Builder create() {
549         return new Builder();
550       }
551
552       public Builder clear() {
553         super.clear();
554         type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
555         bitField0_ = (bitField0_ & ~0x00000001);
556         if (rawMessageBuilder_ == null) {
557           rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
558         } else {
559           rawMessageBuilder_.clear();
560         }
561         bitField0_ = (bitField0_ & ~0x00000002);
562         if (translatedMessageBuilder_ == null) {
563           translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
564         } else {
565           translatedMessageBuilder_.clear();
566         }
567         bitField0_ = (bitField0_ & ~0x00000004);
568         if (diagnosticResponseBuilder_ == null) {
569           diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
570         } else {
571           diagnosticResponseBuilder_.clear();
572         }
573         bitField0_ = (bitField0_ & ~0x00000008);
574         return this;
575       }
576
577       public Builder clone() {
578         return create().mergeFrom(buildPartial());
579       }
580
581       public com.google.protobuf.Descriptors.Descriptor
582           getDescriptorForType() {
583         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
584       }
585
586       public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() {
587         return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance();
588       }
589
590       public com.openxc.BinaryMessages.VehicleMessage build() {
591         com.openxc.BinaryMessages.VehicleMessage result = buildPartial();
592         if (!result.isInitialized()) {
593           throw newUninitializedMessageException(result);
594         }
595         return result;
596       }
597
598       public com.openxc.BinaryMessages.VehicleMessage buildPartial() {
599         com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this);
600         int from_bitField0_ = bitField0_;
601         int to_bitField0_ = 0;
602         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
603           to_bitField0_ |= 0x00000001;
604         }
605         result.type_ = type_;
606         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
607           to_bitField0_ |= 0x00000002;
608         }
609         if (rawMessageBuilder_ == null) {
610           result.rawMessage_ = rawMessage_;
611         } else {
612           result.rawMessage_ = rawMessageBuilder_.build();
613         }
614         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
615           to_bitField0_ |= 0x00000004;
616         }
617         if (translatedMessageBuilder_ == null) {
618           result.translatedMessage_ = translatedMessage_;
619         } else {
620           result.translatedMessage_ = translatedMessageBuilder_.build();
621         }
622         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
623           to_bitField0_ |= 0x00000008;
624         }
625         if (diagnosticResponseBuilder_ == null) {
626           result.diagnosticResponse_ = diagnosticResponse_;
627         } else {
628           result.diagnosticResponse_ = diagnosticResponseBuilder_.build();
629         }
630         result.bitField0_ = to_bitField0_;
631         onBuilt();
632         return result;
633       }
634
635       public Builder mergeFrom(com.google.protobuf.Message other) {
636         if (other instanceof com.openxc.BinaryMessages.VehicleMessage) {
637           return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other);
638         } else {
639           super.mergeFrom(other);
640           return this;
641         }
642       }
643
644       public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) {
645         if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this;
646         if (other.hasType()) {
647           setType(other.getType());
648         }
649         if (other.hasRawMessage()) {
650           mergeRawMessage(other.getRawMessage());
651         }
652         if (other.hasTranslatedMessage()) {
653           mergeTranslatedMessage(other.getTranslatedMessage());
654         }
655         if (other.hasDiagnosticResponse()) {
656           mergeDiagnosticResponse(other.getDiagnosticResponse());
657         }
658         this.mergeUnknownFields(other.getUnknownFields());
659         return this;
660       }
661
662       public final boolean isInitialized() {
663         return true;
664       }
665
666       public Builder mergeFrom(
667           com.google.protobuf.CodedInputStream input,
668           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
669           throws java.io.IOException {
670         com.openxc.BinaryMessages.VehicleMessage parsedMessage = null;
671         try {
672           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
673         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
674           parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage();
675           throw e;
676         } finally {
677           if (parsedMessage != null) {
678             mergeFrom(parsedMessage);
679           }
680         }
681         return this;
682       }
683       private int bitField0_;
684
685       // optional .openxc.VehicleMessage.Type type = 1;
686       private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
687       /**
688        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
689        */
690       public boolean hasType() {
691         return ((bitField0_ & 0x00000001) == 0x00000001);
692       }
693       /**
694        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
695        */
696       public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
697         return type_;
698       }
699       /**
700        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
701        */
702       public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) {
703         if (value == null) {
704           throw new NullPointerException();
705         }
706         bitField0_ |= 0x00000001;
707         type_ = value;
708         onChanged();
709         return this;
710       }
711       /**
712        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
713        */
714       public Builder clearType() {
715         bitField0_ = (bitField0_ & ~0x00000001);
716         type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
717         onChanged();
718         return this;
719       }
720
721       // optional .openxc.RawMessage raw_message = 2;
722       private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
723       private com.google.protobuf.SingleFieldBuilder<
724           com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_;
725       /**
726        * <code>optional .openxc.RawMessage raw_message = 2;</code>
727        */
728       public boolean hasRawMessage() {
729         return ((bitField0_ & 0x00000002) == 0x00000002);
730       }
731       /**
732        * <code>optional .openxc.RawMessage raw_message = 2;</code>
733        */
734       public com.openxc.BinaryMessages.RawMessage getRawMessage() {
735         if (rawMessageBuilder_ == null) {
736           return rawMessage_;
737         } else {
738           return rawMessageBuilder_.getMessage();
739         }
740       }
741       /**
742        * <code>optional .openxc.RawMessage raw_message = 2;</code>
743        */
744       public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) {
745         if (rawMessageBuilder_ == null) {
746           if (value == null) {
747             throw new NullPointerException();
748           }
749           rawMessage_ = value;
750           onChanged();
751         } else {
752           rawMessageBuilder_.setMessage(value);
753         }
754         bitField0_ |= 0x00000002;
755         return this;
756       }
757       /**
758        * <code>optional .openxc.RawMessage raw_message = 2;</code>
759        */
760       public Builder setRawMessage(
761           com.openxc.BinaryMessages.RawMessage.Builder builderForValue) {
762         if (rawMessageBuilder_ == null) {
763           rawMessage_ = builderForValue.build();
764           onChanged();
765         } else {
766           rawMessageBuilder_.setMessage(builderForValue.build());
767         }
768         bitField0_ |= 0x00000002;
769         return this;
770       }
771       /**
772        * <code>optional .openxc.RawMessage raw_message = 2;</code>
773        */
774       public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) {
775         if (rawMessageBuilder_ == null) {
776           if (((bitField0_ & 0x00000002) == 0x00000002) &&
777               rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) {
778             rawMessage_ =
779               com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial();
780           } else {
781             rawMessage_ = value;
782           }
783           onChanged();
784         } else {
785           rawMessageBuilder_.mergeFrom(value);
786         }
787         bitField0_ |= 0x00000002;
788         return this;
789       }
790       /**
791        * <code>optional .openxc.RawMessage raw_message = 2;</code>
792        */
793       public Builder clearRawMessage() {
794         if (rawMessageBuilder_ == null) {
795           rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
796           onChanged();
797         } else {
798           rawMessageBuilder_.clear();
799         }
800         bitField0_ = (bitField0_ & ~0x00000002);
801         return this;
802       }
803       /**
804        * <code>optional .openxc.RawMessage raw_message = 2;</code>
805        */
806       public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() {
807         bitField0_ |= 0x00000002;
808         onChanged();
809         return getRawMessageFieldBuilder().getBuilder();
810       }
811       /**
812        * <code>optional .openxc.RawMessage raw_message = 2;</code>
813        */
814       public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
815         if (rawMessageBuilder_ != null) {
816           return rawMessageBuilder_.getMessageOrBuilder();
817         } else {
818           return rawMessage_;
819         }
820       }
821       /**
822        * <code>optional .openxc.RawMessage raw_message = 2;</code>
823        */
824       private com.google.protobuf.SingleFieldBuilder<
825           com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> 
826           getRawMessageFieldBuilder() {
827         if (rawMessageBuilder_ == null) {
828           rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
829               com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>(
830                   rawMessage_,
831                   getParentForChildren(),
832                   isClean());
833           rawMessage_ = null;
834         }
835         return rawMessageBuilder_;
836       }
837
838       // optional .openxc.TranslatedMessage translated_message = 3;
839       private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
840       private com.google.protobuf.SingleFieldBuilder<
841           com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_;
842       /**
843        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
844        */
845       public boolean hasTranslatedMessage() {
846         return ((bitField0_ & 0x00000004) == 0x00000004);
847       }
848       /**
849        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
850        */
851       public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
852         if (translatedMessageBuilder_ == null) {
853           return translatedMessage_;
854         } else {
855           return translatedMessageBuilder_.getMessage();
856         }
857       }
858       /**
859        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
860        */
861       public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
862         if (translatedMessageBuilder_ == null) {
863           if (value == null) {
864             throw new NullPointerException();
865           }
866           translatedMessage_ = value;
867           onChanged();
868         } else {
869           translatedMessageBuilder_.setMessage(value);
870         }
871         bitField0_ |= 0x00000004;
872         return this;
873       }
874       /**
875        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
876        */
877       public Builder setTranslatedMessage(
878           com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) {
879         if (translatedMessageBuilder_ == null) {
880           translatedMessage_ = builderForValue.build();
881           onChanged();
882         } else {
883           translatedMessageBuilder_.setMessage(builderForValue.build());
884         }
885         bitField0_ |= 0x00000004;
886         return this;
887       }
888       /**
889        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
890        */
891       public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
892         if (translatedMessageBuilder_ == null) {
893           if (((bitField0_ & 0x00000004) == 0x00000004) &&
894               translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) {
895             translatedMessage_ =
896               com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial();
897           } else {
898             translatedMessage_ = value;
899           }
900           onChanged();
901         } else {
902           translatedMessageBuilder_.mergeFrom(value);
903         }
904         bitField0_ |= 0x00000004;
905         return this;
906       }
907       /**
908        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
909        */
910       public Builder clearTranslatedMessage() {
911         if (translatedMessageBuilder_ == null) {
912           translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
913           onChanged();
914         } else {
915           translatedMessageBuilder_.clear();
916         }
917         bitField0_ = (bitField0_ & ~0x00000004);
918         return this;
919       }
920       /**
921        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
922        */
923       public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() {
924         bitField0_ |= 0x00000004;
925         onChanged();
926         return getTranslatedMessageFieldBuilder().getBuilder();
927       }
928       /**
929        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
930        */
931       public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
932         if (translatedMessageBuilder_ != null) {
933           return translatedMessageBuilder_.getMessageOrBuilder();
934         } else {
935           return translatedMessage_;
936         }
937       }
938       /**
939        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
940        */
941       private com.google.protobuf.SingleFieldBuilder<
942           com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> 
943           getTranslatedMessageFieldBuilder() {
944         if (translatedMessageBuilder_ == null) {
945           translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
946               com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>(
947                   translatedMessage_,
948                   getParentForChildren(),
949                   isClean());
950           translatedMessage_ = null;
951         }
952         return translatedMessageBuilder_;
953       }
954
955       // optional .openxc.DiagnosticResponse diagnostic_response = 4;
956       private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
957       private com.google.protobuf.SingleFieldBuilder<
958           com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_;
959       /**
960        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
961        */
962       public boolean hasDiagnosticResponse() {
963         return ((bitField0_ & 0x00000008) == 0x00000008);
964       }
965       /**
966        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
967        */
968       public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
969         if (diagnosticResponseBuilder_ == null) {
970           return diagnosticResponse_;
971         } else {
972           return diagnosticResponseBuilder_.getMessage();
973         }
974       }
975       /**
976        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
977        */
978       public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
979         if (diagnosticResponseBuilder_ == null) {
980           if (value == null) {
981             throw new NullPointerException();
982           }
983           diagnosticResponse_ = value;
984           onChanged();
985         } else {
986           diagnosticResponseBuilder_.setMessage(value);
987         }
988         bitField0_ |= 0x00000008;
989         return this;
990       }
991       /**
992        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
993        */
994       public Builder setDiagnosticResponse(
995           com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) {
996         if (diagnosticResponseBuilder_ == null) {
997           diagnosticResponse_ = builderForValue.build();
998           onChanged();
999         } else {
1000           diagnosticResponseBuilder_.setMessage(builderForValue.build());
1001         }
1002         bitField0_ |= 0x00000008;
1003         return this;
1004       }
1005       /**
1006        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1007        */
1008       public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1009         if (diagnosticResponseBuilder_ == null) {
1010           if (((bitField0_ & 0x00000008) == 0x00000008) &&
1011               diagnosticResponse_ != com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) {
1012             diagnosticResponse_ =
1013               com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(diagnosticResponse_).mergeFrom(value).buildPartial();
1014           } else {
1015             diagnosticResponse_ = value;
1016           }
1017           onChanged();
1018         } else {
1019           diagnosticResponseBuilder_.mergeFrom(value);
1020         }
1021         bitField0_ |= 0x00000008;
1022         return this;
1023       }
1024       /**
1025        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1026        */
1027       public Builder clearDiagnosticResponse() {
1028         if (diagnosticResponseBuilder_ == null) {
1029           diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1030           onChanged();
1031         } else {
1032           diagnosticResponseBuilder_.clear();
1033         }
1034         bitField0_ = (bitField0_ & ~0x00000008);
1035         return this;
1036       }
1037       /**
1038        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1039        */
1040       public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() {
1041         bitField0_ |= 0x00000008;
1042         onChanged();
1043         return getDiagnosticResponseFieldBuilder().getBuilder();
1044       }
1045       /**
1046        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1047        */
1048       public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
1049         if (diagnosticResponseBuilder_ != null) {
1050           return diagnosticResponseBuilder_.getMessageOrBuilder();
1051         } else {
1052           return diagnosticResponse_;
1053         }
1054       }
1055       /**
1056        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1057        */
1058       private com.google.protobuf.SingleFieldBuilder<
1059           com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> 
1060           getDiagnosticResponseFieldBuilder() {
1061         if (diagnosticResponseBuilder_ == null) {
1062           diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1063               com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>(
1064                   diagnosticResponse_,
1065                   getParentForChildren(),
1066                   isClean());
1067           diagnosticResponse_ = null;
1068         }
1069         return diagnosticResponseBuilder_;
1070       }
1071
1072       // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage)
1073     }
1074
1075     static {
1076       defaultInstance = new VehicleMessage(true);
1077       defaultInstance.initFields();
1078     }
1079
1080     // @@protoc_insertion_point(class_scope:openxc.VehicleMessage)
1081   }
1082
1083   public interface RawMessageOrBuilder
1084       extends com.google.protobuf.MessageOrBuilder {
1085
1086     // optional int32 bus = 1;
1087     /**
1088      * <code>optional int32 bus = 1;</code>
1089      */
1090     boolean hasBus();
1091     /**
1092      * <code>optional int32 bus = 1;</code>
1093      */
1094     int getBus();
1095
1096     // optional uint32 message_id = 2;
1097     /**
1098      * <code>optional uint32 message_id = 2;</code>
1099      */
1100     boolean hasMessageId();
1101     /**
1102      * <code>optional uint32 message_id = 2;</code>
1103      */
1104     int getMessageId();
1105
1106     // optional bytes data = 3;
1107     /**
1108      * <code>optional bytes data = 3;</code>
1109      */
1110     boolean hasData();
1111     /**
1112      * <code>optional bytes data = 3;</code>
1113      */
1114     com.google.protobuf.ByteString getData();
1115   }
1116   /**
1117    * Protobuf type {@code openxc.RawMessage}
1118    */
1119   public static final class RawMessage extends
1120       com.google.protobuf.GeneratedMessage
1121       implements RawMessageOrBuilder {
1122     // Use RawMessage.newBuilder() to construct.
1123     private RawMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1124       super(builder);
1125       this.unknownFields = builder.getUnknownFields();
1126     }
1127     private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1128
1129     private static final RawMessage defaultInstance;
1130     public static RawMessage getDefaultInstance() {
1131       return defaultInstance;
1132     }
1133
1134     public RawMessage getDefaultInstanceForType() {
1135       return defaultInstance;
1136     }
1137
1138     private final com.google.protobuf.UnknownFieldSet unknownFields;
1139     @java.lang.Override
1140     public final com.google.protobuf.UnknownFieldSet
1141         getUnknownFields() {
1142       return this.unknownFields;
1143     }
1144     private RawMessage(
1145         com.google.protobuf.CodedInputStream input,
1146         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1147         throws com.google.protobuf.InvalidProtocolBufferException {
1148       initFields();
1149       int mutable_bitField0_ = 0;
1150       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1151           com.google.protobuf.UnknownFieldSet.newBuilder();
1152       try {
1153         boolean done = false;
1154         while (!done) {
1155           int tag = input.readTag();
1156           switch (tag) {
1157             case 0:
1158               done = true;
1159               break;
1160             default: {
1161               if (!parseUnknownField(input, unknownFields,
1162                                      extensionRegistry, tag)) {
1163                 done = true;
1164               }
1165               break;
1166             }
1167             case 8: {
1168               bitField0_ |= 0x00000001;
1169               bus_ = input.readInt32();
1170               break;
1171             }
1172             case 16: {
1173               bitField0_ |= 0x00000002;
1174               messageId_ = input.readUInt32();
1175               break;
1176             }
1177             case 26: {
1178               bitField0_ |= 0x00000004;
1179               data_ = input.readBytes();
1180               break;
1181             }
1182           }
1183         }
1184       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1185         throw e.setUnfinishedMessage(this);
1186       } catch (java.io.IOException e) {
1187         throw new com.google.protobuf.InvalidProtocolBufferException(
1188             e.getMessage()).setUnfinishedMessage(this);
1189       } finally {
1190         this.unknownFields = unknownFields.build();
1191         makeExtensionsImmutable();
1192       }
1193     }
1194     public static final com.google.protobuf.Descriptors.Descriptor
1195         getDescriptor() {
1196       return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1197     }
1198
1199     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1200         internalGetFieldAccessorTable() {
1201       return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1202           .ensureFieldAccessorsInitialized(
1203               com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1204     }
1205
1206     public static com.google.protobuf.Parser<RawMessage> PARSER =
1207         new com.google.protobuf.AbstractParser<RawMessage>() {
1208       public RawMessage parsePartialFrom(
1209           com.google.protobuf.CodedInputStream input,
1210           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1211           throws com.google.protobuf.InvalidProtocolBufferException {
1212         return new RawMessage(input, extensionRegistry);
1213       }
1214     };
1215
1216     @java.lang.Override
1217     public com.google.protobuf.Parser<RawMessage> getParserForType() {
1218       return PARSER;
1219     }
1220
1221     private int bitField0_;
1222     // optional int32 bus = 1;
1223     public static final int BUS_FIELD_NUMBER = 1;
1224     private int bus_;
1225     /**
1226      * <code>optional int32 bus = 1;</code>
1227      */
1228     public boolean hasBus() {
1229       return ((bitField0_ & 0x00000001) == 0x00000001);
1230     }
1231     /**
1232      * <code>optional int32 bus = 1;</code>
1233      */
1234     public int getBus() {
1235       return bus_;
1236     }
1237
1238     // optional uint32 message_id = 2;
1239     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1240     private int messageId_;
1241     /**
1242      * <code>optional uint32 message_id = 2;</code>
1243      */
1244     public boolean hasMessageId() {
1245       return ((bitField0_ & 0x00000002) == 0x00000002);
1246     }
1247     /**
1248      * <code>optional uint32 message_id = 2;</code>
1249      */
1250     public int getMessageId() {
1251       return messageId_;
1252     }
1253
1254     // optional bytes data = 3;
1255     public static final int DATA_FIELD_NUMBER = 3;
1256     private com.google.protobuf.ByteString data_;
1257     /**
1258      * <code>optional bytes data = 3;</code>
1259      */
1260     public boolean hasData() {
1261       return ((bitField0_ & 0x00000004) == 0x00000004);
1262     }
1263     /**
1264      * <code>optional bytes data = 3;</code>
1265      */
1266     public com.google.protobuf.ByteString getData() {
1267       return data_;
1268     }
1269
1270     private void initFields() {
1271       bus_ = 0;
1272       messageId_ = 0;
1273       data_ = com.google.protobuf.ByteString.EMPTY;
1274     }
1275     private byte memoizedIsInitialized = -1;
1276     public final boolean isInitialized() {
1277       byte isInitialized = memoizedIsInitialized;
1278       if (isInitialized != -1) return isInitialized == 1;
1279
1280       memoizedIsInitialized = 1;
1281       return true;
1282     }
1283
1284     public void writeTo(com.google.protobuf.CodedOutputStream output)
1285                         throws java.io.IOException {
1286       getSerializedSize();
1287       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1288         output.writeInt32(1, bus_);
1289       }
1290       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1291         output.writeUInt32(2, messageId_);
1292       }
1293       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1294         output.writeBytes(3, data_);
1295       }
1296       getUnknownFields().writeTo(output);
1297     }
1298
1299     private int memoizedSerializedSize = -1;
1300     public int getSerializedSize() {
1301       int size = memoizedSerializedSize;
1302       if (size != -1) return size;
1303
1304       size = 0;
1305       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1306         size += com.google.protobuf.CodedOutputStream
1307           .computeInt32Size(1, bus_);
1308       }
1309       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1310         size += com.google.protobuf.CodedOutputStream
1311           .computeUInt32Size(2, messageId_);
1312       }
1313       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1314         size += com.google.protobuf.CodedOutputStream
1315           .computeBytesSize(3, data_);
1316       }
1317       size += getUnknownFields().getSerializedSize();
1318       memoizedSerializedSize = size;
1319       return size;
1320     }
1321
1322     private static final long serialVersionUID = 0L;
1323     @java.lang.Override
1324     protected java.lang.Object writeReplace()
1325         throws java.io.ObjectStreamException {
1326       return super.writeReplace();
1327     }
1328
1329     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1330         com.google.protobuf.ByteString data)
1331         throws com.google.protobuf.InvalidProtocolBufferException {
1332       return PARSER.parseFrom(data);
1333     }
1334     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1335         com.google.protobuf.ByteString data,
1336         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1337         throws com.google.protobuf.InvalidProtocolBufferException {
1338       return PARSER.parseFrom(data, extensionRegistry);
1339     }
1340     public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data)
1341         throws com.google.protobuf.InvalidProtocolBufferException {
1342       return PARSER.parseFrom(data);
1343     }
1344     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1345         byte[] data,
1346         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1347         throws com.google.protobuf.InvalidProtocolBufferException {
1348       return PARSER.parseFrom(data, extensionRegistry);
1349     }
1350     public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input)
1351         throws java.io.IOException {
1352       return PARSER.parseFrom(input);
1353     }
1354     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1355         java.io.InputStream input,
1356         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1357         throws java.io.IOException {
1358       return PARSER.parseFrom(input, extensionRegistry);
1359     }
1360     public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input)
1361         throws java.io.IOException {
1362       return PARSER.parseDelimitedFrom(input);
1363     }
1364     public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(
1365         java.io.InputStream input,
1366         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1367         throws java.io.IOException {
1368       return PARSER.parseDelimitedFrom(input, extensionRegistry);
1369     }
1370     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1371         com.google.protobuf.CodedInputStream input)
1372         throws java.io.IOException {
1373       return PARSER.parseFrom(input);
1374     }
1375     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1376         com.google.protobuf.CodedInputStream input,
1377         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1378         throws java.io.IOException {
1379       return PARSER.parseFrom(input, extensionRegistry);
1380     }
1381
1382     public static Builder newBuilder() { return Builder.create(); }
1383     public Builder newBuilderForType() { return newBuilder(); }
1384     public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) {
1385       return newBuilder().mergeFrom(prototype);
1386     }
1387     public Builder toBuilder() { return newBuilder(this); }
1388
1389     @java.lang.Override
1390     protected Builder newBuilderForType(
1391         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1392       Builder builder = new Builder(parent);
1393       return builder;
1394     }
1395     /**
1396      * Protobuf type {@code openxc.RawMessage}
1397      */
1398     public static final class Builder extends
1399         com.google.protobuf.GeneratedMessage.Builder<Builder>
1400        implements com.openxc.BinaryMessages.RawMessageOrBuilder {
1401       public static final com.google.protobuf.Descriptors.Descriptor
1402           getDescriptor() {
1403         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1404       }
1405
1406       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1407           internalGetFieldAccessorTable() {
1408         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1409             .ensureFieldAccessorsInitialized(
1410                 com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1411       }
1412
1413       // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder()
1414       private Builder() {
1415         maybeForceBuilderInitialization();
1416       }
1417
1418       private Builder(
1419           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1420         super(parent);
1421         maybeForceBuilderInitialization();
1422       }
1423       private void maybeForceBuilderInitialization() {
1424         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1425         }
1426       }
1427       private static Builder create() {
1428         return new Builder();
1429       }
1430
1431       public Builder clear() {
1432         super.clear();
1433         bus_ = 0;
1434         bitField0_ = (bitField0_ & ~0x00000001);
1435         messageId_ = 0;
1436         bitField0_ = (bitField0_ & ~0x00000002);
1437         data_ = com.google.protobuf.ByteString.EMPTY;
1438         bitField0_ = (bitField0_ & ~0x00000004);
1439         return this;
1440       }
1441
1442       public Builder clone() {
1443         return create().mergeFrom(buildPartial());
1444       }
1445
1446       public com.google.protobuf.Descriptors.Descriptor
1447           getDescriptorForType() {
1448         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1449       }
1450
1451       public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() {
1452         return com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
1453       }
1454
1455       public com.openxc.BinaryMessages.RawMessage build() {
1456         com.openxc.BinaryMessages.RawMessage result = buildPartial();
1457         if (!result.isInitialized()) {
1458           throw newUninitializedMessageException(result);
1459         }
1460         return result;
1461       }
1462
1463       public com.openxc.BinaryMessages.RawMessage buildPartial() {
1464         com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this);
1465         int from_bitField0_ = bitField0_;
1466         int to_bitField0_ = 0;
1467         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
1468           to_bitField0_ |= 0x00000001;
1469         }
1470         result.bus_ = bus_;
1471         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
1472           to_bitField0_ |= 0x00000002;
1473         }
1474         result.messageId_ = messageId_;
1475         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
1476           to_bitField0_ |= 0x00000004;
1477         }
1478         result.data_ = data_;
1479         result.bitField0_ = to_bitField0_;
1480         onBuilt();
1481         return result;
1482       }
1483
1484       public Builder mergeFrom(com.google.protobuf.Message other) {
1485         if (other instanceof com.openxc.BinaryMessages.RawMessage) {
1486           return mergeFrom((com.openxc.BinaryMessages.RawMessage)other);
1487         } else {
1488           super.mergeFrom(other);
1489           return this;
1490         }
1491       }
1492
1493       public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) {
1494         if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this;
1495         if (other.hasBus()) {
1496           setBus(other.getBus());
1497         }
1498         if (other.hasMessageId()) {
1499           setMessageId(other.getMessageId());
1500         }
1501         if (other.hasData()) {
1502           setData(other.getData());
1503         }
1504         this.mergeUnknownFields(other.getUnknownFields());
1505         return this;
1506       }
1507
1508       public final boolean isInitialized() {
1509         return true;
1510       }
1511
1512       public Builder mergeFrom(
1513           com.google.protobuf.CodedInputStream input,
1514           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1515           throws java.io.IOException {
1516         com.openxc.BinaryMessages.RawMessage parsedMessage = null;
1517         try {
1518           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1519         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1520           parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage();
1521           throw e;
1522         } finally {
1523           if (parsedMessage != null) {
1524             mergeFrom(parsedMessage);
1525           }
1526         }
1527         return this;
1528       }
1529       private int bitField0_;
1530
1531       // optional int32 bus = 1;
1532       private int bus_ ;
1533       /**
1534        * <code>optional int32 bus = 1;</code>
1535        */
1536       public boolean hasBus() {
1537         return ((bitField0_ & 0x00000001) == 0x00000001);
1538       }
1539       /**
1540        * <code>optional int32 bus = 1;</code>
1541        */
1542       public int getBus() {
1543         return bus_;
1544       }
1545       /**
1546        * <code>optional int32 bus = 1;</code>
1547        */
1548       public Builder setBus(int value) {
1549         bitField0_ |= 0x00000001;
1550         bus_ = value;
1551         onChanged();
1552         return this;
1553       }
1554       /**
1555        * <code>optional int32 bus = 1;</code>
1556        */
1557       public Builder clearBus() {
1558         bitField0_ = (bitField0_ & ~0x00000001);
1559         bus_ = 0;
1560         onChanged();
1561         return this;
1562       }
1563
1564       // optional uint32 message_id = 2;
1565       private int messageId_ ;
1566       /**
1567        * <code>optional uint32 message_id = 2;</code>
1568        */
1569       public boolean hasMessageId() {
1570         return ((bitField0_ & 0x00000002) == 0x00000002);
1571       }
1572       /**
1573        * <code>optional uint32 message_id = 2;</code>
1574        */
1575       public int getMessageId() {
1576         return messageId_;
1577       }
1578       /**
1579        * <code>optional uint32 message_id = 2;</code>
1580        */
1581       public Builder setMessageId(int value) {
1582         bitField0_ |= 0x00000002;
1583         messageId_ = value;
1584         onChanged();
1585         return this;
1586       }
1587       /**
1588        * <code>optional uint32 message_id = 2;</code>
1589        */
1590       public Builder clearMessageId() {
1591         bitField0_ = (bitField0_ & ~0x00000002);
1592         messageId_ = 0;
1593         onChanged();
1594         return this;
1595       }
1596
1597       // optional bytes data = 3;
1598       private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
1599       /**
1600        * <code>optional bytes data = 3;</code>
1601        */
1602       public boolean hasData() {
1603         return ((bitField0_ & 0x00000004) == 0x00000004);
1604       }
1605       /**
1606        * <code>optional bytes data = 3;</code>
1607        */
1608       public com.google.protobuf.ByteString getData() {
1609         return data_;
1610       }
1611       /**
1612        * <code>optional bytes data = 3;</code>
1613        */
1614       public Builder setData(com.google.protobuf.ByteString value) {
1615         if (value == null) {
1616     throw new NullPointerException();
1617   }
1618   bitField0_ |= 0x00000004;
1619         data_ = value;
1620         onChanged();
1621         return this;
1622       }
1623       /**
1624        * <code>optional bytes data = 3;</code>
1625        */
1626       public Builder clearData() {
1627         bitField0_ = (bitField0_ & ~0x00000004);
1628         data_ = getDefaultInstance().getData();
1629         onChanged();
1630         return this;
1631       }
1632
1633       // @@protoc_insertion_point(builder_scope:openxc.RawMessage)
1634     }
1635
1636     static {
1637       defaultInstance = new RawMessage(true);
1638       defaultInstance.initFields();
1639     }
1640
1641     // @@protoc_insertion_point(class_scope:openxc.RawMessage)
1642   }
1643
1644   public interface ControlCommandOrBuilder
1645       extends com.google.protobuf.MessageOrBuilder {
1646
1647     // optional .openxc.ControlCommand.Type type = 1;
1648     /**
1649      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
1650      */
1651     boolean hasType();
1652     /**
1653      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
1654      */
1655     com.openxc.BinaryMessages.ControlCommand.Type getType();
1656
1657     // optional .openxc.DiagnosticRequest diagnostic_request = 2;
1658     /**
1659      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1660      */
1661     boolean hasDiagnosticRequest();
1662     /**
1663      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1664      */
1665     com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest();
1666     /**
1667      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1668      */
1669     com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder();
1670   }
1671   /**
1672    * Protobuf type {@code openxc.ControlCommand}
1673    */
1674   public static final class ControlCommand extends
1675       com.google.protobuf.GeneratedMessage
1676       implements ControlCommandOrBuilder {
1677     // Use ControlCommand.newBuilder() to construct.
1678     private ControlCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1679       super(builder);
1680       this.unknownFields = builder.getUnknownFields();
1681     }
1682     private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1683
1684     private static final ControlCommand defaultInstance;
1685     public static ControlCommand getDefaultInstance() {
1686       return defaultInstance;
1687     }
1688
1689     public ControlCommand getDefaultInstanceForType() {
1690       return defaultInstance;
1691     }
1692
1693     private final com.google.protobuf.UnknownFieldSet unknownFields;
1694     @java.lang.Override
1695     public final com.google.protobuf.UnknownFieldSet
1696         getUnknownFields() {
1697       return this.unknownFields;
1698     }
1699     private ControlCommand(
1700         com.google.protobuf.CodedInputStream input,
1701         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1702         throws com.google.protobuf.InvalidProtocolBufferException {
1703       initFields();
1704       int mutable_bitField0_ = 0;
1705       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1706           com.google.protobuf.UnknownFieldSet.newBuilder();
1707       try {
1708         boolean done = false;
1709         while (!done) {
1710           int tag = input.readTag();
1711           switch (tag) {
1712             case 0:
1713               done = true;
1714               break;
1715             default: {
1716               if (!parseUnknownField(input, unknownFields,
1717                                      extensionRegistry, tag)) {
1718                 done = true;
1719               }
1720               break;
1721             }
1722             case 8: {
1723               int rawValue = input.readEnum();
1724               com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue);
1725               if (value == null) {
1726                 unknownFields.mergeVarintField(1, rawValue);
1727               } else {
1728                 bitField0_ |= 0x00000001;
1729                 type_ = value;
1730               }
1731               break;
1732             }
1733             case 18: {
1734               com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null;
1735               if (((bitField0_ & 0x00000002) == 0x00000002)) {
1736                 subBuilder = diagnosticRequest_.toBuilder();
1737               }
1738               diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry);
1739               if (subBuilder != null) {
1740                 subBuilder.mergeFrom(diagnosticRequest_);
1741                 diagnosticRequest_ = subBuilder.buildPartial();
1742               }
1743               bitField0_ |= 0x00000002;
1744               break;
1745             }
1746           }
1747         }
1748       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1749         throw e.setUnfinishedMessage(this);
1750       } catch (java.io.IOException e) {
1751         throw new com.google.protobuf.InvalidProtocolBufferException(
1752             e.getMessage()).setUnfinishedMessage(this);
1753       } finally {
1754         this.unknownFields = unknownFields.build();
1755         makeExtensionsImmutable();
1756       }
1757     }
1758     public static final com.google.protobuf.Descriptors.Descriptor
1759         getDescriptor() {
1760       return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
1761     }
1762
1763     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1764         internalGetFieldAccessorTable() {
1765       return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
1766           .ensureFieldAccessorsInitialized(
1767               com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
1768     }
1769
1770     public static com.google.protobuf.Parser<ControlCommand> PARSER =
1771         new com.google.protobuf.AbstractParser<ControlCommand>() {
1772       public ControlCommand parsePartialFrom(
1773           com.google.protobuf.CodedInputStream input,
1774           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1775           throws com.google.protobuf.InvalidProtocolBufferException {
1776         return new ControlCommand(input, extensionRegistry);
1777       }
1778     };
1779
1780     @java.lang.Override
1781     public com.google.protobuf.Parser<ControlCommand> getParserForType() {
1782       return PARSER;
1783     }
1784
1785     /**
1786      * Protobuf enum {@code openxc.ControlCommand.Type}
1787      */
1788     public enum Type
1789         implements com.google.protobuf.ProtocolMessageEnum {
1790       /**
1791        * <code>VERSION = 1;</code>
1792        */
1793       VERSION(0, 1),
1794       /**
1795        * <code>DEVICE_ID = 2;</code>
1796        */
1797       DEVICE_ID(1, 2),
1798       /**
1799        * <code>DIAGNOSTIC = 3;</code>
1800        */
1801       DIAGNOSTIC(2, 3),
1802       ;
1803
1804       /**
1805        * <code>VERSION = 1;</code>
1806        */
1807       public static final int VERSION_VALUE = 1;
1808       /**
1809        * <code>DEVICE_ID = 2;</code>
1810        */
1811       public static final int DEVICE_ID_VALUE = 2;
1812       /**
1813        * <code>DIAGNOSTIC = 3;</code>
1814        */
1815       public static final int DIAGNOSTIC_VALUE = 3;
1816
1817
1818       public final int getNumber() { return value; }
1819
1820       public static Type valueOf(int value) {
1821         switch (value) {
1822           case 1: return VERSION;
1823           case 2: return DEVICE_ID;
1824           case 3: return DIAGNOSTIC;
1825           default: return null;
1826         }
1827       }
1828
1829       public static com.google.protobuf.Internal.EnumLiteMap<Type>
1830           internalGetValueMap() {
1831         return internalValueMap;
1832       }
1833       private static com.google.protobuf.Internal.EnumLiteMap<Type>
1834           internalValueMap =
1835             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
1836               public Type findValueByNumber(int number) {
1837                 return Type.valueOf(number);
1838               }
1839             };
1840
1841       public final com.google.protobuf.Descriptors.EnumValueDescriptor
1842           getValueDescriptor() {
1843         return getDescriptor().getValues().get(index);
1844       }
1845       public final com.google.protobuf.Descriptors.EnumDescriptor
1846           getDescriptorForType() {
1847         return getDescriptor();
1848       }
1849       public static final com.google.protobuf.Descriptors.EnumDescriptor
1850           getDescriptor() {
1851         return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0);
1852       }
1853
1854       private static final Type[] VALUES = values();
1855
1856       public static Type valueOf(
1857           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
1858         if (desc.getType() != getDescriptor()) {
1859           throw new java.lang.IllegalArgumentException(
1860             "EnumValueDescriptor is not for this type.");
1861         }
1862         return VALUES[desc.getIndex()];
1863       }
1864
1865       private final int index;
1866       private final int value;
1867
1868       private Type(int index, int value) {
1869         this.index = index;
1870         this.value = value;
1871       }
1872
1873       // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type)
1874     }
1875
1876     private int bitField0_;
1877     // optional .openxc.ControlCommand.Type type = 1;
1878     public static final int TYPE_FIELD_NUMBER = 1;
1879     private com.openxc.BinaryMessages.ControlCommand.Type type_;
1880     /**
1881      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
1882      */
1883     public boolean hasType() {
1884       return ((bitField0_ & 0x00000001) == 0x00000001);
1885     }
1886     /**
1887      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
1888      */
1889     public com.openxc.BinaryMessages.ControlCommand.Type getType() {
1890       return type_;
1891     }
1892
1893     // optional .openxc.DiagnosticRequest diagnostic_request = 2;
1894     public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2;
1895     private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_;
1896     /**
1897      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1898      */
1899     public boolean hasDiagnosticRequest() {
1900       return ((bitField0_ & 0x00000002) == 0x00000002);
1901     }
1902     /**
1903      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1904      */
1905     public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
1906       return diagnosticRequest_;
1907     }
1908     /**
1909      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1910      */
1911     public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
1912       return diagnosticRequest_;
1913     }
1914
1915     private void initFields() {
1916       type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
1917       diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
1918     }
1919     private byte memoizedIsInitialized = -1;
1920     public final boolean isInitialized() {
1921       byte isInitialized = memoizedIsInitialized;
1922       if (isInitialized != -1) return isInitialized == 1;
1923
1924       memoizedIsInitialized = 1;
1925       return true;
1926     }
1927
1928     public void writeTo(com.google.protobuf.CodedOutputStream output)
1929                         throws java.io.IOException {
1930       getSerializedSize();
1931       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1932         output.writeEnum(1, type_.getNumber());
1933       }
1934       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1935         output.writeMessage(2, diagnosticRequest_);
1936       }
1937       getUnknownFields().writeTo(output);
1938     }
1939
1940     private int memoizedSerializedSize = -1;
1941     public int getSerializedSize() {
1942       int size = memoizedSerializedSize;
1943       if (size != -1) return size;
1944
1945       size = 0;
1946       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1947         size += com.google.protobuf.CodedOutputStream
1948           .computeEnumSize(1, type_.getNumber());
1949       }
1950       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1951         size += com.google.protobuf.CodedOutputStream
1952           .computeMessageSize(2, diagnosticRequest_);
1953       }
1954       size += getUnknownFields().getSerializedSize();
1955       memoizedSerializedSize = size;
1956       return size;
1957     }
1958
1959     private static final long serialVersionUID = 0L;
1960     @java.lang.Override
1961     protected java.lang.Object writeReplace()
1962         throws java.io.ObjectStreamException {
1963       return super.writeReplace();
1964     }
1965
1966     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
1967         com.google.protobuf.ByteString data)
1968         throws com.google.protobuf.InvalidProtocolBufferException {
1969       return PARSER.parseFrom(data);
1970     }
1971     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
1972         com.google.protobuf.ByteString data,
1973         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1974         throws com.google.protobuf.InvalidProtocolBufferException {
1975       return PARSER.parseFrom(data, extensionRegistry);
1976     }
1977     public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data)
1978         throws com.google.protobuf.InvalidProtocolBufferException {
1979       return PARSER.parseFrom(data);
1980     }
1981     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
1982         byte[] data,
1983         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1984         throws com.google.protobuf.InvalidProtocolBufferException {
1985       return PARSER.parseFrom(data, extensionRegistry);
1986     }
1987     public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input)
1988         throws java.io.IOException {
1989       return PARSER.parseFrom(input);
1990     }
1991     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
1992         java.io.InputStream input,
1993         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1994         throws java.io.IOException {
1995       return PARSER.parseFrom(input, extensionRegistry);
1996     }
1997     public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input)
1998         throws java.io.IOException {
1999       return PARSER.parseDelimitedFrom(input);
2000     }
2001     public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(
2002         java.io.InputStream input,
2003         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2004         throws java.io.IOException {
2005       return PARSER.parseDelimitedFrom(input, extensionRegistry);
2006     }
2007     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2008         com.google.protobuf.CodedInputStream input)
2009         throws java.io.IOException {
2010       return PARSER.parseFrom(input);
2011     }
2012     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2013         com.google.protobuf.CodedInputStream input,
2014         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2015         throws java.io.IOException {
2016       return PARSER.parseFrom(input, extensionRegistry);
2017     }
2018
2019     public static Builder newBuilder() { return Builder.create(); }
2020     public Builder newBuilderForType() { return newBuilder(); }
2021     public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) {
2022       return newBuilder().mergeFrom(prototype);
2023     }
2024     public Builder toBuilder() { return newBuilder(this); }
2025
2026     @java.lang.Override
2027     protected Builder newBuilderForType(
2028         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2029       Builder builder = new Builder(parent);
2030       return builder;
2031     }
2032     /**
2033      * Protobuf type {@code openxc.ControlCommand}
2034      */
2035     public static final class Builder extends
2036         com.google.protobuf.GeneratedMessage.Builder<Builder>
2037        implements com.openxc.BinaryMessages.ControlCommandOrBuilder {
2038       public static final com.google.protobuf.Descriptors.Descriptor
2039           getDescriptor() {
2040         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2041       }
2042
2043       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2044           internalGetFieldAccessorTable() {
2045         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
2046             .ensureFieldAccessorsInitialized(
2047                 com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
2048       }
2049
2050       // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder()
2051       private Builder() {
2052         maybeForceBuilderInitialization();
2053       }
2054
2055       private Builder(
2056           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2057         super(parent);
2058         maybeForceBuilderInitialization();
2059       }
2060       private void maybeForceBuilderInitialization() {
2061         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2062           getDiagnosticRequestFieldBuilder();
2063         }
2064       }
2065       private static Builder create() {
2066         return new Builder();
2067       }
2068
2069       public Builder clear() {
2070         super.clear();
2071         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2072         bitField0_ = (bitField0_ & ~0x00000001);
2073         if (diagnosticRequestBuilder_ == null) {
2074           diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2075         } else {
2076           diagnosticRequestBuilder_.clear();
2077         }
2078         bitField0_ = (bitField0_ & ~0x00000002);
2079         return this;
2080       }
2081
2082       public Builder clone() {
2083         return create().mergeFrom(buildPartial());
2084       }
2085
2086       public com.google.protobuf.Descriptors.Descriptor
2087           getDescriptorForType() {
2088         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2089       }
2090
2091       public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() {
2092         return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
2093       }
2094
2095       public com.openxc.BinaryMessages.ControlCommand build() {
2096         com.openxc.BinaryMessages.ControlCommand result = buildPartial();
2097         if (!result.isInitialized()) {
2098           throw newUninitializedMessageException(result);
2099         }
2100         return result;
2101       }
2102
2103       public com.openxc.BinaryMessages.ControlCommand buildPartial() {
2104         com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this);
2105         int from_bitField0_ = bitField0_;
2106         int to_bitField0_ = 0;
2107         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2108           to_bitField0_ |= 0x00000001;
2109         }
2110         result.type_ = type_;
2111         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2112           to_bitField0_ |= 0x00000002;
2113         }
2114         if (diagnosticRequestBuilder_ == null) {
2115           result.diagnosticRequest_ = diagnosticRequest_;
2116         } else {
2117           result.diagnosticRequest_ = diagnosticRequestBuilder_.build();
2118         }
2119         result.bitField0_ = to_bitField0_;
2120         onBuilt();
2121         return result;
2122       }
2123
2124       public Builder mergeFrom(com.google.protobuf.Message other) {
2125         if (other instanceof com.openxc.BinaryMessages.ControlCommand) {
2126           return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other);
2127         } else {
2128           super.mergeFrom(other);
2129           return this;
2130         }
2131       }
2132
2133       public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) {
2134         if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this;
2135         if (other.hasType()) {
2136           setType(other.getType());
2137         }
2138         if (other.hasDiagnosticRequest()) {
2139           mergeDiagnosticRequest(other.getDiagnosticRequest());
2140         }
2141         this.mergeUnknownFields(other.getUnknownFields());
2142         return this;
2143       }
2144
2145       public final boolean isInitialized() {
2146         return true;
2147       }
2148
2149       public Builder mergeFrom(
2150           com.google.protobuf.CodedInputStream input,
2151           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2152           throws java.io.IOException {
2153         com.openxc.BinaryMessages.ControlCommand parsedMessage = null;
2154         try {
2155           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2156         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2157           parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage();
2158           throw e;
2159         } finally {
2160           if (parsedMessage != null) {
2161             mergeFrom(parsedMessage);
2162           }
2163         }
2164         return this;
2165       }
2166       private int bitField0_;
2167
2168       // optional .openxc.ControlCommand.Type type = 1;
2169       private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2170       /**
2171        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2172        */
2173       public boolean hasType() {
2174         return ((bitField0_ & 0x00000001) == 0x00000001);
2175       }
2176       /**
2177        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2178        */
2179       public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2180         return type_;
2181       }
2182       /**
2183        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2184        */
2185       public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
2186         if (value == null) {
2187           throw new NullPointerException();
2188         }
2189         bitField0_ |= 0x00000001;
2190         type_ = value;
2191         onChanged();
2192         return this;
2193       }
2194       /**
2195        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2196        */
2197       public Builder clearType() {
2198         bitField0_ = (bitField0_ & ~0x00000001);
2199         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2200         onChanged();
2201         return this;
2202       }
2203
2204       // optional .openxc.DiagnosticRequest diagnostic_request = 2;
2205       private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2206       private com.google.protobuf.SingleFieldBuilder<
2207           com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_;
2208       /**
2209        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2210        */
2211       public boolean hasDiagnosticRequest() {
2212         return ((bitField0_ & 0x00000002) == 0x00000002);
2213       }
2214       /**
2215        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2216        */
2217       public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
2218         if (diagnosticRequestBuilder_ == null) {
2219           return diagnosticRequest_;
2220         } else {
2221           return diagnosticRequestBuilder_.getMessage();
2222         }
2223       }
2224       /**
2225        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2226        */
2227       public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
2228         if (diagnosticRequestBuilder_ == null) {
2229           if (value == null) {
2230             throw new NullPointerException();
2231           }
2232           diagnosticRequest_ = value;
2233           onChanged();
2234         } else {
2235           diagnosticRequestBuilder_.setMessage(value);
2236         }
2237         bitField0_ |= 0x00000002;
2238         return this;
2239       }
2240       /**
2241        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2242        */
2243       public Builder setDiagnosticRequest(
2244           com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) {
2245         if (diagnosticRequestBuilder_ == null) {
2246           diagnosticRequest_ = builderForValue.build();
2247           onChanged();
2248         } else {
2249           diagnosticRequestBuilder_.setMessage(builderForValue.build());
2250         }
2251         bitField0_ |= 0x00000002;
2252         return this;
2253       }
2254       /**
2255        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2256        */
2257       public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
2258         if (diagnosticRequestBuilder_ == null) {
2259           if (((bitField0_ & 0x00000002) == 0x00000002) &&
2260               diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) {
2261             diagnosticRequest_ =
2262               com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial();
2263           } else {
2264             diagnosticRequest_ = value;
2265           }
2266           onChanged();
2267         } else {
2268           diagnosticRequestBuilder_.mergeFrom(value);
2269         }
2270         bitField0_ |= 0x00000002;
2271         return this;
2272       }
2273       /**
2274        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2275        */
2276       public Builder clearDiagnosticRequest() {
2277         if (diagnosticRequestBuilder_ == null) {
2278           diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2279           onChanged();
2280         } else {
2281           diagnosticRequestBuilder_.clear();
2282         }
2283         bitField0_ = (bitField0_ & ~0x00000002);
2284         return this;
2285       }
2286       /**
2287        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2288        */
2289       public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() {
2290         bitField0_ |= 0x00000002;
2291         onChanged();
2292         return getDiagnosticRequestFieldBuilder().getBuilder();
2293       }
2294       /**
2295        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2296        */
2297       public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
2298         if (diagnosticRequestBuilder_ != null) {
2299           return diagnosticRequestBuilder_.getMessageOrBuilder();
2300         } else {
2301           return diagnosticRequest_;
2302         }
2303       }
2304       /**
2305        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2306        */
2307       private com.google.protobuf.SingleFieldBuilder<
2308           com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> 
2309           getDiagnosticRequestFieldBuilder() {
2310         if (diagnosticRequestBuilder_ == null) {
2311           diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2312               com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>(
2313                   diagnosticRequest_,
2314                   getParentForChildren(),
2315                   isClean());
2316           diagnosticRequest_ = null;
2317         }
2318         return diagnosticRequestBuilder_;
2319       }
2320
2321       // @@protoc_insertion_point(builder_scope:openxc.ControlCommand)
2322     }
2323
2324     static {
2325       defaultInstance = new ControlCommand(true);
2326       defaultInstance.initFields();
2327     }
2328
2329     // @@protoc_insertion_point(class_scope:openxc.ControlCommand)
2330   }
2331
2332   public interface DiagnosticRequestOrBuilder
2333       extends com.google.protobuf.MessageOrBuilder {
2334
2335     // optional int32 bus = 1;
2336     /**
2337      * <code>optional int32 bus = 1;</code>
2338      */
2339     boolean hasBus();
2340     /**
2341      * <code>optional int32 bus = 1;</code>
2342      */
2343     int getBus();
2344
2345     // optional uint32 message_id = 2;
2346     /**
2347      * <code>optional uint32 message_id = 2;</code>
2348      */
2349     boolean hasMessageId();
2350     /**
2351      * <code>optional uint32 message_id = 2;</code>
2352      */
2353     int getMessageId();
2354
2355     // optional uint32 mode = 3;
2356     /**
2357      * <code>optional uint32 mode = 3;</code>
2358      */
2359     boolean hasMode();
2360     /**
2361      * <code>optional uint32 mode = 3;</code>
2362      */
2363     int getMode();
2364
2365     // optional uint32 pid = 4;
2366     /**
2367      * <code>optional uint32 pid = 4;</code>
2368      */
2369     boolean hasPid();
2370     /**
2371      * <code>optional uint32 pid = 4;</code>
2372      */
2373     int getPid();
2374
2375     // optional bytes payload = 5;
2376     /**
2377      * <code>optional bytes payload = 5;</code>
2378      *
2379      * <pre>
2380      * TODO we are capping this at 8 bytes for now - need to change when we
2381      * support multi-frame responses
2382      * </pre>
2383      */
2384     boolean hasPayload();
2385     /**
2386      * <code>optional bytes payload = 5;</code>
2387      *
2388      * <pre>
2389      * TODO we are capping this at 8 bytes for now - need to change when we
2390      * support multi-frame responses
2391      * </pre>
2392      */
2393     com.google.protobuf.ByteString getPayload();
2394
2395     // optional bool parse_payload = 6;
2396     /**
2397      * <code>optional bool parse_payload = 6;</code>
2398      */
2399     boolean hasParsePayload();
2400     /**
2401      * <code>optional bool parse_payload = 6;</code>
2402      */
2403     boolean getParsePayload();
2404
2405     // optional double factor = 7;
2406     /**
2407      * <code>optional double factor = 7;</code>
2408      */
2409     boolean hasFactor();
2410     /**
2411      * <code>optional double factor = 7;</code>
2412      */
2413     double getFactor();
2414
2415     // optional double offset = 8;
2416     /**
2417      * <code>optional double offset = 8;</code>
2418      */
2419     boolean hasOffset();
2420     /**
2421      * <code>optional double offset = 8;</code>
2422      */
2423     double getOffset();
2424
2425     // optional double frequency = 9;
2426     /**
2427      * <code>optional double frequency = 9;</code>
2428      */
2429     boolean hasFrequency();
2430     /**
2431      * <code>optional double frequency = 9;</code>
2432      */
2433     double getFrequency();
2434   }
2435   /**
2436    * Protobuf type {@code openxc.DiagnosticRequest}
2437    */
2438   public static final class DiagnosticRequest extends
2439       com.google.protobuf.GeneratedMessage
2440       implements DiagnosticRequestOrBuilder {
2441     // Use DiagnosticRequest.newBuilder() to construct.
2442     private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2443       super(builder);
2444       this.unknownFields = builder.getUnknownFields();
2445     }
2446     private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2447
2448     private static final DiagnosticRequest defaultInstance;
2449     public static DiagnosticRequest getDefaultInstance() {
2450       return defaultInstance;
2451     }
2452
2453     public DiagnosticRequest getDefaultInstanceForType() {
2454       return defaultInstance;
2455     }
2456
2457     private final com.google.protobuf.UnknownFieldSet unknownFields;
2458     @java.lang.Override
2459     public final com.google.protobuf.UnknownFieldSet
2460         getUnknownFields() {
2461       return this.unknownFields;
2462     }
2463     private DiagnosticRequest(
2464         com.google.protobuf.CodedInputStream input,
2465         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2466         throws com.google.protobuf.InvalidProtocolBufferException {
2467       initFields();
2468       int mutable_bitField0_ = 0;
2469       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2470           com.google.protobuf.UnknownFieldSet.newBuilder();
2471       try {
2472         boolean done = false;
2473         while (!done) {
2474           int tag = input.readTag();
2475           switch (tag) {
2476             case 0:
2477               done = true;
2478               break;
2479             default: {
2480               if (!parseUnknownField(input, unknownFields,
2481                                      extensionRegistry, tag)) {
2482                 done = true;
2483               }
2484               break;
2485             }
2486             case 8: {
2487               bitField0_ |= 0x00000001;
2488               bus_ = input.readInt32();
2489               break;
2490             }
2491             case 16: {
2492               bitField0_ |= 0x00000002;
2493               messageId_ = input.readUInt32();
2494               break;
2495             }
2496             case 24: {
2497               bitField0_ |= 0x00000004;
2498               mode_ = input.readUInt32();
2499               break;
2500             }
2501             case 32: {
2502               bitField0_ |= 0x00000008;
2503               pid_ = input.readUInt32();
2504               break;
2505             }
2506             case 42: {
2507               bitField0_ |= 0x00000010;
2508               payload_ = input.readBytes();
2509               break;
2510             }
2511             case 48: {
2512               bitField0_ |= 0x00000020;
2513               parsePayload_ = input.readBool();
2514               break;
2515             }
2516             case 57: {
2517               bitField0_ |= 0x00000040;
2518               factor_ = input.readDouble();
2519               break;
2520             }
2521             case 65: {
2522               bitField0_ |= 0x00000080;
2523               offset_ = input.readDouble();
2524               break;
2525             }
2526             case 73: {
2527               bitField0_ |= 0x00000100;
2528               frequency_ = input.readDouble();
2529               break;
2530             }
2531           }
2532         }
2533       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2534         throw e.setUnfinishedMessage(this);
2535       } catch (java.io.IOException e) {
2536         throw new com.google.protobuf.InvalidProtocolBufferException(
2537             e.getMessage()).setUnfinishedMessage(this);
2538       } finally {
2539         this.unknownFields = unknownFields.build();
2540         makeExtensionsImmutable();
2541       }
2542     }
2543     public static final com.google.protobuf.Descriptors.Descriptor
2544         getDescriptor() {
2545       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
2546     }
2547
2548     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2549         internalGetFieldAccessorTable() {
2550       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
2551           .ensureFieldAccessorsInitialized(
2552               com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
2553     }
2554
2555     public static com.google.protobuf.Parser<DiagnosticRequest> PARSER =
2556         new com.google.protobuf.AbstractParser<DiagnosticRequest>() {
2557       public DiagnosticRequest parsePartialFrom(
2558           com.google.protobuf.CodedInputStream input,
2559           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2560           throws com.google.protobuf.InvalidProtocolBufferException {
2561         return new DiagnosticRequest(input, extensionRegistry);
2562       }
2563     };
2564
2565     @java.lang.Override
2566     public com.google.protobuf.Parser<DiagnosticRequest> getParserForType() {
2567       return PARSER;
2568     }
2569
2570     private int bitField0_;
2571     // optional int32 bus = 1;
2572     public static final int BUS_FIELD_NUMBER = 1;
2573     private int bus_;
2574     /**
2575      * <code>optional int32 bus = 1;</code>
2576      */
2577     public boolean hasBus() {
2578       return ((bitField0_ & 0x00000001) == 0x00000001);
2579     }
2580     /**
2581      * <code>optional int32 bus = 1;</code>
2582      */
2583     public int getBus() {
2584       return bus_;
2585     }
2586
2587     // optional uint32 message_id = 2;
2588     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
2589     private int messageId_;
2590     /**
2591      * <code>optional uint32 message_id = 2;</code>
2592      */
2593     public boolean hasMessageId() {
2594       return ((bitField0_ & 0x00000002) == 0x00000002);
2595     }
2596     /**
2597      * <code>optional uint32 message_id = 2;</code>
2598      */
2599     public int getMessageId() {
2600       return messageId_;
2601     }
2602
2603     // optional uint32 mode = 3;
2604     public static final int MODE_FIELD_NUMBER = 3;
2605     private int mode_;
2606     /**
2607      * <code>optional uint32 mode = 3;</code>
2608      */
2609     public boolean hasMode() {
2610       return ((bitField0_ & 0x00000004) == 0x00000004);
2611     }
2612     /**
2613      * <code>optional uint32 mode = 3;</code>
2614      */
2615     public int getMode() {
2616       return mode_;
2617     }
2618
2619     // optional uint32 pid = 4;
2620     public static final int PID_FIELD_NUMBER = 4;
2621     private int pid_;
2622     /**
2623      * <code>optional uint32 pid = 4;</code>
2624      */
2625     public boolean hasPid() {
2626       return ((bitField0_ & 0x00000008) == 0x00000008);
2627     }
2628     /**
2629      * <code>optional uint32 pid = 4;</code>
2630      */
2631     public int getPid() {
2632       return pid_;
2633     }
2634
2635     // optional bytes payload = 5;
2636     public static final int PAYLOAD_FIELD_NUMBER = 5;
2637     private com.google.protobuf.ByteString payload_;
2638     /**
2639      * <code>optional bytes payload = 5;</code>
2640      *
2641      * <pre>
2642      * TODO we are capping this at 8 bytes for now - need to change when we
2643      * support multi-frame responses
2644      * </pre>
2645      */
2646     public boolean hasPayload() {
2647       return ((bitField0_ & 0x00000010) == 0x00000010);
2648     }
2649     /**
2650      * <code>optional bytes payload = 5;</code>
2651      *
2652      * <pre>
2653      * TODO we are capping this at 8 bytes for now - need to change when we
2654      * support multi-frame responses
2655      * </pre>
2656      */
2657     public com.google.protobuf.ByteString getPayload() {
2658       return payload_;
2659     }
2660
2661     // optional bool parse_payload = 6;
2662     public static final int PARSE_PAYLOAD_FIELD_NUMBER = 6;
2663     private boolean parsePayload_;
2664     /**
2665      * <code>optional bool parse_payload = 6;</code>
2666      */
2667     public boolean hasParsePayload() {
2668       return ((bitField0_ & 0x00000020) == 0x00000020);
2669     }
2670     /**
2671      * <code>optional bool parse_payload = 6;</code>
2672      */
2673     public boolean getParsePayload() {
2674       return parsePayload_;
2675     }
2676
2677     // optional double factor = 7;
2678     public static final int FACTOR_FIELD_NUMBER = 7;
2679     private double factor_;
2680     /**
2681      * <code>optional double factor = 7;</code>
2682      */
2683     public boolean hasFactor() {
2684       return ((bitField0_ & 0x00000040) == 0x00000040);
2685     }
2686     /**
2687      * <code>optional double factor = 7;</code>
2688      */
2689     public double getFactor() {
2690       return factor_;
2691     }
2692
2693     // optional double offset = 8;
2694     public static final int OFFSET_FIELD_NUMBER = 8;
2695     private double offset_;
2696     /**
2697      * <code>optional double offset = 8;</code>
2698      */
2699     public boolean hasOffset() {
2700       return ((bitField0_ & 0x00000080) == 0x00000080);
2701     }
2702     /**
2703      * <code>optional double offset = 8;</code>
2704      */
2705     public double getOffset() {
2706       return offset_;
2707     }
2708
2709     // optional double frequency = 9;
2710     public static final int FREQUENCY_FIELD_NUMBER = 9;
2711     private double frequency_;
2712     /**
2713      * <code>optional double frequency = 9;</code>
2714      */
2715     public boolean hasFrequency() {
2716       return ((bitField0_ & 0x00000100) == 0x00000100);
2717     }
2718     /**
2719      * <code>optional double frequency = 9;</code>
2720      */
2721     public double getFrequency() {
2722       return frequency_;
2723     }
2724
2725     private void initFields() {
2726       bus_ = 0;
2727       messageId_ = 0;
2728       mode_ = 0;
2729       pid_ = 0;
2730       payload_ = com.google.protobuf.ByteString.EMPTY;
2731       parsePayload_ = false;
2732       factor_ = 0D;
2733       offset_ = 0D;
2734       frequency_ = 0D;
2735     }
2736     private byte memoizedIsInitialized = -1;
2737     public final boolean isInitialized() {
2738       byte isInitialized = memoizedIsInitialized;
2739       if (isInitialized != -1) return isInitialized == 1;
2740
2741       memoizedIsInitialized = 1;
2742       return true;
2743     }
2744
2745     public void writeTo(com.google.protobuf.CodedOutputStream output)
2746                         throws java.io.IOException {
2747       getSerializedSize();
2748       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2749         output.writeInt32(1, bus_);
2750       }
2751       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2752         output.writeUInt32(2, messageId_);
2753       }
2754       if (((bitField0_ & 0x00000004) == 0x00000004)) {
2755         output.writeUInt32(3, mode_);
2756       }
2757       if (((bitField0_ & 0x00000008) == 0x00000008)) {
2758         output.writeUInt32(4, pid_);
2759       }
2760       if (((bitField0_ & 0x00000010) == 0x00000010)) {
2761         output.writeBytes(5, payload_);
2762       }
2763       if (((bitField0_ & 0x00000020) == 0x00000020)) {
2764         output.writeBool(6, parsePayload_);
2765       }
2766       if (((bitField0_ & 0x00000040) == 0x00000040)) {
2767         output.writeDouble(7, factor_);
2768       }
2769       if (((bitField0_ & 0x00000080) == 0x00000080)) {
2770         output.writeDouble(8, offset_);
2771       }
2772       if (((bitField0_ & 0x00000100) == 0x00000100)) {
2773         output.writeDouble(9, frequency_);
2774       }
2775       getUnknownFields().writeTo(output);
2776     }
2777
2778     private int memoizedSerializedSize = -1;
2779     public int getSerializedSize() {
2780       int size = memoizedSerializedSize;
2781       if (size != -1) return size;
2782
2783       size = 0;
2784       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2785         size += com.google.protobuf.CodedOutputStream
2786           .computeInt32Size(1, bus_);
2787       }
2788       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2789         size += com.google.protobuf.CodedOutputStream
2790           .computeUInt32Size(2, messageId_);
2791       }
2792       if (((bitField0_ & 0x00000004) == 0x00000004)) {
2793         size += com.google.protobuf.CodedOutputStream
2794           .computeUInt32Size(3, mode_);
2795       }
2796       if (((bitField0_ & 0x00000008) == 0x00000008)) {
2797         size += com.google.protobuf.CodedOutputStream
2798           .computeUInt32Size(4, pid_);
2799       }
2800       if (((bitField0_ & 0x00000010) == 0x00000010)) {
2801         size += com.google.protobuf.CodedOutputStream
2802           .computeBytesSize(5, payload_);
2803       }
2804       if (((bitField0_ & 0x00000020) == 0x00000020)) {
2805         size += com.google.protobuf.CodedOutputStream
2806           .computeBoolSize(6, parsePayload_);
2807       }
2808       if (((bitField0_ & 0x00000040) == 0x00000040)) {
2809         size += com.google.protobuf.CodedOutputStream
2810           .computeDoubleSize(7, factor_);
2811       }
2812       if (((bitField0_ & 0x00000080) == 0x00000080)) {
2813         size += com.google.protobuf.CodedOutputStream
2814           .computeDoubleSize(8, offset_);
2815       }
2816       if (((bitField0_ & 0x00000100) == 0x00000100)) {
2817         size += com.google.protobuf.CodedOutputStream
2818           .computeDoubleSize(9, frequency_);
2819       }
2820       size += getUnknownFields().getSerializedSize();
2821       memoizedSerializedSize = size;
2822       return size;
2823     }
2824
2825     private static final long serialVersionUID = 0L;
2826     @java.lang.Override
2827     protected java.lang.Object writeReplace()
2828         throws java.io.ObjectStreamException {
2829       return super.writeReplace();
2830     }
2831
2832     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
2833         com.google.protobuf.ByteString data)
2834         throws com.google.protobuf.InvalidProtocolBufferException {
2835       return PARSER.parseFrom(data);
2836     }
2837     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
2838         com.google.protobuf.ByteString data,
2839         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2840         throws com.google.protobuf.InvalidProtocolBufferException {
2841       return PARSER.parseFrom(data, extensionRegistry);
2842     }
2843     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data)
2844         throws com.google.protobuf.InvalidProtocolBufferException {
2845       return PARSER.parseFrom(data);
2846     }
2847     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
2848         byte[] data,
2849         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2850         throws com.google.protobuf.InvalidProtocolBufferException {
2851       return PARSER.parseFrom(data, extensionRegistry);
2852     }
2853     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input)
2854         throws java.io.IOException {
2855       return PARSER.parseFrom(input);
2856     }
2857     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
2858         java.io.InputStream input,
2859         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2860         throws java.io.IOException {
2861       return PARSER.parseFrom(input, extensionRegistry);
2862     }
2863     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input)
2864         throws java.io.IOException {
2865       return PARSER.parseDelimitedFrom(input);
2866     }
2867     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(
2868         java.io.InputStream input,
2869         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2870         throws java.io.IOException {
2871       return PARSER.parseDelimitedFrom(input, extensionRegistry);
2872     }
2873     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
2874         com.google.protobuf.CodedInputStream input)
2875         throws java.io.IOException {
2876       return PARSER.parseFrom(input);
2877     }
2878     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
2879         com.google.protobuf.CodedInputStream input,
2880         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2881         throws java.io.IOException {
2882       return PARSER.parseFrom(input, extensionRegistry);
2883     }
2884
2885     public static Builder newBuilder() { return Builder.create(); }
2886     public Builder newBuilderForType() { return newBuilder(); }
2887     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) {
2888       return newBuilder().mergeFrom(prototype);
2889     }
2890     public Builder toBuilder() { return newBuilder(this); }
2891
2892     @java.lang.Override
2893     protected Builder newBuilderForType(
2894         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2895       Builder builder = new Builder(parent);
2896       return builder;
2897     }
2898     /**
2899      * Protobuf type {@code openxc.DiagnosticRequest}
2900      */
2901     public static final class Builder extends
2902         com.google.protobuf.GeneratedMessage.Builder<Builder>
2903        implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder {
2904       public static final com.google.protobuf.Descriptors.Descriptor
2905           getDescriptor() {
2906         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
2907       }
2908
2909       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2910           internalGetFieldAccessorTable() {
2911         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
2912             .ensureFieldAccessorsInitialized(
2913                 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
2914       }
2915
2916       // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder()
2917       private Builder() {
2918         maybeForceBuilderInitialization();
2919       }
2920
2921       private Builder(
2922           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2923         super(parent);
2924         maybeForceBuilderInitialization();
2925       }
2926       private void maybeForceBuilderInitialization() {
2927         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2928         }
2929       }
2930       private static Builder create() {
2931         return new Builder();
2932       }
2933
2934       public Builder clear() {
2935         super.clear();
2936         bus_ = 0;
2937         bitField0_ = (bitField0_ & ~0x00000001);
2938         messageId_ = 0;
2939         bitField0_ = (bitField0_ & ~0x00000002);
2940         mode_ = 0;
2941         bitField0_ = (bitField0_ & ~0x00000004);
2942         pid_ = 0;
2943         bitField0_ = (bitField0_ & ~0x00000008);
2944         payload_ = com.google.protobuf.ByteString.EMPTY;
2945         bitField0_ = (bitField0_ & ~0x00000010);
2946         parsePayload_ = false;
2947         bitField0_ = (bitField0_ & ~0x00000020);
2948         factor_ = 0D;
2949         bitField0_ = (bitField0_ & ~0x00000040);
2950         offset_ = 0D;
2951         bitField0_ = (bitField0_ & ~0x00000080);
2952         frequency_ = 0D;
2953         bitField0_ = (bitField0_ & ~0x00000100);
2954         return this;
2955       }
2956
2957       public Builder clone() {
2958         return create().mergeFrom(buildPartial());
2959       }
2960
2961       public com.google.protobuf.Descriptors.Descriptor
2962           getDescriptorForType() {
2963         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
2964       }
2965
2966       public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() {
2967         return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2968       }
2969
2970       public com.openxc.BinaryMessages.DiagnosticRequest build() {
2971         com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial();
2972         if (!result.isInitialized()) {
2973           throw newUninitializedMessageException(result);
2974         }
2975         return result;
2976       }
2977
2978       public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() {
2979         com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this);
2980         int from_bitField0_ = bitField0_;
2981         int to_bitField0_ = 0;
2982         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2983           to_bitField0_ |= 0x00000001;
2984         }
2985         result.bus_ = bus_;
2986         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2987           to_bitField0_ |= 0x00000002;
2988         }
2989         result.messageId_ = messageId_;
2990         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
2991           to_bitField0_ |= 0x00000004;
2992         }
2993         result.mode_ = mode_;
2994         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
2995           to_bitField0_ |= 0x00000008;
2996         }
2997         result.pid_ = pid_;
2998         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
2999           to_bitField0_ |= 0x00000010;
3000         }
3001         result.payload_ = payload_;
3002         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
3003           to_bitField0_ |= 0x00000020;
3004         }
3005         result.parsePayload_ = parsePayload_;
3006         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
3007           to_bitField0_ |= 0x00000040;
3008         }
3009         result.factor_ = factor_;
3010         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
3011           to_bitField0_ |= 0x00000080;
3012         }
3013         result.offset_ = offset_;
3014         if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
3015           to_bitField0_ |= 0x00000100;
3016         }
3017         result.frequency_ = frequency_;
3018         result.bitField0_ = to_bitField0_;
3019         onBuilt();
3020         return result;
3021       }
3022
3023       public Builder mergeFrom(com.google.protobuf.Message other) {
3024         if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) {
3025           return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other);
3026         } else {
3027           super.mergeFrom(other);
3028           return this;
3029         }
3030       }
3031
3032       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) {
3033         if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this;
3034         if (other.hasBus()) {
3035           setBus(other.getBus());
3036         }
3037         if (other.hasMessageId()) {
3038           setMessageId(other.getMessageId());
3039         }
3040         if (other.hasMode()) {
3041           setMode(other.getMode());
3042         }
3043         if (other.hasPid()) {
3044           setPid(other.getPid());
3045         }
3046         if (other.hasPayload()) {
3047           setPayload(other.getPayload());
3048         }
3049         if (other.hasParsePayload()) {
3050           setParsePayload(other.getParsePayload());
3051         }
3052         if (other.hasFactor()) {
3053           setFactor(other.getFactor());
3054         }
3055         if (other.hasOffset()) {
3056           setOffset(other.getOffset());
3057         }
3058         if (other.hasFrequency()) {
3059           setFrequency(other.getFrequency());
3060         }
3061         this.mergeUnknownFields(other.getUnknownFields());
3062         return this;
3063       }
3064
3065       public final boolean isInitialized() {
3066         return true;
3067       }
3068
3069       public Builder mergeFrom(
3070           com.google.protobuf.CodedInputStream input,
3071           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3072           throws java.io.IOException {
3073         com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null;
3074         try {
3075           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3076         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3077           parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage();
3078           throw e;
3079         } finally {
3080           if (parsedMessage != null) {
3081             mergeFrom(parsedMessage);
3082           }
3083         }
3084         return this;
3085       }
3086       private int bitField0_;
3087
3088       // optional int32 bus = 1;
3089       private int bus_ ;
3090       /**
3091        * <code>optional int32 bus = 1;</code>
3092        */
3093       public boolean hasBus() {
3094         return ((bitField0_ & 0x00000001) == 0x00000001);
3095       }
3096       /**
3097        * <code>optional int32 bus = 1;</code>
3098        */
3099       public int getBus() {
3100         return bus_;
3101       }
3102       /**
3103        * <code>optional int32 bus = 1;</code>
3104        */
3105       public Builder setBus(int value) {
3106         bitField0_ |= 0x00000001;
3107         bus_ = value;
3108         onChanged();
3109         return this;
3110       }
3111       /**
3112        * <code>optional int32 bus = 1;</code>
3113        */
3114       public Builder clearBus() {
3115         bitField0_ = (bitField0_ & ~0x00000001);
3116         bus_ = 0;
3117         onChanged();
3118         return this;
3119       }
3120
3121       // optional uint32 message_id = 2;
3122       private int messageId_ ;
3123       /**
3124        * <code>optional uint32 message_id = 2;</code>
3125        */
3126       public boolean hasMessageId() {
3127         return ((bitField0_ & 0x00000002) == 0x00000002);
3128       }
3129       /**
3130        * <code>optional uint32 message_id = 2;</code>
3131        */
3132       public int getMessageId() {
3133         return messageId_;
3134       }
3135       /**
3136        * <code>optional uint32 message_id = 2;</code>
3137        */
3138       public Builder setMessageId(int value) {
3139         bitField0_ |= 0x00000002;
3140         messageId_ = value;
3141         onChanged();
3142         return this;
3143       }
3144       /**
3145        * <code>optional uint32 message_id = 2;</code>
3146        */
3147       public Builder clearMessageId() {
3148         bitField0_ = (bitField0_ & ~0x00000002);
3149         messageId_ = 0;
3150         onChanged();
3151         return this;
3152       }
3153
3154       // optional uint32 mode = 3;
3155       private int mode_ ;
3156       /**
3157        * <code>optional uint32 mode = 3;</code>
3158        */
3159       public boolean hasMode() {
3160         return ((bitField0_ & 0x00000004) == 0x00000004);
3161       }
3162       /**
3163        * <code>optional uint32 mode = 3;</code>
3164        */
3165       public int getMode() {
3166         return mode_;
3167       }
3168       /**
3169        * <code>optional uint32 mode = 3;</code>
3170        */
3171       public Builder setMode(int value) {
3172         bitField0_ |= 0x00000004;
3173         mode_ = value;
3174         onChanged();
3175         return this;
3176       }
3177       /**
3178        * <code>optional uint32 mode = 3;</code>
3179        */
3180       public Builder clearMode() {
3181         bitField0_ = (bitField0_ & ~0x00000004);
3182         mode_ = 0;
3183         onChanged();
3184         return this;
3185       }
3186
3187       // optional uint32 pid = 4;
3188       private int pid_ ;
3189       /**
3190        * <code>optional uint32 pid = 4;</code>
3191        */
3192       public boolean hasPid() {
3193         return ((bitField0_ & 0x00000008) == 0x00000008);
3194       }
3195       /**
3196        * <code>optional uint32 pid = 4;</code>
3197        */
3198       public int getPid() {
3199         return pid_;
3200       }
3201       /**
3202        * <code>optional uint32 pid = 4;</code>
3203        */
3204       public Builder setPid(int value) {
3205         bitField0_ |= 0x00000008;
3206         pid_ = value;
3207         onChanged();
3208         return this;
3209       }
3210       /**
3211        * <code>optional uint32 pid = 4;</code>
3212        */
3213       public Builder clearPid() {
3214         bitField0_ = (bitField0_ & ~0x00000008);
3215         pid_ = 0;
3216         onChanged();
3217         return this;
3218       }
3219
3220       // optional bytes payload = 5;
3221       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
3222       /**
3223        * <code>optional bytes payload = 5;</code>
3224        *
3225        * <pre>
3226        * TODO we are capping this at 8 bytes for now - need to change when we
3227        * support multi-frame responses
3228        * </pre>
3229        */
3230       public boolean hasPayload() {
3231         return ((bitField0_ & 0x00000010) == 0x00000010);
3232       }
3233       /**
3234        * <code>optional bytes payload = 5;</code>
3235        *
3236        * <pre>
3237        * TODO we are capping this at 8 bytes for now - need to change when we
3238        * support multi-frame responses
3239        * </pre>
3240        */
3241       public com.google.protobuf.ByteString getPayload() {
3242         return payload_;
3243       }
3244       /**
3245        * <code>optional bytes payload = 5;</code>
3246        *
3247        * <pre>
3248        * TODO we are capping this at 8 bytes for now - need to change when we
3249        * support multi-frame responses
3250        * </pre>
3251        */
3252       public Builder setPayload(com.google.protobuf.ByteString value) {
3253         if (value == null) {
3254     throw new NullPointerException();
3255   }
3256   bitField0_ |= 0x00000010;
3257         payload_ = value;
3258         onChanged();
3259         return this;
3260       }
3261       /**
3262        * <code>optional bytes payload = 5;</code>
3263        *
3264        * <pre>
3265        * TODO we are capping this at 8 bytes for now - need to change when we
3266        * support multi-frame responses
3267        * </pre>
3268        */
3269       public Builder clearPayload() {
3270         bitField0_ = (bitField0_ & ~0x00000010);
3271         payload_ = getDefaultInstance().getPayload();
3272         onChanged();
3273         return this;
3274       }
3275
3276       // optional bool parse_payload = 6;
3277       private boolean parsePayload_ ;
3278       /**
3279        * <code>optional bool parse_payload = 6;</code>
3280        */
3281       public boolean hasParsePayload() {
3282         return ((bitField0_ & 0x00000020) == 0x00000020);
3283       }
3284       /**
3285        * <code>optional bool parse_payload = 6;</code>
3286        */
3287       public boolean getParsePayload() {
3288         return parsePayload_;
3289       }
3290       /**
3291        * <code>optional bool parse_payload = 6;</code>
3292        */
3293       public Builder setParsePayload(boolean value) {
3294         bitField0_ |= 0x00000020;
3295         parsePayload_ = value;
3296         onChanged();
3297         return this;
3298       }
3299       /**
3300        * <code>optional bool parse_payload = 6;</code>
3301        */
3302       public Builder clearParsePayload() {
3303         bitField0_ = (bitField0_ & ~0x00000020);
3304         parsePayload_ = false;
3305         onChanged();
3306         return this;
3307       }
3308
3309       // optional double factor = 7;
3310       private double factor_ ;
3311       /**
3312        * <code>optional double factor = 7;</code>
3313        */
3314       public boolean hasFactor() {
3315         return ((bitField0_ & 0x00000040) == 0x00000040);
3316       }
3317       /**
3318        * <code>optional double factor = 7;</code>
3319        */
3320       public double getFactor() {
3321         return factor_;
3322       }
3323       /**
3324        * <code>optional double factor = 7;</code>
3325        */
3326       public Builder setFactor(double value) {
3327         bitField0_ |= 0x00000040;
3328         factor_ = value;
3329         onChanged();
3330         return this;
3331       }
3332       /**
3333        * <code>optional double factor = 7;</code>
3334        */
3335       public Builder clearFactor() {
3336         bitField0_ = (bitField0_ & ~0x00000040);
3337         factor_ = 0D;
3338         onChanged();
3339         return this;
3340       }
3341
3342       // optional double offset = 8;
3343       private double offset_ ;
3344       /**
3345        * <code>optional double offset = 8;</code>
3346        */
3347       public boolean hasOffset() {
3348         return ((bitField0_ & 0x00000080) == 0x00000080);
3349       }
3350       /**
3351        * <code>optional double offset = 8;</code>
3352        */
3353       public double getOffset() {
3354         return offset_;
3355       }
3356       /**
3357        * <code>optional double offset = 8;</code>
3358        */
3359       public Builder setOffset(double value) {
3360         bitField0_ |= 0x00000080;
3361         offset_ = value;
3362         onChanged();
3363         return this;
3364       }
3365       /**
3366        * <code>optional double offset = 8;</code>
3367        */
3368       public Builder clearOffset() {
3369         bitField0_ = (bitField0_ & ~0x00000080);
3370         offset_ = 0D;
3371         onChanged();
3372         return this;
3373       }
3374
3375       // optional double frequency = 9;
3376       private double frequency_ ;
3377       /**
3378        * <code>optional double frequency = 9;</code>
3379        */
3380       public boolean hasFrequency() {
3381         return ((bitField0_ & 0x00000100) == 0x00000100);
3382       }
3383       /**
3384        * <code>optional double frequency = 9;</code>
3385        */
3386       public double getFrequency() {
3387         return frequency_;
3388       }
3389       /**
3390        * <code>optional double frequency = 9;</code>
3391        */
3392       public Builder setFrequency(double value) {
3393         bitField0_ |= 0x00000100;
3394         frequency_ = value;
3395         onChanged();
3396         return this;
3397       }
3398       /**
3399        * <code>optional double frequency = 9;</code>
3400        */
3401       public Builder clearFrequency() {
3402         bitField0_ = (bitField0_ & ~0x00000100);
3403         frequency_ = 0D;
3404         onChanged();
3405         return this;
3406       }
3407
3408       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest)
3409     }
3410
3411     static {
3412       defaultInstance = new DiagnosticRequest(true);
3413       defaultInstance.initFields();
3414     }
3415
3416     // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest)
3417   }
3418
3419   public interface DiagnosticResponseOrBuilder
3420       extends com.google.protobuf.MessageOrBuilder {
3421
3422     // optional int32 bus = 1;
3423     /**
3424      * <code>optional int32 bus = 1;</code>
3425      */
3426     boolean hasBus();
3427     /**
3428      * <code>optional int32 bus = 1;</code>
3429      */
3430     int getBus();
3431
3432     // optional uint32 message_id = 2;
3433     /**
3434      * <code>optional uint32 message_id = 2;</code>
3435      */
3436     boolean hasMessageId();
3437     /**
3438      * <code>optional uint32 message_id = 2;</code>
3439      */
3440     int getMessageId();
3441
3442     // optional uint32 mode = 3;
3443     /**
3444      * <code>optional uint32 mode = 3;</code>
3445      */
3446     boolean hasMode();
3447     /**
3448      * <code>optional uint32 mode = 3;</code>
3449      */
3450     int getMode();
3451
3452     // optional uint32 pid = 4;
3453     /**
3454      * <code>optional uint32 pid = 4;</code>
3455      */
3456     boolean hasPid();
3457     /**
3458      * <code>optional uint32 pid = 4;</code>
3459      */
3460     int getPid();
3461
3462     // optional bool success = 5;
3463     /**
3464      * <code>optional bool success = 5;</code>
3465      */
3466     boolean hasSuccess();
3467     /**
3468      * <code>optional bool success = 5;</code>
3469      */
3470     boolean getSuccess();
3471
3472     // optional uint32 negative_response_code = 6;
3473     /**
3474      * <code>optional uint32 negative_response_code = 6;</code>
3475      */
3476     boolean hasNegativeResponseCode();
3477     /**
3478      * <code>optional uint32 negative_response_code = 6;</code>
3479      */
3480     int getNegativeResponseCode();
3481
3482     // optional bytes payload = 7;
3483     /**
3484      * <code>optional bytes payload = 7;</code>
3485      *
3486      * <pre>
3487      * TODO we are capping this at 8 bytes for now - need to change when we
3488      * support multi-frame responses
3489      * </pre>
3490      */
3491     boolean hasPayload();
3492     /**
3493      * <code>optional bytes payload = 7;</code>
3494      *
3495      * <pre>
3496      * TODO we are capping this at 8 bytes for now - need to change when we
3497      * support multi-frame responses
3498      * </pre>
3499      */
3500     com.google.protobuf.ByteString getPayload();
3501
3502     // optional double value = 8;
3503     /**
3504      * <code>optional double value = 8;</code>
3505      */
3506     boolean hasValue();
3507     /**
3508      * <code>optional double value = 8;</code>
3509      */
3510     double getValue();
3511   }
3512   /**
3513    * Protobuf type {@code openxc.DiagnosticResponse}
3514    */
3515   public static final class DiagnosticResponse extends
3516       com.google.protobuf.GeneratedMessage
3517       implements DiagnosticResponseOrBuilder {
3518     // Use DiagnosticResponse.newBuilder() to construct.
3519     private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3520       super(builder);
3521       this.unknownFields = builder.getUnknownFields();
3522     }
3523     private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3524
3525     private static final DiagnosticResponse defaultInstance;
3526     public static DiagnosticResponse getDefaultInstance() {
3527       return defaultInstance;
3528     }
3529
3530     public DiagnosticResponse getDefaultInstanceForType() {
3531       return defaultInstance;
3532     }
3533
3534     private final com.google.protobuf.UnknownFieldSet unknownFields;
3535     @java.lang.Override
3536     public final com.google.protobuf.UnknownFieldSet
3537         getUnknownFields() {
3538       return this.unknownFields;
3539     }
3540     private DiagnosticResponse(
3541         com.google.protobuf.CodedInputStream input,
3542         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3543         throws com.google.protobuf.InvalidProtocolBufferException {
3544       initFields();
3545       int mutable_bitField0_ = 0;
3546       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3547           com.google.protobuf.UnknownFieldSet.newBuilder();
3548       try {
3549         boolean done = false;
3550         while (!done) {
3551           int tag = input.readTag();
3552           switch (tag) {
3553             case 0:
3554               done = true;
3555               break;
3556             default: {
3557               if (!parseUnknownField(input, unknownFields,
3558                                      extensionRegistry, tag)) {
3559                 done = true;
3560               }
3561               break;
3562             }
3563             case 8: {
3564               bitField0_ |= 0x00000001;
3565               bus_ = input.readInt32();
3566               break;
3567             }
3568             case 16: {
3569               bitField0_ |= 0x00000002;
3570               messageId_ = input.readUInt32();
3571               break;
3572             }
3573             case 24: {
3574               bitField0_ |= 0x00000004;
3575               mode_ = input.readUInt32();
3576               break;
3577             }
3578             case 32: {
3579               bitField0_ |= 0x00000008;
3580               pid_ = input.readUInt32();
3581               break;
3582             }
3583             case 40: {
3584               bitField0_ |= 0x00000010;
3585               success_ = input.readBool();
3586               break;
3587             }
3588             case 48: {
3589               bitField0_ |= 0x00000020;
3590               negativeResponseCode_ = input.readUInt32();
3591               break;
3592             }
3593             case 58: {
3594               bitField0_ |= 0x00000040;
3595               payload_ = input.readBytes();
3596               break;
3597             }
3598             case 65: {
3599               bitField0_ |= 0x00000080;
3600               value_ = input.readDouble();
3601               break;
3602             }
3603           }
3604         }
3605       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3606         throw e.setUnfinishedMessage(this);
3607       } catch (java.io.IOException e) {
3608         throw new com.google.protobuf.InvalidProtocolBufferException(
3609             e.getMessage()).setUnfinishedMessage(this);
3610       } finally {
3611         this.unknownFields = unknownFields.build();
3612         makeExtensionsImmutable();
3613       }
3614     }
3615     public static final com.google.protobuf.Descriptors.Descriptor
3616         getDescriptor() {
3617       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
3618     }
3619
3620     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3621         internalGetFieldAccessorTable() {
3622       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
3623           .ensureFieldAccessorsInitialized(
3624               com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
3625     }
3626
3627     public static com.google.protobuf.Parser<DiagnosticResponse> PARSER =
3628         new com.google.protobuf.AbstractParser<DiagnosticResponse>() {
3629       public DiagnosticResponse parsePartialFrom(
3630           com.google.protobuf.CodedInputStream input,
3631           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3632           throws com.google.protobuf.InvalidProtocolBufferException {
3633         return new DiagnosticResponse(input, extensionRegistry);
3634       }
3635     };
3636
3637     @java.lang.Override
3638     public com.google.protobuf.Parser<DiagnosticResponse> getParserForType() {
3639       return PARSER;
3640     }
3641
3642     private int bitField0_;
3643     // optional int32 bus = 1;
3644     public static final int BUS_FIELD_NUMBER = 1;
3645     private int bus_;
3646     /**
3647      * <code>optional int32 bus = 1;</code>
3648      */
3649     public boolean hasBus() {
3650       return ((bitField0_ & 0x00000001) == 0x00000001);
3651     }
3652     /**
3653      * <code>optional int32 bus = 1;</code>
3654      */
3655     public int getBus() {
3656       return bus_;
3657     }
3658
3659     // optional uint32 message_id = 2;
3660     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
3661     private int messageId_;
3662     /**
3663      * <code>optional uint32 message_id = 2;</code>
3664      */
3665     public boolean hasMessageId() {
3666       return ((bitField0_ & 0x00000002) == 0x00000002);
3667     }
3668     /**
3669      * <code>optional uint32 message_id = 2;</code>
3670      */
3671     public int getMessageId() {
3672       return messageId_;
3673     }
3674
3675     // optional uint32 mode = 3;
3676     public static final int MODE_FIELD_NUMBER = 3;
3677     private int mode_;
3678     /**
3679      * <code>optional uint32 mode = 3;</code>
3680      */
3681     public boolean hasMode() {
3682       return ((bitField0_ & 0x00000004) == 0x00000004);
3683     }
3684     /**
3685      * <code>optional uint32 mode = 3;</code>
3686      */
3687     public int getMode() {
3688       return mode_;
3689     }
3690
3691     // optional uint32 pid = 4;
3692     public static final int PID_FIELD_NUMBER = 4;
3693     private int pid_;
3694     /**
3695      * <code>optional uint32 pid = 4;</code>
3696      */
3697     public boolean hasPid() {
3698       return ((bitField0_ & 0x00000008) == 0x00000008);
3699     }
3700     /**
3701      * <code>optional uint32 pid = 4;</code>
3702      */
3703     public int getPid() {
3704       return pid_;
3705     }
3706
3707     // optional bool success = 5;
3708     public static final int SUCCESS_FIELD_NUMBER = 5;
3709     private boolean success_;
3710     /**
3711      * <code>optional bool success = 5;</code>
3712      */
3713     public boolean hasSuccess() {
3714       return ((bitField0_ & 0x00000010) == 0x00000010);
3715     }
3716     /**
3717      * <code>optional bool success = 5;</code>
3718      */
3719     public boolean getSuccess() {
3720       return success_;
3721     }
3722
3723     // optional uint32 negative_response_code = 6;
3724     public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
3725     private int negativeResponseCode_;
3726     /**
3727      * <code>optional uint32 negative_response_code = 6;</code>
3728      */
3729     public boolean hasNegativeResponseCode() {
3730       return ((bitField0_ & 0x00000020) == 0x00000020);
3731     }
3732     /**
3733      * <code>optional uint32 negative_response_code = 6;</code>
3734      */
3735     public int getNegativeResponseCode() {
3736       return negativeResponseCode_;
3737     }
3738
3739     // optional bytes payload = 7;
3740     public static final int PAYLOAD_FIELD_NUMBER = 7;
3741     private com.google.protobuf.ByteString payload_;
3742     /**
3743      * <code>optional bytes payload = 7;</code>
3744      *
3745      * <pre>
3746      * TODO we are capping this at 8 bytes for now - need to change when we
3747      * support multi-frame responses
3748      * </pre>
3749      */
3750     public boolean hasPayload() {
3751       return ((bitField0_ & 0x00000040) == 0x00000040);
3752     }
3753     /**
3754      * <code>optional bytes payload = 7;</code>
3755      *
3756      * <pre>
3757      * TODO we are capping this at 8 bytes for now - need to change when we
3758      * support multi-frame responses
3759      * </pre>
3760      */
3761     public com.google.protobuf.ByteString getPayload() {
3762       return payload_;
3763     }
3764
3765     // optional double value = 8;
3766     public static final int VALUE_FIELD_NUMBER = 8;
3767     private double value_;
3768     /**
3769      * <code>optional double value = 8;</code>
3770      */
3771     public boolean hasValue() {
3772       return ((bitField0_ & 0x00000080) == 0x00000080);
3773     }
3774     /**
3775      * <code>optional double value = 8;</code>
3776      */
3777     public double getValue() {
3778       return value_;
3779     }
3780
3781     private void initFields() {
3782       bus_ = 0;
3783       messageId_ = 0;
3784       mode_ = 0;
3785       pid_ = 0;
3786       success_ = false;
3787       negativeResponseCode_ = 0;
3788       payload_ = com.google.protobuf.ByteString.EMPTY;
3789       value_ = 0D;
3790     }
3791     private byte memoizedIsInitialized = -1;
3792     public final boolean isInitialized() {
3793       byte isInitialized = memoizedIsInitialized;
3794       if (isInitialized != -1) return isInitialized == 1;
3795
3796       memoizedIsInitialized = 1;
3797       return true;
3798     }
3799
3800     public void writeTo(com.google.protobuf.CodedOutputStream output)
3801                         throws java.io.IOException {
3802       getSerializedSize();
3803       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3804         output.writeInt32(1, bus_);
3805       }
3806       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3807         output.writeUInt32(2, messageId_);
3808       }
3809       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3810         output.writeUInt32(3, mode_);
3811       }
3812       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3813         output.writeUInt32(4, pid_);
3814       }
3815       if (((bitField0_ & 0x00000010) == 0x00000010)) {
3816         output.writeBool(5, success_);
3817       }
3818       if (((bitField0_ & 0x00000020) == 0x00000020)) {
3819         output.writeUInt32(6, negativeResponseCode_);
3820       }
3821       if (((bitField0_ & 0x00000040) == 0x00000040)) {
3822         output.writeBytes(7, payload_);
3823       }
3824       if (((bitField0_ & 0x00000080) == 0x00000080)) {
3825         output.writeDouble(8, value_);
3826       }
3827       getUnknownFields().writeTo(output);
3828     }
3829
3830     private int memoizedSerializedSize = -1;
3831     public int getSerializedSize() {
3832       int size = memoizedSerializedSize;
3833       if (size != -1) return size;
3834
3835       size = 0;
3836       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3837         size += com.google.protobuf.CodedOutputStream
3838           .computeInt32Size(1, bus_);
3839       }
3840       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3841         size += com.google.protobuf.CodedOutputStream
3842           .computeUInt32Size(2, messageId_);
3843       }
3844       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3845         size += com.google.protobuf.CodedOutputStream
3846           .computeUInt32Size(3, mode_);
3847       }
3848       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3849         size += com.google.protobuf.CodedOutputStream
3850           .computeUInt32Size(4, pid_);
3851       }
3852       if (((bitField0_ & 0x00000010) == 0x00000010)) {
3853         size += com.google.protobuf.CodedOutputStream
3854           .computeBoolSize(5, success_);
3855       }
3856       if (((bitField0_ & 0x00000020) == 0x00000020)) {
3857         size += com.google.protobuf.CodedOutputStream
3858           .computeUInt32Size(6, negativeResponseCode_);
3859       }
3860       if (((bitField0_ & 0x00000040) == 0x00000040)) {
3861         size += com.google.protobuf.CodedOutputStream
3862           .computeBytesSize(7, payload_);
3863       }
3864       if (((bitField0_ & 0x00000080) == 0x00000080)) {
3865         size += com.google.protobuf.CodedOutputStream
3866           .computeDoubleSize(8, value_);
3867       }
3868       size += getUnknownFields().getSerializedSize();
3869       memoizedSerializedSize = size;
3870       return size;
3871     }
3872
3873     private static final long serialVersionUID = 0L;
3874     @java.lang.Override
3875     protected java.lang.Object writeReplace()
3876         throws java.io.ObjectStreamException {
3877       return super.writeReplace();
3878     }
3879
3880     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
3881         com.google.protobuf.ByteString data)
3882         throws com.google.protobuf.InvalidProtocolBufferException {
3883       return PARSER.parseFrom(data);
3884     }
3885     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
3886         com.google.protobuf.ByteString data,
3887         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3888         throws com.google.protobuf.InvalidProtocolBufferException {
3889       return PARSER.parseFrom(data, extensionRegistry);
3890     }
3891     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data)
3892         throws com.google.protobuf.InvalidProtocolBufferException {
3893       return PARSER.parseFrom(data);
3894     }
3895     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
3896         byte[] data,
3897         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3898         throws com.google.protobuf.InvalidProtocolBufferException {
3899       return PARSER.parseFrom(data, extensionRegistry);
3900     }
3901     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input)
3902         throws java.io.IOException {
3903       return PARSER.parseFrom(input);
3904     }
3905     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
3906         java.io.InputStream input,
3907         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3908         throws java.io.IOException {
3909       return PARSER.parseFrom(input, extensionRegistry);
3910     }
3911     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input)
3912         throws java.io.IOException {
3913       return PARSER.parseDelimitedFrom(input);
3914     }
3915     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(
3916         java.io.InputStream input,
3917         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3918         throws java.io.IOException {
3919       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3920     }
3921     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
3922         com.google.protobuf.CodedInputStream input)
3923         throws java.io.IOException {
3924       return PARSER.parseFrom(input);
3925     }
3926     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
3927         com.google.protobuf.CodedInputStream input,
3928         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3929         throws java.io.IOException {
3930       return PARSER.parseFrom(input, extensionRegistry);
3931     }
3932
3933     public static Builder newBuilder() { return Builder.create(); }
3934     public Builder newBuilderForType() { return newBuilder(); }
3935     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) {
3936       return newBuilder().mergeFrom(prototype);
3937     }
3938     public Builder toBuilder() { return newBuilder(this); }
3939
3940     @java.lang.Override
3941     protected Builder newBuilderForType(
3942         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3943       Builder builder = new Builder(parent);
3944       return builder;
3945     }
3946     /**
3947      * Protobuf type {@code openxc.DiagnosticResponse}
3948      */
3949     public static final class Builder extends
3950         com.google.protobuf.GeneratedMessage.Builder<Builder>
3951        implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder {
3952       public static final com.google.protobuf.Descriptors.Descriptor
3953           getDescriptor() {
3954         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
3955       }
3956
3957       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3958           internalGetFieldAccessorTable() {
3959         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
3960             .ensureFieldAccessorsInitialized(
3961                 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
3962       }
3963
3964       // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder()
3965       private Builder() {
3966         maybeForceBuilderInitialization();
3967       }
3968
3969       private Builder(
3970           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3971         super(parent);
3972         maybeForceBuilderInitialization();
3973       }
3974       private void maybeForceBuilderInitialization() {
3975         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3976         }
3977       }
3978       private static Builder create() {
3979         return new Builder();
3980       }
3981
3982       public Builder clear() {
3983         super.clear();
3984         bus_ = 0;
3985         bitField0_ = (bitField0_ & ~0x00000001);
3986         messageId_ = 0;
3987         bitField0_ = (bitField0_ & ~0x00000002);
3988         mode_ = 0;
3989         bitField0_ = (bitField0_ & ~0x00000004);
3990         pid_ = 0;
3991         bitField0_ = (bitField0_ & ~0x00000008);
3992         success_ = false;
3993         bitField0_ = (bitField0_ & ~0x00000010);
3994         negativeResponseCode_ = 0;
3995         bitField0_ = (bitField0_ & ~0x00000020);
3996         payload_ = com.google.protobuf.ByteString.EMPTY;
3997         bitField0_ = (bitField0_ & ~0x00000040);
3998         value_ = 0D;
3999         bitField0_ = (bitField0_ & ~0x00000080);
4000         return this;
4001       }
4002
4003       public Builder clone() {
4004         return create().mergeFrom(buildPartial());
4005       }
4006
4007       public com.google.protobuf.Descriptors.Descriptor
4008           getDescriptorForType() {
4009         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4010       }
4011
4012       public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() {
4013         return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
4014       }
4015
4016       public com.openxc.BinaryMessages.DiagnosticResponse build() {
4017         com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial();
4018         if (!result.isInitialized()) {
4019           throw newUninitializedMessageException(result);
4020         }
4021         return result;
4022       }
4023
4024       public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() {
4025         com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this);
4026         int from_bitField0_ = bitField0_;
4027         int to_bitField0_ = 0;
4028         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4029           to_bitField0_ |= 0x00000001;
4030         }
4031         result.bus_ = bus_;
4032         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4033           to_bitField0_ |= 0x00000002;
4034         }
4035         result.messageId_ = messageId_;
4036         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
4037           to_bitField0_ |= 0x00000004;
4038         }
4039         result.mode_ = mode_;
4040         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
4041           to_bitField0_ |= 0x00000008;
4042         }
4043         result.pid_ = pid_;
4044         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
4045           to_bitField0_ |= 0x00000010;
4046         }
4047         result.success_ = success_;
4048         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
4049           to_bitField0_ |= 0x00000020;
4050         }
4051         result.negativeResponseCode_ = negativeResponseCode_;
4052         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
4053           to_bitField0_ |= 0x00000040;
4054         }
4055         result.payload_ = payload_;
4056         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
4057           to_bitField0_ |= 0x00000080;
4058         }
4059         result.value_ = value_;
4060         result.bitField0_ = to_bitField0_;
4061         onBuilt();
4062         return result;
4063       }
4064
4065       public Builder mergeFrom(com.google.protobuf.Message other) {
4066         if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) {
4067           return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other);
4068         } else {
4069           super.mergeFrom(other);
4070           return this;
4071         }
4072       }
4073
4074       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) {
4075         if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this;
4076         if (other.hasBus()) {
4077           setBus(other.getBus());
4078         }
4079         if (other.hasMessageId()) {
4080           setMessageId(other.getMessageId());
4081         }
4082         if (other.hasMode()) {
4083           setMode(other.getMode());
4084         }
4085         if (other.hasPid()) {
4086           setPid(other.getPid());
4087         }
4088         if (other.hasSuccess()) {
4089           setSuccess(other.getSuccess());
4090         }
4091         if (other.hasNegativeResponseCode()) {
4092           setNegativeResponseCode(other.getNegativeResponseCode());
4093         }
4094         if (other.hasPayload()) {
4095           setPayload(other.getPayload());
4096         }
4097         if (other.hasValue()) {
4098           setValue(other.getValue());
4099         }
4100         this.mergeUnknownFields(other.getUnknownFields());
4101         return this;
4102       }
4103
4104       public final boolean isInitialized() {
4105         return true;
4106       }
4107
4108       public Builder mergeFrom(
4109           com.google.protobuf.CodedInputStream input,
4110           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4111           throws java.io.IOException {
4112         com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null;
4113         try {
4114           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4115         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4116           parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage();
4117           throw e;
4118         } finally {
4119           if (parsedMessage != null) {
4120             mergeFrom(parsedMessage);
4121           }
4122         }
4123         return this;
4124       }
4125       private int bitField0_;
4126
4127       // optional int32 bus = 1;
4128       private int bus_ ;
4129       /**
4130        * <code>optional int32 bus = 1;</code>
4131        */
4132       public boolean hasBus() {
4133         return ((bitField0_ & 0x00000001) == 0x00000001);
4134       }
4135       /**
4136        * <code>optional int32 bus = 1;</code>
4137        */
4138       public int getBus() {
4139         return bus_;
4140       }
4141       /**
4142        * <code>optional int32 bus = 1;</code>
4143        */
4144       public Builder setBus(int value) {
4145         bitField0_ |= 0x00000001;
4146         bus_ = value;
4147         onChanged();
4148         return this;
4149       }
4150       /**
4151        * <code>optional int32 bus = 1;</code>
4152        */
4153       public Builder clearBus() {
4154         bitField0_ = (bitField0_ & ~0x00000001);
4155         bus_ = 0;
4156         onChanged();
4157         return this;
4158       }
4159
4160       // optional uint32 message_id = 2;
4161       private int messageId_ ;
4162       /**
4163        * <code>optional uint32 message_id = 2;</code>
4164        */
4165       public boolean hasMessageId() {
4166         return ((bitField0_ & 0x00000002) == 0x00000002);
4167       }
4168       /**
4169        * <code>optional uint32 message_id = 2;</code>
4170        */
4171       public int getMessageId() {
4172         return messageId_;
4173       }
4174       /**
4175        * <code>optional uint32 message_id = 2;</code>
4176        */
4177       public Builder setMessageId(int value) {
4178         bitField0_ |= 0x00000002;
4179         messageId_ = value;
4180         onChanged();
4181         return this;
4182       }
4183       /**
4184        * <code>optional uint32 message_id = 2;</code>
4185        */
4186       public Builder clearMessageId() {
4187         bitField0_ = (bitField0_ & ~0x00000002);
4188         messageId_ = 0;
4189         onChanged();
4190         return this;
4191       }
4192
4193       // optional uint32 mode = 3;
4194       private int mode_ ;
4195       /**
4196        * <code>optional uint32 mode = 3;</code>
4197        */
4198       public boolean hasMode() {
4199         return ((bitField0_ & 0x00000004) == 0x00000004);
4200       }
4201       /**
4202        * <code>optional uint32 mode = 3;</code>
4203        */
4204       public int getMode() {
4205         return mode_;
4206       }
4207       /**
4208        * <code>optional uint32 mode = 3;</code>
4209        */
4210       public Builder setMode(int value) {
4211         bitField0_ |= 0x00000004;
4212         mode_ = value;
4213         onChanged();
4214         return this;
4215       }
4216       /**
4217        * <code>optional uint32 mode = 3;</code>
4218        */
4219       public Builder clearMode() {
4220         bitField0_ = (bitField0_ & ~0x00000004);
4221         mode_ = 0;
4222         onChanged();
4223         return this;
4224       }
4225
4226       // optional uint32 pid = 4;
4227       private int pid_ ;
4228       /**
4229        * <code>optional uint32 pid = 4;</code>
4230        */
4231       public boolean hasPid() {
4232         return ((bitField0_ & 0x00000008) == 0x00000008);
4233       }
4234       /**
4235        * <code>optional uint32 pid = 4;</code>
4236        */
4237       public int getPid() {
4238         return pid_;
4239       }
4240       /**
4241        * <code>optional uint32 pid = 4;</code>
4242        */
4243       public Builder setPid(int value) {
4244         bitField0_ |= 0x00000008;
4245         pid_ = value;
4246         onChanged();
4247         return this;
4248       }
4249       /**
4250        * <code>optional uint32 pid = 4;</code>
4251        */
4252       public Builder clearPid() {
4253         bitField0_ = (bitField0_ & ~0x00000008);
4254         pid_ = 0;
4255         onChanged();
4256         return this;
4257       }
4258
4259       // optional bool success = 5;
4260       private boolean success_ ;
4261       /**
4262        * <code>optional bool success = 5;</code>
4263        */
4264       public boolean hasSuccess() {
4265         return ((bitField0_ & 0x00000010) == 0x00000010);
4266       }
4267       /**
4268        * <code>optional bool success = 5;</code>
4269        */
4270       public boolean getSuccess() {
4271         return success_;
4272       }
4273       /**
4274        * <code>optional bool success = 5;</code>
4275        */
4276       public Builder setSuccess(boolean value) {
4277         bitField0_ |= 0x00000010;
4278         success_ = value;
4279         onChanged();
4280         return this;
4281       }
4282       /**
4283        * <code>optional bool success = 5;</code>
4284        */
4285       public Builder clearSuccess() {
4286         bitField0_ = (bitField0_ & ~0x00000010);
4287         success_ = false;
4288         onChanged();
4289         return this;
4290       }
4291
4292       // optional uint32 negative_response_code = 6;
4293       private int negativeResponseCode_ ;
4294       /**
4295        * <code>optional uint32 negative_response_code = 6;</code>
4296        */
4297       public boolean hasNegativeResponseCode() {
4298         return ((bitField0_ & 0x00000020) == 0x00000020);
4299       }
4300       /**
4301        * <code>optional uint32 negative_response_code = 6;</code>
4302        */
4303       public int getNegativeResponseCode() {
4304         return negativeResponseCode_;
4305       }
4306       /**
4307        * <code>optional uint32 negative_response_code = 6;</code>
4308        */
4309       public Builder setNegativeResponseCode(int value) {
4310         bitField0_ |= 0x00000020;
4311         negativeResponseCode_ = value;
4312         onChanged();
4313         return this;
4314       }
4315       /**
4316        * <code>optional uint32 negative_response_code = 6;</code>
4317        */
4318       public Builder clearNegativeResponseCode() {
4319         bitField0_ = (bitField0_ & ~0x00000020);
4320         negativeResponseCode_ = 0;
4321         onChanged();
4322         return this;
4323       }
4324
4325       // optional bytes payload = 7;
4326       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
4327       /**
4328        * <code>optional bytes payload = 7;</code>
4329        *
4330        * <pre>
4331        * TODO we are capping this at 8 bytes for now - need to change when we
4332        * support multi-frame responses
4333        * </pre>
4334        */
4335       public boolean hasPayload() {
4336         return ((bitField0_ & 0x00000040) == 0x00000040);
4337       }
4338       /**
4339        * <code>optional bytes payload = 7;</code>
4340        *
4341        * <pre>
4342        * TODO we are capping this at 8 bytes for now - need to change when we
4343        * support multi-frame responses
4344        * </pre>
4345        */
4346       public com.google.protobuf.ByteString getPayload() {
4347         return payload_;
4348       }
4349       /**
4350        * <code>optional bytes payload = 7;</code>
4351        *
4352        * <pre>
4353        * TODO we are capping this at 8 bytes for now - need to change when we
4354        * support multi-frame responses
4355        * </pre>
4356        */
4357       public Builder setPayload(com.google.protobuf.ByteString value) {
4358         if (value == null) {
4359     throw new NullPointerException();
4360   }
4361   bitField0_ |= 0x00000040;
4362         payload_ = value;
4363         onChanged();
4364         return this;
4365       }
4366       /**
4367        * <code>optional bytes payload = 7;</code>
4368        *
4369        * <pre>
4370        * TODO we are capping this at 8 bytes for now - need to change when we
4371        * support multi-frame responses
4372        * </pre>
4373        */
4374       public Builder clearPayload() {
4375         bitField0_ = (bitField0_ & ~0x00000040);
4376         payload_ = getDefaultInstance().getPayload();
4377         onChanged();
4378         return this;
4379       }
4380
4381       // optional double value = 8;
4382       private double value_ ;
4383       /**
4384        * <code>optional double value = 8;</code>
4385        */
4386       public boolean hasValue() {
4387         return ((bitField0_ & 0x00000080) == 0x00000080);
4388       }
4389       /**
4390        * <code>optional double value = 8;</code>
4391        */
4392       public double getValue() {
4393         return value_;
4394       }
4395       /**
4396        * <code>optional double value = 8;</code>
4397        */
4398       public Builder setValue(double value) {
4399         bitField0_ |= 0x00000080;
4400         value_ = value;
4401         onChanged();
4402         return this;
4403       }
4404       /**
4405        * <code>optional double value = 8;</code>
4406        */
4407       public Builder clearValue() {
4408         bitField0_ = (bitField0_ & ~0x00000080);
4409         value_ = 0D;
4410         onChanged();
4411         return this;
4412       }
4413
4414       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse)
4415     }
4416
4417     static {
4418       defaultInstance = new DiagnosticResponse(true);
4419       defaultInstance.initFields();
4420     }
4421
4422     // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse)
4423   }
4424
4425   public interface TranslatedMessageOrBuilder
4426       extends com.google.protobuf.MessageOrBuilder {
4427
4428     // optional .openxc.TranslatedMessage.Type type = 1;
4429     /**
4430      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4431      */
4432     boolean hasType();
4433     /**
4434      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4435      */
4436     com.openxc.BinaryMessages.TranslatedMessage.Type getType();
4437
4438     // optional string name = 2;
4439     /**
4440      * <code>optional string name = 2;</code>
4441      */
4442     boolean hasName();
4443     /**
4444      * <code>optional string name = 2;</code>
4445      */
4446     java.lang.String getName();
4447     /**
4448      * <code>optional string name = 2;</code>
4449      */
4450     com.google.protobuf.ByteString
4451         getNameBytes();
4452
4453     // optional string string_value = 3;
4454     /**
4455      * <code>optional string string_value = 3;</code>
4456      */
4457     boolean hasStringValue();
4458     /**
4459      * <code>optional string string_value = 3;</code>
4460      */
4461     java.lang.String getStringValue();
4462     /**
4463      * <code>optional string string_value = 3;</code>
4464      */
4465     com.google.protobuf.ByteString
4466         getStringValueBytes();
4467
4468     // optional double numeric_value = 4;
4469     /**
4470      * <code>optional double numeric_value = 4;</code>
4471      */
4472     boolean hasNumericValue();
4473     /**
4474      * <code>optional double numeric_value = 4;</code>
4475      */
4476     double getNumericValue();
4477
4478     // optional bool boolean_value = 5;
4479     /**
4480      * <code>optional bool boolean_value = 5;</code>
4481      */
4482     boolean hasBooleanValue();
4483     /**
4484      * <code>optional bool boolean_value = 5;</code>
4485      */
4486     boolean getBooleanValue();
4487
4488     // optional string string_event = 6;
4489     /**
4490      * <code>optional string string_event = 6;</code>
4491      */
4492     boolean hasStringEvent();
4493     /**
4494      * <code>optional string string_event = 6;</code>
4495      */
4496     java.lang.String getStringEvent();
4497     /**
4498      * <code>optional string string_event = 6;</code>
4499      */
4500     com.google.protobuf.ByteString
4501         getStringEventBytes();
4502
4503     // optional double numeric_event = 7;
4504     /**
4505      * <code>optional double numeric_event = 7;</code>
4506      */
4507     boolean hasNumericEvent();
4508     /**
4509      * <code>optional double numeric_event = 7;</code>
4510      */
4511     double getNumericEvent();
4512
4513     // optional bool boolean_event = 8;
4514     /**
4515      * <code>optional bool boolean_event = 8;</code>
4516      */
4517     boolean hasBooleanEvent();
4518     /**
4519      * <code>optional bool boolean_event = 8;</code>
4520      */
4521     boolean getBooleanEvent();
4522   }
4523   /**
4524    * Protobuf type {@code openxc.TranslatedMessage}
4525    */
4526   public static final class TranslatedMessage extends
4527       com.google.protobuf.GeneratedMessage
4528       implements TranslatedMessageOrBuilder {
4529     // Use TranslatedMessage.newBuilder() to construct.
4530     private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
4531       super(builder);
4532       this.unknownFields = builder.getUnknownFields();
4533     }
4534     private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
4535
4536     private static final TranslatedMessage defaultInstance;
4537     public static TranslatedMessage getDefaultInstance() {
4538       return defaultInstance;
4539     }
4540
4541     public TranslatedMessage getDefaultInstanceForType() {
4542       return defaultInstance;
4543     }
4544
4545     private final com.google.protobuf.UnknownFieldSet unknownFields;
4546     @java.lang.Override
4547     public final com.google.protobuf.UnknownFieldSet
4548         getUnknownFields() {
4549       return this.unknownFields;
4550     }
4551     private TranslatedMessage(
4552         com.google.protobuf.CodedInputStream input,
4553         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4554         throws com.google.protobuf.InvalidProtocolBufferException {
4555       initFields();
4556       int mutable_bitField0_ = 0;
4557       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4558           com.google.protobuf.UnknownFieldSet.newBuilder();
4559       try {
4560         boolean done = false;
4561         while (!done) {
4562           int tag = input.readTag();
4563           switch (tag) {
4564             case 0:
4565               done = true;
4566               break;
4567             default: {
4568               if (!parseUnknownField(input, unknownFields,
4569                                      extensionRegistry, tag)) {
4570                 done = true;
4571               }
4572               break;
4573             }
4574             case 8: {
4575               int rawValue = input.readEnum();
4576               com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
4577               if (value == null) {
4578                 unknownFields.mergeVarintField(1, rawValue);
4579               } else {
4580                 bitField0_ |= 0x00000001;
4581                 type_ = value;
4582               }
4583               break;
4584             }
4585             case 18: {
4586               bitField0_ |= 0x00000002;
4587               name_ = input.readBytes();
4588               break;
4589             }
4590             case 26: {
4591               bitField0_ |= 0x00000004;
4592               stringValue_ = input.readBytes();
4593               break;
4594             }
4595             case 33: {
4596               bitField0_ |= 0x00000008;
4597               numericValue_ = input.readDouble();
4598               break;
4599             }
4600             case 40: {
4601               bitField0_ |= 0x00000010;
4602               booleanValue_ = input.readBool();
4603               break;
4604             }
4605             case 50: {
4606               bitField0_ |= 0x00000020;
4607               stringEvent_ = input.readBytes();
4608               break;
4609             }
4610             case 57: {
4611               bitField0_ |= 0x00000040;
4612               numericEvent_ = input.readDouble();
4613               break;
4614             }
4615             case 64: {
4616               bitField0_ |= 0x00000080;
4617               booleanEvent_ = input.readBool();
4618               break;
4619             }
4620           }
4621         }
4622       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4623         throw e.setUnfinishedMessage(this);
4624       } catch (java.io.IOException e) {
4625         throw new com.google.protobuf.InvalidProtocolBufferException(
4626             e.getMessage()).setUnfinishedMessage(this);
4627       } finally {
4628         this.unknownFields = unknownFields.build();
4629         makeExtensionsImmutable();
4630       }
4631     }
4632     public static final com.google.protobuf.Descriptors.Descriptor
4633         getDescriptor() {
4634       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
4635     }
4636
4637     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4638         internalGetFieldAccessorTable() {
4639       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
4640           .ensureFieldAccessorsInitialized(
4641               com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
4642     }
4643
4644     public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
4645         new com.google.protobuf.AbstractParser<TranslatedMessage>() {
4646       public TranslatedMessage parsePartialFrom(
4647           com.google.protobuf.CodedInputStream input,
4648           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4649           throws com.google.protobuf.InvalidProtocolBufferException {
4650         return new TranslatedMessage(input, extensionRegistry);
4651       }
4652     };
4653
4654     @java.lang.Override
4655     public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
4656       return PARSER;
4657     }
4658
4659     /**
4660      * Protobuf enum {@code openxc.TranslatedMessage.Type}
4661      */
4662     public enum Type
4663         implements com.google.protobuf.ProtocolMessageEnum {
4664       /**
4665        * <code>STRING = 1;</code>
4666        */
4667       STRING(0, 1),
4668       /**
4669        * <code>NUM = 2;</code>
4670        */
4671       NUM(1, 2),
4672       /**
4673        * <code>BOOL = 3;</code>
4674        */
4675       BOOL(2, 3),
4676       /**
4677        * <code>EVENTED_STRING = 4;</code>
4678        */
4679       EVENTED_STRING(3, 4),
4680       /**
4681        * <code>EVENTED_NUM = 5;</code>
4682        */
4683       EVENTED_NUM(4, 5),
4684       /**
4685        * <code>EVENTED_BOOL = 6;</code>
4686        */
4687       EVENTED_BOOL(5, 6),
4688       ;
4689
4690       /**
4691        * <code>STRING = 1;</code>
4692        */
4693       public static final int STRING_VALUE = 1;
4694       /**
4695        * <code>NUM = 2;</code>
4696        */
4697       public static final int NUM_VALUE = 2;
4698       /**
4699        * <code>BOOL = 3;</code>
4700        */
4701       public static final int BOOL_VALUE = 3;
4702       /**
4703        * <code>EVENTED_STRING = 4;</code>
4704        */
4705       public static final int EVENTED_STRING_VALUE = 4;
4706       /**
4707        * <code>EVENTED_NUM = 5;</code>
4708        */
4709       public static final int EVENTED_NUM_VALUE = 5;
4710       /**
4711        * <code>EVENTED_BOOL = 6;</code>
4712        */
4713       public static final int EVENTED_BOOL_VALUE = 6;
4714
4715
4716       public final int getNumber() { return value; }
4717
4718       public static Type valueOf(int value) {
4719         switch (value) {
4720           case 1: return STRING;
4721           case 2: return NUM;
4722           case 3: return BOOL;
4723           case 4: return EVENTED_STRING;
4724           case 5: return EVENTED_NUM;
4725           case 6: return EVENTED_BOOL;
4726           default: return null;
4727         }
4728       }
4729
4730       public static com.google.protobuf.Internal.EnumLiteMap<Type>
4731           internalGetValueMap() {
4732         return internalValueMap;
4733       }
4734       private static com.google.protobuf.Internal.EnumLiteMap<Type>
4735           internalValueMap =
4736             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
4737               public Type findValueByNumber(int number) {
4738                 return Type.valueOf(number);
4739               }
4740             };
4741
4742       public final com.google.protobuf.Descriptors.EnumValueDescriptor
4743           getValueDescriptor() {
4744         return getDescriptor().getValues().get(index);
4745       }
4746       public final com.google.protobuf.Descriptors.EnumDescriptor
4747           getDescriptorForType() {
4748         return getDescriptor();
4749       }
4750       public static final com.google.protobuf.Descriptors.EnumDescriptor
4751           getDescriptor() {
4752         return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
4753       }
4754
4755       private static final Type[] VALUES = values();
4756
4757       public static Type valueOf(
4758           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
4759         if (desc.getType() != getDescriptor()) {
4760           throw new java.lang.IllegalArgumentException(
4761             "EnumValueDescriptor is not for this type.");
4762         }
4763         return VALUES[desc.getIndex()];
4764       }
4765
4766       private final int index;
4767       private final int value;
4768
4769       private Type(int index, int value) {
4770         this.index = index;
4771         this.value = value;
4772       }
4773
4774       // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
4775     }
4776
4777     private int bitField0_;
4778     // optional .openxc.TranslatedMessage.Type type = 1;
4779     public static final int TYPE_FIELD_NUMBER = 1;
4780     private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
4781     /**
4782      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4783      */
4784     public boolean hasType() {
4785       return ((bitField0_ & 0x00000001) == 0x00000001);
4786     }
4787     /**
4788      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4789      */
4790     public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
4791       return type_;
4792     }
4793
4794     // optional string name = 2;
4795     public static final int NAME_FIELD_NUMBER = 2;
4796     private java.lang.Object name_;
4797     /**
4798      * <code>optional string name = 2;</code>
4799      */
4800     public boolean hasName() {
4801       return ((bitField0_ & 0x00000002) == 0x00000002);
4802     }
4803     /**
4804      * <code>optional string name = 2;</code>
4805      */
4806     public java.lang.String getName() {
4807       java.lang.Object ref = name_;
4808       if (ref instanceof java.lang.String) {
4809         return (java.lang.String) ref;
4810       } else {
4811         com.google.protobuf.ByteString bs = 
4812             (com.google.protobuf.ByteString) ref;
4813         java.lang.String s = bs.toStringUtf8();
4814         if (bs.isValidUtf8()) {
4815           name_ = s;
4816         }
4817         return s;
4818       }
4819     }
4820     /**
4821      * <code>optional string name = 2;</code>
4822      */
4823     public com.google.protobuf.ByteString
4824         getNameBytes() {
4825       java.lang.Object ref = name_;
4826       if (ref instanceof java.lang.String) {
4827         com.google.protobuf.ByteString b = 
4828             com.google.protobuf.ByteString.copyFromUtf8(
4829                 (java.lang.String) ref);
4830         name_ = b;
4831         return b;
4832       } else {
4833         return (com.google.protobuf.ByteString) ref;
4834       }
4835     }
4836
4837     // optional string string_value = 3;
4838     public static final int STRING_VALUE_FIELD_NUMBER = 3;
4839     private java.lang.Object stringValue_;
4840     /**
4841      * <code>optional string string_value = 3;</code>
4842      */
4843     public boolean hasStringValue() {
4844       return ((bitField0_ & 0x00000004) == 0x00000004);
4845     }
4846     /**
4847      * <code>optional string string_value = 3;</code>
4848      */
4849     public java.lang.String getStringValue() {
4850       java.lang.Object ref = stringValue_;
4851       if (ref instanceof java.lang.String) {
4852         return (java.lang.String) ref;
4853       } else {
4854         com.google.protobuf.ByteString bs = 
4855             (com.google.protobuf.ByteString) ref;
4856         java.lang.String s = bs.toStringUtf8();
4857         if (bs.isValidUtf8()) {
4858           stringValue_ = s;
4859         }
4860         return s;
4861       }
4862     }
4863     /**
4864      * <code>optional string string_value = 3;</code>
4865      */
4866     public com.google.protobuf.ByteString
4867         getStringValueBytes() {
4868       java.lang.Object ref = stringValue_;
4869       if (ref instanceof java.lang.String) {
4870         com.google.protobuf.ByteString b = 
4871             com.google.protobuf.ByteString.copyFromUtf8(
4872                 (java.lang.String) ref);
4873         stringValue_ = b;
4874         return b;
4875       } else {
4876         return (com.google.protobuf.ByteString) ref;
4877       }
4878     }
4879
4880     // optional double numeric_value = 4;
4881     public static final int NUMERIC_VALUE_FIELD_NUMBER = 4;
4882     private double numericValue_;
4883     /**
4884      * <code>optional double numeric_value = 4;</code>
4885      */
4886     public boolean hasNumericValue() {
4887       return ((bitField0_ & 0x00000008) == 0x00000008);
4888     }
4889     /**
4890      * <code>optional double numeric_value = 4;</code>
4891      */
4892     public double getNumericValue() {
4893       return numericValue_;
4894     }
4895
4896     // optional bool boolean_value = 5;
4897     public static final int BOOLEAN_VALUE_FIELD_NUMBER = 5;
4898     private boolean booleanValue_;
4899     /**
4900      * <code>optional bool boolean_value = 5;</code>
4901      */
4902     public boolean hasBooleanValue() {
4903       return ((bitField0_ & 0x00000010) == 0x00000010);
4904     }
4905     /**
4906      * <code>optional bool boolean_value = 5;</code>
4907      */
4908     public boolean getBooleanValue() {
4909       return booleanValue_;
4910     }
4911
4912     // optional string string_event = 6;
4913     public static final int STRING_EVENT_FIELD_NUMBER = 6;
4914     private java.lang.Object stringEvent_;
4915     /**
4916      * <code>optional string string_event = 6;</code>
4917      */
4918     public boolean hasStringEvent() {
4919       return ((bitField0_ & 0x00000020) == 0x00000020);
4920     }
4921     /**
4922      * <code>optional string string_event = 6;</code>
4923      */
4924     public java.lang.String getStringEvent() {
4925       java.lang.Object ref = stringEvent_;
4926       if (ref instanceof java.lang.String) {
4927         return (java.lang.String) ref;
4928       } else {
4929         com.google.protobuf.ByteString bs = 
4930             (com.google.protobuf.ByteString) ref;
4931         java.lang.String s = bs.toStringUtf8();
4932         if (bs.isValidUtf8()) {
4933           stringEvent_ = s;
4934         }
4935         return s;
4936       }
4937     }
4938     /**
4939      * <code>optional string string_event = 6;</code>
4940      */
4941     public com.google.protobuf.ByteString
4942         getStringEventBytes() {
4943       java.lang.Object ref = stringEvent_;
4944       if (ref instanceof java.lang.String) {
4945         com.google.protobuf.ByteString b = 
4946             com.google.protobuf.ByteString.copyFromUtf8(
4947                 (java.lang.String) ref);
4948         stringEvent_ = b;
4949         return b;
4950       } else {
4951         return (com.google.protobuf.ByteString) ref;
4952       }
4953     }
4954
4955     // optional double numeric_event = 7;
4956     public static final int NUMERIC_EVENT_FIELD_NUMBER = 7;
4957     private double numericEvent_;
4958     /**
4959      * <code>optional double numeric_event = 7;</code>
4960      */
4961     public boolean hasNumericEvent() {
4962       return ((bitField0_ & 0x00000040) == 0x00000040);
4963     }
4964     /**
4965      * <code>optional double numeric_event = 7;</code>
4966      */
4967     public double getNumericEvent() {
4968       return numericEvent_;
4969     }
4970
4971     // optional bool boolean_event = 8;
4972     public static final int BOOLEAN_EVENT_FIELD_NUMBER = 8;
4973     private boolean booleanEvent_;
4974     /**
4975      * <code>optional bool boolean_event = 8;</code>
4976      */
4977     public boolean hasBooleanEvent() {
4978       return ((bitField0_ & 0x00000080) == 0x00000080);
4979     }
4980     /**
4981      * <code>optional bool boolean_event = 8;</code>
4982      */
4983     public boolean getBooleanEvent() {
4984       return booleanEvent_;
4985     }
4986
4987     private void initFields() {
4988       type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
4989       name_ = "";
4990       stringValue_ = "";
4991       numericValue_ = 0D;
4992       booleanValue_ = false;
4993       stringEvent_ = "";
4994       numericEvent_ = 0D;
4995       booleanEvent_ = false;
4996     }
4997     private byte memoizedIsInitialized = -1;
4998     public final boolean isInitialized() {
4999       byte isInitialized = memoizedIsInitialized;
5000       if (isInitialized != -1) return isInitialized == 1;
5001
5002       memoizedIsInitialized = 1;
5003       return true;
5004     }
5005
5006     public void writeTo(com.google.protobuf.CodedOutputStream output)
5007                         throws java.io.IOException {
5008       getSerializedSize();
5009       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5010         output.writeEnum(1, type_.getNumber());
5011       }
5012       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5013         output.writeBytes(2, getNameBytes());
5014       }
5015       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5016         output.writeBytes(3, getStringValueBytes());
5017       }
5018       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5019         output.writeDouble(4, numericValue_);
5020       }
5021       if (((bitField0_ & 0x00000010) == 0x00000010)) {
5022         output.writeBool(5, booleanValue_);
5023       }
5024       if (((bitField0_ & 0x00000020) == 0x00000020)) {
5025         output.writeBytes(6, getStringEventBytes());
5026       }
5027       if (((bitField0_ & 0x00000040) == 0x00000040)) {
5028         output.writeDouble(7, numericEvent_);
5029       }
5030       if (((bitField0_ & 0x00000080) == 0x00000080)) {
5031         output.writeBool(8, booleanEvent_);
5032       }
5033       getUnknownFields().writeTo(output);
5034     }
5035
5036     private int memoizedSerializedSize = -1;
5037     public int getSerializedSize() {
5038       int size = memoizedSerializedSize;
5039       if (size != -1) return size;
5040
5041       size = 0;
5042       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5043         size += com.google.protobuf.CodedOutputStream
5044           .computeEnumSize(1, type_.getNumber());
5045       }
5046       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5047         size += com.google.protobuf.CodedOutputStream
5048           .computeBytesSize(2, getNameBytes());
5049       }
5050       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5051         size += com.google.protobuf.CodedOutputStream
5052           .computeBytesSize(3, getStringValueBytes());
5053       }
5054       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5055         size += com.google.protobuf.CodedOutputStream
5056           .computeDoubleSize(4, numericValue_);
5057       }
5058       if (((bitField0_ & 0x00000010) == 0x00000010)) {
5059         size += com.google.protobuf.CodedOutputStream
5060           .computeBoolSize(5, booleanValue_);
5061       }
5062       if (((bitField0_ & 0x00000020) == 0x00000020)) {
5063         size += com.google.protobuf.CodedOutputStream
5064           .computeBytesSize(6, getStringEventBytes());
5065       }
5066       if (((bitField0_ & 0x00000040) == 0x00000040)) {
5067         size += com.google.protobuf.CodedOutputStream
5068           .computeDoubleSize(7, numericEvent_);
5069       }
5070       if (((bitField0_ & 0x00000080) == 0x00000080)) {
5071         size += com.google.protobuf.CodedOutputStream
5072           .computeBoolSize(8, booleanEvent_);
5073       }
5074       size += getUnknownFields().getSerializedSize();
5075       memoizedSerializedSize = size;
5076       return size;
5077     }
5078
5079     private static final long serialVersionUID = 0L;
5080     @java.lang.Override
5081     protected java.lang.Object writeReplace()
5082         throws java.io.ObjectStreamException {
5083       return super.writeReplace();
5084     }
5085
5086     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5087         com.google.protobuf.ByteString data)
5088         throws com.google.protobuf.InvalidProtocolBufferException {
5089       return PARSER.parseFrom(data);
5090     }
5091     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5092         com.google.protobuf.ByteString data,
5093         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5094         throws com.google.protobuf.InvalidProtocolBufferException {
5095       return PARSER.parseFrom(data, extensionRegistry);
5096     }
5097     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
5098         throws com.google.protobuf.InvalidProtocolBufferException {
5099       return PARSER.parseFrom(data);
5100     }
5101     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5102         byte[] data,
5103         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5104         throws com.google.protobuf.InvalidProtocolBufferException {
5105       return PARSER.parseFrom(data, extensionRegistry);
5106     }
5107     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
5108         throws java.io.IOException {
5109       return PARSER.parseFrom(input);
5110     }
5111     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5112         java.io.InputStream input,
5113         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5114         throws java.io.IOException {
5115       return PARSER.parseFrom(input, extensionRegistry);
5116     }
5117     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
5118         throws java.io.IOException {
5119       return PARSER.parseDelimitedFrom(input);
5120     }
5121     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
5122         java.io.InputStream input,
5123         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5124         throws java.io.IOException {
5125       return PARSER.parseDelimitedFrom(input, extensionRegistry);
5126     }
5127     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5128         com.google.protobuf.CodedInputStream input)
5129         throws java.io.IOException {
5130       return PARSER.parseFrom(input);
5131     }
5132     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5133         com.google.protobuf.CodedInputStream input,
5134         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5135         throws java.io.IOException {
5136       return PARSER.parseFrom(input, extensionRegistry);
5137     }
5138
5139     public static Builder newBuilder() { return Builder.create(); }
5140     public Builder newBuilderForType() { return newBuilder(); }
5141     public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
5142       return newBuilder().mergeFrom(prototype);
5143     }
5144     public Builder toBuilder() { return newBuilder(this); }
5145
5146     @java.lang.Override
5147     protected Builder newBuilderForType(
5148         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5149       Builder builder = new Builder(parent);
5150       return builder;
5151     }
5152     /**
5153      * Protobuf type {@code openxc.TranslatedMessage}
5154      */
5155     public static final class Builder extends
5156         com.google.protobuf.GeneratedMessage.Builder<Builder>
5157        implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
5158       public static final com.google.protobuf.Descriptors.Descriptor
5159           getDescriptor() {
5160         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
5161       }
5162
5163       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5164           internalGetFieldAccessorTable() {
5165         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
5166             .ensureFieldAccessorsInitialized(
5167                 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
5168       }
5169
5170       // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
5171       private Builder() {
5172         maybeForceBuilderInitialization();
5173       }
5174
5175       private Builder(
5176           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5177         super(parent);
5178         maybeForceBuilderInitialization();
5179       }
5180       private void maybeForceBuilderInitialization() {
5181         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
5182         }
5183       }
5184       private static Builder create() {
5185         return new Builder();
5186       }
5187
5188       public Builder clear() {
5189         super.clear();
5190         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
5191         bitField0_ = (bitField0_ & ~0x00000001);
5192         name_ = "";
5193         bitField0_ = (bitField0_ & ~0x00000002);
5194         stringValue_ = "";
5195         bitField0_ = (bitField0_ & ~0x00000004);
5196         numericValue_ = 0D;
5197         bitField0_ = (bitField0_ & ~0x00000008);
5198         booleanValue_ = false;
5199         bitField0_ = (bitField0_ & ~0x00000010);
5200         stringEvent_ = "";
5201         bitField0_ = (bitField0_ & ~0x00000020);
5202         numericEvent_ = 0D;
5203         bitField0_ = (bitField0_ & ~0x00000040);
5204         booleanEvent_ = false;
5205         bitField0_ = (bitField0_ & ~0x00000080);
5206         return this;
5207       }
5208
5209       public Builder clone() {
5210         return create().mergeFrom(buildPartial());
5211       }
5212
5213       public com.google.protobuf.Descriptors.Descriptor
5214           getDescriptorForType() {
5215         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
5216       }
5217
5218       public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
5219         return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
5220       }
5221
5222       public com.openxc.BinaryMessages.TranslatedMessage build() {
5223         com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
5224         if (!result.isInitialized()) {
5225           throw newUninitializedMessageException(result);
5226         }
5227         return result;
5228       }
5229
5230       public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
5231         com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
5232         int from_bitField0_ = bitField0_;
5233         int to_bitField0_ = 0;
5234         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
5235           to_bitField0_ |= 0x00000001;
5236         }
5237         result.type_ = type_;
5238         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
5239           to_bitField0_ |= 0x00000002;
5240         }
5241         result.name_ = name_;
5242         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5243           to_bitField0_ |= 0x00000004;
5244         }
5245         result.stringValue_ = stringValue_;
5246         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5247           to_bitField0_ |= 0x00000008;
5248         }
5249         result.numericValue_ = numericValue_;
5250         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
5251           to_bitField0_ |= 0x00000010;
5252         }
5253         result.booleanValue_ = booleanValue_;
5254         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
5255           to_bitField0_ |= 0x00000020;
5256         }
5257         result.stringEvent_ = stringEvent_;
5258         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
5259           to_bitField0_ |= 0x00000040;
5260         }
5261         result.numericEvent_ = numericEvent_;
5262         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
5263           to_bitField0_ |= 0x00000080;
5264         }
5265         result.booleanEvent_ = booleanEvent_;
5266         result.bitField0_ = to_bitField0_;
5267         onBuilt();
5268         return result;
5269       }
5270
5271       public Builder mergeFrom(com.google.protobuf.Message other) {
5272         if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
5273           return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
5274         } else {
5275           super.mergeFrom(other);
5276           return this;
5277         }
5278       }
5279
5280       public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
5281         if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
5282         if (other.hasType()) {
5283           setType(other.getType());
5284         }
5285         if (other.hasName()) {
5286           bitField0_ |= 0x00000002;
5287           name_ = other.name_;
5288           onChanged();
5289         }
5290         if (other.hasStringValue()) {
5291           bitField0_ |= 0x00000004;
5292           stringValue_ = other.stringValue_;
5293           onChanged();
5294         }
5295         if (other.hasNumericValue()) {
5296           setNumericValue(other.getNumericValue());
5297         }
5298         if (other.hasBooleanValue()) {
5299           setBooleanValue(other.getBooleanValue());
5300         }
5301         if (other.hasStringEvent()) {
5302           bitField0_ |= 0x00000020;
5303           stringEvent_ = other.stringEvent_;
5304           onChanged();
5305         }
5306         if (other.hasNumericEvent()) {
5307           setNumericEvent(other.getNumericEvent());
5308         }
5309         if (other.hasBooleanEvent()) {
5310           setBooleanEvent(other.getBooleanEvent());
5311         }
5312         this.mergeUnknownFields(other.getUnknownFields());
5313         return this;
5314       }
5315
5316       public final boolean isInitialized() {
5317         return true;
5318       }
5319
5320       public Builder mergeFrom(
5321           com.google.protobuf.CodedInputStream input,
5322           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5323           throws java.io.IOException {
5324         com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
5325         try {
5326           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5327         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5328           parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
5329           throw e;
5330         } finally {
5331           if (parsedMessage != null) {
5332             mergeFrom(parsedMessage);
5333           }
5334         }
5335         return this;
5336       }
5337       private int bitField0_;
5338
5339       // optional .openxc.TranslatedMessage.Type type = 1;
5340       private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
5341       /**
5342        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5343        */
5344       public boolean hasType() {
5345         return ((bitField0_ & 0x00000001) == 0x00000001);
5346       }
5347       /**
5348        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5349        */
5350       public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
5351         return type_;
5352       }
5353       /**
5354        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5355        */
5356       public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
5357         if (value == null) {
5358           throw new NullPointerException();
5359         }
5360         bitField0_ |= 0x00000001;
5361         type_ = value;
5362         onChanged();
5363         return this;
5364       }
5365       /**
5366        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5367        */
5368       public Builder clearType() {
5369         bitField0_ = (bitField0_ & ~0x00000001);
5370         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
5371         onChanged();
5372         return this;
5373       }
5374
5375       // optional string name = 2;
5376       private java.lang.Object name_ = "";
5377       /**
5378        * <code>optional string name = 2;</code>
5379        */
5380       public boolean hasName() {
5381         return ((bitField0_ & 0x00000002) == 0x00000002);
5382       }
5383       /**
5384        * <code>optional string name = 2;</code>
5385        */
5386       public java.lang.String getName() {
5387         java.lang.Object ref = name_;
5388         if (!(ref instanceof java.lang.String)) {
5389           java.lang.String s = ((com.google.protobuf.ByteString) ref)
5390               .toStringUtf8();
5391           name_ = s;
5392           return s;
5393         } else {
5394           return (java.lang.String) ref;
5395         }
5396       }
5397       /**
5398        * <code>optional string name = 2;</code>
5399        */
5400       public com.google.protobuf.ByteString
5401           getNameBytes() {
5402         java.lang.Object ref = name_;
5403         if (ref instanceof String) {
5404           com.google.protobuf.ByteString b = 
5405               com.google.protobuf.ByteString.copyFromUtf8(
5406                   (java.lang.String) ref);
5407           name_ = b;
5408           return b;
5409         } else {
5410           return (com.google.protobuf.ByteString) ref;
5411         }
5412       }
5413       /**
5414        * <code>optional string name = 2;</code>
5415        */
5416       public Builder setName(
5417           java.lang.String value) {
5418         if (value == null) {
5419     throw new NullPointerException();
5420   }
5421   bitField0_ |= 0x00000002;
5422         name_ = value;
5423         onChanged();
5424         return this;
5425       }
5426       /**
5427        * <code>optional string name = 2;</code>
5428        */
5429       public Builder clearName() {
5430         bitField0_ = (bitField0_ & ~0x00000002);
5431         name_ = getDefaultInstance().getName();
5432         onChanged();
5433         return this;
5434       }
5435       /**
5436        * <code>optional string name = 2;</code>
5437        */
5438       public Builder setNameBytes(
5439           com.google.protobuf.ByteString value) {
5440         if (value == null) {
5441     throw new NullPointerException();
5442   }
5443   bitField0_ |= 0x00000002;
5444         name_ = value;
5445         onChanged();
5446         return this;
5447       }
5448
5449       // optional string string_value = 3;
5450       private java.lang.Object stringValue_ = "";
5451       /**
5452        * <code>optional string string_value = 3;</code>
5453        */
5454       public boolean hasStringValue() {
5455         return ((bitField0_ & 0x00000004) == 0x00000004);
5456       }
5457       /**
5458        * <code>optional string string_value = 3;</code>
5459        */
5460       public java.lang.String getStringValue() {
5461         java.lang.Object ref = stringValue_;
5462         if (!(ref instanceof java.lang.String)) {
5463           java.lang.String s = ((com.google.protobuf.ByteString) ref)
5464               .toStringUtf8();
5465           stringValue_ = s;
5466           return s;
5467         } else {
5468           return (java.lang.String) ref;
5469         }
5470       }
5471       /**
5472        * <code>optional string string_value = 3;</code>
5473        */
5474       public com.google.protobuf.ByteString
5475           getStringValueBytes() {
5476         java.lang.Object ref = stringValue_;
5477         if (ref instanceof String) {
5478           com.google.protobuf.ByteString b = 
5479               com.google.protobuf.ByteString.copyFromUtf8(
5480                   (java.lang.String) ref);
5481           stringValue_ = b;
5482           return b;
5483         } else {
5484           return (com.google.protobuf.ByteString) ref;
5485         }
5486       }
5487       /**
5488        * <code>optional string string_value = 3;</code>
5489        */
5490       public Builder setStringValue(
5491           java.lang.String value) {
5492         if (value == null) {
5493     throw new NullPointerException();
5494   }
5495   bitField0_ |= 0x00000004;
5496         stringValue_ = value;
5497         onChanged();
5498         return this;
5499       }
5500       /**
5501        * <code>optional string string_value = 3;</code>
5502        */
5503       public Builder clearStringValue() {
5504         bitField0_ = (bitField0_ & ~0x00000004);
5505         stringValue_ = getDefaultInstance().getStringValue();
5506         onChanged();
5507         return this;
5508       }
5509       /**
5510        * <code>optional string string_value = 3;</code>
5511        */
5512       public Builder setStringValueBytes(
5513           com.google.protobuf.ByteString value) {
5514         if (value == null) {
5515     throw new NullPointerException();
5516   }
5517   bitField0_ |= 0x00000004;
5518         stringValue_ = value;
5519         onChanged();
5520         return this;
5521       }
5522
5523       // optional double numeric_value = 4;
5524       private double numericValue_ ;
5525       /**
5526        * <code>optional double numeric_value = 4;</code>
5527        */
5528       public boolean hasNumericValue() {
5529         return ((bitField0_ & 0x00000008) == 0x00000008);
5530       }
5531       /**
5532        * <code>optional double numeric_value = 4;</code>
5533        */
5534       public double getNumericValue() {
5535         return numericValue_;
5536       }
5537       /**
5538        * <code>optional double numeric_value = 4;</code>
5539        */
5540       public Builder setNumericValue(double value) {
5541         bitField0_ |= 0x00000008;
5542         numericValue_ = value;
5543         onChanged();
5544         return this;
5545       }
5546       /**
5547        * <code>optional double numeric_value = 4;</code>
5548        */
5549       public Builder clearNumericValue() {
5550         bitField0_ = (bitField0_ & ~0x00000008);
5551         numericValue_ = 0D;
5552         onChanged();
5553         return this;
5554       }
5555
5556       // optional bool boolean_value = 5;
5557       private boolean booleanValue_ ;
5558       /**
5559        * <code>optional bool boolean_value = 5;</code>
5560        */
5561       public boolean hasBooleanValue() {
5562         return ((bitField0_ & 0x00000010) == 0x00000010);
5563       }
5564       /**
5565        * <code>optional bool boolean_value = 5;</code>
5566        */
5567       public boolean getBooleanValue() {
5568         return booleanValue_;
5569       }
5570       /**
5571        * <code>optional bool boolean_value = 5;</code>
5572        */
5573       public Builder setBooleanValue(boolean value) {
5574         bitField0_ |= 0x00000010;
5575         booleanValue_ = value;
5576         onChanged();
5577         return this;
5578       }
5579       /**
5580        * <code>optional bool boolean_value = 5;</code>
5581        */
5582       public Builder clearBooleanValue() {
5583         bitField0_ = (bitField0_ & ~0x00000010);
5584         booleanValue_ = false;
5585         onChanged();
5586         return this;
5587       }
5588
5589       // optional string string_event = 6;
5590       private java.lang.Object stringEvent_ = "";
5591       /**
5592        * <code>optional string string_event = 6;</code>
5593        */
5594       public boolean hasStringEvent() {
5595         return ((bitField0_ & 0x00000020) == 0x00000020);
5596       }
5597       /**
5598        * <code>optional string string_event = 6;</code>
5599        */
5600       public java.lang.String getStringEvent() {
5601         java.lang.Object ref = stringEvent_;
5602         if (!(ref instanceof java.lang.String)) {
5603           java.lang.String s = ((com.google.protobuf.ByteString) ref)
5604               .toStringUtf8();
5605           stringEvent_ = s;
5606           return s;
5607         } else {
5608           return (java.lang.String) ref;
5609         }
5610       }
5611       /**
5612        * <code>optional string string_event = 6;</code>
5613        */
5614       public com.google.protobuf.ByteString
5615           getStringEventBytes() {
5616         java.lang.Object ref = stringEvent_;
5617         if (ref instanceof String) {
5618           com.google.protobuf.ByteString b = 
5619               com.google.protobuf.ByteString.copyFromUtf8(
5620                   (java.lang.String) ref);
5621           stringEvent_ = b;
5622           return b;
5623         } else {
5624           return (com.google.protobuf.ByteString) ref;
5625         }
5626       }
5627       /**
5628        * <code>optional string string_event = 6;</code>
5629        */
5630       public Builder setStringEvent(
5631           java.lang.String value) {
5632         if (value == null) {
5633     throw new NullPointerException();
5634   }
5635   bitField0_ |= 0x00000020;
5636         stringEvent_ = value;
5637         onChanged();
5638         return this;
5639       }
5640       /**
5641        * <code>optional string string_event = 6;</code>
5642        */
5643       public Builder clearStringEvent() {
5644         bitField0_ = (bitField0_ & ~0x00000020);
5645         stringEvent_ = getDefaultInstance().getStringEvent();
5646         onChanged();
5647         return this;
5648       }
5649       /**
5650        * <code>optional string string_event = 6;</code>
5651        */
5652       public Builder setStringEventBytes(
5653           com.google.protobuf.ByteString value) {
5654         if (value == null) {
5655     throw new NullPointerException();
5656   }
5657   bitField0_ |= 0x00000020;
5658         stringEvent_ = value;
5659         onChanged();
5660         return this;
5661       }
5662
5663       // optional double numeric_event = 7;
5664       private double numericEvent_ ;
5665       /**
5666        * <code>optional double numeric_event = 7;</code>
5667        */
5668       public boolean hasNumericEvent() {
5669         return ((bitField0_ & 0x00000040) == 0x00000040);
5670       }
5671       /**
5672        * <code>optional double numeric_event = 7;</code>
5673        */
5674       public double getNumericEvent() {
5675         return numericEvent_;
5676       }
5677       /**
5678        * <code>optional double numeric_event = 7;</code>
5679        */
5680       public Builder setNumericEvent(double value) {
5681         bitField0_ |= 0x00000040;
5682         numericEvent_ = value;
5683         onChanged();
5684         return this;
5685       }
5686       /**
5687        * <code>optional double numeric_event = 7;</code>
5688        */
5689       public Builder clearNumericEvent() {
5690         bitField0_ = (bitField0_ & ~0x00000040);
5691         numericEvent_ = 0D;
5692         onChanged();
5693         return this;
5694       }
5695
5696       // optional bool boolean_event = 8;
5697       private boolean booleanEvent_ ;
5698       /**
5699        * <code>optional bool boolean_event = 8;</code>
5700        */
5701       public boolean hasBooleanEvent() {
5702         return ((bitField0_ & 0x00000080) == 0x00000080);
5703       }
5704       /**
5705        * <code>optional bool boolean_event = 8;</code>
5706        */
5707       public boolean getBooleanEvent() {
5708         return booleanEvent_;
5709       }
5710       /**
5711        * <code>optional bool boolean_event = 8;</code>
5712        */
5713       public Builder setBooleanEvent(boolean value) {
5714         bitField0_ |= 0x00000080;
5715         booleanEvent_ = value;
5716         onChanged();
5717         return this;
5718       }
5719       /**
5720        * <code>optional bool boolean_event = 8;</code>
5721        */
5722       public Builder clearBooleanEvent() {
5723         bitField0_ = (bitField0_ & ~0x00000080);
5724         booleanEvent_ = false;
5725         onChanged();
5726         return this;
5727       }
5728
5729       // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
5730     }
5731
5732     static {
5733       defaultInstance = new TranslatedMessage(true);
5734       defaultInstance.initFields();
5735     }
5736
5737     // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
5738   }
5739
5740   private static com.google.protobuf.Descriptors.Descriptor
5741     internal_static_openxc_VehicleMessage_descriptor;
5742   private static
5743     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5744       internal_static_openxc_VehicleMessage_fieldAccessorTable;
5745   private static com.google.protobuf.Descriptors.Descriptor
5746     internal_static_openxc_RawMessage_descriptor;
5747   private static
5748     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5749       internal_static_openxc_RawMessage_fieldAccessorTable;
5750   private static com.google.protobuf.Descriptors.Descriptor
5751     internal_static_openxc_ControlCommand_descriptor;
5752   private static
5753     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5754       internal_static_openxc_ControlCommand_fieldAccessorTable;
5755   private static com.google.protobuf.Descriptors.Descriptor
5756     internal_static_openxc_DiagnosticRequest_descriptor;
5757   private static
5758     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5759       internal_static_openxc_DiagnosticRequest_fieldAccessorTable;
5760   private static com.google.protobuf.Descriptors.Descriptor
5761     internal_static_openxc_DiagnosticResponse_descriptor;
5762   private static
5763     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5764       internal_static_openxc_DiagnosticResponse_fieldAccessorTable;
5765   private static com.google.protobuf.Descriptors.Descriptor
5766     internal_static_openxc_TranslatedMessage_descriptor;
5767   private static
5768     com.google.protobuf.GeneratedMessage.FieldAccessorTable
5769       internal_static_openxc_TranslatedMessage_fieldAccessorTable;
5770
5771   public static com.google.protobuf.Descriptors.FileDescriptor
5772       getDescriptor() {
5773     return descriptor;
5774   }
5775   private static com.google.protobuf.Descriptors.FileDescriptor
5776       descriptor;
5777   static {
5778     java.lang.String[] descriptorData = {
5779       "\n\014openxc.proto\022\006openxc\"\205\002\n\016VehicleMessag" +
5780       "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
5781       "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
5782       "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
5783       "xc.TranslatedMessage\0227\n\023diagnostic_respo" +
5784       "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\"/\n" +
5785       "\004Type\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022\016\n\nDIAGNO" +
5786       "STIC\020\003\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmes" +
5787       "sage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\014\"\246\001\n\016ControlC" +
5788       "ommand\022)\n\004type\030\001 \001(\0162\033.openxc.ControlCom",
5789       "mand.Type\0225\n\022diagnostic_request\030\002 \001(\0132\031." +
5790       "openxc.DiagnosticRequest\"2\n\004Type\022\013\n\007VERS" +
5791       "ION\020\001\022\r\n\tDEVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\252\001\n" +
5792       "\021DiagnosticRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessa" +
5793       "ge_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017" +
5794       "\n\007payload\030\005 \001(\014\022\025\n\rparse_payload\030\006 \001(\010\022\016" +
5795       "\n\006factor\030\007 \001(\001\022\016\n\006offset\030\010 \001(\001\022\021\n\tfreque" +
5796       "ncy\030\t \001(\001\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030" +
5797       "\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022" +
5798       "\013\n\003pid\030\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negativ",
5799       "e_response_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r" +
5800       "\n\005value\030\010 \001(\001\"\265\002\n\021TranslatedMessage\022,\n\004t" +
5801       "ype\030\001 \001(\0162\036.openxc.TranslatedMessage.Typ" +
5802       "e\022\014\n\004name\030\002 \001(\t\022\024\n\014string_value\030\003 \001(\t\022\025\n" +
5803       "\rnumeric_value\030\004 \001(\001\022\025\n\rboolean_value\030\005 " +
5804       "\001(\010\022\024\n\014string_event\030\006 \001(\t\022\025\n\rnumeric_eve" +
5805       "nt\030\007 \001(\001\022\025\n\rboolean_event\030\010 \001(\010\"\\\n\004Type\022" +
5806       "\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTE" +
5807       "D_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVENTED_B" +
5808       "OOL\020\006B\034\n\ncom.openxcB\016BinaryMessages"
5809     };
5810     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
5811       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
5812         public com.google.protobuf.ExtensionRegistry assignDescriptors(
5813             com.google.protobuf.Descriptors.FileDescriptor root) {
5814           descriptor = root;
5815           internal_static_openxc_VehicleMessage_descriptor =
5816             getDescriptor().getMessageTypes().get(0);
5817           internal_static_openxc_VehicleMessage_fieldAccessorTable = new
5818             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5819               internal_static_openxc_VehicleMessage_descriptor,
5820               new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", });
5821           internal_static_openxc_RawMessage_descriptor =
5822             getDescriptor().getMessageTypes().get(1);
5823           internal_static_openxc_RawMessage_fieldAccessorTable = new
5824             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5825               internal_static_openxc_RawMessage_descriptor,
5826               new java.lang.String[] { "Bus", "MessageId", "Data", });
5827           internal_static_openxc_ControlCommand_descriptor =
5828             getDescriptor().getMessageTypes().get(2);
5829           internal_static_openxc_ControlCommand_fieldAccessorTable = new
5830             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5831               internal_static_openxc_ControlCommand_descriptor,
5832               new java.lang.String[] { "Type", "DiagnosticRequest", });
5833           internal_static_openxc_DiagnosticRequest_descriptor =
5834             getDescriptor().getMessageTypes().get(3);
5835           internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new
5836             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5837               internal_static_openxc_DiagnosticRequest_descriptor,
5838               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "ParsePayload", "Factor", "Offset", "Frequency", });
5839           internal_static_openxc_DiagnosticResponse_descriptor =
5840             getDescriptor().getMessageTypes().get(4);
5841           internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new
5842             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5843               internal_static_openxc_DiagnosticResponse_descriptor,
5844               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", });
5845           internal_static_openxc_TranslatedMessage_descriptor =
5846             getDescriptor().getMessageTypes().get(5);
5847           internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
5848             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
5849               internal_static_openxc_TranslatedMessage_descriptor,
5850               new java.lang.String[] { "Type", "Name", "StringValue", "NumericValue", "BooleanValue", "StringEvent", "NumericEvent", "BooleanEvent", });
5851           return null;
5852         }
5853       };
5854     com.google.protobuf.Descriptors.FileDescriptor
5855       .internalBuildGeneratedFileFrom(descriptorData,
5856         new com.google.protobuf.Descriptors.FileDescriptor[] {
5857         }, assigner);
5858   }
5859
5860   // @@protoc_insertion_point(outer_class_scope)
5861 }