TSim
Class CommandStatus
java.lang.Object
TSim.CommandStatus
- All Implemented Interfaces:
- TSimInformation
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
- See Also:
- Constant Field Values
ILLEGAL_SPEED
public static final int ILLEGAL_SPEED
- See Also:
- Constant Field Values
NO_SUCH_TRAIN
public static final int NO_SUCH_TRAIN
- See Also:
- Constant Field Values
NO_SUCH_SWITCH
public static final int NO_SUCH_SWITCH
- See Also:
- Constant Field Values
NO_SUCH_POS
public static final int NO_SUCH_POS
- See Also:
- Constant Field Values
TRAIN_ON_SWITCH
public static final int TRAIN_ON_SWITCH
- See Also:
- Constant Field Values
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.