SunSPOT API V5.0


com.sun.spot.peripheral
Interface IFiqInterruptDaemon

All Known Implementing Classes:
FiqInterruptDaemon

public interface IFiqInterruptDaemon


Method Summary
 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 setExternalPowerHandler(IEventHandler handler)
          Replace the existing handler for external power applied events 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.
 

Method Detail

setAlarmHandler

IEventHandler setAlarmHandler(IEventHandler handler)
Replace the existing handler for power controller time alarms with a user-supplied handler. It is very unlikely that you will want to create a handler for time alarms. The default handler logs a message if spot.diagnostics is set. The previous handler is returned, so you can chain your new handler to that one.

Parameters:
handler - the new handler to use
Returns:
the previous handler

setButtonHandler

IEventHandler setButtonHandler(IEventHandler handler)
Replace the existing handler for reset button presses with a user-supplied handler. The default handler calls VM.stopVM(0). The previous handler is returned, so you can chain your new handler to that one.

Parameters:
handler - the new handler to use
Returns:
the previous handler

setPowerOffHandler

IEventHandler setPowerOffHandler(IEventHandler handler)
Replace the existing handler for poweroff with a user-supplied handler. The power off event occurs when the user uses the reset button to turn off the SPOT. The handler has about 400ms to do work before the power goes away. The default handler does nothing. The previous handler is returned, so you can chain your new handler to that one.

Parameters:
handler - the new handler to use
Returns:
the previous handler

setLowBatteryHandler

IEventHandler setLowBatteryHandler(IEventHandler handler)
Replace the existing handler for low battery warnings with a user-supplied handler. The default handler logs a message if spot.diagnostics is set. The previous handler is returned, so you can chain your new handler to that one.

Parameters:
handler - the new handler to use
Returns:
the previous handler

setExternalPowerHandler

IEventHandler setExternalPowerHandler(IEventHandler handler)
Replace the existing handler for external power applied events with a user-supplied handler. The default handler logs a message if spot.diagnostics is set. The previous handler is returned, so you can chain your new handler to that one.

Parameters:
handler - the new handler to use
Returns:
the previous handler

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.