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