31e3249f8b825bd691f78023a03142b938255f17
[apps/low-level-can-service.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     // optional .openxc.CommandResponse command_response = 6;
81     /**
82      * <code>optional .openxc.CommandResponse command_response = 6;</code>
83      */
84     boolean hasCommandResponse();
85     /**
86      * <code>optional .openxc.CommandResponse command_response = 6;</code>
87      */
88     com.openxc.BinaryMessages.CommandResponse getCommandResponse();
89     /**
90      * <code>optional .openxc.CommandResponse command_response = 6;</code>
91      */
92     com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder();
93   }
94   /**
95    * Protobuf type {@code openxc.VehicleMessage}
96    */
97   public static final class VehicleMessage extends
98       com.google.protobuf.GeneratedMessage
99       implements VehicleMessageOrBuilder {
100     // Use VehicleMessage.newBuilder() to construct.
101     private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
102       super(builder);
103       this.unknownFields = builder.getUnknownFields();
104     }
105     private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
106
107     private static final VehicleMessage defaultInstance;
108     public static VehicleMessage getDefaultInstance() {
109       return defaultInstance;
110     }
111
112     public VehicleMessage getDefaultInstanceForType() {
113       return defaultInstance;
114     }
115
116     private final com.google.protobuf.UnknownFieldSet unknownFields;
117     @java.lang.Override
118     public final com.google.protobuf.UnknownFieldSet
119         getUnknownFields() {
120       return this.unknownFields;
121     }
122     private VehicleMessage(
123         com.google.protobuf.CodedInputStream input,
124         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
125         throws com.google.protobuf.InvalidProtocolBufferException {
126       initFields();
127       int mutable_bitField0_ = 0;
128       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
129           com.google.protobuf.UnknownFieldSet.newBuilder();
130       try {
131         boolean done = false;
132         while (!done) {
133           int tag = input.readTag();
134           switch (tag) {
135             case 0:
136               done = true;
137               break;
138             default: {
139               if (!parseUnknownField(input, unknownFields,
140                                      extensionRegistry, tag)) {
141                 done = true;
142               }
143               break;
144             }
145             case 8: {
146               int rawValue = input.readEnum();
147               com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue);
148               if (value == null) {
149                 unknownFields.mergeVarintField(1, rawValue);
150               } else {
151                 bitField0_ |= 0x00000001;
152                 type_ = value;
153               }
154               break;
155             }
156             case 18: {
157               com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null;
158               if (((bitField0_ & 0x00000002) == 0x00000002)) {
159                 subBuilder = rawMessage_.toBuilder();
160               }
161               rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry);
162               if (subBuilder != null) {
163                 subBuilder.mergeFrom(rawMessage_);
164                 rawMessage_ = subBuilder.buildPartial();
165               }
166               bitField0_ |= 0x00000002;
167               break;
168             }
169             case 26: {
170               com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null;
171               if (((bitField0_ & 0x00000004) == 0x00000004)) {
172                 subBuilder = translatedMessage_.toBuilder();
173               }
174               translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry);
175               if (subBuilder != null) {
176                 subBuilder.mergeFrom(translatedMessage_);
177                 translatedMessage_ = subBuilder.buildPartial();
178               }
179               bitField0_ |= 0x00000004;
180               break;
181             }
182             case 34: {
183               com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null;
184               if (((bitField0_ & 0x00000008) == 0x00000008)) {
185                 subBuilder = diagnosticResponse_.toBuilder();
186               }
187               diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry);
188               if (subBuilder != null) {
189                 subBuilder.mergeFrom(diagnosticResponse_);
190                 diagnosticResponse_ = subBuilder.buildPartial();
191               }
192               bitField0_ |= 0x00000008;
193               break;
194             }
195             case 42: {
196               com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = null;
197               if (((bitField0_ & 0x00000010) == 0x00000010)) {
198                 subBuilder = controlCommand_.toBuilder();
199               }
200               controlCommand_ = input.readMessage(com.openxc.BinaryMessages.ControlCommand.PARSER, extensionRegistry);
201               if (subBuilder != null) {
202                 subBuilder.mergeFrom(controlCommand_);
203                 controlCommand_ = subBuilder.buildPartial();
204               }
205               bitField0_ |= 0x00000010;
206               break;
207             }
208             case 50: {
209               com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = null;
210               if (((bitField0_ & 0x00000020) == 0x00000020)) {
211                 subBuilder = commandResponse_.toBuilder();
212               }
213               commandResponse_ = input.readMessage(com.openxc.BinaryMessages.CommandResponse.PARSER, extensionRegistry);
214               if (subBuilder != null) {
215                 subBuilder.mergeFrom(commandResponse_);
216                 commandResponse_ = subBuilder.buildPartial();
217               }
218               bitField0_ |= 0x00000020;
219               break;
220             }
221           }
222         }
223       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
224         throw e.setUnfinishedMessage(this);
225       } catch (java.io.IOException e) {
226         throw new com.google.protobuf.InvalidProtocolBufferException(
227             e.getMessage()).setUnfinishedMessage(this);
228       } finally {
229         this.unknownFields = unknownFields.build();
230         makeExtensionsImmutable();
231       }
232     }
233     public static final com.google.protobuf.Descriptors.Descriptor
234         getDescriptor() {
235       return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
236     }
237
238     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
239         internalGetFieldAccessorTable() {
240       return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
241           .ensureFieldAccessorsInitialized(
242               com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
243     }
244
245     public static com.google.protobuf.Parser<VehicleMessage> PARSER =
246         new com.google.protobuf.AbstractParser<VehicleMessage>() {
247       public VehicleMessage parsePartialFrom(
248           com.google.protobuf.CodedInputStream input,
249           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250           throws com.google.protobuf.InvalidProtocolBufferException {
251         return new VehicleMessage(input, extensionRegistry);
252       }
253     };
254
255     @java.lang.Override
256     public com.google.protobuf.Parser<VehicleMessage> getParserForType() {
257       return PARSER;
258     }
259
260     /**
261      * Protobuf enum {@code openxc.VehicleMessage.Type}
262      */
263     public enum Type
264         implements com.google.protobuf.ProtocolMessageEnum {
265       /**
266        * <code>RAW = 1;</code>
267        */
268       RAW(0, 1),
269       /**
270        * <code>TRANSLATED = 2;</code>
271        */
272       TRANSLATED(1, 2),
273       /**
274        * <code>DIAGNOSTIC = 3;</code>
275        */
276       DIAGNOSTIC(2, 3),
277       /**
278        * <code>CONTROL_COMMAND = 4;</code>
279        */
280       CONTROL_COMMAND(3, 4),
281       /**
282        * <code>COMMAND_RESPONSE = 5;</code>
283        */
284       COMMAND_RESPONSE(4, 5),
285       ;
286
287       /**
288        * <code>RAW = 1;</code>
289        */
290       public static final int RAW_VALUE = 1;
291       /**
292        * <code>TRANSLATED = 2;</code>
293        */
294       public static final int TRANSLATED_VALUE = 2;
295       /**
296        * <code>DIAGNOSTIC = 3;</code>
297        */
298       public static final int DIAGNOSTIC_VALUE = 3;
299       /**
300        * <code>CONTROL_COMMAND = 4;</code>
301        */
302       public static final int CONTROL_COMMAND_VALUE = 4;
303       /**
304        * <code>COMMAND_RESPONSE = 5;</code>
305        */
306       public static final int COMMAND_RESPONSE_VALUE = 5;
307
308
309       public final int getNumber() { return value; }
310
311       public static Type valueOf(int value) {
312         switch (value) {
313           case 1: return RAW;
314           case 2: return TRANSLATED;
315           case 3: return DIAGNOSTIC;
316           case 4: return CONTROL_COMMAND;
317           case 5: return COMMAND_RESPONSE;
318           default: return null;
319         }
320       }
321
322       public static com.google.protobuf.Internal.EnumLiteMap<Type>
323           internalGetValueMap() {
324         return internalValueMap;
325       }
326       private static com.google.protobuf.Internal.EnumLiteMap<Type>
327           internalValueMap =
328             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
329               public Type findValueByNumber(int number) {
330                 return Type.valueOf(number);
331               }
332             };
333
334       public final com.google.protobuf.Descriptors.EnumValueDescriptor
335           getValueDescriptor() {
336         return getDescriptor().getValues().get(index);
337       }
338       public final com.google.protobuf.Descriptors.EnumDescriptor
339           getDescriptorForType() {
340         return getDescriptor();
341       }
342       public static final com.google.protobuf.Descriptors.EnumDescriptor
343           getDescriptor() {
344         return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0);
345       }
346
347       private static final Type[] VALUES = values();
348
349       public static Type valueOf(
350           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
351         if (desc.getType() != getDescriptor()) {
352           throw new java.lang.IllegalArgumentException(
353             "EnumValueDescriptor is not for this type.");
354         }
355         return VALUES[desc.getIndex()];
356       }
357
358       private final int index;
359       private final int value;
360
361       private Type(int index, int value) {
362         this.index = index;
363         this.value = value;
364       }
365
366       // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type)
367     }
368
369     private int bitField0_;
370     // optional .openxc.VehicleMessage.Type type = 1;
371     public static final int TYPE_FIELD_NUMBER = 1;
372     private com.openxc.BinaryMessages.VehicleMessage.Type type_;
373     /**
374      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
375      */
376     public boolean hasType() {
377       return ((bitField0_ & 0x00000001) == 0x00000001);
378     }
379     /**
380      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
381      */
382     public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
383       return type_;
384     }
385
386     // optional .openxc.RawMessage raw_message = 2;
387     public static final int RAW_MESSAGE_FIELD_NUMBER = 2;
388     private com.openxc.BinaryMessages.RawMessage rawMessage_;
389     /**
390      * <code>optional .openxc.RawMessage raw_message = 2;</code>
391      */
392     public boolean hasRawMessage() {
393       return ((bitField0_ & 0x00000002) == 0x00000002);
394     }
395     /**
396      * <code>optional .openxc.RawMessage raw_message = 2;</code>
397      */
398     public com.openxc.BinaryMessages.RawMessage getRawMessage() {
399       return rawMessage_;
400     }
401     /**
402      * <code>optional .openxc.RawMessage raw_message = 2;</code>
403      */
404     public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
405       return rawMessage_;
406     }
407
408     // optional .openxc.TranslatedMessage translated_message = 3;
409     public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3;
410     private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_;
411     /**
412      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
413      */
414     public boolean hasTranslatedMessage() {
415       return ((bitField0_ & 0x00000004) == 0x00000004);
416     }
417     /**
418      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
419      */
420     public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
421       return translatedMessage_;
422     }
423     /**
424      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
425      */
426     public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
427       return translatedMessage_;
428     }
429
430     // optional .openxc.DiagnosticResponse diagnostic_response = 4;
431     public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4;
432     private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_;
433     /**
434      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
435      */
436     public boolean hasDiagnosticResponse() {
437       return ((bitField0_ & 0x00000008) == 0x00000008);
438     }
439     /**
440      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
441      */
442     public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
443       return diagnosticResponse_;
444     }
445     /**
446      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
447      */
448     public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
449       return diagnosticResponse_;
450     }
451
452     // optional .openxc.ControlCommand control_command = 5;
453     public static final int CONTROL_COMMAND_FIELD_NUMBER = 5;
454     private com.openxc.BinaryMessages.ControlCommand controlCommand_;
455     /**
456      * <code>optional .openxc.ControlCommand control_command = 5;</code>
457      */
458     public boolean hasControlCommand() {
459       return ((bitField0_ & 0x00000010) == 0x00000010);
460     }
461     /**
462      * <code>optional .openxc.ControlCommand control_command = 5;</code>
463      */
464     public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
465       return controlCommand_;
466     }
467     /**
468      * <code>optional .openxc.ControlCommand control_command = 5;</code>
469      */
470     public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
471       return controlCommand_;
472     }
473
474     // optional .openxc.CommandResponse command_response = 6;
475     public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6;
476     private com.openxc.BinaryMessages.CommandResponse commandResponse_;
477     /**
478      * <code>optional .openxc.CommandResponse command_response = 6;</code>
479      */
480     public boolean hasCommandResponse() {
481       return ((bitField0_ & 0x00000020) == 0x00000020);
482     }
483     /**
484      * <code>optional .openxc.CommandResponse command_response = 6;</code>
485      */
486     public com.openxc.BinaryMessages.CommandResponse getCommandResponse() {
487       return commandResponse_;
488     }
489     /**
490      * <code>optional .openxc.CommandResponse command_response = 6;</code>
491      */
492     public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() {
493       return commandResponse_;
494     }
495
496     private void initFields() {
497       type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
498       rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
499       translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
500       diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
501       controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
502       commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
503     }
504     private byte memoizedIsInitialized = -1;
505     public final boolean isInitialized() {
506       byte isInitialized = memoizedIsInitialized;
507       if (isInitialized != -1) return isInitialized == 1;
508
509       memoizedIsInitialized = 1;
510       return true;
511     }
512
513     public void writeTo(com.google.protobuf.CodedOutputStream output)
514                         throws java.io.IOException {
515       getSerializedSize();
516       if (((bitField0_ & 0x00000001) == 0x00000001)) {
517         output.writeEnum(1, type_.getNumber());
518       }
519       if (((bitField0_ & 0x00000002) == 0x00000002)) {
520         output.writeMessage(2, rawMessage_);
521       }
522       if (((bitField0_ & 0x00000004) == 0x00000004)) {
523         output.writeMessage(3, translatedMessage_);
524       }
525       if (((bitField0_ & 0x00000008) == 0x00000008)) {
526         output.writeMessage(4, diagnosticResponse_);
527       }
528       if (((bitField0_ & 0x00000010) == 0x00000010)) {
529         output.writeMessage(5, controlCommand_);
530       }
531       if (((bitField0_ & 0x00000020) == 0x00000020)) {
532         output.writeMessage(6, commandResponse_);
533       }
534       getUnknownFields().writeTo(output);
535     }
536
537     private int memoizedSerializedSize = -1;
538     public int getSerializedSize() {
539       int size = memoizedSerializedSize;
540       if (size != -1) return size;
541
542       size = 0;
543       if (((bitField0_ & 0x00000001) == 0x00000001)) {
544         size += com.google.protobuf.CodedOutputStream
545           .computeEnumSize(1, type_.getNumber());
546       }
547       if (((bitField0_ & 0x00000002) == 0x00000002)) {
548         size += com.google.protobuf.CodedOutputStream
549           .computeMessageSize(2, rawMessage_);
550       }
551       if (((bitField0_ & 0x00000004) == 0x00000004)) {
552         size += com.google.protobuf.CodedOutputStream
553           .computeMessageSize(3, translatedMessage_);
554       }
555       if (((bitField0_ & 0x00000008) == 0x00000008)) {
556         size += com.google.protobuf.CodedOutputStream
557           .computeMessageSize(4, diagnosticResponse_);
558       }
559       if (((bitField0_ & 0x00000010) == 0x00000010)) {
560         size += com.google.protobuf.CodedOutputStream
561           .computeMessageSize(5, controlCommand_);
562       }
563       if (((bitField0_ & 0x00000020) == 0x00000020)) {
564         size += com.google.protobuf.CodedOutputStream
565           .computeMessageSize(6, commandResponse_);
566       }
567       size += getUnknownFields().getSerializedSize();
568       memoizedSerializedSize = size;
569       return size;
570     }
571
572     private static final long serialVersionUID = 0L;
573     @java.lang.Override
574     protected java.lang.Object writeReplace()
575         throws java.io.ObjectStreamException {
576       return super.writeReplace();
577     }
578
579     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
580         com.google.protobuf.ByteString data)
581         throws com.google.protobuf.InvalidProtocolBufferException {
582       return PARSER.parseFrom(data);
583     }
584     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
585         com.google.protobuf.ByteString data,
586         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
587         throws com.google.protobuf.InvalidProtocolBufferException {
588       return PARSER.parseFrom(data, extensionRegistry);
589     }
590     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data)
591         throws com.google.protobuf.InvalidProtocolBufferException {
592       return PARSER.parseFrom(data);
593     }
594     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
595         byte[] data,
596         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
597         throws com.google.protobuf.InvalidProtocolBufferException {
598       return PARSER.parseFrom(data, extensionRegistry);
599     }
600     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input)
601         throws java.io.IOException {
602       return PARSER.parseFrom(input);
603     }
604     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
605         java.io.InputStream input,
606         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
607         throws java.io.IOException {
608       return PARSER.parseFrom(input, extensionRegistry);
609     }
610     public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input)
611         throws java.io.IOException {
612       return PARSER.parseDelimitedFrom(input);
613     }
614     public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(
615         java.io.InputStream input,
616         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
617         throws java.io.IOException {
618       return PARSER.parseDelimitedFrom(input, extensionRegistry);
619     }
620     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
621         com.google.protobuf.CodedInputStream input)
622         throws java.io.IOException {
623       return PARSER.parseFrom(input);
624     }
625     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
626         com.google.protobuf.CodedInputStream input,
627         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
628         throws java.io.IOException {
629       return PARSER.parseFrom(input, extensionRegistry);
630     }
631
632     public static Builder newBuilder() { return Builder.create(); }
633     public Builder newBuilderForType() { return newBuilder(); }
634     public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) {
635       return newBuilder().mergeFrom(prototype);
636     }
637     public Builder toBuilder() { return newBuilder(this); }
638
639     @java.lang.Override
640     protected Builder newBuilderForType(
641         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
642       Builder builder = new Builder(parent);
643       return builder;
644     }
645     /**
646      * Protobuf type {@code openxc.VehicleMessage}
647      */
648     public static final class Builder extends
649         com.google.protobuf.GeneratedMessage.Builder<Builder>
650        implements com.openxc.BinaryMessages.VehicleMessageOrBuilder {
651       public static final com.google.protobuf.Descriptors.Descriptor
652           getDescriptor() {
653         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
654       }
655
656       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
657           internalGetFieldAccessorTable() {
658         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
659             .ensureFieldAccessorsInitialized(
660                 com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
661       }
662
663       // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder()
664       private Builder() {
665         maybeForceBuilderInitialization();
666       }
667
668       private Builder(
669           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
670         super(parent);
671         maybeForceBuilderInitialization();
672       }
673       private void maybeForceBuilderInitialization() {
674         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
675           getRawMessageFieldBuilder();
676           getTranslatedMessageFieldBuilder();
677           getDiagnosticResponseFieldBuilder();
678           getControlCommandFieldBuilder();
679           getCommandResponseFieldBuilder();
680         }
681       }
682       private static Builder create() {
683         return new Builder();
684       }
685
686       public Builder clear() {
687         super.clear();
688         type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
689         bitField0_ = (bitField0_ & ~0x00000001);
690         if (rawMessageBuilder_ == null) {
691           rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
692         } else {
693           rawMessageBuilder_.clear();
694         }
695         bitField0_ = (bitField0_ & ~0x00000002);
696         if (translatedMessageBuilder_ == null) {
697           translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
698         } else {
699           translatedMessageBuilder_.clear();
700         }
701         bitField0_ = (bitField0_ & ~0x00000004);
702         if (diagnosticResponseBuilder_ == null) {
703           diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
704         } else {
705           diagnosticResponseBuilder_.clear();
706         }
707         bitField0_ = (bitField0_ & ~0x00000008);
708         if (controlCommandBuilder_ == null) {
709           controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
710         } else {
711           controlCommandBuilder_.clear();
712         }
713         bitField0_ = (bitField0_ & ~0x00000010);
714         if (commandResponseBuilder_ == null) {
715           commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
716         } else {
717           commandResponseBuilder_.clear();
718         }
719         bitField0_ = (bitField0_ & ~0x00000020);
720         return this;
721       }
722
723       public Builder clone() {
724         return create().mergeFrom(buildPartial());
725       }
726
727       public com.google.protobuf.Descriptors.Descriptor
728           getDescriptorForType() {
729         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
730       }
731
732       public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() {
733         return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance();
734       }
735
736       public com.openxc.BinaryMessages.VehicleMessage build() {
737         com.openxc.BinaryMessages.VehicleMessage result = buildPartial();
738         if (!result.isInitialized()) {
739           throw newUninitializedMessageException(result);
740         }
741         return result;
742       }
743
744       public com.openxc.BinaryMessages.VehicleMessage buildPartial() {
745         com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this);
746         int from_bitField0_ = bitField0_;
747         int to_bitField0_ = 0;
748         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
749           to_bitField0_ |= 0x00000001;
750         }
751         result.type_ = type_;
752         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
753           to_bitField0_ |= 0x00000002;
754         }
755         if (rawMessageBuilder_ == null) {
756           result.rawMessage_ = rawMessage_;
757         } else {
758           result.rawMessage_ = rawMessageBuilder_.build();
759         }
760         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
761           to_bitField0_ |= 0x00000004;
762         }
763         if (translatedMessageBuilder_ == null) {
764           result.translatedMessage_ = translatedMessage_;
765         } else {
766           result.translatedMessage_ = translatedMessageBuilder_.build();
767         }
768         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
769           to_bitField0_ |= 0x00000008;
770         }
771         if (diagnosticResponseBuilder_ == null) {
772           result.diagnosticResponse_ = diagnosticResponse_;
773         } else {
774           result.diagnosticResponse_ = diagnosticResponseBuilder_.build();
775         }
776         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
777           to_bitField0_ |= 0x00000010;
778         }
779         if (controlCommandBuilder_ == null) {
780           result.controlCommand_ = controlCommand_;
781         } else {
782           result.controlCommand_ = controlCommandBuilder_.build();
783         }
784         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
785           to_bitField0_ |= 0x00000020;
786         }
787         if (commandResponseBuilder_ == null) {
788           result.commandResponse_ = commandResponse_;
789         } else {
790           result.commandResponse_ = commandResponseBuilder_.build();
791         }
792         result.bitField0_ = to_bitField0_;
793         onBuilt();
794         return result;
795       }
796
797       public Builder mergeFrom(com.google.protobuf.Message other) {
798         if (other instanceof com.openxc.BinaryMessages.VehicleMessage) {
799           return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other);
800         } else {
801           super.mergeFrom(other);
802           return this;
803         }
804       }
805
806       public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) {
807         if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this;
808         if (other.hasType()) {
809           setType(other.getType());
810         }
811         if (other.hasRawMessage()) {
812           mergeRawMessage(other.getRawMessage());
813         }
814         if (other.hasTranslatedMessage()) {
815           mergeTranslatedMessage(other.getTranslatedMessage());
816         }
817         if (other.hasDiagnosticResponse()) {
818           mergeDiagnosticResponse(other.getDiagnosticResponse());
819         }
820         if (other.hasControlCommand()) {
821           mergeControlCommand(other.getControlCommand());
822         }
823         if (other.hasCommandResponse()) {
824           mergeCommandResponse(other.getCommandResponse());
825         }
826         this.mergeUnknownFields(other.getUnknownFields());
827         return this;
828       }
829
830       public final boolean isInitialized() {
831         return true;
832       }
833
834       public Builder mergeFrom(
835           com.google.protobuf.CodedInputStream input,
836           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
837           throws java.io.IOException {
838         com.openxc.BinaryMessages.VehicleMessage parsedMessage = null;
839         try {
840           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
841         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
842           parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage();
843           throw e;
844         } finally {
845           if (parsedMessage != null) {
846             mergeFrom(parsedMessage);
847           }
848         }
849         return this;
850       }
851       private int bitField0_;
852
853       // optional .openxc.VehicleMessage.Type type = 1;
854       private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
855       /**
856        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
857        */
858       public boolean hasType() {
859         return ((bitField0_ & 0x00000001) == 0x00000001);
860       }
861       /**
862        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
863        */
864       public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
865         return type_;
866       }
867       /**
868        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
869        */
870       public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) {
871         if (value == null) {
872           throw new NullPointerException();
873         }
874         bitField0_ |= 0x00000001;
875         type_ = value;
876         onChanged();
877         return this;
878       }
879       /**
880        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
881        */
882       public Builder clearType() {
883         bitField0_ = (bitField0_ & ~0x00000001);
884         type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
885         onChanged();
886         return this;
887       }
888
889       // optional .openxc.RawMessage raw_message = 2;
890       private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
891       private com.google.protobuf.SingleFieldBuilder<
892           com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_;
893       /**
894        * <code>optional .openxc.RawMessage raw_message = 2;</code>
895        */
896       public boolean hasRawMessage() {
897         return ((bitField0_ & 0x00000002) == 0x00000002);
898       }
899       /**
900        * <code>optional .openxc.RawMessage raw_message = 2;</code>
901        */
902       public com.openxc.BinaryMessages.RawMessage getRawMessage() {
903         if (rawMessageBuilder_ == null) {
904           return rawMessage_;
905         } else {
906           return rawMessageBuilder_.getMessage();
907         }
908       }
909       /**
910        * <code>optional .openxc.RawMessage raw_message = 2;</code>
911        */
912       public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) {
913         if (rawMessageBuilder_ == null) {
914           if (value == null) {
915             throw new NullPointerException();
916           }
917           rawMessage_ = value;
918           onChanged();
919         } else {
920           rawMessageBuilder_.setMessage(value);
921         }
922         bitField0_ |= 0x00000002;
923         return this;
924       }
925       /**
926        * <code>optional .openxc.RawMessage raw_message = 2;</code>
927        */
928       public Builder setRawMessage(
929           com.openxc.BinaryMessages.RawMessage.Builder builderForValue) {
930         if (rawMessageBuilder_ == null) {
931           rawMessage_ = builderForValue.build();
932           onChanged();
933         } else {
934           rawMessageBuilder_.setMessage(builderForValue.build());
935         }
936         bitField0_ |= 0x00000002;
937         return this;
938       }
939       /**
940        * <code>optional .openxc.RawMessage raw_message = 2;</code>
941        */
942       public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) {
943         if (rawMessageBuilder_ == null) {
944           if (((bitField0_ & 0x00000002) == 0x00000002) &&
945               rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) {
946             rawMessage_ =
947               com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial();
948           } else {
949             rawMessage_ = value;
950           }
951           onChanged();
952         } else {
953           rawMessageBuilder_.mergeFrom(value);
954         }
955         bitField0_ |= 0x00000002;
956         return this;
957       }
958       /**
959        * <code>optional .openxc.RawMessage raw_message = 2;</code>
960        */
961       public Builder clearRawMessage() {
962         if (rawMessageBuilder_ == null) {
963           rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
964           onChanged();
965         } else {
966           rawMessageBuilder_.clear();
967         }
968         bitField0_ = (bitField0_ & ~0x00000002);
969         return this;
970       }
971       /**
972        * <code>optional .openxc.RawMessage raw_message = 2;</code>
973        */
974       public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() {
975         bitField0_ |= 0x00000002;
976         onChanged();
977         return getRawMessageFieldBuilder().getBuilder();
978       }
979       /**
980        * <code>optional .openxc.RawMessage raw_message = 2;</code>
981        */
982       public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
983         if (rawMessageBuilder_ != null) {
984           return rawMessageBuilder_.getMessageOrBuilder();
985         } else {
986           return rawMessage_;
987         }
988       }
989       /**
990        * <code>optional .openxc.RawMessage raw_message = 2;</code>
991        */
992       private com.google.protobuf.SingleFieldBuilder<
993           com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> 
994           getRawMessageFieldBuilder() {
995         if (rawMessageBuilder_ == null) {
996           rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
997               com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>(
998                   rawMessage_,
999                   getParentForChildren(),
1000                   isClean());
1001           rawMessage_ = null;
1002         }
1003         return rawMessageBuilder_;
1004       }
1005
1006       // optional .openxc.TranslatedMessage translated_message = 3;
1007       private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
1008       private com.google.protobuf.SingleFieldBuilder<
1009           com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_;
1010       /**
1011        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1012        */
1013       public boolean hasTranslatedMessage() {
1014         return ((bitField0_ & 0x00000004) == 0x00000004);
1015       }
1016       /**
1017        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1018        */
1019       public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
1020         if (translatedMessageBuilder_ == null) {
1021           return translatedMessage_;
1022         } else {
1023           return translatedMessageBuilder_.getMessage();
1024         }
1025       }
1026       /**
1027        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1028        */
1029       public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
1030         if (translatedMessageBuilder_ == null) {
1031           if (value == null) {
1032             throw new NullPointerException();
1033           }
1034           translatedMessage_ = value;
1035           onChanged();
1036         } else {
1037           translatedMessageBuilder_.setMessage(value);
1038         }
1039         bitField0_ |= 0x00000004;
1040         return this;
1041       }
1042       /**
1043        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1044        */
1045       public Builder setTranslatedMessage(
1046           com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) {
1047         if (translatedMessageBuilder_ == null) {
1048           translatedMessage_ = builderForValue.build();
1049           onChanged();
1050         } else {
1051           translatedMessageBuilder_.setMessage(builderForValue.build());
1052         }
1053         bitField0_ |= 0x00000004;
1054         return this;
1055       }
1056       /**
1057        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1058        */
1059       public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
1060         if (translatedMessageBuilder_ == null) {
1061           if (((bitField0_ & 0x00000004) == 0x00000004) &&
1062               translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) {
1063             translatedMessage_ =
1064               com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial();
1065           } else {
1066             translatedMessage_ = value;
1067           }
1068           onChanged();
1069         } else {
1070           translatedMessageBuilder_.mergeFrom(value);
1071         }
1072         bitField0_ |= 0x00000004;
1073         return this;
1074       }
1075       /**
1076        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1077        */
1078       public Builder clearTranslatedMessage() {
1079         if (translatedMessageBuilder_ == null) {
1080           translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
1081           onChanged();
1082         } else {
1083           translatedMessageBuilder_.clear();
1084         }
1085         bitField0_ = (bitField0_ & ~0x00000004);
1086         return this;
1087       }
1088       /**
1089        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1090        */
1091       public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() {
1092         bitField0_ |= 0x00000004;
1093         onChanged();
1094         return getTranslatedMessageFieldBuilder().getBuilder();
1095       }
1096       /**
1097        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1098        */
1099       public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
1100         if (translatedMessageBuilder_ != null) {
1101           return translatedMessageBuilder_.getMessageOrBuilder();
1102         } else {
1103           return translatedMessage_;
1104         }
1105       }
1106       /**
1107        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1108        */
1109       private com.google.protobuf.SingleFieldBuilder<
1110           com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> 
1111           getTranslatedMessageFieldBuilder() {
1112         if (translatedMessageBuilder_ == null) {
1113           translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1114               com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>(
1115                   translatedMessage_,
1116                   getParentForChildren(),
1117                   isClean());
1118           translatedMessage_ = null;
1119         }
1120         return translatedMessageBuilder_;
1121       }
1122
1123       // optional .openxc.DiagnosticResponse diagnostic_response = 4;
1124       private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1125       private com.google.protobuf.SingleFieldBuilder<
1126           com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_;
1127       /**
1128        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1129        */
1130       public boolean hasDiagnosticResponse() {
1131         return ((bitField0_ & 0x00000008) == 0x00000008);
1132       }
1133       /**
1134        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1135        */
1136       public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
1137         if (diagnosticResponseBuilder_ == null) {
1138           return diagnosticResponse_;
1139         } else {
1140           return diagnosticResponseBuilder_.getMessage();
1141         }
1142       }
1143       /**
1144        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1145        */
1146       public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1147         if (diagnosticResponseBuilder_ == null) {
1148           if (value == null) {
1149             throw new NullPointerException();
1150           }
1151           diagnosticResponse_ = value;
1152           onChanged();
1153         } else {
1154           diagnosticResponseBuilder_.setMessage(value);
1155         }
1156         bitField0_ |= 0x00000008;
1157         return this;
1158       }
1159       /**
1160        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1161        */
1162       public Builder setDiagnosticResponse(
1163           com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) {
1164         if (diagnosticResponseBuilder_ == null) {
1165           diagnosticResponse_ = builderForValue.build();
1166           onChanged();
1167         } else {
1168           diagnosticResponseBuilder_.setMessage(builderForValue.build());
1169         }
1170         bitField0_ |= 0x00000008;
1171         return this;
1172       }
1173       /**
1174        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1175        */
1176       public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1177         if (diagnosticResponseBuilder_ == null) {
1178           if (((bitField0_ & 0x00000008) == 0x00000008) &&
1179               diagnosticResponse_ != com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) {
1180             diagnosticResponse_ =
1181               com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(diagnosticResponse_).mergeFrom(value).buildPartial();
1182           } else {
1183             diagnosticResponse_ = value;
1184           }
1185           onChanged();
1186         } else {
1187           diagnosticResponseBuilder_.mergeFrom(value);
1188         }
1189         bitField0_ |= 0x00000008;
1190         return this;
1191       }
1192       /**
1193        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1194        */
1195       public Builder clearDiagnosticResponse() {
1196         if (diagnosticResponseBuilder_ == null) {
1197           diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1198           onChanged();
1199         } else {
1200           diagnosticResponseBuilder_.clear();
1201         }
1202         bitField0_ = (bitField0_ & ~0x00000008);
1203         return this;
1204       }
1205       /**
1206        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1207        */
1208       public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() {
1209         bitField0_ |= 0x00000008;
1210         onChanged();
1211         return getDiagnosticResponseFieldBuilder().getBuilder();
1212       }
1213       /**
1214        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1215        */
1216       public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
1217         if (diagnosticResponseBuilder_ != null) {
1218           return diagnosticResponseBuilder_.getMessageOrBuilder();
1219         } else {
1220           return diagnosticResponse_;
1221         }
1222       }
1223       /**
1224        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1225        */
1226       private com.google.protobuf.SingleFieldBuilder<
1227           com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> 
1228           getDiagnosticResponseFieldBuilder() {
1229         if (diagnosticResponseBuilder_ == null) {
1230           diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1231               com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>(
1232                   diagnosticResponse_,
1233                   getParentForChildren(),
1234                   isClean());
1235           diagnosticResponse_ = null;
1236         }
1237         return diagnosticResponseBuilder_;
1238       }
1239
1240       // optional .openxc.ControlCommand control_command = 5;
1241       private com.openxc.BinaryMessages.ControlCommand controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
1242       private com.google.protobuf.SingleFieldBuilder<
1243           com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> controlCommandBuilder_;
1244       /**
1245        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1246        */
1247       public boolean hasControlCommand() {
1248         return ((bitField0_ & 0x00000010) == 0x00000010);
1249       }
1250       /**
1251        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1252        */
1253       public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
1254         if (controlCommandBuilder_ == null) {
1255           return controlCommand_;
1256         } else {
1257           return controlCommandBuilder_.getMessage();
1258         }
1259       }
1260       /**
1261        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1262        */
1263       public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) {
1264         if (controlCommandBuilder_ == null) {
1265           if (value == null) {
1266             throw new NullPointerException();
1267           }
1268           controlCommand_ = value;
1269           onChanged();
1270         } else {
1271           controlCommandBuilder_.setMessage(value);
1272         }
1273         bitField0_ |= 0x00000010;
1274         return this;
1275       }
1276       /**
1277        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1278        */
1279       public Builder setControlCommand(
1280           com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) {
1281         if (controlCommandBuilder_ == null) {
1282           controlCommand_ = builderForValue.build();
1283           onChanged();
1284         } else {
1285           controlCommandBuilder_.setMessage(builderForValue.build());
1286         }
1287         bitField0_ |= 0x00000010;
1288         return this;
1289       }
1290       /**
1291        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1292        */
1293       public Builder mergeControlCommand(com.openxc.BinaryMessages.ControlCommand value) {
1294         if (controlCommandBuilder_ == null) {
1295           if (((bitField0_ & 0x00000010) == 0x00000010) &&
1296               controlCommand_ != com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) {
1297             controlCommand_ =
1298               com.openxc.BinaryMessages.ControlCommand.newBuilder(controlCommand_).mergeFrom(value).buildPartial();
1299           } else {
1300             controlCommand_ = value;
1301           }
1302           onChanged();
1303         } else {
1304           controlCommandBuilder_.mergeFrom(value);
1305         }
1306         bitField0_ |= 0x00000010;
1307         return this;
1308       }
1309       /**
1310        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1311        */
1312       public Builder clearControlCommand() {
1313         if (controlCommandBuilder_ == null) {
1314           controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
1315           onChanged();
1316         } else {
1317           controlCommandBuilder_.clear();
1318         }
1319         bitField0_ = (bitField0_ & ~0x00000010);
1320         return this;
1321       }
1322       /**
1323        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1324        */
1325       public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() {
1326         bitField0_ |= 0x00000010;
1327         onChanged();
1328         return getControlCommandFieldBuilder().getBuilder();
1329       }
1330       /**
1331        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1332        */
1333       public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
1334         if (controlCommandBuilder_ != null) {
1335           return controlCommandBuilder_.getMessageOrBuilder();
1336         } else {
1337           return controlCommand_;
1338         }
1339       }
1340       /**
1341        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1342        */
1343       private com.google.protobuf.SingleFieldBuilder<
1344           com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> 
1345           getControlCommandFieldBuilder() {
1346         if (controlCommandBuilder_ == null) {
1347           controlCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1348               com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder>(
1349                   controlCommand_,
1350                   getParentForChildren(),
1351                   isClean());
1352           controlCommand_ = null;
1353         }
1354         return controlCommandBuilder_;
1355       }
1356
1357       // optional .openxc.CommandResponse command_response = 6;
1358       private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
1359       private com.google.protobuf.SingleFieldBuilder<
1360           com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_;
1361       /**
1362        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1363        */
1364       public boolean hasCommandResponse() {
1365         return ((bitField0_ & 0x00000020) == 0x00000020);
1366       }
1367       /**
1368        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1369        */
1370       public com.openxc.BinaryMessages.CommandResponse getCommandResponse() {
1371         if (commandResponseBuilder_ == null) {
1372           return commandResponse_;
1373         } else {
1374           return commandResponseBuilder_.getMessage();
1375         }
1376       }
1377       /**
1378        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1379        */
1380       public Builder setCommandResponse(com.openxc.BinaryMessages.CommandResponse value) {
1381         if (commandResponseBuilder_ == null) {
1382           if (value == null) {
1383             throw new NullPointerException();
1384           }
1385           commandResponse_ = value;
1386           onChanged();
1387         } else {
1388           commandResponseBuilder_.setMessage(value);
1389         }
1390         bitField0_ |= 0x00000020;
1391         return this;
1392       }
1393       /**
1394        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1395        */
1396       public Builder setCommandResponse(
1397           com.openxc.BinaryMessages.CommandResponse.Builder builderForValue) {
1398         if (commandResponseBuilder_ == null) {
1399           commandResponse_ = builderForValue.build();
1400           onChanged();
1401         } else {
1402           commandResponseBuilder_.setMessage(builderForValue.build());
1403         }
1404         bitField0_ |= 0x00000020;
1405         return this;
1406       }
1407       /**
1408        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1409        */
1410       public Builder mergeCommandResponse(com.openxc.BinaryMessages.CommandResponse value) {
1411         if (commandResponseBuilder_ == null) {
1412           if (((bitField0_ & 0x00000020) == 0x00000020) &&
1413               commandResponse_ != com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) {
1414             commandResponse_ =
1415               com.openxc.BinaryMessages.CommandResponse.newBuilder(commandResponse_).mergeFrom(value).buildPartial();
1416           } else {
1417             commandResponse_ = value;
1418           }
1419           onChanged();
1420         } else {
1421           commandResponseBuilder_.mergeFrom(value);
1422         }
1423         bitField0_ |= 0x00000020;
1424         return this;
1425       }
1426       /**
1427        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1428        */
1429       public Builder clearCommandResponse() {
1430         if (commandResponseBuilder_ == null) {
1431           commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
1432           onChanged();
1433         } else {
1434           commandResponseBuilder_.clear();
1435         }
1436         bitField0_ = (bitField0_ & ~0x00000020);
1437         return this;
1438       }
1439       /**
1440        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1441        */
1442       public com.openxc.BinaryMessages.CommandResponse.Builder getCommandResponseBuilder() {
1443         bitField0_ |= 0x00000020;
1444         onChanged();
1445         return getCommandResponseFieldBuilder().getBuilder();
1446       }
1447       /**
1448        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1449        */
1450       public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() {
1451         if (commandResponseBuilder_ != null) {
1452           return commandResponseBuilder_.getMessageOrBuilder();
1453         } else {
1454           return commandResponse_;
1455         }
1456       }
1457       /**
1458        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1459        */
1460       private com.google.protobuf.SingleFieldBuilder<
1461           com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> 
1462           getCommandResponseFieldBuilder() {
1463         if (commandResponseBuilder_ == null) {
1464           commandResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1465               com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder>(
1466                   commandResponse_,
1467                   getParentForChildren(),
1468                   isClean());
1469           commandResponse_ = null;
1470         }
1471         return commandResponseBuilder_;
1472       }
1473
1474       // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage)
1475     }
1476
1477     static {
1478       defaultInstance = new VehicleMessage(true);
1479       defaultInstance.initFields();
1480     }
1481
1482     // @@protoc_insertion_point(class_scope:openxc.VehicleMessage)
1483   }
1484
1485   public interface RawMessageOrBuilder
1486       extends com.google.protobuf.MessageOrBuilder {
1487
1488     // optional int32 bus = 1;
1489     /**
1490      * <code>optional int32 bus = 1;</code>
1491      */
1492     boolean hasBus();
1493     /**
1494      * <code>optional int32 bus = 1;</code>
1495      */
1496     int getBus();
1497
1498     // optional uint32 message_id = 2;
1499     /**
1500      * <code>optional uint32 message_id = 2;</code>
1501      */
1502     boolean hasMessageId();
1503     /**
1504      * <code>optional uint32 message_id = 2;</code>
1505      */
1506     int getMessageId();
1507
1508     // optional bytes data = 3;
1509     /**
1510      * <code>optional bytes data = 3;</code>
1511      */
1512     boolean hasData();
1513     /**
1514      * <code>optional bytes data = 3;</code>
1515      */
1516     com.google.protobuf.ByteString getData();
1517   }
1518   /**
1519    * Protobuf type {@code openxc.RawMessage}
1520    */
1521   public static final class RawMessage extends
1522       com.google.protobuf.GeneratedMessage
1523       implements RawMessageOrBuilder {
1524     // Use RawMessage.newBuilder() to construct.
1525     private RawMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1526       super(builder);
1527       this.unknownFields = builder.getUnknownFields();
1528     }
1529     private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1530
1531     private static final RawMessage defaultInstance;
1532     public static RawMessage getDefaultInstance() {
1533       return defaultInstance;
1534     }
1535
1536     public RawMessage getDefaultInstanceForType() {
1537       return defaultInstance;
1538     }
1539
1540     private final com.google.protobuf.UnknownFieldSet unknownFields;
1541     @java.lang.Override
1542     public final com.google.protobuf.UnknownFieldSet
1543         getUnknownFields() {
1544       return this.unknownFields;
1545     }
1546     private RawMessage(
1547         com.google.protobuf.CodedInputStream input,
1548         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1549         throws com.google.protobuf.InvalidProtocolBufferException {
1550       initFields();
1551       int mutable_bitField0_ = 0;
1552       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1553           com.google.protobuf.UnknownFieldSet.newBuilder();
1554       try {
1555         boolean done = false;
1556         while (!done) {
1557           int tag = input.readTag();
1558           switch (tag) {
1559             case 0:
1560               done = true;
1561               break;
1562             default: {
1563               if (!parseUnknownField(input, unknownFields,
1564                                      extensionRegistry, tag)) {
1565                 done = true;
1566               }
1567               break;
1568             }
1569             case 8: {
1570               bitField0_ |= 0x00000001;
1571               bus_ = input.readInt32();
1572               break;
1573             }
1574             case 16: {
1575               bitField0_ |= 0x00000002;
1576               messageId_ = input.readUInt32();
1577               break;
1578             }
1579             case 26: {
1580               bitField0_ |= 0x00000004;
1581               data_ = input.readBytes();
1582               break;
1583             }
1584           }
1585         }
1586       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1587         throw e.setUnfinishedMessage(this);
1588       } catch (java.io.IOException e) {
1589         throw new com.google.protobuf.InvalidProtocolBufferException(
1590             e.getMessage()).setUnfinishedMessage(this);
1591       } finally {
1592         this.unknownFields = unknownFields.build();
1593         makeExtensionsImmutable();
1594       }
1595     }
1596     public static final com.google.protobuf.Descriptors.Descriptor
1597         getDescriptor() {
1598       return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1599     }
1600
1601     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1602         internalGetFieldAccessorTable() {
1603       return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1604           .ensureFieldAccessorsInitialized(
1605               com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1606     }
1607
1608     public static com.google.protobuf.Parser<RawMessage> PARSER =
1609         new com.google.protobuf.AbstractParser<RawMessage>() {
1610       public RawMessage parsePartialFrom(
1611           com.google.protobuf.CodedInputStream input,
1612           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1613           throws com.google.protobuf.InvalidProtocolBufferException {
1614         return new RawMessage(input, extensionRegistry);
1615       }
1616     };
1617
1618     @java.lang.Override
1619     public com.google.protobuf.Parser<RawMessage> getParserForType() {
1620       return PARSER;
1621     }
1622
1623     private int bitField0_;
1624     // optional int32 bus = 1;
1625     public static final int BUS_FIELD_NUMBER = 1;
1626     private int bus_;
1627     /**
1628      * <code>optional int32 bus = 1;</code>
1629      */
1630     public boolean hasBus() {
1631       return ((bitField0_ & 0x00000001) == 0x00000001);
1632     }
1633     /**
1634      * <code>optional int32 bus = 1;</code>
1635      */
1636     public int getBus() {
1637       return bus_;
1638     }
1639
1640     // optional uint32 message_id = 2;
1641     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1642     private int messageId_;
1643     /**
1644      * <code>optional uint32 message_id = 2;</code>
1645      */
1646     public boolean hasMessageId() {
1647       return ((bitField0_ & 0x00000002) == 0x00000002);
1648     }
1649     /**
1650      * <code>optional uint32 message_id = 2;</code>
1651      */
1652     public int getMessageId() {
1653       return messageId_;
1654     }
1655
1656     // optional bytes data = 3;
1657     public static final int DATA_FIELD_NUMBER = 3;
1658     private com.google.protobuf.ByteString data_;
1659     /**
1660      * <code>optional bytes data = 3;</code>
1661      */
1662     public boolean hasData() {
1663       return ((bitField0_ & 0x00000004) == 0x00000004);
1664     }
1665     /**
1666      * <code>optional bytes data = 3;</code>
1667      */
1668     public com.google.protobuf.ByteString getData() {
1669       return data_;
1670     }
1671
1672     private void initFields() {
1673       bus_ = 0;
1674       messageId_ = 0;
1675       data_ = com.google.protobuf.ByteString.EMPTY;
1676     }
1677     private byte memoizedIsInitialized = -1;
1678     public final boolean isInitialized() {
1679       byte isInitialized = memoizedIsInitialized;
1680       if (isInitialized != -1) return isInitialized == 1;
1681
1682       memoizedIsInitialized = 1;
1683       return true;
1684     }
1685
1686     public void writeTo(com.google.protobuf.CodedOutputStream output)
1687                         throws java.io.IOException {
1688       getSerializedSize();
1689       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1690         output.writeInt32(1, bus_);
1691       }
1692       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1693         output.writeUInt32(2, messageId_);
1694       }
1695       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1696         output.writeBytes(3, data_);
1697       }
1698       getUnknownFields().writeTo(output);
1699     }
1700
1701     private int memoizedSerializedSize = -1;
1702     public int getSerializedSize() {
1703       int size = memoizedSerializedSize;
1704       if (size != -1) return size;
1705
1706       size = 0;
1707       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1708         size += com.google.protobuf.CodedOutputStream
1709           .computeInt32Size(1, bus_);
1710       }
1711       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1712         size += com.google.protobuf.CodedOutputStream
1713           .computeUInt32Size(2, messageId_);
1714       }
1715       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1716         size += com.google.protobuf.CodedOutputStream
1717           .computeBytesSize(3, data_);
1718       }
1719       size += getUnknownFields().getSerializedSize();
1720       memoizedSerializedSize = size;
1721       return size;
1722     }
1723
1724     private static final long serialVersionUID = 0L;
1725     @java.lang.Override
1726     protected java.lang.Object writeReplace()
1727         throws java.io.ObjectStreamException {
1728       return super.writeReplace();
1729     }
1730
1731     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1732         com.google.protobuf.ByteString data)
1733         throws com.google.protobuf.InvalidProtocolBufferException {
1734       return PARSER.parseFrom(data);
1735     }
1736     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1737         com.google.protobuf.ByteString data,
1738         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1739         throws com.google.protobuf.InvalidProtocolBufferException {
1740       return PARSER.parseFrom(data, extensionRegistry);
1741     }
1742     public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data)
1743         throws com.google.protobuf.InvalidProtocolBufferException {
1744       return PARSER.parseFrom(data);
1745     }
1746     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1747         byte[] data,
1748         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1749         throws com.google.protobuf.InvalidProtocolBufferException {
1750       return PARSER.parseFrom(data, extensionRegistry);
1751     }
1752     public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input)
1753         throws java.io.IOException {
1754       return PARSER.parseFrom(input);
1755     }
1756     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1757         java.io.InputStream input,
1758         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1759         throws java.io.IOException {
1760       return PARSER.parseFrom(input, extensionRegistry);
1761     }
1762     public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input)
1763         throws java.io.IOException {
1764       return PARSER.parseDelimitedFrom(input);
1765     }
1766     public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(
1767         java.io.InputStream input,
1768         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1769         throws java.io.IOException {
1770       return PARSER.parseDelimitedFrom(input, extensionRegistry);
1771     }
1772     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1773         com.google.protobuf.CodedInputStream input)
1774         throws java.io.IOException {
1775       return PARSER.parseFrom(input);
1776     }
1777     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1778         com.google.protobuf.CodedInputStream input,
1779         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1780         throws java.io.IOException {
1781       return PARSER.parseFrom(input, extensionRegistry);
1782     }
1783
1784     public static Builder newBuilder() { return Builder.create(); }
1785     public Builder newBuilderForType() { return newBuilder(); }
1786     public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) {
1787       return newBuilder().mergeFrom(prototype);
1788     }
1789     public Builder toBuilder() { return newBuilder(this); }
1790
1791     @java.lang.Override
1792     protected Builder newBuilderForType(
1793         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1794       Builder builder = new Builder(parent);
1795       return builder;
1796     }
1797     /**
1798      * Protobuf type {@code openxc.RawMessage}
1799      */
1800     public static final class Builder extends
1801         com.google.protobuf.GeneratedMessage.Builder<Builder>
1802        implements com.openxc.BinaryMessages.RawMessageOrBuilder {
1803       public static final com.google.protobuf.Descriptors.Descriptor
1804           getDescriptor() {
1805         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1806       }
1807
1808       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1809           internalGetFieldAccessorTable() {
1810         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1811             .ensureFieldAccessorsInitialized(
1812                 com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1813       }
1814
1815       // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder()
1816       private Builder() {
1817         maybeForceBuilderInitialization();
1818       }
1819
1820       private Builder(
1821           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1822         super(parent);
1823         maybeForceBuilderInitialization();
1824       }
1825       private void maybeForceBuilderInitialization() {
1826         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1827         }
1828       }
1829       private static Builder create() {
1830         return new Builder();
1831       }
1832
1833       public Builder clear() {
1834         super.clear();
1835         bus_ = 0;
1836         bitField0_ = (bitField0_ & ~0x00000001);
1837         messageId_ = 0;
1838         bitField0_ = (bitField0_ & ~0x00000002);
1839         data_ = com.google.protobuf.ByteString.EMPTY;
1840         bitField0_ = (bitField0_ & ~0x00000004);
1841         return this;
1842       }
1843
1844       public Builder clone() {
1845         return create().mergeFrom(buildPartial());
1846       }
1847
1848       public com.google.protobuf.Descriptors.Descriptor
1849           getDescriptorForType() {
1850         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1851       }
1852
1853       public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() {
1854         return com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
1855       }
1856
1857       public com.openxc.BinaryMessages.RawMessage build() {
1858         com.openxc.BinaryMessages.RawMessage result = buildPartial();
1859         if (!result.isInitialized()) {
1860           throw newUninitializedMessageException(result);
1861         }
1862         return result;
1863       }
1864
1865       public com.openxc.BinaryMessages.RawMessage buildPartial() {
1866         com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this);
1867         int from_bitField0_ = bitField0_;
1868         int to_bitField0_ = 0;
1869         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
1870           to_bitField0_ |= 0x00000001;
1871         }
1872         result.bus_ = bus_;
1873         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
1874           to_bitField0_ |= 0x00000002;
1875         }
1876         result.messageId_ = messageId_;
1877         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
1878           to_bitField0_ |= 0x00000004;
1879         }
1880         result.data_ = data_;
1881         result.bitField0_ = to_bitField0_;
1882         onBuilt();
1883         return result;
1884       }
1885
1886       public Builder mergeFrom(com.google.protobuf.Message other) {
1887         if (other instanceof com.openxc.BinaryMessages.RawMessage) {
1888           return mergeFrom((com.openxc.BinaryMessages.RawMessage)other);
1889         } else {
1890           super.mergeFrom(other);
1891           return this;
1892         }
1893       }
1894
1895       public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) {
1896         if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this;
1897         if (other.hasBus()) {
1898           setBus(other.getBus());
1899         }
1900         if (other.hasMessageId()) {
1901           setMessageId(other.getMessageId());
1902         }
1903         if (other.hasData()) {
1904           setData(other.getData());
1905         }
1906         this.mergeUnknownFields(other.getUnknownFields());
1907         return this;
1908       }
1909
1910       public final boolean isInitialized() {
1911         return true;
1912       }
1913
1914       public Builder mergeFrom(
1915           com.google.protobuf.CodedInputStream input,
1916           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1917           throws java.io.IOException {
1918         com.openxc.BinaryMessages.RawMessage parsedMessage = null;
1919         try {
1920           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1921         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1922           parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage();
1923           throw e;
1924         } finally {
1925           if (parsedMessage != null) {
1926             mergeFrom(parsedMessage);
1927           }
1928         }
1929         return this;
1930       }
1931       private int bitField0_;
1932
1933       // optional int32 bus = 1;
1934       private int bus_ ;
1935       /**
1936        * <code>optional int32 bus = 1;</code>
1937        */
1938       public boolean hasBus() {
1939         return ((bitField0_ & 0x00000001) == 0x00000001);
1940       }
1941       /**
1942        * <code>optional int32 bus = 1;</code>
1943        */
1944       public int getBus() {
1945         return bus_;
1946       }
1947       /**
1948        * <code>optional int32 bus = 1;</code>
1949        */
1950       public Builder setBus(int value) {
1951         bitField0_ |= 0x00000001;
1952         bus_ = value;
1953         onChanged();
1954         return this;
1955       }
1956       /**
1957        * <code>optional int32 bus = 1;</code>
1958        */
1959       public Builder clearBus() {
1960         bitField0_ = (bitField0_ & ~0x00000001);
1961         bus_ = 0;
1962         onChanged();
1963         return this;
1964       }
1965
1966       // optional uint32 message_id = 2;
1967       private int messageId_ ;
1968       /**
1969        * <code>optional uint32 message_id = 2;</code>
1970        */
1971       public boolean hasMessageId() {
1972         return ((bitField0_ & 0x00000002) == 0x00000002);
1973       }
1974       /**
1975        * <code>optional uint32 message_id = 2;</code>
1976        */
1977       public int getMessageId() {
1978         return messageId_;
1979       }
1980       /**
1981        * <code>optional uint32 message_id = 2;</code>
1982        */
1983       public Builder setMessageId(int value) {
1984         bitField0_ |= 0x00000002;
1985         messageId_ = value;
1986         onChanged();
1987         return this;
1988       }
1989       /**
1990        * <code>optional uint32 message_id = 2;</code>
1991        */
1992       public Builder clearMessageId() {
1993         bitField0_ = (bitField0_ & ~0x00000002);
1994         messageId_ = 0;
1995         onChanged();
1996         return this;
1997       }
1998
1999       // optional bytes data = 3;
2000       private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
2001       /**
2002        * <code>optional bytes data = 3;</code>
2003        */
2004       public boolean hasData() {
2005         return ((bitField0_ & 0x00000004) == 0x00000004);
2006       }
2007       /**
2008        * <code>optional bytes data = 3;</code>
2009        */
2010       public com.google.protobuf.ByteString getData() {
2011         return data_;
2012       }
2013       /**
2014        * <code>optional bytes data = 3;</code>
2015        */
2016       public Builder setData(com.google.protobuf.ByteString value) {
2017         if (value == null) {
2018     throw new NullPointerException();
2019   }
2020   bitField0_ |= 0x00000004;
2021         data_ = value;
2022         onChanged();
2023         return this;
2024       }
2025       /**
2026        * <code>optional bytes data = 3;</code>
2027        */
2028       public Builder clearData() {
2029         bitField0_ = (bitField0_ & ~0x00000004);
2030         data_ = getDefaultInstance().getData();
2031         onChanged();
2032         return this;
2033       }
2034
2035       // @@protoc_insertion_point(builder_scope:openxc.RawMessage)
2036     }
2037
2038     static {
2039       defaultInstance = new RawMessage(true);
2040       defaultInstance.initFields();
2041     }
2042
2043     // @@protoc_insertion_point(class_scope:openxc.RawMessage)
2044   }
2045
2046   public interface ControlCommandOrBuilder
2047       extends com.google.protobuf.MessageOrBuilder {
2048
2049     // optional .openxc.ControlCommand.Type type = 1;
2050     /**
2051      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2052      */
2053     boolean hasType();
2054     /**
2055      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2056      */
2057     com.openxc.BinaryMessages.ControlCommand.Type getType();
2058
2059     // optional .openxc.DiagnosticControlCommand diagnostic_request = 2;
2060     /**
2061      * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2062      */
2063     boolean hasDiagnosticRequest();
2064     /**
2065      * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2066      */
2067     com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest();
2068     /**
2069      * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2070      */
2071     com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder();
2072
2073     // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;
2074     /**
2075      * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2076      */
2077     boolean hasPassthroughModeRequest();
2078     /**
2079      * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2080      */
2081     com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest();
2082     /**
2083      * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2084      */
2085     com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder();
2086   }
2087   /**
2088    * Protobuf type {@code openxc.ControlCommand}
2089    */
2090   public static final class ControlCommand extends
2091       com.google.protobuf.GeneratedMessage
2092       implements ControlCommandOrBuilder {
2093     // Use ControlCommand.newBuilder() to construct.
2094     private ControlCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2095       super(builder);
2096       this.unknownFields = builder.getUnknownFields();
2097     }
2098     private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2099
2100     private static final ControlCommand defaultInstance;
2101     public static ControlCommand getDefaultInstance() {
2102       return defaultInstance;
2103     }
2104
2105     public ControlCommand getDefaultInstanceForType() {
2106       return defaultInstance;
2107     }
2108
2109     private final com.google.protobuf.UnknownFieldSet unknownFields;
2110     @java.lang.Override
2111     public final com.google.protobuf.UnknownFieldSet
2112         getUnknownFields() {
2113       return this.unknownFields;
2114     }
2115     private ControlCommand(
2116         com.google.protobuf.CodedInputStream input,
2117         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2118         throws com.google.protobuf.InvalidProtocolBufferException {
2119       initFields();
2120       int mutable_bitField0_ = 0;
2121       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2122           com.google.protobuf.UnknownFieldSet.newBuilder();
2123       try {
2124         boolean done = false;
2125         while (!done) {
2126           int tag = input.readTag();
2127           switch (tag) {
2128             case 0:
2129               done = true;
2130               break;
2131             default: {
2132               if (!parseUnknownField(input, unknownFields,
2133                                      extensionRegistry, tag)) {
2134                 done = true;
2135               }
2136               break;
2137             }
2138             case 8: {
2139               int rawValue = input.readEnum();
2140               com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue);
2141               if (value == null) {
2142                 unknownFields.mergeVarintField(1, rawValue);
2143               } else {
2144                 bitField0_ |= 0x00000001;
2145                 type_ = value;
2146               }
2147               break;
2148             }
2149             case 18: {
2150               com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = null;
2151               if (((bitField0_ & 0x00000002) == 0x00000002)) {
2152                 subBuilder = diagnosticRequest_.toBuilder();
2153               }
2154               diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticControlCommand.PARSER, extensionRegistry);
2155               if (subBuilder != null) {
2156                 subBuilder.mergeFrom(diagnosticRequest_);
2157                 diagnosticRequest_ = subBuilder.buildPartial();
2158               }
2159               bitField0_ |= 0x00000002;
2160               break;
2161             }
2162             case 26: {
2163               com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = null;
2164               if (((bitField0_ & 0x00000004) == 0x00000004)) {
2165                 subBuilder = passthroughModeRequest_.toBuilder();
2166               }
2167               passthroughModeRequest_ = input.readMessage(com.openxc.BinaryMessages.PassthroughModeControlCommand.PARSER, extensionRegistry);
2168               if (subBuilder != null) {
2169                 subBuilder.mergeFrom(passthroughModeRequest_);
2170                 passthroughModeRequest_ = subBuilder.buildPartial();
2171               }
2172               bitField0_ |= 0x00000004;
2173               break;
2174             }
2175           }
2176         }
2177       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2178         throw e.setUnfinishedMessage(this);
2179       } catch (java.io.IOException e) {
2180         throw new com.google.protobuf.InvalidProtocolBufferException(
2181             e.getMessage()).setUnfinishedMessage(this);
2182       } finally {
2183         this.unknownFields = unknownFields.build();
2184         makeExtensionsImmutable();
2185       }
2186     }
2187     public static final com.google.protobuf.Descriptors.Descriptor
2188         getDescriptor() {
2189       return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2190     }
2191
2192     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2193         internalGetFieldAccessorTable() {
2194       return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
2195           .ensureFieldAccessorsInitialized(
2196               com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
2197     }
2198
2199     public static com.google.protobuf.Parser<ControlCommand> PARSER =
2200         new com.google.protobuf.AbstractParser<ControlCommand>() {
2201       public ControlCommand parsePartialFrom(
2202           com.google.protobuf.CodedInputStream input,
2203           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2204           throws com.google.protobuf.InvalidProtocolBufferException {
2205         return new ControlCommand(input, extensionRegistry);
2206       }
2207     };
2208
2209     @java.lang.Override
2210     public com.google.protobuf.Parser<ControlCommand> getParserForType() {
2211       return PARSER;
2212     }
2213
2214     /**
2215      * Protobuf enum {@code openxc.ControlCommand.Type}
2216      */
2217     public enum Type
2218         implements com.google.protobuf.ProtocolMessageEnum {
2219       /**
2220        * <code>VERSION = 1;</code>
2221        */
2222       VERSION(0, 1),
2223       /**
2224        * <code>DEVICE_ID = 2;</code>
2225        */
2226       DEVICE_ID(1, 2),
2227       /**
2228        * <code>DIAGNOSTIC = 3;</code>
2229        */
2230       DIAGNOSTIC(2, 3),
2231       /**
2232        * <code>PASSTHROUGH = 4;</code>
2233        */
2234       PASSTHROUGH(3, 4),
2235       ;
2236
2237       /**
2238        * <code>VERSION = 1;</code>
2239        */
2240       public static final int VERSION_VALUE = 1;
2241       /**
2242        * <code>DEVICE_ID = 2;</code>
2243        */
2244       public static final int DEVICE_ID_VALUE = 2;
2245       /**
2246        * <code>DIAGNOSTIC = 3;</code>
2247        */
2248       public static final int DIAGNOSTIC_VALUE = 3;
2249       /**
2250        * <code>PASSTHROUGH = 4;</code>
2251        */
2252       public static final int PASSTHROUGH_VALUE = 4;
2253
2254
2255       public final int getNumber() { return value; }
2256
2257       public static Type valueOf(int value) {
2258         switch (value) {
2259           case 1: return VERSION;
2260           case 2: return DEVICE_ID;
2261           case 3: return DIAGNOSTIC;
2262           case 4: return PASSTHROUGH;
2263           default: return null;
2264         }
2265       }
2266
2267       public static com.google.protobuf.Internal.EnumLiteMap<Type>
2268           internalGetValueMap() {
2269         return internalValueMap;
2270       }
2271       private static com.google.protobuf.Internal.EnumLiteMap<Type>
2272           internalValueMap =
2273             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
2274               public Type findValueByNumber(int number) {
2275                 return Type.valueOf(number);
2276               }
2277             };
2278
2279       public final com.google.protobuf.Descriptors.EnumValueDescriptor
2280           getValueDescriptor() {
2281         return getDescriptor().getValues().get(index);
2282       }
2283       public final com.google.protobuf.Descriptors.EnumDescriptor
2284           getDescriptorForType() {
2285         return getDescriptor();
2286       }
2287       public static final com.google.protobuf.Descriptors.EnumDescriptor
2288           getDescriptor() {
2289         return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0);
2290       }
2291
2292       private static final Type[] VALUES = values();
2293
2294       public static Type valueOf(
2295           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
2296         if (desc.getType() != getDescriptor()) {
2297           throw new java.lang.IllegalArgumentException(
2298             "EnumValueDescriptor is not for this type.");
2299         }
2300         return VALUES[desc.getIndex()];
2301       }
2302
2303       private final int index;
2304       private final int value;
2305
2306       private Type(int index, int value) {
2307         this.index = index;
2308         this.value = value;
2309       }
2310
2311       // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type)
2312     }
2313
2314     private int bitField0_;
2315     // optional .openxc.ControlCommand.Type type = 1;
2316     public static final int TYPE_FIELD_NUMBER = 1;
2317     private com.openxc.BinaryMessages.ControlCommand.Type type_;
2318     /**
2319      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2320      */
2321     public boolean hasType() {
2322       return ((bitField0_ & 0x00000001) == 0x00000001);
2323     }
2324     /**
2325      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2326      */
2327     public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2328       return type_;
2329     }
2330
2331     // optional .openxc.DiagnosticControlCommand diagnostic_request = 2;
2332     public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2;
2333     private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_;
2334     /**
2335      * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2336      */
2337     public boolean hasDiagnosticRequest() {
2338       return ((bitField0_ & 0x00000002) == 0x00000002);
2339     }
2340     /**
2341      * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2342      */
2343     public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() {
2344       return diagnosticRequest_;
2345     }
2346     /**
2347      * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2348      */
2349     public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() {
2350       return diagnosticRequest_;
2351     }
2352
2353     // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;
2354     public static final int PASSTHROUGH_MODE_REQUEST_FIELD_NUMBER = 3;
2355     private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_;
2356     /**
2357      * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2358      */
2359     public boolean hasPassthroughModeRequest() {
2360       return ((bitField0_ & 0x00000004) == 0x00000004);
2361     }
2362     /**
2363      * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2364      */
2365     public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() {
2366       return passthroughModeRequest_;
2367     }
2368     /**
2369      * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2370      */
2371     public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() {
2372       return passthroughModeRequest_;
2373     }
2374
2375     private void initFields() {
2376       type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2377       diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance();
2378       passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance();
2379     }
2380     private byte memoizedIsInitialized = -1;
2381     public final boolean isInitialized() {
2382       byte isInitialized = memoizedIsInitialized;
2383       if (isInitialized != -1) return isInitialized == 1;
2384
2385       memoizedIsInitialized = 1;
2386       return true;
2387     }
2388
2389     public void writeTo(com.google.protobuf.CodedOutputStream output)
2390                         throws java.io.IOException {
2391       getSerializedSize();
2392       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2393         output.writeEnum(1, type_.getNumber());
2394       }
2395       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2396         output.writeMessage(2, diagnosticRequest_);
2397       }
2398       if (((bitField0_ & 0x00000004) == 0x00000004)) {
2399         output.writeMessage(3, passthroughModeRequest_);
2400       }
2401       getUnknownFields().writeTo(output);
2402     }
2403
2404     private int memoizedSerializedSize = -1;
2405     public int getSerializedSize() {
2406       int size = memoizedSerializedSize;
2407       if (size != -1) return size;
2408
2409       size = 0;
2410       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2411         size += com.google.protobuf.CodedOutputStream
2412           .computeEnumSize(1, type_.getNumber());
2413       }
2414       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2415         size += com.google.protobuf.CodedOutputStream
2416           .computeMessageSize(2, diagnosticRequest_);
2417       }
2418       if (((bitField0_ & 0x00000004) == 0x00000004)) {
2419         size += com.google.protobuf.CodedOutputStream
2420           .computeMessageSize(3, passthroughModeRequest_);
2421       }
2422       size += getUnknownFields().getSerializedSize();
2423       memoizedSerializedSize = size;
2424       return size;
2425     }
2426
2427     private static final long serialVersionUID = 0L;
2428     @java.lang.Override
2429     protected java.lang.Object writeReplace()
2430         throws java.io.ObjectStreamException {
2431       return super.writeReplace();
2432     }
2433
2434     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2435         com.google.protobuf.ByteString data)
2436         throws com.google.protobuf.InvalidProtocolBufferException {
2437       return PARSER.parseFrom(data);
2438     }
2439     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2440         com.google.protobuf.ByteString data,
2441         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2442         throws com.google.protobuf.InvalidProtocolBufferException {
2443       return PARSER.parseFrom(data, extensionRegistry);
2444     }
2445     public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data)
2446         throws com.google.protobuf.InvalidProtocolBufferException {
2447       return PARSER.parseFrom(data);
2448     }
2449     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2450         byte[] data,
2451         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2452         throws com.google.protobuf.InvalidProtocolBufferException {
2453       return PARSER.parseFrom(data, extensionRegistry);
2454     }
2455     public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input)
2456         throws java.io.IOException {
2457       return PARSER.parseFrom(input);
2458     }
2459     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2460         java.io.InputStream input,
2461         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2462         throws java.io.IOException {
2463       return PARSER.parseFrom(input, extensionRegistry);
2464     }
2465     public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input)
2466         throws java.io.IOException {
2467       return PARSER.parseDelimitedFrom(input);
2468     }
2469     public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(
2470         java.io.InputStream input,
2471         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2472         throws java.io.IOException {
2473       return PARSER.parseDelimitedFrom(input, extensionRegistry);
2474     }
2475     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2476         com.google.protobuf.CodedInputStream input)
2477         throws java.io.IOException {
2478       return PARSER.parseFrom(input);
2479     }
2480     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2481         com.google.protobuf.CodedInputStream input,
2482         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2483         throws java.io.IOException {
2484       return PARSER.parseFrom(input, extensionRegistry);
2485     }
2486
2487     public static Builder newBuilder() { return Builder.create(); }
2488     public Builder newBuilderForType() { return newBuilder(); }
2489     public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) {
2490       return newBuilder().mergeFrom(prototype);
2491     }
2492     public Builder toBuilder() { return newBuilder(this); }
2493
2494     @java.lang.Override
2495     protected Builder newBuilderForType(
2496         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2497       Builder builder = new Builder(parent);
2498       return builder;
2499     }
2500     /**
2501      * Protobuf type {@code openxc.ControlCommand}
2502      */
2503     public static final class Builder extends
2504         com.google.protobuf.GeneratedMessage.Builder<Builder>
2505        implements com.openxc.BinaryMessages.ControlCommandOrBuilder {
2506       public static final com.google.protobuf.Descriptors.Descriptor
2507           getDescriptor() {
2508         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2509       }
2510
2511       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2512           internalGetFieldAccessorTable() {
2513         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
2514             .ensureFieldAccessorsInitialized(
2515                 com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
2516       }
2517
2518       // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder()
2519       private Builder() {
2520         maybeForceBuilderInitialization();
2521       }
2522
2523       private Builder(
2524           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2525         super(parent);
2526         maybeForceBuilderInitialization();
2527       }
2528       private void maybeForceBuilderInitialization() {
2529         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2530           getDiagnosticRequestFieldBuilder();
2531           getPassthroughModeRequestFieldBuilder();
2532         }
2533       }
2534       private static Builder create() {
2535         return new Builder();
2536       }
2537
2538       public Builder clear() {
2539         super.clear();
2540         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2541         bitField0_ = (bitField0_ & ~0x00000001);
2542         if (diagnosticRequestBuilder_ == null) {
2543           diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance();
2544         } else {
2545           diagnosticRequestBuilder_.clear();
2546         }
2547         bitField0_ = (bitField0_ & ~0x00000002);
2548         if (passthroughModeRequestBuilder_ == null) {
2549           passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance();
2550         } else {
2551           passthroughModeRequestBuilder_.clear();
2552         }
2553         bitField0_ = (bitField0_ & ~0x00000004);
2554         return this;
2555       }
2556
2557       public Builder clone() {
2558         return create().mergeFrom(buildPartial());
2559       }
2560
2561       public com.google.protobuf.Descriptors.Descriptor
2562           getDescriptorForType() {
2563         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2564       }
2565
2566       public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() {
2567         return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
2568       }
2569
2570       public com.openxc.BinaryMessages.ControlCommand build() {
2571         com.openxc.BinaryMessages.ControlCommand result = buildPartial();
2572         if (!result.isInitialized()) {
2573           throw newUninitializedMessageException(result);
2574         }
2575         return result;
2576       }
2577
2578       public com.openxc.BinaryMessages.ControlCommand buildPartial() {
2579         com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this);
2580         int from_bitField0_ = bitField0_;
2581         int to_bitField0_ = 0;
2582         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2583           to_bitField0_ |= 0x00000001;
2584         }
2585         result.type_ = type_;
2586         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2587           to_bitField0_ |= 0x00000002;
2588         }
2589         if (diagnosticRequestBuilder_ == null) {
2590           result.diagnosticRequest_ = diagnosticRequest_;
2591         } else {
2592           result.diagnosticRequest_ = diagnosticRequestBuilder_.build();
2593         }
2594         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
2595           to_bitField0_ |= 0x00000004;
2596         }
2597         if (passthroughModeRequestBuilder_ == null) {
2598           result.passthroughModeRequest_ = passthroughModeRequest_;
2599         } else {
2600           result.passthroughModeRequest_ = passthroughModeRequestBuilder_.build();
2601         }
2602         result.bitField0_ = to_bitField0_;
2603         onBuilt();
2604         return result;
2605       }
2606
2607       public Builder mergeFrom(com.google.protobuf.Message other) {
2608         if (other instanceof com.openxc.BinaryMessages.ControlCommand) {
2609           return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other);
2610         } else {
2611           super.mergeFrom(other);
2612           return this;
2613         }
2614       }
2615
2616       public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) {
2617         if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this;
2618         if (other.hasType()) {
2619           setType(other.getType());
2620         }
2621         if (other.hasDiagnosticRequest()) {
2622           mergeDiagnosticRequest(other.getDiagnosticRequest());
2623         }
2624         if (other.hasPassthroughModeRequest()) {
2625           mergePassthroughModeRequest(other.getPassthroughModeRequest());
2626         }
2627         this.mergeUnknownFields(other.getUnknownFields());
2628         return this;
2629       }
2630
2631       public final boolean isInitialized() {
2632         return true;
2633       }
2634
2635       public Builder mergeFrom(
2636           com.google.protobuf.CodedInputStream input,
2637           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2638           throws java.io.IOException {
2639         com.openxc.BinaryMessages.ControlCommand parsedMessage = null;
2640         try {
2641           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2642         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2643           parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage();
2644           throw e;
2645         } finally {
2646           if (parsedMessage != null) {
2647             mergeFrom(parsedMessage);
2648           }
2649         }
2650         return this;
2651       }
2652       private int bitField0_;
2653
2654       // optional .openxc.ControlCommand.Type type = 1;
2655       private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2656       /**
2657        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2658        */
2659       public boolean hasType() {
2660         return ((bitField0_ & 0x00000001) == 0x00000001);
2661       }
2662       /**
2663        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2664        */
2665       public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2666         return type_;
2667       }
2668       /**
2669        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2670        */
2671       public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
2672         if (value == null) {
2673           throw new NullPointerException();
2674         }
2675         bitField0_ |= 0x00000001;
2676         type_ = value;
2677         onChanged();
2678         return this;
2679       }
2680       /**
2681        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2682        */
2683       public Builder clearType() {
2684         bitField0_ = (bitField0_ & ~0x00000001);
2685         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2686         onChanged();
2687         return this;
2688       }
2689
2690       // optional .openxc.DiagnosticControlCommand diagnostic_request = 2;
2691       private com.openxc.BinaryMessages.DiagnosticControlCommand diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance();
2692       private com.google.protobuf.SingleFieldBuilder<
2693           com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> diagnosticRequestBuilder_;
2694       /**
2695        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2696        */
2697       public boolean hasDiagnosticRequest() {
2698         return ((bitField0_ & 0x00000002) == 0x00000002);
2699       }
2700       /**
2701        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2702        */
2703       public com.openxc.BinaryMessages.DiagnosticControlCommand getDiagnosticRequest() {
2704         if (diagnosticRequestBuilder_ == null) {
2705           return diagnosticRequest_;
2706         } else {
2707           return diagnosticRequestBuilder_.getMessage();
2708         }
2709       }
2710       /**
2711        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2712        */
2713       public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) {
2714         if (diagnosticRequestBuilder_ == null) {
2715           if (value == null) {
2716             throw new NullPointerException();
2717           }
2718           diagnosticRequest_ = value;
2719           onChanged();
2720         } else {
2721           diagnosticRequestBuilder_.setMessage(value);
2722         }
2723         bitField0_ |= 0x00000002;
2724         return this;
2725       }
2726       /**
2727        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2728        */
2729       public Builder setDiagnosticRequest(
2730           com.openxc.BinaryMessages.DiagnosticControlCommand.Builder builderForValue) {
2731         if (diagnosticRequestBuilder_ == null) {
2732           diagnosticRequest_ = builderForValue.build();
2733           onChanged();
2734         } else {
2735           diagnosticRequestBuilder_.setMessage(builderForValue.build());
2736         }
2737         bitField0_ |= 0x00000002;
2738         return this;
2739       }
2740       /**
2741        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2742        */
2743       public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticControlCommand value) {
2744         if (diagnosticRequestBuilder_ == null) {
2745           if (((bitField0_ & 0x00000002) == 0x00000002) &&
2746               diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) {
2747             diagnosticRequest_ =
2748               com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial();
2749           } else {
2750             diagnosticRequest_ = value;
2751           }
2752           onChanged();
2753         } else {
2754           diagnosticRequestBuilder_.mergeFrom(value);
2755         }
2756         bitField0_ |= 0x00000002;
2757         return this;
2758       }
2759       /**
2760        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2761        */
2762       public Builder clearDiagnosticRequest() {
2763         if (diagnosticRequestBuilder_ == null) {
2764           diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance();
2765           onChanged();
2766         } else {
2767           diagnosticRequestBuilder_.clear();
2768         }
2769         bitField0_ = (bitField0_ & ~0x00000002);
2770         return this;
2771       }
2772       /**
2773        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2774        */
2775       public com.openxc.BinaryMessages.DiagnosticControlCommand.Builder getDiagnosticRequestBuilder() {
2776         bitField0_ |= 0x00000002;
2777         onChanged();
2778         return getDiagnosticRequestFieldBuilder().getBuilder();
2779       }
2780       /**
2781        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2782        */
2783       public com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder getDiagnosticRequestOrBuilder() {
2784         if (diagnosticRequestBuilder_ != null) {
2785           return diagnosticRequestBuilder_.getMessageOrBuilder();
2786         } else {
2787           return diagnosticRequest_;
2788         }
2789       }
2790       /**
2791        * <code>optional .openxc.DiagnosticControlCommand diagnostic_request = 2;</code>
2792        */
2793       private com.google.protobuf.SingleFieldBuilder<
2794           com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder> 
2795           getDiagnosticRequestFieldBuilder() {
2796         if (diagnosticRequestBuilder_ == null) {
2797           diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2798               com.openxc.BinaryMessages.DiagnosticControlCommand, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder, com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder>(
2799                   diagnosticRequest_,
2800                   getParentForChildren(),
2801                   isClean());
2802           diagnosticRequest_ = null;
2803         }
2804         return diagnosticRequestBuilder_;
2805       }
2806
2807       // optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;
2808       private com.openxc.BinaryMessages.PassthroughModeControlCommand passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance();
2809       private com.google.protobuf.SingleFieldBuilder<
2810           com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> passthroughModeRequestBuilder_;
2811       /**
2812        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2813        */
2814       public boolean hasPassthroughModeRequest() {
2815         return ((bitField0_ & 0x00000004) == 0x00000004);
2816       }
2817       /**
2818        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2819        */
2820       public com.openxc.BinaryMessages.PassthroughModeControlCommand getPassthroughModeRequest() {
2821         if (passthroughModeRequestBuilder_ == null) {
2822           return passthroughModeRequest_;
2823         } else {
2824           return passthroughModeRequestBuilder_.getMessage();
2825         }
2826       }
2827       /**
2828        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2829        */
2830       public Builder setPassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) {
2831         if (passthroughModeRequestBuilder_ == null) {
2832           if (value == null) {
2833             throw new NullPointerException();
2834           }
2835           passthroughModeRequest_ = value;
2836           onChanged();
2837         } else {
2838           passthroughModeRequestBuilder_.setMessage(value);
2839         }
2840         bitField0_ |= 0x00000004;
2841         return this;
2842       }
2843       /**
2844        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2845        */
2846       public Builder setPassthroughModeRequest(
2847           com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder builderForValue) {
2848         if (passthroughModeRequestBuilder_ == null) {
2849           passthroughModeRequest_ = builderForValue.build();
2850           onChanged();
2851         } else {
2852           passthroughModeRequestBuilder_.setMessage(builderForValue.build());
2853         }
2854         bitField0_ |= 0x00000004;
2855         return this;
2856       }
2857       /**
2858        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2859        */
2860       public Builder mergePassthroughModeRequest(com.openxc.BinaryMessages.PassthroughModeControlCommand value) {
2861         if (passthroughModeRequestBuilder_ == null) {
2862           if (((bitField0_ & 0x00000004) == 0x00000004) &&
2863               passthroughModeRequest_ != com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) {
2864             passthroughModeRequest_ =
2865               com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder(passthroughModeRequest_).mergeFrom(value).buildPartial();
2866           } else {
2867             passthroughModeRequest_ = value;
2868           }
2869           onChanged();
2870         } else {
2871           passthroughModeRequestBuilder_.mergeFrom(value);
2872         }
2873         bitField0_ |= 0x00000004;
2874         return this;
2875       }
2876       /**
2877        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2878        */
2879       public Builder clearPassthroughModeRequest() {
2880         if (passthroughModeRequestBuilder_ == null) {
2881           passthroughModeRequest_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance();
2882           onChanged();
2883         } else {
2884           passthroughModeRequestBuilder_.clear();
2885         }
2886         bitField0_ = (bitField0_ & ~0x00000004);
2887         return this;
2888       }
2889       /**
2890        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2891        */
2892       public com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder getPassthroughModeRequestBuilder() {
2893         bitField0_ |= 0x00000004;
2894         onChanged();
2895         return getPassthroughModeRequestFieldBuilder().getBuilder();
2896       }
2897       /**
2898        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2899        */
2900       public com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder getPassthroughModeRequestOrBuilder() {
2901         if (passthroughModeRequestBuilder_ != null) {
2902           return passthroughModeRequestBuilder_.getMessageOrBuilder();
2903         } else {
2904           return passthroughModeRequest_;
2905         }
2906       }
2907       /**
2908        * <code>optional .openxc.PassthroughModeControlCommand passthrough_mode_request = 3;</code>
2909        */
2910       private com.google.protobuf.SingleFieldBuilder<
2911           com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder> 
2912           getPassthroughModeRequestFieldBuilder() {
2913         if (passthroughModeRequestBuilder_ == null) {
2914           passthroughModeRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2915               com.openxc.BinaryMessages.PassthroughModeControlCommand, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder, com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder>(
2916                   passthroughModeRequest_,
2917                   getParentForChildren(),
2918                   isClean());
2919           passthroughModeRequest_ = null;
2920         }
2921         return passthroughModeRequestBuilder_;
2922       }
2923
2924       // @@protoc_insertion_point(builder_scope:openxc.ControlCommand)
2925     }
2926
2927     static {
2928       defaultInstance = new ControlCommand(true);
2929       defaultInstance.initFields();
2930     }
2931
2932     // @@protoc_insertion_point(class_scope:openxc.ControlCommand)
2933   }
2934
2935   public interface DiagnosticControlCommandOrBuilder
2936       extends com.google.protobuf.MessageOrBuilder {
2937
2938     // optional .openxc.DiagnosticRequest request = 1;
2939     /**
2940      * <code>optional .openxc.DiagnosticRequest request = 1;</code>
2941      */
2942     boolean hasRequest();
2943     /**
2944      * <code>optional .openxc.DiagnosticRequest request = 1;</code>
2945      */
2946     com.openxc.BinaryMessages.DiagnosticRequest getRequest();
2947     /**
2948      * <code>optional .openxc.DiagnosticRequest request = 1;</code>
2949      */
2950     com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder();
2951
2952     // optional .openxc.DiagnosticControlCommand.Action action = 2;
2953     /**
2954      * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
2955      */
2956     boolean hasAction();
2957     /**
2958      * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
2959      */
2960     com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction();
2961   }
2962   /**
2963    * Protobuf type {@code openxc.DiagnosticControlCommand}
2964    */
2965   public static final class DiagnosticControlCommand extends
2966       com.google.protobuf.GeneratedMessage
2967       implements DiagnosticControlCommandOrBuilder {
2968     // Use DiagnosticControlCommand.newBuilder() to construct.
2969     private DiagnosticControlCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2970       super(builder);
2971       this.unknownFields = builder.getUnknownFields();
2972     }
2973     private DiagnosticControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2974
2975     private static final DiagnosticControlCommand defaultInstance;
2976     public static DiagnosticControlCommand getDefaultInstance() {
2977       return defaultInstance;
2978     }
2979
2980     public DiagnosticControlCommand getDefaultInstanceForType() {
2981       return defaultInstance;
2982     }
2983
2984     private final com.google.protobuf.UnknownFieldSet unknownFields;
2985     @java.lang.Override
2986     public final com.google.protobuf.UnknownFieldSet
2987         getUnknownFields() {
2988       return this.unknownFields;
2989     }
2990     private DiagnosticControlCommand(
2991         com.google.protobuf.CodedInputStream input,
2992         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2993         throws com.google.protobuf.InvalidProtocolBufferException {
2994       initFields();
2995       int mutable_bitField0_ = 0;
2996       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2997           com.google.protobuf.UnknownFieldSet.newBuilder();
2998       try {
2999         boolean done = false;
3000         while (!done) {
3001           int tag = input.readTag();
3002           switch (tag) {
3003             case 0:
3004               done = true;
3005               break;
3006             default: {
3007               if (!parseUnknownField(input, unknownFields,
3008                                      extensionRegistry, tag)) {
3009                 done = true;
3010               }
3011               break;
3012             }
3013             case 10: {
3014               com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null;
3015               if (((bitField0_ & 0x00000001) == 0x00000001)) {
3016                 subBuilder = request_.toBuilder();
3017               }
3018               request_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry);
3019               if (subBuilder != null) {
3020                 subBuilder.mergeFrom(request_);
3021                 request_ = subBuilder.buildPartial();
3022               }
3023               bitField0_ |= 0x00000001;
3024               break;
3025             }
3026             case 16: {
3027               int rawValue = input.readEnum();
3028               com.openxc.BinaryMessages.DiagnosticControlCommand.Action value = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.valueOf(rawValue);
3029               if (value == null) {
3030                 unknownFields.mergeVarintField(2, rawValue);
3031               } else {
3032                 bitField0_ |= 0x00000002;
3033                 action_ = value;
3034               }
3035               break;
3036             }
3037           }
3038         }
3039       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3040         throw e.setUnfinishedMessage(this);
3041       } catch (java.io.IOException e) {
3042         throw new com.google.protobuf.InvalidProtocolBufferException(
3043             e.getMessage()).setUnfinishedMessage(this);
3044       } finally {
3045         this.unknownFields = unknownFields.build();
3046         makeExtensionsImmutable();
3047       }
3048     }
3049     public static final com.google.protobuf.Descriptors.Descriptor
3050         getDescriptor() {
3051       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor;
3052     }
3053
3054     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3055         internalGetFieldAccessorTable() {
3056       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable
3057           .ensureFieldAccessorsInitialized(
3058               com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class);
3059     }
3060
3061     public static com.google.protobuf.Parser<DiagnosticControlCommand> PARSER =
3062         new com.google.protobuf.AbstractParser<DiagnosticControlCommand>() {
3063       public DiagnosticControlCommand parsePartialFrom(
3064           com.google.protobuf.CodedInputStream input,
3065           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3066           throws com.google.protobuf.InvalidProtocolBufferException {
3067         return new DiagnosticControlCommand(input, extensionRegistry);
3068       }
3069     };
3070
3071     @java.lang.Override
3072     public com.google.protobuf.Parser<DiagnosticControlCommand> getParserForType() {
3073       return PARSER;
3074     }
3075
3076     /**
3077      * Protobuf enum {@code openxc.DiagnosticControlCommand.Action}
3078      */
3079     public enum Action
3080         implements com.google.protobuf.ProtocolMessageEnum {
3081       /**
3082        * <code>ADD = 1;</code>
3083        */
3084       ADD(0, 1),
3085       /**
3086        * <code>CANCEL = 2;</code>
3087        */
3088       CANCEL(1, 2),
3089       ;
3090
3091       /**
3092        * <code>ADD = 1;</code>
3093        */
3094       public static final int ADD_VALUE = 1;
3095       /**
3096        * <code>CANCEL = 2;</code>
3097        */
3098       public static final int CANCEL_VALUE = 2;
3099
3100
3101       public final int getNumber() { return value; }
3102
3103       public static Action valueOf(int value) {
3104         switch (value) {
3105           case 1: return ADD;
3106           case 2: return CANCEL;
3107           default: return null;
3108         }
3109       }
3110
3111       public static com.google.protobuf.Internal.EnumLiteMap<Action>
3112           internalGetValueMap() {
3113         return internalValueMap;
3114       }
3115       private static com.google.protobuf.Internal.EnumLiteMap<Action>
3116           internalValueMap =
3117             new com.google.protobuf.Internal.EnumLiteMap<Action>() {
3118               public Action findValueByNumber(int number) {
3119                 return Action.valueOf(number);
3120               }
3121             };
3122
3123       public final com.google.protobuf.Descriptors.EnumValueDescriptor
3124           getValueDescriptor() {
3125         return getDescriptor().getValues().get(index);
3126       }
3127       public final com.google.protobuf.Descriptors.EnumDescriptor
3128           getDescriptorForType() {
3129         return getDescriptor();
3130       }
3131       public static final com.google.protobuf.Descriptors.EnumDescriptor
3132           getDescriptor() {
3133         return com.openxc.BinaryMessages.DiagnosticControlCommand.getDescriptor().getEnumTypes().get(0);
3134       }
3135
3136       private static final Action[] VALUES = values();
3137
3138       public static Action valueOf(
3139           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
3140         if (desc.getType() != getDescriptor()) {
3141           throw new java.lang.IllegalArgumentException(
3142             "EnumValueDescriptor is not for this type.");
3143         }
3144         return VALUES[desc.getIndex()];
3145       }
3146
3147       private final int index;
3148       private final int value;
3149
3150       private Action(int index, int value) {
3151         this.index = index;
3152         this.value = value;
3153       }
3154
3155       // @@protoc_insertion_point(enum_scope:openxc.DiagnosticControlCommand.Action)
3156     }
3157
3158     private int bitField0_;
3159     // optional .openxc.DiagnosticRequest request = 1;
3160     public static final int REQUEST_FIELD_NUMBER = 1;
3161     private com.openxc.BinaryMessages.DiagnosticRequest request_;
3162     /**
3163      * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3164      */
3165     public boolean hasRequest() {
3166       return ((bitField0_ & 0x00000001) == 0x00000001);
3167     }
3168     /**
3169      * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3170      */
3171     public com.openxc.BinaryMessages.DiagnosticRequest getRequest() {
3172       return request_;
3173     }
3174     /**
3175      * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3176      */
3177     public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() {
3178       return request_;
3179     }
3180
3181     // optional .openxc.DiagnosticControlCommand.Action action = 2;
3182     public static final int ACTION_FIELD_NUMBER = 2;
3183     private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_;
3184     /**
3185      * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
3186      */
3187     public boolean hasAction() {
3188       return ((bitField0_ & 0x00000002) == 0x00000002);
3189     }
3190     /**
3191      * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
3192      */
3193     public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() {
3194       return action_;
3195     }
3196
3197     private void initFields() {
3198       request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
3199       action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD;
3200     }
3201     private byte memoizedIsInitialized = -1;
3202     public final boolean isInitialized() {
3203       byte isInitialized = memoizedIsInitialized;
3204       if (isInitialized != -1) return isInitialized == 1;
3205
3206       memoizedIsInitialized = 1;
3207       return true;
3208     }
3209
3210     public void writeTo(com.google.protobuf.CodedOutputStream output)
3211                         throws java.io.IOException {
3212       getSerializedSize();
3213       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3214         output.writeMessage(1, request_);
3215       }
3216       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3217         output.writeEnum(2, action_.getNumber());
3218       }
3219       getUnknownFields().writeTo(output);
3220     }
3221
3222     private int memoizedSerializedSize = -1;
3223     public int getSerializedSize() {
3224       int size = memoizedSerializedSize;
3225       if (size != -1) return size;
3226
3227       size = 0;
3228       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3229         size += com.google.protobuf.CodedOutputStream
3230           .computeMessageSize(1, request_);
3231       }
3232       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3233         size += com.google.protobuf.CodedOutputStream
3234           .computeEnumSize(2, action_.getNumber());
3235       }
3236       size += getUnknownFields().getSerializedSize();
3237       memoizedSerializedSize = size;
3238       return size;
3239     }
3240
3241     private static final long serialVersionUID = 0L;
3242     @java.lang.Override
3243     protected java.lang.Object writeReplace()
3244         throws java.io.ObjectStreamException {
3245       return super.writeReplace();
3246     }
3247
3248     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(
3249         com.google.protobuf.ByteString data)
3250         throws com.google.protobuf.InvalidProtocolBufferException {
3251       return PARSER.parseFrom(data);
3252     }
3253     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(
3254         com.google.protobuf.ByteString data,
3255         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3256         throws com.google.protobuf.InvalidProtocolBufferException {
3257       return PARSER.parseFrom(data, extensionRegistry);
3258     }
3259     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(byte[] data)
3260         throws com.google.protobuf.InvalidProtocolBufferException {
3261       return PARSER.parseFrom(data);
3262     }
3263     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(
3264         byte[] data,
3265         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3266         throws com.google.protobuf.InvalidProtocolBufferException {
3267       return PARSER.parseFrom(data, extensionRegistry);
3268     }
3269     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(java.io.InputStream input)
3270         throws java.io.IOException {
3271       return PARSER.parseFrom(input);
3272     }
3273     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(
3274         java.io.InputStream input,
3275         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3276         throws java.io.IOException {
3277       return PARSER.parseFrom(input, extensionRegistry);
3278     }
3279     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom(java.io.InputStream input)
3280         throws java.io.IOException {
3281       return PARSER.parseDelimitedFrom(input);
3282     }
3283     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseDelimitedFrom(
3284         java.io.InputStream input,
3285         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3286         throws java.io.IOException {
3287       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3288     }
3289     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(
3290         com.google.protobuf.CodedInputStream input)
3291         throws java.io.IOException {
3292       return PARSER.parseFrom(input);
3293     }
3294     public static com.openxc.BinaryMessages.DiagnosticControlCommand parseFrom(
3295         com.google.protobuf.CodedInputStream input,
3296         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3297         throws java.io.IOException {
3298       return PARSER.parseFrom(input, extensionRegistry);
3299     }
3300
3301     public static Builder newBuilder() { return Builder.create(); }
3302     public Builder newBuilderForType() { return newBuilder(); }
3303     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticControlCommand prototype) {
3304       return newBuilder().mergeFrom(prototype);
3305     }
3306     public Builder toBuilder() { return newBuilder(this); }
3307
3308     @java.lang.Override
3309     protected Builder newBuilderForType(
3310         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3311       Builder builder = new Builder(parent);
3312       return builder;
3313     }
3314     /**
3315      * Protobuf type {@code openxc.DiagnosticControlCommand}
3316      */
3317     public static final class Builder extends
3318         com.google.protobuf.GeneratedMessage.Builder<Builder>
3319        implements com.openxc.BinaryMessages.DiagnosticControlCommandOrBuilder {
3320       public static final com.google.protobuf.Descriptors.Descriptor
3321           getDescriptor() {
3322         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor;
3323       }
3324
3325       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3326           internalGetFieldAccessorTable() {
3327         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable
3328             .ensureFieldAccessorsInitialized(
3329                 com.openxc.BinaryMessages.DiagnosticControlCommand.class, com.openxc.BinaryMessages.DiagnosticControlCommand.Builder.class);
3330       }
3331
3332       // Construct using com.openxc.BinaryMessages.DiagnosticControlCommand.newBuilder()
3333       private Builder() {
3334         maybeForceBuilderInitialization();
3335       }
3336
3337       private Builder(
3338           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3339         super(parent);
3340         maybeForceBuilderInitialization();
3341       }
3342       private void maybeForceBuilderInitialization() {
3343         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3344           getRequestFieldBuilder();
3345         }
3346       }
3347       private static Builder create() {
3348         return new Builder();
3349       }
3350
3351       public Builder clear() {
3352         super.clear();
3353         if (requestBuilder_ == null) {
3354           request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
3355         } else {
3356           requestBuilder_.clear();
3357         }
3358         bitField0_ = (bitField0_ & ~0x00000001);
3359         action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD;
3360         bitField0_ = (bitField0_ & ~0x00000002);
3361         return this;
3362       }
3363
3364       public Builder clone() {
3365         return create().mergeFrom(buildPartial());
3366       }
3367
3368       public com.google.protobuf.Descriptors.Descriptor
3369           getDescriptorForType() {
3370         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticControlCommand_descriptor;
3371       }
3372
3373       public com.openxc.BinaryMessages.DiagnosticControlCommand getDefaultInstanceForType() {
3374         return com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance();
3375       }
3376
3377       public com.openxc.BinaryMessages.DiagnosticControlCommand build() {
3378         com.openxc.BinaryMessages.DiagnosticControlCommand result = buildPartial();
3379         if (!result.isInitialized()) {
3380           throw newUninitializedMessageException(result);
3381         }
3382         return result;
3383       }
3384
3385       public com.openxc.BinaryMessages.DiagnosticControlCommand buildPartial() {
3386         com.openxc.BinaryMessages.DiagnosticControlCommand result = new com.openxc.BinaryMessages.DiagnosticControlCommand(this);
3387         int from_bitField0_ = bitField0_;
3388         int to_bitField0_ = 0;
3389         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3390           to_bitField0_ |= 0x00000001;
3391         }
3392         if (requestBuilder_ == null) {
3393           result.request_ = request_;
3394         } else {
3395           result.request_ = requestBuilder_.build();
3396         }
3397         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3398           to_bitField0_ |= 0x00000002;
3399         }
3400         result.action_ = action_;
3401         result.bitField0_ = to_bitField0_;
3402         onBuilt();
3403         return result;
3404       }
3405
3406       public Builder mergeFrom(com.google.protobuf.Message other) {
3407         if (other instanceof com.openxc.BinaryMessages.DiagnosticControlCommand) {
3408           return mergeFrom((com.openxc.BinaryMessages.DiagnosticControlCommand)other);
3409         } else {
3410           super.mergeFrom(other);
3411           return this;
3412         }
3413       }
3414
3415       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticControlCommand other) {
3416         if (other == com.openxc.BinaryMessages.DiagnosticControlCommand.getDefaultInstance()) return this;
3417         if (other.hasRequest()) {
3418           mergeRequest(other.getRequest());
3419         }
3420         if (other.hasAction()) {
3421           setAction(other.getAction());
3422         }
3423         this.mergeUnknownFields(other.getUnknownFields());
3424         return this;
3425       }
3426
3427       public final boolean isInitialized() {
3428         return true;
3429       }
3430
3431       public Builder mergeFrom(
3432           com.google.protobuf.CodedInputStream input,
3433           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3434           throws java.io.IOException {
3435         com.openxc.BinaryMessages.DiagnosticControlCommand parsedMessage = null;
3436         try {
3437           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3438         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3439           parsedMessage = (com.openxc.BinaryMessages.DiagnosticControlCommand) e.getUnfinishedMessage();
3440           throw e;
3441         } finally {
3442           if (parsedMessage != null) {
3443             mergeFrom(parsedMessage);
3444           }
3445         }
3446         return this;
3447       }
3448       private int bitField0_;
3449
3450       // optional .openxc.DiagnosticRequest request = 1;
3451       private com.openxc.BinaryMessages.DiagnosticRequest request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
3452       private com.google.protobuf.SingleFieldBuilder<
3453           com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> requestBuilder_;
3454       /**
3455        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3456        */
3457       public boolean hasRequest() {
3458         return ((bitField0_ & 0x00000001) == 0x00000001);
3459       }
3460       /**
3461        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3462        */
3463       public com.openxc.BinaryMessages.DiagnosticRequest getRequest() {
3464         if (requestBuilder_ == null) {
3465           return request_;
3466         } else {
3467           return requestBuilder_.getMessage();
3468         }
3469       }
3470       /**
3471        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3472        */
3473       public Builder setRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
3474         if (requestBuilder_ == null) {
3475           if (value == null) {
3476             throw new NullPointerException();
3477           }
3478           request_ = value;
3479           onChanged();
3480         } else {
3481           requestBuilder_.setMessage(value);
3482         }
3483         bitField0_ |= 0x00000001;
3484         return this;
3485       }
3486       /**
3487        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3488        */
3489       public Builder setRequest(
3490           com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) {
3491         if (requestBuilder_ == null) {
3492           request_ = builderForValue.build();
3493           onChanged();
3494         } else {
3495           requestBuilder_.setMessage(builderForValue.build());
3496         }
3497         bitField0_ |= 0x00000001;
3498         return this;
3499       }
3500       /**
3501        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3502        */
3503       public Builder mergeRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
3504         if (requestBuilder_ == null) {
3505           if (((bitField0_ & 0x00000001) == 0x00000001) &&
3506               request_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) {
3507             request_ =
3508               com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(request_).mergeFrom(value).buildPartial();
3509           } else {
3510             request_ = value;
3511           }
3512           onChanged();
3513         } else {
3514           requestBuilder_.mergeFrom(value);
3515         }
3516         bitField0_ |= 0x00000001;
3517         return this;
3518       }
3519       /**
3520        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3521        */
3522       public Builder clearRequest() {
3523         if (requestBuilder_ == null) {
3524           request_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
3525           onChanged();
3526         } else {
3527           requestBuilder_.clear();
3528         }
3529         bitField0_ = (bitField0_ & ~0x00000001);
3530         return this;
3531       }
3532       /**
3533        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3534        */
3535       public com.openxc.BinaryMessages.DiagnosticRequest.Builder getRequestBuilder() {
3536         bitField0_ |= 0x00000001;
3537         onChanged();
3538         return getRequestFieldBuilder().getBuilder();
3539       }
3540       /**
3541        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3542        */
3543       public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getRequestOrBuilder() {
3544         if (requestBuilder_ != null) {
3545           return requestBuilder_.getMessageOrBuilder();
3546         } else {
3547           return request_;
3548         }
3549       }
3550       /**
3551        * <code>optional .openxc.DiagnosticRequest request = 1;</code>
3552        */
3553       private com.google.protobuf.SingleFieldBuilder<
3554           com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> 
3555           getRequestFieldBuilder() {
3556         if (requestBuilder_ == null) {
3557           requestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
3558               com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>(
3559                   request_,
3560                   getParentForChildren(),
3561                   isClean());
3562           request_ = null;
3563         }
3564         return requestBuilder_;
3565       }
3566
3567       // optional .openxc.DiagnosticControlCommand.Action action = 2;
3568       private com.openxc.BinaryMessages.DiagnosticControlCommand.Action action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD;
3569       /**
3570        * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
3571        */
3572       public boolean hasAction() {
3573         return ((bitField0_ & 0x00000002) == 0x00000002);
3574       }
3575       /**
3576        * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
3577        */
3578       public com.openxc.BinaryMessages.DiagnosticControlCommand.Action getAction() {
3579         return action_;
3580       }
3581       /**
3582        * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
3583        */
3584       public Builder setAction(com.openxc.BinaryMessages.DiagnosticControlCommand.Action value) {
3585         if (value == null) {
3586           throw new NullPointerException();
3587         }
3588         bitField0_ |= 0x00000002;
3589         action_ = value;
3590         onChanged();
3591         return this;
3592       }
3593       /**
3594        * <code>optional .openxc.DiagnosticControlCommand.Action action = 2;</code>
3595        */
3596       public Builder clearAction() {
3597         bitField0_ = (bitField0_ & ~0x00000002);
3598         action_ = com.openxc.BinaryMessages.DiagnosticControlCommand.Action.ADD;
3599         onChanged();
3600         return this;
3601       }
3602
3603       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticControlCommand)
3604     }
3605
3606     static {
3607       defaultInstance = new DiagnosticControlCommand(true);
3608       defaultInstance.initFields();
3609     }
3610
3611     // @@protoc_insertion_point(class_scope:openxc.DiagnosticControlCommand)
3612   }
3613
3614   public interface PassthroughModeControlCommandOrBuilder
3615       extends com.google.protobuf.MessageOrBuilder {
3616
3617     // optional int32 bus = 1;
3618     /**
3619      * <code>optional int32 bus = 1;</code>
3620      */
3621     boolean hasBus();
3622     /**
3623      * <code>optional int32 bus = 1;</code>
3624      */
3625     int getBus();
3626
3627     // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;
3628     /**
3629      * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
3630      */
3631     boolean hasMode();
3632     /**
3633      * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
3634      */
3635     com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode();
3636   }
3637   /**
3638    * Protobuf type {@code openxc.PassthroughModeControlCommand}
3639    */
3640   public static final class PassthroughModeControlCommand extends
3641       com.google.protobuf.GeneratedMessage
3642       implements PassthroughModeControlCommandOrBuilder {
3643     // Use PassthroughModeControlCommand.newBuilder() to construct.
3644     private PassthroughModeControlCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3645       super(builder);
3646       this.unknownFields = builder.getUnknownFields();
3647     }
3648     private PassthroughModeControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3649
3650     private static final PassthroughModeControlCommand defaultInstance;
3651     public static PassthroughModeControlCommand getDefaultInstance() {
3652       return defaultInstance;
3653     }
3654
3655     public PassthroughModeControlCommand getDefaultInstanceForType() {
3656       return defaultInstance;
3657     }
3658
3659     private final com.google.protobuf.UnknownFieldSet unknownFields;
3660     @java.lang.Override
3661     public final com.google.protobuf.UnknownFieldSet
3662         getUnknownFields() {
3663       return this.unknownFields;
3664     }
3665     private PassthroughModeControlCommand(
3666         com.google.protobuf.CodedInputStream input,
3667         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3668         throws com.google.protobuf.InvalidProtocolBufferException {
3669       initFields();
3670       int mutable_bitField0_ = 0;
3671       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3672           com.google.protobuf.UnknownFieldSet.newBuilder();
3673       try {
3674         boolean done = false;
3675         while (!done) {
3676           int tag = input.readTag();
3677           switch (tag) {
3678             case 0:
3679               done = true;
3680               break;
3681             default: {
3682               if (!parseUnknownField(input, unknownFields,
3683                                      extensionRegistry, tag)) {
3684                 done = true;
3685               }
3686               break;
3687             }
3688             case 8: {
3689               bitField0_ |= 0x00000001;
3690               bus_ = input.readInt32();
3691               break;
3692             }
3693             case 16: {
3694               int rawValue = input.readEnum();
3695               com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.valueOf(rawValue);
3696               if (value == null) {
3697                 unknownFields.mergeVarintField(2, rawValue);
3698               } else {
3699                 bitField0_ |= 0x00000002;
3700                 mode_ = value;
3701               }
3702               break;
3703             }
3704           }
3705         }
3706       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3707         throw e.setUnfinishedMessage(this);
3708       } catch (java.io.IOException e) {
3709         throw new com.google.protobuf.InvalidProtocolBufferException(
3710             e.getMessage()).setUnfinishedMessage(this);
3711       } finally {
3712         this.unknownFields = unknownFields.build();
3713         makeExtensionsImmutable();
3714       }
3715     }
3716     public static final com.google.protobuf.Descriptors.Descriptor
3717         getDescriptor() {
3718       return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor;
3719     }
3720
3721     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3722         internalGetFieldAccessorTable() {
3723       return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable
3724           .ensureFieldAccessorsInitialized(
3725               com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class);
3726     }
3727
3728     public static com.google.protobuf.Parser<PassthroughModeControlCommand> PARSER =
3729         new com.google.protobuf.AbstractParser<PassthroughModeControlCommand>() {
3730       public PassthroughModeControlCommand parsePartialFrom(
3731           com.google.protobuf.CodedInputStream input,
3732           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3733           throws com.google.protobuf.InvalidProtocolBufferException {
3734         return new PassthroughModeControlCommand(input, extensionRegistry);
3735       }
3736     };
3737
3738     @java.lang.Override
3739     public com.google.protobuf.Parser<PassthroughModeControlCommand> getParserForType() {
3740       return PARSER;
3741     }
3742
3743     /**
3744      * Protobuf enum {@code openxc.PassthroughModeControlCommand.PassthroughMode}
3745      */
3746     public enum PassthroughMode
3747         implements com.google.protobuf.ProtocolMessageEnum {
3748       /**
3749        * <code>OFF = 1;</code>
3750        */
3751       OFF(0, 1),
3752       /**
3753        * <code>FILTERED = 2;</code>
3754        */
3755       FILTERED(1, 2),
3756       /**
3757        * <code>UNFILTERED = 3;</code>
3758        */
3759       UNFILTERED(2, 3),
3760       ;
3761
3762       /**
3763        * <code>OFF = 1;</code>
3764        */
3765       public static final int OFF_VALUE = 1;
3766       /**
3767        * <code>FILTERED = 2;</code>
3768        */
3769       public static final int FILTERED_VALUE = 2;
3770       /**
3771        * <code>UNFILTERED = 3;</code>
3772        */
3773       public static final int UNFILTERED_VALUE = 3;
3774
3775
3776       public final int getNumber() { return value; }
3777
3778       public static PassthroughMode valueOf(int value) {
3779         switch (value) {
3780           case 1: return OFF;
3781           case 2: return FILTERED;
3782           case 3: return UNFILTERED;
3783           default: return null;
3784         }
3785       }
3786
3787       public static com.google.protobuf.Internal.EnumLiteMap<PassthroughMode>
3788           internalGetValueMap() {
3789         return internalValueMap;
3790       }
3791       private static com.google.protobuf.Internal.EnumLiteMap<PassthroughMode>
3792           internalValueMap =
3793             new com.google.protobuf.Internal.EnumLiteMap<PassthroughMode>() {
3794               public PassthroughMode findValueByNumber(int number) {
3795                 return PassthroughMode.valueOf(number);
3796               }
3797             };
3798
3799       public final com.google.protobuf.Descriptors.EnumValueDescriptor
3800           getValueDescriptor() {
3801         return getDescriptor().getValues().get(index);
3802       }
3803       public final com.google.protobuf.Descriptors.EnumDescriptor
3804           getDescriptorForType() {
3805         return getDescriptor();
3806       }
3807       public static final com.google.protobuf.Descriptors.EnumDescriptor
3808           getDescriptor() {
3809         return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDescriptor().getEnumTypes().get(0);
3810       }
3811
3812       private static final PassthroughMode[] VALUES = values();
3813
3814       public static PassthroughMode valueOf(
3815           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
3816         if (desc.getType() != getDescriptor()) {
3817           throw new java.lang.IllegalArgumentException(
3818             "EnumValueDescriptor is not for this type.");
3819         }
3820         return VALUES[desc.getIndex()];
3821       }
3822
3823       private final int index;
3824       private final int value;
3825
3826       private PassthroughMode(int index, int value) {
3827         this.index = index;
3828         this.value = value;
3829       }
3830
3831       // @@protoc_insertion_point(enum_scope:openxc.PassthroughModeControlCommand.PassthroughMode)
3832     }
3833
3834     private int bitField0_;
3835     // optional int32 bus = 1;
3836     public static final int BUS_FIELD_NUMBER = 1;
3837     private int bus_;
3838     /**
3839      * <code>optional int32 bus = 1;</code>
3840      */
3841     public boolean hasBus() {
3842       return ((bitField0_ & 0x00000001) == 0x00000001);
3843     }
3844     /**
3845      * <code>optional int32 bus = 1;</code>
3846      */
3847     public int getBus() {
3848       return bus_;
3849     }
3850
3851     // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;
3852     public static final int MODE_FIELD_NUMBER = 2;
3853     private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_;
3854     /**
3855      * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
3856      */
3857     public boolean hasMode() {
3858       return ((bitField0_ & 0x00000002) == 0x00000002);
3859     }
3860     /**
3861      * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
3862      */
3863     public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() {
3864       return mode_;
3865     }
3866
3867     private void initFields() {
3868       bus_ = 0;
3869       mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF;
3870     }
3871     private byte memoizedIsInitialized = -1;
3872     public final boolean isInitialized() {
3873       byte isInitialized = memoizedIsInitialized;
3874       if (isInitialized != -1) return isInitialized == 1;
3875
3876       memoizedIsInitialized = 1;
3877       return true;
3878     }
3879
3880     public void writeTo(com.google.protobuf.CodedOutputStream output)
3881                         throws java.io.IOException {
3882       getSerializedSize();
3883       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3884         output.writeInt32(1, bus_);
3885       }
3886       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3887         output.writeEnum(2, mode_.getNumber());
3888       }
3889       getUnknownFields().writeTo(output);
3890     }
3891
3892     private int memoizedSerializedSize = -1;
3893     public int getSerializedSize() {
3894       int size = memoizedSerializedSize;
3895       if (size != -1) return size;
3896
3897       size = 0;
3898       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3899         size += com.google.protobuf.CodedOutputStream
3900           .computeInt32Size(1, bus_);
3901       }
3902       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3903         size += com.google.protobuf.CodedOutputStream
3904           .computeEnumSize(2, mode_.getNumber());
3905       }
3906       size += getUnknownFields().getSerializedSize();
3907       memoizedSerializedSize = size;
3908       return size;
3909     }
3910
3911     private static final long serialVersionUID = 0L;
3912     @java.lang.Override
3913     protected java.lang.Object writeReplace()
3914         throws java.io.ObjectStreamException {
3915       return super.writeReplace();
3916     }
3917
3918     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(
3919         com.google.protobuf.ByteString data)
3920         throws com.google.protobuf.InvalidProtocolBufferException {
3921       return PARSER.parseFrom(data);
3922     }
3923     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(
3924         com.google.protobuf.ByteString data,
3925         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3926         throws com.google.protobuf.InvalidProtocolBufferException {
3927       return PARSER.parseFrom(data, extensionRegistry);
3928     }
3929     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(byte[] data)
3930         throws com.google.protobuf.InvalidProtocolBufferException {
3931       return PARSER.parseFrom(data);
3932     }
3933     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(
3934         byte[] data,
3935         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3936         throws com.google.protobuf.InvalidProtocolBufferException {
3937       return PARSER.parseFrom(data, extensionRegistry);
3938     }
3939     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(java.io.InputStream input)
3940         throws java.io.IOException {
3941       return PARSER.parseFrom(input);
3942     }
3943     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(
3944         java.io.InputStream input,
3945         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3946         throws java.io.IOException {
3947       return PARSER.parseFrom(input, extensionRegistry);
3948     }
3949     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(java.io.InputStream input)
3950         throws java.io.IOException {
3951       return PARSER.parseDelimitedFrom(input);
3952     }
3953     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseDelimitedFrom(
3954         java.io.InputStream input,
3955         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3956         throws java.io.IOException {
3957       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3958     }
3959     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(
3960         com.google.protobuf.CodedInputStream input)
3961         throws java.io.IOException {
3962       return PARSER.parseFrom(input);
3963     }
3964     public static com.openxc.BinaryMessages.PassthroughModeControlCommand parseFrom(
3965         com.google.protobuf.CodedInputStream input,
3966         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3967         throws java.io.IOException {
3968       return PARSER.parseFrom(input, extensionRegistry);
3969     }
3970
3971     public static Builder newBuilder() { return Builder.create(); }
3972     public Builder newBuilderForType() { return newBuilder(); }
3973     public static Builder newBuilder(com.openxc.BinaryMessages.PassthroughModeControlCommand prototype) {
3974       return newBuilder().mergeFrom(prototype);
3975     }
3976     public Builder toBuilder() { return newBuilder(this); }
3977
3978     @java.lang.Override
3979     protected Builder newBuilderForType(
3980         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3981       Builder builder = new Builder(parent);
3982       return builder;
3983     }
3984     /**
3985      * Protobuf type {@code openxc.PassthroughModeControlCommand}
3986      */
3987     public static final class Builder extends
3988         com.google.protobuf.GeneratedMessage.Builder<Builder>
3989        implements com.openxc.BinaryMessages.PassthroughModeControlCommandOrBuilder {
3990       public static final com.google.protobuf.Descriptors.Descriptor
3991           getDescriptor() {
3992         return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor;
3993       }
3994
3995       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3996           internalGetFieldAccessorTable() {
3997         return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable
3998             .ensureFieldAccessorsInitialized(
3999                 com.openxc.BinaryMessages.PassthroughModeControlCommand.class, com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder.class);
4000       }
4001
4002       // Construct using com.openxc.BinaryMessages.PassthroughModeControlCommand.newBuilder()
4003       private Builder() {
4004         maybeForceBuilderInitialization();
4005       }
4006
4007       private Builder(
4008           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4009         super(parent);
4010         maybeForceBuilderInitialization();
4011       }
4012       private void maybeForceBuilderInitialization() {
4013         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4014         }
4015       }
4016       private static Builder create() {
4017         return new Builder();
4018       }
4019
4020       public Builder clear() {
4021         super.clear();
4022         bus_ = 0;
4023         bitField0_ = (bitField0_ & ~0x00000001);
4024         mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF;
4025         bitField0_ = (bitField0_ & ~0x00000002);
4026         return this;
4027       }
4028
4029       public Builder clone() {
4030         return create().mergeFrom(buildPartial());
4031       }
4032
4033       public com.google.protobuf.Descriptors.Descriptor
4034           getDescriptorForType() {
4035         return com.openxc.BinaryMessages.internal_static_openxc_PassthroughModeControlCommand_descriptor;
4036       }
4037
4038       public com.openxc.BinaryMessages.PassthroughModeControlCommand getDefaultInstanceForType() {
4039         return com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance();
4040       }
4041
4042       public com.openxc.BinaryMessages.PassthroughModeControlCommand build() {
4043         com.openxc.BinaryMessages.PassthroughModeControlCommand result = buildPartial();
4044         if (!result.isInitialized()) {
4045           throw newUninitializedMessageException(result);
4046         }
4047         return result;
4048       }
4049
4050       public com.openxc.BinaryMessages.PassthroughModeControlCommand buildPartial() {
4051         com.openxc.BinaryMessages.PassthroughModeControlCommand result = new com.openxc.BinaryMessages.PassthroughModeControlCommand(this);
4052         int from_bitField0_ = bitField0_;
4053         int to_bitField0_ = 0;
4054         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4055           to_bitField0_ |= 0x00000001;
4056         }
4057         result.bus_ = bus_;
4058         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4059           to_bitField0_ |= 0x00000002;
4060         }
4061         result.mode_ = mode_;
4062         result.bitField0_ = to_bitField0_;
4063         onBuilt();
4064         return result;
4065       }
4066
4067       public Builder mergeFrom(com.google.protobuf.Message other) {
4068         if (other instanceof com.openxc.BinaryMessages.PassthroughModeControlCommand) {
4069           return mergeFrom((com.openxc.BinaryMessages.PassthroughModeControlCommand)other);
4070         } else {
4071           super.mergeFrom(other);
4072           return this;
4073         }
4074       }
4075
4076       public Builder mergeFrom(com.openxc.BinaryMessages.PassthroughModeControlCommand other) {
4077         if (other == com.openxc.BinaryMessages.PassthroughModeControlCommand.getDefaultInstance()) return this;
4078         if (other.hasBus()) {
4079           setBus(other.getBus());
4080         }
4081         if (other.hasMode()) {
4082           setMode(other.getMode());
4083         }
4084         this.mergeUnknownFields(other.getUnknownFields());
4085         return this;
4086       }
4087
4088       public final boolean isInitialized() {
4089         return true;
4090       }
4091
4092       public Builder mergeFrom(
4093           com.google.protobuf.CodedInputStream input,
4094           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4095           throws java.io.IOException {
4096         com.openxc.BinaryMessages.PassthroughModeControlCommand parsedMessage = null;
4097         try {
4098           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4099         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4100           parsedMessage = (com.openxc.BinaryMessages.PassthroughModeControlCommand) e.getUnfinishedMessage();
4101           throw e;
4102         } finally {
4103           if (parsedMessage != null) {
4104             mergeFrom(parsedMessage);
4105           }
4106         }
4107         return this;
4108       }
4109       private int bitField0_;
4110
4111       // optional int32 bus = 1;
4112       private int bus_ ;
4113       /**
4114        * <code>optional int32 bus = 1;</code>
4115        */
4116       public boolean hasBus() {
4117         return ((bitField0_ & 0x00000001) == 0x00000001);
4118       }
4119       /**
4120        * <code>optional int32 bus = 1;</code>
4121        */
4122       public int getBus() {
4123         return bus_;
4124       }
4125       /**
4126        * <code>optional int32 bus = 1;</code>
4127        */
4128       public Builder setBus(int value) {
4129         bitField0_ |= 0x00000001;
4130         bus_ = value;
4131         onChanged();
4132         return this;
4133       }
4134       /**
4135        * <code>optional int32 bus = 1;</code>
4136        */
4137       public Builder clearBus() {
4138         bitField0_ = (bitField0_ & ~0x00000001);
4139         bus_ = 0;
4140         onChanged();
4141         return this;
4142       }
4143
4144       // optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;
4145       private com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF;
4146       /**
4147        * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
4148        */
4149       public boolean hasMode() {
4150         return ((bitField0_ & 0x00000002) == 0x00000002);
4151       }
4152       /**
4153        * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
4154        */
4155       public com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode getMode() {
4156         return mode_;
4157       }
4158       /**
4159        * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
4160        */
4161       public Builder setMode(com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode value) {
4162         if (value == null) {
4163           throw new NullPointerException();
4164         }
4165         bitField0_ |= 0x00000002;
4166         mode_ = value;
4167         onChanged();
4168         return this;
4169       }
4170       /**
4171        * <code>optional .openxc.PassthroughModeControlCommand.PassthroughMode mode = 2;</code>
4172        */
4173       public Builder clearMode() {
4174         bitField0_ = (bitField0_ & ~0x00000002);
4175         mode_ = com.openxc.BinaryMessages.PassthroughModeControlCommand.PassthroughMode.OFF;
4176         onChanged();
4177         return this;
4178       }
4179
4180       // @@protoc_insertion_point(builder_scope:openxc.PassthroughModeControlCommand)
4181     }
4182
4183     static {
4184       defaultInstance = new PassthroughModeControlCommand(true);
4185       defaultInstance.initFields();
4186     }
4187
4188     // @@protoc_insertion_point(class_scope:openxc.PassthroughModeControlCommand)
4189   }
4190
4191   public interface CommandResponseOrBuilder
4192       extends com.google.protobuf.MessageOrBuilder {
4193
4194     // optional .openxc.ControlCommand.Type type = 1;
4195     /**
4196      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4197      */
4198     boolean hasType();
4199     /**
4200      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4201      */
4202     com.openxc.BinaryMessages.ControlCommand.Type getType();
4203
4204     // optional string message = 2;
4205     /**
4206      * <code>optional string message = 2;</code>
4207      */
4208     boolean hasMessage();
4209     /**
4210      * <code>optional string message = 2;</code>
4211      */
4212     java.lang.String getMessage();
4213     /**
4214      * <code>optional string message = 2;</code>
4215      */
4216     com.google.protobuf.ByteString
4217         getMessageBytes();
4218
4219     // optional bool status = 3;
4220     /**
4221      * <code>optional bool status = 3;</code>
4222      */
4223     boolean hasStatus();
4224     /**
4225      * <code>optional bool status = 3;</code>
4226      */
4227     boolean getStatus();
4228   }
4229   /**
4230    * Protobuf type {@code openxc.CommandResponse}
4231    */
4232   public static final class CommandResponse extends
4233       com.google.protobuf.GeneratedMessage
4234       implements CommandResponseOrBuilder {
4235     // Use CommandResponse.newBuilder() to construct.
4236     private CommandResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
4237       super(builder);
4238       this.unknownFields = builder.getUnknownFields();
4239     }
4240     private CommandResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
4241
4242     private static final CommandResponse defaultInstance;
4243     public static CommandResponse getDefaultInstance() {
4244       return defaultInstance;
4245     }
4246
4247     public CommandResponse getDefaultInstanceForType() {
4248       return defaultInstance;
4249     }
4250
4251     private final com.google.protobuf.UnknownFieldSet unknownFields;
4252     @java.lang.Override
4253     public final com.google.protobuf.UnknownFieldSet
4254         getUnknownFields() {
4255       return this.unknownFields;
4256     }
4257     private CommandResponse(
4258         com.google.protobuf.CodedInputStream input,
4259         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4260         throws com.google.protobuf.InvalidProtocolBufferException {
4261       initFields();
4262       int mutable_bitField0_ = 0;
4263       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4264           com.google.protobuf.UnknownFieldSet.newBuilder();
4265       try {
4266         boolean done = false;
4267         while (!done) {
4268           int tag = input.readTag();
4269           switch (tag) {
4270             case 0:
4271               done = true;
4272               break;
4273             default: {
4274               if (!parseUnknownField(input, unknownFields,
4275                                      extensionRegistry, tag)) {
4276                 done = true;
4277               }
4278               break;
4279             }
4280             case 8: {
4281               int rawValue = input.readEnum();
4282               com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue);
4283               if (value == null) {
4284                 unknownFields.mergeVarintField(1, rawValue);
4285               } else {
4286                 bitField0_ |= 0x00000001;
4287                 type_ = value;
4288               }
4289               break;
4290             }
4291             case 18: {
4292               bitField0_ |= 0x00000002;
4293               message_ = input.readBytes();
4294               break;
4295             }
4296             case 24: {
4297               bitField0_ |= 0x00000004;
4298               status_ = input.readBool();
4299               break;
4300             }
4301           }
4302         }
4303       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4304         throw e.setUnfinishedMessage(this);
4305       } catch (java.io.IOException e) {
4306         throw new com.google.protobuf.InvalidProtocolBufferException(
4307             e.getMessage()).setUnfinishedMessage(this);
4308       } finally {
4309         this.unknownFields = unknownFields.build();
4310         makeExtensionsImmutable();
4311       }
4312     }
4313     public static final com.google.protobuf.Descriptors.Descriptor
4314         getDescriptor() {
4315       return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
4316     }
4317
4318     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4319         internalGetFieldAccessorTable() {
4320       return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable
4321           .ensureFieldAccessorsInitialized(
4322               com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class);
4323     }
4324
4325     public static com.google.protobuf.Parser<CommandResponse> PARSER =
4326         new com.google.protobuf.AbstractParser<CommandResponse>() {
4327       public CommandResponse parsePartialFrom(
4328           com.google.protobuf.CodedInputStream input,
4329           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4330           throws com.google.protobuf.InvalidProtocolBufferException {
4331         return new CommandResponse(input, extensionRegistry);
4332       }
4333     };
4334
4335     @java.lang.Override
4336     public com.google.protobuf.Parser<CommandResponse> getParserForType() {
4337       return PARSER;
4338     }
4339
4340     private int bitField0_;
4341     // optional .openxc.ControlCommand.Type type = 1;
4342     public static final int TYPE_FIELD_NUMBER = 1;
4343     private com.openxc.BinaryMessages.ControlCommand.Type type_;
4344     /**
4345      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4346      */
4347     public boolean hasType() {
4348       return ((bitField0_ & 0x00000001) == 0x00000001);
4349     }
4350     /**
4351      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4352      */
4353     public com.openxc.BinaryMessages.ControlCommand.Type getType() {
4354       return type_;
4355     }
4356
4357     // optional string message = 2;
4358     public static final int MESSAGE_FIELD_NUMBER = 2;
4359     private java.lang.Object message_;
4360     /**
4361      * <code>optional string message = 2;</code>
4362      */
4363     public boolean hasMessage() {
4364       return ((bitField0_ & 0x00000002) == 0x00000002);
4365     }
4366     /**
4367      * <code>optional string message = 2;</code>
4368      */
4369     public java.lang.String getMessage() {
4370       java.lang.Object ref = message_;
4371       if (ref instanceof java.lang.String) {
4372         return (java.lang.String) ref;
4373       } else {
4374         com.google.protobuf.ByteString bs = 
4375             (com.google.protobuf.ByteString) ref;
4376         java.lang.String s = bs.toStringUtf8();
4377         if (bs.isValidUtf8()) {
4378           message_ = s;
4379         }
4380         return s;
4381       }
4382     }
4383     /**
4384      * <code>optional string message = 2;</code>
4385      */
4386     public com.google.protobuf.ByteString
4387         getMessageBytes() {
4388       java.lang.Object ref = message_;
4389       if (ref instanceof java.lang.String) {
4390         com.google.protobuf.ByteString b = 
4391             com.google.protobuf.ByteString.copyFromUtf8(
4392                 (java.lang.String) ref);
4393         message_ = b;
4394         return b;
4395       } else {
4396         return (com.google.protobuf.ByteString) ref;
4397       }
4398     }
4399
4400     // optional bool status = 3;
4401     public static final int STATUS_FIELD_NUMBER = 3;
4402     private boolean status_;
4403     /**
4404      * <code>optional bool status = 3;</code>
4405      */
4406     public boolean hasStatus() {
4407       return ((bitField0_ & 0x00000004) == 0x00000004);
4408     }
4409     /**
4410      * <code>optional bool status = 3;</code>
4411      */
4412     public boolean getStatus() {
4413       return status_;
4414     }
4415
4416     private void initFields() {
4417       type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
4418       message_ = "";
4419       status_ = false;
4420     }
4421     private byte memoizedIsInitialized = -1;
4422     public final boolean isInitialized() {
4423       byte isInitialized = memoizedIsInitialized;
4424       if (isInitialized != -1) return isInitialized == 1;
4425
4426       memoizedIsInitialized = 1;
4427       return true;
4428     }
4429
4430     public void writeTo(com.google.protobuf.CodedOutputStream output)
4431                         throws java.io.IOException {
4432       getSerializedSize();
4433       if (((bitField0_ & 0x00000001) == 0x00000001)) {
4434         output.writeEnum(1, type_.getNumber());
4435       }
4436       if (((bitField0_ & 0x00000002) == 0x00000002)) {
4437         output.writeBytes(2, getMessageBytes());
4438       }
4439       if (((bitField0_ & 0x00000004) == 0x00000004)) {
4440         output.writeBool(3, status_);
4441       }
4442       getUnknownFields().writeTo(output);
4443     }
4444
4445     private int memoizedSerializedSize = -1;
4446     public int getSerializedSize() {
4447       int size = memoizedSerializedSize;
4448       if (size != -1) return size;
4449
4450       size = 0;
4451       if (((bitField0_ & 0x00000001) == 0x00000001)) {
4452         size += com.google.protobuf.CodedOutputStream
4453           .computeEnumSize(1, type_.getNumber());
4454       }
4455       if (((bitField0_ & 0x00000002) == 0x00000002)) {
4456         size += com.google.protobuf.CodedOutputStream
4457           .computeBytesSize(2, getMessageBytes());
4458       }
4459       if (((bitField0_ & 0x00000004) == 0x00000004)) {
4460         size += com.google.protobuf.CodedOutputStream
4461           .computeBoolSize(3, status_);
4462       }
4463       size += getUnknownFields().getSerializedSize();
4464       memoizedSerializedSize = size;
4465       return size;
4466     }
4467
4468     private static final long serialVersionUID = 0L;
4469     @java.lang.Override
4470     protected java.lang.Object writeReplace()
4471         throws java.io.ObjectStreamException {
4472       return super.writeReplace();
4473     }
4474
4475     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
4476         com.google.protobuf.ByteString data)
4477         throws com.google.protobuf.InvalidProtocolBufferException {
4478       return PARSER.parseFrom(data);
4479     }
4480     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
4481         com.google.protobuf.ByteString data,
4482         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4483         throws com.google.protobuf.InvalidProtocolBufferException {
4484       return PARSER.parseFrom(data, extensionRegistry);
4485     }
4486     public static com.openxc.BinaryMessages.CommandResponse parseFrom(byte[] data)
4487         throws com.google.protobuf.InvalidProtocolBufferException {
4488       return PARSER.parseFrom(data);
4489     }
4490     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
4491         byte[] data,
4492         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4493         throws com.google.protobuf.InvalidProtocolBufferException {
4494       return PARSER.parseFrom(data, extensionRegistry);
4495     }
4496     public static com.openxc.BinaryMessages.CommandResponse parseFrom(java.io.InputStream input)
4497         throws java.io.IOException {
4498       return PARSER.parseFrom(input);
4499     }
4500     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
4501         java.io.InputStream input,
4502         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4503         throws java.io.IOException {
4504       return PARSER.parseFrom(input, extensionRegistry);
4505     }
4506     public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(java.io.InputStream input)
4507         throws java.io.IOException {
4508       return PARSER.parseDelimitedFrom(input);
4509     }
4510     public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(
4511         java.io.InputStream input,
4512         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4513         throws java.io.IOException {
4514       return PARSER.parseDelimitedFrom(input, extensionRegistry);
4515     }
4516     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
4517         com.google.protobuf.CodedInputStream input)
4518         throws java.io.IOException {
4519       return PARSER.parseFrom(input);
4520     }
4521     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
4522         com.google.protobuf.CodedInputStream input,
4523         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4524         throws java.io.IOException {
4525       return PARSER.parseFrom(input, extensionRegistry);
4526     }
4527
4528     public static Builder newBuilder() { return Builder.create(); }
4529     public Builder newBuilderForType() { return newBuilder(); }
4530     public static Builder newBuilder(com.openxc.BinaryMessages.CommandResponse prototype) {
4531       return newBuilder().mergeFrom(prototype);
4532     }
4533     public Builder toBuilder() { return newBuilder(this); }
4534
4535     @java.lang.Override
4536     protected Builder newBuilderForType(
4537         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4538       Builder builder = new Builder(parent);
4539       return builder;
4540     }
4541     /**
4542      * Protobuf type {@code openxc.CommandResponse}
4543      */
4544     public static final class Builder extends
4545         com.google.protobuf.GeneratedMessage.Builder<Builder>
4546        implements com.openxc.BinaryMessages.CommandResponseOrBuilder {
4547       public static final com.google.protobuf.Descriptors.Descriptor
4548           getDescriptor() {
4549         return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
4550       }
4551
4552       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4553           internalGetFieldAccessorTable() {
4554         return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable
4555             .ensureFieldAccessorsInitialized(
4556                 com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class);
4557       }
4558
4559       // Construct using com.openxc.BinaryMessages.CommandResponse.newBuilder()
4560       private Builder() {
4561         maybeForceBuilderInitialization();
4562       }
4563
4564       private Builder(
4565           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4566         super(parent);
4567         maybeForceBuilderInitialization();
4568       }
4569       private void maybeForceBuilderInitialization() {
4570         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4571         }
4572       }
4573       private static Builder create() {
4574         return new Builder();
4575       }
4576
4577       public Builder clear() {
4578         super.clear();
4579         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
4580         bitField0_ = (bitField0_ & ~0x00000001);
4581         message_ = "";
4582         bitField0_ = (bitField0_ & ~0x00000002);
4583         status_ = false;
4584         bitField0_ = (bitField0_ & ~0x00000004);
4585         return this;
4586       }
4587
4588       public Builder clone() {
4589         return create().mergeFrom(buildPartial());
4590       }
4591
4592       public com.google.protobuf.Descriptors.Descriptor
4593           getDescriptorForType() {
4594         return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
4595       }
4596
4597       public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() {
4598         return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
4599       }
4600
4601       public com.openxc.BinaryMessages.CommandResponse build() {
4602         com.openxc.BinaryMessages.CommandResponse result = buildPartial();
4603         if (!result.isInitialized()) {
4604           throw newUninitializedMessageException(result);
4605         }
4606         return result;
4607       }
4608
4609       public com.openxc.BinaryMessages.CommandResponse buildPartial() {
4610         com.openxc.BinaryMessages.CommandResponse result = new com.openxc.BinaryMessages.CommandResponse(this);
4611         int from_bitField0_ = bitField0_;
4612         int to_bitField0_ = 0;
4613         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4614           to_bitField0_ |= 0x00000001;
4615         }
4616         result.type_ = type_;
4617         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4618           to_bitField0_ |= 0x00000002;
4619         }
4620         result.message_ = message_;
4621         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
4622           to_bitField0_ |= 0x00000004;
4623         }
4624         result.status_ = status_;
4625         result.bitField0_ = to_bitField0_;
4626         onBuilt();
4627         return result;
4628       }
4629
4630       public Builder mergeFrom(com.google.protobuf.Message other) {
4631         if (other instanceof com.openxc.BinaryMessages.CommandResponse) {
4632           return mergeFrom((com.openxc.BinaryMessages.CommandResponse)other);
4633         } else {
4634           super.mergeFrom(other);
4635           return this;
4636         }
4637       }
4638
4639       public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) {
4640         if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this;
4641         if (other.hasType()) {
4642           setType(other.getType());
4643         }
4644         if (other.hasMessage()) {
4645           bitField0_ |= 0x00000002;
4646           message_ = other.message_;
4647           onChanged();
4648         }
4649         if (other.hasStatus()) {
4650           setStatus(other.getStatus());
4651         }
4652         this.mergeUnknownFields(other.getUnknownFields());
4653         return this;
4654       }
4655
4656       public final boolean isInitialized() {
4657         return true;
4658       }
4659
4660       public Builder mergeFrom(
4661           com.google.protobuf.CodedInputStream input,
4662           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4663           throws java.io.IOException {
4664         com.openxc.BinaryMessages.CommandResponse parsedMessage = null;
4665         try {
4666           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4667         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4668           parsedMessage = (com.openxc.BinaryMessages.CommandResponse) e.getUnfinishedMessage();
4669           throw e;
4670         } finally {
4671           if (parsedMessage != null) {
4672             mergeFrom(parsedMessage);
4673           }
4674         }
4675         return this;
4676       }
4677       private int bitField0_;
4678
4679       // optional .openxc.ControlCommand.Type type = 1;
4680       private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
4681       /**
4682        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4683        */
4684       public boolean hasType() {
4685         return ((bitField0_ & 0x00000001) == 0x00000001);
4686       }
4687       /**
4688        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4689        */
4690       public com.openxc.BinaryMessages.ControlCommand.Type getType() {
4691         return type_;
4692       }
4693       /**
4694        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4695        */
4696       public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
4697         if (value == null) {
4698           throw new NullPointerException();
4699         }
4700         bitField0_ |= 0x00000001;
4701         type_ = value;
4702         onChanged();
4703         return this;
4704       }
4705       /**
4706        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
4707        */
4708       public Builder clearType() {
4709         bitField0_ = (bitField0_ & ~0x00000001);
4710         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
4711         onChanged();
4712         return this;
4713       }
4714
4715       // optional string message = 2;
4716       private java.lang.Object message_ = "";
4717       /**
4718        * <code>optional string message = 2;</code>
4719        */
4720       public boolean hasMessage() {
4721         return ((bitField0_ & 0x00000002) == 0x00000002);
4722       }
4723       /**
4724        * <code>optional string message = 2;</code>
4725        */
4726       public java.lang.String getMessage() {
4727         java.lang.Object ref = message_;
4728         if (!(ref instanceof java.lang.String)) {
4729           java.lang.String s = ((com.google.protobuf.ByteString) ref)
4730               .toStringUtf8();
4731           message_ = s;
4732           return s;
4733         } else {
4734           return (java.lang.String) ref;
4735         }
4736       }
4737       /**
4738        * <code>optional string message = 2;</code>
4739        */
4740       public com.google.protobuf.ByteString
4741           getMessageBytes() {
4742         java.lang.Object ref = message_;
4743         if (ref instanceof String) {
4744           com.google.protobuf.ByteString b = 
4745               com.google.protobuf.ByteString.copyFromUtf8(
4746                   (java.lang.String) ref);
4747           message_ = b;
4748           return b;
4749         } else {
4750           return (com.google.protobuf.ByteString) ref;
4751         }
4752       }
4753       /**
4754        * <code>optional string message = 2;</code>
4755        */
4756       public Builder setMessage(
4757           java.lang.String value) {
4758         if (value == null) {
4759     throw new NullPointerException();
4760   }
4761   bitField0_ |= 0x00000002;
4762         message_ = value;
4763         onChanged();
4764         return this;
4765       }
4766       /**
4767        * <code>optional string message = 2;</code>
4768        */
4769       public Builder clearMessage() {
4770         bitField0_ = (bitField0_ & ~0x00000002);
4771         message_ = getDefaultInstance().getMessage();
4772         onChanged();
4773         return this;
4774       }
4775       /**
4776        * <code>optional string message = 2;</code>
4777        */
4778       public Builder setMessageBytes(
4779           com.google.protobuf.ByteString value) {
4780         if (value == null) {
4781     throw new NullPointerException();
4782   }
4783   bitField0_ |= 0x00000002;
4784         message_ = value;
4785         onChanged();
4786         return this;
4787       }
4788
4789       // optional bool status = 3;
4790       private boolean status_ ;
4791       /**
4792        * <code>optional bool status = 3;</code>
4793        */
4794       public boolean hasStatus() {
4795         return ((bitField0_ & 0x00000004) == 0x00000004);
4796       }
4797       /**
4798        * <code>optional bool status = 3;</code>
4799        */
4800       public boolean getStatus() {
4801         return status_;
4802       }
4803       /**
4804        * <code>optional bool status = 3;</code>
4805        */
4806       public Builder setStatus(boolean value) {
4807         bitField0_ |= 0x00000004;
4808         status_ = value;
4809         onChanged();
4810         return this;
4811       }
4812       /**
4813        * <code>optional bool status = 3;</code>
4814        */
4815       public Builder clearStatus() {
4816         bitField0_ = (bitField0_ & ~0x00000004);
4817         status_ = false;
4818         onChanged();
4819         return this;
4820       }
4821
4822       // @@protoc_insertion_point(builder_scope:openxc.CommandResponse)
4823     }
4824
4825     static {
4826       defaultInstance = new CommandResponse(true);
4827       defaultInstance.initFields();
4828     }
4829
4830     // @@protoc_insertion_point(class_scope:openxc.CommandResponse)
4831   }
4832
4833   public interface DiagnosticRequestOrBuilder
4834       extends com.google.protobuf.MessageOrBuilder {
4835
4836     // optional int32 bus = 1;
4837     /**
4838      * <code>optional int32 bus = 1;</code>
4839      */
4840     boolean hasBus();
4841     /**
4842      * <code>optional int32 bus = 1;</code>
4843      */
4844     int getBus();
4845
4846     // optional uint32 message_id = 2;
4847     /**
4848      * <code>optional uint32 message_id = 2;</code>
4849      */
4850     boolean hasMessageId();
4851     /**
4852      * <code>optional uint32 message_id = 2;</code>
4853      */
4854     int getMessageId();
4855
4856     // optional uint32 mode = 3;
4857     /**
4858      * <code>optional uint32 mode = 3;</code>
4859      */
4860     boolean hasMode();
4861     /**
4862      * <code>optional uint32 mode = 3;</code>
4863      */
4864     int getMode();
4865
4866     // optional uint32 pid = 4;
4867     /**
4868      * <code>optional uint32 pid = 4;</code>
4869      */
4870     boolean hasPid();
4871     /**
4872      * <code>optional uint32 pid = 4;</code>
4873      */
4874     int getPid();
4875
4876     // optional bytes payload = 5;
4877     /**
4878      * <code>optional bytes payload = 5;</code>
4879      *
4880      * <pre>
4881      * TODO we are capping this at 8 bytes for now - need to change when we
4882      * support multi-frame responses
4883      * </pre>
4884      */
4885     boolean hasPayload();
4886     /**
4887      * <code>optional bytes payload = 5;</code>
4888      *
4889      * <pre>
4890      * TODO we are capping this at 8 bytes for now - need to change when we
4891      * support multi-frame responses
4892      * </pre>
4893      */
4894     com.google.protobuf.ByteString getPayload();
4895
4896     // optional bool multiple_responses = 6;
4897     /**
4898      * <code>optional bool multiple_responses = 6;</code>
4899      */
4900     boolean hasMultipleResponses();
4901     /**
4902      * <code>optional bool multiple_responses = 6;</code>
4903      */
4904     boolean getMultipleResponses();
4905
4906     // optional double frequency = 7;
4907     /**
4908      * <code>optional double frequency = 7;</code>
4909      */
4910     boolean hasFrequency();
4911     /**
4912      * <code>optional double frequency = 7;</code>
4913      */
4914     double getFrequency();
4915
4916     // optional string name = 8;
4917     /**
4918      * <code>optional string name = 8;</code>
4919      */
4920     boolean hasName();
4921     /**
4922      * <code>optional string name = 8;</code>
4923      */
4924     java.lang.String getName();
4925     /**
4926      * <code>optional string name = 8;</code>
4927      */
4928     com.google.protobuf.ByteString
4929         getNameBytes();
4930
4931     // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;
4932     /**
4933      * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
4934      */
4935     boolean hasDecodedType();
4936     /**
4937      * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
4938      */
4939     com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType();
4940   }
4941   /**
4942    * Protobuf type {@code openxc.DiagnosticRequest}
4943    */
4944   public static final class DiagnosticRequest extends
4945       com.google.protobuf.GeneratedMessage
4946       implements DiagnosticRequestOrBuilder {
4947     // Use DiagnosticRequest.newBuilder() to construct.
4948     private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
4949       super(builder);
4950       this.unknownFields = builder.getUnknownFields();
4951     }
4952     private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
4953
4954     private static final DiagnosticRequest defaultInstance;
4955     public static DiagnosticRequest getDefaultInstance() {
4956       return defaultInstance;
4957     }
4958
4959     public DiagnosticRequest getDefaultInstanceForType() {
4960       return defaultInstance;
4961     }
4962
4963     private final com.google.protobuf.UnknownFieldSet unknownFields;
4964     @java.lang.Override
4965     public final com.google.protobuf.UnknownFieldSet
4966         getUnknownFields() {
4967       return this.unknownFields;
4968     }
4969     private DiagnosticRequest(
4970         com.google.protobuf.CodedInputStream input,
4971         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4972         throws com.google.protobuf.InvalidProtocolBufferException {
4973       initFields();
4974       int mutable_bitField0_ = 0;
4975       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4976           com.google.protobuf.UnknownFieldSet.newBuilder();
4977       try {
4978         boolean done = false;
4979         while (!done) {
4980           int tag = input.readTag();
4981           switch (tag) {
4982             case 0:
4983               done = true;
4984               break;
4985             default: {
4986               if (!parseUnknownField(input, unknownFields,
4987                                      extensionRegistry, tag)) {
4988                 done = true;
4989               }
4990               break;
4991             }
4992             case 8: {
4993               bitField0_ |= 0x00000001;
4994               bus_ = input.readInt32();
4995               break;
4996             }
4997             case 16: {
4998               bitField0_ |= 0x00000002;
4999               messageId_ = input.readUInt32();
5000               break;
5001             }
5002             case 24: {
5003               bitField0_ |= 0x00000004;
5004               mode_ = input.readUInt32();
5005               break;
5006             }
5007             case 32: {
5008               bitField0_ |= 0x00000008;
5009               pid_ = input.readUInt32();
5010               break;
5011             }
5012             case 42: {
5013               bitField0_ |= 0x00000010;
5014               payload_ = input.readBytes();
5015               break;
5016             }
5017             case 48: {
5018               bitField0_ |= 0x00000020;
5019               multipleResponses_ = input.readBool();
5020               break;
5021             }
5022             case 57: {
5023               bitField0_ |= 0x00000040;
5024               frequency_ = input.readDouble();
5025               break;
5026             }
5027             case 66: {
5028               bitField0_ |= 0x00000080;
5029               name_ = input.readBytes();
5030               break;
5031             }
5032             case 72: {
5033               int rawValue = input.readEnum();
5034               com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue);
5035               if (value == null) {
5036                 unknownFields.mergeVarintField(9, rawValue);
5037               } else {
5038                 bitField0_ |= 0x00000100;
5039                 decodedType_ = value;
5040               }
5041               break;
5042             }
5043           }
5044         }
5045       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5046         throw e.setUnfinishedMessage(this);
5047       } catch (java.io.IOException e) {
5048         throw new com.google.protobuf.InvalidProtocolBufferException(
5049             e.getMessage()).setUnfinishedMessage(this);
5050       } finally {
5051         this.unknownFields = unknownFields.build();
5052         makeExtensionsImmutable();
5053       }
5054     }
5055     public static final com.google.protobuf.Descriptors.Descriptor
5056         getDescriptor() {
5057       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
5058     }
5059
5060     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5061         internalGetFieldAccessorTable() {
5062       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
5063           .ensureFieldAccessorsInitialized(
5064               com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
5065     }
5066
5067     public static com.google.protobuf.Parser<DiagnosticRequest> PARSER =
5068         new com.google.protobuf.AbstractParser<DiagnosticRequest>() {
5069       public DiagnosticRequest parsePartialFrom(
5070           com.google.protobuf.CodedInputStream input,
5071           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5072           throws com.google.protobuf.InvalidProtocolBufferException {
5073         return new DiagnosticRequest(input, extensionRegistry);
5074       }
5075     };
5076
5077     @java.lang.Override
5078     public com.google.protobuf.Parser<DiagnosticRequest> getParserForType() {
5079       return PARSER;
5080     }
5081
5082     /**
5083      * Protobuf enum {@code openxc.DiagnosticRequest.DecodedType}
5084      */
5085     public enum DecodedType
5086         implements com.google.protobuf.ProtocolMessageEnum {
5087       /**
5088        * <code>NONE = 1;</code>
5089        */
5090       NONE(0, 1),
5091       /**
5092        * <code>OBD2 = 2;</code>
5093        */
5094       OBD2(1, 2),
5095       ;
5096
5097       /**
5098        * <code>NONE = 1;</code>
5099        */
5100       public static final int NONE_VALUE = 1;
5101       /**
5102        * <code>OBD2 = 2;</code>
5103        */
5104       public static final int OBD2_VALUE = 2;
5105
5106
5107       public final int getNumber() { return value; }
5108
5109       public static DecodedType valueOf(int value) {
5110         switch (value) {
5111           case 1: return NONE;
5112           case 2: return OBD2;
5113           default: return null;
5114         }
5115       }
5116
5117       public static com.google.protobuf.Internal.EnumLiteMap<DecodedType>
5118           internalGetValueMap() {
5119         return internalValueMap;
5120       }
5121       private static com.google.protobuf.Internal.EnumLiteMap<DecodedType>
5122           internalValueMap =
5123             new com.google.protobuf.Internal.EnumLiteMap<DecodedType>() {
5124               public DecodedType findValueByNumber(int number) {
5125                 return DecodedType.valueOf(number);
5126               }
5127             };
5128
5129       public final com.google.protobuf.Descriptors.EnumValueDescriptor
5130           getValueDescriptor() {
5131         return getDescriptor().getValues().get(index);
5132       }
5133       public final com.google.protobuf.Descriptors.EnumDescriptor
5134           getDescriptorForType() {
5135         return getDescriptor();
5136       }
5137       public static final com.google.protobuf.Descriptors.EnumDescriptor
5138           getDescriptor() {
5139         return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(0);
5140       }
5141
5142       private static final DecodedType[] VALUES = values();
5143
5144       public static DecodedType valueOf(
5145           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
5146         if (desc.getType() != getDescriptor()) {
5147           throw new java.lang.IllegalArgumentException(
5148             "EnumValueDescriptor is not for this type.");
5149         }
5150         return VALUES[desc.getIndex()];
5151       }
5152
5153       private final int index;
5154       private final int value;
5155
5156       private DecodedType(int index, int value) {
5157         this.index = index;
5158         this.value = value;
5159       }
5160
5161       // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType)
5162     }
5163
5164     private int bitField0_;
5165     // optional int32 bus = 1;
5166     public static final int BUS_FIELD_NUMBER = 1;
5167     private int bus_;
5168     /**
5169      * <code>optional int32 bus = 1;</code>
5170      */
5171     public boolean hasBus() {
5172       return ((bitField0_ & 0x00000001) == 0x00000001);
5173     }
5174     /**
5175      * <code>optional int32 bus = 1;</code>
5176      */
5177     public int getBus() {
5178       return bus_;
5179     }
5180
5181     // optional uint32 message_id = 2;
5182     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
5183     private int messageId_;
5184     /**
5185      * <code>optional uint32 message_id = 2;</code>
5186      */
5187     public boolean hasMessageId() {
5188       return ((bitField0_ & 0x00000002) == 0x00000002);
5189     }
5190     /**
5191      * <code>optional uint32 message_id = 2;</code>
5192      */
5193     public int getMessageId() {
5194       return messageId_;
5195     }
5196
5197     // optional uint32 mode = 3;
5198     public static final int MODE_FIELD_NUMBER = 3;
5199     private int mode_;
5200     /**
5201      * <code>optional uint32 mode = 3;</code>
5202      */
5203     public boolean hasMode() {
5204       return ((bitField0_ & 0x00000004) == 0x00000004);
5205     }
5206     /**
5207      * <code>optional uint32 mode = 3;</code>
5208      */
5209     public int getMode() {
5210       return mode_;
5211     }
5212
5213     // optional uint32 pid = 4;
5214     public static final int PID_FIELD_NUMBER = 4;
5215     private int pid_;
5216     /**
5217      * <code>optional uint32 pid = 4;</code>
5218      */
5219     public boolean hasPid() {
5220       return ((bitField0_ & 0x00000008) == 0x00000008);
5221     }
5222     /**
5223      * <code>optional uint32 pid = 4;</code>
5224      */
5225     public int getPid() {
5226       return pid_;
5227     }
5228
5229     // optional bytes payload = 5;
5230     public static final int PAYLOAD_FIELD_NUMBER = 5;
5231     private com.google.protobuf.ByteString payload_;
5232     /**
5233      * <code>optional bytes payload = 5;</code>
5234      *
5235      * <pre>
5236      * TODO we are capping this at 8 bytes for now - need to change when we
5237      * support multi-frame responses
5238      * </pre>
5239      */
5240     public boolean hasPayload() {
5241       return ((bitField0_ & 0x00000010) == 0x00000010);
5242     }
5243     /**
5244      * <code>optional bytes payload = 5;</code>
5245      *
5246      * <pre>
5247      * TODO we are capping this at 8 bytes for now - need to change when we
5248      * support multi-frame responses
5249      * </pre>
5250      */
5251     public com.google.protobuf.ByteString getPayload() {
5252       return payload_;
5253     }
5254
5255     // optional bool multiple_responses = 6;
5256     public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6;
5257     private boolean multipleResponses_;
5258     /**
5259      * <code>optional bool multiple_responses = 6;</code>
5260      */
5261     public boolean hasMultipleResponses() {
5262       return ((bitField0_ & 0x00000020) == 0x00000020);
5263     }
5264     /**
5265      * <code>optional bool multiple_responses = 6;</code>
5266      */
5267     public boolean getMultipleResponses() {
5268       return multipleResponses_;
5269     }
5270
5271     // optional double frequency = 7;
5272     public static final int FREQUENCY_FIELD_NUMBER = 7;
5273     private double frequency_;
5274     /**
5275      * <code>optional double frequency = 7;</code>
5276      */
5277     public boolean hasFrequency() {
5278       return ((bitField0_ & 0x00000040) == 0x00000040);
5279     }
5280     /**
5281      * <code>optional double frequency = 7;</code>
5282      */
5283     public double getFrequency() {
5284       return frequency_;
5285     }
5286
5287     // optional string name = 8;
5288     public static final int NAME_FIELD_NUMBER = 8;
5289     private java.lang.Object name_;
5290     /**
5291      * <code>optional string name = 8;</code>
5292      */
5293     public boolean hasName() {
5294       return ((bitField0_ & 0x00000080) == 0x00000080);
5295     }
5296     /**
5297      * <code>optional string name = 8;</code>
5298      */
5299     public java.lang.String getName() {
5300       java.lang.Object ref = name_;
5301       if (ref instanceof java.lang.String) {
5302         return (java.lang.String) ref;
5303       } else {
5304         com.google.protobuf.ByteString bs = 
5305             (com.google.protobuf.ByteString) ref;
5306         java.lang.String s = bs.toStringUtf8();
5307         if (bs.isValidUtf8()) {
5308           name_ = s;
5309         }
5310         return s;
5311       }
5312     }
5313     /**
5314      * <code>optional string name = 8;</code>
5315      */
5316     public com.google.protobuf.ByteString
5317         getNameBytes() {
5318       java.lang.Object ref = name_;
5319       if (ref instanceof java.lang.String) {
5320         com.google.protobuf.ByteString b = 
5321             com.google.protobuf.ByteString.copyFromUtf8(
5322                 (java.lang.String) ref);
5323         name_ = b;
5324         return b;
5325       } else {
5326         return (com.google.protobuf.ByteString) ref;
5327       }
5328     }
5329
5330     // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;
5331     public static final int DECODED_TYPE_FIELD_NUMBER = 9;
5332     private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_;
5333     /**
5334      * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
5335      */
5336     public boolean hasDecodedType() {
5337       return ((bitField0_ & 0x00000100) == 0x00000100);
5338     }
5339     /**
5340      * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
5341      */
5342     public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() {
5343       return decodedType_;
5344     }
5345
5346     private void initFields() {
5347       bus_ = 0;
5348       messageId_ = 0;
5349       mode_ = 0;
5350       pid_ = 0;
5351       payload_ = com.google.protobuf.ByteString.EMPTY;
5352       multipleResponses_ = false;
5353       frequency_ = 0D;
5354       name_ = "";
5355       decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
5356     }
5357     private byte memoizedIsInitialized = -1;
5358     public final boolean isInitialized() {
5359       byte isInitialized = memoizedIsInitialized;
5360       if (isInitialized != -1) return isInitialized == 1;
5361
5362       memoizedIsInitialized = 1;
5363       return true;
5364     }
5365
5366     public void writeTo(com.google.protobuf.CodedOutputStream output)
5367                         throws java.io.IOException {
5368       getSerializedSize();
5369       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5370         output.writeInt32(1, bus_);
5371       }
5372       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5373         output.writeUInt32(2, messageId_);
5374       }
5375       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5376         output.writeUInt32(3, mode_);
5377       }
5378       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5379         output.writeUInt32(4, pid_);
5380       }
5381       if (((bitField0_ & 0x00000010) == 0x00000010)) {
5382         output.writeBytes(5, payload_);
5383       }
5384       if (((bitField0_ & 0x00000020) == 0x00000020)) {
5385         output.writeBool(6, multipleResponses_);
5386       }
5387       if (((bitField0_ & 0x00000040) == 0x00000040)) {
5388         output.writeDouble(7, frequency_);
5389       }
5390       if (((bitField0_ & 0x00000080) == 0x00000080)) {
5391         output.writeBytes(8, getNameBytes());
5392       }
5393       if (((bitField0_ & 0x00000100) == 0x00000100)) {
5394         output.writeEnum(9, decodedType_.getNumber());
5395       }
5396       getUnknownFields().writeTo(output);
5397     }
5398
5399     private int memoizedSerializedSize = -1;
5400     public int getSerializedSize() {
5401       int size = memoizedSerializedSize;
5402       if (size != -1) return size;
5403
5404       size = 0;
5405       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5406         size += com.google.protobuf.CodedOutputStream
5407           .computeInt32Size(1, bus_);
5408       }
5409       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5410         size += com.google.protobuf.CodedOutputStream
5411           .computeUInt32Size(2, messageId_);
5412       }
5413       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5414         size += com.google.protobuf.CodedOutputStream
5415           .computeUInt32Size(3, mode_);
5416       }
5417       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5418         size += com.google.protobuf.CodedOutputStream
5419           .computeUInt32Size(4, pid_);
5420       }
5421       if (((bitField0_ & 0x00000010) == 0x00000010)) {
5422         size += com.google.protobuf.CodedOutputStream
5423           .computeBytesSize(5, payload_);
5424       }
5425       if (((bitField0_ & 0x00000020) == 0x00000020)) {
5426         size += com.google.protobuf.CodedOutputStream
5427           .computeBoolSize(6, multipleResponses_);
5428       }
5429       if (((bitField0_ & 0x00000040) == 0x00000040)) {
5430         size += com.google.protobuf.CodedOutputStream
5431           .computeDoubleSize(7, frequency_);
5432       }
5433       if (((bitField0_ & 0x00000080) == 0x00000080)) {
5434         size += com.google.protobuf.CodedOutputStream
5435           .computeBytesSize(8, getNameBytes());
5436       }
5437       if (((bitField0_ & 0x00000100) == 0x00000100)) {
5438         size += com.google.protobuf.CodedOutputStream
5439           .computeEnumSize(9, decodedType_.getNumber());
5440       }
5441       size += getUnknownFields().getSerializedSize();
5442       memoizedSerializedSize = size;
5443       return size;
5444     }
5445
5446     private static final long serialVersionUID = 0L;
5447     @java.lang.Override
5448     protected java.lang.Object writeReplace()
5449         throws java.io.ObjectStreamException {
5450       return super.writeReplace();
5451     }
5452
5453     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
5454         com.google.protobuf.ByteString data)
5455         throws com.google.protobuf.InvalidProtocolBufferException {
5456       return PARSER.parseFrom(data);
5457     }
5458     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
5459         com.google.protobuf.ByteString data,
5460         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5461         throws com.google.protobuf.InvalidProtocolBufferException {
5462       return PARSER.parseFrom(data, extensionRegistry);
5463     }
5464     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data)
5465         throws com.google.protobuf.InvalidProtocolBufferException {
5466       return PARSER.parseFrom(data);
5467     }
5468     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
5469         byte[] data,
5470         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5471         throws com.google.protobuf.InvalidProtocolBufferException {
5472       return PARSER.parseFrom(data, extensionRegistry);
5473     }
5474     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input)
5475         throws java.io.IOException {
5476       return PARSER.parseFrom(input);
5477     }
5478     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
5479         java.io.InputStream input,
5480         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5481         throws java.io.IOException {
5482       return PARSER.parseFrom(input, extensionRegistry);
5483     }
5484     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input)
5485         throws java.io.IOException {
5486       return PARSER.parseDelimitedFrom(input);
5487     }
5488     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(
5489         java.io.InputStream input,
5490         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5491         throws java.io.IOException {
5492       return PARSER.parseDelimitedFrom(input, extensionRegistry);
5493     }
5494     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
5495         com.google.protobuf.CodedInputStream input)
5496         throws java.io.IOException {
5497       return PARSER.parseFrom(input);
5498     }
5499     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
5500         com.google.protobuf.CodedInputStream input,
5501         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5502         throws java.io.IOException {
5503       return PARSER.parseFrom(input, extensionRegistry);
5504     }
5505
5506     public static Builder newBuilder() { return Builder.create(); }
5507     public Builder newBuilderForType() { return newBuilder(); }
5508     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) {
5509       return newBuilder().mergeFrom(prototype);
5510     }
5511     public Builder toBuilder() { return newBuilder(this); }
5512
5513     @java.lang.Override
5514     protected Builder newBuilderForType(
5515         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5516       Builder builder = new Builder(parent);
5517       return builder;
5518     }
5519     /**
5520      * Protobuf type {@code openxc.DiagnosticRequest}
5521      */
5522     public static final class Builder extends
5523         com.google.protobuf.GeneratedMessage.Builder<Builder>
5524        implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder {
5525       public static final com.google.protobuf.Descriptors.Descriptor
5526           getDescriptor() {
5527         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
5528       }
5529
5530       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5531           internalGetFieldAccessorTable() {
5532         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
5533             .ensureFieldAccessorsInitialized(
5534                 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
5535       }
5536
5537       // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder()
5538       private Builder() {
5539         maybeForceBuilderInitialization();
5540       }
5541
5542       private Builder(
5543           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5544         super(parent);
5545         maybeForceBuilderInitialization();
5546       }
5547       private void maybeForceBuilderInitialization() {
5548         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
5549         }
5550       }
5551       private static Builder create() {
5552         return new Builder();
5553       }
5554
5555       public Builder clear() {
5556         super.clear();
5557         bus_ = 0;
5558         bitField0_ = (bitField0_ & ~0x00000001);
5559         messageId_ = 0;
5560         bitField0_ = (bitField0_ & ~0x00000002);
5561         mode_ = 0;
5562         bitField0_ = (bitField0_ & ~0x00000004);
5563         pid_ = 0;
5564         bitField0_ = (bitField0_ & ~0x00000008);
5565         payload_ = com.google.protobuf.ByteString.EMPTY;
5566         bitField0_ = (bitField0_ & ~0x00000010);
5567         multipleResponses_ = false;
5568         bitField0_ = (bitField0_ & ~0x00000020);
5569         frequency_ = 0D;
5570         bitField0_ = (bitField0_ & ~0x00000040);
5571         name_ = "";
5572         bitField0_ = (bitField0_ & ~0x00000080);
5573         decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
5574         bitField0_ = (bitField0_ & ~0x00000100);
5575         return this;
5576       }
5577
5578       public Builder clone() {
5579         return create().mergeFrom(buildPartial());
5580       }
5581
5582       public com.google.protobuf.Descriptors.Descriptor
5583           getDescriptorForType() {
5584         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
5585       }
5586
5587       public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() {
5588         return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
5589       }
5590
5591       public com.openxc.BinaryMessages.DiagnosticRequest build() {
5592         com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial();
5593         if (!result.isInitialized()) {
5594           throw newUninitializedMessageException(result);
5595         }
5596         return result;
5597       }
5598
5599       public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() {
5600         com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this);
5601         int from_bitField0_ = bitField0_;
5602         int to_bitField0_ = 0;
5603         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
5604           to_bitField0_ |= 0x00000001;
5605         }
5606         result.bus_ = bus_;
5607         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
5608           to_bitField0_ |= 0x00000002;
5609         }
5610         result.messageId_ = messageId_;
5611         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5612           to_bitField0_ |= 0x00000004;
5613         }
5614         result.mode_ = mode_;
5615         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5616           to_bitField0_ |= 0x00000008;
5617         }
5618         result.pid_ = pid_;
5619         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
5620           to_bitField0_ |= 0x00000010;
5621         }
5622         result.payload_ = payload_;
5623         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
5624           to_bitField0_ |= 0x00000020;
5625         }
5626         result.multipleResponses_ = multipleResponses_;
5627         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
5628           to_bitField0_ |= 0x00000040;
5629         }
5630         result.frequency_ = frequency_;
5631         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
5632           to_bitField0_ |= 0x00000080;
5633         }
5634         result.name_ = name_;
5635         if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
5636           to_bitField0_ |= 0x00000100;
5637         }
5638         result.decodedType_ = decodedType_;
5639         result.bitField0_ = to_bitField0_;
5640         onBuilt();
5641         return result;
5642       }
5643
5644       public Builder mergeFrom(com.google.protobuf.Message other) {
5645         if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) {
5646           return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other);
5647         } else {
5648           super.mergeFrom(other);
5649           return this;
5650         }
5651       }
5652
5653       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) {
5654         if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this;
5655         if (other.hasBus()) {
5656           setBus(other.getBus());
5657         }
5658         if (other.hasMessageId()) {
5659           setMessageId(other.getMessageId());
5660         }
5661         if (other.hasMode()) {
5662           setMode(other.getMode());
5663         }
5664         if (other.hasPid()) {
5665           setPid(other.getPid());
5666         }
5667         if (other.hasPayload()) {
5668           setPayload(other.getPayload());
5669         }
5670         if (other.hasMultipleResponses()) {
5671           setMultipleResponses(other.getMultipleResponses());
5672         }
5673         if (other.hasFrequency()) {
5674           setFrequency(other.getFrequency());
5675         }
5676         if (other.hasName()) {
5677           bitField0_ |= 0x00000080;
5678           name_ = other.name_;
5679           onChanged();
5680         }
5681         if (other.hasDecodedType()) {
5682           setDecodedType(other.getDecodedType());
5683         }
5684         this.mergeUnknownFields(other.getUnknownFields());
5685         return this;
5686       }
5687
5688       public final boolean isInitialized() {
5689         return true;
5690       }
5691
5692       public Builder mergeFrom(
5693           com.google.protobuf.CodedInputStream input,
5694           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5695           throws java.io.IOException {
5696         com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null;
5697         try {
5698           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5699         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5700           parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage();
5701           throw e;
5702         } finally {
5703           if (parsedMessage != null) {
5704             mergeFrom(parsedMessage);
5705           }
5706         }
5707         return this;
5708       }
5709       private int bitField0_;
5710
5711       // optional int32 bus = 1;
5712       private int bus_ ;
5713       /**
5714        * <code>optional int32 bus = 1;</code>
5715        */
5716       public boolean hasBus() {
5717         return ((bitField0_ & 0x00000001) == 0x00000001);
5718       }
5719       /**
5720        * <code>optional int32 bus = 1;</code>
5721        */
5722       public int getBus() {
5723         return bus_;
5724       }
5725       /**
5726        * <code>optional int32 bus = 1;</code>
5727        */
5728       public Builder setBus(int value) {
5729         bitField0_ |= 0x00000001;
5730         bus_ = value;
5731         onChanged();
5732         return this;
5733       }
5734       /**
5735        * <code>optional int32 bus = 1;</code>
5736        */
5737       public Builder clearBus() {
5738         bitField0_ = (bitField0_ & ~0x00000001);
5739         bus_ = 0;
5740         onChanged();
5741         return this;
5742       }
5743
5744       // optional uint32 message_id = 2;
5745       private int messageId_ ;
5746       /**
5747        * <code>optional uint32 message_id = 2;</code>
5748        */
5749       public boolean hasMessageId() {
5750         return ((bitField0_ & 0x00000002) == 0x00000002);
5751       }
5752       /**
5753        * <code>optional uint32 message_id = 2;</code>
5754        */
5755       public int getMessageId() {
5756         return messageId_;
5757       }
5758       /**
5759        * <code>optional uint32 message_id = 2;</code>
5760        */
5761       public Builder setMessageId(int value) {
5762         bitField0_ |= 0x00000002;
5763         messageId_ = value;
5764         onChanged();
5765         return this;
5766       }
5767       /**
5768        * <code>optional uint32 message_id = 2;</code>
5769        */
5770       public Builder clearMessageId() {
5771         bitField0_ = (bitField0_ & ~0x00000002);
5772         messageId_ = 0;
5773         onChanged();
5774         return this;
5775       }
5776
5777       // optional uint32 mode = 3;
5778       private int mode_ ;
5779       /**
5780        * <code>optional uint32 mode = 3;</code>
5781        */
5782       public boolean hasMode() {
5783         return ((bitField0_ & 0x00000004) == 0x00000004);
5784       }
5785       /**
5786        * <code>optional uint32 mode = 3;</code>
5787        */
5788       public int getMode() {
5789         return mode_;
5790       }
5791       /**
5792        * <code>optional uint32 mode = 3;</code>
5793        */
5794       public Builder setMode(int value) {
5795         bitField0_ |= 0x00000004;
5796         mode_ = value;
5797         onChanged();
5798         return this;
5799       }
5800       /**
5801        * <code>optional uint32 mode = 3;</code>
5802        */
5803       public Builder clearMode() {
5804         bitField0_ = (bitField0_ & ~0x00000004);
5805         mode_ = 0;
5806         onChanged();
5807         return this;
5808       }
5809
5810       // optional uint32 pid = 4;
5811       private int pid_ ;
5812       /**
5813        * <code>optional uint32 pid = 4;</code>
5814        */
5815       public boolean hasPid() {
5816         return ((bitField0_ & 0x00000008) == 0x00000008);
5817       }
5818       /**
5819        * <code>optional uint32 pid = 4;</code>
5820        */
5821       public int getPid() {
5822         return pid_;
5823       }
5824       /**
5825        * <code>optional uint32 pid = 4;</code>
5826        */
5827       public Builder setPid(int value) {
5828         bitField0_ |= 0x00000008;
5829         pid_ = value;
5830         onChanged();
5831         return this;
5832       }
5833       /**
5834        * <code>optional uint32 pid = 4;</code>
5835        */
5836       public Builder clearPid() {
5837         bitField0_ = (bitField0_ & ~0x00000008);
5838         pid_ = 0;
5839         onChanged();
5840         return this;
5841       }
5842
5843       // optional bytes payload = 5;
5844       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
5845       /**
5846        * <code>optional bytes payload = 5;</code>
5847        *
5848        * <pre>
5849        * TODO we are capping this at 8 bytes for now - need to change when we
5850        * support multi-frame responses
5851        * </pre>
5852        */
5853       public boolean hasPayload() {
5854         return ((bitField0_ & 0x00000010) == 0x00000010);
5855       }
5856       /**
5857        * <code>optional bytes payload = 5;</code>
5858        *
5859        * <pre>
5860        * TODO we are capping this at 8 bytes for now - need to change when we
5861        * support multi-frame responses
5862        * </pre>
5863        */
5864       public com.google.protobuf.ByteString getPayload() {
5865         return payload_;
5866       }
5867       /**
5868        * <code>optional bytes payload = 5;</code>
5869        *
5870        * <pre>
5871        * TODO we are capping this at 8 bytes for now - need to change when we
5872        * support multi-frame responses
5873        * </pre>
5874        */
5875       public Builder setPayload(com.google.protobuf.ByteString value) {
5876         if (value == null) {
5877     throw new NullPointerException();
5878   }
5879   bitField0_ |= 0x00000010;
5880         payload_ = value;
5881         onChanged();
5882         return this;
5883       }
5884       /**
5885        * <code>optional bytes payload = 5;</code>
5886        *
5887        * <pre>
5888        * TODO we are capping this at 8 bytes for now - need to change when we
5889        * support multi-frame responses
5890        * </pre>
5891        */
5892       public Builder clearPayload() {
5893         bitField0_ = (bitField0_ & ~0x00000010);
5894         payload_ = getDefaultInstance().getPayload();
5895         onChanged();
5896         return this;
5897       }
5898
5899       // optional bool multiple_responses = 6;
5900       private boolean multipleResponses_ ;
5901       /**
5902        * <code>optional bool multiple_responses = 6;</code>
5903        */
5904       public boolean hasMultipleResponses() {
5905         return ((bitField0_ & 0x00000020) == 0x00000020);
5906       }
5907       /**
5908        * <code>optional bool multiple_responses = 6;</code>
5909        */
5910       public boolean getMultipleResponses() {
5911         return multipleResponses_;
5912       }
5913       /**
5914        * <code>optional bool multiple_responses = 6;</code>
5915        */
5916       public Builder setMultipleResponses(boolean value) {
5917         bitField0_ |= 0x00000020;
5918         multipleResponses_ = value;
5919         onChanged();
5920         return this;
5921       }
5922       /**
5923        * <code>optional bool multiple_responses = 6;</code>
5924        */
5925       public Builder clearMultipleResponses() {
5926         bitField0_ = (bitField0_ & ~0x00000020);
5927         multipleResponses_ = false;
5928         onChanged();
5929         return this;
5930       }
5931
5932       // optional double frequency = 7;
5933       private double frequency_ ;
5934       /**
5935        * <code>optional double frequency = 7;</code>
5936        */
5937       public boolean hasFrequency() {
5938         return ((bitField0_ & 0x00000040) == 0x00000040);
5939       }
5940       /**
5941        * <code>optional double frequency = 7;</code>
5942        */
5943       public double getFrequency() {
5944         return frequency_;
5945       }
5946       /**
5947        * <code>optional double frequency = 7;</code>
5948        */
5949       public Builder setFrequency(double value) {
5950         bitField0_ |= 0x00000040;
5951         frequency_ = value;
5952         onChanged();
5953         return this;
5954       }
5955       /**
5956        * <code>optional double frequency = 7;</code>
5957        */
5958       public Builder clearFrequency() {
5959         bitField0_ = (bitField0_ & ~0x00000040);
5960         frequency_ = 0D;
5961         onChanged();
5962         return this;
5963       }
5964
5965       // optional string name = 8;
5966       private java.lang.Object name_ = "";
5967       /**
5968        * <code>optional string name = 8;</code>
5969        */
5970       public boolean hasName() {
5971         return ((bitField0_ & 0x00000080) == 0x00000080);
5972       }
5973       /**
5974        * <code>optional string name = 8;</code>
5975        */
5976       public java.lang.String getName() {
5977         java.lang.Object ref = name_;
5978         if (!(ref instanceof java.lang.String)) {
5979           java.lang.String s = ((com.google.protobuf.ByteString) ref)
5980               .toStringUtf8();
5981           name_ = s;
5982           return s;
5983         } else {
5984           return (java.lang.String) ref;
5985         }
5986       }
5987       /**
5988        * <code>optional string name = 8;</code>
5989        */
5990       public com.google.protobuf.ByteString
5991           getNameBytes() {
5992         java.lang.Object ref = name_;
5993         if (ref instanceof String) {
5994           com.google.protobuf.ByteString b = 
5995               com.google.protobuf.ByteString.copyFromUtf8(
5996                   (java.lang.String) ref);
5997           name_ = b;
5998           return b;
5999         } else {
6000           return (com.google.protobuf.ByteString) ref;
6001         }
6002       }
6003       /**
6004        * <code>optional string name = 8;</code>
6005        */
6006       public Builder setName(
6007           java.lang.String value) {
6008         if (value == null) {
6009     throw new NullPointerException();
6010   }
6011   bitField0_ |= 0x00000080;
6012         name_ = value;
6013         onChanged();
6014         return this;
6015       }
6016       /**
6017        * <code>optional string name = 8;</code>
6018        */
6019       public Builder clearName() {
6020         bitField0_ = (bitField0_ & ~0x00000080);
6021         name_ = getDefaultInstance().getName();
6022         onChanged();
6023         return this;
6024       }
6025       /**
6026        * <code>optional string name = 8;</code>
6027        */
6028       public Builder setNameBytes(
6029           com.google.protobuf.ByteString value) {
6030         if (value == null) {
6031     throw new NullPointerException();
6032   }
6033   bitField0_ |= 0x00000080;
6034         name_ = value;
6035         onChanged();
6036         return this;
6037       }
6038
6039       // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;
6040       private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
6041       /**
6042        * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
6043        */
6044       public boolean hasDecodedType() {
6045         return ((bitField0_ & 0x00000100) == 0x00000100);
6046       }
6047       /**
6048        * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
6049        */
6050       public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() {
6051         return decodedType_;
6052       }
6053       /**
6054        * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
6055        */
6056       public Builder setDecodedType(com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value) {
6057         if (value == null) {
6058           throw new NullPointerException();
6059         }
6060         bitField0_ |= 0x00000100;
6061         decodedType_ = value;
6062         onChanged();
6063         return this;
6064       }
6065       /**
6066        * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
6067        */
6068       public Builder clearDecodedType() {
6069         bitField0_ = (bitField0_ & ~0x00000100);
6070         decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
6071         onChanged();
6072         return this;
6073       }
6074
6075       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest)
6076     }
6077
6078     static {
6079       defaultInstance = new DiagnosticRequest(true);
6080       defaultInstance.initFields();
6081     }
6082
6083     // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest)
6084   }
6085
6086   public interface DiagnosticResponseOrBuilder
6087       extends com.google.protobuf.MessageOrBuilder {
6088
6089     // optional int32 bus = 1;
6090     /**
6091      * <code>optional int32 bus = 1;</code>
6092      */
6093     boolean hasBus();
6094     /**
6095      * <code>optional int32 bus = 1;</code>
6096      */
6097     int getBus();
6098
6099     // optional uint32 message_id = 2;
6100     /**
6101      * <code>optional uint32 message_id = 2;</code>
6102      */
6103     boolean hasMessageId();
6104     /**
6105      * <code>optional uint32 message_id = 2;</code>
6106      */
6107     int getMessageId();
6108
6109     // optional uint32 mode = 3;
6110     /**
6111      * <code>optional uint32 mode = 3;</code>
6112      */
6113     boolean hasMode();
6114     /**
6115      * <code>optional uint32 mode = 3;</code>
6116      */
6117     int getMode();
6118
6119     // optional uint32 pid = 4;
6120     /**
6121      * <code>optional uint32 pid = 4;</code>
6122      */
6123     boolean hasPid();
6124     /**
6125      * <code>optional uint32 pid = 4;</code>
6126      */
6127     int getPid();
6128
6129     // optional bool success = 5;
6130     /**
6131      * <code>optional bool success = 5;</code>
6132      */
6133     boolean hasSuccess();
6134     /**
6135      * <code>optional bool success = 5;</code>
6136      */
6137     boolean getSuccess();
6138
6139     // optional uint32 negative_response_code = 6;
6140     /**
6141      * <code>optional uint32 negative_response_code = 6;</code>
6142      */
6143     boolean hasNegativeResponseCode();
6144     /**
6145      * <code>optional uint32 negative_response_code = 6;</code>
6146      */
6147     int getNegativeResponseCode();
6148
6149     // optional bytes payload = 7;
6150     /**
6151      * <code>optional bytes payload = 7;</code>
6152      *
6153      * <pre>
6154      * TODO we are capping this at 8 bytes for now - need to change when we
6155      * support multi-frame responses
6156      * </pre>
6157      */
6158     boolean hasPayload();
6159     /**
6160      * <code>optional bytes payload = 7;</code>
6161      *
6162      * <pre>
6163      * TODO we are capping this at 8 bytes for now - need to change when we
6164      * support multi-frame responses
6165      * </pre>
6166      */
6167     com.google.protobuf.ByteString getPayload();
6168
6169     // optional double value = 8;
6170     /**
6171      * <code>optional double value = 8;</code>
6172      */
6173     boolean hasValue();
6174     /**
6175      * <code>optional double value = 8;</code>
6176      */
6177     double getValue();
6178   }
6179   /**
6180    * Protobuf type {@code openxc.DiagnosticResponse}
6181    */
6182   public static final class DiagnosticResponse extends
6183       com.google.protobuf.GeneratedMessage
6184       implements DiagnosticResponseOrBuilder {
6185     // Use DiagnosticResponse.newBuilder() to construct.
6186     private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
6187       super(builder);
6188       this.unknownFields = builder.getUnknownFields();
6189     }
6190     private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
6191
6192     private static final DiagnosticResponse defaultInstance;
6193     public static DiagnosticResponse getDefaultInstance() {
6194       return defaultInstance;
6195     }
6196
6197     public DiagnosticResponse getDefaultInstanceForType() {
6198       return defaultInstance;
6199     }
6200
6201     private final com.google.protobuf.UnknownFieldSet unknownFields;
6202     @java.lang.Override
6203     public final com.google.protobuf.UnknownFieldSet
6204         getUnknownFields() {
6205       return this.unknownFields;
6206     }
6207     private DiagnosticResponse(
6208         com.google.protobuf.CodedInputStream input,
6209         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6210         throws com.google.protobuf.InvalidProtocolBufferException {
6211       initFields();
6212       int mutable_bitField0_ = 0;
6213       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
6214           com.google.protobuf.UnknownFieldSet.newBuilder();
6215       try {
6216         boolean done = false;
6217         while (!done) {
6218           int tag = input.readTag();
6219           switch (tag) {
6220             case 0:
6221               done = true;
6222               break;
6223             default: {
6224               if (!parseUnknownField(input, unknownFields,
6225                                      extensionRegistry, tag)) {
6226                 done = true;
6227               }
6228               break;
6229             }
6230             case 8: {
6231               bitField0_ |= 0x00000001;
6232               bus_ = input.readInt32();
6233               break;
6234             }
6235             case 16: {
6236               bitField0_ |= 0x00000002;
6237               messageId_ = input.readUInt32();
6238               break;
6239             }
6240             case 24: {
6241               bitField0_ |= 0x00000004;
6242               mode_ = input.readUInt32();
6243               break;
6244             }
6245             case 32: {
6246               bitField0_ |= 0x00000008;
6247               pid_ = input.readUInt32();
6248               break;
6249             }
6250             case 40: {
6251               bitField0_ |= 0x00000010;
6252               success_ = input.readBool();
6253               break;
6254             }
6255             case 48: {
6256               bitField0_ |= 0x00000020;
6257               negativeResponseCode_ = input.readUInt32();
6258               break;
6259             }
6260             case 58: {
6261               bitField0_ |= 0x00000040;
6262               payload_ = input.readBytes();
6263               break;
6264             }
6265             case 65: {
6266               bitField0_ |= 0x00000080;
6267               value_ = input.readDouble();
6268               break;
6269             }
6270           }
6271         }
6272       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6273         throw e.setUnfinishedMessage(this);
6274       } catch (java.io.IOException e) {
6275         throw new com.google.protobuf.InvalidProtocolBufferException(
6276             e.getMessage()).setUnfinishedMessage(this);
6277       } finally {
6278         this.unknownFields = unknownFields.build();
6279         makeExtensionsImmutable();
6280       }
6281     }
6282     public static final com.google.protobuf.Descriptors.Descriptor
6283         getDescriptor() {
6284       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
6285     }
6286
6287     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6288         internalGetFieldAccessorTable() {
6289       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
6290           .ensureFieldAccessorsInitialized(
6291               com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
6292     }
6293
6294     public static com.google.protobuf.Parser<DiagnosticResponse> PARSER =
6295         new com.google.protobuf.AbstractParser<DiagnosticResponse>() {
6296       public DiagnosticResponse parsePartialFrom(
6297           com.google.protobuf.CodedInputStream input,
6298           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6299           throws com.google.protobuf.InvalidProtocolBufferException {
6300         return new DiagnosticResponse(input, extensionRegistry);
6301       }
6302     };
6303
6304     @java.lang.Override
6305     public com.google.protobuf.Parser<DiagnosticResponse> getParserForType() {
6306       return PARSER;
6307     }
6308
6309     private int bitField0_;
6310     // optional int32 bus = 1;
6311     public static final int BUS_FIELD_NUMBER = 1;
6312     private int bus_;
6313     /**
6314      * <code>optional int32 bus = 1;</code>
6315      */
6316     public boolean hasBus() {
6317       return ((bitField0_ & 0x00000001) == 0x00000001);
6318     }
6319     /**
6320      * <code>optional int32 bus = 1;</code>
6321      */
6322     public int getBus() {
6323       return bus_;
6324     }
6325
6326     // optional uint32 message_id = 2;
6327     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
6328     private int messageId_;
6329     /**
6330      * <code>optional uint32 message_id = 2;</code>
6331      */
6332     public boolean hasMessageId() {
6333       return ((bitField0_ & 0x00000002) == 0x00000002);
6334     }
6335     /**
6336      * <code>optional uint32 message_id = 2;</code>
6337      */
6338     public int getMessageId() {
6339       return messageId_;
6340     }
6341
6342     // optional uint32 mode = 3;
6343     public static final int MODE_FIELD_NUMBER = 3;
6344     private int mode_;
6345     /**
6346      * <code>optional uint32 mode = 3;</code>
6347      */
6348     public boolean hasMode() {
6349       return ((bitField0_ & 0x00000004) == 0x00000004);
6350     }
6351     /**
6352      * <code>optional uint32 mode = 3;</code>
6353      */
6354     public int getMode() {
6355       return mode_;
6356     }
6357
6358     // optional uint32 pid = 4;
6359     public static final int PID_FIELD_NUMBER = 4;
6360     private int pid_;
6361     /**
6362      * <code>optional uint32 pid = 4;</code>
6363      */
6364     public boolean hasPid() {
6365       return ((bitField0_ & 0x00000008) == 0x00000008);
6366     }
6367     /**
6368      * <code>optional uint32 pid = 4;</code>
6369      */
6370     public int getPid() {
6371       return pid_;
6372     }
6373
6374     // optional bool success = 5;
6375     public static final int SUCCESS_FIELD_NUMBER = 5;
6376     private boolean success_;
6377     /**
6378      * <code>optional bool success = 5;</code>
6379      */
6380     public boolean hasSuccess() {
6381       return ((bitField0_ & 0x00000010) == 0x00000010);
6382     }
6383     /**
6384      * <code>optional bool success = 5;</code>
6385      */
6386     public boolean getSuccess() {
6387       return success_;
6388     }
6389
6390     // optional uint32 negative_response_code = 6;
6391     public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
6392     private int negativeResponseCode_;
6393     /**
6394      * <code>optional uint32 negative_response_code = 6;</code>
6395      */
6396     public boolean hasNegativeResponseCode() {
6397       return ((bitField0_ & 0x00000020) == 0x00000020);
6398     }
6399     /**
6400      * <code>optional uint32 negative_response_code = 6;</code>
6401      */
6402     public int getNegativeResponseCode() {
6403       return negativeResponseCode_;
6404     }
6405
6406     // optional bytes payload = 7;
6407     public static final int PAYLOAD_FIELD_NUMBER = 7;
6408     private com.google.protobuf.ByteString payload_;
6409     /**
6410      * <code>optional bytes payload = 7;</code>
6411      *
6412      * <pre>
6413      * TODO we are capping this at 8 bytes for now - need to change when we
6414      * support multi-frame responses
6415      * </pre>
6416      */
6417     public boolean hasPayload() {
6418       return ((bitField0_ & 0x00000040) == 0x00000040);
6419     }
6420     /**
6421      * <code>optional bytes payload = 7;</code>
6422      *
6423      * <pre>
6424      * TODO we are capping this at 8 bytes for now - need to change when we
6425      * support multi-frame responses
6426      * </pre>
6427      */
6428     public com.google.protobuf.ByteString getPayload() {
6429       return payload_;
6430     }
6431
6432     // optional double value = 8;
6433     public static final int VALUE_FIELD_NUMBER = 8;
6434     private double value_;
6435     /**
6436      * <code>optional double value = 8;</code>
6437      */
6438     public boolean hasValue() {
6439       return ((bitField0_ & 0x00000080) == 0x00000080);
6440     }
6441     /**
6442      * <code>optional double value = 8;</code>
6443      */
6444     public double getValue() {
6445       return value_;
6446     }
6447
6448     private void initFields() {
6449       bus_ = 0;
6450       messageId_ = 0;
6451       mode_ = 0;
6452       pid_ = 0;
6453       success_ = false;
6454       negativeResponseCode_ = 0;
6455       payload_ = com.google.protobuf.ByteString.EMPTY;
6456       value_ = 0D;
6457     }
6458     private byte memoizedIsInitialized = -1;
6459     public final boolean isInitialized() {
6460       byte isInitialized = memoizedIsInitialized;
6461       if (isInitialized != -1) return isInitialized == 1;
6462
6463       memoizedIsInitialized = 1;
6464       return true;
6465     }
6466
6467     public void writeTo(com.google.protobuf.CodedOutputStream output)
6468                         throws java.io.IOException {
6469       getSerializedSize();
6470       if (((bitField0_ & 0x00000001) == 0x00000001)) {
6471         output.writeInt32(1, bus_);
6472       }
6473       if (((bitField0_ & 0x00000002) == 0x00000002)) {
6474         output.writeUInt32(2, messageId_);
6475       }
6476       if (((bitField0_ & 0x00000004) == 0x00000004)) {
6477         output.writeUInt32(3, mode_);
6478       }
6479       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6480         output.writeUInt32(4, pid_);
6481       }
6482       if (((bitField0_ & 0x00000010) == 0x00000010)) {
6483         output.writeBool(5, success_);
6484       }
6485       if (((bitField0_ & 0x00000020) == 0x00000020)) {
6486         output.writeUInt32(6, negativeResponseCode_);
6487       }
6488       if (((bitField0_ & 0x00000040) == 0x00000040)) {
6489         output.writeBytes(7, payload_);
6490       }
6491       if (((bitField0_ & 0x00000080) == 0x00000080)) {
6492         output.writeDouble(8, value_);
6493       }
6494       getUnknownFields().writeTo(output);
6495     }
6496
6497     private int memoizedSerializedSize = -1;
6498     public int getSerializedSize() {
6499       int size = memoizedSerializedSize;
6500       if (size != -1) return size;
6501
6502       size = 0;
6503       if (((bitField0_ & 0x00000001) == 0x00000001)) {
6504         size += com.google.protobuf.CodedOutputStream
6505           .computeInt32Size(1, bus_);
6506       }
6507       if (((bitField0_ & 0x00000002) == 0x00000002)) {
6508         size += com.google.protobuf.CodedOutputStream
6509           .computeUInt32Size(2, messageId_);
6510       }
6511       if (((bitField0_ & 0x00000004) == 0x00000004)) {
6512         size += com.google.protobuf.CodedOutputStream
6513           .computeUInt32Size(3, mode_);
6514       }
6515       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6516         size += com.google.protobuf.CodedOutputStream
6517           .computeUInt32Size(4, pid_);
6518       }
6519       if (((bitField0_ & 0x00000010) == 0x00000010)) {
6520         size += com.google.protobuf.CodedOutputStream
6521           .computeBoolSize(5, success_);
6522       }
6523       if (((bitField0_ & 0x00000020) == 0x00000020)) {
6524         size += com.google.protobuf.CodedOutputStream
6525           .computeUInt32Size(6, negativeResponseCode_);
6526       }
6527       if (((bitField0_ & 0x00000040) == 0x00000040)) {
6528         size += com.google.protobuf.CodedOutputStream
6529           .computeBytesSize(7, payload_);
6530       }
6531       if (((bitField0_ & 0x00000080) == 0x00000080)) {
6532         size += com.google.protobuf.CodedOutputStream
6533           .computeDoubleSize(8, value_);
6534       }
6535       size += getUnknownFields().getSerializedSize();
6536       memoizedSerializedSize = size;
6537       return size;
6538     }
6539
6540     private static final long serialVersionUID = 0L;
6541     @java.lang.Override
6542     protected java.lang.Object writeReplace()
6543         throws java.io.ObjectStreamException {
6544       return super.writeReplace();
6545     }
6546
6547     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
6548         com.google.protobuf.ByteString data)
6549         throws com.google.protobuf.InvalidProtocolBufferException {
6550       return PARSER.parseFrom(data);
6551     }
6552     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
6553         com.google.protobuf.ByteString data,
6554         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6555         throws com.google.protobuf.InvalidProtocolBufferException {
6556       return PARSER.parseFrom(data, extensionRegistry);
6557     }
6558     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data)
6559         throws com.google.protobuf.InvalidProtocolBufferException {
6560       return PARSER.parseFrom(data);
6561     }
6562     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
6563         byte[] data,
6564         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6565         throws com.google.protobuf.InvalidProtocolBufferException {
6566       return PARSER.parseFrom(data, extensionRegistry);
6567     }
6568     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input)
6569         throws java.io.IOException {
6570       return PARSER.parseFrom(input);
6571     }
6572     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
6573         java.io.InputStream input,
6574         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6575         throws java.io.IOException {
6576       return PARSER.parseFrom(input, extensionRegistry);
6577     }
6578     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input)
6579         throws java.io.IOException {
6580       return PARSER.parseDelimitedFrom(input);
6581     }
6582     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(
6583         java.io.InputStream input,
6584         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6585         throws java.io.IOException {
6586       return PARSER.parseDelimitedFrom(input, extensionRegistry);
6587     }
6588     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
6589         com.google.protobuf.CodedInputStream input)
6590         throws java.io.IOException {
6591       return PARSER.parseFrom(input);
6592     }
6593     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
6594         com.google.protobuf.CodedInputStream input,
6595         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6596         throws java.io.IOException {
6597       return PARSER.parseFrom(input, extensionRegistry);
6598     }
6599
6600     public static Builder newBuilder() { return Builder.create(); }
6601     public Builder newBuilderForType() { return newBuilder(); }
6602     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) {
6603       return newBuilder().mergeFrom(prototype);
6604     }
6605     public Builder toBuilder() { return newBuilder(this); }
6606
6607     @java.lang.Override
6608     protected Builder newBuilderForType(
6609         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6610       Builder builder = new Builder(parent);
6611       return builder;
6612     }
6613     /**
6614      * Protobuf type {@code openxc.DiagnosticResponse}
6615      */
6616     public static final class Builder extends
6617         com.google.protobuf.GeneratedMessage.Builder<Builder>
6618        implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder {
6619       public static final com.google.protobuf.Descriptors.Descriptor
6620           getDescriptor() {
6621         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
6622       }
6623
6624       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6625           internalGetFieldAccessorTable() {
6626         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
6627             .ensureFieldAccessorsInitialized(
6628                 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
6629       }
6630
6631       // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder()
6632       private Builder() {
6633         maybeForceBuilderInitialization();
6634       }
6635
6636       private Builder(
6637           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6638         super(parent);
6639         maybeForceBuilderInitialization();
6640       }
6641       private void maybeForceBuilderInitialization() {
6642         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
6643         }
6644       }
6645       private static Builder create() {
6646         return new Builder();
6647       }
6648
6649       public Builder clear() {
6650         super.clear();
6651         bus_ = 0;
6652         bitField0_ = (bitField0_ & ~0x00000001);
6653         messageId_ = 0;
6654         bitField0_ = (bitField0_ & ~0x00000002);
6655         mode_ = 0;
6656         bitField0_ = (bitField0_ & ~0x00000004);
6657         pid_ = 0;
6658         bitField0_ = (bitField0_ & ~0x00000008);
6659         success_ = false;
6660         bitField0_ = (bitField0_ & ~0x00000010);
6661         negativeResponseCode_ = 0;
6662         bitField0_ = (bitField0_ & ~0x00000020);
6663         payload_ = com.google.protobuf.ByteString.EMPTY;
6664         bitField0_ = (bitField0_ & ~0x00000040);
6665         value_ = 0D;
6666         bitField0_ = (bitField0_ & ~0x00000080);
6667         return this;
6668       }
6669
6670       public Builder clone() {
6671         return create().mergeFrom(buildPartial());
6672       }
6673
6674       public com.google.protobuf.Descriptors.Descriptor
6675           getDescriptorForType() {
6676         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
6677       }
6678
6679       public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() {
6680         return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
6681       }
6682
6683       public com.openxc.BinaryMessages.DiagnosticResponse build() {
6684         com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial();
6685         if (!result.isInitialized()) {
6686           throw newUninitializedMessageException(result);
6687         }
6688         return result;
6689       }
6690
6691       public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() {
6692         com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this);
6693         int from_bitField0_ = bitField0_;
6694         int to_bitField0_ = 0;
6695         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
6696           to_bitField0_ |= 0x00000001;
6697         }
6698         result.bus_ = bus_;
6699         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
6700           to_bitField0_ |= 0x00000002;
6701         }
6702         result.messageId_ = messageId_;
6703         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
6704           to_bitField0_ |= 0x00000004;
6705         }
6706         result.mode_ = mode_;
6707         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
6708           to_bitField0_ |= 0x00000008;
6709         }
6710         result.pid_ = pid_;
6711         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
6712           to_bitField0_ |= 0x00000010;
6713         }
6714         result.success_ = success_;
6715         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
6716           to_bitField0_ |= 0x00000020;
6717         }
6718         result.negativeResponseCode_ = negativeResponseCode_;
6719         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
6720           to_bitField0_ |= 0x00000040;
6721         }
6722         result.payload_ = payload_;
6723         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
6724           to_bitField0_ |= 0x00000080;
6725         }
6726         result.value_ = value_;
6727         result.bitField0_ = to_bitField0_;
6728         onBuilt();
6729         return result;
6730       }
6731
6732       public Builder mergeFrom(com.google.protobuf.Message other) {
6733         if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) {
6734           return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other);
6735         } else {
6736           super.mergeFrom(other);
6737           return this;
6738         }
6739       }
6740
6741       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) {
6742         if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this;
6743         if (other.hasBus()) {
6744           setBus(other.getBus());
6745         }
6746         if (other.hasMessageId()) {
6747           setMessageId(other.getMessageId());
6748         }
6749         if (other.hasMode()) {
6750           setMode(other.getMode());
6751         }
6752         if (other.hasPid()) {
6753           setPid(other.getPid());
6754         }
6755         if (other.hasSuccess()) {
6756           setSuccess(other.getSuccess());
6757         }
6758         if (other.hasNegativeResponseCode()) {
6759           setNegativeResponseCode(other.getNegativeResponseCode());
6760         }
6761         if (other.hasPayload()) {
6762           setPayload(other.getPayload());
6763         }
6764         if (other.hasValue()) {
6765           setValue(other.getValue());
6766         }
6767         this.mergeUnknownFields(other.getUnknownFields());
6768         return this;
6769       }
6770
6771       public final boolean isInitialized() {
6772         return true;
6773       }
6774
6775       public Builder mergeFrom(
6776           com.google.protobuf.CodedInputStream input,
6777           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6778           throws java.io.IOException {
6779         com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null;
6780         try {
6781           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
6782         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6783           parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage();
6784           throw e;
6785         } finally {
6786           if (parsedMessage != null) {
6787             mergeFrom(parsedMessage);
6788           }
6789         }
6790         return this;
6791       }
6792       private int bitField0_;
6793
6794       // optional int32 bus = 1;
6795       private int bus_ ;
6796       /**
6797        * <code>optional int32 bus = 1;</code>
6798        */
6799       public boolean hasBus() {
6800         return ((bitField0_ & 0x00000001) == 0x00000001);
6801       }
6802       /**
6803        * <code>optional int32 bus = 1;</code>
6804        */
6805       public int getBus() {
6806         return bus_;
6807       }
6808       /**
6809        * <code>optional int32 bus = 1;</code>
6810        */
6811       public Builder setBus(int value) {
6812         bitField0_ |= 0x00000001;
6813         bus_ = value;
6814         onChanged();
6815         return this;
6816       }
6817       /**
6818        * <code>optional int32 bus = 1;</code>
6819        */
6820       public Builder clearBus() {
6821         bitField0_ = (bitField0_ & ~0x00000001);
6822         bus_ = 0;
6823         onChanged();
6824         return this;
6825       }
6826
6827       // optional uint32 message_id = 2;
6828       private int messageId_ ;
6829       /**
6830        * <code>optional uint32 message_id = 2;</code>
6831        */
6832       public boolean hasMessageId() {
6833         return ((bitField0_ & 0x00000002) == 0x00000002);
6834       }
6835       /**
6836        * <code>optional uint32 message_id = 2;</code>
6837        */
6838       public int getMessageId() {
6839         return messageId_;
6840       }
6841       /**
6842        * <code>optional uint32 message_id = 2;</code>
6843        */
6844       public Builder setMessageId(int value) {
6845         bitField0_ |= 0x00000002;
6846         messageId_ = value;
6847         onChanged();
6848         return this;
6849       }
6850       /**
6851        * <code>optional uint32 message_id = 2;</code>
6852        */
6853       public Builder clearMessageId() {
6854         bitField0_ = (bitField0_ & ~0x00000002);
6855         messageId_ = 0;
6856         onChanged();
6857         return this;
6858       }
6859
6860       // optional uint32 mode = 3;
6861       private int mode_ ;
6862       /**
6863        * <code>optional uint32 mode = 3;</code>
6864        */
6865       public boolean hasMode() {
6866         return ((bitField0_ & 0x00000004) == 0x00000004);
6867       }
6868       /**
6869        * <code>optional uint32 mode = 3;</code>
6870        */
6871       public int getMode() {
6872         return mode_;
6873       }
6874       /**
6875        * <code>optional uint32 mode = 3;</code>
6876        */
6877       public Builder setMode(int value) {
6878         bitField0_ |= 0x00000004;
6879         mode_ = value;
6880         onChanged();
6881         return this;
6882       }
6883       /**
6884        * <code>optional uint32 mode = 3;</code>
6885        */
6886       public Builder clearMode() {
6887         bitField0_ = (bitField0_ & ~0x00000004);
6888         mode_ = 0;
6889         onChanged();
6890         return this;
6891       }
6892
6893       // optional uint32 pid = 4;
6894       private int pid_ ;
6895       /**
6896        * <code>optional uint32 pid = 4;</code>
6897        */
6898       public boolean hasPid() {
6899         return ((bitField0_ & 0x00000008) == 0x00000008);
6900       }
6901       /**
6902        * <code>optional uint32 pid = 4;</code>
6903        */
6904       public int getPid() {
6905         return pid_;
6906       }
6907       /**
6908        * <code>optional uint32 pid = 4;</code>
6909        */
6910       public Builder setPid(int value) {
6911         bitField0_ |= 0x00000008;
6912         pid_ = value;
6913         onChanged();
6914         return this;
6915       }
6916       /**
6917        * <code>optional uint32 pid = 4;</code>
6918        */
6919       public Builder clearPid() {
6920         bitField0_ = (bitField0_ & ~0x00000008);
6921         pid_ = 0;
6922         onChanged();
6923         return this;
6924       }
6925
6926       // optional bool success = 5;
6927       private boolean success_ ;
6928       /**
6929        * <code>optional bool success = 5;</code>
6930        */
6931       public boolean hasSuccess() {
6932         return ((bitField0_ & 0x00000010) == 0x00000010);
6933       }
6934       /**
6935        * <code>optional bool success = 5;</code>
6936        */
6937       public boolean getSuccess() {
6938         return success_;
6939       }
6940       /**
6941        * <code>optional bool success = 5;</code>
6942        */
6943       public Builder setSuccess(boolean value) {
6944         bitField0_ |= 0x00000010;
6945         success_ = value;
6946         onChanged();
6947         return this;
6948       }
6949       /**
6950        * <code>optional bool success = 5;</code>
6951        */
6952       public Builder clearSuccess() {
6953         bitField0_ = (bitField0_ & ~0x00000010);
6954         success_ = false;
6955         onChanged();
6956         return this;
6957       }
6958
6959       // optional uint32 negative_response_code = 6;
6960       private int negativeResponseCode_ ;
6961       /**
6962        * <code>optional uint32 negative_response_code = 6;</code>
6963        */
6964       public boolean hasNegativeResponseCode() {
6965         return ((bitField0_ & 0x00000020) == 0x00000020);
6966       }
6967       /**
6968        * <code>optional uint32 negative_response_code = 6;</code>
6969        */
6970       public int getNegativeResponseCode() {
6971         return negativeResponseCode_;
6972       }
6973       /**
6974        * <code>optional uint32 negative_response_code = 6;</code>
6975        */
6976       public Builder setNegativeResponseCode(int value) {
6977         bitField0_ |= 0x00000020;
6978         negativeResponseCode_ = value;
6979         onChanged();
6980         return this;
6981       }
6982       /**
6983        * <code>optional uint32 negative_response_code = 6;</code>
6984        */
6985       public Builder clearNegativeResponseCode() {
6986         bitField0_ = (bitField0_ & ~0x00000020);
6987         negativeResponseCode_ = 0;
6988         onChanged();
6989         return this;
6990       }
6991
6992       // optional bytes payload = 7;
6993       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
6994       /**
6995        * <code>optional bytes payload = 7;</code>
6996        *
6997        * <pre>
6998        * TODO we are capping this at 8 bytes for now - need to change when we
6999        * support multi-frame responses
7000        * </pre>
7001        */
7002       public boolean hasPayload() {
7003         return ((bitField0_ & 0x00000040) == 0x00000040);
7004       }
7005       /**
7006        * <code>optional bytes payload = 7;</code>
7007        *
7008        * <pre>
7009        * TODO we are capping this at 8 bytes for now - need to change when we
7010        * support multi-frame responses
7011        * </pre>
7012        */
7013       public com.google.protobuf.ByteString getPayload() {
7014         return payload_;
7015       }
7016       /**
7017        * <code>optional bytes payload = 7;</code>
7018        *
7019        * <pre>
7020        * TODO we are capping this at 8 bytes for now - need to change when we
7021        * support multi-frame responses
7022        * </pre>
7023        */
7024       public Builder setPayload(com.google.protobuf.ByteString value) {
7025         if (value == null) {
7026     throw new NullPointerException();
7027   }
7028   bitField0_ |= 0x00000040;
7029         payload_ = value;
7030         onChanged();
7031         return this;
7032       }
7033       /**
7034        * <code>optional bytes payload = 7;</code>
7035        *
7036        * <pre>
7037        * TODO we are capping this at 8 bytes for now - need to change when we
7038        * support multi-frame responses
7039        * </pre>
7040        */
7041       public Builder clearPayload() {
7042         bitField0_ = (bitField0_ & ~0x00000040);
7043         payload_ = getDefaultInstance().getPayload();
7044         onChanged();
7045         return this;
7046       }
7047
7048       // optional double value = 8;
7049       private double value_ ;
7050       /**
7051        * <code>optional double value = 8;</code>
7052        */
7053       public boolean hasValue() {
7054         return ((bitField0_ & 0x00000080) == 0x00000080);
7055       }
7056       /**
7057        * <code>optional double value = 8;</code>
7058        */
7059       public double getValue() {
7060         return value_;
7061       }
7062       /**
7063        * <code>optional double value = 8;</code>
7064        */
7065       public Builder setValue(double value) {
7066         bitField0_ |= 0x00000080;
7067         value_ = value;
7068         onChanged();
7069         return this;
7070       }
7071       /**
7072        * <code>optional double value = 8;</code>
7073        */
7074       public Builder clearValue() {
7075         bitField0_ = (bitField0_ & ~0x00000080);
7076         value_ = 0D;
7077         onChanged();
7078         return this;
7079       }
7080
7081       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse)
7082     }
7083
7084     static {
7085       defaultInstance = new DiagnosticResponse(true);
7086       defaultInstance.initFields();
7087     }
7088
7089     // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse)
7090   }
7091
7092   public interface DynamicFieldOrBuilder
7093       extends com.google.protobuf.MessageOrBuilder {
7094
7095     // optional .openxc.DynamicField.Type type = 1;
7096     /**
7097      * <code>optional .openxc.DynamicField.Type type = 1;</code>
7098      */
7099     boolean hasType();
7100     /**
7101      * <code>optional .openxc.DynamicField.Type type = 1;</code>
7102      */
7103     com.openxc.BinaryMessages.DynamicField.Type getType();
7104
7105     // optional string string_value = 2;
7106     /**
7107      * <code>optional string string_value = 2;</code>
7108      */
7109     boolean hasStringValue();
7110     /**
7111      * <code>optional string string_value = 2;</code>
7112      */
7113     java.lang.String getStringValue();
7114     /**
7115      * <code>optional string string_value = 2;</code>
7116      */
7117     com.google.protobuf.ByteString
7118         getStringValueBytes();
7119
7120     // optional double numeric_value = 3;
7121     /**
7122      * <code>optional double numeric_value = 3;</code>
7123      */
7124     boolean hasNumericValue();
7125     /**
7126      * <code>optional double numeric_value = 3;</code>
7127      */
7128     double getNumericValue();
7129
7130     // optional bool boolean_value = 4;
7131     /**
7132      * <code>optional bool boolean_value = 4;</code>
7133      */
7134     boolean hasBooleanValue();
7135     /**
7136      * <code>optional bool boolean_value = 4;</code>
7137      */
7138     boolean getBooleanValue();
7139   }
7140   /**
7141    * Protobuf type {@code openxc.DynamicField}
7142    */
7143   public static final class DynamicField extends
7144       com.google.protobuf.GeneratedMessage
7145       implements DynamicFieldOrBuilder {
7146     // Use DynamicField.newBuilder() to construct.
7147     private DynamicField(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
7148       super(builder);
7149       this.unknownFields = builder.getUnknownFields();
7150     }
7151     private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
7152
7153     private static final DynamicField defaultInstance;
7154     public static DynamicField getDefaultInstance() {
7155       return defaultInstance;
7156     }
7157
7158     public DynamicField getDefaultInstanceForType() {
7159       return defaultInstance;
7160     }
7161
7162     private final com.google.protobuf.UnknownFieldSet unknownFields;
7163     @java.lang.Override
7164     public final com.google.protobuf.UnknownFieldSet
7165         getUnknownFields() {
7166       return this.unknownFields;
7167     }
7168     private DynamicField(
7169         com.google.protobuf.CodedInputStream input,
7170         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7171         throws com.google.protobuf.InvalidProtocolBufferException {
7172       initFields();
7173       int mutable_bitField0_ = 0;
7174       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
7175           com.google.protobuf.UnknownFieldSet.newBuilder();
7176       try {
7177         boolean done = false;
7178         while (!done) {
7179           int tag = input.readTag();
7180           switch (tag) {
7181             case 0:
7182               done = true;
7183               break;
7184             default: {
7185               if (!parseUnknownField(input, unknownFields,
7186                                      extensionRegistry, tag)) {
7187                 done = true;
7188               }
7189               break;
7190             }
7191             case 8: {
7192               int rawValue = input.readEnum();
7193               com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue);
7194               if (value == null) {
7195                 unknownFields.mergeVarintField(1, rawValue);
7196               } else {
7197                 bitField0_ |= 0x00000001;
7198                 type_ = value;
7199               }
7200               break;
7201             }
7202             case 18: {
7203               bitField0_ |= 0x00000002;
7204               stringValue_ = input.readBytes();
7205               break;
7206             }
7207             case 25: {
7208               bitField0_ |= 0x00000004;
7209               numericValue_ = input.readDouble();
7210               break;
7211             }
7212             case 32: {
7213               bitField0_ |= 0x00000008;
7214               booleanValue_ = input.readBool();
7215               break;
7216             }
7217           }
7218         }
7219       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7220         throw e.setUnfinishedMessage(this);
7221       } catch (java.io.IOException e) {
7222         throw new com.google.protobuf.InvalidProtocolBufferException(
7223             e.getMessage()).setUnfinishedMessage(this);
7224       } finally {
7225         this.unknownFields = unknownFields.build();
7226         makeExtensionsImmutable();
7227       }
7228     }
7229     public static final com.google.protobuf.Descriptors.Descriptor
7230         getDescriptor() {
7231       return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
7232     }
7233
7234     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
7235         internalGetFieldAccessorTable() {
7236       return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
7237           .ensureFieldAccessorsInitialized(
7238               com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
7239     }
7240
7241     public static com.google.protobuf.Parser<DynamicField> PARSER =
7242         new com.google.protobuf.AbstractParser<DynamicField>() {
7243       public DynamicField parsePartialFrom(
7244           com.google.protobuf.CodedInputStream input,
7245           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7246           throws com.google.protobuf.InvalidProtocolBufferException {
7247         return new DynamicField(input, extensionRegistry);
7248       }
7249     };
7250
7251     @java.lang.Override
7252     public com.google.protobuf.Parser<DynamicField> getParserForType() {
7253       return PARSER;
7254     }
7255
7256     /**
7257      * Protobuf enum {@code openxc.DynamicField.Type}
7258      */
7259     public enum Type
7260         implements com.google.protobuf.ProtocolMessageEnum {
7261       /**
7262        * <code>STRING = 1;</code>
7263        */
7264       STRING(0, 1),
7265       /**
7266        * <code>NUM = 2;</code>
7267        */
7268       NUM(1, 2),
7269       /**
7270        * <code>BOOL = 3;</code>
7271        */
7272       BOOL(2, 3),
7273       ;
7274
7275       /**
7276        * <code>STRING = 1;</code>
7277        */
7278       public static final int STRING_VALUE = 1;
7279       /**
7280        * <code>NUM = 2;</code>
7281        */
7282       public static final int NUM_VALUE = 2;
7283       /**
7284        * <code>BOOL = 3;</code>
7285        */
7286       public static final int BOOL_VALUE = 3;
7287
7288
7289       public final int getNumber() { return value; }
7290
7291       public static Type valueOf(int value) {
7292         switch (value) {
7293           case 1: return STRING;
7294           case 2: return NUM;
7295           case 3: return BOOL;
7296           default: return null;
7297         }
7298       }
7299
7300       public static com.google.protobuf.Internal.EnumLiteMap<Type>
7301           internalGetValueMap() {
7302         return internalValueMap;
7303       }
7304       private static com.google.protobuf.Internal.EnumLiteMap<Type>
7305           internalValueMap =
7306             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
7307               public Type findValueByNumber(int number) {
7308                 return Type.valueOf(number);
7309               }
7310             };
7311
7312       public final com.google.protobuf.Descriptors.EnumValueDescriptor
7313           getValueDescriptor() {
7314         return getDescriptor().getValues().get(index);
7315       }
7316       public final com.google.protobuf.Descriptors.EnumDescriptor
7317           getDescriptorForType() {
7318         return getDescriptor();
7319       }
7320       public static final com.google.protobuf.Descriptors.EnumDescriptor
7321           getDescriptor() {
7322         return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0);
7323       }
7324
7325       private static final Type[] VALUES = values();
7326
7327       public static Type valueOf(
7328           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
7329         if (desc.getType() != getDescriptor()) {
7330           throw new java.lang.IllegalArgumentException(
7331             "EnumValueDescriptor is not for this type.");
7332         }
7333         return VALUES[desc.getIndex()];
7334       }
7335
7336       private final int index;
7337       private final int value;
7338
7339       private Type(int index, int value) {
7340         this.index = index;
7341         this.value = value;
7342       }
7343
7344       // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type)
7345     }
7346
7347     private int bitField0_;
7348     // optional .openxc.DynamicField.Type type = 1;
7349     public static final int TYPE_FIELD_NUMBER = 1;
7350     private com.openxc.BinaryMessages.DynamicField.Type type_;
7351     /**
7352      * <code>optional .openxc.DynamicField.Type type = 1;</code>
7353      */
7354     public boolean hasType() {
7355       return ((bitField0_ & 0x00000001) == 0x00000001);
7356     }
7357     /**
7358      * <code>optional .openxc.DynamicField.Type type = 1;</code>
7359      */
7360     public com.openxc.BinaryMessages.DynamicField.Type getType() {
7361       return type_;
7362     }
7363
7364     // optional string string_value = 2;
7365     public static final int STRING_VALUE_FIELD_NUMBER = 2;
7366     private java.lang.Object stringValue_;
7367     /**
7368      * <code>optional string string_value = 2;</code>
7369      */
7370     public boolean hasStringValue() {
7371       return ((bitField0_ & 0x00000002) == 0x00000002);
7372     }
7373     /**
7374      * <code>optional string string_value = 2;</code>
7375      */
7376     public java.lang.String getStringValue() {
7377       java.lang.Object ref = stringValue_;
7378       if (ref instanceof java.lang.String) {
7379         return (java.lang.String) ref;
7380       } else {
7381         com.google.protobuf.ByteString bs = 
7382             (com.google.protobuf.ByteString) ref;
7383         java.lang.String s = bs.toStringUtf8();
7384         if (bs.isValidUtf8()) {
7385           stringValue_ = s;
7386         }
7387         return s;
7388       }
7389     }
7390     /**
7391      * <code>optional string string_value = 2;</code>
7392      */
7393     public com.google.protobuf.ByteString
7394         getStringValueBytes() {
7395       java.lang.Object ref = stringValue_;
7396       if (ref instanceof java.lang.String) {
7397         com.google.protobuf.ByteString b = 
7398             com.google.protobuf.ByteString.copyFromUtf8(
7399                 (java.lang.String) ref);
7400         stringValue_ = b;
7401         return b;
7402       } else {
7403         return (com.google.protobuf.ByteString) ref;
7404       }
7405     }
7406
7407     // optional double numeric_value = 3;
7408     public static final int NUMERIC_VALUE_FIELD_NUMBER = 3;
7409     private double numericValue_;
7410     /**
7411      * <code>optional double numeric_value = 3;</code>
7412      */
7413     public boolean hasNumericValue() {
7414       return ((bitField0_ & 0x00000004) == 0x00000004);
7415     }
7416     /**
7417      * <code>optional double numeric_value = 3;</code>
7418      */
7419     public double getNumericValue() {
7420       return numericValue_;
7421     }
7422
7423     // optional bool boolean_value = 4;
7424     public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4;
7425     private boolean booleanValue_;
7426     /**
7427      * <code>optional bool boolean_value = 4;</code>
7428      */
7429     public boolean hasBooleanValue() {
7430       return ((bitField0_ & 0x00000008) == 0x00000008);
7431     }
7432     /**
7433      * <code>optional bool boolean_value = 4;</code>
7434      */
7435     public boolean getBooleanValue() {
7436       return booleanValue_;
7437     }
7438
7439     private void initFields() {
7440       type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
7441       stringValue_ = "";
7442       numericValue_ = 0D;
7443       booleanValue_ = false;
7444     }
7445     private byte memoizedIsInitialized = -1;
7446     public final boolean isInitialized() {
7447       byte isInitialized = memoizedIsInitialized;
7448       if (isInitialized != -1) return isInitialized == 1;
7449
7450       memoizedIsInitialized = 1;
7451       return true;
7452     }
7453
7454     public void writeTo(com.google.protobuf.CodedOutputStream output)
7455                         throws java.io.IOException {
7456       getSerializedSize();
7457       if (((bitField0_ & 0x00000001) == 0x00000001)) {
7458         output.writeEnum(1, type_.getNumber());
7459       }
7460       if (((bitField0_ & 0x00000002) == 0x00000002)) {
7461         output.writeBytes(2, getStringValueBytes());
7462       }
7463       if (((bitField0_ & 0x00000004) == 0x00000004)) {
7464         output.writeDouble(3, numericValue_);
7465       }
7466       if (((bitField0_ & 0x00000008) == 0x00000008)) {
7467         output.writeBool(4, booleanValue_);
7468       }
7469       getUnknownFields().writeTo(output);
7470     }
7471
7472     private int memoizedSerializedSize = -1;
7473     public int getSerializedSize() {
7474       int size = memoizedSerializedSize;
7475       if (size != -1) return size;
7476
7477       size = 0;
7478       if (((bitField0_ & 0x00000001) == 0x00000001)) {
7479         size += com.google.protobuf.CodedOutputStream
7480           .computeEnumSize(1, type_.getNumber());
7481       }
7482       if (((bitField0_ & 0x00000002) == 0x00000002)) {
7483         size += com.google.protobuf.CodedOutputStream
7484           .computeBytesSize(2, getStringValueBytes());
7485       }
7486       if (((bitField0_ & 0x00000004) == 0x00000004)) {
7487         size += com.google.protobuf.CodedOutputStream
7488           .computeDoubleSize(3, numericValue_);
7489       }
7490       if (((bitField0_ & 0x00000008) == 0x00000008)) {
7491         size += com.google.protobuf.CodedOutputStream
7492           .computeBoolSize(4, booleanValue_);
7493       }
7494       size += getUnknownFields().getSerializedSize();
7495       memoizedSerializedSize = size;
7496       return size;
7497     }
7498
7499     private static final long serialVersionUID = 0L;
7500     @java.lang.Override
7501     protected java.lang.Object writeReplace()
7502         throws java.io.ObjectStreamException {
7503       return super.writeReplace();
7504     }
7505
7506     public static com.openxc.BinaryMessages.DynamicField parseFrom(
7507         com.google.protobuf.ByteString data)
7508         throws com.google.protobuf.InvalidProtocolBufferException {
7509       return PARSER.parseFrom(data);
7510     }
7511     public static com.openxc.BinaryMessages.DynamicField parseFrom(
7512         com.google.protobuf.ByteString data,
7513         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7514         throws com.google.protobuf.InvalidProtocolBufferException {
7515       return PARSER.parseFrom(data, extensionRegistry);
7516     }
7517     public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data)
7518         throws com.google.protobuf.InvalidProtocolBufferException {
7519       return PARSER.parseFrom(data);
7520     }
7521     public static com.openxc.BinaryMessages.DynamicField parseFrom(
7522         byte[] data,
7523         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7524         throws com.google.protobuf.InvalidProtocolBufferException {
7525       return PARSER.parseFrom(data, extensionRegistry);
7526     }
7527     public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input)
7528         throws java.io.IOException {
7529       return PARSER.parseFrom(input);
7530     }
7531     public static com.openxc.BinaryMessages.DynamicField parseFrom(
7532         java.io.InputStream input,
7533         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7534         throws java.io.IOException {
7535       return PARSER.parseFrom(input, extensionRegistry);
7536     }
7537     public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input)
7538         throws java.io.IOException {
7539       return PARSER.parseDelimitedFrom(input);
7540     }
7541     public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(
7542         java.io.InputStream input,
7543         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7544         throws java.io.IOException {
7545       return PARSER.parseDelimitedFrom(input, extensionRegistry);
7546     }
7547     public static com.openxc.BinaryMessages.DynamicField parseFrom(
7548         com.google.protobuf.CodedInputStream input)
7549         throws java.io.IOException {
7550       return PARSER.parseFrom(input);
7551     }
7552     public static com.openxc.BinaryMessages.DynamicField parseFrom(
7553         com.google.protobuf.CodedInputStream input,
7554         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7555         throws java.io.IOException {
7556       return PARSER.parseFrom(input, extensionRegistry);
7557     }
7558
7559     public static Builder newBuilder() { return Builder.create(); }
7560     public Builder newBuilderForType() { return newBuilder(); }
7561     public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) {
7562       return newBuilder().mergeFrom(prototype);
7563     }
7564     public Builder toBuilder() { return newBuilder(this); }
7565
7566     @java.lang.Override
7567     protected Builder newBuilderForType(
7568         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
7569       Builder builder = new Builder(parent);
7570       return builder;
7571     }
7572     /**
7573      * Protobuf type {@code openxc.DynamicField}
7574      */
7575     public static final class Builder extends
7576         com.google.protobuf.GeneratedMessage.Builder<Builder>
7577        implements com.openxc.BinaryMessages.DynamicFieldOrBuilder {
7578       public static final com.google.protobuf.Descriptors.Descriptor
7579           getDescriptor() {
7580         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
7581       }
7582
7583       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
7584           internalGetFieldAccessorTable() {
7585         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
7586             .ensureFieldAccessorsInitialized(
7587                 com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
7588       }
7589
7590       // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder()
7591       private Builder() {
7592         maybeForceBuilderInitialization();
7593       }
7594
7595       private Builder(
7596           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
7597         super(parent);
7598         maybeForceBuilderInitialization();
7599       }
7600       private void maybeForceBuilderInitialization() {
7601         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
7602         }
7603       }
7604       private static Builder create() {
7605         return new Builder();
7606       }
7607
7608       public Builder clear() {
7609         super.clear();
7610         type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
7611         bitField0_ = (bitField0_ & ~0x00000001);
7612         stringValue_ = "";
7613         bitField0_ = (bitField0_ & ~0x00000002);
7614         numericValue_ = 0D;
7615         bitField0_ = (bitField0_ & ~0x00000004);
7616         booleanValue_ = false;
7617         bitField0_ = (bitField0_ & ~0x00000008);
7618         return this;
7619       }
7620
7621       public Builder clone() {
7622         return create().mergeFrom(buildPartial());
7623       }
7624
7625       public com.google.protobuf.Descriptors.Descriptor
7626           getDescriptorForType() {
7627         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
7628       }
7629
7630       public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() {
7631         return com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7632       }
7633
7634       public com.openxc.BinaryMessages.DynamicField build() {
7635         com.openxc.BinaryMessages.DynamicField result = buildPartial();
7636         if (!result.isInitialized()) {
7637           throw newUninitializedMessageException(result);
7638         }
7639         return result;
7640       }
7641
7642       public com.openxc.BinaryMessages.DynamicField buildPartial() {
7643         com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this);
7644         int from_bitField0_ = bitField0_;
7645         int to_bitField0_ = 0;
7646         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
7647           to_bitField0_ |= 0x00000001;
7648         }
7649         result.type_ = type_;
7650         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
7651           to_bitField0_ |= 0x00000002;
7652         }
7653         result.stringValue_ = stringValue_;
7654         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
7655           to_bitField0_ |= 0x00000004;
7656         }
7657         result.numericValue_ = numericValue_;
7658         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
7659           to_bitField0_ |= 0x00000008;
7660         }
7661         result.booleanValue_ = booleanValue_;
7662         result.bitField0_ = to_bitField0_;
7663         onBuilt();
7664         return result;
7665       }
7666
7667       public Builder mergeFrom(com.google.protobuf.Message other) {
7668         if (other instanceof com.openxc.BinaryMessages.DynamicField) {
7669           return mergeFrom((com.openxc.BinaryMessages.DynamicField)other);
7670         } else {
7671           super.mergeFrom(other);
7672           return this;
7673         }
7674       }
7675
7676       public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) {
7677         if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this;
7678         if (other.hasType()) {
7679           setType(other.getType());
7680         }
7681         if (other.hasStringValue()) {
7682           bitField0_ |= 0x00000002;
7683           stringValue_ = other.stringValue_;
7684           onChanged();
7685         }
7686         if (other.hasNumericValue()) {
7687           setNumericValue(other.getNumericValue());
7688         }
7689         if (other.hasBooleanValue()) {
7690           setBooleanValue(other.getBooleanValue());
7691         }
7692         this.mergeUnknownFields(other.getUnknownFields());
7693         return this;
7694       }
7695
7696       public final boolean isInitialized() {
7697         return true;
7698       }
7699
7700       public Builder mergeFrom(
7701           com.google.protobuf.CodedInputStream input,
7702           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7703           throws java.io.IOException {
7704         com.openxc.BinaryMessages.DynamicField parsedMessage = null;
7705         try {
7706           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
7707         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7708           parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage();
7709           throw e;
7710         } finally {
7711           if (parsedMessage != null) {
7712             mergeFrom(parsedMessage);
7713           }
7714         }
7715         return this;
7716       }
7717       private int bitField0_;
7718
7719       // optional .openxc.DynamicField.Type type = 1;
7720       private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
7721       /**
7722        * <code>optional .openxc.DynamicField.Type type = 1;</code>
7723        */
7724       public boolean hasType() {
7725         return ((bitField0_ & 0x00000001) == 0x00000001);
7726       }
7727       /**
7728        * <code>optional .openxc.DynamicField.Type type = 1;</code>
7729        */
7730       public com.openxc.BinaryMessages.DynamicField.Type getType() {
7731         return type_;
7732       }
7733       /**
7734        * <code>optional .openxc.DynamicField.Type type = 1;</code>
7735        */
7736       public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) {
7737         if (value == null) {
7738           throw new NullPointerException();
7739         }
7740         bitField0_ |= 0x00000001;
7741         type_ = value;
7742         onChanged();
7743         return this;
7744       }
7745       /**
7746        * <code>optional .openxc.DynamicField.Type type = 1;</code>
7747        */
7748       public Builder clearType() {
7749         bitField0_ = (bitField0_ & ~0x00000001);
7750         type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
7751         onChanged();
7752         return this;
7753       }
7754
7755       // optional string string_value = 2;
7756       private java.lang.Object stringValue_ = "";
7757       /**
7758        * <code>optional string string_value = 2;</code>
7759        */
7760       public boolean hasStringValue() {
7761         return ((bitField0_ & 0x00000002) == 0x00000002);
7762       }
7763       /**
7764        * <code>optional string string_value = 2;</code>
7765        */
7766       public java.lang.String getStringValue() {
7767         java.lang.Object ref = stringValue_;
7768         if (!(ref instanceof java.lang.String)) {
7769           java.lang.String s = ((com.google.protobuf.ByteString) ref)
7770               .toStringUtf8();
7771           stringValue_ = s;
7772           return s;
7773         } else {
7774           return (java.lang.String) ref;
7775         }
7776       }
7777       /**
7778        * <code>optional string string_value = 2;</code>
7779        */
7780       public com.google.protobuf.ByteString
7781           getStringValueBytes() {
7782         java.lang.Object ref = stringValue_;
7783         if (ref instanceof String) {
7784           com.google.protobuf.ByteString b = 
7785               com.google.protobuf.ByteString.copyFromUtf8(
7786                   (java.lang.String) ref);
7787           stringValue_ = b;
7788           return b;
7789         } else {
7790           return (com.google.protobuf.ByteString) ref;
7791         }
7792       }
7793       /**
7794        * <code>optional string string_value = 2;</code>
7795        */
7796       public Builder setStringValue(
7797           java.lang.String value) {
7798         if (value == null) {
7799     throw new NullPointerException();
7800   }
7801   bitField0_ |= 0x00000002;
7802         stringValue_ = value;
7803         onChanged();
7804         return this;
7805       }
7806       /**
7807        * <code>optional string string_value = 2;</code>
7808        */
7809       public Builder clearStringValue() {
7810         bitField0_ = (bitField0_ & ~0x00000002);
7811         stringValue_ = getDefaultInstance().getStringValue();
7812         onChanged();
7813         return this;
7814       }
7815       /**
7816        * <code>optional string string_value = 2;</code>
7817        */
7818       public Builder setStringValueBytes(
7819           com.google.protobuf.ByteString value) {
7820         if (value == null) {
7821     throw new NullPointerException();
7822   }
7823   bitField0_ |= 0x00000002;
7824         stringValue_ = value;
7825         onChanged();
7826         return this;
7827       }
7828
7829       // optional double numeric_value = 3;
7830       private double numericValue_ ;
7831       /**
7832        * <code>optional double numeric_value = 3;</code>
7833        */
7834       public boolean hasNumericValue() {
7835         return ((bitField0_ & 0x00000004) == 0x00000004);
7836       }
7837       /**
7838        * <code>optional double numeric_value = 3;</code>
7839        */
7840       public double getNumericValue() {
7841         return numericValue_;
7842       }
7843       /**
7844        * <code>optional double numeric_value = 3;</code>
7845        */
7846       public Builder setNumericValue(double value) {
7847         bitField0_ |= 0x00000004;
7848         numericValue_ = value;
7849         onChanged();
7850         return this;
7851       }
7852       /**
7853        * <code>optional double numeric_value = 3;</code>
7854        */
7855       public Builder clearNumericValue() {
7856         bitField0_ = (bitField0_ & ~0x00000004);
7857         numericValue_ = 0D;
7858         onChanged();
7859         return this;
7860       }
7861
7862       // optional bool boolean_value = 4;
7863       private boolean booleanValue_ ;
7864       /**
7865        * <code>optional bool boolean_value = 4;</code>
7866        */
7867       public boolean hasBooleanValue() {
7868         return ((bitField0_ & 0x00000008) == 0x00000008);
7869       }
7870       /**
7871        * <code>optional bool boolean_value = 4;</code>
7872        */
7873       public boolean getBooleanValue() {
7874         return booleanValue_;
7875       }
7876       /**
7877        * <code>optional bool boolean_value = 4;</code>
7878        */
7879       public Builder setBooleanValue(boolean value) {
7880         bitField0_ |= 0x00000008;
7881         booleanValue_ = value;
7882         onChanged();
7883         return this;
7884       }
7885       /**
7886        * <code>optional bool boolean_value = 4;</code>
7887        */
7888       public Builder clearBooleanValue() {
7889         bitField0_ = (bitField0_ & ~0x00000008);
7890         booleanValue_ = false;
7891         onChanged();
7892         return this;
7893       }
7894
7895       // @@protoc_insertion_point(builder_scope:openxc.DynamicField)
7896     }
7897
7898     static {
7899       defaultInstance = new DynamicField(true);
7900       defaultInstance.initFields();
7901     }
7902
7903     // @@protoc_insertion_point(class_scope:openxc.DynamicField)
7904   }
7905
7906   public interface TranslatedMessageOrBuilder
7907       extends com.google.protobuf.MessageOrBuilder {
7908
7909     // optional .openxc.TranslatedMessage.Type type = 1;
7910     /**
7911      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7912      */
7913     boolean hasType();
7914     /**
7915      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7916      */
7917     com.openxc.BinaryMessages.TranslatedMessage.Type getType();
7918
7919     // optional string name = 2;
7920     /**
7921      * <code>optional string name = 2;</code>
7922      */
7923     boolean hasName();
7924     /**
7925      * <code>optional string name = 2;</code>
7926      */
7927     java.lang.String getName();
7928     /**
7929      * <code>optional string name = 2;</code>
7930      */
7931     com.google.protobuf.ByteString
7932         getNameBytes();
7933
7934     // optional .openxc.DynamicField value = 3;
7935     /**
7936      * <code>optional .openxc.DynamicField value = 3;</code>
7937      */
7938     boolean hasValue();
7939     /**
7940      * <code>optional .openxc.DynamicField value = 3;</code>
7941      */
7942     com.openxc.BinaryMessages.DynamicField getValue();
7943     /**
7944      * <code>optional .openxc.DynamicField value = 3;</code>
7945      */
7946     com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder();
7947
7948     // optional .openxc.DynamicField event = 4;
7949     /**
7950      * <code>optional .openxc.DynamicField event = 4;</code>
7951      */
7952     boolean hasEvent();
7953     /**
7954      * <code>optional .openxc.DynamicField event = 4;</code>
7955      */
7956     com.openxc.BinaryMessages.DynamicField getEvent();
7957     /**
7958      * <code>optional .openxc.DynamicField event = 4;</code>
7959      */
7960     com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder();
7961   }
7962   /**
7963    * Protobuf type {@code openxc.TranslatedMessage}
7964    */
7965   public static final class TranslatedMessage extends
7966       com.google.protobuf.GeneratedMessage
7967       implements TranslatedMessageOrBuilder {
7968     // Use TranslatedMessage.newBuilder() to construct.
7969     private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
7970       super(builder);
7971       this.unknownFields = builder.getUnknownFields();
7972     }
7973     private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
7974
7975     private static final TranslatedMessage defaultInstance;
7976     public static TranslatedMessage getDefaultInstance() {
7977       return defaultInstance;
7978     }
7979
7980     public TranslatedMessage getDefaultInstanceForType() {
7981       return defaultInstance;
7982     }
7983
7984     private final com.google.protobuf.UnknownFieldSet unknownFields;
7985     @java.lang.Override
7986     public final com.google.protobuf.UnknownFieldSet
7987         getUnknownFields() {
7988       return this.unknownFields;
7989     }
7990     private TranslatedMessage(
7991         com.google.protobuf.CodedInputStream input,
7992         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7993         throws com.google.protobuf.InvalidProtocolBufferException {
7994       initFields();
7995       int mutable_bitField0_ = 0;
7996       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
7997           com.google.protobuf.UnknownFieldSet.newBuilder();
7998       try {
7999         boolean done = false;
8000         while (!done) {
8001           int tag = input.readTag();
8002           switch (tag) {
8003             case 0:
8004               done = true;
8005               break;
8006             default: {
8007               if (!parseUnknownField(input, unknownFields,
8008                                      extensionRegistry, tag)) {
8009                 done = true;
8010               }
8011               break;
8012             }
8013             case 8: {
8014               int rawValue = input.readEnum();
8015               com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
8016               if (value == null) {
8017                 unknownFields.mergeVarintField(1, rawValue);
8018               } else {
8019                 bitField0_ |= 0x00000001;
8020                 type_ = value;
8021               }
8022               break;
8023             }
8024             case 18: {
8025               bitField0_ |= 0x00000002;
8026               name_ = input.readBytes();
8027               break;
8028             }
8029             case 26: {
8030               com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
8031               if (((bitField0_ & 0x00000004) == 0x00000004)) {
8032                 subBuilder = value_.toBuilder();
8033               }
8034               value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
8035               if (subBuilder != null) {
8036                 subBuilder.mergeFrom(value_);
8037                 value_ = subBuilder.buildPartial();
8038               }
8039               bitField0_ |= 0x00000004;
8040               break;
8041             }
8042             case 34: {
8043               com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
8044               if (((bitField0_ & 0x00000008) == 0x00000008)) {
8045                 subBuilder = event_.toBuilder();
8046               }
8047               event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
8048               if (subBuilder != null) {
8049                 subBuilder.mergeFrom(event_);
8050                 event_ = subBuilder.buildPartial();
8051               }
8052               bitField0_ |= 0x00000008;
8053               break;
8054             }
8055           }
8056         }
8057       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8058         throw e.setUnfinishedMessage(this);
8059       } catch (java.io.IOException e) {
8060         throw new com.google.protobuf.InvalidProtocolBufferException(
8061             e.getMessage()).setUnfinishedMessage(this);
8062       } finally {
8063         this.unknownFields = unknownFields.build();
8064         makeExtensionsImmutable();
8065       }
8066     }
8067     public static final com.google.protobuf.Descriptors.Descriptor
8068         getDescriptor() {
8069       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
8070     }
8071
8072     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
8073         internalGetFieldAccessorTable() {
8074       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
8075           .ensureFieldAccessorsInitialized(
8076               com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
8077     }
8078
8079     public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
8080         new com.google.protobuf.AbstractParser<TranslatedMessage>() {
8081       public TranslatedMessage parsePartialFrom(
8082           com.google.protobuf.CodedInputStream input,
8083           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8084           throws com.google.protobuf.InvalidProtocolBufferException {
8085         return new TranslatedMessage(input, extensionRegistry);
8086       }
8087     };
8088
8089     @java.lang.Override
8090     public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
8091       return PARSER;
8092     }
8093
8094     /**
8095      * Protobuf enum {@code openxc.TranslatedMessage.Type}
8096      */
8097     public enum Type
8098         implements com.google.protobuf.ProtocolMessageEnum {
8099       /**
8100        * <code>STRING = 1;</code>
8101        */
8102       STRING(0, 1),
8103       /**
8104        * <code>NUM = 2;</code>
8105        */
8106       NUM(1, 2),
8107       /**
8108        * <code>BOOL = 3;</code>
8109        */
8110       BOOL(2, 3),
8111       /**
8112        * <code>EVENTED_STRING = 4;</code>
8113        */
8114       EVENTED_STRING(3, 4),
8115       /**
8116        * <code>EVENTED_NUM = 5;</code>
8117        */
8118       EVENTED_NUM(4, 5),
8119       /**
8120        * <code>EVENTED_BOOL = 6;</code>
8121        */
8122       EVENTED_BOOL(5, 6),
8123       ;
8124
8125       /**
8126        * <code>STRING = 1;</code>
8127        */
8128       public static final int STRING_VALUE = 1;
8129       /**
8130        * <code>NUM = 2;</code>
8131        */
8132       public static final int NUM_VALUE = 2;
8133       /**
8134        * <code>BOOL = 3;</code>
8135        */
8136       public static final int BOOL_VALUE = 3;
8137       /**
8138        * <code>EVENTED_STRING = 4;</code>
8139        */
8140       public static final int EVENTED_STRING_VALUE = 4;
8141       /**
8142        * <code>EVENTED_NUM = 5;</code>
8143        */
8144       public static final int EVENTED_NUM_VALUE = 5;
8145       /**
8146        * <code>EVENTED_BOOL = 6;</code>
8147        */
8148       public static final int EVENTED_BOOL_VALUE = 6;
8149
8150
8151       public final int getNumber() { return value; }
8152
8153       public static Type valueOf(int value) {
8154         switch (value) {
8155           case 1: return STRING;
8156           case 2: return NUM;
8157           case 3: return BOOL;
8158           case 4: return EVENTED_STRING;
8159           case 5: return EVENTED_NUM;
8160           case 6: return EVENTED_BOOL;
8161           default: return null;
8162         }
8163       }
8164
8165       public static com.google.protobuf.Internal.EnumLiteMap<Type>
8166           internalGetValueMap() {
8167         return internalValueMap;
8168       }
8169       private static com.google.protobuf.Internal.EnumLiteMap<Type>
8170           internalValueMap =
8171             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
8172               public Type findValueByNumber(int number) {
8173                 return Type.valueOf(number);
8174               }
8175             };
8176
8177       public final com.google.protobuf.Descriptors.EnumValueDescriptor
8178           getValueDescriptor() {
8179         return getDescriptor().getValues().get(index);
8180       }
8181       public final com.google.protobuf.Descriptors.EnumDescriptor
8182           getDescriptorForType() {
8183         return getDescriptor();
8184       }
8185       public static final com.google.protobuf.Descriptors.EnumDescriptor
8186           getDescriptor() {
8187         return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
8188       }
8189
8190       private static final Type[] VALUES = values();
8191
8192       public static Type valueOf(
8193           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
8194         if (desc.getType() != getDescriptor()) {
8195           throw new java.lang.IllegalArgumentException(
8196             "EnumValueDescriptor is not for this type.");
8197         }
8198         return VALUES[desc.getIndex()];
8199       }
8200
8201       private final int index;
8202       private final int value;
8203
8204       private Type(int index, int value) {
8205         this.index = index;
8206         this.value = value;
8207       }
8208
8209       // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
8210     }
8211
8212     private int bitField0_;
8213     // optional .openxc.TranslatedMessage.Type type = 1;
8214     public static final int TYPE_FIELD_NUMBER = 1;
8215     private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
8216     /**
8217      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
8218      */
8219     public boolean hasType() {
8220       return ((bitField0_ & 0x00000001) == 0x00000001);
8221     }
8222     /**
8223      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
8224      */
8225     public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
8226       return type_;
8227     }
8228
8229     // optional string name = 2;
8230     public static final int NAME_FIELD_NUMBER = 2;
8231     private java.lang.Object name_;
8232     /**
8233      * <code>optional string name = 2;</code>
8234      */
8235     public boolean hasName() {
8236       return ((bitField0_ & 0x00000002) == 0x00000002);
8237     }
8238     /**
8239      * <code>optional string name = 2;</code>
8240      */
8241     public java.lang.String getName() {
8242       java.lang.Object ref = name_;
8243       if (ref instanceof java.lang.String) {
8244         return (java.lang.String) ref;
8245       } else {
8246         com.google.protobuf.ByteString bs = 
8247             (com.google.protobuf.ByteString) ref;
8248         java.lang.String s = bs.toStringUtf8();
8249         if (bs.isValidUtf8()) {
8250           name_ = s;
8251         }
8252         return s;
8253       }
8254     }
8255     /**
8256      * <code>optional string name = 2;</code>
8257      */
8258     public com.google.protobuf.ByteString
8259         getNameBytes() {
8260       java.lang.Object ref = name_;
8261       if (ref instanceof java.lang.String) {
8262         com.google.protobuf.ByteString b = 
8263             com.google.protobuf.ByteString.copyFromUtf8(
8264                 (java.lang.String) ref);
8265         name_ = b;
8266         return b;
8267       } else {
8268         return (com.google.protobuf.ByteString) ref;
8269       }
8270     }
8271
8272     // optional .openxc.DynamicField value = 3;
8273     public static final int VALUE_FIELD_NUMBER = 3;
8274     private com.openxc.BinaryMessages.DynamicField value_;
8275     /**
8276      * <code>optional .openxc.DynamicField value = 3;</code>
8277      */
8278     public boolean hasValue() {
8279       return ((bitField0_ & 0x00000004) == 0x00000004);
8280     }
8281     /**
8282      * <code>optional .openxc.DynamicField value = 3;</code>
8283      */
8284     public com.openxc.BinaryMessages.DynamicField getValue() {
8285       return value_;
8286     }
8287     /**
8288      * <code>optional .openxc.DynamicField value = 3;</code>
8289      */
8290     public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
8291       return value_;
8292     }
8293
8294     // optional .openxc.DynamicField event = 4;
8295     public static final int EVENT_FIELD_NUMBER = 4;
8296     private com.openxc.BinaryMessages.DynamicField event_;
8297     /**
8298      * <code>optional .openxc.DynamicField event = 4;</code>
8299      */
8300     public boolean hasEvent() {
8301       return ((bitField0_ & 0x00000008) == 0x00000008);
8302     }
8303     /**
8304      * <code>optional .openxc.DynamicField event = 4;</code>
8305      */
8306     public com.openxc.BinaryMessages.DynamicField getEvent() {
8307       return event_;
8308     }
8309     /**
8310      * <code>optional .openxc.DynamicField event = 4;</code>
8311      */
8312     public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
8313       return event_;
8314     }
8315
8316     private void initFields() {
8317       type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
8318       name_ = "";
8319       value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8320       event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8321     }
8322     private byte memoizedIsInitialized = -1;
8323     public final boolean isInitialized() {
8324       byte isInitialized = memoizedIsInitialized;
8325       if (isInitialized != -1) return isInitialized == 1;
8326
8327       memoizedIsInitialized = 1;
8328       return true;
8329     }
8330
8331     public void writeTo(com.google.protobuf.CodedOutputStream output)
8332                         throws java.io.IOException {
8333       getSerializedSize();
8334       if (((bitField0_ & 0x00000001) == 0x00000001)) {
8335         output.writeEnum(1, type_.getNumber());
8336       }
8337       if (((bitField0_ & 0x00000002) == 0x00000002)) {
8338         output.writeBytes(2, getNameBytes());
8339       }
8340       if (((bitField0_ & 0x00000004) == 0x00000004)) {
8341         output.writeMessage(3, value_);
8342       }
8343       if (((bitField0_ & 0x00000008) == 0x00000008)) {
8344         output.writeMessage(4, event_);
8345       }
8346       getUnknownFields().writeTo(output);
8347     }
8348
8349     private int memoizedSerializedSize = -1;
8350     public int getSerializedSize() {
8351       int size = memoizedSerializedSize;
8352       if (size != -1) return size;
8353
8354       size = 0;
8355       if (((bitField0_ & 0x00000001) == 0x00000001)) {
8356         size += com.google.protobuf.CodedOutputStream
8357           .computeEnumSize(1, type_.getNumber());
8358       }
8359       if (((bitField0_ & 0x00000002) == 0x00000002)) {
8360         size += com.google.protobuf.CodedOutputStream
8361           .computeBytesSize(2, getNameBytes());
8362       }
8363       if (((bitField0_ & 0x00000004) == 0x00000004)) {
8364         size += com.google.protobuf.CodedOutputStream
8365           .computeMessageSize(3, value_);
8366       }
8367       if (((bitField0_ & 0x00000008) == 0x00000008)) {
8368         size += com.google.protobuf.CodedOutputStream
8369           .computeMessageSize(4, event_);
8370       }
8371       size += getUnknownFields().getSerializedSize();
8372       memoizedSerializedSize = size;
8373       return size;
8374     }
8375
8376     private static final long serialVersionUID = 0L;
8377     @java.lang.Override
8378     protected java.lang.Object writeReplace()
8379         throws java.io.ObjectStreamException {
8380       return super.writeReplace();
8381     }
8382
8383     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
8384         com.google.protobuf.ByteString data)
8385         throws com.google.protobuf.InvalidProtocolBufferException {
8386       return PARSER.parseFrom(data);
8387     }
8388     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
8389         com.google.protobuf.ByteString data,
8390         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8391         throws com.google.protobuf.InvalidProtocolBufferException {
8392       return PARSER.parseFrom(data, extensionRegistry);
8393     }
8394     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
8395         throws com.google.protobuf.InvalidProtocolBufferException {
8396       return PARSER.parseFrom(data);
8397     }
8398     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
8399         byte[] data,
8400         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8401         throws com.google.protobuf.InvalidProtocolBufferException {
8402       return PARSER.parseFrom(data, extensionRegistry);
8403     }
8404     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
8405         throws java.io.IOException {
8406       return PARSER.parseFrom(input);
8407     }
8408     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
8409         java.io.InputStream input,
8410         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8411         throws java.io.IOException {
8412       return PARSER.parseFrom(input, extensionRegistry);
8413     }
8414     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
8415         throws java.io.IOException {
8416       return PARSER.parseDelimitedFrom(input);
8417     }
8418     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
8419         java.io.InputStream input,
8420         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8421         throws java.io.IOException {
8422       return PARSER.parseDelimitedFrom(input, extensionRegistry);
8423     }
8424     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
8425         com.google.protobuf.CodedInputStream input)
8426         throws java.io.IOException {
8427       return PARSER.parseFrom(input);
8428     }
8429     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
8430         com.google.protobuf.CodedInputStream input,
8431         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8432         throws java.io.IOException {
8433       return PARSER.parseFrom(input, extensionRegistry);
8434     }
8435
8436     public static Builder newBuilder() { return Builder.create(); }
8437     public Builder newBuilderForType() { return newBuilder(); }
8438     public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
8439       return newBuilder().mergeFrom(prototype);
8440     }
8441     public Builder toBuilder() { return newBuilder(this); }
8442
8443     @java.lang.Override
8444     protected Builder newBuilderForType(
8445         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
8446       Builder builder = new Builder(parent);
8447       return builder;
8448     }
8449     /**
8450      * Protobuf type {@code openxc.TranslatedMessage}
8451      */
8452     public static final class Builder extends
8453         com.google.protobuf.GeneratedMessage.Builder<Builder>
8454        implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
8455       public static final com.google.protobuf.Descriptors.Descriptor
8456           getDescriptor() {
8457         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
8458       }
8459
8460       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
8461           internalGetFieldAccessorTable() {
8462         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
8463             .ensureFieldAccessorsInitialized(
8464                 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
8465       }
8466
8467       // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
8468       private Builder() {
8469         maybeForceBuilderInitialization();
8470       }
8471
8472       private Builder(
8473           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
8474         super(parent);
8475         maybeForceBuilderInitialization();
8476       }
8477       private void maybeForceBuilderInitialization() {
8478         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
8479           getValueFieldBuilder();
8480           getEventFieldBuilder();
8481         }
8482       }
8483       private static Builder create() {
8484         return new Builder();
8485       }
8486
8487       public Builder clear() {
8488         super.clear();
8489         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
8490         bitField0_ = (bitField0_ & ~0x00000001);
8491         name_ = "";
8492         bitField0_ = (bitField0_ & ~0x00000002);
8493         if (valueBuilder_ == null) {
8494           value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8495         } else {
8496           valueBuilder_.clear();
8497         }
8498         bitField0_ = (bitField0_ & ~0x00000004);
8499         if (eventBuilder_ == null) {
8500           event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8501         } else {
8502           eventBuilder_.clear();
8503         }
8504         bitField0_ = (bitField0_ & ~0x00000008);
8505         return this;
8506       }
8507
8508       public Builder clone() {
8509         return create().mergeFrom(buildPartial());
8510       }
8511
8512       public com.google.protobuf.Descriptors.Descriptor
8513           getDescriptorForType() {
8514         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
8515       }
8516
8517       public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
8518         return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
8519       }
8520
8521       public com.openxc.BinaryMessages.TranslatedMessage build() {
8522         com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
8523         if (!result.isInitialized()) {
8524           throw newUninitializedMessageException(result);
8525         }
8526         return result;
8527       }
8528
8529       public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
8530         com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
8531         int from_bitField0_ = bitField0_;
8532         int to_bitField0_ = 0;
8533         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
8534           to_bitField0_ |= 0x00000001;
8535         }
8536         result.type_ = type_;
8537         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
8538           to_bitField0_ |= 0x00000002;
8539         }
8540         result.name_ = name_;
8541         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
8542           to_bitField0_ |= 0x00000004;
8543         }
8544         if (valueBuilder_ == null) {
8545           result.value_ = value_;
8546         } else {
8547           result.value_ = valueBuilder_.build();
8548         }
8549         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
8550           to_bitField0_ |= 0x00000008;
8551         }
8552         if (eventBuilder_ == null) {
8553           result.event_ = event_;
8554         } else {
8555           result.event_ = eventBuilder_.build();
8556         }
8557         result.bitField0_ = to_bitField0_;
8558         onBuilt();
8559         return result;
8560       }
8561
8562       public Builder mergeFrom(com.google.protobuf.Message other) {
8563         if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
8564           return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
8565         } else {
8566           super.mergeFrom(other);
8567           return this;
8568         }
8569       }
8570
8571       public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
8572         if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
8573         if (other.hasType()) {
8574           setType(other.getType());
8575         }
8576         if (other.hasName()) {
8577           bitField0_ |= 0x00000002;
8578           name_ = other.name_;
8579           onChanged();
8580         }
8581         if (other.hasValue()) {
8582           mergeValue(other.getValue());
8583         }
8584         if (other.hasEvent()) {
8585           mergeEvent(other.getEvent());
8586         }
8587         this.mergeUnknownFields(other.getUnknownFields());
8588         return this;
8589       }
8590
8591       public final boolean isInitialized() {
8592         return true;
8593       }
8594
8595       public Builder mergeFrom(
8596           com.google.protobuf.CodedInputStream input,
8597           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
8598           throws java.io.IOException {
8599         com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
8600         try {
8601           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
8602         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
8603           parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
8604           throw e;
8605         } finally {
8606           if (parsedMessage != null) {
8607             mergeFrom(parsedMessage);
8608           }
8609         }
8610         return this;
8611       }
8612       private int bitField0_;
8613
8614       // optional .openxc.TranslatedMessage.Type type = 1;
8615       private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
8616       /**
8617        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
8618        */
8619       public boolean hasType() {
8620         return ((bitField0_ & 0x00000001) == 0x00000001);
8621       }
8622       /**
8623        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
8624        */
8625       public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
8626         return type_;
8627       }
8628       /**
8629        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
8630        */
8631       public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
8632         if (value == null) {
8633           throw new NullPointerException();
8634         }
8635         bitField0_ |= 0x00000001;
8636         type_ = value;
8637         onChanged();
8638         return this;
8639       }
8640       /**
8641        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
8642        */
8643       public Builder clearType() {
8644         bitField0_ = (bitField0_ & ~0x00000001);
8645         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
8646         onChanged();
8647         return this;
8648       }
8649
8650       // optional string name = 2;
8651       private java.lang.Object name_ = "";
8652       /**
8653        * <code>optional string name = 2;</code>
8654        */
8655       public boolean hasName() {
8656         return ((bitField0_ & 0x00000002) == 0x00000002);
8657       }
8658       /**
8659        * <code>optional string name = 2;</code>
8660        */
8661       public java.lang.String getName() {
8662         java.lang.Object ref = name_;
8663         if (!(ref instanceof java.lang.String)) {
8664           java.lang.String s = ((com.google.protobuf.ByteString) ref)
8665               .toStringUtf8();
8666           name_ = s;
8667           return s;
8668         } else {
8669           return (java.lang.String) ref;
8670         }
8671       }
8672       /**
8673        * <code>optional string name = 2;</code>
8674        */
8675       public com.google.protobuf.ByteString
8676           getNameBytes() {
8677         java.lang.Object ref = name_;
8678         if (ref instanceof String) {
8679           com.google.protobuf.ByteString b = 
8680               com.google.protobuf.ByteString.copyFromUtf8(
8681                   (java.lang.String) ref);
8682           name_ = b;
8683           return b;
8684         } else {
8685           return (com.google.protobuf.ByteString) ref;
8686         }
8687       }
8688       /**
8689        * <code>optional string name = 2;</code>
8690        */
8691       public Builder setName(
8692           java.lang.String value) {
8693         if (value == null) {
8694     throw new NullPointerException();
8695   }
8696   bitField0_ |= 0x00000002;
8697         name_ = value;
8698         onChanged();
8699         return this;
8700       }
8701       /**
8702        * <code>optional string name = 2;</code>
8703        */
8704       public Builder clearName() {
8705         bitField0_ = (bitField0_ & ~0x00000002);
8706         name_ = getDefaultInstance().getName();
8707         onChanged();
8708         return this;
8709       }
8710       /**
8711        * <code>optional string name = 2;</code>
8712        */
8713       public Builder setNameBytes(
8714           com.google.protobuf.ByteString value) {
8715         if (value == null) {
8716     throw new NullPointerException();
8717   }
8718   bitField0_ |= 0x00000002;
8719         name_ = value;
8720         onChanged();
8721         return this;
8722       }
8723
8724       // optional .openxc.DynamicField value = 3;
8725       private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8726       private com.google.protobuf.SingleFieldBuilder<
8727           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_;
8728       /**
8729        * <code>optional .openxc.DynamicField value = 3;</code>
8730        */
8731       public boolean hasValue() {
8732         return ((bitField0_ & 0x00000004) == 0x00000004);
8733       }
8734       /**
8735        * <code>optional .openxc.DynamicField value = 3;</code>
8736        */
8737       public com.openxc.BinaryMessages.DynamicField getValue() {
8738         if (valueBuilder_ == null) {
8739           return value_;
8740         } else {
8741           return valueBuilder_.getMessage();
8742         }
8743       }
8744       /**
8745        * <code>optional .openxc.DynamicField value = 3;</code>
8746        */
8747       public Builder setValue(com.openxc.BinaryMessages.DynamicField value) {
8748         if (valueBuilder_ == null) {
8749           if (value == null) {
8750             throw new NullPointerException();
8751           }
8752           value_ = value;
8753           onChanged();
8754         } else {
8755           valueBuilder_.setMessage(value);
8756         }
8757         bitField0_ |= 0x00000004;
8758         return this;
8759       }
8760       /**
8761        * <code>optional .openxc.DynamicField value = 3;</code>
8762        */
8763       public Builder setValue(
8764           com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
8765         if (valueBuilder_ == null) {
8766           value_ = builderForValue.build();
8767           onChanged();
8768         } else {
8769           valueBuilder_.setMessage(builderForValue.build());
8770         }
8771         bitField0_ |= 0x00000004;
8772         return this;
8773       }
8774       /**
8775        * <code>optional .openxc.DynamicField value = 3;</code>
8776        */
8777       public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) {
8778         if (valueBuilder_ == null) {
8779           if (((bitField0_ & 0x00000004) == 0x00000004) &&
8780               value_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
8781             value_ =
8782               com.openxc.BinaryMessages.DynamicField.newBuilder(value_).mergeFrom(value).buildPartial();
8783           } else {
8784             value_ = value;
8785           }
8786           onChanged();
8787         } else {
8788           valueBuilder_.mergeFrom(value);
8789         }
8790         bitField0_ |= 0x00000004;
8791         return this;
8792       }
8793       /**
8794        * <code>optional .openxc.DynamicField value = 3;</code>
8795        */
8796       public Builder clearValue() {
8797         if (valueBuilder_ == null) {
8798           value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8799           onChanged();
8800         } else {
8801           valueBuilder_.clear();
8802         }
8803         bitField0_ = (bitField0_ & ~0x00000004);
8804         return this;
8805       }
8806       /**
8807        * <code>optional .openxc.DynamicField value = 3;</code>
8808        */
8809       public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() {
8810         bitField0_ |= 0x00000004;
8811         onChanged();
8812         return getValueFieldBuilder().getBuilder();
8813       }
8814       /**
8815        * <code>optional .openxc.DynamicField value = 3;</code>
8816        */
8817       public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
8818         if (valueBuilder_ != null) {
8819           return valueBuilder_.getMessageOrBuilder();
8820         } else {
8821           return value_;
8822         }
8823       }
8824       /**
8825        * <code>optional .openxc.DynamicField value = 3;</code>
8826        */
8827       private com.google.protobuf.SingleFieldBuilder<
8828           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> 
8829           getValueFieldBuilder() {
8830         if (valueBuilder_ == null) {
8831           valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
8832               com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
8833                   value_,
8834                   getParentForChildren(),
8835                   isClean());
8836           value_ = null;
8837         }
8838         return valueBuilder_;
8839       }
8840
8841       // optional .openxc.DynamicField event = 4;
8842       private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8843       private com.google.protobuf.SingleFieldBuilder<
8844           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_;
8845       /**
8846        * <code>optional .openxc.DynamicField event = 4;</code>
8847        */
8848       public boolean hasEvent() {
8849         return ((bitField0_ & 0x00000008) == 0x00000008);
8850       }
8851       /**
8852        * <code>optional .openxc.DynamicField event = 4;</code>
8853        */
8854       public com.openxc.BinaryMessages.DynamicField getEvent() {
8855         if (eventBuilder_ == null) {
8856           return event_;
8857         } else {
8858           return eventBuilder_.getMessage();
8859         }
8860       }
8861       /**
8862        * <code>optional .openxc.DynamicField event = 4;</code>
8863        */
8864       public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) {
8865         if (eventBuilder_ == null) {
8866           if (value == null) {
8867             throw new NullPointerException();
8868           }
8869           event_ = value;
8870           onChanged();
8871         } else {
8872           eventBuilder_.setMessage(value);
8873         }
8874         bitField0_ |= 0x00000008;
8875         return this;
8876       }
8877       /**
8878        * <code>optional .openxc.DynamicField event = 4;</code>
8879        */
8880       public Builder setEvent(
8881           com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
8882         if (eventBuilder_ == null) {
8883           event_ = builderForValue.build();
8884           onChanged();
8885         } else {
8886           eventBuilder_.setMessage(builderForValue.build());
8887         }
8888         bitField0_ |= 0x00000008;
8889         return this;
8890       }
8891       /**
8892        * <code>optional .openxc.DynamicField event = 4;</code>
8893        */
8894       public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) {
8895         if (eventBuilder_ == null) {
8896           if (((bitField0_ & 0x00000008) == 0x00000008) &&
8897               event_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
8898             event_ =
8899               com.openxc.BinaryMessages.DynamicField.newBuilder(event_).mergeFrom(value).buildPartial();
8900           } else {
8901             event_ = value;
8902           }
8903           onChanged();
8904         } else {
8905           eventBuilder_.mergeFrom(value);
8906         }
8907         bitField0_ |= 0x00000008;
8908         return this;
8909       }
8910       /**
8911        * <code>optional .openxc.DynamicField event = 4;</code>
8912        */
8913       public Builder clearEvent() {
8914         if (eventBuilder_ == null) {
8915           event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
8916           onChanged();
8917         } else {
8918           eventBuilder_.clear();
8919         }
8920         bitField0_ = (bitField0_ & ~0x00000008);
8921         return this;
8922       }
8923       /**
8924        * <code>optional .openxc.DynamicField event = 4;</code>
8925        */
8926       public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() {
8927         bitField0_ |= 0x00000008;
8928         onChanged();
8929         return getEventFieldBuilder().getBuilder();
8930       }
8931       /**
8932        * <code>optional .openxc.DynamicField event = 4;</code>
8933        */
8934       public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
8935         if (eventBuilder_ != null) {
8936           return eventBuilder_.getMessageOrBuilder();
8937         } else {
8938           return event_;
8939         }
8940       }
8941       /**
8942        * <code>optional .openxc.DynamicField event = 4;</code>
8943        */
8944       private com.google.protobuf.SingleFieldBuilder<
8945           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> 
8946           getEventFieldBuilder() {
8947         if (eventBuilder_ == null) {
8948           eventBuilder_ = new com.google.protobuf.SingleFieldBuilder<
8949               com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
8950                   event_,
8951                   getParentForChildren(),
8952                   isClean());
8953           event_ = null;
8954         }
8955         return eventBuilder_;
8956       }
8957
8958       // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
8959     }
8960
8961     static {
8962       defaultInstance = new TranslatedMessage(true);
8963       defaultInstance.initFields();
8964     }
8965
8966     // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
8967   }
8968
8969   private static com.google.protobuf.Descriptors.Descriptor
8970     internal_static_openxc_VehicleMessage_descriptor;
8971   private static
8972     com.google.protobuf.GeneratedMessage.FieldAccessorTable
8973       internal_static_openxc_VehicleMessage_fieldAccessorTable;
8974   private static com.google.protobuf.Descriptors.Descriptor
8975     internal_static_openxc_RawMessage_descriptor;
8976   private static
8977     com.google.protobuf.GeneratedMessage.FieldAccessorTable
8978       internal_static_openxc_RawMessage_fieldAccessorTable;
8979   private static com.google.protobuf.Descriptors.Descriptor
8980     internal_static_openxc_ControlCommand_descriptor;
8981   private static
8982     com.google.protobuf.GeneratedMessage.FieldAccessorTable
8983       internal_static_openxc_ControlCommand_fieldAccessorTable;
8984   private static com.google.protobuf.Descriptors.Descriptor
8985     internal_static_openxc_DiagnosticControlCommand_descriptor;
8986   private static
8987     com.google.protobuf.GeneratedMessage.FieldAccessorTable
8988       internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable;
8989   private static com.google.protobuf.Descriptors.Descriptor
8990     internal_static_openxc_PassthroughModeControlCommand_descriptor;
8991   private static
8992     com.google.protobuf.GeneratedMessage.FieldAccessorTable
8993       internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable;
8994   private static com.google.protobuf.Descriptors.Descriptor
8995     internal_static_openxc_CommandResponse_descriptor;
8996   private static
8997     com.google.protobuf.GeneratedMessage.FieldAccessorTable
8998       internal_static_openxc_CommandResponse_fieldAccessorTable;
8999   private static com.google.protobuf.Descriptors.Descriptor
9000     internal_static_openxc_DiagnosticRequest_descriptor;
9001   private static
9002     com.google.protobuf.GeneratedMessage.FieldAccessorTable
9003       internal_static_openxc_DiagnosticRequest_fieldAccessorTable;
9004   private static com.google.protobuf.Descriptors.Descriptor
9005     internal_static_openxc_DiagnosticResponse_descriptor;
9006   private static
9007     com.google.protobuf.GeneratedMessage.FieldAccessorTable
9008       internal_static_openxc_DiagnosticResponse_fieldAccessorTable;
9009   private static com.google.protobuf.Descriptors.Descriptor
9010     internal_static_openxc_DynamicField_descriptor;
9011   private static
9012     com.google.protobuf.GeneratedMessage.FieldAccessorTable
9013       internal_static_openxc_DynamicField_fieldAccessorTable;
9014   private static com.google.protobuf.Descriptors.Descriptor
9015     internal_static_openxc_TranslatedMessage_descriptor;
9016   private static
9017     com.google.protobuf.GeneratedMessage.FieldAccessorTable
9018       internal_static_openxc_TranslatedMessage_fieldAccessorTable;
9019
9020   public static com.google.protobuf.Descriptors.FileDescriptor
9021       getDescriptor() {
9022     return descriptor;
9023   }
9024   private static com.google.protobuf.Descriptors.FileDescriptor
9025       descriptor;
9026   static {
9027     java.lang.String[] descriptorData = {
9028       "\n\014openxc.proto\022\006openxc\"\224\003\n\016VehicleMessag" +
9029       "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
9030       "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
9031       "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
9032       "xc.TranslatedMessage\0227\n\023diagnostic_respo" +
9033       "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\022/\n" +
9034       "\017control_command\030\005 \001(\0132\026.openxc.ControlC" +
9035       "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" +
9036       "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" +
9037       "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO",
9038       "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" +
9039       "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" +
9040       "data\030\003 \001(\014\"\207\002\n\016ControlCommand\022)\n\004type\030\001 " +
9041       "\001(\0162\033.openxc.ControlCommand.Type\022<\n\022diag" +
9042       "nostic_request\030\002 \001(\0132 .openxc.Diagnostic" +
9043       "ControlCommand\022G\n\030passthrough_mode_reque" +
9044       "st\030\003 \001(\0132%.openxc.PassthroughModeControl" +
9045       "Command\"C\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" +
9046       "D\020\002\022\016\n\nDIAGNOSTIC\020\003\022\017\n\013PASSTHROUGH\020\004\"\236\001\n" +
9047       "\030DiagnosticControlCommand\022*\n\007request\030\001 \001",
9048       "(\0132\031.openxc.DiagnosticRequest\0227\n\006action\030" +
9049       "\002 \001(\0162\'.openxc.DiagnosticControlCommand." +
9050       "Action\"\035\n\006Action\022\007\n\003ADD\020\001\022\n\n\006CANCEL\020\002\"\253\001" +
9051       "\n\035PassthroughModeControlCommand\022\013\n\003bus\030\001" +
9052       " \001(\005\022C\n\004mode\030\002 \001(\01625.openxc.PassthroughM" +
9053       "odeControlCommand.PassthroughMode\"8\n\017Pas" +
9054       "sthroughMode\022\007\n\003OFF\020\001\022\014\n\010FILTERED\020\002\022\016\n\nU" +
9055       "NFILTERED\020\003\"]\n\017CommandResponse\022)\n\004type\030\001" +
9056       " \001(\0162\033.openxc.ControlCommand.Type\022\017\n\007mes" +
9057       "sage\030\002 \001(\t\022\016\n\006status\030\003 \001(\010\"\375\001\n\021Diagnosti",
9058       "cRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(" +
9059       "\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030" +
9060       "\005 \001(\014\022\032\n\022multiple_responses\030\006 \001(\010\022\021\n\tfre" +
9061       "quency\030\007 \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_ty" +
9062       "pe\030\t \001(\0162%.openxc.DiagnosticRequest.Deco" +
9063       "dedType\"!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2" +
9064       "\020\002\"\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022" +
9065       "\n\nmessage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030" +
9066       "\004 \001(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_respo" +
9067       "nse_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value",
9068       "\030\010 \001(\001\"\242\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031." +
9069       "openxc.DynamicField.Type\022\024\n\014string_value" +
9070       "\030\002 \001(\t\022\025\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean" +
9071       "_value\030\004 \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020" +
9072       "\002\022\010\n\004BOOL\020\003\"\367\001\n\021TranslatedMessage\022,\n\004typ" +
9073       "e\030\001 \001(\0162\036.openxc.TranslatedMessage.Type\022" +
9074       "\014\n\004name\030\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.Dy" +
9075       "namicField\022#\n\005event\030\004 \001(\0132\024.openxc.Dynam" +
9076       "icField\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004" +
9077       "BOOL\020\003\022\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NU",
9078       "M\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016Bin" +
9079       "aryMessages"
9080     };
9081     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
9082       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
9083         public com.google.protobuf.ExtensionRegistry assignDescriptors(
9084             com.google.protobuf.Descriptors.FileDescriptor root) {
9085           descriptor = root;
9086           internal_static_openxc_VehicleMessage_descriptor =
9087             getDescriptor().getMessageTypes().get(0);
9088           internal_static_openxc_VehicleMessage_fieldAccessorTable = new
9089             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9090               internal_static_openxc_VehicleMessage_descriptor,
9091               new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", });
9092           internal_static_openxc_RawMessage_descriptor =
9093             getDescriptor().getMessageTypes().get(1);
9094           internal_static_openxc_RawMessage_fieldAccessorTable = new
9095             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9096               internal_static_openxc_RawMessage_descriptor,
9097               new java.lang.String[] { "Bus", "MessageId", "Data", });
9098           internal_static_openxc_ControlCommand_descriptor =
9099             getDescriptor().getMessageTypes().get(2);
9100           internal_static_openxc_ControlCommand_fieldAccessorTable = new
9101             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9102               internal_static_openxc_ControlCommand_descriptor,
9103               new java.lang.String[] { "Type", "DiagnosticRequest", "PassthroughModeRequest", });
9104           internal_static_openxc_DiagnosticControlCommand_descriptor =
9105             getDescriptor().getMessageTypes().get(3);
9106           internal_static_openxc_DiagnosticControlCommand_fieldAccessorTable = new
9107             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9108               internal_static_openxc_DiagnosticControlCommand_descriptor,
9109               new java.lang.String[] { "Request", "Action", });
9110           internal_static_openxc_PassthroughModeControlCommand_descriptor =
9111             getDescriptor().getMessageTypes().get(4);
9112           internal_static_openxc_PassthroughModeControlCommand_fieldAccessorTable = new
9113             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9114               internal_static_openxc_PassthroughModeControlCommand_descriptor,
9115               new java.lang.String[] { "Bus", "Mode", });
9116           internal_static_openxc_CommandResponse_descriptor =
9117             getDescriptor().getMessageTypes().get(5);
9118           internal_static_openxc_CommandResponse_fieldAccessorTable = new
9119             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9120               internal_static_openxc_CommandResponse_descriptor,
9121               new java.lang.String[] { "Type", "Message", "Status", });
9122           internal_static_openxc_DiagnosticRequest_descriptor =
9123             getDescriptor().getMessageTypes().get(6);
9124           internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new
9125             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9126               internal_static_openxc_DiagnosticRequest_descriptor,
9127               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", });
9128           internal_static_openxc_DiagnosticResponse_descriptor =
9129             getDescriptor().getMessageTypes().get(7);
9130           internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new
9131             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9132               internal_static_openxc_DiagnosticResponse_descriptor,
9133               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", });
9134           internal_static_openxc_DynamicField_descriptor =
9135             getDescriptor().getMessageTypes().get(8);
9136           internal_static_openxc_DynamicField_fieldAccessorTable = new
9137             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9138               internal_static_openxc_DynamicField_descriptor,
9139               new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", });
9140           internal_static_openxc_TranslatedMessage_descriptor =
9141             getDescriptor().getMessageTypes().get(9);
9142           internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
9143             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
9144               internal_static_openxc_TranslatedMessage_descriptor,
9145               new java.lang.String[] { "Type", "Name", "Value", "Event", });
9146           return null;
9147         }
9148       };
9149     com.google.protobuf.Descriptors.FileDescriptor
9150       .internalBuildGeneratedFileFrom(descriptorData,
9151         new com.google.protobuf.Descriptors.FileDescriptor[] {
9152         }, assigner);
9153   }
9154
9155   // @@protoc_insertion_point(outer_class_scope)
9156 }