DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦468dc3d04⟧ Ada Source

    Length: 49152 (0xc000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body The_Orb_Package, seg_05714b

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Transport_Defs;
with Text_Io;
with Communication;
with The_List_Generic;
package body The_Orb_Package is

    type Type_Object is
        record
            The_Host : Transport_Defs.Host_Id (1 .. 4);
            The_Socket : Transport_Defs.Socket_Id (1 .. 2);
            The_Id : Id_Object.Type_Id;
        end record;

    type Type_Contract is
        record  
            The_Name : String (1 .. Length_Of_Contract_Name);
            The_Id : Id_Object.Type_Id;
        end record;

    package The_Pack_Of_Object is new The_List_Generic
                                         (Type_Element => Type_Object);
    The_List_Of_Object : The_Pack_Of_Object.The_List;

    package The_Pack_Of_Contract is new The_List_Generic
                                           (Type_Element => Type_Contract);
    The_List_Of_Contract : The_Pack_Of_Contract.The_List;


    The_Spy_Number : Natural := 1;       --a enlever apres le test



    -- *********************************************
    procedure Orb_Registration (The_Host : Transport_Defs.Host_Id;
                                The_Socket : Transport_Defs.Socket_Id;
                                Id : out Id_Object.Type_Id;
                                Is_Ok : out Boolean) is

        The_Object : Type_Object;
        The_Value : Type_Object;
        The_Id : Id_Object.Type_Id;

        Iter : The_Pack_Of_Object.The_Iterator;
        Is_Found : Boolean := False;

    begin

        Text_Io.Put_Line ("Orb Registration en cours");

        The_Object.The_Host := The_Host;
        The_Object.The_Socket := The_Socket;

        -- liste vide
        -- ==========
        if The_Pack_Of_Object.Is_Empty (The_List_Of_Object) then

            Id_Object.Give_Id (The_Id);

            The_Object.The_Id := The_Id;

            The_List_Of_Object := The_Pack_Of_Object.Make  
                                     (The_Object, The_List_Of_Object);
            Id := The_Id;
            Is_Ok := True;
            Text_Io.Put_Line ("registration ok");
        else
            -- liste non vide
            -- ==============
            The_Pack_Of_Object.Init (Iter, The_List_Of_Object);

            -- boucle de recherche
            -- ===================
            loop
                The_Value := The_Pack_Of_Object.Value (Iter);
                The_Pack_Of_Object.Next (Iter);

                -- Tests egalite
                -- =============

                The_Object.The_Id := The_Value.The_Id;

                if (The_Object = The_Value) then    -- meme element
                    Is_Found := True;
                    exit;
                end if;

                if The_Pack_Of_Object.Done (Iter) then
                    -- fin de liste ?
                    Text_Io.Put_Line ("T_Orb regist -- fin de liste");
                    exit;
                end if;
            end loop;

            -- sortie
            -- ======
            if Is_Found then
                Text_Io.Put_Line ("l'object");
                Text_Io.Put (Natural'Image (Natural (The_Object.The_Id)));
                Text_Io.Put_Line (" existe deja dans la liste d'object");
                Is_Ok := False;
            else  
                Id_Object.Give_Id (The_Id);
                The_Object.The_Id := The_Id;

                The_List_Of_Object := The_Pack_Of_Object.Make  
                                         (The_Object, The_List_Of_Object);
                Id := The_Id;
                Is_Ok := True;
                Text_Io.Put_Line ("registration ok");
            end if;
        end if;
        Text_Io.Put_Line ("fin registration");
    end Orb_Registration;


    -- *********************************************
    function Orb_Unregistration (The_Id : Id_Object.Type_Id) return Boolean is

        Iter : The_Pack_Of_Object.The_Iterator;
        Iter_Contract : The_Pack_Of_Contract.The_Iterator;
        The_Value_Contract : Type_Contract;
        The_Contract : Type_Contract;

        The_Object : Type_Object;
        The_Value : Type_Object;
        Is_Ok : Boolean := False;
        Is_Found : Boolean := False;
        End_List_Of_Contract : Boolean := False;

        The_Message : Message.Type_Of_Message;
        The_Connection : Connection_Data;
    begin
        Text_Io.Put_Line ("Orb UnRegistration en cours");
        -- liste vide
        -- ==========
        if The_Pack_Of_Object.Is_Empty (The_List_Of_Object) then
            Text_Io.Put_Line ("liste d'object vide");
            return False;
        else
            -- liste non vide
            -- ==============
            The_Pack_Of_Object.Init (Iter, The_List_Of_Object);

            -- boucle de recherche de L'identificateur
            -- =======================================
            loop
                The_Value := The_Pack_Of_Object.Value (Iter);
                The_Pack_Of_Object.Next (Iter);

                -- Tests egalite autre champs
                -- ==========================

                The_Object := The_Value;
                The_Object.The_Id := The_Id;

                if The_Object = The_Value then    -- meme element
                    Is_Found := True;
                    exit;
                end if;

                if The_Pack_Of_Object.Done (Iter) then
                    -- fin de liste ?
                    exit;
                end if;
            end loop;

            -- sortie
            -- ======
            if Is_Found then
                Text_Io.Put_Line ("object trouve, effacement en cours");
                The_Pack_Of_Object.Delete
                   (The_List_Of_Object, The_Object, Is_Ok);
                Is_Ok := Id_Object.Delete_Id (The_Id);

                Text_Io.Put_Line ("unregistration ok");
                Text_Io.Put ("envoi unregistration au serveur object");
                Text_Io.Put (Natural'Image (Natural (The_Id)));
                Text_Io.New_Line;

                The_Message.The_Command := The_Unregistration;
                The_Message.The_Socket_Send := (0, 0);

                The_Message.The_Host_Machine_Receive := The_Object.The_Host;
                The_Message.The_Socket_Receive := The_Object.The_Socket;
                -- envoi unregistration au serveur
                -- ===============================
                Communication.Open_Transmit (The_Message, The_Connection);
                Communication.Connect_Transmit (The_Mesage, The_Connection);
                Communication.Transmitter (The_Message, The_Connection);
                Communication.Disconnect (The_Connection);
                Communication.Close (The_Connection);

                Text_Io.Put ("destruction de tous les contract de l'object ");
                Text_Io.Put (Natural'Image (Natural (The_Id)));
                Text_Io.Put_Line ("en cours");

                -- destruction de tous les contract de la machine ID
                -- =================================================
                loop
                    if not The_Pack_Of_Contract.Is_Empty
                              (The_List_Of_Contract) then

                        -- liste non vide
                        -- ==============
                        The_Pack_Of_Contract.Init
                           (Iter_Contract, The_List_Of_Contract);

                        -- boucle de recherche de contract avec cet identificateur
                        -- =======================================================
                        loop
                            The_Value_Contract :=
                               The_Pack_Of_Contract.Value (Iter_Contract);
                            The_Pack_Of_Contract.Next (Iter_Contract);
                            -- Tests egalite autre champs
                            -- ==========================

                            The_Contract := The_Value_Contract;
                            The_Contract.The_Id := The_Id;

                            if The_Contract =
                               The_Value_Contract then    -- meme element
                                Is_Found := True;
                                exit;
                            end if;

                            if The_Pack_Of_Contract.Done (Iter_Contract) then
                                -- fin de liste ?
                                End_List_Of_Contract := True;
                                exit;
                            end if;  
                        end loop;

                        if Is_Found then
                            -- effacement du contract de la liste des contract
                            -- ===============================================
                            Text_Io.Put ("effacement du contract ");
                            Text_Io.Put (The_Contract.The_Name);
                            Text_Io.Put_Line (" sur l'object ");
                            Text_Io.Put (Natural'Image
                                            (Natural (The_Contract.The_Id)));
                            Text_Io.New_Line;
                            The_Pack_Of_Contract.Delete
                               (The_List_Of_Contract, The_Contract, Is_Ok);
                        end if;  
                    else
                        -- si liste de contract est vide
                        -- =============================
                        exit;
                    end if;

                    -- si on est a la fin de la liste de contract
                    -- ==========================================
                    if End_List_Of_Contract then
                        exit;
                    end if;
                end loop;
                Text_Io.Put ("fin d'effacement des contract de l'object ");
                Text_Io.Put (Natural'Image (Natural (The_Id)));
                Text_Io.New_Line;
                return True;
            end if;
            return False;
        end if;
    end Orb_Unregistration;


    -- *********************************************
    function Orb_Publication (The_Name : String; The_Id : Id_Object.Type_Id)
                             return Boolean is

        The_Contract : constant Type_Contract :=
           (The_Name (1 .. Length_Of_Contract_Name), The_Id);

        -- ========================
        function Seak_Id_Object (A_Id : Id_Object.Type_Id) return Boolean is

            Iter_Object : The_Pack_Of_Object.The_Iterator;
            The_Object : Type_Object;
            The_Value_Object : Type_Object;
            Test : Boolean := False;
        begin
            if The_Pack_Of_Object.Is_Empty (The_List_Of_Object) then
                Text_Io.Put_Line ("liste d'object vide");
                return False;           else
                -- Recherche de L'object
                -- =====================
                The_Pack_Of_Object.Init (Iter_Object, The_List_Of_Object);
                loop
                    The_Value_Object := The_Pack_Of_Object.Value (Iter_Object);
                    The_Pack_Of_Object.Next (Iter_Object);

                    -- Tests egalite

                    The_Object := The_Value_Object;
                    The_Object.The_Id := A_Id;

                    if The_Object = The_Value_Object then
                        Test := True;
                        exit;
                    end if;

                    if The_Pack_Of_Object.Done (Iter_Object) then
                        -- fin de liste ?
                        exit;
                    end if;
                end loop;

                if Test then
                    return True;
                else
                    return False;
                end if;
            end if;
        end Seak_Id_Object;

    begin
        Text_Io.Put_Line ("Orb publication du contract ");
        Text_Io.Put (The_Name (1 .. Length_Of_Contract_Name));
        Text_Io.Put ("  de l'object");
        Text_Io.Put (Natural'Image (Natural (The_Id)));
        Text_Io.Put_Line ("en cours");

        -- recherche de l'object
        -- =====================
        if not Seak_Id_Object (The_Id) then
            return False;
        else

            -- liste vide de contract
            -- ======================
            if The_Pack_Of_Contract.Is_Empty (The_List_Of_Contract) then

                The_List_Of_Contract := The_Pack_Of_Contract.Make  
                                           (The_Contract, The_List_Of_Contract);
                return True;
            else

                -- recherche d'un meme contract
                -- ============================
                if The_Pack_Of_Contract.Search
                      (The_List_Of_Contract, The_Contract) then
                    Text_Io.Put_Line ("le contract ");
                    Text_Io.Put (The_Name);
                    Text_Io.Put ("  sur l'object");
                    Text_Io.Put (Natural'Image (Natural (The_Id)));
                    Text_Io.Put_Line ("existe deja");
                    return False;
                else
                    -- ajout du dit contract si pas trouve
                    -- ===================================
                    The_List_Of_Contract :=
                       The_Pack_Of_Contract.Make  
                          (The_Contract, The_List_Of_Contract);
                    Text_Io.Put_Line ("publication ok");
                    return True;
                end if;
            end if;
        end if;
    end Orb_Publication;


    -- *********************************************
    function Orb_Unpublication
                (The_Name : String; The_Id : Id_Object.Type_Id := 0)
                return Boolean is

        Iter : The_Pack_Of_Contract.The_Iterator;
        The_Contract : Type_Contract :=
           (The_Name (1 .. Length_Of_Contract_Name), The_Id);
        Null_Id : Id_Object.Type_Id := 0;

        The_Value : Type_Contract;
        Is_Ok : Boolean := False;
        Is_Found : Boolean := False;
        Is_The_End_Of_List : Boolean := False;

        The_Connection : Connection_Data;
        The_Message_To_Send : Message.Type_Of_Message;
        The_Object : Type_Object;
        The_Value_Object : Type_Object;
        Iter_Object : The_Pack_Of_Object.The_Iterator;
    begin
        Text_Io.Put ("Orb unpublication du contract ");
        Text_Io.Put (The_Name);
        Text_Io.Put_Line (" en cours");

        -- liste vide
        -- ==========
        if The_Pack_Of_Contract.Is_Empty (The_List_Of_Contract) then
            Text_Io.Put_Line ("liste de contract vide");
            return False;
        else
            -- liste non vide, recherche si l'identificateur est donne
            -- =======================================================
            The_Value := The_Contract;
            The_Value.The_Id := Null_Id;
            if The_Contract = The_Value then

                -- Identificateur non donne
                -- ========================

                -- boucle de recherche des contrats a differents Id
                -- ================================================

                loop
                    The_Pack_Of_Contract.Init (Iter, The_List_Of_Contract);
                    loop
                        The_Value := The_Pack_Of_Contract.Value (Iter);
                        The_Pack_Of_Contract.Next (Iter);

                        -- Tests egalite autre champs
                        -- ==========================

                        The_Contract.The_Id := The_Value.The_Id;

                        if The_Contract = The_Value then    -- meme element
                            Is_Found := True;
                            exit;
                        end if;

                        if The_Pack_Of_Contract.Done (Iter) then
                            -- fin de liste ?
                            Is_The_End_Of_List := True;
                            exit;
                        end if;
                    end loop;

                    -- sortie
                    -- ======
                    if Is_Found then
                        Is_Ok := True;
                        The_Pack_Of_Contract.Delete
                           (The_List_Of_Contract, The_Contract, Is_Ok);
                    end if;

                    if Is_The_End_Of_List then
                        exit;
                    end if;
                end loop;

                if Is_Ok then
                    Text_Io.Put_Line ("unpublication ok");
                else
                    Text_Io.Put_Line ("contract non trouve");
                end if;
                return Is_Ok;

            else
                -- identificateur connu
                -- ====================

                if not The_Pack_Of_Contract.Search
                          (The_List_Of_Contract, The_Contract) then
                    Text_Io.Put_Line ("contract non trouve");
                    return False;
                else
                    -- suppression du contract dans la liste
                    -- =====================================
                    The_Pack_Of_Contract.Delete
                       (The_List_Of_Contract, The_Contract, Is_Ok);
                    Text_Io.Put_Line ("unpublication ok");
                    return Is_Ok;
                end if;
            end if;
        end if;

    end Orb_Unpublication;

    -- *********************************************

    procedure Orb_Request (The_M : Message.Type_Of_Message;
                           Return_Message : in out Message.Type_Of_Message;
                           Is_Ok : out Boolean) is

        The_New_Message : Message.Type_Of_Message;
        The_Name : constant String (1 .. Length_Of_Contract_Name) :=
           Our_String.Image (The_M.Data) (1 .. Length_Of_Contract_Name);
        The_Contract : Type_Contract := (The_Name, The_M.The_Id_User_Receive);
        The_Id_Receive : Id_Object.Type_Id := The_M.The_Id_User_Receive;

        Null_Id_Contract : Type_Contract := (The_Name, 0);
        The_Answer : Our_String.Variable_String;
        The_Value : Type_Contract;
        Iter : The_Pack_Of_Contract.The_Iterator;
        Is_Found : Boolean := False;

        -- ================================
        procedure Seak_Contract (Name : String;
                                 A_Contract : out Type_Contract;
                                 Is_Ok : out Boolean;
                                 The_Id : Id_Object.Type_Id) is
            The_Seak_Name : String (1 .. Length_Of_Contract_Name);

            Iter_Contract : The_Pack_Of_Contract.The_Iterator;
            The_Contract : Type_Contract;
            The_Value : Type_Contract;
            Null_Contract : Type_Contract;
            Test : Boolean := False;
        begin
            The_Seak_Name := Name (1 .. Length_Of_Contract_Name);

            The_Contract := (The_Seak_Name, The_Id);

            Null_Contract := The_Contract;
            Null_Contract.The_Id := Id_Object.Type_Id (0);

            if not (The_Contract = Null_Contract) then

                -- identificateur de machine contenu dans le contract
                -- ==================================================
                -- recherche du contract
                -- =====================
                Text_Io.Put_Line ("id connu");
                Is_Ok := The_Pack_Of_Contract.Search
                            (The_List_Of_Contract, The_Contract);  
                A_Contract := The_Contract;
            else
                -- Identificateur indefini, Recherche de l'Id du contrat
                -- ====================================================
                Text_Io.Put_Line ("id inconnu");
                The_Pack_Of_Contract.Init (Iter_Contract, The_List_Of_Contract);
                loop
                    The_Value := The_Pack_Of_Contract.Value (Iter_Contract);
                    The_Pack_Of_Contract.Next (Iter_Contract);

                    -- Tests egalite
                    The_Contract := The_Value;
                    The_Contract.The_Name := The_Seak_Name;
                    if The_Contract = The_Value then    -- meme contract
                        Test := True;
                        exit;
                    end if;
                    if The_Pack_Of_Contract.Done (Iter_Contract) then
                        -- fin de liste ?
                        exit;
                    end if;
                end loop;

                A_Contract := The_Contract;

                if Test then  
                    Is_Ok := True;
                else
                    Is_Ok := False;
                end if;
            end if;
        end Seak_Contract;


        -- ================================
        procedure Send_Message (A_Contract : Type_Contract;
                                A_Answer : out Our_String.Variable_String) is

            The_Message_To_Send : Message.Type_Of_Message;
            The_Received_Message : Message.Type_Of_Message;
            The_Connection_Data : Connection_Data;
            Iter_Object : The_Pack_Of_Object.The_Iterator;
            The_Value : Type_Object;
            The_Object : Type_Object;
            Test : Boolean := False;  
            The_Connection : Connection_Data;

        begin
            --  Recherche de la machine
            -- ========================
            The_Pack_Of_Object.Init (Iter_Object, The_List_Of_Object);
            loop
                The_Value := The_Pack_Of_Object.Value (Iter_Object);
                The_Pack_Of_Object.Next (Iter_Object);

                -- Tests egalite
                The_Object := The_Value;
                The_Object.The_Id := A_Contract.The_Id;
                if The_Object = The_Value then    -- meme contract
                    Test := True;
                    exit;
                end if;

                if The_Pack_Of_Object.Done (Iter_Object) then
                    -- fin de liste ?
                    exit;
                end if;
            end loop;

            -- N.B. on est oblige de trouver un Object avec l'identificateur donne

            The_Message_To_Send.The_Command := The_Request;
            The_Message_To_Send.The_Host_Machine_Receive := The_Object.The_Host;
            The_Message_To_Send.The_Socket_Receive := The_Object.The_Socket;
            The_Message_To_Send.Data := Our_String.Value (A_Contract.The_Name);
            The_Message_To_Send.The_Socket_Send := (0, 0);

            Text_Io.Put ("essai demande fonction ");
            Text_Io.Put (The_Name);
            Text_Io.Put (" a l'object numero ");
            Text_Io.Put (Natural'Image (Natural (A_Contract.The_Id)));
            Text_Io.New_Line;

            -- envoi question au serveur
            -- =========================
            Communication.Open_Transmit (The_Message_To_Send, The_Connection);
            Communication.Connect_Transmit
               (The_Message_To_Send, The_Connection);
            Communication.Transmitter (The_Message_To_Send, The_Connection);
            Communication.Disconnect (The_Connection);

            -- attente reponse du serveur
            -- ==========================
            Text_Io.Put ("attente reponse du serveur");
            Communication.Connect_Receive (The_Connection);
            Communication.Receiver (The_Received_Message, The_Connection);
            Communication.Disconnect (The_Connection);  
            Communication.Close (The_Connection);
            Text_Io.Put_Line ("reponse recue");
            Text_Io.Put (Our_String.Image (The_Received_Message.Data));
            Text_Io.New_Line;
            A_Answer := The_Received_Message.Data;
        end Send_Message;

        -- ================================
    begin
        -- liste de contrats vide
        -- ======================
        if The_Pack_Of_Contract.Is_Empty (The_List_Of_Contract) then
            Is_Ok := False;
        else
            -- Recherche de L'Id du contrat s'il existe
            -- ========================================
            Text_Io.Put ("recherche du contract ... ");
            Seak_Contract (Our_String.Image (The_M.Data), The_Contract,
                           Is_Found, The_Contract.The_Id);

            if not Is_Found then
                Text_Io.Put_Line ("non trouve");
                Is_Ok := False;
            else
                -- contrat trouve
                -- ==============

                Text_Io.Put_Line ("trouve ok");
                Send_Message (The_Contract, The_Answer);
                Return_Message.Data := The_Answer;

                Is_Ok := True;
            end if;
        end if;
    end Orb_Request;


    -- *********************************************
    task Return_Answer is
        entry Ok_Message_Is_To_Send
                 (Return_Message : in out Message.Type_Of_Message);
    end Return_Answer;


    -- *********************************************
    task body Return_Answer is
        The_Connection : Connection_Data;
        A_Return_Message : Message.Type_Of_Message;
    begin  
        A_Return_Message.The_Socket_Send := (0, 0);  
        Communication.Open_Transmit (A_Return_Message, The_Connection);

        loop
            accept Ok_Message_Is_To_Send
                      (Return_Message : in out Message.Type_Of_Message) do

                Text_Io.Put_Line ("envoi reponse");
                Communication.Connect_Transmit (Return_Message, The_Connection);
                Communication.Transmitter (Return_Message, The_Connection);
                Communication.Disconnect (The_Connection);  
            end Ok_Message_Is_To_Send;
        end loop;
        Communication.Close (The_Connection);
    end Return_Answer;

    -- *********************************************
    task Orb_Task is
        entry Ok_Message_Is_Receive (The_Message : in Message.Type_Of_Message);
    end Orb_Task;

    task body Orb_Task is
        --The_Message : Message.Type_Of_Message;
        Is_Ok : Boolean := True;
        The_Id : Id_Object.Type_Id;
        Return_Message : Message.Type_Of_Message;
    begin
        loop
            accept Ok_Message_Is_Receive
                      (The_Message : in Message.Type_Of_Message) do
                case The_Message.The_Command is

                    when The_Registration =>

                        -- parametres de reponse
                        -- =====================
                        Return_Message.The_Host_Machine_Receive :=
                           The_Message.The_Host_Machine_Send;
                        Return_Message.The_Socket_Receive :=
                           The_Message.The_Socket_Send;

                        -- gestion
                        -- =======
                        Orb_Registration
                           (The_Message.The_Host_Machine_Send,
                            The_Message.The_Socket_Send, The_Id, Is_Ok);

                        Return_Message.The_Id_User_Send := The_Id;

                        Return_Answer.Ok_Message_Is_To_Send (Return_Message);

                    when The_Unregistration =>
                        -- parametres de reponse
                        -- =====================
                        Return_Message.The_Host_Machine_Receive :=
                           The_Message.The_Host_Machine_Send;
                        Return_Message.The_Socket_Receive :=
                           The_Message.The_Socket_Send;

                        Is_Ok := Orb_Unregistration
                                    (The_Message.The_Id_User_Send);

                        Return_Message.Command_Is_Ok := Is_Ok;

                        Return_Answer.Ok_Message_Is_To_Send (Return_Message);

                    when The_Request =>
                        -- parametres de reponse
                        -- =====================
                        Return_Message.The_Host_Machine_Receive :=
                           The_Message.The_Host_Machine_Send;
                        Return_Message.The_Socket_Receive :=
                           The_Message.The_Socket_Send;

                        -- gestion
                        -- =======
                        Orb_Request (The_Message, Return_Message, Is_Ok);
                        Return_Message.Command_Is_Ok := Is_Ok;

                        Return_Answer.Ok_Message_Is_To_Send (Return_Message);

                    when The_Publication =>
                        -- parametres de reponse
                        -- =====================
                        Return_Message.The_Host_Machine_Receive :=
                           The_Message.The_Host_Machine_Send;
                        Return_Message.The_Socket_Receive :=
                           The_Message.The_Socket_Send;

                        Is_Ok := Orb_Publication
                                    (Our_String.Image (The_Message.Data),
                                     The_Message.The_Id_User_Send);

                        Return_Message.Command_Is_Ok := Is_Ok;
                        Return_Answer.Ok_Message_Is_To_Send (Return_Message);

                    when The_Unpublication =>
                        -- parametres de reponse
                        -- =====================
                        Return_Message.The_Host_Machine_Receive :=
                           The_Message.The_Host_Machine_Send;
                        Return_Message.The_Socket_Receive :=
                           The_Message.The_Socket_Send;

                        Is_Ok := Orb_Unpublication
                                    (Our_String.Image (The_Message.Data),
                                     The_Message.The_Id_User_Send);

                        Return_Message.Command_Is_Ok := Is_Ok;
                        Return_Answer.Ok_Message_Is_To_Send (Return_Message);

                    when others =>
                        Text_Io.Put_Line ("T_Orb : Message traite ok");
                end case;
            end Ok_Message_Is_Receive;
        end loop;
    end Orb_Task;


    -- *********************************************
    task Orb_Receiver_Task;

    task body Orb_Receiver_Task is
        The_Message : Message.Type_Of_Message;
    begin  
        Text_Io.Put_Line ("ouverture connection pour l'orb");
        Communication.Open_Receive (The_Orb.The_Socket, The_Orb_Connection);

        loop
            Text_Io.Put_Line ("Orb attente de message ");

            Communication.Connect_Receive (The_Orb_Connection);
            Communication.Receiver (The_Message, The_Orb_Connection);
            Communication.Disconnect (The_Orb_Connection);
            Text_Io.Put_Line (" 1 Message est recu");

            Orb_Task.Ok_Message_Is_Receive (The_Message);
        end loop;  
        Communication.Close (The_Orb_Connection);
    end Orb_Receiver_Task;

    -- *********************************************

begin
    null;
end The_Orb_Package;

E3 Meta Data

    nblk1=2f
    nid=1f
    hdr6=48
        [0x00] rec0=16 rec1=00 rec2=01 rec3=076
        [0x01] rec0=1e rec1=00 rec2=25 rec3=026
        [0x02] rec0=1f rec1=00 rec2=20 rec3=054
        [0x03] rec0=01 rec1=00 rec2=29 rec3=010
        [0x04] rec0=1a rec1=00 rec2=2c rec3=04a
        [0x05] rec0=1c rec1=00 rec2=2d rec3=06a
        [0x06] rec0=20 rec1=00 rec2=21 rec3=010
        [0x07] rec0=13 rec1=00 rec2=2e rec3=06c
        [0x08] rec0=00 rec1=00 rec2=07 rec3=002
        [0x09] rec0=15 rec1=00 rec2=23 rec3=01e
        [0x0a] rec0=08 rec1=00 rec2=13 rec3=014
        [0x0b] rec0=14 rec1=00 rec2=0c rec3=062
        [0x0c] rec0=15 rec1=00 rec2=0b rec3=014
        [0x0d] rec0=1b rec1=00 rec2=2a rec3=002
        [0x0e] rec0=1c rec1=00 rec2=14 rec3=02e
        [0x0f] rec0=1c rec1=00 rec2=1c rec3=020
        [0x10] rec0=18 rec1=00 rec2=2f rec3=010
        [0x11] rec0=1a rec1=00 rec2=0f rec3=054
        [0x12] rec0=18 rec1=00 rec2=03 rec3=076
        [0x13] rec0=1c rec1=00 rec2=09 rec3=064
        [0x14] rec0=1d rec1=00 rec2=27 rec3=008
        [0x15] rec0=12 rec1=00 rec2=08 rec3=030
        [0x16] rec0=18 rec1=00 rec2=17 rec3=004
        [0x17] rec0=14 rec1=00 rec2=0e rec3=000
        [0x18] rec0=1c rec1=00 rec2=04 rec3=04c
        [0x19] rec0=1c rec1=00 rec2=16 rec3=014
        [0x1a] rec0=14 rec1=00 rec2=06 rec3=020
        [0x1b] rec0=15 rec1=00 rec2=1b rec3=02e
        [0x1c] rec0=1f rec1=00 rec2=0a rec3=012
        [0x1d] rec0=07 rec1=00 rec2=1d rec3=068
        [0x1e] rec0=19 rec1=00 rec2=28 rec3=05a
        [0x1f] rec0=18 rec1=00 rec2=15 rec3=044
        [0x20] rec0=16 rec1=00 rec2=2b rec3=052
        [0x21] rec0=15 rec1=00 rec2=1e rec3=03c
        [0x22] rec0=19 rec1=00 rec2=05 rec3=030
        [0x23] rec0=18 rec1=00 rec2=0d rec3=000
        [0x24] rec0=18 rec1=00 rec2=0d rec3=000
        [0x25] rec0=13 rec1=00 rec2=2b rec3=020
        [0x26] rec0=14 rec1=00 rec2=1e rec3=038
        [0x27] rec0=09 rec1=00 rec2=19 rec3=010
        [0x28] rec0=13 rec1=00 rec2=26 rec3=016
        [0x29] rec0=13 rec1=00 rec2=0d rec3=026
        [0x2a] rec0=10 rec1=00 rec2=05 rec3=07a
        [0x2b] rec0=14 rec1=00 rec2=07 rec3=020
        [0x2c] rec0=1e rec1=00 rec2=29 rec3=000
        [0x2d] rec0=10 rec1=00 rec2=1f rec3=000
        [0x2e] rec0=00 rec1=00 rec2=09 rec3=000
    tail 0x21763c47087c59dafe855 0x42a00088462060003
Free Block Chain:
  0x1f: 0000  00 26 00 22 80 0c 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ┆ & "  ==========┆
  0x26: 0000  00 19 03 fc 80 35 20 20 20 20 20 20 20 20 20 20  ┆     5          ┆
  0x19: 0000  00 02 01 c0 80 21 72 5f 43 6f 6e 73 74 61 6e 74  ┆     !r_Constant┆
  0x2: 0000  00 10 03 fc 80 0e 20 20 20 20 20 20 20 20 20 20  ┆                ┆
  0x10: 0000  00 22 00 4b 80 1b 6e 65 20 28 22 63 6f 6e 74 72  ┆ " K  ne ("contr┆
  0x22: 0000  00 12 02 73 80 0d 55 73 65 72 5f 53 65 6e 64 29  ┆   s  User_Send)┆
  0x12: 0000  00 24 01 6d 80 46 65 5f 4e 65 77 5f 4d 65 73 73  ┆ $ m Fe_New_Mess┆
  0x24: 0000  00 11 00 07 80 04 2d 2d 49 74 04 20 20 20 20 09  ┆      --It      ┆
  0x11: 0000  00 18 00 ff 80 33 20 20 20 20 20 20 20 20 20 20  ┆     3          ┆
  0x18: 0000  00 1a 03 fc 80 08 6e 64 20 6c 6f 6f 70 3b 08 00  ┆      nd loop;  ┆
  0x1a: 0000  00 00 00 13 80 10 20 20 20 20 28 54 68 65 5f 4e  ┆          (The_N┆