ptolemy.domains.tdl.kernel
Class TDLTransition

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.Relation
          extended by ptolemy.kernel.ComponentRelation
              extended by ptolemy.domains.fsm.kernel.Transition
                  extended by ptolemy.domains.tdl.kernel.TDLTransition
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

public class TDLTransition
extends Transition

A TDL transition has some specific TDL parameters. - frequency: together with the mode period, this value defines when this transition is tested.

Since:
Ptolemy II 8.0
Version:
$Id: TDLTransition.java 57044 2010-01-27 22:41:05Z cxh $
Author:
Patricia Derler
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Field Summary
 Parameter frequency
          The frequency of the transition.
 java.util.List requiredPorts
          List of all ports that are used in this guard expression.
 java.util.List requiredSensors
          List of Sensors that are used in this guard expression.
 
Fields inherited from class ptolemy.domains.fsm.kernel.Transition
annotation, defaultTransition, exitAngle, gamma, guardExpression, nondeterministic, outputActions, preemptive, refinementName, reset, setActions
 
Fields inherited from class ptolemy.kernel.Relation
_linkList
 
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Constructor Summary
TDLTransition(TDLActor container, java.lang.String name)
          Construct a transition with the given name contained by the specified entity.
TDLTransition(Workspace workspace)
          Construct a transition contained by the specified entity.
 
Method Summary
private  void _getDependentModuleInputPorts()
          Compute the list of ports that are used in this guard expression.
private  void _init()
          Initialize the parameters of a transition.
 void attributeChanged(Attribute attribute)
          React to a change in an attribute.
 
Methods inherited from class ptolemy.domains.fsm.kernel.Transition
_checkPort, choiceActionList, clone, commitActionList, destinationState, getGuardExpression, getLabel, getParseTreeEvaluator, getRefinement, isDefault, isEnabled, isEnabled, isNondeterministic, isPreemptive, setContainer, setGuardExpression, sourceState
 
Methods inherited from class ptolemy.kernel.ComponentRelation
_checkContainer, _checkRelation, _propagateExistence, deepLinkedPortList, deepLinkedPorts, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, unlinkAll
 
Methods inherited from class ptolemy.kernel.Relation
_description, _getContainedObject, link, linkedObjectsList, linkedPortList, linkedPortList, linkedPorts, linkedPorts, numLinks, relationGroupList, unlink
 
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, 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, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

frequency

public Parameter frequency
The frequency of the transition.


requiredPorts

public java.util.List requiredPorts
List of all ports that are used in this guard expression.


requiredSensors

public java.util.List requiredSensors
List of Sensors that are used in this guard expression.

Constructor Detail

TDLTransition

public TDLTransition(Workspace workspace)
              throws IllegalActionException,
                     NameDuplicationException
Construct a transition contained by the specified entity.

Parameters:
workspace - The workspace for synchronization and version tracking.
Throws:
IllegalActionException - If the container is incompatible with this transition.
NameDuplicationException - If the name coincides with any relation already in the container.

TDLTransition

public TDLTransition(TDLActor container,
                     java.lang.String name)
              throws IllegalActionException,
                     NameDuplicationException
Construct a transition with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This transition will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string.

Parameters:
container - The container.
name - The name of the transition.
Throws:
IllegalActionException - If the container is incompatible with this transition.
NameDuplicationException - If the name coincides with any relation already in the container.
Method Detail

attributeChanged

public void attributeChanged(Attribute attribute)
                      throws IllegalActionException
Description copied from class: Transition
React to a change in an attribute. If the changed attribute is the preemptive parameter, evaluate the parameter. If the parameter is given an expression that does not evaluate to a boolean value, throw an exception; otherwise increment the version number of the workspace.

Overrides:
attributeChanged in class Transition
Parameters:
attribute - The attribute that changed.
Throws:
IllegalActionException - If thrown by the superclass attributeChanged() method, or the changed attribute is the preemptive parameter and is given an expression that does not evaluate to a boolean value.

_getDependentModuleInputPorts

private void _getDependentModuleInputPorts()
                                    throws IllegalActionException
Compute the list of ports that are used in this guard expression.

Throws:
IllegalActionException - Thrown if guard expression cannot be parsed.

_init

private void _init()
            throws NameDuplicationException,
                   IllegalActionException
Initialize the parameters of a transition.

Throws:
IllegalActionException - Thrown if frequency parameter cannot be created.
NameDuplicationException - Thrown if The frequency parameter cannot be created.