ch.aplu.nxt
Class UltrasonicAdapter

java.lang.Object
  extended by ch.aplu.nxt.UltrasonicAdapter
All Implemented Interfaces:
UltrasonicListener

public class UltrasonicAdapter
extends java.lang.Object
implements UltrasonicListener

Class with empty callback methods for the ultrasonic sensor.


Constructor Summary
UltrasonicAdapter()
           
 
Method Summary
 void far(SensorPort port, int level)
          Empty method called when the distance exceeds the trigger level.
 void near(SensorPort port, int level)
          Empty method called when the distance falls below the trigger level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UltrasonicAdapter

public UltrasonicAdapter()
Method Detail

far

public void far(SensorPort port,
                int level)
Empty method called when the distance exceeds the trigger level. Override it to process the event.

Specified by:
far in interface UltrasonicListener
Parameters:
port - the port where the sensor is plugged in
level - the current distance level

near

public void near(SensorPort port,
                 int level)
Empty method called when the distance falls below the trigger level. Override it to process the event.

Specified by:
near in interface UltrasonicListener
Parameters:
port - the port where the sensor is plugged in
level - the current distance level