Class AltTest

All Implemented Interfaces:
CSProcess

public class AltTest extends Object implements CSProcess

Process Diagram

External View

  _________
 |         |
 | AltTest |
 |_________|
 

Internal View

  ________________________________________________
 |      _____           _____           _____     |
 |     |     |         |     |         |     |    |
 |     | Nos |         | Nos |         | Nos |    |
 |     |_____|         |_____|         |_____|    |
 |        |               |               |       |
 |      a v             b v             c v       |
 |  ______|_____    ______|_____    ______|_____  |
 | |            |  |            |  |            | |
 | | FixedDelay |  | FixedDelay |  | FixedDelay | |
 | |____________|  |____________|  |____________| |
 |        |               |               |       |
 |      d v             e v             f v       |
 |        |               |               |       |
 |        +----->-----+   |   +-----<-----+       |
 |                  __|___|___|_       _________  |
 |                 |            |  g  |         | |
 |                 |            |-->--| Printer | |
 |                 |____________|     |_________| |
 |                                                |
 |                                        AltTest |
 |________________________________________________|
 

Description

The AltTest process is designed to test the Alternative class.

Each of the fixed delay processes have a delay time of 100, 200 or 300 microseconds.

The anonymous CSProcess has an infinite loop which will ALT on the channels d, e & f. When one of these Channels becomes ready with data the process will write the index of the Channel and the data value down the g Channel.

  • Constructor Details

    • AltTest

      public AltTest()
  • Method Details

    • run

      public void run()
      The main body of this process.
      Specified by:
      run in interface CSProcess
    • main

      public static void main(String[] argv)
      Main entry point for the application.