com.github.pires.obd.commands.protocol.ObdProtocolCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of obd-java-api Show documentation
Show all versions of obd-java-api Show documentation
OBD Java API compatible with ELM327.
package com.github.pires.obd.commands.protocol;
import com.github.pires.obd.commands.ObdCommand;
/**
* Abstract ObdProtocolCommand class.
*
* @author pires
* @version $Id: $Id
*/
public abstract class ObdProtocolCommand extends ObdCommand {
/**
* Default ctor to use
*
* @param command the command to send
*/
public ObdProtocolCommand(String command) {
super(command);
}
/**
* Copy ctor.
*
* @param other the ObdCommand to copy.
*/
public ObdProtocolCommand(ObdProtocolCommand other) {
this(other.cmd);
}
/**
* performCalculations.
*/
protected void performCalculations() {
// ignore
}
/**
* fillBuffer.
*/
protected void fillBuffer() {
// settings commands don't return a value appropriate to place into the
// buffer, so do nothing
}
/** {@inheritDoc} */
@Override
public String getCalculatedResult() {
return String.valueOf(getResult());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy