|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.inet.sensorsim.BatteryBase
drcl.inet.sensorsim.BatteryCoinCell
This class implements a Coin Cell battery.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static double |
VOLTAGE
|
| Fields inherited from class drcl.inet.sensorsim.BatteryBase |
battery, batteryOut, CPU_MODEL, FORK_PORT, MAX_COMPONENT, RADIO_MODEL, SENSOR_MODEL |
| Constructor Summary | |
BatteryCoinCell()
|
|
BatteryCoinCell(double energy)
|
|
| Method Summary | |
int |
changeCurrent(double cur,
int componentID)
Changes the current drained by a power consumer. |
double |
energy()
Gets the energy. |
double |
energyPercent()
Gets the percentage of the energy that has been spent so far. |
double |
energySpent()
Gets the energy that has been spent so far. |
void |
initializeCoinCell()
Initializes the current-capacity table. |
boolean |
isDead()
Returns true if all of the energy has been consumed. |
int |
setEnergy(double newEnergyValue)
Sets the energy of the battery. |
void |
updateEnergy()
Calculates the new value of the energy. |
| Methods inherited from class drcl.inet.sensorsim.BatteryBase |
initialize, initialize, setBatteryID |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final double VOLTAGE
| Constructor Detail |
public BatteryCoinCell()
public BatteryCoinCell(double energy)
| Method Detail |
public void initializeCoinCell()
public void updateEnergy()
public double energy()
energy in class BatteryBasepublic double energyPercent()
energyPercent in class BatteryBasepublic double energySpent()
energySpent in class BatteryBasepublic boolean isDead()
isDead in class BatteryBase
public int changeCurrent(double cur,
int componentID)
changeCurrent in class BatteryBasepublic int setEnergy(double newEnergyValue)
setEnergy in class BatteryBase
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||