|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.caltrop.ddi.AbstractDDI
ptolemy.caltrop.ddi.Dataflow
public class Dataflow
Red (cxh) |
Red (cxh) |
Field Summary | |
---|---|
protected caltrop.interpreter.ast.Action[] |
_actions
|
protected caltrop.interpreter.ast.Actor |
_actor
|
protected ptolemy.caltrop.ddi.util.DataflowActorInterpreter |
_actorInterpreter
|
protected caltrop.interpreter.Context |
_context
|
protected java.util.Set |
_currentStateSet
|
protected caltrop.interpreter.ast.Transition[] |
_currentTransitions
|
protected caltrop.interpreter.environment.Environment |
_env
|
protected java.util.Map |
_inputPorts
|
protected caltrop.interpreter.ast.Action |
_lastFiredAction
|
protected java.util.Map |
_outputPorts
|
protected TypedAtomicActor |
_ptActor
|
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
Dataflow(TypedAtomicActor ptActor,
caltrop.interpreter.ast.Actor actor,
caltrop.interpreter.Context context,
caltrop.interpreter.environment.Environment env)
|
Method Summary | |
---|---|
private void |
_commitInputChannels()
|
private void |
_computeNextTransitions()
|
private void |
_rollbackInputChannels()
|
protected int |
_selectAction()
This method picks an action for which the actor interpreter evaluates the guard to true. |
protected int |
_selectInitializer()
|
private void |
computeNextStateSet(caltrop.interpreter.ast.Action a)
|
private java.util.Map |
createPortMap(caltrop.interpreter.ast.PortDecl[] ports,
boolean isInput)
|
void |
fire()
Executes the selected action on the first fire() call. |
java.lang.String |
getName()
Get the name of the domain that this DDI implements. |
void |
initialize()
In SDF, selecting which initializer to fire is already done in preinitialize(). |
private boolean |
isEligibleAction(caltrop.interpreter.ast.Action a)
|
boolean |
isLegalActor()
Perform static checking on the actor, ensuring its validity in a given domain. |
private static boolean |
isPrefixedByTagList(caltrop.interpreter.ast.QID tag,
caltrop.interpreter.ast.QID[] tags)
|
boolean |
postfire()
Postfire this actor. |
boolean |
prefire()
Select a firable action among the actions of the actor, if possible. |
void |
preinitialize()
Preinitialize this actor. |
void |
setupActor()
Perform any domain dependent setup. |
Methods inherited from class ptolemy.caltrop.ddi.AbstractDDI |
---|
addInitializable, isFireFunctional, isStrict, iterate, removeInitializable, stop, stopFire, terminate, wrapup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TypedAtomicActor _ptActor
protected caltrop.interpreter.ast.Actor _actor
protected caltrop.interpreter.ast.Action[] _actions
protected caltrop.interpreter.Context _context
protected caltrop.interpreter.environment.Environment _env
protected java.util.Set _currentStateSet
protected caltrop.interpreter.ast.Transition[] _currentTransitions
protected ptolemy.caltrop.ddi.util.DataflowActorInterpreter _actorInterpreter
protected java.util.Map _inputPorts
protected java.util.Map _outputPorts
protected caltrop.interpreter.ast.Action _lastFiredAction
Constructor Detail |
---|
public Dataflow(TypedAtomicActor ptActor, caltrop.interpreter.ast.Actor actor, caltrop.interpreter.Context context, caltrop.interpreter.environment.Environment env)
Method Detail |
---|
private java.util.Map createPortMap(caltrop.interpreter.ast.PortDecl[] ports, boolean isInput)
public boolean isLegalActor()
DDI
public void setupActor()
DDI
public java.lang.String getName()
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()?
IllegalActionException
- If an error occurs during the
interpretation of the action.public void preinitialize() throws IllegalActionException
IllegalActionException
- If initializing is not permitted.protected int _selectAction()
protected int _selectInitializer()
public void initialize() throws IllegalActionException
IllegalActionException
private void _commitInputChannels()
private void _rollbackInputChannels()
public boolean postfire() throws IllegalActionException
IllegalActionException
- If postfiring is not permitted.public boolean prefire() throws IllegalActionException
IllegalActionException
- If an error occurred during the
action selection.private boolean isEligibleAction(caltrop.interpreter.ast.Action a)
private void computeNextStateSet(caltrop.interpreter.ast.Action a)
private void _computeNextTransitions()
private static boolean isPrefixedByTagList(caltrop.interpreter.ast.QID tag, caltrop.interpreter.ast.QID[] tags)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |