public enum Elm327Cmds extends java.lang.Enum<Elm327Cmds> implements Cmd
Enum Constant and Description |
---|
BYPASS_INIT |
ECHO_OFF |
FAST_INIT |
INIT |
PROTOCOL_3 |
PROTOCOL_5 |
SLOW_INIT |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
id()
Unique identifier of the command.
|
static void |
initializeProtocol(SerialDevice device,
Elm327Cmds protocol)
Initialize the ELM327 to a specific protocol.
|
boolean |
result(com.google.gson.JsonObject result,
byte[] data)
Process the reply into a result.
|
static Elm327Cmds |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Elm327Cmds[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
writeCmd(java.io.OutputStream out)
How the command is written to the serial port.
|
public static final Elm327Cmds INIT
public static final Elm327Cmds ECHO_OFF
public static final Elm327Cmds PROTOCOL_3
public static final Elm327Cmds PROTOCOL_5
public static final Elm327Cmds BYPASS_INIT
public static final Elm327Cmds FAST_INIT
public static final Elm327Cmds SLOW_INIT
public static Elm327Cmds[] values()
for (Elm327Cmds c : Elm327Cmds.values()) System.out.println(c);
public static Elm327Cmds valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void writeCmd(java.io.OutputStream out) throws java.io.IOException
Cmd
public boolean result(com.google.gson.JsonObject result, byte[] data)
Cmd
public java.lang.String id()
Cmd
public static void initializeProtocol(SerialDevice device, Elm327Cmds protocol)
device
- Serial device the ELM327 is connected to.protocol
- OBD-II protocol to initialize to.Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641