kaos.robots.capabilities.impl
Class SensorLevelImpl

java.lang.Object
  extended by kaos.robots.capabilities.impl.SensorLevelImpl
All Implemented Interfaces:
KAoSObserver, LevelSensor, RobotObservable

public class SensorLevelImpl
extends java.lang.Object
implements LevelSensor, KAoSObserver, RobotObservable


Field Summary
protected  double _currentLevel
           
protected  int _delay
           
protected  double _stddev
           
protected  double _x
           
protected  double _y
           
 
Constructor Summary
SensorLevelImpl()
           
 
Method Summary
 java.lang.String getID()
          Return the unique identifier of this observer.
 java.lang.Double GetLevel()
          GetLevel
 void newObserver()
           
 void SetLevelDelay(java.util.HashMap properties)
           
 void SetLevelPosition(java.util.HashMap properties)
           
 void SetLevelStdDev(java.util.HashMap properties)
           
 void setParameters(double x, double y, double stddev, int delay)
           
 void setRobot(ExecutionManager kr)
           
 void startListening()
           
 void stopListening()
           
 void update(java.lang.String observableID, java.lang.String updateType, java.lang.Object updateCondition, java.lang.Object update)
          Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_x

protected double _x

_y

protected double _y

_stddev

protected double _stddev

_delay

protected int _delay

_currentLevel

protected double _currentLevel
Constructor Detail

SensorLevelImpl

public SensorLevelImpl()
Method Detail

setRobot

public void setRobot(ExecutionManager kr)
Specified by:
setRobot in interface RobotObservable

setParameters

public void setParameters(double x,
                          double y,
                          double stddev,
                          int delay)

startListening

public void startListening()
Specified by:
startListening in interface RobotObservable

stopListening

public void stopListening()
Specified by:
stopListening in interface RobotObservable

update

public void update(java.lang.String observableID,
                   java.lang.String updateType,
                   java.lang.Object updateCondition,
                   java.lang.Object update)
            throws NotificationException
Description copied from interface: KAoSObserver
Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report.

Specified by:
update in interface KAoSObserver
Parameters:
observableID - String identifying the KAoSObservable sending the update.
updateType - String indicating type of update.
updateCondition - String describing the condition of the update.
update - Object containing the update.
Throws:
NotificationException - when the update fails.

getID

public java.lang.String getID()
Return the unique identifier of this observer.

Specified by:
getID in interface KAoSObserver
Returns:
String containing the unique ID of this observer.

SetLevelPosition

public void SetLevelPosition(java.util.HashMap properties)

SetLevelStdDev

public void SetLevelStdDev(java.util.HashMap properties)

SetLevelDelay

public void SetLevelDelay(java.util.HashMap properties)

GetLevel

public java.lang.Double GetLevel()
                          throws AbortActionException
Description copied from interface: LevelSensor
GetLevel

Specified by:
GetLevel in interface LevelSensor
Returns:
level of reading
Throws:
AbortActionException - wiith possible reasons:

newObserver

public void newObserver()
Specified by:
newObserver in interface RobotObservable