com.ridgesoft.robotics.behaviors
Class StopBehavior
java.lang.Object
com.ridgesoft.robotics.behaviors.AbstractBehavior2
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
Method Summary |
boolean |
poll()
This method is invoked at regular intervals to determine if the behavior
desires to control the robot. |
StopBehavior
public StopBehavior(Navigator navigator,
boolean enabled)
- Constructs a StopBehavior object.
- Parameters:
navigator
- the robot's navigatorenabled
- initial enabled state of the behavior
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
Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com