com.github.pires.obd.commands.protocol.SelectProtocolCommand 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.enums.ObdProtocols;
/**
* Select the protocol to use.
*
* @author pires
* @version $Id: $Id
*/
public class SelectProtocolCommand extends ObdProtocolCommand {
private final ObdProtocols protocol;
/**
* Constructor for SelectProtocolCommand.
*
* @param protocol a {@link com.github.pires.obd.enums.ObdProtocols} object.
*/
public SelectProtocolCommand(final ObdProtocols protocol) {
super("AT SP " + protocol.getValue());
this.protocol = protocol;
}
/** {@inheritDoc} */
@Override
public String getFormattedResult() {
return getResult();
}
/** {@inheritDoc} */
@Override
public String getName() {
return "Select Protocol " + protocol.name();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy