A C D G I L M R S T

A

acquire() - Method in class TSim.Semaphore
Acquire semaphore (P operation).
ACTIVE - Static variable in class TSim.SensorEvent
Sensor event type: leading end of train has hit sensor.

C

CommandException - Exception in TSim
Thrown when a command to TSim fails.
CommandException(String) - Constructor for exception TSim.CommandException
Constructs an CommandException with the specified detailed error message.

D

DERAILMENT - Static variable in class TSim.TrainEvent
Event type: Train has run off the rails.

G

getEvent() - Method in class TSim.TrainEvent
Returns the type of the event.
getSemaphore(int) - Method in class TSim.TSimInterface
Create a semaphore with specified starting value.
getSensor() - Method in class TSim.TSimInterface
Wait until the train passes a sensor.
getStatus() - Method in class TSim.SensorEvent
Returns the status of the sensor; either ACTIVE or INACTIVE.
getXpos() - Method in class TSim.SensorEvent
Returns the x coordinate of the affected sensor.
getYpos() - Method in class TSim.SensorEvent
Returns the y coordinate of the affected sensor.

I

INACTIVE - Static variable in class TSim.SensorEvent
Sensor event type: trailing end of train has left sensor.

L

loadUnload() - Method in class TSim.TSimInterface
Load and unload as necessary at station.

M

main(String[]) - Static method in class TSim.TSimFactory
Main train controller method.

R

release() - Method in class TSim.Semaphore
Release semaphore (V operation).
run() - Method in class TSim.TSimInterface
 

S

Semaphore - Class in TSim
Semaphore shared with other trains on the same track.
SensorEvent - Class in TSim
SensorEvent represents the event of a train passing over a sensor.
setSpeed(int) - Method in class TSim.TSimInterface
Set train target speed to the given value.
setSwitch(int, int, int) - Method in class TSim.TSimInterface
Set the position of the specified switch.
STOP_COLLISION - Static variable in class TSim.TrainEvent
Event type: Train has collided with a stop at the end of the track.
SWITCH_LEFT - Static variable in class TSim.TSimInterface
Switch state: switch points to the left.
SWITCH_RIGHT - Static variable in class TSim.TSimInterface
Switch state: switch points to the right.

T

toString() - Method in class TSim.TrainEvent
Returns a string representation of the event.
TRAIN_COLLISION - Static variable in class TSim.TrainEvent
Event type: Train has collided with another train.
TrainEvent - Class in TSim
An (erroneous) event for a train.
TrainEvent(int) - Constructor for class TSim.TrainEvent
Create a new TrainEvent for the specified train id and with the specified event type.
tryAcquire() - Method in class TSim.Semaphore
Acquire semaphore if free.
TSim - package TSim
 
TSimFactory - Class in TSim
Class that creates a new TSimInterface and starts it.
TSimFactory() - Constructor for class TSim.TSimFactory
 
TSimInformation - Interface in TSim
Collection type of the messages from TSim.
TSimInterface - Class in TSim
The TSimInterface is the intended interface between TSim and the laboration.

A C D G I L M R S T