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

⟦4f7f41b7c⟧ Ada Source

    Length: 10240 (0x2800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Communicating_Tasks, seg_0550b5

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 Text_Io;
with Transport;
with Transport_Defs;
with Utils;  
with Byte_Defs;
with Host_Id_Io;
with Frame_Defs;  
with Orb_Defs;


package body Communicating_Tasks is

    task body T1 is
        The_Frame : Frame_Defs.Frame;
        The_Connection : Transport.Connection_Id;
        The_Connection_Status : Transport_Defs.Status_Code;
        The_Network_Name : Transport_Defs.Network_Name (1 .. 6) := "TCP/IP";
        --The_Socket_Id :;
        The_Data_To_Send : Frame_Defs.Communication_Data;
        --Byte_Defs.Byte_String (1 .. 12) :=
        --   Utils.String_To_Byte_String ("Jimy Hendrix");
        The_Count_To_Send : Natural;  
        The_Data_To_Get : Byte_Defs.Byte_String (1 .. 4);
        The_Count_To_Get : Natural;
        The_Host_Id : Orb_Defs.Host_Id;
        The_Socket_Id : Orb_Defs.Socket_Id;
    begin
        Text_Io.Put_Line ("Tache Emetteur lancee...");
        Text_Io.Put_Line ("Initialisation Emetteur...");

        -- faire une boucle sur is open
        Transport.Open (Connection => The_Connection,
                        Status => The_Connection_Status,
                        Network => The_Network_Name);

        Text_Io.Put_Line ("Initialisation Emetteur terminee...");

        Frame_Defs.Init_Frame ("tototitijuhyuojhop",
                               Orb_Defs.Default_Orb_Socket,
                               Transport.Local_Host (The_Network_Name),
                               Orb_Defs.Default_Orb_Socket,
                               Transport.Local_Host (The_Network_Name), 1, 3,
                               "kakan,lnlk", "kukujkyiej;",
                               "kikivytdfh", The_Frame);

        Text_Io.Put_Line (Frame_Defs.Image (The_Frame));

        Frame_Defs.Get (Frame_Defs.Dest_Host_Field, The_Frame, The_Host_Id);

        Frame_Defs.Get (Frame_Defs.Dest_Socket_Field, The_Frame, The_Socket_Id);



        while not (Transport.Is_Connected (The_Connection)) loop

            Text_Io.Put_Line ("Emetteur tente connection...");
            Transport.Connect (Connection => The_Connection,
                               Status => The_Connection_Status,
                               Remote_Host => The_Host_Id,
                               Remote_Socket => The_Socket_Id);
        end loop;

        Text_Io.Put_Line ("connection etablie t1");

        Frame_Defs.Get_Frame (The_Frame, The_Data_To_Send);


        Transport.Transmit (Connection => The_Connection,
                            Status => The_Connection_Status,
                            Data => The_Data_To_Send,
                            Count => The_Count_To_Send);

        Text_Io.Put_Line ("Message envoye...");



        Transport.Receive (Connection => The_Connection,
                           Status => The_Connection_Status,
                           Data => The_Data_To_Get,
                           Count => The_Count_To_Get);


        Transport.Disconnect (The_Connection);

        Text_Io.Put_Line ("T1 disconnected.");

        Text_Io.Put_Line ("T1 aborted");

    end T1;

    task body T2 is
        The_Frame : Frame_Defs.Frame;
        The_Connection : Transport.Connection_Id;
        The_Connection_Status : Transport_Defs.Status_Code;
        The_Network_Name : Transport_Defs.Network_Name (1 .. 6) := "TCP/IP";
        The_Socket_Id : Transport_Defs.Socket_Id (1 .. 2) :=
           Orb_Defs.Default_Orb_Socket;
        The_Data_To_Get : Frame_Defs.Communication_Data;
        The_Count_To_Get : Natural;
        The_Data_To_Send : Byte_Defs.Byte_String (1 .. 4);
        --   Utils.String_To_Byte_String ("Good");
        The_Count_To_Send : Natural;
    begin
        Text_Io.Put_Line ("Tache Recepteur lancee...");
        Text_Io.Put_Line ("Initialisation Recepteur...");

        -- faire une boucle
        Transport.Open (Connection => The_Connection,
                        Status => The_Connection_Status,
                        Network => The_Network_Name,
                        Local_Socket => The_Socket_Id);

        Text_Io.Put_Line ("Initialisation Recepteur terminee...");


        while not (Transport.Is_Connected (The_Connection)) loop
            Text_Io.Put_Line ("Recepteur attend une connection...");
            Transport.Connect (The_Connection, The_Connection_Status);
            Text_Io.Put
               ("A connection between T1 & T2 was initiated." & Ascii.Lf);
        end loop;
        Text_Io.Put_Line ("connection etablie t2");

        Transport.Receive (Connection => The_Connection,
                           Status => The_Connection_Status,
                           Data => The_Data_To_Get,
                           Count => The_Count_To_Get);



        Text_Io.Put_Line ("Message recu : ");


        Frame_Defs.Set_Frame (The_Data_To_Get, The_Frame);

        Text_Io.Put_Line (Frame_Defs.Image (The_Frame));


        Transport.Transmit (Connection => The_Connection,
                            Status => The_Connection_Status,
                            Data => The_Data_To_Send,
                            Count => The_Count_To_Send);

        Transport.Disconnect (The_Connection);

        Text_Io.Put_Line ("T2 disconnected.");

        Text_Io.Put_Line ("T2 aborted.");

    end T2;

end Communicating_Tasks;

E3 Meta Data

    nblk1=9
    nid=8
    hdr6=e
        [0x00] rec0=20 rec1=00 rec2=01 rec3=012
        [0x01] rec0=17 rec1=00 rec2=04 rec3=05c
        [0x02] rec0=03 rec1=00 rec2=07 rec3=00c
        [0x03] rec0=1c rec1=00 rec2=09 rec3=03a
        [0x04] rec0=18 rec1=00 rec2=05 rec3=02e
        [0x05] rec0=1b rec1=00 rec2=06 rec3=050
        [0x06] rec0=11 rec1=00 rec2=03 rec3=000
        [0x07] rec0=07 rec1=00 rec2=04 rec3=000
        [0x08] rec0=07 rec1=00 rec2=04 rec3=001
    tail 0x2175e9ff287bc3d5eb7ea 0x42a00088462060003
Free Block Chain:
  0x8: 0000  00 02 00 37 80 15 6f 6e 20 3d 3e 20 54 68 65 5f  ┆   7  on => The_┆
  0x2: 0000  00 00 01 39 80 2e 20 20 20 20 20 54 68 65 5f 43  ┆   9 .     The_C┆