Package ptolemy.actor.lib.aspect
Class ExecutionTimeAttributes
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.kernel.util.DecoratorAttributes
-
- ptolemy.actor.ExecutionAttributes
-
- ptolemy.actor.lib.aspect.ExecutionTimeAttributes
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
- Direct Known Subclasses:
CompositeExecutionAspect.CompositeExecutionAspectAttributes
,PriorityResourceAttributes
public class ExecutionTimeAttributes extends ExecutionAttributes
Container for decorator attributes that are provided to actors by a ExecutionAspect that schedules execution times. The ExecutionAspect decorates actors in a model with the attributes contained by this object.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Patricia Derler, Edward A. Lee
- Pt.AcceptedRating:
- Red (eal)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
executionTime
The executionTime parameter specifies the execution time of the decorated object.-
Fields inherited from class ptolemy.actor.ExecutionAttributes
enable
-
Fields inherited from class ptolemy.kernel.util.DecoratorAttributes
_decorator, decoratorName
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description ExecutionTimeAttributes(NamedObj target, java.lang.String name)
Constructor to use when parsing a MoML file.ExecutionTimeAttributes(NamedObj target, Decorator decorator)
Constructor to use when editing a model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attributeChanged(Attribute attribute)
React to a change in an attribute.boolean
canSimulateExecutionFor(NamedObj target)
Return whether the target can have an execution time that can be simulated.-
Methods inherited from class ptolemy.actor.ExecutionAttributes
enabled
-
Methods inherited from class ptolemy.kernel.util.DecoratorAttributes
clone, exportMoML, getDecorator
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, 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, toString, uniqueName, validateSettables, workspace
-
-
-
-
Field Detail
-
executionTime
public Parameter executionTime
The executionTime parameter specifies the execution time of the decorated object. This means the time that the decorated actor occupies the decorator resource when it fires. This is a double that defaults to 0.0.
-
-
Constructor Detail
-
ExecutionTimeAttributes
public ExecutionTimeAttributes(NamedObj target, Decorator decorator) throws IllegalActionException, NameDuplicationException
Constructor to use when editing a model.- Parameters:
target
- The object being decorated.decorator
- The decorator.- Throws:
IllegalActionException
- If the superclass throws it.NameDuplicationException
- If the superclass throws it.
-
ExecutionTimeAttributes
public ExecutionTimeAttributes(NamedObj target, java.lang.String name) throws IllegalActionException, NameDuplicationException
Constructor to use when parsing a MoML file.- Parameters:
target
- The object being decorated.name
- The name of this attribute.- Throws:
IllegalActionException
- If the superclass throws it.NameDuplicationException
- If the superclass throws it.
-
-
Method Detail
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
React to a change in an attribute. If the attribute is executionTime, check that it is non-negative.- Overrides:
attributeChanged
in classExecutionAttributes
- Parameters:
attribute
- The attribute that changed.- Throws:
IllegalActionException
- If the change is not acceptable to this container (not thrown in this base class).
-
canSimulateExecutionFor
public boolean canSimulateExecutionFor(NamedObj target)
Return whether the target can have an execution time that can be simulated. For instance, it does not make sense to simulate execution time of states in modal models, but it does make sense to monitor the execution of states such as entry times.- Parameters:
target
- The object decorated with the attributes.- Returns:
- True if execution target can have execution time.
-
-