
CommitActionsAttribute |
ptolemy.domains.fsm.kernel.CommitActionsAttribute |
An action that sends outputs to one or more ports, or sets the values
of variables either in the containing FSMActor or in a state refinement.
This action is contained by a transition,
and is evaluated whenever that transition is taken. The evaluation
is done in the postfire() method of the FSMActor that contains the
transition (hereafter called "the FSM actor").
To specify an action that is executed earlier, in the fire()
method, when the transition is enabled rather than taken,
use the class OutputActionsAttribute.
<p>
The value of this attribute is a semicolon separated list of commands,
where each command gives a destination and a value.
The actions are given by calling setExpression() with
a string of the form:
<pre>
<i>command</i>; <i>command</i>; ...
</pre>
where each <i>command</i> has the form:
<pre>
<i>destination</i> = <i>expression</i>
</pre>
where <i>destination</i> is either
<pre>
<i>portName</i>
</pre>
or
<pre>
<i>portName</i>(<i>channelNumber</i>)
</pre>
or
<pre>
<i>variableName</i>
</pre>
Here, <i>portName</i> is the name of a port of the FSM actor,
If no <i>channelNumber</i> is given, then the value
is broadcast to all channels of the port.
Also, <i>variableName</i> is either a variable or parameter of
the FSM actor, or a variable or parameter of a refinement state.
To give a variable of a refinement state, use a dotted name,
as follows:
<pre>
<i>refinementStateName</i>.<i>variableName</i>
</pre>
If destination name is given where there is both a port and a variable
with that name, then the port will be used.
<p>
The <i>expression</i> is a string giving an expression in the usual
Ptolemy II expression language. The expression may include references
to variables and parameters contained by the FSM actor.
Author(s): Xiaojun Liu and Edward A. Lee
Version:$Id: CommitActionsAttribute.doc.html,v 1.1 2006/02/22 18:40:26 mangal Exp $
Pt.Proposed Rating:Yellow (eal)
Pt.Accepted Rating:Red (eal)