1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: openxc.proto
6 public final class BinaryMessages {
7 private BinaryMessages() {}
8 public static void registerAllExtensions(
9 com.google.protobuf.ExtensionRegistry registry) {
11 public interface VehicleMessageOrBuilder
12 extends com.google.protobuf.MessageOrBuilder {
14 // optional .openxc.VehicleMessage.Type type = 1;
16 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
20 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
22 com.openxc.BinaryMessages.VehicleMessage.Type getType();
24 // optional .openxc.RawMessage raw_message = 2;
26 * <code>optional .openxc.RawMessage raw_message = 2;</code>
28 boolean hasRawMessage();
30 * <code>optional .openxc.RawMessage raw_message = 2;</code>
32 com.openxc.BinaryMessages.RawMessage getRawMessage();
34 * <code>optional .openxc.RawMessage raw_message = 2;</code>
36 com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder();
38 // optional .openxc.TranslatedMessage translated_message = 3;
40 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
42 boolean hasTranslatedMessage();
44 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
46 com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage();
48 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
50 com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder();
52 // optional .openxc.DiagnosticResponse diagnostic_response = 4;
54 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
56 boolean hasDiagnosticResponse();
58 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
60 com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse();
62 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
64 com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder();
66 // optional .openxc.ControlCommand control_command = 5;
68 * <code>optional .openxc.ControlCommand control_command = 5;</code>
70 boolean hasControlCommand();
72 * <code>optional .openxc.ControlCommand control_command = 5;</code>
74 com.openxc.BinaryMessages.ControlCommand getControlCommand();
76 * <code>optional .openxc.ControlCommand control_command = 5;</code>
78 com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder();
80 // optional .openxc.CommandResponse command_response = 6;
82 * <code>optional .openxc.CommandResponse command_response = 6;</code>
84 boolean hasCommandResponse();
86 * <code>optional .openxc.CommandResponse command_response = 6;</code>
88 com.openxc.BinaryMessages.CommandResponse getCommandResponse();
90 * <code>optional .openxc.CommandResponse command_response = 6;</code>
92 com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder();
95 * Protobuf type {@code openxc.VehicleMessage}
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) {
103 this.unknownFields = builder.getUnknownFields();
105 private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
107 private static final VehicleMessage defaultInstance;
108 public static VehicleMessage getDefaultInstance() {
109 return defaultInstance;
112 public VehicleMessage getDefaultInstanceForType() {
113 return defaultInstance;
116 private final com.google.protobuf.UnknownFieldSet unknownFields;
118 public final com.google.protobuf.UnknownFieldSet
120 return this.unknownFields;
122 private VehicleMessage(
123 com.google.protobuf.CodedInputStream input,
124 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
125 throws com.google.protobuf.InvalidProtocolBufferException {
127 int mutable_bitField0_ = 0;
128 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
129 com.google.protobuf.UnknownFieldSet.newBuilder();
131 boolean done = false;
133 int tag = input.readTag();
139 if (!parseUnknownField(input, unknownFields,
140 extensionRegistry, tag)) {
146 int rawValue = input.readEnum();
147 com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue);
149 unknownFields.mergeVarintField(1, rawValue);
151 bitField0_ |= 0x00000001;
157 com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null;
158 if (((bitField0_ & 0x00000002) == 0x00000002)) {
159 subBuilder = rawMessage_.toBuilder();
161 rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry);
162 if (subBuilder != null) {
163 subBuilder.mergeFrom(rawMessage_);
164 rawMessage_ = subBuilder.buildPartial();
166 bitField0_ |= 0x00000002;
170 com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null;
171 if (((bitField0_ & 0x00000004) == 0x00000004)) {
172 subBuilder = translatedMessage_.toBuilder();
174 translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry);
175 if (subBuilder != null) {
176 subBuilder.mergeFrom(translatedMessage_);
177 translatedMessage_ = subBuilder.buildPartial();
179 bitField0_ |= 0x00000004;
183 com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null;
184 if (((bitField0_ & 0x00000008) == 0x00000008)) {
185 subBuilder = diagnosticResponse_.toBuilder();
187 diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry);
188 if (subBuilder != null) {
189 subBuilder.mergeFrom(diagnosticResponse_);
190 diagnosticResponse_ = subBuilder.buildPartial();
192 bitField0_ |= 0x00000008;
196 com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = null;
197 if (((bitField0_ & 0x00000010) == 0x00000010)) {
198 subBuilder = controlCommand_.toBuilder();
200 controlCommand_ = input.readMessage(com.openxc.BinaryMessages.ControlCommand.PARSER, extensionRegistry);
201 if (subBuilder != null) {
202 subBuilder.mergeFrom(controlCommand_);
203 controlCommand_ = subBuilder.buildPartial();
205 bitField0_ |= 0x00000010;
209 com.openxc.BinaryMessages.CommandResponse.Builder subBuilder = null;
210 if (((bitField0_ & 0x00000020) == 0x00000020)) {
211 subBuilder = commandResponse_.toBuilder();
213 commandResponse_ = input.readMessage(com.openxc.BinaryMessages.CommandResponse.PARSER, extensionRegistry);
214 if (subBuilder != null) {
215 subBuilder.mergeFrom(commandResponse_);
216 commandResponse_ = subBuilder.buildPartial();
218 bitField0_ |= 0x00000020;
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);
229 this.unknownFields = unknownFields.build();
230 makeExtensionsImmutable();
233 public static final com.google.protobuf.Descriptors.Descriptor
235 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
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);
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);
256 public com.google.protobuf.Parser<VehicleMessage> getParserForType() {
261 * Protobuf enum {@code openxc.VehicleMessage.Type}
264 implements com.google.protobuf.ProtocolMessageEnum {
266 * <code>RAW = 1;</code>
270 * <code>TRANSLATED = 2;</code>
274 * <code>DIAGNOSTIC = 3;</code>
278 * <code>CONTROL_COMMAND = 4;</code>
280 CONTROL_COMMAND(3, 4),
282 * <code>COMMAND_RESPONSE = 5;</code>
284 COMMAND_RESPONSE(4, 5),
288 * <code>RAW = 1;</code>
290 public static final int RAW_VALUE = 1;
292 * <code>TRANSLATED = 2;</code>
294 public static final int TRANSLATED_VALUE = 2;
296 * <code>DIAGNOSTIC = 3;</code>
298 public static final int DIAGNOSTIC_VALUE = 3;
300 * <code>CONTROL_COMMAND = 4;</code>
302 public static final int CONTROL_COMMAND_VALUE = 4;
304 * <code>COMMAND_RESPONSE = 5;</code>
306 public static final int COMMAND_RESPONSE_VALUE = 5;
309 public final int getNumber() { return value; }
311 public static Type valueOf(int value) {
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;
322 public static com.google.protobuf.Internal.EnumLiteMap<Type>
323 internalGetValueMap() {
324 return internalValueMap;
326 private static com.google.protobuf.Internal.EnumLiteMap<Type>
328 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
329 public Type findValueByNumber(int number) {
330 return Type.valueOf(number);
334 public final com.google.protobuf.Descriptors.EnumValueDescriptor
335 getValueDescriptor() {
336 return getDescriptor().getValues().get(index);
338 public final com.google.protobuf.Descriptors.EnumDescriptor
339 getDescriptorForType() {
340 return getDescriptor();
342 public static final com.google.protobuf.Descriptors.EnumDescriptor
344 return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0);
347 private static final Type[] VALUES = values();
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.");
355 return VALUES[desc.getIndex()];
358 private final int index;
359 private final int value;
361 private Type(int index, int value) {
366 // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type)
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_;
374 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
376 public boolean hasType() {
377 return ((bitField0_ & 0x00000001) == 0x00000001);
380 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
382 public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
386 // optional .openxc.RawMessage raw_message = 2;
387 public static final int RAW_MESSAGE_FIELD_NUMBER = 2;
388 private com.openxc.BinaryMessages.RawMessage rawMessage_;
390 * <code>optional .openxc.RawMessage raw_message = 2;</code>
392 public boolean hasRawMessage() {
393 return ((bitField0_ & 0x00000002) == 0x00000002);
396 * <code>optional .openxc.RawMessage raw_message = 2;</code>
398 public com.openxc.BinaryMessages.RawMessage getRawMessage() {
402 * <code>optional .openxc.RawMessage raw_message = 2;</code>
404 public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
408 // optional .openxc.TranslatedMessage translated_message = 3;
409 public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3;
410 private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_;
412 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
414 public boolean hasTranslatedMessage() {
415 return ((bitField0_ & 0x00000004) == 0x00000004);
418 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
420 public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
421 return translatedMessage_;
424 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
426 public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
427 return translatedMessage_;
430 // optional .openxc.DiagnosticResponse diagnostic_response = 4;
431 public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4;
432 private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_;
434 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
436 public boolean hasDiagnosticResponse() {
437 return ((bitField0_ & 0x00000008) == 0x00000008);
440 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
442 public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
443 return diagnosticResponse_;
446 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
448 public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
449 return diagnosticResponse_;
452 // optional .openxc.ControlCommand control_command = 5;
453 public static final int CONTROL_COMMAND_FIELD_NUMBER = 5;
454 private com.openxc.BinaryMessages.ControlCommand controlCommand_;
456 * <code>optional .openxc.ControlCommand control_command = 5;</code>
458 public boolean hasControlCommand() {
459 return ((bitField0_ & 0x00000010) == 0x00000010);
462 * <code>optional .openxc.ControlCommand control_command = 5;</code>
464 public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
465 return controlCommand_;
468 * <code>optional .openxc.ControlCommand control_command = 5;</code>
470 public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
471 return controlCommand_;
474 // optional .openxc.CommandResponse command_response = 6;
475 public static final int COMMAND_RESPONSE_FIELD_NUMBER = 6;
476 private com.openxc.BinaryMessages.CommandResponse commandResponse_;
478 * <code>optional .openxc.CommandResponse command_response = 6;</code>
480 public boolean hasCommandResponse() {
481 return ((bitField0_ & 0x00000020) == 0x00000020);
484 * <code>optional .openxc.CommandResponse command_response = 6;</code>
486 public com.openxc.BinaryMessages.CommandResponse getCommandResponse() {
487 return commandResponse_;
490 * <code>optional .openxc.CommandResponse command_response = 6;</code>
492 public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() {
493 return commandResponse_;
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();
504 private byte memoizedIsInitialized = -1;
505 public final boolean isInitialized() {
506 byte isInitialized = memoizedIsInitialized;
507 if (isInitialized != -1) return isInitialized == 1;
509 memoizedIsInitialized = 1;
513 public void writeTo(com.google.protobuf.CodedOutputStream output)
514 throws java.io.IOException {
516 if (((bitField0_ & 0x00000001) == 0x00000001)) {
517 output.writeEnum(1, type_.getNumber());
519 if (((bitField0_ & 0x00000002) == 0x00000002)) {
520 output.writeMessage(2, rawMessage_);
522 if (((bitField0_ & 0x00000004) == 0x00000004)) {
523 output.writeMessage(3, translatedMessage_);
525 if (((bitField0_ & 0x00000008) == 0x00000008)) {
526 output.writeMessage(4, diagnosticResponse_);
528 if (((bitField0_ & 0x00000010) == 0x00000010)) {
529 output.writeMessage(5, controlCommand_);
531 if (((bitField0_ & 0x00000020) == 0x00000020)) {
532 output.writeMessage(6, commandResponse_);
534 getUnknownFields().writeTo(output);
537 private int memoizedSerializedSize = -1;
538 public int getSerializedSize() {
539 int size = memoizedSerializedSize;
540 if (size != -1) return size;
543 if (((bitField0_ & 0x00000001) == 0x00000001)) {
544 size += com.google.protobuf.CodedOutputStream
545 .computeEnumSize(1, type_.getNumber());
547 if (((bitField0_ & 0x00000002) == 0x00000002)) {
548 size += com.google.protobuf.CodedOutputStream
549 .computeMessageSize(2, rawMessage_);
551 if (((bitField0_ & 0x00000004) == 0x00000004)) {
552 size += com.google.protobuf.CodedOutputStream
553 .computeMessageSize(3, translatedMessage_);
555 if (((bitField0_ & 0x00000008) == 0x00000008)) {
556 size += com.google.protobuf.CodedOutputStream
557 .computeMessageSize(4, diagnosticResponse_);
559 if (((bitField0_ & 0x00000010) == 0x00000010)) {
560 size += com.google.protobuf.CodedOutputStream
561 .computeMessageSize(5, controlCommand_);
563 if (((bitField0_ & 0x00000020) == 0x00000020)) {
564 size += com.google.protobuf.CodedOutputStream
565 .computeMessageSize(6, commandResponse_);
567 size += getUnknownFields().getSerializedSize();
568 memoizedSerializedSize = size;
572 private static final long serialVersionUID = 0L;
574 protected java.lang.Object writeReplace()
575 throws java.io.ObjectStreamException {
576 return super.writeReplace();
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);
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);
590 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data)
591 throws com.google.protobuf.InvalidProtocolBufferException {
592 return PARSER.parseFrom(data);
594 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
596 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
597 throws com.google.protobuf.InvalidProtocolBufferException {
598 return PARSER.parseFrom(data, extensionRegistry);
600 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input)
601 throws java.io.IOException {
602 return PARSER.parseFrom(input);
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);
610 public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input)
611 throws java.io.IOException {
612 return PARSER.parseDelimitedFrom(input);
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);
620 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
621 com.google.protobuf.CodedInputStream input)
622 throws java.io.IOException {
623 return PARSER.parseFrom(input);
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);
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);
637 public Builder toBuilder() { return newBuilder(this); }
640 protected Builder newBuilderForType(
641 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
642 Builder builder = new Builder(parent);
646 * Protobuf type {@code openxc.VehicleMessage}
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
653 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
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);
663 // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder()
665 maybeForceBuilderInitialization();
669 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
671 maybeForceBuilderInitialization();
673 private void maybeForceBuilderInitialization() {
674 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
675 getRawMessageFieldBuilder();
676 getTranslatedMessageFieldBuilder();
677 getDiagnosticResponseFieldBuilder();
678 getControlCommandFieldBuilder();
679 getCommandResponseFieldBuilder();
682 private static Builder create() {
683 return new Builder();
686 public Builder clear() {
688 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
689 bitField0_ = (bitField0_ & ~0x00000001);
690 if (rawMessageBuilder_ == null) {
691 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
693 rawMessageBuilder_.clear();
695 bitField0_ = (bitField0_ & ~0x00000002);
696 if (translatedMessageBuilder_ == null) {
697 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
699 translatedMessageBuilder_.clear();
701 bitField0_ = (bitField0_ & ~0x00000004);
702 if (diagnosticResponseBuilder_ == null) {
703 diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
705 diagnosticResponseBuilder_.clear();
707 bitField0_ = (bitField0_ & ~0x00000008);
708 if (controlCommandBuilder_ == null) {
709 controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
711 controlCommandBuilder_.clear();
713 bitField0_ = (bitField0_ & ~0x00000010);
714 if (commandResponseBuilder_ == null) {
715 commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
717 commandResponseBuilder_.clear();
719 bitField0_ = (bitField0_ & ~0x00000020);
723 public Builder clone() {
724 return create().mergeFrom(buildPartial());
727 public com.google.protobuf.Descriptors.Descriptor
728 getDescriptorForType() {
729 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
732 public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() {
733 return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance();
736 public com.openxc.BinaryMessages.VehicleMessage build() {
737 com.openxc.BinaryMessages.VehicleMessage result = buildPartial();
738 if (!result.isInitialized()) {
739 throw newUninitializedMessageException(result);
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;
751 result.type_ = type_;
752 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
753 to_bitField0_ |= 0x00000002;
755 if (rawMessageBuilder_ == null) {
756 result.rawMessage_ = rawMessage_;
758 result.rawMessage_ = rawMessageBuilder_.build();
760 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
761 to_bitField0_ |= 0x00000004;
763 if (translatedMessageBuilder_ == null) {
764 result.translatedMessage_ = translatedMessage_;
766 result.translatedMessage_ = translatedMessageBuilder_.build();
768 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
769 to_bitField0_ |= 0x00000008;
771 if (diagnosticResponseBuilder_ == null) {
772 result.diagnosticResponse_ = diagnosticResponse_;
774 result.diagnosticResponse_ = diagnosticResponseBuilder_.build();
776 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
777 to_bitField0_ |= 0x00000010;
779 if (controlCommandBuilder_ == null) {
780 result.controlCommand_ = controlCommand_;
782 result.controlCommand_ = controlCommandBuilder_.build();
784 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
785 to_bitField0_ |= 0x00000020;
787 if (commandResponseBuilder_ == null) {
788 result.commandResponse_ = commandResponse_;
790 result.commandResponse_ = commandResponseBuilder_.build();
792 result.bitField0_ = to_bitField0_;
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);
801 super.mergeFrom(other);
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());
811 if (other.hasRawMessage()) {
812 mergeRawMessage(other.getRawMessage());
814 if (other.hasTranslatedMessage()) {
815 mergeTranslatedMessage(other.getTranslatedMessage());
817 if (other.hasDiagnosticResponse()) {
818 mergeDiagnosticResponse(other.getDiagnosticResponse());
820 if (other.hasControlCommand()) {
821 mergeControlCommand(other.getControlCommand());
823 if (other.hasCommandResponse()) {
824 mergeCommandResponse(other.getCommandResponse());
826 this.mergeUnknownFields(other.getUnknownFields());
830 public final boolean isInitialized() {
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;
840 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
841 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
842 parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage();
845 if (parsedMessage != null) {
846 mergeFrom(parsedMessage);
851 private int bitField0_;
853 // optional .openxc.VehicleMessage.Type type = 1;
854 private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
856 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
858 public boolean hasType() {
859 return ((bitField0_ & 0x00000001) == 0x00000001);
862 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
864 public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
868 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
870 public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) {
872 throw new NullPointerException();
874 bitField0_ |= 0x00000001;
880 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
882 public Builder clearType() {
883 bitField0_ = (bitField0_ & ~0x00000001);
884 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
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_;
894 * <code>optional .openxc.RawMessage raw_message = 2;</code>
896 public boolean hasRawMessage() {
897 return ((bitField0_ & 0x00000002) == 0x00000002);
900 * <code>optional .openxc.RawMessage raw_message = 2;</code>
902 public com.openxc.BinaryMessages.RawMessage getRawMessage() {
903 if (rawMessageBuilder_ == null) {
906 return rawMessageBuilder_.getMessage();
910 * <code>optional .openxc.RawMessage raw_message = 2;</code>
912 public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) {
913 if (rawMessageBuilder_ == null) {
915 throw new NullPointerException();
920 rawMessageBuilder_.setMessage(value);
922 bitField0_ |= 0x00000002;
926 * <code>optional .openxc.RawMessage raw_message = 2;</code>
928 public Builder setRawMessage(
929 com.openxc.BinaryMessages.RawMessage.Builder builderForValue) {
930 if (rawMessageBuilder_ == null) {
931 rawMessage_ = builderForValue.build();
934 rawMessageBuilder_.setMessage(builderForValue.build());
936 bitField0_ |= 0x00000002;
940 * <code>optional .openxc.RawMessage raw_message = 2;</code>
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()) {
947 com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial();
953 rawMessageBuilder_.mergeFrom(value);
955 bitField0_ |= 0x00000002;
959 * <code>optional .openxc.RawMessage raw_message = 2;</code>
961 public Builder clearRawMessage() {
962 if (rawMessageBuilder_ == null) {
963 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
966 rawMessageBuilder_.clear();
968 bitField0_ = (bitField0_ & ~0x00000002);
972 * <code>optional .openxc.RawMessage raw_message = 2;</code>
974 public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() {
975 bitField0_ |= 0x00000002;
977 return getRawMessageFieldBuilder().getBuilder();
980 * <code>optional .openxc.RawMessage raw_message = 2;</code>
982 public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
983 if (rawMessageBuilder_ != null) {
984 return rawMessageBuilder_.getMessageOrBuilder();
990 * <code>optional .openxc.RawMessage raw_message = 2;</code>
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>(
999 getParentForChildren(),
1003 return rawMessageBuilder_;
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_;
1011 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1013 public boolean hasTranslatedMessage() {
1014 return ((bitField0_ & 0x00000004) == 0x00000004);
1017 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1019 public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
1020 if (translatedMessageBuilder_ == null) {
1021 return translatedMessage_;
1023 return translatedMessageBuilder_.getMessage();
1027 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1029 public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
1030 if (translatedMessageBuilder_ == null) {
1031 if (value == null) {
1032 throw new NullPointerException();
1034 translatedMessage_ = value;
1037 translatedMessageBuilder_.setMessage(value);
1039 bitField0_ |= 0x00000004;
1043 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1045 public Builder setTranslatedMessage(
1046 com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) {
1047 if (translatedMessageBuilder_ == null) {
1048 translatedMessage_ = builderForValue.build();
1051 translatedMessageBuilder_.setMessage(builderForValue.build());
1053 bitField0_ |= 0x00000004;
1057 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
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();
1066 translatedMessage_ = value;
1070 translatedMessageBuilder_.mergeFrom(value);
1072 bitField0_ |= 0x00000004;
1076 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1078 public Builder clearTranslatedMessage() {
1079 if (translatedMessageBuilder_ == null) {
1080 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
1083 translatedMessageBuilder_.clear();
1085 bitField0_ = (bitField0_ & ~0x00000004);
1089 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1091 public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() {
1092 bitField0_ |= 0x00000004;
1094 return getTranslatedMessageFieldBuilder().getBuilder();
1097 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1099 public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
1100 if (translatedMessageBuilder_ != null) {
1101 return translatedMessageBuilder_.getMessageOrBuilder();
1103 return translatedMessage_;
1107 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
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>(
1116 getParentForChildren(),
1118 translatedMessage_ = null;
1120 return translatedMessageBuilder_;
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_;
1128 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1130 public boolean hasDiagnosticResponse() {
1131 return ((bitField0_ & 0x00000008) == 0x00000008);
1134 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1136 public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
1137 if (diagnosticResponseBuilder_ == null) {
1138 return diagnosticResponse_;
1140 return diagnosticResponseBuilder_.getMessage();
1144 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1146 public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1147 if (diagnosticResponseBuilder_ == null) {
1148 if (value == null) {
1149 throw new NullPointerException();
1151 diagnosticResponse_ = value;
1154 diagnosticResponseBuilder_.setMessage(value);
1156 bitField0_ |= 0x00000008;
1160 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1162 public Builder setDiagnosticResponse(
1163 com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) {
1164 if (diagnosticResponseBuilder_ == null) {
1165 diagnosticResponse_ = builderForValue.build();
1168 diagnosticResponseBuilder_.setMessage(builderForValue.build());
1170 bitField0_ |= 0x00000008;
1174 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
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();
1183 diagnosticResponse_ = value;
1187 diagnosticResponseBuilder_.mergeFrom(value);
1189 bitField0_ |= 0x00000008;
1193 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1195 public Builder clearDiagnosticResponse() {
1196 if (diagnosticResponseBuilder_ == null) {
1197 diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1200 diagnosticResponseBuilder_.clear();
1202 bitField0_ = (bitField0_ & ~0x00000008);
1206 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1208 public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() {
1209 bitField0_ |= 0x00000008;
1211 return getDiagnosticResponseFieldBuilder().getBuilder();
1214 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1216 public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
1217 if (diagnosticResponseBuilder_ != null) {
1218 return diagnosticResponseBuilder_.getMessageOrBuilder();
1220 return diagnosticResponse_;
1224 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
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(),
1235 diagnosticResponse_ = null;
1237 return diagnosticResponseBuilder_;
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_;
1245 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1247 public boolean hasControlCommand() {
1248 return ((bitField0_ & 0x00000010) == 0x00000010);
1251 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1253 public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
1254 if (controlCommandBuilder_ == null) {
1255 return controlCommand_;
1257 return controlCommandBuilder_.getMessage();
1261 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1263 public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) {
1264 if (controlCommandBuilder_ == null) {
1265 if (value == null) {
1266 throw new NullPointerException();
1268 controlCommand_ = value;
1271 controlCommandBuilder_.setMessage(value);
1273 bitField0_ |= 0x00000010;
1277 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1279 public Builder setControlCommand(
1280 com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) {
1281 if (controlCommandBuilder_ == null) {
1282 controlCommand_ = builderForValue.build();
1285 controlCommandBuilder_.setMessage(builderForValue.build());
1287 bitField0_ |= 0x00000010;
1291 * <code>optional .openxc.ControlCommand control_command = 5;</code>
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()) {
1298 com.openxc.BinaryMessages.ControlCommand.newBuilder(controlCommand_).mergeFrom(value).buildPartial();
1300 controlCommand_ = value;
1304 controlCommandBuilder_.mergeFrom(value);
1306 bitField0_ |= 0x00000010;
1310 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1312 public Builder clearControlCommand() {
1313 if (controlCommandBuilder_ == null) {
1314 controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
1317 controlCommandBuilder_.clear();
1319 bitField0_ = (bitField0_ & ~0x00000010);
1323 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1325 public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() {
1326 bitField0_ |= 0x00000010;
1328 return getControlCommandFieldBuilder().getBuilder();
1331 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1333 public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
1334 if (controlCommandBuilder_ != null) {
1335 return controlCommandBuilder_.getMessageOrBuilder();
1337 return controlCommand_;
1341 * <code>optional .openxc.ControlCommand control_command = 5;</code>
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>(
1350 getParentForChildren(),
1352 controlCommand_ = null;
1354 return controlCommandBuilder_;
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_;
1362 * <code>optional .openxc.CommandResponse command_response = 6;</code>
1364 public boolean hasCommandResponse() {
1365 return ((bitField0_ & 0x00000020) == 0x00000020);
1368 * <code>optional .openxc.CommandResponse command_response = 6;</code>
1370 public com.openxc.BinaryMessages.CommandResponse getCommandResponse() {
1371 if (commandResponseBuilder_ == null) {
1372 return commandResponse_;
1374 return commandResponseBuilder_.getMessage();
1378 * <code>optional .openxc.CommandResponse command_response = 6;</code>
1380 public Builder setCommandResponse(com.openxc.BinaryMessages.CommandResponse value) {
1381 if (commandResponseBuilder_ == null) {
1382 if (value == null) {
1383 throw new NullPointerException();
1385 commandResponse_ = value;
1388 commandResponseBuilder_.setMessage(value);
1390 bitField0_ |= 0x00000020;
1394 * <code>optional .openxc.CommandResponse command_response = 6;</code>
1396 public Builder setCommandResponse(
1397 com.openxc.BinaryMessages.CommandResponse.Builder builderForValue) {
1398 if (commandResponseBuilder_ == null) {
1399 commandResponse_ = builderForValue.build();
1402 commandResponseBuilder_.setMessage(builderForValue.build());
1404 bitField0_ |= 0x00000020;
1408 * <code>optional .openxc.CommandResponse command_response = 6;</code>
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()) {
1415 com.openxc.BinaryMessages.CommandResponse.newBuilder(commandResponse_).mergeFrom(value).buildPartial();
1417 commandResponse_ = value;
1421 commandResponseBuilder_.mergeFrom(value);
1423 bitField0_ |= 0x00000020;
1427 * <code>optional .openxc.CommandResponse command_response = 6;</code>
1429 public Builder clearCommandResponse() {
1430 if (commandResponseBuilder_ == null) {
1431 commandResponse_ = com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
1434 commandResponseBuilder_.clear();
1436 bitField0_ = (bitField0_ & ~0x00000020);
1440 * <code>optional .openxc.CommandResponse command_response = 6;</code>
1442 public com.openxc.BinaryMessages.CommandResponse.Builder getCommandResponseBuilder() {
1443 bitField0_ |= 0x00000020;
1445 return getCommandResponseFieldBuilder().getBuilder();
1448 * <code>optional .openxc.CommandResponse command_response = 6;</code>
1450 public com.openxc.BinaryMessages.CommandResponseOrBuilder getCommandResponseOrBuilder() {
1451 if (commandResponseBuilder_ != null) {
1452 return commandResponseBuilder_.getMessageOrBuilder();
1454 return commandResponse_;
1458 * <code>optional .openxc.CommandResponse command_response = 6;</code>
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>(
1467 getParentForChildren(),
1469 commandResponse_ = null;
1471 return commandResponseBuilder_;
1474 // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage)
1478 defaultInstance = new VehicleMessage(true);
1479 defaultInstance.initFields();
1482 // @@protoc_insertion_point(class_scope:openxc.VehicleMessage)
1485 public interface RawMessageOrBuilder
1486 extends com.google.protobuf.MessageOrBuilder {
1488 // optional int32 bus = 1;
1490 * <code>optional int32 bus = 1;</code>
1494 * <code>optional int32 bus = 1;</code>
1498 // optional uint32 message_id = 2;
1500 * <code>optional uint32 message_id = 2;</code>
1502 boolean hasMessageId();
1504 * <code>optional uint32 message_id = 2;</code>
1508 // optional bytes data = 3;
1510 * <code>optional bytes data = 3;</code>
1514 * <code>optional bytes data = 3;</code>
1516 com.google.protobuf.ByteString getData();
1519 * Protobuf type {@code openxc.RawMessage}
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) {
1527 this.unknownFields = builder.getUnknownFields();
1529 private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1531 private static final RawMessage defaultInstance;
1532 public static RawMessage getDefaultInstance() {
1533 return defaultInstance;
1536 public RawMessage getDefaultInstanceForType() {
1537 return defaultInstance;
1540 private final com.google.protobuf.UnknownFieldSet unknownFields;
1542 public final com.google.protobuf.UnknownFieldSet
1543 getUnknownFields() {
1544 return this.unknownFields;
1547 com.google.protobuf.CodedInputStream input,
1548 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1549 throws com.google.protobuf.InvalidProtocolBufferException {
1551 int mutable_bitField0_ = 0;
1552 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1553 com.google.protobuf.UnknownFieldSet.newBuilder();
1555 boolean done = false;
1557 int tag = input.readTag();
1563 if (!parseUnknownField(input, unknownFields,
1564 extensionRegistry, tag)) {
1570 bitField0_ |= 0x00000001;
1571 bus_ = input.readInt32();
1575 bitField0_ |= 0x00000002;
1576 messageId_ = input.readUInt32();
1580 bitField0_ |= 0x00000004;
1581 data_ = input.readBytes();
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);
1592 this.unknownFields = unknownFields.build();
1593 makeExtensionsImmutable();
1596 public static final com.google.protobuf.Descriptors.Descriptor
1598 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
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);
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);
1619 public com.google.protobuf.Parser<RawMessage> getParserForType() {
1623 private int bitField0_;
1624 // optional int32 bus = 1;
1625 public static final int BUS_FIELD_NUMBER = 1;
1628 * <code>optional int32 bus = 1;</code>
1630 public boolean hasBus() {
1631 return ((bitField0_ & 0x00000001) == 0x00000001);
1634 * <code>optional int32 bus = 1;</code>
1636 public int getBus() {
1640 // optional uint32 message_id = 2;
1641 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1642 private int messageId_;
1644 * <code>optional uint32 message_id = 2;</code>
1646 public boolean hasMessageId() {
1647 return ((bitField0_ & 0x00000002) == 0x00000002);
1650 * <code>optional uint32 message_id = 2;</code>
1652 public int getMessageId() {
1656 // optional bytes data = 3;
1657 public static final int DATA_FIELD_NUMBER = 3;
1658 private com.google.protobuf.ByteString data_;
1660 * <code>optional bytes data = 3;</code>
1662 public boolean hasData() {
1663 return ((bitField0_ & 0x00000004) == 0x00000004);
1666 * <code>optional bytes data = 3;</code>
1668 public com.google.protobuf.ByteString getData() {
1672 private void initFields() {
1675 data_ = com.google.protobuf.ByteString.EMPTY;
1677 private byte memoizedIsInitialized = -1;
1678 public final boolean isInitialized() {
1679 byte isInitialized = memoizedIsInitialized;
1680 if (isInitialized != -1) return isInitialized == 1;
1682 memoizedIsInitialized = 1;
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_);
1692 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1693 output.writeUInt32(2, messageId_);
1695 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1696 output.writeBytes(3, data_);
1698 getUnknownFields().writeTo(output);
1701 private int memoizedSerializedSize = -1;
1702 public int getSerializedSize() {
1703 int size = memoizedSerializedSize;
1704 if (size != -1) return size;
1707 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1708 size += com.google.protobuf.CodedOutputStream
1709 .computeInt32Size(1, bus_);
1711 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1712 size += com.google.protobuf.CodedOutputStream
1713 .computeUInt32Size(2, messageId_);
1715 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1716 size += com.google.protobuf.CodedOutputStream
1717 .computeBytesSize(3, data_);
1719 size += getUnknownFields().getSerializedSize();
1720 memoizedSerializedSize = size;
1724 private static final long serialVersionUID = 0L;
1726 protected java.lang.Object writeReplace()
1727 throws java.io.ObjectStreamException {
1728 return super.writeReplace();
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);
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);
1742 public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data)
1743 throws com.google.protobuf.InvalidProtocolBufferException {
1744 return PARSER.parseFrom(data);
1746 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1748 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1749 throws com.google.protobuf.InvalidProtocolBufferException {
1750 return PARSER.parseFrom(data, extensionRegistry);
1752 public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input)
1753 throws java.io.IOException {
1754 return PARSER.parseFrom(input);
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);
1762 public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input)
1763 throws java.io.IOException {
1764 return PARSER.parseDelimitedFrom(input);
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);
1772 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1773 com.google.protobuf.CodedInputStream input)
1774 throws java.io.IOException {
1775 return PARSER.parseFrom(input);
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);
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);
1789 public Builder toBuilder() { return newBuilder(this); }
1792 protected Builder newBuilderForType(
1793 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1794 Builder builder = new Builder(parent);
1798 * Protobuf type {@code openxc.RawMessage}
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
1805 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
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);
1815 // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder()
1817 maybeForceBuilderInitialization();
1821 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1823 maybeForceBuilderInitialization();
1825 private void maybeForceBuilderInitialization() {
1826 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1829 private static Builder create() {
1830 return new Builder();
1833 public Builder clear() {
1836 bitField0_ = (bitField0_ & ~0x00000001);
1838 bitField0_ = (bitField0_ & ~0x00000002);
1839 data_ = com.google.protobuf.ByteString.EMPTY;
1840 bitField0_ = (bitField0_ & ~0x00000004);
1844 public Builder clone() {
1845 return create().mergeFrom(buildPartial());
1848 public com.google.protobuf.Descriptors.Descriptor
1849 getDescriptorForType() {
1850 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1853 public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() {
1854 return com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
1857 public com.openxc.BinaryMessages.RawMessage build() {
1858 com.openxc.BinaryMessages.RawMessage result = buildPartial();
1859 if (!result.isInitialized()) {
1860 throw newUninitializedMessageException(result);
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;
1873 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
1874 to_bitField0_ |= 0x00000002;
1876 result.messageId_ = messageId_;
1877 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
1878 to_bitField0_ |= 0x00000004;
1880 result.data_ = data_;
1881 result.bitField0_ = to_bitField0_;
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);
1890 super.mergeFrom(other);
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());
1900 if (other.hasMessageId()) {
1901 setMessageId(other.getMessageId());
1903 if (other.hasData()) {
1904 setData(other.getData());
1906 this.mergeUnknownFields(other.getUnknownFields());
1910 public final boolean isInitialized() {
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;
1920 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1921 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1922 parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage();
1925 if (parsedMessage != null) {
1926 mergeFrom(parsedMessage);
1931 private int bitField0_;
1933 // optional int32 bus = 1;
1936 * <code>optional int32 bus = 1;</code>
1938 public boolean hasBus() {
1939 return ((bitField0_ & 0x00000001) == 0x00000001);
1942 * <code>optional int32 bus = 1;</code>
1944 public int getBus() {
1948 * <code>optional int32 bus = 1;</code>
1950 public Builder setBus(int value) {
1951 bitField0_ |= 0x00000001;
1957 * <code>optional int32 bus = 1;</code>
1959 public Builder clearBus() {
1960 bitField0_ = (bitField0_ & ~0x00000001);
1966 // optional uint32 message_id = 2;
1967 private int messageId_ ;
1969 * <code>optional uint32 message_id = 2;</code>
1971 public boolean hasMessageId() {
1972 return ((bitField0_ & 0x00000002) == 0x00000002);
1975 * <code>optional uint32 message_id = 2;</code>
1977 public int getMessageId() {
1981 * <code>optional uint32 message_id = 2;</code>
1983 public Builder setMessageId(int value) {
1984 bitField0_ |= 0x00000002;
1990 * <code>optional uint32 message_id = 2;</code>
1992 public Builder clearMessageId() {
1993 bitField0_ = (bitField0_ & ~0x00000002);
1999 // optional bytes data = 3;
2000 private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
2002 * <code>optional bytes data = 3;</code>
2004 public boolean hasData() {
2005 return ((bitField0_ & 0x00000004) == 0x00000004);
2008 * <code>optional bytes data = 3;</code>
2010 public com.google.protobuf.ByteString getData() {
2014 * <code>optional bytes data = 3;</code>
2016 public Builder setData(com.google.protobuf.ByteString value) {
2017 if (value == null) {
2018 throw new NullPointerException();
2020 bitField0_ |= 0x00000004;
2026 * <code>optional bytes data = 3;</code>
2028 public Builder clearData() {
2029 bitField0_ = (bitField0_ & ~0x00000004);
2030 data_ = getDefaultInstance().getData();
2035 // @@protoc_insertion_point(builder_scope:openxc.RawMessage)
2039 defaultInstance = new RawMessage(true);
2040 defaultInstance.initFields();
2043 // @@protoc_insertion_point(class_scope:openxc.RawMessage)
2046 public interface ControlCommandOrBuilder
2047 extends com.google.protobuf.MessageOrBuilder {
2049 // optional .openxc.ControlCommand.Type type = 1;
2051 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2055 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2057 com.openxc.BinaryMessages.ControlCommand.Type getType();
2059 // optional .openxc.DiagnosticRequest diagnostic_request = 2;
2061 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2063 boolean hasDiagnosticRequest();
2065 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2067 com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest();
2069 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2071 com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder();
2074 * Protobuf type {@code openxc.ControlCommand}
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) {
2082 this.unknownFields = builder.getUnknownFields();
2084 private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2086 private static final ControlCommand defaultInstance;
2087 public static ControlCommand getDefaultInstance() {
2088 return defaultInstance;
2091 public ControlCommand getDefaultInstanceForType() {
2092 return defaultInstance;
2095 private final com.google.protobuf.UnknownFieldSet unknownFields;
2097 public final com.google.protobuf.UnknownFieldSet
2098 getUnknownFields() {
2099 return this.unknownFields;
2101 private ControlCommand(
2102 com.google.protobuf.CodedInputStream input,
2103 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2104 throws com.google.protobuf.InvalidProtocolBufferException {
2106 int mutable_bitField0_ = 0;
2107 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2108 com.google.protobuf.UnknownFieldSet.newBuilder();
2110 boolean done = false;
2112 int tag = input.readTag();
2118 if (!parseUnknownField(input, unknownFields,
2119 extensionRegistry, tag)) {
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);
2130 bitField0_ |= 0x00000001;
2136 com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null;
2137 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2138 subBuilder = diagnosticRequest_.toBuilder();
2140 diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry);
2141 if (subBuilder != null) {
2142 subBuilder.mergeFrom(diagnosticRequest_);
2143 diagnosticRequest_ = subBuilder.buildPartial();
2145 bitField0_ |= 0x00000002;
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);
2156 this.unknownFields = unknownFields.build();
2157 makeExtensionsImmutable();
2160 public static final com.google.protobuf.Descriptors.Descriptor
2162 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
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);
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);
2183 public com.google.protobuf.Parser<ControlCommand> getParserForType() {
2188 * Protobuf enum {@code openxc.ControlCommand.Type}
2191 implements com.google.protobuf.ProtocolMessageEnum {
2193 * <code>VERSION = 1;</code>
2197 * <code>DEVICE_ID = 2;</code>
2201 * <code>DIAGNOSTIC = 3;</code>
2207 * <code>VERSION = 1;</code>
2209 public static final int VERSION_VALUE = 1;
2211 * <code>DEVICE_ID = 2;</code>
2213 public static final int DEVICE_ID_VALUE = 2;
2215 * <code>DIAGNOSTIC = 3;</code>
2217 public static final int DIAGNOSTIC_VALUE = 3;
2220 public final int getNumber() { return value; }
2222 public static Type valueOf(int value) {
2224 case 1: return VERSION;
2225 case 2: return DEVICE_ID;
2226 case 3: return DIAGNOSTIC;
2227 default: return null;
2231 public static com.google.protobuf.Internal.EnumLiteMap<Type>
2232 internalGetValueMap() {
2233 return internalValueMap;
2235 private static com.google.protobuf.Internal.EnumLiteMap<Type>
2237 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
2238 public Type findValueByNumber(int number) {
2239 return Type.valueOf(number);
2243 public final com.google.protobuf.Descriptors.EnumValueDescriptor
2244 getValueDescriptor() {
2245 return getDescriptor().getValues().get(index);
2247 public final com.google.protobuf.Descriptors.EnumDescriptor
2248 getDescriptorForType() {
2249 return getDescriptor();
2251 public static final com.google.protobuf.Descriptors.EnumDescriptor
2253 return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0);
2256 private static final Type[] VALUES = values();
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.");
2264 return VALUES[desc.getIndex()];
2267 private final int index;
2268 private final int value;
2270 private Type(int index, int value) {
2275 // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type)
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_;
2283 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2285 public boolean hasType() {
2286 return ((bitField0_ & 0x00000001) == 0x00000001);
2289 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2291 public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2295 // optional .openxc.DiagnosticRequest diagnostic_request = 2;
2296 public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2;
2297 private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_;
2299 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2301 public boolean hasDiagnosticRequest() {
2302 return ((bitField0_ & 0x00000002) == 0x00000002);
2305 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2307 public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
2308 return diagnosticRequest_;
2311 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2313 public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
2314 return diagnosticRequest_;
2317 private void initFields() {
2318 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2319 diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2321 private byte memoizedIsInitialized = -1;
2322 public final boolean isInitialized() {
2323 byte isInitialized = memoizedIsInitialized;
2324 if (isInitialized != -1) return isInitialized == 1;
2326 memoizedIsInitialized = 1;
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());
2336 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2337 output.writeMessage(2, diagnosticRequest_);
2339 getUnknownFields().writeTo(output);
2342 private int memoizedSerializedSize = -1;
2343 public int getSerializedSize() {
2344 int size = memoizedSerializedSize;
2345 if (size != -1) return size;
2348 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2349 size += com.google.protobuf.CodedOutputStream
2350 .computeEnumSize(1, type_.getNumber());
2352 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2353 size += com.google.protobuf.CodedOutputStream
2354 .computeMessageSize(2, diagnosticRequest_);
2356 size += getUnknownFields().getSerializedSize();
2357 memoizedSerializedSize = size;
2361 private static final long serialVersionUID = 0L;
2363 protected java.lang.Object writeReplace()
2364 throws java.io.ObjectStreamException {
2365 return super.writeReplace();
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);
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);
2379 public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data)
2380 throws com.google.protobuf.InvalidProtocolBufferException {
2381 return PARSER.parseFrom(data);
2383 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2385 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2386 throws com.google.protobuf.InvalidProtocolBufferException {
2387 return PARSER.parseFrom(data, extensionRegistry);
2389 public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input)
2390 throws java.io.IOException {
2391 return PARSER.parseFrom(input);
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);
2399 public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input)
2400 throws java.io.IOException {
2401 return PARSER.parseDelimitedFrom(input);
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);
2409 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2410 com.google.protobuf.CodedInputStream input)
2411 throws java.io.IOException {
2412 return PARSER.parseFrom(input);
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);
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);
2426 public Builder toBuilder() { return newBuilder(this); }
2429 protected Builder newBuilderForType(
2430 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2431 Builder builder = new Builder(parent);
2435 * Protobuf type {@code openxc.ControlCommand}
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
2442 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
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);
2452 // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder()
2454 maybeForceBuilderInitialization();
2458 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2460 maybeForceBuilderInitialization();
2462 private void maybeForceBuilderInitialization() {
2463 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2464 getDiagnosticRequestFieldBuilder();
2467 private static Builder create() {
2468 return new Builder();
2471 public Builder clear() {
2473 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2474 bitField0_ = (bitField0_ & ~0x00000001);
2475 if (diagnosticRequestBuilder_ == null) {
2476 diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2478 diagnosticRequestBuilder_.clear();
2480 bitField0_ = (bitField0_ & ~0x00000002);
2484 public Builder clone() {
2485 return create().mergeFrom(buildPartial());
2488 public com.google.protobuf.Descriptors.Descriptor
2489 getDescriptorForType() {
2490 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2493 public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() {
2494 return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
2497 public com.openxc.BinaryMessages.ControlCommand build() {
2498 com.openxc.BinaryMessages.ControlCommand result = buildPartial();
2499 if (!result.isInitialized()) {
2500 throw newUninitializedMessageException(result);
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;
2512 result.type_ = type_;
2513 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2514 to_bitField0_ |= 0x00000002;
2516 if (diagnosticRequestBuilder_ == null) {
2517 result.diagnosticRequest_ = diagnosticRequest_;
2519 result.diagnosticRequest_ = diagnosticRequestBuilder_.build();
2521 result.bitField0_ = to_bitField0_;
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);
2530 super.mergeFrom(other);
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());
2540 if (other.hasDiagnosticRequest()) {
2541 mergeDiagnosticRequest(other.getDiagnosticRequest());
2543 this.mergeUnknownFields(other.getUnknownFields());
2547 public final boolean isInitialized() {
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;
2557 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2558 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2559 parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage();
2562 if (parsedMessage != null) {
2563 mergeFrom(parsedMessage);
2568 private int bitField0_;
2570 // optional .openxc.ControlCommand.Type type = 1;
2571 private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2573 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2575 public boolean hasType() {
2576 return ((bitField0_ & 0x00000001) == 0x00000001);
2579 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2581 public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2585 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2587 public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
2588 if (value == null) {
2589 throw new NullPointerException();
2591 bitField0_ |= 0x00000001;
2597 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2599 public Builder clearType() {
2600 bitField0_ = (bitField0_ & ~0x00000001);
2601 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
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_;
2611 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2613 public boolean hasDiagnosticRequest() {
2614 return ((bitField0_ & 0x00000002) == 0x00000002);
2617 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2619 public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
2620 if (diagnosticRequestBuilder_ == null) {
2621 return diagnosticRequest_;
2623 return diagnosticRequestBuilder_.getMessage();
2627 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2629 public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
2630 if (diagnosticRequestBuilder_ == null) {
2631 if (value == null) {
2632 throw new NullPointerException();
2634 diagnosticRequest_ = value;
2637 diagnosticRequestBuilder_.setMessage(value);
2639 bitField0_ |= 0x00000002;
2643 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2645 public Builder setDiagnosticRequest(
2646 com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) {
2647 if (diagnosticRequestBuilder_ == null) {
2648 diagnosticRequest_ = builderForValue.build();
2651 diagnosticRequestBuilder_.setMessage(builderForValue.build());
2653 bitField0_ |= 0x00000002;
2657 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
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();
2666 diagnosticRequest_ = value;
2670 diagnosticRequestBuilder_.mergeFrom(value);
2672 bitField0_ |= 0x00000002;
2676 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2678 public Builder clearDiagnosticRequest() {
2679 if (diagnosticRequestBuilder_ == null) {
2680 diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2683 diagnosticRequestBuilder_.clear();
2685 bitField0_ = (bitField0_ & ~0x00000002);
2689 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2691 public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() {
2692 bitField0_ |= 0x00000002;
2694 return getDiagnosticRequestFieldBuilder().getBuilder();
2697 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2699 public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
2700 if (diagnosticRequestBuilder_ != null) {
2701 return diagnosticRequestBuilder_.getMessageOrBuilder();
2703 return diagnosticRequest_;
2707 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
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>(
2716 getParentForChildren(),
2718 diagnosticRequest_ = null;
2720 return diagnosticRequestBuilder_;
2723 // @@protoc_insertion_point(builder_scope:openxc.ControlCommand)
2727 defaultInstance = new ControlCommand(true);
2728 defaultInstance.initFields();
2731 // @@protoc_insertion_point(class_scope:openxc.ControlCommand)
2734 public interface CommandResponseOrBuilder
2735 extends com.google.protobuf.MessageOrBuilder {
2737 // optional .openxc.ControlCommand.Type type = 1;
2739 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2743 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2745 com.openxc.BinaryMessages.ControlCommand.Type getType();
2747 // optional string message = 2;
2749 * <code>optional string message = 2;</code>
2751 boolean hasMessage();
2753 * <code>optional string message = 2;</code>
2755 java.lang.String getMessage();
2757 * <code>optional string message = 2;</code>
2759 com.google.protobuf.ByteString
2763 * Protobuf type {@code openxc.CommandResponse}
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) {
2771 this.unknownFields = builder.getUnknownFields();
2773 private CommandResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2775 private static final CommandResponse defaultInstance;
2776 public static CommandResponse getDefaultInstance() {
2777 return defaultInstance;
2780 public CommandResponse getDefaultInstanceForType() {
2781 return defaultInstance;
2784 private final com.google.protobuf.UnknownFieldSet unknownFields;
2786 public final com.google.protobuf.UnknownFieldSet
2787 getUnknownFields() {
2788 return this.unknownFields;
2790 private CommandResponse(
2791 com.google.protobuf.CodedInputStream input,
2792 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2793 throws com.google.protobuf.InvalidProtocolBufferException {
2795 int mutable_bitField0_ = 0;
2796 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2797 com.google.protobuf.UnknownFieldSet.newBuilder();
2799 boolean done = false;
2801 int tag = input.readTag();
2807 if (!parseUnknownField(input, unknownFields,
2808 extensionRegistry, tag)) {
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);
2819 bitField0_ |= 0x00000001;
2825 bitField0_ |= 0x00000002;
2826 message_ = input.readBytes();
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);
2837 this.unknownFields = unknownFields.build();
2838 makeExtensionsImmutable();
2841 public static final com.google.protobuf.Descriptors.Descriptor
2843 return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
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);
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);
2864 public com.google.protobuf.Parser<CommandResponse> getParserForType() {
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_;
2873 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2875 public boolean hasType() {
2876 return ((bitField0_ & 0x00000001) == 0x00000001);
2879 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2881 public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2885 // optional string message = 2;
2886 public static final int MESSAGE_FIELD_NUMBER = 2;
2887 private java.lang.Object message_;
2889 * <code>optional string message = 2;</code>
2891 public boolean hasMessage() {
2892 return ((bitField0_ & 0x00000002) == 0x00000002);
2895 * <code>optional string message = 2;</code>
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;
2902 com.google.protobuf.ByteString bs =
2903 (com.google.protobuf.ByteString) ref;
2904 java.lang.String s = bs.toStringUtf8();
2905 if (bs.isValidUtf8()) {
2912 * <code>optional string message = 2;</code>
2914 public com.google.protobuf.ByteString
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);
2924 return (com.google.protobuf.ByteString) ref;
2928 private void initFields() {
2929 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2932 private byte memoizedIsInitialized = -1;
2933 public final boolean isInitialized() {
2934 byte isInitialized = memoizedIsInitialized;
2935 if (isInitialized != -1) return isInitialized == 1;
2937 memoizedIsInitialized = 1;
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());
2947 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2948 output.writeBytes(2, getMessageBytes());
2950 getUnknownFields().writeTo(output);
2953 private int memoizedSerializedSize = -1;
2954 public int getSerializedSize() {
2955 int size = memoizedSerializedSize;
2956 if (size != -1) return size;
2959 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2960 size += com.google.protobuf.CodedOutputStream
2961 .computeEnumSize(1, type_.getNumber());
2963 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2964 size += com.google.protobuf.CodedOutputStream
2965 .computeBytesSize(2, getMessageBytes());
2967 size += getUnknownFields().getSerializedSize();
2968 memoizedSerializedSize = size;
2972 private static final long serialVersionUID = 0L;
2974 protected java.lang.Object writeReplace()
2975 throws java.io.ObjectStreamException {
2976 return super.writeReplace();
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);
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);
2990 public static com.openxc.BinaryMessages.CommandResponse parseFrom(byte[] data)
2991 throws com.google.protobuf.InvalidProtocolBufferException {
2992 return PARSER.parseFrom(data);
2994 public static com.openxc.BinaryMessages.CommandResponse parseFrom(
2996 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2997 throws com.google.protobuf.InvalidProtocolBufferException {
2998 return PARSER.parseFrom(data, extensionRegistry);
3000 public static com.openxc.BinaryMessages.CommandResponse parseFrom(java.io.InputStream input)
3001 throws java.io.IOException {
3002 return PARSER.parseFrom(input);
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);
3010 public static com.openxc.BinaryMessages.CommandResponse parseDelimitedFrom(java.io.InputStream input)
3011 throws java.io.IOException {
3012 return PARSER.parseDelimitedFrom(input);
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);
3020 public static com.openxc.BinaryMessages.CommandResponse parseFrom(
3021 com.google.protobuf.CodedInputStream input)
3022 throws java.io.IOException {
3023 return PARSER.parseFrom(input);
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);
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);
3037 public Builder toBuilder() { return newBuilder(this); }
3040 protected Builder newBuilderForType(
3041 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3042 Builder builder = new Builder(parent);
3046 * Protobuf type {@code openxc.CommandResponse}
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
3053 return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
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);
3063 // Construct using com.openxc.BinaryMessages.CommandResponse.newBuilder()
3065 maybeForceBuilderInitialization();
3069 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3071 maybeForceBuilderInitialization();
3073 private void maybeForceBuilderInitialization() {
3074 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3077 private static Builder create() {
3078 return new Builder();
3081 public Builder clear() {
3083 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
3084 bitField0_ = (bitField0_ & ~0x00000001);
3086 bitField0_ = (bitField0_ & ~0x00000002);
3090 public Builder clone() {
3091 return create().mergeFrom(buildPartial());
3094 public com.google.protobuf.Descriptors.Descriptor
3095 getDescriptorForType() {
3096 return com.openxc.BinaryMessages.internal_static_openxc_CommandResponse_descriptor;
3099 public com.openxc.BinaryMessages.CommandResponse getDefaultInstanceForType() {
3100 return com.openxc.BinaryMessages.CommandResponse.getDefaultInstance();
3103 public com.openxc.BinaryMessages.CommandResponse build() {
3104 com.openxc.BinaryMessages.CommandResponse result = buildPartial();
3105 if (!result.isInitialized()) {
3106 throw newUninitializedMessageException(result);
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;
3118 result.type_ = type_;
3119 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3120 to_bitField0_ |= 0x00000002;
3122 result.message_ = message_;
3123 result.bitField0_ = to_bitField0_;
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);
3132 super.mergeFrom(other);
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());
3142 if (other.hasMessage()) {
3143 bitField0_ |= 0x00000002;
3144 message_ = other.message_;
3147 this.mergeUnknownFields(other.getUnknownFields());
3151 public final boolean isInitialized() {
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;
3161 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3162 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3163 parsedMessage = (com.openxc.BinaryMessages.CommandResponse) e.getUnfinishedMessage();
3166 if (parsedMessage != null) {
3167 mergeFrom(parsedMessage);
3172 private int bitField0_;
3174 // optional .openxc.ControlCommand.Type type = 1;
3175 private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
3177 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3179 public boolean hasType() {
3180 return ((bitField0_ & 0x00000001) == 0x00000001);
3183 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3185 public com.openxc.BinaryMessages.ControlCommand.Type getType() {
3189 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3191 public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
3192 if (value == null) {
3193 throw new NullPointerException();
3195 bitField0_ |= 0x00000001;
3201 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
3203 public Builder clearType() {
3204 bitField0_ = (bitField0_ & ~0x00000001);
3205 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
3210 // optional string message = 2;
3211 private java.lang.Object message_ = "";
3213 * <code>optional string message = 2;</code>
3215 public boolean hasMessage() {
3216 return ((bitField0_ & 0x00000002) == 0x00000002);
3219 * <code>optional string message = 2;</code>
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)
3229 return (java.lang.String) ref;
3233 * <code>optional string message = 2;</code>
3235 public com.google.protobuf.ByteString
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);
3245 return (com.google.protobuf.ByteString) ref;
3249 * <code>optional string message = 2;</code>
3251 public Builder setMessage(
3252 java.lang.String value) {
3253 if (value == null) {
3254 throw new NullPointerException();
3256 bitField0_ |= 0x00000002;
3262 * <code>optional string message = 2;</code>
3264 public Builder clearMessage() {
3265 bitField0_ = (bitField0_ & ~0x00000002);
3266 message_ = getDefaultInstance().getMessage();
3271 * <code>optional string message = 2;</code>
3273 public Builder setMessageBytes(
3274 com.google.protobuf.ByteString value) {
3275 if (value == null) {
3276 throw new NullPointerException();
3278 bitField0_ |= 0x00000002;
3284 // @@protoc_insertion_point(builder_scope:openxc.CommandResponse)
3288 defaultInstance = new CommandResponse(true);
3289 defaultInstance.initFields();
3292 // @@protoc_insertion_point(class_scope:openxc.CommandResponse)
3295 public interface DiagnosticRequestOrBuilder
3296 extends com.google.protobuf.MessageOrBuilder {
3298 // optional int32 bus = 1;
3300 * <code>optional int32 bus = 1;</code>
3304 * <code>optional int32 bus = 1;</code>
3308 // optional uint32 message_id = 2;
3310 * <code>optional uint32 message_id = 2;</code>
3312 boolean hasMessageId();
3314 * <code>optional uint32 message_id = 2;</code>
3318 // optional uint32 mode = 3;
3320 * <code>optional uint32 mode = 3;</code>
3324 * <code>optional uint32 mode = 3;</code>
3328 // optional uint32 pid = 4;
3330 * <code>optional uint32 pid = 4;</code>
3334 * <code>optional uint32 pid = 4;</code>
3338 // optional bytes payload = 5;
3340 * <code>optional bytes payload = 5;</code>
3343 * TODO we are capping this at 8 bytes for now - need to change when we
3344 * support multi-frame responses
3347 boolean hasPayload();
3349 * <code>optional bytes payload = 5;</code>
3352 * TODO we are capping this at 8 bytes for now - need to change when we
3353 * support multi-frame responses
3356 com.google.protobuf.ByteString getPayload();
3358 // optional bool multiple_responses = 6;
3360 * <code>optional bool multiple_responses = 6;</code>
3362 boolean hasMultipleResponses();
3364 * <code>optional bool multiple_responses = 6;</code>
3366 boolean getMultipleResponses();
3368 // optional double frequency = 7;
3370 * <code>optional double frequency = 7;</code>
3372 boolean hasFrequency();
3374 * <code>optional double frequency = 7;</code>
3376 double getFrequency();
3378 // optional string name = 8;
3380 * <code>optional string name = 8;</code>
3384 * <code>optional string name = 8;</code>
3386 java.lang.String getName();
3388 * <code>optional string name = 8;</code>
3390 com.google.protobuf.ByteString
3393 // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;
3395 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
3397 boolean hasDecodedType();
3399 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
3401 com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType();
3404 * Protobuf type {@code openxc.DiagnosticRequest}
3406 public static final class DiagnosticRequest extends
3407 com.google.protobuf.GeneratedMessage
3408 implements DiagnosticRequestOrBuilder {
3409 // Use DiagnosticRequest.newBuilder() to construct.
3410 private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3412 this.unknownFields = builder.getUnknownFields();
3414 private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3416 private static final DiagnosticRequest defaultInstance;
3417 public static DiagnosticRequest getDefaultInstance() {
3418 return defaultInstance;
3421 public DiagnosticRequest getDefaultInstanceForType() {
3422 return defaultInstance;
3425 private final com.google.protobuf.UnknownFieldSet unknownFields;
3427 public final com.google.protobuf.UnknownFieldSet
3428 getUnknownFields() {
3429 return this.unknownFields;
3431 private DiagnosticRequest(
3432 com.google.protobuf.CodedInputStream input,
3433 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3434 throws com.google.protobuf.InvalidProtocolBufferException {
3436 int mutable_bitField0_ = 0;
3437 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3438 com.google.protobuf.UnknownFieldSet.newBuilder();
3440 boolean done = false;
3442 int tag = input.readTag();
3448 if (!parseUnknownField(input, unknownFields,
3449 extensionRegistry, tag)) {
3455 bitField0_ |= 0x00000001;
3456 bus_ = input.readInt32();
3460 bitField0_ |= 0x00000002;
3461 messageId_ = input.readUInt32();
3465 bitField0_ |= 0x00000004;
3466 mode_ = input.readUInt32();
3470 bitField0_ |= 0x00000008;
3471 pid_ = input.readUInt32();
3475 bitField0_ |= 0x00000010;
3476 payload_ = input.readBytes();
3480 bitField0_ |= 0x00000020;
3481 multipleResponses_ = input.readBool();
3485 bitField0_ |= 0x00000040;
3486 frequency_ = input.readDouble();
3490 bitField0_ |= 0x00000080;
3491 name_ = input.readBytes();
3495 int rawValue = input.readEnum();
3496 com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.valueOf(rawValue);
3497 if (value == null) {
3498 unknownFields.mergeVarintField(9, rawValue);
3500 bitField0_ |= 0x00000100;
3501 decodedType_ = value;
3507 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3508 throw e.setUnfinishedMessage(this);
3509 } catch (java.io.IOException e) {
3510 throw new com.google.protobuf.InvalidProtocolBufferException(
3511 e.getMessage()).setUnfinishedMessage(this);
3513 this.unknownFields = unknownFields.build();
3514 makeExtensionsImmutable();
3517 public static final com.google.protobuf.Descriptors.Descriptor
3519 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3522 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3523 internalGetFieldAccessorTable() {
3524 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
3525 .ensureFieldAccessorsInitialized(
3526 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
3529 public static com.google.protobuf.Parser<DiagnosticRequest> PARSER =
3530 new com.google.protobuf.AbstractParser<DiagnosticRequest>() {
3531 public DiagnosticRequest parsePartialFrom(
3532 com.google.protobuf.CodedInputStream input,
3533 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3534 throws com.google.protobuf.InvalidProtocolBufferException {
3535 return new DiagnosticRequest(input, extensionRegistry);
3540 public com.google.protobuf.Parser<DiagnosticRequest> getParserForType() {
3545 * Protobuf enum {@code openxc.DiagnosticRequest.DecodedType}
3547 public enum DecodedType
3548 implements com.google.protobuf.ProtocolMessageEnum {
3550 * <code>NONE = 1;</code>
3554 * <code>OBD2 = 2;</code>
3560 * <code>NONE = 1;</code>
3562 public static final int NONE_VALUE = 1;
3564 * <code>OBD2 = 2;</code>
3566 public static final int OBD2_VALUE = 2;
3569 public final int getNumber() { return value; }
3571 public static DecodedType valueOf(int value) {
3573 case 1: return NONE;
3574 case 2: return OBD2;
3575 default: return null;
3579 public static com.google.protobuf.Internal.EnumLiteMap<DecodedType>
3580 internalGetValueMap() {
3581 return internalValueMap;
3583 private static com.google.protobuf.Internal.EnumLiteMap<DecodedType>
3585 new com.google.protobuf.Internal.EnumLiteMap<DecodedType>() {
3586 public DecodedType findValueByNumber(int number) {
3587 return DecodedType.valueOf(number);
3591 public final com.google.protobuf.Descriptors.EnumValueDescriptor
3592 getValueDescriptor() {
3593 return getDescriptor().getValues().get(index);
3595 public final com.google.protobuf.Descriptors.EnumDescriptor
3596 getDescriptorForType() {
3597 return getDescriptor();
3599 public static final com.google.protobuf.Descriptors.EnumDescriptor
3601 return com.openxc.BinaryMessages.DiagnosticRequest.getDescriptor().getEnumTypes().get(0);
3604 private static final DecodedType[] VALUES = values();
3606 public static DecodedType valueOf(
3607 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
3608 if (desc.getType() != getDescriptor()) {
3609 throw new java.lang.IllegalArgumentException(
3610 "EnumValueDescriptor is not for this type.");
3612 return VALUES[desc.getIndex()];
3615 private final int index;
3616 private final int value;
3618 private DecodedType(int index, int value) {
3623 // @@protoc_insertion_point(enum_scope:openxc.DiagnosticRequest.DecodedType)
3626 private int bitField0_;
3627 // optional int32 bus = 1;
3628 public static final int BUS_FIELD_NUMBER = 1;
3631 * <code>optional int32 bus = 1;</code>
3633 public boolean hasBus() {
3634 return ((bitField0_ & 0x00000001) == 0x00000001);
3637 * <code>optional int32 bus = 1;</code>
3639 public int getBus() {
3643 // optional uint32 message_id = 2;
3644 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
3645 private int messageId_;
3647 * <code>optional uint32 message_id = 2;</code>
3649 public boolean hasMessageId() {
3650 return ((bitField0_ & 0x00000002) == 0x00000002);
3653 * <code>optional uint32 message_id = 2;</code>
3655 public int getMessageId() {
3659 // optional uint32 mode = 3;
3660 public static final int MODE_FIELD_NUMBER = 3;
3663 * <code>optional uint32 mode = 3;</code>
3665 public boolean hasMode() {
3666 return ((bitField0_ & 0x00000004) == 0x00000004);
3669 * <code>optional uint32 mode = 3;</code>
3671 public int getMode() {
3675 // optional uint32 pid = 4;
3676 public static final int PID_FIELD_NUMBER = 4;
3679 * <code>optional uint32 pid = 4;</code>
3681 public boolean hasPid() {
3682 return ((bitField0_ & 0x00000008) == 0x00000008);
3685 * <code>optional uint32 pid = 4;</code>
3687 public int getPid() {
3691 // optional bytes payload = 5;
3692 public static final int PAYLOAD_FIELD_NUMBER = 5;
3693 private com.google.protobuf.ByteString payload_;
3695 * <code>optional bytes payload = 5;</code>
3698 * TODO we are capping this at 8 bytes for now - need to change when we
3699 * support multi-frame responses
3702 public boolean hasPayload() {
3703 return ((bitField0_ & 0x00000010) == 0x00000010);
3706 * <code>optional bytes payload = 5;</code>
3709 * TODO we are capping this at 8 bytes for now - need to change when we
3710 * support multi-frame responses
3713 public com.google.protobuf.ByteString getPayload() {
3717 // optional bool multiple_responses = 6;
3718 public static final int MULTIPLE_RESPONSES_FIELD_NUMBER = 6;
3719 private boolean multipleResponses_;
3721 * <code>optional bool multiple_responses = 6;</code>
3723 public boolean hasMultipleResponses() {
3724 return ((bitField0_ & 0x00000020) == 0x00000020);
3727 * <code>optional bool multiple_responses = 6;</code>
3729 public boolean getMultipleResponses() {
3730 return multipleResponses_;
3733 // optional double frequency = 7;
3734 public static final int FREQUENCY_FIELD_NUMBER = 7;
3735 private double frequency_;
3737 * <code>optional double frequency = 7;</code>
3739 public boolean hasFrequency() {
3740 return ((bitField0_ & 0x00000040) == 0x00000040);
3743 * <code>optional double frequency = 7;</code>
3745 public double getFrequency() {
3749 // optional string name = 8;
3750 public static final int NAME_FIELD_NUMBER = 8;
3751 private java.lang.Object name_;
3753 * <code>optional string name = 8;</code>
3755 public boolean hasName() {
3756 return ((bitField0_ & 0x00000080) == 0x00000080);
3759 * <code>optional string name = 8;</code>
3761 public java.lang.String getName() {
3762 java.lang.Object ref = name_;
3763 if (ref instanceof java.lang.String) {
3764 return (java.lang.String) ref;
3766 com.google.protobuf.ByteString bs =
3767 (com.google.protobuf.ByteString) ref;
3768 java.lang.String s = bs.toStringUtf8();
3769 if (bs.isValidUtf8()) {
3776 * <code>optional string name = 8;</code>
3778 public com.google.protobuf.ByteString
3780 java.lang.Object ref = name_;
3781 if (ref instanceof java.lang.String) {
3782 com.google.protobuf.ByteString b =
3783 com.google.protobuf.ByteString.copyFromUtf8(
3784 (java.lang.String) ref);
3788 return (com.google.protobuf.ByteString) ref;
3792 // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;
3793 public static final int DECODED_TYPE_FIELD_NUMBER = 9;
3794 private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_;
3796 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
3798 public boolean hasDecodedType() {
3799 return ((bitField0_ & 0x00000100) == 0x00000100);
3802 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
3804 public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() {
3805 return decodedType_;
3808 private void initFields() {
3813 payload_ = com.google.protobuf.ByteString.EMPTY;
3814 multipleResponses_ = false;
3817 decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
3819 private byte memoizedIsInitialized = -1;
3820 public final boolean isInitialized() {
3821 byte isInitialized = memoizedIsInitialized;
3822 if (isInitialized != -1) return isInitialized == 1;
3824 memoizedIsInitialized = 1;
3828 public void writeTo(com.google.protobuf.CodedOutputStream output)
3829 throws java.io.IOException {
3830 getSerializedSize();
3831 if (((bitField0_ & 0x00000001) == 0x00000001)) {
3832 output.writeInt32(1, bus_);
3834 if (((bitField0_ & 0x00000002) == 0x00000002)) {
3835 output.writeUInt32(2, messageId_);
3837 if (((bitField0_ & 0x00000004) == 0x00000004)) {
3838 output.writeUInt32(3, mode_);
3840 if (((bitField0_ & 0x00000008) == 0x00000008)) {
3841 output.writeUInt32(4, pid_);
3843 if (((bitField0_ & 0x00000010) == 0x00000010)) {
3844 output.writeBytes(5, payload_);
3846 if (((bitField0_ & 0x00000020) == 0x00000020)) {
3847 output.writeBool(6, multipleResponses_);
3849 if (((bitField0_ & 0x00000040) == 0x00000040)) {
3850 output.writeDouble(7, frequency_);
3852 if (((bitField0_ & 0x00000080) == 0x00000080)) {
3853 output.writeBytes(8, getNameBytes());
3855 if (((bitField0_ & 0x00000100) == 0x00000100)) {
3856 output.writeEnum(9, decodedType_.getNumber());
3858 getUnknownFields().writeTo(output);
3861 private int memoizedSerializedSize = -1;
3862 public int getSerializedSize() {
3863 int size = memoizedSerializedSize;
3864 if (size != -1) return size;
3867 if (((bitField0_ & 0x00000001) == 0x00000001)) {
3868 size += com.google.protobuf.CodedOutputStream
3869 .computeInt32Size(1, bus_);
3871 if (((bitField0_ & 0x00000002) == 0x00000002)) {
3872 size += com.google.protobuf.CodedOutputStream
3873 .computeUInt32Size(2, messageId_);
3875 if (((bitField0_ & 0x00000004) == 0x00000004)) {
3876 size += com.google.protobuf.CodedOutputStream
3877 .computeUInt32Size(3, mode_);
3879 if (((bitField0_ & 0x00000008) == 0x00000008)) {
3880 size += com.google.protobuf.CodedOutputStream
3881 .computeUInt32Size(4, pid_);
3883 if (((bitField0_ & 0x00000010) == 0x00000010)) {
3884 size += com.google.protobuf.CodedOutputStream
3885 .computeBytesSize(5, payload_);
3887 if (((bitField0_ & 0x00000020) == 0x00000020)) {
3888 size += com.google.protobuf.CodedOutputStream
3889 .computeBoolSize(6, multipleResponses_);
3891 if (((bitField0_ & 0x00000040) == 0x00000040)) {
3892 size += com.google.protobuf.CodedOutputStream
3893 .computeDoubleSize(7, frequency_);
3895 if (((bitField0_ & 0x00000080) == 0x00000080)) {
3896 size += com.google.protobuf.CodedOutputStream
3897 .computeBytesSize(8, getNameBytes());
3899 if (((bitField0_ & 0x00000100) == 0x00000100)) {
3900 size += com.google.protobuf.CodedOutputStream
3901 .computeEnumSize(9, decodedType_.getNumber());
3903 size += getUnknownFields().getSerializedSize();
3904 memoizedSerializedSize = size;
3908 private static final long serialVersionUID = 0L;
3910 protected java.lang.Object writeReplace()
3911 throws java.io.ObjectStreamException {
3912 return super.writeReplace();
3915 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3916 com.google.protobuf.ByteString data)
3917 throws com.google.protobuf.InvalidProtocolBufferException {
3918 return PARSER.parseFrom(data);
3920 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3921 com.google.protobuf.ByteString data,
3922 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3923 throws com.google.protobuf.InvalidProtocolBufferException {
3924 return PARSER.parseFrom(data, extensionRegistry);
3926 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data)
3927 throws com.google.protobuf.InvalidProtocolBufferException {
3928 return PARSER.parseFrom(data);
3930 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3932 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3933 throws com.google.protobuf.InvalidProtocolBufferException {
3934 return PARSER.parseFrom(data, extensionRegistry);
3936 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input)
3937 throws java.io.IOException {
3938 return PARSER.parseFrom(input);
3940 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3941 java.io.InputStream input,
3942 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3943 throws java.io.IOException {
3944 return PARSER.parseFrom(input, extensionRegistry);
3946 public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input)
3947 throws java.io.IOException {
3948 return PARSER.parseDelimitedFrom(input);
3950 public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(
3951 java.io.InputStream input,
3952 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3953 throws java.io.IOException {
3954 return PARSER.parseDelimitedFrom(input, extensionRegistry);
3956 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3957 com.google.protobuf.CodedInputStream input)
3958 throws java.io.IOException {
3959 return PARSER.parseFrom(input);
3961 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3962 com.google.protobuf.CodedInputStream input,
3963 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3964 throws java.io.IOException {
3965 return PARSER.parseFrom(input, extensionRegistry);
3968 public static Builder newBuilder() { return Builder.create(); }
3969 public Builder newBuilderForType() { return newBuilder(); }
3970 public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) {
3971 return newBuilder().mergeFrom(prototype);
3973 public Builder toBuilder() { return newBuilder(this); }
3976 protected Builder newBuilderForType(
3977 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3978 Builder builder = new Builder(parent);
3982 * Protobuf type {@code openxc.DiagnosticRequest}
3984 public static final class Builder extends
3985 com.google.protobuf.GeneratedMessage.Builder<Builder>
3986 implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder {
3987 public static final com.google.protobuf.Descriptors.Descriptor
3989 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3992 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3993 internalGetFieldAccessorTable() {
3994 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
3995 .ensureFieldAccessorsInitialized(
3996 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
3999 // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder()
4001 maybeForceBuilderInitialization();
4005 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4007 maybeForceBuilderInitialization();
4009 private void maybeForceBuilderInitialization() {
4010 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4013 private static Builder create() {
4014 return new Builder();
4017 public Builder clear() {
4020 bitField0_ = (bitField0_ & ~0x00000001);
4022 bitField0_ = (bitField0_ & ~0x00000002);
4024 bitField0_ = (bitField0_ & ~0x00000004);
4026 bitField0_ = (bitField0_ & ~0x00000008);
4027 payload_ = com.google.protobuf.ByteString.EMPTY;
4028 bitField0_ = (bitField0_ & ~0x00000010);
4029 multipleResponses_ = false;
4030 bitField0_ = (bitField0_ & ~0x00000020);
4032 bitField0_ = (bitField0_ & ~0x00000040);
4034 bitField0_ = (bitField0_ & ~0x00000080);
4035 decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
4036 bitField0_ = (bitField0_ & ~0x00000100);
4040 public Builder clone() {
4041 return create().mergeFrom(buildPartial());
4044 public com.google.protobuf.Descriptors.Descriptor
4045 getDescriptorForType() {
4046 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
4049 public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() {
4050 return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
4053 public com.openxc.BinaryMessages.DiagnosticRequest build() {
4054 com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial();
4055 if (!result.isInitialized()) {
4056 throw newUninitializedMessageException(result);
4061 public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() {
4062 com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this);
4063 int from_bitField0_ = bitField0_;
4064 int to_bitField0_ = 0;
4065 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4066 to_bitField0_ |= 0x00000001;
4069 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4070 to_bitField0_ |= 0x00000002;
4072 result.messageId_ = messageId_;
4073 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
4074 to_bitField0_ |= 0x00000004;
4076 result.mode_ = mode_;
4077 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
4078 to_bitField0_ |= 0x00000008;
4081 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
4082 to_bitField0_ |= 0x00000010;
4084 result.payload_ = payload_;
4085 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
4086 to_bitField0_ |= 0x00000020;
4088 result.multipleResponses_ = multipleResponses_;
4089 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
4090 to_bitField0_ |= 0x00000040;
4092 result.frequency_ = frequency_;
4093 if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
4094 to_bitField0_ |= 0x00000080;
4096 result.name_ = name_;
4097 if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
4098 to_bitField0_ |= 0x00000100;
4100 result.decodedType_ = decodedType_;
4101 result.bitField0_ = to_bitField0_;
4106 public Builder mergeFrom(com.google.protobuf.Message other) {
4107 if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) {
4108 return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other);
4110 super.mergeFrom(other);
4115 public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) {
4116 if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this;
4117 if (other.hasBus()) {
4118 setBus(other.getBus());
4120 if (other.hasMessageId()) {
4121 setMessageId(other.getMessageId());
4123 if (other.hasMode()) {
4124 setMode(other.getMode());
4126 if (other.hasPid()) {
4127 setPid(other.getPid());
4129 if (other.hasPayload()) {
4130 setPayload(other.getPayload());
4132 if (other.hasMultipleResponses()) {
4133 setMultipleResponses(other.getMultipleResponses());
4135 if (other.hasFrequency()) {
4136 setFrequency(other.getFrequency());
4138 if (other.hasName()) {
4139 bitField0_ |= 0x00000080;
4140 name_ = other.name_;
4143 if (other.hasDecodedType()) {
4144 setDecodedType(other.getDecodedType());
4146 this.mergeUnknownFields(other.getUnknownFields());
4150 public final boolean isInitialized() {
4154 public Builder mergeFrom(
4155 com.google.protobuf.CodedInputStream input,
4156 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4157 throws java.io.IOException {
4158 com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null;
4160 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4161 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4162 parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage();
4165 if (parsedMessage != null) {
4166 mergeFrom(parsedMessage);
4171 private int bitField0_;
4173 // optional int32 bus = 1;
4176 * <code>optional int32 bus = 1;</code>
4178 public boolean hasBus() {
4179 return ((bitField0_ & 0x00000001) == 0x00000001);
4182 * <code>optional int32 bus = 1;</code>
4184 public int getBus() {
4188 * <code>optional int32 bus = 1;</code>
4190 public Builder setBus(int value) {
4191 bitField0_ |= 0x00000001;
4197 * <code>optional int32 bus = 1;</code>
4199 public Builder clearBus() {
4200 bitField0_ = (bitField0_ & ~0x00000001);
4206 // optional uint32 message_id = 2;
4207 private int messageId_ ;
4209 * <code>optional uint32 message_id = 2;</code>
4211 public boolean hasMessageId() {
4212 return ((bitField0_ & 0x00000002) == 0x00000002);
4215 * <code>optional uint32 message_id = 2;</code>
4217 public int getMessageId() {
4221 * <code>optional uint32 message_id = 2;</code>
4223 public Builder setMessageId(int value) {
4224 bitField0_ |= 0x00000002;
4230 * <code>optional uint32 message_id = 2;</code>
4232 public Builder clearMessageId() {
4233 bitField0_ = (bitField0_ & ~0x00000002);
4239 // optional uint32 mode = 3;
4242 * <code>optional uint32 mode = 3;</code>
4244 public boolean hasMode() {
4245 return ((bitField0_ & 0x00000004) == 0x00000004);
4248 * <code>optional uint32 mode = 3;</code>
4250 public int getMode() {
4254 * <code>optional uint32 mode = 3;</code>
4256 public Builder setMode(int value) {
4257 bitField0_ |= 0x00000004;
4263 * <code>optional uint32 mode = 3;</code>
4265 public Builder clearMode() {
4266 bitField0_ = (bitField0_ & ~0x00000004);
4272 // optional uint32 pid = 4;
4275 * <code>optional uint32 pid = 4;</code>
4277 public boolean hasPid() {
4278 return ((bitField0_ & 0x00000008) == 0x00000008);
4281 * <code>optional uint32 pid = 4;</code>
4283 public int getPid() {
4287 * <code>optional uint32 pid = 4;</code>
4289 public Builder setPid(int value) {
4290 bitField0_ |= 0x00000008;
4296 * <code>optional uint32 pid = 4;</code>
4298 public Builder clearPid() {
4299 bitField0_ = (bitField0_ & ~0x00000008);
4305 // optional bytes payload = 5;
4306 private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
4308 * <code>optional bytes payload = 5;</code>
4311 * TODO we are capping this at 8 bytes for now - need to change when we
4312 * support multi-frame responses
4315 public boolean hasPayload() {
4316 return ((bitField0_ & 0x00000010) == 0x00000010);
4319 * <code>optional bytes payload = 5;</code>
4322 * TODO we are capping this at 8 bytes for now - need to change when we
4323 * support multi-frame responses
4326 public com.google.protobuf.ByteString getPayload() {
4330 * <code>optional bytes payload = 5;</code>
4333 * TODO we are capping this at 8 bytes for now - need to change when we
4334 * support multi-frame responses
4337 public Builder setPayload(com.google.protobuf.ByteString value) {
4338 if (value == null) {
4339 throw new NullPointerException();
4341 bitField0_ |= 0x00000010;
4347 * <code>optional bytes payload = 5;</code>
4350 * TODO we are capping this at 8 bytes for now - need to change when we
4351 * support multi-frame responses
4354 public Builder clearPayload() {
4355 bitField0_ = (bitField0_ & ~0x00000010);
4356 payload_ = getDefaultInstance().getPayload();
4361 // optional bool multiple_responses = 6;
4362 private boolean multipleResponses_ ;
4364 * <code>optional bool multiple_responses = 6;</code>
4366 public boolean hasMultipleResponses() {
4367 return ((bitField0_ & 0x00000020) == 0x00000020);
4370 * <code>optional bool multiple_responses = 6;</code>
4372 public boolean getMultipleResponses() {
4373 return multipleResponses_;
4376 * <code>optional bool multiple_responses = 6;</code>
4378 public Builder setMultipleResponses(boolean value) {
4379 bitField0_ |= 0x00000020;
4380 multipleResponses_ = value;
4385 * <code>optional bool multiple_responses = 6;</code>
4387 public Builder clearMultipleResponses() {
4388 bitField0_ = (bitField0_ & ~0x00000020);
4389 multipleResponses_ = false;
4394 // optional double frequency = 7;
4395 private double frequency_ ;
4397 * <code>optional double frequency = 7;</code>
4399 public boolean hasFrequency() {
4400 return ((bitField0_ & 0x00000040) == 0x00000040);
4403 * <code>optional double frequency = 7;</code>
4405 public double getFrequency() {
4409 * <code>optional double frequency = 7;</code>
4411 public Builder setFrequency(double value) {
4412 bitField0_ |= 0x00000040;
4418 * <code>optional double frequency = 7;</code>
4420 public Builder clearFrequency() {
4421 bitField0_ = (bitField0_ & ~0x00000040);
4427 // optional string name = 8;
4428 private java.lang.Object name_ = "";
4430 * <code>optional string name = 8;</code>
4432 public boolean hasName() {
4433 return ((bitField0_ & 0x00000080) == 0x00000080);
4436 * <code>optional string name = 8;</code>
4438 public java.lang.String getName() {
4439 java.lang.Object ref = name_;
4440 if (!(ref instanceof java.lang.String)) {
4441 java.lang.String s = ((com.google.protobuf.ByteString) ref)
4446 return (java.lang.String) ref;
4450 * <code>optional string name = 8;</code>
4452 public com.google.protobuf.ByteString
4454 java.lang.Object ref = name_;
4455 if (ref instanceof String) {
4456 com.google.protobuf.ByteString b =
4457 com.google.protobuf.ByteString.copyFromUtf8(
4458 (java.lang.String) ref);
4462 return (com.google.protobuf.ByteString) ref;
4466 * <code>optional string name = 8;</code>
4468 public Builder setName(
4469 java.lang.String value) {
4470 if (value == null) {
4471 throw new NullPointerException();
4473 bitField0_ |= 0x00000080;
4479 * <code>optional string name = 8;</code>
4481 public Builder clearName() {
4482 bitField0_ = (bitField0_ & ~0x00000080);
4483 name_ = getDefaultInstance().getName();
4488 * <code>optional string name = 8;</code>
4490 public Builder setNameBytes(
4491 com.google.protobuf.ByteString value) {
4492 if (value == null) {
4493 throw new NullPointerException();
4495 bitField0_ |= 0x00000080;
4501 // optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;
4502 private com.openxc.BinaryMessages.DiagnosticRequest.DecodedType decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
4504 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
4506 public boolean hasDecodedType() {
4507 return ((bitField0_ & 0x00000100) == 0x00000100);
4510 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
4512 public com.openxc.BinaryMessages.DiagnosticRequest.DecodedType getDecodedType() {
4513 return decodedType_;
4516 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
4518 public Builder setDecodedType(com.openxc.BinaryMessages.DiagnosticRequest.DecodedType value) {
4519 if (value == null) {
4520 throw new NullPointerException();
4522 bitField0_ |= 0x00000100;
4523 decodedType_ = value;
4528 * <code>optional .openxc.DiagnosticRequest.DecodedType decoded_type = 9;</code>
4530 public Builder clearDecodedType() {
4531 bitField0_ = (bitField0_ & ~0x00000100);
4532 decodedType_ = com.openxc.BinaryMessages.DiagnosticRequest.DecodedType.NONE;
4537 // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest)
4541 defaultInstance = new DiagnosticRequest(true);
4542 defaultInstance.initFields();
4545 // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest)
4548 public interface DiagnosticResponseOrBuilder
4549 extends com.google.protobuf.MessageOrBuilder {
4551 // optional int32 bus = 1;
4553 * <code>optional int32 bus = 1;</code>
4557 * <code>optional int32 bus = 1;</code>
4561 // optional uint32 message_id = 2;
4563 * <code>optional uint32 message_id = 2;</code>
4565 boolean hasMessageId();
4567 * <code>optional uint32 message_id = 2;</code>
4571 // optional uint32 mode = 3;
4573 * <code>optional uint32 mode = 3;</code>
4577 * <code>optional uint32 mode = 3;</code>
4581 // optional uint32 pid = 4;
4583 * <code>optional uint32 pid = 4;</code>
4587 * <code>optional uint32 pid = 4;</code>
4591 // optional bool success = 5;
4593 * <code>optional bool success = 5;</code>
4595 boolean hasSuccess();
4597 * <code>optional bool success = 5;</code>
4599 boolean getSuccess();
4601 // optional uint32 negative_response_code = 6;
4603 * <code>optional uint32 negative_response_code = 6;</code>
4605 boolean hasNegativeResponseCode();
4607 * <code>optional uint32 negative_response_code = 6;</code>
4609 int getNegativeResponseCode();
4611 // optional bytes payload = 7;
4613 * <code>optional bytes payload = 7;</code>
4616 * TODO we are capping this at 8 bytes for now - need to change when we
4617 * support multi-frame responses
4620 boolean hasPayload();
4622 * <code>optional bytes payload = 7;</code>
4625 * TODO we are capping this at 8 bytes for now - need to change when we
4626 * support multi-frame responses
4629 com.google.protobuf.ByteString getPayload();
4631 // optional double value = 8;
4633 * <code>optional double value = 8;</code>
4637 * <code>optional double value = 8;</code>
4642 * Protobuf type {@code openxc.DiagnosticResponse}
4644 public static final class DiagnosticResponse extends
4645 com.google.protobuf.GeneratedMessage
4646 implements DiagnosticResponseOrBuilder {
4647 // Use DiagnosticResponse.newBuilder() to construct.
4648 private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
4650 this.unknownFields = builder.getUnknownFields();
4652 private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
4654 private static final DiagnosticResponse defaultInstance;
4655 public static DiagnosticResponse getDefaultInstance() {
4656 return defaultInstance;
4659 public DiagnosticResponse getDefaultInstanceForType() {
4660 return defaultInstance;
4663 private final com.google.protobuf.UnknownFieldSet unknownFields;
4665 public final com.google.protobuf.UnknownFieldSet
4666 getUnknownFields() {
4667 return this.unknownFields;
4669 private DiagnosticResponse(
4670 com.google.protobuf.CodedInputStream input,
4671 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4672 throws com.google.protobuf.InvalidProtocolBufferException {
4674 int mutable_bitField0_ = 0;
4675 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4676 com.google.protobuf.UnknownFieldSet.newBuilder();
4678 boolean done = false;
4680 int tag = input.readTag();
4686 if (!parseUnknownField(input, unknownFields,
4687 extensionRegistry, tag)) {
4693 bitField0_ |= 0x00000001;
4694 bus_ = input.readInt32();
4698 bitField0_ |= 0x00000002;
4699 messageId_ = input.readUInt32();
4703 bitField0_ |= 0x00000004;
4704 mode_ = input.readUInt32();
4708 bitField0_ |= 0x00000008;
4709 pid_ = input.readUInt32();
4713 bitField0_ |= 0x00000010;
4714 success_ = input.readBool();
4718 bitField0_ |= 0x00000020;
4719 negativeResponseCode_ = input.readUInt32();
4723 bitField0_ |= 0x00000040;
4724 payload_ = input.readBytes();
4728 bitField0_ |= 0x00000080;
4729 value_ = input.readDouble();
4734 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4735 throw e.setUnfinishedMessage(this);
4736 } catch (java.io.IOException e) {
4737 throw new com.google.protobuf.InvalidProtocolBufferException(
4738 e.getMessage()).setUnfinishedMessage(this);
4740 this.unknownFields = unknownFields.build();
4741 makeExtensionsImmutable();
4744 public static final com.google.protobuf.Descriptors.Descriptor
4746 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4749 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4750 internalGetFieldAccessorTable() {
4751 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
4752 .ensureFieldAccessorsInitialized(
4753 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
4756 public static com.google.protobuf.Parser<DiagnosticResponse> PARSER =
4757 new com.google.protobuf.AbstractParser<DiagnosticResponse>() {
4758 public DiagnosticResponse parsePartialFrom(
4759 com.google.protobuf.CodedInputStream input,
4760 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4761 throws com.google.protobuf.InvalidProtocolBufferException {
4762 return new DiagnosticResponse(input, extensionRegistry);
4767 public com.google.protobuf.Parser<DiagnosticResponse> getParserForType() {
4771 private int bitField0_;
4772 // optional int32 bus = 1;
4773 public static final int BUS_FIELD_NUMBER = 1;
4776 * <code>optional int32 bus = 1;</code>
4778 public boolean hasBus() {
4779 return ((bitField0_ & 0x00000001) == 0x00000001);
4782 * <code>optional int32 bus = 1;</code>
4784 public int getBus() {
4788 // optional uint32 message_id = 2;
4789 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
4790 private int messageId_;
4792 * <code>optional uint32 message_id = 2;</code>
4794 public boolean hasMessageId() {
4795 return ((bitField0_ & 0x00000002) == 0x00000002);
4798 * <code>optional uint32 message_id = 2;</code>
4800 public int getMessageId() {
4804 // optional uint32 mode = 3;
4805 public static final int MODE_FIELD_NUMBER = 3;
4808 * <code>optional uint32 mode = 3;</code>
4810 public boolean hasMode() {
4811 return ((bitField0_ & 0x00000004) == 0x00000004);
4814 * <code>optional uint32 mode = 3;</code>
4816 public int getMode() {
4820 // optional uint32 pid = 4;
4821 public static final int PID_FIELD_NUMBER = 4;
4824 * <code>optional uint32 pid = 4;</code>
4826 public boolean hasPid() {
4827 return ((bitField0_ & 0x00000008) == 0x00000008);
4830 * <code>optional uint32 pid = 4;</code>
4832 public int getPid() {
4836 // optional bool success = 5;
4837 public static final int SUCCESS_FIELD_NUMBER = 5;
4838 private boolean success_;
4840 * <code>optional bool success = 5;</code>
4842 public boolean hasSuccess() {
4843 return ((bitField0_ & 0x00000010) == 0x00000010);
4846 * <code>optional bool success = 5;</code>
4848 public boolean getSuccess() {
4852 // optional uint32 negative_response_code = 6;
4853 public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
4854 private int negativeResponseCode_;
4856 * <code>optional uint32 negative_response_code = 6;</code>
4858 public boolean hasNegativeResponseCode() {
4859 return ((bitField0_ & 0x00000020) == 0x00000020);
4862 * <code>optional uint32 negative_response_code = 6;</code>
4864 public int getNegativeResponseCode() {
4865 return negativeResponseCode_;
4868 // optional bytes payload = 7;
4869 public static final int PAYLOAD_FIELD_NUMBER = 7;
4870 private com.google.protobuf.ByteString payload_;
4872 * <code>optional bytes payload = 7;</code>
4875 * TODO we are capping this at 8 bytes for now - need to change when we
4876 * support multi-frame responses
4879 public boolean hasPayload() {
4880 return ((bitField0_ & 0x00000040) == 0x00000040);
4883 * <code>optional bytes payload = 7;</code>
4886 * TODO we are capping this at 8 bytes for now - need to change when we
4887 * support multi-frame responses
4890 public com.google.protobuf.ByteString getPayload() {
4894 // optional double value = 8;
4895 public static final int VALUE_FIELD_NUMBER = 8;
4896 private double value_;
4898 * <code>optional double value = 8;</code>
4900 public boolean hasValue() {
4901 return ((bitField0_ & 0x00000080) == 0x00000080);
4904 * <code>optional double value = 8;</code>
4906 public double getValue() {
4910 private void initFields() {
4916 negativeResponseCode_ = 0;
4917 payload_ = com.google.protobuf.ByteString.EMPTY;
4920 private byte memoizedIsInitialized = -1;
4921 public final boolean isInitialized() {
4922 byte isInitialized = memoizedIsInitialized;
4923 if (isInitialized != -1) return isInitialized == 1;
4925 memoizedIsInitialized = 1;
4929 public void writeTo(com.google.protobuf.CodedOutputStream output)
4930 throws java.io.IOException {
4931 getSerializedSize();
4932 if (((bitField0_ & 0x00000001) == 0x00000001)) {
4933 output.writeInt32(1, bus_);
4935 if (((bitField0_ & 0x00000002) == 0x00000002)) {
4936 output.writeUInt32(2, messageId_);
4938 if (((bitField0_ & 0x00000004) == 0x00000004)) {
4939 output.writeUInt32(3, mode_);
4941 if (((bitField0_ & 0x00000008) == 0x00000008)) {
4942 output.writeUInt32(4, pid_);
4944 if (((bitField0_ & 0x00000010) == 0x00000010)) {
4945 output.writeBool(5, success_);
4947 if (((bitField0_ & 0x00000020) == 0x00000020)) {
4948 output.writeUInt32(6, negativeResponseCode_);
4950 if (((bitField0_ & 0x00000040) == 0x00000040)) {
4951 output.writeBytes(7, payload_);
4953 if (((bitField0_ & 0x00000080) == 0x00000080)) {
4954 output.writeDouble(8, value_);
4956 getUnknownFields().writeTo(output);
4959 private int memoizedSerializedSize = -1;
4960 public int getSerializedSize() {
4961 int size = memoizedSerializedSize;
4962 if (size != -1) return size;
4965 if (((bitField0_ & 0x00000001) == 0x00000001)) {
4966 size += com.google.protobuf.CodedOutputStream
4967 .computeInt32Size(1, bus_);
4969 if (((bitField0_ & 0x00000002) == 0x00000002)) {
4970 size += com.google.protobuf.CodedOutputStream
4971 .computeUInt32Size(2, messageId_);
4973 if (((bitField0_ & 0x00000004) == 0x00000004)) {
4974 size += com.google.protobuf.CodedOutputStream
4975 .computeUInt32Size(3, mode_);
4977 if (((bitField0_ & 0x00000008) == 0x00000008)) {
4978 size += com.google.protobuf.CodedOutputStream
4979 .computeUInt32Size(4, pid_);
4981 if (((bitField0_ & 0x00000010) == 0x00000010)) {
4982 size += com.google.protobuf.CodedOutputStream
4983 .computeBoolSize(5, success_);
4985 if (((bitField0_ & 0x00000020) == 0x00000020)) {
4986 size += com.google.protobuf.CodedOutputStream
4987 .computeUInt32Size(6, negativeResponseCode_);
4989 if (((bitField0_ & 0x00000040) == 0x00000040)) {
4990 size += com.google.protobuf.CodedOutputStream
4991 .computeBytesSize(7, payload_);
4993 if (((bitField0_ & 0x00000080) == 0x00000080)) {
4994 size += com.google.protobuf.CodedOutputStream
4995 .computeDoubleSize(8, value_);
4997 size += getUnknownFields().getSerializedSize();
4998 memoizedSerializedSize = size;
5002 private static final long serialVersionUID = 0L;
5004 protected java.lang.Object writeReplace()
5005 throws java.io.ObjectStreamException {
5006 return super.writeReplace();
5009 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5010 com.google.protobuf.ByteString data)
5011 throws com.google.protobuf.InvalidProtocolBufferException {
5012 return PARSER.parseFrom(data);
5014 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5015 com.google.protobuf.ByteString data,
5016 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5017 throws com.google.protobuf.InvalidProtocolBufferException {
5018 return PARSER.parseFrom(data, extensionRegistry);
5020 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data)
5021 throws com.google.protobuf.InvalidProtocolBufferException {
5022 return PARSER.parseFrom(data);
5024 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5026 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5027 throws com.google.protobuf.InvalidProtocolBufferException {
5028 return PARSER.parseFrom(data, extensionRegistry);
5030 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input)
5031 throws java.io.IOException {
5032 return PARSER.parseFrom(input);
5034 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5035 java.io.InputStream input,
5036 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5037 throws java.io.IOException {
5038 return PARSER.parseFrom(input, extensionRegistry);
5040 public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input)
5041 throws java.io.IOException {
5042 return PARSER.parseDelimitedFrom(input);
5044 public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(
5045 java.io.InputStream input,
5046 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5047 throws java.io.IOException {
5048 return PARSER.parseDelimitedFrom(input, extensionRegistry);
5050 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5051 com.google.protobuf.CodedInputStream input)
5052 throws java.io.IOException {
5053 return PARSER.parseFrom(input);
5055 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
5056 com.google.protobuf.CodedInputStream input,
5057 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5058 throws java.io.IOException {
5059 return PARSER.parseFrom(input, extensionRegistry);
5062 public static Builder newBuilder() { return Builder.create(); }
5063 public Builder newBuilderForType() { return newBuilder(); }
5064 public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) {
5065 return newBuilder().mergeFrom(prototype);
5067 public Builder toBuilder() { return newBuilder(this); }
5070 protected Builder newBuilderForType(
5071 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5072 Builder builder = new Builder(parent);
5076 * Protobuf type {@code openxc.DiagnosticResponse}
5078 public static final class Builder extends
5079 com.google.protobuf.GeneratedMessage.Builder<Builder>
5080 implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder {
5081 public static final com.google.protobuf.Descriptors.Descriptor
5083 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
5086 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5087 internalGetFieldAccessorTable() {
5088 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
5089 .ensureFieldAccessorsInitialized(
5090 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
5093 // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder()
5095 maybeForceBuilderInitialization();
5099 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5101 maybeForceBuilderInitialization();
5103 private void maybeForceBuilderInitialization() {
5104 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
5107 private static Builder create() {
5108 return new Builder();
5111 public Builder clear() {
5114 bitField0_ = (bitField0_ & ~0x00000001);
5116 bitField0_ = (bitField0_ & ~0x00000002);
5118 bitField0_ = (bitField0_ & ~0x00000004);
5120 bitField0_ = (bitField0_ & ~0x00000008);
5122 bitField0_ = (bitField0_ & ~0x00000010);
5123 negativeResponseCode_ = 0;
5124 bitField0_ = (bitField0_ & ~0x00000020);
5125 payload_ = com.google.protobuf.ByteString.EMPTY;
5126 bitField0_ = (bitField0_ & ~0x00000040);
5128 bitField0_ = (bitField0_ & ~0x00000080);
5132 public Builder clone() {
5133 return create().mergeFrom(buildPartial());
5136 public com.google.protobuf.Descriptors.Descriptor
5137 getDescriptorForType() {
5138 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
5141 public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() {
5142 return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
5145 public com.openxc.BinaryMessages.DiagnosticResponse build() {
5146 com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial();
5147 if (!result.isInitialized()) {
5148 throw newUninitializedMessageException(result);
5153 public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() {
5154 com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this);
5155 int from_bitField0_ = bitField0_;
5156 int to_bitField0_ = 0;
5157 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
5158 to_bitField0_ |= 0x00000001;
5161 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
5162 to_bitField0_ |= 0x00000002;
5164 result.messageId_ = messageId_;
5165 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5166 to_bitField0_ |= 0x00000004;
5168 result.mode_ = mode_;
5169 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5170 to_bitField0_ |= 0x00000008;
5173 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
5174 to_bitField0_ |= 0x00000010;
5176 result.success_ = success_;
5177 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
5178 to_bitField0_ |= 0x00000020;
5180 result.negativeResponseCode_ = negativeResponseCode_;
5181 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
5182 to_bitField0_ |= 0x00000040;
5184 result.payload_ = payload_;
5185 if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
5186 to_bitField0_ |= 0x00000080;
5188 result.value_ = value_;
5189 result.bitField0_ = to_bitField0_;
5194 public Builder mergeFrom(com.google.protobuf.Message other) {
5195 if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) {
5196 return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other);
5198 super.mergeFrom(other);
5203 public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) {
5204 if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this;
5205 if (other.hasBus()) {
5206 setBus(other.getBus());
5208 if (other.hasMessageId()) {
5209 setMessageId(other.getMessageId());
5211 if (other.hasMode()) {
5212 setMode(other.getMode());
5214 if (other.hasPid()) {
5215 setPid(other.getPid());
5217 if (other.hasSuccess()) {
5218 setSuccess(other.getSuccess());
5220 if (other.hasNegativeResponseCode()) {
5221 setNegativeResponseCode(other.getNegativeResponseCode());
5223 if (other.hasPayload()) {
5224 setPayload(other.getPayload());
5226 if (other.hasValue()) {
5227 setValue(other.getValue());
5229 this.mergeUnknownFields(other.getUnknownFields());
5233 public final boolean isInitialized() {
5237 public Builder mergeFrom(
5238 com.google.protobuf.CodedInputStream input,
5239 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5240 throws java.io.IOException {
5241 com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null;
5243 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5244 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5245 parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage();
5248 if (parsedMessage != null) {
5249 mergeFrom(parsedMessage);
5254 private int bitField0_;
5256 // optional int32 bus = 1;
5259 * <code>optional int32 bus = 1;</code>
5261 public boolean hasBus() {
5262 return ((bitField0_ & 0x00000001) == 0x00000001);
5265 * <code>optional int32 bus = 1;</code>
5267 public int getBus() {
5271 * <code>optional int32 bus = 1;</code>
5273 public Builder setBus(int value) {
5274 bitField0_ |= 0x00000001;
5280 * <code>optional int32 bus = 1;</code>
5282 public Builder clearBus() {
5283 bitField0_ = (bitField0_ & ~0x00000001);
5289 // optional uint32 message_id = 2;
5290 private int messageId_ ;
5292 * <code>optional uint32 message_id = 2;</code>
5294 public boolean hasMessageId() {
5295 return ((bitField0_ & 0x00000002) == 0x00000002);
5298 * <code>optional uint32 message_id = 2;</code>
5300 public int getMessageId() {
5304 * <code>optional uint32 message_id = 2;</code>
5306 public Builder setMessageId(int value) {
5307 bitField0_ |= 0x00000002;
5313 * <code>optional uint32 message_id = 2;</code>
5315 public Builder clearMessageId() {
5316 bitField0_ = (bitField0_ & ~0x00000002);
5322 // optional uint32 mode = 3;
5325 * <code>optional uint32 mode = 3;</code>
5327 public boolean hasMode() {
5328 return ((bitField0_ & 0x00000004) == 0x00000004);
5331 * <code>optional uint32 mode = 3;</code>
5333 public int getMode() {
5337 * <code>optional uint32 mode = 3;</code>
5339 public Builder setMode(int value) {
5340 bitField0_ |= 0x00000004;
5346 * <code>optional uint32 mode = 3;</code>
5348 public Builder clearMode() {
5349 bitField0_ = (bitField0_ & ~0x00000004);
5355 // optional uint32 pid = 4;
5358 * <code>optional uint32 pid = 4;</code>
5360 public boolean hasPid() {
5361 return ((bitField0_ & 0x00000008) == 0x00000008);
5364 * <code>optional uint32 pid = 4;</code>
5366 public int getPid() {
5370 * <code>optional uint32 pid = 4;</code>
5372 public Builder setPid(int value) {
5373 bitField0_ |= 0x00000008;
5379 * <code>optional uint32 pid = 4;</code>
5381 public Builder clearPid() {
5382 bitField0_ = (bitField0_ & ~0x00000008);
5388 // optional bool success = 5;
5389 private boolean success_ ;
5391 * <code>optional bool success = 5;</code>
5393 public boolean hasSuccess() {
5394 return ((bitField0_ & 0x00000010) == 0x00000010);
5397 * <code>optional bool success = 5;</code>
5399 public boolean getSuccess() {
5403 * <code>optional bool success = 5;</code>
5405 public Builder setSuccess(boolean value) {
5406 bitField0_ |= 0x00000010;
5412 * <code>optional bool success = 5;</code>
5414 public Builder clearSuccess() {
5415 bitField0_ = (bitField0_ & ~0x00000010);
5421 // optional uint32 negative_response_code = 6;
5422 private int negativeResponseCode_ ;
5424 * <code>optional uint32 negative_response_code = 6;</code>
5426 public boolean hasNegativeResponseCode() {
5427 return ((bitField0_ & 0x00000020) == 0x00000020);
5430 * <code>optional uint32 negative_response_code = 6;</code>
5432 public int getNegativeResponseCode() {
5433 return negativeResponseCode_;
5436 * <code>optional uint32 negative_response_code = 6;</code>
5438 public Builder setNegativeResponseCode(int value) {
5439 bitField0_ |= 0x00000020;
5440 negativeResponseCode_ = value;
5445 * <code>optional uint32 negative_response_code = 6;</code>
5447 public Builder clearNegativeResponseCode() {
5448 bitField0_ = (bitField0_ & ~0x00000020);
5449 negativeResponseCode_ = 0;
5454 // optional bytes payload = 7;
5455 private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
5457 * <code>optional bytes payload = 7;</code>
5460 * TODO we are capping this at 8 bytes for now - need to change when we
5461 * support multi-frame responses
5464 public boolean hasPayload() {
5465 return ((bitField0_ & 0x00000040) == 0x00000040);
5468 * <code>optional bytes payload = 7;</code>
5471 * TODO we are capping this at 8 bytes for now - need to change when we
5472 * support multi-frame responses
5475 public com.google.protobuf.ByteString getPayload() {
5479 * <code>optional bytes payload = 7;</code>
5482 * TODO we are capping this at 8 bytes for now - need to change when we
5483 * support multi-frame responses
5486 public Builder setPayload(com.google.protobuf.ByteString value) {
5487 if (value == null) {
5488 throw new NullPointerException();
5490 bitField0_ |= 0x00000040;
5496 * <code>optional bytes payload = 7;</code>
5499 * TODO we are capping this at 8 bytes for now - need to change when we
5500 * support multi-frame responses
5503 public Builder clearPayload() {
5504 bitField0_ = (bitField0_ & ~0x00000040);
5505 payload_ = getDefaultInstance().getPayload();
5510 // optional double value = 8;
5511 private double value_ ;
5513 * <code>optional double value = 8;</code>
5515 public boolean hasValue() {
5516 return ((bitField0_ & 0x00000080) == 0x00000080);
5519 * <code>optional double value = 8;</code>
5521 public double getValue() {
5525 * <code>optional double value = 8;</code>
5527 public Builder setValue(double value) {
5528 bitField0_ |= 0x00000080;
5534 * <code>optional double value = 8;</code>
5536 public Builder clearValue() {
5537 bitField0_ = (bitField0_ & ~0x00000080);
5543 // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse)
5547 defaultInstance = new DiagnosticResponse(true);
5548 defaultInstance.initFields();
5551 // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse)
5554 public interface DynamicFieldOrBuilder
5555 extends com.google.protobuf.MessageOrBuilder {
5557 // optional .openxc.DynamicField.Type type = 1;
5559 * <code>optional .openxc.DynamicField.Type type = 1;</code>
5563 * <code>optional .openxc.DynamicField.Type type = 1;</code>
5565 com.openxc.BinaryMessages.DynamicField.Type getType();
5567 // optional string string_value = 2;
5569 * <code>optional string string_value = 2;</code>
5571 boolean hasStringValue();
5573 * <code>optional string string_value = 2;</code>
5575 java.lang.String getStringValue();
5577 * <code>optional string string_value = 2;</code>
5579 com.google.protobuf.ByteString
5580 getStringValueBytes();
5582 // optional double numeric_value = 3;
5584 * <code>optional double numeric_value = 3;</code>
5586 boolean hasNumericValue();
5588 * <code>optional double numeric_value = 3;</code>
5590 double getNumericValue();
5592 // optional bool boolean_value = 4;
5594 * <code>optional bool boolean_value = 4;</code>
5596 boolean hasBooleanValue();
5598 * <code>optional bool boolean_value = 4;</code>
5600 boolean getBooleanValue();
5603 * Protobuf type {@code openxc.DynamicField}
5605 public static final class DynamicField extends
5606 com.google.protobuf.GeneratedMessage
5607 implements DynamicFieldOrBuilder {
5608 // Use DynamicField.newBuilder() to construct.
5609 private DynamicField(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
5611 this.unknownFields = builder.getUnknownFields();
5613 private DynamicField(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
5615 private static final DynamicField defaultInstance;
5616 public static DynamicField getDefaultInstance() {
5617 return defaultInstance;
5620 public DynamicField getDefaultInstanceForType() {
5621 return defaultInstance;
5624 private final com.google.protobuf.UnknownFieldSet unknownFields;
5626 public final com.google.protobuf.UnknownFieldSet
5627 getUnknownFields() {
5628 return this.unknownFields;
5630 private DynamicField(
5631 com.google.protobuf.CodedInputStream input,
5632 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5633 throws com.google.protobuf.InvalidProtocolBufferException {
5635 int mutable_bitField0_ = 0;
5636 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
5637 com.google.protobuf.UnknownFieldSet.newBuilder();
5639 boolean done = false;
5641 int tag = input.readTag();
5647 if (!parseUnknownField(input, unknownFields,
5648 extensionRegistry, tag)) {
5654 int rawValue = input.readEnum();
5655 com.openxc.BinaryMessages.DynamicField.Type value = com.openxc.BinaryMessages.DynamicField.Type.valueOf(rawValue);
5656 if (value == null) {
5657 unknownFields.mergeVarintField(1, rawValue);
5659 bitField0_ |= 0x00000001;
5665 bitField0_ |= 0x00000002;
5666 stringValue_ = input.readBytes();
5670 bitField0_ |= 0x00000004;
5671 numericValue_ = input.readDouble();
5675 bitField0_ |= 0x00000008;
5676 booleanValue_ = input.readBool();
5681 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5682 throw e.setUnfinishedMessage(this);
5683 } catch (java.io.IOException e) {
5684 throw new com.google.protobuf.InvalidProtocolBufferException(
5685 e.getMessage()).setUnfinishedMessage(this);
5687 this.unknownFields = unknownFields.build();
5688 makeExtensionsImmutable();
5691 public static final com.google.protobuf.Descriptors.Descriptor
5693 return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
5696 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5697 internalGetFieldAccessorTable() {
5698 return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
5699 .ensureFieldAccessorsInitialized(
5700 com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
5703 public static com.google.protobuf.Parser<DynamicField> PARSER =
5704 new com.google.protobuf.AbstractParser<DynamicField>() {
5705 public DynamicField parsePartialFrom(
5706 com.google.protobuf.CodedInputStream input,
5707 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5708 throws com.google.protobuf.InvalidProtocolBufferException {
5709 return new DynamicField(input, extensionRegistry);
5714 public com.google.protobuf.Parser<DynamicField> getParserForType() {
5719 * Protobuf enum {@code openxc.DynamicField.Type}
5722 implements com.google.protobuf.ProtocolMessageEnum {
5724 * <code>STRING = 1;</code>
5728 * <code>NUM = 2;</code>
5732 * <code>BOOL = 3;</code>
5738 * <code>STRING = 1;</code>
5740 public static final int STRING_VALUE = 1;
5742 * <code>NUM = 2;</code>
5744 public static final int NUM_VALUE = 2;
5746 * <code>BOOL = 3;</code>
5748 public static final int BOOL_VALUE = 3;
5751 public final int getNumber() { return value; }
5753 public static Type valueOf(int value) {
5755 case 1: return STRING;
5757 case 3: return BOOL;
5758 default: return null;
5762 public static com.google.protobuf.Internal.EnumLiteMap<Type>
5763 internalGetValueMap() {
5764 return internalValueMap;
5766 private static com.google.protobuf.Internal.EnumLiteMap<Type>
5768 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
5769 public Type findValueByNumber(int number) {
5770 return Type.valueOf(number);
5774 public final com.google.protobuf.Descriptors.EnumValueDescriptor
5775 getValueDescriptor() {
5776 return getDescriptor().getValues().get(index);
5778 public final com.google.protobuf.Descriptors.EnumDescriptor
5779 getDescriptorForType() {
5780 return getDescriptor();
5782 public static final com.google.protobuf.Descriptors.EnumDescriptor
5784 return com.openxc.BinaryMessages.DynamicField.getDescriptor().getEnumTypes().get(0);
5787 private static final Type[] VALUES = values();
5789 public static Type valueOf(
5790 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
5791 if (desc.getType() != getDescriptor()) {
5792 throw new java.lang.IllegalArgumentException(
5793 "EnumValueDescriptor is not for this type.");
5795 return VALUES[desc.getIndex()];
5798 private final int index;
5799 private final int value;
5801 private Type(int index, int value) {
5806 // @@protoc_insertion_point(enum_scope:openxc.DynamicField.Type)
5809 private int bitField0_;
5810 // optional .openxc.DynamicField.Type type = 1;
5811 public static final int TYPE_FIELD_NUMBER = 1;
5812 private com.openxc.BinaryMessages.DynamicField.Type type_;
5814 * <code>optional .openxc.DynamicField.Type type = 1;</code>
5816 public boolean hasType() {
5817 return ((bitField0_ & 0x00000001) == 0x00000001);
5820 * <code>optional .openxc.DynamicField.Type type = 1;</code>
5822 public com.openxc.BinaryMessages.DynamicField.Type getType() {
5826 // optional string string_value = 2;
5827 public static final int STRING_VALUE_FIELD_NUMBER = 2;
5828 private java.lang.Object stringValue_;
5830 * <code>optional string string_value = 2;</code>
5832 public boolean hasStringValue() {
5833 return ((bitField0_ & 0x00000002) == 0x00000002);
5836 * <code>optional string string_value = 2;</code>
5838 public java.lang.String getStringValue() {
5839 java.lang.Object ref = stringValue_;
5840 if (ref instanceof java.lang.String) {
5841 return (java.lang.String) ref;
5843 com.google.protobuf.ByteString bs =
5844 (com.google.protobuf.ByteString) ref;
5845 java.lang.String s = bs.toStringUtf8();
5846 if (bs.isValidUtf8()) {
5853 * <code>optional string string_value = 2;</code>
5855 public com.google.protobuf.ByteString
5856 getStringValueBytes() {
5857 java.lang.Object ref = stringValue_;
5858 if (ref instanceof java.lang.String) {
5859 com.google.protobuf.ByteString b =
5860 com.google.protobuf.ByteString.copyFromUtf8(
5861 (java.lang.String) ref);
5865 return (com.google.protobuf.ByteString) ref;
5869 // optional double numeric_value = 3;
5870 public static final int NUMERIC_VALUE_FIELD_NUMBER = 3;
5871 private double numericValue_;
5873 * <code>optional double numeric_value = 3;</code>
5875 public boolean hasNumericValue() {
5876 return ((bitField0_ & 0x00000004) == 0x00000004);
5879 * <code>optional double numeric_value = 3;</code>
5881 public double getNumericValue() {
5882 return numericValue_;
5885 // optional bool boolean_value = 4;
5886 public static final int BOOLEAN_VALUE_FIELD_NUMBER = 4;
5887 private boolean booleanValue_;
5889 * <code>optional bool boolean_value = 4;</code>
5891 public boolean hasBooleanValue() {
5892 return ((bitField0_ & 0x00000008) == 0x00000008);
5895 * <code>optional bool boolean_value = 4;</code>
5897 public boolean getBooleanValue() {
5898 return booleanValue_;
5901 private void initFields() {
5902 type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
5905 booleanValue_ = false;
5907 private byte memoizedIsInitialized = -1;
5908 public final boolean isInitialized() {
5909 byte isInitialized = memoizedIsInitialized;
5910 if (isInitialized != -1) return isInitialized == 1;
5912 memoizedIsInitialized = 1;
5916 public void writeTo(com.google.protobuf.CodedOutputStream output)
5917 throws java.io.IOException {
5918 getSerializedSize();
5919 if (((bitField0_ & 0x00000001) == 0x00000001)) {
5920 output.writeEnum(1, type_.getNumber());
5922 if (((bitField0_ & 0x00000002) == 0x00000002)) {
5923 output.writeBytes(2, getStringValueBytes());
5925 if (((bitField0_ & 0x00000004) == 0x00000004)) {
5926 output.writeDouble(3, numericValue_);
5928 if (((bitField0_ & 0x00000008) == 0x00000008)) {
5929 output.writeBool(4, booleanValue_);
5931 getUnknownFields().writeTo(output);
5934 private int memoizedSerializedSize = -1;
5935 public int getSerializedSize() {
5936 int size = memoizedSerializedSize;
5937 if (size != -1) return size;
5940 if (((bitField0_ & 0x00000001) == 0x00000001)) {
5941 size += com.google.protobuf.CodedOutputStream
5942 .computeEnumSize(1, type_.getNumber());
5944 if (((bitField0_ & 0x00000002) == 0x00000002)) {
5945 size += com.google.protobuf.CodedOutputStream
5946 .computeBytesSize(2, getStringValueBytes());
5948 if (((bitField0_ & 0x00000004) == 0x00000004)) {
5949 size += com.google.protobuf.CodedOutputStream
5950 .computeDoubleSize(3, numericValue_);
5952 if (((bitField0_ & 0x00000008) == 0x00000008)) {
5953 size += com.google.protobuf.CodedOutputStream
5954 .computeBoolSize(4, booleanValue_);
5956 size += getUnknownFields().getSerializedSize();
5957 memoizedSerializedSize = size;
5961 private static final long serialVersionUID = 0L;
5963 protected java.lang.Object writeReplace()
5964 throws java.io.ObjectStreamException {
5965 return super.writeReplace();
5968 public static com.openxc.BinaryMessages.DynamicField parseFrom(
5969 com.google.protobuf.ByteString data)
5970 throws com.google.protobuf.InvalidProtocolBufferException {
5971 return PARSER.parseFrom(data);
5973 public static com.openxc.BinaryMessages.DynamicField parseFrom(
5974 com.google.protobuf.ByteString data,
5975 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5976 throws com.google.protobuf.InvalidProtocolBufferException {
5977 return PARSER.parseFrom(data, extensionRegistry);
5979 public static com.openxc.BinaryMessages.DynamicField parseFrom(byte[] data)
5980 throws com.google.protobuf.InvalidProtocolBufferException {
5981 return PARSER.parseFrom(data);
5983 public static com.openxc.BinaryMessages.DynamicField parseFrom(
5985 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5986 throws com.google.protobuf.InvalidProtocolBufferException {
5987 return PARSER.parseFrom(data, extensionRegistry);
5989 public static com.openxc.BinaryMessages.DynamicField parseFrom(java.io.InputStream input)
5990 throws java.io.IOException {
5991 return PARSER.parseFrom(input);
5993 public static com.openxc.BinaryMessages.DynamicField parseFrom(
5994 java.io.InputStream input,
5995 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5996 throws java.io.IOException {
5997 return PARSER.parseFrom(input, extensionRegistry);
5999 public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(java.io.InputStream input)
6000 throws java.io.IOException {
6001 return PARSER.parseDelimitedFrom(input);
6003 public static com.openxc.BinaryMessages.DynamicField parseDelimitedFrom(
6004 java.io.InputStream input,
6005 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6006 throws java.io.IOException {
6007 return PARSER.parseDelimitedFrom(input, extensionRegistry);
6009 public static com.openxc.BinaryMessages.DynamicField parseFrom(
6010 com.google.protobuf.CodedInputStream input)
6011 throws java.io.IOException {
6012 return PARSER.parseFrom(input);
6014 public static com.openxc.BinaryMessages.DynamicField parseFrom(
6015 com.google.protobuf.CodedInputStream input,
6016 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6017 throws java.io.IOException {
6018 return PARSER.parseFrom(input, extensionRegistry);
6021 public static Builder newBuilder() { return Builder.create(); }
6022 public Builder newBuilderForType() { return newBuilder(); }
6023 public static Builder newBuilder(com.openxc.BinaryMessages.DynamicField prototype) {
6024 return newBuilder().mergeFrom(prototype);
6026 public Builder toBuilder() { return newBuilder(this); }
6029 protected Builder newBuilderForType(
6030 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6031 Builder builder = new Builder(parent);
6035 * Protobuf type {@code openxc.DynamicField}
6037 public static final class Builder extends
6038 com.google.protobuf.GeneratedMessage.Builder<Builder>
6039 implements com.openxc.BinaryMessages.DynamicFieldOrBuilder {
6040 public static final com.google.protobuf.Descriptors.Descriptor
6042 return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
6045 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6046 internalGetFieldAccessorTable() {
6047 return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_fieldAccessorTable
6048 .ensureFieldAccessorsInitialized(
6049 com.openxc.BinaryMessages.DynamicField.class, com.openxc.BinaryMessages.DynamicField.Builder.class);
6052 // Construct using com.openxc.BinaryMessages.DynamicField.newBuilder()
6054 maybeForceBuilderInitialization();
6058 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6060 maybeForceBuilderInitialization();
6062 private void maybeForceBuilderInitialization() {
6063 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
6066 private static Builder create() {
6067 return new Builder();
6070 public Builder clear() {
6072 type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6073 bitField0_ = (bitField0_ & ~0x00000001);
6075 bitField0_ = (bitField0_ & ~0x00000002);
6077 bitField0_ = (bitField0_ & ~0x00000004);
6078 booleanValue_ = false;
6079 bitField0_ = (bitField0_ & ~0x00000008);
6083 public Builder clone() {
6084 return create().mergeFrom(buildPartial());
6087 public com.google.protobuf.Descriptors.Descriptor
6088 getDescriptorForType() {
6089 return com.openxc.BinaryMessages.internal_static_openxc_DynamicField_descriptor;
6092 public com.openxc.BinaryMessages.DynamicField getDefaultInstanceForType() {
6093 return com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6096 public com.openxc.BinaryMessages.DynamicField build() {
6097 com.openxc.BinaryMessages.DynamicField result = buildPartial();
6098 if (!result.isInitialized()) {
6099 throw newUninitializedMessageException(result);
6104 public com.openxc.BinaryMessages.DynamicField buildPartial() {
6105 com.openxc.BinaryMessages.DynamicField result = new com.openxc.BinaryMessages.DynamicField(this);
6106 int from_bitField0_ = bitField0_;
6107 int to_bitField0_ = 0;
6108 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
6109 to_bitField0_ |= 0x00000001;
6111 result.type_ = type_;
6112 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
6113 to_bitField0_ |= 0x00000002;
6115 result.stringValue_ = stringValue_;
6116 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
6117 to_bitField0_ |= 0x00000004;
6119 result.numericValue_ = numericValue_;
6120 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
6121 to_bitField0_ |= 0x00000008;
6123 result.booleanValue_ = booleanValue_;
6124 result.bitField0_ = to_bitField0_;
6129 public Builder mergeFrom(com.google.protobuf.Message other) {
6130 if (other instanceof com.openxc.BinaryMessages.DynamicField) {
6131 return mergeFrom((com.openxc.BinaryMessages.DynamicField)other);
6133 super.mergeFrom(other);
6138 public Builder mergeFrom(com.openxc.BinaryMessages.DynamicField other) {
6139 if (other == com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) return this;
6140 if (other.hasType()) {
6141 setType(other.getType());
6143 if (other.hasStringValue()) {
6144 bitField0_ |= 0x00000002;
6145 stringValue_ = other.stringValue_;
6148 if (other.hasNumericValue()) {
6149 setNumericValue(other.getNumericValue());
6151 if (other.hasBooleanValue()) {
6152 setBooleanValue(other.getBooleanValue());
6154 this.mergeUnknownFields(other.getUnknownFields());
6158 public final boolean isInitialized() {
6162 public Builder mergeFrom(
6163 com.google.protobuf.CodedInputStream input,
6164 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6165 throws java.io.IOException {
6166 com.openxc.BinaryMessages.DynamicField parsedMessage = null;
6168 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
6169 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6170 parsedMessage = (com.openxc.BinaryMessages.DynamicField) e.getUnfinishedMessage();
6173 if (parsedMessage != null) {
6174 mergeFrom(parsedMessage);
6179 private int bitField0_;
6181 // optional .openxc.DynamicField.Type type = 1;
6182 private com.openxc.BinaryMessages.DynamicField.Type type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6184 * <code>optional .openxc.DynamicField.Type type = 1;</code>
6186 public boolean hasType() {
6187 return ((bitField0_ & 0x00000001) == 0x00000001);
6190 * <code>optional .openxc.DynamicField.Type type = 1;</code>
6192 public com.openxc.BinaryMessages.DynamicField.Type getType() {
6196 * <code>optional .openxc.DynamicField.Type type = 1;</code>
6198 public Builder setType(com.openxc.BinaryMessages.DynamicField.Type value) {
6199 if (value == null) {
6200 throw new NullPointerException();
6202 bitField0_ |= 0x00000001;
6208 * <code>optional .openxc.DynamicField.Type type = 1;</code>
6210 public Builder clearType() {
6211 bitField0_ = (bitField0_ & ~0x00000001);
6212 type_ = com.openxc.BinaryMessages.DynamicField.Type.STRING;
6217 // optional string string_value = 2;
6218 private java.lang.Object stringValue_ = "";
6220 * <code>optional string string_value = 2;</code>
6222 public boolean hasStringValue() {
6223 return ((bitField0_ & 0x00000002) == 0x00000002);
6226 * <code>optional string string_value = 2;</code>
6228 public java.lang.String getStringValue() {
6229 java.lang.Object ref = stringValue_;
6230 if (!(ref instanceof java.lang.String)) {
6231 java.lang.String s = ((com.google.protobuf.ByteString) ref)
6236 return (java.lang.String) ref;
6240 * <code>optional string string_value = 2;</code>
6242 public com.google.protobuf.ByteString
6243 getStringValueBytes() {
6244 java.lang.Object ref = stringValue_;
6245 if (ref instanceof String) {
6246 com.google.protobuf.ByteString b =
6247 com.google.protobuf.ByteString.copyFromUtf8(
6248 (java.lang.String) ref);
6252 return (com.google.protobuf.ByteString) ref;
6256 * <code>optional string string_value = 2;</code>
6258 public Builder setStringValue(
6259 java.lang.String value) {
6260 if (value == null) {
6261 throw new NullPointerException();
6263 bitField0_ |= 0x00000002;
6264 stringValue_ = value;
6269 * <code>optional string string_value = 2;</code>
6271 public Builder clearStringValue() {
6272 bitField0_ = (bitField0_ & ~0x00000002);
6273 stringValue_ = getDefaultInstance().getStringValue();
6278 * <code>optional string string_value = 2;</code>
6280 public Builder setStringValueBytes(
6281 com.google.protobuf.ByteString value) {
6282 if (value == null) {
6283 throw new NullPointerException();
6285 bitField0_ |= 0x00000002;
6286 stringValue_ = value;
6291 // optional double numeric_value = 3;
6292 private double numericValue_ ;
6294 * <code>optional double numeric_value = 3;</code>
6296 public boolean hasNumericValue() {
6297 return ((bitField0_ & 0x00000004) == 0x00000004);
6300 * <code>optional double numeric_value = 3;</code>
6302 public double getNumericValue() {
6303 return numericValue_;
6306 * <code>optional double numeric_value = 3;</code>
6308 public Builder setNumericValue(double value) {
6309 bitField0_ |= 0x00000004;
6310 numericValue_ = value;
6315 * <code>optional double numeric_value = 3;</code>
6317 public Builder clearNumericValue() {
6318 bitField0_ = (bitField0_ & ~0x00000004);
6324 // optional bool boolean_value = 4;
6325 private boolean booleanValue_ ;
6327 * <code>optional bool boolean_value = 4;</code>
6329 public boolean hasBooleanValue() {
6330 return ((bitField0_ & 0x00000008) == 0x00000008);
6333 * <code>optional bool boolean_value = 4;</code>
6335 public boolean getBooleanValue() {
6336 return booleanValue_;
6339 * <code>optional bool boolean_value = 4;</code>
6341 public Builder setBooleanValue(boolean value) {
6342 bitField0_ |= 0x00000008;
6343 booleanValue_ = value;
6348 * <code>optional bool boolean_value = 4;</code>
6350 public Builder clearBooleanValue() {
6351 bitField0_ = (bitField0_ & ~0x00000008);
6352 booleanValue_ = false;
6357 // @@protoc_insertion_point(builder_scope:openxc.DynamicField)
6361 defaultInstance = new DynamicField(true);
6362 defaultInstance.initFields();
6365 // @@protoc_insertion_point(class_scope:openxc.DynamicField)
6368 public interface TranslatedMessageOrBuilder
6369 extends com.google.protobuf.MessageOrBuilder {
6371 // optional .openxc.TranslatedMessage.Type type = 1;
6373 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6377 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6379 com.openxc.BinaryMessages.TranslatedMessage.Type getType();
6381 // optional string name = 2;
6383 * <code>optional string name = 2;</code>
6387 * <code>optional string name = 2;</code>
6389 java.lang.String getName();
6391 * <code>optional string name = 2;</code>
6393 com.google.protobuf.ByteString
6396 // optional .openxc.DynamicField value = 3;
6398 * <code>optional .openxc.DynamicField value = 3;</code>
6402 * <code>optional .openxc.DynamicField value = 3;</code>
6404 com.openxc.BinaryMessages.DynamicField getValue();
6406 * <code>optional .openxc.DynamicField value = 3;</code>
6408 com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder();
6410 // optional .openxc.DynamicField event = 4;
6412 * <code>optional .openxc.DynamicField event = 4;</code>
6416 * <code>optional .openxc.DynamicField event = 4;</code>
6418 com.openxc.BinaryMessages.DynamicField getEvent();
6420 * <code>optional .openxc.DynamicField event = 4;</code>
6422 com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder();
6425 * Protobuf type {@code openxc.TranslatedMessage}
6427 public static final class TranslatedMessage extends
6428 com.google.protobuf.GeneratedMessage
6429 implements TranslatedMessageOrBuilder {
6430 // Use TranslatedMessage.newBuilder() to construct.
6431 private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
6433 this.unknownFields = builder.getUnknownFields();
6435 private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
6437 private static final TranslatedMessage defaultInstance;
6438 public static TranslatedMessage getDefaultInstance() {
6439 return defaultInstance;
6442 public TranslatedMessage getDefaultInstanceForType() {
6443 return defaultInstance;
6446 private final com.google.protobuf.UnknownFieldSet unknownFields;
6448 public final com.google.protobuf.UnknownFieldSet
6449 getUnknownFields() {
6450 return this.unknownFields;
6452 private TranslatedMessage(
6453 com.google.protobuf.CodedInputStream input,
6454 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6455 throws com.google.protobuf.InvalidProtocolBufferException {
6457 int mutable_bitField0_ = 0;
6458 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
6459 com.google.protobuf.UnknownFieldSet.newBuilder();
6461 boolean done = false;
6463 int tag = input.readTag();
6469 if (!parseUnknownField(input, unknownFields,
6470 extensionRegistry, tag)) {
6476 int rawValue = input.readEnum();
6477 com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
6478 if (value == null) {
6479 unknownFields.mergeVarintField(1, rawValue);
6481 bitField0_ |= 0x00000001;
6487 bitField0_ |= 0x00000002;
6488 name_ = input.readBytes();
6492 com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
6493 if (((bitField0_ & 0x00000004) == 0x00000004)) {
6494 subBuilder = value_.toBuilder();
6496 value_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
6497 if (subBuilder != null) {
6498 subBuilder.mergeFrom(value_);
6499 value_ = subBuilder.buildPartial();
6501 bitField0_ |= 0x00000004;
6505 com.openxc.BinaryMessages.DynamicField.Builder subBuilder = null;
6506 if (((bitField0_ & 0x00000008) == 0x00000008)) {
6507 subBuilder = event_.toBuilder();
6509 event_ = input.readMessage(com.openxc.BinaryMessages.DynamicField.PARSER, extensionRegistry);
6510 if (subBuilder != null) {
6511 subBuilder.mergeFrom(event_);
6512 event_ = subBuilder.buildPartial();
6514 bitField0_ |= 0x00000008;
6519 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
6520 throw e.setUnfinishedMessage(this);
6521 } catch (java.io.IOException e) {
6522 throw new com.google.protobuf.InvalidProtocolBufferException(
6523 e.getMessage()).setUnfinishedMessage(this);
6525 this.unknownFields = unknownFields.build();
6526 makeExtensionsImmutable();
6529 public static final com.google.protobuf.Descriptors.Descriptor
6531 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6534 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6535 internalGetFieldAccessorTable() {
6536 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
6537 .ensureFieldAccessorsInitialized(
6538 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
6541 public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
6542 new com.google.protobuf.AbstractParser<TranslatedMessage>() {
6543 public TranslatedMessage parsePartialFrom(
6544 com.google.protobuf.CodedInputStream input,
6545 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6546 throws com.google.protobuf.InvalidProtocolBufferException {
6547 return new TranslatedMessage(input, extensionRegistry);
6552 public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
6557 * Protobuf enum {@code openxc.TranslatedMessage.Type}
6560 implements com.google.protobuf.ProtocolMessageEnum {
6562 * <code>STRING = 1;</code>
6566 * <code>NUM = 2;</code>
6570 * <code>BOOL = 3;</code>
6574 * <code>EVENTED_STRING = 4;</code>
6576 EVENTED_STRING(3, 4),
6578 * <code>EVENTED_NUM = 5;</code>
6582 * <code>EVENTED_BOOL = 6;</code>
6588 * <code>STRING = 1;</code>
6590 public static final int STRING_VALUE = 1;
6592 * <code>NUM = 2;</code>
6594 public static final int NUM_VALUE = 2;
6596 * <code>BOOL = 3;</code>
6598 public static final int BOOL_VALUE = 3;
6600 * <code>EVENTED_STRING = 4;</code>
6602 public static final int EVENTED_STRING_VALUE = 4;
6604 * <code>EVENTED_NUM = 5;</code>
6606 public static final int EVENTED_NUM_VALUE = 5;
6608 * <code>EVENTED_BOOL = 6;</code>
6610 public static final int EVENTED_BOOL_VALUE = 6;
6613 public final int getNumber() { return value; }
6615 public static Type valueOf(int value) {
6617 case 1: return STRING;
6619 case 3: return BOOL;
6620 case 4: return EVENTED_STRING;
6621 case 5: return EVENTED_NUM;
6622 case 6: return EVENTED_BOOL;
6623 default: return null;
6627 public static com.google.protobuf.Internal.EnumLiteMap<Type>
6628 internalGetValueMap() {
6629 return internalValueMap;
6631 private static com.google.protobuf.Internal.EnumLiteMap<Type>
6633 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
6634 public Type findValueByNumber(int number) {
6635 return Type.valueOf(number);
6639 public final com.google.protobuf.Descriptors.EnumValueDescriptor
6640 getValueDescriptor() {
6641 return getDescriptor().getValues().get(index);
6643 public final com.google.protobuf.Descriptors.EnumDescriptor
6644 getDescriptorForType() {
6645 return getDescriptor();
6647 public static final com.google.protobuf.Descriptors.EnumDescriptor
6649 return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
6652 private static final Type[] VALUES = values();
6654 public static Type valueOf(
6655 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
6656 if (desc.getType() != getDescriptor()) {
6657 throw new java.lang.IllegalArgumentException(
6658 "EnumValueDescriptor is not for this type.");
6660 return VALUES[desc.getIndex()];
6663 private final int index;
6664 private final int value;
6666 private Type(int index, int value) {
6671 // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
6674 private int bitField0_;
6675 // optional .openxc.TranslatedMessage.Type type = 1;
6676 public static final int TYPE_FIELD_NUMBER = 1;
6677 private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
6679 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6681 public boolean hasType() {
6682 return ((bitField0_ & 0x00000001) == 0x00000001);
6685 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
6687 public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
6691 // optional string name = 2;
6692 public static final int NAME_FIELD_NUMBER = 2;
6693 private java.lang.Object name_;
6695 * <code>optional string name = 2;</code>
6697 public boolean hasName() {
6698 return ((bitField0_ & 0x00000002) == 0x00000002);
6701 * <code>optional string name = 2;</code>
6703 public java.lang.String getName() {
6704 java.lang.Object ref = name_;
6705 if (ref instanceof java.lang.String) {
6706 return (java.lang.String) ref;
6708 com.google.protobuf.ByteString bs =
6709 (com.google.protobuf.ByteString) ref;
6710 java.lang.String s = bs.toStringUtf8();
6711 if (bs.isValidUtf8()) {
6718 * <code>optional string name = 2;</code>
6720 public com.google.protobuf.ByteString
6722 java.lang.Object ref = name_;
6723 if (ref instanceof java.lang.String) {
6724 com.google.protobuf.ByteString b =
6725 com.google.protobuf.ByteString.copyFromUtf8(
6726 (java.lang.String) ref);
6730 return (com.google.protobuf.ByteString) ref;
6734 // optional .openxc.DynamicField value = 3;
6735 public static final int VALUE_FIELD_NUMBER = 3;
6736 private com.openxc.BinaryMessages.DynamicField value_;
6738 * <code>optional .openxc.DynamicField value = 3;</code>
6740 public boolean hasValue() {
6741 return ((bitField0_ & 0x00000004) == 0x00000004);
6744 * <code>optional .openxc.DynamicField value = 3;</code>
6746 public com.openxc.BinaryMessages.DynamicField getValue() {
6750 * <code>optional .openxc.DynamicField value = 3;</code>
6752 public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
6756 // optional .openxc.DynamicField event = 4;
6757 public static final int EVENT_FIELD_NUMBER = 4;
6758 private com.openxc.BinaryMessages.DynamicField event_;
6760 * <code>optional .openxc.DynamicField event = 4;</code>
6762 public boolean hasEvent() {
6763 return ((bitField0_ & 0x00000008) == 0x00000008);
6766 * <code>optional .openxc.DynamicField event = 4;</code>
6768 public com.openxc.BinaryMessages.DynamicField getEvent() {
6772 * <code>optional .openxc.DynamicField event = 4;</code>
6774 public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
6778 private void initFields() {
6779 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
6781 value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6782 event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6784 private byte memoizedIsInitialized = -1;
6785 public final boolean isInitialized() {
6786 byte isInitialized = memoizedIsInitialized;
6787 if (isInitialized != -1) return isInitialized == 1;
6789 memoizedIsInitialized = 1;
6793 public void writeTo(com.google.protobuf.CodedOutputStream output)
6794 throws java.io.IOException {
6795 getSerializedSize();
6796 if (((bitField0_ & 0x00000001) == 0x00000001)) {
6797 output.writeEnum(1, type_.getNumber());
6799 if (((bitField0_ & 0x00000002) == 0x00000002)) {
6800 output.writeBytes(2, getNameBytes());
6802 if (((bitField0_ & 0x00000004) == 0x00000004)) {
6803 output.writeMessage(3, value_);
6805 if (((bitField0_ & 0x00000008) == 0x00000008)) {
6806 output.writeMessage(4, event_);
6808 getUnknownFields().writeTo(output);
6811 private int memoizedSerializedSize = -1;
6812 public int getSerializedSize() {
6813 int size = memoizedSerializedSize;
6814 if (size != -1) return size;
6817 if (((bitField0_ & 0x00000001) == 0x00000001)) {
6818 size += com.google.protobuf.CodedOutputStream
6819 .computeEnumSize(1, type_.getNumber());
6821 if (((bitField0_ & 0x00000002) == 0x00000002)) {
6822 size += com.google.protobuf.CodedOutputStream
6823 .computeBytesSize(2, getNameBytes());
6825 if (((bitField0_ & 0x00000004) == 0x00000004)) {
6826 size += com.google.protobuf.CodedOutputStream
6827 .computeMessageSize(3, value_);
6829 if (((bitField0_ & 0x00000008) == 0x00000008)) {
6830 size += com.google.protobuf.CodedOutputStream
6831 .computeMessageSize(4, event_);
6833 size += getUnknownFields().getSerializedSize();
6834 memoizedSerializedSize = size;
6838 private static final long serialVersionUID = 0L;
6840 protected java.lang.Object writeReplace()
6841 throws java.io.ObjectStreamException {
6842 return super.writeReplace();
6845 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6846 com.google.protobuf.ByteString data)
6847 throws com.google.protobuf.InvalidProtocolBufferException {
6848 return PARSER.parseFrom(data);
6850 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6851 com.google.protobuf.ByteString data,
6852 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6853 throws com.google.protobuf.InvalidProtocolBufferException {
6854 return PARSER.parseFrom(data, extensionRegistry);
6856 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
6857 throws com.google.protobuf.InvalidProtocolBufferException {
6858 return PARSER.parseFrom(data);
6860 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6862 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6863 throws com.google.protobuf.InvalidProtocolBufferException {
6864 return PARSER.parseFrom(data, extensionRegistry);
6866 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
6867 throws java.io.IOException {
6868 return PARSER.parseFrom(input);
6870 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6871 java.io.InputStream input,
6872 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6873 throws java.io.IOException {
6874 return PARSER.parseFrom(input, extensionRegistry);
6876 public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
6877 throws java.io.IOException {
6878 return PARSER.parseDelimitedFrom(input);
6880 public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
6881 java.io.InputStream input,
6882 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6883 throws java.io.IOException {
6884 return PARSER.parseDelimitedFrom(input, extensionRegistry);
6886 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6887 com.google.protobuf.CodedInputStream input)
6888 throws java.io.IOException {
6889 return PARSER.parseFrom(input);
6891 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
6892 com.google.protobuf.CodedInputStream input,
6893 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
6894 throws java.io.IOException {
6895 return PARSER.parseFrom(input, extensionRegistry);
6898 public static Builder newBuilder() { return Builder.create(); }
6899 public Builder newBuilderForType() { return newBuilder(); }
6900 public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
6901 return newBuilder().mergeFrom(prototype);
6903 public Builder toBuilder() { return newBuilder(this); }
6906 protected Builder newBuilderForType(
6907 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6908 Builder builder = new Builder(parent);
6912 * Protobuf type {@code openxc.TranslatedMessage}
6914 public static final class Builder extends
6915 com.google.protobuf.GeneratedMessage.Builder<Builder>
6916 implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
6917 public static final com.google.protobuf.Descriptors.Descriptor
6919 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6922 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
6923 internalGetFieldAccessorTable() {
6924 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
6925 .ensureFieldAccessorsInitialized(
6926 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
6929 // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
6931 maybeForceBuilderInitialization();
6935 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
6937 maybeForceBuilderInitialization();
6939 private void maybeForceBuilderInitialization() {
6940 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
6941 getValueFieldBuilder();
6942 getEventFieldBuilder();
6945 private static Builder create() {
6946 return new Builder();
6949 public Builder clear() {
6951 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
6952 bitField0_ = (bitField0_ & ~0x00000001);
6954 bitField0_ = (bitField0_ & ~0x00000002);
6955 if (valueBuilder_ == null) {
6956 value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6958 valueBuilder_.clear();
6960 bitField0_ = (bitField0_ & ~0x00000004);
6961 if (eventBuilder_ == null) {
6962 event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
6964 eventBuilder_.clear();
6966 bitField0_ = (bitField0_ & ~0x00000008);
6970 public Builder clone() {
6971 return create().mergeFrom(buildPartial());
6974 public com.google.protobuf.Descriptors.Descriptor
6975 getDescriptorForType() {
6976 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
6979 public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
6980 return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
6983 public com.openxc.BinaryMessages.TranslatedMessage build() {
6984 com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
6985 if (!result.isInitialized()) {
6986 throw newUninitializedMessageException(result);
6991 public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
6992 com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
6993 int from_bitField0_ = bitField0_;
6994 int to_bitField0_ = 0;
6995 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
6996 to_bitField0_ |= 0x00000001;
6998 result.type_ = type_;
6999 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
7000 to_bitField0_ |= 0x00000002;
7002 result.name_ = name_;
7003 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
7004 to_bitField0_ |= 0x00000004;
7006 if (valueBuilder_ == null) {
7007 result.value_ = value_;
7009 result.value_ = valueBuilder_.build();
7011 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
7012 to_bitField0_ |= 0x00000008;
7014 if (eventBuilder_ == null) {
7015 result.event_ = event_;
7017 result.event_ = eventBuilder_.build();
7019 result.bitField0_ = to_bitField0_;
7024 public Builder mergeFrom(com.google.protobuf.Message other) {
7025 if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
7026 return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
7028 super.mergeFrom(other);
7033 public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
7034 if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
7035 if (other.hasType()) {
7036 setType(other.getType());
7038 if (other.hasName()) {
7039 bitField0_ |= 0x00000002;
7040 name_ = other.name_;
7043 if (other.hasValue()) {
7044 mergeValue(other.getValue());
7046 if (other.hasEvent()) {
7047 mergeEvent(other.getEvent());
7049 this.mergeUnknownFields(other.getUnknownFields());
7053 public final boolean isInitialized() {
7057 public Builder mergeFrom(
7058 com.google.protobuf.CodedInputStream input,
7059 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
7060 throws java.io.IOException {
7061 com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
7063 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
7064 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
7065 parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
7068 if (parsedMessage != null) {
7069 mergeFrom(parsedMessage);
7074 private int bitField0_;
7076 // optional .openxc.TranslatedMessage.Type type = 1;
7077 private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
7079 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7081 public boolean hasType() {
7082 return ((bitField0_ & 0x00000001) == 0x00000001);
7085 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7087 public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
7091 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7093 public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
7094 if (value == null) {
7095 throw new NullPointerException();
7097 bitField0_ |= 0x00000001;
7103 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
7105 public Builder clearType() {
7106 bitField0_ = (bitField0_ & ~0x00000001);
7107 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
7112 // optional string name = 2;
7113 private java.lang.Object name_ = "";
7115 * <code>optional string name = 2;</code>
7117 public boolean hasName() {
7118 return ((bitField0_ & 0x00000002) == 0x00000002);
7121 * <code>optional string name = 2;</code>
7123 public java.lang.String getName() {
7124 java.lang.Object ref = name_;
7125 if (!(ref instanceof java.lang.String)) {
7126 java.lang.String s = ((com.google.protobuf.ByteString) ref)
7131 return (java.lang.String) ref;
7135 * <code>optional string name = 2;</code>
7137 public com.google.protobuf.ByteString
7139 java.lang.Object ref = name_;
7140 if (ref instanceof String) {
7141 com.google.protobuf.ByteString b =
7142 com.google.protobuf.ByteString.copyFromUtf8(
7143 (java.lang.String) ref);
7147 return (com.google.protobuf.ByteString) ref;
7151 * <code>optional string name = 2;</code>
7153 public Builder setName(
7154 java.lang.String value) {
7155 if (value == null) {
7156 throw new NullPointerException();
7158 bitField0_ |= 0x00000002;
7164 * <code>optional string name = 2;</code>
7166 public Builder clearName() {
7167 bitField0_ = (bitField0_ & ~0x00000002);
7168 name_ = getDefaultInstance().getName();
7173 * <code>optional string name = 2;</code>
7175 public Builder setNameBytes(
7176 com.google.protobuf.ByteString value) {
7177 if (value == null) {
7178 throw new NullPointerException();
7180 bitField0_ |= 0x00000002;
7186 // optional .openxc.DynamicField value = 3;
7187 private com.openxc.BinaryMessages.DynamicField value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7188 private com.google.protobuf.SingleFieldBuilder<
7189 com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> valueBuilder_;
7191 * <code>optional .openxc.DynamicField value = 3;</code>
7193 public boolean hasValue() {
7194 return ((bitField0_ & 0x00000004) == 0x00000004);
7197 * <code>optional .openxc.DynamicField value = 3;</code>
7199 public com.openxc.BinaryMessages.DynamicField getValue() {
7200 if (valueBuilder_ == null) {
7203 return valueBuilder_.getMessage();
7207 * <code>optional .openxc.DynamicField value = 3;</code>
7209 public Builder setValue(com.openxc.BinaryMessages.DynamicField value) {
7210 if (valueBuilder_ == null) {
7211 if (value == null) {
7212 throw new NullPointerException();
7217 valueBuilder_.setMessage(value);
7219 bitField0_ |= 0x00000004;
7223 * <code>optional .openxc.DynamicField value = 3;</code>
7225 public Builder setValue(
7226 com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
7227 if (valueBuilder_ == null) {
7228 value_ = builderForValue.build();
7231 valueBuilder_.setMessage(builderForValue.build());
7233 bitField0_ |= 0x00000004;
7237 * <code>optional .openxc.DynamicField value = 3;</code>
7239 public Builder mergeValue(com.openxc.BinaryMessages.DynamicField value) {
7240 if (valueBuilder_ == null) {
7241 if (((bitField0_ & 0x00000004) == 0x00000004) &&
7242 value_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
7244 com.openxc.BinaryMessages.DynamicField.newBuilder(value_).mergeFrom(value).buildPartial();
7250 valueBuilder_.mergeFrom(value);
7252 bitField0_ |= 0x00000004;
7256 * <code>optional .openxc.DynamicField value = 3;</code>
7258 public Builder clearValue() {
7259 if (valueBuilder_ == null) {
7260 value_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7263 valueBuilder_.clear();
7265 bitField0_ = (bitField0_ & ~0x00000004);
7269 * <code>optional .openxc.DynamicField value = 3;</code>
7271 public com.openxc.BinaryMessages.DynamicField.Builder getValueBuilder() {
7272 bitField0_ |= 0x00000004;
7274 return getValueFieldBuilder().getBuilder();
7277 * <code>optional .openxc.DynamicField value = 3;</code>
7279 public com.openxc.BinaryMessages.DynamicFieldOrBuilder getValueOrBuilder() {
7280 if (valueBuilder_ != null) {
7281 return valueBuilder_.getMessageOrBuilder();
7287 * <code>optional .openxc.DynamicField value = 3;</code>
7289 private com.google.protobuf.SingleFieldBuilder<
7290 com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>
7291 getValueFieldBuilder() {
7292 if (valueBuilder_ == null) {
7293 valueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7294 com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
7296 getParentForChildren(),
7300 return valueBuilder_;
7303 // optional .openxc.DynamicField event = 4;
7304 private com.openxc.BinaryMessages.DynamicField event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7305 private com.google.protobuf.SingleFieldBuilder<
7306 com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder> eventBuilder_;
7308 * <code>optional .openxc.DynamicField event = 4;</code>
7310 public boolean hasEvent() {
7311 return ((bitField0_ & 0x00000008) == 0x00000008);
7314 * <code>optional .openxc.DynamicField event = 4;</code>
7316 public com.openxc.BinaryMessages.DynamicField getEvent() {
7317 if (eventBuilder_ == null) {
7320 return eventBuilder_.getMessage();
7324 * <code>optional .openxc.DynamicField event = 4;</code>
7326 public Builder setEvent(com.openxc.BinaryMessages.DynamicField value) {
7327 if (eventBuilder_ == null) {
7328 if (value == null) {
7329 throw new NullPointerException();
7334 eventBuilder_.setMessage(value);
7336 bitField0_ |= 0x00000008;
7340 * <code>optional .openxc.DynamicField event = 4;</code>
7342 public Builder setEvent(
7343 com.openxc.BinaryMessages.DynamicField.Builder builderForValue) {
7344 if (eventBuilder_ == null) {
7345 event_ = builderForValue.build();
7348 eventBuilder_.setMessage(builderForValue.build());
7350 bitField0_ |= 0x00000008;
7354 * <code>optional .openxc.DynamicField event = 4;</code>
7356 public Builder mergeEvent(com.openxc.BinaryMessages.DynamicField value) {
7357 if (eventBuilder_ == null) {
7358 if (((bitField0_ & 0x00000008) == 0x00000008) &&
7359 event_ != com.openxc.BinaryMessages.DynamicField.getDefaultInstance()) {
7361 com.openxc.BinaryMessages.DynamicField.newBuilder(event_).mergeFrom(value).buildPartial();
7367 eventBuilder_.mergeFrom(value);
7369 bitField0_ |= 0x00000008;
7373 * <code>optional .openxc.DynamicField event = 4;</code>
7375 public Builder clearEvent() {
7376 if (eventBuilder_ == null) {
7377 event_ = com.openxc.BinaryMessages.DynamicField.getDefaultInstance();
7380 eventBuilder_.clear();
7382 bitField0_ = (bitField0_ & ~0x00000008);
7386 * <code>optional .openxc.DynamicField event = 4;</code>
7388 public com.openxc.BinaryMessages.DynamicField.Builder getEventBuilder() {
7389 bitField0_ |= 0x00000008;
7391 return getEventFieldBuilder().getBuilder();
7394 * <code>optional .openxc.DynamicField event = 4;</code>
7396 public com.openxc.BinaryMessages.DynamicFieldOrBuilder getEventOrBuilder() {
7397 if (eventBuilder_ != null) {
7398 return eventBuilder_.getMessageOrBuilder();
7404 * <code>optional .openxc.DynamicField event = 4;</code>
7406 private com.google.protobuf.SingleFieldBuilder<
7407 com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>
7408 getEventFieldBuilder() {
7409 if (eventBuilder_ == null) {
7410 eventBuilder_ = new com.google.protobuf.SingleFieldBuilder<
7411 com.openxc.BinaryMessages.DynamicField, com.openxc.BinaryMessages.DynamicField.Builder, com.openxc.BinaryMessages.DynamicFieldOrBuilder>(
7413 getParentForChildren(),
7417 return eventBuilder_;
7420 // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
7424 defaultInstance = new TranslatedMessage(true);
7425 defaultInstance.initFields();
7428 // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
7431 private static com.google.protobuf.Descriptors.Descriptor
7432 internal_static_openxc_VehicleMessage_descriptor;
7434 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7435 internal_static_openxc_VehicleMessage_fieldAccessorTable;
7436 private static com.google.protobuf.Descriptors.Descriptor
7437 internal_static_openxc_RawMessage_descriptor;
7439 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7440 internal_static_openxc_RawMessage_fieldAccessorTable;
7441 private static com.google.protobuf.Descriptors.Descriptor
7442 internal_static_openxc_ControlCommand_descriptor;
7444 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7445 internal_static_openxc_ControlCommand_fieldAccessorTable;
7446 private static com.google.protobuf.Descriptors.Descriptor
7447 internal_static_openxc_CommandResponse_descriptor;
7449 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7450 internal_static_openxc_CommandResponse_fieldAccessorTable;
7451 private static com.google.protobuf.Descriptors.Descriptor
7452 internal_static_openxc_DiagnosticRequest_descriptor;
7454 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7455 internal_static_openxc_DiagnosticRequest_fieldAccessorTable;
7456 private static com.google.protobuf.Descriptors.Descriptor
7457 internal_static_openxc_DiagnosticResponse_descriptor;
7459 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7460 internal_static_openxc_DiagnosticResponse_fieldAccessorTable;
7461 private static com.google.protobuf.Descriptors.Descriptor
7462 internal_static_openxc_DynamicField_descriptor;
7464 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7465 internal_static_openxc_DynamicField_fieldAccessorTable;
7466 private static com.google.protobuf.Descriptors.Descriptor
7467 internal_static_openxc_TranslatedMessage_descriptor;
7469 com.google.protobuf.GeneratedMessage.FieldAccessorTable
7470 internal_static_openxc_TranslatedMessage_fieldAccessorTable;
7472 public static com.google.protobuf.Descriptors.FileDescriptor
7476 private static com.google.protobuf.Descriptors.FileDescriptor
7479 java.lang.String[] descriptorData = {
7480 "\n\014openxc.proto\022\006openxc\"\224\003\n\016VehicleMessag" +
7481 "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
7482 "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
7483 "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
7484 "xc.TranslatedMessage\0227\n\023diagnostic_respo" +
7485 "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\022/\n" +
7486 "\017control_command\030\005 \001(\0132\026.openxc.ControlC" +
7487 "ommand\0221\n\020command_response\030\006 \001(\0132\027.openx" +
7488 "c.CommandResponse\"Z\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTR" +
7489 "ANSLATED\020\002\022\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_CO",
7490 "MMAND\020\004\022\024\n\020COMMAND_RESPONSE\020\005\";\n\nRawMess" +
7491 "age\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004" +
7492 "data\030\003 \001(\014\"\246\001\n\016ControlCommand\022)\n\004type\030\001 " +
7493 "\001(\0162\033.openxc.ControlCommand.Type\0225\n\022diag" +
7494 "nostic_request\030\002 \001(\0132\031.openxc.Diagnostic" +
7495 "Request\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tDEVICE_I" +
7496 "D\020\002\022\016\n\nDIAGNOSTIC\020\003\"M\n\017CommandResponse\022)" +
7497 "\n\004type\030\001 \001(\0162\033.openxc.ControlCommand.Typ" +
7498 "e\022\017\n\007message\030\002 \001(\t\"\375\001\n\021DiagnosticRequest" +
7499 "\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004mod",
7500 "e\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030\005 \001(\014\022\032\n" +
7501 "\022multiple_responses\030\006 \001(\010\022\021\n\tfrequency\030\007" +
7502 " \001(\001\022\014\n\004name\030\010 \001(\t\022;\n\014decoded_type\030\t \001(\016" +
7503 "2%.openxc.DiagnosticRequest.DecodedType\"" +
7504 "!\n\013DecodedType\022\010\n\004NONE\020\001\022\010\n\004OBD2\020\002\"\241\001\n\022D" +
7505 "iagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessag" +
7506 "e_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n" +
7507 "\007success\030\005 \001(\010\022\036\n\026negative_response_code" +
7508 "\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 \001(\001\"\242" +
7509 "\001\n\014DynamicField\022\'\n\004type\030\001 \001(\0162\031.openxc.D",
7510 "ynamicField.Type\022\024\n\014string_value\030\002 \001(\t\022\025" +
7511 "\n\rnumeric_value\030\003 \001(\001\022\025\n\rboolean_value\030\004" +
7512 " \001(\010\"%\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOO" +
7513 "L\020\003\"\367\001\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162" +
7514 "\036.openxc.TranslatedMessage.Type\022\014\n\004name\030" +
7515 "\002 \001(\t\022#\n\005value\030\003 \001(\0132\024.openxc.DynamicFie" +
7516 "ld\022#\n\005event\030\004 \001(\0132\024.openxc.DynamicField\"" +
7517 "\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022" +
7518 "\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014E" +
7519 "VENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMessa",
7522 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
7523 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
7524 public com.google.protobuf.ExtensionRegistry assignDescriptors(
7525 com.google.protobuf.Descriptors.FileDescriptor root) {
7527 internal_static_openxc_VehicleMessage_descriptor =
7528 getDescriptor().getMessageTypes().get(0);
7529 internal_static_openxc_VehicleMessage_fieldAccessorTable = new
7530 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7531 internal_static_openxc_VehicleMessage_descriptor,
7532 new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", "CommandResponse", });
7533 internal_static_openxc_RawMessage_descriptor =
7534 getDescriptor().getMessageTypes().get(1);
7535 internal_static_openxc_RawMessage_fieldAccessorTable = new
7536 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7537 internal_static_openxc_RawMessage_descriptor,
7538 new java.lang.String[] { "Bus", "MessageId", "Data", });
7539 internal_static_openxc_ControlCommand_descriptor =
7540 getDescriptor().getMessageTypes().get(2);
7541 internal_static_openxc_ControlCommand_fieldAccessorTable = new
7542 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7543 internal_static_openxc_ControlCommand_descriptor,
7544 new java.lang.String[] { "Type", "DiagnosticRequest", });
7545 internal_static_openxc_CommandResponse_descriptor =
7546 getDescriptor().getMessageTypes().get(3);
7547 internal_static_openxc_CommandResponse_fieldAccessorTable = new
7548 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7549 internal_static_openxc_CommandResponse_descriptor,
7550 new java.lang.String[] { "Type", "Message", });
7551 internal_static_openxc_DiagnosticRequest_descriptor =
7552 getDescriptor().getMessageTypes().get(4);
7553 internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new
7554 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7555 internal_static_openxc_DiagnosticRequest_descriptor,
7556 new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "MultipleResponses", "Frequency", "Name", "DecodedType", });
7557 internal_static_openxc_DiagnosticResponse_descriptor =
7558 getDescriptor().getMessageTypes().get(5);
7559 internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new
7560 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7561 internal_static_openxc_DiagnosticResponse_descriptor,
7562 new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", });
7563 internal_static_openxc_DynamicField_descriptor =
7564 getDescriptor().getMessageTypes().get(6);
7565 internal_static_openxc_DynamicField_fieldAccessorTable = new
7566 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7567 internal_static_openxc_DynamicField_descriptor,
7568 new java.lang.String[] { "Type", "StringValue", "NumericValue", "BooleanValue", });
7569 internal_static_openxc_TranslatedMessage_descriptor =
7570 getDescriptor().getMessageTypes().get(7);
7571 internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
7572 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
7573 internal_static_openxc_TranslatedMessage_descriptor,
7574 new java.lang.String[] { "Type", "Name", "Value", "Event", });
7578 com.google.protobuf.Descriptors.FileDescriptor
7579 .internalBuildGeneratedFileFrom(descriptorData,
7580 new com.google.protobuf.Descriptors.FileDescriptor[] {
7584 // @@protoc_insertion_point(outer_class_scope)