public class Command extends KeyedMessage
Commands are keyed on the command name.
Modifier and Type | Class and Description |
---|---|
static class |
Command.CommandType |
VehicleMessage.Listener
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ACTION_KEY |
protected static java.lang.String |
BUS_KEY |
protected static java.lang.String |
BYPASS_KEY |
protected static java.lang.String |
COMMAND_KEY |
protected static java.lang.String |
DIAGNOSTIC_REQUEST_KEY |
protected static java.lang.String |
ENABLED_KEY |
protected static java.lang.String |
FORMAT_KEY |
protected static java.lang.String |
UNIX_TIME_KEY |
CREATOR, EXTRAS_KEY
Modifier | Constructor and Description |
---|---|
protected |
Command() |
|
Command(Command.CommandType command) |
|
Command(Command.CommandType command,
boolean bypass,
int bus) |
|
Command(Command.CommandType command,
int bus,
boolean enabled) |
|
Command(Command.CommandType command,
long unixTime) |
|
Command(Command.CommandType command,
java.lang.String action) |
|
Command(DiagnosticRequest request,
java.lang.String action) |
protected |
Command(android.os.Parcel in) |
|
Command(java.lang.String format,
Command.CommandType command) |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsRequiredFields(java.util.Set<java.lang.String> fields) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAction() |
int |
getBus() |
Command.CommandType |
getCommand() |
DiagnosticRequest |
getDiagnosticRequest() |
java.lang.String |
getFormat() |
MessageKey |
getKey()
Return the identifying key for this message.
|
long |
getUnixTime() |
boolean |
hasAction() |
boolean |
isBypass() |
boolean |
isEnabled() |
protected void |
readFromParcel(android.os.Parcel in) |
void |
setBus(int mBus) |
void |
setBypass(boolean bypass) |
void |
setEnabled(boolean enabled) |
void |
setFormat(java.lang.String Format) |
void |
setUnixTime(long unixTime) |
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel out,
int flags) |
setKey
asCanMessage, asCommandResponse, asDiagnosticRequest, asDiagnosticResponse, asEventedMessage, asKeyedMessage, asNamedMessage, asSimpleMessage, compareTo, describeContents, getDate, getExtras, getTimestamp, hasExtras, isTimestamped, setExtras, setTimestamp, timestamp, untimestamp
protected static final java.lang.String COMMAND_KEY
protected static final java.lang.String DIAGNOSTIC_REQUEST_KEY
protected static final java.lang.String ACTION_KEY
protected static final java.lang.String BUS_KEY
protected static final java.lang.String ENABLED_KEY
protected static final java.lang.String BYPASS_KEY
protected static final java.lang.String FORMAT_KEY
protected static final java.lang.String UNIX_TIME_KEY
public Command(Command.CommandType command, int bus, boolean enabled)
public Command(Command.CommandType command, boolean bypass, int bus)
public Command(java.lang.String format, Command.CommandType command)
public Command(Command.CommandType command, long unixTime)
public Command(Command.CommandType command, java.lang.String action)
public Command(Command.CommandType command)
public Command(DiagnosticRequest request, java.lang.String action)
protected Command(android.os.Parcel in)
protected Command()
public Command.CommandType getCommand()
public boolean hasAction()
public java.lang.String getAction()
public DiagnosticRequest getDiagnosticRequest()
public int getBus()
public void setBus(int mBus)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public boolean isBypass()
public void setBypass(boolean bypass)
public java.lang.String getFormat()
public void setFormat(java.lang.String Format)
public long getUnixTime()
public void setUnixTime(long unixTime)
public MessageKey getKey()
KeyedMessage
getKey
in class KeyedMessage
public static boolean containsRequiredFields(java.util.Set<java.lang.String> fields)
public boolean equals(java.lang.Object obj)
equals
in class VehicleMessage
public java.lang.String toString()
toString
in class VehicleMessage
public void writeToParcel(android.os.Parcel out, int flags)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class VehicleMessage
protected void readFromParcel(android.os.Parcel in)
readFromParcel
in class VehicleMessage