edu.memphis.ccrg.lida.framework
Interface FrameworkModule

All Superinterfaces:
FullyInitializable, Initializable
All Known Subinterfaces:
ActionSelection, Agent, BroadcastQueue, CodeletManagerModule, Environment, EpisodicMemory, GlobalWorkspace, PerceptualAssociativeMemory, ProceduralMemory, SensoryMemory, SensoryMotorMemory, Workspace, WorkspaceBuffer
All Known Implementing Classes:
AgentImpl, AttentionCodeletModule, BasicActionSelection, BasicSensoryMotorMemory, BehaviorNetwork, BroadcastQueueImpl, EnvironmentImpl, EpisodicMemoryImpl, FrameworkModuleImpl, GlobalWorkspaceImpl, PerceptualAssociativeMemoryImpl, ProceduralMemoryImpl, SensoryMemoryImpl, StructureBuildingCodeletModule, WorkspaceBufferImpl, WorkspaceImpl

public interface FrameworkModule
extends FullyInitializable

Interface for the modules of an agent.

Author:
Javier Snaider, Ryan J. McCall

Method Summary
 void addListener(ModuleListener listener)
          Generic way to add various kinds of listeners.
 void addSubModule(FrameworkModule lm)
          Adds submodule as a component of this FrameworkModule.
 boolean containsSubmodule(ModuleName name)
          Returns whether this FrameworkModule contains a submodule with specified ModuleName.
 boolean containsSubmodule(java.lang.String name)
          Returns whether this FrameworkModule contains a submodule with specified name.
 void decayModule(long ticks)
          Decay only this Module.
 TaskSpawner getAssistingTaskSpawner()
          Returns the TaskSpawner which this FrameworkModule uses to spawn tasks.
 java.lang.Object getModuleContent(java.lang.Object... params)
          Returns module content specified by params.
 ModuleName getModuleName()
          Gets moduleName.
 FrameworkModule getSubmodule(ModuleName name)
          Gets specified submodule subModule.
 FrameworkModule getSubmodule(java.lang.String name)
          Gets specified submodule.
 java.util.Map<ModuleName,FrameworkModule> getSubmodules()
          Convenience method to get submodules
 void setAssistingTaskSpawner(TaskSpawner ts)
          Specify the TaskSpawner which this FrameworkModule will use to spawn tasks.
 void setModuleName(ModuleName moduleName)
          Sets ModuleName.
 void taskManagerDecayModule(long ticks)
          Decay this module and all its submodules.
 
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
 

Method Detail

getModuleName

ModuleName getModuleName()
Gets moduleName.

Returns:
ModuleName of this FrameworkModule

setModuleName

void setModuleName(ModuleName moduleName)
Sets ModuleName.

Parameters:
moduleName - ModuleName of this FrameworkModule

containsSubmodule

boolean containsSubmodule(ModuleName name)
Returns whether this FrameworkModule contains a submodule with specified ModuleName.

Parameters:
name - ModuleName of submodule
Returns:
true if there is a FrameworkModule with specified ModuleName in this FrameworkModule

containsSubmodule

boolean containsSubmodule(java.lang.String name)
Returns whether this FrameworkModule contains a submodule with specified name.

Parameters:
name - ModuleName of submodule
Returns:
true if there is a FrameworkModule with specified name in this FrameworkModule

getSubmodule

FrameworkModule getSubmodule(ModuleName name)
Gets specified submodule subModule.

Parameters:
name - name of the desired submodule.
Returns:
the submodule.

getSubmodule

FrameworkModule getSubmodule(java.lang.String name)
Gets specified submodule.

Parameters:
name - name of the desired submodule.
Returns:
the submodule.

addSubModule

void addSubModule(FrameworkModule lm)
Adds submodule as a component of this FrameworkModule.

Parameters:
lm - submodule to add

getModuleContent

java.lang.Object getModuleContent(java.lang.Object... params)
Returns module content specified by params. Intended for use by the GUI only.

Parameters:
params - parameters specifying what content will be returned
Returns:
Parameter-specified content of this module.

taskManagerDecayModule

void taskManagerDecayModule(long ticks)
Decay this module and all its submodules. Framework users should not call this method. It will be called by the TaskManager. Decays this module and all its submodules.

Parameters:
ticks - number of ticks to decay.

decayModule

void decayModule(long ticks)
Decay only this Module.

Parameters:
ticks - number of ticks to decay.

addListener

void addListener(ModuleListener listener)
Generic way to add various kinds of listeners.

Parameters:
listener - - listener of this FrameworkModule

setAssistingTaskSpawner

void setAssistingTaskSpawner(TaskSpawner ts)
Specify the TaskSpawner which this FrameworkModule will use to spawn tasks.

Parameters:
ts - the TaskSpawner

getAssistingTaskSpawner

TaskSpawner getAssistingTaskSpawner()
Returns the TaskSpawner which this FrameworkModule uses to spawn tasks.

Returns:
the assisting task spawner

getSubmodules

java.util.Map<ModuleName,FrameworkModule> getSubmodules()
Convenience method to get submodules

Returns:
map of submodules by ModuleName