
ContinuousClock |
ptolemy.domains.ct.lib.ContinuousClock |
This is a clock source used in continuous-time (CT) domain.
It extends the clock actor in ptolemy/actor/lib directory
but overrides the fire, initialize, preinitialize and postfire method.
This actor serves as a wave form generator in CT domain.
The actor uses the fireAt() method of the director to request
firings at the beginning of each period plus each of the offsets,
which are treated as breakpoints. At each breakpoint,
the actor produces two outputs, one at t_minus phase and the other
one at t_plus phase. The time does not advance at these two phases.
For example, with the default settings, at time 1.0, the actor
produces 0 at t_minus phase and 1 at t_plus phase. Note, at
time t, which is between t_minus and t_plus, the possible output of
this actor can be any value between 0 and 1.
The clock has a stopTime parameter and a numberOfCycles parameter.
The whole model will stop execution when the
stop time is reached. If the numberOfCycles is set to a positive integer,
the clock will continue outputting the value of the defaultValue parameter
after the number of cycles are reached if the stop time is not reached.
Author(s): Edward A. Lee, Haiyang Zheng
Version:$Id: ContinuousClock.java,v 1.44 2005/10/29 00:46:26 cxh Exp $
Pt.Proposed Rating:Red (hyzheng)
Pt.Accepted Rating:Red (hyzheng)
defaultValue
The default value used after the clock stops. In the triggered
continuous clock, which extends this class and has a start
trigger, the default value is used as output before the clock starts.
This parameter must contain a token, and it defaults to 0.