RoboJDETM v2.0

com.ridgesoft.robotics.behaviors
Class StopBehavior

java.lang.Object
  extended by com.ridgesoft.robotics.behaviors.AbstractBehavior2
      extended by com.ridgesoft.robotics.behaviors.StopBehavior
All Implemented Interfaces:
Behavior, Behavior2

public class StopBehavior
extends AbstractBehavior2

Implements a behavior that will cause a robot to stop when the behavior is active.

See Also:
BehaviorArbiter

Field Summary
 
Fields inherited from class com.ridgesoft.robotics.behaviors.AbstractBehavior2
mEnabled, mIsActive, mListener
 
Constructor Summary
StopBehavior(Navigator navigator, boolean enabled)
          Constructs a StopBehavior object.
 
Method Summary
 boolean poll()
          This method is invoked at regular intervals to determine if the behavior desires to control the robot.
 
Methods inherited from class com.ridgesoft.robotics.behaviors.AbstractBehavior2
setActive, setEnabled, setListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

StopBehavior

public StopBehavior(Navigator navigator,
                    boolean enabled)
Constructs a StopBehavior object.

Parameters:
navigator - the robot's navigator
enabled - initial enabled state of the behavior
Method Detail

poll

public boolean poll()
This method is invoked at regular intervals to determine if the behavior desires to control the robot.

If active, this method will also instruct the robot to stop.

Specified by:
poll in interface Behavior
Specified by:
poll in class AbstractBehavior2
Returns:
true if the behavior wants control of the robot, otherwise false

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com