All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class test.jcsp.DynamicDeltaTest

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----jcsp.awt.ActiveApplet
                                           |
                                           +----test.jcsp.DynamicDeltaTest

public class DynamicDeltaTest
extends ActiveApplet
implements ActionListener

Applet

Process Diagram

External View

  __________________
 |                  |
 | DynamicDeltaTest |
 |__________________|
 

Internal View

  _________________________________________________________
 |  _____       ___________________      ______________    |
 | |     | nos |                   | in |              |   |
 | | Nos |-->--| FixedDelay (1000) |-->-| DynamicDelta |   |
 | |_____|     |___________________|    |______________|   |
 |                                           |    |        |
 |                                    out[0] v....v out[n] |
 |                                       ____|____|____    |
 |                                      |              |   |
 |                                      |              |   |
 |                                      |______________|   |
 |                                                         |
 |                                        DynamicDeltaTest |
 |_________________________________________________________|
 

Description

The DynamicdeltaTest Applet has four processes an instance of Nos, FixedDelay, DynamicDelta, and an anonymous process running in Parallel.

The anonymous process has an infinite loop which waits for input to become available on any of the out Channels using the Alternative class. Upon receiving the Object the Object and the Channel number are output.

The user can add and remove Channels from the DynamicDelta using the interface.

The purpose of this test is to check to see if adding and removing Channels from a DynamicDelta functions correctly.

NOTE: The code for this Applet is not a good example of developing programs using the library, it has been designed to allow the component to be tested without depending on more classes from the library than is necessary.

Author:
P.D.Austin

Constructor Index

 o DynamicDeltaTest()

Method Index

 o actionPerformed(ActionEvent)
If the component which generated was the add Button the current selected item from the inactiveChannels list will obtained.
 o getAppletInfo()
returns the name and author of the Applet.
 o init()
Initialises the main AppletTest Applet.

Constructors

 o DynamicDeltaTest
 public DynamicDeltaTest()

Methods

 o init
 public void init()
Initialises the main AppletTest Applet. This method creates the visual components and the CSP process network and starts it running.

Overrides:
init in class Applet
 o actionPerformed
 public void actionPerformed(ActionEvent e)
If the component which generated was the add Button the current selected item from the inactiveChannels list will obtained. If it is not null the item will be removed from inactiveChannels, added to activeChannels the the Channel with that key in the channels HashTable will be sent down the configure Channel.

If the component which generated was the remove Button the current selected item from the activeChannels list will obtained. If it is not null the item will be removed from activeChannels, added to inactiveChannels the the Channel with that key in the channels HashTable will be sent down the configure Channel.

Parameters:
e - The ActioneEvent
 o getAppletInfo
 public String getAppletInfo()
returns the name and author of the Applet.

Overrides:
getAppletInfo in class Applet

All Packages  Class Hierarchy  This Package  Previous  Next  Index