Files
PolyORB/Examples/Filters
Thomas Quinot c555b14687 Refresh automake-generated files to account for change in
support/ada.m4:
(AM_SUPPORT_RPC_ABORTION): GNAT 6 with ZCX does not support ATC.
Fixes FB03-004 (regression on 0008-403 and 0008-408 with GNAT Pro
6.0.0w).

Subversion-branch: /importfromcvs/trunk
Subversion-revision: 48301
2006-11-05 18:28:15 +00:00
..
2001-01-16 20:13:42 +00:00
2001-01-16 20:13:42 +00:00
1997-02-27 16:22:29 +00:00
2001-01-24 16:29:17 +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
2004-06-25 14:35:03 +00:00
2004-06-25 14:35:03 +00:00

This example describes GLADE filtering features. It is based on the
Erathostene algorithm (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 ensures the compilation of filtering packages included in
this example. You can discard this partition in the following
explanations.

   P4 : Partition := (System.Garlic.Filters.Double,
                      System.Garlic.Filters.Shift,
                      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, filter "double"
is used between any partition communication.

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

This indicates to GLADE that as a default rule, filter "shift" is used
between 2 partitions when they belong to a channel declared in the
configuration file.

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

This indicates to GLADE that filter "zip" is used between P1 and P2.


As a result, we have the following:


Filter "zip" is used between P1 and 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).


Filter "shift" is used between P2 and P3.

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


Filter "double" is used between P1 and P3.

Rule (1) applies.


At last, we have the following configuration :

        P1  -- "zip" --> P2  -- "shift" --> P3
        ^                                       |
        +-------------- "double" -------------+


Filter "shift" generates a key which is used to shift each
message byte. This key is generated dynamically by a partition and has
to be sent to the partition on the other side. This exchange can also
be filtered. This filter is called the registration filter. There is
only one registration filter for the whole configuration. We declare
filter "reversing" as a registration filter with the following
statement:

   pragma Registration_Filter ("reversing");