public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeEnum(1, type_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, getCanMessage()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, getSimpleMessage()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(4, getDiagnosticResponse()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, getControlCommand()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeMessage(6, getCommandResponse()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeUInt64(7, timestamp_); } unknownFields.writeTo(output); }
.computeMessageSize(4, getDiagnosticResponse());
hash = (53 * hash) + getDiagnosticResponse().hashCode();
result = result && getDiagnosticResponse() .equals(other.getDiagnosticResponse());
private static DiagnosticResponse deserializeDiagnosticResponse( BinaryMessages.VehicleMessage binaryMessage) throws UnrecognizedMessageTypeException { BinaryMessages.DiagnosticResponse serializedResponse = binaryMessage.getDiagnosticResponse(); if(!serializedResponse.hasBus() || !serializedResponse.hasMessageId() || !serializedResponse.hasMode()) { throw new UnrecognizedMessageTypeException( "Diagnostic response missing one or more required fields"); } DiagnosticResponse response = new DiagnosticResponse( serializedResponse.getBus(), serializedResponse.getMessageId(), serializedResponse.getMode()); if(serializedResponse.hasPid()) { response.setPid(serializedResponse.getPid()); } if(serializedResponse.hasPayload()) { response.setPayload(serializedResponse.getPayload().toByteArray()); } if(serializedResponse.hasNegativeResponseCode()) { response.setNegativeResponseCode( DiagnosticResponse.NegativeResponseCode.get( serializedResponse.getNegativeResponseCode())); } if(serializedResponse.hasValue()) { response.setValue(serializedResponse.getValue()); } return response; }
public Builder mergeFrom(com.openxc.BinaryMessages.VehicleMessage other) { if (other == com.openxc.BinaryMessages.VehicleMessage.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasCanMessage()) { mergeCanMessage(other.getCanMessage()); } if (other.hasSimpleMessage()) { mergeSimpleMessage(other.getSimpleMessage()); } if (other.hasDiagnosticResponse()) { mergeDiagnosticResponse(other.getDiagnosticResponse()); } if (other.hasControlCommand()) { mergeControlCommand(other.getControlCommand()); } if (other.hasCommandResponse()) { mergeCommandResponse(other.getCommandResponse()); } if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }