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

⟦6b051e0a5⟧ Ada Source

    Length: 9216 (0x2400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bgrb1_Generic_Robots, seg_04b363

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 Bgrb1_Frames;
with Bgrb1_Working_Memory;
with Bgrb1_Fact_Base_Server;

package body Bgrb1_Generic_Robots is


    task Object is
        entry Work (With_Robot      : Fact_Name;
                    With_Brick      : Fact_Name;
                    Destination_Box : Fact_Name;
                    Box_Number      : Slot.Object);  
        entry Kill (Which_Robot : Fact_Name);
    end Object;


    task body Object is
        use Bgrb1_Frames;  
        Finish            : Boolean := False;
        The_Output_Window : Display.Window (Display.Output_Window);
        The_Robot         : Fact_Name;
        The_Brick         : Fact_Name;
        The_Box           : Fact_Name;
        The_Box_Number    : Slot.Object;
    begin

        Display.Open_Window (Window_Name, The_Output_Window,
                             Display.Output_Window);
        Display.New_Line (The_Output_Window);
        Display.Put_Line
           (" --------------------------------------------------------------",
            The_Output_Window);
        Display.Put_Line
           (" --             THE ROBOT WAITS FOR A JOB                    --",
            The_Output_Window);
        Display.Put_Line
           (" --------------------------------------------------------------",
            The_Output_Window);

        while not (Finish) loop
            select
                accept Work (With_Robot      : Fact_Name;
                             With_Brick      : Fact_Name;
                             Destination_Box : Fact_Name;
                             Box_Number      : Slot.Object) do

                    The_Robot      := With_Robot;
                    The_Brick      := The_Brick;
                    The_Box        := Destination_Box;
                    The_Box_Number := Box_Number;
                end Work;

                Display.New_Line (The_Output_Window);  
                Display.Put_Line
                   (" --------------------------------------------------------------",
                    The_Output_Window);
                Display.Put_Line
                   (" --                THE ROBOT IS WORKING                      --",
                    The_Output_Window);
                Display.Put_Line
                   (" --------------------------------------------------------------",
                    The_Output_Window);

                Bgrb1_Fact_Base_Server.Change
                   (Bgrb1_Kbs.Robot, The_Robot, Action, Dropping);

                delay (Working_Time);

                Bgrb1_Fact_Base_Server.Change  
                   (Bgrb1_Kbs.Box, The_Box, State, Full);


                --Display.Put_Line (Integer'Image (Slot.Get (The_Box_Number)),
                --                  The_Output_Window);
                --Bgrb1_Fact_Base_Server.Change
                --   (Bgrb1_Kbs.Brick, The_Brick,
                --    Brick_Slots (Place), The_Box_Number);

                Bgrb1_Fact_Base_Server.Change
                   (Bgrb1_Kbs.Robot, The_Robot, Action, Taking);

                Bgrb1_Fact_Base_Server.Change
                   (Bgrb1_Kbs.Robot, The_Robot, Working, No);

                Display.New_Line (The_Output_Window);
                Display.Put_Line
                   (" --------------------------------------------------------------",
                    The_Output_Window);
                Display.Put_Line
                   (" --             THE ROBOT WAITS FOR A JOB                    --",
                    The_Output_Window);
                Display.Put_Line
                   (" --------------------------------------------------------------",
                    The_Output_Window);

            or

                accept Kill (Which_Robot : Fact_Name) do
                    The_Robot := Which_Robot;  
                end Kill;
                Bgrb1_Fact_Base_Server.Delete (Bgrb1_Kbs.Robot, The_Robot);
                Display.New_Line (The_Output_Window);
                Display.Put_Line
                   (" --------------------------------------------------------------",
                    The_Output_Window);
                Display.Put_Line
                   (" --                THE ROBOT HAS BEEN REMOVED                --",
                    The_Output_Window);  
                Display.Put_Line
                   (" --------------------------------------------------------------",
                    The_Output_Window);
                Display.New_Line (The_Output_Window);
                Finish := True;

            end select;  
        end loop;  
        Display.Put_Line ("fin de la tache", The_Output_Window);
        Display.Close_Window (The_Output_Window);  
    end Object;


    procedure Work (With_Robot      : Fact_Name;
                    With_Brick      : Fact_Name;
                    Destination_Box : Fact_Name;
                    Box_Number      : Slot.Object) is
    begin  
        Object.Work (With_Robot, With_Brick, Destination_Box, Box_Number);
    end Work;

    procedure Kill (Which_Robot : Fact_Name) is
    begin
        Object.Kill (Which_Robot);  
    end Kill;

end Bgrb1_Generic_Robots;

E3 Meta Data

    nblk1=8
    nid=3
    hdr6=c
        [0x00] rec0=20 rec1=00 rec2=01 rec3=046
        [0x01] rec0=18 rec1=00 rec2=08 rec3=016
        [0x02] rec0=16 rec1=00 rec2=06 rec3=054
        [0x03] rec0=18 rec1=00 rec2=04 rec3=05e
        [0x04] rec0=17 rec1=00 rec2=07 rec3=050
        [0x05] rec0=0c rec1=00 rec2=02 rec3=000
        [0x06] rec0=18 rec1=00 rec2=03 rec3=016
        [0x07] rec0=0a rec1=00 rec2=02 rec3=001
    tail 0x2174fb25a867a4903de41 0x42a00088462063c03
Free Block Chain:
  0x3: 0000  00 05 01 3d 00 35 20 20 20 20 20 20 20 20 20 20  ┆   = 5          ┆
  0x5: 0000  00 00 03 fc 80 10 73 65 5f 53 65 72 76 65 72 2e  ┆      se_Server.┆