|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.peripheral.FiqInterruptDaemon
public class FiqInterruptDaemon
The FiqInterruptDaemon gives access to the handlers used for various notifications
from the power controller. A handler that implements IEventHandler
can be
supplied to handle a specific event, replacing the existing handler (all events
have a default handler). Note that the handler is called at MAX_SYS_PRIORITY.
Your code should reduce the priority as appropriate.
Constructor Summary | |
---|---|
FiqInterruptDaemon(IPowerController powerController)
|
Method Summary | |
---|---|
String |
getDriverName()
An identifying name for the driver (e.g. |
void |
run()
When an object implementing interface Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
IEventHandler |
setAlarmHandler(IEventHandler handler)
Replace the existing handler for power controller time alarms with a user-supplied handler. |
IEventHandler |
setButtonHandler(IEventHandler handler)
Replace the existing handler for reset button presses with a user-supplied handler. |
IEventHandler |
setLowBatteryHandler(IEventHandler handler)
Replace the existing handler for low battery warnings with a user-supplied handler. |
IEventHandler |
setPowerOffHandler(IEventHandler handler)
Replace the existing handler for poweroff with a user-supplied handler. |
void |
setUp()
Activate or reactivate the driver (after a deep sleep or when another driver refused to deep sleep). |
void |
shutDown()
Notify the driver that the VM is about to exit. |
void |
startThreads()
|
boolean |
tearDown()
Deactivate the driver (usually in preparation for deep sleep). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FiqInterruptDaemon(IPowerController powerController)
Method Detail |
---|
public void startThreads()
public void run()
Runnable
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
The general contract of the method run
is that it may
take any action whatsoever.
run
in interface Runnable
Thread.run()
public IEventHandler setAlarmHandler(IEventHandler handler)
handler
- the new handler to use
public IEventHandler setButtonHandler(IEventHandler handler)
handler
- the new handler to use
public IEventHandler setPowerOffHandler(IEventHandler handler)
handler
- the new handler to use
public IEventHandler setLowBatteryHandler(IEventHandler handler)
handler
- the new handler to use
public String getDriverName()
IDriver
getDriverName
in interface IDriver
public void setUp()
IDriver
setUp
in interface IDriver
public void shutDown()
IDriver
shutDown
in interface IDriver
public boolean tearDown()
IDriver
tearDown
in interface IDriver
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |