org.jcsp.plugNplay
Class Regular
java.lang.Object
org.jcsp.plugNplay.Regular
- All Implemented Interfaces:
- CSProcess
public class Regular
- extends Object
- implements CSProcess
This process generates a constant stream of Integers at a regular rate.
Process Diagram
_____________
| | out
| Regular (n) |-->--
|_____________|
Description
This process generates a constant stream of Integers at a regular rate
– at least, it does its best!
If the consumption of data is less than the set rate, that rate cannot be sustained.
If the consumption failure is only temporary, the set rate will be restored
when consumption resumes.
The interval (in msecs) defining the output flow rate is given by a constructor argument.
Channel Protocols
Output Channels |
out |
java.lang.Integer |
A constant value is sent down this channel at a regular rate.
|
- Author:
- P.H. Welch
- See Also:
FixedDelay
,
Regulate
Method Summary |
void |
run()
The main body of this process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Regular
public Regular(ChannelOutput out,
int n,
long interval)
- Construct the process.
- Parameters:
out
- the output channeln
- the value to be generatedinterval
- the interval between outputs (in milliseconds)
run
public void run()
- The main body of this process.
- Specified by:
run
in interface CSProcess
Copyright © 1996-2012. All Rights Reserved.