edu.memphis.ccrg.lida.workspace
Class WorkspaceImpl

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.workspace.WorkspaceImpl
All Implemented Interfaces:
LocalAssociationListener, FrameworkModule, FullyInitializable, Initializable, ModuleListener, BroadcastListener, PamListener, Workspace

public class WorkspaceImpl
extends FrameworkModuleImpl
implements Workspace, PamListener, LocalAssociationListener, BroadcastListener

The Workspace contains the Perceptual and Episodic Buffers as well as the Broadcast Queue and Current Situational Model. This class implements the Facade pattern. Any outside module that wishes to access and/or modify these Workspace components must do so through this class. Thus this class defines the methods to access the data of these submodules.

Author:
Javier Snaider, Ryan J. McCall

Field Summary
 
Fields inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
taskSpawner
 
Constructor Summary
WorkspaceImpl()
          Default constructor
 
Method Summary
 void addCueListener(CueListener l)
          Add episodic memory that will listen for cues from the Workspace
 void addListener(ModuleListener listener)
          Override this method to add a listener to the module
 void addWorkspaceListener(WorkspaceListener listener)
          Adds specified WorkspaceListener
 void cueEpisodicMemories(NodeStructure content)
          Prompts this Workspace to cue episodic memories with content.
 void decayModule(long ticks)
          Should do nothing, submodules' decayModule method will be called in FrameworkModuleImpl#taskManagerDecayModule.
 java.lang.Object getModuleContent(java.lang.Object... params)
          Intended to be called from the GUI.
 void learn(Coalition coalition)
          A place-holder method to remind implementing classes that they should implement learning.
 void receiveBroadcast(Coalition c)
          Listener must receive a broadcast of a the winning Coalition This method should return as possible in order to not delay the rest of the broadcasting.
 void receiveLocalAssociation(NodeStructure association)
           
 void receivePercept(Link l)
          Receive a Link percept.
 void receivePercept(Node n)
          Receive a Node percept.
 void receivePercept(NodeStructure newPercept)
          Receive a NodeStructure percept.
 
Methods inherited from class edu.memphis.ccrg.lida.framework.FrameworkModuleImpl
addSubModule, containsSubmodule, containsSubmodule, getAssistingTaskSpawner, getModuleName, getSubmodule, getSubmodule, getSubmodules, setAssistingTaskSpawner, setAssociatedModule, 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, 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
containsParameter, getParam, getParameters, init, init
 

Constructor Detail

WorkspaceImpl

public WorkspaceImpl()
Default constructor

Method Detail

addListener

public void addListener(ModuleListener listener)
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:
listener - - listener of this FrameworkModule

addCueListener

public void addCueListener(CueListener l)
Description copied from interface: Workspace
Add episodic memory that will listen for cues from the Workspace

Specified by:
addCueListener in interface Workspace
Parameters:
l - listener

addWorkspaceListener

public void addWorkspaceListener(WorkspaceListener listener)
Description copied from interface: Workspace
Adds specified WorkspaceListener

Specified by:
addWorkspaceListener in interface Workspace
Parameters:
listener - listener of this Workspace

cueEpisodicMemories

public void cueEpisodicMemories(NodeStructure content)
Description copied from interface: Workspace
Prompts this Workspace to cue episodic memories with content.

Specified by:
cueEpisodicMemories in interface Workspace
Parameters:
content - NodeStructure to cue with.

receiveBroadcast

public void receiveBroadcast(Coalition c)
Description copied from interface: BroadcastListener
Listener must receive a broadcast of a the winning Coalition This method should return as possible in order to not delay the rest of the broadcasting.

Specified by:
receiveBroadcast in interface BroadcastListener
Parameters:
c - the Coalition that won the most recent competition for consciousness

receiveLocalAssociation

public void receiveLocalAssociation(NodeStructure association)
Specified by:
receiveLocalAssociation in interface LocalAssociationListener
Parameters:
association - The response generated from the Episodic Memory to a previous cue.

receivePercept

public void receivePercept(NodeStructure newPercept)
Description copied from interface: PamListener
Receive a NodeStructure percept.

Specified by:
receivePercept in interface PamListener
Parameters:
newPercept - a NodeStructure

receivePercept

public void receivePercept(Node n)
Description copied from interface: PamListener
Receive a Node percept.

Specified by:
receivePercept in interface PamListener
Parameters:
n - a Node

receivePercept

public void receivePercept(Link l)
Description copied from interface: PamListener
Receive a Link percept.

Specified by:
receivePercept in interface PamListener
Parameters:
l - a Link

getModuleContent

public java.lang.Object getModuleContent(java.lang.Object... params)
Description copied from class: FrameworkModuleImpl
Intended to be called from the GUI. Override this method to return particular module content based on params.

Specified by:
getModuleContent in interface FrameworkModule
Overrides:
getModuleContent in class FrameworkModuleImpl
Parameters:
params - parameters specifying what content will be returned
Returns:
Parameter-specified content of this module.

learn

public void learn(Coalition coalition)
Description copied from interface: BroadcastListener
A place-holder method to remind implementing classes that they should implement learning. LIDA theory says receivers of the broadcast should learn from it. This method will not be called directly by the GlobalWorkspace and thus it should be managed by the receiving module.

Specified by:
learn in interface BroadcastListener
Parameters:
coalition - the Coalition that won the most recent competition for consciousness

decayModule

public void decayModule(long ticks)
Should do nothing, submodules' decayModule method will be called in FrameworkModuleImpl#taskManagerDecayModule.

Specified by:
decayModule in interface FrameworkModule
Parameters:
ticks - number of ticks to decay.
See Also:
FrameworkModule.decayModule(long)