SunSPOT API V5.0


com.sun.spot.sensorboard.peripheral
Interface ILightSensorThresholdListener


public interface ILightSensorThresholdListener

Implemented by classes wanting a call back when the light sensor value goes above or below specified thresholds.


Method Summary
 void thresholdChanged(ILightSensor light, int low, int high)
          Callback for when the light sensor thresholds are changed.
 void thresholdExceeded(ILightSensor light, int val)
          Callback for when the light sensor value goes above or below the specified thresholds.
 

Method Detail

thresholdExceeded

void thresholdExceeded(ILightSensor light,
                       int val)
Callback for when the light sensor value goes above or below the specified thresholds.

Parameters:
light - the ILightSensor that has crossed a threshold.
val - the current light sensor reading.

thresholdChanged

void thresholdChanged(ILightSensor light,
                      int low,
                      int high)
Callback for when the light sensor thresholds are changed.

Parameters:
light - the ILightSensor that had its threshold values changed.
low - the new light sensor low threshold value.
high - the new light sensor high threshold value.

SunSPOT API V5.0


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