DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦f2784742f⟧ TextFile

    Length: 4779 (0x12ab)
    Types: TextFile
    Names: »B«

Derivation

└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

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;