Add CommandResponse type to VehicleMessage (from VI to host).
[apps/low-level-can-service.git] / gen / java / com / openxc / BinaryMessages.java
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: openxc.proto
3
4 package com.openxc;
5
6 public final class BinaryMessages {
7   private BinaryMessages() {}
8   public static void registerAllExtensions(
9       com.google.protobuf.ExtensionRegistry registry) {
10   }
11   public interface VehicleMessageOrBuilder
12       extends com.google.protobuf.MessageOrBuilder {
13
14     // optional .openxc.VehicleMessage.Type type = 1;
15     /**
16      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
17      */
18     boolean hasType();
19     /**
20      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
21      */
22     com.openxc.BinaryMessages.VehicleMessage.Type getType();
23
24     // optional .openxc.RawMessage raw_message = 2;
25     /**
26      * <code>optional .openxc.RawMessage raw_message = 2;</code>
27      */
28     boolean hasRawMessage();
29     /**
30      * <code>optional .openxc.RawMessage raw_message = 2;</code>
31      */
32     com.openxc.BinaryMessages.RawMessage getRawMessage();
33     /**
34      * <code>optional .openxc.RawMessage raw_message = 2;</code>
35      */
36     com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder();
37
38     // optional .openxc.TranslatedMessage translated_message = 3;
39     /**
40      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
41      */
42     boolean hasTranslatedMessage();
43     /**
44      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
45      */
46     com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage();
47     /**
48      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
49      */
50     com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder();
51
52     // optional .openxc.DiagnosticResponse diagnostic_response = 4;
53     /**
54      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
55      */
56     boolean hasDiagnosticResponse();
57     /**
58      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
59      */
60     com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse();
61     /**
62      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
63      */
64     com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder();
65
66     // optional .openxc.ControlCommand control_command = 5;
67     /**
68      * <code>optional .openxc.ControlCommand control_command = 5;</code>
69      */
70     boolean hasControlCommand();
71     /**
72      * <code>optional .openxc.ControlCommand control_command = 5;</code>
73      */
74     com.openxc.BinaryMessages.ControlCommand getControlCommand();
75     /**
76      * <code>optional .openxc.ControlCommand control_command = 5;</code>
77      */
78     com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder();
79
80     // optional .openxc.CommandResponse command_response = 6;
81     /**
82      * <code>optional .openxc.CommandResponse command_response = 6;</code>
83      */
84     boolean hasCommandResponse();
85     /**
86      * <code>optional .openxc.CommandResponse command_response = 6;</code>
87      */
88     com.openxc.BinaryMessages.CommandResponse getCommandResponse();
89     /**
90      * <code>optional .openxc.CommandResponse command_response = 6;</code>
91      */
92     com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder();
93   }
94   /**
95    * Protobuf type {@code openxc.VehicleMessage}
96    */
97   public static final class VehicleMessage extends
98       com.google.protobuf.GeneratedMessage
99       implements VehicleMessageOrBuilder {
100     // Use VehicleMessage.newBuilder() to construct.
101     private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
102       super(builder);
103       this.unknownFields = builder.getUnknownFields();
104     }
105     private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
106
107     private static final VehicleMessage defaultInstance;
108     public static VehicleMessage getDefaultInstance() {
109       return defaultInstance;
110     }
111
112     public VehicleMessage getDefaultInstanceForType() {
113       return defaultInstance;
114     }
115
116     private final com.google.protobuf.UnknownFieldSet unknownFields;
117     @java.lang.Override
118     public final com.google.protobuf.UnknownFieldSet
119         getUnknownFields() {
120       return this.unknownFields;
121     }
122     private VehicleMessage(
123         com.google.protobuf.CodedInputStream input,
124         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
125         throws com.google.protobuf.InvalidProtocolBufferException {
126       initFields();
127       int mutable_bitField0_ = 0;
128       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
129           com.google.protobuf.UnknownFieldSet.newBuilder();
130       try {
131         boolean done = false;
132         while (!done) {
133           int tag = input.readTag();
134           switch (tag) {
135             case 0:
136               done = true;
137               break;
138             default: {
139               if (!parseUnknownField(input, unknownFields,
140                                      extensionRegistry, tag)) {
141                 done = true;
142               }
143               break;
144             }
145             case 8: {
146               int rawValue = input.readEnum();
147               com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue);
148               if (value == null) {
149                 unknownFields.mergeVarintField(1, rawValue);
150               } else {
151                 bitField0_ |= 0x00000001;
152                 type_ = value;
153               }
154               break;
155             }
156             case 18: {
157               com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null;
158               if (((bitField0_ & 0x00000002) == 0x00000002)) {
159                 subBuilder = rawMessage_.toBuilder();
160               }
161               rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry);
162               if (subBuilder != null) {
163                 subBuilder.mergeFrom(rawMessage_);
164                 rawMessage_ = subBuilder.buildPartial();
165               }
166               bitField0_ |= 0x00000002;
167               break;
168             }
169             case 26: {
170               com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null;
171               if (((bitField0_ & 0x00000004) == 0x00000004)) {
172                 subBuilder = translatedMessage_.toBuilder();
173               }
174               translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry);
175               if (subBuilder != null) {
176                 subBuilder.mergeFrom(translatedMessage_);
177                 translatedMessage_ = subBuilder.buildPartial();
178               }
179               bitField0_ |= 0x00000004;
180               break;
181             }
182             case 34: {
183               com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null;
184               if (((bitField0_ & 0x00000008) == 0x00000008)) {
185                 subBuilder = diagnosticResponse_.toBuilder();
186               }
187               diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry);
188               if (subBuilder != null) {
189                 subBuilder.mergeFrom(diagnosticResponse_);
190                 diagnosticResponse_ = subBuilder.buildPartial();
191               }
192               bitField0_ |= 0x00000008;
193               break;
194             }
195             case 42: {
196               com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = null;
197               if (((bitField0_ & 0x00000010) == 0x00000010)) {
198                 subBuilder = controlCommand_.toBuilder();
199               }
200               controlCommand_ = input.readMessage(com.openxc.BinaryMessages.ControlCommand.PARSER, extensionRegistry);
201               if (subBuilder != null) {
202                 subBuilder.mergeFrom(controlCommand_);
203                 controlCommand_ = subBuilder.buildPartial();
204               }
205               bitField0_ |= 0x00000010;
206               break;
207             }
208             case 50: {
209               com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = null;
210               if (((bitField0_ & 0x00000020) == 0x00000020)) {
211                 subBuilder = commandResponse_.toBuilder();
212               }
213               commandResponse_ = input.readMessage(com.openxc.BinaryMessages.CommandResponse.PARSER, extensionRegistry);
214               if (subBuilder != null) {
215                 subBuilder.mergeFrom(commandResponse_);
216                 commandResponse_ = subBuilder.buildPartial();
217               }
218               bitField0_ |= 0x00000020;
219               break;
220             }
221           }
222         }
223       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
224         throw e.setUnfinishedMessage(this);
225       } catch (java.io.IOException e) {
226         throw new com.google.protobuf.InvalidProtocolBufferException(
227             e.getMessage()).setUnfinishedMessage(this);
228       } finally {
229         this.unknownFields = unknownFields.build();
230         makeExtensionsImmutable();
231       }
232     }
233     public static final com.google.protobuf.Descriptors.Descriptor
234         getDescriptor() {
235       return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
236     }
237
238     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
239         internalGetFieldAccessorTable() {
240       return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
241           .ensureFieldAccessorsInitialized(
242               com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
243     }
244
245     public static com.google.protobuf.Parser<VehicleMessage> PARSER =
246         new com.google.protobuf.AbstractParser<VehicleMessage>() {
247       public VehicleMessage parsePartialFrom(
248           com.google.protobuf.CodedInputStream input,
249           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250           throws com.google.protobuf.InvalidProtocolBufferException {
251         return new VehicleMessage(input, extensionRegistry);
252       }
253     };
254
255     @java.lang.Override
256     public com.google.protobuf.Parser<VehicleMessage> getParserForType() {
257       return PARSER;
258     }
259
260     /**
261      * Protobuf enum {@code openxc.VehicleMessage.Type}
262      */
263     public enum Type
264         implements com.google.protobuf.ProtocolMessageEnum {
265       /**
266        * <code>RAW = 1;</code>
267        */
268       RAW(0, 1),
269       /**
270        * <code>TRANSLATED = 2;</code>
271        */
272       TRANSLATED(1, 2),
273       /**
274        * <code>DIAGNOSTIC = 3;</code>
275        */
276       DIAGNOSTIC(2, 3),
277       /**
278        * <code>CONTROL_COMMAND = 4;</code>
279        */
280       CONTROL_COMMAND(3, 4),
281       /**
282        * <code>COMMAND_RESPONSE = 5;</code>
283        */
284       COMMAND_RESPONSE(4, 5),
285       ;
286
287       /**
288        * <code>RAW = 1;</code>
289        */
290       public static final int RAW_VALUE = 1;
291       /**
292        * <code>TRANSLATED = 2;</code>
293        */
294       public static final int TRANSLATED_VALUE = 2;
295       /**
296        * <code>DIAGNOSTIC = 3;</code>
297        */
298       public static final int DIAGNOSTIC_VALUE = 3;
299       /**
300        * <code>CONTROL_COMMAND = 4;</code>
301        */
302       public static final int CONTROL_COMMAND_VALUE = 4;
303       /**
304        * <code>COMMAND_RESPONSE = 5;</code>
305        */
306       public static final int COMMAND_RESPONSE_VALUE = 5;
307
308
309       public final int getNumber() { return value; }
310
311       public static Type valueOf(int value) {
312         switch (value) {
313           case 1: return RAW;
314           case 2: return TRANSLATED;
315           case 3: return DIAGNOSTIC;
316           case 4: return CONTROL_COMMAND;
317           case 5: return COMMAND_RESPONSE;
318           default: return null;
319         }
320       }
321
322       public static com.google.protobuf.Internal.EnumLiteMap<Type>
323           internalGetValueMap() {
324         return internalValueMap;
325       }
326       private static com.google.protobuf.Internal.EnumLiteMap<Type>
327           internalValueMap =
328             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
329               public Type findValueByNumber(int number) {
330                 return Type.valueOf(number);
331               }
332             };
333
334       public final com.google.protobuf.Descriptors.EnumValueDescriptor
335           getValueDescriptor() {
336         return getDescriptor().getValues().get(index);
337       }
338       public final com.google.protobuf.Descriptors.EnumDescriptor
339           getDescriptorForType() {
340         return getDescriptor();
341       }
342       public static final com.google.protobuf.Descriptors.EnumDescriptor
343           getDescriptor() {
344         return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0);
345       }
346
347       private static final Type[] VALUES = values();
348
349       public static Type valueOf(
350           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
351         if (desc.getType() != getDescriptor()) {
352           throw new java.lang.IllegalArgumentException(
353             "EnumValueDescriptor is not for this type.");
354         }
355         return VALUES[desc.getIndex()];
356       }
357
358       private final int index;
359       private final int value;
360
361       private Type(int index, int value) {
362         this.index = index;
363         this.value = value;
364       }
365
366       // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type)
367     }
368
369     private int bitField0_;
370     // optional .openxc.VehicleMessage.Type type = 1;
371     public static final int TYPE_FIELD_NUMBER = 1;
372     private com.openxc.BinaryMessages.VehicleMessage.Type type_;
373     /**
374      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
375      */
376     public boolean hasType() {
377       return ((bitField0_ & 0x00000001) == 0x00000001);
378     }
379     /**
380      * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
381      */
382     public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
383       return type_;
384     }
385
386     // optional .openxc.RawMessage raw_message = 2;
387     public static final int RAW_MESSAGE_FIELD_NUMBER = 2;
388     private com.openxc.BinaryMessages.RawMessage rawMessage_;
389     /**
390      * <code>optional .openxc.RawMessage raw_message = 2;</code>
391      */
392     public boolean hasRawMessage() {
393       return ((bitField0_ & 0x00000002) == 0x00000002);
394     }
395     /**
396      * <code>optional .openxc.RawMessage raw_message = 2;</code>
397      */
398     public com.openxc.BinaryMessages.RawMessage getRawMessage() {
399       return rawMessage_;
400     }
401     /**
402      * <code>optional .openxc.RawMessage raw_message = 2;</code>
403      */
404     public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
405       return rawMessage_;
406     }
407
408     // optional .openxc.TranslatedMessage translated_message = 3;
409     public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3;
410     private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_;
411     /**
412      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
413      */
414     public boolean hasTranslatedMessage() {
415       return ((bitField0_ & 0x00000004) == 0x00000004);
416     }
417     /**
418      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
419      */
420     public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
421       return translatedMessage_;
422     }
423     /**
424      * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
425      */
426     public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
427       return translatedMessage_;
428     }
429
430     // optional .openxc.DiagnosticResponse diagnostic_response = 4;
431     public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4;
432     private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_;
433     /**
434      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
435      */
436     public boolean hasDiagnosticResponse() {
437       return ((bitField0_ & 0x00000008) == 0x00000008);
438     }
439     /**
440      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
441      */
442     public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
443       return diagnosticResponse_;
444     }
445     /**
446      * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
447      */
448     public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
449       return diagnosticResponse_;
450     }
451
452     // optional .openxc.ControlCommand control_command = 5;
453     public static final int CONTROL_COMMAND_FIELD_NUMBER = 5;
454     private com.openxc.BinaryMessages.ControlCommand controlCommand_;
455     /**
456      * <code>optional .openxc.ControlCommand control_command = 5;</code>
457      */
458     public boolean hasControlCommand() {
459       return ((bitField0_ & 0x00000010) == 0x00000010);
460     }
461     /**
462      * <code>optional .openxc.ControlCommand control_command = 5;</code>
463      */
464     public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
465       return controlCommand_;
466     }
467     /**
468      * <code>optional .openxc.ControlCommand control_command = 5;</code>
469      */
470     public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
471       return controlCommand_;
472     }
473
474     // optional .openxc.CommandResponse command_response = 6;
475     public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6;
476     private com.openxc.BinaryMessages.CommandResponse commandResponse_;
477     /**
478      * <code>optional .openxc.CommandResponse command_response = 6;</code>
479      */
480     public boolean hasCommandResponse() {
481       return ((bitField0_ & 0x00000020) == 0x00000020);
482     }
483     /**
484      * <code>optional .openxc.CommandResponse command_response = 6;</code>
485      */
486     public com.openxc.BinaryMessages.CommandResponse getCommandResponse() {
487       return commandResponse_;
488     }
489     /**
490      * <code>optional .openxc.CommandResponse command_response = 6;</code>
491      */
492     public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() {
493       return commandResponse_;
494     }
495
496     private void initFields() {
497       type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
498       rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
499       translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
500       diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
501       controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
502       commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
503     }
504     private byte memoizedIsInitialized = -1;
505     public final boolean isInitialized() {
506       byte isInitialized = memoizedIsInitialized;
507       if (isInitialized != -1) return isInitialized == 1;
508
509       memoizedIsInitialized = 1;
510       return true;
511     }
512
513     public void writeTo(com.google.protobuf.CodedOutputStream output)
514                         throws java.io.IOException {
515       getSerializedSize();
516       if (((bitField0_ & 0x00000001) == 0x00000001)) {
517         output.writeEnum(1, type_.getNumber());
518       }
519       if (((bitField0_ & 0x00000002) == 0x00000002)) {
520         output.writeMessage(2, rawMessage_);
521       }
522       if (((bitField0_ & 0x00000004) == 0x00000004)) {
523         output.writeMessage(3, translatedMessage_);
524       }
525       if (((bitField0_ & 0x00000008) == 0x00000008)) {
526         output.writeMessage(4, diagnosticResponse_);
527       }
528       if (((bitField0_ & 0x00000010) == 0x00000010)) {
529         output.writeMessage(5, controlCommand_);
530       }
531       if (((bitField0_ & 0x00000020) == 0x00000020)) {
532         output.writeMessage(6, commandResponse_);
533       }
534       getUnknownFields().writeTo(output);
535     }
536
537     private int memoizedSerializedSize = -1;
538     public int getSerializedSize() {
539       int size = memoizedSerializedSize;
540       if (size != -1) return size;
541
542       size = 0;
543       if (((bitField0_ & 0x00000001) == 0x00000001)) {
544         size += com.google.protobuf.CodedOutputStream
545           .computeEnumSize(1, type_.getNumber());
546       }
547       if (((bitField0_ & 0x00000002) == 0x00000002)) {
548         size += com.google.protobuf.CodedOutputStream
549           .computeMessageSize(2, rawMessage_);
550       }
551       if (((bitField0_ & 0x00000004) == 0x00000004)) {
552         size += com.google.protobuf.CodedOutputStream
553           .computeMessageSize(3, translatedMessage_);
554       }
555       if (((bitField0_ & 0x00000008) == 0x00000008)) {
556         size += com.google.protobuf.CodedOutputStream
557           .computeMessageSize(4, diagnosticResponse_);
558       }
559       if (((bitField0_ & 0x00000010) == 0x00000010)) {
560         size += com.google.protobuf.CodedOutputStream
561           .computeMessageSize(5, controlCommand_);
562       }
563       if (((bitField0_ & 0x00000020) == 0x00000020)) {
564         size += com.google.protobuf.CodedOutputStream
565           .computeMessageSize(6, commandResponse_);
566       }
567       size += getUnknownFields().getSerializedSize();
568       memoizedSerializedSize = size;
569       return size;
570     }
571
572     private static final long serialVersionUID = 0L;
573     @java.lang.Override
574     protected java.lang.Object writeReplace()
575         throws java.io.ObjectStreamException {
576       return super.writeReplace();
577     }
578
579     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
580         com.google.protobuf.ByteString data)
581         throws com.google.protobuf.InvalidProtocolBufferException {
582       return PARSER.parseFrom(data);
583     }
584     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
585         com.google.protobuf.ByteString data,
586         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
587         throws com.google.protobuf.InvalidProtocolBufferException {
588       return PARSER.parseFrom(data, extensionRegistry);
589     }
590     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data)
591         throws com.google.protobuf.InvalidProtocolBufferException {
592       return PARSER.parseFrom(data);
593     }
594     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
595         byte[] data,
596         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
597         throws com.google.protobuf.InvalidProtocolBufferException {
598       return PARSER.parseFrom(data, extensionRegistry);
599     }
600     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input)
601         throws java.io.IOException {
602       return PARSER.parseFrom(input);
603     }
604     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
605         java.io.InputStream input,
606         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
607         throws java.io.IOException {
608       return PARSER.parseFrom(input, extensionRegistry);
609     }
610     public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input)
611         throws java.io.IOException {
612       return PARSER.parseDelimitedFrom(input);
613     }
614     public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(
615         java.io.InputStream input,
616         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
617         throws java.io.IOException {
618       return PARSER.parseDelimitedFrom(input, extensionRegistry);
619     }
620     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
621         com.google.protobuf.CodedInputStream input)
622         throws java.io.IOException {
623       return PARSER.parseFrom(input);
624     }
625     public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
626         com.google.protobuf.CodedInputStream input,
627         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
628         throws java.io.IOException {
629       return PARSER.parseFrom(input, extensionRegistry);
630     }
631
632     public static Builder newBuilder() { return Builder.create(); }
633     public Builder newBuilderForType() { return newBuilder(); }
634     public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) {
635       return newBuilder().mergeFrom(prototype);
636     }
637     public Builder toBuilder() { return newBuilder(this); }
638
639     @java.lang.Override
640     protected Builder newBuilderForType(
641         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
642       Builder builder = new Builder(parent);
643       return builder;
644     }
645     /**
646      * Protobuf type {@code openxc.VehicleMessage}
647      */
648     public static final class Builder extends
649         com.google.protobuf.GeneratedMessage.Builder<Builder>
650        implements com.openxc.BinaryMessages.VehicleMessageOrBuilder {
651       public static final com.google.protobuf.Descriptors.Descriptor
652           getDescriptor() {
653         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
654       }
655
656       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
657           internalGetFieldAccessorTable() {
658         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
659             .ensureFieldAccessorsInitialized(
660                 com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
661       }
662
663       // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder()
664       private Builder() {
665         maybeForceBuilderInitialization();
666       }
667
668       private Builder(
669           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
670         super(parent);
671         maybeForceBuilderInitialization();
672       }
673       private void maybeForceBuilderInitialization() {
674         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
675           getRawMessageFieldBuilder();
676           getTranslatedMessageFieldBuilder();
677           getDiagnosticResponseFieldBuilder();
678           getControlCommandFieldBuilder();
679           getCommandResponseFieldBuilder();
680         }
681       }
682       private static Builder create() {
683         return new Builder();
684       }
685
686       public Builder clear() {
687         super.clear();
688         type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
689         bitField0_ = (bitField0_ & ~0x00000001);
690         if (rawMessageBuilder_ == null) {
691           rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
692         } else {
693           rawMessageBuilder_.clear();
694         }
695         bitField0_ = (bitField0_ & ~0x00000002);
696         if (translatedMessageBuilder_ == null) {
697           translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
698         } else {
699           translatedMessageBuilder_.clear();
700         }
701         bitField0_ = (bitField0_ & ~0x00000004);
702         if (diagnosticResponseBuilder_ == null) {
703           diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
704         } else {
705           diagnosticResponseBuilder_.clear();
706         }
707         bitField0_ = (bitField0_ & ~0x00000008);
708         if (controlCommandBuilder_ == null) {
709           controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
710         } else {
711           controlCommandBuilder_.clear();
712         }
713         bitField0_ = (bitField0_ & ~0x00000010);
714         if (commandResponseBuilder_ == null) {
715           commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
716         } else {
717           commandResponseBuilder_.clear();
718         }
719         bitField0_ = (bitField0_ & ~0x00000020);
720         return this;
721       }
722
723       public Builder clone() {
724         return create().mergeFrom(buildPartial());
725       }
726
727       public com.google.protobuf.Descriptors.Descriptor
728           getDescriptorForType() {
729         return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
730       }
731
732       public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() {
733         return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance();
734       }
735
736       public com.openxc.BinaryMessages.VehicleMessage build() {
737         com.openxc.BinaryMessages.VehicleMessage result = buildPartial();
738         if (!result.isInitialized()) {
739           throw newUninitializedMessageException(result);
740         }
741         return result;
742       }
743
744       public com.openxc.BinaryMessages.VehicleMessage buildPartial() {
745         com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this);
746         int from_bitField0_ = bitField0_;
747         int to_bitField0_ = 0;
748         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
749           to_bitField0_ |= 0x00000001;
750         }
751         result.type_ = type_;
752         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
753           to_bitField0_ |= 0x00000002;
754         }
755         if (rawMessageBuilder_ == null) {
756           result.rawMessage_ = rawMessage_;
757         } else {
758           result.rawMessage_ = rawMessageBuilder_.build();
759         }
760         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
761           to_bitField0_ |= 0x00000004;
762         }
763         if (translatedMessageBuilder_ == null) {
764           result.translatedMessage_ = translatedMessage_;
765         } else {
766           result.translatedMessage_ = translatedMessageBuilder_.build();
767         }
768         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
769           to_bitField0_ |= 0x00000008;
770         }
771         if (diagnosticResponseBuilder_ == null) {
772           result.diagnosticResponse_ = diagnosticResponse_;
773         } else {
774           result.diagnosticResponse_ = diagnosticResponseBuilder_.build();
775         }
776         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
777           to_bitField0_ |= 0x00000010;
778         }
779         if (controlCommandBuilder_ == null) {
780           result.controlCommand_ = controlCommand_;
781         } else {
782           result.controlCommand_ = controlCommandBuilder_.build();
783         }
784         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
785           to_bitField0_ |= 0x00000020;
786         }
787         if (commandResponseBuilder_ == null) {
788           result.commandResponse_ = commandResponse_;
789         } else {
790           result.commandResponse_ = commandResponseBuilder_.build();
791         }
792         result.bitField0_ = to_bitField0_;
793         onBuilt();
794         return result;
795       }
796
797       public Builder mergeFrom(com.google.protobuf.Message other) {
798         if (other instanceof com.openxc.BinaryMessages.VehicleMessage) {
799           return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other);
800         } else {
801           super.mergeFrom(other);
802           return this;
803         }
804       }
805
806       public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) {
807         if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this;
808         if (other.hasType()) {
809           setType(other.getType());
810         }
811         if (other.hasRawMessage()) {
812           mergeRawMessage(other.getRawMessage());
813         }
814         if (other.hasTranslatedMessage()) {
815           mergeTranslatedMessage(other.getTranslatedMessage());
816         }
817         if (other.hasDiagnosticResponse()) {
818           mergeDiagnosticResponse(other.getDiagnosticResponse());
819         }
820         if (other.hasControlCommand()) {
821           mergeControlCommand(other.getControlCommand());
822         }
823         if (other.hasCommandResponse()) {
824           mergeCommandResponse(other.getCommandResponse());
825         }
826         this.mergeUnknownFields(other.getUnknownFields());
827         return this;
828       }
829
830       public final boolean isInitialized() {
831         return true;
832       }
833
834       public Builder mergeFrom(
835           com.google.protobuf.CodedInputStream input,
836           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
837           throws java.io.IOException {
838         com.openxc.BinaryMessages.VehicleMessage parsedMessage = null;
839         try {
840           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
841         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
842           parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage();
843           throw e;
844         } finally {
845           if (parsedMessage != null) {
846             mergeFrom(parsedMessage);
847           }
848         }
849         return this;
850       }
851       private int bitField0_;
852
853       // optional .openxc.VehicleMessage.Type type = 1;
854       private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
855       /**
856        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
857        */
858       public boolean hasType() {
859         return ((bitField0_ & 0x00000001) == 0x00000001);
860       }
861       /**
862        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
863        */
864       public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
865         return type_;
866       }
867       /**
868        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
869        */
870       public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) {
871         if (value == null) {
872           throw new NullPointerException();
873         }
874         bitField0_ |= 0x00000001;
875         type_ = value;
876         onChanged();
877         return this;
878       }
879       /**
880        * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
881        */
882       public Builder clearType() {
883         bitField0_ = (bitField0_ & ~0x00000001);
884         type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
885         onChanged();
886         return this;
887       }
888
889       // optional .openxc.RawMessage raw_message = 2;
890       private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
891       private com.google.protobuf.SingleFieldBuilder<
892           com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_;
893       /**
894        * <code>optional .openxc.RawMessage raw_message = 2;</code>
895        */
896       public boolean hasRawMessage() {
897         return ((bitField0_ & 0x00000002) == 0x00000002);
898       }
899       /**
900        * <code>optional .openxc.RawMessage raw_message = 2;</code>
901        */
902       public com.openxc.BinaryMessages.RawMessage getRawMessage() {
903         if (rawMessageBuilder_ == null) {
904           return rawMessage_;
905         } else {
906           return rawMessageBuilder_.getMessage();
907         }
908       }
909       /**
910        * <code>optional .openxc.RawMessage raw_message = 2;</code>
911        */
912       public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) {
913         if (rawMessageBuilder_ == null) {
914           if (value == null) {
915             throw new NullPointerException();
916           }
917           rawMessage_ = value;
918           onChanged();
919         } else {
920           rawMessageBuilder_.setMessage(value);
921         }
922         bitField0_ |= 0x00000002;
923         return this;
924       }
925       /**
926        * <code>optional .openxc.RawMessage raw_message = 2;</code>
927        */
928       public Builder setRawMessage(
929           com.openxc.BinaryMessages.RawMessage.Builder builderForValue) {
930         if (rawMessageBuilder_ == null) {
931           rawMessage_ = builderForValue.build();
932           onChanged();
933         } else {
934           rawMessageBuilder_.setMessage(builderForValue.build());
935         }
936         bitField0_ |= 0x00000002;
937         return this;
938       }
939       /**
940        * <code>optional .openxc.RawMessage raw_message = 2;</code>
941        */
942       public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) {
943         if (rawMessageBuilder_ == null) {
944           if (((bitField0_ & 0x00000002) == 0x00000002) &&
945               rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) {
946             rawMessage_ =
947               com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial();
948           } else {
949             rawMessage_ = value;
950           }
951           onChanged();
952         } else {
953           rawMessageBuilder_.mergeFrom(value);
954         }
955         bitField0_ |= 0x00000002;
956         return this;
957       }
958       /**
959        * <code>optional .openxc.RawMessage raw_message = 2;</code>
960        */
961       public Builder clearRawMessage() {
962         if (rawMessageBuilder_ == null) {
963           rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
964           onChanged();
965         } else {
966           rawMessageBuilder_.clear();
967         }
968         bitField0_ = (bitField0_ & ~0x00000002);
969         return this;
970       }
971       /**
972        * <code>optional .openxc.RawMessage raw_message = 2;</code>
973        */
974       public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() {
975         bitField0_ |= 0x00000002;
976         onChanged();
977         return getRawMessageFieldBuilder().getBuilder();
978       }
979       /**
980        * <code>optional .openxc.RawMessage raw_message = 2;</code>
981        */
982       public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
983         if (rawMessageBuilder_ != null) {
984           return rawMessageBuilder_.getMessageOrBuilder();
985         } else {
986           return rawMessage_;
987         }
988       }
989       /**
990        * <code>optional .openxc.RawMessage raw_message = 2;</code>
991        */
992       private com.google.protobuf.SingleFieldBuilder<
993           com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> 
994           getRawMessageFieldBuilder() {
995         if (rawMessageBuilder_ == null) {
996           rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
997               com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>(
998                   rawMessage_,
999                   getParentForChildren(),
1000                   isClean());
1001           rawMessage_ = null;
1002         }
1003         return rawMessageBuilder_;
1004       }
1005
1006       // optional .openxc.TranslatedMessage translated_message = 3;
1007       private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
1008       private com.google.protobuf.SingleFieldBuilder<
1009           com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_;
1010       /**
1011        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1012        */
1013       public boolean hasTranslatedMessage() {
1014         return ((bitField0_ & 0x00000004) == 0x00000004);
1015       }
1016       /**
1017        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1018        */
1019       public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
1020         if (translatedMessageBuilder_ == null) {
1021           return translatedMessage_;
1022         } else {
1023           return translatedMessageBuilder_.getMessage();
1024         }
1025       }
1026       /**
1027        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1028        */
1029       public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
1030         if (translatedMessageBuilder_ == null) {
1031           if (value == null) {
1032             throw new NullPointerException();
1033           }
1034           translatedMessage_ = value;
1035           onChanged();
1036         } else {
1037           translatedMessageBuilder_.setMessage(value);
1038         }
1039         bitField0_ |= 0x00000004;
1040         return this;
1041       }
1042       /**
1043        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1044        */
1045       public Builder setTranslatedMessage(
1046           com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) {
1047         if (translatedMessageBuilder_ == null) {
1048           translatedMessage_ = builderForValue.build();
1049           onChanged();
1050         } else {
1051           translatedMessageBuilder_.setMessage(builderForValue.build());
1052         }
1053         bitField0_ |= 0x00000004;
1054         return this;
1055       }
1056       /**
1057        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1058        */
1059       public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
1060         if (translatedMessageBuilder_ == null) {
1061           if (((bitField0_ & 0x00000004) == 0x00000004) &&
1062               translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) {
1063             translatedMessage_ =
1064               com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial();
1065           } else {
1066             translatedMessage_ = value;
1067           }
1068           onChanged();
1069         } else {
1070           translatedMessageBuilder_.mergeFrom(value);
1071         }
1072         bitField0_ |= 0x00000004;
1073         return this;
1074       }
1075       /**
1076        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1077        */
1078       public Builder clearTranslatedMessage() {
1079         if (translatedMessageBuilder_ == null) {
1080           translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
1081           onChanged();
1082         } else {
1083           translatedMessageBuilder_.clear();
1084         }
1085         bitField0_ = (bitField0_ & ~0x00000004);
1086         return this;
1087       }
1088       /**
1089        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1090        */
1091       public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() {
1092         bitField0_ |= 0x00000004;
1093         onChanged();
1094         return getTranslatedMessageFieldBuilder().getBuilder();
1095       }
1096       /**
1097        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1098        */
1099       public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
1100         if (translatedMessageBuilder_ != null) {
1101           return translatedMessageBuilder_.getMessageOrBuilder();
1102         } else {
1103           return translatedMessage_;
1104         }
1105       }
1106       /**
1107        * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1108        */
1109       private com.google.protobuf.SingleFieldBuilder<
1110           com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> 
1111           getTranslatedMessageFieldBuilder() {
1112         if (translatedMessageBuilder_ == null) {
1113           translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1114               com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>(
1115                   translatedMessage_,
1116                   getParentForChildren(),
1117                   isClean());
1118           translatedMessage_ = null;
1119         }
1120         return translatedMessageBuilder_;
1121       }
1122
1123       // optional .openxc.DiagnosticResponse diagnostic_response = 4;
1124       private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1125       private com.google.protobuf.SingleFieldBuilder<
1126           com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_;
1127       /**
1128        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1129        */
1130       public boolean hasDiagnosticResponse() {
1131         return ((bitField0_ & 0x00000008) == 0x00000008);
1132       }
1133       /**
1134        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1135        */
1136       public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
1137         if (diagnosticResponseBuilder_ == null) {
1138           return diagnosticResponse_;
1139         } else {
1140           return diagnosticResponseBuilder_.getMessage();
1141         }
1142       }
1143       /**
1144        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1145        */
1146       public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1147         if (diagnosticResponseBuilder_ == null) {
1148           if (value == null) {
1149             throw new NullPointerException();
1150           }
1151           diagnosticResponse_ = value;
1152           onChanged();
1153         } else {
1154           diagnosticResponseBuilder_.setMessage(value);
1155         }
1156         bitField0_ |= 0x00000008;
1157         return this;
1158       }
1159       /**
1160        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1161        */
1162       public Builder setDiagnosticResponse(
1163           com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) {
1164         if (diagnosticResponseBuilder_ == null) {
1165           diagnosticResponse_ = builderForValue.build();
1166           onChanged();
1167         } else {
1168           diagnosticResponseBuilder_.setMessage(builderForValue.build());
1169         }
1170         bitField0_ |= 0x00000008;
1171         return this;
1172       }
1173       /**
1174        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1175        */
1176       public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1177         if (diagnosticResponseBuilder_ == null) {
1178           if (((bitField0_ & 0x00000008) == 0x00000008) &&
1179               diagnosticResponse_ != com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) {
1180             diagnosticResponse_ =
1181               com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(diagnosticResponse_).mergeFrom(value).buildPartial();
1182           } else {
1183             diagnosticResponse_ = value;
1184           }
1185           onChanged();
1186         } else {
1187           diagnosticResponseBuilder_.mergeFrom(value);
1188         }
1189         bitField0_ |= 0x00000008;
1190         return this;
1191       }
1192       /**
1193        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1194        */
1195       public Builder clearDiagnosticResponse() {
1196         if (diagnosticResponseBuilder_ == null) {
1197           diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1198           onChanged();
1199         } else {
1200           diagnosticResponseBuilder_.clear();
1201         }
1202         bitField0_ = (bitField0_ & ~0x00000008);
1203         return this;
1204       }
1205       /**
1206        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1207        */
1208       public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() {
1209         bitField0_ |= 0x00000008;
1210         onChanged();
1211         return getDiagnosticResponseFieldBuilder().getBuilder();
1212       }
1213       /**
1214        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1215        */
1216       public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
1217         if (diagnosticResponseBuilder_ != null) {
1218           return diagnosticResponseBuilder_.getMessageOrBuilder();
1219         } else {
1220           return diagnosticResponse_;
1221         }
1222       }
1223       /**
1224        * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1225        */
1226       private com.google.protobuf.SingleFieldBuilder<
1227           com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> 
1228           getDiagnosticResponseFieldBuilder() {
1229         if (diagnosticResponseBuilder_ == null) {
1230           diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1231               com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>(
1232                   diagnosticResponse_,
1233                   getParentForChildren(),
1234                   isClean());
1235           diagnosticResponse_ = null;
1236         }
1237         return diagnosticResponseBuilder_;
1238       }
1239
1240       // optional .openxc.ControlCommand control_command = 5;
1241       private com.openxc.BinaryMessages.ControlCommand controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
1242       private com.google.protobuf.SingleFieldBuilder<
1243           com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> controlCommandBuilder_;
1244       /**
1245        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1246        */
1247       public boolean hasControlCommand() {
1248         return ((bitField0_ & 0x00000010) == 0x00000010);
1249       }
1250       /**
1251        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1252        */
1253       public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
1254         if (controlCommandBuilder_ == null) {
1255           return controlCommand_;
1256         } else {
1257           return controlCommandBuilder_.getMessage();
1258         }
1259       }
1260       /**
1261        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1262        */
1263       public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) {
1264         if (controlCommandBuilder_ == null) {
1265           if (value == null) {
1266             throw new NullPointerException();
1267           }
1268           controlCommand_ = value;
1269           onChanged();
1270         } else {
1271           controlCommandBuilder_.setMessage(value);
1272         }
1273         bitField0_ |= 0x00000010;
1274         return this;
1275       }
1276       /**
1277        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1278        */
1279       public Builder setControlCommand(
1280           com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) {
1281         if (controlCommandBuilder_ == null) {
1282           controlCommand_ = builderForValue.build();
1283           onChanged();
1284         } else {
1285           controlCommandBuilder_.setMessage(builderForValue.build());
1286         }
1287         bitField0_ |= 0x00000010;
1288         return this;
1289       }
1290       /**
1291        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1292        */
1293       public Builder mergeControlCommand(com.openxc.BinaryMessages.ControlCommand value) {
1294         if (controlCommandBuilder_ == null) {
1295           if (((bitField0_ & 0x00000010) == 0x00000010) &&
1296               controlCommand_ != com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) {
1297             controlCommand_ =
1298               com.openxc.BinaryMessages.ControlCommand.newBuilder(controlCommand_).mergeFrom(value).buildPartial();
1299           } else {
1300             controlCommand_ = value;
1301           }
1302           onChanged();
1303         } else {
1304           controlCommandBuilder_.mergeFrom(value);
1305         }
1306         bitField0_ |= 0x00000010;
1307         return this;
1308       }
1309       /**
1310        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1311        */
1312       public Builder clearControlCommand() {
1313         if (controlCommandBuilder_ == null) {
1314           controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
1315           onChanged();
1316         } else {
1317           controlCommandBuilder_.clear();
1318         }
1319         bitField0_ = (bitField0_ & ~0x00000010);
1320         return this;
1321       }
1322       /**
1323        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1324        */
1325       public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() {
1326         bitField0_ |= 0x00000010;
1327         onChanged();
1328         return getControlCommandFieldBuilder().getBuilder();
1329       }
1330       /**
1331        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1332        */
1333       public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
1334         if (controlCommandBuilder_ != null) {
1335           return controlCommandBuilder_.getMessageOrBuilder();
1336         } else {
1337           return controlCommand_;
1338         }
1339       }
1340       /**
1341        * <code>optional .openxc.ControlCommand control_command = 5;</code>
1342        */
1343       private com.google.protobuf.SingleFieldBuilder<
1344           com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> 
1345           getControlCommandFieldBuilder() {
1346         if (controlCommandBuilder_ == null) {
1347           controlCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1348               com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder>(
1349                   controlCommand_,
1350                   getParentForChildren(),
1351                   isClean());
1352           controlCommand_ = null;
1353         }
1354         return controlCommandBuilder_;
1355       }
1356
1357       // optional .openxc.CommandResponse command_response = 6;
1358       private com.openxc.BinaryMessages.CommandResponse commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
1359       private com.google.protobuf.SingleFieldBuilder<
1360           com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> commandResponseBuilder_;
1361       /**
1362        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1363        */
1364       public boolean hasCommandResponse() {
1365         return ((bitField0_ & 0x00000020) == 0x00000020);
1366       }
1367       /**
1368        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1369        */
1370       public com.openxc.BinaryMessages.CommandResponse getCommandResponse() {
1371         if (commandResponseBuilder_ == null) {
1372           return commandResponse_;
1373         } else {
1374           return commandResponseBuilder_.getMessage();
1375         }
1376       }
1377       /**
1378        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1379        */
1380       public Builder setCommandResponse(com.openxc.BinaryMessages.CommandResponse value) {
1381         if (commandResponseBuilder_ == null) {
1382           if (value == null) {
1383             throw new NullPointerException();
1384           }
1385           commandResponse_ = value;
1386           onChanged();
1387         } else {
1388           commandResponseBuilder_.setMessage(value);
1389         }
1390         bitField0_ |= 0x00000020;
1391         return this;
1392       }
1393       /**
1394        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1395        */
1396       public Builder setCommandResponse(
1397           com.openxc.BinaryMessages.CommandResponse.Builder builderForValue) {
1398         if (commandResponseBuilder_ == null) {
1399           commandResponse_ = builderForValue.build();
1400           onChanged();
1401         } else {
1402           commandResponseBuilder_.setMessage(builderForValue.build());
1403         }
1404         bitField0_ |= 0x00000020;
1405         return this;
1406       }
1407       /**
1408        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1409        */
1410       public Builder mergeCommandResponse(com.openxc.BinaryMessages.CommandResponse value) {
1411         if (commandResponseBuilder_ == null) {
1412           if (((bitField0_ & 0x00000020) == 0x00000020) &&
1413               commandResponse_ != com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) {
1414             commandResponse_ =
1415               com.openxc.BinaryMessages.CommandResponse.newBuilder(commandResponse_).mergeFrom(value).buildPartial();
1416           } else {
1417             commandResponse_ = value;
1418           }
1419           onChanged();
1420         } else {
1421           commandResponseBuilder_.mergeFrom(value);
1422         }
1423         bitField0_ |= 0x00000020;
1424         return this;
1425       }
1426       /**
1427        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1428        */
1429       public Builder clearCommandResponse() {
1430         if (commandResponseBuilder_ == null) {
1431           commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
1432           onChanged();
1433         } else {
1434           commandResponseBuilder_.clear();
1435         }
1436         bitField0_ = (bitField0_ & ~0x00000020);
1437         return this;
1438       }
1439       /**
1440        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1441        */
1442       public com.openxc.BinaryMessages.CommandResponse.Builder getCommandResponseBuilder() {
1443         bitField0_ |= 0x00000020;
1444         onChanged();
1445         return getCommandResponseFieldBuilder().getBuilder();
1446       }
1447       /**
1448        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1449        */
1450       public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() {
1451         if (commandResponseBuilder_ != null) {
1452           return commandResponseBuilder_.getMessageOrBuilder();
1453         } else {
1454           return commandResponse_;
1455         }
1456       }
1457       /**
1458        * <code>optional .openxc.CommandResponse command_response = 6;</code>
1459        */
1460       private com.google.protobuf.SingleFieldBuilder<
1461           com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder> 
1462           getCommandResponseFieldBuilder() {
1463         if (commandResponseBuilder_ == null) {
1464           commandResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1465               com.openxc.BinaryMessages.CommandResponse, com.openxc.BinaryMessages.CommandResponse.Builder, com.openxc.BinaryMessages.CommandResponseOrBuilder>(
1466                   commandResponse_,
1467                   getParentForChildren(),
1468                   isClean());
1469           commandResponse_ = null;
1470         }
1471         return commandResponseBuilder_;
1472       }
1473
1474       // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage)
1475     }
1476
1477     static {
1478       defaultInstance = new VehicleMessage(true);
1479       defaultInstance.initFields();
1480     }
1481
1482     // @@protoc_insertion_point(class_scope:openxc.VehicleMessage)
1483   }
1484
1485   public interface RawMessageOrBuilder
1486       extends com.google.protobuf.MessageOrBuilder {
1487
1488     // optional int32 bus = 1;
1489     /**
1490      * <code>optional int32 bus = 1;</code>
1491      */
1492     boolean hasBus();
1493     /**
1494      * <code>optional int32 bus = 1;</code>
1495      */
1496     int getBus();
1497
1498     // optional uint32 message_id = 2;
1499     /**
1500      * <code>optional uint32 message_id = 2;</code>
1501      */
1502     boolean hasMessageId();
1503     /**
1504      * <code>optional uint32 message_id = 2;</code>
1505      */
1506     int getMessageId();
1507
1508     // optional bytes data = 3;
1509     /**
1510      * <code>optional bytes data = 3;</code>
1511      */
1512     boolean hasData();
1513     /**
1514      * <code>optional bytes data = 3;</code>
1515      */
1516     com.google.protobuf.ByteString getData();
1517   }
1518   /**
1519    * Protobuf type {@code openxc.RawMessage}
1520    */
1521   public static final class RawMessage extends
1522       com.google.protobuf.GeneratedMessage
1523       implements RawMessageOrBuilder {
1524     // Use RawMessage.newBuilder() to construct.
1525     private RawMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1526       super(builder);
1527       this.unknownFields = builder.getUnknownFields();
1528     }
1529     private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1530
1531     private static final RawMessage defaultInstance;
1532     public static RawMessage getDefaultInstance() {
1533       return defaultInstance;
1534     }
1535
1536     public RawMessage getDefaultInstanceForType() {
1537       return defaultInstance;
1538     }
1539
1540     private final com.google.protobuf.UnknownFieldSet unknownFields;
1541     @java.lang.Override
1542     public final com.google.protobuf.UnknownFieldSet
1543         getUnknownFields() {
1544       return this.unknownFields;
1545     }
1546     private RawMessage(
1547         com.google.protobuf.CodedInputStream input,
1548         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1549         throws com.google.protobuf.InvalidProtocolBufferException {
1550       initFields();
1551       int mutable_bitField0_ = 0;
1552       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1553           com.google.protobuf.UnknownFieldSet.newBuilder();
1554       try {
1555         boolean done = false;
1556         while (!done) {
1557           int tag = input.readTag();
1558           switch (tag) {
1559             case 0:
1560               done = true;
1561               break;
1562             default: {
1563               if (!parseUnknownField(input, unknownFields,
1564                                      extensionRegistry, tag)) {
1565                 done = true;
1566               }
1567               break;
1568             }
1569             case 8: {
1570               bitField0_ |= 0x00000001;
1571               bus_ = input.readInt32();
1572               break;
1573             }
1574             case 16: {
1575               bitField0_ |= 0x00000002;
1576               messageId_ = input.readUInt32();
1577               break;
1578             }
1579             case 26: {
1580               bitField0_ |= 0x00000004;
1581               data_ = input.readBytes();
1582               break;
1583             }
1584           }
1585         }
1586       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1587         throw e.setUnfinishedMessage(this);
1588       } catch (java.io.IOException e) {
1589         throw new com.google.protobuf.InvalidProtocolBufferException(
1590             e.getMessage()).setUnfinishedMessage(this);
1591       } finally {
1592         this.unknownFields = unknownFields.build();
1593         makeExtensionsImmutable();
1594       }
1595     }
1596     public static final com.google.protobuf.Descriptors.Descriptor
1597         getDescriptor() {
1598       return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1599     }
1600
1601     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1602         internalGetFieldAccessorTable() {
1603       return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1604           .ensureFieldAccessorsInitialized(
1605               com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1606     }
1607
1608     public static com.google.protobuf.Parser<RawMessage> PARSER =
1609         new com.google.protobuf.AbstractParser<RawMessage>() {
1610       public RawMessage parsePartialFrom(
1611           com.google.protobuf.CodedInputStream input,
1612           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1613           throws com.google.protobuf.InvalidProtocolBufferException {
1614         return new RawMessage(input, extensionRegistry);
1615       }
1616     };
1617
1618     @java.lang.Override
1619     public com.google.protobuf.Parser<RawMessage> getParserForType() {
1620       return PARSER;
1621     }
1622
1623     private int bitField0_;
1624     // optional int32 bus = 1;
1625     public static final int BUS_FIELD_NUMBER = 1;
1626     private int bus_;
1627     /**
1628      * <code>optional int32 bus = 1;</code>
1629      */
1630     public boolean hasBus() {
1631       return ((bitField0_ & 0x00000001) == 0x00000001);
1632     }
1633     /**
1634      * <code>optional int32 bus = 1;</code>
1635      */
1636     public int getBus() {
1637       return bus_;
1638     }
1639
1640     // optional uint32 message_id = 2;
1641     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1642     private int messageId_;
1643     /**
1644      * <code>optional uint32 message_id = 2;</code>
1645      */
1646     public boolean hasMessageId() {
1647       return ((bitField0_ & 0x00000002) == 0x00000002);
1648     }
1649     /**
1650      * <code>optional uint32 message_id = 2;</code>
1651      */
1652     public int getMessageId() {
1653       return messageId_;
1654     }
1655
1656     // optional bytes data = 3;
1657     public static final int DATA_FIELD_NUMBER = 3;
1658     private com.google.protobuf.ByteString data_;
1659     /**
1660      * <code>optional bytes data = 3;</code>
1661      */
1662     public boolean hasData() {
1663       return ((bitField0_ & 0x00000004) == 0x00000004);
1664     }
1665     /**
1666      * <code>optional bytes data = 3;</code>
1667      */
1668     public com.google.protobuf.ByteString getData() {
1669       return data_;
1670     }
1671
1672     private void initFields() {
1673       bus_ = 0;
1674       messageId_ = 0;
1675       data_ = com.google.protobuf.ByteString.EMPTY;
1676     }
1677     private byte memoizedIsInitialized = -1;
1678     public final boolean isInitialized() {
1679       byte isInitialized = memoizedIsInitialized;
1680       if (isInitialized != -1) return isInitialized == 1;
1681
1682       memoizedIsInitialized = 1;
1683       return true;
1684     }
1685
1686     public void writeTo(com.google.protobuf.CodedOutputStream output)
1687                         throws java.io.IOException {
1688       getSerializedSize();
1689       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1690         output.writeInt32(1, bus_);
1691       }
1692       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1693         output.writeUInt32(2, messageId_);
1694       }
1695       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1696         output.writeBytes(3, data_);
1697       }
1698       getUnknownFields().writeTo(output);
1699     }
1700
1701     private int memoizedSerializedSize = -1;
1702     public int getSerializedSize() {
1703       int size = memoizedSerializedSize;
1704       if (size != -1) return size;
1705
1706       size = 0;
1707       if (((bitField0_ & 0x00000001) == 0x00000001)) {
1708         size += com.google.protobuf.CodedOutputStream
1709           .computeInt32Size(1, bus_);
1710       }
1711       if (((bitField0_ & 0x00000002) == 0x00000002)) {
1712         size += com.google.protobuf.CodedOutputStream
1713           .computeUInt32Size(2, messageId_);
1714       }
1715       if (((bitField0_ & 0x00000004) == 0x00000004)) {
1716         size += com.google.protobuf.CodedOutputStream
1717           .computeBytesSize(3, data_);
1718       }
1719       size += getUnknownFields().getSerializedSize();
1720       memoizedSerializedSize = size;
1721       return size;
1722     }
1723
1724     private static final long serialVersionUID = 0L;
1725     @java.lang.Override
1726     protected java.lang.Object writeReplace()
1727         throws java.io.ObjectStreamException {
1728       return super.writeReplace();
1729     }
1730
1731     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1732         com.google.protobuf.ByteString data)
1733         throws com.google.protobuf.InvalidProtocolBufferException {
1734       return PARSER.parseFrom(data);
1735     }
1736     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1737         com.google.protobuf.ByteString data,
1738         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1739         throws com.google.protobuf.InvalidProtocolBufferException {
1740       return PARSER.parseFrom(data, extensionRegistry);
1741     }
1742     public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data)
1743         throws com.google.protobuf.InvalidProtocolBufferException {
1744       return PARSER.parseFrom(data);
1745     }
1746     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1747         byte[] data,
1748         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1749         throws com.google.protobuf.InvalidProtocolBufferException {
1750       return PARSER.parseFrom(data, extensionRegistry);
1751     }
1752     public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input)
1753         throws java.io.IOException {
1754       return PARSER.parseFrom(input);
1755     }
1756     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1757         java.io.InputStream input,
1758         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1759         throws java.io.IOException {
1760       return PARSER.parseFrom(input, extensionRegistry);
1761     }
1762     public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input)
1763         throws java.io.IOException {
1764       return PARSER.parseDelimitedFrom(input);
1765     }
1766     public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(
1767         java.io.InputStream input,
1768         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1769         throws java.io.IOException {
1770       return PARSER.parseDelimitedFrom(input, extensionRegistry);
1771     }
1772     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1773         com.google.protobuf.CodedInputStream input)
1774         throws java.io.IOException {
1775       return PARSER.parseFrom(input);
1776     }
1777     public static com.openxc.BinaryMessages.RawMessage parseFrom(
1778         com.google.protobuf.CodedInputStream input,
1779         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1780         throws java.io.IOException {
1781       return PARSER.parseFrom(input, extensionRegistry);
1782     }
1783
1784     public static Builder newBuilder() { return Builder.create(); }
1785     public Builder newBuilderForType() { return newBuilder(); }
1786     public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) {
1787       return newBuilder().mergeFrom(prototype);
1788     }
1789     public Builder toBuilder() { return newBuilder(this); }
1790
1791     @java.lang.Override
1792     protected Builder newBuilderForType(
1793         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1794       Builder builder = new Builder(parent);
1795       return builder;
1796     }
1797     /**
1798      * Protobuf type {@code openxc.RawMessage}
1799      */
1800     public static final class Builder extends
1801         com.google.protobuf.GeneratedMessage.Builder<Builder>
1802        implements com.openxc.BinaryMessages.RawMessageOrBuilder {
1803       public static final com.google.protobuf.Descriptors.Descriptor
1804           getDescriptor() {
1805         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1806       }
1807
1808       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1809           internalGetFieldAccessorTable() {
1810         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1811             .ensureFieldAccessorsInitialized(
1812                 com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1813       }
1814
1815       // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder()
1816       private Builder() {
1817         maybeForceBuilderInitialization();
1818       }
1819
1820       private Builder(
1821           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1822         super(parent);
1823         maybeForceBuilderInitialization();
1824       }
1825       private void maybeForceBuilderInitialization() {
1826         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1827         }
1828       }
1829       private static Builder create() {
1830         return new Builder();
1831       }
1832
1833       public Builder clear() {
1834         super.clear();
1835         bus_ = 0;
1836         bitField0_ = (bitField0_ & ~0x00000001);
1837         messageId_ = 0;
1838         bitField0_ = (bitField0_ & ~0x00000002);
1839         data_ = com.google.protobuf.ByteString.EMPTY;
1840         bitField0_ = (bitField0_ & ~0x00000004);
1841         return this;
1842       }
1843
1844       public Builder clone() {
1845         return create().mergeFrom(buildPartial());
1846       }
1847
1848       public com.google.protobuf.Descriptors.Descriptor
1849           getDescriptorForType() {
1850         return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1851       }
1852
1853       public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() {
1854         return com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
1855       }
1856
1857       public com.openxc.BinaryMessages.RawMessage build() {
1858         com.openxc.BinaryMessages.RawMessage result = buildPartial();
1859         if (!result.isInitialized()) {
1860           throw newUninitializedMessageException(result);
1861         }
1862         return result;
1863       }
1864
1865       public com.openxc.BinaryMessages.RawMessage buildPartial() {
1866         com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this);
1867         int from_bitField0_ = bitField0_;
1868         int to_bitField0_ = 0;
1869         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
1870           to_bitField0_ |= 0x00000001;
1871         }
1872         result.bus_ = bus_;
1873         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
1874           to_bitField0_ |= 0x00000002;
1875         }
1876         result.messageId_ = messageId_;
1877         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
1878           to_bitField0_ |= 0x00000004;
1879         }
1880         result.data_ = data_;
1881         result.bitField0_ = to_bitField0_;
1882         onBuilt();
1883         return result;
1884       }
1885
1886       public Builder mergeFrom(com.google.protobuf.Message other) {
1887         if (other instanceof com.openxc.BinaryMessages.RawMessage) {
1888           return mergeFrom((com.openxc.BinaryMessages.RawMessage)other);
1889         } else {
1890           super.mergeFrom(other);
1891           return this;
1892         }
1893       }
1894
1895       public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) {
1896         if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this;
1897         if (other.hasBus()) {
1898           setBus(other.getBus());
1899         }
1900         if (other.hasMessageId()) {
1901           setMessageId(other.getMessageId());
1902         }
1903         if (other.hasData()) {
1904           setData(other.getData());
1905         }
1906         this.mergeUnknownFields(other.getUnknownFields());
1907         return this;
1908       }
1909
1910       public final boolean isInitialized() {
1911         return true;
1912       }
1913
1914       public Builder mergeFrom(
1915           com.google.protobuf.CodedInputStream input,
1916           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1917           throws java.io.IOException {
1918         com.openxc.BinaryMessages.RawMessage parsedMessage = null;
1919         try {
1920           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1921         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1922           parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage();
1923           throw e;
1924         } finally {
1925           if (parsedMessage != null) {
1926             mergeFrom(parsedMessage);
1927           }
1928         }
1929         return this;
1930       }
1931       private int bitField0_;
1932
1933       // optional int32 bus = 1;
1934       private int bus_ ;
1935       /**
1936        * <code>optional int32 bus = 1;</code>
1937        */
1938       public boolean hasBus() {
1939         return ((bitField0_ & 0x00000001) == 0x00000001);
1940       }
1941       /**
1942        * <code>optional int32 bus = 1;</code>
1943        */
1944       public int getBus() {
1945         return bus_;
1946       }
1947       /**
1948        * <code>optional int32 bus = 1;</code>
1949        */
1950       public Builder setBus(int value) {
1951         bitField0_ |= 0x00000001;
1952         bus_ = value;
1953         onChanged();
1954         return this;
1955       }
1956       /**
1957        * <code>optional int32 bus = 1;</code>
1958        */
1959       public Builder clearBus() {
1960         bitField0_ = (bitField0_ & ~0x00000001);
1961         bus_ = 0;
1962         onChanged();
1963         return this;
1964       }
1965
1966       // optional uint32 message_id = 2;
1967       private int messageId_ ;
1968       /**
1969        * <code>optional uint32 message_id = 2;</code>
1970        */
1971       public boolean hasMessageId() {
1972         return ((bitField0_ & 0x00000002) == 0x00000002);
1973       }
1974       /**
1975        * <code>optional uint32 message_id = 2;</code>
1976        */
1977       public int getMessageId() {
1978         return messageId_;
1979       }
1980       /**
1981        * <code>optional uint32 message_id = 2;</code>
1982        */
1983       public Builder setMessageId(int value) {
1984         bitField0_ |= 0x00000002;
1985         messageId_ = value;
1986         onChanged();
1987         return this;
1988       }
1989       /**
1990        * <code>optional uint32 message_id = 2;</code>
1991        */
1992       public Builder clearMessageId() {
1993         bitField0_ = (bitField0_ & ~0x00000002);
1994         messageId_ = 0;
1995         onChanged();
1996         return this;
1997       }
1998
1999       // optional bytes data = 3;
2000       private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
2001       /**
2002        * <code>optional bytes data = 3;</code>
2003        */
2004       public boolean hasData() {
2005         return ((bitField0_ & 0x00000004) == 0x00000004);
2006       }
2007       /**
2008        * <code>optional bytes data = 3;</code>
2009        */
2010       public com.google.protobuf.ByteString getData() {
2011         return data_;
2012       }
2013       /**
2014        * <code>optional bytes data = 3;</code>
2015        */
2016       public Builder setData(com.google.protobuf.ByteString value) {
2017         if (value == null) {
2018     throw new NullPointerException();
2019   }
2020   bitField0_ |= 0x00000004;
2021         data_ = value;
2022         onChanged();
2023         return this;
2024       }
2025       /**
2026        * <code>optional bytes data = 3;</code>
2027        */
2028       public Builder clearData() {
2029         bitField0_ = (bitField0_ & ~0x00000004);
2030         data_ = getDefaultInstance().getData();
2031         onChanged();
2032         return this;
2033       }
2034
2035       // @@protoc_insertion_point(builder_scope:openxc.RawMessage)
2036     }
2037
2038     static {
2039       defaultInstance = new RawMessage(true);
2040       defaultInstance.initFields();
2041     }
2042
2043     // @@protoc_insertion_point(class_scope:openxc.RawMessage)
2044   }
2045
2046   public interface ControlCommandOrBuilder
2047       extends com.google.protobuf.MessageOrBuilder {
2048
2049     // optional .openxc.ControlCommand.Type type = 1;
2050     /**
2051      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2052      */
2053     boolean hasType();
2054     /**
2055      * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2056      */
2057     com.openxc.BinaryMessages.ControlCommand.Type getType();
2058
2059     // optional .openxc.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 double factor = 7;
3369     /**
3370      * <code>optional double factor = 7;</code>
3371      */
3372     boolean hasFactor();
3373     /**
3374      * <code>optional double factor = 7;</code>
3375      */
3376     double getFactor();
3377
3378     // optional double offset = 8;
3379     /**
3380      * <code>optional double offset = 8;</code>
3381      */
3382     boolean hasOffset();
3383     /**
3384      * <code>optional double offset = 8;</code>
3385      */
3386     double getOffset();
3387
3388     // optional double frequency = 9;
3389     /**
3390      * <code>optional double frequency = 9;</code>
3391      */
3392     boolean hasFrequency();
3393     /**
3394      * <code>optional double frequency = 9;</code>
3395      */
3396     double getFrequency();
3397   }
3398   /**
3399    * Protobuf type {@code openxc.DiagnosticRequest}
3400    */
3401   public static final class DiagnosticRequest extends
3402       com.google.protobuf.GeneratedMessage
3403       implements DiagnosticRequestOrBuilder {
3404     // Use DiagnosticRequest.newBuilder() to construct.
3405     private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3406       super(builder);
3407       this.unknownFields = builder.getUnknownFields();
3408     }
3409     private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3410
3411     private static final DiagnosticRequest defaultInstance;
3412     public static DiagnosticRequest getDefaultInstance() {
3413       return defaultInstance;
3414     }
3415
3416     public DiagnosticRequest getDefaultInstanceForType() {
3417       return defaultInstance;
3418     }
3419
3420     private final com.google.protobuf.UnknownFieldSet unknownFields;
3421     @java.lang.Override
3422     public final com.google.protobuf.UnknownFieldSet
3423         getUnknownFields() {
3424       return this.unknownFields;
3425     }
3426     private DiagnosticRequest(
3427         com.google.protobuf.CodedInputStream input,
3428         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3429         throws com.google.protobuf.InvalidProtocolBufferException {
3430       initFields();
3431       int mutable_bitField0_ = 0;
3432       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3433           com.google.protobuf.UnknownFieldSet.newBuilder();
3434       try {
3435         boolean done = false;
3436         while (!done) {
3437           int tag = input.readTag();
3438           switch (tag) {
3439             case 0:
3440               done = true;
3441               break;
3442             default: {
3443               if (!parseUnknownField(input, unknownFields,
3444                                      extensionRegistry, tag)) {
3445                 done = true;
3446               }
3447               break;
3448             }
3449             case 8: {
3450               bitField0_ |= 0x00000001;
3451               bus_ = input.readInt32();
3452               break;
3453             }
3454             case 16: {
3455               bitField0_ |= 0x00000002;
3456               messageId_ = input.readUInt32();
3457               break;
3458             }
3459             case 24: {
3460               bitField0_ |= 0x00000004;
3461               mode_ = input.readUInt32();
3462               break;
3463             }
3464             case 32: {
3465               bitField0_ |= 0x00000008;
3466               pid_ = input.readUInt32();
3467               break;
3468             }
3469             case 42: {
3470               bitField0_ |= 0x00000010;
3471               payload_ = input.readBytes();
3472               break;
3473             }
3474             case 48: {
3475               bitField0_ |= 0x00000020;
3476               parsePayload_ = input.readBool();
3477               break;
3478             }
3479             case 57: {
3480               bitField0_ |= 0x00000040;
3481               factor_ = input.readDouble();
3482               break;
3483             }
3484             case 65: {
3485               bitField0_ |= 0x00000080;
3486               offset_ = input.readDouble();
3487               break;
3488             }
3489             case 73: {
3490               bitField0_ |= 0x00000100;
3491               frequency_ = input.readDouble();
3492               break;
3493             }
3494           }
3495         }
3496       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3497         throw e.setUnfinishedMessage(this);
3498       } catch (java.io.IOException e) {
3499         throw new com.google.protobuf.InvalidProtocolBufferException(
3500             e.getMessage()).setUnfinishedMessage(this);
3501       } finally {
3502         this.unknownFields = unknownFields.build();
3503         makeExtensionsImmutable();
3504       }
3505     }
3506     public static final com.google.protobuf.Descriptors.Descriptor
3507         getDescriptor() {
3508       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3509     }
3510
3511     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3512         internalGetFieldAccessorTable() {
3513       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
3514           .ensureFieldAccessorsInitialized(
3515               com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
3516     }
3517
3518     public static com.google.protobuf.Parser<DiagnosticRequest> PARSER =
3519         new com.google.protobuf.AbstractParser<DiagnosticRequest>() {
3520       public DiagnosticRequest parsePartialFrom(
3521           com.google.protobuf.CodedInputStream input,
3522           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3523           throws com.google.protobuf.InvalidProtocolBufferException {
3524         return new DiagnosticRequest(input, extensionRegistry);
3525       }
3526     };
3527
3528     @java.lang.Override
3529     public com.google.protobuf.Parser<DiagnosticRequest> getParserForType() {
3530       return PARSER;
3531     }
3532
3533     private int bitField0_;
3534     // optional int32 bus = 1;
3535     public static final int BUS_FIELD_NUMBER = 1;
3536     private int bus_;
3537     /**
3538      * <code>optional int32 bus = 1;</code>
3539      */
3540     public boolean hasBus() {
3541       return ((bitField0_ & 0x00000001) == 0x00000001);
3542     }
3543     /**
3544      * <code>optional int32 bus = 1;</code>
3545      */
3546     public int getBus() {
3547       return bus_;
3548     }
3549
3550     // optional uint32 message_id = 2;
3551     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
3552     private int messageId_;
3553     /**
3554      * <code>optional uint32 message_id = 2;</code>
3555      */
3556     public boolean hasMessageId() {
3557       return ((bitField0_ & 0x00000002) == 0x00000002);
3558     }
3559     /**
3560      * <code>optional uint32 message_id = 2;</code>
3561      */
3562     public int getMessageId() {
3563       return messageId_;
3564     }
3565
3566     // optional uint32 mode = 3;
3567     public static final int MODE_FIELD_NUMBER = 3;
3568     private int mode_;
3569     /**
3570      * <code>optional uint32 mode = 3;</code>
3571      */
3572     public boolean hasMode() {
3573       return ((bitField0_ & 0x00000004) == 0x00000004);
3574     }
3575     /**
3576      * <code>optional uint32 mode = 3;</code>
3577      */
3578     public int getMode() {
3579       return mode_;
3580     }
3581
3582     // optional uint32 pid = 4;
3583     public static final int PID_FIELD_NUMBER = 4;
3584     private int pid_;
3585     /**
3586      * <code>optional uint32 pid = 4;</code>
3587      */
3588     public boolean hasPid() {
3589       return ((bitField0_ & 0x00000008) == 0x00000008);
3590     }
3591     /**
3592      * <code>optional uint32 pid = 4;</code>
3593      */
3594     public int getPid() {
3595       return pid_;
3596     }
3597
3598     // optional bytes payload = 5;
3599     public static final int PAYLOAD_FIELD_NUMBER = 5;
3600     private com.google.protobuf.ByteString payload_;
3601     /**
3602      * <code>optional bytes payload = 5;</code>
3603      *
3604      * <pre>
3605      * TODO we are capping this at 8 bytes for now - need to change when we
3606      * support multi-frame responses
3607      * </pre>
3608      */
3609     public boolean hasPayload() {
3610       return ((bitField0_ & 0x00000010) == 0x00000010);
3611     }
3612     /**
3613      * <code>optional bytes payload = 5;</code>
3614      *
3615      * <pre>
3616      * TODO we are capping this at 8 bytes for now - need to change when we
3617      * support multi-frame responses
3618      * </pre>
3619      */
3620     public com.google.protobuf.ByteString getPayload() {
3621       return payload_;
3622     }
3623
3624     // optional bool parse_payload = 6;
3625     public static final int PARSE_PAYLOAD_FIELD_NUMBER = 6;
3626     private boolean parsePayload_;
3627     /**
3628      * <code>optional bool parse_payload = 6;</code>
3629      */
3630     public boolean hasParsePayload() {
3631       return ((bitField0_ & 0x00000020) == 0x00000020);
3632     }
3633     /**
3634      * <code>optional bool parse_payload = 6;</code>
3635      */
3636     public boolean getParsePayload() {
3637       return parsePayload_;
3638     }
3639
3640     // optional double factor = 7;
3641     public static final int FACTOR_FIELD_NUMBER = 7;
3642     private double factor_;
3643     /**
3644      * <code>optional double factor = 7;</code>
3645      */
3646     public boolean hasFactor() {
3647       return ((bitField0_ & 0x00000040) == 0x00000040);
3648     }
3649     /**
3650      * <code>optional double factor = 7;</code>
3651      */
3652     public double getFactor() {
3653       return factor_;
3654     }
3655
3656     // optional double offset = 8;
3657     public static final int OFFSET_FIELD_NUMBER = 8;
3658     private double offset_;
3659     /**
3660      * <code>optional double offset = 8;</code>
3661      */
3662     public boolean hasOffset() {
3663       return ((bitField0_ & 0x00000080) == 0x00000080);
3664     }
3665     /**
3666      * <code>optional double offset = 8;</code>
3667      */
3668     public double getOffset() {
3669       return offset_;
3670     }
3671
3672     // optional double frequency = 9;
3673     public static final int FREQUENCY_FIELD_NUMBER = 9;
3674     private double frequency_;
3675     /**
3676      * <code>optional double frequency = 9;</code>
3677      */
3678     public boolean hasFrequency() {
3679       return ((bitField0_ & 0x00000100) == 0x00000100);
3680     }
3681     /**
3682      * <code>optional double frequency = 9;</code>
3683      */
3684     public double getFrequency() {
3685       return frequency_;
3686     }
3687
3688     private void initFields() {
3689       bus_ = 0;
3690       messageId_ = 0;
3691       mode_ = 0;
3692       pid_ = 0;
3693       payload_ = com.google.protobuf.ByteString.EMPTY;
3694       parsePayload_ = false;
3695       factor_ = 0D;
3696       offset_ = 0D;
3697       frequency_ = 0D;
3698     }
3699     private byte memoizedIsInitialized = -1;
3700     public final boolean isInitialized() {
3701       byte isInitialized = memoizedIsInitialized;
3702       if (isInitialized != -1) return isInitialized == 1;
3703
3704       memoizedIsInitialized = 1;
3705       return true;
3706     }
3707
3708     public void writeTo(com.google.protobuf.CodedOutputStream output)
3709                         throws java.io.IOException {
3710       getSerializedSize();
3711       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3712         output.writeInt32(1, bus_);
3713       }
3714       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3715         output.writeUInt32(2, messageId_);
3716       }
3717       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3718         output.writeUInt32(3, mode_);
3719       }
3720       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3721         output.writeUInt32(4, pid_);
3722       }
3723       if (((bitField0_ & 0x00000010) == 0x00000010)) {
3724         output.writeBytes(5, payload_);
3725       }
3726       if (((bitField0_ & 0x00000020) == 0x00000020)) {
3727         output.writeBool(6, parsePayload_);
3728       }
3729       if (((bitField0_ & 0x00000040) == 0x00000040)) {
3730         output.writeDouble(7, factor_);
3731       }
3732       if (((bitField0_ & 0x00000080) == 0x00000080)) {
3733         output.writeDouble(8, offset_);
3734       }
3735       if (((bitField0_ & 0x00000100) == 0x00000100)) {
3736         output.writeDouble(9, frequency_);
3737       }
3738       getUnknownFields().writeTo(output);
3739     }
3740
3741     private int memoizedSerializedSize = -1;
3742     public int getSerializedSize() {
3743       int size = memoizedSerializedSize;
3744       if (size != -1) return size;
3745
3746       size = 0;
3747       if (((bitField0_ & 0x00000001) == 0x00000001)) {
3748         size += com.google.protobuf.CodedOutputStream
3749           .computeInt32Size(1, bus_);
3750       }
3751       if (((bitField0_ & 0x00000002) == 0x00000002)) {
3752         size += com.google.protobuf.CodedOutputStream
3753           .computeUInt32Size(2, messageId_);
3754       }
3755       if (((bitField0_ & 0x00000004) == 0x00000004)) {
3756         size += com.google.protobuf.CodedOutputStream
3757           .computeUInt32Size(3, mode_);
3758       }
3759       if (((bitField0_ & 0x00000008) == 0x00000008)) {
3760         size += com.google.protobuf.CodedOutputStream
3761           .computeUInt32Size(4, pid_);
3762       }
3763       if (((bitField0_ & 0x00000010) == 0x00000010)) {
3764         size += com.google.protobuf.CodedOutputStream
3765           .computeBytesSize(5, payload_);
3766       }
3767       if (((bitField0_ & 0x00000020) == 0x00000020)) {
3768         size += com.google.protobuf.CodedOutputStream
3769           .computeBoolSize(6, parsePayload_);
3770       }
3771       if (((bitField0_ & 0x00000040) == 0x00000040)) {
3772         size += com.google.protobuf.CodedOutputStream
3773           .computeDoubleSize(7, factor_);
3774       }
3775       if (((bitField0_ & 0x00000080) == 0x00000080)) {
3776         size += com.google.protobuf.CodedOutputStream
3777           .computeDoubleSize(8, offset_);
3778       }
3779       if (((bitField0_ & 0x00000100) == 0x00000100)) {
3780         size += com.google.protobuf.CodedOutputStream
3781           .computeDoubleSize(9, frequency_);
3782       }
3783       size += getUnknownFields().getSerializedSize();
3784       memoizedSerializedSize = size;
3785       return size;
3786     }
3787
3788     private static final long serialVersionUID = 0L;
3789     @java.lang.Override
3790     protected java.lang.Object writeReplace()
3791         throws java.io.ObjectStreamException {
3792       return super.writeReplace();
3793     }
3794
3795     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3796         com.google.protobuf.ByteString data)
3797         throws com.google.protobuf.InvalidProtocolBufferException {
3798       return PARSER.parseFrom(data);
3799     }
3800     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3801         com.google.protobuf.ByteString data,
3802         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3803         throws com.google.protobuf.InvalidProtocolBufferException {
3804       return PARSER.parseFrom(data, extensionRegistry);
3805     }
3806     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data)
3807         throws com.google.protobuf.InvalidProtocolBufferException {
3808       return PARSER.parseFrom(data);
3809     }
3810     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3811         byte[] data,
3812         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3813         throws com.google.protobuf.InvalidProtocolBufferException {
3814       return PARSER.parseFrom(data, extensionRegistry);
3815     }
3816     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input)
3817         throws java.io.IOException {
3818       return PARSER.parseFrom(input);
3819     }
3820     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3821         java.io.InputStream input,
3822         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3823         throws java.io.IOException {
3824       return PARSER.parseFrom(input, extensionRegistry);
3825     }
3826     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input)
3827         throws java.io.IOException {
3828       return PARSER.parseDelimitedFrom(input);
3829     }
3830     public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(
3831         java.io.InputStream input,
3832         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3833         throws java.io.IOException {
3834       return PARSER.parseDelimitedFrom(input, extensionRegistry);
3835     }
3836     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3837         com.google.protobuf.CodedInputStream input)
3838         throws java.io.IOException {
3839       return PARSER.parseFrom(input);
3840     }
3841     public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3842         com.google.protobuf.CodedInputStream input,
3843         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3844         throws java.io.IOException {
3845       return PARSER.parseFrom(input, extensionRegistry);
3846     }
3847
3848     public static Builder newBuilder() { return Builder.create(); }
3849     public Builder newBuilderForType() { return newBuilder(); }
3850     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) {
3851       return newBuilder().mergeFrom(prototype);
3852     }
3853     public Builder toBuilder() { return newBuilder(this); }
3854
3855     @java.lang.Override
3856     protected Builder newBuilderForType(
3857         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3858       Builder builder = new Builder(parent);
3859       return builder;
3860     }
3861     /**
3862      * Protobuf type {@code openxc.DiagnosticRequest}
3863      */
3864     public static final class Builder extends
3865         com.google.protobuf.GeneratedMessage.Builder<Builder>
3866        implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder {
3867       public static final com.google.protobuf.Descriptors.Descriptor
3868           getDescriptor() {
3869         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3870       }
3871
3872       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3873           internalGetFieldAccessorTable() {
3874         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
3875             .ensureFieldAccessorsInitialized(
3876                 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
3877       }
3878
3879       // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder()
3880       private Builder() {
3881         maybeForceBuilderInitialization();
3882       }
3883
3884       private Builder(
3885           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3886         super(parent);
3887         maybeForceBuilderInitialization();
3888       }
3889       private void maybeForceBuilderInitialization() {
3890         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3891         }
3892       }
3893       private static Builder create() {
3894         return new Builder();
3895       }
3896
3897       public Builder clear() {
3898         super.clear();
3899         bus_ = 0;
3900         bitField0_ = (bitField0_ & ~0x00000001);
3901         messageId_ = 0;
3902         bitField0_ = (bitField0_ & ~0x00000002);
3903         mode_ = 0;
3904         bitField0_ = (bitField0_ & ~0x00000004);
3905         pid_ = 0;
3906         bitField0_ = (bitField0_ & ~0x00000008);
3907         payload_ = com.google.protobuf.ByteString.EMPTY;
3908         bitField0_ = (bitField0_ & ~0x00000010);
3909         parsePayload_ = false;
3910         bitField0_ = (bitField0_ & ~0x00000020);
3911         factor_ = 0D;
3912         bitField0_ = (bitField0_ & ~0x00000040);
3913         offset_ = 0D;
3914         bitField0_ = (bitField0_ & ~0x00000080);
3915         frequency_ = 0D;
3916         bitField0_ = (bitField0_ & ~0x00000100);
3917         return this;
3918       }
3919
3920       public Builder clone() {
3921         return create().mergeFrom(buildPartial());
3922       }
3923
3924       public com.google.protobuf.Descriptors.Descriptor
3925           getDescriptorForType() {
3926         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3927       }
3928
3929       public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() {
3930         return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
3931       }
3932
3933       public com.openxc.BinaryMessages.DiagnosticRequest build() {
3934         com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial();
3935         if (!result.isInitialized()) {
3936           throw newUninitializedMessageException(result);
3937         }
3938         return result;
3939       }
3940
3941       public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() {
3942         com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this);
3943         int from_bitField0_ = bitField0_;
3944         int to_bitField0_ = 0;
3945         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3946           to_bitField0_ |= 0x00000001;
3947         }
3948         result.bus_ = bus_;
3949         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3950           to_bitField0_ |= 0x00000002;
3951         }
3952         result.messageId_ = messageId_;
3953         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
3954           to_bitField0_ |= 0x00000004;
3955         }
3956         result.mode_ = mode_;
3957         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
3958           to_bitField0_ |= 0x00000008;
3959         }
3960         result.pid_ = pid_;
3961         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
3962           to_bitField0_ |= 0x00000010;
3963         }
3964         result.payload_ = payload_;
3965         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
3966           to_bitField0_ |= 0x00000020;
3967         }
3968         result.parsePayload_ = parsePayload_;
3969         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
3970           to_bitField0_ |= 0x00000040;
3971         }
3972         result.factor_ = factor_;
3973         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
3974           to_bitField0_ |= 0x00000080;
3975         }
3976         result.offset_ = offset_;
3977         if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
3978           to_bitField0_ |= 0x00000100;
3979         }
3980         result.frequency_ = frequency_;
3981         result.bitField0_ = to_bitField0_;
3982         onBuilt();
3983         return result;
3984       }
3985
3986       public Builder mergeFrom(com.google.protobuf.Message other) {
3987         if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) {
3988           return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other);
3989         } else {
3990           super.mergeFrom(other);
3991           return this;
3992         }
3993       }
3994
3995       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) {
3996         if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this;
3997         if (other.hasBus()) {
3998           setBus(other.getBus());
3999         }
4000         if (other.hasMessageId()) {
4001           setMessageId(other.getMessageId());
4002         }
4003         if (other.hasMode()) {
4004           setMode(other.getMode());
4005         }
4006         if (other.hasPid()) {
4007           setPid(other.getPid());
4008         }
4009         if (other.hasPayload()) {
4010           setPayload(other.getPayload());
4011         }
4012         if (other.hasParsePayload()) {
4013           setParsePayload(other.getParsePayload());
4014         }
4015         if (other.hasFactor()) {
4016           setFactor(other.getFactor());
4017         }
4018         if (other.hasOffset()) {
4019           setOffset(other.getOffset());
4020         }
4021         if (other.hasFrequency()) {
4022           setFrequency(other.getFrequency());
4023         }
4024         this.mergeUnknownFields(other.getUnknownFields());
4025         return this;
4026       }
4027
4028       public final boolean isInitialized() {
4029         return true;
4030       }
4031
4032       public Builder mergeFrom(
4033           com.google.protobuf.CodedInputStream input,
4034           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4035           throws java.io.IOException {
4036         com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null;
4037         try {
4038           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4039         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4040           parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage();
4041           throw e;
4042         } finally {
4043           if (parsedMessage != null) {
4044             mergeFrom(parsedMessage);
4045           }
4046         }
4047         return this;
4048       }
4049       private int bitField0_;
4050
4051       // optional int32 bus = 1;
4052       private int bus_ ;
4053       /**
4054        * <code>optional int32 bus = 1;</code>
4055        */
4056       public boolean hasBus() {
4057         return ((bitField0_ & 0x00000001) == 0x00000001);
4058       }
4059       /**
4060        * <code>optional int32 bus = 1;</code>
4061        */
4062       public int getBus() {
4063         return bus_;
4064       }
4065       /**
4066        * <code>optional int32 bus = 1;</code>
4067        */
4068       public Builder setBus(int value) {
4069         bitField0_ |= 0x00000001;
4070         bus_ = value;
4071         onChanged();
4072         return this;
4073       }
4074       /**
4075        * <code>optional int32 bus = 1;</code>
4076        */
4077       public Builder clearBus() {
4078         bitField0_ = (bitField0_ & ~0x00000001);
4079         bus_ = 0;
4080         onChanged();
4081         return this;
4082       }
4083
4084       // optional uint32 message_id = 2;
4085       private int messageId_ ;
4086       /**
4087        * <code>optional uint32 message_id = 2;</code>
4088        */
4089       public boolean hasMessageId() {
4090         return ((bitField0_ & 0x00000002) == 0x00000002);
4091       }
4092       /**
4093        * <code>optional uint32 message_id = 2;</code>
4094        */
4095       public int getMessageId() {
4096         return messageId_;
4097       }
4098       /**
4099        * <code>optional uint32 message_id = 2;</code>
4100        */
4101       public Builder setMessageId(int value) {
4102         bitField0_ |= 0x00000002;
4103         messageId_ = value;
4104         onChanged();
4105         return this;
4106       }
4107       /**
4108        * <code>optional uint32 message_id = 2;</code>
4109        */
4110       public Builder clearMessageId() {
4111         bitField0_ = (bitField0_ & ~0x00000002);
4112         messageId_ = 0;
4113         onChanged();
4114         return this;
4115       }
4116
4117       // optional uint32 mode = 3;
4118       private int mode_ ;
4119       /**
4120        * <code>optional uint32 mode = 3;</code>
4121        */
4122       public boolean hasMode() {
4123         return ((bitField0_ & 0x00000004) == 0x00000004);
4124       }
4125       /**
4126        * <code>optional uint32 mode = 3;</code>
4127        */
4128       public int getMode() {
4129         return mode_;
4130       }
4131       /**
4132        * <code>optional uint32 mode = 3;</code>
4133        */
4134       public Builder setMode(int value) {
4135         bitField0_ |= 0x00000004;
4136         mode_ = value;
4137         onChanged();
4138         return this;
4139       }
4140       /**
4141        * <code>optional uint32 mode = 3;</code>
4142        */
4143       public Builder clearMode() {
4144         bitField0_ = (bitField0_ & ~0x00000004);
4145         mode_ = 0;
4146         onChanged();
4147         return this;
4148       }
4149
4150       // optional uint32 pid = 4;
4151       private int pid_ ;
4152       /**
4153        * <code>optional uint32 pid = 4;</code>
4154        */
4155       public boolean hasPid() {
4156         return ((bitField0_ & 0x00000008) == 0x00000008);
4157       }
4158       /**
4159        * <code>optional uint32 pid = 4;</code>
4160        */
4161       public int getPid() {
4162         return pid_;
4163       }
4164       /**
4165        * <code>optional uint32 pid = 4;</code>
4166        */
4167       public Builder setPid(int value) {
4168         bitField0_ |= 0x00000008;
4169         pid_ = value;
4170         onChanged();
4171         return this;
4172       }
4173       /**
4174        * <code>optional uint32 pid = 4;</code>
4175        */
4176       public Builder clearPid() {
4177         bitField0_ = (bitField0_ & ~0x00000008);
4178         pid_ = 0;
4179         onChanged();
4180         return this;
4181       }
4182
4183       // optional bytes payload = 5;
4184       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
4185       /**
4186        * <code>optional bytes payload = 5;</code>
4187        *
4188        * <pre>
4189        * TODO we are capping this at 8 bytes for now - need to change when we
4190        * support multi-frame responses
4191        * </pre>
4192        */
4193       public boolean hasPayload() {
4194         return ((bitField0_ & 0x00000010) == 0x00000010);
4195       }
4196       /**
4197        * <code>optional bytes payload = 5;</code>
4198        *
4199        * <pre>
4200        * TODO we are capping this at 8 bytes for now - need to change when we
4201        * support multi-frame responses
4202        * </pre>
4203        */
4204       public com.google.protobuf.ByteString getPayload() {
4205         return payload_;
4206       }
4207       /**
4208        * <code>optional bytes payload = 5;</code>
4209        *
4210        * <pre>
4211        * TODO we are capping this at 8 bytes for now - need to change when we
4212        * support multi-frame responses
4213        * </pre>
4214        */
4215       public Builder setPayload(com.google.protobuf.ByteString value) {
4216         if (value == null) {
4217     throw new NullPointerException();
4218   }
4219   bitField0_ |= 0x00000010;
4220         payload_ = value;
4221         onChanged();
4222         return this;
4223       }
4224       /**
4225        * <code>optional bytes payload = 5;</code>
4226        *
4227        * <pre>
4228        * TODO we are capping this at 8 bytes for now - need to change when we
4229        * support multi-frame responses
4230        * </pre>
4231        */
4232       public Builder clearPayload() {
4233         bitField0_ = (bitField0_ & ~0x00000010);
4234         payload_ = getDefaultInstance().getPayload();
4235         onChanged();
4236         return this;
4237       }
4238
4239       // optional bool parse_payload = 6;
4240       private boolean parsePayload_ ;
4241       /**
4242        * <code>optional bool parse_payload = 6;</code>
4243        */
4244       public boolean hasParsePayload() {
4245         return ((bitField0_ & 0x00000020) == 0x00000020);
4246       }
4247       /**
4248        * <code>optional bool parse_payload = 6;</code>
4249        */
4250       public boolean getParsePayload() {
4251         return parsePayload_;
4252       }
4253       /**
4254        * <code>optional bool parse_payload = 6;</code>
4255        */
4256       public Builder setParsePayload(boolean value) {
4257         bitField0_ |= 0x00000020;
4258         parsePayload_ = value;
4259         onChanged();
4260         return this;
4261       }
4262       /**
4263        * <code>optional bool parse_payload = 6;</code>
4264        */
4265       public Builder clearParsePayload() {
4266         bitField0_ = (bitField0_ & ~0x00000020);
4267         parsePayload_ = false;
4268         onChanged();
4269         return this;
4270       }
4271
4272       // optional double factor = 7;
4273       private double factor_ ;
4274       /**
4275        * <code>optional double factor = 7;</code>
4276        */
4277       public boolean hasFactor() {
4278         return ((bitField0_ & 0x00000040) == 0x00000040);
4279       }
4280       /**
4281        * <code>optional double factor = 7;</code>
4282        */
4283       public double getFactor() {
4284         return factor_;
4285       }
4286       /**
4287        * <code>optional double factor = 7;</code>
4288        */
4289       public Builder setFactor(double value) {
4290         bitField0_ |= 0x00000040;
4291         factor_ = value;
4292         onChanged();
4293         return this;
4294       }
4295       /**
4296        * <code>optional double factor = 7;</code>
4297        */
4298       public Builder clearFactor() {
4299         bitField0_ = (bitField0_ & ~0x00000040);
4300         factor_ = 0D;
4301         onChanged();
4302         return this;
4303       }
4304
4305       // optional double offset = 8;
4306       private double offset_ ;
4307       /**
4308        * <code>optional double offset = 8;</code>
4309        */
4310       public boolean hasOffset() {
4311         return ((bitField0_ & 0x00000080) == 0x00000080);
4312       }
4313       /**
4314        * <code>optional double offset = 8;</code>
4315        */
4316       public double getOffset() {
4317         return offset_;
4318       }
4319       /**
4320        * <code>optional double offset = 8;</code>
4321        */
4322       public Builder setOffset(double value) {
4323         bitField0_ |= 0x00000080;
4324         offset_ = value;
4325         onChanged();
4326         return this;
4327       }
4328       /**
4329        * <code>optional double offset = 8;</code>
4330        */
4331       public Builder clearOffset() {
4332         bitField0_ = (bitField0_ & ~0x00000080);
4333         offset_ = 0D;
4334         onChanged();
4335         return this;
4336       }
4337
4338       // optional double frequency = 9;
4339       private double frequency_ ;
4340       /**
4341        * <code>optional double frequency = 9;</code>
4342        */
4343       public boolean hasFrequency() {
4344         return ((bitField0_ & 0x00000100) == 0x00000100);
4345       }
4346       /**
4347        * <code>optional double frequency = 9;</code>
4348        */
4349       public double getFrequency() {
4350         return frequency_;
4351       }
4352       /**
4353        * <code>optional double frequency = 9;</code>
4354        */
4355       public Builder setFrequency(double value) {
4356         bitField0_ |= 0x00000100;
4357         frequency_ = value;
4358         onChanged();
4359         return this;
4360       }
4361       /**
4362        * <code>optional double frequency = 9;</code>
4363        */
4364       public Builder clearFrequency() {
4365         bitField0_ = (bitField0_ & ~0x00000100);
4366         frequency_ = 0D;
4367         onChanged();
4368         return this;
4369       }
4370
4371       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest)
4372     }
4373
4374     static {
4375       defaultInstance = new DiagnosticRequest(true);
4376       defaultInstance.initFields();
4377     }
4378
4379     // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest)
4380   }
4381
4382   public interface DiagnosticResponseOrBuilder
4383       extends com.google.protobuf.MessageOrBuilder {
4384
4385     // optional int32 bus = 1;
4386     /**
4387      * <code>optional int32 bus = 1;</code>
4388      */
4389     boolean hasBus();
4390     /**
4391      * <code>optional int32 bus = 1;</code>
4392      */
4393     int getBus();
4394
4395     // optional uint32 message_id = 2;
4396     /**
4397      * <code>optional uint32 message_id = 2;</code>
4398      */
4399     boolean hasMessageId();
4400     /**
4401      * <code>optional uint32 message_id = 2;</code>
4402      */
4403     int getMessageId();
4404
4405     // optional uint32 mode = 3;
4406     /**
4407      * <code>optional uint32 mode = 3;</code>
4408      */
4409     boolean hasMode();
4410     /**
4411      * <code>optional uint32 mode = 3;</code>
4412      */
4413     int getMode();
4414
4415     // optional uint32 pid = 4;
4416     /**
4417      * <code>optional uint32 pid = 4;</code>
4418      */
4419     boolean hasPid();
4420     /**
4421      * <code>optional uint32 pid = 4;</code>
4422      */
4423     int getPid();
4424
4425     // optional bool success = 5;
4426     /**
4427      * <code>optional bool success = 5;</code>
4428      */
4429     boolean hasSuccess();
4430     /**
4431      * <code>optional bool success = 5;</code>
4432      */
4433     boolean getSuccess();
4434
4435     // optional uint32 negative_response_code = 6;
4436     /**
4437      * <code>optional uint32 negative_response_code = 6;</code>
4438      */
4439     boolean hasNegativeResponseCode();
4440     /**
4441      * <code>optional uint32 negative_response_code = 6;</code>
4442      */
4443     int getNegativeResponseCode();
4444
4445     // optional bytes payload = 7;
4446     /**
4447      * <code>optional bytes payload = 7;</code>
4448      *
4449      * <pre>
4450      * TODO we are capping this at 8 bytes for now - need to change when we
4451      * support multi-frame responses
4452      * </pre>
4453      */
4454     boolean hasPayload();
4455     /**
4456      * <code>optional bytes payload = 7;</code>
4457      *
4458      * <pre>
4459      * TODO we are capping this at 8 bytes for now - need to change when we
4460      * support multi-frame responses
4461      * </pre>
4462      */
4463     com.google.protobuf.ByteString getPayload();
4464
4465     // optional double value = 8;
4466     /**
4467      * <code>optional double value = 8;</code>
4468      */
4469     boolean hasValue();
4470     /**
4471      * <code>optional double value = 8;</code>
4472      */
4473     double getValue();
4474   }
4475   /**
4476    * Protobuf type {@code openxc.DiagnosticResponse}
4477    */
4478   public static final class DiagnosticResponse extends
4479       com.google.protobuf.GeneratedMessage
4480       implements DiagnosticResponseOrBuilder {
4481     // Use DiagnosticResponse.newBuilder() to construct.
4482     private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
4483       super(builder);
4484       this.unknownFields = builder.getUnknownFields();
4485     }
4486     private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
4487
4488     private static final DiagnosticResponse defaultInstance;
4489     public static DiagnosticResponse getDefaultInstance() {
4490       return defaultInstance;
4491     }
4492
4493     public DiagnosticResponse getDefaultInstanceForType() {
4494       return defaultInstance;
4495     }
4496
4497     private final com.google.protobuf.UnknownFieldSet unknownFields;
4498     @java.lang.Override
4499     public final com.google.protobuf.UnknownFieldSet
4500         getUnknownFields() {
4501       return this.unknownFields;
4502     }
4503     private DiagnosticResponse(
4504         com.google.protobuf.CodedInputStream input,
4505         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4506         throws com.google.protobuf.InvalidProtocolBufferException {
4507       initFields();
4508       int mutable_bitField0_ = 0;
4509       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4510           com.google.protobuf.UnknownFieldSet.newBuilder();
4511       try {
4512         boolean done = false;
4513         while (!done) {
4514           int tag = input.readTag();
4515           switch (tag) {
4516             case 0:
4517               done = true;
4518               break;
4519             default: {
4520               if (!parseUnknownField(input, unknownFields,
4521                                      extensionRegistry, tag)) {
4522                 done = true;
4523               }
4524               break;
4525             }
4526             case 8: {
4527               bitField0_ |= 0x00000001;
4528               bus_ = input.readInt32();
4529               break;
4530             }
4531             case 16: {
4532               bitField0_ |= 0x00000002;
4533               messageId_ = input.readUInt32();
4534               break;
4535             }
4536             case 24: {
4537               bitField0_ |= 0x00000004;
4538               mode_ = input.readUInt32();
4539               break;
4540             }
4541             case 32: {
4542               bitField0_ |= 0x00000008;
4543               pid_ = input.readUInt32();
4544               break;
4545             }
4546             case 40: {
4547               bitField0_ |= 0x00000010;
4548               success_ = input.readBool();
4549               break;
4550             }
4551             case 48: {
4552               bitField0_ |= 0x00000020;
4553               negativeResponseCode_ = input.readUInt32();
4554               break;
4555             }
4556             case 58: {
4557               bitField0_ |= 0x00000040;
4558               payload_ = input.readBytes();
4559               break;
4560             }
4561             case 65: {
4562               bitField0_ |= 0x00000080;
4563               value_ = input.readDouble();
4564               break;
4565             }
4566           }
4567         }
4568       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4569         throw e.setUnfinishedMessage(this);
4570       } catch (java.io.IOException e) {
4571         throw new com.google.protobuf.InvalidProtocolBufferException(
4572             e.getMessage()).setUnfinishedMessage(this);
4573       } finally {
4574         this.unknownFields = unknownFields.build();
4575         makeExtensionsImmutable();
4576       }
4577     }
4578     public static final com.google.protobuf.Descriptors.Descriptor
4579         getDescriptor() {
4580       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4581     }
4582
4583     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4584         internalGetFieldAccessorTable() {
4585       return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
4586           .ensureFieldAccessorsInitialized(
4587               com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
4588     }
4589
4590     public static com.google.protobuf.Parser<DiagnosticResponse> PARSER =
4591         new com.google.protobuf.AbstractParser<DiagnosticResponse>() {
4592       public DiagnosticResponse parsePartialFrom(
4593           com.google.protobuf.CodedInputStream input,
4594           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4595           throws com.google.protobuf.InvalidProtocolBufferException {
4596         return new DiagnosticResponse(input, extensionRegistry);
4597       }
4598     };
4599
4600     @java.lang.Override
4601     public com.google.protobuf.Parser<DiagnosticResponse> getParserForType() {
4602       return PARSER;
4603     }
4604
4605     private int bitField0_;
4606     // optional int32 bus = 1;
4607     public static final int BUS_FIELD_NUMBER = 1;
4608     private int bus_;
4609     /**
4610      * <code>optional int32 bus = 1;</code>
4611      */
4612     public boolean hasBus() {
4613       return ((bitField0_ & 0x00000001) == 0x00000001);
4614     }
4615     /**
4616      * <code>optional int32 bus = 1;</code>
4617      */
4618     public int getBus() {
4619       return bus_;
4620     }
4621
4622     // optional uint32 message_id = 2;
4623     public static final int MESSAGE_ID_FIELD_NUMBER = 2;
4624     private int messageId_;
4625     /**
4626      * <code>optional uint32 message_id = 2;</code>
4627      */
4628     public boolean hasMessageId() {
4629       return ((bitField0_ & 0x00000002) == 0x00000002);
4630     }
4631     /**
4632      * <code>optional uint32 message_id = 2;</code>
4633      */
4634     public int getMessageId() {
4635       return messageId_;
4636     }
4637
4638     // optional uint32 mode = 3;
4639     public static final int MODE_FIELD_NUMBER = 3;
4640     private int mode_;
4641     /**
4642      * <code>optional uint32 mode = 3;</code>
4643      */
4644     public boolean hasMode() {
4645       return ((bitField0_ & 0x00000004) == 0x00000004);
4646     }
4647     /**
4648      * <code>optional uint32 mode = 3;</code>
4649      */
4650     public int getMode() {
4651       return mode_;
4652     }
4653
4654     // optional uint32 pid = 4;
4655     public static final int PID_FIELD_NUMBER = 4;
4656     private int pid_;
4657     /**
4658      * <code>optional uint32 pid = 4;</code>
4659      */
4660     public boolean hasPid() {
4661       return ((bitField0_ & 0x00000008) == 0x00000008);
4662     }
4663     /**
4664      * <code>optional uint32 pid = 4;</code>
4665      */
4666     public int getPid() {
4667       return pid_;
4668     }
4669
4670     // optional bool success = 5;
4671     public static final int SUCCESS_FIELD_NUMBER = 5;
4672     private boolean success_;
4673     /**
4674      * <code>optional bool success = 5;</code>
4675      */
4676     public boolean hasSuccess() {
4677       return ((bitField0_ & 0x00000010) == 0x00000010);
4678     }
4679     /**
4680      * <code>optional bool success = 5;</code>
4681      */
4682     public boolean getSuccess() {
4683       return success_;
4684     }
4685
4686     // optional uint32 negative_response_code = 6;
4687     public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
4688     private int negativeResponseCode_;
4689     /**
4690      * <code>optional uint32 negative_response_code = 6;</code>
4691      */
4692     public boolean hasNegativeResponseCode() {
4693       return ((bitField0_ & 0x00000020) == 0x00000020);
4694     }
4695     /**
4696      * <code>optional uint32 negative_response_code = 6;</code>
4697      */
4698     public int getNegativeResponseCode() {
4699       return negativeResponseCode_;
4700     }
4701
4702     // optional bytes payload = 7;
4703     public static final int PAYLOAD_FIELD_NUMBER = 7;
4704     private com.google.protobuf.ByteString payload_;
4705     /**
4706      * <code>optional bytes payload = 7;</code>
4707      *
4708      * <pre>
4709      * TODO we are capping this at 8 bytes for now - need to change when we
4710      * support multi-frame responses
4711      * </pre>
4712      */
4713     public boolean hasPayload() {
4714       return ((bitField0_ & 0x00000040) == 0x00000040);
4715     }
4716     /**
4717      * <code>optional bytes payload = 7;</code>
4718      *
4719      * <pre>
4720      * TODO we are capping this at 8 bytes for now - need to change when we
4721      * support multi-frame responses
4722      * </pre>
4723      */
4724     public com.google.protobuf.ByteString getPayload() {
4725       return payload_;
4726     }
4727
4728     // optional double value = 8;
4729     public static final int VALUE_FIELD_NUMBER = 8;
4730     private double value_;
4731     /**
4732      * <code>optional double value = 8;</code>
4733      */
4734     public boolean hasValue() {
4735       return ((bitField0_ & 0x00000080) == 0x00000080);
4736     }
4737     /**
4738      * <code>optional double value = 8;</code>
4739      */
4740     public double getValue() {
4741       return value_;
4742     }
4743
4744     private void initFields() {
4745       bus_ = 0;
4746       messageId_ = 0;
4747       mode_ = 0;
4748       pid_ = 0;
4749       success_ = false;
4750       negativeResponseCode_ = 0;
4751       payload_ = com.google.protobuf.ByteString.EMPTY;
4752       value_ = 0D;
4753     }
4754     private byte memoizedIsInitialized = -1;
4755     public final boolean isInitialized() {
4756       byte isInitialized = memoizedIsInitialized;
4757       if (isInitialized != -1) return isInitialized == 1;
4758
4759       memoizedIsInitialized = 1;
4760       return true;
4761     }
4762
4763     public void writeTo(com.google.protobuf.CodedOutputStream output)
4764                         throws java.io.IOException {
4765       getSerializedSize();
4766       if (((bitField0_ & 0x00000001) == 0x00000001)) {
4767         output.writeInt32(1, bus_);
4768       }
4769       if (((bitField0_ & 0x00000002) == 0x00000002)) {
4770         output.writeUInt32(2, messageId_);
4771       }
4772       if (((bitField0_ & 0x00000004) == 0x00000004)) {
4773         output.writeUInt32(3, mode_);
4774       }
4775       if (((bitField0_ & 0x00000008) == 0x00000008)) {
4776         output.writeUInt32(4, pid_);
4777       }
4778       if (((bitField0_ & 0x00000010) == 0x00000010)) {
4779         output.writeBool(5, success_);
4780       }
4781       if (((bitField0_ & 0x00000020) == 0x00000020)) {
4782         output.writeUInt32(6, negativeResponseCode_);
4783       }
4784       if (((bitField0_ & 0x00000040) == 0x00000040)) {
4785         output.writeBytes(7, payload_);
4786       }
4787       if (((bitField0_ & 0x00000080) == 0x00000080)) {
4788         output.writeDouble(8, value_);
4789       }
4790       getUnknownFields().writeTo(output);
4791     }
4792
4793     private int memoizedSerializedSize = -1;
4794     public int getSerializedSize() {
4795       int size = memoizedSerializedSize;
4796       if (size != -1) return size;
4797
4798       size = 0;
4799       if (((bitField0_ & 0x00000001) == 0x00000001)) {
4800         size += com.google.protobuf.CodedOutputStream
4801           .computeInt32Size(1, bus_);
4802       }
4803       if (((bitField0_ & 0x00000002) == 0x00000002)) {
4804         size += com.google.protobuf.CodedOutputStream
4805           .computeUInt32Size(2, messageId_);
4806       }
4807       if (((bitField0_ & 0x00000004) == 0x00000004)) {
4808         size += com.google.protobuf.CodedOutputStream
4809           .computeUInt32Size(3, mode_);
4810       }
4811       if (((bitField0_ & 0x00000008) == 0x00000008)) {
4812         size += com.google.protobuf.CodedOutputStream
4813           .computeUInt32Size(4, pid_);
4814       }
4815       if (((bitField0_ & 0x00000010) == 0x00000010)) {
4816         size += com.google.protobuf.CodedOutputStream
4817           .computeBoolSize(5, success_);
4818       }
4819       if (((bitField0_ & 0x00000020) == 0x00000020)) {
4820         size += com.google.protobuf.CodedOutputStream
4821           .computeUInt32Size(6, negativeResponseCode_);
4822       }
4823       if (((bitField0_ & 0x00000040) == 0x00000040)) {
4824         size += com.google.protobuf.CodedOutputStream
4825           .computeBytesSize(7, payload_);
4826       }
4827       if (((bitField0_ & 0x00000080) == 0x00000080)) {
4828         size += com.google.protobuf.CodedOutputStream
4829           .computeDoubleSize(8, value_);
4830       }
4831       size += getUnknownFields().getSerializedSize();
4832       memoizedSerializedSize = size;
4833       return size;
4834     }
4835
4836     private static final long serialVersionUID = 0L;
4837     @java.lang.Override
4838     protected java.lang.Object writeReplace()
4839         throws java.io.ObjectStreamException {
4840       return super.writeReplace();
4841     }
4842
4843     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4844         com.google.protobuf.ByteString data)
4845         throws com.google.protobuf.InvalidProtocolBufferException {
4846       return PARSER.parseFrom(data);
4847     }
4848     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4849         com.google.protobuf.ByteString data,
4850         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4851         throws com.google.protobuf.InvalidProtocolBufferException {
4852       return PARSER.parseFrom(data, extensionRegistry);
4853     }
4854     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data)
4855         throws com.google.protobuf.InvalidProtocolBufferException {
4856       return PARSER.parseFrom(data);
4857     }
4858     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4859         byte[] data,
4860         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4861         throws com.google.protobuf.InvalidProtocolBufferException {
4862       return PARSER.parseFrom(data, extensionRegistry);
4863     }
4864     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input)
4865         throws java.io.IOException {
4866       return PARSER.parseFrom(input);
4867     }
4868     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4869         java.io.InputStream input,
4870         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4871         throws java.io.IOException {
4872       return PARSER.parseFrom(input, extensionRegistry);
4873     }
4874     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input)
4875         throws java.io.IOException {
4876       return PARSER.parseDelimitedFrom(input);
4877     }
4878     public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(
4879         java.io.InputStream input,
4880         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4881         throws java.io.IOException {
4882       return PARSER.parseDelimitedFrom(input, extensionRegistry);
4883     }
4884     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4885         com.google.protobuf.CodedInputStream input)
4886         throws java.io.IOException {
4887       return PARSER.parseFrom(input);
4888     }
4889     public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4890         com.google.protobuf.CodedInputStream input,
4891         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4892         throws java.io.IOException {
4893       return PARSER.parseFrom(input, extensionRegistry);
4894     }
4895
4896     public static Builder newBuilder() { return Builder.create(); }
4897     public Builder newBuilderForType() { return newBuilder(); }
4898     public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) {
4899       return newBuilder().mergeFrom(prototype);
4900     }
4901     public Builder toBuilder() { return newBuilder(this); }
4902
4903     @java.lang.Override
4904     protected Builder newBuilderForType(
4905         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4906       Builder builder = new Builder(parent);
4907       return builder;
4908     }
4909     /**
4910      * Protobuf type {@code openxc.DiagnosticResponse}
4911      */
4912     public static final class Builder extends
4913         com.google.protobuf.GeneratedMessage.Builder<Builder>
4914        implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder {
4915       public static final com.google.protobuf.Descriptors.Descriptor
4916           getDescriptor() {
4917         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4918       }
4919
4920       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4921           internalGetFieldAccessorTable() {
4922         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
4923             .ensureFieldAccessorsInitialized(
4924                 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
4925       }
4926
4927       // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder()
4928       private Builder() {
4929         maybeForceBuilderInitialization();
4930       }
4931
4932       private Builder(
4933           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4934         super(parent);
4935         maybeForceBuilderInitialization();
4936       }
4937       private void maybeForceBuilderInitialization() {
4938         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4939         }
4940       }
4941       private static Builder create() {
4942         return new Builder();
4943       }
4944
4945       public Builder clear() {
4946         super.clear();
4947         bus_ = 0;
4948         bitField0_ = (bitField0_ & ~0x00000001);
4949         messageId_ = 0;
4950         bitField0_ = (bitField0_ & ~0x00000002);
4951         mode_ = 0;
4952         bitField0_ = (bitField0_ & ~0x00000004);
4953         pid_ = 0;
4954         bitField0_ = (bitField0_ & ~0x00000008);
4955         success_ = false;
4956         bitField0_ = (bitField0_ & ~0x00000010);
4957         negativeResponseCode_ = 0;
4958         bitField0_ = (bitField0_ & ~0x00000020);
4959         payload_ = com.google.protobuf.ByteString.EMPTY;
4960         bitField0_ = (bitField0_ & ~0x00000040);
4961         value_ = 0D;
4962         bitField0_ = (bitField0_ & ~0x00000080);
4963         return this;
4964       }
4965
4966       public Builder clone() {
4967         return create().mergeFrom(buildPartial());
4968       }
4969
4970       public com.google.protobuf.Descriptors.Descriptor
4971           getDescriptorForType() {
4972         return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4973       }
4974
4975       public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() {
4976         return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
4977       }
4978
4979       public com.openxc.BinaryMessages.DiagnosticResponse build() {
4980         com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial();
4981         if (!result.isInitialized()) {
4982           throw newUninitializedMessageException(result);
4983         }
4984         return result;
4985       }
4986
4987       public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() {
4988         com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this);
4989         int from_bitField0_ = bitField0_;
4990         int to_bitField0_ = 0;
4991         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4992           to_bitField0_ |= 0x00000001;
4993         }
4994         result.bus_ = bus_;
4995         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4996           to_bitField0_ |= 0x00000002;
4997         }
4998         result.messageId_ = messageId_;
4999         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5000           to_bitField0_ |= 0x00000004;
5001         }
5002         result.mode_ = mode_;
5003         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5004           to_bitField0_ |= 0x00000008;
5005         }
5006         result.pid_ = pid_;
5007         if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
5008           to_bitField0_ |= 0x00000010;
5009         }
5010         result.success_ = success_;
5011         if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
5012           to_bitField0_ |= 0x00000020;
5013         }
5014         result.negativeResponseCode_ = negativeResponseCode_;
5015         if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
5016           to_bitField0_ |= 0x00000040;
5017         }
5018         result.payload_ = payload_;
5019         if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
5020           to_bitField0_ |= 0x00000080;
5021         }
5022         result.value_ = value_;
5023         result.bitField0_ = to_bitField0_;
5024         onBuilt();
5025         return result;
5026       }
5027
5028       public Builder mergeFrom(com.google.protobuf.Message other) {
5029         if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) {
5030           return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other);
5031         } else {
5032           super.mergeFrom(other);
5033           return this;
5034         }
5035       }
5036
5037       public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) {
5038         if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this;
5039         if (other.hasBus()) {
5040           setBus(other.getBus());
5041         }
5042         if (other.hasMessageId()) {
5043           setMessageId(other.getMessageId());
5044         }
5045         if (other.hasMode()) {
5046           setMode(other.getMode());
5047         }
5048         if (other.hasPid()) {
5049           setPid(other.getPid());
5050         }
5051         if (other.hasSuccess()) {
5052           setSuccess(other.getSuccess());
5053         }
5054         if (other.hasNegativeResponseCode()) {
5055           setNegativeResponseCode(other.getNegativeResponseCode());
5056         }
5057         if (other.hasPayload()) {
5058           setPayload(other.getPayload());
5059         }
5060         if (other.hasValue()) {
5061           setValue(other.getValue());
5062         }
5063         this.mergeUnknownFields(other.getUnknownFields());
5064         return this;
5065       }
5066
5067       public final boolean isInitialized() {
5068         return true;
5069       }
5070
5071       public Builder mergeFrom(
5072           com.google.protobuf.CodedInputStream input,
5073           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5074           throws java.io.IOException {
5075         com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null;
5076         try {
5077           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5078         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5079           parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage();
5080           throw e;
5081         } finally {
5082           if (parsedMessage != null) {
5083             mergeFrom(parsedMessage);
5084           }
5085         }
5086         return this;
5087       }
5088       private int bitField0_;
5089
5090       // optional int32 bus = 1;
5091       private int bus_ ;
5092       /**
5093        * <code>optional int32 bus = 1;</code>
5094        */
5095       public boolean hasBus() {
5096         return ((bitField0_ & 0x00000001) == 0x00000001);
5097       }
5098       /**
5099        * <code>optional int32 bus = 1;</code>
5100        */
5101       public int getBus() {
5102         return bus_;
5103       }
5104       /**
5105        * <code>optional int32 bus = 1;</code>
5106        */
5107       public Builder setBus(int value) {
5108         bitField0_ |= 0x00000001;
5109         bus_ = value;
5110         onChanged();
5111         return this;
5112       }
5113       /**
5114        * <code>optional int32 bus = 1;</code>
5115        */
5116       public Builder clearBus() {
5117         bitField0_ = (bitField0_ & ~0x00000001);
5118         bus_ = 0;
5119         onChanged();
5120         return this;
5121       }
5122
5123       // optional uint32 message_id = 2;
5124       private int messageId_ ;
5125       /**
5126        * <code>optional uint32 message_id = 2;</code>
5127        */
5128       public boolean hasMessageId() {
5129         return ((bitField0_ & 0x00000002) == 0x00000002);
5130       }
5131       /**
5132        * <code>optional uint32 message_id = 2;</code>
5133        */
5134       public int getMessageId() {
5135         return messageId_;
5136       }
5137       /**
5138        * <code>optional uint32 message_id = 2;</code>
5139        */
5140       public Builder setMessageId(int value) {
5141         bitField0_ |= 0x00000002;
5142         messageId_ = value;
5143         onChanged();
5144         return this;
5145       }
5146       /**
5147        * <code>optional uint32 message_id = 2;</code>
5148        */
5149       public Builder clearMessageId() {
5150         bitField0_ = (bitField0_ & ~0x00000002);
5151         messageId_ = 0;
5152         onChanged();
5153         return this;
5154       }
5155
5156       // optional uint32 mode = 3;
5157       private int mode_ ;
5158       /**
5159        * <code>optional uint32 mode = 3;</code>
5160        */
5161       public boolean hasMode() {
5162         return ((bitField0_ & 0x00000004) == 0x00000004);
5163       }
5164       /**
5165        * <code>optional uint32 mode = 3;</code>
5166        */
5167       public int getMode() {
5168         return mode_;
5169       }
5170       /**
5171        * <code>optional uint32 mode = 3;</code>
5172        */
5173       public Builder setMode(int value) {
5174         bitField0_ |= 0x00000004;
5175         mode_ = value;
5176         onChanged();
5177         return this;
5178       }
5179       /**
5180        * <code>optional uint32 mode = 3;</code>
5181        */
5182       public Builder clearMode() {
5183         bitField0_ = (bitField0_ & ~0x00000004);
5184         mode_ = 0;
5185         onChanged();
5186         return this;
5187       }
5188
5189       // optional uint32 pid = 4;
5190       private int pid_ ;
5191       /**
5192        * <code>optional uint32 pid = 4;</code>
5193        */
5194       public boolean hasPid() {
5195         return ((bitField0_ & 0x00000008) == 0x00000008);
5196       }
5197       /**
5198        * <code>optional uint32 pid = 4;</code>
5199        */
5200       public int getPid() {
5201         return pid_;
5202       }
5203       /**
5204        * <code>optional uint32 pid = 4;</code>
5205        */
5206       public Builder setPid(int value) {
5207         bitField0_ |= 0x00000008;
5208         pid_ = value;
5209         onChanged();
5210         return this;
5211       }
5212       /**
5213        * <code>optional uint32 pid = 4;</code>
5214        */
5215       public Builder clearPid() {
5216         bitField0_ = (bitField0_ & ~0x00000008);
5217         pid_ = 0;
5218         onChanged();
5219         return this;
5220       }
5221
5222       // optional bool success = 5;
5223       private boolean success_ ;
5224       /**
5225        * <code>optional bool success = 5;</code>
5226        */
5227       public boolean hasSuccess() {
5228         return ((bitField0_ & 0x00000010) == 0x00000010);
5229       }
5230       /**
5231        * <code>optional bool success = 5;</code>
5232        */
5233       public boolean getSuccess() {
5234         return success_;
5235       }
5236       /**
5237        * <code>optional bool success = 5;</code>
5238        */
5239       public Builder setSuccess(boolean value) {
5240         bitField0_ |= 0x00000010;
5241         success_ = value;
5242         onChanged();
5243         return this;
5244       }
5245       /**
5246        * <code>optional bool success = 5;</code>
5247        */
5248       public Builder clearSuccess() {
5249         bitField0_ = (bitField0_ & ~0x00000010);
5250         success_ = false;
5251         onChanged();
5252         return this;
5253       }
5254
5255       // optional uint32 negative_response_code = 6;
5256       private int negativeResponseCode_ ;
5257       /**
5258        * <code>optional uint32 negative_response_code = 6;</code>
5259        */
5260       public boolean hasNegativeResponseCode() {
5261         return ((bitField0_ & 0x00000020) == 0x00000020);
5262       }
5263       /**
5264        * <code>optional uint32 negative_response_code = 6;</code>
5265        */
5266       public int getNegativeResponseCode() {
5267         return negativeResponseCode_;
5268       }
5269       /**
5270        * <code>optional uint32 negative_response_code = 6;</code>
5271        */
5272       public Builder setNegativeResponseCode(int value) {
5273         bitField0_ |= 0x00000020;
5274         negativeResponseCode_ = value;
5275         onChanged();
5276         return this;
5277       }
5278       /**
5279        * <code>optional uint32 negative_response_code = 6;</code>
5280        */
5281       public Builder clearNegativeResponseCode() {
5282         bitField0_ = (bitField0_ & ~0x00000020);
5283         negativeResponseCode_ = 0;
5284         onChanged();
5285         return this;
5286       }
5287
5288       // optional bytes payload = 7;
5289       private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
5290       /**
5291        * <code>optional bytes payload = 7;</code>
5292        *
5293        * <pre>
5294        * TODO we are capping this at 8 bytes for now - need to change when we
5295        * support multi-frame responses
5296        * </pre>
5297        */
5298       public boolean hasPayload() {
5299         return ((bitField0_ & 0x00000040) == 0x00000040);
5300       }
5301       /**
5302        * <code>optional bytes payload = 7;</code>
5303        *
5304        * <pre>
5305        * TODO we are capping this at 8 bytes for now - need to change when we
5306        * support multi-frame responses
5307        * </pre>
5308        */
5309       public com.google.protobuf.ByteString getPayload() {
5310         return payload_;
5311       }
5312       /**
5313        * <code>optional bytes payload = 7;</code>
5314        *
5315        * <pre>
5316        * TODO we are capping this at 8 bytes for now - need to change when we
5317        * support multi-frame responses
5318        * </pre>
5319        */
5320       public Builder setPayload(com.google.protobuf.ByteString value) {
5321         if (value == null) {
5322     throw new NullPointerException();
5323   }
5324   bitField0_ |= 0x00000040;
5325         payload_ = value;
5326         onChanged();
5327         return this;
5328       }
5329       /**
5330        * <code>optional bytes payload = 7;</code>
5331        *
5332        * <pre>
5333        * TODO we are capping this at 8 bytes for now - need to change when we
5334        * support multi-frame responses
5335        * </pre>
5336        */
5337       public Builder clearPayload() {
5338         bitField0_ = (bitField0_ & ~0x00000040);
5339         payload_ = getDefaultInstance().getPayload();
5340         onChanged();
5341         return this;
5342       }
5343
5344       // optional double value = 8;
5345       private double value_ ;
5346       /**
5347        * <code>optional double value = 8;</code>
5348        */
5349       public boolean hasValue() {
5350         return ((bitField0_ & 0x00000080) == 0x00000080);
5351       }
5352       /**
5353        * <code>optional double value = 8;</code>
5354        */
5355       public double getValue() {
5356         return value_;
5357       }
5358       /**
5359        * <code>optional double value = 8;</code>
5360        */
5361       public Builder setValue(double value) {
5362         bitField0_ |= 0x00000080;
5363         value_ = value;
5364         onChanged();
5365         return this;
5366       }
5367       /**
5368        * <code>optional double value = 8;</code>
5369        */
5370       public Builder clearValue() {
5371         bitField0_ = (bitField0_ & ~0x00000080);
5372         value_ = 0D;
5373         onChanged();
5374         return this;
5375       }
5376
5377       // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse)
5378     }
5379
5380     static {
5381       defaultInstance = new DiagnosticResponse(true);
5382       defaultInstance.initFields();
5383     }
5384
5385     // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse)
5386   }
5387
5388   public interface DynamicFieldOrBuilder
5389       extends com.google.protobuf.MessageOrBuilder {
5390
5391     // optional .openxc.DynamicField.Type type = 1;
5392     /**
5393      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5394      */
5395     boolean hasType();
5396     /**
5397      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5398      */
5399     com.openxc.BinaryMessages.DynamicField.Type getType();
5400
5401     // optional string string_value = 2;
5402     /**
5403      * <code>optional string string_value = 2;</code>
5404      */
5405     boolean hasStringValue();
5406     /**
5407      * <code>optional string string_value = 2;</code>
5408      */
5409     java.lang.String getStringValue();
5410     /**
5411      * <code>optional string string_value = 2;</code>
5412      */
5413     com.google.protobuf.ByteString
5414         getStringValueBytes();
5415
5416     // optional double numeric_value = 3;
5417     /**
5418      * <code>optional double numeric_value = 3;</code>
5419      */
5420     boolean hasNumericValue();
5421     /**
5422      * <code>optional double numeric_value = 3;</code>
5423      */
5424     double getNumericValue();
5425
5426     // optional bool boolean_value = 4;
5427     /**
5428      * <code>optional bool boolean_value = 4;</code>
5429      */
5430     boolean hasBooleanValue();
5431     /**
5432      * <code>optional bool boolean_value = 4;</code>
5433      */
5434     boolean getBooleanValue();
5435   }
5436   /**
5437    * Protobuf type {@code openxc.DynamicField}
5438    */
5439   public static final class DynamicField extends
5440       com.google.protobuf.GeneratedMessage
5441       implements DynamicFieldOrBuilder {
5442     // Use DynamicField.newBuilder() to construct.
5443     private DynamicField(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
5444       super(builder);
5445       this.unknownFields = builder.getUnknownFields();
5446     }
5447     private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
5448
5449     private static final DynamicField defaultInstance;
5450     public static DynamicField getDefaultInstance() {
5451       return defaultInstance;
5452     }
5453
5454     public DynamicField getDefaultInstanceForType() {
5455       return defaultInstance;
5456     }
5457
5458     private final com.google.protobuf.UnknownFieldSet unknownFields;
5459     @java.lang.Override
5460     public final com.google.protobuf.UnknownFieldSet
5461         getUnknownFields() {
5462       return this.unknownFields;
5463     }
5464     private DynamicField(
5465         com.google.protobuf.CodedInputStream input,
5466         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5467         throws com.google.protobuf.InvalidProtocolBufferException {
5468       initFields();
5469       int mutable_bitField0_ = 0;
5470       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
5471           com.google.protobuf.UnknownFieldSet.newBuilder();
5472       try {
5473         boolean done = false;
5474         while (!done) {
5475           int tag = input.readTag();
5476           switch (tag) {
5477             case 0:
5478               done = true;
5479               break;
5480             default: {
5481               if (!parseUnknownField(input, unknownFields,
5482                                      extensionRegistry, tag)) {
5483                 done = true;
5484               }
5485               break;
5486             }
5487             case 8: {
5488               int rawValue = input.readEnum();
5489               com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue);
5490               if (value == null) {
5491                 unknownFields.mergeVarintField(1, rawValue);
5492               } else {
5493                 bitField0_ |= 0x00000001;
5494                 type_ = value;
5495               }
5496               break;
5497             }
5498             case 18: {
5499               bitField0_ |= 0x00000002;
5500               stringValue_ = input.readBytes();
5501               break;
5502             }
5503             case 25: {
5504               bitField0_ |= 0x00000004;
5505               numericValue_ = input.readDouble();
5506               break;
5507             }
5508             case 32: {
5509               bitField0_ |= 0x00000008;
5510               booleanValue_ = input.readBool();
5511               break;
5512             }
5513           }
5514         }
5515       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5516         throw e.setUnfinishedMessage(this);
5517       } catch (java.io.IOException e) {
5518         throw new com.google.protobuf.InvalidProtocolBufferException(
5519             e.getMessage()).setUnfinishedMessage(this);
5520       } finally {
5521         this.unknownFields = unknownFields.build();
5522         makeExtensionsImmutable();
5523       }
5524     }
5525     public static final com.google.protobuf.Descriptors.Descriptor
5526         getDescriptor() {
5527       return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
5528     }
5529
5530     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5531         internalGetFieldAccessorTable() {
5532       return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
5533           .ensureFieldAccessorsInitialized(
5534               com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
5535     }
5536
5537     public static com.google.protobuf.Parser<DynamicField> PARSER =
5538         new com.google.protobuf.AbstractParser<DynamicField>() {
5539       public DynamicField parsePartialFrom(
5540           com.google.protobuf.CodedInputStream input,
5541           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5542           throws com.google.protobuf.InvalidProtocolBufferException {
5543         return new DynamicField(input, extensionRegistry);
5544       }
5545     };
5546
5547     @java.lang.Override
5548     public com.google.protobuf.Parser<DynamicField> getParserForType() {
5549       return PARSER;
5550     }
5551
5552     /**
5553      * Protobuf enum {@code openxc.DynamicField.Type}
5554      */
5555     public enum Type
5556         implements com.google.protobuf.ProtocolMessageEnum {
5557       /**
5558        * <code>STRING = 1;</code>
5559        */
5560       STRING(0, 1),
5561       /**
5562        * <code>NUM = 2;</code>
5563        */
5564       NUM(1, 2),
5565       /**
5566        * <code>BOOL = 3;</code>
5567        */
5568       BOOL(2, 3),
5569       ;
5570
5571       /**
5572        * <code>STRING = 1;</code>
5573        */
5574       public static final int STRING_VALUE = 1;
5575       /**
5576        * <code>NUM = 2;</code>
5577        */
5578       public static final int NUM_VALUE = 2;
5579       /**
5580        * <code>BOOL = 3;</code>
5581        */
5582       public static final int BOOL_VALUE = 3;
5583
5584
5585       public final int getNumber() { return value; }
5586
5587       public static Type valueOf(int value) {
5588         switch (value) {
5589           case 1: return STRING;
5590           case 2: return NUM;
5591           case 3: return BOOL;
5592           default: return null;
5593         }
5594       }
5595
5596       public static com.google.protobuf.Internal.EnumLiteMap<Type>
5597           internalGetValueMap() {
5598         return internalValueMap;
5599       }
5600       private static com.google.protobuf.Internal.EnumLiteMap<Type>
5601           internalValueMap =
5602             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
5603               public Type findValueByNumber(int number) {
5604                 return Type.valueOf(number);
5605               }
5606             };
5607
5608       public final com.google.protobuf.Descriptors.EnumValueDescriptor
5609           getValueDescriptor() {
5610         return getDescriptor().getValues().get(index);
5611       }
5612       public final com.google.protobuf.Descriptors.EnumDescriptor
5613           getDescriptorForType() {
5614         return getDescriptor();
5615       }
5616       public static final com.google.protobuf.Descriptors.EnumDescriptor
5617           getDescriptor() {
5618         return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0);
5619       }
5620
5621       private static final Type[] VALUES = values();
5622
5623       public static Type valueOf(
5624           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
5625         if (desc.getType() != getDescriptor()) {
5626           throw new java.lang.IllegalArgumentException(
5627             "EnumValueDescriptor is not for this type.");
5628         }
5629         return VALUES[desc.getIndex()];
5630       }
5631
5632       private final int index;
5633       private final int value;
5634
5635       private Type(int index, int value) {
5636         this.index = index;
5637         this.value = value;
5638       }
5639
5640       // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type)
5641     }
5642
5643     private int bitField0_;
5644     // optional .openxc.DynamicField.Type type = 1;
5645     public static final int TYPE_FIELD_NUMBER = 1;
5646     private com.openxc.BinaryMessages.DynamicField.Type type_;
5647     /**
5648      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5649      */
5650     public boolean hasType() {
5651       return ((bitField0_ & 0x00000001) == 0x00000001);
5652     }
5653     /**
5654      * <code>optional .openxc.DynamicField.Type type = 1;</code>
5655      */
5656     public com.openxc.BinaryMessages.DynamicField.Type getType() {
5657       return type_;
5658     }
5659
5660     // optional string string_value = 2;
5661     public static final int STRING_VALUE_FIELD_NUMBER = 2;
5662     private java.lang.Object stringValue_;
5663     /**
5664      * <code>optional string string_value = 2;</code>
5665      */
5666     public boolean hasStringValue() {
5667       return ((bitField0_ & 0x00000002) == 0x00000002);
5668     }
5669     /**
5670      * <code>optional string string_value = 2;</code>
5671      */
5672     public java.lang.String getStringValue() {
5673       java.lang.Object ref = stringValue_;
5674       if (ref instanceof java.lang.String) {
5675         return (java.lang.String) ref;
5676       } else {
5677         com.google.protobuf.ByteString bs = 
5678             (com.google.protobuf.ByteString) ref;
5679         java.lang.String s = bs.toStringUtf8();
5680         if (bs.isValidUtf8()) {
5681           stringValue_ = s;
5682         }
5683         return s;
5684       }
5685     }
5686     /**
5687      * <code>optional string string_value = 2;</code>
5688      */
5689     public com.google.protobuf.ByteString
5690         getStringValueBytes() {
5691       java.lang.Object ref = stringValue_;
5692       if (ref instanceof java.lang.String) {
5693         com.google.protobuf.ByteString b = 
5694             com.google.protobuf.ByteString.copyFromUtf8(
5695                 (java.lang.String) ref);
5696         stringValue_ = b;
5697         return b;
5698       } else {
5699         return (com.google.protobuf.ByteString) ref;
5700       }
5701     }
5702
5703     // optional double numeric_value = 3;
5704     public static final int NUMERIC_VALUE_FIELD_NUMBER = 3;
5705     private double numericValue_;
5706     /**
5707      * <code>optional double numeric_value = 3;</code>
5708      */
5709     public boolean hasNumericValue() {
5710       return ((bitField0_ & 0x00000004) == 0x00000004);
5711     }
5712     /**
5713      * <code>optional double numeric_value = 3;</code>
5714      */
5715     public double getNumericValue() {
5716       return numericValue_;
5717     }
5718
5719     // optional bool boolean_value = 4;
5720     public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4;
5721     private boolean booleanValue_;
5722     /**
5723      * <code>optional bool boolean_value = 4;</code>
5724      */
5725     public boolean hasBooleanValue() {
5726       return ((bitField0_ & 0x00000008) == 0x00000008);
5727     }
5728     /**
5729      * <code>optional bool boolean_value = 4;</code>
5730      */
5731     public boolean getBooleanValue() {
5732       return booleanValue_;
5733     }
5734
5735     private void initFields() {
5736       type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
5737       stringValue_ = "";
5738       numericValue_ = 0D;
5739       booleanValue_ = false;
5740     }
5741     private byte memoizedIsInitialized = -1;
5742     public final boolean isInitialized() {
5743       byte isInitialized = memoizedIsInitialized;
5744       if (isInitialized != -1) return isInitialized == 1;
5745
5746       memoizedIsInitialized = 1;
5747       return true;
5748     }
5749
5750     public void writeTo(com.google.protobuf.CodedOutputStream output)
5751                         throws java.io.IOException {
5752       getSerializedSize();
5753       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5754         output.writeEnum(1, type_.getNumber());
5755       }
5756       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5757         output.writeBytes(2, getStringValueBytes());
5758       }
5759       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5760         output.writeDouble(3, numericValue_);
5761       }
5762       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5763         output.writeBool(4, booleanValue_);
5764       }
5765       getUnknownFields().writeTo(output);
5766     }
5767
5768     private int memoizedSerializedSize = -1;
5769     public int getSerializedSize() {
5770       int size = memoizedSerializedSize;
5771       if (size != -1) return size;
5772
5773       size = 0;
5774       if (((bitField0_ & 0x00000001) == 0x00000001)) {
5775         size += com.google.protobuf.CodedOutputStream
5776           .computeEnumSize(1, type_.getNumber());
5777       }
5778       if (((bitField0_ & 0x00000002) == 0x00000002)) {
5779         size += com.google.protobuf.CodedOutputStream
5780           .computeBytesSize(2, getStringValueBytes());
5781       }
5782       if (((bitField0_ & 0x00000004) == 0x00000004)) {
5783         size += com.google.protobuf.CodedOutputStream
5784           .computeDoubleSize(3, numericValue_);
5785       }
5786       if (((bitField0_ & 0x00000008) == 0x00000008)) {
5787         size += com.google.protobuf.CodedOutputStream
5788           .computeBoolSize(4, booleanValue_);
5789       }
5790       size += getUnknownFields().getSerializedSize();
5791       memoizedSerializedSize = size;
5792       return size;
5793     }
5794
5795     private static final long serialVersionUID = 0L;
5796     @java.lang.Override
5797     protected java.lang.Object writeReplace()
5798         throws java.io.ObjectStreamException {
5799       return super.writeReplace();
5800     }
5801
5802     public static com.openxc.BinaryMessages.DynamicField parseFrom(
5803         com.google.protobuf.ByteString data)
5804         throws com.google.protobuf.InvalidProtocolBufferException {
5805       return PARSER.parseFrom(data);
5806     }
5807     public static com.openxc.BinaryMessages.DynamicField parseFrom(
5808         com.google.protobuf.ByteString data,
5809         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5810         throws com.google.protobuf.InvalidProtocolBufferException {
5811       return PARSER.parseFrom(data, extensionRegistry);
5812     }
5813     public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data)
5814         throws com.google.protobuf.InvalidProtocolBufferException {
5815       return PARSER.parseFrom(data);
5816     }
5817     public static com.openxc.BinaryMessages.DynamicField parseFrom(
5818         byte[] data,
5819         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5820         throws com.google.protobuf.InvalidProtocolBufferException {
5821       return PARSER.parseFrom(data, extensionRegistry);
5822     }
5823     public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input)
5824         throws java.io.IOException {
5825       return PARSER.parseFrom(input);
5826     }
5827     public static com.openxc.BinaryMessages.DynamicField parseFrom(
5828         java.io.InputStream input,
5829         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5830         throws java.io.IOException {
5831       return PARSER.parseFrom(input, extensionRegistry);
5832     }
5833     public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input)
5834         throws java.io.IOException {
5835       return PARSER.parseDelimitedFrom(input);
5836     }
5837     public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(
5838         java.io.InputStream input,
5839         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5840         throws java.io.IOException {
5841       return PARSER.parseDelimitedFrom(input, extensionRegistry);
5842     }
5843     public static com.openxc.BinaryMessages.DynamicField parseFrom(
5844         com.google.protobuf.CodedInputStream input)
5845         throws java.io.IOException {
5846       return PARSER.parseFrom(input);
5847     }
5848     public static com.openxc.BinaryMessages.DynamicField parseFrom(
5849         com.google.protobuf.CodedInputStream input,
5850         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5851         throws java.io.IOException {
5852       return PARSER.parseFrom(input, extensionRegistry);
5853     }
5854
5855     public static Builder newBuilder() { return Builder.create(); }
5856     public Builder newBuilderForType() { return newBuilder(); }
5857     public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) {
5858       return newBuilder().mergeFrom(prototype);
5859     }
5860     public Builder toBuilder() { return newBuilder(this); }
5861
5862     @java.lang.Override
5863     protected Builder newBuilderForType(
5864         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5865       Builder builder = new Builder(parent);
5866       return builder;
5867     }
5868     /**
5869      * Protobuf type {@code openxc.DynamicField}
5870      */
5871     public static final class Builder extends
5872         com.google.protobuf.GeneratedMessage.Builder<Builder>
5873        implements com.openxc.BinaryMessages.DynamicFieldOrBuilder {
5874       public static final com.google.protobuf.Descriptors.Descriptor
5875           getDescriptor() {
5876         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
5877       }
5878
5879       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5880           internalGetFieldAccessorTable() {
5881         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
5882             .ensureFieldAccessorsInitialized(
5883                 com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
5884       }
5885
5886       // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder()
5887       private Builder() {
5888         maybeForceBuilderInitialization();
5889       }
5890
5891       private Builder(
5892           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5893         super(parent);
5894         maybeForceBuilderInitialization();
5895       }
5896       private void maybeForceBuilderInitialization() {
5897         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
5898         }
5899       }
5900       private static Builder create() {
5901         return new Builder();
5902       }
5903
5904       public Builder clear() {
5905         super.clear();
5906         type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
5907         bitField0_ = (bitField0_ & ~0x00000001);
5908         stringValue_ = "";
5909         bitField0_ = (bitField0_ & ~0x00000002);
5910         numericValue_ = 0D;
5911         bitField0_ = (bitField0_ & ~0x00000004);
5912         booleanValue_ = false;
5913         bitField0_ = (bitField0_ & ~0x00000008);
5914         return this;
5915       }
5916
5917       public Builder clone() {
5918         return create().mergeFrom(buildPartial());
5919       }
5920
5921       public com.google.protobuf.Descriptors.Descriptor
5922           getDescriptorForType() {
5923         return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
5924       }
5925
5926       public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() {
5927         return com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
5928       }
5929
5930       public com.openxc.BinaryMessages.DynamicField build() {
5931         com.openxc.BinaryMessages.DynamicField result = buildPartial();
5932         if (!result.isInitialized()) {
5933           throw newUninitializedMessageException(result);
5934         }
5935         return result;
5936       }
5937
5938       public com.openxc.BinaryMessages.DynamicField buildPartial() {
5939         com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this);
5940         int from_bitField0_ = bitField0_;
5941         int to_bitField0_ = 0;
5942         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
5943           to_bitField0_ |= 0x00000001;
5944         }
5945         result.type_ = type_;
5946         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
5947           to_bitField0_ |= 0x00000002;
5948         }
5949         result.stringValue_ = stringValue_;
5950         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5951           to_bitField0_ |= 0x00000004;
5952         }
5953         result.numericValue_ = numericValue_;
5954         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5955           to_bitField0_ |= 0x00000008;
5956         }
5957         result.booleanValue_ = booleanValue_;
5958         result.bitField0_ = to_bitField0_;
5959         onBuilt();
5960         return result;
5961       }
5962
5963       public Builder mergeFrom(com.google.protobuf.Message other) {
5964         if (other instanceof com.openxc.BinaryMessages.DynamicField) {
5965           return mergeFrom((com.openxc.BinaryMessages.DynamicField)other);
5966         } else {
5967           super.mergeFrom(other);
5968           return this;
5969         }
5970       }
5971
5972       public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) {
5973         if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this;
5974         if (other.hasType()) {
5975           setType(other.getType());
5976         }
5977         if (other.hasStringValue()) {
5978           bitField0_ |= 0x00000002;
5979           stringValue_ = other.stringValue_;
5980           onChanged();
5981         }
5982         if (other.hasNumericValue()) {
5983           setNumericValue(other.getNumericValue());
5984         }
5985         if (other.hasBooleanValue()) {
5986           setBooleanValue(other.getBooleanValue());
5987         }
5988         this.mergeUnknownFields(other.getUnknownFields());
5989         return this;
5990       }
5991
5992       public final boolean isInitialized() {
5993         return true;
5994       }
5995
5996       public Builder mergeFrom(
5997           com.google.protobuf.CodedInputStream input,
5998           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5999           throws java.io.IOException {
6000         com.openxc.BinaryMessages.DynamicField parsedMessage = null;
6001         try {
6002           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
6003         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6004           parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage();
6005           throw e;
6006         } finally {
6007           if (parsedMessage != null) {
6008             mergeFrom(parsedMessage);
6009           }
6010         }
6011         return this;
6012       }
6013       private int bitField0_;
6014
6015       // optional .openxc.DynamicField.Type type = 1;
6016       private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6017       /**
6018        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6019        */
6020       public boolean hasType() {
6021         return ((bitField0_ & 0x00000001) == 0x00000001);
6022       }
6023       /**
6024        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6025        */
6026       public com.openxc.BinaryMessages.DynamicField.Type getType() {
6027         return type_;
6028       }
6029       /**
6030        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6031        */
6032       public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) {
6033         if (value == null) {
6034           throw new NullPointerException();
6035         }
6036         bitField0_ |= 0x00000001;
6037         type_ = value;
6038         onChanged();
6039         return this;
6040       }
6041       /**
6042        * <code>optional .openxc.DynamicField.Type type = 1;</code>
6043        */
6044       public Builder clearType() {
6045         bitField0_ = (bitField0_ & ~0x00000001);
6046         type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6047         onChanged();
6048         return this;
6049       }
6050
6051       // optional string string_value = 2;
6052       private java.lang.Object stringValue_ = "";
6053       /**
6054        * <code>optional string string_value = 2;</code>
6055        */
6056       public boolean hasStringValue() {
6057         return ((bitField0_ & 0x00000002) == 0x00000002);
6058       }
6059       /**
6060        * <code>optional string string_value = 2;</code>
6061        */
6062       public java.lang.String getStringValue() {
6063         java.lang.Object ref = stringValue_;
6064         if (!(ref instanceof java.lang.String)) {
6065           java.lang.String s = ((com.google.protobuf.ByteString) ref)
6066               .toStringUtf8();
6067           stringValue_ = s;
6068           return s;
6069         } else {
6070           return (java.lang.String) ref;
6071         }
6072       }
6073       /**
6074        * <code>optional string string_value = 2;</code>
6075        */
6076       public com.google.protobuf.ByteString
6077           getStringValueBytes() {
6078         java.lang.Object ref = stringValue_;
6079         if (ref instanceof String) {
6080           com.google.protobuf.ByteString b = 
6081               com.google.protobuf.ByteString.copyFromUtf8(
6082                   (java.lang.String) ref);
6083           stringValue_ = b;
6084           return b;
6085         } else {
6086           return (com.google.protobuf.ByteString) ref;
6087         }
6088       }
6089       /**
6090        * <code>optional string string_value = 2;</code>
6091        */
6092       public Builder setStringValue(
6093           java.lang.String value) {
6094         if (value == null) {
6095     throw new NullPointerException();
6096   }
6097   bitField0_ |= 0x00000002;
6098         stringValue_ = value;
6099         onChanged();
6100         return this;
6101       }
6102       /**
6103        * <code>optional string string_value = 2;</code>
6104        */
6105       public Builder clearStringValue() {
6106         bitField0_ = (bitField0_ & ~0x00000002);
6107         stringValue_ = getDefaultInstance().getStringValue();
6108         onChanged();
6109         return this;
6110       }
6111       /**
6112        * <code>optional string string_value = 2;</code>
6113        */
6114       public Builder setStringValueBytes(
6115           com.google.protobuf.ByteString value) {
6116         if (value == null) {
6117     throw new NullPointerException();
6118   }
6119   bitField0_ |= 0x00000002;
6120         stringValue_ = value;
6121         onChanged();
6122         return this;
6123       }
6124
6125       // optional double numeric_value = 3;
6126       private double numericValue_ ;
6127       /**
6128        * <code>optional double numeric_value = 3;</code>
6129        */
6130       public boolean hasNumericValue() {
6131         return ((bitField0_ & 0x00000004) == 0x00000004);
6132       }
6133       /**
6134        * <code>optional double numeric_value = 3;</code>
6135        */
6136       public double getNumericValue() {
6137         return numericValue_;
6138       }
6139       /**
6140        * <code>optional double numeric_value = 3;</code>
6141        */
6142       public Builder setNumericValue(double value) {
6143         bitField0_ |= 0x00000004;
6144         numericValue_ = value;
6145         onChanged();
6146         return this;
6147       }
6148       /**
6149        * <code>optional double numeric_value = 3;</code>
6150        */
6151       public Builder clearNumericValue() {
6152         bitField0_ = (bitField0_ & ~0x00000004);
6153         numericValue_ = 0D;
6154         onChanged();
6155         return this;
6156       }
6157
6158       // optional bool boolean_value = 4;
6159       private boolean booleanValue_ ;
6160       /**
6161        * <code>optional bool boolean_value = 4;</code>
6162        */
6163       public boolean hasBooleanValue() {
6164         return ((bitField0_ & 0x00000008) == 0x00000008);
6165       }
6166       /**
6167        * <code>optional bool boolean_value = 4;</code>
6168        */
6169       public boolean getBooleanValue() {
6170         return booleanValue_;
6171       }
6172       /**
6173        * <code>optional bool boolean_value = 4;</code>
6174        */
6175       public Builder setBooleanValue(boolean value) {
6176         bitField0_ |= 0x00000008;
6177         booleanValue_ = value;
6178         onChanged();
6179         return this;
6180       }
6181       /**
6182        * <code>optional bool boolean_value = 4;</code>
6183        */
6184       public Builder clearBooleanValue() {
6185         bitField0_ = (bitField0_ & ~0x00000008);
6186         booleanValue_ = false;
6187         onChanged();
6188         return this;
6189       }
6190
6191       // @@protoc_insertion_point(builder_scope:openxc.DynamicField)
6192     }
6193
6194     static {
6195       defaultInstance = new DynamicField(true);
6196       defaultInstance.initFields();
6197     }
6198
6199     // @@protoc_insertion_point(class_scope:openxc.DynamicField)
6200   }
6201
6202   public interface TranslatedMessageOrBuilder
6203       extends com.google.protobuf.MessageOrBuilder {
6204
6205     // optional .openxc.TranslatedMessage.Type type = 1;
6206     /**
6207      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6208      */
6209     boolean hasType();
6210     /**
6211      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6212      */
6213     com.openxc.BinaryMessages.TranslatedMessage.Type getType();
6214
6215     // optional string name = 2;
6216     /**
6217      * <code>optional string name = 2;</code>
6218      */
6219     boolean hasName();
6220     /**
6221      * <code>optional string name = 2;</code>
6222      */
6223     java.lang.String getName();
6224     /**
6225      * <code>optional string name = 2;</code>
6226      */
6227     com.google.protobuf.ByteString
6228         getNameBytes();
6229
6230     // optional .openxc.DynamicField value = 3;
6231     /**
6232      * <code>optional .openxc.DynamicField value = 3;</code>
6233      */
6234     boolean hasValue();
6235     /**
6236      * <code>optional .openxc.DynamicField value = 3;</code>
6237      */
6238     com.openxc.BinaryMessages.DynamicField getValue();
6239     /**
6240      * <code>optional .openxc.DynamicField value = 3;</code>
6241      */
6242     com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder();
6243
6244     // optional .openxc.DynamicField event = 4;
6245     /**
6246      * <code>optional .openxc.DynamicField event = 4;</code>
6247      */
6248     boolean hasEvent();
6249     /**
6250      * <code>optional .openxc.DynamicField event = 4;</code>
6251      */
6252     com.openxc.BinaryMessages.DynamicField getEvent();
6253     /**
6254      * <code>optional .openxc.DynamicField event = 4;</code>
6255      */
6256     com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder();
6257   }
6258   /**
6259    * Protobuf type {@code openxc.TranslatedMessage}
6260    */
6261   public static final class TranslatedMessage extends
6262       com.google.protobuf.GeneratedMessage
6263       implements TranslatedMessageOrBuilder {
6264     // Use TranslatedMessage.newBuilder() to construct.
6265     private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
6266       super(builder);
6267       this.unknownFields = builder.getUnknownFields();
6268     }
6269     private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
6270
6271     private static final TranslatedMessage defaultInstance;
6272     public static TranslatedMessage getDefaultInstance() {
6273       return defaultInstance;
6274     }
6275
6276     public TranslatedMessage getDefaultInstanceForType() {
6277       return defaultInstance;
6278     }
6279
6280     private final com.google.protobuf.UnknownFieldSet unknownFields;
6281     @java.lang.Override
6282     public final com.google.protobuf.UnknownFieldSet
6283         getUnknownFields() {
6284       return this.unknownFields;
6285     }
6286     private TranslatedMessage(
6287         com.google.protobuf.CodedInputStream input,
6288         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6289         throws com.google.protobuf.InvalidProtocolBufferException {
6290       initFields();
6291       int mutable_bitField0_ = 0;
6292       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
6293           com.google.protobuf.UnknownFieldSet.newBuilder();
6294       try {
6295         boolean done = false;
6296         while (!done) {
6297           int tag = input.readTag();
6298           switch (tag) {
6299             case 0:
6300               done = true;
6301               break;
6302             default: {
6303               if (!parseUnknownField(input, unknownFields,
6304                                      extensionRegistry, tag)) {
6305                 done = true;
6306               }
6307               break;
6308             }
6309             case 8: {
6310               int rawValue = input.readEnum();
6311               com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
6312               if (value == null) {
6313                 unknownFields.mergeVarintField(1, rawValue);
6314               } else {
6315                 bitField0_ |= 0x00000001;
6316                 type_ = value;
6317               }
6318               break;
6319             }
6320             case 18: {
6321               bitField0_ |= 0x00000002;
6322               name_ = input.readBytes();
6323               break;
6324             }
6325             case 26: {
6326               com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
6327               if (((bitField0_ & 0x00000004) == 0x00000004)) {
6328                 subBuilder = value_.toBuilder();
6329               }
6330               value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
6331               if (subBuilder != null) {
6332                 subBuilder.mergeFrom(value_);
6333                 value_ = subBuilder.buildPartial();
6334               }
6335               bitField0_ |= 0x00000004;
6336               break;
6337             }
6338             case 34: {
6339               com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
6340               if (((bitField0_ & 0x00000008) == 0x00000008)) {
6341                 subBuilder = event_.toBuilder();
6342               }
6343               event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
6344               if (subBuilder != null) {
6345                 subBuilder.mergeFrom(event_);
6346                 event_ = subBuilder.buildPartial();
6347               }
6348               bitField0_ |= 0x00000008;
6349               break;
6350             }
6351           }
6352         }
6353       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6354         throw e.setUnfinishedMessage(this);
6355       } catch (java.io.IOException e) {
6356         throw new com.google.protobuf.InvalidProtocolBufferException(
6357             e.getMessage()).setUnfinishedMessage(this);
6358       } finally {
6359         this.unknownFields = unknownFields.build();
6360         makeExtensionsImmutable();
6361       }
6362     }
6363     public static final com.google.protobuf.Descriptors.Descriptor
6364         getDescriptor() {
6365       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6366     }
6367
6368     protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6369         internalGetFieldAccessorTable() {
6370       return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
6371           .ensureFieldAccessorsInitialized(
6372               com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
6373     }
6374
6375     public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
6376         new com.google.protobuf.AbstractParser<TranslatedMessage>() {
6377       public TranslatedMessage parsePartialFrom(
6378           com.google.protobuf.CodedInputStream input,
6379           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6380           throws com.google.protobuf.InvalidProtocolBufferException {
6381         return new TranslatedMessage(input, extensionRegistry);
6382       }
6383     };
6384
6385     @java.lang.Override
6386     public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
6387       return PARSER;
6388     }
6389
6390     /**
6391      * Protobuf enum {@code openxc.TranslatedMessage.Type}
6392      */
6393     public enum Type
6394         implements com.google.protobuf.ProtocolMessageEnum {
6395       /**
6396        * <code>STRING = 1;</code>
6397        */
6398       STRING(0, 1),
6399       /**
6400        * <code>NUM = 2;</code>
6401        */
6402       NUM(1, 2),
6403       /**
6404        * <code>BOOL = 3;</code>
6405        */
6406       BOOL(2, 3),
6407       /**
6408        * <code>EVENTED_STRING = 4;</code>
6409        */
6410       EVENTED_STRING(3, 4),
6411       /**
6412        * <code>EVENTED_NUM = 5;</code>
6413        */
6414       EVENTED_NUM(4, 5),
6415       /**
6416        * <code>EVENTED_BOOL = 6;</code>
6417        */
6418       EVENTED_BOOL(5, 6),
6419       ;
6420
6421       /**
6422        * <code>STRING = 1;</code>
6423        */
6424       public static final int STRING_VALUE = 1;
6425       /**
6426        * <code>NUM = 2;</code>
6427        */
6428       public static final int NUM_VALUE = 2;
6429       /**
6430        * <code>BOOL = 3;</code>
6431        */
6432       public static final int BOOL_VALUE = 3;
6433       /**
6434        * <code>EVENTED_STRING = 4;</code>
6435        */
6436       public static final int EVENTED_STRING_VALUE = 4;
6437       /**
6438        * <code>EVENTED_NUM = 5;</code>
6439        */
6440       public static final int EVENTED_NUM_VALUE = 5;
6441       /**
6442        * <code>EVENTED_BOOL = 6;</code>
6443        */
6444       public static final int EVENTED_BOOL_VALUE = 6;
6445
6446
6447       public final int getNumber() { return value; }
6448
6449       public static Type valueOf(int value) {
6450         switch (value) {
6451           case 1: return STRING;
6452           case 2: return NUM;
6453           case 3: return BOOL;
6454           case 4: return EVENTED_STRING;
6455           case 5: return EVENTED_NUM;
6456           case 6: return EVENTED_BOOL;
6457           default: return null;
6458         }
6459       }
6460
6461       public static com.google.protobuf.Internal.EnumLiteMap<Type>
6462           internalGetValueMap() {
6463         return internalValueMap;
6464       }
6465       private static com.google.protobuf.Internal.EnumLiteMap<Type>
6466           internalValueMap =
6467             new com.google.protobuf.Internal.EnumLiteMap<Type>() {
6468               public Type findValueByNumber(int number) {
6469                 return Type.valueOf(number);
6470               }
6471             };
6472
6473       public final com.google.protobuf.Descriptors.EnumValueDescriptor
6474           getValueDescriptor() {
6475         return getDescriptor().getValues().get(index);
6476       }
6477       public final com.google.protobuf.Descriptors.EnumDescriptor
6478           getDescriptorForType() {
6479         return getDescriptor();
6480       }
6481       public static final com.google.protobuf.Descriptors.EnumDescriptor
6482           getDescriptor() {
6483         return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
6484       }
6485
6486       private static final Type[] VALUES = values();
6487
6488       public static Type valueOf(
6489           com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
6490         if (desc.getType() != getDescriptor()) {
6491           throw new java.lang.IllegalArgumentException(
6492             "EnumValueDescriptor is not for this type.");
6493         }
6494         return VALUES[desc.getIndex()];
6495       }
6496
6497       private final int index;
6498       private final int value;
6499
6500       private Type(int index, int value) {
6501         this.index = index;
6502         this.value = value;
6503       }
6504
6505       // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
6506     }
6507
6508     private int bitField0_;
6509     // optional .openxc.TranslatedMessage.Type type = 1;
6510     public static final int TYPE_FIELD_NUMBER = 1;
6511     private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
6512     /**
6513      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6514      */
6515     public boolean hasType() {
6516       return ((bitField0_ & 0x00000001) == 0x00000001);
6517     }
6518     /**
6519      * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6520      */
6521     public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
6522       return type_;
6523     }
6524
6525     // optional string name = 2;
6526     public static final int NAME_FIELD_NUMBER = 2;
6527     private java.lang.Object name_;
6528     /**
6529      * <code>optional string name = 2;</code>
6530      */
6531     public boolean hasName() {
6532       return ((bitField0_ & 0x00000002) == 0x00000002);
6533     }
6534     /**
6535      * <code>optional string name = 2;</code>
6536      */
6537     public java.lang.String getName() {
6538       java.lang.Object ref = name_;
6539       if (ref instanceof java.lang.String) {
6540         return (java.lang.String) ref;
6541       } else {
6542         com.google.protobuf.ByteString bs = 
6543             (com.google.protobuf.ByteString) ref;
6544         java.lang.String s = bs.toStringUtf8();
6545         if (bs.isValidUtf8()) {
6546           name_ = s;
6547         }
6548         return s;
6549       }
6550     }
6551     /**
6552      * <code>optional string name = 2;</code>
6553      */
6554     public com.google.protobuf.ByteString
6555         getNameBytes() {
6556       java.lang.Object ref = name_;
6557       if (ref instanceof java.lang.String) {
6558         com.google.protobuf.ByteString b = 
6559             com.google.protobuf.ByteString.copyFromUtf8(
6560                 (java.lang.String) ref);
6561         name_ = b;
6562         return b;
6563       } else {
6564         return (com.google.protobuf.ByteString) ref;
6565       }
6566     }
6567
6568     // optional .openxc.DynamicField value = 3;
6569     public static final int VALUE_FIELD_NUMBER = 3;
6570     private com.openxc.BinaryMessages.DynamicField value_;
6571     /**
6572      * <code>optional .openxc.DynamicField value = 3;</code>
6573      */
6574     public boolean hasValue() {
6575       return ((bitField0_ & 0x00000004) == 0x00000004);
6576     }
6577     /**
6578      * <code>optional .openxc.DynamicField value = 3;</code>
6579      */
6580     public com.openxc.BinaryMessages.DynamicField getValue() {
6581       return value_;
6582     }
6583     /**
6584      * <code>optional .openxc.DynamicField value = 3;</code>
6585      */
6586     public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
6587       return value_;
6588     }
6589
6590     // optional .openxc.DynamicField event = 4;
6591     public static final int EVENT_FIELD_NUMBER = 4;
6592     private com.openxc.BinaryMessages.DynamicField event_;
6593     /**
6594      * <code>optional .openxc.DynamicField event = 4;</code>
6595      */
6596     public boolean hasEvent() {
6597       return ((bitField0_ & 0x00000008) == 0x00000008);
6598     }
6599     /**
6600      * <code>optional .openxc.DynamicField event = 4;</code>
6601      */
6602     public com.openxc.BinaryMessages.DynamicField getEvent() {
6603       return event_;
6604     }
6605     /**
6606      * <code>optional .openxc.DynamicField event = 4;</code>
6607      */
6608     public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
6609       return event_;
6610     }
6611
6612     private void initFields() {
6613       type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
6614       name_ = "";
6615       value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6616       event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6617     }
6618     private byte memoizedIsInitialized = -1;
6619     public final boolean isInitialized() {
6620       byte isInitialized = memoizedIsInitialized;
6621       if (isInitialized != -1) return isInitialized == 1;
6622
6623       memoizedIsInitialized = 1;
6624       return true;
6625     }
6626
6627     public void writeTo(com.google.protobuf.CodedOutputStream output)
6628                         throws java.io.IOException {
6629       getSerializedSize();
6630       if (((bitField0_ & 0x00000001) == 0x00000001)) {
6631         output.writeEnum(1, type_.getNumber());
6632       }
6633       if (((bitField0_ & 0x00000002) == 0x00000002)) {
6634         output.writeBytes(2, getNameBytes());
6635       }
6636       if (((bitField0_ & 0x00000004) == 0x00000004)) {
6637         output.writeMessage(3, value_);
6638       }
6639       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6640         output.writeMessage(4, event_);
6641       }
6642       getUnknownFields().writeTo(output);
6643     }
6644
6645     private int memoizedSerializedSize = -1;
6646     public int getSerializedSize() {
6647       int size = memoizedSerializedSize;
6648       if (size != -1) return size;
6649
6650       size = 0;
6651       if (((bitField0_ & 0x00000001) == 0x00000001)) {
6652         size += com.google.protobuf.CodedOutputStream
6653           .computeEnumSize(1, type_.getNumber());
6654       }
6655       if (((bitField0_ & 0x00000002) == 0x00000002)) {
6656         size += com.google.protobuf.CodedOutputStream
6657           .computeBytesSize(2, getNameBytes());
6658       }
6659       if (((bitField0_ & 0x00000004) == 0x00000004)) {
6660         size += com.google.protobuf.CodedOutputStream
6661           .computeMessageSize(3, value_);
6662       }
6663       if (((bitField0_ & 0x00000008) == 0x00000008)) {
6664         size += com.google.protobuf.CodedOutputStream
6665           .computeMessageSize(4, event_);
6666       }
6667       size += getUnknownFields().getSerializedSize();
6668       memoizedSerializedSize = size;
6669       return size;
6670     }
6671
6672     private static final long serialVersionUID = 0L;
6673     @java.lang.Override
6674     protected java.lang.Object writeReplace()
6675         throws java.io.ObjectStreamException {
6676       return super.writeReplace();
6677     }
6678
6679     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6680         com.google.protobuf.ByteString data)
6681         throws com.google.protobuf.InvalidProtocolBufferException {
6682       return PARSER.parseFrom(data);
6683     }
6684     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6685         com.google.protobuf.ByteString data,
6686         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6687         throws com.google.protobuf.InvalidProtocolBufferException {
6688       return PARSER.parseFrom(data, extensionRegistry);
6689     }
6690     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
6691         throws com.google.protobuf.InvalidProtocolBufferException {
6692       return PARSER.parseFrom(data);
6693     }
6694     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6695         byte[] data,
6696         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6697         throws com.google.protobuf.InvalidProtocolBufferException {
6698       return PARSER.parseFrom(data, extensionRegistry);
6699     }
6700     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
6701         throws java.io.IOException {
6702       return PARSER.parseFrom(input);
6703     }
6704     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6705         java.io.InputStream input,
6706         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6707         throws java.io.IOException {
6708       return PARSER.parseFrom(input, extensionRegistry);
6709     }
6710     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
6711         throws java.io.IOException {
6712       return PARSER.parseDelimitedFrom(input);
6713     }
6714     public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
6715         java.io.InputStream input,
6716         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6717         throws java.io.IOException {
6718       return PARSER.parseDelimitedFrom(input, extensionRegistry);
6719     }
6720     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6721         com.google.protobuf.CodedInputStream input)
6722         throws java.io.IOException {
6723       return PARSER.parseFrom(input);
6724     }
6725     public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6726         com.google.protobuf.CodedInputStream input,
6727         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6728         throws java.io.IOException {
6729       return PARSER.parseFrom(input, extensionRegistry);
6730     }
6731
6732     public static Builder newBuilder() { return Builder.create(); }
6733     public Builder newBuilderForType() { return newBuilder(); }
6734     public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
6735       return newBuilder().mergeFrom(prototype);
6736     }
6737     public Builder toBuilder() { return newBuilder(this); }
6738
6739     @java.lang.Override
6740     protected Builder newBuilderForType(
6741         com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6742       Builder builder = new Builder(parent);
6743       return builder;
6744     }
6745     /**
6746      * Protobuf type {@code openxc.TranslatedMessage}
6747      */
6748     public static final class Builder extends
6749         com.google.protobuf.GeneratedMessage.Builder<Builder>
6750        implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
6751       public static final com.google.protobuf.Descriptors.Descriptor
6752           getDescriptor() {
6753         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6754       }
6755
6756       protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6757           internalGetFieldAccessorTable() {
6758         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
6759             .ensureFieldAccessorsInitialized(
6760                 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
6761       }
6762
6763       // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
6764       private Builder() {
6765         maybeForceBuilderInitialization();
6766       }
6767
6768       private Builder(
6769           com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6770         super(parent);
6771         maybeForceBuilderInitialization();
6772       }
6773       private void maybeForceBuilderInitialization() {
6774         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
6775           getValueFieldBuilder();
6776           getEventFieldBuilder();
6777         }
6778       }
6779       private static Builder create() {
6780         return new Builder();
6781       }
6782
6783       public Builder clear() {
6784         super.clear();
6785         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
6786         bitField0_ = (bitField0_ & ~0x00000001);
6787         name_ = "";
6788         bitField0_ = (bitField0_ & ~0x00000002);
6789         if (valueBuilder_ == null) {
6790           value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6791         } else {
6792           valueBuilder_.clear();
6793         }
6794         bitField0_ = (bitField0_ & ~0x00000004);
6795         if (eventBuilder_ == null) {
6796           event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6797         } else {
6798           eventBuilder_.clear();
6799         }
6800         bitField0_ = (bitField0_ & ~0x00000008);
6801         return this;
6802       }
6803
6804       public Builder clone() {
6805         return create().mergeFrom(buildPartial());
6806       }
6807
6808       public com.google.protobuf.Descriptors.Descriptor
6809           getDescriptorForType() {
6810         return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6811       }
6812
6813       public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
6814         return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
6815       }
6816
6817       public com.openxc.BinaryMessages.TranslatedMessage build() {
6818         com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
6819         if (!result.isInitialized()) {
6820           throw newUninitializedMessageException(result);
6821         }
6822         return result;
6823       }
6824
6825       public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
6826         com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
6827         int from_bitField0_ = bitField0_;
6828         int to_bitField0_ = 0;
6829         if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
6830           to_bitField0_ |= 0x00000001;
6831         }
6832         result.type_ = type_;
6833         if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
6834           to_bitField0_ |= 0x00000002;
6835         }
6836         result.name_ = name_;
6837         if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
6838           to_bitField0_ |= 0x00000004;
6839         }
6840         if (valueBuilder_ == null) {
6841           result.value_ = value_;
6842         } else {
6843           result.value_ = valueBuilder_.build();
6844         }
6845         if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
6846           to_bitField0_ |= 0x00000008;
6847         }
6848         if (eventBuilder_ == null) {
6849           result.event_ = event_;
6850         } else {
6851           result.event_ = eventBuilder_.build();
6852         }
6853         result.bitField0_ = to_bitField0_;
6854         onBuilt();
6855         return result;
6856       }
6857
6858       public Builder mergeFrom(com.google.protobuf.Message other) {
6859         if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
6860           return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
6861         } else {
6862           super.mergeFrom(other);
6863           return this;
6864         }
6865       }
6866
6867       public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
6868         if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
6869         if (other.hasType()) {
6870           setType(other.getType());
6871         }
6872         if (other.hasName()) {
6873           bitField0_ |= 0x00000002;
6874           name_ = other.name_;
6875           onChanged();
6876         }
6877         if (other.hasValue()) {
6878           mergeValue(other.getValue());
6879         }
6880         if (other.hasEvent()) {
6881           mergeEvent(other.getEvent());
6882         }
6883         this.mergeUnknownFields(other.getUnknownFields());
6884         return this;
6885       }
6886
6887       public final boolean isInitialized() {
6888         return true;
6889       }
6890
6891       public Builder mergeFrom(
6892           com.google.protobuf.CodedInputStream input,
6893           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6894           throws java.io.IOException {
6895         com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
6896         try {
6897           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
6898         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6899           parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
6900           throw e;
6901         } finally {
6902           if (parsedMessage != null) {
6903             mergeFrom(parsedMessage);
6904           }
6905         }
6906         return this;
6907       }
6908       private int bitField0_;
6909
6910       // optional .openxc.TranslatedMessage.Type type = 1;
6911       private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
6912       /**
6913        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6914        */
6915       public boolean hasType() {
6916         return ((bitField0_ & 0x00000001) == 0x00000001);
6917       }
6918       /**
6919        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6920        */
6921       public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
6922         return type_;
6923       }
6924       /**
6925        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6926        */
6927       public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
6928         if (value == null) {
6929           throw new NullPointerException();
6930         }
6931         bitField0_ |= 0x00000001;
6932         type_ = value;
6933         onChanged();
6934         return this;
6935       }
6936       /**
6937        * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6938        */
6939       public Builder clearType() {
6940         bitField0_ = (bitField0_ & ~0x00000001);
6941         type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
6942         onChanged();
6943         return this;
6944       }
6945
6946       // optional string name = 2;
6947       private java.lang.Object name_ = "";
6948       /**
6949        * <code>optional string name = 2;</code>
6950        */
6951       public boolean hasName() {
6952         return ((bitField0_ & 0x00000002) == 0x00000002);
6953       }
6954       /**
6955        * <code>optional string name = 2;</code>
6956        */
6957       public java.lang.String getName() {
6958         java.lang.Object ref = name_;
6959         if (!(ref instanceof java.lang.String)) {
6960           java.lang.String s = ((com.google.protobuf.ByteString) ref)
6961               .toStringUtf8();
6962           name_ = s;
6963           return s;
6964         } else {
6965           return (java.lang.String) ref;
6966         }
6967       }
6968       /**
6969        * <code>optional string name = 2;</code>
6970        */
6971       public com.google.protobuf.ByteString
6972           getNameBytes() {
6973         java.lang.Object ref = name_;
6974         if (ref instanceof String) {
6975           com.google.protobuf.ByteString b = 
6976               com.google.protobuf.ByteString.copyFromUtf8(
6977                   (java.lang.String) ref);
6978           name_ = b;
6979           return b;
6980         } else {
6981           return (com.google.protobuf.ByteString) ref;
6982         }
6983       }
6984       /**
6985        * <code>optional string name = 2;</code>
6986        */
6987       public Builder setName(
6988           java.lang.String value) {
6989         if (value == null) {
6990     throw new NullPointerException();
6991   }
6992   bitField0_ |= 0x00000002;
6993         name_ = value;
6994         onChanged();
6995         return this;
6996       }
6997       /**
6998        * <code>optional string name = 2;</code>
6999        */
7000       public Builder clearName() {
7001         bitField0_ = (bitField0_ & ~0x00000002);
7002         name_ = getDefaultInstance().getName();
7003         onChanged();
7004         return this;
7005       }
7006       /**
7007        * <code>optional string name = 2;</code>
7008        */
7009       public Builder setNameBytes(
7010           com.google.protobuf.ByteString value) {
7011         if (value == null) {
7012     throw new NullPointerException();
7013   }
7014   bitField0_ |= 0x00000002;
7015         name_ = value;
7016         onChanged();
7017         return this;
7018       }
7019
7020       // optional .openxc.DynamicField value = 3;
7021       private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7022       private com.google.protobuf.SingleFieldBuilder<
7023           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_;
7024       /**
7025        * <code>optional .openxc.DynamicField value = 3;</code>
7026        */
7027       public boolean hasValue() {
7028         return ((bitField0_ & 0x00000004) == 0x00000004);
7029       }
7030       /**
7031        * <code>optional .openxc.DynamicField value = 3;</code>
7032        */
7033       public com.openxc.BinaryMessages.DynamicField getValue() {
7034         if (valueBuilder_ == null) {
7035           return value_;
7036         } else {
7037           return valueBuilder_.getMessage();
7038         }
7039       }
7040       /**
7041        * <code>optional .openxc.DynamicField value = 3;</code>
7042        */
7043       public Builder setValue(com.openxc.BinaryMessages.DynamicField value) {
7044         if (valueBuilder_ == null) {
7045           if (value == null) {
7046             throw new NullPointerException();
7047           }
7048           value_ = value;
7049           onChanged();
7050         } else {
7051           valueBuilder_.setMessage(value);
7052         }
7053         bitField0_ |= 0x00000004;
7054         return this;
7055       }
7056       /**
7057        * <code>optional .openxc.DynamicField value = 3;</code>
7058        */
7059       public Builder setValue(
7060           com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
7061         if (valueBuilder_ == null) {
7062           value_ = builderForValue.build();
7063           onChanged();
7064         } else {
7065           valueBuilder_.setMessage(builderForValue.build());
7066         }
7067         bitField0_ |= 0x00000004;
7068         return this;
7069       }
7070       /**
7071        * <code>optional .openxc.DynamicField value = 3;</code>
7072        */
7073       public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) {
7074         if (valueBuilder_ == null) {
7075           if (((bitField0_ & 0x00000004) == 0x00000004) &&
7076               value_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
7077             value_ =
7078               com.openxc.BinaryMessages.DynamicField.newBuilder(value_).mergeFrom(value).buildPartial();
7079           } else {
7080             value_ = value;
7081           }
7082           onChanged();
7083         } else {
7084           valueBuilder_.mergeFrom(value);
7085         }
7086         bitField0_ |= 0x00000004;
7087         return this;
7088       }
7089       /**
7090        * <code>optional .openxc.DynamicField value = 3;</code>
7091        */
7092       public Builder clearValue() {
7093         if (valueBuilder_ == null) {
7094           value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7095           onChanged();
7096         } else {
7097           valueBuilder_.clear();
7098         }
7099         bitField0_ = (bitField0_ & ~0x00000004);
7100         return this;
7101       }
7102       /**
7103        * <code>optional .openxc.DynamicField value = 3;</code>
7104        */
7105       public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() {
7106         bitField0_ |= 0x00000004;
7107         onChanged();
7108         return getValueFieldBuilder().getBuilder();
7109       }
7110       /**
7111        * <code>optional .openxc.DynamicField value = 3;</code>
7112        */
7113       public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
7114         if (valueBuilder_ != null) {
7115           return valueBuilder_.getMessageOrBuilder();
7116         } else {
7117           return value_;
7118         }
7119       }
7120       /**
7121        * <code>optional .openxc.DynamicField value = 3;</code>
7122        */
7123       private com.google.protobuf.SingleFieldBuilder<
7124           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> 
7125           getValueFieldBuilder() {
7126         if (valueBuilder_ == null) {
7127           valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7128               com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
7129                   value_,
7130                   getParentForChildren(),
7131                   isClean());
7132           value_ = null;
7133         }
7134         return valueBuilder_;
7135       }
7136
7137       // optional .openxc.DynamicField event = 4;
7138       private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7139       private com.google.protobuf.SingleFieldBuilder<
7140           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_;
7141       /**
7142        * <code>optional .openxc.DynamicField event = 4;</code>
7143        */
7144       public boolean hasEvent() {
7145         return ((bitField0_ & 0x00000008) == 0x00000008);
7146       }
7147       /**
7148        * <code>optional .openxc.DynamicField event = 4;</code>
7149        */
7150       public com.openxc.BinaryMessages.DynamicField getEvent() {
7151         if (eventBuilder_ == null) {
7152           return event_;
7153         } else {
7154           return eventBuilder_.getMessage();
7155         }
7156       }
7157       /**
7158        * <code>optional .openxc.DynamicField event = 4;</code>
7159        */
7160       public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) {
7161         if (eventBuilder_ == null) {
7162           if (value == null) {
7163             throw new NullPointerException();
7164           }
7165           event_ = value;
7166           onChanged();
7167         } else {
7168           eventBuilder_.setMessage(value);
7169         }
7170         bitField0_ |= 0x00000008;
7171         return this;
7172       }
7173       /**
7174        * <code>optional .openxc.DynamicField event = 4;</code>
7175        */
7176       public Builder setEvent(
7177           com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
7178         if (eventBuilder_ == null) {
7179           event_ = builderForValue.build();
7180           onChanged();
7181         } else {
7182           eventBuilder_.setMessage(builderForValue.build());
7183         }
7184         bitField0_ |= 0x00000008;
7185         return this;
7186       }
7187       /**
7188        * <code>optional .openxc.DynamicField event = 4;</code>
7189        */
7190       public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) {
7191         if (eventBuilder_ == null) {
7192           if (((bitField0_ & 0x00000008) == 0x00000008) &&
7193               event_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
7194             event_ =
7195               com.openxc.BinaryMessages.DynamicField.newBuilder(event_).mergeFrom(value).buildPartial();
7196           } else {
7197             event_ = value;
7198           }
7199           onChanged();
7200         } else {
7201           eventBuilder_.mergeFrom(value);
7202         }
7203         bitField0_ |= 0x00000008;
7204         return this;
7205       }
7206       /**
7207        * <code>optional .openxc.DynamicField event = 4;</code>
7208        */
7209       public Builder clearEvent() {
7210         if (eventBuilder_ == null) {
7211           event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7212           onChanged();
7213         } else {
7214           eventBuilder_.clear();
7215         }
7216         bitField0_ = (bitField0_ & ~0x00000008);
7217         return this;
7218       }
7219       /**
7220        * <code>optional .openxc.DynamicField event = 4;</code>
7221        */
7222       public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() {
7223         bitField0_ |= 0x00000008;
7224         onChanged();
7225         return getEventFieldBuilder().getBuilder();
7226       }
7227       /**
7228        * <code>optional .openxc.DynamicField event = 4;</code>
7229        */
7230       public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
7231         if (eventBuilder_ != null) {
7232           return eventBuilder_.getMessageOrBuilder();
7233         } else {
7234           return event_;
7235         }
7236       }
7237       /**
7238        * <code>optional .openxc.DynamicField event = 4;</code>
7239        */
7240       private com.google.protobuf.SingleFieldBuilder<
7241           com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> 
7242           getEventFieldBuilder() {
7243         if (eventBuilder_ == null) {
7244           eventBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7245               com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
7246                   event_,
7247                   getParentForChildren(),
7248                   isClean());
7249           event_ = null;
7250         }
7251         return eventBuilder_;
7252       }
7253
7254       // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
7255     }
7256
7257     static {
7258       defaultInstance = new TranslatedMessage(true);
7259       defaultInstance.initFields();
7260     }
7261
7262     // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
7263   }
7264
7265   private static com.google.protobuf.Descriptors.Descriptor
7266     internal_static_openxc_VehicleMessage_descriptor;
7267   private static
7268     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7269       internal_static_openxc_VehicleMessage_fieldAccessorTable;
7270   private static com.google.protobuf.Descriptors.Descriptor
7271     internal_static_openxc_RawMessage_descriptor;
7272   private static
7273     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7274       internal_static_openxc_RawMessage_fieldAccessorTable;
7275   private static com.google.protobuf.Descriptors.Descriptor
7276     internal_static_openxc_ControlCommand_descriptor;
7277   private static
7278     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7279       internal_static_openxc_ControlCommand_fieldAccessorTable;
7280   private static com.google.protobuf.Descriptors.Descriptor
7281     internal_static_openxc_CommandResponse_descriptor;
7282   private static
7283     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7284       internal_static_openxc_CommandResponse_fieldAccessorTable;
7285   private static com.google.protobuf.Descriptors.Descriptor
7286     internal_static_openxc_DiagnosticRequest_descriptor;
7287   private static
7288     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7289       internal_static_openxc_DiagnosticRequest_fieldAccessorTable;
7290   private static com.google.protobuf.Descriptors.Descriptor
7291     internal_static_openxc_DiagnosticResponse_descriptor;
7292   private static
7293     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7294       internal_static_openxc_DiagnosticResponse_fieldAccessorTable;
7295   private static com.google.protobuf.Descriptors.Descriptor
7296     internal_static_openxc_DynamicField_descriptor;
7297   private static
7298     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7299       internal_static_openxc_DynamicField_fieldAccessorTable;
7300   private static com.google.protobuf.Descriptors.Descriptor
7301     internal_static_openxc_TranslatedMessage_descriptor;
7302   private static
7303     com.google.protobuf.GeneratedMessage.FieldAccessorTable
7304       internal_static_openxc_TranslatedMessage_fieldAccessorTable;
7305
7306   public static com.google.protobuf.Descriptors.FileDescriptor
7307       getDescriptor() {
7308     return descriptor;
7309   }
7310   private static com.google.protobuf.Descriptors.FileDescriptor
7311       descriptor;
7312   static {
7313     java.lang.String[] descriptorData = {
7314       "\n\014openxc.proto\022\006openxc\"\224\003\n\016VehicleMessag" +
7315       "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
7316       "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
7317       "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
7318       "xc.TranslatedMessage\0227\n\023diagnostic_respo" +
7319       "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\022/\n" +
7320       "\017control_command\030\005 \001(\0132\026.openxc.ControlC" +
7321       "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" +
7322       "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" +
7323       "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO",
7324       "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" +
7325       "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" +
7326       "data\030\003 \001(\014\"\246\001\n\016ControlCommand\022)\n\004type\030\001 " +
7327       "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" +
7328       "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" +
7329       "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" +
7330       "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" +
7331       "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" +
7332       "e\022\017\n\007message\030\002 \001(\t\"\252\001\n\021DiagnosticRequest" +
7333       "\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mod",
7334       "e\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030\005 \001(\014\022\025\n" +
7335       "\rparse_payload\030\006 \001(\010\022\016\n\006factor\030\007 \001(\001\022\016\n\006" +
7336       "offset\030\010 \001(\001\022\021\n\tfrequency\030\t \001(\001\"\241\001\n\022Diag" +
7337       "nosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_i" +
7338       "d\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007su" +
7339       "ccess\030\005 \001(\010\022\036\n\026negative_response_code\030\006 " +
7340       "\001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242\001\n\014" +
7341       "DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.Dyna" +
7342       "micField.Type\022\024\n\014string_value\030\002 \001(\t\022\025\n\rn" +
7343       "umeric_value\030\003 \001(\001\022\025\n\rboolean_value\030\004 \001(",
7344       "\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003" +
7345       "\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162\036.o" +
7346       "penxc.TranslatedMessage.Type\022\014\n\004name\030\002 \001" +
7347       "(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicField\022" +
7348       "#\n\005event\030\004 \001(\0132\024.openxc.DynamicField\"\\\n\004" +
7349       "Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016E" +
7350       "VENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVEN" +
7351       "TED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessages"
7352     };
7353     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
7354       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
7355         public com.google.protobuf.ExtensionRegistry assignDescriptors(
7356             com.google.protobuf.Descriptors.FileDescriptor root) {
7357           descriptor = root;
7358           internal_static_openxc_VehicleMessage_descriptor =
7359             getDescriptor().getMessageTypes().get(0);
7360           internal_static_openxc_VehicleMessage_fieldAccessorTable = new
7361             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7362               internal_static_openxc_VehicleMessage_descriptor,
7363               new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", });
7364           internal_static_openxc_RawMessage_descriptor =
7365             getDescriptor().getMessageTypes().get(1);
7366           internal_static_openxc_RawMessage_fieldAccessorTable = new
7367             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7368               internal_static_openxc_RawMessage_descriptor,
7369               new java.lang.String[] { "Bus", "MessageId", "Data", });
7370           internal_static_openxc_ControlCommand_descriptor =
7371             getDescriptor().getMessageTypes().get(2);
7372           internal_static_openxc_ControlCommand_fieldAccessorTable = new
7373             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7374               internal_static_openxc_ControlCommand_descriptor,
7375               new java.lang.String[] { "Type", "DiagnosticRequest", });
7376           internal_static_openxc_CommandResponse_descriptor =
7377             getDescriptor().getMessageTypes().get(3);
7378           internal_static_openxc_CommandResponse_fieldAccessorTable = new
7379             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7380               internal_static_openxc_CommandResponse_descriptor,
7381               new java.lang.String[] { "Type", "Message", });
7382           internal_static_openxc_DiagnosticRequest_descriptor =
7383             getDescriptor().getMessageTypes().get(4);
7384           internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new
7385             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7386               internal_static_openxc_DiagnosticRequest_descriptor,
7387               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "ParsePayload", "Factor", "Offset", "Frequency", });
7388           internal_static_openxc_DiagnosticResponse_descriptor =
7389             getDescriptor().getMessageTypes().get(5);
7390           internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new
7391             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7392               internal_static_openxc_DiagnosticResponse_descriptor,
7393               new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", });
7394           internal_static_openxc_DynamicField_descriptor =
7395             getDescriptor().getMessageTypes().get(6);
7396           internal_static_openxc_DynamicField_fieldAccessorTable = new
7397             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7398               internal_static_openxc_DynamicField_descriptor,
7399               new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", });
7400           internal_static_openxc_TranslatedMessage_descriptor =
7401             getDescriptor().getMessageTypes().get(7);
7402           internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
7403             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7404               internal_static_openxc_TranslatedMessage_descriptor,
7405               new java.lang.String[] { "Type", "Name", "Value", "Event", });
7406           return null;
7407         }
7408       };
7409     com.google.protobuf.Descriptors.FileDescriptor
7410       .internalBuildGeneratedFileFrom(descriptorData,
7411         new com.google.protobuf.Descriptors.FileDescriptor[] {
7412         }, assigner);
7413   }
7414
7415   // @@protoc_insertion_point(outer_class_scope)
7416 }