Main Page   Class Hierarchy   Compound List   Compound Members  

ArAction Class Reference

Action class, what typically makes the robot move. More...

#include <ArAction.h>

Inheritance diagram for ArAction::

ArActionAvoidFront ArActionAvoidSide ArActionBumpers ArActionConstantVelocity ArActionGoto ArActionInput ArActionJoydrive ArActionKeydrive ArActionLimiterBackwards ArActionLimiterForwards ArActionLimiterTableSensor ArActionStallRecover ArActionStop ArActionTurn List of all members.

Public Methods

 ArAction (const char *name, const char *description="")
 Constructor.

virtual ~ArAction (void)
 Desructor.

virtual bool isActive (void)
 Finds out whether the action is active or not.

virtual void activate (void)
 Activate the action.

virtual void deactivate (void)
 Deactivate the action.

virtual ArActionDesiredfire (ArActionDesired currentDesired)=0
 Fires the action, returning what the action wants to do. More...

virtual void setRobot (ArRobot *robot)
 Sets the robot this action is driving.

virtual int getNumArgs (void)
 Find the number of arguments this action takes.

virtual ArArggetArg (int number)
 Gets the numbered argument.

virtual std::string getName (void)
 Gets the name of the action.

virtual std::string getDescription (void)
 Gets the long description of the action.

virtual ArActionDesiredgetDesired (void)
 Gets what this action wants to do (for display purposes).

virtual void print (void)
 ArLog::log s the actions stats.


Protected Methods

void setNextArgument (ArArg const &arg)
 Sets the argument type for the next argument (only use in constructor).


Detailed Description

Action class, what typically makes the robot move.


Member Function Documentation

virtual ArActionDesired* ArAction::fire ArActionDesired    currentDesired [pure virtual]
 

Fires the action, returning what the action wants to do.

Parameters:
currentDesired  this is what the current resolver has for its desired, this is SOLELY for the purpose of giving information to the action
Returns:
pointer to what this action wants to do, NULL if it wants to do nothing

Reimplemented in ArActionAvoidFront, ArActionAvoidSide, ArActionBumpers, ArActionConstantVelocity, ArActionGoto, ArActionInput, ArActionJoydrive, ArActionKeydrive, ArActionLimiterBackwards, ArActionLimiterForwards, ArActionLimiterTableSensor, ArActionStallRecover, ArActionStop, and ArActionTurn.


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:43:45 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001