CSP for Java
(JCSP) 1.1-rc4

org.jcsp.plugNplay.ints
Class DynamicDeltaInt

java.lang.Object
  extended by org.jcsp.plugNplay.ints.DynamicDeltaInt
All Implemented Interfaces:
CSProcess

public final class DynamicDeltaInt
extends Object
implements CSProcess

This process broadcasts integers arriving on its input channel in parallel to its output channel array -- those output channels can be changed dynamically.

Process Diagram

Description

A DynamicDeltaInt process is a broadcasting node whose array of broadcasting channels can be changed dynamically. Any process can become one of the recipients of the broadcast by sending the DynamicDeltaInt a channel on which it will be listening. A process may leave the broadcast be re-sending that same channel.

In each cycle, DynamicDeltaInt waits for either its in or configure channel to become ready, giving priority to configure.

Anything arriving from in is broadcast in parallel down each element of its array of out channels.

The configure channel delivers ChannelOutputInt channels -- anything else is discarded. If the delivered ChannelOutputInt channel is not one of the channels already in the output array, it is added -- otherwise it is removed.

Channel Protocols

Input Channels
in int All channels in this package carry integers.
config java.lang.ChannelOutputInt All channels in this package carry integers -- except for this one, which accepts only ChannelOutputInt objects (discarding all others).
Output Channels
out[] int The output Channels will carry a broadcast of whatever integers are sent down the in Channel.

Author:
P.H. Welch and P.D. Austin

Constructor Summary
DynamicDeltaInt(AltingChannelInputInt in, AltingChannelInput config)
          Construct a new DynamicDeltaInt process with the input channel in and the configuration channel configure.
DynamicDeltaInt(AltingChannelInputInt in, AltingChannelInput config, ChannelOutputInt[] out)
          Construct a new DynamicDeltaInt process with the input channel in, the configuration channel configure and the initial output channels out.
 
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
 

Constructor Detail

DynamicDeltaInt

public DynamicDeltaInt(AltingChannelInputInt in,
                       AltingChannelInput config)
Construct a new DynamicDeltaInt process with the input channel in and the configuration channel configure.

Parameters:
in - the input Channel
config - the configuration channel

DynamicDeltaInt

public DynamicDeltaInt(AltingChannelInputInt in,
                       AltingChannelInput config,
                       ChannelOutputInt[] out)
Construct a new DynamicDeltaInt 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
config - the configuration channel
out - the output channels
Method Detail

run

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

Specified by:
run in interface CSProcess

CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.