BinaryMessages.CommandResponse.newBuilder(); if(message.getCommand().equals(CommandType.VERSION)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.VERSION); } else if(message.getCommand().equals(CommandType.DEVICE_ID)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.DEVICE_ID); } else if(message.getCommand().equals(CommandType.PLATFORM)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.PLATFORM); } else if(message.getCommand().equals(CommandType.PASSTHROUGH)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.PASSTHROUGH); } else if(message.getCommand().equals(CommandType.AF_BYPASS)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.ACCEPTANCE_FILTER_BYPASS); } else if(message.getCommand().equals(CommandType.PAYLOAD_FORMAT)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.PAYLOAD_FORMAT); } else if(message.getCommand().equals(CommandType.SD_MOUNT_STATUS)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.SD_MOUNT_STATUS); } else if(message.getCommand().equals(CommandType.RTC_CONFIGURATION)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.RTC_CONFIGURATION); } else if(message.getCommand().equals(CommandType.DIAGNOSTIC_REQUEST)) { messageBuilder.setType(BinaryMessages.ControlCommand.Type.DIAGNOSTIC); } else { throw new SerializationException(
public Builder mergeFrom(com.openxc.BinaryMessages.CommandResponse other) { if (other == com.openxc.BinaryMessages.CommandResponse.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasMessage()) { bitField0_ |= 0x00000002; message_ = other.message_; onChanged(); } if (other.hasStatus()) { setStatus(other.getStatus()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }