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();
81 * Protobuf type {@code openxc.VehicleMessage}
83 public static final class VehicleMessage extends
84 com.google.protobuf.GeneratedMessage
85 implements VehicleMessageOrBuilder {
86 // Use VehicleMessage.newBuilder() to construct.
87 private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
89 this.unknownFields = builder.getUnknownFields();
91 private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
93 private static final VehicleMessage defaultInstance;
94 public static VehicleMessage getDefaultInstance() {
95 return defaultInstance;
98 public VehicleMessage getDefaultInstanceForType() {
99 return defaultInstance;
102 private final com.google.protobuf.UnknownFieldSet unknownFields;
104 public final com.google.protobuf.UnknownFieldSet
106 return this.unknownFields;
108 private VehicleMessage(
109 com.google.protobuf.CodedInputStream input,
110 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
111 throws com.google.protobuf.InvalidProtocolBufferException {
113 int mutable_bitField0_ = 0;
114 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
115 com.google.protobuf.UnknownFieldSet.newBuilder();
117 boolean done = false;
119 int tag = input.readTag();
125 if (!parseUnknownField(input, unknownFields,
126 extensionRegistry, tag)) {
132 int rawValue = input.readEnum();
133 com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue);
135 unknownFields.mergeVarintField(1, rawValue);
137 bitField0_ |= 0x00000001;
143 com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null;
144 if (((bitField0_ & 0x00000002) == 0x00000002)) {
145 subBuilder = rawMessage_.toBuilder();
147 rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry);
148 if (subBuilder != null) {
149 subBuilder.mergeFrom(rawMessage_);
150 rawMessage_ = subBuilder.buildPartial();
152 bitField0_ |= 0x00000002;
156 com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null;
157 if (((bitField0_ & 0x00000004) == 0x00000004)) {
158 subBuilder = translatedMessage_.toBuilder();
160 translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry);
161 if (subBuilder != null) {
162 subBuilder.mergeFrom(translatedMessage_);
163 translatedMessage_ = subBuilder.buildPartial();
165 bitField0_ |= 0x00000004;
169 com.openxc.BinaryMessages.DiagnosticResponse.Builder subBuilder = null;
170 if (((bitField0_ & 0x00000008) == 0x00000008)) {
171 subBuilder = diagnosticResponse_.toBuilder();
173 diagnosticResponse_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticResponse.PARSER, extensionRegistry);
174 if (subBuilder != null) {
175 subBuilder.mergeFrom(diagnosticResponse_);
176 diagnosticResponse_ = subBuilder.buildPartial();
178 bitField0_ |= 0x00000008;
182 com.openxc.BinaryMessages.ControlCommand.Builder subBuilder = null;
183 if (((bitField0_ & 0x00000010) == 0x00000010)) {
184 subBuilder = controlCommand_.toBuilder();
186 controlCommand_ = input.readMessage(com.openxc.BinaryMessages.ControlCommand.PARSER, extensionRegistry);
187 if (subBuilder != null) {
188 subBuilder.mergeFrom(controlCommand_);
189 controlCommand_ = subBuilder.buildPartial();
191 bitField0_ |= 0x00000010;
196 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
197 throw e.setUnfinishedMessage(this);
198 } catch (java.io.IOException e) {
199 throw new com.google.protobuf.InvalidProtocolBufferException(
200 e.getMessage()).setUnfinishedMessage(this);
202 this.unknownFields = unknownFields.build();
203 makeExtensionsImmutable();
206 public static final com.google.protobuf.Descriptors.Descriptor
208 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
211 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
212 internalGetFieldAccessorTable() {
213 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
214 .ensureFieldAccessorsInitialized(
215 com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
218 public static com.google.protobuf.Parser<VehicleMessage> PARSER =
219 new com.google.protobuf.AbstractParser<VehicleMessage>() {
220 public VehicleMessage parsePartialFrom(
221 com.google.protobuf.CodedInputStream input,
222 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
223 throws com.google.protobuf.InvalidProtocolBufferException {
224 return new VehicleMessage(input, extensionRegistry);
229 public com.google.protobuf.Parser<VehicleMessage> getParserForType() {
234 * Protobuf enum {@code openxc.VehicleMessage.Type}
237 implements com.google.protobuf.ProtocolMessageEnum {
239 * <code>RAW = 1;</code>
243 * <code>TRANSLATED = 2;</code>
247 * <code>DIAGNOSTIC = 3;</code>
251 * <code>CONTROL_COMMAND = 4;</code>
253 CONTROL_COMMAND(3, 4),
257 * <code>RAW = 1;</code>
259 public static final int RAW_VALUE = 1;
261 * <code>TRANSLATED = 2;</code>
263 public static final int TRANSLATED_VALUE = 2;
265 * <code>DIAGNOSTIC = 3;</code>
267 public static final int DIAGNOSTIC_VALUE = 3;
269 * <code>CONTROL_COMMAND = 4;</code>
271 public static final int CONTROL_COMMAND_VALUE = 4;
274 public final int getNumber() { return value; }
276 public static Type valueOf(int value) {
279 case 2: return TRANSLATED;
280 case 3: return DIAGNOSTIC;
281 case 4: return CONTROL_COMMAND;
282 default: return null;
286 public static com.google.protobuf.Internal.EnumLiteMap<Type>
287 internalGetValueMap() {
288 return internalValueMap;
290 private static com.google.protobuf.Internal.EnumLiteMap<Type>
292 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
293 public Type findValueByNumber(int number) {
294 return Type.valueOf(number);
298 public final com.google.protobuf.Descriptors.EnumValueDescriptor
299 getValueDescriptor() {
300 return getDescriptor().getValues().get(index);
302 public final com.google.protobuf.Descriptors.EnumDescriptor
303 getDescriptorForType() {
304 return getDescriptor();
306 public static final com.google.protobuf.Descriptors.EnumDescriptor
308 return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0);
311 private static final Type[] VALUES = values();
313 public static Type valueOf(
314 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
315 if (desc.getType() != getDescriptor()) {
316 throw new java.lang.IllegalArgumentException(
317 "EnumValueDescriptor is not for this type.");
319 return VALUES[desc.getIndex()];
322 private final int index;
323 private final int value;
325 private Type(int index, int value) {
330 // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type)
333 private int bitField0_;
334 // optional .openxc.VehicleMessage.Type type = 1;
335 public static final int TYPE_FIELD_NUMBER = 1;
336 private com.openxc.BinaryMessages.VehicleMessage.Type type_;
338 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
340 public boolean hasType() {
341 return ((bitField0_ & 0x00000001) == 0x00000001);
344 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
346 public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
350 // optional .openxc.RawMessage raw_message = 2;
351 public static final int RAW_MESSAGE_FIELD_NUMBER = 2;
352 private com.openxc.BinaryMessages.RawMessage rawMessage_;
354 * <code>optional .openxc.RawMessage raw_message = 2;</code>
356 public boolean hasRawMessage() {
357 return ((bitField0_ & 0x00000002) == 0x00000002);
360 * <code>optional .openxc.RawMessage raw_message = 2;</code>
362 public com.openxc.BinaryMessages.RawMessage getRawMessage() {
366 * <code>optional .openxc.RawMessage raw_message = 2;</code>
368 public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
372 // optional .openxc.TranslatedMessage translated_message = 3;
373 public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3;
374 private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_;
376 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
378 public boolean hasTranslatedMessage() {
379 return ((bitField0_ & 0x00000004) == 0x00000004);
382 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
384 public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
385 return translatedMessage_;
388 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
390 public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
391 return translatedMessage_;
394 // optional .openxc.DiagnosticResponse diagnostic_response = 4;
395 public static final int DIAGNOSTIC_RESPONSE_FIELD_NUMBER = 4;
396 private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_;
398 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
400 public boolean hasDiagnosticResponse() {
401 return ((bitField0_ & 0x00000008) == 0x00000008);
404 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
406 public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
407 return diagnosticResponse_;
410 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
412 public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
413 return diagnosticResponse_;
416 // optional .openxc.ControlCommand control_command = 5;
417 public static final int CONTROL_COMMAND_FIELD_NUMBER = 5;
418 private com.openxc.BinaryMessages.ControlCommand controlCommand_;
420 * <code>optional .openxc.ControlCommand control_command = 5;</code>
422 public boolean hasControlCommand() {
423 return ((bitField0_ & 0x00000010) == 0x00000010);
426 * <code>optional .openxc.ControlCommand control_command = 5;</code>
428 public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
429 return controlCommand_;
432 * <code>optional .openxc.ControlCommand control_command = 5;</code>
434 public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
435 return controlCommand_;
438 private void initFields() {
439 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
440 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
441 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
442 diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
443 controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
445 private byte memoizedIsInitialized = -1;
446 public final boolean isInitialized() {
447 byte isInitialized = memoizedIsInitialized;
448 if (isInitialized != -1) return isInitialized == 1;
450 memoizedIsInitialized = 1;
454 public void writeTo(com.google.protobuf.CodedOutputStream output)
455 throws java.io.IOException {
457 if (((bitField0_ & 0x00000001) == 0x00000001)) {
458 output.writeEnum(1, type_.getNumber());
460 if (((bitField0_ & 0x00000002) == 0x00000002)) {
461 output.writeMessage(2, rawMessage_);
463 if (((bitField0_ & 0x00000004) == 0x00000004)) {
464 output.writeMessage(3, translatedMessage_);
466 if (((bitField0_ & 0x00000008) == 0x00000008)) {
467 output.writeMessage(4, diagnosticResponse_);
469 if (((bitField0_ & 0x00000010) == 0x00000010)) {
470 output.writeMessage(5, controlCommand_);
472 getUnknownFields().writeTo(output);
475 private int memoizedSerializedSize = -1;
476 public int getSerializedSize() {
477 int size = memoizedSerializedSize;
478 if (size != -1) return size;
481 if (((bitField0_ & 0x00000001) == 0x00000001)) {
482 size += com.google.protobuf.CodedOutputStream
483 .computeEnumSize(1, type_.getNumber());
485 if (((bitField0_ & 0x00000002) == 0x00000002)) {
486 size += com.google.protobuf.CodedOutputStream
487 .computeMessageSize(2, rawMessage_);
489 if (((bitField0_ & 0x00000004) == 0x00000004)) {
490 size += com.google.protobuf.CodedOutputStream
491 .computeMessageSize(3, translatedMessage_);
493 if (((bitField0_ & 0x00000008) == 0x00000008)) {
494 size += com.google.protobuf.CodedOutputStream
495 .computeMessageSize(4, diagnosticResponse_);
497 if (((bitField0_ & 0x00000010) == 0x00000010)) {
498 size += com.google.protobuf.CodedOutputStream
499 .computeMessageSize(5, controlCommand_);
501 size += getUnknownFields().getSerializedSize();
502 memoizedSerializedSize = size;
506 private static final long serialVersionUID = 0L;
508 protected java.lang.Object writeReplace()
509 throws java.io.ObjectStreamException {
510 return super.writeReplace();
513 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
514 com.google.protobuf.ByteString data)
515 throws com.google.protobuf.InvalidProtocolBufferException {
516 return PARSER.parseFrom(data);
518 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
519 com.google.protobuf.ByteString data,
520 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
521 throws com.google.protobuf.InvalidProtocolBufferException {
522 return PARSER.parseFrom(data, extensionRegistry);
524 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data)
525 throws com.google.protobuf.InvalidProtocolBufferException {
526 return PARSER.parseFrom(data);
528 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
530 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
531 throws com.google.protobuf.InvalidProtocolBufferException {
532 return PARSER.parseFrom(data, extensionRegistry);
534 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input)
535 throws java.io.IOException {
536 return PARSER.parseFrom(input);
538 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
539 java.io.InputStream input,
540 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
541 throws java.io.IOException {
542 return PARSER.parseFrom(input, extensionRegistry);
544 public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input)
545 throws java.io.IOException {
546 return PARSER.parseDelimitedFrom(input);
548 public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(
549 java.io.InputStream input,
550 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
551 throws java.io.IOException {
552 return PARSER.parseDelimitedFrom(input, extensionRegistry);
554 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
555 com.google.protobuf.CodedInputStream input)
556 throws java.io.IOException {
557 return PARSER.parseFrom(input);
559 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
560 com.google.protobuf.CodedInputStream input,
561 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
562 throws java.io.IOException {
563 return PARSER.parseFrom(input, extensionRegistry);
566 public static Builder newBuilder() { return Builder.create(); }
567 public Builder newBuilderForType() { return newBuilder(); }
568 public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) {
569 return newBuilder().mergeFrom(prototype);
571 public Builder toBuilder() { return newBuilder(this); }
574 protected Builder newBuilderForType(
575 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
576 Builder builder = new Builder(parent);
580 * Protobuf type {@code openxc.VehicleMessage}
582 public static final class Builder extends
583 com.google.protobuf.GeneratedMessage.Builder<Builder>
584 implements com.openxc.BinaryMessages.VehicleMessageOrBuilder {
585 public static final com.google.protobuf.Descriptors.Descriptor
587 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
590 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
591 internalGetFieldAccessorTable() {
592 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
593 .ensureFieldAccessorsInitialized(
594 com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
597 // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder()
599 maybeForceBuilderInitialization();
603 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
605 maybeForceBuilderInitialization();
607 private void maybeForceBuilderInitialization() {
608 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
609 getRawMessageFieldBuilder();
610 getTranslatedMessageFieldBuilder();
611 getDiagnosticResponseFieldBuilder();
612 getControlCommandFieldBuilder();
615 private static Builder create() {
616 return new Builder();
619 public Builder clear() {
621 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
622 bitField0_ = (bitField0_ & ~0x00000001);
623 if (rawMessageBuilder_ == null) {
624 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
626 rawMessageBuilder_.clear();
628 bitField0_ = (bitField0_ & ~0x00000002);
629 if (translatedMessageBuilder_ == null) {
630 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
632 translatedMessageBuilder_.clear();
634 bitField0_ = (bitField0_ & ~0x00000004);
635 if (diagnosticResponseBuilder_ == null) {
636 diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
638 diagnosticResponseBuilder_.clear();
640 bitField0_ = (bitField0_ & ~0x00000008);
641 if (controlCommandBuilder_ == null) {
642 controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
644 controlCommandBuilder_.clear();
646 bitField0_ = (bitField0_ & ~0x00000010);
650 public Builder clone() {
651 return create().mergeFrom(buildPartial());
654 public com.google.protobuf.Descriptors.Descriptor
655 getDescriptorForType() {
656 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
659 public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() {
660 return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance();
663 public com.openxc.BinaryMessages.VehicleMessage build() {
664 com.openxc.BinaryMessages.VehicleMessage result = buildPartial();
665 if (!result.isInitialized()) {
666 throw newUninitializedMessageException(result);
671 public com.openxc.BinaryMessages.VehicleMessage buildPartial() {
672 com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this);
673 int from_bitField0_ = bitField0_;
674 int to_bitField0_ = 0;
675 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
676 to_bitField0_ |= 0x00000001;
678 result.type_ = type_;
679 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
680 to_bitField0_ |= 0x00000002;
682 if (rawMessageBuilder_ == null) {
683 result.rawMessage_ = rawMessage_;
685 result.rawMessage_ = rawMessageBuilder_.build();
687 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
688 to_bitField0_ |= 0x00000004;
690 if (translatedMessageBuilder_ == null) {
691 result.translatedMessage_ = translatedMessage_;
693 result.translatedMessage_ = translatedMessageBuilder_.build();
695 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
696 to_bitField0_ |= 0x00000008;
698 if (diagnosticResponseBuilder_ == null) {
699 result.diagnosticResponse_ = diagnosticResponse_;
701 result.diagnosticResponse_ = diagnosticResponseBuilder_.build();
703 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
704 to_bitField0_ |= 0x00000010;
706 if (controlCommandBuilder_ == null) {
707 result.controlCommand_ = controlCommand_;
709 result.controlCommand_ = controlCommandBuilder_.build();
711 result.bitField0_ = to_bitField0_;
716 public Builder mergeFrom(com.google.protobuf.Message other) {
717 if (other instanceof com.openxc.BinaryMessages.VehicleMessage) {
718 return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other);
720 super.mergeFrom(other);
725 public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) {
726 if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this;
727 if (other.hasType()) {
728 setType(other.getType());
730 if (other.hasRawMessage()) {
731 mergeRawMessage(other.getRawMessage());
733 if (other.hasTranslatedMessage()) {
734 mergeTranslatedMessage(other.getTranslatedMessage());
736 if (other.hasDiagnosticResponse()) {
737 mergeDiagnosticResponse(other.getDiagnosticResponse());
739 if (other.hasControlCommand()) {
740 mergeControlCommand(other.getControlCommand());
742 this.mergeUnknownFields(other.getUnknownFields());
746 public final boolean isInitialized() {
750 public Builder mergeFrom(
751 com.google.protobuf.CodedInputStream input,
752 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
753 throws java.io.IOException {
754 com.openxc.BinaryMessages.VehicleMessage parsedMessage = null;
756 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
757 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
758 parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage();
761 if (parsedMessage != null) {
762 mergeFrom(parsedMessage);
767 private int bitField0_;
769 // optional .openxc.VehicleMessage.Type type = 1;
770 private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
772 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
774 public boolean hasType() {
775 return ((bitField0_ & 0x00000001) == 0x00000001);
778 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
780 public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
784 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
786 public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) {
788 throw new NullPointerException();
790 bitField0_ |= 0x00000001;
796 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
798 public Builder clearType() {
799 bitField0_ = (bitField0_ & ~0x00000001);
800 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
805 // optional .openxc.RawMessage raw_message = 2;
806 private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
807 private com.google.protobuf.SingleFieldBuilder<
808 com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_;
810 * <code>optional .openxc.RawMessage raw_message = 2;</code>
812 public boolean hasRawMessage() {
813 return ((bitField0_ & 0x00000002) == 0x00000002);
816 * <code>optional .openxc.RawMessage raw_message = 2;</code>
818 public com.openxc.BinaryMessages.RawMessage getRawMessage() {
819 if (rawMessageBuilder_ == null) {
822 return rawMessageBuilder_.getMessage();
826 * <code>optional .openxc.RawMessage raw_message = 2;</code>
828 public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) {
829 if (rawMessageBuilder_ == null) {
831 throw new NullPointerException();
836 rawMessageBuilder_.setMessage(value);
838 bitField0_ |= 0x00000002;
842 * <code>optional .openxc.RawMessage raw_message = 2;</code>
844 public Builder setRawMessage(
845 com.openxc.BinaryMessages.RawMessage.Builder builderForValue) {
846 if (rawMessageBuilder_ == null) {
847 rawMessage_ = builderForValue.build();
850 rawMessageBuilder_.setMessage(builderForValue.build());
852 bitField0_ |= 0x00000002;
856 * <code>optional .openxc.RawMessage raw_message = 2;</code>
858 public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) {
859 if (rawMessageBuilder_ == null) {
860 if (((bitField0_ & 0x00000002) == 0x00000002) &&
861 rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) {
863 com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial();
869 rawMessageBuilder_.mergeFrom(value);
871 bitField0_ |= 0x00000002;
875 * <code>optional .openxc.RawMessage raw_message = 2;</code>
877 public Builder clearRawMessage() {
878 if (rawMessageBuilder_ == null) {
879 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
882 rawMessageBuilder_.clear();
884 bitField0_ = (bitField0_ & ~0x00000002);
888 * <code>optional .openxc.RawMessage raw_message = 2;</code>
890 public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() {
891 bitField0_ |= 0x00000002;
893 return getRawMessageFieldBuilder().getBuilder();
896 * <code>optional .openxc.RawMessage raw_message = 2;</code>
898 public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
899 if (rawMessageBuilder_ != null) {
900 return rawMessageBuilder_.getMessageOrBuilder();
906 * <code>optional .openxc.RawMessage raw_message = 2;</code>
908 private com.google.protobuf.SingleFieldBuilder<
909 com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>
910 getRawMessageFieldBuilder() {
911 if (rawMessageBuilder_ == null) {
912 rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
913 com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>(
915 getParentForChildren(),
919 return rawMessageBuilder_;
922 // optional .openxc.TranslatedMessage translated_message = 3;
923 private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
924 private com.google.protobuf.SingleFieldBuilder<
925 com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_;
927 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
929 public boolean hasTranslatedMessage() {
930 return ((bitField0_ & 0x00000004) == 0x00000004);
933 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
935 public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
936 if (translatedMessageBuilder_ == null) {
937 return translatedMessage_;
939 return translatedMessageBuilder_.getMessage();
943 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
945 public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
946 if (translatedMessageBuilder_ == null) {
948 throw new NullPointerException();
950 translatedMessage_ = value;
953 translatedMessageBuilder_.setMessage(value);
955 bitField0_ |= 0x00000004;
959 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
961 public Builder setTranslatedMessage(
962 com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) {
963 if (translatedMessageBuilder_ == null) {
964 translatedMessage_ = builderForValue.build();
967 translatedMessageBuilder_.setMessage(builderForValue.build());
969 bitField0_ |= 0x00000004;
973 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
975 public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
976 if (translatedMessageBuilder_ == null) {
977 if (((bitField0_ & 0x00000004) == 0x00000004) &&
978 translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) {
980 com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial();
982 translatedMessage_ = value;
986 translatedMessageBuilder_.mergeFrom(value);
988 bitField0_ |= 0x00000004;
992 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
994 public Builder clearTranslatedMessage() {
995 if (translatedMessageBuilder_ == null) {
996 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
999 translatedMessageBuilder_.clear();
1001 bitField0_ = (bitField0_ & ~0x00000004);
1005 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1007 public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() {
1008 bitField0_ |= 0x00000004;
1010 return getTranslatedMessageFieldBuilder().getBuilder();
1013 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1015 public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
1016 if (translatedMessageBuilder_ != null) {
1017 return translatedMessageBuilder_.getMessageOrBuilder();
1019 return translatedMessage_;
1023 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
1025 private com.google.protobuf.SingleFieldBuilder<
1026 com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>
1027 getTranslatedMessageFieldBuilder() {
1028 if (translatedMessageBuilder_ == null) {
1029 translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1030 com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>(
1032 getParentForChildren(),
1034 translatedMessage_ = null;
1036 return translatedMessageBuilder_;
1039 // optional .openxc.DiagnosticResponse diagnostic_response = 4;
1040 private com.openxc.BinaryMessages.DiagnosticResponse diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1041 private com.google.protobuf.SingleFieldBuilder<
1042 com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder> diagnosticResponseBuilder_;
1044 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1046 public boolean hasDiagnosticResponse() {
1047 return ((bitField0_ & 0x00000008) == 0x00000008);
1050 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1052 public com.openxc.BinaryMessages.DiagnosticResponse getDiagnosticResponse() {
1053 if (diagnosticResponseBuilder_ == null) {
1054 return diagnosticResponse_;
1056 return diagnosticResponseBuilder_.getMessage();
1060 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1062 public Builder setDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1063 if (diagnosticResponseBuilder_ == null) {
1064 if (value == null) {
1065 throw new NullPointerException();
1067 diagnosticResponse_ = value;
1070 diagnosticResponseBuilder_.setMessage(value);
1072 bitField0_ |= 0x00000008;
1076 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1078 public Builder setDiagnosticResponse(
1079 com.openxc.BinaryMessages.DiagnosticResponse.Builder builderForValue) {
1080 if (diagnosticResponseBuilder_ == null) {
1081 diagnosticResponse_ = builderForValue.build();
1084 diagnosticResponseBuilder_.setMessage(builderForValue.build());
1086 bitField0_ |= 0x00000008;
1090 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1092 public Builder mergeDiagnosticResponse(com.openxc.BinaryMessages.DiagnosticResponse value) {
1093 if (diagnosticResponseBuilder_ == null) {
1094 if (((bitField0_ & 0x00000008) == 0x00000008) &&
1095 diagnosticResponse_ != com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) {
1096 diagnosticResponse_ =
1097 com.openxc.BinaryMessages.DiagnosticResponse.newBuilder(diagnosticResponse_).mergeFrom(value).buildPartial();
1099 diagnosticResponse_ = value;
1103 diagnosticResponseBuilder_.mergeFrom(value);
1105 bitField0_ |= 0x00000008;
1109 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1111 public Builder clearDiagnosticResponse() {
1112 if (diagnosticResponseBuilder_ == null) {
1113 diagnosticResponse_ = com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
1116 diagnosticResponseBuilder_.clear();
1118 bitField0_ = (bitField0_ & ~0x00000008);
1122 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1124 public com.openxc.BinaryMessages.DiagnosticResponse.Builder getDiagnosticResponseBuilder() {
1125 bitField0_ |= 0x00000008;
1127 return getDiagnosticResponseFieldBuilder().getBuilder();
1130 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1132 public com.openxc.BinaryMessages.DiagnosticResponseOrBuilder getDiagnosticResponseOrBuilder() {
1133 if (diagnosticResponseBuilder_ != null) {
1134 return diagnosticResponseBuilder_.getMessageOrBuilder();
1136 return diagnosticResponse_;
1140 * <code>optional .openxc.DiagnosticResponse diagnostic_response = 4;</code>
1142 private com.google.protobuf.SingleFieldBuilder<
1143 com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>
1144 getDiagnosticResponseFieldBuilder() {
1145 if (diagnosticResponseBuilder_ == null) {
1146 diagnosticResponseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1147 com.openxc.BinaryMessages.DiagnosticResponse, com.openxc.BinaryMessages.DiagnosticResponse.Builder, com.openxc.BinaryMessages.DiagnosticResponseOrBuilder>(
1148 diagnosticResponse_,
1149 getParentForChildren(),
1151 diagnosticResponse_ = null;
1153 return diagnosticResponseBuilder_;
1156 // optional .openxc.ControlCommand control_command = 5;
1157 private com.openxc.BinaryMessages.ControlCommand controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
1158 private com.google.protobuf.SingleFieldBuilder<
1159 com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder> controlCommandBuilder_;
1161 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1163 public boolean hasControlCommand() {
1164 return ((bitField0_ & 0x00000010) == 0x00000010);
1167 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1169 public com.openxc.BinaryMessages.ControlCommand getControlCommand() {
1170 if (controlCommandBuilder_ == null) {
1171 return controlCommand_;
1173 return controlCommandBuilder_.getMessage();
1177 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1179 public Builder setControlCommand(com.openxc.BinaryMessages.ControlCommand value) {
1180 if (controlCommandBuilder_ == null) {
1181 if (value == null) {
1182 throw new NullPointerException();
1184 controlCommand_ = value;
1187 controlCommandBuilder_.setMessage(value);
1189 bitField0_ |= 0x00000010;
1193 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1195 public Builder setControlCommand(
1196 com.openxc.BinaryMessages.ControlCommand.Builder builderForValue) {
1197 if (controlCommandBuilder_ == null) {
1198 controlCommand_ = builderForValue.build();
1201 controlCommandBuilder_.setMessage(builderForValue.build());
1203 bitField0_ |= 0x00000010;
1207 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1209 public Builder mergeControlCommand(com.openxc.BinaryMessages.ControlCommand value) {
1210 if (controlCommandBuilder_ == null) {
1211 if (((bitField0_ & 0x00000010) == 0x00000010) &&
1212 controlCommand_ != com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) {
1214 com.openxc.BinaryMessages.ControlCommand.newBuilder(controlCommand_).mergeFrom(value).buildPartial();
1216 controlCommand_ = value;
1220 controlCommandBuilder_.mergeFrom(value);
1222 bitField0_ |= 0x00000010;
1226 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1228 public Builder clearControlCommand() {
1229 if (controlCommandBuilder_ == null) {
1230 controlCommand_ = com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
1233 controlCommandBuilder_.clear();
1235 bitField0_ = (bitField0_ & ~0x00000010);
1239 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1241 public com.openxc.BinaryMessages.ControlCommand.Builder getControlCommandBuilder() {
1242 bitField0_ |= 0x00000010;
1244 return getControlCommandFieldBuilder().getBuilder();
1247 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1249 public com.openxc.BinaryMessages.ControlCommandOrBuilder getControlCommandOrBuilder() {
1250 if (controlCommandBuilder_ != null) {
1251 return controlCommandBuilder_.getMessageOrBuilder();
1253 return controlCommand_;
1257 * <code>optional .openxc.ControlCommand control_command = 5;</code>
1259 private com.google.protobuf.SingleFieldBuilder<
1260 com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder>
1261 getControlCommandFieldBuilder() {
1262 if (controlCommandBuilder_ == null) {
1263 controlCommandBuilder_ = new com.google.protobuf.SingleFieldBuilder<
1264 com.openxc.BinaryMessages.ControlCommand, com.openxc.BinaryMessages.ControlCommand.Builder, com.openxc.BinaryMessages.ControlCommandOrBuilder>(
1266 getParentForChildren(),
1268 controlCommand_ = null;
1270 return controlCommandBuilder_;
1273 // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage)
1277 defaultInstance = new VehicleMessage(true);
1278 defaultInstance.initFields();
1281 // @@protoc_insertion_point(class_scope:openxc.VehicleMessage)
1284 public interface RawMessageOrBuilder
1285 extends com.google.protobuf.MessageOrBuilder {
1287 // optional int32 bus = 1;
1289 * <code>optional int32 bus = 1;</code>
1293 * <code>optional int32 bus = 1;</code>
1297 // optional uint32 message_id = 2;
1299 * <code>optional uint32 message_id = 2;</code>
1301 boolean hasMessageId();
1303 * <code>optional uint32 message_id = 2;</code>
1307 // optional bytes data = 3;
1309 * <code>optional bytes data = 3;</code>
1313 * <code>optional bytes data = 3;</code>
1315 com.google.protobuf.ByteString getData();
1318 * Protobuf type {@code openxc.RawMessage}
1320 public static final class RawMessage extends
1321 com.google.protobuf.GeneratedMessage
1322 implements RawMessageOrBuilder {
1323 // Use RawMessage.newBuilder() to construct.
1324 private RawMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1326 this.unknownFields = builder.getUnknownFields();
1328 private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1330 private static final RawMessage defaultInstance;
1331 public static RawMessage getDefaultInstance() {
1332 return defaultInstance;
1335 public RawMessage getDefaultInstanceForType() {
1336 return defaultInstance;
1339 private final com.google.protobuf.UnknownFieldSet unknownFields;
1341 public final com.google.protobuf.UnknownFieldSet
1342 getUnknownFields() {
1343 return this.unknownFields;
1346 com.google.protobuf.CodedInputStream input,
1347 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1348 throws com.google.protobuf.InvalidProtocolBufferException {
1350 int mutable_bitField0_ = 0;
1351 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1352 com.google.protobuf.UnknownFieldSet.newBuilder();
1354 boolean done = false;
1356 int tag = input.readTag();
1362 if (!parseUnknownField(input, unknownFields,
1363 extensionRegistry, tag)) {
1369 bitField0_ |= 0x00000001;
1370 bus_ = input.readInt32();
1374 bitField0_ |= 0x00000002;
1375 messageId_ = input.readUInt32();
1379 bitField0_ |= 0x00000004;
1380 data_ = input.readBytes();
1385 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1386 throw e.setUnfinishedMessage(this);
1387 } catch (java.io.IOException e) {
1388 throw new com.google.protobuf.InvalidProtocolBufferException(
1389 e.getMessage()).setUnfinishedMessage(this);
1391 this.unknownFields = unknownFields.build();
1392 makeExtensionsImmutable();
1395 public static final com.google.protobuf.Descriptors.Descriptor
1397 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1400 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1401 internalGetFieldAccessorTable() {
1402 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1403 .ensureFieldAccessorsInitialized(
1404 com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1407 public static com.google.protobuf.Parser<RawMessage> PARSER =
1408 new com.google.protobuf.AbstractParser<RawMessage>() {
1409 public RawMessage parsePartialFrom(
1410 com.google.protobuf.CodedInputStream input,
1411 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1412 throws com.google.protobuf.InvalidProtocolBufferException {
1413 return new RawMessage(input, extensionRegistry);
1418 public com.google.protobuf.Parser<RawMessage> getParserForType() {
1422 private int bitField0_;
1423 // optional int32 bus = 1;
1424 public static final int BUS_FIELD_NUMBER = 1;
1427 * <code>optional int32 bus = 1;</code>
1429 public boolean hasBus() {
1430 return ((bitField0_ & 0x00000001) == 0x00000001);
1433 * <code>optional int32 bus = 1;</code>
1435 public int getBus() {
1439 // optional uint32 message_id = 2;
1440 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1441 private int messageId_;
1443 * <code>optional uint32 message_id = 2;</code>
1445 public boolean hasMessageId() {
1446 return ((bitField0_ & 0x00000002) == 0x00000002);
1449 * <code>optional uint32 message_id = 2;</code>
1451 public int getMessageId() {
1455 // optional bytes data = 3;
1456 public static final int DATA_FIELD_NUMBER = 3;
1457 private com.google.protobuf.ByteString data_;
1459 * <code>optional bytes data = 3;</code>
1461 public boolean hasData() {
1462 return ((bitField0_ & 0x00000004) == 0x00000004);
1465 * <code>optional bytes data = 3;</code>
1467 public com.google.protobuf.ByteString getData() {
1471 private void initFields() {
1474 data_ = com.google.protobuf.ByteString.EMPTY;
1476 private byte memoizedIsInitialized = -1;
1477 public final boolean isInitialized() {
1478 byte isInitialized = memoizedIsInitialized;
1479 if (isInitialized != -1) return isInitialized == 1;
1481 memoizedIsInitialized = 1;
1485 public void writeTo(com.google.protobuf.CodedOutputStream output)
1486 throws java.io.IOException {
1487 getSerializedSize();
1488 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1489 output.writeInt32(1, bus_);
1491 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1492 output.writeUInt32(2, messageId_);
1494 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1495 output.writeBytes(3, data_);
1497 getUnknownFields().writeTo(output);
1500 private int memoizedSerializedSize = -1;
1501 public int getSerializedSize() {
1502 int size = memoizedSerializedSize;
1503 if (size != -1) return size;
1506 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1507 size += com.google.protobuf.CodedOutputStream
1508 .computeInt32Size(1, bus_);
1510 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1511 size += com.google.protobuf.CodedOutputStream
1512 .computeUInt32Size(2, messageId_);
1514 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1515 size += com.google.protobuf.CodedOutputStream
1516 .computeBytesSize(3, data_);
1518 size += getUnknownFields().getSerializedSize();
1519 memoizedSerializedSize = size;
1523 private static final long serialVersionUID = 0L;
1525 protected java.lang.Object writeReplace()
1526 throws java.io.ObjectStreamException {
1527 return super.writeReplace();
1530 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1531 com.google.protobuf.ByteString data)
1532 throws com.google.protobuf.InvalidProtocolBufferException {
1533 return PARSER.parseFrom(data);
1535 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1536 com.google.protobuf.ByteString data,
1537 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1538 throws com.google.protobuf.InvalidProtocolBufferException {
1539 return PARSER.parseFrom(data, extensionRegistry);
1541 public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data)
1542 throws com.google.protobuf.InvalidProtocolBufferException {
1543 return PARSER.parseFrom(data);
1545 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1547 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1548 throws com.google.protobuf.InvalidProtocolBufferException {
1549 return PARSER.parseFrom(data, extensionRegistry);
1551 public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input)
1552 throws java.io.IOException {
1553 return PARSER.parseFrom(input);
1555 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1556 java.io.InputStream input,
1557 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1558 throws java.io.IOException {
1559 return PARSER.parseFrom(input, extensionRegistry);
1561 public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input)
1562 throws java.io.IOException {
1563 return PARSER.parseDelimitedFrom(input);
1565 public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(
1566 java.io.InputStream input,
1567 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1568 throws java.io.IOException {
1569 return PARSER.parseDelimitedFrom(input, extensionRegistry);
1571 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1572 com.google.protobuf.CodedInputStream input)
1573 throws java.io.IOException {
1574 return PARSER.parseFrom(input);
1576 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1577 com.google.protobuf.CodedInputStream input,
1578 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1579 throws java.io.IOException {
1580 return PARSER.parseFrom(input, extensionRegistry);
1583 public static Builder newBuilder() { return Builder.create(); }
1584 public Builder newBuilderForType() { return newBuilder(); }
1585 public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) {
1586 return newBuilder().mergeFrom(prototype);
1588 public Builder toBuilder() { return newBuilder(this); }
1591 protected Builder newBuilderForType(
1592 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1593 Builder builder = new Builder(parent);
1597 * Protobuf type {@code openxc.RawMessage}
1599 public static final class Builder extends
1600 com.google.protobuf.GeneratedMessage.Builder<Builder>
1601 implements com.openxc.BinaryMessages.RawMessageOrBuilder {
1602 public static final com.google.protobuf.Descriptors.Descriptor
1604 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1607 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1608 internalGetFieldAccessorTable() {
1609 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1610 .ensureFieldAccessorsInitialized(
1611 com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1614 // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder()
1616 maybeForceBuilderInitialization();
1620 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1622 maybeForceBuilderInitialization();
1624 private void maybeForceBuilderInitialization() {
1625 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1628 private static Builder create() {
1629 return new Builder();
1632 public Builder clear() {
1635 bitField0_ = (bitField0_ & ~0x00000001);
1637 bitField0_ = (bitField0_ & ~0x00000002);
1638 data_ = com.google.protobuf.ByteString.EMPTY;
1639 bitField0_ = (bitField0_ & ~0x00000004);
1643 public Builder clone() {
1644 return create().mergeFrom(buildPartial());
1647 public com.google.protobuf.Descriptors.Descriptor
1648 getDescriptorForType() {
1649 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1652 public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() {
1653 return com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
1656 public com.openxc.BinaryMessages.RawMessage build() {
1657 com.openxc.BinaryMessages.RawMessage result = buildPartial();
1658 if (!result.isInitialized()) {
1659 throw newUninitializedMessageException(result);
1664 public com.openxc.BinaryMessages.RawMessage buildPartial() {
1665 com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this);
1666 int from_bitField0_ = bitField0_;
1667 int to_bitField0_ = 0;
1668 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
1669 to_bitField0_ |= 0x00000001;
1672 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
1673 to_bitField0_ |= 0x00000002;
1675 result.messageId_ = messageId_;
1676 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
1677 to_bitField0_ |= 0x00000004;
1679 result.data_ = data_;
1680 result.bitField0_ = to_bitField0_;
1685 public Builder mergeFrom(com.google.protobuf.Message other) {
1686 if (other instanceof com.openxc.BinaryMessages.RawMessage) {
1687 return mergeFrom((com.openxc.BinaryMessages.RawMessage)other);
1689 super.mergeFrom(other);
1694 public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) {
1695 if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this;
1696 if (other.hasBus()) {
1697 setBus(other.getBus());
1699 if (other.hasMessageId()) {
1700 setMessageId(other.getMessageId());
1702 if (other.hasData()) {
1703 setData(other.getData());
1705 this.mergeUnknownFields(other.getUnknownFields());
1709 public final boolean isInitialized() {
1713 public Builder mergeFrom(
1714 com.google.protobuf.CodedInputStream input,
1715 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1716 throws java.io.IOException {
1717 com.openxc.BinaryMessages.RawMessage parsedMessage = null;
1719 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1720 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1721 parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage();
1724 if (parsedMessage != null) {
1725 mergeFrom(parsedMessage);
1730 private int bitField0_;
1732 // optional int32 bus = 1;
1735 * <code>optional int32 bus = 1;</code>
1737 public boolean hasBus() {
1738 return ((bitField0_ & 0x00000001) == 0x00000001);
1741 * <code>optional int32 bus = 1;</code>
1743 public int getBus() {
1747 * <code>optional int32 bus = 1;</code>
1749 public Builder setBus(int value) {
1750 bitField0_ |= 0x00000001;
1756 * <code>optional int32 bus = 1;</code>
1758 public Builder clearBus() {
1759 bitField0_ = (bitField0_ & ~0x00000001);
1765 // optional uint32 message_id = 2;
1766 private int messageId_ ;
1768 * <code>optional uint32 message_id = 2;</code>
1770 public boolean hasMessageId() {
1771 return ((bitField0_ & 0x00000002) == 0x00000002);
1774 * <code>optional uint32 message_id = 2;</code>
1776 public int getMessageId() {
1780 * <code>optional uint32 message_id = 2;</code>
1782 public Builder setMessageId(int value) {
1783 bitField0_ |= 0x00000002;
1789 * <code>optional uint32 message_id = 2;</code>
1791 public Builder clearMessageId() {
1792 bitField0_ = (bitField0_ & ~0x00000002);
1798 // optional bytes data = 3;
1799 private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
1801 * <code>optional bytes data = 3;</code>
1803 public boolean hasData() {
1804 return ((bitField0_ & 0x00000004) == 0x00000004);
1807 * <code>optional bytes data = 3;</code>
1809 public com.google.protobuf.ByteString getData() {
1813 * <code>optional bytes data = 3;</code>
1815 public Builder setData(com.google.protobuf.ByteString value) {
1816 if (value == null) {
1817 throw new NullPointerException();
1819 bitField0_ |= 0x00000004;
1825 * <code>optional bytes data = 3;</code>
1827 public Builder clearData() {
1828 bitField0_ = (bitField0_ & ~0x00000004);
1829 data_ = getDefaultInstance().getData();
1834 // @@protoc_insertion_point(builder_scope:openxc.RawMessage)
1838 defaultInstance = new RawMessage(true);
1839 defaultInstance.initFields();
1842 // @@protoc_insertion_point(class_scope:openxc.RawMessage)
1845 public interface ControlCommandOrBuilder
1846 extends com.google.protobuf.MessageOrBuilder {
1848 // optional .openxc.ControlCommand.Type type = 1;
1850 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
1854 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
1856 com.openxc.BinaryMessages.ControlCommand.Type getType();
1858 // optional .openxc.DiagnosticRequest diagnostic_request = 2;
1860 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1862 boolean hasDiagnosticRequest();
1864 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1866 com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest();
1868 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
1870 com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder();
1873 * Protobuf type {@code openxc.ControlCommand}
1875 public static final class ControlCommand extends
1876 com.google.protobuf.GeneratedMessage
1877 implements ControlCommandOrBuilder {
1878 // Use ControlCommand.newBuilder() to construct.
1879 private ControlCommand(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1881 this.unknownFields = builder.getUnknownFields();
1883 private ControlCommand(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1885 private static final ControlCommand defaultInstance;
1886 public static ControlCommand getDefaultInstance() {
1887 return defaultInstance;
1890 public ControlCommand getDefaultInstanceForType() {
1891 return defaultInstance;
1894 private final com.google.protobuf.UnknownFieldSet unknownFields;
1896 public final com.google.protobuf.UnknownFieldSet
1897 getUnknownFields() {
1898 return this.unknownFields;
1900 private ControlCommand(
1901 com.google.protobuf.CodedInputStream input,
1902 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1903 throws com.google.protobuf.InvalidProtocolBufferException {
1905 int mutable_bitField0_ = 0;
1906 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1907 com.google.protobuf.UnknownFieldSet.newBuilder();
1909 boolean done = false;
1911 int tag = input.readTag();
1917 if (!parseUnknownField(input, unknownFields,
1918 extensionRegistry, tag)) {
1924 int rawValue = input.readEnum();
1925 com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue);
1926 if (value == null) {
1927 unknownFields.mergeVarintField(1, rawValue);
1929 bitField0_ |= 0x00000001;
1935 com.openxc.BinaryMessages.DiagnosticRequest.Builder subBuilder = null;
1936 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1937 subBuilder = diagnosticRequest_.toBuilder();
1939 diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticRequest.PARSER, extensionRegistry);
1940 if (subBuilder != null) {
1941 subBuilder.mergeFrom(diagnosticRequest_);
1942 diagnosticRequest_ = subBuilder.buildPartial();
1944 bitField0_ |= 0x00000002;
1949 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1950 throw e.setUnfinishedMessage(this);
1951 } catch (java.io.IOException e) {
1952 throw new com.google.protobuf.InvalidProtocolBufferException(
1953 e.getMessage()).setUnfinishedMessage(this);
1955 this.unknownFields = unknownFields.build();
1956 makeExtensionsImmutable();
1959 public static final com.google.protobuf.Descriptors.Descriptor
1961 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
1964 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1965 internalGetFieldAccessorTable() {
1966 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
1967 .ensureFieldAccessorsInitialized(
1968 com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
1971 public static com.google.protobuf.Parser<ControlCommand> PARSER =
1972 new com.google.protobuf.AbstractParser<ControlCommand>() {
1973 public ControlCommand parsePartialFrom(
1974 com.google.protobuf.CodedInputStream input,
1975 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1976 throws com.google.protobuf.InvalidProtocolBufferException {
1977 return new ControlCommand(input, extensionRegistry);
1982 public com.google.protobuf.Parser<ControlCommand> getParserForType() {
1987 * Protobuf enum {@code openxc.ControlCommand.Type}
1990 implements com.google.protobuf.ProtocolMessageEnum {
1992 * <code>VERSION = 1;</code>
1996 * <code>DEVICE_ID = 2;</code>
2000 * <code>DIAGNOSTIC = 3;</code>
2006 * <code>VERSION = 1;</code>
2008 public static final int VERSION_VALUE = 1;
2010 * <code>DEVICE_ID = 2;</code>
2012 public static final int DEVICE_ID_VALUE = 2;
2014 * <code>DIAGNOSTIC = 3;</code>
2016 public static final int DIAGNOSTIC_VALUE = 3;
2019 public final int getNumber() { return value; }
2021 public static Type valueOf(int value) {
2023 case 1: return VERSION;
2024 case 2: return DEVICE_ID;
2025 case 3: return DIAGNOSTIC;
2026 default: return null;
2030 public static com.google.protobuf.Internal.EnumLiteMap<Type>
2031 internalGetValueMap() {
2032 return internalValueMap;
2034 private static com.google.protobuf.Internal.EnumLiteMap<Type>
2036 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
2037 public Type findValueByNumber(int number) {
2038 return Type.valueOf(number);
2042 public final com.google.protobuf.Descriptors.EnumValueDescriptor
2043 getValueDescriptor() {
2044 return getDescriptor().getValues().get(index);
2046 public final com.google.protobuf.Descriptors.EnumDescriptor
2047 getDescriptorForType() {
2048 return getDescriptor();
2050 public static final com.google.protobuf.Descriptors.EnumDescriptor
2052 return com.openxc.BinaryMessages.ControlCommand.getDescriptor().getEnumTypes().get(0);
2055 private static final Type[] VALUES = values();
2057 public static Type valueOf(
2058 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
2059 if (desc.getType() != getDescriptor()) {
2060 throw new java.lang.IllegalArgumentException(
2061 "EnumValueDescriptor is not for this type.");
2063 return VALUES[desc.getIndex()];
2066 private final int index;
2067 private final int value;
2069 private Type(int index, int value) {
2074 // @@protoc_insertion_point(enum_scope:openxc.ControlCommand.Type)
2077 private int bitField0_;
2078 // optional .openxc.ControlCommand.Type type = 1;
2079 public static final int TYPE_FIELD_NUMBER = 1;
2080 private com.openxc.BinaryMessages.ControlCommand.Type type_;
2082 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2084 public boolean hasType() {
2085 return ((bitField0_ & 0x00000001) == 0x00000001);
2088 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2090 public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2094 // optional .openxc.DiagnosticRequest diagnostic_request = 2;
2095 public static final int DIAGNOSTIC_REQUEST_FIELD_NUMBER = 2;
2096 private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_;
2098 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2100 public boolean hasDiagnosticRequest() {
2101 return ((bitField0_ & 0x00000002) == 0x00000002);
2104 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2106 public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
2107 return diagnosticRequest_;
2110 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2112 public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
2113 return diagnosticRequest_;
2116 private void initFields() {
2117 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2118 diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2120 private byte memoizedIsInitialized = -1;
2121 public final boolean isInitialized() {
2122 byte isInitialized = memoizedIsInitialized;
2123 if (isInitialized != -1) return isInitialized == 1;
2125 memoizedIsInitialized = 1;
2129 public void writeTo(com.google.protobuf.CodedOutputStream output)
2130 throws java.io.IOException {
2131 getSerializedSize();
2132 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2133 output.writeEnum(1, type_.getNumber());
2135 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2136 output.writeMessage(2, diagnosticRequest_);
2138 getUnknownFields().writeTo(output);
2141 private int memoizedSerializedSize = -1;
2142 public int getSerializedSize() {
2143 int size = memoizedSerializedSize;
2144 if (size != -1) return size;
2147 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2148 size += com.google.protobuf.CodedOutputStream
2149 .computeEnumSize(1, type_.getNumber());
2151 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2152 size += com.google.protobuf.CodedOutputStream
2153 .computeMessageSize(2, diagnosticRequest_);
2155 size += getUnknownFields().getSerializedSize();
2156 memoizedSerializedSize = size;
2160 private static final long serialVersionUID = 0L;
2162 protected java.lang.Object writeReplace()
2163 throws java.io.ObjectStreamException {
2164 return super.writeReplace();
2167 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2168 com.google.protobuf.ByteString data)
2169 throws com.google.protobuf.InvalidProtocolBufferException {
2170 return PARSER.parseFrom(data);
2172 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2173 com.google.protobuf.ByteString data,
2174 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2175 throws com.google.protobuf.InvalidProtocolBufferException {
2176 return PARSER.parseFrom(data, extensionRegistry);
2178 public static com.openxc.BinaryMessages.ControlCommand parseFrom(byte[] data)
2179 throws com.google.protobuf.InvalidProtocolBufferException {
2180 return PARSER.parseFrom(data);
2182 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2184 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2185 throws com.google.protobuf.InvalidProtocolBufferException {
2186 return PARSER.parseFrom(data, extensionRegistry);
2188 public static com.openxc.BinaryMessages.ControlCommand parseFrom(java.io.InputStream input)
2189 throws java.io.IOException {
2190 return PARSER.parseFrom(input);
2192 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2193 java.io.InputStream input,
2194 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2195 throws java.io.IOException {
2196 return PARSER.parseFrom(input, extensionRegistry);
2198 public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(java.io.InputStream input)
2199 throws java.io.IOException {
2200 return PARSER.parseDelimitedFrom(input);
2202 public static com.openxc.BinaryMessages.ControlCommand parseDelimitedFrom(
2203 java.io.InputStream input,
2204 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2205 throws java.io.IOException {
2206 return PARSER.parseDelimitedFrom(input, extensionRegistry);
2208 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2209 com.google.protobuf.CodedInputStream input)
2210 throws java.io.IOException {
2211 return PARSER.parseFrom(input);
2213 public static com.openxc.BinaryMessages.ControlCommand parseFrom(
2214 com.google.protobuf.CodedInputStream input,
2215 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2216 throws java.io.IOException {
2217 return PARSER.parseFrom(input, extensionRegistry);
2220 public static Builder newBuilder() { return Builder.create(); }
2221 public Builder newBuilderForType() { return newBuilder(); }
2222 public static Builder newBuilder(com.openxc.BinaryMessages.ControlCommand prototype) {
2223 return newBuilder().mergeFrom(prototype);
2225 public Builder toBuilder() { return newBuilder(this); }
2228 protected Builder newBuilderForType(
2229 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2230 Builder builder = new Builder(parent);
2234 * Protobuf type {@code openxc.ControlCommand}
2236 public static final class Builder extends
2237 com.google.protobuf.GeneratedMessage.Builder<Builder>
2238 implements com.openxc.BinaryMessages.ControlCommandOrBuilder {
2239 public static final com.google.protobuf.Descriptors.Descriptor
2241 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2244 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2245 internalGetFieldAccessorTable() {
2246 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_fieldAccessorTable
2247 .ensureFieldAccessorsInitialized(
2248 com.openxc.BinaryMessages.ControlCommand.class, com.openxc.BinaryMessages.ControlCommand.Builder.class);
2251 // Construct using com.openxc.BinaryMessages.ControlCommand.newBuilder()
2253 maybeForceBuilderInitialization();
2257 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
2259 maybeForceBuilderInitialization();
2261 private void maybeForceBuilderInitialization() {
2262 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
2263 getDiagnosticRequestFieldBuilder();
2266 private static Builder create() {
2267 return new Builder();
2270 public Builder clear() {
2272 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2273 bitField0_ = (bitField0_ & ~0x00000001);
2274 if (diagnosticRequestBuilder_ == null) {
2275 diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2277 diagnosticRequestBuilder_.clear();
2279 bitField0_ = (bitField0_ & ~0x00000002);
2283 public Builder clone() {
2284 return create().mergeFrom(buildPartial());
2287 public com.google.protobuf.Descriptors.Descriptor
2288 getDescriptorForType() {
2289 return com.openxc.BinaryMessages.internal_static_openxc_ControlCommand_descriptor;
2292 public com.openxc.BinaryMessages.ControlCommand getDefaultInstanceForType() {
2293 return com.openxc.BinaryMessages.ControlCommand.getDefaultInstance();
2296 public com.openxc.BinaryMessages.ControlCommand build() {
2297 com.openxc.BinaryMessages.ControlCommand result = buildPartial();
2298 if (!result.isInitialized()) {
2299 throw newUninitializedMessageException(result);
2304 public com.openxc.BinaryMessages.ControlCommand buildPartial() {
2305 com.openxc.BinaryMessages.ControlCommand result = new com.openxc.BinaryMessages.ControlCommand(this);
2306 int from_bitField0_ = bitField0_;
2307 int to_bitField0_ = 0;
2308 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2309 to_bitField0_ |= 0x00000001;
2311 result.type_ = type_;
2312 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2313 to_bitField0_ |= 0x00000002;
2315 if (diagnosticRequestBuilder_ == null) {
2316 result.diagnosticRequest_ = diagnosticRequest_;
2318 result.diagnosticRequest_ = diagnosticRequestBuilder_.build();
2320 result.bitField0_ = to_bitField0_;
2325 public Builder mergeFrom(com.google.protobuf.Message other) {
2326 if (other instanceof com.openxc.BinaryMessages.ControlCommand) {
2327 return mergeFrom((com.openxc.BinaryMessages.ControlCommand)other);
2329 super.mergeFrom(other);
2334 public Builder mergeFrom(com.openxc.BinaryMessages.ControlCommand other) {
2335 if (other == com.openxc.BinaryMessages.ControlCommand.getDefaultInstance()) return this;
2336 if (other.hasType()) {
2337 setType(other.getType());
2339 if (other.hasDiagnosticRequest()) {
2340 mergeDiagnosticRequest(other.getDiagnosticRequest());
2342 this.mergeUnknownFields(other.getUnknownFields());
2346 public final boolean isInitialized() {
2350 public Builder mergeFrom(
2351 com.google.protobuf.CodedInputStream input,
2352 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2353 throws java.io.IOException {
2354 com.openxc.BinaryMessages.ControlCommand parsedMessage = null;
2356 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2357 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2358 parsedMessage = (com.openxc.BinaryMessages.ControlCommand) e.getUnfinishedMessage();
2361 if (parsedMessage != null) {
2362 mergeFrom(parsedMessage);
2367 private int bitField0_;
2369 // optional .openxc.ControlCommand.Type type = 1;
2370 private com.openxc.BinaryMessages.ControlCommand.Type type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2372 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2374 public boolean hasType() {
2375 return ((bitField0_ & 0x00000001) == 0x00000001);
2378 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2380 public com.openxc.BinaryMessages.ControlCommand.Type getType() {
2384 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2386 public Builder setType(com.openxc.BinaryMessages.ControlCommand.Type value) {
2387 if (value == null) {
2388 throw new NullPointerException();
2390 bitField0_ |= 0x00000001;
2396 * <code>optional .openxc.ControlCommand.Type type = 1;</code>
2398 public Builder clearType() {
2399 bitField0_ = (bitField0_ & ~0x00000001);
2400 type_ = com.openxc.BinaryMessages.ControlCommand.Type.VERSION;
2405 // optional .openxc.DiagnosticRequest diagnostic_request = 2;
2406 private com.openxc.BinaryMessages.DiagnosticRequest diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2407 private com.google.protobuf.SingleFieldBuilder<
2408 com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder> diagnosticRequestBuilder_;
2410 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2412 public boolean hasDiagnosticRequest() {
2413 return ((bitField0_ & 0x00000002) == 0x00000002);
2416 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2418 public com.openxc.BinaryMessages.DiagnosticRequest getDiagnosticRequest() {
2419 if (diagnosticRequestBuilder_ == null) {
2420 return diagnosticRequest_;
2422 return diagnosticRequestBuilder_.getMessage();
2426 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2428 public Builder setDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
2429 if (diagnosticRequestBuilder_ == null) {
2430 if (value == null) {
2431 throw new NullPointerException();
2433 diagnosticRequest_ = value;
2436 diagnosticRequestBuilder_.setMessage(value);
2438 bitField0_ |= 0x00000002;
2442 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2444 public Builder setDiagnosticRequest(
2445 com.openxc.BinaryMessages.DiagnosticRequest.Builder builderForValue) {
2446 if (diagnosticRequestBuilder_ == null) {
2447 diagnosticRequest_ = builderForValue.build();
2450 diagnosticRequestBuilder_.setMessage(builderForValue.build());
2452 bitField0_ |= 0x00000002;
2456 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2458 public Builder mergeDiagnosticRequest(com.openxc.BinaryMessages.DiagnosticRequest value) {
2459 if (diagnosticRequestBuilder_ == null) {
2460 if (((bitField0_ & 0x00000002) == 0x00000002) &&
2461 diagnosticRequest_ != com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) {
2462 diagnosticRequest_ =
2463 com.openxc.BinaryMessages.DiagnosticRequest.newBuilder(diagnosticRequest_).mergeFrom(value).buildPartial();
2465 diagnosticRequest_ = value;
2469 diagnosticRequestBuilder_.mergeFrom(value);
2471 bitField0_ |= 0x00000002;
2475 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2477 public Builder clearDiagnosticRequest() {
2478 if (diagnosticRequestBuilder_ == null) {
2479 diagnosticRequest_ = com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
2482 diagnosticRequestBuilder_.clear();
2484 bitField0_ = (bitField0_ & ~0x00000002);
2488 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2490 public com.openxc.BinaryMessages.DiagnosticRequest.Builder getDiagnosticRequestBuilder() {
2491 bitField0_ |= 0x00000002;
2493 return getDiagnosticRequestFieldBuilder().getBuilder();
2496 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2498 public com.openxc.BinaryMessages.DiagnosticRequestOrBuilder getDiagnosticRequestOrBuilder() {
2499 if (diagnosticRequestBuilder_ != null) {
2500 return diagnosticRequestBuilder_.getMessageOrBuilder();
2502 return diagnosticRequest_;
2506 * <code>optional .openxc.DiagnosticRequest diagnostic_request = 2;</code>
2508 private com.google.protobuf.SingleFieldBuilder<
2509 com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>
2510 getDiagnosticRequestFieldBuilder() {
2511 if (diagnosticRequestBuilder_ == null) {
2512 diagnosticRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2513 com.openxc.BinaryMessages.DiagnosticRequest, com.openxc.BinaryMessages.DiagnosticRequest.Builder, com.openxc.BinaryMessages.DiagnosticRequestOrBuilder>(
2515 getParentForChildren(),
2517 diagnosticRequest_ = null;
2519 return diagnosticRequestBuilder_;
2522 // @@protoc_insertion_point(builder_scope:openxc.ControlCommand)
2526 defaultInstance = new ControlCommand(true);
2527 defaultInstance.initFields();
2530 // @@protoc_insertion_point(class_scope:openxc.ControlCommand)
2533 public interface DiagnosticRequestOrBuilder
2534 extends com.google.protobuf.MessageOrBuilder {
2536 // optional int32 bus = 1;
2538 * <code>optional int32 bus = 1;</code>
2542 * <code>optional int32 bus = 1;</code>
2546 // optional uint32 message_id = 2;
2548 * <code>optional uint32 message_id = 2;</code>
2550 boolean hasMessageId();
2552 * <code>optional uint32 message_id = 2;</code>
2556 // optional uint32 mode = 3;
2558 * <code>optional uint32 mode = 3;</code>
2562 * <code>optional uint32 mode = 3;</code>
2566 // optional uint32 pid = 4;
2568 * <code>optional uint32 pid = 4;</code>
2572 * <code>optional uint32 pid = 4;</code>
2576 // optional bytes payload = 5;
2578 * <code>optional bytes payload = 5;</code>
2581 * TODO we are capping this at 8 bytes for now - need to change when we
2582 * support multi-frame responses
2585 boolean hasPayload();
2587 * <code>optional bytes payload = 5;</code>
2590 * TODO we are capping this at 8 bytes for now - need to change when we
2591 * support multi-frame responses
2594 com.google.protobuf.ByteString getPayload();
2596 // optional bool parse_payload = 6;
2598 * <code>optional bool parse_payload = 6;</code>
2600 boolean hasParsePayload();
2602 * <code>optional bool parse_payload = 6;</code>
2604 boolean getParsePayload();
2606 // optional double factor = 7;
2608 * <code>optional double factor = 7;</code>
2610 boolean hasFactor();
2612 * <code>optional double factor = 7;</code>
2616 // optional double offset = 8;
2618 * <code>optional double offset = 8;</code>
2620 boolean hasOffset();
2622 * <code>optional double offset = 8;</code>
2626 // optional double frequency = 9;
2628 * <code>optional double frequency = 9;</code>
2630 boolean hasFrequency();
2632 * <code>optional double frequency = 9;</code>
2634 double getFrequency();
2637 * Protobuf type {@code openxc.DiagnosticRequest}
2639 public static final class DiagnosticRequest extends
2640 com.google.protobuf.GeneratedMessage
2641 implements DiagnosticRequestOrBuilder {
2642 // Use DiagnosticRequest.newBuilder() to construct.
2643 private DiagnosticRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2645 this.unknownFields = builder.getUnknownFields();
2647 private DiagnosticRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2649 private static final DiagnosticRequest defaultInstance;
2650 public static DiagnosticRequest getDefaultInstance() {
2651 return defaultInstance;
2654 public DiagnosticRequest getDefaultInstanceForType() {
2655 return defaultInstance;
2658 private final com.google.protobuf.UnknownFieldSet unknownFields;
2660 public final com.google.protobuf.UnknownFieldSet
2661 getUnknownFields() {
2662 return this.unknownFields;
2664 private DiagnosticRequest(
2665 com.google.protobuf.CodedInputStream input,
2666 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2667 throws com.google.protobuf.InvalidProtocolBufferException {
2669 int mutable_bitField0_ = 0;
2670 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2671 com.google.protobuf.UnknownFieldSet.newBuilder();
2673 boolean done = false;
2675 int tag = input.readTag();
2681 if (!parseUnknownField(input, unknownFields,
2682 extensionRegistry, tag)) {
2688 bitField0_ |= 0x00000001;
2689 bus_ = input.readInt32();
2693 bitField0_ |= 0x00000002;
2694 messageId_ = input.readUInt32();
2698 bitField0_ |= 0x00000004;
2699 mode_ = input.readUInt32();
2703 bitField0_ |= 0x00000008;
2704 pid_ = input.readUInt32();
2708 bitField0_ |= 0x00000010;
2709 payload_ = input.readBytes();
2713 bitField0_ |= 0x00000020;
2714 parsePayload_ = input.readBool();
2718 bitField0_ |= 0x00000040;
2719 factor_ = input.readDouble();
2723 bitField0_ |= 0x00000080;
2724 offset_ = input.readDouble();
2728 bitField0_ |= 0x00000100;
2729 frequency_ = input.readDouble();
2734 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2735 throw e.setUnfinishedMessage(this);
2736 } catch (java.io.IOException e) {
2737 throw new com.google.protobuf.InvalidProtocolBufferException(
2738 e.getMessage()).setUnfinishedMessage(this);
2740 this.unknownFields = unknownFields.build();
2741 makeExtensionsImmutable();
2744 public static final com.google.protobuf.Descriptors.Descriptor
2746 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
2749 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2750 internalGetFieldAccessorTable() {
2751 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
2752 .ensureFieldAccessorsInitialized(
2753 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
2756 public static com.google.protobuf.Parser<DiagnosticRequest> PARSER =
2757 new com.google.protobuf.AbstractParser<DiagnosticRequest>() {
2758 public DiagnosticRequest parsePartialFrom(
2759 com.google.protobuf.CodedInputStream input,
2760 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2761 throws com.google.protobuf.InvalidProtocolBufferException {
2762 return new DiagnosticRequest(input, extensionRegistry);
2767 public com.google.protobuf.Parser<DiagnosticRequest> getParserForType() {
2771 private int bitField0_;
2772 // optional int32 bus = 1;
2773 public static final int BUS_FIELD_NUMBER = 1;
2776 * <code>optional int32 bus = 1;</code>
2778 public boolean hasBus() {
2779 return ((bitField0_ & 0x00000001) == 0x00000001);
2782 * <code>optional int32 bus = 1;</code>
2784 public int getBus() {
2788 // optional uint32 message_id = 2;
2789 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
2790 private int messageId_;
2792 * <code>optional uint32 message_id = 2;</code>
2794 public boolean hasMessageId() {
2795 return ((bitField0_ & 0x00000002) == 0x00000002);
2798 * <code>optional uint32 message_id = 2;</code>
2800 public int getMessageId() {
2804 // optional uint32 mode = 3;
2805 public static final int MODE_FIELD_NUMBER = 3;
2808 * <code>optional uint32 mode = 3;</code>
2810 public boolean hasMode() {
2811 return ((bitField0_ & 0x00000004) == 0x00000004);
2814 * <code>optional uint32 mode = 3;</code>
2816 public int getMode() {
2820 // optional uint32 pid = 4;
2821 public static final int PID_FIELD_NUMBER = 4;
2824 * <code>optional uint32 pid = 4;</code>
2826 public boolean hasPid() {
2827 return ((bitField0_ & 0x00000008) == 0x00000008);
2830 * <code>optional uint32 pid = 4;</code>
2832 public int getPid() {
2836 // optional bytes payload = 5;
2837 public static final int PAYLOAD_FIELD_NUMBER = 5;
2838 private com.google.protobuf.ByteString payload_;
2840 * <code>optional bytes payload = 5;</code>
2843 * TODO we are capping this at 8 bytes for now - need to change when we
2844 * support multi-frame responses
2847 public boolean hasPayload() {
2848 return ((bitField0_ & 0x00000010) == 0x00000010);
2851 * <code>optional bytes payload = 5;</code>
2854 * TODO we are capping this at 8 bytes for now - need to change when we
2855 * support multi-frame responses
2858 public com.google.protobuf.ByteString getPayload() {
2862 // optional bool parse_payload = 6;
2863 public static final int PARSE_PAYLOAD_FIELD_NUMBER = 6;
2864 private boolean parsePayload_;
2866 * <code>optional bool parse_payload = 6;</code>
2868 public boolean hasParsePayload() {
2869 return ((bitField0_ & 0x00000020) == 0x00000020);
2872 * <code>optional bool parse_payload = 6;</code>
2874 public boolean getParsePayload() {
2875 return parsePayload_;
2878 // optional double factor = 7;
2879 public static final int FACTOR_FIELD_NUMBER = 7;
2880 private double factor_;
2882 * <code>optional double factor = 7;</code>
2884 public boolean hasFactor() {
2885 return ((bitField0_ & 0x00000040) == 0x00000040);
2888 * <code>optional double factor = 7;</code>
2890 public double getFactor() {
2894 // optional double offset = 8;
2895 public static final int OFFSET_FIELD_NUMBER = 8;
2896 private double offset_;
2898 * <code>optional double offset = 8;</code>
2900 public boolean hasOffset() {
2901 return ((bitField0_ & 0x00000080) == 0x00000080);
2904 * <code>optional double offset = 8;</code>
2906 public double getOffset() {
2910 // optional double frequency = 9;
2911 public static final int FREQUENCY_FIELD_NUMBER = 9;
2912 private double frequency_;
2914 * <code>optional double frequency = 9;</code>
2916 public boolean hasFrequency() {
2917 return ((bitField0_ & 0x00000100) == 0x00000100);
2920 * <code>optional double frequency = 9;</code>
2922 public double getFrequency() {
2926 private void initFields() {
2931 payload_ = com.google.protobuf.ByteString.EMPTY;
2932 parsePayload_ = false;
2937 private byte memoizedIsInitialized = -1;
2938 public final boolean isInitialized() {
2939 byte isInitialized = memoizedIsInitialized;
2940 if (isInitialized != -1) return isInitialized == 1;
2942 memoizedIsInitialized = 1;
2946 public void writeTo(com.google.protobuf.CodedOutputStream output)
2947 throws java.io.IOException {
2948 getSerializedSize();
2949 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2950 output.writeInt32(1, bus_);
2952 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2953 output.writeUInt32(2, messageId_);
2955 if (((bitField0_ & 0x00000004) == 0x00000004)) {
2956 output.writeUInt32(3, mode_);
2958 if (((bitField0_ & 0x00000008) == 0x00000008)) {
2959 output.writeUInt32(4, pid_);
2961 if (((bitField0_ & 0x00000010) == 0x00000010)) {
2962 output.writeBytes(5, payload_);
2964 if (((bitField0_ & 0x00000020) == 0x00000020)) {
2965 output.writeBool(6, parsePayload_);
2967 if (((bitField0_ & 0x00000040) == 0x00000040)) {
2968 output.writeDouble(7, factor_);
2970 if (((bitField0_ & 0x00000080) == 0x00000080)) {
2971 output.writeDouble(8, offset_);
2973 if (((bitField0_ & 0x00000100) == 0x00000100)) {
2974 output.writeDouble(9, frequency_);
2976 getUnknownFields().writeTo(output);
2979 private int memoizedSerializedSize = -1;
2980 public int getSerializedSize() {
2981 int size = memoizedSerializedSize;
2982 if (size != -1) return size;
2985 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2986 size += com.google.protobuf.CodedOutputStream
2987 .computeInt32Size(1, bus_);
2989 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2990 size += com.google.protobuf.CodedOutputStream
2991 .computeUInt32Size(2, messageId_);
2993 if (((bitField0_ & 0x00000004) == 0x00000004)) {
2994 size += com.google.protobuf.CodedOutputStream
2995 .computeUInt32Size(3, mode_);
2997 if (((bitField0_ & 0x00000008) == 0x00000008)) {
2998 size += com.google.protobuf.CodedOutputStream
2999 .computeUInt32Size(4, pid_);
3001 if (((bitField0_ & 0x00000010) == 0x00000010)) {
3002 size += com.google.protobuf.CodedOutputStream
3003 .computeBytesSize(5, payload_);
3005 if (((bitField0_ & 0x00000020) == 0x00000020)) {
3006 size += com.google.protobuf.CodedOutputStream
3007 .computeBoolSize(6, parsePayload_);
3009 if (((bitField0_ & 0x00000040) == 0x00000040)) {
3010 size += com.google.protobuf.CodedOutputStream
3011 .computeDoubleSize(7, factor_);
3013 if (((bitField0_ & 0x00000080) == 0x00000080)) {
3014 size += com.google.protobuf.CodedOutputStream
3015 .computeDoubleSize(8, offset_);
3017 if (((bitField0_ & 0x00000100) == 0x00000100)) {
3018 size += com.google.protobuf.CodedOutputStream
3019 .computeDoubleSize(9, frequency_);
3021 size += getUnknownFields().getSerializedSize();
3022 memoizedSerializedSize = size;
3026 private static final long serialVersionUID = 0L;
3028 protected java.lang.Object writeReplace()
3029 throws java.io.ObjectStreamException {
3030 return super.writeReplace();
3033 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3034 com.google.protobuf.ByteString data)
3035 throws com.google.protobuf.InvalidProtocolBufferException {
3036 return PARSER.parseFrom(data);
3038 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3039 com.google.protobuf.ByteString data,
3040 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3041 throws com.google.protobuf.InvalidProtocolBufferException {
3042 return PARSER.parseFrom(data, extensionRegistry);
3044 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(byte[] data)
3045 throws com.google.protobuf.InvalidProtocolBufferException {
3046 return PARSER.parseFrom(data);
3048 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3050 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3051 throws com.google.protobuf.InvalidProtocolBufferException {
3052 return PARSER.parseFrom(data, extensionRegistry);
3054 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(java.io.InputStream input)
3055 throws java.io.IOException {
3056 return PARSER.parseFrom(input);
3058 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3059 java.io.InputStream input,
3060 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3061 throws java.io.IOException {
3062 return PARSER.parseFrom(input, extensionRegistry);
3064 public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(java.io.InputStream input)
3065 throws java.io.IOException {
3066 return PARSER.parseDelimitedFrom(input);
3068 public static com.openxc.BinaryMessages.DiagnosticRequest parseDelimitedFrom(
3069 java.io.InputStream input,
3070 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3071 throws java.io.IOException {
3072 return PARSER.parseDelimitedFrom(input, extensionRegistry);
3074 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3075 com.google.protobuf.CodedInputStream input)
3076 throws java.io.IOException {
3077 return PARSER.parseFrom(input);
3079 public static com.openxc.BinaryMessages.DiagnosticRequest parseFrom(
3080 com.google.protobuf.CodedInputStream input,
3081 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3082 throws java.io.IOException {
3083 return PARSER.parseFrom(input, extensionRegistry);
3086 public static Builder newBuilder() { return Builder.create(); }
3087 public Builder newBuilderForType() { return newBuilder(); }
3088 public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticRequest prototype) {
3089 return newBuilder().mergeFrom(prototype);
3091 public Builder toBuilder() { return newBuilder(this); }
3094 protected Builder newBuilderForType(
3095 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3096 Builder builder = new Builder(parent);
3100 * Protobuf type {@code openxc.DiagnosticRequest}
3102 public static final class Builder extends
3103 com.google.protobuf.GeneratedMessage.Builder<Builder>
3104 implements com.openxc.BinaryMessages.DiagnosticRequestOrBuilder {
3105 public static final com.google.protobuf.Descriptors.Descriptor
3107 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3110 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3111 internalGetFieldAccessorTable() {
3112 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_fieldAccessorTable
3113 .ensureFieldAccessorsInitialized(
3114 com.openxc.BinaryMessages.DiagnosticRequest.class, com.openxc.BinaryMessages.DiagnosticRequest.Builder.class);
3117 // Construct using com.openxc.BinaryMessages.DiagnosticRequest.newBuilder()
3119 maybeForceBuilderInitialization();
3123 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3125 maybeForceBuilderInitialization();
3127 private void maybeForceBuilderInitialization() {
3128 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3131 private static Builder create() {
3132 return new Builder();
3135 public Builder clear() {
3138 bitField0_ = (bitField0_ & ~0x00000001);
3140 bitField0_ = (bitField0_ & ~0x00000002);
3142 bitField0_ = (bitField0_ & ~0x00000004);
3144 bitField0_ = (bitField0_ & ~0x00000008);
3145 payload_ = com.google.protobuf.ByteString.EMPTY;
3146 bitField0_ = (bitField0_ & ~0x00000010);
3147 parsePayload_ = false;
3148 bitField0_ = (bitField0_ & ~0x00000020);
3150 bitField0_ = (bitField0_ & ~0x00000040);
3152 bitField0_ = (bitField0_ & ~0x00000080);
3154 bitField0_ = (bitField0_ & ~0x00000100);
3158 public Builder clone() {
3159 return create().mergeFrom(buildPartial());
3162 public com.google.protobuf.Descriptors.Descriptor
3163 getDescriptorForType() {
3164 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticRequest_descriptor;
3167 public com.openxc.BinaryMessages.DiagnosticRequest getDefaultInstanceForType() {
3168 return com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance();
3171 public com.openxc.BinaryMessages.DiagnosticRequest build() {
3172 com.openxc.BinaryMessages.DiagnosticRequest result = buildPartial();
3173 if (!result.isInitialized()) {
3174 throw newUninitializedMessageException(result);
3179 public com.openxc.BinaryMessages.DiagnosticRequest buildPartial() {
3180 com.openxc.BinaryMessages.DiagnosticRequest result = new com.openxc.BinaryMessages.DiagnosticRequest(this);
3181 int from_bitField0_ = bitField0_;
3182 int to_bitField0_ = 0;
3183 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3184 to_bitField0_ |= 0x00000001;
3187 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3188 to_bitField0_ |= 0x00000002;
3190 result.messageId_ = messageId_;
3191 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
3192 to_bitField0_ |= 0x00000004;
3194 result.mode_ = mode_;
3195 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
3196 to_bitField0_ |= 0x00000008;
3199 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
3200 to_bitField0_ |= 0x00000010;
3202 result.payload_ = payload_;
3203 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
3204 to_bitField0_ |= 0x00000020;
3206 result.parsePayload_ = parsePayload_;
3207 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
3208 to_bitField0_ |= 0x00000040;
3210 result.factor_ = factor_;
3211 if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
3212 to_bitField0_ |= 0x00000080;
3214 result.offset_ = offset_;
3215 if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
3216 to_bitField0_ |= 0x00000100;
3218 result.frequency_ = frequency_;
3219 result.bitField0_ = to_bitField0_;
3224 public Builder mergeFrom(com.google.protobuf.Message other) {
3225 if (other instanceof com.openxc.BinaryMessages.DiagnosticRequest) {
3226 return mergeFrom((com.openxc.BinaryMessages.DiagnosticRequest)other);
3228 super.mergeFrom(other);
3233 public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticRequest other) {
3234 if (other == com.openxc.BinaryMessages.DiagnosticRequest.getDefaultInstance()) return this;
3235 if (other.hasBus()) {
3236 setBus(other.getBus());
3238 if (other.hasMessageId()) {
3239 setMessageId(other.getMessageId());
3241 if (other.hasMode()) {
3242 setMode(other.getMode());
3244 if (other.hasPid()) {
3245 setPid(other.getPid());
3247 if (other.hasPayload()) {
3248 setPayload(other.getPayload());
3250 if (other.hasParsePayload()) {
3251 setParsePayload(other.getParsePayload());
3253 if (other.hasFactor()) {
3254 setFactor(other.getFactor());
3256 if (other.hasOffset()) {
3257 setOffset(other.getOffset());
3259 if (other.hasFrequency()) {
3260 setFrequency(other.getFrequency());
3262 this.mergeUnknownFields(other.getUnknownFields());
3266 public final boolean isInitialized() {
3270 public Builder mergeFrom(
3271 com.google.protobuf.CodedInputStream input,
3272 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3273 throws java.io.IOException {
3274 com.openxc.BinaryMessages.DiagnosticRequest parsedMessage = null;
3276 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3277 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3278 parsedMessage = (com.openxc.BinaryMessages.DiagnosticRequest) e.getUnfinishedMessage();
3281 if (parsedMessage != null) {
3282 mergeFrom(parsedMessage);
3287 private int bitField0_;
3289 // optional int32 bus = 1;
3292 * <code>optional int32 bus = 1;</code>
3294 public boolean hasBus() {
3295 return ((bitField0_ & 0x00000001) == 0x00000001);
3298 * <code>optional int32 bus = 1;</code>
3300 public int getBus() {
3304 * <code>optional int32 bus = 1;</code>
3306 public Builder setBus(int value) {
3307 bitField0_ |= 0x00000001;
3313 * <code>optional int32 bus = 1;</code>
3315 public Builder clearBus() {
3316 bitField0_ = (bitField0_ & ~0x00000001);
3322 // optional uint32 message_id = 2;
3323 private int messageId_ ;
3325 * <code>optional uint32 message_id = 2;</code>
3327 public boolean hasMessageId() {
3328 return ((bitField0_ & 0x00000002) == 0x00000002);
3331 * <code>optional uint32 message_id = 2;</code>
3333 public int getMessageId() {
3337 * <code>optional uint32 message_id = 2;</code>
3339 public Builder setMessageId(int value) {
3340 bitField0_ |= 0x00000002;
3346 * <code>optional uint32 message_id = 2;</code>
3348 public Builder clearMessageId() {
3349 bitField0_ = (bitField0_ & ~0x00000002);
3355 // optional uint32 mode = 3;
3358 * <code>optional uint32 mode = 3;</code>
3360 public boolean hasMode() {
3361 return ((bitField0_ & 0x00000004) == 0x00000004);
3364 * <code>optional uint32 mode = 3;</code>
3366 public int getMode() {
3370 * <code>optional uint32 mode = 3;</code>
3372 public Builder setMode(int value) {
3373 bitField0_ |= 0x00000004;
3379 * <code>optional uint32 mode = 3;</code>
3381 public Builder clearMode() {
3382 bitField0_ = (bitField0_ & ~0x00000004);
3388 // optional uint32 pid = 4;
3391 * <code>optional uint32 pid = 4;</code>
3393 public boolean hasPid() {
3394 return ((bitField0_ & 0x00000008) == 0x00000008);
3397 * <code>optional uint32 pid = 4;</code>
3399 public int getPid() {
3403 * <code>optional uint32 pid = 4;</code>
3405 public Builder setPid(int value) {
3406 bitField0_ |= 0x00000008;
3412 * <code>optional uint32 pid = 4;</code>
3414 public Builder clearPid() {
3415 bitField0_ = (bitField0_ & ~0x00000008);
3421 // optional bytes payload = 5;
3422 private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
3424 * <code>optional bytes payload = 5;</code>
3427 * TODO we are capping this at 8 bytes for now - need to change when we
3428 * support multi-frame responses
3431 public boolean hasPayload() {
3432 return ((bitField0_ & 0x00000010) == 0x00000010);
3435 * <code>optional bytes payload = 5;</code>
3438 * TODO we are capping this at 8 bytes for now - need to change when we
3439 * support multi-frame responses
3442 public com.google.protobuf.ByteString getPayload() {
3446 * <code>optional bytes payload = 5;</code>
3449 * TODO we are capping this at 8 bytes for now - need to change when we
3450 * support multi-frame responses
3453 public Builder setPayload(com.google.protobuf.ByteString value) {
3454 if (value == null) {
3455 throw new NullPointerException();
3457 bitField0_ |= 0x00000010;
3463 * <code>optional bytes payload = 5;</code>
3466 * TODO we are capping this at 8 bytes for now - need to change when we
3467 * support multi-frame responses
3470 public Builder clearPayload() {
3471 bitField0_ = (bitField0_ & ~0x00000010);
3472 payload_ = getDefaultInstance().getPayload();
3477 // optional bool parse_payload = 6;
3478 private boolean parsePayload_ ;
3480 * <code>optional bool parse_payload = 6;</code>
3482 public boolean hasParsePayload() {
3483 return ((bitField0_ & 0x00000020) == 0x00000020);
3486 * <code>optional bool parse_payload = 6;</code>
3488 public boolean getParsePayload() {
3489 return parsePayload_;
3492 * <code>optional bool parse_payload = 6;</code>
3494 public Builder setParsePayload(boolean value) {
3495 bitField0_ |= 0x00000020;
3496 parsePayload_ = value;
3501 * <code>optional bool parse_payload = 6;</code>
3503 public Builder clearParsePayload() {
3504 bitField0_ = (bitField0_ & ~0x00000020);
3505 parsePayload_ = false;
3510 // optional double factor = 7;
3511 private double factor_ ;
3513 * <code>optional double factor = 7;</code>
3515 public boolean hasFactor() {
3516 return ((bitField0_ & 0x00000040) == 0x00000040);
3519 * <code>optional double factor = 7;</code>
3521 public double getFactor() {
3525 * <code>optional double factor = 7;</code>
3527 public Builder setFactor(double value) {
3528 bitField0_ |= 0x00000040;
3534 * <code>optional double factor = 7;</code>
3536 public Builder clearFactor() {
3537 bitField0_ = (bitField0_ & ~0x00000040);
3543 // optional double offset = 8;
3544 private double offset_ ;
3546 * <code>optional double offset = 8;</code>
3548 public boolean hasOffset() {
3549 return ((bitField0_ & 0x00000080) == 0x00000080);
3552 * <code>optional double offset = 8;</code>
3554 public double getOffset() {
3558 * <code>optional double offset = 8;</code>
3560 public Builder setOffset(double value) {
3561 bitField0_ |= 0x00000080;
3567 * <code>optional double offset = 8;</code>
3569 public Builder clearOffset() {
3570 bitField0_ = (bitField0_ & ~0x00000080);
3576 // optional double frequency = 9;
3577 private double frequency_ ;
3579 * <code>optional double frequency = 9;</code>
3581 public boolean hasFrequency() {
3582 return ((bitField0_ & 0x00000100) == 0x00000100);
3585 * <code>optional double frequency = 9;</code>
3587 public double getFrequency() {
3591 * <code>optional double frequency = 9;</code>
3593 public Builder setFrequency(double value) {
3594 bitField0_ |= 0x00000100;
3600 * <code>optional double frequency = 9;</code>
3602 public Builder clearFrequency() {
3603 bitField0_ = (bitField0_ & ~0x00000100);
3609 // @@protoc_insertion_point(builder_scope:openxc.DiagnosticRequest)
3613 defaultInstance = new DiagnosticRequest(true);
3614 defaultInstance.initFields();
3617 // @@protoc_insertion_point(class_scope:openxc.DiagnosticRequest)
3620 public interface DiagnosticResponseOrBuilder
3621 extends com.google.protobuf.MessageOrBuilder {
3623 // optional int32 bus = 1;
3625 * <code>optional int32 bus = 1;</code>
3629 * <code>optional int32 bus = 1;</code>
3633 // optional uint32 message_id = 2;
3635 * <code>optional uint32 message_id = 2;</code>
3637 boolean hasMessageId();
3639 * <code>optional uint32 message_id = 2;</code>
3643 // optional uint32 mode = 3;
3645 * <code>optional uint32 mode = 3;</code>
3649 * <code>optional uint32 mode = 3;</code>
3653 // optional uint32 pid = 4;
3655 * <code>optional uint32 pid = 4;</code>
3659 * <code>optional uint32 pid = 4;</code>
3663 // optional bool success = 5;
3665 * <code>optional bool success = 5;</code>
3667 boolean hasSuccess();
3669 * <code>optional bool success = 5;</code>
3671 boolean getSuccess();
3673 // optional uint32 negative_response_code = 6;
3675 * <code>optional uint32 negative_response_code = 6;</code>
3677 boolean hasNegativeResponseCode();
3679 * <code>optional uint32 negative_response_code = 6;</code>
3681 int getNegativeResponseCode();
3683 // optional bytes payload = 7;
3685 * <code>optional bytes payload = 7;</code>
3688 * TODO we are capping this at 8 bytes for now - need to change when we
3689 * support multi-frame responses
3692 boolean hasPayload();
3694 * <code>optional bytes payload = 7;</code>
3697 * TODO we are capping this at 8 bytes for now - need to change when we
3698 * support multi-frame responses
3701 com.google.protobuf.ByteString getPayload();
3703 // optional double value = 8;
3705 * <code>optional double value = 8;</code>
3709 * <code>optional double value = 8;</code>
3714 * Protobuf type {@code openxc.DiagnosticResponse}
3716 public static final class DiagnosticResponse extends
3717 com.google.protobuf.GeneratedMessage
3718 implements DiagnosticResponseOrBuilder {
3719 // Use DiagnosticResponse.newBuilder() to construct.
3720 private DiagnosticResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3722 this.unknownFields = builder.getUnknownFields();
3724 private DiagnosticResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
3726 private static final DiagnosticResponse defaultInstance;
3727 public static DiagnosticResponse getDefaultInstance() {
3728 return defaultInstance;
3731 public DiagnosticResponse getDefaultInstanceForType() {
3732 return defaultInstance;
3735 private final com.google.protobuf.UnknownFieldSet unknownFields;
3737 public final com.google.protobuf.UnknownFieldSet
3738 getUnknownFields() {
3739 return this.unknownFields;
3741 private DiagnosticResponse(
3742 com.google.protobuf.CodedInputStream input,
3743 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3744 throws com.google.protobuf.InvalidProtocolBufferException {
3746 int mutable_bitField0_ = 0;
3747 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
3748 com.google.protobuf.UnknownFieldSet.newBuilder();
3750 boolean done = false;
3752 int tag = input.readTag();
3758 if (!parseUnknownField(input, unknownFields,
3759 extensionRegistry, tag)) {
3765 bitField0_ |= 0x00000001;
3766 bus_ = input.readInt32();
3770 bitField0_ |= 0x00000002;
3771 messageId_ = input.readUInt32();
3775 bitField0_ |= 0x00000004;
3776 mode_ = input.readUInt32();
3780 bitField0_ |= 0x00000008;
3781 pid_ = input.readUInt32();
3785 bitField0_ |= 0x00000010;
3786 success_ = input.readBool();
3790 bitField0_ |= 0x00000020;
3791 negativeResponseCode_ = input.readUInt32();
3795 bitField0_ |= 0x00000040;
3796 payload_ = input.readBytes();
3800 bitField0_ |= 0x00000080;
3801 value_ = input.readDouble();
3806 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3807 throw e.setUnfinishedMessage(this);
3808 } catch (java.io.IOException e) {
3809 throw new com.google.protobuf.InvalidProtocolBufferException(
3810 e.getMessage()).setUnfinishedMessage(this);
3812 this.unknownFields = unknownFields.build();
3813 makeExtensionsImmutable();
3816 public static final com.google.protobuf.Descriptors.Descriptor
3818 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
3821 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3822 internalGetFieldAccessorTable() {
3823 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
3824 .ensureFieldAccessorsInitialized(
3825 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
3828 public static com.google.protobuf.Parser<DiagnosticResponse> PARSER =
3829 new com.google.protobuf.AbstractParser<DiagnosticResponse>() {
3830 public DiagnosticResponse parsePartialFrom(
3831 com.google.protobuf.CodedInputStream input,
3832 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3833 throws com.google.protobuf.InvalidProtocolBufferException {
3834 return new DiagnosticResponse(input, extensionRegistry);
3839 public com.google.protobuf.Parser<DiagnosticResponse> getParserForType() {
3843 private int bitField0_;
3844 // optional int32 bus = 1;
3845 public static final int BUS_FIELD_NUMBER = 1;
3848 * <code>optional int32 bus = 1;</code>
3850 public boolean hasBus() {
3851 return ((bitField0_ & 0x00000001) == 0x00000001);
3854 * <code>optional int32 bus = 1;</code>
3856 public int getBus() {
3860 // optional uint32 message_id = 2;
3861 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
3862 private int messageId_;
3864 * <code>optional uint32 message_id = 2;</code>
3866 public boolean hasMessageId() {
3867 return ((bitField0_ & 0x00000002) == 0x00000002);
3870 * <code>optional uint32 message_id = 2;</code>
3872 public int getMessageId() {
3876 // optional uint32 mode = 3;
3877 public static final int MODE_FIELD_NUMBER = 3;
3880 * <code>optional uint32 mode = 3;</code>
3882 public boolean hasMode() {
3883 return ((bitField0_ & 0x00000004) == 0x00000004);
3886 * <code>optional uint32 mode = 3;</code>
3888 public int getMode() {
3892 // optional uint32 pid = 4;
3893 public static final int PID_FIELD_NUMBER = 4;
3896 * <code>optional uint32 pid = 4;</code>
3898 public boolean hasPid() {
3899 return ((bitField0_ & 0x00000008) == 0x00000008);
3902 * <code>optional uint32 pid = 4;</code>
3904 public int getPid() {
3908 // optional bool success = 5;
3909 public static final int SUCCESS_FIELD_NUMBER = 5;
3910 private boolean success_;
3912 * <code>optional bool success = 5;</code>
3914 public boolean hasSuccess() {
3915 return ((bitField0_ & 0x00000010) == 0x00000010);
3918 * <code>optional bool success = 5;</code>
3920 public boolean getSuccess() {
3924 // optional uint32 negative_response_code = 6;
3925 public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
3926 private int negativeResponseCode_;
3928 * <code>optional uint32 negative_response_code = 6;</code>
3930 public boolean hasNegativeResponseCode() {
3931 return ((bitField0_ & 0x00000020) == 0x00000020);
3934 * <code>optional uint32 negative_response_code = 6;</code>
3936 public int getNegativeResponseCode() {
3937 return negativeResponseCode_;
3940 // optional bytes payload = 7;
3941 public static final int PAYLOAD_FIELD_NUMBER = 7;
3942 private com.google.protobuf.ByteString payload_;
3944 * <code>optional bytes payload = 7;</code>
3947 * TODO we are capping this at 8 bytes for now - need to change when we
3948 * support multi-frame responses
3951 public boolean hasPayload() {
3952 return ((bitField0_ & 0x00000040) == 0x00000040);
3955 * <code>optional bytes payload = 7;</code>
3958 * TODO we are capping this at 8 bytes for now - need to change when we
3959 * support multi-frame responses
3962 public com.google.protobuf.ByteString getPayload() {
3966 // optional double value = 8;
3967 public static final int VALUE_FIELD_NUMBER = 8;
3968 private double value_;
3970 * <code>optional double value = 8;</code>
3972 public boolean hasValue() {
3973 return ((bitField0_ & 0x00000080) == 0x00000080);
3976 * <code>optional double value = 8;</code>
3978 public double getValue() {
3982 private void initFields() {
3988 negativeResponseCode_ = 0;
3989 payload_ = com.google.protobuf.ByteString.EMPTY;
3992 private byte memoizedIsInitialized = -1;
3993 public final boolean isInitialized() {
3994 byte isInitialized = memoizedIsInitialized;
3995 if (isInitialized != -1) return isInitialized == 1;
3997 memoizedIsInitialized = 1;
4001 public void writeTo(com.google.protobuf.CodedOutputStream output)
4002 throws java.io.IOException {
4003 getSerializedSize();
4004 if (((bitField0_ & 0x00000001) == 0x00000001)) {
4005 output.writeInt32(1, bus_);
4007 if (((bitField0_ & 0x00000002) == 0x00000002)) {
4008 output.writeUInt32(2, messageId_);
4010 if (((bitField0_ & 0x00000004) == 0x00000004)) {
4011 output.writeUInt32(3, mode_);
4013 if (((bitField0_ & 0x00000008) == 0x00000008)) {
4014 output.writeUInt32(4, pid_);
4016 if (((bitField0_ & 0x00000010) == 0x00000010)) {
4017 output.writeBool(5, success_);
4019 if (((bitField0_ & 0x00000020) == 0x00000020)) {
4020 output.writeUInt32(6, negativeResponseCode_);
4022 if (((bitField0_ & 0x00000040) == 0x00000040)) {
4023 output.writeBytes(7, payload_);
4025 if (((bitField0_ & 0x00000080) == 0x00000080)) {
4026 output.writeDouble(8, value_);
4028 getUnknownFields().writeTo(output);
4031 private int memoizedSerializedSize = -1;
4032 public int getSerializedSize() {
4033 int size = memoizedSerializedSize;
4034 if (size != -1) return size;
4037 if (((bitField0_ & 0x00000001) == 0x00000001)) {
4038 size += com.google.protobuf.CodedOutputStream
4039 .computeInt32Size(1, bus_);
4041 if (((bitField0_ & 0x00000002) == 0x00000002)) {
4042 size += com.google.protobuf.CodedOutputStream
4043 .computeUInt32Size(2, messageId_);
4045 if (((bitField0_ & 0x00000004) == 0x00000004)) {
4046 size += com.google.protobuf.CodedOutputStream
4047 .computeUInt32Size(3, mode_);
4049 if (((bitField0_ & 0x00000008) == 0x00000008)) {
4050 size += com.google.protobuf.CodedOutputStream
4051 .computeUInt32Size(4, pid_);
4053 if (((bitField0_ & 0x00000010) == 0x00000010)) {
4054 size += com.google.protobuf.CodedOutputStream
4055 .computeBoolSize(5, success_);
4057 if (((bitField0_ & 0x00000020) == 0x00000020)) {
4058 size += com.google.protobuf.CodedOutputStream
4059 .computeUInt32Size(6, negativeResponseCode_);
4061 if (((bitField0_ & 0x00000040) == 0x00000040)) {
4062 size += com.google.protobuf.CodedOutputStream
4063 .computeBytesSize(7, payload_);
4065 if (((bitField0_ & 0x00000080) == 0x00000080)) {
4066 size += com.google.protobuf.CodedOutputStream
4067 .computeDoubleSize(8, value_);
4069 size += getUnknownFields().getSerializedSize();
4070 memoizedSerializedSize = size;
4074 private static final long serialVersionUID = 0L;
4076 protected java.lang.Object writeReplace()
4077 throws java.io.ObjectStreamException {
4078 return super.writeReplace();
4081 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4082 com.google.protobuf.ByteString data)
4083 throws com.google.protobuf.InvalidProtocolBufferException {
4084 return PARSER.parseFrom(data);
4086 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4087 com.google.protobuf.ByteString data,
4088 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4089 throws com.google.protobuf.InvalidProtocolBufferException {
4090 return PARSER.parseFrom(data, extensionRegistry);
4092 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(byte[] data)
4093 throws com.google.protobuf.InvalidProtocolBufferException {
4094 return PARSER.parseFrom(data);
4096 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4098 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4099 throws com.google.protobuf.InvalidProtocolBufferException {
4100 return PARSER.parseFrom(data, extensionRegistry);
4102 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(java.io.InputStream input)
4103 throws java.io.IOException {
4104 return PARSER.parseFrom(input);
4106 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4107 java.io.InputStream input,
4108 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4109 throws java.io.IOException {
4110 return PARSER.parseFrom(input, extensionRegistry);
4112 public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(java.io.InputStream input)
4113 throws java.io.IOException {
4114 return PARSER.parseDelimitedFrom(input);
4116 public static com.openxc.BinaryMessages.DiagnosticResponse parseDelimitedFrom(
4117 java.io.InputStream input,
4118 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4119 throws java.io.IOException {
4120 return PARSER.parseDelimitedFrom(input, extensionRegistry);
4122 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4123 com.google.protobuf.CodedInputStream input)
4124 throws java.io.IOException {
4125 return PARSER.parseFrom(input);
4127 public static com.openxc.BinaryMessages.DiagnosticResponse parseFrom(
4128 com.google.protobuf.CodedInputStream input,
4129 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4130 throws java.io.IOException {
4131 return PARSER.parseFrom(input, extensionRegistry);
4134 public static Builder newBuilder() { return Builder.create(); }
4135 public Builder newBuilderForType() { return newBuilder(); }
4136 public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticResponse prototype) {
4137 return newBuilder().mergeFrom(prototype);
4139 public Builder toBuilder() { return newBuilder(this); }
4142 protected Builder newBuilderForType(
4143 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4144 Builder builder = new Builder(parent);
4148 * Protobuf type {@code openxc.DiagnosticResponse}
4150 public static final class Builder extends
4151 com.google.protobuf.GeneratedMessage.Builder<Builder>
4152 implements com.openxc.BinaryMessages.DiagnosticResponseOrBuilder {
4153 public static final com.google.protobuf.Descriptors.Descriptor
4155 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4158 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4159 internalGetFieldAccessorTable() {
4160 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_fieldAccessorTable
4161 .ensureFieldAccessorsInitialized(
4162 com.openxc.BinaryMessages.DiagnosticResponse.class, com.openxc.BinaryMessages.DiagnosticResponse.Builder.class);
4165 // Construct using com.openxc.BinaryMessages.DiagnosticResponse.newBuilder()
4167 maybeForceBuilderInitialization();
4171 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
4173 maybeForceBuilderInitialization();
4175 private void maybeForceBuilderInitialization() {
4176 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
4179 private static Builder create() {
4180 return new Builder();
4183 public Builder clear() {
4186 bitField0_ = (bitField0_ & ~0x00000001);
4188 bitField0_ = (bitField0_ & ~0x00000002);
4190 bitField0_ = (bitField0_ & ~0x00000004);
4192 bitField0_ = (bitField0_ & ~0x00000008);
4194 bitField0_ = (bitField0_ & ~0x00000010);
4195 negativeResponseCode_ = 0;
4196 bitField0_ = (bitField0_ & ~0x00000020);
4197 payload_ = com.google.protobuf.ByteString.EMPTY;
4198 bitField0_ = (bitField0_ & ~0x00000040);
4200 bitField0_ = (bitField0_ & ~0x00000080);
4204 public Builder clone() {
4205 return create().mergeFrom(buildPartial());
4208 public com.google.protobuf.Descriptors.Descriptor
4209 getDescriptorForType() {
4210 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticResponse_descriptor;
4213 public com.openxc.BinaryMessages.DiagnosticResponse getDefaultInstanceForType() {
4214 return com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance();
4217 public com.openxc.BinaryMessages.DiagnosticResponse build() {
4218 com.openxc.BinaryMessages.DiagnosticResponse result = buildPartial();
4219 if (!result.isInitialized()) {
4220 throw newUninitializedMessageException(result);
4225 public com.openxc.BinaryMessages.DiagnosticResponse buildPartial() {
4226 com.openxc.BinaryMessages.DiagnosticResponse result = new com.openxc.BinaryMessages.DiagnosticResponse(this);
4227 int from_bitField0_ = bitField0_;
4228 int to_bitField0_ = 0;
4229 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
4230 to_bitField0_ |= 0x00000001;
4233 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
4234 to_bitField0_ |= 0x00000002;
4236 result.messageId_ = messageId_;
4237 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
4238 to_bitField0_ |= 0x00000004;
4240 result.mode_ = mode_;
4241 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
4242 to_bitField0_ |= 0x00000008;
4245 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
4246 to_bitField0_ |= 0x00000010;
4248 result.success_ = success_;
4249 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
4250 to_bitField0_ |= 0x00000020;
4252 result.negativeResponseCode_ = negativeResponseCode_;
4253 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
4254 to_bitField0_ |= 0x00000040;
4256 result.payload_ = payload_;
4257 if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
4258 to_bitField0_ |= 0x00000080;
4260 result.value_ = value_;
4261 result.bitField0_ = to_bitField0_;
4266 public Builder mergeFrom(com.google.protobuf.Message other) {
4267 if (other instanceof com.openxc.BinaryMessages.DiagnosticResponse) {
4268 return mergeFrom((com.openxc.BinaryMessages.DiagnosticResponse)other);
4270 super.mergeFrom(other);
4275 public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticResponse other) {
4276 if (other == com.openxc.BinaryMessages.DiagnosticResponse.getDefaultInstance()) return this;
4277 if (other.hasBus()) {
4278 setBus(other.getBus());
4280 if (other.hasMessageId()) {
4281 setMessageId(other.getMessageId());
4283 if (other.hasMode()) {
4284 setMode(other.getMode());
4286 if (other.hasPid()) {
4287 setPid(other.getPid());
4289 if (other.hasSuccess()) {
4290 setSuccess(other.getSuccess());
4292 if (other.hasNegativeResponseCode()) {
4293 setNegativeResponseCode(other.getNegativeResponseCode());
4295 if (other.hasPayload()) {
4296 setPayload(other.getPayload());
4298 if (other.hasValue()) {
4299 setValue(other.getValue());
4301 this.mergeUnknownFields(other.getUnknownFields());
4305 public final boolean isInitialized() {
4309 public Builder mergeFrom(
4310 com.google.protobuf.CodedInputStream input,
4311 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4312 throws java.io.IOException {
4313 com.openxc.BinaryMessages.DiagnosticResponse parsedMessage = null;
4315 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
4316 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4317 parsedMessage = (com.openxc.BinaryMessages.DiagnosticResponse) e.getUnfinishedMessage();
4320 if (parsedMessage != null) {
4321 mergeFrom(parsedMessage);
4326 private int bitField0_;
4328 // optional int32 bus = 1;
4331 * <code>optional int32 bus = 1;</code>
4333 public boolean hasBus() {
4334 return ((bitField0_ & 0x00000001) == 0x00000001);
4337 * <code>optional int32 bus = 1;</code>
4339 public int getBus() {
4343 * <code>optional int32 bus = 1;</code>
4345 public Builder setBus(int value) {
4346 bitField0_ |= 0x00000001;
4352 * <code>optional int32 bus = 1;</code>
4354 public Builder clearBus() {
4355 bitField0_ = (bitField0_ & ~0x00000001);
4361 // optional uint32 message_id = 2;
4362 private int messageId_ ;
4364 * <code>optional uint32 message_id = 2;</code>
4366 public boolean hasMessageId() {
4367 return ((bitField0_ & 0x00000002) == 0x00000002);
4370 * <code>optional uint32 message_id = 2;</code>
4372 public int getMessageId() {
4376 * <code>optional uint32 message_id = 2;</code>
4378 public Builder setMessageId(int value) {
4379 bitField0_ |= 0x00000002;
4385 * <code>optional uint32 message_id = 2;</code>
4387 public Builder clearMessageId() {
4388 bitField0_ = (bitField0_ & ~0x00000002);
4394 // optional uint32 mode = 3;
4397 * <code>optional uint32 mode = 3;</code>
4399 public boolean hasMode() {
4400 return ((bitField0_ & 0x00000004) == 0x00000004);
4403 * <code>optional uint32 mode = 3;</code>
4405 public int getMode() {
4409 * <code>optional uint32 mode = 3;</code>
4411 public Builder setMode(int value) {
4412 bitField0_ |= 0x00000004;
4418 * <code>optional uint32 mode = 3;</code>
4420 public Builder clearMode() {
4421 bitField0_ = (bitField0_ & ~0x00000004);
4427 // optional uint32 pid = 4;
4430 * <code>optional uint32 pid = 4;</code>
4432 public boolean hasPid() {
4433 return ((bitField0_ & 0x00000008) == 0x00000008);
4436 * <code>optional uint32 pid = 4;</code>
4438 public int getPid() {
4442 * <code>optional uint32 pid = 4;</code>
4444 public Builder setPid(int value) {
4445 bitField0_ |= 0x00000008;
4451 * <code>optional uint32 pid = 4;</code>
4453 public Builder clearPid() {
4454 bitField0_ = (bitField0_ & ~0x00000008);
4460 // optional bool success = 5;
4461 private boolean success_ ;
4463 * <code>optional bool success = 5;</code>
4465 public boolean hasSuccess() {
4466 return ((bitField0_ & 0x00000010) == 0x00000010);
4469 * <code>optional bool success = 5;</code>
4471 public boolean getSuccess() {
4475 * <code>optional bool success = 5;</code>
4477 public Builder setSuccess(boolean value) {
4478 bitField0_ |= 0x00000010;
4484 * <code>optional bool success = 5;</code>
4486 public Builder clearSuccess() {
4487 bitField0_ = (bitField0_ & ~0x00000010);
4493 // optional uint32 negative_response_code = 6;
4494 private int negativeResponseCode_ ;
4496 * <code>optional uint32 negative_response_code = 6;</code>
4498 public boolean hasNegativeResponseCode() {
4499 return ((bitField0_ & 0x00000020) == 0x00000020);
4502 * <code>optional uint32 negative_response_code = 6;</code>
4504 public int getNegativeResponseCode() {
4505 return negativeResponseCode_;
4508 * <code>optional uint32 negative_response_code = 6;</code>
4510 public Builder setNegativeResponseCode(int value) {
4511 bitField0_ |= 0x00000020;
4512 negativeResponseCode_ = value;
4517 * <code>optional uint32 negative_response_code = 6;</code>
4519 public Builder clearNegativeResponseCode() {
4520 bitField0_ = (bitField0_ & ~0x00000020);
4521 negativeResponseCode_ = 0;
4526 // optional bytes payload = 7;
4527 private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
4529 * <code>optional bytes payload = 7;</code>
4532 * TODO we are capping this at 8 bytes for now - need to change when we
4533 * support multi-frame responses
4536 public boolean hasPayload() {
4537 return ((bitField0_ & 0x00000040) == 0x00000040);
4540 * <code>optional bytes payload = 7;</code>
4543 * TODO we are capping this at 8 bytes for now - need to change when we
4544 * support multi-frame responses
4547 public com.google.protobuf.ByteString getPayload() {
4551 * <code>optional bytes payload = 7;</code>
4554 * TODO we are capping this at 8 bytes for now - need to change when we
4555 * support multi-frame responses
4558 public Builder setPayload(com.google.protobuf.ByteString value) {
4559 if (value == null) {
4560 throw new NullPointerException();
4562 bitField0_ |= 0x00000040;
4568 * <code>optional bytes payload = 7;</code>
4571 * TODO we are capping this at 8 bytes for now - need to change when we
4572 * support multi-frame responses
4575 public Builder clearPayload() {
4576 bitField0_ = (bitField0_ & ~0x00000040);
4577 payload_ = getDefaultInstance().getPayload();
4582 // optional double value = 8;
4583 private double value_ ;
4585 * <code>optional double value = 8;</code>
4587 public boolean hasValue() {
4588 return ((bitField0_ & 0x00000080) == 0x00000080);
4591 * <code>optional double value = 8;</code>
4593 public double getValue() {
4597 * <code>optional double value = 8;</code>
4599 public Builder setValue(double value) {
4600 bitField0_ |= 0x00000080;
4606 * <code>optional double value = 8;</code>
4608 public Builder clearValue() {
4609 bitField0_ = (bitField0_ & ~0x00000080);
4615 // @@protoc_insertion_point(builder_scope:openxc.DiagnosticResponse)
4619 defaultInstance = new DiagnosticResponse(true);
4620 defaultInstance.initFields();
4623 // @@protoc_insertion_point(class_scope:openxc.DiagnosticResponse)
4626 public interface TranslatedMessageOrBuilder
4627 extends com.google.protobuf.MessageOrBuilder {
4629 // optional .openxc.TranslatedMessage.Type type = 1;
4631 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4635 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4637 com.openxc.BinaryMessages.TranslatedMessage.Type getType();
4639 // optional string name = 2;
4641 * <code>optional string name = 2;</code>
4645 * <code>optional string name = 2;</code>
4647 java.lang.String getName();
4649 * <code>optional string name = 2;</code>
4651 com.google.protobuf.ByteString
4654 // optional string string_value = 3;
4656 * <code>optional string string_value = 3;</code>
4658 boolean hasStringValue();
4660 * <code>optional string string_value = 3;</code>
4662 java.lang.String getStringValue();
4664 * <code>optional string string_value = 3;</code>
4666 com.google.protobuf.ByteString
4667 getStringValueBytes();
4669 // optional double numeric_value = 4;
4671 * <code>optional double numeric_value = 4;</code>
4673 boolean hasNumericValue();
4675 * <code>optional double numeric_value = 4;</code>
4677 double getNumericValue();
4679 // optional bool boolean_value = 5;
4681 * <code>optional bool boolean_value = 5;</code>
4683 boolean hasBooleanValue();
4685 * <code>optional bool boolean_value = 5;</code>
4687 boolean getBooleanValue();
4689 // optional string string_event = 6;
4691 * <code>optional string string_event = 6;</code>
4693 boolean hasStringEvent();
4695 * <code>optional string string_event = 6;</code>
4697 java.lang.String getStringEvent();
4699 * <code>optional string string_event = 6;</code>
4701 com.google.protobuf.ByteString
4702 getStringEventBytes();
4704 // optional double numeric_event = 7;
4706 * <code>optional double numeric_event = 7;</code>
4708 boolean hasNumericEvent();
4710 * <code>optional double numeric_event = 7;</code>
4712 double getNumericEvent();
4714 // optional bool boolean_event = 8;
4716 * <code>optional bool boolean_event = 8;</code>
4718 boolean hasBooleanEvent();
4720 * <code>optional bool boolean_event = 8;</code>
4722 boolean getBooleanEvent();
4725 * Protobuf type {@code openxc.TranslatedMessage}
4727 public static final class TranslatedMessage extends
4728 com.google.protobuf.GeneratedMessage
4729 implements TranslatedMessageOrBuilder {
4730 // Use TranslatedMessage.newBuilder() to construct.
4731 private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
4733 this.unknownFields = builder.getUnknownFields();
4735 private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
4737 private static final TranslatedMessage defaultInstance;
4738 public static TranslatedMessage getDefaultInstance() {
4739 return defaultInstance;
4742 public TranslatedMessage getDefaultInstanceForType() {
4743 return defaultInstance;
4746 private final com.google.protobuf.UnknownFieldSet unknownFields;
4748 public final com.google.protobuf.UnknownFieldSet
4749 getUnknownFields() {
4750 return this.unknownFields;
4752 private TranslatedMessage(
4753 com.google.protobuf.CodedInputStream input,
4754 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4755 throws com.google.protobuf.InvalidProtocolBufferException {
4757 int mutable_bitField0_ = 0;
4758 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
4759 com.google.protobuf.UnknownFieldSet.newBuilder();
4761 boolean done = false;
4763 int tag = input.readTag();
4769 if (!parseUnknownField(input, unknownFields,
4770 extensionRegistry, tag)) {
4776 int rawValue = input.readEnum();
4777 com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
4778 if (value == null) {
4779 unknownFields.mergeVarintField(1, rawValue);
4781 bitField0_ |= 0x00000001;
4787 bitField0_ |= 0x00000002;
4788 name_ = input.readBytes();
4792 bitField0_ |= 0x00000004;
4793 stringValue_ = input.readBytes();
4797 bitField0_ |= 0x00000008;
4798 numericValue_ = input.readDouble();
4802 bitField0_ |= 0x00000010;
4803 booleanValue_ = input.readBool();
4807 bitField0_ |= 0x00000020;
4808 stringEvent_ = input.readBytes();
4812 bitField0_ |= 0x00000040;
4813 numericEvent_ = input.readDouble();
4817 bitField0_ |= 0x00000080;
4818 booleanEvent_ = input.readBool();
4823 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4824 throw e.setUnfinishedMessage(this);
4825 } catch (java.io.IOException e) {
4826 throw new com.google.protobuf.InvalidProtocolBufferException(
4827 e.getMessage()).setUnfinishedMessage(this);
4829 this.unknownFields = unknownFields.build();
4830 makeExtensionsImmutable();
4833 public static final com.google.protobuf.Descriptors.Descriptor
4835 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
4838 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
4839 internalGetFieldAccessorTable() {
4840 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
4841 .ensureFieldAccessorsInitialized(
4842 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
4845 public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
4846 new com.google.protobuf.AbstractParser<TranslatedMessage>() {
4847 public TranslatedMessage parsePartialFrom(
4848 com.google.protobuf.CodedInputStream input,
4849 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4850 throws com.google.protobuf.InvalidProtocolBufferException {
4851 return new TranslatedMessage(input, extensionRegistry);
4856 public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
4861 * Protobuf enum {@code openxc.TranslatedMessage.Type}
4864 implements com.google.protobuf.ProtocolMessageEnum {
4866 * <code>STRING = 1;</code>
4870 * <code>NUM = 2;</code>
4874 * <code>BOOL = 3;</code>
4878 * <code>EVENTED_STRING = 4;</code>
4880 EVENTED_STRING(3, 4),
4882 * <code>EVENTED_NUM = 5;</code>
4886 * <code>EVENTED_BOOL = 6;</code>
4892 * <code>STRING = 1;</code>
4894 public static final int STRING_VALUE = 1;
4896 * <code>NUM = 2;</code>
4898 public static final int NUM_VALUE = 2;
4900 * <code>BOOL = 3;</code>
4902 public static final int BOOL_VALUE = 3;
4904 * <code>EVENTED_STRING = 4;</code>
4906 public static final int EVENTED_STRING_VALUE = 4;
4908 * <code>EVENTED_NUM = 5;</code>
4910 public static final int EVENTED_NUM_VALUE = 5;
4912 * <code>EVENTED_BOOL = 6;</code>
4914 public static final int EVENTED_BOOL_VALUE = 6;
4917 public final int getNumber() { return value; }
4919 public static Type valueOf(int value) {
4921 case 1: return STRING;
4923 case 3: return BOOL;
4924 case 4: return EVENTED_STRING;
4925 case 5: return EVENTED_NUM;
4926 case 6: return EVENTED_BOOL;
4927 default: return null;
4931 public static com.google.protobuf.Internal.EnumLiteMap<Type>
4932 internalGetValueMap() {
4933 return internalValueMap;
4935 private static com.google.protobuf.Internal.EnumLiteMap<Type>
4937 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
4938 public Type findValueByNumber(int number) {
4939 return Type.valueOf(number);
4943 public final com.google.protobuf.Descriptors.EnumValueDescriptor
4944 getValueDescriptor() {
4945 return getDescriptor().getValues().get(index);
4947 public final com.google.protobuf.Descriptors.EnumDescriptor
4948 getDescriptorForType() {
4949 return getDescriptor();
4951 public static final com.google.protobuf.Descriptors.EnumDescriptor
4953 return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
4956 private static final Type[] VALUES = values();
4958 public static Type valueOf(
4959 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
4960 if (desc.getType() != getDescriptor()) {
4961 throw new java.lang.IllegalArgumentException(
4962 "EnumValueDescriptor is not for this type.");
4964 return VALUES[desc.getIndex()];
4967 private final int index;
4968 private final int value;
4970 private Type(int index, int value) {
4975 // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
4978 private int bitField0_;
4979 // optional .openxc.TranslatedMessage.Type type = 1;
4980 public static final int TYPE_FIELD_NUMBER = 1;
4981 private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
4983 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4985 public boolean hasType() {
4986 return ((bitField0_ & 0x00000001) == 0x00000001);
4989 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
4991 public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
4995 // optional string name = 2;
4996 public static final int NAME_FIELD_NUMBER = 2;
4997 private java.lang.Object name_;
4999 * <code>optional string name = 2;</code>
5001 public boolean hasName() {
5002 return ((bitField0_ & 0x00000002) == 0x00000002);
5005 * <code>optional string name = 2;</code>
5007 public java.lang.String getName() {
5008 java.lang.Object ref = name_;
5009 if (ref instanceof java.lang.String) {
5010 return (java.lang.String) ref;
5012 com.google.protobuf.ByteString bs =
5013 (com.google.protobuf.ByteString) ref;
5014 java.lang.String s = bs.toStringUtf8();
5015 if (bs.isValidUtf8()) {
5022 * <code>optional string name = 2;</code>
5024 public com.google.protobuf.ByteString
5026 java.lang.Object ref = name_;
5027 if (ref instanceof java.lang.String) {
5028 com.google.protobuf.ByteString b =
5029 com.google.protobuf.ByteString.copyFromUtf8(
5030 (java.lang.String) ref);
5034 return (com.google.protobuf.ByteString) ref;
5038 // optional string string_value = 3;
5039 public static final int STRING_VALUE_FIELD_NUMBER = 3;
5040 private java.lang.Object stringValue_;
5042 * <code>optional string string_value = 3;</code>
5044 public boolean hasStringValue() {
5045 return ((bitField0_ & 0x00000004) == 0x00000004);
5048 * <code>optional string string_value = 3;</code>
5050 public java.lang.String getStringValue() {
5051 java.lang.Object ref = stringValue_;
5052 if (ref instanceof java.lang.String) {
5053 return (java.lang.String) ref;
5055 com.google.protobuf.ByteString bs =
5056 (com.google.protobuf.ByteString) ref;
5057 java.lang.String s = bs.toStringUtf8();
5058 if (bs.isValidUtf8()) {
5065 * <code>optional string string_value = 3;</code>
5067 public com.google.protobuf.ByteString
5068 getStringValueBytes() {
5069 java.lang.Object ref = stringValue_;
5070 if (ref instanceof java.lang.String) {
5071 com.google.protobuf.ByteString b =
5072 com.google.protobuf.ByteString.copyFromUtf8(
5073 (java.lang.String) ref);
5077 return (com.google.protobuf.ByteString) ref;
5081 // optional double numeric_value = 4;
5082 public static final int NUMERIC_VALUE_FIELD_NUMBER = 4;
5083 private double numericValue_;
5085 * <code>optional double numeric_value = 4;</code>
5087 public boolean hasNumericValue() {
5088 return ((bitField0_ & 0x00000008) == 0x00000008);
5091 * <code>optional double numeric_value = 4;</code>
5093 public double getNumericValue() {
5094 return numericValue_;
5097 // optional bool boolean_value = 5;
5098 public static final int BOOLEAN_VALUE_FIELD_NUMBER = 5;
5099 private boolean booleanValue_;
5101 * <code>optional bool boolean_value = 5;</code>
5103 public boolean hasBooleanValue() {
5104 return ((bitField0_ & 0x00000010) == 0x00000010);
5107 * <code>optional bool boolean_value = 5;</code>
5109 public boolean getBooleanValue() {
5110 return booleanValue_;
5113 // optional string string_event = 6;
5114 public static final int STRING_EVENT_FIELD_NUMBER = 6;
5115 private java.lang.Object stringEvent_;
5117 * <code>optional string string_event = 6;</code>
5119 public boolean hasStringEvent() {
5120 return ((bitField0_ & 0x00000020) == 0x00000020);
5123 * <code>optional string string_event = 6;</code>
5125 public java.lang.String getStringEvent() {
5126 java.lang.Object ref = stringEvent_;
5127 if (ref instanceof java.lang.String) {
5128 return (java.lang.String) ref;
5130 com.google.protobuf.ByteString bs =
5131 (com.google.protobuf.ByteString) ref;
5132 java.lang.String s = bs.toStringUtf8();
5133 if (bs.isValidUtf8()) {
5140 * <code>optional string string_event = 6;</code>
5142 public com.google.protobuf.ByteString
5143 getStringEventBytes() {
5144 java.lang.Object ref = stringEvent_;
5145 if (ref instanceof java.lang.String) {
5146 com.google.protobuf.ByteString b =
5147 com.google.protobuf.ByteString.copyFromUtf8(
5148 (java.lang.String) ref);
5152 return (com.google.protobuf.ByteString) ref;
5156 // optional double numeric_event = 7;
5157 public static final int NUMERIC_EVENT_FIELD_NUMBER = 7;
5158 private double numericEvent_;
5160 * <code>optional double numeric_event = 7;</code>
5162 public boolean hasNumericEvent() {
5163 return ((bitField0_ & 0x00000040) == 0x00000040);
5166 * <code>optional double numeric_event = 7;</code>
5168 public double getNumericEvent() {
5169 return numericEvent_;
5172 // optional bool boolean_event = 8;
5173 public static final int BOOLEAN_EVENT_FIELD_NUMBER = 8;
5174 private boolean booleanEvent_;
5176 * <code>optional bool boolean_event = 8;</code>
5178 public boolean hasBooleanEvent() {
5179 return ((bitField0_ & 0x00000080) == 0x00000080);
5182 * <code>optional bool boolean_event = 8;</code>
5184 public boolean getBooleanEvent() {
5185 return booleanEvent_;
5188 private void initFields() {
5189 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
5193 booleanValue_ = false;
5196 booleanEvent_ = false;
5198 private byte memoizedIsInitialized = -1;
5199 public final boolean isInitialized() {
5200 byte isInitialized = memoizedIsInitialized;
5201 if (isInitialized != -1) return isInitialized == 1;
5203 memoizedIsInitialized = 1;
5207 public void writeTo(com.google.protobuf.CodedOutputStream output)
5208 throws java.io.IOException {
5209 getSerializedSize();
5210 if (((bitField0_ & 0x00000001) == 0x00000001)) {
5211 output.writeEnum(1, type_.getNumber());
5213 if (((bitField0_ & 0x00000002) == 0x00000002)) {
5214 output.writeBytes(2, getNameBytes());
5216 if (((bitField0_ & 0x00000004) == 0x00000004)) {
5217 output.writeBytes(3, getStringValueBytes());
5219 if (((bitField0_ & 0x00000008) == 0x00000008)) {
5220 output.writeDouble(4, numericValue_);
5222 if (((bitField0_ & 0x00000010) == 0x00000010)) {
5223 output.writeBool(5, booleanValue_);
5225 if (((bitField0_ & 0x00000020) == 0x00000020)) {
5226 output.writeBytes(6, getStringEventBytes());
5228 if (((bitField0_ & 0x00000040) == 0x00000040)) {
5229 output.writeDouble(7, numericEvent_);
5231 if (((bitField0_ & 0x00000080) == 0x00000080)) {
5232 output.writeBool(8, booleanEvent_);
5234 getUnknownFields().writeTo(output);
5237 private int memoizedSerializedSize = -1;
5238 public int getSerializedSize() {
5239 int size = memoizedSerializedSize;
5240 if (size != -1) return size;
5243 if (((bitField0_ & 0x00000001) == 0x00000001)) {
5244 size += com.google.protobuf.CodedOutputStream
5245 .computeEnumSize(1, type_.getNumber());
5247 if (((bitField0_ & 0x00000002) == 0x00000002)) {
5248 size += com.google.protobuf.CodedOutputStream
5249 .computeBytesSize(2, getNameBytes());
5251 if (((bitField0_ & 0x00000004) == 0x00000004)) {
5252 size += com.google.protobuf.CodedOutputStream
5253 .computeBytesSize(3, getStringValueBytes());
5255 if (((bitField0_ & 0x00000008) == 0x00000008)) {
5256 size += com.google.protobuf.CodedOutputStream
5257 .computeDoubleSize(4, numericValue_);
5259 if (((bitField0_ & 0x00000010) == 0x00000010)) {
5260 size += com.google.protobuf.CodedOutputStream
5261 .computeBoolSize(5, booleanValue_);
5263 if (((bitField0_ & 0x00000020) == 0x00000020)) {
5264 size += com.google.protobuf.CodedOutputStream
5265 .computeBytesSize(6, getStringEventBytes());
5267 if (((bitField0_ & 0x00000040) == 0x00000040)) {
5268 size += com.google.protobuf.CodedOutputStream
5269 .computeDoubleSize(7, numericEvent_);
5271 if (((bitField0_ & 0x00000080) == 0x00000080)) {
5272 size += com.google.protobuf.CodedOutputStream
5273 .computeBoolSize(8, booleanEvent_);
5275 size += getUnknownFields().getSerializedSize();
5276 memoizedSerializedSize = size;
5280 private static final long serialVersionUID = 0L;
5282 protected java.lang.Object writeReplace()
5283 throws java.io.ObjectStreamException {
5284 return super.writeReplace();
5287 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5288 com.google.protobuf.ByteString data)
5289 throws com.google.protobuf.InvalidProtocolBufferException {
5290 return PARSER.parseFrom(data);
5292 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5293 com.google.protobuf.ByteString data,
5294 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5295 throws com.google.protobuf.InvalidProtocolBufferException {
5296 return PARSER.parseFrom(data, extensionRegistry);
5298 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
5299 throws com.google.protobuf.InvalidProtocolBufferException {
5300 return PARSER.parseFrom(data);
5302 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5304 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5305 throws com.google.protobuf.InvalidProtocolBufferException {
5306 return PARSER.parseFrom(data, extensionRegistry);
5308 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
5309 throws java.io.IOException {
5310 return PARSER.parseFrom(input);
5312 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5313 java.io.InputStream input,
5314 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5315 throws java.io.IOException {
5316 return PARSER.parseFrom(input, extensionRegistry);
5318 public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
5319 throws java.io.IOException {
5320 return PARSER.parseDelimitedFrom(input);
5322 public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
5323 java.io.InputStream input,
5324 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5325 throws java.io.IOException {
5326 return PARSER.parseDelimitedFrom(input, extensionRegistry);
5328 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5329 com.google.protobuf.CodedInputStream input)
5330 throws java.io.IOException {
5331 return PARSER.parseFrom(input);
5333 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
5334 com.google.protobuf.CodedInputStream input,
5335 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5336 throws java.io.IOException {
5337 return PARSER.parseFrom(input, extensionRegistry);
5340 public static Builder newBuilder() { return Builder.create(); }
5341 public Builder newBuilderForType() { return newBuilder(); }
5342 public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
5343 return newBuilder().mergeFrom(prototype);
5345 public Builder toBuilder() { return newBuilder(this); }
5348 protected Builder newBuilderForType(
5349 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5350 Builder builder = new Builder(parent);
5354 * Protobuf type {@code openxc.TranslatedMessage}
5356 public static final class Builder extends
5357 com.google.protobuf.GeneratedMessage.Builder<Builder>
5358 implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
5359 public static final com.google.protobuf.Descriptors.Descriptor
5361 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
5364 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
5365 internalGetFieldAccessorTable() {
5366 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
5367 .ensureFieldAccessorsInitialized(
5368 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
5371 // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
5373 maybeForceBuilderInitialization();
5377 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
5379 maybeForceBuilderInitialization();
5381 private void maybeForceBuilderInitialization() {
5382 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
5385 private static Builder create() {
5386 return new Builder();
5389 public Builder clear() {
5391 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
5392 bitField0_ = (bitField0_ & ~0x00000001);
5394 bitField0_ = (bitField0_ & ~0x00000002);
5396 bitField0_ = (bitField0_ & ~0x00000004);
5398 bitField0_ = (bitField0_ & ~0x00000008);
5399 booleanValue_ = false;
5400 bitField0_ = (bitField0_ & ~0x00000010);
5402 bitField0_ = (bitField0_ & ~0x00000020);
5404 bitField0_ = (bitField0_ & ~0x00000040);
5405 booleanEvent_ = false;
5406 bitField0_ = (bitField0_ & ~0x00000080);
5410 public Builder clone() {
5411 return create().mergeFrom(buildPartial());
5414 public com.google.protobuf.Descriptors.Descriptor
5415 getDescriptorForType() {
5416 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
5419 public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
5420 return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
5423 public com.openxc.BinaryMessages.TranslatedMessage build() {
5424 com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
5425 if (!result.isInitialized()) {
5426 throw newUninitializedMessageException(result);
5431 public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
5432 com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
5433 int from_bitField0_ = bitField0_;
5434 int to_bitField0_ = 0;
5435 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
5436 to_bitField0_ |= 0x00000001;
5438 result.type_ = type_;
5439 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
5440 to_bitField0_ |= 0x00000002;
5442 result.name_ = name_;
5443 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
5444 to_bitField0_ |= 0x00000004;
5446 result.stringValue_ = stringValue_;
5447 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
5448 to_bitField0_ |= 0x00000008;
5450 result.numericValue_ = numericValue_;
5451 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
5452 to_bitField0_ |= 0x00000010;
5454 result.booleanValue_ = booleanValue_;
5455 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
5456 to_bitField0_ |= 0x00000020;
5458 result.stringEvent_ = stringEvent_;
5459 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
5460 to_bitField0_ |= 0x00000040;
5462 result.numericEvent_ = numericEvent_;
5463 if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
5464 to_bitField0_ |= 0x00000080;
5466 result.booleanEvent_ = booleanEvent_;
5467 result.bitField0_ = to_bitField0_;
5472 public Builder mergeFrom(com.google.protobuf.Message other) {
5473 if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
5474 return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
5476 super.mergeFrom(other);
5481 public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
5482 if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
5483 if (other.hasType()) {
5484 setType(other.getType());
5486 if (other.hasName()) {
5487 bitField0_ |= 0x00000002;
5488 name_ = other.name_;
5491 if (other.hasStringValue()) {
5492 bitField0_ |= 0x00000004;
5493 stringValue_ = other.stringValue_;
5496 if (other.hasNumericValue()) {
5497 setNumericValue(other.getNumericValue());
5499 if (other.hasBooleanValue()) {
5500 setBooleanValue(other.getBooleanValue());
5502 if (other.hasStringEvent()) {
5503 bitField0_ |= 0x00000020;
5504 stringEvent_ = other.stringEvent_;
5507 if (other.hasNumericEvent()) {
5508 setNumericEvent(other.getNumericEvent());
5510 if (other.hasBooleanEvent()) {
5511 setBooleanEvent(other.getBooleanEvent());
5513 this.mergeUnknownFields(other.getUnknownFields());
5517 public final boolean isInitialized() {
5521 public Builder mergeFrom(
5522 com.google.protobuf.CodedInputStream input,
5523 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5524 throws java.io.IOException {
5525 com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
5527 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
5528 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5529 parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
5532 if (parsedMessage != null) {
5533 mergeFrom(parsedMessage);
5538 private int bitField0_;
5540 // optional .openxc.TranslatedMessage.Type type = 1;
5541 private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
5543 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5545 public boolean hasType() {
5546 return ((bitField0_ & 0x00000001) == 0x00000001);
5549 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5551 public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
5555 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5557 public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
5558 if (value == null) {
5559 throw new NullPointerException();
5561 bitField0_ |= 0x00000001;
5567 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
5569 public Builder clearType() {
5570 bitField0_ = (bitField0_ & ~0x00000001);
5571 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
5576 // optional string name = 2;
5577 private java.lang.Object name_ = "";
5579 * <code>optional string name = 2;</code>
5581 public boolean hasName() {
5582 return ((bitField0_ & 0x00000002) == 0x00000002);
5585 * <code>optional string name = 2;</code>
5587 public java.lang.String getName() {
5588 java.lang.Object ref = name_;
5589 if (!(ref instanceof java.lang.String)) {
5590 java.lang.String s = ((com.google.protobuf.ByteString) ref)
5595 return (java.lang.String) ref;
5599 * <code>optional string name = 2;</code>
5601 public com.google.protobuf.ByteString
5603 java.lang.Object ref = name_;
5604 if (ref instanceof String) {
5605 com.google.protobuf.ByteString b =
5606 com.google.protobuf.ByteString.copyFromUtf8(
5607 (java.lang.String) ref);
5611 return (com.google.protobuf.ByteString) ref;
5615 * <code>optional string name = 2;</code>
5617 public Builder setName(
5618 java.lang.String value) {
5619 if (value == null) {
5620 throw new NullPointerException();
5622 bitField0_ |= 0x00000002;
5628 * <code>optional string name = 2;</code>
5630 public Builder clearName() {
5631 bitField0_ = (bitField0_ & ~0x00000002);
5632 name_ = getDefaultInstance().getName();
5637 * <code>optional string name = 2;</code>
5639 public Builder setNameBytes(
5640 com.google.protobuf.ByteString value) {
5641 if (value == null) {
5642 throw new NullPointerException();
5644 bitField0_ |= 0x00000002;
5650 // optional string string_value = 3;
5651 private java.lang.Object stringValue_ = "";
5653 * <code>optional string string_value = 3;</code>
5655 public boolean hasStringValue() {
5656 return ((bitField0_ & 0x00000004) == 0x00000004);
5659 * <code>optional string string_value = 3;</code>
5661 public java.lang.String getStringValue() {
5662 java.lang.Object ref = stringValue_;
5663 if (!(ref instanceof java.lang.String)) {
5664 java.lang.String s = ((com.google.protobuf.ByteString) ref)
5669 return (java.lang.String) ref;
5673 * <code>optional string string_value = 3;</code>
5675 public com.google.protobuf.ByteString
5676 getStringValueBytes() {
5677 java.lang.Object ref = stringValue_;
5678 if (ref instanceof String) {
5679 com.google.protobuf.ByteString b =
5680 com.google.protobuf.ByteString.copyFromUtf8(
5681 (java.lang.String) ref);
5685 return (com.google.protobuf.ByteString) ref;
5689 * <code>optional string string_value = 3;</code>
5691 public Builder setStringValue(
5692 java.lang.String value) {
5693 if (value == null) {
5694 throw new NullPointerException();
5696 bitField0_ |= 0x00000004;
5697 stringValue_ = value;
5702 * <code>optional string string_value = 3;</code>
5704 public Builder clearStringValue() {
5705 bitField0_ = (bitField0_ & ~0x00000004);
5706 stringValue_ = getDefaultInstance().getStringValue();
5711 * <code>optional string string_value = 3;</code>
5713 public Builder setStringValueBytes(
5714 com.google.protobuf.ByteString value) {
5715 if (value == null) {
5716 throw new NullPointerException();
5718 bitField0_ |= 0x00000004;
5719 stringValue_ = value;
5724 // optional double numeric_value = 4;
5725 private double numericValue_ ;
5727 * <code>optional double numeric_value = 4;</code>
5729 public boolean hasNumericValue() {
5730 return ((bitField0_ & 0x00000008) == 0x00000008);
5733 * <code>optional double numeric_value = 4;</code>
5735 public double getNumericValue() {
5736 return numericValue_;
5739 * <code>optional double numeric_value = 4;</code>
5741 public Builder setNumericValue(double value) {
5742 bitField0_ |= 0x00000008;
5743 numericValue_ = value;
5748 * <code>optional double numeric_value = 4;</code>
5750 public Builder clearNumericValue() {
5751 bitField0_ = (bitField0_ & ~0x00000008);
5757 // optional bool boolean_value = 5;
5758 private boolean booleanValue_ ;
5760 * <code>optional bool boolean_value = 5;</code>
5762 public boolean hasBooleanValue() {
5763 return ((bitField0_ & 0x00000010) == 0x00000010);
5766 * <code>optional bool boolean_value = 5;</code>
5768 public boolean getBooleanValue() {
5769 return booleanValue_;
5772 * <code>optional bool boolean_value = 5;</code>
5774 public Builder setBooleanValue(boolean value) {
5775 bitField0_ |= 0x00000010;
5776 booleanValue_ = value;
5781 * <code>optional bool boolean_value = 5;</code>
5783 public Builder clearBooleanValue() {
5784 bitField0_ = (bitField0_ & ~0x00000010);
5785 booleanValue_ = false;
5790 // optional string string_event = 6;
5791 private java.lang.Object stringEvent_ = "";
5793 * <code>optional string string_event = 6;</code>
5795 public boolean hasStringEvent() {
5796 return ((bitField0_ & 0x00000020) == 0x00000020);
5799 * <code>optional string string_event = 6;</code>
5801 public java.lang.String getStringEvent() {
5802 java.lang.Object ref = stringEvent_;
5803 if (!(ref instanceof java.lang.String)) {
5804 java.lang.String s = ((com.google.protobuf.ByteString) ref)
5809 return (java.lang.String) ref;
5813 * <code>optional string string_event = 6;</code>
5815 public com.google.protobuf.ByteString
5816 getStringEventBytes() {
5817 java.lang.Object ref = stringEvent_;
5818 if (ref instanceof String) {
5819 com.google.protobuf.ByteString b =
5820 com.google.protobuf.ByteString.copyFromUtf8(
5821 (java.lang.String) ref);
5825 return (com.google.protobuf.ByteString) ref;
5829 * <code>optional string string_event = 6;</code>
5831 public Builder setStringEvent(
5832 java.lang.String value) {
5833 if (value == null) {
5834 throw new NullPointerException();
5836 bitField0_ |= 0x00000020;
5837 stringEvent_ = value;
5842 * <code>optional string string_event = 6;</code>
5844 public Builder clearStringEvent() {
5845 bitField0_ = (bitField0_ & ~0x00000020);
5846 stringEvent_ = getDefaultInstance().getStringEvent();
5851 * <code>optional string string_event = 6;</code>
5853 public Builder setStringEventBytes(
5854 com.google.protobuf.ByteString value) {
5855 if (value == null) {
5856 throw new NullPointerException();
5858 bitField0_ |= 0x00000020;
5859 stringEvent_ = value;
5864 // optional double numeric_event = 7;
5865 private double numericEvent_ ;
5867 * <code>optional double numeric_event = 7;</code>
5869 public boolean hasNumericEvent() {
5870 return ((bitField0_ & 0x00000040) == 0x00000040);
5873 * <code>optional double numeric_event = 7;</code>
5875 public double getNumericEvent() {
5876 return numericEvent_;
5879 * <code>optional double numeric_event = 7;</code>
5881 public Builder setNumericEvent(double value) {
5882 bitField0_ |= 0x00000040;
5883 numericEvent_ = value;
5888 * <code>optional double numeric_event = 7;</code>
5890 public Builder clearNumericEvent() {
5891 bitField0_ = (bitField0_ & ~0x00000040);
5897 // optional bool boolean_event = 8;
5898 private boolean booleanEvent_ ;
5900 * <code>optional bool boolean_event = 8;</code>
5902 public boolean hasBooleanEvent() {
5903 return ((bitField0_ & 0x00000080) == 0x00000080);
5906 * <code>optional bool boolean_event = 8;</code>
5908 public boolean getBooleanEvent() {
5909 return booleanEvent_;
5912 * <code>optional bool boolean_event = 8;</code>
5914 public Builder setBooleanEvent(boolean value) {
5915 bitField0_ |= 0x00000080;
5916 booleanEvent_ = value;
5921 * <code>optional bool boolean_event = 8;</code>
5923 public Builder clearBooleanEvent() {
5924 bitField0_ = (bitField0_ & ~0x00000080);
5925 booleanEvent_ = false;
5930 // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
5934 defaultInstance = new TranslatedMessage(true);
5935 defaultInstance.initFields();
5938 // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
5941 private static com.google.protobuf.Descriptors.Descriptor
5942 internal_static_openxc_VehicleMessage_descriptor;
5944 com.google.protobuf.GeneratedMessage.FieldAccessorTable
5945 internal_static_openxc_VehicleMessage_fieldAccessorTable;
5946 private static com.google.protobuf.Descriptors.Descriptor
5947 internal_static_openxc_RawMessage_descriptor;
5949 com.google.protobuf.GeneratedMessage.FieldAccessorTable
5950 internal_static_openxc_RawMessage_fieldAccessorTable;
5951 private static com.google.protobuf.Descriptors.Descriptor
5952 internal_static_openxc_ControlCommand_descriptor;
5954 com.google.protobuf.GeneratedMessage.FieldAccessorTable
5955 internal_static_openxc_ControlCommand_fieldAccessorTable;
5956 private static com.google.protobuf.Descriptors.Descriptor
5957 internal_static_openxc_DiagnosticRequest_descriptor;
5959 com.google.protobuf.GeneratedMessage.FieldAccessorTable
5960 internal_static_openxc_DiagnosticRequest_fieldAccessorTable;
5961 private static com.google.protobuf.Descriptors.Descriptor
5962 internal_static_openxc_DiagnosticResponse_descriptor;
5964 com.google.protobuf.GeneratedMessage.FieldAccessorTable
5965 internal_static_openxc_DiagnosticResponse_fieldAccessorTable;
5966 private static com.google.protobuf.Descriptors.Descriptor
5967 internal_static_openxc_TranslatedMessage_descriptor;
5969 com.google.protobuf.GeneratedMessage.FieldAccessorTable
5970 internal_static_openxc_TranslatedMessage_fieldAccessorTable;
5972 public static com.google.protobuf.Descriptors.FileDescriptor
5976 private static com.google.protobuf.Descriptors.FileDescriptor
5979 java.lang.String[] descriptorData = {
5980 "\n\014openxc.proto\022\006openxc\"\313\002\n\016VehicleMessag" +
5981 "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
5982 "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
5983 "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
5984 "xc.TranslatedMessage\0227\n\023diagnostic_respo" +
5985 "nse\030\004 \001(\0132\032.openxc.DiagnosticResponse\022/\n" +
5986 "\017control_command\030\005 \001(\0132\026.openxc.ControlC" +
5987 "ommand\"D\n\004Type\022\007\n\003RAW\020\001\022\016\n\nTRANSLATED\020\002\022" +
5988 "\016\n\nDIAGNOSTIC\020\003\022\023\n\017CONTROL_COMMAND\020\004\";\n\n" +
5989 "RawMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 ",
5990 "\001(\r\022\014\n\004data\030\003 \001(\014\"\246\001\n\016ControlCommand\022)\n\004" +
5991 "type\030\001 \001(\0162\033.openxc.ControlCommand.Type\022" +
5992 "5\n\022diagnostic_request\030\002 \001(\0132\031.openxc.Dia" +
5993 "gnosticRequest\"2\n\004Type\022\013\n\007VERSION\020\001\022\r\n\tD" +
5994 "EVICE_ID\020\002\022\016\n\nDIAGNOSTIC\020\003\"\252\001\n\021Diagnosti" +
5995 "cRequest\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage_id\030\002 \001(" +
5996 "\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007payload\030" +
5997 "\005 \001(\014\022\025\n\rparse_payload\030\006 \001(\010\022\016\n\006factor\030\007" +
5998 " \001(\001\022\016\n\006offset\030\010 \001(\001\022\021\n\tfrequency\030\t \001(\001\"" +
5999 "\241\001\n\022DiagnosticResponse\022\013\n\003bus\030\001 \001(\005\022\022\n\nm",
6000 "essage_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001" +
6001 "(\r\022\017\n\007success\030\005 \001(\010\022\036\n\026negative_response" +
6002 "_code\030\006 \001(\r\022\017\n\007payload\030\007 \001(\014\022\r\n\005value\030\010 " +
6003 "\001(\001\"\265\002\n\021TranslatedMessage\022,\n\004type\030\001 \001(\0162" +
6004 "\036.openxc.TranslatedMessage.Type\022\014\n\004name\030" +
6005 "\002 \001(\t\022\024\n\014string_value\030\003 \001(\t\022\025\n\rnumeric_v" +
6006 "alue\030\004 \001(\001\022\025\n\rboolean_value\030\005 \001(\010\022\024\n\014str" +
6007 "ing_event\030\006 \001(\t\022\025\n\rnumeric_event\030\007 \001(\001\022\025" +
6008 "\n\rboolean_event\030\010 \001(\010\"\\\n\004Type\022\n\n\006STRING\020" +
6009 "\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022\022\n\016EVENTED_STRING\020\004",
6010 "\022\017\n\013EVENTED_NUM\020\005\022\020\n\014EVENTED_BOOL\020\006B\034\n\nc" +
6011 "om.openxcB\016BinaryMessages"
6013 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
6014 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
6015 public com.google.protobuf.ExtensionRegistry assignDescriptors(
6016 com.google.protobuf.Descriptors.FileDescriptor root) {
6018 internal_static_openxc_VehicleMessage_descriptor =
6019 getDescriptor().getMessageTypes().get(0);
6020 internal_static_openxc_VehicleMessage_fieldAccessorTable = new
6021 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
6022 internal_static_openxc_VehicleMessage_descriptor,
6023 new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", "DiagnosticResponse", "ControlCommand", });
6024 internal_static_openxc_RawMessage_descriptor =
6025 getDescriptor().getMessageTypes().get(1);
6026 internal_static_openxc_RawMessage_fieldAccessorTable = new
6027 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
6028 internal_static_openxc_RawMessage_descriptor,
6029 new java.lang.String[] { "Bus", "MessageId", "Data", });
6030 internal_static_openxc_ControlCommand_descriptor =
6031 getDescriptor().getMessageTypes().get(2);
6032 internal_static_openxc_ControlCommand_fieldAccessorTable = new
6033 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
6034 internal_static_openxc_ControlCommand_descriptor,
6035 new java.lang.String[] { "Type", "DiagnosticRequest", });
6036 internal_static_openxc_DiagnosticRequest_descriptor =
6037 getDescriptor().getMessageTypes().get(3);
6038 internal_static_openxc_DiagnosticRequest_fieldAccessorTable = new
6039 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
6040 internal_static_openxc_DiagnosticRequest_descriptor,
6041 new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Payload", "ParsePayload", "Factor", "Offset", "Frequency", });
6042 internal_static_openxc_DiagnosticResponse_descriptor =
6043 getDescriptor().getMessageTypes().get(4);
6044 internal_static_openxc_DiagnosticResponse_fieldAccessorTable = new
6045 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
6046 internal_static_openxc_DiagnosticResponse_descriptor,
6047 new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", "Value", });
6048 internal_static_openxc_TranslatedMessage_descriptor =
6049 getDescriptor().getMessageTypes().get(5);
6050 internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
6051 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
6052 internal_static_openxc_TranslatedMessage_descriptor,
6053 new java.lang.String[] { "Type", "Name", "StringValue", "NumericValue", "BooleanValue", "StringEvent", "NumericEvent", "BooleanEvent", });
6057 com.google.protobuf.Descriptors.FileDescriptor
6058 .internalBuildGeneratedFileFrom(descriptorData,
6059 new com.google.protobuf.Descriptors.FileDescriptor[] {
6063 // @@protoc_insertion_point(outer_class_scope)