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

⟦a276239fc⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Robots_Briques_Actions_Bak, seg_011f0f

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 Instance, Slot;
with Tuple_Collection, Tuple;

with Robots_Briques_Tests;
use Robots_Briques_Tests;
with Frame_Robots_Briques;
use Frame_Robots_Briques, Slot;
with Tuple, Text_Io;

package body Robots_Briques_Actions_Bak is
    Numero_Courant : Integer := 1;

    Old_Number : Integer := 1;

    function Last_Box return Integer is
    begin
        Numero_Courant := Numero_Courant + 1;
        return Numero_Courant - 1;
    end Last_Box;


    function Next_Old return Integer is
    begin
        Old_Number := Old_Number + 1;
        return Old_Number;
    end Next_Old;


    use Frame_Robots_Briques.Robot_Features,
        Frame_Robots_Briques.Brique_Features, Slot.Operators,
        Frame_Robots_Briques.Robot_Features;

    ------------------------------------------------------------
    -- type Col is (Black, Red, Green, Blue, White, Yellow);

    procedure Pack_It_Action (The_Tuple : Tuple.Object) is
        A_Brique : Brique.Object;
        A_Robot  : Robot.Object;
        Chaine   : String (1 .. 15);
    begin  
        Tuple.Split (The_Tuple, A_Brique, A_Robot);
        Brique.Change (The_Object => A_Brique,
                       Attribute  => Place,
                       To         => In_The_Pince);
        Robot.Change (The_Object => A_Robot,
                      Attribute  => Is_Busy,
                      To         => Slot.Value (True));

        Text_Io.Put_Line ("=>Rule PACK_IT :");
        Text_Io.Put_Line ("       the robot (" &
                          Slot.Image (Robot.Value_Of (A_Robot, Name)) &
                          ")get the greater brique (size= " &
                          Slot.Image (Brique.Value_Of (A_Brique, Size)) &
                          ") in his pince");
    end Pack_It_Action;

    ------------------------------------------------------------
    procedure Get_Test_Action (The_Tuple : Tuple.Object) is
        A_Robot  : Robot.Object;
        A_Brique : Brique.Object;
    begin
        Tuple.Split (The_Tuple, A_Brique, A_Robot);
        Robot.Change (The_Object => A_Robot,
                      Attribute  => T_Ask,
                      To         => State_Slot_Tasks.Value (Put));
        Robot.Change (The_Object => A_Robot,
                      Attribute  => Old,
                      To         => Slot.Value (Next_Old));

        Text_Io.Put_Line ("=>Rule get_test_action : the robot (" &
                          Slot.Image (Robot.Value_Of (A_Robot, Name)) &
                          ")is going to put a brique ");

    end Get_Test_Action;

    ------------------------------------------------------------
    procedure Put_To_Case_Test_Action (The_Tuple : Tuple.Object) is
        A_Robot  : Robot.Object;
        A_Brique : Brique.Object;
    begin
        Tuple.Split (The_Tuple, A_Brique, A_Robot);
        Brique.Change (The_Object => A_Brique,
                       Attribute  => Place,
                       To         => In_The_Box);

        Robot.Change (The_Object => A_Robot,
                      Attribute  => T_Ask,
                      To         => State_Slot_Tasks.Value (Get));

        Robot.Change (The_Object => A_Robot,
                      Attribute  => Box,
                      To         => Slot.Value (Last_Box));

        Brique.Change (The_Object => A_Brique,
                       Attribute  => Boite,
                       To         => Robot.Value_Of (A_Robot, Box));


        Text_Io.Put_Line ("=>Rule to_case_teste__action :");
        Text_Io.Put_Line ("the robot (" &
                          Slot.Image (Robot.Value_Of (A_Robot, Name)) &
                          ")put the brique in the case " &
                          Slot.Image (Robot.Value_Of (A_Robot, Box)));

        Robot.Change (The_Object => A_Robot,
                      Attribute  => Is_Busy,
                      To         => Slot.Value (False));
        Brique.Delete (The_Object => A_Brique);



    end Put_To_Case_Test_Action;

    ----------------------------------------------------------
    procedure Stop_Test_Action (The_Tuple : Tuple.Object) is
        A_Robot  : Robot.Object;
        A_Brique : Brique.Object;
    begin
        Tuple.Split (The_Tuple, A_Brique, A_Robot);

        Text_Io.Put_Line ("debut stiop test");



        -- Robot.Change (The_Object => A_Robot,
        --               Attribute  => T_Ask,
        --               To         => State_Slot_Tasks.Value (Get));
        Text_Io.Put_Line ("milieu stiop test");



        Text_Io.Put_Line ("the robot :" &
                          Slot.Image (Robot.Value_Of (A_Robot, Name)) &
                          "kill it self ");

        --     Robot.Delete (The_Object => A_Robot);
        Text_Io.Put_Line ("fin stiop test");




    end Stop_Test_Action;

end Robots_Briques_Actions_Bak;

E3 Meta Data

    nblk1=7
    nid=4
    hdr6=c
        [0x00] rec0=26 rec1=00 rec2=01 rec3=028
        [0x01] rec0=00 rec1=00 rec2=02 rec3=008
        [0x02] rec0=17 rec1=00 rec2=03 rec3=00a
        [0x03] rec0=17 rec1=00 rec2=06 rec3=056
        [0x04] rec0=19 rec1=00 rec2=07 rec3=000
        [0x05] rec0=26 rec1=00 rec2=05 rec3=000
        [0x06] rec0=00 rec1=3d rec2=41 rec3=075
    tail 0x2150d3a62824673083258 0x42a00088462063c03
Free Block Chain:
  0x4: 0000  00 00 03 fc 80 03 73 6b 2c 03 00 42 20 20 20 20  ┆      sk,  B    ┆