Add 'name' and 'multiple_responses' fields to diag requests.
[apps/agl-service-can-low-level.git] / gen / java / com / openxc / BinaryMessages.java
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: openxc.proto
3
4 package com.openxc;
5
6 public final class BinaryMessages {
7   private BinaryMessages() {}
8   public static void registerAllExtensions(
9       com.google.protobuf.ExtensionRegistry registry) {
10   }
11   public interface VehicleMessageOrBuilder
12       extends com.google.protobuf.MessageOrBuilder {
13
14     // optional .openxc.VehicleMessage.Type type = 1;
15     /**
16      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
17      */
18     boolean hasType();
19     /**
20      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
21      */
22     com.openxc.BinaryMessages.VehicleMessage.Type getType();
23
24     // optional .openxc.RawMessage raw_message = 2;
25     /**
26      * <code>optional .openxc.RawMessage raw_message = 2;</code>
27      */
28     boolean hasRawMessage();
29     /**
30      * <code>optional .openxc.RawMessage raw_message = 2;</code>
31      */
32     com.openxc.BinaryMessages.RawMessage getRawMessage();
33     /**
34      * <code>optional .openxc.RawMessage raw_message = 2;</code>
35      */
36     com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder();
37
38     // optional .openxc.TranslatedMessage translated_message = 3;
39     /**
40      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
41      */
42     boolean hasTranslatedMessage();
43     /**
44      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
45      */
46     com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage();
47     /**
48      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
49      */
50     com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder();
51
52     // optional .openxc.DiagnosticResponse diagnostic_response = 4;
53     /**
54      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
55      */
56     boolean hasDiagnosticResponse();
57     /**
58      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
59      */
60     com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse();
61     /**
62      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
63      */
64     com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder();
65
66     // 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.DiagnosticRequest diagnostic_request = 2;
2060     /**
2061      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2062      */
2063     boolean hasDiagnosticRequest();
2064     /**
2065      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2066      */
2067     com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest();
2068     /**
2069      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2070      */
2071     com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder();
2072   }
2073   /**
2074    * Protobuf type {@code openxc.ControlCommand}
2075    */
2076   public static final class ControlCommand extends
2077       com.google.protobuf.GeneratedMessage
2078       implements ControlCommandOrBuilder {
2079     // Use ControlCommand.newBuilder() to construct.
2080     private ControlCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2081       super(builder);
2082       this.unknownFields = builder.getUnknownFields();
2083     }
2084     private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2085
2086     private static final ControlCommand defaultInstance;
2087     public static ControlCommand getDefaultInstance() {
2088       return defaultInstance;
2089     }
2090
2091     public ControlCommand getDefaultInstanceForType() {
2092       return defaultInstance;
2093     }
2094
2095     private final com.google.protobuf.UnknownFieldSet unknownFields;
2096     @java.lang.Override
2097     public final com.google.protobuf.UnknownFieldSet
2098         getUnknownFields() {
2099       return this.unknownFields;
2100     }
2101     private ControlCommand(
2102         com.google.protobuf.CodedInputStream input,
2103         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2104         throws com.google.protobuf.InvalidProtocolBufferException {
2105       initFields();
2106       int mutable_bitField0_ = 0;
2107       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2108           com.google.protobuf.UnknownFieldSet.newBuilder();
2109       try {
2110         boolean done = false;
2111         while (!done) {
2112           int tag = input.readTag();
2113           switch (tag) {
2114             case 0:
2115               done = true;
2116               break;
2117             default: {
2118               if (!parseUnknownField(input, unknownFields,
2119                                      extensionRegistry, tag)) {
2120                 done = true;
2121               }
2122               break;
2123             }
2124             case 8: {
2125               int rawValue = input.readEnum();
2126               com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue);
2127               if (value == null) {
2128                 unknownFields.mergeVarintField(1, rawValue);
2129               } else {
2130                 bitField0_ |= 0x00000001;
2131                 type_ = value;
2132               }
2133               break;
2134             }
2135             case 18: {
2136               com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null;
2137               if (((bitField0_ & 0x00000002) == 0x00000002)) {
2138                 subBuilder = diagnosticRequest_.toBuilder();
2139               }
2140               diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry);
2141               if (subBuilder != null) {
2142                 subBuilder.mergeFrom(diagnosticRequest_);
2143                 diagnosticRequest_ = subBuilder.buildPartial();
2144               }
2145               bitField0_ |= 0x00000002;
2146               break;
2147             }
2148           }
2149         }
2150       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2151         throw e.setUnfinishedMessage(this);
2152       } catch (java.io.IOException e) {
2153         throw new com.google.protobuf.InvalidProtocolBufferException(
2154             e.getMessage()).setUnfinishedMessage(this);
2155       } finally {
2156         this.unknownFields = unknownFields.build();
2157         makeExtensionsImmutable();
2158       }
2159     }
2160     public static final com.google.protobuf.Descriptors.Descriptor
2161         getDescriptor() {
2162       return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2163     }
2164
2165     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2166         internalGetFieldAccessorTable() {
2167       return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
2168           .ensureFieldAccessorsInitialized(
2169               com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
2170     }
2171
2172     public static com.google.protobuf.Parser<ControlCommand> PARSER =
2173         new com.google.protobuf.AbstractParser<ControlCommand>() {
2174       public ControlCommand parsePartialFrom(
2175           com.google.protobuf.CodedInputStream input,
2176           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2177           throws com.google.protobuf.InvalidProtocolBufferException {
2178         return new ControlCommand(input, extensionRegistry);
2179       }
2180     };
2181
2182     @java.lang.Override
2183     public com.google.protobuf.Parser<ControlCommand> getParserForType() {
2184       return PARSER;
2185     }
2186
2187     /**
2188      * Protobuf enum {@code openxc.ControlCommand.Type}
2189      */
2190     public enum Type
2191         implements com.google.protobuf.ProtocolMessageEnum {
2192       /**
2193        * <code>VERSION = 1;</code>
2194        */
2195       VERSION(0, 1),
2196       /**
2197        * <code>DEVICE_ID = 2;</code>
2198        */
2199       DEVICE_ID(1, 2),
2200       /**
2201        * <code>DIAGNOSTIC = 3;</code>
2202        */
2203       DIAGNOSTIC(2, 3),
2204       ;
2205
2206       /**
2207        * <code>VERSION = 1;</code>
2208        */
2209       public static final int VERSION_VALUE = 1;
2210       /**
2211        * <code>DEVICE_ID = 2;</code>
2212        */
2213       public static final int DEVICE_ID_VALUE = 2;
2214       /**
2215        * <code>DIAGNOSTIC = 3;</code>
2216        */
2217       public static final int DIAGNOSTIC_VALUE = 3;
2218
2219
2220       public final int getNumber() { return value; }
2221
2222       public static Type valueOf(int value) {
2223         switch (value) {
2224           case 1: return VERSION;
2225           case 2: return DEVICE_ID;
2226           case 3: return DIAGNOSTIC;
2227           default: return null;
2228         }
2229       }
2230
2231       public static com.google.protobuf.Internal.EnumLiteMap<Type>
2232           internalGetValueMap() {
2233         return internalValueMap;
2234       }
2235       private static com.google.protobuf.Internal.EnumLiteMap<Type>
2236           internalValueMap =
2237             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
2238               public Type findValueByNumber(int number) {
2239                 return Type.valueOf(number);
2240               }
2241             };
2242
2243       public final com.google.protobuf.Descriptors.EnumValueDescriptor
2244           getValueDescriptor() {
2245         return getDescriptor().getValues().get(index);
2246       }
2247       public final com.google.protobuf.Descriptors.EnumDescriptor
2248           getDescriptorForType() {
2249         return getDescriptor();
2250       }
2251       public static final com.google.protobuf.Descriptors.EnumDescriptor
2252           getDescriptor() {
2253         return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0);
2254       }
2255
2256       private static final Type[] VALUES = values();
2257
2258       public static Type valueOf(
2259           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
2260         if (desc.getType() != getDescriptor()) {
2261           throw new java.lang.IllegalArgumentException(
2262             "EnumValueDescriptor is not for this type.");
2263         }
2264         return VALUES[desc.getIndex()];
2265       }
2266
2267       private final int index;
2268       private final int value;
2269
2270       private Type(int index, int value) {
2271         this.index = index;
2272         this.value = value;
2273       }
2274
2275       // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type)
2276     }
2277
2278     private int bitField0_;
2279     // optional .openxc.ControlCommand.Type type = 1;
2280     public static final int TYPE_FIELD_NUMBER = 1;
2281     private com.openxc.BinaryMessages.ControlCommand.Type type_;
2282     /**
2283      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2284      */
2285     public boolean hasType() {
2286       return ((bitField0_ & 0x00000001) == 0x00000001);
2287     }
2288     /**
2289      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2290      */
2291     public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2292       return type_;
2293     }
2294
2295     // optional .openxc.DiagnosticRequest diagnostic_request = 2;
2296     public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2;
2297     private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_;
2298     /**
2299      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2300      */
2301     public boolean hasDiagnosticRequest() {
2302       return ((bitField0_ & 0x00000002) == 0x00000002);
2303     }
2304     /**
2305      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2306      */
2307     public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
2308       return diagnosticRequest_;
2309     }
2310     /**
2311      * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2312      */
2313     public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
2314       return diagnosticRequest_;
2315     }
2316
2317     private void initFields() {
2318       type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2319       diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2320     }
2321     private byte memoizedIsInitialized = -1;
2322     public final boolean isInitialized() {
2323       byte isInitialized = memoizedIsInitialized;
2324       if (isInitialized != -1) return isInitialized == 1;
2325
2326       memoizedIsInitialized = 1;
2327       return true;
2328     }
2329
2330     public void writeTo(com.google.protobuf.CodedOutputStream output)
2331                         throws java.io.IOException {
2332       getSerializedSize();
2333       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2334         output.writeEnum(1, type_.getNumber());
2335       }
2336       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2337         output.writeMessage(2, diagnosticRequest_);
2338       }
2339       getUnknownFields().writeTo(output);
2340     }
2341
2342     private int memoizedSerializedSize = -1;
2343     public int getSerializedSize() {
2344       int size = memoizedSerializedSize;
2345       if (size != -1) return size;
2346
2347       size = 0;
2348       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2349         size += com.google.protobuf.CodedOutputStream
2350           .computeEnumSize(1, type_.getNumber());
2351       }
2352       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2353         size += com.google.protobuf.CodedOutputStream
2354           .computeMessageSize(2, diagnosticRequest_);
2355       }
2356       size += getUnknownFields().getSerializedSize();
2357       memoizedSerializedSize = size;
2358       return size;
2359     }
2360
2361     private static final long serialVersionUID = 0L;
2362     @java.lang.Override
2363     protected java.lang.Object writeReplace()
2364         throws java.io.ObjectStreamException {
2365       return super.writeReplace();
2366     }
2367
2368     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2369         com.google.protobuf.ByteString data)
2370         throws com.google.protobuf.InvalidProtocolBufferException {
2371       return PARSER.parseFrom(data);
2372     }
2373     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2374         com.google.protobuf.ByteString data,
2375         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2376         throws com.google.protobuf.InvalidProtocolBufferException {
2377       return PARSER.parseFrom(data, extensionRegistry);
2378     }
2379     public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data)
2380         throws com.google.protobuf.InvalidProtocolBufferException {
2381       return PARSER.parseFrom(data);
2382     }
2383     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2384         byte[] data,
2385         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2386         throws com.google.protobuf.InvalidProtocolBufferException {
2387       return PARSER.parseFrom(data, extensionRegistry);
2388     }
2389     public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input)
2390         throws java.io.IOException {
2391       return PARSER.parseFrom(input);
2392     }
2393     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2394         java.io.InputStream input,
2395         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2396         throws java.io.IOException {
2397       return PARSER.parseFrom(input, extensionRegistry);
2398     }
2399     public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input)
2400         throws java.io.IOException {
2401       return PARSER.parseDelimitedFrom(input);
2402     }
2403     public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(
2404         java.io.InputStream input,
2405         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2406         throws java.io.IOException {
2407       return PARSER.parseDelimitedFrom(input, extensionRegistry);
2408     }
2409     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2410         com.google.protobuf.CodedInputStream input)
2411         throws java.io.IOException {
2412       return PARSER.parseFrom(input);
2413     }
2414     public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2415         com.google.protobuf.CodedInputStream input,
2416         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2417         throws java.io.IOException {
2418       return PARSER.parseFrom(input, extensionRegistry);
2419     }
2420
2421     public static Builder newBuilder() { return Builder.create(); }
2422     public Builder newBuilderForType() { return newBuilder(); }
2423     public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) {
2424       return newBuilder().mergeFrom(prototype);
2425     }
2426     public Builder toBuilder() { return newBuilder(this); }
2427
2428     @java.lang.Override
2429     protected Builder newBuilderForType(
2430         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2431       Builder builder = new Builder(parent);
2432       return builder;
2433     }
2434     /**
2435      * Protobuf type {@code openxc.ControlCommand}
2436      */
2437     public static final class Builder extends
2438         com.google.protobuf.GeneratedMessage.Builder<Builder>
2439        implements com.openxc.BinaryMessages.ControlCommandOrBuilder {
2440       public static final com.google.protobuf.Descriptors.Descriptor
2441           getDescriptor() {
2442         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2443       }
2444
2445       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2446           internalGetFieldAccessorTable() {
2447         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
2448             .ensureFieldAccessorsInitialized(
2449                 com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
2450       }
2451
2452       // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder()
2453       private Builder() {
2454         maybeForceBuilderInitialization();
2455       }
2456
2457       private Builder(
2458           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2459         super(parent);
2460         maybeForceBuilderInitialization();
2461       }
2462       private void maybeForceBuilderInitialization() {
2463         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2464           getDiagnosticRequestFieldBuilder();
2465         }
2466       }
2467       private static Builder create() {
2468         return new Builder();
2469       }
2470
2471       public Builder clear() {
2472         super.clear();
2473         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2474         bitField0_ = (bitField0_ & ~0x00000001);
2475         if (diagnosticRequestBuilder_ == null) {
2476           diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2477         } else {
2478           diagnosticRequestBuilder_.clear();
2479         }
2480         bitField0_ = (bitField0_ & ~0x00000002);
2481         return this;
2482       }
2483
2484       public Builder clone() {
2485         return create().mergeFrom(buildPartial());
2486       }
2487
2488       public com.google.protobuf.Descriptors.Descriptor
2489           getDescriptorForType() {
2490         return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2491       }
2492
2493       public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() {
2494         return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
2495       }
2496
2497       public com.openxc.BinaryMessages.ControlCommand build() {
2498         com.openxc.BinaryMessages.ControlCommand result = buildPartial();
2499         if (!result.isInitialized()) {
2500           throw newUninitializedMessageException(result);
2501         }
2502         return result;
2503       }
2504
2505       public com.openxc.BinaryMessages.ControlCommand buildPartial() {
2506         com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this);
2507         int from_bitField0_ = bitField0_;
2508         int to_bitField0_ = 0;
2509         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2510           to_bitField0_ |= 0x00000001;
2511         }
2512         result.type_ = type_;
2513         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2514           to_bitField0_ |= 0x00000002;
2515         }
2516         if (diagnosticRequestBuilder_ == null) {
2517           result.diagnosticRequest_ = diagnosticRequest_;
2518         } else {
2519           result.diagnosticRequest_ = diagnosticRequestBuilder_.build();
2520         }
2521         result.bitField0_ = to_bitField0_;
2522         onBuilt();
2523         return result;
2524       }
2525
2526       public Builder mergeFrom(com.google.protobuf.Message other) {
2527         if (other instanceof com.openxc.BinaryMessages.ControlCommand) {
2528           return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other);
2529         } else {
2530           super.mergeFrom(other);
2531           return this;
2532         }
2533       }
2534
2535       public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) {
2536         if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this;
2537         if (other.hasType()) {
2538           setType(other.getType());
2539         }
2540         if (other.hasDiagnosticRequest()) {
2541           mergeDiagnosticRequest(other.getDiagnosticRequest());
2542         }
2543         this.mergeUnknownFields(other.getUnknownFields());
2544         return this;
2545       }
2546
2547       public final boolean isInitialized() {
2548         return true;
2549       }
2550
2551       public Builder mergeFrom(
2552           com.google.protobuf.CodedInputStream input,
2553           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2554           throws java.io.IOException {
2555         com.openxc.BinaryMessages.ControlCommand parsedMessage = null;
2556         try {
2557           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2558         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2559           parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage();
2560           throw e;
2561         } finally {
2562           if (parsedMessage != null) {
2563             mergeFrom(parsedMessage);
2564           }
2565         }
2566         return this;
2567       }
2568       private int bitField0_;
2569
2570       // optional .openxc.ControlCommand.Type type = 1;
2571       private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2572       /**
2573        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2574        */
2575       public boolean hasType() {
2576         return ((bitField0_ & 0x00000001) == 0x00000001);
2577       }
2578       /**
2579        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2580        */
2581       public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2582         return type_;
2583       }
2584       /**
2585        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2586        */
2587       public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
2588         if (value == null) {
2589           throw new NullPointerException();
2590         }
2591         bitField0_ |= 0x00000001;
2592         type_ = value;
2593         onChanged();
2594         return this;
2595       }
2596       /**
2597        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2598        */
2599       public Builder clearType() {
2600         bitField0_ = (bitField0_ & ~0x00000001);
2601         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2602         onChanged();
2603         return this;
2604       }
2605
2606       // optional .openxc.DiagnosticRequest diagnostic_request = 2;
2607       private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2608       private com.google.protobuf.SingleFieldBuilder<
2609           com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_;
2610       /**
2611        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2612        */
2613       public boolean hasDiagnosticRequest() {
2614         return ((bitField0_ & 0x00000002) == 0x00000002);
2615       }
2616       /**
2617        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2618        */
2619       public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
2620         if (diagnosticRequestBuilder_ == null) {
2621           return diagnosticRequest_;
2622         } else {
2623           return diagnosticRequestBuilder_.getMessage();
2624         }
2625       }
2626       /**
2627        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2628        */
2629       public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
2630         if (diagnosticRequestBuilder_ == null) {
2631           if (value == null) {
2632             throw new NullPointerException();
2633           }
2634           diagnosticRequest_ = value;
2635           onChanged();
2636         } else {
2637           diagnosticRequestBuilder_.setMessage(value);
2638         }
2639         bitField0_ |= 0x00000002;
2640         return this;
2641       }
2642       /**
2643        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2644        */
2645       public Builder setDiagnosticRequest(
2646           com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) {
2647         if (diagnosticRequestBuilder_ == null) {
2648           diagnosticRequest_ = builderForValue.build();
2649           onChanged();
2650         } else {
2651           diagnosticRequestBuilder_.setMessage(builderForValue.build());
2652         }
2653         bitField0_ |= 0x00000002;
2654         return this;
2655       }
2656       /**
2657        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2658        */
2659       public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
2660         if (diagnosticRequestBuilder_ == null) {
2661           if (((bitField0_ & 0x00000002) == 0x00000002) &&
2662               diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) {
2663             diagnosticRequest_ =
2664               com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial();
2665           } else {
2666             diagnosticRequest_ = value;
2667           }
2668           onChanged();
2669         } else {
2670           diagnosticRequestBuilder_.mergeFrom(value);
2671         }
2672         bitField0_ |= 0x00000002;
2673         return this;
2674       }
2675       /**
2676        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2677        */
2678       public Builder clearDiagnosticRequest() {
2679         if (diagnosticRequestBuilder_ == null) {
2680           diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2681           onChanged();
2682         } else {
2683           diagnosticRequestBuilder_.clear();
2684         }
2685         bitField0_ = (bitField0_ & ~0x00000002);
2686         return this;
2687       }
2688       /**
2689        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2690        */
2691       public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() {
2692         bitField0_ |= 0x00000002;
2693         onChanged();
2694         return getDiagnosticRequestFieldBuilder().getBuilder();
2695       }
2696       /**
2697        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2698        */
2699       public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
2700         if (diagnosticRequestBuilder_ != null) {
2701           return diagnosticRequestBuilder_.getMessageOrBuilder();
2702         } else {
2703           return diagnosticRequest_;
2704         }
2705       }
2706       /**
2707        * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2708        */
2709       private com.google.protobuf.SingleFieldBuilder<
2710           com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> 
2711           getDiagnosticRequestFieldBuilder() {
2712         if (diagnosticRequestBuilder_ == null) {
2713           diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2714               com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>(
2715                   diagnosticRequest_,
2716                   getParentForChildren(),
2717                   isClean());
2718           diagnosticRequest_ = null;
2719         }
2720         return diagnosticRequestBuilder_;
2721       }
2722
2723       // @@protoc_insertion_point(builder_scope:openxc.ControlCommand)
2724     }
2725
2726     static {
2727       defaultInstance = new ControlCommand(true);
2728       defaultInstance.initFields();
2729     }
2730
2731     // @@protoc_insertion_point(class_scope:openxc.ControlCommand)
2732   }
2733
2734   public interface CommandResponseOrBuilder
2735       extends com.google.protobuf.MessageOrBuilder {
2736
2737     // optional .openxc.ControlCommand.Type type = 1;
2738     /**
2739      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2740      */
2741     boolean hasType();
2742     /**
2743      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2744      */
2745     com.openxc.BinaryMessages.ControlCommand.Type getType();
2746
2747     // optional string message = 2;
2748     /**
2749      * <code>optional string message = 2;</code>
2750      */
2751     boolean hasMessage();
2752     /**
2753      * <code>optional string message = 2;</code>
2754      */
2755     java.lang.String getMessage();
2756     /**
2757      * <code>optional string message = 2;</code>
2758      */
2759     com.google.protobuf.ByteString
2760         getMessageBytes();
2761   }
2762   /**
2763    * Protobuf type {@code openxc.CommandResponse}
2764    */
2765   public static final class CommandResponse extends
2766       com.google.protobuf.GeneratedMessage
2767       implements CommandResponseOrBuilder {
2768     // Use CommandResponse.newBuilder() to construct.
2769     private CommandResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2770       super(builder);
2771       this.unknownFields = builder.getUnknownFields();
2772     }
2773     private CommandResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2774
2775     private static final CommandResponse defaultInstance;
2776     public static CommandResponse getDefaultInstance() {
2777       return defaultInstance;
2778     }
2779
2780     public CommandResponse getDefaultInstanceForType() {
2781       return defaultInstance;
2782     }
2783
2784     private final com.google.protobuf.UnknownFieldSet unknownFields;
2785     @java.lang.Override
2786     public final com.google.protobuf.UnknownFieldSet
2787         getUnknownFields() {
2788       return this.unknownFields;
2789     }
2790     private CommandResponse(
2791         com.google.protobuf.CodedInputStream input,
2792         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2793         throws com.google.protobuf.InvalidProtocolBufferException {
2794       initFields();
2795       int mutable_bitField0_ = 0;
2796       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2797           com.google.protobuf.UnknownFieldSet.newBuilder();
2798       try {
2799         boolean done = false;
2800         while (!done) {
2801           int tag = input.readTag();
2802           switch (tag) {
2803             case 0:
2804               done = true;
2805               break;
2806             default: {
2807               if (!parseUnknownField(input, unknownFields,
2808                                      extensionRegistry, tag)) {
2809                 done = true;
2810               }
2811               break;
2812             }
2813             case 8: {
2814               int rawValue = input.readEnum();
2815               com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue);
2816               if (value == null) {
2817                 unknownFields.mergeVarintField(1, rawValue);
2818               } else {
2819                 bitField0_ |= 0x00000001;
2820                 type_ = value;
2821               }
2822               break;
2823             }
2824             case 18: {
2825               bitField0_ |= 0x00000002;
2826               message_ = input.readBytes();
2827               break;
2828             }
2829           }
2830         }
2831       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2832         throw e.setUnfinishedMessage(this);
2833       } catch (java.io.IOException e) {
2834         throw new com.google.protobuf.InvalidProtocolBufferException(
2835             e.getMessage()).setUnfinishedMessage(this);
2836       } finally {
2837         this.unknownFields = unknownFields.build();
2838         makeExtensionsImmutable();
2839       }
2840     }
2841     public static final com.google.protobuf.Descriptors.Descriptor
2842         getDescriptor() {
2843       return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
2844     }
2845
2846     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2847         internalGetFieldAccessorTable() {
2848       return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable
2849           .ensureFieldAccessorsInitialized(
2850               com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class);
2851     }
2852
2853     public static com.google.protobuf.Parser<CommandResponse> PARSER =
2854         new com.google.protobuf.AbstractParser<CommandResponse>() {
2855       public CommandResponse parsePartialFrom(
2856           com.google.protobuf.CodedInputStream input,
2857           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2858           throws com.google.protobuf.InvalidProtocolBufferException {
2859         return new CommandResponse(input, extensionRegistry);
2860       }
2861     };
2862
2863     @java.lang.Override
2864     public com.google.protobuf.Parser<CommandResponse> getParserForType() {
2865       return PARSER;
2866     }
2867
2868     private int bitField0_;
2869     // optional .openxc.ControlCommand.Type type = 1;
2870     public static final int TYPE_FIELD_NUMBER = 1;
2871     private com.openxc.BinaryMessages.ControlCommand.Type type_;
2872     /**
2873      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2874      */
2875     public boolean hasType() {
2876       return ((bitField0_ & 0x00000001) == 0x00000001);
2877     }
2878     /**
2879      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2880      */
2881     public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2882       return type_;
2883     }
2884
2885     // optional string message = 2;
2886     public static final int MESSAGE_FIELD_NUMBER = 2;
2887     private java.lang.Object message_;
2888     /**
2889      * <code>optional string message = 2;</code>
2890      */
2891     public boolean hasMessage() {
2892       return ((bitField0_ & 0x00000002) == 0x00000002);
2893     }
2894     /**
2895      * <code>optional string message = 2;</code>
2896      */
2897     public java.lang.String getMessage() {
2898       java.lang.Object ref = message_;
2899       if (ref instanceof java.lang.String) {
2900         return (java.lang.String) ref;
2901       } else {
2902         com.google.protobuf.ByteString bs = 
2903             (com.google.protobuf.ByteString) ref;
2904         java.lang.String s = bs.toStringUtf8();
2905         if (bs.isValidUtf8()) {
2906           message_ = s;
2907         }
2908         return s;
2909       }
2910     }
2911     /**
2912      * <code>optional string message = 2;</code>
2913      */
2914     public com.google.protobuf.ByteString
2915         getMessageBytes() {
2916       java.lang.Object ref = message_;
2917       if (ref instanceof java.lang.String) {
2918         com.google.protobuf.ByteString b = 
2919             com.google.protobuf.ByteString.copyFromUtf8(
2920                 (java.lang.String) ref);
2921         message_ = b;
2922         return b;
2923       } else {
2924         return (com.google.protobuf.ByteString) ref;
2925       }
2926     }
2927
2928     private void initFields() {
2929       type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2930       message_ = "";
2931     }
2932     private byte memoizedIsInitialized = -1;
2933     public final boolean isInitialized() {
2934       byte isInitialized = memoizedIsInitialized;
2935       if (isInitialized != -1) return isInitialized == 1;
2936
2937       memoizedIsInitialized = 1;
2938       return true;
2939     }
2940
2941     public void writeTo(com.google.protobuf.CodedOutputStream output)
2942                         throws java.io.IOException {
2943       getSerializedSize();
2944       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2945         output.writeEnum(1, type_.getNumber());
2946       }
2947       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2948         output.writeBytes(2, getMessageBytes());
2949       }
2950       getUnknownFields().writeTo(output);
2951     }
2952
2953     private int memoizedSerializedSize = -1;
2954     public int getSerializedSize() {
2955       int size = memoizedSerializedSize;
2956       if (size != -1) return size;
2957
2958       size = 0;
2959       if (((bitField0_ & 0x00000001) == 0x00000001)) {
2960         size += com.google.protobuf.CodedOutputStream
2961           .computeEnumSize(1, type_.getNumber());
2962       }
2963       if (((bitField0_ & 0x00000002) == 0x00000002)) {
2964         size += com.google.protobuf.CodedOutputStream
2965           .computeBytesSize(2, getMessageBytes());
2966       }
2967       size += getUnknownFields().getSerializedSize();
2968       memoizedSerializedSize = size;
2969       return size;
2970     }
2971
2972     private static final long serialVersionUID = 0L;
2973     @java.lang.Override
2974     protected java.lang.Object writeReplace()
2975         throws java.io.ObjectStreamException {
2976       return super.writeReplace();
2977     }
2978
2979     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
2980         com.google.protobuf.ByteString data)
2981         throws com.google.protobuf.InvalidProtocolBufferException {
2982       return PARSER.parseFrom(data);
2983     }
2984     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
2985         com.google.protobuf.ByteString data,
2986         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2987         throws com.google.protobuf.InvalidProtocolBufferException {
2988       return PARSER.parseFrom(data, extensionRegistry);
2989     }
2990     public static com.openxc.BinaryMessages.CommandResponse parseFrom(byte[] data)
2991         throws com.google.protobuf.InvalidProtocolBufferException {
2992       return PARSER.parseFrom(data);
2993     }
2994     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
2995         byte[] data,
2996         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2997         throws com.google.protobuf.InvalidProtocolBufferException {
2998       return PARSER.parseFrom(data, extensionRegistry);
2999     }
3000     public static com.openxc.BinaryMessages.CommandResponse parseFrom(java.io.InputStream input)
3001         throws java.io.IOException {
3002       return PARSER.parseFrom(input);
3003     }
3004     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
3005         java.io.InputStream input,
3006         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3007         throws java.io.IOException {
3008       return PARSER.parseFrom(input, extensionRegistry);
3009     }
3010     public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(java.io.InputStream input)
3011         throws java.io.IOException {
3012       return PARSER.parseDelimitedFrom(input);
3013     }
3014     public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(
3015         java.io.InputStream input,
3016         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3017         throws java.io.IOException {
3018       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3019     }
3020     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
3021         com.google.protobuf.CodedInputStream input)
3022         throws java.io.IOException {
3023       return PARSER.parseFrom(input);
3024     }
3025     public static com.openxc.BinaryMessages.CommandResponse parseFrom(
3026         com.google.protobuf.CodedInputStream input,
3027         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3028         throws java.io.IOException {
3029       return PARSER.parseFrom(input, extensionRegistry);
3030     }
3031
3032     public static Builder newBuilder() { return Builder.create(); }
3033     public Builder newBuilderForType() { return newBuilder(); }
3034     public static Builder newBuilder(com.openxc.BinaryMessages.CommandResponse prototype) {
3035       return newBuilder().mergeFrom(prototype);
3036     }
3037     public Builder toBuilder() { return newBuilder(this); }
3038
3039     @java.lang.Override
3040     protected Builder newBuilderForType(
3041         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3042       Builder builder = new Builder(parent);
3043       return builder;
3044     }
3045     /**
3046      * Protobuf type {@code openxc.CommandResponse}
3047      */
3048     public static final class Builder extends
3049         com.google.protobuf.GeneratedMessage.Builder<Builder>
3050        implements com.openxc.BinaryMessages.CommandResponseOrBuilder {
3051       public static final com.google.protobuf.Descriptors.Descriptor
3052           getDescriptor() {
3053         return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
3054       }
3055
3056       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3057           internalGetFieldAccessorTable() {
3058         return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_fieldAccessorTable
3059             .ensureFieldAccessorsInitialized(
3060                 com.openxc.BinaryMessages.CommandResponse.class, com.openxc.BinaryMessages.CommandResponse.Builder.class);
3061       }
3062
3063       // Construct using com.openxc.BinaryMessages.CommandResponse.newBuilder()
3064       private Builder() {
3065         maybeForceBuilderInitialization();
3066       }
3067
3068       private Builder(
3069           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3070         super(parent);
3071         maybeForceBuilderInitialization();
3072       }
3073       private void maybeForceBuilderInitialization() {
3074         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3075         }
3076       }
3077       private static Builder create() {
3078         return new Builder();
3079       }
3080
3081       public Builder clear() {
3082         super.clear();
3083         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
3084         bitField0_ = (bitField0_ & ~0x00000001);
3085         message_ = "";
3086         bitField0_ = (bitField0_ & ~0x00000002);
3087         return this;
3088       }
3089
3090       public Builder clone() {
3091         return create().mergeFrom(buildPartial());
3092       }
3093
3094       public com.google.protobuf.Descriptors.Descriptor
3095           getDescriptorForType() {
3096         return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
3097       }
3098
3099       public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() {
3100         return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
3101       }
3102
3103       public com.openxc.BinaryMessages.CommandResponse build() {
3104         com.openxc.BinaryMessages.CommandResponse result = buildPartial();
3105         if (!result.isInitialized()) {
3106           throw newUninitializedMessageException(result);
3107         }
3108         return result;
3109       }
3110
3111       public com.openxc.BinaryMessages.CommandResponse buildPartial() {
3112         com.openxc.BinaryMessages.CommandResponse result = new com.openxc.BinaryMessages.CommandResponse(this);
3113         int from_bitField0_ = bitField0_;
3114         int to_bitField0_ = 0;
3115         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3116           to_bitField0_ |= 0x00000001;
3117         }
3118         result.type_ = type_;
3119         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3120           to_bitField0_ |= 0x00000002;
3121         }
3122         result.message_ = message_;
3123         result.bitField0_ = to_bitField0_;
3124         onBuilt();
3125         return result;
3126       }
3127
3128       public Builder mergeFrom(com.google.protobuf.Message other) {
3129         if (other instanceof com.openxc.BinaryMessages.CommandResponse) {
3130           return mergeFrom((com.openxc.BinaryMessages.CommandResponse)other);
3131         } else {
3132           super.mergeFrom(other);
3133           return this;
3134         }
3135       }
3136
3137       public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) {
3138         if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this;
3139         if (other.hasType()) {
3140           setType(other.getType());
3141         }
3142         if (other.hasMessage()) {
3143           bitField0_ |= 0x00000002;
3144           message_ = other.message_;
3145           onChanged();
3146         }
3147         this.mergeUnknownFields(other.getUnknownFields());
3148         return this;
3149       }
3150
3151       public final boolean isInitialized() {
3152         return true;
3153       }
3154
3155       public Builder mergeFrom(
3156           com.google.protobuf.CodedInputStream input,
3157           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3158           throws java.io.IOException {
3159         com.openxc.BinaryMessages.CommandResponse parsedMessage = null;
3160         try {
3161           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3162         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3163           parsedMessage = (com.openxc.BinaryMessages.CommandResponse) e.getUnfinishedMessage();
3164           throw e;
3165         } finally {
3166           if (parsedMessage != null) {
3167             mergeFrom(parsedMessage);
3168           }
3169         }
3170         return this;
3171       }
3172       private int bitField0_;
3173
3174       // optional .openxc.ControlCommand.Type type = 1;
3175       private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
3176       /**
3177        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3178        */
3179       public boolean hasType() {
3180         return ((bitField0_ & 0x00000001) == 0x00000001);
3181       }
3182       /**
3183        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3184        */
3185       public com.openxc.BinaryMessages.ControlCommand.Type getType() {
3186         return type_;
3187       }
3188       /**
3189        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3190        */
3191       public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
3192         if (value == null) {
3193           throw new NullPointerException();
3194         }
3195         bitField0_ |= 0x00000001;
3196         type_ = value;
3197         onChanged();
3198         return this;
3199       }
3200       /**
3201        * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3202        */
3203       public Builder clearType() {
3204         bitField0_ = (bitField0_ & ~0x00000001);
3205         type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
3206         onChanged();
3207         return this;
3208       }
3209
3210       // optional string message = 2;
3211       private java.lang.Object message_ = "";
3212       /**
3213        * <code>optional string message = 2;</code>
3214        */
3215       public boolean hasMessage() {
3216         return ((bitField0_ & 0x00000002) == 0x00000002);
3217       }
3218       /**
3219        * <code>optional string message = 2;</code>
3220        */
3221       public java.lang.String getMessage() {
3222         java.lang.Object ref = message_;
3223         if (!(ref instanceof java.lang.String)) {
3224           java.lang.String s = ((com.google.protobuf.ByteString) ref)
3225               .toStringUtf8();
3226           message_ = s;
3227           return s;
3228         } else {
3229           return (java.lang.String) ref;
3230         }
3231       }
3232       /**
3233        * <code>optional string message = 2;</code>
3234        */
3235       public com.google.protobuf.ByteString
3236           getMessageBytes() {
3237         java.lang.Object ref = message_;
3238         if (ref instanceof String) {
3239           com.google.protobuf.ByteString b = 
3240               com.google.protobuf.ByteString.copyFromUtf8(
3241                   (java.lang.String) ref);
3242           message_ = b;
3243           return b;
3244         } else {
3245           return (com.google.protobuf.ByteString) ref;
3246         }
3247       }
3248       /**
3249        * <code>optional string message = 2;</code>
3250        */
3251       public Builder setMessage(
3252           java.lang.String value) {
3253         if (value == null) {
3254     throw new NullPointerException();
3255   }
3256   bitField0_ |= 0x00000002;
3257         message_ = value;
3258         onChanged();
3259         return this;
3260       }
3261       /**
3262        * <code>optional string message = 2;</code>
3263        */
3264       public Builder clearMessage() {
3265         bitField0_ = (bitField0_ & ~0x00000002);
3266         message_ = getDefaultInstance().getMessage();
3267         onChanged();
3268         return this;
3269       }
3270       /**
3271        * <code>optional string message = 2;</code>
3272        */
3273       public Builder setMessageBytes(
3274           com.google.protobuf.ByteString value) {
3275         if (value == null) {
3276     throw new NullPointerException();
3277   }
3278   bitField0_ |= 0x00000002;
3279         message_ = value;
3280         onChanged();
3281         return this;
3282       }
3283
3284       // @@protoc_insertion_point(builder_scope:openxc.CommandResponse)
3285     }
3286
3287     static {
3288       defaultInstance = new CommandResponse(true);
3289       defaultInstance.initFields();
3290     }
3291
3292     // @@protoc_insertion_point(class_scope:openxc.CommandResponse)
3293   }
3294
3295   public interface DiagnosticRequestOrBuilder
3296       extends com.google.protobuf.MessageOrBuilder {
3297
3298     // optional int32 bus = 1;
3299     /**
3300      * <code>optional int32 bus = 1;</code>
3301      */
3302     boolean hasBus();
3303     /**
3304      * <code>optional int32 bus = 1;</code>
3305      */
3306     int getBus();
3307
3308     // optional uint32 message_id = 2;
3309     /**
3310      * <code>optional uint32 message_id = 2;</code>
3311      */
3312     boolean hasMessageId();
3313     /**
3314      * <code>optional uint32 message_id = 2;</code>
3315      */
3316     int getMessageId();
3317
3318     // optional uint32 mode = 3;
3319     /**
3320      * <code>optional uint32 mode = 3;</code>
3321      */
3322     boolean hasMode();
3323     /**
3324      * <code>optional uint32 mode = 3;</code>
3325      */
3326     int getMode();
3327
3328     // optional uint32 pid = 4;
3329     /**
3330      * <code>optional uint32 pid = 4;</code>
3331      */
3332     boolean hasPid();
3333     /**
3334      * <code>optional uint32 pid = 4;</code>
3335      */
3336     int getPid();
3337
3338     // optional bytes payload = 5;
3339     /**
3340      * <code>optional bytes payload = 5;</code>
3341      *
3342      * <pre>
3343      * TODO we are capping this at 8 bytes for now - need to change when we
3344      * support multi-frame responses
3345      * </pre>
3346      */
3347     boolean hasPayload();
3348     /**
3349      * <code>optional bytes payload = 5;</code>
3350      *
3351      * <pre>
3352      * TODO we are capping this at 8 bytes for now - need to change when we
3353      * support multi-frame responses
3354      * </pre>
3355      */
3356     com.google.protobuf.ByteString getPayload();
3357
3358     // optional bool parse_payload = 6;
3359     /**
3360      * <code>optional bool parse_payload = 6;</code>
3361      */
3362     boolean hasParsePayload();
3363     /**
3364      * <code>optional bool parse_payload = 6;</code>
3365      */
3366     boolean getParsePayload();
3367
3368     // optional bool multiple_responses = 7;
3369     /**
3370      * <code>optional bool multiple_responses = 7;</code>
3371      */
3372     boolean hasMultipleResponses();
3373     /**
3374      * <code>optional bool multiple_responses = 7;</code>
3375      */
3376     boolean getMultipleResponses();
3377
3378     // optional double factor = 8;
3379     /**
3380      * <code>optional double factor = 8;</code>
3381      */
3382     boolean hasFactor();
3383     /**
3384      * <code>optional double factor = 8;</code>
3385      */
3386     double getFactor();
3387
3388     // optional double offset = 9;
3389     /**
3390      * <code>optional double offset = 9;</code>
3391      */
3392     boolean hasOffset();
3393     /**
3394      * <code>optional double offset = 9;</code>
3395      */
3396     double getOffset();
3397
3398     // optional double frequency = 10;
3399     /**
3400      * <code>optional double frequency = 10;</code>
3401      */
3402     boolean hasFrequency();
3403     /**
3404      * <code>optional double frequency = 10;</code>
3405      */
3406     double getFrequency();
3407
3408     // optional string name = 11;
3409     /**
3410      * <code>optional string name = 11;</code>
3411      */
3412     boolean hasName();
3413     /**
3414      * <code>optional string name = 11;</code>
3415      */
3416     java.lang.String getName();
3417     /**
3418      * <code>optional string name = 11;</code>
3419      */
3420     com.google.protobuf.ByteString
3421         getNameBytes();
3422   }
3423   /**
3424    * Protobuf type {@code openxc.DiagnosticRequest}
3425    */
3426   public static final class DiagnosticRequest extends
3427       com.google.protobuf.GeneratedMessage
3428       implements DiagnosticRequestOrBuilder {
3429     // Use DiagnosticRequest.newBuilder() to construct.
3430     private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3431       super(builder);
3432       this.unknownFields = builder.getUnknownFields();
3433     }
3434     private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3435
3436     private static final DiagnosticRequest defaultInstance;
3437     public static DiagnosticRequest getDefaultInstance() {
3438       return defaultInstance;
3439     }
3440
3441     public DiagnosticRequest getDefaultInstanceForType() {
3442       return defaultInstance;
3443     }
3444
3445     private final com.google.protobuf.UnknownFieldSet unknownFields;
3446     @java.lang.Override
3447     public final com.google.protobuf.UnknownFieldSet
3448         getUnknownFields() {
3449       return this.unknownFields;
3450     }
3451     private DiagnosticRequest(
3452         com.google.protobuf.CodedInputStream input,
3453         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3454         throws com.google.protobuf.InvalidProtocolBufferException {
3455       initFields();
3456       int mutable_bitField0_ = 0;
3457       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3458           com.google.protobuf.UnknownFieldSet.newBuilder();
3459       try {
3460         boolean done = false;
3461         while (!done) {
3462           int tag = input.readTag();
3463           switch (tag) {
3464             case 0:
3465               done = true;
3466               break;
3467             default: {
3468               if (!parseUnknownField(input, unknownFields,
3469                                      extensionRegistry, tag)) {
3470                 done = true;
3471               }
3472               break;
3473             }
3474             case 8: {
3475               bitField0_ |= 0x00000001;
3476               bus_ = input.readInt32();
3477               break;
3478             }
3479             case 16: {
3480               bitField0_ |= 0x00000002;
3481               messageId_ = input.readUInt32();
3482               break;
3483             }
3484             case 24: {
3485               bitField0_ |= 0x00000004;
3486               mode_ = input.readUInt32();
3487               break;
3488             }
3489             case 32: {
3490               bitField0_ |= 0x00000008;
3491               pid_ = input.readUInt32();
3492               break;
3493             }
3494             case 42: {
3495               bitField0_ |= 0x00000010;
3496               payload_ = input.readBytes();
3497               break;
3498             }
3499             case 48: {
3500               bitField0_ |= 0x00000020;
3501               parsePayload_ = input.readBool();
3502               break;
3503             }
3504             case 56: {
3505               bitField0_ |= 0x00000040;
3506               multipleResponses_ = input.readBool();
3507               break;
3508             }
3509             case 65: {
3510               bitField0_ |= 0x00000080;
3511               factor_ = input.readDouble();
3512               break;
3513             }
3514             case 73: {
3515               bitField0_ |= 0x00000100;
3516               offset_ = input.readDouble();
3517               break;
3518             }
3519             case 81: {
3520               bitField0_ |= 0x00000200;
3521               frequency_ = input.readDouble();
3522               break;
3523             }
3524             case 90: {
3525               bitField0_ |= 0x00000400;
3526               name_ = input.readBytes();
3527               break;
3528             }
3529           }
3530         }
3531       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3532         throw e.setUnfinishedMessage(this);
3533       } catch (java.io.IOException e) {
3534         throw new com.google.protobuf.InvalidProtocolBufferException(
3535             e.getMessage()).setUnfinishedMessage(this);
3536       } finally {
3537         this.unknownFields = unknownFields.build();
3538         makeExtensionsImmutable();
3539       }
3540     }
3541     public static final com.google.protobuf.Descriptors.Descriptor
3542         getDescriptor() {
3543       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3544     }
3545
3546     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3547         internalGetFieldAccessorTable() {
3548       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
3549           .ensureFieldAccessorsInitialized(
3550               com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
3551     }
3552
3553     public static com.google.protobuf.Parser<DiagnosticRequest> PARSER =
3554         new com.google.protobuf.AbstractParser<DiagnosticRequest>() {
3555       public DiagnosticRequest parsePartialFrom(
3556           com.google.protobuf.CodedInputStream input,
3557           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3558           throws com.google.protobuf.InvalidProtocolBufferException {
3559         return new DiagnosticRequest(input, extensionRegistry);
3560       }
3561     };
3562
3563     @java.lang.Override
3564     public com.google.protobuf.Parser<DiagnosticRequest> getParserForType() {
3565       return PARSER;
3566     }
3567
3568     private int bitField0_;
3569     // optional int32 bus = 1;
3570     public static final int BUS_FIELD_NUMBER = 1;
3571     private int bus_;
3572     /**
3573      * <code>optional int32 bus = 1;</code>
3574      */
3575     public boolean hasBus() {
3576       return ((bitField0_ & 0x00000001) == 0x00000001);
3577     }
3578     /**
3579      * <code>optional int32 bus = 1;</code>
3580      */
3581     public int getBus() {
3582       return bus_;
3583     }
3584
3585     // optional uint32 message_id = 2;
3586     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
3587     private int messageId_;
3588     /**
3589      * <code>optional uint32 message_id = 2;</code>
3590      */
3591     public boolean hasMessageId() {
3592       return ((bitField0_ & 0x00000002) == 0x00000002);
3593     }
3594     /**
3595      * <code>optional uint32 message_id = 2;</code>
3596      */
3597     public int getMessageId() {
3598       return messageId_;
3599     }
3600
3601     // optional uint32 mode = 3;
3602     public static final int MODE_FIELD_NUMBER = 3;
3603     private int mode_;
3604     /**
3605      * <code>optional uint32 mode = 3;</code>
3606      */
3607     public boolean hasMode() {
3608       return ((bitField0_ & 0x00000004) == 0x00000004);
3609     }
3610     /**
3611      * <code>optional uint32 mode = 3;</code>
3612      */
3613     public int getMode() {
3614       return mode_;
3615     }
3616
3617     // optional uint32 pid = 4;
3618     public static final int PID_FIELD_NUMBER = 4;
3619     private int pid_;
3620     /**
3621      * <code>optional uint32 pid = 4;</code>
3622      */
3623     public boolean hasPid() {
3624       return ((bitField0_ & 0x00000008) == 0x00000008);
3625     }
3626     /**
3627      * <code>optional uint32 pid = 4;</code>
3628      */
3629     public int getPid() {
3630       return pid_;
3631     }
3632
3633     // optional bytes payload = 5;
3634     public static final int PAYLOAD_FIELD_NUMBER = 5;
3635     private com.google.protobuf.ByteString payload_;
3636     /**
3637      * <code>optional bytes payload = 5;</code>
3638      *
3639      * <pre>
3640      * TODO we are capping this at 8 bytes for now - need to change when we
3641      * support multi-frame responses
3642      * </pre>
3643      */
3644     public boolean hasPayload() {
3645       return ((bitField0_ & 0x00000010) == 0x00000010);
3646     }
3647     /**
3648      * <code>optional bytes payload = 5;</code>
3649      *
3650      * <pre>
3651      * TODO we are capping this at 8 bytes for now - need to change when we
3652      * support multi-frame responses
3653      * </pre>
3654      */
3655     public com.google.protobuf.ByteString getPayload() {
3656       return payload_;
3657     }
3658
3659     // optional bool parse_payload = 6;
3660     public static final int PARSE_PAYLOAD_FIELD_NUMBER = 6;
3661     private boolean parsePayload_;
3662     /**
3663      * <code>optional bool parse_payload = 6;</code>
3664      */
3665     public boolean hasParsePayload() {
3666       return ((bitField0_ & 0x00000020) == 0x00000020);
3667     }
3668     /**
3669      * <code>optional bool parse_payload = 6;</code>
3670      */
3671     public boolean getParsePayload() {
3672       return parsePayload_;
3673     }
3674
3675     // optional bool multiple_responses = 7;
3676     public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 7;
3677     private boolean multipleResponses_;
3678     /**
3679      * <code>optional bool multiple_responses = 7;</code>
3680      */
3681     public boolean hasMultipleResponses() {
3682       return ((bitField0_ & 0x00000040) == 0x00000040);
3683     }
3684     /**
3685      * <code>optional bool multiple_responses = 7;</code>
3686      */
3687     public boolean getMultipleResponses() {
3688       return multipleResponses_;
3689     }
3690
3691     // optional double factor = 8;
3692     public static final int FACTOR_FIELD_NUMBER = 8;
3693     private double factor_;
3694     /**
3695      * <code>optional double factor = 8;</code>
3696      */
3697     public boolean hasFactor() {
3698       return ((bitField0_ & 0x00000080) == 0x00000080);
3699     }
3700     /**
3701      * <code>optional double factor = 8;</code>
3702      */
3703     public double getFactor() {
3704       return factor_;
3705     }
3706
3707     // optional double offset = 9;
3708     public static final int OFFSET_FIELD_NUMBER = 9;
3709     private double offset_;
3710     /**
3711      * <code>optional double offset = 9;</code>
3712      */
3713     public boolean hasOffset() {
3714       return ((bitField0_ & 0x00000100) == 0x00000100);
3715     }
3716     /**
3717      * <code>optional double offset = 9;</code>
3718      */
3719     public double getOffset() {
3720       return offset_;
3721     }
3722
3723     // optional double frequency = 10;
3724     public static final int FREQUENCY_FIELD_NUMBER = 10;
3725     private double frequency_;
3726     /**
3727      * <code>optional double frequency = 10;</code>
3728      */
3729     public boolean hasFrequency() {
3730       return ((bitField0_ & 0x00000200) == 0x00000200);
3731     }
3732     /**
3733      * <code>optional double frequency = 10;</code>
3734      */
3735     public double getFrequency() {
3736       return frequency_;
3737     }
3738
3739     // optional string name = 11;
3740     public static final int NAME_FIELD_NUMBER = 11;
3741     private java.lang.Object name_;
3742     /**
3743      * <code>optional string name = 11;</code>
3744      */
3745     public boolean hasName() {
3746       return ((bitField0_ & 0x00000400) == 0x00000400);
3747     }
3748     /**
3749      * <code>optional string name = 11;</code>
3750      */
3751     public java.lang.String getName() {
3752       java.lang.Object ref = name_;
3753       if (ref instanceof java.lang.String) {
3754         return (java.lang.String) ref;
3755       } else {
3756         com.google.protobuf.ByteString bs = 
3757             (com.google.protobuf.ByteString) ref;
3758         java.lang.String s = bs.toStringUtf8();
3759         if (bs.isValidUtf8()) {
3760           name_ = s;
3761         }
3762         return s;
3763       }
3764     }
3765     /**
3766      * <code>optional string name = 11;</code>
3767      */
3768     public com.google.protobuf.ByteString
3769         getNameBytes() {
3770       java.lang.Object ref = name_;
3771       if (ref instanceof java.lang.String) {
3772         com.google.protobuf.ByteString b = 
3773             com.google.protobuf.ByteString.copyFromUtf8(
3774                 (java.lang.String) ref);
3775         name_ = b;
3776         return b;
3777       } else {
3778         return (com.google.protobuf.ByteString) ref;
3779       }
3780     }
3781
3782     private void initFields() {
3783       bus_ = 0;
3784       messageId_ = 0;
3785       mode_ = 0;
3786       pid_ = 0;
3787       payload_ = com.google.protobuf.ByteString.EMPTY;
3788       parsePayload_ = false;
3789       multipleResponses_ = false;
3790       factor_ = 0D;
3791       offset_ = 0D;
3792       frequency_ = 0D;
3793       name_ = "";
3794     }
3795     private byte memoizedIsInitialized = -1;
3796     public final boolean isInitialized() {
3797       byte isInitialized = memoizedIsInitialized;
3798       if (isInitialized != -1) return isInitialized == 1;
3799
3800       memoizedIsInitialized = 1;
3801       return true;
3802     }
3803
3804     public void writeTo(com.google.protobuf.CodedOutputStream output)
3805                         throws java.io.IOException {
3806       getSerializedSize();
3807       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3808         output.writeInt32(1, bus_);
3809       }
3810       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3811         output.writeUInt32(2, messageId_);
3812       }
3813       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3814         output.writeUInt32(3, mode_);
3815       }
3816       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3817         output.writeUInt32(4, pid_);
3818       }
3819       if (((bitField0_ & 0x00000010) == 0x00000010)) {
3820         output.writeBytes(5, payload_);
3821       }
3822       if (((bitField0_ & 0x00000020) == 0x00000020)) {
3823         output.writeBool(6, parsePayload_);
3824       }
3825       if (((bitField0_ & 0x00000040) == 0x00000040)) {
3826         output.writeBool(7, multipleResponses_);
3827       }
3828       if (((bitField0_ & 0x00000080) == 0x00000080)) {
3829         output.writeDouble(8, factor_);
3830       }
3831       if (((bitField0_ & 0x00000100) == 0x00000100)) {
3832         output.writeDouble(9, offset_);
3833       }
3834       if (((bitField0_ & 0x00000200) == 0x00000200)) {
3835         output.writeDouble(10, frequency_);
3836       }
3837       if (((bitField0_ & 0x00000400) == 0x00000400)) {
3838         output.writeBytes(11, getNameBytes());
3839       }
3840       getUnknownFields().writeTo(output);
3841     }
3842
3843     private int memoizedSerializedSize = -1;
3844     public int getSerializedSize() {
3845       int size = memoizedSerializedSize;
3846       if (size != -1) return size;
3847
3848       size = 0;
3849       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3850         size += com.google.protobuf.CodedOutputStream
3851           .computeInt32Size(1, bus_);
3852       }
3853       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3854         size += com.google.protobuf.CodedOutputStream
3855           .computeUInt32Size(2, messageId_);
3856       }
3857       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3858         size += com.google.protobuf.CodedOutputStream
3859           .computeUInt32Size(3, mode_);
3860       }
3861       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3862         size += com.google.protobuf.CodedOutputStream
3863           .computeUInt32Size(4, pid_);
3864       }
3865       if (((bitField0_ & 0x00000010) == 0x00000010)) {
3866         size += com.google.protobuf.CodedOutputStream
3867           .computeBytesSize(5, payload_);
3868       }
3869       if (((bitField0_ & 0x00000020) == 0x00000020)) {
3870         size += com.google.protobuf.CodedOutputStream
3871           .computeBoolSize(6, parsePayload_);
3872       }
3873       if (((bitField0_ & 0x00000040) == 0x00000040)) {
3874         size += com.google.protobuf.CodedOutputStream
3875           .computeBoolSize(7, multipleResponses_);
3876       }
3877       if (((bitField0_ & 0x00000080) == 0x00000080)) {
3878         size += com.google.protobuf.CodedOutputStream
3879           .computeDoubleSize(8, factor_);
3880       }
3881       if (((bitField0_ & 0x00000100) == 0x00000100)) {
3882         size += com.google.protobuf.CodedOutputStream
3883           .computeDoubleSize(9, offset_);
3884       }
3885       if (((bitField0_ & 0x00000200) == 0x00000200)) {
3886         size += com.google.protobuf.CodedOutputStream
3887           .computeDoubleSize(10, frequency_);
3888       }
3889       if (((bitField0_ & 0x00000400) == 0x00000400)) {
3890         size += com.google.protobuf.CodedOutputStream
3891           .computeBytesSize(11, getNameBytes());
3892       }
3893       size += getUnknownFields().getSerializedSize();
3894       memoizedSerializedSize = size;
3895       return size;
3896     }
3897
3898     private static final long serialVersionUID = 0L;
3899     @java.lang.Override
3900     protected java.lang.Object writeReplace()
3901         throws java.io.ObjectStreamException {
3902       return super.writeReplace();
3903     }
3904
3905     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3906         com.google.protobuf.ByteString data)
3907         throws com.google.protobuf.InvalidProtocolBufferException {
3908       return PARSER.parseFrom(data);
3909     }
3910     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3911         com.google.protobuf.ByteString data,
3912         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3913         throws com.google.protobuf.InvalidProtocolBufferException {
3914       return PARSER.parseFrom(data, extensionRegistry);
3915     }
3916     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data)
3917         throws com.google.protobuf.InvalidProtocolBufferException {
3918       return PARSER.parseFrom(data);
3919     }
3920     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3921         byte[] data,
3922         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3923         throws com.google.protobuf.InvalidProtocolBufferException {
3924       return PARSER.parseFrom(data, extensionRegistry);
3925     }
3926     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input)
3927         throws java.io.IOException {
3928       return PARSER.parseFrom(input);
3929     }
3930     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3931         java.io.InputStream input,
3932         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3933         throws java.io.IOException {
3934       return PARSER.parseFrom(input, extensionRegistry);
3935     }
3936     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input)
3937         throws java.io.IOException {
3938       return PARSER.parseDelimitedFrom(input);
3939     }
3940     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(
3941         java.io.InputStream input,
3942         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3943         throws java.io.IOException {
3944       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3945     }
3946     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3947         com.google.protobuf.CodedInputStream input)
3948         throws java.io.IOException {
3949       return PARSER.parseFrom(input);
3950     }
3951     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3952         com.google.protobuf.CodedInputStream input,
3953         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3954         throws java.io.IOException {
3955       return PARSER.parseFrom(input, extensionRegistry);
3956     }
3957
3958     public static Builder newBuilder() { return Builder.create(); }
3959     public Builder newBuilderForType() { return newBuilder(); }
3960     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) {
3961       return newBuilder().mergeFrom(prototype);
3962     }
3963     public Builder toBuilder() { return newBuilder(this); }
3964
3965     @java.lang.Override
3966     protected Builder newBuilderForType(
3967         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3968       Builder builder = new Builder(parent);
3969       return builder;
3970     }
3971     /**
3972      * Protobuf type {@code openxc.DiagnosticRequest}
3973      */
3974     public static final class Builder extends
3975         com.google.protobuf.GeneratedMessage.Builder<Builder>
3976        implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder {
3977       public static final com.google.protobuf.Descriptors.Descriptor
3978           getDescriptor() {
3979         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3980       }
3981
3982       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3983           internalGetFieldAccessorTable() {
3984         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
3985             .ensureFieldAccessorsInitialized(
3986                 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
3987       }
3988
3989       // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder()
3990       private Builder() {
3991         maybeForceBuilderInitialization();
3992       }
3993
3994       private Builder(
3995           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3996         super(parent);
3997         maybeForceBuilderInitialization();
3998       }
3999       private void maybeForceBuilderInitialization() {
4000         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4001         }
4002       }
4003       private static Builder create() {
4004         return new Builder();
4005       }
4006
4007       public Builder clear() {
4008         super.clear();
4009         bus_ = 0;
4010         bitField0_ = (bitField0_ & ~0x00000001);
4011         messageId_ = 0;
4012         bitField0_ = (bitField0_ & ~0x00000002);
4013         mode_ = 0;
4014         bitField0_ = (bitField0_ & ~0x00000004);
4015         pid_ = 0;
4016         bitField0_ = (bitField0_ & ~0x00000008);
4017         payload_ = com.google.protobuf.ByteString.EMPTY;
4018         bitField0_ = (bitField0_ & ~0x00000010);
4019         parsePayload_ = false;
4020         bitField0_ = (bitField0_ & ~0x00000020);
4021         multipleResponses_ = false;
4022         bitField0_ = (bitField0_ & ~0x00000040);
4023         factor_ = 0D;
4024         bitField0_ = (bitField0_ & ~0x00000080);
4025         offset_ = 0D;
4026         bitField0_ = (bitField0_ & ~0x00000100);
4027         frequency_ = 0D;
4028         bitField0_ = (bitField0_ & ~0x00000200);
4029         name_ = "";
4030         bitField0_ = (bitField0_ & ~0x00000400);
4031         return this;
4032       }
4033
4034       public Builder clone() {
4035         return create().mergeFrom(buildPartial());
4036       }
4037
4038       public com.google.protobuf.Descriptors.Descriptor
4039           getDescriptorForType() {
4040         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
4041       }
4042
4043       public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() {
4044         return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
4045       }
4046
4047       public com.openxc.BinaryMessages.DiagnosticRequest build() {
4048         com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial();
4049         if (!result.isInitialized()) {
4050           throw newUninitializedMessageException(result);
4051         }
4052         return result;
4053       }
4054
4055       public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() {
4056         com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this);
4057         int from_bitField0_ = bitField0_;
4058         int to_bitField0_ = 0;
4059         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4060           to_bitField0_ |= 0x00000001;
4061         }
4062         result.bus_ = bus_;
4063         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4064           to_bitField0_ |= 0x00000002;
4065         }
4066         result.messageId_ = messageId_;
4067         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
4068           to_bitField0_ |= 0x00000004;
4069         }
4070         result.mode_ = mode_;
4071         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
4072           to_bitField0_ |= 0x00000008;
4073         }
4074         result.pid_ = pid_;
4075         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
4076           to_bitField0_ |= 0x00000010;
4077         }
4078         result.payload_ = payload_;
4079         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
4080           to_bitField0_ |= 0x00000020;
4081         }
4082         result.parsePayload_ = parsePayload_;
4083         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
4084           to_bitField0_ |= 0x00000040;
4085         }
4086         result.multipleResponses_ = multipleResponses_;
4087         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
4088           to_bitField0_ |= 0x00000080;
4089         }
4090         result.factor_ = factor_;
4091         if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
4092           to_bitField0_ |= 0x00000100;
4093         }
4094         result.offset_ = offset_;
4095         if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
4096           to_bitField0_ |= 0x00000200;
4097         }
4098         result.frequency_ = frequency_;
4099         if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
4100           to_bitField0_ |= 0x00000400;
4101         }
4102         result.name_ = name_;
4103         result.bitField0_ = to_bitField0_;
4104         onBuilt();
4105         return result;
4106       }
4107
4108       public Builder mergeFrom(com.google.protobuf.Message other) {
4109         if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) {
4110           return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other);
4111         } else {
4112           super.mergeFrom(other);
4113           return this;
4114         }
4115       }
4116
4117       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) {
4118         if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this;
4119         if (other.hasBus()) {
4120           setBus(other.getBus());
4121         }
4122         if (other.hasMessageId()) {
4123           setMessageId(other.getMessageId());
4124         }
4125         if (other.hasMode()) {
4126           setMode(other.getMode());
4127         }
4128         if (other.hasPid()) {
4129           setPid(other.getPid());
4130         }
4131         if (other.hasPayload()) {
4132           setPayload(other.getPayload());
4133         }
4134         if (other.hasParsePayload()) {
4135           setParsePayload(other.getParsePayload());
4136         }
4137         if (other.hasMultipleResponses()) {
4138           setMultipleResponses(other.getMultipleResponses());
4139         }
4140         if (other.hasFactor()) {
4141           setFactor(other.getFactor());
4142         }
4143         if (other.hasOffset()) {
4144           setOffset(other.getOffset());
4145         }
4146         if (other.hasFrequency()) {
4147           setFrequency(other.getFrequency());
4148         }
4149         if (other.hasName()) {
4150           bitField0_ |= 0x00000400;
4151           name_ = other.name_;
4152           onChanged();
4153         }
4154         this.mergeUnknownFields(other.getUnknownFields());
4155         return this;
4156       }
4157
4158       public final boolean isInitialized() {
4159         return true;
4160       }
4161
4162       public Builder mergeFrom(
4163           com.google.protobuf.CodedInputStream input,
4164           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4165           throws java.io.IOException {
4166         com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null;
4167         try {
4168           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4169         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4170           parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage();
4171           throw e;
4172         } finally {
4173           if (parsedMessage != null) {
4174             mergeFrom(parsedMessage);
4175           }
4176         }
4177         return this;
4178       }
4179       private int bitField0_;
4180
4181       // optional int32 bus = 1;
4182       private int bus_ ;
4183       /**
4184        * <code>optional int32 bus = 1;</code>
4185        */
4186       public boolean hasBus() {
4187         return ((bitField0_ & 0x00000001) == 0x00000001);
4188       }
4189       /**
4190        * <code>optional int32 bus = 1;</code>
4191        */
4192       public int getBus() {
4193         return bus_;
4194       }
4195       /**
4196        * <code>optional int32 bus = 1;</code>
4197        */
4198       public Builder setBus(int value) {
4199         bitField0_ |= 0x00000001;
4200         bus_ = value;
4201         onChanged();
4202         return this;
4203       }
4204       /**
4205        * <code>optional int32 bus = 1;</code>
4206        */
4207       public Builder clearBus() {
4208         bitField0_ = (bitField0_ & ~0x00000001);
4209         bus_ = 0;
4210         onChanged();
4211         return this;
4212       }
4213
4214       // optional uint32 message_id = 2;
4215       private int messageId_ ;
4216       /**
4217        * <code>optional uint32 message_id = 2;</code>
4218        */
4219       public boolean hasMessageId() {
4220         return ((bitField0_ & 0x00000002) == 0x00000002);
4221       }
4222       /**
4223        * <code>optional uint32 message_id = 2;</code>
4224        */
4225       public int getMessageId() {
4226         return messageId_;
4227       }
4228       /**
4229        * <code>optional uint32 message_id = 2;</code>
4230        */
4231       public Builder setMessageId(int value) {
4232         bitField0_ |= 0x00000002;
4233         messageId_ = value;
4234         onChanged();
4235         return this;
4236       }
4237       /**
4238        * <code>optional uint32 message_id = 2;</code>
4239        */
4240       public Builder clearMessageId() {
4241         bitField0_ = (bitField0_ & ~0x00000002);
4242         messageId_ = 0;
4243         onChanged();
4244         return this;
4245       }
4246
4247       // optional uint32 mode = 3;
4248       private int mode_ ;
4249       /**
4250        * <code>optional uint32 mode = 3;</code>
4251        */
4252       public boolean hasMode() {
4253         return ((bitField0_ & 0x00000004) == 0x00000004);
4254       }
4255       /**
4256        * <code>optional uint32 mode = 3;</code>
4257        */
4258       public int getMode() {
4259         return mode_;
4260       }
4261       /**
4262        * <code>optional uint32 mode = 3;</code>
4263        */
4264       public Builder setMode(int value) {
4265         bitField0_ |= 0x00000004;
4266         mode_ = value;
4267         onChanged();
4268         return this;
4269       }
4270       /**
4271        * <code>optional uint32 mode = 3;</code>
4272        */
4273       public Builder clearMode() {
4274         bitField0_ = (bitField0_ & ~0x00000004);
4275         mode_ = 0;
4276         onChanged();
4277         return this;
4278       }
4279
4280       // optional uint32 pid = 4;
4281       private int pid_ ;
4282       /**
4283        * <code>optional uint32 pid = 4;</code>
4284        */
4285       public boolean hasPid() {
4286         return ((bitField0_ & 0x00000008) == 0x00000008);
4287       }
4288       /**
4289        * <code>optional uint32 pid = 4;</code>
4290        */
4291       public int getPid() {
4292         return pid_;
4293       }
4294       /**
4295        * <code>optional uint32 pid = 4;</code>
4296        */
4297       public Builder setPid(int value) {
4298         bitField0_ |= 0x00000008;
4299         pid_ = value;
4300         onChanged();
4301         return this;
4302       }
4303       /**
4304        * <code>optional uint32 pid = 4;</code>
4305        */
4306       public Builder clearPid() {
4307         bitField0_ = (bitField0_ & ~0x00000008);
4308         pid_ = 0;
4309         onChanged();
4310         return this;
4311       }
4312
4313       // optional bytes payload = 5;
4314       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
4315       /**
4316        * <code>optional bytes payload = 5;</code>
4317        *
4318        * <pre>
4319        * TODO we are capping this at 8 bytes for now - need to change when we
4320        * support multi-frame responses
4321        * </pre>
4322        */
4323       public boolean hasPayload() {
4324         return ((bitField0_ & 0x00000010) == 0x00000010);
4325       }
4326       /**
4327        * <code>optional bytes payload = 5;</code>
4328        *
4329        * <pre>
4330        * TODO we are capping this at 8 bytes for now - need to change when we
4331        * support multi-frame responses
4332        * </pre>
4333        */
4334       public com.google.protobuf.ByteString getPayload() {
4335         return payload_;
4336       }
4337       /**
4338        * <code>optional bytes payload = 5;</code>
4339        *
4340        * <pre>
4341        * TODO we are capping this at 8 bytes for now - need to change when we
4342        * support multi-frame responses
4343        * </pre>
4344        */
4345       public Builder setPayload(com.google.protobuf.ByteString value) {
4346         if (value == null) {
4347     throw new NullPointerException();
4348   }
4349   bitField0_ |= 0x00000010;
4350         payload_ = value;
4351         onChanged();
4352         return this;
4353       }
4354       /**
4355        * <code>optional bytes payload = 5;</code>
4356        *
4357        * <pre>
4358        * TODO we are capping this at 8 bytes for now - need to change when we
4359        * support multi-frame responses
4360        * </pre>
4361        */
4362       public Builder clearPayload() {
4363         bitField0_ = (bitField0_ & ~0x00000010);
4364         payload_ = getDefaultInstance().getPayload();
4365         onChanged();
4366         return this;
4367       }
4368
4369       // optional bool parse_payload = 6;
4370       private boolean parsePayload_ ;
4371       /**
4372        * <code>optional bool parse_payload = 6;</code>
4373        */
4374       public boolean hasParsePayload() {
4375         return ((bitField0_ & 0x00000020) == 0x00000020);
4376       }
4377       /**
4378        * <code>optional bool parse_payload = 6;</code>
4379        */
4380       public boolean getParsePayload() {
4381         return parsePayload_;
4382       }
4383       /**
4384        * <code>optional bool parse_payload = 6;</code>
4385        */
4386       public Builder setParsePayload(boolean value) {
4387         bitField0_ |= 0x00000020;
4388         parsePayload_ = value;
4389         onChanged();
4390         return this;
4391       }
4392       /**
4393        * <code>optional bool parse_payload = 6;</code>
4394        */
4395       public Builder clearParsePayload() {
4396         bitField0_ = (bitField0_ & ~0x00000020);
4397         parsePayload_ = false;
4398         onChanged();
4399         return this;
4400       }
4401
4402       // optional bool multiple_responses = 7;
4403       private boolean multipleResponses_ ;
4404       /**
4405        * <code>optional bool multiple_responses = 7;</code>
4406        */
4407       public boolean hasMultipleResponses() {
4408         return ((bitField0_ & 0x00000040) == 0x00000040);
4409       }
4410       /**
4411        * <code>optional bool multiple_responses = 7;</code>
4412        */
4413       public boolean getMultipleResponses() {
4414         return multipleResponses_;
4415       }
4416       /**
4417        * <code>optional bool multiple_responses = 7;</code>
4418        */
4419       public Builder setMultipleResponses(boolean value) {
4420         bitField0_ |= 0x00000040;
4421         multipleResponses_ = value;
4422         onChanged();
4423         return this;
4424       }
4425       /**
4426        * <code>optional bool multiple_responses = 7;</code>
4427        */
4428       public Builder clearMultipleResponses() {
4429         bitField0_ = (bitField0_ & ~0x00000040);
4430         multipleResponses_ = false;
4431         onChanged();
4432         return this;
4433       }
4434
4435       // optional double factor = 8;
4436       private double factor_ ;
4437       /**
4438        * <code>optional double factor = 8;</code>
4439        */
4440       public boolean hasFactor() {
4441         return ((bitField0_ & 0x00000080) == 0x00000080);
4442       }
4443       /**
4444        * <code>optional double factor = 8;</code>
4445        */
4446       public double getFactor() {
4447         return factor_;
4448       }
4449       /**
4450        * <code>optional double factor = 8;</code>
4451        */
4452       public Builder setFactor(double value) {
4453         bitField0_ |= 0x00000080;
4454         factor_ = value;
4455         onChanged();
4456         return this;
4457       }
4458       /**
4459        * <code>optional double factor = 8;</code>
4460        */
4461       public Builder clearFactor() {
4462         bitField0_ = (bitField0_ & ~0x00000080);
4463         factor_ = 0D;
4464         onChanged();
4465         return this;
4466       }
4467
4468       // optional double offset = 9;
4469       private double offset_ ;
4470       /**
4471        * <code>optional double offset = 9;</code>
4472        */
4473       public boolean hasOffset() {
4474         return ((bitField0_ & 0x00000100) == 0x00000100);
4475       }
4476       /**
4477        * <code>optional double offset = 9;</code>
4478        */
4479       public double getOffset() {
4480         return offset_;
4481       }
4482       /**
4483        * <code>optional double offset = 9;</code>
4484        */
4485       public Builder setOffset(double value) {
4486         bitField0_ |= 0x00000100;
4487         offset_ = value;
4488         onChanged();
4489         return this;
4490       }
4491       /**
4492        * <code>optional double offset = 9;</code>
4493        */
4494       public Builder clearOffset() {
4495         bitField0_ = (bitField0_ & ~0x00000100);
4496         offset_ = 0D;
4497         onChanged();
4498         return this;
4499       }
4500
4501       // optional double frequency = 10;
4502       private double frequency_ ;
4503       /**
4504        * <code>optional double frequency = 10;</code>
4505        */
4506       public boolean hasFrequency() {
4507         return ((bitField0_ & 0x00000200) == 0x00000200);
4508       }
4509       /**
4510        * <code>optional double frequency = 10;</code>
4511        */
4512       public double getFrequency() {
4513         return frequency_;
4514       }
4515       /**
4516        * <code>optional double frequency = 10;</code>
4517        */
4518       public Builder setFrequency(double value) {
4519         bitField0_ |= 0x00000200;
4520         frequency_ = value;
4521         onChanged();
4522         return this;
4523       }
4524       /**
4525        * <code>optional double frequency = 10;</code>
4526        */
4527       public Builder clearFrequency() {
4528         bitField0_ = (bitField0_ & ~0x00000200);
4529         frequency_ = 0D;
4530         onChanged();
4531         return this;
4532       }
4533
4534       // optional string name = 11;
4535       private java.lang.Object name_ = "";
4536       /**
4537        * <code>optional string name = 11;</code>
4538        */
4539       public boolean hasName() {
4540         return ((bitField0_ & 0x00000400) == 0x00000400);
4541       }
4542       /**
4543        * <code>optional string name = 11;</code>
4544        */
4545       public java.lang.String getName() {
4546         java.lang.Object ref = name_;
4547         if (!(ref instanceof java.lang.String)) {
4548           java.lang.String s = ((com.google.protobuf.ByteString) ref)
4549               .toStringUtf8();
4550           name_ = s;
4551           return s;
4552         } else {
4553           return (java.lang.String) ref;
4554         }
4555       }
4556       /**
4557        * <code>optional string name = 11;</code>
4558        */
4559       public com.google.protobuf.ByteString
4560           getNameBytes() {
4561         java.lang.Object ref = name_;
4562         if (ref instanceof String) {
4563           com.google.protobuf.ByteString b = 
4564               com.google.protobuf.ByteString.copyFromUtf8(
4565                   (java.lang.String) ref);
4566           name_ = b;
4567           return b;
4568         } else {
4569           return (com.google.protobuf.ByteString) ref;
4570         }
4571       }
4572       /**
4573        * <code>optional string name = 11;</code>
4574        */
4575       public Builder setName(
4576           java.lang.String value) {
4577         if (value == null) {
4578     throw new NullPointerException();
4579   }
4580   bitField0_ |= 0x00000400;
4581         name_ = value;
4582         onChanged();
4583         return this;
4584       }
4585       /**
4586        * <code>optional string name = 11;</code>
4587        */
4588       public Builder clearName() {
4589         bitField0_ = (bitField0_ & ~0x00000400);
4590         name_ = getDefaultInstance().getName();
4591         onChanged();
4592         return this;
4593       }
4594       /**
4595        * <code>optional string name = 11;</code>
4596        */
4597       public Builder setNameBytes(
4598           com.google.protobuf.ByteString value) {
4599         if (value == null) {
4600     throw new NullPointerException();
4601   }
4602   bitField0_ |= 0x00000400;
4603         name_ = value;
4604         onChanged();
4605         return this;
4606       }
4607
4608       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest)
4609     }
4610
4611     static {
4612       defaultInstance = new DiagnosticRequest(true);
4613       defaultInstance.initFields();
4614     }
4615
4616     // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest)
4617   }
4618
4619   public interface DiagnosticResponseOrBuilder
4620       extends com.google.protobuf.MessageOrBuilder {
4621
4622     // optional int32 bus = 1;
4623     /**
4624      * <code>optional int32 bus = 1;</code>
4625      */
4626     boolean hasBus();
4627     /**
4628      * <code>optional int32 bus = 1;</code>
4629      */
4630     int getBus();
4631
4632     // optional uint32 message_id = 2;
4633     /**
4634      * <code>optional uint32 message_id = 2;</code>
4635      */
4636     boolean hasMessageId();
4637     /**
4638      * <code>optional uint32 message_id = 2;</code>
4639      */
4640     int getMessageId();
4641
4642     // optional uint32 mode = 3;
4643     /**
4644      * <code>optional uint32 mode = 3;</code>
4645      */
4646     boolean hasMode();
4647     /**
4648      * <code>optional uint32 mode = 3;</code>
4649      */
4650     int getMode();
4651
4652     // optional uint32 pid = 4;
4653     /**
4654      * <code>optional uint32 pid = 4;</code>
4655      */
4656     boolean hasPid();
4657     /**
4658      * <code>optional uint32 pid = 4;</code>
4659      */
4660     int getPid();
4661
4662     // optional bool success = 5;
4663     /**
4664      * <code>optional bool success = 5;</code>
4665      */
4666     boolean hasSuccess();
4667     /**
4668      * <code>optional bool success = 5;</code>
4669      */
4670     boolean getSuccess();
4671
4672     // optional uint32 negative_response_code = 6;
4673     /**
4674      * <code>optional uint32 negative_response_code = 6;</code>
4675      */
4676     boolean hasNegativeResponseCode();
4677     /**
4678      * <code>optional uint32 negative_response_code = 6;</code>
4679      */
4680     int getNegativeResponseCode();
4681
4682     // optional bytes payload = 7;
4683     /**
4684      * <code>optional bytes payload = 7;</code>
4685      *
4686      * <pre>
4687      * TODO we are capping this at 8 bytes for now - need to change when we
4688      * support multi-frame responses
4689      * </pre>
4690      */
4691     boolean hasPayload();
4692     /**
4693      * <code>optional bytes payload = 7;</code>
4694      *
4695      * <pre>
4696      * TODO we are capping this at 8 bytes for now - need to change when we
4697      * support multi-frame responses
4698      * </pre>
4699      */
4700     com.google.protobuf.ByteString getPayload();
4701
4702     // optional double value = 8;
4703     /**
4704      * <code>optional double value = 8;</code>
4705      */
4706     boolean hasValue();
4707     /**
4708      * <code>optional double value = 8;</code>
4709      */
4710     double getValue();
4711   }
4712   /**
4713    * Protobuf type {@code openxc.DiagnosticResponse}
4714    */
4715   public static final class DiagnosticResponse extends
4716       com.google.protobuf.GeneratedMessage
4717       implements DiagnosticResponseOrBuilder {
4718     // Use DiagnosticResponse.newBuilder() to construct.
4719     private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
4720       super(builder);
4721       this.unknownFields = builder.getUnknownFields();
4722     }
4723     private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
4724
4725     private static final DiagnosticResponse defaultInstance;
4726     public static DiagnosticResponse getDefaultInstance() {
4727       return defaultInstance;
4728     }
4729
4730     public DiagnosticResponse getDefaultInstanceForType() {
4731       return defaultInstance;
4732     }
4733
4734     private final com.google.protobuf.UnknownFieldSet unknownFields;
4735     @java.lang.Override
4736     public final com.google.protobuf.UnknownFieldSet
4737         getUnknownFields() {
4738       return this.unknownFields;
4739     }
4740     private DiagnosticResponse(
4741         com.google.protobuf.CodedInputStream input,
4742         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4743         throws com.google.protobuf.InvalidProtocolBufferException {
4744       initFields();
4745       int mutable_bitField0_ = 0;
4746       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4747           com.google.protobuf.UnknownFieldSet.newBuilder();
4748       try {
4749         boolean done = false;
4750         while (!done) {
4751           int tag = input.readTag();
4752           switch (tag) {
4753             case 0:
4754               done = true;
4755               break;
4756             default: {
4757               if (!parseUnknownField(input, unknownFields,
4758                                      extensionRegistry, tag)) {
4759                 done = true;
4760               }
4761               break;
4762             }
4763             case 8: {
4764               bitField0_ |= 0x00000001;
4765               bus_ = input.readInt32();
4766               break;
4767             }
4768             case 16: {
4769               bitField0_ |= 0x00000002;
4770               messageId_ = input.readUInt32();
4771               break;
4772             }
4773             case 24: {
4774               bitField0_ |= 0x00000004;
4775               mode_ = input.readUInt32();
4776               break;
4777             }
4778             case 32: {
4779               bitField0_ |= 0x00000008;
4780               pid_ = input.readUInt32();
4781               break;
4782             }
4783             case 40: {
4784               bitField0_ |= 0x00000010;
4785               success_ = input.readBool();
4786               break;
4787             }
4788             case 48: {
4789               bitField0_ |= 0x00000020;
4790               negativeResponseCode_ = input.readUInt32();
4791               break;
4792             }
4793             case 58: {
4794               bitField0_ |= 0x00000040;
4795               payload_ = input.readBytes();
4796               break;
4797             }
4798             case 65: {
4799               bitField0_ |= 0x00000080;
4800               value_ = input.readDouble();
4801               break;
4802             }
4803           }
4804         }
4805       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4806         throw e.setUnfinishedMessage(this);
4807       } catch (java.io.IOException e) {
4808         throw new com.google.protobuf.InvalidProtocolBufferException(
4809             e.getMessage()).setUnfinishedMessage(this);
4810       } finally {
4811         this.unknownFields = unknownFields.build();
4812         makeExtensionsImmutable();
4813       }
4814     }
4815     public static final com.google.protobuf.Descriptors.Descriptor
4816         getDescriptor() {
4817       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4818     }
4819
4820     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4821         internalGetFieldAccessorTable() {
4822       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
4823           .ensureFieldAccessorsInitialized(
4824               com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
4825     }
4826
4827     public static com.google.protobuf.Parser<DiagnosticResponse> PARSER =
4828         new com.google.protobuf.AbstractParser<DiagnosticResponse>() {
4829       public DiagnosticResponse parsePartialFrom(
4830           com.google.protobuf.CodedInputStream input,
4831           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4832           throws com.google.protobuf.InvalidProtocolBufferException {
4833         return new DiagnosticResponse(input, extensionRegistry);
4834       }
4835     };
4836
4837     @java.lang.Override
4838     public com.google.protobuf.Parser<DiagnosticResponse> getParserForType() {
4839       return PARSER;
4840     }
4841
4842     private int bitField0_;
4843     // optional int32 bus = 1;
4844     public static final int BUS_FIELD_NUMBER = 1;
4845     private int bus_;
4846     /**
4847      * <code>optional int32 bus = 1;</code>
4848      */
4849     public boolean hasBus() {
4850       return ((bitField0_ & 0x00000001) == 0x00000001);
4851     }
4852     /**
4853      * <code>optional int32 bus = 1;</code>
4854      */
4855     public int getBus() {
4856       return bus_;
4857     }
4858
4859     // optional uint32 message_id = 2;
4860     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
4861     private int messageId_;
4862     /**
4863      * <code>optional uint32 message_id = 2;</code>
4864      */
4865     public boolean hasMessageId() {
4866       return ((bitField0_ & 0x00000002) == 0x00000002);
4867     }
4868     /**
4869      * <code>optional uint32 message_id = 2;</code>
4870      */
4871     public int getMessageId() {
4872       return messageId_;
4873     }
4874
4875     // optional uint32 mode = 3;
4876     public static final int MODE_FIELD_NUMBER = 3;
4877     private int mode_;
4878     /**
4879      * <code>optional uint32 mode = 3;</code>
4880      */
4881     public boolean hasMode() {
4882       return ((bitField0_ & 0x00000004) == 0x00000004);
4883     }
4884     /**
4885      * <code>optional uint32 mode = 3;</code>
4886      */
4887     public int getMode() {
4888       return mode_;
4889     }
4890
4891     // optional uint32 pid = 4;
4892     public static final int PID_FIELD_NUMBER = 4;
4893     private int pid_;
4894     /**
4895      * <code>optional uint32 pid = 4;</code>
4896      */
4897     public boolean hasPid() {
4898       return ((bitField0_ & 0x00000008) == 0x00000008);
4899     }
4900     /**
4901      * <code>optional uint32 pid = 4;</code>
4902      */
4903     public int getPid() {
4904       return pid_;
4905     }
4906
4907     // optional bool success = 5;
4908     public static final int SUCCESS_FIELD_NUMBER = 5;
4909     private boolean success_;
4910     /**
4911      * <code>optional bool success = 5;</code>
4912      */
4913     public boolean hasSuccess() {
4914       return ((bitField0_ & 0x00000010) == 0x00000010);
4915     }
4916     /**
4917      * <code>optional bool success = 5;</code>
4918      */
4919     public boolean getSuccess() {
4920       return success_;
4921     }
4922
4923     // optional uint32 negative_response_code = 6;
4924     public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
4925     private int negativeResponseCode_;
4926     /**
4927      * <code>optional uint32 negative_response_code = 6;</code>
4928      */
4929     public boolean hasNegativeResponseCode() {
4930       return ((bitField0_ & 0x00000020) == 0x00000020);
4931     }
4932     /**
4933      * <code>optional uint32 negative_response_code = 6;</code>
4934      */
4935     public int getNegativeResponseCode() {
4936       return negativeResponseCode_;
4937     }
4938
4939     // optional bytes payload = 7;
4940     public static final int PAYLOAD_FIELD_NUMBER = 7;
4941     private com.google.protobuf.ByteString payload_;
4942     /**
4943      * <code>optional bytes payload = 7;</code>
4944      *
4945      * <pre>
4946      * TODO we are capping this at 8 bytes for now - need to change when we
4947      * support multi-frame responses
4948      * </pre>
4949      */
4950     public boolean hasPayload() {
4951       return ((bitField0_ & 0x00000040) == 0x00000040);
4952     }
4953     /**
4954      * <code>optional bytes payload = 7;</code>
4955      *
4956      * <pre>
4957      * TODO we are capping this at 8 bytes for now - need to change when we
4958      * support multi-frame responses
4959      * </pre>
4960      */
4961     public com.google.protobuf.ByteString getPayload() {
4962       return payload_;
4963     }
4964
4965     // optional double value = 8;
4966     public static final int VALUE_FIELD_NUMBER = 8;
4967     private double value_;
4968     /**
4969      * <code>optional double value = 8;</code>
4970      */
4971     public boolean hasValue() {
4972       return ((bitField0_ & 0x00000080) == 0x00000080);
4973     }
4974     /**
4975      * <code>optional double value = 8;</code>
4976      */
4977     public double getValue() {
4978       return value_;
4979     }
4980
4981     private void initFields() {
4982       bus_ = 0;
4983       messageId_ = 0;
4984       mode_ = 0;
4985       pid_ = 0;
4986       success_ = false;
4987       negativeResponseCode_ = 0;
4988       payload_ = com.google.protobuf.ByteString.EMPTY;
4989       value_ = 0D;
4990     }
4991     private byte memoizedIsInitialized = -1;
4992     public final boolean isInitialized() {
4993       byte isInitialized = memoizedIsInitialized;
4994       if (isInitialized != -1) return isInitialized == 1;
4995
4996       memoizedIsInitialized = 1;
4997       return true;
4998     }
4999
5000     public void writeTo(com.google.protobuf.CodedOutputStream output)
5001                         throws java.io.IOException {
5002       getSerializedSize();
5003       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5004         output.writeInt32(1, bus_);
5005       }
5006       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5007         output.writeUInt32(2, messageId_);
5008       }
5009       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5010         output.writeUInt32(3, mode_);
5011       }
5012       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5013         output.writeUInt32(4, pid_);
5014       }
5015       if (((bitField0_ & 0x00000010) == 0x00000010)) {
5016         output.writeBool(5, success_);
5017       }
5018       if (((bitField0_ & 0x00000020) == 0x00000020)) {
5019         output.writeUInt32(6, negativeResponseCode_);
5020       }
5021       if (((bitField0_ & 0x00000040) == 0x00000040)) {
5022         output.writeBytes(7, payload_);
5023       }
5024       if (((bitField0_ & 0x00000080) == 0x00000080)) {
5025         output.writeDouble(8, value_);
5026       }
5027       getUnknownFields().writeTo(output);
5028     }
5029
5030     private int memoizedSerializedSize = -1;
5031     public int getSerializedSize() {
5032       int size = memoizedSerializedSize;
5033       if (size != -1) return size;
5034
5035       size = 0;
5036       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5037         size += com.google.protobuf.CodedOutputStream
5038           .computeInt32Size(1, bus_);
5039       }
5040       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5041         size += com.google.protobuf.CodedOutputStream
5042           .computeUInt32Size(2, messageId_);
5043       }
5044       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5045         size += com.google.protobuf.CodedOutputStream
5046           .computeUInt32Size(3, mode_);
5047       }
5048       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5049         size += com.google.protobuf.CodedOutputStream
5050           .computeUInt32Size(4, pid_);
5051       }
5052       if (((bitField0_ & 0x00000010) == 0x00000010)) {
5053         size += com.google.protobuf.CodedOutputStream
5054           .computeBoolSize(5, success_);
5055       }
5056       if (((bitField0_ & 0x00000020) == 0x00000020)) {
5057         size += com.google.protobuf.CodedOutputStream
5058           .computeUInt32Size(6, negativeResponseCode_);
5059       }
5060       if (((bitField0_ & 0x00000040) == 0x00000040)) {
5061         size += com.google.protobuf.CodedOutputStream
5062           .computeBytesSize(7, payload_);
5063       }
5064       if (((bitField0_ & 0x00000080) == 0x00000080)) {
5065         size += com.google.protobuf.CodedOutputStream
5066           .computeDoubleSize(8, value_);
5067       }
5068       size += getUnknownFields().getSerializedSize();
5069       memoizedSerializedSize = size;
5070       return size;
5071     }
5072
5073     private static final long serialVersionUID = 0L;
5074     @java.lang.Override
5075     protected java.lang.Object writeReplace()
5076         throws java.io.ObjectStreamException {
5077       return super.writeReplace();
5078     }
5079
5080     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5081         com.google.protobuf.ByteString data)
5082         throws com.google.protobuf.InvalidProtocolBufferException {
5083       return PARSER.parseFrom(data);
5084     }
5085     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5086         com.google.protobuf.ByteString data,
5087         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5088         throws com.google.protobuf.InvalidProtocolBufferException {
5089       return PARSER.parseFrom(data, extensionRegistry);
5090     }
5091     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data)
5092         throws com.google.protobuf.InvalidProtocolBufferException {
5093       return PARSER.parseFrom(data);
5094     }
5095     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5096         byte[] data,
5097         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5098         throws com.google.protobuf.InvalidProtocolBufferException {
5099       return PARSER.parseFrom(data, extensionRegistry);
5100     }
5101     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input)
5102         throws java.io.IOException {
5103       return PARSER.parseFrom(input);
5104     }
5105     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5106         java.io.InputStream input,
5107         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5108         throws java.io.IOException {
5109       return PARSER.parseFrom(input, extensionRegistry);
5110     }
5111     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input)
5112         throws java.io.IOException {
5113       return PARSER.parseDelimitedFrom(input);
5114     }
5115     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(
5116         java.io.InputStream input,
5117         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5118         throws java.io.IOException {
5119       return PARSER.parseDelimitedFrom(input, extensionRegistry);
5120     }
5121     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5122         com.google.protobuf.CodedInputStream input)
5123         throws java.io.IOException {
5124       return PARSER.parseFrom(input);
5125     }
5126     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5127         com.google.protobuf.CodedInputStream input,
5128         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5129         throws java.io.IOException {
5130       return PARSER.parseFrom(input, extensionRegistry);
5131     }
5132
5133     public static Builder newBuilder() { return Builder.create(); }
5134     public Builder newBuilderForType() { return newBuilder(); }
5135     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) {
5136       return newBuilder().mergeFrom(prototype);
5137     }
5138     public Builder toBuilder() { return newBuilder(this); }
5139
5140     @java.lang.Override
5141     protected Builder newBuilderForType(
5142         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5143       Builder builder = new Builder(parent);
5144       return builder;
5145     }
5146     /**
5147      * Protobuf type {@code openxc.DiagnosticResponse}
5148      */
5149     public static final class Builder extends
5150         com.google.protobuf.GeneratedMessage.Builder<Builder>
5151        implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder {
5152       public static final com.google.protobuf.Descriptors.Descriptor
5153           getDescriptor() {
5154         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
5155       }
5156
5157       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5158           internalGetFieldAccessorTable() {
5159         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
5160             .ensureFieldAccessorsInitialized(
5161                 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
5162       }
5163
5164       // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder()
5165       private Builder() {
5166         maybeForceBuilderInitialization();
5167       }
5168
5169       private Builder(
5170           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5171         super(parent);
5172         maybeForceBuilderInitialization();
5173       }
5174       private void maybeForceBuilderInitialization() {
5175         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
5176         }
5177       }
5178       private static Builder create() {
5179         return new Builder();
5180       }
5181
5182       public Builder clear() {
5183         super.clear();
5184         bus_ = 0;
5185         bitField0_ = (bitField0_ & ~0x00000001);
5186         messageId_ = 0;
5187         bitField0_ = (bitField0_ & ~0x00000002);
5188         mode_ = 0;
5189         bitField0_ = (bitField0_ & ~0x00000004);
5190         pid_ = 0;
5191         bitField0_ = (bitField0_ & ~0x00000008);
5192         success_ = false;
5193         bitField0_ = (bitField0_ & ~0x00000010);
5194         negativeResponseCode_ = 0;
5195         bitField0_ = (bitField0_ & ~0x00000020);
5196         payload_ = com.google.protobuf.ByteString.EMPTY;
5197         bitField0_ = (bitField0_ & ~0x00000040);
5198         value_ = 0D;
5199         bitField0_ = (bitField0_ & ~0x00000080);
5200         return this;
5201       }
5202
5203       public Builder clone() {
5204         return create().mergeFrom(buildPartial());
5205       }
5206
5207       public com.google.protobuf.Descriptors.Descriptor
5208           getDescriptorForType() {
5209         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
5210       }
5211
5212       public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() {
5213         return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
5214       }
5215
5216       public com.openxc.BinaryMessages.DiagnosticResponse build() {
5217         com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial();
5218         if (!result.isInitialized()) {
5219           throw newUninitializedMessageException(result);
5220         }
5221         return result;
5222       }
5223
5224       public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() {
5225         com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this);
5226         int from_bitField0_ = bitField0_;
5227         int to_bitField0_ = 0;
5228         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
5229           to_bitField0_ |= 0x00000001;
5230         }
5231         result.bus_ = bus_;
5232         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
5233           to_bitField0_ |= 0x00000002;
5234         }
5235         result.messageId_ = messageId_;
5236         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5237           to_bitField0_ |= 0x00000004;
5238         }
5239         result.mode_ = mode_;
5240         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5241           to_bitField0_ |= 0x00000008;
5242         }
5243         result.pid_ = pid_;
5244         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
5245           to_bitField0_ |= 0x00000010;
5246         }
5247         result.success_ = success_;
5248         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
5249           to_bitField0_ |= 0x00000020;
5250         }
5251         result.negativeResponseCode_ = negativeResponseCode_;
5252         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
5253           to_bitField0_ |= 0x00000040;
5254         }
5255         result.payload_ = payload_;
5256         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
5257           to_bitField0_ |= 0x00000080;
5258         }
5259         result.value_ = value_;
5260         result.bitField0_ = to_bitField0_;
5261         onBuilt();
5262         return result;
5263       }
5264
5265       public Builder mergeFrom(com.google.protobuf.Message other) {
5266         if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) {
5267           return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other);
5268         } else {
5269           super.mergeFrom(other);
5270           return this;
5271         }
5272       }
5273
5274       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) {
5275         if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this;
5276         if (other.hasBus()) {
5277           setBus(other.getBus());
5278         }
5279         if (other.hasMessageId()) {
5280           setMessageId(other.getMessageId());
5281         }
5282         if (other.hasMode()) {
5283           setMode(other.getMode());
5284         }
5285         if (other.hasPid()) {
5286           setPid(other.getPid());
5287         }
5288         if (other.hasSuccess()) {
5289           setSuccess(other.getSuccess());
5290         }
5291         if (other.hasNegativeResponseCode()) {
5292           setNegativeResponseCode(other.getNegativeResponseCode());
5293         }
5294         if (other.hasPayload()) {
5295           setPayload(other.getPayload());
5296         }
5297         if (other.hasValue()) {
5298           setValue(other.getValue());
5299         }
5300         this.mergeUnknownFields(other.getUnknownFields());
5301         return this;
5302       }
5303
5304       public final boolean isInitialized() {
5305         return true;
5306       }
5307
5308       public Builder mergeFrom(
5309           com.google.protobuf.CodedInputStream input,
5310           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5311           throws java.io.IOException {
5312         com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null;
5313         try {
5314           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5315         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5316           parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage();
5317           throw e;
5318         } finally {
5319           if (parsedMessage != null) {
5320             mergeFrom(parsedMessage);
5321           }
5322         }
5323         return this;
5324       }
5325       private int bitField0_;
5326
5327       // optional int32 bus = 1;
5328       private int bus_ ;
5329       /**
5330        * <code>optional int32 bus = 1;</code>
5331        */
5332       public boolean hasBus() {
5333         return ((bitField0_ & 0x00000001) == 0x00000001);
5334       }
5335       /**
5336        * <code>optional int32 bus = 1;</code>
5337        */
5338       public int getBus() {
5339         return bus_;
5340       }
5341       /**
5342        * <code>optional int32 bus = 1;</code>
5343        */
5344       public Builder setBus(int value) {
5345         bitField0_ |= 0x00000001;
5346         bus_ = value;
5347         onChanged();
5348         return this;
5349       }
5350       /**
5351        * <code>optional int32 bus = 1;</code>
5352        */
5353       public Builder clearBus() {
5354         bitField0_ = (bitField0_ & ~0x00000001);
5355         bus_ = 0;
5356         onChanged();
5357         return this;
5358       }
5359
5360       // optional uint32 message_id = 2;
5361       private int messageId_ ;
5362       /**
5363        * <code>optional uint32 message_id = 2;</code>
5364        */
5365       public boolean hasMessageId() {
5366         return ((bitField0_ & 0x00000002) == 0x00000002);
5367       }
5368       /**
5369        * <code>optional uint32 message_id = 2;</code>
5370        */
5371       public int getMessageId() {
5372         return messageId_;
5373       }
5374       /**
5375        * <code>optional uint32 message_id = 2;</code>
5376        */
5377       public Builder setMessageId(int value) {
5378         bitField0_ |= 0x00000002;
5379         messageId_ = value;
5380         onChanged();
5381         return this;
5382       }
5383       /**
5384        * <code>optional uint32 message_id = 2;</code>
5385        */
5386       public Builder clearMessageId() {
5387         bitField0_ = (bitField0_ & ~0x00000002);
5388         messageId_ = 0;
5389         onChanged();
5390         return this;
5391       }
5392
5393       // optional uint32 mode = 3;
5394       private int mode_ ;
5395       /**
5396        * <code>optional uint32 mode = 3;</code>
5397        */
5398       public boolean hasMode() {
5399         return ((bitField0_ & 0x00000004) == 0x00000004);
5400       }
5401       /**
5402        * <code>optional uint32 mode = 3;</code>
5403        */
5404       public int getMode() {
5405         return mode_;
5406       }
5407       /**
5408        * <code>optional uint32 mode = 3;</code>
5409        */
5410       public Builder setMode(int value) {
5411         bitField0_ |= 0x00000004;
5412         mode_ = value;
5413         onChanged();
5414         return this;
5415       }
5416       /**
5417        * <code>optional uint32 mode = 3;</code>
5418        */
5419       public Builder clearMode() {
5420         bitField0_ = (bitField0_ & ~0x00000004);
5421         mode_ = 0;
5422         onChanged();
5423         return this;
5424       }
5425
5426       // optional uint32 pid = 4;
5427       private int pid_ ;
5428       /**
5429        * <code>optional uint32 pid = 4;</code>
5430        */
5431       public boolean hasPid() {
5432         return ((bitField0_ & 0x00000008) == 0x00000008);
5433       }
5434       /**
5435        * <code>optional uint32 pid = 4;</code>
5436        */
5437       public int getPid() {
5438         return pid_;
5439       }
5440       /**
5441        * <code>optional uint32 pid = 4;</code>
5442        */
5443       public Builder setPid(int value) {
5444         bitField0_ |= 0x00000008;
5445         pid_ = value;
5446         onChanged();
5447         return this;
5448       }
5449       /**
5450        * <code>optional uint32 pid = 4;</code>
5451        */
5452       public Builder clearPid() {
5453         bitField0_ = (bitField0_ & ~0x00000008);
5454         pid_ = 0;
5455         onChanged();
5456         return this;
5457       }
5458
5459       // optional bool success = 5;
5460       private boolean success_ ;
5461       /**
5462        * <code>optional bool success = 5;</code>
5463        */
5464       public boolean hasSuccess() {
5465         return ((bitField0_ & 0x00000010) == 0x00000010);
5466       }
5467       /**
5468        * <code>optional bool success = 5;</code>
5469        */
5470       public boolean getSuccess() {
5471         return success_;
5472       }
5473       /**
5474        * <code>optional bool success = 5;</code>
5475        */
5476       public Builder setSuccess(boolean value) {
5477         bitField0_ |= 0x00000010;
5478         success_ = value;
5479         onChanged();
5480         return this;
5481       }
5482       /**
5483        * <code>optional bool success = 5;</code>
5484        */
5485       public Builder clearSuccess() {
5486         bitField0_ = (bitField0_ & ~0x00000010);
5487         success_ = false;
5488         onChanged();
5489         return this;
5490       }
5491
5492       // optional uint32 negative_response_code = 6;
5493       private int negativeResponseCode_ ;
5494       /**
5495        * <code>optional uint32 negative_response_code = 6;</code>
5496        */
5497       public boolean hasNegativeResponseCode() {
5498         return ((bitField0_ & 0x00000020) == 0x00000020);
5499       }
5500       /**
5501        * <code>optional uint32 negative_response_code = 6;</code>
5502        */
5503       public int getNegativeResponseCode() {
5504         return negativeResponseCode_;
5505       }
5506       /**
5507        * <code>optional uint32 negative_response_code = 6;</code>
5508        */
5509       public Builder setNegativeResponseCode(int value) {
5510         bitField0_ |= 0x00000020;
5511         negativeResponseCode_ = value;
5512         onChanged();
5513         return this;
5514       }
5515       /**
5516        * <code>optional uint32 negative_response_code = 6;</code>
5517        */
5518       public Builder clearNegativeResponseCode() {
5519         bitField0_ = (bitField0_ & ~0x00000020);
5520         negativeResponseCode_ = 0;
5521         onChanged();
5522         return this;
5523       }
5524
5525       // optional bytes payload = 7;
5526       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
5527       /**
5528        * <code>optional bytes payload = 7;</code>
5529        *
5530        * <pre>
5531        * TODO we are capping this at 8 bytes for now - need to change when we
5532        * support multi-frame responses
5533        * </pre>
5534        */
5535       public boolean hasPayload() {
5536         return ((bitField0_ & 0x00000040) == 0x00000040);
5537       }
5538       /**
5539        * <code>optional bytes payload = 7;</code>
5540        *
5541        * <pre>
5542        * TODO we are capping this at 8 bytes for now - need to change when we
5543        * support multi-frame responses
5544        * </pre>
5545        */
5546       public com.google.protobuf.ByteString getPayload() {
5547         return payload_;
5548       }
5549       /**
5550        * <code>optional bytes payload = 7;</code>
5551        *
5552        * <pre>
5553        * TODO we are capping this at 8 bytes for now - need to change when we
5554        * support multi-frame responses
5555        * </pre>
5556        */
5557       public Builder setPayload(com.google.protobuf.ByteString value) {
5558         if (value == null) {
5559     throw new NullPointerException();
5560   }
5561   bitField0_ |= 0x00000040;
5562         payload_ = value;
5563         onChanged();
5564         return this;
5565       }
5566       /**
5567        * <code>optional bytes payload = 7;</code>
5568        *
5569        * <pre>
5570        * TODO we are capping this at 8 bytes for now - need to change when we
5571        * support multi-frame responses
5572        * </pre>
5573        */
5574       public Builder clearPayload() {
5575         bitField0_ = (bitField0_ & ~0x00000040);
5576         payload_ = getDefaultInstance().getPayload();
5577         onChanged();
5578         return this;
5579       }
5580
5581       // optional double value = 8;
5582       private double value_ ;
5583       /**
5584        * <code>optional double value = 8;</code>
5585        */
5586       public boolean hasValue() {
5587         return ((bitField0_ & 0x00000080) == 0x00000080);
5588       }
5589       /**
5590        * <code>optional double value = 8;</code>
5591        */
5592       public double getValue() {
5593         return value_;
5594       }
5595       /**
5596        * <code>optional double value = 8;</code>
5597        */
5598       public Builder setValue(double value) {
5599         bitField0_ |= 0x00000080;
5600         value_ = value;
5601         onChanged();
5602         return this;
5603       }
5604       /**
5605        * <code>optional double value = 8;</code>
5606        */
5607       public Builder clearValue() {
5608         bitField0_ = (bitField0_ & ~0x00000080);
5609         value_ = 0D;
5610         onChanged();
5611         return this;
5612       }
5613
5614       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse)
5615     }
5616
5617     static {
5618       defaultInstance = new DiagnosticResponse(true);
5619       defaultInstance.initFields();
5620     }
5621
5622     // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse)
5623   }
5624
5625   public interface DynamicFieldOrBuilder
5626       extends com.google.protobuf.MessageOrBuilder {
5627
5628     // optional .openxc.DynamicField.Type type = 1;
5629     /**
5630      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5631      */
5632     boolean hasType();
5633     /**
5634      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5635      */
5636     com.openxc.BinaryMessages.DynamicField.Type getType();
5637
5638     // optional string string_value = 2;
5639     /**
5640      * <code>optional string string_value = 2;</code>
5641      */
5642     boolean hasStringValue();
5643     /**
5644      * <code>optional string string_value = 2;</code>
5645      */
5646     java.lang.String getStringValue();
5647     /**
5648      * <code>optional string string_value = 2;</code>
5649      */
5650     com.google.protobuf.ByteString
5651         getStringValueBytes();
5652
5653     // optional double numeric_value = 3;
5654     /**
5655      * <code>optional double numeric_value = 3;</code>
5656      */
5657     boolean hasNumericValue();
5658     /**
5659      * <code>optional double numeric_value = 3;</code>
5660      */
5661     double getNumericValue();
5662
5663     // optional bool boolean_value = 4;
5664     /**
5665      * <code>optional bool boolean_value = 4;</code>
5666      */
5667     boolean hasBooleanValue();
5668     /**
5669      * <code>optional bool boolean_value = 4;</code>
5670      */
5671     boolean getBooleanValue();
5672   }
5673   /**
5674    * Protobuf type {@code openxc.DynamicField}
5675    */
5676   public static final class DynamicField extends
5677       com.google.protobuf.GeneratedMessage
5678       implements DynamicFieldOrBuilder {
5679     // Use DynamicField.newBuilder() to construct.
5680     private DynamicField(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
5681       super(builder);
5682       this.unknownFields = builder.getUnknownFields();
5683     }
5684     private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
5685
5686     private static final DynamicField defaultInstance;
5687     public static DynamicField getDefaultInstance() {
5688       return defaultInstance;
5689     }
5690
5691     public DynamicField getDefaultInstanceForType() {
5692       return defaultInstance;
5693     }
5694
5695     private final com.google.protobuf.UnknownFieldSet unknownFields;
5696     @java.lang.Override
5697     public final com.google.protobuf.UnknownFieldSet
5698         getUnknownFields() {
5699       return this.unknownFields;
5700     }
5701     private DynamicField(
5702         com.google.protobuf.CodedInputStream input,
5703         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5704         throws com.google.protobuf.InvalidProtocolBufferException {
5705       initFields();
5706       int mutable_bitField0_ = 0;
5707       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
5708           com.google.protobuf.UnknownFieldSet.newBuilder();
5709       try {
5710         boolean done = false;
5711         while (!done) {
5712           int tag = input.readTag();
5713           switch (tag) {
5714             case 0:
5715               done = true;
5716               break;
5717             default: {
5718               if (!parseUnknownField(input, unknownFields,
5719                                      extensionRegistry, tag)) {
5720                 done = true;
5721               }
5722               break;
5723             }
5724             case 8: {
5725               int rawValue = input.readEnum();
5726               com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue);
5727               if (value == null) {
5728                 unknownFields.mergeVarintField(1, rawValue);
5729               } else {
5730                 bitField0_ |= 0x00000001;
5731                 type_ = value;
5732               }
5733               break;
5734             }
5735             case 18: {
5736               bitField0_ |= 0x00000002;
5737               stringValue_ = input.readBytes();
5738               break;
5739             }
5740             case 25: {
5741               bitField0_ |= 0x00000004;
5742               numericValue_ = input.readDouble();
5743               break;
5744             }
5745             case 32: {
5746               bitField0_ |= 0x00000008;
5747               booleanValue_ = input.readBool();
5748               break;
5749             }
5750           }
5751         }
5752       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5753         throw e.setUnfinishedMessage(this);
5754       } catch (java.io.IOException e) {
5755         throw new com.google.protobuf.InvalidProtocolBufferException(
5756             e.getMessage()).setUnfinishedMessage(this);
5757       } finally {
5758         this.unknownFields = unknownFields.build();
5759         makeExtensionsImmutable();
5760       }
5761     }
5762     public static final com.google.protobuf.Descriptors.Descriptor
5763         getDescriptor() {
5764       return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
5765     }
5766
5767     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5768         internalGetFieldAccessorTable() {
5769       return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
5770           .ensureFieldAccessorsInitialized(
5771               com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
5772     }
5773
5774     public static com.google.protobuf.Parser<DynamicField> PARSER =
5775         new com.google.protobuf.AbstractParser<DynamicField>() {
5776       public DynamicField parsePartialFrom(
5777           com.google.protobuf.CodedInputStream input,
5778           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5779           throws com.google.protobuf.InvalidProtocolBufferException {
5780         return new DynamicField(input, extensionRegistry);
5781       }
5782     };
5783
5784     @java.lang.Override
5785     public com.google.protobuf.Parser<DynamicField> getParserForType() {
5786       return PARSER;
5787     }
5788
5789     /**
5790      * Protobuf enum {@code openxc.DynamicField.Type}
5791      */
5792     public enum Type
5793         implements com.google.protobuf.ProtocolMessageEnum {
5794       /**
5795        * <code>STRING = 1;</code>
5796        */
5797       STRING(0, 1),
5798       /**
5799        * <code>NUM = 2;</code>
5800        */
5801       NUM(1, 2),
5802       /**
5803        * <code>BOOL = 3;</code>
5804        */
5805       BOOL(2, 3),
5806       ;
5807
5808       /**
5809        * <code>STRING = 1;</code>
5810        */
5811       public static final int STRING_VALUE = 1;
5812       /**
5813        * <code>NUM = 2;</code>
5814        */
5815       public static final int NUM_VALUE = 2;
5816       /**
5817        * <code>BOOL = 3;</code>
5818        */
5819       public static final int BOOL_VALUE = 3;
5820
5821
5822       public final int getNumber() { return value; }
5823
5824       public static Type valueOf(int value) {
5825         switch (value) {
5826           case 1: return STRING;
5827           case 2: return NUM;
5828           case 3: return BOOL;
5829           default: return null;
5830         }
5831       }
5832
5833       public static com.google.protobuf.Internal.EnumLiteMap<Type>
5834           internalGetValueMap() {
5835         return internalValueMap;
5836       }
5837       private static com.google.protobuf.Internal.EnumLiteMap<Type>
5838           internalValueMap =
5839             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
5840               public Type findValueByNumber(int number) {
5841                 return Type.valueOf(number);
5842               }
5843             };
5844
5845       public final com.google.protobuf.Descriptors.EnumValueDescriptor
5846           getValueDescriptor() {
5847         return getDescriptor().getValues().get(index);
5848       }
5849       public final com.google.protobuf.Descriptors.EnumDescriptor
5850           getDescriptorForType() {
5851         return getDescriptor();
5852       }
5853       public static final com.google.protobuf.Descriptors.EnumDescriptor
5854           getDescriptor() {
5855         return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0);
5856       }
5857
5858       private static final Type[] VALUES = values();
5859
5860       public static Type valueOf(
5861           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
5862         if (desc.getType() != getDescriptor()) {
5863           throw new java.lang.IllegalArgumentException(
5864             "EnumValueDescriptor is not for this type.");
5865         }
5866         return VALUES[desc.getIndex()];
5867       }
5868
5869       private final int index;
5870       private final int value;
5871
5872       private Type(int index, int value) {
5873         this.index = index;
5874         this.value = value;
5875       }
5876
5877       // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type)
5878     }
5879
5880     private int bitField0_;
5881     // optional .openxc.DynamicField.Type type = 1;
5882     public static final int TYPE_FIELD_NUMBER = 1;
5883     private com.openxc.BinaryMessages.DynamicField.Type type_;
5884     /**
5885      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5886      */
5887     public boolean hasType() {
5888       return ((bitField0_ & 0x00000001) == 0x00000001);
5889     }
5890     /**
5891      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5892      */
5893     public com.openxc.BinaryMessages.DynamicField.Type getType() {
5894       return type_;
5895     }
5896
5897     // optional string string_value = 2;
5898     public static final int STRING_VALUE_FIELD_NUMBER = 2;
5899     private java.lang.Object stringValue_;
5900     /**
5901      * <code>optional string string_value = 2;</code>
5902      */
5903     public boolean hasStringValue() {
5904       return ((bitField0_ & 0x00000002) == 0x00000002);
5905     }
5906     /**
5907      * <code>optional string string_value = 2;</code>
5908      */
5909     public java.lang.String getStringValue() {
5910       java.lang.Object ref = stringValue_;
5911       if (ref instanceof java.lang.String) {
5912         return (java.lang.String) ref;
5913       } else {
5914         com.google.protobuf.ByteString bs = 
5915             (com.google.protobuf.ByteString) ref;
5916         java.lang.String s = bs.toStringUtf8();
5917         if (bs.isValidUtf8()) {
5918           stringValue_ = s;
5919         }
5920         return s;
5921       }
5922     }
5923     /**
5924      * <code>optional string string_value = 2;</code>
5925      */
5926     public com.google.protobuf.ByteString
5927         getStringValueBytes() {
5928       java.lang.Object ref = stringValue_;
5929       if (ref instanceof java.lang.String) {
5930         com.google.protobuf.ByteString b = 
5931             com.google.protobuf.ByteString.copyFromUtf8(
5932                 (java.lang.String) ref);
5933         stringValue_ = b;
5934         return b;
5935       } else {
5936         return (com.google.protobuf.ByteString) ref;
5937       }
5938     }
5939
5940     // optional double numeric_value = 3;
5941     public static final int NUMERIC_VALUE_FIELD_NUMBER = 3;
5942     private double numericValue_;
5943     /**
5944      * <code>optional double numeric_value = 3;</code>
5945      */
5946     public boolean hasNumericValue() {
5947       return ((bitField0_ & 0x00000004) == 0x00000004);
5948     }
5949     /**
5950      * <code>optional double numeric_value = 3;</code>
5951      */
5952     public double getNumericValue() {
5953       return numericValue_;
5954     }
5955
5956     // optional bool boolean_value = 4;
5957     public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4;
5958     private boolean booleanValue_;
5959     /**
5960      * <code>optional bool boolean_value = 4;</code>
5961      */
5962     public boolean hasBooleanValue() {
5963       return ((bitField0_ & 0x00000008) == 0x00000008);
5964     }
5965     /**
5966      * <code>optional bool boolean_value = 4;</code>
5967      */
5968     public boolean getBooleanValue() {
5969       return booleanValue_;
5970     }
5971
5972     private void initFields() {
5973       type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
5974       stringValue_ = "";
5975       numericValue_ = 0D;
5976       booleanValue_ = false;
5977     }
5978     private byte memoizedIsInitialized = -1;
5979     public final boolean isInitialized() {
5980       byte isInitialized = memoizedIsInitialized;
5981       if (isInitialized != -1) return isInitialized == 1;
5982
5983       memoizedIsInitialized = 1;
5984       return true;
5985     }
5986
5987     public void writeTo(com.google.protobuf.CodedOutputStream output)
5988                         throws java.io.IOException {
5989       getSerializedSize();
5990       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5991         output.writeEnum(1, type_.getNumber());
5992       }
5993       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5994         output.writeBytes(2, getStringValueBytes());
5995       }
5996       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5997         output.writeDouble(3, numericValue_);
5998       }
5999       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6000         output.writeBool(4, booleanValue_);
6001       }
6002       getUnknownFields().writeTo(output);
6003     }
6004
6005     private int memoizedSerializedSize = -1;
6006     public int getSerializedSize() {
6007       int size = memoizedSerializedSize;
6008       if (size != -1) return size;
6009
6010       size = 0;
6011       if (((bitField0_ & 0x00000001) == 0x00000001)) {
6012         size += com.google.protobuf.CodedOutputStream
6013           .computeEnumSize(1, type_.getNumber());
6014       }
6015       if (((bitField0_ & 0x00000002) == 0x00000002)) {
6016         size += com.google.protobuf.CodedOutputStream
6017           .computeBytesSize(2, getStringValueBytes());
6018       }
6019       if (((bitField0_ & 0x00000004) == 0x00000004)) {
6020         size += com.google.protobuf.CodedOutputStream
6021           .computeDoubleSize(3, numericValue_);
6022       }
6023       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6024         size += com.google.protobuf.CodedOutputStream
6025           .computeBoolSize(4, booleanValue_);
6026       }
6027       size += getUnknownFields().getSerializedSize();
6028       memoizedSerializedSize = size;
6029       return size;
6030     }
6031
6032     private static final long serialVersionUID = 0L;
6033     @java.lang.Override
6034     protected java.lang.Object writeReplace()
6035         throws java.io.ObjectStreamException {
6036       return super.writeReplace();
6037     }
6038
6039     public static com.openxc.BinaryMessages.DynamicField parseFrom(
6040         com.google.protobuf.ByteString data)
6041         throws com.google.protobuf.InvalidProtocolBufferException {
6042       return PARSER.parseFrom(data);
6043     }
6044     public static com.openxc.BinaryMessages.DynamicField parseFrom(
6045         com.google.protobuf.ByteString data,
6046         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6047         throws com.google.protobuf.InvalidProtocolBufferException {
6048       return PARSER.parseFrom(data, extensionRegistry);
6049     }
6050     public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data)
6051         throws com.google.protobuf.InvalidProtocolBufferException {
6052       return PARSER.parseFrom(data);
6053     }
6054     public static com.openxc.BinaryMessages.DynamicField parseFrom(
6055         byte[] data,
6056         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6057         throws com.google.protobuf.InvalidProtocolBufferException {
6058       return PARSER.parseFrom(data, extensionRegistry);
6059     }
6060     public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input)
6061         throws java.io.IOException {
6062       return PARSER.parseFrom(input);
6063     }
6064     public static com.openxc.BinaryMessages.DynamicField parseFrom(
6065         java.io.InputStream input,
6066         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6067         throws java.io.IOException {
6068       return PARSER.parseFrom(input, extensionRegistry);
6069     }
6070     public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input)
6071         throws java.io.IOException {
6072       return PARSER.parseDelimitedFrom(input);
6073     }
6074     public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(
6075         java.io.InputStream input,
6076         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6077         throws java.io.IOException {
6078       return PARSER.parseDelimitedFrom(input, extensionRegistry);
6079     }
6080     public static com.openxc.BinaryMessages.DynamicField parseFrom(
6081         com.google.protobuf.CodedInputStream input)
6082         throws java.io.IOException {
6083       return PARSER.parseFrom(input);
6084     }
6085     public static com.openxc.BinaryMessages.DynamicField parseFrom(
6086         com.google.protobuf.CodedInputStream input,
6087         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6088         throws java.io.IOException {
6089       return PARSER.parseFrom(input, extensionRegistry);
6090     }
6091
6092     public static Builder newBuilder() { return Builder.create(); }
6093     public Builder newBuilderForType() { return newBuilder(); }
6094     public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) {
6095       return newBuilder().mergeFrom(prototype);
6096     }
6097     public Builder toBuilder() { return newBuilder(this); }
6098
6099     @java.lang.Override
6100     protected Builder newBuilderForType(
6101         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6102       Builder builder = new Builder(parent);
6103       return builder;
6104     }
6105     /**
6106      * Protobuf type {@code openxc.DynamicField}
6107      */
6108     public static final class Builder extends
6109         com.google.protobuf.GeneratedMessage.Builder<Builder>
6110        implements com.openxc.BinaryMessages.DynamicFieldOrBuilder {
6111       public static final com.google.protobuf.Descriptors.Descriptor
6112           getDescriptor() {
6113         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
6114       }
6115
6116       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6117           internalGetFieldAccessorTable() {
6118         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
6119             .ensureFieldAccessorsInitialized(
6120                 com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
6121       }
6122
6123       // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder()
6124       private Builder() {
6125         maybeForceBuilderInitialization();
6126       }
6127
6128       private Builder(
6129           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6130         super(parent);
6131         maybeForceBuilderInitialization();
6132       }
6133       private void maybeForceBuilderInitialization() {
6134         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
6135         }
6136       }
6137       private static Builder create() {
6138         return new Builder();
6139       }
6140
6141       public Builder clear() {
6142         super.clear();
6143         type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6144         bitField0_ = (bitField0_ & ~0x00000001);
6145         stringValue_ = "";
6146         bitField0_ = (bitField0_ & ~0x00000002);
6147         numericValue_ = 0D;
6148         bitField0_ = (bitField0_ & ~0x00000004);
6149         booleanValue_ = false;
6150         bitField0_ = (bitField0_ & ~0x00000008);
6151         return this;
6152       }
6153
6154       public Builder clone() {
6155         return create().mergeFrom(buildPartial());
6156       }
6157
6158       public com.google.protobuf.Descriptors.Descriptor
6159           getDescriptorForType() {
6160         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
6161       }
6162
6163       public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() {
6164         return com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6165       }
6166
6167       public com.openxc.BinaryMessages.DynamicField build() {
6168         com.openxc.BinaryMessages.DynamicField result = buildPartial();
6169         if (!result.isInitialized()) {
6170           throw newUninitializedMessageException(result);
6171         }
6172         return result;
6173       }
6174
6175       public com.openxc.BinaryMessages.DynamicField buildPartial() {
6176         com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this);
6177         int from_bitField0_ = bitField0_;
6178         int to_bitField0_ = 0;
6179         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
6180           to_bitField0_ |= 0x00000001;
6181         }
6182         result.type_ = type_;
6183         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
6184           to_bitField0_ |= 0x00000002;
6185         }
6186         result.stringValue_ = stringValue_;
6187         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
6188           to_bitField0_ |= 0x00000004;
6189         }
6190         result.numericValue_ = numericValue_;
6191         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
6192           to_bitField0_ |= 0x00000008;
6193         }
6194         result.booleanValue_ = booleanValue_;
6195         result.bitField0_ = to_bitField0_;
6196         onBuilt();
6197         return result;
6198       }
6199
6200       public Builder mergeFrom(com.google.protobuf.Message other) {
6201         if (other instanceof com.openxc.BinaryMessages.DynamicField) {
6202           return mergeFrom((com.openxc.BinaryMessages.DynamicField)other);
6203         } else {
6204           super.mergeFrom(other);
6205           return this;
6206         }
6207       }
6208
6209       public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) {
6210         if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this;
6211         if (other.hasType()) {
6212           setType(other.getType());
6213         }
6214         if (other.hasStringValue()) {
6215           bitField0_ |= 0x00000002;
6216           stringValue_ = other.stringValue_;
6217           onChanged();
6218         }
6219         if (other.hasNumericValue()) {
6220           setNumericValue(other.getNumericValue());
6221         }
6222         if (other.hasBooleanValue()) {
6223           setBooleanValue(other.getBooleanValue());
6224         }
6225         this.mergeUnknownFields(other.getUnknownFields());
6226         return this;
6227       }
6228
6229       public final boolean isInitialized() {
6230         return true;
6231       }
6232
6233       public Builder mergeFrom(
6234           com.google.protobuf.CodedInputStream input,
6235           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6236           throws java.io.IOException {
6237         com.openxc.BinaryMessages.DynamicField parsedMessage = null;
6238         try {
6239           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
6240         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6241           parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage();
6242           throw e;
6243         } finally {
6244           if (parsedMessage != null) {
6245             mergeFrom(parsedMessage);
6246           }
6247         }
6248         return this;
6249       }
6250       private int bitField0_;
6251
6252       // optional .openxc.DynamicField.Type type = 1;
6253       private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6254       /**
6255        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6256        */
6257       public boolean hasType() {
6258         return ((bitField0_ & 0x00000001) == 0x00000001);
6259       }
6260       /**
6261        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6262        */
6263       public com.openxc.BinaryMessages.DynamicField.Type getType() {
6264         return type_;
6265       }
6266       /**
6267        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6268        */
6269       public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) {
6270         if (value == null) {
6271           throw new NullPointerException();
6272         }
6273         bitField0_ |= 0x00000001;
6274         type_ = value;
6275         onChanged();
6276         return this;
6277       }
6278       /**
6279        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6280        */
6281       public Builder clearType() {
6282         bitField0_ = (bitField0_ & ~0x00000001);
6283         type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6284         onChanged();
6285         return this;
6286       }
6287
6288       // optional string string_value = 2;
6289       private java.lang.Object stringValue_ = "";
6290       /**
6291        * <code>optional string string_value = 2;</code>
6292        */
6293       public boolean hasStringValue() {
6294         return ((bitField0_ & 0x00000002) == 0x00000002);
6295       }
6296       /**
6297        * <code>optional string string_value = 2;</code>
6298        */
6299       public java.lang.String getStringValue() {
6300         java.lang.Object ref = stringValue_;
6301         if (!(ref instanceof java.lang.String)) {
6302           java.lang.String s = ((com.google.protobuf.ByteString) ref)
6303               .toStringUtf8();
6304           stringValue_ = s;
6305           return s;
6306         } else {
6307           return (java.lang.String) ref;
6308         }
6309       }
6310       /**
6311        * <code>optional string string_value = 2;</code>
6312        */
6313       public com.google.protobuf.ByteString
6314           getStringValueBytes() {
6315         java.lang.Object ref = stringValue_;
6316         if (ref instanceof String) {
6317           com.google.protobuf.ByteString b = 
6318               com.google.protobuf.ByteString.copyFromUtf8(
6319                   (java.lang.String) ref);
6320           stringValue_ = b;
6321           return b;
6322         } else {
6323           return (com.google.protobuf.ByteString) ref;
6324         }
6325       }
6326       /**
6327        * <code>optional string string_value = 2;</code>
6328        */
6329       public Builder setStringValue(
6330           java.lang.String value) {
6331         if (value == null) {
6332     throw new NullPointerException();
6333   }
6334   bitField0_ |= 0x00000002;
6335         stringValue_ = value;
6336         onChanged();
6337         return this;
6338       }
6339       /**
6340        * <code>optional string string_value = 2;</code>
6341        */
6342       public Builder clearStringValue() {
6343         bitField0_ = (bitField0_ & ~0x00000002);
6344         stringValue_ = getDefaultInstance().getStringValue();
6345         onChanged();
6346         return this;
6347       }
6348       /**
6349        * <code>optional string string_value = 2;</code>
6350        */
6351       public Builder setStringValueBytes(
6352           com.google.protobuf.ByteString value) {
6353         if (value == null) {
6354     throw new NullPointerException();
6355   }
6356   bitField0_ |= 0x00000002;
6357         stringValue_ = value;
6358         onChanged();
6359         return this;
6360       }
6361
6362       // optional double numeric_value = 3;
6363       private double numericValue_ ;
6364       /**
6365        * <code>optional double numeric_value = 3;</code>
6366        */
6367       public boolean hasNumericValue() {
6368         return ((bitField0_ & 0x00000004) == 0x00000004);
6369       }
6370       /**
6371        * <code>optional double numeric_value = 3;</code>
6372        */
6373       public double getNumericValue() {
6374         return numericValue_;
6375       }
6376       /**
6377        * <code>optional double numeric_value = 3;</code>
6378        */
6379       public Builder setNumericValue(double value) {
6380         bitField0_ |= 0x00000004;
6381         numericValue_ = value;
6382         onChanged();
6383         return this;
6384       }
6385       /**
6386        * <code>optional double numeric_value = 3;</code>
6387        */
6388       public Builder clearNumericValue() {
6389         bitField0_ = (bitField0_ & ~0x00000004);
6390         numericValue_ = 0D;
6391         onChanged();
6392         return this;
6393       }
6394
6395       // optional bool boolean_value = 4;
6396       private boolean booleanValue_ ;
6397       /**
6398        * <code>optional bool boolean_value = 4;</code>
6399        */
6400       public boolean hasBooleanValue() {
6401         return ((bitField0_ & 0x00000008) == 0x00000008);
6402       }
6403       /**
6404        * <code>optional bool boolean_value = 4;</code>
6405        */
6406       public boolean getBooleanValue() {
6407         return booleanValue_;
6408       }
6409       /**
6410        * <code>optional bool boolean_value = 4;</code>
6411        */
6412       public Builder setBooleanValue(boolean value) {
6413         bitField0_ |= 0x00000008;
6414         booleanValue_ = value;
6415         onChanged();
6416         return this;
6417       }
6418       /**
6419        * <code>optional bool boolean_value = 4;</code>
6420        */
6421       public Builder clearBooleanValue() {
6422         bitField0_ = (bitField0_ & ~0x00000008);
6423         booleanValue_ = false;
6424         onChanged();
6425         return this;
6426       }
6427
6428       // @@protoc_insertion_point(builder_scope:openxc.DynamicField)
6429     }
6430
6431     static {
6432       defaultInstance = new DynamicField(true);
6433       defaultInstance.initFields();
6434     }
6435
6436     // @@protoc_insertion_point(class_scope:openxc.DynamicField)
6437   }
6438
6439   public interface TranslatedMessageOrBuilder
6440       extends com.google.protobuf.MessageOrBuilder {
6441
6442     // optional .openxc.TranslatedMessage.Type type = 1;
6443     /**
6444      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6445      */
6446     boolean hasType();
6447     /**
6448      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6449      */
6450     com.openxc.BinaryMessages.TranslatedMessage.Type getType();
6451
6452     // optional string name = 2;
6453     /**
6454      * <code>optional string name = 2;</code>
6455      */
6456     boolean hasName();
6457     /**
6458      * <code>optional string name = 2;</code>
6459      */
6460     java.lang.String getName();
6461     /**
6462      * <code>optional string name = 2;</code>
6463      */
6464     com.google.protobuf.ByteString
6465         getNameBytes();
6466
6467     // optional .openxc.DynamicField value = 3;
6468     /**
6469      * <code>optional .openxc.DynamicField value = 3;</code>
6470      */
6471     boolean hasValue();
6472     /**
6473      * <code>optional .openxc.DynamicField value = 3;</code>
6474      */
6475     com.openxc.BinaryMessages.DynamicField getValue();
6476     /**
6477      * <code>optional .openxc.DynamicField value = 3;</code>
6478      */
6479     com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder();
6480
6481     // optional .openxc.DynamicField event = 4;
6482     /**
6483      * <code>optional .openxc.DynamicField event = 4;</code>
6484      */
6485     boolean hasEvent();
6486     /**
6487      * <code>optional .openxc.DynamicField event = 4;</code>
6488      */
6489     com.openxc.BinaryMessages.DynamicField getEvent();
6490     /**
6491      * <code>optional .openxc.DynamicField event = 4;</code>
6492      */
6493     com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder();
6494   }
6495   /**
6496    * Protobuf type {@code openxc.TranslatedMessage}
6497    */
6498   public static final class TranslatedMessage extends
6499       com.google.protobuf.GeneratedMessage
6500       implements TranslatedMessageOrBuilder {
6501     // Use TranslatedMessage.newBuilder() to construct.
6502     private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
6503       super(builder);
6504       this.unknownFields = builder.getUnknownFields();
6505     }
6506     private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
6507
6508     private static final TranslatedMessage defaultInstance;
6509     public static TranslatedMessage getDefaultInstance() {
6510       return defaultInstance;
6511     }
6512
6513     public TranslatedMessage getDefaultInstanceForType() {
6514       return defaultInstance;
6515     }
6516
6517     private final com.google.protobuf.UnknownFieldSet unknownFields;
6518     @java.lang.Override
6519     public final com.google.protobuf.UnknownFieldSet
6520         getUnknownFields() {
6521       return this.unknownFields;
6522     }
6523     private TranslatedMessage(
6524         com.google.protobuf.CodedInputStream input,
6525         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6526         throws com.google.protobuf.InvalidProtocolBufferException {
6527       initFields();
6528       int mutable_bitField0_ = 0;
6529       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
6530           com.google.protobuf.UnknownFieldSet.newBuilder();
6531       try {
6532         boolean done = false;
6533         while (!done) {
6534           int tag = input.readTag();
6535           switch (tag) {
6536             case 0:
6537               done = true;
6538               break;
6539             default: {
6540               if (!parseUnknownField(input, unknownFields,
6541                                      extensionRegistry, tag)) {
6542                 done = true;
6543               }
6544               break;
6545             }
6546             case 8: {
6547               int rawValue = input.readEnum();
6548               com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
6549               if (value == null) {
6550                 unknownFields.mergeVarintField(1, rawValue);
6551               } else {
6552                 bitField0_ |= 0x00000001;
6553                 type_ = value;
6554               }
6555               break;
6556             }
6557             case 18: {
6558               bitField0_ |= 0x00000002;
6559               name_ = input.readBytes();
6560               break;
6561             }
6562             case 26: {
6563               com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
6564               if (((bitField0_ & 0x00000004) == 0x00000004)) {
6565                 subBuilder = value_.toBuilder();
6566               }
6567               value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
6568               if (subBuilder != null) {
6569                 subBuilder.mergeFrom(value_);
6570                 value_ = subBuilder.buildPartial();
6571               }
6572               bitField0_ |= 0x00000004;
6573               break;
6574             }
6575             case 34: {
6576               com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
6577               if (((bitField0_ & 0x00000008) == 0x00000008)) {
6578                 subBuilder = event_.toBuilder();
6579               }
6580               event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
6581               if (subBuilder != null) {
6582                 subBuilder.mergeFrom(event_);
6583                 event_ = subBuilder.buildPartial();
6584               }
6585               bitField0_ |= 0x00000008;
6586               break;
6587             }
6588           }
6589         }
6590       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6591         throw e.setUnfinishedMessage(this);
6592       } catch (java.io.IOException e) {
6593         throw new com.google.protobuf.InvalidProtocolBufferException(
6594             e.getMessage()).setUnfinishedMessage(this);
6595       } finally {
6596         this.unknownFields = unknownFields.build();
6597         makeExtensionsImmutable();
6598       }
6599     }
6600     public static final com.google.protobuf.Descriptors.Descriptor
6601         getDescriptor() {
6602       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6603     }
6604
6605     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6606         internalGetFieldAccessorTable() {
6607       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
6608           .ensureFieldAccessorsInitialized(
6609               com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
6610     }
6611
6612     public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
6613         new com.google.protobuf.AbstractParser<TranslatedMessage>() {
6614       public TranslatedMessage parsePartialFrom(
6615           com.google.protobuf.CodedInputStream input,
6616           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6617           throws com.google.protobuf.InvalidProtocolBufferException {
6618         return new TranslatedMessage(input, extensionRegistry);
6619       }
6620     };
6621
6622     @java.lang.Override
6623     public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
6624       return PARSER;
6625     }
6626
6627     /**
6628      * Protobuf enum {@code openxc.TranslatedMessage.Type}
6629      */
6630     public enum Type
6631         implements com.google.protobuf.ProtocolMessageEnum {
6632       /**
6633        * <code>STRING = 1;</code>
6634        */
6635       STRING(0, 1),
6636       /**
6637        * <code>NUM = 2;</code>
6638        */
6639       NUM(1, 2),
6640       /**
6641        * <code>BOOL = 3;</code>
6642        */
6643       BOOL(2, 3),
6644       /**
6645        * <code>EVENTED_STRING = 4;</code>
6646        */
6647       EVENTED_STRING(3, 4),
6648       /**
6649        * <code>EVENTED_NUM = 5;</code>
6650        */
6651       EVENTED_NUM(4, 5),
6652       /**
6653        * <code>EVENTED_BOOL = 6;</code>
6654        */
6655       EVENTED_BOOL(5, 6),
6656       ;
6657
6658       /**
6659        * <code>STRING = 1;</code>
6660        */
6661       public static final int STRING_VALUE = 1;
6662       /**
6663        * <code>NUM = 2;</code>
6664        */
6665       public static final int NUM_VALUE = 2;
6666       /**
6667        * <code>BOOL = 3;</code>
6668        */
6669       public static final int BOOL_VALUE = 3;
6670       /**
6671        * <code>EVENTED_STRING = 4;</code>
6672        */
6673       public static final int EVENTED_STRING_VALUE = 4;
6674       /**
6675        * <code>EVENTED_NUM = 5;</code>
6676        */
6677       public static final int EVENTED_NUM_VALUE = 5;
6678       /**
6679        * <code>EVENTED_BOOL = 6;</code>
6680        */
6681       public static final int EVENTED_BOOL_VALUE = 6;
6682
6683
6684       public final int getNumber() { return value; }
6685
6686       public static Type valueOf(int value) {
6687         switch (value) {
6688           case 1: return STRING;
6689           case 2: return NUM;
6690           case 3: return BOOL;
6691           case 4: return EVENTED_STRING;
6692           case 5: return EVENTED_NUM;
6693           case 6: return EVENTED_BOOL;
6694           default: return null;
6695         }
6696       }
6697
6698       public static com.google.protobuf.Internal.EnumLiteMap<Type>
6699           internalGetValueMap() {
6700         return internalValueMap;
6701       }
6702       private static com.google.protobuf.Internal.EnumLiteMap<Type>
6703           internalValueMap =
6704             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
6705               public Type findValueByNumber(int number) {
6706                 return Type.valueOf(number);
6707               }
6708             };
6709
6710       public final com.google.protobuf.Descriptors.EnumValueDescriptor
6711           getValueDescriptor() {
6712         return getDescriptor().getValues().get(index);
6713       }
6714       public final com.google.protobuf.Descriptors.EnumDescriptor
6715           getDescriptorForType() {
6716         return getDescriptor();
6717       }
6718       public static final com.google.protobuf.Descriptors.EnumDescriptor
6719           getDescriptor() {
6720         return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
6721       }
6722
6723       private static final Type[] VALUES = values();
6724
6725       public static Type valueOf(
6726           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
6727         if (desc.getType() != getDescriptor()) {
6728           throw new java.lang.IllegalArgumentException(
6729             "EnumValueDescriptor is not for this type.");
6730         }
6731         return VALUES[desc.getIndex()];
6732       }
6733
6734       private final int index;
6735       private final int value;
6736
6737       private Type(int index, int value) {
6738         this.index = index;
6739         this.value = value;
6740       }
6741
6742       // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
6743     }
6744
6745     private int bitField0_;
6746     // optional .openxc.TranslatedMessage.Type type = 1;
6747     public static final int TYPE_FIELD_NUMBER = 1;
6748     private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
6749     /**
6750      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6751      */
6752     public boolean hasType() {
6753       return ((bitField0_ & 0x00000001) == 0x00000001);
6754     }
6755     /**
6756      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6757      */
6758     public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
6759       return type_;
6760     }
6761
6762     // optional string name = 2;
6763     public static final int NAME_FIELD_NUMBER = 2;
6764     private java.lang.Object name_;
6765     /**
6766      * <code>optional string name = 2;</code>
6767      */
6768     public boolean hasName() {
6769       return ((bitField0_ & 0x00000002) == 0x00000002);
6770     }
6771     /**
6772      * <code>optional string name = 2;</code>
6773      */
6774     public java.lang.String getName() {
6775       java.lang.Object ref = name_;
6776       if (ref instanceof java.lang.String) {
6777         return (java.lang.String) ref;
6778       } else {
6779         com.google.protobuf.ByteString bs = 
6780             (com.google.protobuf.ByteString) ref;
6781         java.lang.String s = bs.toStringUtf8();
6782         if (bs.isValidUtf8()) {
6783           name_ = s;
6784         }
6785         return s;
6786       }
6787     }
6788     /**
6789      * <code>optional string name = 2;</code>
6790      */
6791     public com.google.protobuf.ByteString
6792         getNameBytes() {
6793       java.lang.Object ref = name_;
6794       if (ref instanceof java.lang.String) {
6795         com.google.protobuf.ByteString b = 
6796             com.google.protobuf.ByteString.copyFromUtf8(
6797                 (java.lang.String) ref);
6798         name_ = b;
6799         return b;
6800       } else {
6801         return (com.google.protobuf.ByteString) ref;
6802       }
6803     }
6804
6805     // optional .openxc.DynamicField value = 3;
6806     public static final int VALUE_FIELD_NUMBER = 3;
6807     private com.openxc.BinaryMessages.DynamicField value_;
6808     /**
6809      * <code>optional .openxc.DynamicField value = 3;</code>
6810      */
6811     public boolean hasValue() {
6812       return ((bitField0_ & 0x00000004) == 0x00000004);
6813     }
6814     /**
6815      * <code>optional .openxc.DynamicField value = 3;</code>
6816      */
6817     public com.openxc.BinaryMessages.DynamicField getValue() {
6818       return value_;
6819     }
6820     /**
6821      * <code>optional .openxc.DynamicField value = 3;</code>
6822      */
6823     public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
6824       return value_;
6825     }
6826
6827     // optional .openxc.DynamicField event = 4;
6828     public static final int EVENT_FIELD_NUMBER = 4;
6829     private com.openxc.BinaryMessages.DynamicField event_;
6830     /**
6831      * <code>optional .openxc.DynamicField event = 4;</code>
6832      */
6833     public boolean hasEvent() {
6834       return ((bitField0_ & 0x00000008) == 0x00000008);
6835     }
6836     /**
6837      * <code>optional .openxc.DynamicField event = 4;</code>
6838      */
6839     public com.openxc.BinaryMessages.DynamicField getEvent() {
6840       return event_;
6841     }
6842     /**
6843      * <code>optional .openxc.DynamicField event = 4;</code>
6844      */
6845     public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
6846       return event_;
6847     }
6848
6849     private void initFields() {
6850       type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
6851       name_ = "";
6852       value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6853       event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6854     }
6855     private byte memoizedIsInitialized = -1;
6856     public final boolean isInitialized() {
6857       byte isInitialized = memoizedIsInitialized;
6858       if (isInitialized != -1) return isInitialized == 1;
6859
6860       memoizedIsInitialized = 1;
6861       return true;
6862     }
6863
6864     public void writeTo(com.google.protobuf.CodedOutputStream output)
6865                         throws java.io.IOException {
6866       getSerializedSize();
6867       if (((bitField0_ & 0x00000001) == 0x00000001)) {
6868         output.writeEnum(1, type_.getNumber());
6869       }
6870       if (((bitField0_ & 0x00000002) == 0x00000002)) {
6871         output.writeBytes(2, getNameBytes());
6872       }
6873       if (((bitField0_ & 0x00000004) == 0x00000004)) {
6874         output.writeMessage(3, value_);
6875       }
6876       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6877         output.writeMessage(4, event_);
6878       }
6879       getUnknownFields().writeTo(output);
6880     }
6881
6882     private int memoizedSerializedSize = -1;
6883     public int getSerializedSize() {
6884       int size = memoizedSerializedSize;
6885       if (size != -1) return size;
6886
6887       size = 0;
6888       if (((bitField0_ & 0x00000001) == 0x00000001)) {
6889         size += com.google.protobuf.CodedOutputStream
6890           .computeEnumSize(1, type_.getNumber());
6891       }
6892       if (((bitField0_ & 0x00000002) == 0x00000002)) {
6893         size += com.google.protobuf.CodedOutputStream
6894           .computeBytesSize(2, getNameBytes());
6895       }
6896       if (((bitField0_ & 0x00000004) == 0x00000004)) {
6897         size += com.google.protobuf.CodedOutputStream
6898           .computeMessageSize(3, value_);
6899       }
6900       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6901         size += com.google.protobuf.CodedOutputStream
6902           .computeMessageSize(4, event_);
6903       }
6904       size += getUnknownFields().getSerializedSize();
6905       memoizedSerializedSize = size;
6906       return size;
6907     }
6908
6909     private static final long serialVersionUID = 0L;
6910     @java.lang.Override
6911     protected java.lang.Object writeReplace()
6912         throws java.io.ObjectStreamException {
6913       return super.writeReplace();
6914     }
6915
6916     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6917         com.google.protobuf.ByteString data)
6918         throws com.google.protobuf.InvalidProtocolBufferException {
6919       return PARSER.parseFrom(data);
6920     }
6921     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6922         com.google.protobuf.ByteString data,
6923         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6924         throws com.google.protobuf.InvalidProtocolBufferException {
6925       return PARSER.parseFrom(data, extensionRegistry);
6926     }
6927     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
6928         throws com.google.protobuf.InvalidProtocolBufferException {
6929       return PARSER.parseFrom(data);
6930     }
6931     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6932         byte[] data,
6933         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6934         throws com.google.protobuf.InvalidProtocolBufferException {
6935       return PARSER.parseFrom(data, extensionRegistry);
6936     }
6937     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
6938         throws java.io.IOException {
6939       return PARSER.parseFrom(input);
6940     }
6941     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6942         java.io.InputStream input,
6943         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6944         throws java.io.IOException {
6945       return PARSER.parseFrom(input, extensionRegistry);
6946     }
6947     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
6948         throws java.io.IOException {
6949       return PARSER.parseDelimitedFrom(input);
6950     }
6951     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
6952         java.io.InputStream input,
6953         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6954         throws java.io.IOException {
6955       return PARSER.parseDelimitedFrom(input, extensionRegistry);
6956     }
6957     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6958         com.google.protobuf.CodedInputStream input)
6959         throws java.io.IOException {
6960       return PARSER.parseFrom(input);
6961     }
6962     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6963         com.google.protobuf.CodedInputStream input,
6964         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6965         throws java.io.IOException {
6966       return PARSER.parseFrom(input, extensionRegistry);
6967     }
6968
6969     public static Builder newBuilder() { return Builder.create(); }
6970     public Builder newBuilderForType() { return newBuilder(); }
6971     public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
6972       return newBuilder().mergeFrom(prototype);
6973     }
6974     public Builder toBuilder() { return newBuilder(this); }
6975
6976     @java.lang.Override
6977     protected Builder newBuilderForType(
6978         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6979       Builder builder = new Builder(parent);
6980       return builder;
6981     }
6982     /**
6983      * Protobuf type {@code openxc.TranslatedMessage}
6984      */
6985     public static final class Builder extends
6986         com.google.protobuf.GeneratedMessage.Builder<Builder>
6987        implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
6988       public static final com.google.protobuf.Descriptors.Descriptor
6989           getDescriptor() {
6990         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6991       }
6992
6993       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6994           internalGetFieldAccessorTable() {
6995         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
6996             .ensureFieldAccessorsInitialized(
6997                 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
6998       }
6999
7000       // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
7001       private Builder() {
7002         maybeForceBuilderInitialization();
7003       }
7004
7005       private Builder(
7006           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
7007         super(parent);
7008         maybeForceBuilderInitialization();
7009       }
7010       private void maybeForceBuilderInitialization() {
7011         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
7012           getValueFieldBuilder();
7013           getEventFieldBuilder();
7014         }
7015       }
7016       private static Builder create() {
7017         return new Builder();
7018       }
7019
7020       public Builder clear() {
7021         super.clear();
7022         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
7023         bitField0_ = (bitField0_ & ~0x00000001);
7024         name_ = "";
7025         bitField0_ = (bitField0_ & ~0x00000002);
7026         if (valueBuilder_ == null) {
7027           value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7028         } else {
7029           valueBuilder_.clear();
7030         }
7031         bitField0_ = (bitField0_ & ~0x00000004);
7032         if (eventBuilder_ == null) {
7033           event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7034         } else {
7035           eventBuilder_.clear();
7036         }
7037         bitField0_ = (bitField0_ & ~0x00000008);
7038         return this;
7039       }
7040
7041       public Builder clone() {
7042         return create().mergeFrom(buildPartial());
7043       }
7044
7045       public com.google.protobuf.Descriptors.Descriptor
7046           getDescriptorForType() {
7047         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
7048       }
7049
7050       public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
7051         return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
7052       }
7053
7054       public com.openxc.BinaryMessages.TranslatedMessage build() {
7055         com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
7056         if (!result.isInitialized()) {
7057           throw newUninitializedMessageException(result);
7058         }
7059         return result;
7060       }
7061
7062       public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
7063         com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
7064         int from_bitField0_ = bitField0_;
7065         int to_bitField0_ = 0;
7066         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
7067           to_bitField0_ |= 0x00000001;
7068         }
7069         result.type_ = type_;
7070         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
7071           to_bitField0_ |= 0x00000002;
7072         }
7073         result.name_ = name_;
7074         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
7075           to_bitField0_ |= 0x00000004;
7076         }
7077         if (valueBuilder_ == null) {
7078           result.value_ = value_;
7079         } else {
7080           result.value_ = valueBuilder_.build();
7081         }
7082         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
7083           to_bitField0_ |= 0x00000008;
7084         }
7085         if (eventBuilder_ == null) {
7086           result.event_ = event_;
7087         } else {
7088           result.event_ = eventBuilder_.build();
7089         }
7090         result.bitField0_ = to_bitField0_;
7091         onBuilt();
7092         return result;
7093       }
7094
7095       public Builder mergeFrom(com.google.protobuf.Message other) {
7096         if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
7097           return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
7098         } else {
7099           super.mergeFrom(other);
7100           return this;
7101         }
7102       }
7103
7104       public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
7105         if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
7106         if (other.hasType()) {
7107           setType(other.getType());
7108         }
7109         if (other.hasName()) {
7110           bitField0_ |= 0x00000002;
7111           name_ = other.name_;
7112           onChanged();
7113         }
7114         if (other.hasValue()) {
7115           mergeValue(other.getValue());
7116         }
7117         if (other.hasEvent()) {
7118           mergeEvent(other.getEvent());
7119         }
7120         this.mergeUnknownFields(other.getUnknownFields());
7121         return this;
7122       }
7123
7124       public final boolean isInitialized() {
7125         return true;
7126       }
7127
7128       public Builder mergeFrom(
7129           com.google.protobuf.CodedInputStream input,
7130           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7131           throws java.io.IOException {
7132         com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
7133         try {
7134           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
7135         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7136           parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
7137           throw e;
7138         } finally {
7139           if (parsedMessage != null) {
7140             mergeFrom(parsedMessage);
7141           }
7142         }
7143         return this;
7144       }
7145       private int bitField0_;
7146
7147       // optional .openxc.TranslatedMessage.Type type = 1;
7148       private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
7149       /**
7150        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7151        */
7152       public boolean hasType() {
7153         return ((bitField0_ & 0x00000001) == 0x00000001);
7154       }
7155       /**
7156        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7157        */
7158       public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
7159         return type_;
7160       }
7161       /**
7162        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7163        */
7164       public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
7165         if (value == null) {
7166           throw new NullPointerException();
7167         }
7168         bitField0_ |= 0x00000001;
7169         type_ = value;
7170         onChanged();
7171         return this;
7172       }
7173       /**
7174        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7175        */
7176       public Builder clearType() {
7177         bitField0_ = (bitField0_ & ~0x00000001);
7178         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
7179         onChanged();
7180         return this;
7181       }
7182
7183       // optional string name = 2;
7184       private java.lang.Object name_ = "";
7185       /**
7186        * <code>optional string name = 2;</code>
7187        */
7188       public boolean hasName() {
7189         return ((bitField0_ & 0x00000002) == 0x00000002);
7190       }
7191       /**
7192        * <code>optional string name = 2;</code>
7193        */
7194       public java.lang.String getName() {
7195         java.lang.Object ref = name_;
7196         if (!(ref instanceof java.lang.String)) {
7197           java.lang.String s = ((com.google.protobuf.ByteString) ref)
7198               .toStringUtf8();
7199           name_ = s;
7200           return s;
7201         } else {
7202           return (java.lang.String) ref;
7203         }
7204       }
7205       /**
7206        * <code>optional string name = 2;</code>
7207        */
7208       public com.google.protobuf.ByteString
7209           getNameBytes() {
7210         java.lang.Object ref = name_;
7211         if (ref instanceof String) {
7212           com.google.protobuf.ByteString b = 
7213               com.google.protobuf.ByteString.copyFromUtf8(
7214                   (java.lang.String) ref);
7215           name_ = b;
7216           return b;
7217         } else {
7218           return (com.google.protobuf.ByteString) ref;
7219         }
7220       }
7221       /**
7222        * <code>optional string name = 2;</code>
7223        */
7224       public Builder setName(
7225           java.lang.String value) {
7226         if (value == null) {
7227     throw new NullPointerException();
7228   }
7229   bitField0_ |= 0x00000002;
7230         name_ = value;
7231         onChanged();
7232         return this;
7233       }
7234       /**
7235        * <code>optional string name = 2;</code>
7236        */
7237       public Builder clearName() {
7238         bitField0_ = (bitField0_ & ~0x00000002);
7239         name_ = getDefaultInstance().getName();
7240         onChanged();
7241         return this;
7242       }
7243       /**
7244        * <code>optional string name = 2;</code>
7245        */
7246       public Builder setNameBytes(
7247           com.google.protobuf.ByteString value) {
7248         if (value == null) {
7249     throw new NullPointerException();
7250   }
7251   bitField0_ |= 0x00000002;
7252         name_ = value;
7253         onChanged();
7254         return this;
7255       }
7256
7257       // optional .openxc.DynamicField value = 3;
7258       private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7259       private com.google.protobuf.SingleFieldBuilder<
7260           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_;
7261       /**
7262        * <code>optional .openxc.DynamicField value = 3;</code>
7263        */
7264       public boolean hasValue() {
7265         return ((bitField0_ & 0x00000004) == 0x00000004);
7266       }
7267       /**
7268        * <code>optional .openxc.DynamicField value = 3;</code>
7269        */
7270       public com.openxc.BinaryMessages.DynamicField getValue() {
7271         if (valueBuilder_ == null) {
7272           return value_;
7273         } else {
7274           return valueBuilder_.getMessage();
7275         }
7276       }
7277       /**
7278        * <code>optional .openxc.DynamicField value = 3;</code>
7279        */
7280       public Builder setValue(com.openxc.BinaryMessages.DynamicField value) {
7281         if (valueBuilder_ == null) {
7282           if (value == null) {
7283             throw new NullPointerException();
7284           }
7285           value_ = value;
7286           onChanged();
7287         } else {
7288           valueBuilder_.setMessage(value);
7289         }
7290         bitField0_ |= 0x00000004;
7291         return this;
7292       }
7293       /**
7294        * <code>optional .openxc.DynamicField value = 3;</code>
7295        */
7296       public Builder setValue(
7297           com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
7298         if (valueBuilder_ == null) {
7299           value_ = builderForValue.build();
7300           onChanged();
7301         } else {
7302           valueBuilder_.setMessage(builderForValue.build());
7303         }
7304         bitField0_ |= 0x00000004;
7305         return this;
7306       }
7307       /**
7308        * <code>optional .openxc.DynamicField value = 3;</code>
7309        */
7310       public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) {
7311         if (valueBuilder_ == null) {
7312           if (((bitField0_ & 0x00000004) == 0x00000004) &&
7313               value_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
7314             value_ =
7315               com.openxc.BinaryMessages.DynamicField.newBuilder(value_).mergeFrom(value).buildPartial();
7316           } else {
7317             value_ = value;
7318           }
7319           onChanged();
7320         } else {
7321           valueBuilder_.mergeFrom(value);
7322         }
7323         bitField0_ |= 0x00000004;
7324         return this;
7325       }
7326       /**
7327        * <code>optional .openxc.DynamicField value = 3;</code>
7328        */
7329       public Builder clearValue() {
7330         if (valueBuilder_ == null) {
7331           value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7332           onChanged();
7333         } else {
7334           valueBuilder_.clear();
7335         }
7336         bitField0_ = (bitField0_ & ~0x00000004);
7337         return this;
7338       }
7339       /**
7340        * <code>optional .openxc.DynamicField value = 3;</code>
7341        */
7342       public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() {
7343         bitField0_ |= 0x00000004;
7344         onChanged();
7345         return getValueFieldBuilder().getBuilder();
7346       }
7347       /**
7348        * <code>optional .openxc.DynamicField value = 3;</code>
7349        */
7350       public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
7351         if (valueBuilder_ != null) {
7352           return valueBuilder_.getMessageOrBuilder();
7353         } else {
7354           return value_;
7355         }
7356       }
7357       /**
7358        * <code>optional .openxc.DynamicField value = 3;</code>
7359        */
7360       private com.google.protobuf.SingleFieldBuilder<
7361           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> 
7362           getValueFieldBuilder() {
7363         if (valueBuilder_ == null) {
7364           valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7365               com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
7366                   value_,
7367                   getParentForChildren(),
7368                   isClean());
7369           value_ = null;
7370         }
7371         return valueBuilder_;
7372       }
7373
7374       // optional .openxc.DynamicField event = 4;
7375       private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7376       private com.google.protobuf.SingleFieldBuilder<
7377           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_;
7378       /**
7379        * <code>optional .openxc.DynamicField event = 4;</code>
7380        */
7381       public boolean hasEvent() {
7382         return ((bitField0_ & 0x00000008) == 0x00000008);
7383       }
7384       /**
7385        * <code>optional .openxc.DynamicField event = 4;</code>
7386        */
7387       public com.openxc.BinaryMessages.DynamicField getEvent() {
7388         if (eventBuilder_ == null) {
7389           return event_;
7390         } else {
7391           return eventBuilder_.getMessage();
7392         }
7393       }
7394       /**
7395        * <code>optional .openxc.DynamicField event = 4;</code>
7396        */
7397       public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) {
7398         if (eventBuilder_ == null) {
7399           if (value == null) {
7400             throw new NullPointerException();
7401           }
7402           event_ = value;
7403           onChanged();
7404         } else {
7405           eventBuilder_.setMessage(value);
7406         }
7407         bitField0_ |= 0x00000008;
7408         return this;
7409       }
7410       /**
7411        * <code>optional .openxc.DynamicField event = 4;</code>
7412        */
7413       public Builder setEvent(
7414           com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
7415         if (eventBuilder_ == null) {
7416           event_ = builderForValue.build();
7417           onChanged();
7418         } else {
7419           eventBuilder_.setMessage(builderForValue.build());
7420         }
7421         bitField0_ |= 0x00000008;
7422         return this;
7423       }
7424       /**
7425        * <code>optional .openxc.DynamicField event = 4;</code>
7426        */
7427       public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) {
7428         if (eventBuilder_ == null) {
7429           if (((bitField0_ & 0x00000008) == 0x00000008) &&
7430               event_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
7431             event_ =
7432               com.openxc.BinaryMessages.DynamicField.newBuilder(event_).mergeFrom(value).buildPartial();
7433           } else {
7434             event_ = value;
7435           }
7436           onChanged();
7437         } else {
7438           eventBuilder_.mergeFrom(value);
7439         }
7440         bitField0_ |= 0x00000008;
7441         return this;
7442       }
7443       /**
7444        * <code>optional .openxc.DynamicField event = 4;</code>
7445        */
7446       public Builder clearEvent() {
7447         if (eventBuilder_ == null) {
7448           event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7449           onChanged();
7450         } else {
7451           eventBuilder_.clear();
7452         }
7453         bitField0_ = (bitField0_ & ~0x00000008);
7454         return this;
7455       }
7456       /**
7457        * <code>optional .openxc.DynamicField event = 4;</code>
7458        */
7459       public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() {
7460         bitField0_ |= 0x00000008;
7461         onChanged();
7462         return getEventFieldBuilder().getBuilder();
7463       }
7464       /**
7465        * <code>optional .openxc.DynamicField event = 4;</code>
7466        */
7467       public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
7468         if (eventBuilder_ != null) {
7469           return eventBuilder_.getMessageOrBuilder();
7470         } else {
7471           return event_;
7472         }
7473       }
7474       /**
7475        * <code>optional .openxc.DynamicField event = 4;</code>
7476        */
7477       private com.google.protobuf.SingleFieldBuilder<
7478           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> 
7479           getEventFieldBuilder() {
7480         if (eventBuilder_ == null) {
7481           eventBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7482               com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
7483                   event_,
7484                   getParentForChildren(),
7485                   isClean());
7486           event_ = null;
7487         }
7488         return eventBuilder_;
7489       }
7490
7491       // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
7492     }
7493
7494     static {
7495       defaultInstance = new TranslatedMessage(true);
7496       defaultInstance.initFields();
7497     }
7498
7499     // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
7500   }
7501
7502   private static com.google.protobuf.Descriptors.Descriptor
7503     internal_static_openxc_VehicleMessage_descriptor;
7504   private static
7505     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7506       internal_static_openxc_VehicleMessage_fieldAccessorTable;
7507   private static com.google.protobuf.Descriptors.Descriptor
7508     internal_static_openxc_RawMessage_descriptor;
7509   private static
7510     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7511       internal_static_openxc_RawMessage_fieldAccessorTable;
7512   private static com.google.protobuf.Descriptors.Descriptor
7513     internal_static_openxc_ControlCommand_descriptor;
7514   private static
7515     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7516       internal_static_openxc_ControlCommand_fieldAccessorTable;
7517   private static com.google.protobuf.Descriptors.Descriptor
7518     internal_static_openxc_CommandResponse_descriptor;
7519   private static
7520     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7521       internal_static_openxc_CommandResponse_fieldAccessorTable;
7522   private static com.google.protobuf.Descriptors.Descriptor
7523     internal_static_openxc_DiagnosticRequest_descriptor;
7524   private static
7525     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7526       internal_static_openxc_DiagnosticRequest_fieldAccessorTable;
7527   private static com.google.protobuf.Descriptors.Descriptor
7528     internal_static_openxc_DiagnosticResponse_descriptor;
7529   private static
7530     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7531       internal_static_openxc_DiagnosticResponse_fieldAccessorTable;
7532   private static com.google.protobuf.Descriptors.Descriptor
7533     internal_static_openxc_DynamicField_descriptor;
7534   private static
7535     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7536       internal_static_openxc_DynamicField_fieldAccessorTable;
7537   private static com.google.protobuf.Descriptors.Descriptor
7538     internal_static_openxc_TranslatedMessage_descriptor;
7539   private static
7540     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7541       internal_static_openxc_TranslatedMessage_fieldAccessorTable;
7542
7543   public static com.google.protobuf.Descriptors.FileDescriptor
7544       getDescriptor() {
7545     return descriptor;
7546   }
7547   private static com.google.protobuf.Descriptors.FileDescriptor
7548       descriptor;
7549   static {
7550     java.lang.String[] descriptorData = {
7551       "\n\014openxc.proto\022\006openxc\"\224\003\n\016VehicleMessag" +
7552       "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
7553       "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
7554       "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
7555       "xc.TranslatedMessage\0227\n\023diagnostic_respo" +
7556       "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\022/\n" +
7557       "\017control_command\030\005 \001(\0132\026.openxc.ControlC" +
7558       "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" +
7559       "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" +
7560       "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO",
7561       "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" +
7562       "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" +
7563       "data\030\003 \001(\014\"\246\001\n\016ControlCommand\022)\n\004type\030\001 " +
7564       "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" +
7565       "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" +
7566       "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" +
7567       "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" +
7568       "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" +
7569       "e\022\017\n\007message\030\002 \001(\t\"\324\001\n\021DiagnosticRequest" +
7570       "\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mod",
7571       "e\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030\005 \001(\014\022\025\n" +
7572       "\rparse_payload\030\006 \001(\010\022\032\n\022multiple_respons" +
7573       "es\030\007 \001(\010\022\016\n\006factor\030\010 \001(\001\022\016\n\006offset\030\t \001(\001" +
7574       "\022\021\n\tfrequency\030\n \001(\001\022\014\n\004name\030\013 \001(\t\"\241\001\n\022Di" +
7575       "agnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage" +
7576       "_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007" +
7577       "success\030\005 \001(\010\022\036\n\026negative_response_code\030" +
7578       "\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001" +
7579       "\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dy" +
7580       "namicField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n",
7581       "\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_value\030\004 " +
7582       "\001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL" +
7583       "\020\003\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162\036" +
7584       ".openxc.TranslatedMessage.Type\022\014\n\004name\030\002" +
7585       " \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicFiel" +
7586       "d\022#\n\005event\030\004 \001(\0132\024.openxc.DynamicField\"\\" +
7587       "\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n" +
7588       "\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EV" +
7589       "ENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessag" +
7590       "es"
7591     };
7592     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
7593       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
7594         public com.google.protobuf.ExtensionRegistry assignDescriptors(
7595             com.google.protobuf.Descriptors.FileDescriptor root) {
7596           descriptor = root;
7597           internal_static_openxc_VehicleMessage_descriptor =
7598             getDescriptor().getMessageTypes().get(0);
7599           internal_static_openxc_VehicleMessage_fieldAccessorTable = new
7600             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7601               internal_static_openxc_VehicleMessage_descriptor,
7602               new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", });
7603           internal_static_openxc_RawMessage_descriptor =
7604             getDescriptor().getMessageTypes().get(1);
7605           internal_static_openxc_RawMessage_fieldAccessorTable = new
7606             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7607               internal_static_openxc_RawMessage_descriptor,
7608               new java.lang.String[] { "Bus", "MessageId", "Data", });
7609           internal_static_openxc_ControlCommand_descriptor =
7610             getDescriptor().getMessageTypes().get(2);
7611           internal_static_openxc_ControlCommand_fieldAccessorTable = new
7612             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7613               internal_static_openxc_ControlCommand_descriptor,
7614               new java.lang.String[] { "Type", "DiagnosticRequest", });
7615           internal_static_openxc_CommandResponse_descriptor =
7616             getDescriptor().getMessageTypes().get(3);
7617           internal_static_openxc_CommandResponse_fieldAccessorTable = new
7618             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7619               internal_static_openxc_CommandResponse_descriptor,
7620               new java.lang.String[] { "Type", "Message", });
7621           internal_static_openxc_DiagnosticRequest_descriptor =
7622             getDescriptor().getMessageTypes().get(4);
7623           internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new
7624             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7625               internal_static_openxc_DiagnosticRequest_descriptor,
7626               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "ParsePayload", "MultipleResponses", "Factor", "Offset", "Frequency", "Name", });
7627           internal_static_openxc_DiagnosticResponse_descriptor =
7628             getDescriptor().getMessageTypes().get(5);
7629           internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new
7630             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7631               internal_static_openxc_DiagnosticResponse_descriptor,
7632               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", });
7633           internal_static_openxc_DynamicField_descriptor =
7634             getDescriptor().getMessageTypes().get(6);
7635           internal_static_openxc_DynamicField_fieldAccessorTable = new
7636             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7637               internal_static_openxc_DynamicField_descriptor,
7638               new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", });
7639           internal_static_openxc_TranslatedMessage_descriptor =
7640             getDescriptor().getMessageTypes().get(7);
7641           internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
7642             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7643               internal_static_openxc_TranslatedMessage_descriptor,
7644               new java.lang.String[] { "Type", "Name", "Value", "Event", });
7645           return null;
7646         }
7647       };
7648     com.google.protobuf.Descriptors.FileDescriptor
7649       .internalBuildGeneratedFileFrom(descriptorData,
7650         new com.google.protobuf.Descriptors.FileDescriptor[] {
7651         }, assigner);
7652   }
7653
7654   // @@protoc_insertion_point(outer_class_scope)
7655 }