-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private ControlCommand(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- int rawValue = input.readEnum();
- com.openxc.BinaryMessages.ControlCommand.Type value = com.openxc.BinaryMessages.ControlCommand.Type.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(1, rawValue);
- } else {
- bitField0_ |= 0x00000001;
- type_ = value;
- }
- break;
- }
- case 18: {
- com.openxc.BinaryMessages.DiagnosticControlCommand.Builder subBuilder = null;
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- subBuilder = diagnosticRequest_.toBuilder();
- }
- diagnosticRequest_ = input.readMessage(com.openxc.BinaryMessages.DiagnosticControlCommand.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(diagnosticRequest_);
- diagnosticRequest_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000002;
- break;
- }
- case 26: {
- com.openxc.BinaryMessages.PassthroughModeControlCommand.Builder subBuilder = null;
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- subBuilder = passthroughModeRequest_.toBuilder();
- }
- passthroughModeRequest_ = input.readMessage(com.openxc.BinaryMessages.PassthroughModeControlCommand.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(passthroughModeRequest_);
- passthroughModeRequest_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000004;
- break;
- }
- case 34: {
- com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.Builder subBuilder = null;
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- subBuilder = acceptanceFilterBypassCommand_.toBuilder();
- }
- acceptanceFilterBypassCommand_ = input.readMessage(com.openxc.BinaryMessages.AcceptanceFilterBypassCommand.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(acceptanceFilterBypassCommand_);
- acceptanceFilterBypassCommand_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000008;
- break;
- }
- case 42: {
- com.openxc.BinaryMessages.PayloadFormatCommand.Builder subBuilder = null;
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- subBuilder = payloadFormatCommand_.toBuilder();
- }
- payloadFormatCommand_ = input.readMessage(com.openxc.BinaryMessages.PayloadFormatCommand.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(payloadFormatCommand_);
- payloadFormatCommand_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000010;
- break;
- }
- case 50: {
- com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.Builder subBuilder = null;
- if (((bitField0_ & 0x00000020) == 0x00000020)) {
- subBuilder = predefinedObd2RequestsCommand_.toBuilder();
- }
- predefinedObd2RequestsCommand_ = input.readMessage(com.openxc.BinaryMessages.PredefinedObd2RequestsCommand.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(predefinedObd2RequestsCommand_);
- predefinedObd2RequestsCommand_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000020;
- break;
- }
- case 58: {
- com.openxc.BinaryMessages.ModemConfigurationCommand.Builder subBuilder = null;
- if (((bitField0_ & 0x00000040) == 0x00000040)) {
- subBuilder = modemConfigurationCommand_.toBuilder();
- }
- modemConfigurationCommand_ = input.readMessage(com.openxc.BinaryMessages.ModemConfigurationCommand.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(modemConfigurationCommand_);
- modemConfigurationCommand_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000040;
- break;
- }
- case 66: {
- com.openxc.BinaryMessages.RTCConfigurationCommand.Builder subBuilder = null;
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
- subBuilder = rtcConfigurationCommand_.toBuilder();
- }
- rtcConfigurationCommand_ = input.readMessage(com.openxc.BinaryMessages.RTCConfigurationCommand.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(rtcConfigurationCommand_);
- rtcConfigurationCommand_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000080;
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }