|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.caltrop.ddi.AbstractDDI
ptolemy.caltrop.ddi.SDF
A plugin for the SDF domain. In SDF, a CAL actor is valid if:
| Red (cxh) |
| Red (cxh) |
| Field Summary |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
SDF(CalInterpreter ptActor,
caltrop.interpreter.ast.Actor actor,
caltrop.interpreter.Context context,
caltrop.interpreter.environment.Environment env)
Create an SDF |
|
| Method Summary | |
void |
fire()
Executes the selected action on the first fire() call. |
java.lang.String |
getName()
Get the name of this SDF. |
void |
initialize()
In SDF, selecting which initializer to fire is already done in preinitialize(). |
boolean |
isLegalActor()
In SDF, an actor is legal if: The rates of each action are statically computable, and these rates are the same for each action. |
boolean |
postfire()
This method should be invoked once per iteration, after the last invocation of fire() in that iteration. |
boolean |
prefire()
Select a firable action among the actions of the actor, if possible. |
void |
preinitialize()
This method should be invoked exactly once per execution of a model, before any of these other methods are invoked. |
void |
setupActor()
Setup the actor associated with this DDI. |
| Methods inherited from class ptolemy.caltrop.ddi.AbstractDDI |
iterate, stop, stopFire, terminate, wrapup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ptolemy.actor.Executable |
iterate, stop, stopFire, terminate, wrapup |
| Constructor Detail |
public SDF(CalInterpreter 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.| Method Detail |
public boolean isLegalActor()
isLegalActor in interface DDIpublic 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 DDIpublic java.lang.String getName()
getName in interface DDI
public void fire()
throws IllegalActionException
fire() call. On successive calls, it rolls back previous state
changes, selects a new action and executes it.
Note: Is this correct behavior? What is the contract between the result of prefire() and successive calls to fire()?
fire in interface ExecutableIllegalActionException - If an error occurs during the
interpretation of the action.
public void initialize()
throws IllegalActionException
initialize in interface ExecutableIllegalActionException
public boolean postfire()
throws IllegalActionException
Executable
postfire in interface ExecutableIllegalActionException - If postfiring is not permitted.
public boolean prefire()
throws IllegalActionException
prefire in interface ExecutableIllegalActionException - If an error occurred during
the action selection.
public void preinitialize()
throws IllegalActionException
Executable
preinitialize in interface ExecutableIllegalActionException - If initializing is not permitted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||