Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ElevatorInspector Class Reference

Data structures to control elevator device self test. Definition private to this module. More...

Inheritance diagram for ElevatorInspector::

CallBackObj List of all members.

Public Methods

 ElevatorInspector ()
 ~ElevatorInspector ()
void RiderTest ()
void ControllerTest ()
void CallBack ()

Private Methods

ElevatorEvent WaitForNextRiderEvent (int *floor, int *elevator)
ElevatorEvent WaitForNextControllerEvent (int *floor, int *elevator)

Private Attributes

ElevatorBankelevators
SemaphoreriderWakeup
SemaphorecontrollerWakeup

Detailed Description

Data structures to control elevator device self test. Definition private to this module.

Definition at line 19 of file elevatortest.cc.


Constructor & Destructor Documentation

ElevatorInspector::ElevatorInspector ( )
 

ElevatorInspector::ElevatorInspector Allocate and initialize data structures for testing the elevator simulation.

Definition at line 87 of file elevatortest.cc.

ElevatorInspector::~ElevatorInspector ( )
 

ElevatorInspector::~ElevatorInspector Deallocate data structures for testing the elevator simulation.

Definition at line 99 of file elevatortest.cc.


Member Function Documentation

void ElevatorInspector::CallBack ( ) [virtual]
 

ElevatorInspector::CallBack Handle an event; since we don't know whether it is a rider event or a controller event, just wake them both up. If there's no event pending, they'll just go right back to sleep.

Reimplemented from CallBackObj.

Definition at line 169 of file elevatortest.cc.

void ElevatorInspector::ControllerTest ( )
 

ElevatorInspector::ControllerTest Behave like an elevator controller, for testing the elevator simulation.

Definition at line 136 of file elevatortest.cc.

Referenced by ControllerTest().

void ElevatorInspector::RiderTest ( )
 

ElevatorInspector::RiderTest Behave like a rider, going from floor 0 to floor 1.

Definition at line 112 of file elevatortest.cc.

Referenced by ElevatorSelfTest().

ElevatorEvent ElevatorInspector::WaitForNextControllerEvent ( int * floor,
int * elevator ) [inline, private]
 

Definition at line 48 of file elevatortest.cc.

Referenced by ControllerTest().

ElevatorEvent ElevatorInspector::WaitForNextRiderEvent ( int * floor,
int * elevator ) [inline, private]
 

Definition at line 39 of file elevatortest.cc.

Referenced by RiderTest().


Member Data Documentation

Semaphore * ElevatorInspector::controllerWakeup [private]
 

Definition at line 33 of file elevatortest.cc.

ElevatorBank * ElevatorInspector::elevators [private]
 

Definition at line 31 of file elevatortest.cc.

Semaphore * ElevatorInspector::riderWakeup [private]
 

Definition at line 32 of file elevatortest.cc.


The documentation for this class was generated from the following file:
Generated at Wed Jul 4 11:32:23 2001 for Nachos by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001