Package ptolemy.actor.lib.gui
Class TimedPlotter
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,PortablePlaceable
,TimedActor
,TypedActor
,Changeable
,Configurable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
- Direct Known Subclasses:
TimedScope
public class TimedPlotter extends Plotter implements TimedActor
A signal plotter. This plotter contains an instance of the Plot class from the Ptolemy plot package as a public member. Data at the input, which can consist of any number of channels, are plotted on this instance. Each channel is plotted as a separate data set. The horizontal axis represents time, which by default is the global time of the model (the model time of the top-level director). Setting useLocalTime to true changes this to use the local time of the input port, which is (in most domains) the model time of the local director.- Since:
- Ptolemy II 1.0
- Version:
- $Id$
- Author:
- Edward A. Lee, Contributor: Bert Rodiers
- Pt.AcceptedRating:
- Green (cxh)
- Pt.ProposedRating:
- Green (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
disconnectGraphOnAbsentValue
When disconnectGraphOnAbsentValue is True there will be a gap in the graph each time a the actor is fired, but the value is absent for a certain channel.TypedIOPort
input
Input port, which has type DoubleToken.Parameter
useLocalTime
If true, use the model time reported by the input port, which is normally the model time of the local director.-
Fields inherited from class ptolemy.actor.lib.gui.Plotter
startingDataset
-
Fields inherited from class ptolemy.actor.lib.gui.PlotterBase
_base, _source, _text, automaticRescale, fillOnWrapup, legend, plot
-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
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
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description TimedPlotter(CompositeEntity container, java.lang.String name)
Construct an actor with the given container and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone(Workspace workspace)
Clone the actor into the specified workspace.void
initialize()
Initialize this actor.boolean
postfire()
Read at most one input from each channel and plot it as a function of time.boolean
prefire()
Pre-fire this actor.-
Methods inherited from class ptolemy.actor.lib.gui.Plotter
attributeChanged
-
Methods inherited from class ptolemy.actor.lib.gui.PlotterBase
_exportMoMLContents, _getImplementation, _implementDeferredConfigurations, _isMoMLSuppressed, _newPlot, _propagateValue, cleanUp, configure, getConfigureSource, getConfigureText, place, preinitialize, setContainer, setDisplayName, setFrame, setName, wrapup
-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, stop, stopFire, terminate
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, isStrict, iterate, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, removeInitializable
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName
-
-
-
-
Field Detail
-
disconnectGraphOnAbsentValue
public Parameter disconnectGraphOnAbsentValue
When disconnectGraphOnAbsentValue is True there will be a gap in the graph each time a the actor is fired, but the value is absent for a certain channel. Especially in the continuous domain this options is useful. By default this parameter is False.
-
input
public TypedIOPort input
Input port, which has type DoubleToken.
-
useLocalTime
public Parameter useLocalTime
If true, use the model time reported by the input port, which is normally the model time of the local director. If false (the default), use the model time reported by the top-level director. Local time may differ from global time inside modal models and certain domains that manipulate time.
-
-
Constructor Detail
-
TimedPlotter
public TimedPlotter(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct an actor with the given container and name.- Parameters:
container
- The container.name
- The name of this actor.- Throws:
IllegalActionException
- If the actor cannot be contained by the proposed container.NameDuplicationException
- If the container already has an actor with this name.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the actor into the specified workspace. This calls the base class and then creates new ports and parameters.- Overrides:
clone
in classPlotterBase
- Parameters:
workspace
- The workspace for the new object.- Returns:
- A new actor.
- Throws:
java.lang.CloneNotSupportedException
- If a derived class has an attribute that cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,NamedObj.setDeferringChangeRequests(boolean)
-
prefire
public boolean prefire() throws IllegalActionException
Pre-fire this actor. Recompute _connected is needed- Specified by:
prefire
in interfaceExecutable
- Overrides:
prefire
in classAtomicActor<TypedIOPort>
- Returns:
- True if this actor is ready for firing, false otherwise.
- Throws:
IllegalActionException
- If a derived class throws it.
-
initialize
public void initialize() throws IllegalActionException
Initialize this actor. Derived classes override this method to perform actions that should occur once at the beginning of an execution, but after type resolution. Derived classes can produce output data and schedule events.- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classPlotter
- Throws:
IllegalActionException
- If a derived class throws it.
-
postfire
public boolean postfire() throws IllegalActionException
Read at most one input from each channel and plot it as a function of time. This is done in postfire to ensure that data has settled.- Specified by:
postfire
in interfaceExecutable
- Overrides:
postfire
in classAtomicActor<TypedIOPort>
- Returns:
- True if it is OK to continue.
- Throws:
IllegalActionException
- If there is no director, or if the base class throws it.
-
-