|
||||||||||
| 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
A base class for actions with semicolon delimited lists of commands.
The value of this attribute is a semicolon separated list of commands, where each command gives a destination to send data to and a value to send. 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
nameor
name(number)
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 |
NamedObj.ContainedObjectsIterator |
| Nested classes inherited from class ptolemy.kernel.util.Settable |
Settable.Visibility |
| Field Summary | |
protected java.util.List |
_destinationNames
|
protected java.util.List |
_destinations
|
protected long |
_destinationsListVersion
|
protected java.util.List |
_numbers
|
protected ParseTreeEvaluator |
_parseTreeEvaluator
|
protected java.util.List |
_parseTrees
|
protected ParserScope |
_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 | |
AbstractActionsAttribute(Transition transition,
java.lang.String name)
Construct an action with the given name contained by the specified transition. |
|
AbstractActionsAttribute(Workspace workspace)
Construct an action in the specified workspace with an empty string as a name. |
|
| Method Summary | |
protected abstract NamedObj |
_getDestination(java.lang.String name)
Given a destination name, return a NamedObj that matches that destination. |
void |
execute()
Execute this action. |
int |
getChannel(java.lang.String name)
Return the channel number associated with the given name, assuming that the destination is a port object. |
NamedObj |
getDestination(java.lang.String name)
Return the destination object referred to by the given name. |
java.util.List |
getDestinationNameList()
Return the list of destination names given in expression set for this attribute. |
java.lang.String |
getExpression(java.lang.String name)
Return the expression referred to by the given name. |
boolean |
isChannelSpecified(java.lang.String name)
Test if a channel number is associated with the given name. |
void |
setExpression(java.lang.String expression)
Set the action and notify the container that the action has changed by calling attributeChanged(), and notify any listeners that have been registered using addValueListener(). |
java.util.List |
typeConstraintList()
Return the type constraints of this object. |
| 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 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 |
| Field Detail |
protected java.util.List _numbers
protected java.util.List _destinations
protected java.util.List _destinationNames
protected long _destinationsListVersion
protected java.util.List _parseTrees
protected ParseTreeEvaluator _parseTreeEvaluator
protected ParserScope _scope
| Constructor Detail |
public AbstractActionsAttribute(Workspace workspace)
workspace - The workspace that will list the attribute.
public AbstractActionsAttribute(Transition transition,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
transition - The transition that contains this action.name - The name of this action.
IllegalActionException - If the action is not of an
acceptable class for the container, or if the name contains
a period.
NameDuplicationException - If the transition already
has an attribute with the name.| Method Detail |
public void execute()
throws IllegalActionException
execute in class ActionIllegalActionException - If a destination is not found.
public int getChannel(java.lang.String name)
throws IllegalActionException
IllegalActionException - If the name does not refer to a
port, or a channel has not been specified for the name.
public NamedObj getDestination(java.lang.String name)
throws IllegalActionException
IllegalActionException - If the given name is not a valid
destination for this action.public java.util.List getDestinationNameList()
public java.lang.String getExpression(java.lang.String name)
public boolean isChannelSpecified(java.lang.String name)
public void setExpression(java.lang.String expression)
throws IllegalActionException
setExpression in interface SettablesetExpression in class StringAttributeexpression - The action.
IllegalActionException - If the change is not acceptable
to the container, or if the action is syntactically incorrect.public java.util.List typeConstraintList()
typeConstraintList in interface HasTypeConstraintsInequality
protected abstract NamedObj _getDestination(java.lang.String name)
throws IllegalActionException
name - The name of the destination, or null if none is found.
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 | |||||||||