|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.continuous.lib.EventSource
with period set to Infinity
public class EventSource
This actor outputs a set of events at a discrete set of time points. It can be used to generate impulses in Continuous models. Events are produced at superdense time index 1 or greater in order to ensure that the output is piecewise continuous.
This actor only generates predictable events and that is why it does not implement the ContinuousStepSizeControlActor interface. This actor requests a refiring in its initialize() method to produce events. During its postfire() method, it requests further firings to produce more events if necessary.
Yellow (hyzheng) |
Yellow (hyzheng) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
private Time |
_cycleStartTime
Deprecated. The most recent cycle start time. |
private int |
_nextOutputIndex
Deprecated. The index of when the output should be emitted. |
private Time |
_nextOutputTime
Deprecated. The next time point when the output should be emitted. |
private double[] |
_offsets
Deprecated. Cache of offsets array value. |
private int |
_phase
Deprecated. The phase of the next output. |
private int |
_readyToFire
Deprecated. The flag indicating whether the time is right to produce output. |
private static int |
_TIME_NOT_RIGHT
Deprecated. |
private static int |
_TIME_RIGHT
Deprecated. |
private static int |
_TIME_RIGHT_INDEX_EARLY
Deprecated. |
Parameter |
offsets
Deprecated. The offsets at which the specified values will be produced. |
TypedIOPort |
output
Deprecated. The output port. |
Parameter |
period
Deprecated. The period of the output events. |
Parameter |
values
Deprecated. The values that will be produced at the specified offsets. |
Fields inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _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 | |
---|---|
EventSource(CompositeEntity container,
java.lang.String name)
Deprecated. Construct an actor in the specified container with the specified name. |
Method Summary | |
---|---|
void |
attributeChanged(Attribute attribute)
Deprecated. If the argument is the offsets parameter, check that the array is nondecreasing and has the right dimension; if the argument is period, check that it is positive. |
java.lang.Object |
clone(Workspace workspace)
Deprecated. Clone the actor into the specified workspace. |
void |
fire()
Deprecated. Emit the discrete event that happens at the current time. |
void |
initialize()
Deprecated. Schedule the first firing and initialize local variables. |
boolean |
postfire()
Deprecated. Update the state of the actor and schedule the next firing, if the director is in the discrete phase. |
boolean |
prefire()
Deprecated. Return true if this actor is scheduled to fire at the current time. |
Methods inherited from class ptolemy.actor.TypedAtomicActor |
---|
_addPort, _fireAt, _fireAt, attributeTypeChanged, clone, newPort, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _exportMoMLContents, _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 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.actor.Executable |
---|
isFireFunctional, isStrict, iterate, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
public TypedIOPort output
public Parameter offsets
public Parameter period
public Parameter values
private transient Time _cycleStartTime
private transient double[] _offsets
private transient int _phase
private transient int _nextOutputIndex
private transient Time _nextOutputTime
private transient int _readyToFire
private static final int _TIME_RIGHT
private static final int _TIME_RIGHT_INDEX_EARLY
private static final int _TIME_NOT_RIGHT
Constructor Detail |
---|
public EventSource(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The actor's name
IllegalActionException
- If the entity cannot be contained
by the proposed container.
NameDuplicationException
- If name coincides with
an entity already in the container.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the offsets array is not
nondecreasing and nonnegative, or it is not a row vector.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class AtomicActor
workspace
- The workspace for the new object.
java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor
IllegalActionException
- If the event cannot be sent.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor
IllegalActionException
- If the parent class throws it,
or if the values parameter is not a row vector, or if the
fireAt() method of the director throws it, or if the director does not
agree to fire the actor at the specified time.public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class AtomicActor
IllegalActionException
- If the director throws it when
scheduling the next firing, or if the length of the values and
offsets parameters don't match, or if the director does not
agree to fire the actor at the specified time.public boolean prefire() throws IllegalActionException
prefire
in interface Executable
prefire
in class AtomicActor
IllegalActionException
- If thrown by the super class.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |