org.jactr.modules.pm.motor
Interface IMotorModule

All Superinterfaces:
IAsynchronousModule, IInitializable, IInstallable, IModule, IParameterized, IPerceptualModule
All Known Implementing Classes:
AbstractMotorModule, DefaultMotorModule6

public interface IMotorModule
extends IPerceptualModule, IParameterized


Field Summary
static java.lang.String ABORT_CHUNK_TYPE
           
static java.lang.String ABORTING_CHUNK
           
static java.lang.String MOVEMENT_CHUNK_TYPE
           
static java.lang.String MUSCLE_SLOT
           
 
Fields inherited from interface org.jactr.modules.pm.IPerceptualModule
GREATER_THAN_CURRENT_CHUNK, HIGHEST_CHUNK, LESS_THAN_CURRENT_CHUNK, LOWEST_CHUNK
 
Fields inherited from interface org.jactr.core.module.asynch.IAsynchronousModule
STRICT_SYNCHRONIZATION_PARAM
 
Method Summary
 java.util.concurrent.Future<IMovement> abort(IMovement movement, double requestTime)
           
 void addListener(IMotorModuleListener listener, java.util.concurrent.Executor executor)
           
 java.util.concurrent.Future<IMovement> adjust(IMovement movement, ChunkTypeRequest request, double requestTime)
           
 boolean canAbort(ChunkTypeRequest request)
           
 boolean canAbort(IMovement movement)
           
 boolean canAdjust(ChunkTypeRequest request)
           
 boolean canAdjust(IMovement movement)
           
 boolean canExecute(ChunkTypeRequest pattern)
           
 boolean canPrepare(ChunkTypeRequest pattern)
          return true if we could prepare this motor command
 void dispatch(MotorModuleEvent event)
           
 java.util.concurrent.Future<IMovement> execute(IMovement movement, double requestTime)
          execute a motor movement.
 IChunkType getAbortChunkType()
           
 IMotorActivationBuffer getBuffer()
           
 MotorCommandManager getCommandManager()
           
 ICommandTranslator getCommandTranslator()
          responsible code snippet that translates ChunkPatterns into IEfferentCommands
 IMovement getLastMovement(org.commonreality.identifier.IIdentifier muscle)
          returns the most recently prepared movement for the given muscle
 IChunkType getMovementChunkType()
          the root movement type chunk
 MuscleStateManager getMuscleManager()
          tracker and manager of muscle info
 IMotorTimeEquation getPreparationTimeEquation()
          the IMotorTimeEquation that determines how long the preparation of a motor movement lasts
 IMotorTimeEquation getProcessingTimeEquation()
          the IMotorTimeEquation that determines how much time is spent processing the movement.
 boolean hasListeners()
           
 java.util.concurrent.Future<IMovement> prepare(ChunkTypeRequest pattern, double requestTime, boolean prepareOnly)
          prepare a motor movement.
 void removeListener(IMotorModuleListener listener)
           
 void reset()
          reset the motor system.
 void reset(java.lang.String muscle)
          reset the state of a single muscle
 
Methods inherited from interface org.jactr.modules.pm.IPerceptualModule
getCommonRealityExecutor, getSymbolGrounder
 
Methods inherited from interface org.jactr.core.module.asynch.IAsynchronousModule
getExecutor, isStrictSynchronizationEnabled, setStrictSynchronizationEnabled, synchronizedTimedEvent
 
Methods inherited from interface org.jactr.core.module.IModule
dispose, getModel, getName, initialize, install
 
Methods inherited from interface org.jactr.core.utils.IInstallable
uninstall
 
Methods inherited from interface org.jactr.core.utils.parameter.IParameterized
getParameter, getPossibleParameters, getSetableParameters, setParameter
 

Field Detail

MOVEMENT_CHUNK_TYPE

static final java.lang.String MOVEMENT_CHUNK_TYPE
See Also:
Constant Field Values

ABORT_CHUNK_TYPE

static final java.lang.String ABORT_CHUNK_TYPE
See Also:
Constant Field Values

MUSCLE_SLOT

static final java.lang.String MUSCLE_SLOT
See Also:
Constant Field Values

ABORTING_CHUNK

static final java.lang.String ABORTING_CHUNK
See Also:
Constant Field Values
Method Detail

getMovementChunkType

IChunkType getMovementChunkType()
the root movement type chunk

Returns:

getAbortChunkType

IChunkType getAbortChunkType()

getProcessingTimeEquation

IMotorTimeEquation getProcessingTimeEquation()
the IMotorTimeEquation that determines how much time is spent processing the movement. Actual equation times are determined by individual IEfferentCommandTranslators.

Returns:

getPreparationTimeEquation

IMotorTimeEquation getPreparationTimeEquation()
the IMotorTimeEquation that determines how long the preparation of a motor movement lasts

Returns:

getLastMovement

IMovement getLastMovement(org.commonreality.identifier.IIdentifier muscle)
returns the most recently prepared movement for the given muscle

Parameters:
muscle - if null, return the last movement regardless of the muscle
Returns:

getCommandTranslator

ICommandTranslator getCommandTranslator()
responsible code snippet that translates ChunkPatterns into IEfferentCommands

Returns:

getMuscleManager

MuscleStateManager getMuscleManager()
tracker and manager of muscle info

Returns:

getCommandManager

MotorCommandManager getCommandManager()

canPrepare

boolean canPrepare(ChunkTypeRequest pattern)
return true if we could prepare this motor command

Parameters:
pattern -
Returns:

prepare

java.util.concurrent.Future<IMovement> prepare(ChunkTypeRequest pattern,
                                               double requestTime,
                                               boolean prepareOnly)
prepare a motor movement. This involves creating the movement, setting up the buffer (and queueing timed events), and negotiating the newly created IEfferentCommand with common reality

Parameters:
pattern -

canExecute

boolean canExecute(ChunkTypeRequest pattern)

execute

java.util.concurrent.Future<IMovement> execute(IMovement movement,
                                               double requestTime)
execute a motor movement. This involves communicating the movement start with common reality and queueing whatever timed events are necessary

Parameters:
movement -
Returns:

canAbort

boolean canAbort(ChunkTypeRequest request)

canAbort

boolean canAbort(IMovement movement)

abort

java.util.concurrent.Future<IMovement> abort(IMovement movement,
                                             double requestTime)

canAdjust

boolean canAdjust(ChunkTypeRequest request)

canAdjust

boolean canAdjust(IMovement movement)

adjust

java.util.concurrent.Future<IMovement> adjust(IMovement movement,
                                              ChunkTypeRequest request,
                                              double requestTime)

getBuffer

IMotorActivationBuffer getBuffer()

reset

void reset()
reset the motor system. this should force all executing movements to stop.

Specified by:
reset in interface IModule

reset

void reset(java.lang.String muscle)
reset the state of a single muscle

Parameters:
muscle -

addListener

void addListener(IMotorModuleListener listener,
                 java.util.concurrent.Executor executor)

removeListener

void removeListener(IMotorModuleListener listener)

hasListeners

boolean hasListeners()

dispatch

void dispatch(MotorModuleEvent event)