cz.cuni.amis.pogamut.sposh.executor
Interface IAction

Package class diagram package IAction
Type Parameters:
RETURN - Type of object that is returned by this action every time it is evaluated.
All Known Implementing Classes:
DoNothing, ParamsAction, StateAction

public interface IAction

Primitive representation used in StateWorkExecutor. This primitive is executed in phases: first is called init, then run is called, until executor decides it is time to switch to another primtive. Before init of new primtive is called, done of previous primitive is called.

Author:
Honza

Method Summary
 void done(VariableContext params)
          This action is done, according to posh plan, some other IAction is supposed to execute, therefore use this to clean up the mess.
 void init(VariableContext params)
          Initialize action.
 ActionResult run(VariableContext params)
          Run is called every time evaluation of posh plan determines that this and no other action is the one that is supposed to execute.
 

Method Detail

init

void init(VariableContext params)
Initialize action. Called ever time action is supposed to execute.

After init, run is immediately called, so first run call has same state of world as init did.

Parameters:
params - Variable context that is passed from posh plan to the primitive

run

ActionResult run(VariableContext params)
Run is called every time evaluation of posh plan determines that this and no other action is the one that is supposed to execute.

Parameters:
params - Variable context passed from posh plan to the primtive
Returns:
result of action in this iteration.

done

void done(VariableContext params)
This action is done, according to posh plan, some other IAction is supposed to execute, therefore use this to clean up the mess.

Parameters:
params -


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.