A C D E G I N O P R S T U V X Y

A

ACTIVE - Static variable in class TSim.SensorEvent
 

C

CommandException - exception TSim.CommandException.
Thrown when a command to TSim fails.
CommandException(String) - Constructor for class TSim.CommandException
Constructs an CommandException with the specified detailed error message.
commandFIFO - Variable in class TSim.TSimInterface
 
CommandStatus - class TSim.CommandStatus.
CommandStatus represents the responses from TSim that does not carry information about sensors or trains but rather if the command issued succeeded or not.
CommandStatus(int) - Constructor for class TSim.CommandStatus
Creates a new CommandStatus message.

D

data - Variable in class TSim.SynchronizedFIFO
 
DERAILMENT - Static variable in class TSim.TrainEvent
 

E

event - Variable in class TSim.TrainEvent
 

G

get() - Method in class TSim.SynchronizedFIFO
Removes and returns the first object in the FIFO if such exists.
get(int) - Method in class TSim.SynchronizedSensorVector
Returns the FIFO associated with a specific train and allocates a new FIFO and expands the vector if it was the first request for that train id.
get(int) - Method in class TSim.SynchronizedTrainEventVector
Get the last event for the train represented by the id.
getEvent() - Method in class TSim.TrainEvent
Returns the type of the event.
getSensor(int) - Method in class TSim.TSimInterface
Wait until the specified train passes a sensor.
getStatus() - Method in class TSim.CommandStatus
Returns the status of the command.
getStatus() - Method in class TSim.SensorEvent
Returns the status of the sensor; either ACTIVE or INACTIVE.
getTrainId() - Method in class TSim.SensorEvent
Returns the id of the train affectng the sensor.
getTrainId() - Method in class TSim.TrainEvent
Returns the id of the train affected byt the event.
getTSimInterface() - Static method in class TSim.TSimFactory
Creates a new TSimInterface and starts a new thread that runs the data collecting part of the inteface.
getXpos() - Method in class TSim.SensorEvent
Returns the x coordinate of the affected sensor.
getYpos() - Method in class TSim.SensorEvent
Returns theyx coordinate of the affected sensor.

I

ILLEGAL_SPEED - Static variable in class TSim.CommandStatus
 
INACTIVE - Static variable in class TSim.SensorEvent
 

N

NO_SUCH_POS - Static variable in class TSim.CommandStatus
 
NO_SUCH_SWITCH - Static variable in class TSim.CommandStatus
 
NO_SUCH_TRAIN - Static variable in class TSim.CommandStatus
 

O

OK - Static variable in class TSim.CommandStatus
 

P

put(int, SynchronizedFIFO) - Method in class TSim.SynchronizedSensorVector
Stores the given FIFO at the specified position in the vector.
put(int, TrainEvent) - Method in class TSim.SynchronizedTrainEventVector
Store the given train event for the specified train.
put(Object) - Method in class TSim.SynchronizedFIFO
Puts an object first in the FIFO.

R

read() - Method in class TSim.TSimStream
Reads from the input stream and returns a class representing the message from TSim.
readInt(StreamTokenizer) - Method in class TSim.TSimStream
Help method that reads an integer from the tokenizer and returns it or throws an exception if the next token was not an integer.
readString(StreamTokenizer) - Method in class TSim.TSimStream
Help method that reads a string from the tokenizer and returns it or throws an exception if the next token was not a string.
reportTrainEvent(TrainEvent) - Method in class TSim.TSimInterface
Helper method that reports an error event on standard error.
run() - Method in class TSim.TSimInterface
 

S

SensorEvent - class TSim.SensorEvent.
SensorEvent represents the event of a train passing over a sensor.
SensorEvent(int, int, int, int) - Constructor for class TSim.SensorEvent
Creates a new SensorEvent for a specific train and sensor.
sensorVec - Variable in class TSim.TSimInterface
 
setSpeed(int, int) - Method in class TSim.TSimInterface
Method that issues a command to a secific train to set its speed to the given value.
setSwitch(int, int, int) - Method in class TSim.TSimInterface
Set the position of the specified switch.
status - Variable in class TSim.CommandStatus
 
status - Variable in class TSim.SensorEvent
 
sTokenizer - Variable in class TSim.TSimStream
 
STOP_COLLISION - Static variable in class TSim.TrainEvent
 
sTSim - Variable in class TSim.TSimInterface
 
SWITCH_LEFT - Static variable in class TSim.TSimInterface
 
SWITCH_RIGHT - Static variable in class TSim.TSimInterface
 
SynchronizedFIFO - class TSim.SynchronizedFIFO.
The SynchronizedFIFO class implements a freely growable FIFO.
SynchronizedFIFO(int) - Constructor for class TSim.SynchronizedFIFO
Creates a new SynchronizedFIFO with given initial size.
SynchronizedSensorVector - class TSim.SynchronizedSensorVector.
Every train has an FIFO of sensor events associated with it.
SynchronizedSensorVector(int) - Constructor for class TSim.SynchronizedSensorVector
Creates a new SynchronizedSensorVector with the given initial size.
SynchronizedTrainEventVector - class TSim.SynchronizedTrainEventVector.
Associated with every train is a position in a vector consisting of the last error event of that particular train.
SynchronizedTrainEventVector(int) - Constructor for class TSim.SynchronizedTrainEventVector
Creates a new SynchronizedTrainEventVector with the specified initial size.

T

toString() - Method in class TSim.CommandStatus
Returns the string representation of the CommandStatus class.
toString() - Method in class TSim.TrainEvent
Returns a string representation of the event.
TRAIN_COLLISION - Static variable in class TSim.TrainEvent
 
TRAIN_ON_SWITCH - Static variable in class TSim.CommandStatus
 
TrainEvent - class TSim.TrainEvent.
Class representing an (erroneous) event for a train.
TrainEvent(int, int) - Constructor for class TSim.TrainEvent
Creates a new TrainEvent for the specified train id and with the specified event type.
trainId - Variable in class TSim.SensorEvent
 
trainId - Variable in class TSim.TrainEvent
 
trainVec - Variable in class TSim.TSimInterface
 
TSimFactory - class TSim.TSimFactory.
Class that creates a new TSimInterface and starts it.
TSimFactory() - Constructor for class TSim.TSimFactory
 
TSimInformation - interface TSim.TSimInformation.
Collection type of the messages from TSim.
TSimInterface - class TSim.TSimInterface.
The TSimInterface is the intended interface between TSim and the laboration.
TSimInterface() - Constructor for class TSim.TSimInterface
Create a new TSimInterface
TSimStream - class TSim.TSimStream.
Reads text from the given input stream connected to TSim and returns a stream of TSimInformation.
TSimStream(InputStream) - Constructor for class TSim.TSimStream
Creates a new TSimStream that reads from the given InputStream.

U

UnparsableInputException - exception TSim.UnparsableInputException.
 
UnparsableInputException(String) - Constructor for class TSim.UnparsableInputException
 

V

vect - Variable in class TSim.SynchronizedSensorVector
 
vect - Variable in class TSim.SynchronizedTrainEventVector
 

X

xPos - Variable in class TSim.SensorEvent
 

Y

yPos - Variable in class TSim.SensorEvent
 

A C D E G I N O P R S T U V X Y