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

⟦a2fa930ca⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Bal, seg_0546c2

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 Message;
with B_Constant;
with Liste_Parametre;
with Parametre;
with Bounded_String;
with Parametre_Defs;
with Display_Mess;
with Task_Io;
with Bal;
procedure Test_Bal is

    Ma_Bal : Bal.Object;

    task Facteur is
        entry Start (B : Bal.Object);
    end Facteur;

    task Woz_Receiver is
        entry Start (B : Bal.Object);
    end Woz_Receiver;

    task body Facteur is
        Mess1 : Message.Object;
        Mess2 : Message.Object;

        Liste_Bidon : Liste_Parametre.List;
    begin
        accept Start (B : Bal.Object) do
            Task_Io.Put_Line
               ("-----------------------------------------------debut facteur");
            Liste_Bidon :=
               Liste_Parametre.Make
                  (Bounded_String.Value
                      ("coucou1", B_Constant.Parametre_Max_Size), Liste_Bidon);
            Liste_Bidon :=
               Liste_Parametre.Make
                  (Bounded_String.Value
                      ("cucupopo", B_Constant.Parametre_Max_Size), Liste_Bidon);
            Liste_Bidon := Liste_Parametre.Make
                              (Bounded_String.Value
                                  ("barbapapa", B_Constant.Parametre_Max_Size),
                               Liste_Bidon);
            Message.Create (Mess1, "444444", "555555",
                            Parametre_Defs.Message_Type'Value ("unreg"),
                            "9999", Liste_Bidon);
            Message.Create (Mess2, "123456", "567890",
                            Parametre_Defs.Message_Type'Value ("Regis"),
                            "9999", Liste_Bidon);
            Task_Io.Put_Line ("je vais deposer 2 messages dans la bal");
            Bal.Put (Ma_Bal, Mess1);
            Bal.Put (Ma_Bal, Mess2);
            Bal.Put (Ma_Bal, Mess2);
            Bal.Put (Ma_Bal, Mess1);
            Task_Io.Put_Line
               ("-----------------------------------------------fin_facteur");
        end Start;

    end Facteur;

    task body Woz_Receiver is
        Mess3 : Message.Object;
    begin

        accept Start (B : Bal.Object) do
            Task_Io.Put_Line
               ("-----------------------------------------------debut woz");
            Task_Io.Put_Line ("je recupere un element");
            Bal.Get (Ma_Bal, Mess3);
            Task_Io.Put_Line ("j affiche");
            Display_Mess.Get_Trame (Mess3);
            if not Bal.Is_Empty (Ma_Bal) then
                Task_Io.Put_Line ("bal non vide");
                Bal.Get (Ma_Bal, Mess3);
            end if;
            Display_Mess.Get_Trame (Mess3);
            Bal.Get (Ma_Bal, Mess3);
            Display_Mess.Get_Trame (Mess3);
            Bal.Get (Ma_Bal, Mess3);
            Display_Mess.Get_Trame (Mess3);
            if Bal.Is_Empty (Ma_Bal) then
                Task_Io.Put_Line ("la bal est vide");
            end if;
            Task_Io.Put_Line
               ("-----------------------------------------------fin woz");
        end Start;
    end Woz_Receiver;

begin
    Facteur.Start (Ma_Bal);
    Woz_Receiver.Start (Ma_Bal);
    Bal.Dispose (Ma_Bal);
    Task_Io.Dispose;
end Test_Bal;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=26 rec1=00 rec2=01 rec3=048
        [0x01] rec0=12 rec1=00 rec2=02 rec3=082
        [0x02] rec0=1c rec1=00 rec2=03 rec3=036
        [0x03] rec0=0b rec1=00 rec2=04 rec3=000
    tail 0x2175d80f087b884a329d3 0x42a00088462060003