|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Defines the interface for classes wishing to be responsible for communication between the rest of the software and the machine it is controlling.
| Method Summary | |
void |
addDrinkButtonListener(DrinkButtonListener dbl)
Add a listener to the list of objects requesting callbacks from the buttons |
void |
delDrinkButtonListener(DrinkButtonListener dbl)
Removes a listener from the list of objects requesting callbacks from the buttons. |
int |
drinksDropped(int slot)
Returns the number of drinks that have been dropped by the given slot. |
int |
drinksLeft(int slot)
Returns the number of drinks left in a given slot. |
String |
drop(int slot)
Drops a drink on the specified index. |
Vector |
getDrinkNames()
Returns a Vector of String objects specifying the names of the slots. |
String |
getName(int slot)
Returns the name of the the specified slot. |
int |
getNumSlots()
Returns the number of slots that can carry soda. |
int |
getPrice(int slot)
Returns the price of the drink in the associated slot. |
Slot |
getSlot(int slot)
Returns the Slot object associated with the slot index. |
Slot[] |
getSlotArray()
Returns an array of the Slot objects that store the slot information. |
String |
getSlotPrintout()
Returns a preformatted printout of the slot information. |
Float |
getTempKey(String key)
Returns the temperature from the sensor with the given name (key). |
boolean |
isEnabled(int slot)
Checks to see if a slot is enabled or disabled. |
void |
lightOff(int slot)
Turns the (empty) light of for the specified slot. |
void |
lightOn(int slot)
Turns the (empty) light on for the specified slot. |
void |
setSlot(int slot,
Slot s)
Sets the Slot object associated with the specified slot index. |
void |
shutdown(boolean reboot)
Shuts down the server and the hardware it is running on. |
Vector |
slotTemp(int slot)
Returns a Vector of Float objects representing the temperatures of all the temperature sensors for the slot. |
float |
slotTempAvg(int slot)
Returns the average temperature of all the temperature sensors for the given slot. |
long |
uptime()
Returns the amount of time the system has been up for, in milliseconds |
| Method Detail |
public long uptime()
public int getNumSlots()
public Slot getSlot(int slot)
slot - The slot index of the Slot to return.
public Slot[] getSlotArray()
public String getSlotPrintout()
public Vector getDrinkNames()
public String getName(int slot)
public int getPrice(int slot)
slot - The slot to retrieve the price for.
public int drinksLeft(int slot)
slot - The slot to retrieve the count of.
public int drinksDropped(int slot)
slot - The slot to retrieve the number of dropped drinks for.
public boolean isEnabled(int slot)
slot - The slot to check.
public void setSlot(int slot,
Slot s)
slot - The slot index to change.s - The Slot object to associate with the slot index.public Float getTempKey(String key)
key - The name (not the address) of the temperature sensor
public Vector slotTemp(int slot)
slot - The slot to retrieve the temperatures for.
public float slotTempAvg(int slot)
slot - The slot to retrieve the average temperature for.
public void shutdown(boolean reboot)
reboot - Whether or not to reboot the hardware.public String drop(int slot)
slot - The slot to drop.
public void lightOn(int slot)
slot - The slot whose light to activate(int)public void lightOff(int slot)
slot - The slot whose light to deactivate.lightOn(int)public void addDrinkButtonListener(DrinkButtonListener dbl)
dbl - The DrinkButtonListener to add.public void delDrinkButtonListener(DrinkButtonListener dbl)
dbl - The DrinkButtonListener to remove.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||