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

⟦e4ca993ac⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Request, seg_04bc94, separate Date_Test

Derivation

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

E3 Source Code



with Time_Utilities;

separate (Date_Test)
procedure Request (M : Message_New.Object;
                   S : Message_Transport.Stream_Id;
                   Addresse : in out Natural) is


    Found : Boolean := False;  
    Iter : Transport.Connection_Id_Iterator;
    Connection : Transport.Connection_Id;
    The_Found_1 : Message_Transport.Stream_Id;

    Time : constant String := Time_Utilities.Image
                                 (Date => Time_Utilities.Get_Time,
                                  Date_Style => Time_Utilities.Expanded,
                                  Time_Style => Time_Utilities.Expanded,
                                  Contents => Time_Utilities.Both);

    Status : Message_Transport.Status_Code;

    use Message_Transport;
begin

    if Method.Get_Name (Message_New.Get_Method (M)) = "DATE" then
        New_Line;
        Put_Line ("+++ SATISFYING REQUEST FOR DATE");

        Transport.Init (Iter);
        Text_Io.Put_Line (" INITIALISATION DE L'ITERATEUR ");

        while not Transport.Done (Iter) and not Found loop
            Connection := Transport.Value (Iter);

            if Transport_Defs.Hash (Transport.Local_Socket (Connection)) =
               Transport_Defs.Hash
                  (Transport.Remote_Socket
                      (Message_Transport.Identifie_Connection (S))) then
                Found := True;
                Text_Io.Put_Line
                   ("SOCKET FOUND => " &
                    Natural'Image (Transport_Defs.Hash
                                      (Transport.Local_Socket (Connection))));
                The_Found_1 := Message_Transport.Create (Connection);
                Put_Line ("+++ STR FOUND 1 => " &
                          Natural'Image (Message_Transport.Hash (The_Found_1)));

            end if;
            Transport.Next (Iter);
        end loop;

        Message_Transport.Put
           (Stream => The_Found_1,
            Message => Standard.Message_New.Image
                          (Message_New.Create
                              (Class => Message_New.Forward,
                               Addressee => Message_New.Get_Sender (M),
                               Sender => Addresse,
                               Request => 0,
                               Method => "date",
                               Parameter_Name => "date",
                               Parameter_Class => "string",
                               Parameter_Value => Time)),
            Status => Status);
        if Status = Ok then
            Put_Line ("--- ASKING BROKER TO FORWARD");
        else
            Put_Line ("*** FAILED ASKING BROKER TO FORWARD");
        end if;
    end if;
end Request;


E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1f rec1=00 rec2=01 rec3=024
        [0x01] rec0=00 rec1=00 rec2=02 rec3=00a
        [0x02] rec0=18 rec1=00 rec2=04 rec3=01a
        [0x03] rec0=13 rec1=00 rec2=03 rec3=000
    tail 0x2154902d8868a3b866e24 0x42a00088462060003