Package ptolemy.caltrop.ddi.util
Class DataflowWithRatesActorInterpreter
- java.lang.Object
-
- ptolemy.caltrop.ddi.util.DataflowActorInterpreter
-
- ptolemy.caltrop.ddi.util.DataflowWithRatesActorInterpreter
-
public class DataflowWithRatesActorInterpreter extends DataflowActorInterpreter
This class extends the DataflowActorInterpreter, overriding the checking of preconditions to assume that input tokens are present. This interpreter is assumed to operate in a DDI where token rates are published, such as SDF and DDF.- Since:
- Ptolemy II 5.2
- Version:
- $Id$
- Author:
- Steve Neuendorffer
- See Also:
Actor
,Action
,DataflowActorInterpreter.actionSetup(caltrop.interpreter.ast.Action)
,actionEvaluatePrecondition()
,actionStep()
,DataflowActorInterpreter.actionComputeOutputs()
,DataflowActorInterpreter.actionClear()
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.caltrop.ddi.util.DataflowActorInterpreter
DataflowActorInterpreter.EnvironmentKey, DataflowActorInterpreter.MultipleTokenReaderThunk, DataflowActorInterpreter.SingleTokenReaderThunk
-
-
Field Summary
-
Fields inherited from class ptolemy.caltrop.ddi.util.DataflowActorInterpreter
actor, actorEnv, context, env, envAction, inputPortMap
-
-
Constructor Summary
Constructors Constructor Description DataflowWithRatesActorInterpreter(caltrop.interpreter.ast.Actor actor, caltrop.interpreter.Context context, caltrop.interpreter.environment.Environment actorEnv, java.util.Map inputPortMap, java.util.Map outputPortMap)
Defines a new actor interpreter for the specified actor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
actionEvaluatePrecondition()
Evaluate the preconditions for the action and return its result.void
actionStep()
Execute the action body, potentially changing the value of actor state variables and action-scope variables.-
Methods inherited from class ptolemy.caltrop.ddi.util.DataflowActorInterpreter
actionClear, actionComputeOutputs, actionSetup, currentAction, nActions, nInitializers, setOutputPortMap
-
-
-
-
Constructor Detail
-
DataflowWithRatesActorInterpreter
public DataflowWithRatesActorInterpreter(caltrop.interpreter.ast.Actor actor, caltrop.interpreter.Context context, caltrop.interpreter.environment.Environment actorEnv, java.util.Map inputPortMap, java.util.Map outputPortMap)
Defines a new actor interpreter for the specified actor.- Parameters:
actor
- The actor.context
- The interpretation context.actorEnv
- The global environment.inputPortMap
- Map from input port names to channels.outputPortMap
- Map from output port names to channels.- See Also:
InputChannel
,OutputChannel
-
-
Method Detail
-
actionEvaluatePrecondition
public boolean actionEvaluatePrecondition()
Evaluate the preconditions for the action and return its result. If this method returns false, some condition required for the successful completion of the action is not satisfied.- Overrides:
actionEvaluatePrecondition
in classDataflowActorInterpreter
- Returns:
- True, if the action precondition was satisfied.
- Throws:
caltrop.interpreter.InterpreterException
- If the evaluation of the guards could not be successfully completed.
-
actionStep
public void actionStep()
Execute the action body, potentially changing the value of actor state variables and action-scope variables.- Overrides:
actionStep
in classDataflowActorInterpreter
- Throws:
caltrop.interpreter.InterpreterException
- If the action body could not be executed successfully.
-
-