org.jactr.modules.pm.motor.command
Interface ICommandTranslator

All Known Subinterfaces:
ICommandTranslatorDelegate
All Known Implementing Classes:
AbstractManualTranslator, AbstractTranslator, DefaultCommandTranslator, PeckRecoilTranslator, PeckTranslator, PunchTranslator

public interface ICommandTranslator

interface that handles the transformation of ChunkPatterns into IEfferentCommands

Author:
harrison

Method Summary
 void adjust(ChunkTypeRequest request, org.commonreality.object.delta.DeltaTracker tracker, org.commonreality.efferent.IEfferentCommand command, IModel model)
          adjust a command midflight
 org.commonreality.object.IEfferentObject getMuscle(ChunkTypeRequest request, IModel model)
          translates a set of slot values into a IEfferentObject that represents a muscle defined within the pattern.
 org.commonreality.object.IEfferentObject getMuscle(java.lang.String muscleName, IModel model)
          translate a string name into an IEfferentObject that represents the muscle.
 org.commonreality.efferent.IEfferentCommand translate(ChunkTypeRequest request, org.commonreality.object.IEfferentObject muscle, IModel model)
          translate a ChunkPattern into an appropriate IEfferentCommand.
 

Method Detail

getMuscle

org.commonreality.object.IEfferentObject getMuscle(java.lang.String muscleName,
                                                   IModel model)
                                                   throws java.lang.IllegalArgumentException
translate a string name into an IEfferentObject that represents the muscle. This is called during a buffer query that has been scoped on a specific muscle group

Parameters:
muscleName -
model -
Returns:
Throws:
java.lang.IllegalArgumentException - if no muscle is found

getMuscle

org.commonreality.object.IEfferentObject getMuscle(ChunkTypeRequest request,
                                                   IModel model)
                                                   throws java.lang.IllegalArgumentException
translates a set of slot values into a IEfferentObject that represents a muscle defined within the pattern. Since many ACT-R movement commands use multiple slots to define a muscle, this collapses them. (i.e. translates hand right finger index into right-index). In addition to the returned IEfferentObject this method should also ensure that the slots used to define the muscle are nulled out and the muscle slot is specified.

Parameters:
request -
model -
Returns:
Throws:
java.lang.IllegalArgumentException

translate

org.commonreality.efferent.IEfferentCommand translate(ChunkTypeRequest request,
                                                      org.commonreality.object.IEfferentObject muscle,
                                                      IModel model)
                                                      throws java.lang.IllegalArgumentException
translate a ChunkPattern into an appropriate IEfferentCommand. By setting the MovementCommand.MOVEMENT_RATE, the translator may provide a hint to common reality regarding the actual execution time of the movement.

Parameters:
request -
muscle -
model -
Returns:
Throws:
java.lang.IllegalArgumentException

adjust

void adjust(ChunkTypeRequest request,
            org.commonreality.object.delta.DeltaTracker tracker,
            org.commonreality.efferent.IEfferentCommand command,
            IModel model)
            throws java.lang.IllegalArgumentException,
                   javax.naming.OperationNotSupportedException
adjust a command midflight

Throws:
java.lang.IllegalArgumentException
javax.naming.OperationNotSupportedException