public class ActionsAttribute extends AbstractActionsAttribute
This class is similar to CommitActionsAttribute
and OutputActionsAttribute
in FSM. The difference is that in Ptera, no distinction
is made between commit actions and output actions. The destination of an
assignment can be either a variable or a port. If a port and a variable have
the same name in a Ptera model, then assigning to that name causes output to
be sent to the port instead of changing the value of the variable.
Another difference between this class and those in FSM is that in Ptera, events are allowed to receive parameters. The parameters can be referred to in the actions associated with that event.
CommitActionsAttribute
NamedObj.ContainedObjectsIterator
Settable.Visibility
_destinationNames, _destinations, _destinationsListVersion, _parseTreeEvaluator, _parseTrees
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
EXPERT, FULL, NONE, NOT_EDITABLE
Constructor and Description |
---|
ActionsAttribute(Event event,
java.lang.String name)
Construct an ActionsAttribute for a Ptera event.
|
ActionsAttribute(Workspace workspace)
Construct an ActionsAttribute in the specified workspace with an empty
string as a name.
|
Modifier and Type | Method and Description |
---|---|
protected NamedObj |
_getDestination(java.lang.String name)
Given a destination name, return a NamedObj that matches that
destination.
|
protected ParserScope |
_getParserScope()
Return a parser scope used to type-check the actions.
|
void |
execute()
Execute this action.
|
clone, getChannelNumberList, getDestination, getDestinationNameList, getDestinations, getExpression, getParseTree, getParseTreeList, isChannelSpecified, setExpression, toString, typeConstraints
setContainer
_propagateValue, addValueListener, exportMoML, getExpression, getVisibility, removeValueListener, setVisibility, validate
getDefaultExpression, getValueAsString
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDisplayName
description, getContainer, getFullName, getName, getName, setName
public ActionsAttribute(Event event, java.lang.String name) throws IllegalActionException, NameDuplicationException
event
- The event.name
- The name of the attribute.IllegalActionException
- If the action is not of an
acceptable class for the container, or if the name contains
a period.NameDuplicationException
- If the container already
has an attribute with the name.public ActionsAttribute(Workspace workspace)
workspace
- The workspace that will list the attribute.public void execute() throws IllegalActionException
execute
in class AbstractActionsAttribute
IllegalActionException
- If a destination is not found or if
thrown while evaluating the expressions.protected NamedObj _getDestination(java.lang.String name) throws IllegalActionException
_getDestination
in class AbstractActionsAttribute
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.protected ParserScope _getParserScope()
_getParserScope
in class AbstractActionsAttribute