public class DefaultCommandTranslator extends java.lang.Object implements ICommandTranslator
Constructor and Description |
---|
DefaultCommandTranslator() |
Modifier and Type | Method and Description |
---|---|
void |
add(ICommandTranslatorDelegate delegate) |
void |
adjust(ChunkTypeRequest request,
DeltaTracker tracker,
IEfferentCommand command,
IModel model)
adjust a command midflight
|
protected ICommandTranslatorDelegate |
getDelegate(ChunkTypeRequest request) |
java.util.Collection<ICommandTranslatorDelegate> |
getDelegates() |
IEfferentObject |
getMuscle(ChunkTypeRequest request,
IModel model)
translates a set of slot values into a
IEfferentObject that
represents a muscle defined within the pattern. |
IEfferentObject |
getMuscle(java.lang.String muscleName,
IModel model)
translate a string name into an
IEfferentObject that represents the
muscle. |
void |
remove(ICommandTranslatorDelegate delegate) |
IEfferentCommand |
translate(ChunkTypeRequest request,
IEfferentObject muscle,
IModel model)
translate a
ChunkPattern into an appropriate
IEfferentCommand . |
public void add(ICommandTranslatorDelegate delegate)
public void remove(ICommandTranslatorDelegate delegate)
public java.util.Collection<ICommandTranslatorDelegate> getDelegates()
protected ICommandTranslatorDelegate getDelegate(ChunkTypeRequest request) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public IEfferentObject getMuscle(ChunkTypeRequest request, IModel model) throws java.lang.IllegalArgumentException
ICommandTranslator
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.getMuscle
in interface ICommandTranslator
java.lang.IllegalArgumentException
public IEfferentCommand translate(ChunkTypeRequest request, IEfferentObject muscle, IModel model) throws java.lang.IllegalArgumentException
ICommandTranslator
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.translate
in interface ICommandTranslator
java.lang.IllegalArgumentException
public void adjust(ChunkTypeRequest request, DeltaTracker tracker, IEfferentCommand command, IModel model) throws java.lang.IllegalArgumentException, javax.naming.OperationNotSupportedException
ICommandTranslator
adjust
in interface ICommandTranslator
java.lang.IllegalArgumentException
javax.naming.OperationNotSupportedException
public IEfferentObject getMuscle(java.lang.String muscleName, IModel model) throws java.lang.IllegalArgumentException
ICommandTranslator
IEfferentObject
that represents the
muscle. This is called during a buffer query that has been scoped on a
specific muscle groupgetMuscle
in interface ICommandTranslator
java.lang.IllegalArgumentException
- if no muscle is found