Files
PolyORB/Examples/Filters
Laurent Pautet 2df871ba63 *** empty log message ***
Subversion-branch: /importfromcvs/trunk
Subversion-revision: 46203
1997-02-27 16:22:29 +00:00
..
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00
1997-02-27 16:22:29 +00:00

This example describes GLADE filtering features. It is based on the
Erathostene algorithme (see other examples). We have three partitions,
each one includes a RCI unit.

   P1 : Partition := (prime_1);
   P2 : Partition := (prime_2);
   P3 : Partition := (prime_3);

Partition P4 is just here to ensure compilation of the simple
filtering packages included in this example. You can discard this
partition in the following explanations.

   P4 : Partition := (System.Garlic.Filters.Double,
                      System.Garlic.Filters.Shuffling,
                      System.Garlic.Filters.Reversing);

We declare 2 channels.

   C1 : Channel := (P1, P2);
   C2 : Channel := (P2, P3);

A channel is a pair of partitions. These partitions have to be
declared before. Some attributes apply on channels (as well as on
partitions).

(1)   for Partition'Filter use "double";

This indicates to GLADE that as a default rule, partitions use filter
"double" to communication to each others.

(2)   for Channel'Filter use "shuffling";

This indicates to GLADE that as a default rule, channels use filter
"shuffling" when these channels are declared in the configuration
file.

(3)  for C1'Filter use "reversing";

This indicates to GLADE that the communication channel between P1, and
P2 uses filter "reversing".


We have the following :

P1 <=> P2 :

Rule (1) applies, but C1 (P1, P2) has been declared. Rule (1) is
overloaded by rule (2). C1 has a representation clause on it. Therefore, rule (2) is overloaded by rule (3).

P2 <=> P3 :

Rule (1) applies, but C2 (P2, P3)  has been declared. Rule (1) is
overloaded by rule (2). 

P3 <=> P1 :

Rule (1) applies.


At last, we have the following configuration :

        P1  -- "reversing" --> P2  -- "shuffling" --> P3
        ^                                             |
        +------------------ "double" -----------------+