nachos.machine
Class ElevatorEvent

java.lang.Object
  extended by nachos.machine.ElevatorEvent

public final class ElevatorEvent
extends Object

An event that affects elevator software.


Field Summary
 int elevator
          The elevator pertaining to the event, or -1 if not applicable.
 int event
          The event identifier.
static int eventDownButtonPressed
          A down button was pressed.
static int eventElevatorArrived
          An elevator has arrived and stopped at its destination floor.
static int eventFloorButtonPressed
          A floor button was pressed inside an elevator.
static int eventRidersDone
          All riders have finished; the elevator controller should terminate.
static int eventUpButtonPressed
          An up button was pressed.
 int floor
          The floor pertaining to the event, or -1 if not applicable.
 
Constructor Summary
ElevatorEvent(int event, int floor, int elevator)
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

event

public final int event
The event identifier. Refer to the event* constants.


floor

public final int floor
The floor pertaining to the event, or -1 if not applicable.


elevator

public final int elevator
The elevator pertaining to the event, or -1 if not applicable.


eventUpButtonPressed

public static final int eventUpButtonPressed
An up button was pressed.

See Also:
Constant Field Values

eventDownButtonPressed

public static final int eventDownButtonPressed
A down button was pressed.

See Also:
Constant Field Values

eventFloorButtonPressed

public static final int eventFloorButtonPressed
A floor button was pressed inside an elevator.

See Also:
Constant Field Values

eventElevatorArrived

public static final int eventElevatorArrived
An elevator has arrived and stopped at its destination floor.

See Also:
Constant Field Values

eventRidersDone

public static final int eventRidersDone
All riders have finished; the elevator controller should terminate.

See Also:
Constant Field Values
Constructor Detail

ElevatorEvent

public ElevatorEvent(int event,
                     int floor,
                     int elevator)