cz.cuni.amis.pogamut.base.agent.navigation
Interface IPathExecutorHelper<PATH_ELEMENT>

Type Parameters:
PATH_ELEMENT -
All Superinterfaces:
IPathExecutor<PATH_ELEMENT>
All Known Subinterfaces:
IUT2004PathExecutorHelper<PATH_ELEMENT>
All Known Implementing Classes:
BasePathExecutor, UT2004PathExecutor

public interface IPathExecutorHelper<PATH_ELEMENT>
extends IPathExecutor<PATH_ELEMENT>

If you did not read IPathExecutor javadoc - do it now! Following javadoc assumes you know what IPathExecutor is and how its interface works.

As the IPathExecutor interface is meant to provide a gateway for the user to navigate his/her bot through the environment, it can't be used (as is) as an interface for further IPathExecutor functionality decomposition into (for instance) navigators (i.e., to implement actual path-following into the different object that actual IPathExecutor implementation)

Note that example implementation is BasePathExecutor where new interface methods has better javadoc (bound to the actual BasePathExecutor implementation) that can give you hints how they are usually implemented.


Method Summary
 IStuckDetector checkStuckDetectors()
          Asks all IStuckDetector registered inside executor via IPathExecutor.addStuckDetector(IStuckDetector) whether the agent has stuck.
 void stuck()
          Reports that the agent has stuck - this stuck is detected either by some registered IStuckDetector or some other part of the IPathExecutor.
 void switchToAnotherPathElement(int index)
          Switches from current path element index into the new one.
 void targetReached()
          Reports that the agent has reached its target.
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.navigation.IPathExecutor
addStuckDetector, followPath, getLog, getPath, getPathElement, getPathElementIndex, getPathFuture, getState, inState, isExecuting, isPathUnavailable, isStuck, isTargetReached, notInState, removeStuckDetector, stop
 

Method Detail

checkStuckDetectors

IStuckDetector checkStuckDetectors()
Asks all IStuckDetector registered inside executor via IPathExecutor.addStuckDetector(IStuckDetector) whether the agent has stuck.

This method checks (one-by-one) stuck detectors whether some of them is reporting that the agent has stuck. If the stuck is detected, particular IStuckDetector is returned. It the stuck is not detected, null is returned.

Returns:
first detector to report that agent has stuck or null

switchToAnotherPathElement

void switchToAnotherPathElement(int index)
Switches from current path element index into the new one.

Effective only if IPathExecutor.isExecuting().

Parameters:
index -

stuck

void stuck()
Reports that the agent has stuck - this stuck is detected either by some registered IStuckDetector or some other part of the IPathExecutor.

Effective only if IPathExecutor.isExecuting().

Parameters:
detector -

targetReached

void targetReached()
Reports that the agent has reached its target.

Effective only if IPathExecutor.isExecuting().