public class DDF extends DataflowWithRates
| Red (cxh) |
| Red (cxh) |
DataflowWithRates.ActionRateSignature_actions, _actor, _actorInterpreter, _context, _currentStateSet, _currentTransitions, _env, _inputPorts, _lastFiredAction, _outputPorts, _ptActorCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
DDF(TypedAtomicActor ptActor,
caltrop.interpreter.ast.Actor actor,
caltrop.interpreter.Context context,
caltrop.interpreter.environment.Environment env)
Create an new DDF DDI.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_hasInputDependentGuard() |
java.lang.String |
getName()
Get the name of this DDI.
|
void |
initialize()
Initialize the actor and select the first action to fire.
|
boolean |
isLegalActor()
In DDF, an actor is legal if:
The guards of each action do not depend on the inputs.
|
boolean |
postfire()
Postfire this actor.
|
boolean |
prefire()
Select a fireable action among the actions of the actor, if possible.
|
void |
setupActor()
Setup the actor associated with this DDI.
|
_allEqual, _annotatePortsWithRates, _atLeastOneUnguardedAction, _checkInitializerGuards, _computeActionRates, _computeActionRates, _isBoundByPortVar_selectAction, _selectInitializer, fire, preinitializeaddInitializable, isFireFunctional, isStrict, iterate, removeInitializable, stop, stopFire, terminate, wrapuppublic DDF(TypedAtomicActor ptActor, caltrop.interpreter.ast.Actor actor, caltrop.interpreter.Context context, caltrop.interpreter.environment.Environment env)
ptActor - The instance of ptolemy.actor.Actor that the plugin will be associated with.actor - The abstract syntax tree of the CAL source.context - The context that the plugin will use.env - The environment that the plugin will use.public void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class DataflowIllegalActionExceptionpublic boolean isLegalActor()
isLegalActor in interface DDIisLegalActor in class Dataflowpublic java.lang.String getName()
public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class DataflowIllegalActionException - If postfiring is not permitted.public boolean prefire()
throws IllegalActionException
prefire in interface Executableprefire in class DataflowIllegalActionException - If an error occurred during the
action selection.public void setupActor()
isLegalActor() is called first.
Setup involves attaching attributes with token consumption/production rates to the input and output ports of the actor associated with this DDI.
setupActor in interface DDIsetupActor in class Dataflowprotected boolean _hasInputDependentGuard()