|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IPowerController
| Field Summary | |
|---|---|
static byte |
ALARM_EVENT
|
static byte |
BATTERY_EVENT
|
static byte |
BUTTON_EVENT
|
static byte |
COLD_BOOT_EVENT
|
static byte |
EXTERNAL_POWER_EVENT
|
static byte |
GET_ALARM_CMD
|
static byte |
GET_POWER_STATUS_CMD
|
static byte |
GET_STATUS_CMD
|
static byte |
GET_STRING_CMD
|
static byte |
GET_STRING_LEN_CMD
|
static byte |
LOW_BATTERY_EVENT
|
static byte |
OVERLOAD_FAULT
|
static byte |
POWERUP_FAULT
|
static byte |
QUERY_I_CHARGE
|
static byte |
QUERY_I_DISCHARGE
|
static byte |
QUERY_I_MAX
|
static byte |
QUERY_STARTUP
|
static byte |
QUERY_V_BATT
|
static byte |
QUERY_V_CC
|
static byte |
QUERY_V_CORE
|
static byte |
QUERY_V_EXT
|
static byte |
QUERY_V_USB
|
static byte |
SENSOR_EVENT
|
static byte |
SET_ALARM_CMD
|
static byte |
SET_CONTROL_CMD
|
static byte |
SET_INDICATE_CMD
|
static byte |
SET_TIME_CMD
|
static byte |
SHOW_ALARM
|
static byte |
SHOW_BATTERYON
|
static byte |
SHOW_BUTTON
|
static byte |
SHOW_EXTERNAL
|
static byte |
SHOW_EXTERNALON
|
static byte |
SHOW_PFAULT
|
static byte |
SHOW_SLEEP
|
static byte |
SLEEP_EVENT
|
static byte |
VBATT_FAULT
|
static byte |
VCC_FAULT
|
static byte |
VCORE_FAULT
|
static byte |
VEXT_FAULT
|
static byte |
VUSB_FAULT
|
static byte |
WAKE_ON_INTERRUPT
|
| Method Summary | |
|---|---|
void |
disableSynchronisation()
Disable automatic synchronisation between PowerController time and System time. |
void |
enableSynchronisation()
Re-enable automatic synchronisation after a previous call to disableSynchronisation. |
int |
getIcharge()
Return the current charging the battery in milliamps. |
int |
getIdischarge()
Return the current being drawn from the battery in milliamps. |
int |
getIMax()
Return the maximum current (in milliamps) that has been drawn from the battery since the last time this was called. |
int |
getPowerStatus()
Return a bit mask of possible power faults. |
String |
getRevision()
Get the power control PowerController firmware revision string. |
int |
getStartupTime()
Return the time it took (in microseconds) for the power to stabilize from startup. |
int |
getStatus()
Get the reason for the last power control PowerController interrupt. |
long |
getTime()
Get the power control PowerController's time. |
int |
getVbatt()
Return the battery supply voltage in millivolts (nominally 2700mv - 4700mv). |
int |
getVcc()
Return the main board IO voltage in millivolts (nominally 3000mv). |
int |
getVcore()
Return the ARM CPU core voltage in millivolts (nominally 1800mv). |
int |
getVext()
Return the voltage supplied by an external power source (if any) in millivolts (nominally 0mv - 5500mv). |
int |
getVusb()
Return the externally supplied USB voltage (if any) in millivolts (nominally 5000mv). |
void |
setControl(byte mask)
Set a bit mask to control whether the power controller accepts interrupts from the sensor board and uses them to wake the SPOT if it is sleeping. |
void |
setIndicate(byte mask)
Set a bit mask to control the power controller LED. |
void |
setTime(long systemTimeMillis)
Set the power control PowerController's time. |
| Field Detail |
|---|
static final byte GET_STATUS_CMD
static final byte QUERY_V_CORE
static final byte QUERY_V_CC
static final byte QUERY_V_BATT
static final byte QUERY_V_EXT
static final byte QUERY_V_USB
static final byte QUERY_I_CHARGE
static final byte QUERY_I_DISCHARGE
static final byte GET_ALARM_CMD
static final byte GET_STRING_LEN_CMD
static final byte GET_STRING_CMD
static final byte SET_TIME_CMD
static final byte SET_ALARM_CMD
static final byte QUERY_I_MAX
static final byte SET_INDICATE_CMD
static final byte QUERY_STARTUP
static final byte GET_POWER_STATUS_CMD
static final byte SET_CONTROL_CMD
static final byte COLD_BOOT_EVENT
static final byte BUTTON_EVENT
static final byte ALARM_EVENT
static final byte SENSOR_EVENT
static final byte BATTERY_EVENT
static final byte SLEEP_EVENT
static final byte LOW_BATTERY_EVENT
static final byte EXTERNAL_POWER_EVENT
static final byte VBATT_FAULT
static final byte VUSB_FAULT
static final byte VEXT_FAULT
static final byte VCC_FAULT
static final byte VCORE_FAULT
static final byte POWERUP_FAULT
static final byte OVERLOAD_FAULT
static final byte SHOW_BUTTON
static final byte SHOW_ALARM
static final byte SHOW_SLEEP
static final byte SHOW_PFAULT
static final byte SHOW_EXTERNAL
static final byte SHOW_BATTERYON
static final byte SHOW_EXTERNALON
static final byte WAKE_ON_INTERRUPT
| Method Detail |
|---|
String getRevision()
long getTime()
void setTime(long systemTimeMillis)
systemTimeMillis - the time in milliseconds since midnight Jan 1, 1970int getStatus()
int getVcore()
int getVcc()
int getVbatt()
int getVext()
int getVusb()
int getIcharge()
int getIdischarge()
void disableSynchronisation()
void enableSynchronisation()
int getIMax()
int getStartupTime()
int getPowerStatus()
void setIndicate(byte mask)
void setControl(byte mask)
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||