|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.AbstractSettableAttribute
ptolemy.kernel.util.StringAttribute
ptolemy.domains.fsm.kernel.Action
ptolemy.domains.fsm.kernel.AbstractActionsAttribute
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.
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:
command; command; ...where each command has the form:
destination = expressionwhere destination is either
portNameor
portName(channelNumber)or
variableNameHere, portName is the name of a port of the FSM actor, If no channelNumber is given, then the value is broadcast to all channels of the port. Also, variableName 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:
refinementStateName.variableNameIf destination name is given where there is both a port and a variable with that name, then the port will be used.
The expression 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.
CommitActionsAttribute,
Transition,
FSMActor,
Serialized Form
| Red (eal) |
| Yellow (eal) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
ptolemy.kernel.util.NamedObj.ContainedObjectsIterator |
| Nested classes inherited from class ptolemy.kernel.util.Settable |
ptolemy.kernel.util.Settable.Visibility |
| Field Summary |
| Fields inherited from class ptolemy.domains.fsm.kernel.AbstractActionsAttribute |
_destinationNames, _destinations, _destinationsListVersion, _numbers, _parseTreeEvaluator, _parseTrees, _scope |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.kernel.util.Settable |
EXPERT, FULL, NONE, NOT_EDITABLE |
| Constructor Summary | |
CommitActionsAttribute(Transition transition,
java.lang.String name)
Construct an action with the given name contained by the specified transition. |
|
CommitActionsAttribute(ptolemy.kernel.util.Workspace workspace)
Construct an action in the specified workspace with an empty string as a name. |
|
| Method Summary | |
protected ptolemy.kernel.util.NamedObj |
_getDestination(java.lang.String name)
Given a destination name, return a NamedObj that matches that destination. |
void |
execute()
Send tokens to the designated outputs. |
| Methods inherited from class ptolemy.domains.fsm.kernel.AbstractActionsAttribute |
getChannel, getDestination, getDestinationNameList, getExpression, isChannelSpecified, setExpression, typeConstraintList |
| Methods inherited from class ptolemy.domains.fsm.kernel.Action |
setContainer |
| Methods inherited from class ptolemy.kernel.util.StringAttribute |
_propagateValue, addValueListener, exportMoML, getExpression, getVisibility, removeValueListener, setVisibility, validate |
| Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute |
getDefaultExpression |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, clone, getContainer, setName |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, uniqueName, validateSettables, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getContainer, getFullName, getName, getName, setName |
| Constructor Detail |
public CommitActionsAttribute(ptolemy.kernel.util.Workspace workspace)
workspace - The workspace that will list the attribute.
public CommitActionsAttribute(Transition transition,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
transition - The transition that contains this action.name - The name of this action.
ptolemy.kernel.util.IllegalActionException - If the action is not of an
acceptable class for the container.
ptolemy.kernel.util.NameDuplicationException - If the transition already
has an attribute with the name.| Method Detail |
public void execute()
throws ptolemy.kernel.util.IllegalActionException
execute in class AbstractActionsAttributeptolemy.kernel.util.IllegalActionException - If expression evaluation fails,
or the specified port is not found, or sending to one of the
channels of the port throws a NoRoomException.
protected ptolemy.kernel.util.NamedObj _getDestination(java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException
_getDestination in class AbstractActionsAttributename - The name of the destination, or null if none is found.
ptolemy.kernel.util.IllegalActionException - If the associated FSMActor
does not have a destination with the specified name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||