|
Insulin Pump |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--GenericTestBed | +--ToyTestBed
A minimal test bed class to demonstrate the use of GenericTestBed
.
You can run this ToyTestBed by using
java ToyTestBed
Fields inherited from class GenericTestBed |
display, hardware |
Constructor Summary | |
ToyTestBed()
|
Method Summary | |
void |
aNewSecondHasPassed()
This method is called each time the Clock class
completes a control loop cycle. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class GenericTestBed |
destroyInsulinPump, getActiveTestBedObject, getSimulationTime, launchNewInsulinPump, printMessage, setDurationOfOneSecondInMS |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ToyTestBed()
Method Detail |
public void aNewSecondHasPassed()
GenericTestBed
Clock
class
completes a control loop cycle. In this method you can use the
hardware simulation interface GenericTestBed.hardware
to simulate
failures, the display simulation interface GenericTestBed.display
to
activate the human computer interface and read the displays.
GenericTestBed
provides a number of 'helper' methods
(listed below) that you can use inside GenericTestBed.aNewSecondHasPassed()
to get information on the simulation,
print messages, and to modify some parameters of the execution.
Note that the pump will execute until GenericTestBed.destroyInsulinPump()
is called. If GenericTestBed.destroyInsulinPump()
is not called inside GenericTestBed.aNewSecondHasPassed()
the pump never stops.
aNewSecondHasPassed
in class GenericTestBed
GenericTestBed
GenericTestBed.getSimulationTime()
,
GenericTestBed.printMessage(String)
,
GenericTestBed.destroyInsulinPump()
,
GenericTestBed.setDurationOfOneSecondInMS(int)
public static void main(java.lang.String[] args)
|
Insulin Pump |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |