org.jactr.modules.pm.motor.managers
Class MotorCommandManager

java.lang.Object
  extended by org.jactr.modules.pm.common.efferent.EfferentCommandManager<org.commonreality.modalities.motor.MovementCommand>
      extended by org.jactr.modules.pm.motor.managers.MotorCommandManager

public class MotorCommandManager
extends EfferentCommandManager<org.commonreality.modalities.motor.MovementCommand>


Constructor Summary
MotorCommandManager(AbstractMotorModule module)
           
 
Method Summary
 IMovement abort(IMovement movement, double requestTime)
           
 IMovement adjust(IMovement movement, ChunkTypeRequest request, double requestTime)
          nudge an executing movement.
 boolean canAbort(ChunkTypeRequest request)
           
 boolean canAbort(IMovement movement)
           
 boolean canAdjust(ChunkTypeRequest request)
           
 boolean canAdjust(IMovement movement)
           
 boolean canExecute(ChunkTypeRequest request)
           
 boolean canPrepare(ChunkTypeRequest request)
           
 void clear()
          explicitly request that executing commands are aborted, and issue a remove for all the other commands.
 void clear(org.commonreality.identifier.IIdentifier muscleId)
          clear an individual muscle
 IMovement execute(IMovement movement, double requestTime)
           
 IMovement getMovementFromCommand(org.commonreality.identifier.IIdentifier commandId)
           
 IMovement getMovementFromMuscle(org.commonreality.identifier.IIdentifier muscleId)
           
 IMovement getPreparedMovement(org.commonreality.identifier.IIdentifier muscleId)
           
 IMovement prepare(ChunkTypeRequest request, double requestTime, boolean prepareOnly)
           
 
Methods inherited from class org.jactr.modules.pm.common.efferent.EfferentCommandManager
abort, execute, getAgent, getCommand, getExecutingCommandIds, getExecutingCommands, getMuscle, install, isAutoDeleteEnabled, isExecuting, newCommand, remove, setAutoDeleteEnabled, uninstall
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotorCommandManager

public MotorCommandManager(AbstractMotorModule module)
Method Detail

getPreparedMovement

public IMovement getPreparedMovement(org.commonreality.identifier.IIdentifier muscleId)

clear

public void clear(org.commonreality.identifier.IIdentifier muscleId)
clear an individual muscle

Parameters:
muscleId -

clear

public void clear()
Description copied from class: EfferentCommandManager
explicitly request that executing commands are aborted, and issue a remove for all the other commands. All pending futures will return an IllegalStateException. No callbacks for active or pending commands will be called after this.

Overrides:
clear in class EfferentCommandManager<org.commonreality.modalities.motor.MovementCommand>

getMovementFromCommand

public IMovement getMovementFromCommand(org.commonreality.identifier.IIdentifier commandId)

getMovementFromMuscle

public IMovement getMovementFromMuscle(org.commonreality.identifier.IIdentifier muscleId)

canAdjust

public boolean canAdjust(ChunkTypeRequest request)

canAdjust

public boolean canAdjust(IMovement movement)

adjust

public IMovement adjust(IMovement movement,
                        ChunkTypeRequest request,
                        double requestTime)
nudge an executing movement. There are no responses to these commands currently..

Parameters:
request -
requestTime -
Returns:

canPrepare

public boolean canPrepare(ChunkTypeRequest request)

prepare

public IMovement prepare(ChunkTypeRequest request,
                         double requestTime,
                         boolean prepareOnly)
                  throws java.lang.IllegalArgumentException,
                         java.lang.IllegalStateException
Parameters:
request -
prepareOnly -
Returns:
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

canExecute

public boolean canExecute(ChunkTypeRequest request)

execute

public IMovement execute(IMovement movement,
                         double requestTime)
                  throws java.lang.IllegalArgumentException,
                         java.lang.IllegalStateException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

canAbort

public boolean canAbort(ChunkTypeRequest request)

canAbort

public boolean canAbort(IMovement movement)

abort

public IMovement abort(IMovement movement,
                       double requestTime)
                throws java.lang.IllegalArgumentException,
                       java.lang.IllegalStateException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException