Insulin Pump


Class ToyTestBed

java.lang.Object
  |
  +--GenericTestBed
        |
        +--ToyTestBed

public class ToyTestBed
extends GenericTestBed

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

ToyTestBed

public ToyTestBed()
Method Detail

aNewSecondHasPassed

public void aNewSecondHasPassed()
Description copied from class: GenericTestBed
This method is called each time the 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.

Overrides:
aNewSecondHasPassed in class GenericTestBed
Following copied from class: GenericTestBed
See Also:
GenericTestBed.getSimulationTime(), GenericTestBed.printMessage(String), GenericTestBed.destroyInsulinPump(), GenericTestBed.setDurationOfOneSecondInMS(int)

main

public static void main(java.lang.String[] args)

Insulin Pump