edu.memphis.ccrg.lida.sensorymemory
Class SensoryMemoryImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
      extended by edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
          extended by edu.memphis.ccrg.lida.sensorymemory.SensoryMemoryImpl
All Implemented Interfaces:
FrameworkModule, FullyInitializable, Initializable, SensoryMemory

public abstract class SensoryMemoryImpl
extends FrameworkModuleImpl
implements SensoryMemory

Default abstract (i.e. must be overridden to be used) implementation of the SensoryMemory module. This module should sense the environment, store the sensed data and processing it. It should expect access to its content from DetectionAlgorithms via method SensoryMemory.getSensoryContent(String, Map) and it may transmit content to SensoryMotorMemory.

Author:
Ryan J. McCall

Field Summary
protected  Environment environment
          The Environment associated with this module.
protected  java.util.List<SensoryMemoryListener> sensoryMemoryListeners
          The SensoryMemoryListener references associated with this module.
 
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
taskSpawner
 
Constructor Summary
SensoryMemoryImpl()
          Default Constructor.
 
Method Summary
 void addListener(ModuleListener l)
          Override this method to add a listener to the module
 void addSensoryMemoryListener(SensoryMemoryListener l)
          Adds a listener to this memory.
abstract  void decayModule(long ticks)
          Decay only this Module.
abstract  java.lang.Object getSensoryContent(java.lang.String modality, java.util.Map<java.lang.String,java.lang.Object> params)
          Returns content from this SensoryMemory.
abstract  void runSensors()
          Runs all the sensors associated with this memory.
 void setAssociatedModule(FrameworkModule m, java.lang.String usage)
          Sets an associated FrameworkModule.
 
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleContent, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule, toString
 
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
containsParameter, getParam, getParameters, init, init
 
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, getModuleContent, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setModuleName, taskManagerDecayModule
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
containsParameter, getParam, getParameters, init, init
 

Field Detail

sensoryMemoryListeners

protected java.util.List<SensoryMemoryListener> sensoryMemoryListeners
The SensoryMemoryListener references associated with this module.


environment

protected Environment environment
The Environment associated with this module.

Constructor Detail

SensoryMemoryImpl

public SensoryMemoryImpl()
Default Constructor.

Method Detail

addListener

public void addListener(ModuleListener l)
Description copied from class: FrameworkModuleImpl
Override this method to add a listener to the module

Specified by:
addListener in interface FrameworkModule
Overrides:
addListener in class FrameworkModuleImpl
Parameters:
l - - listener of this FrameworkModule

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

setAssociatedModule

public void setAssociatedModule(FrameworkModule m,
                                java.lang.String usage)
Description copied from interface: FullyInitializable
Sets an associated FrameworkModule.

Specified by:
setAssociatedModule in interface FullyInitializable
Overrides:
setAssociatedModule in class FrameworkModuleImpl
Parameters:
m - the module to be associated.
usage - how module will be used
See Also:
ModuleUsage

runSensors

public abstract 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

getSensoryContent

public abstract 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

decayModule

public abstract 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.