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();
53 * Protobuf type {@code openxc.VehicleMessage}
55 public static final class VehicleMessage extends
56 com.google.protobuf.GeneratedMessage
57 implements VehicleMessageOrBuilder {
58 // Use VehicleMessage.newBuilder() to construct.
59 private VehicleMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
61 this.unknownFields = builder.getUnknownFields();
63 private VehicleMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
65 private static final VehicleMessage defaultInstance;
66 public static VehicleMessage getDefaultInstance() {
67 return defaultInstance;
70 public VehicleMessage getDefaultInstanceForType() {
71 return defaultInstance;
74 private final com.google.protobuf.UnknownFieldSet unknownFields;
76 public final com.google.protobuf.UnknownFieldSet
78 return this.unknownFields;
80 private VehicleMessage(
81 com.google.protobuf.CodedInputStream input,
82 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
83 throws com.google.protobuf.InvalidProtocolBufferException {
85 int mutable_bitField0_ = 0;
86 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
87 com.google.protobuf.UnknownFieldSet.newBuilder();
91 int tag = input.readTag();
97 if (!parseUnknownField(input, unknownFields,
98 extensionRegistry, tag)) {
104 int rawValue = input.readEnum();
105 com.openxc.BinaryMessages.VehicleMessage.Type value = com.openxc.BinaryMessages.VehicleMessage.Type.valueOf(rawValue);
107 unknownFields.mergeVarintField(1, rawValue);
109 bitField0_ |= 0x00000001;
115 com.openxc.BinaryMessages.RawMessage.Builder subBuilder = null;
116 if (((bitField0_ & 0x00000002) == 0x00000002)) {
117 subBuilder = rawMessage_.toBuilder();
119 rawMessage_ = input.readMessage(com.openxc.BinaryMessages.RawMessage.PARSER, extensionRegistry);
120 if (subBuilder != null) {
121 subBuilder.mergeFrom(rawMessage_);
122 rawMessage_ = subBuilder.buildPartial();
124 bitField0_ |= 0x00000002;
128 com.openxc.BinaryMessages.TranslatedMessage.Builder subBuilder = null;
129 if (((bitField0_ & 0x00000004) == 0x00000004)) {
130 subBuilder = translatedMessage_.toBuilder();
132 translatedMessage_ = input.readMessage(com.openxc.BinaryMessages.TranslatedMessage.PARSER, extensionRegistry);
133 if (subBuilder != null) {
134 subBuilder.mergeFrom(translatedMessage_);
135 translatedMessage_ = subBuilder.buildPartial();
137 bitField0_ |= 0x00000004;
142 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
143 throw e.setUnfinishedMessage(this);
144 } catch (java.io.IOException e) {
145 throw new com.google.protobuf.InvalidProtocolBufferException(
146 e.getMessage()).setUnfinishedMessage(this);
148 this.unknownFields = unknownFields.build();
149 makeExtensionsImmutable();
152 public static final com.google.protobuf.Descriptors.Descriptor
154 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
157 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
158 internalGetFieldAccessorTable() {
159 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
160 .ensureFieldAccessorsInitialized(
161 com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
164 public static com.google.protobuf.Parser<VehicleMessage> PARSER =
165 new com.google.protobuf.AbstractParser<VehicleMessage>() {
166 public VehicleMessage parsePartialFrom(
167 com.google.protobuf.CodedInputStream input,
168 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
169 throws com.google.protobuf.InvalidProtocolBufferException {
170 return new VehicleMessage(input, extensionRegistry);
175 public com.google.protobuf.Parser<VehicleMessage> getParserForType() {
180 * Protobuf enum {@code openxc.VehicleMessage.Type}
183 implements com.google.protobuf.ProtocolMessageEnum {
185 * <code>RAW = 1;</code>
189 * <code>TRANSLATED = 2;</code>
195 * <code>RAW = 1;</code>
197 public static final int RAW_VALUE = 1;
199 * <code>TRANSLATED = 2;</code>
201 public static final int TRANSLATED_VALUE = 2;
204 public final int getNumber() { return value; }
206 public static Type valueOf(int value) {
209 case 2: return TRANSLATED;
210 default: return null;
214 public static com.google.protobuf.Internal.EnumLiteMap<Type>
215 internalGetValueMap() {
216 return internalValueMap;
218 private static com.google.protobuf.Internal.EnumLiteMap<Type>
220 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
221 public Type findValueByNumber(int number) {
222 return Type.valueOf(number);
226 public final com.google.protobuf.Descriptors.EnumValueDescriptor
227 getValueDescriptor() {
228 return getDescriptor().getValues().get(index);
230 public final com.google.protobuf.Descriptors.EnumDescriptor
231 getDescriptorForType() {
232 return getDescriptor();
234 public static final com.google.protobuf.Descriptors.EnumDescriptor
236 return com.openxc.BinaryMessages.VehicleMessage.getDescriptor().getEnumTypes().get(0);
239 private static final Type[] VALUES = values();
241 public static Type valueOf(
242 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
243 if (desc.getType() != getDescriptor()) {
244 throw new java.lang.IllegalArgumentException(
245 "EnumValueDescriptor is not for this type.");
247 return VALUES[desc.getIndex()];
250 private final int index;
251 private final int value;
253 private Type(int index, int value) {
258 // @@protoc_insertion_point(enum_scope:openxc.VehicleMessage.Type)
261 private int bitField0_;
262 // optional .openxc.VehicleMessage.Type type = 1;
263 public static final int TYPE_FIELD_NUMBER = 1;
264 private com.openxc.BinaryMessages.VehicleMessage.Type type_;
266 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
268 public boolean hasType() {
269 return ((bitField0_ & 0x00000001) == 0x00000001);
272 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
274 public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
278 // optional .openxc.RawMessage raw_message = 2;
279 public static final int RAW_MESSAGE_FIELD_NUMBER = 2;
280 private com.openxc.BinaryMessages.RawMessage rawMessage_;
282 * <code>optional .openxc.RawMessage raw_message = 2;</code>
284 public boolean hasRawMessage() {
285 return ((bitField0_ & 0x00000002) == 0x00000002);
288 * <code>optional .openxc.RawMessage raw_message = 2;</code>
290 public com.openxc.BinaryMessages.RawMessage getRawMessage() {
294 * <code>optional .openxc.RawMessage raw_message = 2;</code>
296 public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
300 // optional .openxc.TranslatedMessage translated_message = 3;
301 public static final int TRANSLATED_MESSAGE_FIELD_NUMBER = 3;
302 private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_;
304 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
306 public boolean hasTranslatedMessage() {
307 return ((bitField0_ & 0x00000004) == 0x00000004);
310 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
312 public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
313 return translatedMessage_;
316 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
318 public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
319 return translatedMessage_;
322 private void initFields() {
323 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
324 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
325 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
327 private byte memoizedIsInitialized = -1;
328 public final boolean isInitialized() {
329 byte isInitialized = memoizedIsInitialized;
330 if (isInitialized != -1) return isInitialized == 1;
332 memoizedIsInitialized = 1;
336 public void writeTo(com.google.protobuf.CodedOutputStream output)
337 throws java.io.IOException {
339 if (((bitField0_ & 0x00000001) == 0x00000001)) {
340 output.writeEnum(1, type_.getNumber());
342 if (((bitField0_ & 0x00000002) == 0x00000002)) {
343 output.writeMessage(2, rawMessage_);
345 if (((bitField0_ & 0x00000004) == 0x00000004)) {
346 output.writeMessage(3, translatedMessage_);
348 getUnknownFields().writeTo(output);
351 private int memoizedSerializedSize = -1;
352 public int getSerializedSize() {
353 int size = memoizedSerializedSize;
354 if (size != -1) return size;
357 if (((bitField0_ & 0x00000001) == 0x00000001)) {
358 size += com.google.protobuf.CodedOutputStream
359 .computeEnumSize(1, type_.getNumber());
361 if (((bitField0_ & 0x00000002) == 0x00000002)) {
362 size += com.google.protobuf.CodedOutputStream
363 .computeMessageSize(2, rawMessage_);
365 if (((bitField0_ & 0x00000004) == 0x00000004)) {
366 size += com.google.protobuf.CodedOutputStream
367 .computeMessageSize(3, translatedMessage_);
369 size += getUnknownFields().getSerializedSize();
370 memoizedSerializedSize = size;
374 private static final long serialVersionUID = 0L;
376 protected java.lang.Object writeReplace()
377 throws java.io.ObjectStreamException {
378 return super.writeReplace();
381 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
382 com.google.protobuf.ByteString data)
383 throws com.google.protobuf.InvalidProtocolBufferException {
384 return PARSER.parseFrom(data);
386 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
387 com.google.protobuf.ByteString data,
388 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
389 throws com.google.protobuf.InvalidProtocolBufferException {
390 return PARSER.parseFrom(data, extensionRegistry);
392 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(byte[] data)
393 throws com.google.protobuf.InvalidProtocolBufferException {
394 return PARSER.parseFrom(data);
396 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
398 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
399 throws com.google.protobuf.InvalidProtocolBufferException {
400 return PARSER.parseFrom(data, extensionRegistry);
402 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(java.io.InputStream input)
403 throws java.io.IOException {
404 return PARSER.parseFrom(input);
406 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
407 java.io.InputStream input,
408 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
409 throws java.io.IOException {
410 return PARSER.parseFrom(input, extensionRegistry);
412 public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(java.io.InputStream input)
413 throws java.io.IOException {
414 return PARSER.parseDelimitedFrom(input);
416 public static com.openxc.BinaryMessages.VehicleMessage parseDelimitedFrom(
417 java.io.InputStream input,
418 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
419 throws java.io.IOException {
420 return PARSER.parseDelimitedFrom(input, extensionRegistry);
422 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
423 com.google.protobuf.CodedInputStream input)
424 throws java.io.IOException {
425 return PARSER.parseFrom(input);
427 public static com.openxc.BinaryMessages.VehicleMessage parseFrom(
428 com.google.protobuf.CodedInputStream input,
429 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
430 throws java.io.IOException {
431 return PARSER.parseFrom(input, extensionRegistry);
434 public static Builder newBuilder() { return Builder.create(); }
435 public Builder newBuilderForType() { return newBuilder(); }
436 public static Builder newBuilder(com.openxc.BinaryMessages.VehicleMessage prototype) {
437 return newBuilder().mergeFrom(prototype);
439 public Builder toBuilder() { return newBuilder(this); }
442 protected Builder newBuilderForType(
443 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
444 Builder builder = new Builder(parent);
448 * Protobuf type {@code openxc.VehicleMessage}
450 public static final class Builder extends
451 com.google.protobuf.GeneratedMessage.Builder<Builder>
452 implements com.openxc.BinaryMessages.VehicleMessageOrBuilder {
453 public static final com.google.protobuf.Descriptors.Descriptor
455 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
458 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
459 internalGetFieldAccessorTable() {
460 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_fieldAccessorTable
461 .ensureFieldAccessorsInitialized(
462 com.openxc.BinaryMessages.VehicleMessage.class, com.openxc.BinaryMessages.VehicleMessage.Builder.class);
465 // Construct using com.openxc.BinaryMessages.VehicleMessage.newBuilder()
467 maybeForceBuilderInitialization();
471 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
473 maybeForceBuilderInitialization();
475 private void maybeForceBuilderInitialization() {
476 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
477 getRawMessageFieldBuilder();
478 getTranslatedMessageFieldBuilder();
481 private static Builder create() {
482 return new Builder();
485 public Builder clear() {
487 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
488 bitField0_ = (bitField0_ & ~0x00000001);
489 if (rawMessageBuilder_ == null) {
490 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
492 rawMessageBuilder_.clear();
494 bitField0_ = (bitField0_ & ~0x00000002);
495 if (translatedMessageBuilder_ == null) {
496 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
498 translatedMessageBuilder_.clear();
500 bitField0_ = (bitField0_ & ~0x00000004);
504 public Builder clone() {
505 return create().mergeFrom(buildPartial());
508 public com.google.protobuf.Descriptors.Descriptor
509 getDescriptorForType() {
510 return com.openxc.BinaryMessages.internal_static_openxc_VehicleMessage_descriptor;
513 public com.openxc.BinaryMessages.VehicleMessage getDefaultInstanceForType() {
514 return com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance();
517 public com.openxc.BinaryMessages.VehicleMessage build() {
518 com.openxc.BinaryMessages.VehicleMessage result = buildPartial();
519 if (!result.isInitialized()) {
520 throw newUninitializedMessageException(result);
525 public com.openxc.BinaryMessages.VehicleMessage buildPartial() {
526 com.openxc.BinaryMessages.VehicleMessage result = new com.openxc.BinaryMessages.VehicleMessage(this);
527 int from_bitField0_ = bitField0_;
528 int to_bitField0_ = 0;
529 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
530 to_bitField0_ |= 0x00000001;
532 result.type_ = type_;
533 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
534 to_bitField0_ |= 0x00000002;
536 if (rawMessageBuilder_ == null) {
537 result.rawMessage_ = rawMessage_;
539 result.rawMessage_ = rawMessageBuilder_.build();
541 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
542 to_bitField0_ |= 0x00000004;
544 if (translatedMessageBuilder_ == null) {
545 result.translatedMessage_ = translatedMessage_;
547 result.translatedMessage_ = translatedMessageBuilder_.build();
549 result.bitField0_ = to_bitField0_;
554 public Builder mergeFrom(com.google.protobuf.Message other) {
555 if (other instanceof com.openxc.BinaryMessages.VehicleMessage) {
556 return mergeFrom((com.openxc.BinaryMessages.VehicleMessage)other);
558 super.mergeFrom(other);
563 public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) {
564 if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this;
565 if (other.hasType()) {
566 setType(other.getType());
568 if (other.hasRawMessage()) {
569 mergeRawMessage(other.getRawMessage());
571 if (other.hasTranslatedMessage()) {
572 mergeTranslatedMessage(other.getTranslatedMessage());
574 this.mergeUnknownFields(other.getUnknownFields());
578 public final boolean isInitialized() {
582 public Builder mergeFrom(
583 com.google.protobuf.CodedInputStream input,
584 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
585 throws java.io.IOException {
586 com.openxc.BinaryMessages.VehicleMessage parsedMessage = null;
588 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
589 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
590 parsedMessage = (com.openxc.BinaryMessages.VehicleMessage) e.getUnfinishedMessage();
593 if (parsedMessage != null) {
594 mergeFrom(parsedMessage);
599 private int bitField0_;
601 // optional .openxc.VehicleMessage.Type type = 1;
602 private com.openxc.BinaryMessages.VehicleMessage.Type type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
604 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
606 public boolean hasType() {
607 return ((bitField0_ & 0x00000001) == 0x00000001);
610 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
612 public com.openxc.BinaryMessages.VehicleMessage.Type getType() {
616 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
618 public Builder setType(com.openxc.BinaryMessages.VehicleMessage.Type value) {
620 throw new NullPointerException();
622 bitField0_ |= 0x00000001;
628 * <code>optional .openxc.VehicleMessage.Type type = 1;</code>
630 public Builder clearType() {
631 bitField0_ = (bitField0_ & ~0x00000001);
632 type_ = com.openxc.BinaryMessages.VehicleMessage.Type.RAW;
637 // optional .openxc.RawMessage raw_message = 2;
638 private com.openxc.BinaryMessages.RawMessage rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
639 private com.google.protobuf.SingleFieldBuilder<
640 com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder> rawMessageBuilder_;
642 * <code>optional .openxc.RawMessage raw_message = 2;</code>
644 public boolean hasRawMessage() {
645 return ((bitField0_ & 0x00000002) == 0x00000002);
648 * <code>optional .openxc.RawMessage raw_message = 2;</code>
650 public com.openxc.BinaryMessages.RawMessage getRawMessage() {
651 if (rawMessageBuilder_ == null) {
654 return rawMessageBuilder_.getMessage();
658 * <code>optional .openxc.RawMessage raw_message = 2;</code>
660 public Builder setRawMessage(com.openxc.BinaryMessages.RawMessage value) {
661 if (rawMessageBuilder_ == null) {
663 throw new NullPointerException();
668 rawMessageBuilder_.setMessage(value);
670 bitField0_ |= 0x00000002;
674 * <code>optional .openxc.RawMessage raw_message = 2;</code>
676 public Builder setRawMessage(
677 com.openxc.BinaryMessages.RawMessage.Builder builderForValue) {
678 if (rawMessageBuilder_ == null) {
679 rawMessage_ = builderForValue.build();
682 rawMessageBuilder_.setMessage(builderForValue.build());
684 bitField0_ |= 0x00000002;
688 * <code>optional .openxc.RawMessage raw_message = 2;</code>
690 public Builder mergeRawMessage(com.openxc.BinaryMessages.RawMessage value) {
691 if (rawMessageBuilder_ == null) {
692 if (((bitField0_ & 0x00000002) == 0x00000002) &&
693 rawMessage_ != com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) {
695 com.openxc.BinaryMessages.RawMessage.newBuilder(rawMessage_).mergeFrom(value).buildPartial();
701 rawMessageBuilder_.mergeFrom(value);
703 bitField0_ |= 0x00000002;
707 * <code>optional .openxc.RawMessage raw_message = 2;</code>
709 public Builder clearRawMessage() {
710 if (rawMessageBuilder_ == null) {
711 rawMessage_ = com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
714 rawMessageBuilder_.clear();
716 bitField0_ = (bitField0_ & ~0x00000002);
720 * <code>optional .openxc.RawMessage raw_message = 2;</code>
722 public com.openxc.BinaryMessages.RawMessage.Builder getRawMessageBuilder() {
723 bitField0_ |= 0x00000002;
725 return getRawMessageFieldBuilder().getBuilder();
728 * <code>optional .openxc.RawMessage raw_message = 2;</code>
730 public com.openxc.BinaryMessages.RawMessageOrBuilder getRawMessageOrBuilder() {
731 if (rawMessageBuilder_ != null) {
732 return rawMessageBuilder_.getMessageOrBuilder();
738 * <code>optional .openxc.RawMessage raw_message = 2;</code>
740 private com.google.protobuf.SingleFieldBuilder<
741 com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>
742 getRawMessageFieldBuilder() {
743 if (rawMessageBuilder_ == null) {
744 rawMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
745 com.openxc.BinaryMessages.RawMessage, com.openxc.BinaryMessages.RawMessage.Builder, com.openxc.BinaryMessages.RawMessageOrBuilder>(
747 getParentForChildren(),
751 return rawMessageBuilder_;
754 // optional .openxc.TranslatedMessage translated_message = 3;
755 private com.openxc.BinaryMessages.TranslatedMessage translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
756 private com.google.protobuf.SingleFieldBuilder<
757 com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder> translatedMessageBuilder_;
759 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
761 public boolean hasTranslatedMessage() {
762 return ((bitField0_ & 0x00000004) == 0x00000004);
765 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
767 public com.openxc.BinaryMessages.TranslatedMessage getTranslatedMessage() {
768 if (translatedMessageBuilder_ == null) {
769 return translatedMessage_;
771 return translatedMessageBuilder_.getMessage();
775 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
777 public Builder setTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
778 if (translatedMessageBuilder_ == null) {
780 throw new NullPointerException();
782 translatedMessage_ = value;
785 translatedMessageBuilder_.setMessage(value);
787 bitField0_ |= 0x00000004;
791 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
793 public Builder setTranslatedMessage(
794 com.openxc.BinaryMessages.TranslatedMessage.Builder builderForValue) {
795 if (translatedMessageBuilder_ == null) {
796 translatedMessage_ = builderForValue.build();
799 translatedMessageBuilder_.setMessage(builderForValue.build());
801 bitField0_ |= 0x00000004;
805 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
807 public Builder mergeTranslatedMessage(com.openxc.BinaryMessages.TranslatedMessage value) {
808 if (translatedMessageBuilder_ == null) {
809 if (((bitField0_ & 0x00000004) == 0x00000004) &&
810 translatedMessage_ != com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) {
812 com.openxc.BinaryMessages.TranslatedMessage.newBuilder(translatedMessage_).mergeFrom(value).buildPartial();
814 translatedMessage_ = value;
818 translatedMessageBuilder_.mergeFrom(value);
820 bitField0_ |= 0x00000004;
824 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
826 public Builder clearTranslatedMessage() {
827 if (translatedMessageBuilder_ == null) {
828 translatedMessage_ = com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
831 translatedMessageBuilder_.clear();
833 bitField0_ = (bitField0_ & ~0x00000004);
837 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
839 public com.openxc.BinaryMessages.TranslatedMessage.Builder getTranslatedMessageBuilder() {
840 bitField0_ |= 0x00000004;
842 return getTranslatedMessageFieldBuilder().getBuilder();
845 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
847 public com.openxc.BinaryMessages.TranslatedMessageOrBuilder getTranslatedMessageOrBuilder() {
848 if (translatedMessageBuilder_ != null) {
849 return translatedMessageBuilder_.getMessageOrBuilder();
851 return translatedMessage_;
855 * <code>optional .openxc.TranslatedMessage translated_message = 3;</code>
857 private com.google.protobuf.SingleFieldBuilder<
858 com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>
859 getTranslatedMessageFieldBuilder() {
860 if (translatedMessageBuilder_ == null) {
861 translatedMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
862 com.openxc.BinaryMessages.TranslatedMessage, com.openxc.BinaryMessages.TranslatedMessage.Builder, com.openxc.BinaryMessages.TranslatedMessageOrBuilder>(
864 getParentForChildren(),
866 translatedMessage_ = null;
868 return translatedMessageBuilder_;
871 // @@protoc_insertion_point(builder_scope:openxc.VehicleMessage)
875 defaultInstance = new VehicleMessage(true);
876 defaultInstance.initFields();
879 // @@protoc_insertion_point(class_scope:openxc.VehicleMessage)
882 public interface RawMessageOrBuilder
883 extends com.google.protobuf.MessageOrBuilder {
885 // optional int32 bus = 1;
887 * <code>optional int32 bus = 1;</code>
891 * <code>optional int32 bus = 1;</code>
895 // optional uint32 message_id = 2;
897 * <code>optional uint32 message_id = 2;</code>
899 boolean hasMessageId();
901 * <code>optional uint32 message_id = 2;</code>
905 // optional uint64 data = 3;
907 * <code>optional uint64 data = 3;</code>
911 * <code>optional uint64 data = 3;</code>
916 * Protobuf type {@code openxc.RawMessage}
918 public static final class RawMessage extends
919 com.google.protobuf.GeneratedMessage
920 implements RawMessageOrBuilder {
921 // Use RawMessage.newBuilder() to construct.
922 private RawMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
924 this.unknownFields = builder.getUnknownFields();
926 private RawMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
928 private static final RawMessage defaultInstance;
929 public static RawMessage getDefaultInstance() {
930 return defaultInstance;
933 public RawMessage getDefaultInstanceForType() {
934 return defaultInstance;
937 private final com.google.protobuf.UnknownFieldSet unknownFields;
939 public final com.google.protobuf.UnknownFieldSet
941 return this.unknownFields;
944 com.google.protobuf.CodedInputStream input,
945 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
946 throws com.google.protobuf.InvalidProtocolBufferException {
948 int mutable_bitField0_ = 0;
949 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
950 com.google.protobuf.UnknownFieldSet.newBuilder();
952 boolean done = false;
954 int tag = input.readTag();
960 if (!parseUnknownField(input, unknownFields,
961 extensionRegistry, tag)) {
967 bitField0_ |= 0x00000001;
968 bus_ = input.readInt32();
972 bitField0_ |= 0x00000002;
973 messageId_ = input.readUInt32();
977 bitField0_ |= 0x00000004;
978 data_ = input.readUInt64();
983 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
984 throw e.setUnfinishedMessage(this);
985 } catch (java.io.IOException e) {
986 throw new com.google.protobuf.InvalidProtocolBufferException(
987 e.getMessage()).setUnfinishedMessage(this);
989 this.unknownFields = unknownFields.build();
990 makeExtensionsImmutable();
993 public static final com.google.protobuf.Descriptors.Descriptor
995 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
998 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
999 internalGetFieldAccessorTable() {
1000 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1001 .ensureFieldAccessorsInitialized(
1002 com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1005 public static com.google.protobuf.Parser<RawMessage> PARSER =
1006 new com.google.protobuf.AbstractParser<RawMessage>() {
1007 public RawMessage parsePartialFrom(
1008 com.google.protobuf.CodedInputStream input,
1009 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1010 throws com.google.protobuf.InvalidProtocolBufferException {
1011 return new RawMessage(input, extensionRegistry);
1016 public com.google.protobuf.Parser<RawMessage> getParserForType() {
1020 private int bitField0_;
1021 // optional int32 bus = 1;
1022 public static final int BUS_FIELD_NUMBER = 1;
1025 * <code>optional int32 bus = 1;</code>
1027 public boolean hasBus() {
1028 return ((bitField0_ & 0x00000001) == 0x00000001);
1031 * <code>optional int32 bus = 1;</code>
1033 public int getBus() {
1037 // optional uint32 message_id = 2;
1038 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1039 private int messageId_;
1041 * <code>optional uint32 message_id = 2;</code>
1043 public boolean hasMessageId() {
1044 return ((bitField0_ & 0x00000002) == 0x00000002);
1047 * <code>optional uint32 message_id = 2;</code>
1049 public int getMessageId() {
1053 // optional uint64 data = 3;
1054 public static final int DATA_FIELD_NUMBER = 3;
1057 * <code>optional uint64 data = 3;</code>
1059 public boolean hasData() {
1060 return ((bitField0_ & 0x00000004) == 0x00000004);
1063 * <code>optional uint64 data = 3;</code>
1065 public long getData() {
1069 private void initFields() {
1074 private byte memoizedIsInitialized = -1;
1075 public final boolean isInitialized() {
1076 byte isInitialized = memoizedIsInitialized;
1077 if (isInitialized != -1) return isInitialized == 1;
1079 memoizedIsInitialized = 1;
1083 public void writeTo(com.google.protobuf.CodedOutputStream output)
1084 throws java.io.IOException {
1085 getSerializedSize();
1086 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1087 output.writeInt32(1, bus_);
1089 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1090 output.writeUInt32(2, messageId_);
1092 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1093 output.writeUInt64(3, data_);
1095 getUnknownFields().writeTo(output);
1098 private int memoizedSerializedSize = -1;
1099 public int getSerializedSize() {
1100 int size = memoizedSerializedSize;
1101 if (size != -1) return size;
1104 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1105 size += com.google.protobuf.CodedOutputStream
1106 .computeInt32Size(1, bus_);
1108 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1109 size += com.google.protobuf.CodedOutputStream
1110 .computeUInt32Size(2, messageId_);
1112 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1113 size += com.google.protobuf.CodedOutputStream
1114 .computeUInt64Size(3, data_);
1116 size += getUnknownFields().getSerializedSize();
1117 memoizedSerializedSize = size;
1121 private static final long serialVersionUID = 0L;
1123 protected java.lang.Object writeReplace()
1124 throws java.io.ObjectStreamException {
1125 return super.writeReplace();
1128 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1129 com.google.protobuf.ByteString data)
1130 throws com.google.protobuf.InvalidProtocolBufferException {
1131 return PARSER.parseFrom(data);
1133 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1134 com.google.protobuf.ByteString data,
1135 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1136 throws com.google.protobuf.InvalidProtocolBufferException {
1137 return PARSER.parseFrom(data, extensionRegistry);
1139 public static com.openxc.BinaryMessages.RawMessage parseFrom(byte[] data)
1140 throws com.google.protobuf.InvalidProtocolBufferException {
1141 return PARSER.parseFrom(data);
1143 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1145 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1146 throws com.google.protobuf.InvalidProtocolBufferException {
1147 return PARSER.parseFrom(data, extensionRegistry);
1149 public static com.openxc.BinaryMessages.RawMessage parseFrom(java.io.InputStream input)
1150 throws java.io.IOException {
1151 return PARSER.parseFrom(input);
1153 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1154 java.io.InputStream input,
1155 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1156 throws java.io.IOException {
1157 return PARSER.parseFrom(input, extensionRegistry);
1159 public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(java.io.InputStream input)
1160 throws java.io.IOException {
1161 return PARSER.parseDelimitedFrom(input);
1163 public static com.openxc.BinaryMessages.RawMessage parseDelimitedFrom(
1164 java.io.InputStream input,
1165 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1166 throws java.io.IOException {
1167 return PARSER.parseDelimitedFrom(input, extensionRegistry);
1169 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1170 com.google.protobuf.CodedInputStream input)
1171 throws java.io.IOException {
1172 return PARSER.parseFrom(input);
1174 public static com.openxc.BinaryMessages.RawMessage parseFrom(
1175 com.google.protobuf.CodedInputStream input,
1176 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1177 throws java.io.IOException {
1178 return PARSER.parseFrom(input, extensionRegistry);
1181 public static Builder newBuilder() { return Builder.create(); }
1182 public Builder newBuilderForType() { return newBuilder(); }
1183 public static Builder newBuilder(com.openxc.BinaryMessages.RawMessage prototype) {
1184 return newBuilder().mergeFrom(prototype);
1186 public Builder toBuilder() { return newBuilder(this); }
1189 protected Builder newBuilderForType(
1190 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1191 Builder builder = new Builder(parent);
1195 * Protobuf type {@code openxc.RawMessage}
1197 public static final class Builder extends
1198 com.google.protobuf.GeneratedMessage.Builder<Builder>
1199 implements com.openxc.BinaryMessages.RawMessageOrBuilder {
1200 public static final com.google.protobuf.Descriptors.Descriptor
1202 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1205 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1206 internalGetFieldAccessorTable() {
1207 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_fieldAccessorTable
1208 .ensureFieldAccessorsInitialized(
1209 com.openxc.BinaryMessages.RawMessage.class, com.openxc.BinaryMessages.RawMessage.Builder.class);
1212 // Construct using com.openxc.BinaryMessages.RawMessage.newBuilder()
1214 maybeForceBuilderInitialization();
1218 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1220 maybeForceBuilderInitialization();
1222 private void maybeForceBuilderInitialization() {
1223 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1226 private static Builder create() {
1227 return new Builder();
1230 public Builder clear() {
1233 bitField0_ = (bitField0_ & ~0x00000001);
1235 bitField0_ = (bitField0_ & ~0x00000002);
1237 bitField0_ = (bitField0_ & ~0x00000004);
1241 public Builder clone() {
1242 return create().mergeFrom(buildPartial());
1245 public com.google.protobuf.Descriptors.Descriptor
1246 getDescriptorForType() {
1247 return com.openxc.BinaryMessages.internal_static_openxc_RawMessage_descriptor;
1250 public com.openxc.BinaryMessages.RawMessage getDefaultInstanceForType() {
1251 return com.openxc.BinaryMessages.RawMessage.getDefaultInstance();
1254 public com.openxc.BinaryMessages.RawMessage build() {
1255 com.openxc.BinaryMessages.RawMessage result = buildPartial();
1256 if (!result.isInitialized()) {
1257 throw newUninitializedMessageException(result);
1262 public com.openxc.BinaryMessages.RawMessage buildPartial() {
1263 com.openxc.BinaryMessages.RawMessage result = new com.openxc.BinaryMessages.RawMessage(this);
1264 int from_bitField0_ = bitField0_;
1265 int to_bitField0_ = 0;
1266 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
1267 to_bitField0_ |= 0x00000001;
1270 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
1271 to_bitField0_ |= 0x00000002;
1273 result.messageId_ = messageId_;
1274 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
1275 to_bitField0_ |= 0x00000004;
1277 result.data_ = data_;
1278 result.bitField0_ = to_bitField0_;
1283 public Builder mergeFrom(com.google.protobuf.Message other) {
1284 if (other instanceof com.openxc.BinaryMessages.RawMessage) {
1285 return mergeFrom((com.openxc.BinaryMessages.RawMessage)other);
1287 super.mergeFrom(other);
1292 public Builder mergeFrom(com.openxc.BinaryMessages.RawMessage other) {
1293 if (other == com.openxc.BinaryMessages.RawMessage.getDefaultInstance()) return this;
1294 if (other.hasBus()) {
1295 setBus(other.getBus());
1297 if (other.hasMessageId()) {
1298 setMessageId(other.getMessageId());
1300 if (other.hasData()) {
1301 setData(other.getData());
1303 this.mergeUnknownFields(other.getUnknownFields());
1307 public final boolean isInitialized() {
1311 public Builder mergeFrom(
1312 com.google.protobuf.CodedInputStream input,
1313 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1314 throws java.io.IOException {
1315 com.openxc.BinaryMessages.RawMessage parsedMessage = null;
1317 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
1318 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1319 parsedMessage = (com.openxc.BinaryMessages.RawMessage) e.getUnfinishedMessage();
1322 if (parsedMessage != null) {
1323 mergeFrom(parsedMessage);
1328 private int bitField0_;
1330 // optional int32 bus = 1;
1333 * <code>optional int32 bus = 1;</code>
1335 public boolean hasBus() {
1336 return ((bitField0_ & 0x00000001) == 0x00000001);
1339 * <code>optional int32 bus = 1;</code>
1341 public int getBus() {
1345 * <code>optional int32 bus = 1;</code>
1347 public Builder setBus(int value) {
1348 bitField0_ |= 0x00000001;
1354 * <code>optional int32 bus = 1;</code>
1356 public Builder clearBus() {
1357 bitField0_ = (bitField0_ & ~0x00000001);
1363 // optional uint32 message_id = 2;
1364 private int messageId_ ;
1366 * <code>optional uint32 message_id = 2;</code>
1368 public boolean hasMessageId() {
1369 return ((bitField0_ & 0x00000002) == 0x00000002);
1372 * <code>optional uint32 message_id = 2;</code>
1374 public int getMessageId() {
1378 * <code>optional uint32 message_id = 2;</code>
1380 public Builder setMessageId(int value) {
1381 bitField0_ |= 0x00000002;
1387 * <code>optional uint32 message_id = 2;</code>
1389 public Builder clearMessageId() {
1390 bitField0_ = (bitField0_ & ~0x00000002);
1396 // optional uint64 data = 3;
1397 private long data_ ;
1399 * <code>optional uint64 data = 3;</code>
1401 public boolean hasData() {
1402 return ((bitField0_ & 0x00000004) == 0x00000004);
1405 * <code>optional uint64 data = 3;</code>
1407 public long getData() {
1411 * <code>optional uint64 data = 3;</code>
1413 public Builder setData(long value) {
1414 bitField0_ |= 0x00000004;
1420 * <code>optional uint64 data = 3;</code>
1422 public Builder clearData() {
1423 bitField0_ = (bitField0_ & ~0x00000004);
1429 // @@protoc_insertion_point(builder_scope:openxc.RawMessage)
1433 defaultInstance = new RawMessage(true);
1434 defaultInstance.initFields();
1437 // @@protoc_insertion_point(class_scope:openxc.RawMessage)
1440 public interface DiagnosticMessageOrBuilder
1441 extends com.google.protobuf.MessageOrBuilder {
1443 // optional int32 bus = 1;
1445 * <code>optional int32 bus = 1;</code>
1449 * <code>optional int32 bus = 1;</code>
1453 // optional uint32 message_id = 2;
1455 * <code>optional uint32 message_id = 2;</code>
1457 boolean hasMessageId();
1459 * <code>optional uint32 message_id = 2;</code>
1463 // optional uint32 mode = 3;
1465 * <code>optional uint32 mode = 3;</code>
1469 * <code>optional uint32 mode = 3;</code>
1473 // optional uint32 pid = 4;
1475 * <code>optional uint32 pid = 4;</code>
1479 * <code>optional uint32 pid = 4;</code>
1483 // optional bool success = 5;
1485 * <code>optional bool success = 5;</code>
1487 boolean hasSuccess();
1489 * <code>optional bool success = 5;</code>
1491 boolean getSuccess();
1493 // optional uint32 negative_response_code = 6;
1495 * <code>optional uint32 negative_response_code = 6;</code>
1497 boolean hasNegativeResponseCode();
1499 * <code>optional uint32 negative_response_code = 6;</code>
1501 int getNegativeResponseCode();
1503 // optional bytes payload = 7;
1505 * <code>optional bytes payload = 7;</code>
1508 * TODO we are capping this at 8 bytes for now - need to change when we
1509 * support multi-frame responses
1512 boolean hasPayload();
1514 * <code>optional bytes payload = 7;</code>
1517 * TODO we are capping this at 8 bytes for now - need to change when we
1518 * support multi-frame responses
1521 com.google.protobuf.ByteString getPayload();
1524 * Protobuf type {@code openxc.DiagnosticMessage}
1526 public static final class DiagnosticMessage extends
1527 com.google.protobuf.GeneratedMessage
1528 implements DiagnosticMessageOrBuilder {
1529 // Use DiagnosticMessage.newBuilder() to construct.
1530 private DiagnosticMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1532 this.unknownFields = builder.getUnknownFields();
1534 private DiagnosticMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
1536 private static final DiagnosticMessage defaultInstance;
1537 public static DiagnosticMessage getDefaultInstance() {
1538 return defaultInstance;
1541 public DiagnosticMessage getDefaultInstanceForType() {
1542 return defaultInstance;
1545 private final com.google.protobuf.UnknownFieldSet unknownFields;
1547 public final com.google.protobuf.UnknownFieldSet
1548 getUnknownFields() {
1549 return this.unknownFields;
1551 private DiagnosticMessage(
1552 com.google.protobuf.CodedInputStream input,
1553 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1554 throws com.google.protobuf.InvalidProtocolBufferException {
1556 int mutable_bitField0_ = 0;
1557 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1558 com.google.protobuf.UnknownFieldSet.newBuilder();
1560 boolean done = false;
1562 int tag = input.readTag();
1568 if (!parseUnknownField(input, unknownFields,
1569 extensionRegistry, tag)) {
1575 bitField0_ |= 0x00000001;
1576 bus_ = input.readInt32();
1580 bitField0_ |= 0x00000002;
1581 messageId_ = input.readUInt32();
1585 bitField0_ |= 0x00000004;
1586 mode_ = input.readUInt32();
1590 bitField0_ |= 0x00000008;
1591 pid_ = input.readUInt32();
1595 bitField0_ |= 0x00000010;
1596 success_ = input.readBool();
1600 bitField0_ |= 0x00000020;
1601 negativeResponseCode_ = input.readUInt32();
1605 bitField0_ |= 0x00000040;
1606 payload_ = input.readBytes();
1611 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1612 throw e.setUnfinishedMessage(this);
1613 } catch (java.io.IOException e) {
1614 throw new com.google.protobuf.InvalidProtocolBufferException(
1615 e.getMessage()).setUnfinishedMessage(this);
1617 this.unknownFields = unknownFields.build();
1618 makeExtensionsImmutable();
1621 public static final com.google.protobuf.Descriptors.Descriptor
1623 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor;
1626 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1627 internalGetFieldAccessorTable() {
1628 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable
1629 .ensureFieldAccessorsInitialized(
1630 com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class);
1633 public static com.google.protobuf.Parser<DiagnosticMessage> PARSER =
1634 new com.google.protobuf.AbstractParser<DiagnosticMessage>() {
1635 public DiagnosticMessage parsePartialFrom(
1636 com.google.protobuf.CodedInputStream input,
1637 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1638 throws com.google.protobuf.InvalidProtocolBufferException {
1639 return new DiagnosticMessage(input, extensionRegistry);
1644 public com.google.protobuf.Parser<DiagnosticMessage> getParserForType() {
1648 private int bitField0_;
1649 // optional int32 bus = 1;
1650 public static final int BUS_FIELD_NUMBER = 1;
1653 * <code>optional int32 bus = 1;</code>
1655 public boolean hasBus() {
1656 return ((bitField0_ & 0x00000001) == 0x00000001);
1659 * <code>optional int32 bus = 1;</code>
1661 public int getBus() {
1665 // optional uint32 message_id = 2;
1666 public static final int MESSAGE_ID_FIELD_NUMBER = 2;
1667 private int messageId_;
1669 * <code>optional uint32 message_id = 2;</code>
1671 public boolean hasMessageId() {
1672 return ((bitField0_ & 0x00000002) == 0x00000002);
1675 * <code>optional uint32 message_id = 2;</code>
1677 public int getMessageId() {
1681 // optional uint32 mode = 3;
1682 public static final int MODE_FIELD_NUMBER = 3;
1685 * <code>optional uint32 mode = 3;</code>
1687 public boolean hasMode() {
1688 return ((bitField0_ & 0x00000004) == 0x00000004);
1691 * <code>optional uint32 mode = 3;</code>
1693 public int getMode() {
1697 // optional uint32 pid = 4;
1698 public static final int PID_FIELD_NUMBER = 4;
1701 * <code>optional uint32 pid = 4;</code>
1703 public boolean hasPid() {
1704 return ((bitField0_ & 0x00000008) == 0x00000008);
1707 * <code>optional uint32 pid = 4;</code>
1709 public int getPid() {
1713 // optional bool success = 5;
1714 public static final int SUCCESS_FIELD_NUMBER = 5;
1715 private boolean success_;
1717 * <code>optional bool success = 5;</code>
1719 public boolean hasSuccess() {
1720 return ((bitField0_ & 0x00000010) == 0x00000010);
1723 * <code>optional bool success = 5;</code>
1725 public boolean getSuccess() {
1729 // optional uint32 negative_response_code = 6;
1730 public static final int NEGATIVE_RESPONSE_CODE_FIELD_NUMBER = 6;
1731 private int negativeResponseCode_;
1733 * <code>optional uint32 negative_response_code = 6;</code>
1735 public boolean hasNegativeResponseCode() {
1736 return ((bitField0_ & 0x00000020) == 0x00000020);
1739 * <code>optional uint32 negative_response_code = 6;</code>
1741 public int getNegativeResponseCode() {
1742 return negativeResponseCode_;
1745 // optional bytes payload = 7;
1746 public static final int PAYLOAD_FIELD_NUMBER = 7;
1747 private com.google.protobuf.ByteString payload_;
1749 * <code>optional bytes payload = 7;</code>
1752 * TODO we are capping this at 8 bytes for now - need to change when we
1753 * support multi-frame responses
1756 public boolean hasPayload() {
1757 return ((bitField0_ & 0x00000040) == 0x00000040);
1760 * <code>optional bytes payload = 7;</code>
1763 * TODO we are capping this at 8 bytes for now - need to change when we
1764 * support multi-frame responses
1767 public com.google.protobuf.ByteString getPayload() {
1771 private void initFields() {
1777 negativeResponseCode_ = 0;
1778 payload_ = com.google.protobuf.ByteString.EMPTY;
1780 private byte memoizedIsInitialized = -1;
1781 public final boolean isInitialized() {
1782 byte isInitialized = memoizedIsInitialized;
1783 if (isInitialized != -1) return isInitialized == 1;
1785 memoizedIsInitialized = 1;
1789 public void writeTo(com.google.protobuf.CodedOutputStream output)
1790 throws java.io.IOException {
1791 getSerializedSize();
1792 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1793 output.writeInt32(1, bus_);
1795 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1796 output.writeUInt32(2, messageId_);
1798 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1799 output.writeUInt32(3, mode_);
1801 if (((bitField0_ & 0x00000008) == 0x00000008)) {
1802 output.writeUInt32(4, pid_);
1804 if (((bitField0_ & 0x00000010) == 0x00000010)) {
1805 output.writeBool(5, success_);
1807 if (((bitField0_ & 0x00000020) == 0x00000020)) {
1808 output.writeUInt32(6, negativeResponseCode_);
1810 if (((bitField0_ & 0x00000040) == 0x00000040)) {
1811 output.writeBytes(7, payload_);
1813 getUnknownFields().writeTo(output);
1816 private int memoizedSerializedSize = -1;
1817 public int getSerializedSize() {
1818 int size = memoizedSerializedSize;
1819 if (size != -1) return size;
1822 if (((bitField0_ & 0x00000001) == 0x00000001)) {
1823 size += com.google.protobuf.CodedOutputStream
1824 .computeInt32Size(1, bus_);
1826 if (((bitField0_ & 0x00000002) == 0x00000002)) {
1827 size += com.google.protobuf.CodedOutputStream
1828 .computeUInt32Size(2, messageId_);
1830 if (((bitField0_ & 0x00000004) == 0x00000004)) {
1831 size += com.google.protobuf.CodedOutputStream
1832 .computeUInt32Size(3, mode_);
1834 if (((bitField0_ & 0x00000008) == 0x00000008)) {
1835 size += com.google.protobuf.CodedOutputStream
1836 .computeUInt32Size(4, pid_);
1838 if (((bitField0_ & 0x00000010) == 0x00000010)) {
1839 size += com.google.protobuf.CodedOutputStream
1840 .computeBoolSize(5, success_);
1842 if (((bitField0_ & 0x00000020) == 0x00000020)) {
1843 size += com.google.protobuf.CodedOutputStream
1844 .computeUInt32Size(6, negativeResponseCode_);
1846 if (((bitField0_ & 0x00000040) == 0x00000040)) {
1847 size += com.google.protobuf.CodedOutputStream
1848 .computeBytesSize(7, payload_);
1850 size += getUnknownFields().getSerializedSize();
1851 memoizedSerializedSize = size;
1855 private static final long serialVersionUID = 0L;
1857 protected java.lang.Object writeReplace()
1858 throws java.io.ObjectStreamException {
1859 return super.writeReplace();
1862 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1863 com.google.protobuf.ByteString data)
1864 throws com.google.protobuf.InvalidProtocolBufferException {
1865 return PARSER.parseFrom(data);
1867 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1868 com.google.protobuf.ByteString data,
1869 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1870 throws com.google.protobuf.InvalidProtocolBufferException {
1871 return PARSER.parseFrom(data, extensionRegistry);
1873 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(byte[] data)
1874 throws com.google.protobuf.InvalidProtocolBufferException {
1875 return PARSER.parseFrom(data);
1877 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1879 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1880 throws com.google.protobuf.InvalidProtocolBufferException {
1881 return PARSER.parseFrom(data, extensionRegistry);
1883 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(java.io.InputStream input)
1884 throws java.io.IOException {
1885 return PARSER.parseFrom(input);
1887 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1888 java.io.InputStream input,
1889 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1890 throws java.io.IOException {
1891 return PARSER.parseFrom(input, extensionRegistry);
1893 public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom(java.io.InputStream input)
1894 throws java.io.IOException {
1895 return PARSER.parseDelimitedFrom(input);
1897 public static com.openxc.BinaryMessages.DiagnosticMessage parseDelimitedFrom(
1898 java.io.InputStream input,
1899 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1900 throws java.io.IOException {
1901 return PARSER.parseDelimitedFrom(input, extensionRegistry);
1903 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1904 com.google.protobuf.CodedInputStream input)
1905 throws java.io.IOException {
1906 return PARSER.parseFrom(input);
1908 public static com.openxc.BinaryMessages.DiagnosticMessage parseFrom(
1909 com.google.protobuf.CodedInputStream input,
1910 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1911 throws java.io.IOException {
1912 return PARSER.parseFrom(input, extensionRegistry);
1915 public static Builder newBuilder() { return Builder.create(); }
1916 public Builder newBuilderForType() { return newBuilder(); }
1917 public static Builder newBuilder(com.openxc.BinaryMessages.DiagnosticMessage prototype) {
1918 return newBuilder().mergeFrom(prototype);
1920 public Builder toBuilder() { return newBuilder(this); }
1923 protected Builder newBuilderForType(
1924 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1925 Builder builder = new Builder(parent);
1929 * Protobuf type {@code openxc.DiagnosticMessage}
1931 public static final class Builder extends
1932 com.google.protobuf.GeneratedMessage.Builder<Builder>
1933 implements com.openxc.BinaryMessages.DiagnosticMessageOrBuilder {
1934 public static final com.google.protobuf.Descriptors.Descriptor
1936 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor;
1939 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
1940 internalGetFieldAccessorTable() {
1941 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_fieldAccessorTable
1942 .ensureFieldAccessorsInitialized(
1943 com.openxc.BinaryMessages.DiagnosticMessage.class, com.openxc.BinaryMessages.DiagnosticMessage.Builder.class);
1946 // Construct using com.openxc.BinaryMessages.DiagnosticMessage.newBuilder()
1948 maybeForceBuilderInitialization();
1952 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
1954 maybeForceBuilderInitialization();
1956 private void maybeForceBuilderInitialization() {
1957 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
1960 private static Builder create() {
1961 return new Builder();
1964 public Builder clear() {
1967 bitField0_ = (bitField0_ & ~0x00000001);
1969 bitField0_ = (bitField0_ & ~0x00000002);
1971 bitField0_ = (bitField0_ & ~0x00000004);
1973 bitField0_ = (bitField0_ & ~0x00000008);
1975 bitField0_ = (bitField0_ & ~0x00000010);
1976 negativeResponseCode_ = 0;
1977 bitField0_ = (bitField0_ & ~0x00000020);
1978 payload_ = com.google.protobuf.ByteString.EMPTY;
1979 bitField0_ = (bitField0_ & ~0x00000040);
1983 public Builder clone() {
1984 return create().mergeFrom(buildPartial());
1987 public com.google.protobuf.Descriptors.Descriptor
1988 getDescriptorForType() {
1989 return com.openxc.BinaryMessages.internal_static_openxc_DiagnosticMessage_descriptor;
1992 public com.openxc.BinaryMessages.DiagnosticMessage getDefaultInstanceForType() {
1993 return com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance();
1996 public com.openxc.BinaryMessages.DiagnosticMessage build() {
1997 com.openxc.BinaryMessages.DiagnosticMessage result = buildPartial();
1998 if (!result.isInitialized()) {
1999 throw newUninitializedMessageException(result);
2004 public com.openxc.BinaryMessages.DiagnosticMessage buildPartial() {
2005 com.openxc.BinaryMessages.DiagnosticMessage result = new com.openxc.BinaryMessages.DiagnosticMessage(this);
2006 int from_bitField0_ = bitField0_;
2007 int to_bitField0_ = 0;
2008 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
2009 to_bitField0_ |= 0x00000001;
2012 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
2013 to_bitField0_ |= 0x00000002;
2015 result.messageId_ = messageId_;
2016 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
2017 to_bitField0_ |= 0x00000004;
2019 result.mode_ = mode_;
2020 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
2021 to_bitField0_ |= 0x00000008;
2024 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
2025 to_bitField0_ |= 0x00000010;
2027 result.success_ = success_;
2028 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
2029 to_bitField0_ |= 0x00000020;
2031 result.negativeResponseCode_ = negativeResponseCode_;
2032 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
2033 to_bitField0_ |= 0x00000040;
2035 result.payload_ = payload_;
2036 result.bitField0_ = to_bitField0_;
2041 public Builder mergeFrom(com.google.protobuf.Message other) {
2042 if (other instanceof com.openxc.BinaryMessages.DiagnosticMessage) {
2043 return mergeFrom((com.openxc.BinaryMessages.DiagnosticMessage)other);
2045 super.mergeFrom(other);
2050 public Builder mergeFrom(com.openxc.BinaryMessages.DiagnosticMessage other) {
2051 if (other == com.openxc.BinaryMessages.DiagnosticMessage.getDefaultInstance()) return this;
2052 if (other.hasBus()) {
2053 setBus(other.getBus());
2055 if (other.hasMessageId()) {
2056 setMessageId(other.getMessageId());
2058 if (other.hasMode()) {
2059 setMode(other.getMode());
2061 if (other.hasPid()) {
2062 setPid(other.getPid());
2064 if (other.hasSuccess()) {
2065 setSuccess(other.getSuccess());
2067 if (other.hasNegativeResponseCode()) {
2068 setNegativeResponseCode(other.getNegativeResponseCode());
2070 if (other.hasPayload()) {
2071 setPayload(other.getPayload());
2073 this.mergeUnknownFields(other.getUnknownFields());
2077 public final boolean isInitialized() {
2081 public Builder mergeFrom(
2082 com.google.protobuf.CodedInputStream input,
2083 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2084 throws java.io.IOException {
2085 com.openxc.BinaryMessages.DiagnosticMessage parsedMessage = null;
2087 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
2088 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2089 parsedMessage = (com.openxc.BinaryMessages.DiagnosticMessage) e.getUnfinishedMessage();
2092 if (parsedMessage != null) {
2093 mergeFrom(parsedMessage);
2098 private int bitField0_;
2100 // optional int32 bus = 1;
2103 * <code>optional int32 bus = 1;</code>
2105 public boolean hasBus() {
2106 return ((bitField0_ & 0x00000001) == 0x00000001);
2109 * <code>optional int32 bus = 1;</code>
2111 public int getBus() {
2115 * <code>optional int32 bus = 1;</code>
2117 public Builder setBus(int value) {
2118 bitField0_ |= 0x00000001;
2124 * <code>optional int32 bus = 1;</code>
2126 public Builder clearBus() {
2127 bitField0_ = (bitField0_ & ~0x00000001);
2133 // optional uint32 message_id = 2;
2134 private int messageId_ ;
2136 * <code>optional uint32 message_id = 2;</code>
2138 public boolean hasMessageId() {
2139 return ((bitField0_ & 0x00000002) == 0x00000002);
2142 * <code>optional uint32 message_id = 2;</code>
2144 public int getMessageId() {
2148 * <code>optional uint32 message_id = 2;</code>
2150 public Builder setMessageId(int value) {
2151 bitField0_ |= 0x00000002;
2157 * <code>optional uint32 message_id = 2;</code>
2159 public Builder clearMessageId() {
2160 bitField0_ = (bitField0_ & ~0x00000002);
2166 // optional uint32 mode = 3;
2169 * <code>optional uint32 mode = 3;</code>
2171 public boolean hasMode() {
2172 return ((bitField0_ & 0x00000004) == 0x00000004);
2175 * <code>optional uint32 mode = 3;</code>
2177 public int getMode() {
2181 * <code>optional uint32 mode = 3;</code>
2183 public Builder setMode(int value) {
2184 bitField0_ |= 0x00000004;
2190 * <code>optional uint32 mode = 3;</code>
2192 public Builder clearMode() {
2193 bitField0_ = (bitField0_ & ~0x00000004);
2199 // optional uint32 pid = 4;
2202 * <code>optional uint32 pid = 4;</code>
2204 public boolean hasPid() {
2205 return ((bitField0_ & 0x00000008) == 0x00000008);
2208 * <code>optional uint32 pid = 4;</code>
2210 public int getPid() {
2214 * <code>optional uint32 pid = 4;</code>
2216 public Builder setPid(int value) {
2217 bitField0_ |= 0x00000008;
2223 * <code>optional uint32 pid = 4;</code>
2225 public Builder clearPid() {
2226 bitField0_ = (bitField0_ & ~0x00000008);
2232 // optional bool success = 5;
2233 private boolean success_ ;
2235 * <code>optional bool success = 5;</code>
2237 public boolean hasSuccess() {
2238 return ((bitField0_ & 0x00000010) == 0x00000010);
2241 * <code>optional bool success = 5;</code>
2243 public boolean getSuccess() {
2247 * <code>optional bool success = 5;</code>
2249 public Builder setSuccess(boolean value) {
2250 bitField0_ |= 0x00000010;
2256 * <code>optional bool success = 5;</code>
2258 public Builder clearSuccess() {
2259 bitField0_ = (bitField0_ & ~0x00000010);
2265 // optional uint32 negative_response_code = 6;
2266 private int negativeResponseCode_ ;
2268 * <code>optional uint32 negative_response_code = 6;</code>
2270 public boolean hasNegativeResponseCode() {
2271 return ((bitField0_ & 0x00000020) == 0x00000020);
2274 * <code>optional uint32 negative_response_code = 6;</code>
2276 public int getNegativeResponseCode() {
2277 return negativeResponseCode_;
2280 * <code>optional uint32 negative_response_code = 6;</code>
2282 public Builder setNegativeResponseCode(int value) {
2283 bitField0_ |= 0x00000020;
2284 negativeResponseCode_ = value;
2289 * <code>optional uint32 negative_response_code = 6;</code>
2291 public Builder clearNegativeResponseCode() {
2292 bitField0_ = (bitField0_ & ~0x00000020);
2293 negativeResponseCode_ = 0;
2298 // optional bytes payload = 7;
2299 private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
2301 * <code>optional bytes payload = 7;</code>
2304 * TODO we are capping this at 8 bytes for now - need to change when we
2305 * support multi-frame responses
2308 public boolean hasPayload() {
2309 return ((bitField0_ & 0x00000040) == 0x00000040);
2312 * <code>optional bytes payload = 7;</code>
2315 * TODO we are capping this at 8 bytes for now - need to change when we
2316 * support multi-frame responses
2319 public com.google.protobuf.ByteString getPayload() {
2323 * <code>optional bytes payload = 7;</code>
2326 * TODO we are capping this at 8 bytes for now - need to change when we
2327 * support multi-frame responses
2330 public Builder setPayload(com.google.protobuf.ByteString value) {
2331 if (value == null) {
2332 throw new NullPointerException();
2334 bitField0_ |= 0x00000040;
2340 * <code>optional bytes payload = 7;</code>
2343 * TODO we are capping this at 8 bytes for now - need to change when we
2344 * support multi-frame responses
2347 public Builder clearPayload() {
2348 bitField0_ = (bitField0_ & ~0x00000040);
2349 payload_ = getDefaultInstance().getPayload();
2354 // @@protoc_insertion_point(builder_scope:openxc.DiagnosticMessage)
2358 defaultInstance = new DiagnosticMessage(true);
2359 defaultInstance.initFields();
2362 // @@protoc_insertion_point(class_scope:openxc.DiagnosticMessage)
2365 public interface TranslatedMessageOrBuilder
2366 extends com.google.protobuf.MessageOrBuilder {
2368 // optional .openxc.TranslatedMessage.Type type = 1;
2370 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2374 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2376 com.openxc.BinaryMessages.TranslatedMessage.Type getType();
2378 // optional string name = 2;
2380 * <code>optional string name = 2;</code>
2384 * <code>optional string name = 2;</code>
2386 java.lang.String getName();
2388 * <code>optional string name = 2;</code>
2390 com.google.protobuf.ByteString
2393 // optional string string_value = 3;
2395 * <code>optional string string_value = 3;</code>
2397 boolean hasStringValue();
2399 * <code>optional string string_value = 3;</code>
2401 java.lang.String getStringValue();
2403 * <code>optional string string_value = 3;</code>
2405 com.google.protobuf.ByteString
2406 getStringValueBytes();
2408 // optional double numeric_value = 4;
2410 * <code>optional double numeric_value = 4;</code>
2412 boolean hasNumericValue();
2414 * <code>optional double numeric_value = 4;</code>
2416 double getNumericValue();
2418 // optional bool boolean_value = 5;
2420 * <code>optional bool boolean_value = 5;</code>
2422 boolean hasBooleanValue();
2424 * <code>optional bool boolean_value = 5;</code>
2426 boolean getBooleanValue();
2428 // optional string string_event = 6;
2430 * <code>optional string string_event = 6;</code>
2432 boolean hasStringEvent();
2434 * <code>optional string string_event = 6;</code>
2436 java.lang.String getStringEvent();
2438 * <code>optional string string_event = 6;</code>
2440 com.google.protobuf.ByteString
2441 getStringEventBytes();
2443 // optional double numeric_event = 7;
2445 * <code>optional double numeric_event = 7;</code>
2447 boolean hasNumericEvent();
2449 * <code>optional double numeric_event = 7;</code>
2451 double getNumericEvent();
2453 // optional bool boolean_event = 8;
2455 * <code>optional bool boolean_event = 8;</code>
2457 boolean hasBooleanEvent();
2459 * <code>optional bool boolean_event = 8;</code>
2461 boolean getBooleanEvent();
2464 * Protobuf type {@code openxc.TranslatedMessage}
2466 public static final class TranslatedMessage extends
2467 com.google.protobuf.GeneratedMessage
2468 implements TranslatedMessageOrBuilder {
2469 // Use TranslatedMessage.newBuilder() to construct.
2470 private TranslatedMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
2472 this.unknownFields = builder.getUnknownFields();
2474 private TranslatedMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
2476 private static final TranslatedMessage defaultInstance;
2477 public static TranslatedMessage getDefaultInstance() {
2478 return defaultInstance;
2481 public TranslatedMessage getDefaultInstanceForType() {
2482 return defaultInstance;
2485 private final com.google.protobuf.UnknownFieldSet unknownFields;
2487 public final com.google.protobuf.UnknownFieldSet
2488 getUnknownFields() {
2489 return this.unknownFields;
2491 private TranslatedMessage(
2492 com.google.protobuf.CodedInputStream input,
2493 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2494 throws com.google.protobuf.InvalidProtocolBufferException {
2496 int mutable_bitField0_ = 0;
2497 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
2498 com.google.protobuf.UnknownFieldSet.newBuilder();
2500 boolean done = false;
2502 int tag = input.readTag();
2508 if (!parseUnknownField(input, unknownFields,
2509 extensionRegistry, tag)) {
2515 int rawValue = input.readEnum();
2516 com.openxc.BinaryMessages.TranslatedMessage.Type value = com.openxc.BinaryMessages.TranslatedMessage.Type.valueOf(rawValue);
2517 if (value == null) {
2518 unknownFields.mergeVarintField(1, rawValue);
2520 bitField0_ |= 0x00000001;
2526 bitField0_ |= 0x00000002;
2527 name_ = input.readBytes();
2531 bitField0_ |= 0x00000004;
2532 stringValue_ = input.readBytes();
2536 bitField0_ |= 0x00000008;
2537 numericValue_ = input.readDouble();
2541 bitField0_ |= 0x00000010;
2542 booleanValue_ = input.readBool();
2546 bitField0_ |= 0x00000020;
2547 stringEvent_ = input.readBytes();
2551 bitField0_ |= 0x00000040;
2552 numericEvent_ = input.readDouble();
2556 bitField0_ |= 0x00000080;
2557 booleanEvent_ = input.readBool();
2562 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2563 throw e.setUnfinishedMessage(this);
2564 } catch (java.io.IOException e) {
2565 throw new com.google.protobuf.InvalidProtocolBufferException(
2566 e.getMessage()).setUnfinishedMessage(this);
2568 this.unknownFields = unknownFields.build();
2569 makeExtensionsImmutable();
2572 public static final com.google.protobuf.Descriptors.Descriptor
2574 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
2577 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
2578 internalGetFieldAccessorTable() {
2579 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
2580 .ensureFieldAccessorsInitialized(
2581 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
2584 public static com.google.protobuf.Parser<TranslatedMessage> PARSER =
2585 new com.google.protobuf.AbstractParser<TranslatedMessage>() {
2586 public TranslatedMessage parsePartialFrom(
2587 com.google.protobuf.CodedInputStream input,
2588 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2589 throws com.google.protobuf.InvalidProtocolBufferException {
2590 return new TranslatedMessage(input, extensionRegistry);
2595 public com.google.protobuf.Parser<TranslatedMessage> getParserForType() {
2600 * Protobuf enum {@code openxc.TranslatedMessage.Type}
2603 implements com.google.protobuf.ProtocolMessageEnum {
2605 * <code>STRING = 1;</code>
2609 * <code>NUM = 2;</code>
2613 * <code>BOOL = 3;</code>
2617 * <code>EVENTED_STRING = 4;</code>
2619 EVENTED_STRING(3, 4),
2621 * <code>EVENTED_NUM = 5;</code>
2625 * <code>EVENTED_BOOL = 6;</code>
2631 * <code>STRING = 1;</code>
2633 public static final int STRING_VALUE = 1;
2635 * <code>NUM = 2;</code>
2637 public static final int NUM_VALUE = 2;
2639 * <code>BOOL = 3;</code>
2641 public static final int BOOL_VALUE = 3;
2643 * <code>EVENTED_STRING = 4;</code>
2645 public static final int EVENTED_STRING_VALUE = 4;
2647 * <code>EVENTED_NUM = 5;</code>
2649 public static final int EVENTED_NUM_VALUE = 5;
2651 * <code>EVENTED_BOOL = 6;</code>
2653 public static final int EVENTED_BOOL_VALUE = 6;
2656 public final int getNumber() { return value; }
2658 public static Type valueOf(int value) {
2660 case 1: return STRING;
2662 case 3: return BOOL;
2663 case 4: return EVENTED_STRING;
2664 case 5: return EVENTED_NUM;
2665 case 6: return EVENTED_BOOL;
2666 default: return null;
2670 public static com.google.protobuf.Internal.EnumLiteMap<Type>
2671 internalGetValueMap() {
2672 return internalValueMap;
2674 private static com.google.protobuf.Internal.EnumLiteMap<Type>
2676 new com.google.protobuf.Internal.EnumLiteMap<Type>() {
2677 public Type findValueByNumber(int number) {
2678 return Type.valueOf(number);
2682 public final com.google.protobuf.Descriptors.EnumValueDescriptor
2683 getValueDescriptor() {
2684 return getDescriptor().getValues().get(index);
2686 public final com.google.protobuf.Descriptors.EnumDescriptor
2687 getDescriptorForType() {
2688 return getDescriptor();
2690 public static final com.google.protobuf.Descriptors.EnumDescriptor
2692 return com.openxc.BinaryMessages.TranslatedMessage.getDescriptor().getEnumTypes().get(0);
2695 private static final Type[] VALUES = values();
2697 public static Type valueOf(
2698 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
2699 if (desc.getType() != getDescriptor()) {
2700 throw new java.lang.IllegalArgumentException(
2701 "EnumValueDescriptor is not for this type.");
2703 return VALUES[desc.getIndex()];
2706 private final int index;
2707 private final int value;
2709 private Type(int index, int value) {
2714 // @@protoc_insertion_point(enum_scope:openxc.TranslatedMessage.Type)
2717 private int bitField0_;
2718 // optional .openxc.TranslatedMessage.Type type = 1;
2719 public static final int TYPE_FIELD_NUMBER = 1;
2720 private com.openxc.BinaryMessages.TranslatedMessage.Type type_;
2722 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2724 public boolean hasType() {
2725 return ((bitField0_ & 0x00000001) == 0x00000001);
2728 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
2730 public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
2734 // optional string name = 2;
2735 public static final int NAME_FIELD_NUMBER = 2;
2736 private java.lang.Object name_;
2738 * <code>optional string name = 2;</code>
2740 public boolean hasName() {
2741 return ((bitField0_ & 0x00000002) == 0x00000002);
2744 * <code>optional string name = 2;</code>
2746 public java.lang.String getName() {
2747 java.lang.Object ref = name_;
2748 if (ref instanceof java.lang.String) {
2749 return (java.lang.String) ref;
2751 com.google.protobuf.ByteString bs =
2752 (com.google.protobuf.ByteString) ref;
2753 java.lang.String s = bs.toStringUtf8();
2754 if (bs.isValidUtf8()) {
2761 * <code>optional string name = 2;</code>
2763 public com.google.protobuf.ByteString
2765 java.lang.Object ref = name_;
2766 if (ref instanceof java.lang.String) {
2767 com.google.protobuf.ByteString b =
2768 com.google.protobuf.ByteString.copyFromUtf8(
2769 (java.lang.String) ref);
2773 return (com.google.protobuf.ByteString) ref;
2777 // optional string string_value = 3;
2778 public static final int STRING_VALUE_FIELD_NUMBER = 3;
2779 private java.lang.Object stringValue_;
2781 * <code>optional string string_value = 3;</code>
2783 public boolean hasStringValue() {
2784 return ((bitField0_ & 0x00000004) == 0x00000004);
2787 * <code>optional string string_value = 3;</code>
2789 public java.lang.String getStringValue() {
2790 java.lang.Object ref = stringValue_;
2791 if (ref instanceof java.lang.String) {
2792 return (java.lang.String) ref;
2794 com.google.protobuf.ByteString bs =
2795 (com.google.protobuf.ByteString) ref;
2796 java.lang.String s = bs.toStringUtf8();
2797 if (bs.isValidUtf8()) {
2804 * <code>optional string string_value = 3;</code>
2806 public com.google.protobuf.ByteString
2807 getStringValueBytes() {
2808 java.lang.Object ref = stringValue_;
2809 if (ref instanceof java.lang.String) {
2810 com.google.protobuf.ByteString b =
2811 com.google.protobuf.ByteString.copyFromUtf8(
2812 (java.lang.String) ref);
2816 return (com.google.protobuf.ByteString) ref;
2820 // optional double numeric_value = 4;
2821 public static final int NUMERIC_VALUE_FIELD_NUMBER = 4;
2822 private double numericValue_;
2824 * <code>optional double numeric_value = 4;</code>
2826 public boolean hasNumericValue() {
2827 return ((bitField0_ & 0x00000008) == 0x00000008);
2830 * <code>optional double numeric_value = 4;</code>
2832 public double getNumericValue() {
2833 return numericValue_;
2836 // optional bool boolean_value = 5;
2837 public static final int BOOLEAN_VALUE_FIELD_NUMBER = 5;
2838 private boolean booleanValue_;
2840 * <code>optional bool boolean_value = 5;</code>
2842 public boolean hasBooleanValue() {
2843 return ((bitField0_ & 0x00000010) == 0x00000010);
2846 * <code>optional bool boolean_value = 5;</code>
2848 public boolean getBooleanValue() {
2849 return booleanValue_;
2852 // optional string string_event = 6;
2853 public static final int STRING_EVENT_FIELD_NUMBER = 6;
2854 private java.lang.Object stringEvent_;
2856 * <code>optional string string_event = 6;</code>
2858 public boolean hasStringEvent() {
2859 return ((bitField0_ & 0x00000020) == 0x00000020);
2862 * <code>optional string string_event = 6;</code>
2864 public java.lang.String getStringEvent() {
2865 java.lang.Object ref = stringEvent_;
2866 if (ref instanceof java.lang.String) {
2867 return (java.lang.String) ref;
2869 com.google.protobuf.ByteString bs =
2870 (com.google.protobuf.ByteString) ref;
2871 java.lang.String s = bs.toStringUtf8();
2872 if (bs.isValidUtf8()) {
2879 * <code>optional string string_event = 6;</code>
2881 public com.google.protobuf.ByteString
2882 getStringEventBytes() {
2883 java.lang.Object ref = stringEvent_;
2884 if (ref instanceof java.lang.String) {
2885 com.google.protobuf.ByteString b =
2886 com.google.protobuf.ByteString.copyFromUtf8(
2887 (java.lang.String) ref);
2891 return (com.google.protobuf.ByteString) ref;
2895 // optional double numeric_event = 7;
2896 public static final int NUMERIC_EVENT_FIELD_NUMBER = 7;
2897 private double numericEvent_;
2899 * <code>optional double numeric_event = 7;</code>
2901 public boolean hasNumericEvent() {
2902 return ((bitField0_ & 0x00000040) == 0x00000040);
2905 * <code>optional double numeric_event = 7;</code>
2907 public double getNumericEvent() {
2908 return numericEvent_;
2911 // optional bool boolean_event = 8;
2912 public static final int BOOLEAN_EVENT_FIELD_NUMBER = 8;
2913 private boolean booleanEvent_;
2915 * <code>optional bool boolean_event = 8;</code>
2917 public boolean hasBooleanEvent() {
2918 return ((bitField0_ & 0x00000080) == 0x00000080);
2921 * <code>optional bool boolean_event = 8;</code>
2923 public boolean getBooleanEvent() {
2924 return booleanEvent_;
2927 private void initFields() {
2928 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
2932 booleanValue_ = false;
2935 booleanEvent_ = 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.writeEnum(1, type_.getNumber());
2952 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2953 output.writeBytes(2, getNameBytes());
2955 if (((bitField0_ & 0x00000004) == 0x00000004)) {
2956 output.writeBytes(3, getStringValueBytes());
2958 if (((bitField0_ & 0x00000008) == 0x00000008)) {
2959 output.writeDouble(4, numericValue_);
2961 if (((bitField0_ & 0x00000010) == 0x00000010)) {
2962 output.writeBool(5, booleanValue_);
2964 if (((bitField0_ & 0x00000020) == 0x00000020)) {
2965 output.writeBytes(6, getStringEventBytes());
2967 if (((bitField0_ & 0x00000040) == 0x00000040)) {
2968 output.writeDouble(7, numericEvent_);
2970 if (((bitField0_ & 0x00000080) == 0x00000080)) {
2971 output.writeBool(8, booleanEvent_);
2973 getUnknownFields().writeTo(output);
2976 private int memoizedSerializedSize = -1;
2977 public int getSerializedSize() {
2978 int size = memoizedSerializedSize;
2979 if (size != -1) return size;
2982 if (((bitField0_ & 0x00000001) == 0x00000001)) {
2983 size += com.google.protobuf.CodedOutputStream
2984 .computeEnumSize(1, type_.getNumber());
2986 if (((bitField0_ & 0x00000002) == 0x00000002)) {
2987 size += com.google.protobuf.CodedOutputStream
2988 .computeBytesSize(2, getNameBytes());
2990 if (((bitField0_ & 0x00000004) == 0x00000004)) {
2991 size += com.google.protobuf.CodedOutputStream
2992 .computeBytesSize(3, getStringValueBytes());
2994 if (((bitField0_ & 0x00000008) == 0x00000008)) {
2995 size += com.google.protobuf.CodedOutputStream
2996 .computeDoubleSize(4, numericValue_);
2998 if (((bitField0_ & 0x00000010) == 0x00000010)) {
2999 size += com.google.protobuf.CodedOutputStream
3000 .computeBoolSize(5, booleanValue_);
3002 if (((bitField0_ & 0x00000020) == 0x00000020)) {
3003 size += com.google.protobuf.CodedOutputStream
3004 .computeBytesSize(6, getStringEventBytes());
3006 if (((bitField0_ & 0x00000040) == 0x00000040)) {
3007 size += com.google.protobuf.CodedOutputStream
3008 .computeDoubleSize(7, numericEvent_);
3010 if (((bitField0_ & 0x00000080) == 0x00000080)) {
3011 size += com.google.protobuf.CodedOutputStream
3012 .computeBoolSize(8, booleanEvent_);
3014 size += getUnknownFields().getSerializedSize();
3015 memoizedSerializedSize = size;
3019 private static final long serialVersionUID = 0L;
3021 protected java.lang.Object writeReplace()
3022 throws java.io.ObjectStreamException {
3023 return super.writeReplace();
3026 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3027 com.google.protobuf.ByteString data)
3028 throws com.google.protobuf.InvalidProtocolBufferException {
3029 return PARSER.parseFrom(data);
3031 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3032 com.google.protobuf.ByteString data,
3033 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3034 throws com.google.protobuf.InvalidProtocolBufferException {
3035 return PARSER.parseFrom(data, extensionRegistry);
3037 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(byte[] data)
3038 throws com.google.protobuf.InvalidProtocolBufferException {
3039 return PARSER.parseFrom(data);
3041 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3043 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3044 throws com.google.protobuf.InvalidProtocolBufferException {
3045 return PARSER.parseFrom(data, extensionRegistry);
3047 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(java.io.InputStream input)
3048 throws java.io.IOException {
3049 return PARSER.parseFrom(input);
3051 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3052 java.io.InputStream input,
3053 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3054 throws java.io.IOException {
3055 return PARSER.parseFrom(input, extensionRegistry);
3057 public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(java.io.InputStream input)
3058 throws java.io.IOException {
3059 return PARSER.parseDelimitedFrom(input);
3061 public static com.openxc.BinaryMessages.TranslatedMessage parseDelimitedFrom(
3062 java.io.InputStream input,
3063 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3064 throws java.io.IOException {
3065 return PARSER.parseDelimitedFrom(input, extensionRegistry);
3067 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3068 com.google.protobuf.CodedInputStream input)
3069 throws java.io.IOException {
3070 return PARSER.parseFrom(input);
3072 public static com.openxc.BinaryMessages.TranslatedMessage parseFrom(
3073 com.google.protobuf.CodedInputStream input,
3074 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3075 throws java.io.IOException {
3076 return PARSER.parseFrom(input, extensionRegistry);
3079 public static Builder newBuilder() { return Builder.create(); }
3080 public Builder newBuilderForType() { return newBuilder(); }
3081 public static Builder newBuilder(com.openxc.BinaryMessages.TranslatedMessage prototype) {
3082 return newBuilder().mergeFrom(prototype);
3084 public Builder toBuilder() { return newBuilder(this); }
3087 protected Builder newBuilderForType(
3088 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3089 Builder builder = new Builder(parent);
3093 * Protobuf type {@code openxc.TranslatedMessage}
3095 public static final class Builder extends
3096 com.google.protobuf.GeneratedMessage.Builder<Builder>
3097 implements com.openxc.BinaryMessages.TranslatedMessageOrBuilder {
3098 public static final com.google.protobuf.Descriptors.Descriptor
3100 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
3103 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
3104 internalGetFieldAccessorTable() {
3105 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_fieldAccessorTable
3106 .ensureFieldAccessorsInitialized(
3107 com.openxc.BinaryMessages.TranslatedMessage.class, com.openxc.BinaryMessages.TranslatedMessage.Builder.class);
3110 // Construct using com.openxc.BinaryMessages.TranslatedMessage.newBuilder()
3112 maybeForceBuilderInitialization();
3116 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
3118 maybeForceBuilderInitialization();
3120 private void maybeForceBuilderInitialization() {
3121 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
3124 private static Builder create() {
3125 return new Builder();
3128 public Builder clear() {
3130 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
3131 bitField0_ = (bitField0_ & ~0x00000001);
3133 bitField0_ = (bitField0_ & ~0x00000002);
3135 bitField0_ = (bitField0_ & ~0x00000004);
3137 bitField0_ = (bitField0_ & ~0x00000008);
3138 booleanValue_ = false;
3139 bitField0_ = (bitField0_ & ~0x00000010);
3141 bitField0_ = (bitField0_ & ~0x00000020);
3143 bitField0_ = (bitField0_ & ~0x00000040);
3144 booleanEvent_ = false;
3145 bitField0_ = (bitField0_ & ~0x00000080);
3149 public Builder clone() {
3150 return create().mergeFrom(buildPartial());
3153 public com.google.protobuf.Descriptors.Descriptor
3154 getDescriptorForType() {
3155 return com.openxc.BinaryMessages.internal_static_openxc_TranslatedMessage_descriptor;
3158 public com.openxc.BinaryMessages.TranslatedMessage getDefaultInstanceForType() {
3159 return com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance();
3162 public com.openxc.BinaryMessages.TranslatedMessage build() {
3163 com.openxc.BinaryMessages.TranslatedMessage result = buildPartial();
3164 if (!result.isInitialized()) {
3165 throw newUninitializedMessageException(result);
3170 public com.openxc.BinaryMessages.TranslatedMessage buildPartial() {
3171 com.openxc.BinaryMessages.TranslatedMessage result = new com.openxc.BinaryMessages.TranslatedMessage(this);
3172 int from_bitField0_ = bitField0_;
3173 int to_bitField0_ = 0;
3174 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
3175 to_bitField0_ |= 0x00000001;
3177 result.type_ = type_;
3178 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
3179 to_bitField0_ |= 0x00000002;
3181 result.name_ = name_;
3182 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
3183 to_bitField0_ |= 0x00000004;
3185 result.stringValue_ = stringValue_;
3186 if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
3187 to_bitField0_ |= 0x00000008;
3189 result.numericValue_ = numericValue_;
3190 if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
3191 to_bitField0_ |= 0x00000010;
3193 result.booleanValue_ = booleanValue_;
3194 if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
3195 to_bitField0_ |= 0x00000020;
3197 result.stringEvent_ = stringEvent_;
3198 if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
3199 to_bitField0_ |= 0x00000040;
3201 result.numericEvent_ = numericEvent_;
3202 if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
3203 to_bitField0_ |= 0x00000080;
3205 result.booleanEvent_ = booleanEvent_;
3206 result.bitField0_ = to_bitField0_;
3211 public Builder mergeFrom(com.google.protobuf.Message other) {
3212 if (other instanceof com.openxc.BinaryMessages.TranslatedMessage) {
3213 return mergeFrom((com.openxc.BinaryMessages.TranslatedMessage)other);
3215 super.mergeFrom(other);
3220 public Builder mergeFrom(com.openxc.BinaryMessages.TranslatedMessage other) {
3221 if (other == com.openxc.BinaryMessages.TranslatedMessage.getDefaultInstance()) return this;
3222 if (other.hasType()) {
3223 setType(other.getType());
3225 if (other.hasName()) {
3226 bitField0_ |= 0x00000002;
3227 name_ = other.name_;
3230 if (other.hasStringValue()) {
3231 bitField0_ |= 0x00000004;
3232 stringValue_ = other.stringValue_;
3235 if (other.hasNumericValue()) {
3236 setNumericValue(other.getNumericValue());
3238 if (other.hasBooleanValue()) {
3239 setBooleanValue(other.getBooleanValue());
3241 if (other.hasStringEvent()) {
3242 bitField0_ |= 0x00000020;
3243 stringEvent_ = other.stringEvent_;
3246 if (other.hasNumericEvent()) {
3247 setNumericEvent(other.getNumericEvent());
3249 if (other.hasBooleanEvent()) {
3250 setBooleanEvent(other.getBooleanEvent());
3252 this.mergeUnknownFields(other.getUnknownFields());
3256 public final boolean isInitialized() {
3260 public Builder mergeFrom(
3261 com.google.protobuf.CodedInputStream input,
3262 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3263 throws java.io.IOException {
3264 com.openxc.BinaryMessages.TranslatedMessage parsedMessage = null;
3266 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
3267 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3268 parsedMessage = (com.openxc.BinaryMessages.TranslatedMessage) e.getUnfinishedMessage();
3271 if (parsedMessage != null) {
3272 mergeFrom(parsedMessage);
3277 private int bitField0_;
3279 // optional .openxc.TranslatedMessage.Type type = 1;
3280 private com.openxc.BinaryMessages.TranslatedMessage.Type type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
3282 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3284 public boolean hasType() {
3285 return ((bitField0_ & 0x00000001) == 0x00000001);
3288 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3290 public com.openxc.BinaryMessages.TranslatedMessage.Type getType() {
3294 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3296 public Builder setType(com.openxc.BinaryMessages.TranslatedMessage.Type value) {
3297 if (value == null) {
3298 throw new NullPointerException();
3300 bitField0_ |= 0x00000001;
3306 * <code>optional .openxc.TranslatedMessage.Type type = 1;</code>
3308 public Builder clearType() {
3309 bitField0_ = (bitField0_ & ~0x00000001);
3310 type_ = com.openxc.BinaryMessages.TranslatedMessage.Type.STRING;
3315 // optional string name = 2;
3316 private java.lang.Object name_ = "";
3318 * <code>optional string name = 2;</code>
3320 public boolean hasName() {
3321 return ((bitField0_ & 0x00000002) == 0x00000002);
3324 * <code>optional string name = 2;</code>
3326 public java.lang.String getName() {
3327 java.lang.Object ref = name_;
3328 if (!(ref instanceof java.lang.String)) {
3329 java.lang.String s = ((com.google.protobuf.ByteString) ref)
3334 return (java.lang.String) ref;
3338 * <code>optional string name = 2;</code>
3340 public com.google.protobuf.ByteString
3342 java.lang.Object ref = name_;
3343 if (ref instanceof String) {
3344 com.google.protobuf.ByteString b =
3345 com.google.protobuf.ByteString.copyFromUtf8(
3346 (java.lang.String) ref);
3350 return (com.google.protobuf.ByteString) ref;
3354 * <code>optional string name = 2;</code>
3356 public Builder setName(
3357 java.lang.String value) {
3358 if (value == null) {
3359 throw new NullPointerException();
3361 bitField0_ |= 0x00000002;
3367 * <code>optional string name = 2;</code>
3369 public Builder clearName() {
3370 bitField0_ = (bitField0_ & ~0x00000002);
3371 name_ = getDefaultInstance().getName();
3376 * <code>optional string name = 2;</code>
3378 public Builder setNameBytes(
3379 com.google.protobuf.ByteString value) {
3380 if (value == null) {
3381 throw new NullPointerException();
3383 bitField0_ |= 0x00000002;
3389 // optional string string_value = 3;
3390 private java.lang.Object stringValue_ = "";
3392 * <code>optional string string_value = 3;</code>
3394 public boolean hasStringValue() {
3395 return ((bitField0_ & 0x00000004) == 0x00000004);
3398 * <code>optional string string_value = 3;</code>
3400 public java.lang.String getStringValue() {
3401 java.lang.Object ref = stringValue_;
3402 if (!(ref instanceof java.lang.String)) {
3403 java.lang.String s = ((com.google.protobuf.ByteString) ref)
3408 return (java.lang.String) ref;
3412 * <code>optional string string_value = 3;</code>
3414 public com.google.protobuf.ByteString
3415 getStringValueBytes() {
3416 java.lang.Object ref = stringValue_;
3417 if (ref instanceof String) {
3418 com.google.protobuf.ByteString b =
3419 com.google.protobuf.ByteString.copyFromUtf8(
3420 (java.lang.String) ref);
3424 return (com.google.protobuf.ByteString) ref;
3428 * <code>optional string string_value = 3;</code>
3430 public Builder setStringValue(
3431 java.lang.String value) {
3432 if (value == null) {
3433 throw new NullPointerException();
3435 bitField0_ |= 0x00000004;
3436 stringValue_ = value;
3441 * <code>optional string string_value = 3;</code>
3443 public Builder clearStringValue() {
3444 bitField0_ = (bitField0_ & ~0x00000004);
3445 stringValue_ = getDefaultInstance().getStringValue();
3450 * <code>optional string string_value = 3;</code>
3452 public Builder setStringValueBytes(
3453 com.google.protobuf.ByteString value) {
3454 if (value == null) {
3455 throw new NullPointerException();
3457 bitField0_ |= 0x00000004;
3458 stringValue_ = value;
3463 // optional double numeric_value = 4;
3464 private double numericValue_ ;
3466 * <code>optional double numeric_value = 4;</code>
3468 public boolean hasNumericValue() {
3469 return ((bitField0_ & 0x00000008) == 0x00000008);
3472 * <code>optional double numeric_value = 4;</code>
3474 public double getNumericValue() {
3475 return numericValue_;
3478 * <code>optional double numeric_value = 4;</code>
3480 public Builder setNumericValue(double value) {
3481 bitField0_ |= 0x00000008;
3482 numericValue_ = value;
3487 * <code>optional double numeric_value = 4;</code>
3489 public Builder clearNumericValue() {
3490 bitField0_ = (bitField0_ & ~0x00000008);
3496 // optional bool boolean_value = 5;
3497 private boolean booleanValue_ ;
3499 * <code>optional bool boolean_value = 5;</code>
3501 public boolean hasBooleanValue() {
3502 return ((bitField0_ & 0x00000010) == 0x00000010);
3505 * <code>optional bool boolean_value = 5;</code>
3507 public boolean getBooleanValue() {
3508 return booleanValue_;
3511 * <code>optional bool boolean_value = 5;</code>
3513 public Builder setBooleanValue(boolean value) {
3514 bitField0_ |= 0x00000010;
3515 booleanValue_ = value;
3520 * <code>optional bool boolean_value = 5;</code>
3522 public Builder clearBooleanValue() {
3523 bitField0_ = (bitField0_ & ~0x00000010);
3524 booleanValue_ = false;
3529 // optional string string_event = 6;
3530 private java.lang.Object stringEvent_ = "";
3532 * <code>optional string string_event = 6;</code>
3534 public boolean hasStringEvent() {
3535 return ((bitField0_ & 0x00000020) == 0x00000020);
3538 * <code>optional string string_event = 6;</code>
3540 public java.lang.String getStringEvent() {
3541 java.lang.Object ref = stringEvent_;
3542 if (!(ref instanceof java.lang.String)) {
3543 java.lang.String s = ((com.google.protobuf.ByteString) ref)
3548 return (java.lang.String) ref;
3552 * <code>optional string string_event = 6;</code>
3554 public com.google.protobuf.ByteString
3555 getStringEventBytes() {
3556 java.lang.Object ref = stringEvent_;
3557 if (ref instanceof String) {
3558 com.google.protobuf.ByteString b =
3559 com.google.protobuf.ByteString.copyFromUtf8(
3560 (java.lang.String) ref);
3564 return (com.google.protobuf.ByteString) ref;
3568 * <code>optional string string_event = 6;</code>
3570 public Builder setStringEvent(
3571 java.lang.String value) {
3572 if (value == null) {
3573 throw new NullPointerException();
3575 bitField0_ |= 0x00000020;
3576 stringEvent_ = value;
3581 * <code>optional string string_event = 6;</code>
3583 public Builder clearStringEvent() {
3584 bitField0_ = (bitField0_ & ~0x00000020);
3585 stringEvent_ = getDefaultInstance().getStringEvent();
3590 * <code>optional string string_event = 6;</code>
3592 public Builder setStringEventBytes(
3593 com.google.protobuf.ByteString value) {
3594 if (value == null) {
3595 throw new NullPointerException();
3597 bitField0_ |= 0x00000020;
3598 stringEvent_ = value;
3603 // optional double numeric_event = 7;
3604 private double numericEvent_ ;
3606 * <code>optional double numeric_event = 7;</code>
3608 public boolean hasNumericEvent() {
3609 return ((bitField0_ & 0x00000040) == 0x00000040);
3612 * <code>optional double numeric_event = 7;</code>
3614 public double getNumericEvent() {
3615 return numericEvent_;
3618 * <code>optional double numeric_event = 7;</code>
3620 public Builder setNumericEvent(double value) {
3621 bitField0_ |= 0x00000040;
3622 numericEvent_ = value;
3627 * <code>optional double numeric_event = 7;</code>
3629 public Builder clearNumericEvent() {
3630 bitField0_ = (bitField0_ & ~0x00000040);
3636 // optional bool boolean_event = 8;
3637 private boolean booleanEvent_ ;
3639 * <code>optional bool boolean_event = 8;</code>
3641 public boolean hasBooleanEvent() {
3642 return ((bitField0_ & 0x00000080) == 0x00000080);
3645 * <code>optional bool boolean_event = 8;</code>
3647 public boolean getBooleanEvent() {
3648 return booleanEvent_;
3651 * <code>optional bool boolean_event = 8;</code>
3653 public Builder setBooleanEvent(boolean value) {
3654 bitField0_ |= 0x00000080;
3655 booleanEvent_ = value;
3660 * <code>optional bool boolean_event = 8;</code>
3662 public Builder clearBooleanEvent() {
3663 bitField0_ = (bitField0_ & ~0x00000080);
3664 booleanEvent_ = false;
3669 // @@protoc_insertion_point(builder_scope:openxc.TranslatedMessage)
3673 defaultInstance = new TranslatedMessage(true);
3674 defaultInstance.initFields();
3677 // @@protoc_insertion_point(class_scope:openxc.TranslatedMessage)
3680 private static com.google.protobuf.Descriptors.Descriptor
3681 internal_static_openxc_VehicleMessage_descriptor;
3683 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3684 internal_static_openxc_VehicleMessage_fieldAccessorTable;
3685 private static com.google.protobuf.Descriptors.Descriptor
3686 internal_static_openxc_RawMessage_descriptor;
3688 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3689 internal_static_openxc_RawMessage_fieldAccessorTable;
3690 private static com.google.protobuf.Descriptors.Descriptor
3691 internal_static_openxc_DiagnosticMessage_descriptor;
3693 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3694 internal_static_openxc_DiagnosticMessage_fieldAccessorTable;
3695 private static com.google.protobuf.Descriptors.Descriptor
3696 internal_static_openxc_TranslatedMessage_descriptor;
3698 com.google.protobuf.GeneratedMessage.FieldAccessorTable
3699 internal_static_openxc_TranslatedMessage_fieldAccessorTable;
3701 public static com.google.protobuf.Descriptors.FileDescriptor
3705 private static com.google.protobuf.Descriptors.FileDescriptor
3708 java.lang.String[] descriptorData = {
3709 "\n\014openxc.proto\022\006openxc\"\274\001\n\016VehicleMessag" +
3710 "e\022)\n\004type\030\001 \001(\0162\033.openxc.VehicleMessage." +
3711 "Type\022\'\n\013raw_message\030\002 \001(\0132\022.openxc.RawMe" +
3712 "ssage\0225\n\022translated_message\030\003 \001(\0132\031.open" +
3713 "xc.TranslatedMessage\"\037\n\004Type\022\007\n\003RAW\020\001\022\016\n" +
3714 "\nTRANSLATED\020\002\";\n\nRawMessage\022\013\n\003bus\030\001 \001(\005" +
3715 "\022\022\n\nmessage_id\030\002 \001(\r\022\014\n\004data\030\003 \001(\004\"\221\001\n\021D" +
3716 "iagnosticMessage\022\013\n\003bus\030\001 \001(\005\022\022\n\nmessage" +
3717 "_id\030\002 \001(\r\022\014\n\004mode\030\003 \001(\r\022\013\n\003pid\030\004 \001(\r\022\017\n\007" +
3718 "success\030\005 \001(\010\022\036\n\026negative_response_code\030",
3719 "\006 \001(\r\022\017\n\007payload\030\007 \001(\014\"\265\002\n\021TranslatedMes" +
3720 "sage\022,\n\004type\030\001 \001(\0162\036.openxc.TranslatedMe" +
3721 "ssage.Type\022\014\n\004name\030\002 \001(\t\022\024\n\014string_value" +
3722 "\030\003 \001(\t\022\025\n\rnumeric_value\030\004 \001(\001\022\025\n\rboolean" +
3723 "_value\030\005 \001(\010\022\024\n\014string_event\030\006 \001(\t\022\025\n\rnu" +
3724 "meric_event\030\007 \001(\001\022\025\n\rboolean_event\030\010 \001(\010" +
3725 "\"\\\n\004Type\022\n\n\006STRING\020\001\022\007\n\003NUM\020\002\022\010\n\004BOOL\020\003\022" +
3726 "\022\n\016EVENTED_STRING\020\004\022\017\n\013EVENTED_NUM\020\005\022\020\n\014" +
3727 "EVENTED_BOOL\020\006B\034\n\ncom.openxcB\016BinaryMess" +
3730 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
3731 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
3732 public com.google.protobuf.ExtensionRegistry assignDescriptors(
3733 com.google.protobuf.Descriptors.FileDescriptor root) {
3735 internal_static_openxc_VehicleMessage_descriptor =
3736 getDescriptor().getMessageTypes().get(0);
3737 internal_static_openxc_VehicleMessage_fieldAccessorTable = new
3738 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3739 internal_static_openxc_VehicleMessage_descriptor,
3740 new java.lang.String[] { "Type", "RawMessage", "TranslatedMessage", });
3741 internal_static_openxc_RawMessage_descriptor =
3742 getDescriptor().getMessageTypes().get(1);
3743 internal_static_openxc_RawMessage_fieldAccessorTable = new
3744 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3745 internal_static_openxc_RawMessage_descriptor,
3746 new java.lang.String[] { "Bus", "MessageId", "Data", });
3747 internal_static_openxc_DiagnosticMessage_descriptor =
3748 getDescriptor().getMessageTypes().get(2);
3749 internal_static_openxc_DiagnosticMessage_fieldAccessorTable = new
3750 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3751 internal_static_openxc_DiagnosticMessage_descriptor,
3752 new java.lang.String[] { "Bus", "MessageId", "Mode", "Pid", "Success", "NegativeResponseCode", "Payload", });
3753 internal_static_openxc_TranslatedMessage_descriptor =
3754 getDescriptor().getMessageTypes().get(3);
3755 internal_static_openxc_TranslatedMessage_fieldAccessorTable = new
3756 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3757 internal_static_openxc_TranslatedMessage_descriptor,
3758 new java.lang.String[] { "Type", "Name", "StringValue", "NumericValue", "BooleanValue", "StringEvent", "NumericEvent", "BooleanEvent", });
3762 com.google.protobuf.Descriptors.FileDescriptor
3763 .internalBuildGeneratedFileFrom(descriptorData,
3764 new com.google.protobuf.Descriptors.FileDescriptor[] {
3768 // @@protoc_insertion_point(outer_class_scope)