TSim
Class CommandStatus
java.lang.Object
|
+--TSim.CommandStatus
- public class CommandStatus
- extends java.lang.Object
- implements TSimInformation
CommandStatus represents the responses from TSim that does not
carry information about sensors or trains but rather if
the command issued succeeded or not.
Constructor Summary |
CommandStatus(int status)
Creates a new CommandStatus message. |
Method Summary |
int |
getStatus()
Returns the status of the command. |
java.lang.String |
toString()
Returns the string representation of the CommandStatus class. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
OK
public static final int OK
ILLEGAL_SPEED
public static final int ILLEGAL_SPEED
NO_SUCH_TRAIN
public static final int NO_SUCH_TRAIN
NO_SUCH_SWITCH
public static final int NO_SUCH_SWITCH
NO_SUCH_POS
public static final int NO_SUCH_POS
TRAIN_ON_SWITCH
public static final int TRAIN_ON_SWITCH
status
protected int status
CommandStatus
public CommandStatus(int status)
- Creates a new CommandStatus message.
- Parameters:
status
- the status of the command.
getStatus
public int getStatus()
- Returns the status of the command.
- Returns:
- the status of the command.
toString
public java.lang.String toString()
- Returns the string representation of the CommandStatus class.
this representation is used when creating exception messages.
- Overrides:
- toString in class java.lang.Object
- Returns:
- the string representation of the stauts of the command.