All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jcsp.util.buildingblocks.DynamicDelta

java.lang.Object
   |
   +----jcsp.util.buildingblocks.DynamicDelta

public final class DynamicDelta
extends Object
implements CSProcess

Process Diagram

             ______________  out[1]
         in |              |---->----
 --------->-|              |  :
            | DynamicDelta |  :
  configure |              | out[n]
 ----->-----|______________|---->----
 

Description

The DynamicDelta class is a process which has an infinite loop that waits for either of the in and configure Channels to become ready using the Alternative classes.

If the configure Channel was selected a ChannelOutput object will be read if the object is already one of the ChannelOutputs used to output data the object is removed otherwise it is added.

If the in Channel was selected the object will be read and then written in parallel to each of the output Channels. If there are no output Channels it acts as a black hole.

Channel Protocols

Input Channels
in java.lang.Object The in Channel can accept data of any Class.
in jcsp.lang.ChannelOutput The configure Channel accepts Objects of type ChannelOutput only.
Output Channels
out[] java.lang.Object The output Channels will send the data as the same type as sent down the in Channel.

Author:
P.D.Austin

Constructor Index

 o DynamicDelta(AltingChannelInput, AltingChannelInput)
Construct a new DynamicDelta process with the input Channel in and the configuration Channel configure.
 o DynamicDelta(AltingChannelInput, AltingChannelInput, ChannelOutput[])
Construct a new DynamicDelta process with the input Channel in, the configuration Channel configure and the initial output Channels out.

Method Index

 o run()
The main body of this process.

Constructors

 o DynamicDelta
 public DynamicDelta(AltingChannelInput in,
                     AltingChannelInput config)
Construct a new DynamicDelta process with the input Channel in and the configuration Channel configure.

Parameters:
in - The input Channel
configure - The configuration Channel
 o DynamicDelta
 public DynamicDelta(AltingChannelInput in,
                     AltingChannelInput config,
                     ChannelOutput out[])
Construct a new DynamicDelta process with the input Channel in, the configuration Channel configure and the initial output Channels out. The ordering of the Channels in the out array make no difference to the functionality of this process.

Parameters:
in - The input Channel
configure - The configuration Channel
out - The output Channels

Methods

 o run
 public void run()
The main body of this process.


All Packages  Class Hierarchy  This Package  Previous  Next  Index