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

⟦1b4460ee2⟧ Ada Source

    Length: 11264 (0x2c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Date_Filter, seg_056599

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 Constant_Start_End, All_String;
with Com_Defs, T_Message, T_Status;  
with Text_Manager;  
with Time_Utilities;

package body Date_Filter is

    My_Receive_Frame : My_Message.T_Frame;
    My_Send_Frame : My_Message.T_Frame;  
    My_Status : Boolean := False;  
    Stop : Boolean := False;
    My_Appli_Number : Com_Defs.Com_Number;
    Orb_Appli_Number : constant Com_Defs.Com_Number := 0;
    My_Quest_Number : Com_Defs.Com_Number := 0;
    -- message qui ne recoit pas de reponse

    My_Data_To_Send : Com_Defs.V_String;

    My_Adress_String_And_Apply_Number :
       All_String.Adress_String_And_Apply_Number;  
    My_Adress_String : All_String.Adress_String;
    My_Machine_Name, My_Adress_Ip : Com_Defs.V_String;
    Null_Data : Com_Defs.V_String := Com_Defs.Value ("");

    My_Integer_Type_Of_Message : Integer;
    My_Integer_Type_Of_Status : Integer;  
    My_Type_Of_Message : T_Message.T_Mess := T_Message.Response;
    My_Type_Of_Status : T_Status.T_State := T_Status.Filter_To_Orb;
    Compteur : Natural := 0;

    My_V_String_Data : Com_Defs.V_String;  
    My_Contract : String (1 .. 4) := "date";

    procedure Init is
    begin  
        Text_Manager.Text.Put_Line ("filter : init");
        My_Message.Init (My_Appli_Number, My_Machine_Name,
                         My_Adress_Ip, My_Status);
        Text_Manager.Text.Put_Line ("filter : " &
                                    Integer'Image (My_Appli_Number));
        Text_Manager.Text.Put_Line ("filter : " & Boolean'Image (My_Status));  
        Text_Manager.Text.Put_Line ("filter : " &
                                    Com_Defs.Image (My_Machine_Name) & "  " &
                                    Com_Defs.Image (My_Adress_Ip));

        My_Message.Init_T_Frame (My_Send_Frame, My_Adress_Ip,
                                 My_Appli_Number, My_Quest_Number);  
    end Init;


    task body D_Filter is
    begin

        Init;

-- REGISTRATION
        My_Message.Init_Data_Message (My_Machine_Name, My_Send_Frame);  
        My_Message.Put_Frame (My_Send_Frame);
        My_Message.Send (Orb_Appli_Number, Com_Defs.Orb_Name_Machine_V_String,
                         T_Message.Registration, My_Type_Of_Status,
                         My_Send_Frame, My_Status);

-- FILTRATION
        My_Message.Remove_Data (My_Send_Frame);
        My_V_String_Data := My_Message.Value (My_Contract);
        My_Message.Init_Data_Message (My_V_String_Data, My_Send_Frame);  
        My_Message.Put_Frame (My_Send_Frame);
        My_Message.Send (Orb_Appli_Number, Com_Defs.Orb_Name_Machine_V_String,
                         T_Message.Filtration, My_Type_Of_Status,
                         My_Send_Frame, My_Status);

        loop
            loop  
                delay (30.0);
                My_Message.Receive (My_Appli_Number,
                                    My_Receive_Frame, My_Status);  
                Text_Manager.Text.Put_Line ("filter : test receive");
                exit when My_Status = True;
            end loop;  
            Compteur := Compteur + 1;
            Text_Manager.Text.Put_Line ("filter : receive something");

            --   text_manager.text.Put_Line (" suite");
            My_Message.Put_Frame (My_Receive_Frame);
            My_Message.Copy (My_Send_Frame, My_Receive_Frame);

            My_Integer_Type_Of_Message :=
               My_Message.Read_Type_Of_Message (My_Receive_Frame);

            case My_Integer_Type_Of_Message is
                when T_Message.T_Mess'Pos (T_Message.Request_Service) =>  
                    begin
                        Text_Manager.Text.Put_Line
                           ("filter : Date : " & Time_Utilities.Image
                                                    (Time_Utilities.Get_Time));
                        My_Type_Of_Message := T_Message.Response;
                        My_V_String_Data :=
                           My_Message.Value
                              (" /" & Time_Utilities.Image
                                         (Time_Utilities.Get_Time,
                                          Contents => Time_Utilities.
                                                         Time_Only) & "/");
                        My_Message.Init_Data_Message
                           (My_V_String_Data, My_Send_Frame);
                    end;
                when others =>
                    Text_Manager.Text.Put_Line ("filter : " &
                                                "type of message is unknown");
            end case;
-- POUR L'INSTANT ON NE FAIT PAS LA DIFFERENCE ENTRE avant ET apres

            My_Integer_Type_Of_Status :=
               My_Message.Read_Type_Of_Status (My_Receive_Frame);

            case My_Integer_Type_Of_Status is
                when T_Status.T_State'Pos (T_Status.
                                           Orb_To_Filter_Before_Server) =>
                    begin
                        My_Type_Of_Status := T_Status.
                                                Filter_To_Orb_Before_Server;
                    end;  
                when T_Status.T_State'Pos (T_Status.
                                           Orb_To_Filter_After_Server) =>
                    begin
                        My_Type_Of_Status := T_Status.
                                                Filter_To_Orb_After_Server;
                    end;  
                when others =>
                    Text_Manager.Text.Put_Line ("filter : " &
                                                "type of status is unknown");
            end case;

            My_Message.Exchange_Source_Destination (My_Send_Frame);
            My_Message.Put_Frame (My_Send_Frame);  
            My_Message.Send (Orb_Appli_Number,
                             Com_Defs.Orb_Name_Machine_V_String,
                             My_Type_Of_Message,
                             My_Type_Of_Status,
                             My_Send_Frame, My_Status);  
            My_Message.Put_Frame (My_Send_Frame);
            if Compteur = 2 then
                Stop := True;
            end if;
            exit when Stop;
        end loop;

        My_Message.Init_T_Frame (My_Send_Frame, My_Adress_Ip,
                                 My_Appli_Number, My_Quest_Number);
-- UNFILTRATION
        My_Message.Remove_Data (My_Send_Frame);
        My_V_String_Data := Com_Defs.Value (My_Contract);
        My_Message.Init_Data_Message (My_V_String_Data, My_Send_Frame);
        My_Message.Send (Orb_Appli_Number, Com_Defs.Orb_Name_Machine_V_String,
                         T_Message.Unfiltration, T_Status.Filter_To_Orb,
                         My_Send_Frame, My_Status);  
        My_Message.Put_Frame (My_Send_Frame);

-- UNREGISTRATION
        My_Message.Init_Data_Message (Null_Data, My_Send_Frame);  
        My_Message.Send (Orb_Appli_Number, Com_Defs.Orb_Name_Machine_V_String,
                         T_Message.Unregistration, T_Status.Filter_To_Orb,
                         My_Send_Frame, My_Status);  
        My_Message.Put_Frame (My_Send_Frame);

-- On desalloue notre numero d'application
        My_Message.Remove (My_Appli_Number);

    end D_Filter;
end Date_Filter;

E3 Meta Data

    nblk1=a
    nid=4
    hdr6=12
        [0x00] rec0=1d rec1=00 rec2=01 rec3=02c
        [0x01] rec0=1b rec1=00 rec2=06 rec3=000
        [0x02] rec0=16 rec1=00 rec2=0a rec3=022
        [0x03] rec0=12 rec1=00 rec2=09 rec3=080
        [0x04] rec0=14 rec1=00 rec2=02 rec3=030
        [0x05] rec0=02 rec1=00 rec2=03 rec3=010
        [0x06] rec0=13 rec1=00 rec2=07 rec3=06e
        [0x07] rec0=17 rec1=00 rec2=05 rec3=03e
        [0x08] rec0=0b rec1=00 rec2=08 rec3=000
        [0x09] rec0=09 rec1=00 rec2=08 rec3=000
    tail 0x217624b0c87c44365908f 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 00 03 5d 80 1b 20 28 22 66 69 6c 74 65 72 20  ┆   ]   ("filter ┆