edu.memphis.ccrg.lida.sensorymemory
Class MockSensory

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
      extended by edu.memphis.ccrg.lida.sensorymemory.MockSensory
All Implemented Interfaces:
FrameworkModule, FullyInitializable, Initializable, ModuleListener, SensoryMemory, SensoryMotorMemoryListener

 class MockSensory
extends FrameworkModuleImpl
implements SensoryMemory, SensoryMotorMemoryListener


Field Summary
 
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
taskSpawner
 
Constructor Summary
MockSensory()
           
 
Method Summary
 void addListener(ModuleListener listener)
          Generic way to add various kinds of listeners.
 void addSensoryMemoryListener(SensoryMemoryListener l)
          Adds a listener to this memory.
 void decayModule(long ticks)
          Decay only this Module.
 boolean getFlag()
           
 java.lang.Object getModuleContent(java.lang.Object... params)
          Returns module content specified by params.
 java.lang.Object getSensoryContent(java.lang.String modality, java.util.Map<java.lang.String,java.lang.Object> params)
          Returns content from this SensoryMemory.
 void init()
          Implementations should only perform initialization of variables or objects that depend on parameters in the parameter map specified in FrameworkModuleImpl.init(Map).
 void receiveActuatorCommand(java.lang.Object algorithm)
           
 void runSensors()
          Runs all the sensors associated with this memory.
 void setFlag(boolean flag)
           
 
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getParam, getSubmodule, getSubmodule, getSubmodules, init, setAssistingTaskSpawner, setAssociatedModule, setModuleName, taskManagerDecayModule, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.FrameworkModule
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.FullyInitializable
setAssociatedModule
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
getParam, init
 

Constructor Detail

MockSensory

MockSensory()
Method Detail

setFlag

public void setFlag(boolean flag)

getFlag

public boolean getFlag()

runSensors

public void runSensors()
Description copied from interface: SensoryMemory
Runs all the sensors associated with this memory. The sensors get the information from the environment and store in this memory for later processing and passing to the perceptual memory module.

Specified by:
runSensors in interface SensoryMemory

getModuleContent

public java.lang.Object getModuleContent(java.lang.Object... params)
Description copied from interface: FrameworkModule
Returns module content specified by params. Should only be used by the GUI.

Specified by:
getModuleContent in interface FrameworkModule
Specified by:
getModuleContent in class FrameworkModuleImpl
Parameters:
params - - specifies what content will be returned.
Returns:
various kinds of content of this module.

decayModule

public void decayModule(long ticks)
Description copied from interface: FrameworkModule
Decay only this Module.

Specified by:
decayModule in interface FrameworkModule
Parameters:
ticks - number of ticks to decay.

addListener

public void addListener(ModuleListener listener)
Description copied from interface: FrameworkModule
Generic way to add various kinds of listeners.

Specified by:
addListener in interface FrameworkModule
Parameters:
listener - - listener of this FrameworkModule

init

public void init()
Description copied from class: FrameworkModuleImpl
Implementations should only perform initialization of variables or objects that depend on parameters in the parameter map specified in FrameworkModuleImpl.init(Map). Furthermore they should not try to access modules added via FrameworkModuleImpl.setAssociatedModule(FrameworkModule, String) as this method will not have run yet at the time this method is called.

Specified by:
init in interface Initializable
Specified by:
init in class FrameworkModuleImpl

receiveActuatorCommand

public void receiveActuatorCommand(java.lang.Object algorithm)
Specified by:
receiveActuatorCommand in interface SensoryMotorMemoryListener
Parameters:
algorithm - Current command being executed.

addSensoryMemoryListener

public void addSensoryMemoryListener(SensoryMemoryListener l)
Description copied from interface: SensoryMemory
Adds a listener to this memory. This listener constantly checks for information being sent from this memory to other modules (Perceptual Associative Memory and Sensory Motor Memory).

Specified by:
addSensoryMemoryListener in interface SensoryMemory
Parameters:
l - the listener added to this memory

getSensoryContent

public java.lang.Object getSensoryContent(java.lang.String modality,
                                          java.util.Map<java.lang.String,java.lang.Object> params)
Description copied from interface: SensoryMemory
Returns content from this SensoryMemory. Intended to be used by feature detectors to get specific parts of the sensory memory.

Specified by:
getSensoryContent in interface SensoryMemory
Parameters:
modality - user may optionally use this parameter to specify modality.
params - optional parameters
Returns:
content