public class OutputActionsAttribute extends AbstractActionsAttribute implements ChoiceAction
The value of this attribute is a semicolon separated list of commands, where each command gives a destination port 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
portNameor
portName(channelNumber)where 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.
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
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 |
---|
OutputActionsAttribute(Transition transition,
java.lang.String name)
Construct an action with the given name contained
by the specified transition.
|
OutputActionsAttribute(Workspace workspace)
Construct an action 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.
|
void |
execute()
Send tokens to the designated outputs.
|
_getParserScope, 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 OutputActionsAttribute(Workspace workspace)
workspace
- The workspace that will list the attribute.public OutputActionsAttribute(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.NameDuplicationException
- If the transition already
has an attribute with the name.public void execute() throws IllegalActionException
execute
in class AbstractActionsAttribute
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 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.