All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jcsp.util.buildingblocks.Multiplexer

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

public final class Multiplexer
extends Object
implements CSProcess

CSProcess Diagram

   in[1] +-------------+
  ------>|             |
     :   |             | out
     :   | Multiplexer |----->
   in[n] |             |
  ------>|             |
         +-------------+
 

Description

The Multiplexer class is a process which has an infinite loop that waits for Objects of any type to be sent down any of the in Channels. The process then writes the index of the Channel down the out Channel followed by the Object read.

The Multilpexer Process takes data from an array of Channels and sends the data down a single Channel to be decoded by a corresponding Demultiplexer at the other end

Channel Protocols

Input Channels
in java.lang.Object The in Channel can accept data of any Class.
Output Channels
out java.lang.Integer,java.lang.Object The out Channel has a Integer sent down followed by data of the same type as sent down the in Channel.

Author:
P.D.Austin
See Also:
Demultiplexer

Constructor Index

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

Method Index

 o run()
The main body of this process.

Constructors

 o Multiplexer
 public Multiplexer(AltingChannelInput in[],
                    ChannelOutput out)
Construct a new Multiplexer process with the input Channel in and the 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
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