|
SunSPOT API V4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBattery
Field Summary | |
---|---|
static int |
CHARGETIME
|
static byte |
CHARGING
|
static byte |
DEAD_BATTERY
|
static byte |
DISCHARGING
|
static byte |
EXT_POWERED
|
static byte |
LOW_BATTERY
|
static byte |
NO_BATTERY
|
static byte |
OUT_OF_RANGE_TEMP
|
static int |
RUNTIME
|
static int |
SLEEPTIME
|
Method Summary | |
---|---|
boolean |
calibrationCycleDetected()
Returns true when the battery has been depleted to low battery and then charged fully. |
double |
getAvailableCapacity()
Get the batteries remaining capacity in maHr. |
int |
getBatteryLevel()
Battery level returns an integer indicating remaining capacity in percentage (0 is empty, 100 is fully charged) |
short |
getChargeCount()
Return the number of times the SPOT has seen a full charge. |
double |
getMaximumCapacity()
Get the batteries measured maximum capacity in maHr. |
String |
getModelNumber()
Battery model must match battery used for accurate measurements. |
double |
getRatedCapacity()
Returns rated capacity of the battery (as written on the label) . |
int |
getSleepCurrent()
Sleepcurrent is microamps written to the SPOT for use in calculating sleep current. |
byte |
getState()
The state of battery is returned. |
String |
getStateAsString(int state)
The state of battery is returned as a string: no battery, dead battery, low battery, discharging, charging, fully charged |
long[] |
getTime()
Battery time measurements of sleeping since last charge, running since last charge and length of charge time. |
boolean |
hasBattery()
Attempts to detect the presence of the battery. |
boolean |
hasTemperatureSensor()
Returns true if the SPOT has detected a temperature sensor. |
String |
rawBatteryData()
All raw battery data as colon separated one entry per line string. |
void |
setSleepCurrent(int microamps)
SetSleepcurrent writes the sleep current in ADC units to estimate how much power is being consumed while the SPOT is in deep sleep. |
void |
updatePersistantInfo()
force write of battery data from SRAM into EEPROM. |
Field Detail |
---|
static final byte NO_BATTERY
static final byte DEAD_BATTERY
static final byte LOW_BATTERY
static final byte DISCHARGING
static final byte CHARGING
static final byte EXT_POWERED
static final byte OUT_OF_RANGE_TEMP
static final int SLEEPTIME
static final int RUNTIME
static final int CHARGETIME
Method Detail |
---|
String getModelNumber()
int getBatteryLevel()
double getAvailableCapacity()
double getMaximumCapacity()
long[] getTime()
short getChargeCount()
byte getState()
String getStateAsString(int state)
state
- enumerated value returned by getState()
void setSleepCurrent(int microamps)
microamps
- current consumed during deep sleep in microampsboolean hasTemperatureSensor()
boolean hasBattery()
boolean calibrationCycleDetected()
int getSleepCurrent()
double getRatedCapacity()
String rawBatteryData()
void updatePersistantInfo() throws IOException
IOException
- if the power controller does not respond within 10 seconds
|
SunSPOT API V4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |