|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FrameworkTask
This is the base interface for all task process in the LIDA framework.
All parts of processes in the LIDA Framework have to implement this interface.
A FrameworkTask is intended as a small fraction of a process. For example a Codelet
or a Feature
detector are examples of FrameworkTask. However, if the process includes a loop, one run of
the FrameworkTask represents only one iteration of the loop.
A TaskSpawner
can send FrameworkTasks to the TaskManager
for execution. A TaskSpawner
receives
the task each time it finishes running, so the TaskSpawner can decide if this particular task
must run again or not. This is based on the status of the FrameworkTask.
The FrameworkTask should set its status during it execution. Implementations of this interface should
call the task's TaskSpawner method, TaskSpawner.receiveFinishedTask(FrameworkTask)
, to handle the finished task at the end of the 'call' method.
Most tasks can extend from this instead of implementing this interface from scratch.
Field Summary |
---|
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable |
---|
DEFAULT_BASE_LEVEL_ACTIVATION, DEFAULT_LEARNABLE_REMOVAL_THRESHOLD |
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible |
---|
DEFAULT_ACTIVATIBLE_REMOVAL_THRESHOLD, DEFAULT_ACTIVATION |
Method Summary | |
---|---|
TaskSpawner |
getControllingTaskSpawner()
Gets TaskSpawner that controls this FrameworkTask. |
long |
getNextTicksPerRun()
Gets nextTicksPerRun |
long |
getScheduledTick()
Returns the tick when this task is scheduled to run next. |
long |
getTaskId()
Each FrameworkTask is meant to have a unique id that is set at the time of creation. |
TaskStatus |
getTaskStatus()
Returns status |
int |
getTicksPerRun()
Gets ticksPerRun |
void |
setControllingTaskSpawner(TaskSpawner ts)
Sets TaskSpawner that controls this FrameworkTask. |
void |
setNextTicksPerRun(long ticks)
Sets nextTicksPerRun |
void |
setScheduledTick(long scheduledTick)
Sets tick when this task will be run next. |
void |
setTaskStatus(TaskStatus status)
Sets task status. |
void |
setTicksPerRun(int ticks)
Sets ticksPerRun |
void |
stopRunning()
Tells this FrameworkTask to shutdown. |
Methods inherited from interface java.util.concurrent.Callable |
---|
call |
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable |
---|
decayBaseLevelActivation, getBaseLevelActivation, getBaseLevelDecayStrategy, getBaseLevelExciteStrategy, getLearnableRemovalThreshold, getTotalActivationStrategy, reinforceBaseLevelActivation, setBaseLevelActivation, setBaseLevelDecayStrategy, setBaseLevelExciteStrategy, setBaseLevelRemovalThreshold, setTotalActivationStrategy |
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible |
---|
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy |
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, init |
Method Detail |
---|
TaskStatus getTaskStatus()
void setTaskStatus(TaskStatus status)
stopRunning()
to
cancel the task.
status
- the new task statusvoid stopRunning()
long getTaskId()
void setTicksPerRun(int ticks)
ticks
- number of ticks that will occur between executions of this taskchange ticksPerRun for the next run only
int getTicksPerRun()
void setControllingTaskSpawner(TaskSpawner ts)
ts
- the TaskSpawnerTaskSpawner getControllingTaskSpawner()
void setNextTicksPerRun(long ticks)
ticks
- number of ticks that must pass before for the next, and only the next, execution of this
FrameworkTask.to set the permanent (default) number
of ticksPerRun
long getNextTicksPerRun()
FrameworkTask
.void setScheduledTick(long scheduledTick)
scheduledTick
- tick to schedule this taskTaskManager
long getScheduledTick()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |