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

⟦608b0a8a1⟧ Ada Source

    Length: 17408 (0x4400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Bgrb_Generic_Fact_Base_Server, seg_04b48b

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 Queue_Generic;
with Output_Stream;
with Bgrb_Frames;


package body Bgrb_Generic_Fact_Base_Server is

    Max_Change_Msg : Natural := 50;
    Max_Delete_Msg : Natural := 50;


    task Server is  
        entry Delete (The_User_Object : Bgrb_Kbs.Kbs.Fact_Name);
        entry Change (The_Fact : Bgrb_Kbs.Kbs.Fact_Name;
                      The_Slot : With_Slots;
                      To_Value : Slot.Object);  
        entry Update;
    end Server;

    type Delete_Messages is
        record  
            What_Fact : Bgrb_Kbs.Kbs.Fact_Name;
        end record;

    type Change_Messages is
        record  
            What_Fact : Bgrb_Kbs.Kbs.Fact_Name;
            What_Slot : With_Slots;
            The_Value : Slot.Object;
        end record;

    type Change_Messages_Table is
       array (1 .. Max_Change_Msg) of Change_Messages;
    type Delete_Messages_Table is
       array (1 .. Max_Delete_Msg) of Delete_Messages;


    task body Server is  
        The_Change_Msg_Table : Change_Messages_Table;
        The_Delete_Msg_Table : Delete_Messages_Table;
        Nbr_Change_Msg       : Natural := 0;
        Nbr_Delete_Msg       : Natural := 0;
    begin  
        loop
            select  
                accept Update do  -- bloque l'appelant

                    while (Nbr_Delete_Msg > 0) loop

                        case What_Class is

                            when Bgrb_Kbs.Robot =>
                                Bgrb_Frames.Robots.Delete
                                   (The_Delete_Msg_Table (Nbr_Delete_Msg).
                                    What_Fact);
                            when Bgrb_Kbs.Brick =>
                                Bgrb_Frames.Bricks.Delete
                                   (The_Delete_Msg_Table (Nbr_Delete_Msg).
                                    What_Fact);
                            when Bgrb_Kbs.Box =>
                                Bgrb_Frames.Boxes.Delete
                                   (The_Delete_Msg_Table (Nbr_Delete_Msg).
                                    What_Fact);
                            when Bgrb_Kbs.Nothing =>
                                null;
                        end case;
                        Nbr_Delete_Msg := Nbr_Delete_Msg - 1;
                    end loop;

                    while (Nbr_Change_Msg > 0) loop
                        case (What_Class) is
                            when Bgrb_Kbs.Robot =>
                                Bgrb_Frames.Robots.Change
                                   (The_Change_Msg_Table (Nbr_Change_Msg).
                                    What_Fact,
                                    The_Change_Msg_Table (Nbr_Change_Msg).
                                       What_Slot,
                                    The_Change_Msg_Table (Nbr_Change_Msg).
                                       The_Value);
                                null;
                            when Bgrb_Kbs.Brick =>
                                Bgrb_Frames.Bricks.Change
                                   (The_Change_Msg_Table (Nbr_Change_Msg).
                                    What_Fact,
                                    The_Change_Msg_Table (Nbr_Change_Msg).
                                       What_Slot,
                                    The_Change_Msg_Table (Nbr_Change_Msg).
                                       The_Value);
                                null;
                            when Bgrb_Kbs.Box =>
                                Bgrb_Frames.Boxes.Change
                                   (The_Change_Msg_Table (Nbr_Change_Msg).
                                    What_Fact,
                                    The_Change_Msg_Table (Nbr_Change_Msg).
                                       What_Slot,
                                    The_Change_Msg_Table (Nbr_Change_Msg).
                                       The_Value);
                                null;
                            when Bgrb_Kbs.Nothing =>
                                null;
                        end case;
                        Nbr_Change_Msg := Nbr_Change_Msg - 1;
                    end loop;
                end Update;
            or
                accept Change (The_Fact : Bgrb_Kbs.Kbs.Fact_Name;
                               The_Slot : With_Slots;
                               To_Value : Slot.Object) do  
                    Nbr_Change_Msg := Nbr_Change_Msg + 1;
                    The_Change_Msg_Table (Nbr_Change_Msg).What_Fact := The_Fact;
                    The_Change_Msg_Table (Nbr_Change_Msg).What_Slot := The_Slot;
                    The_Change_Msg_Table (Nbr_Change_Msg).The_Value := To_Value;
                end Change;

            or
                accept Delete (What_Class_Name : Bgrb_Kbs.Class_Names;
                               The_User_Object : Bgrb_Kbs.Kbs.Fact_Name) do
                    Nbr_Delete_Msg := Nbr_Delete_Msg + 1;
                    The_Delete_Msg_Table (Nbr_Delete_Msg).What_Fact :=
                       The_User_Object;
                end Delete;
            or
                terminate;

            end select;
        end loop;
    end Server;



    procedure Delete (The_User_Object : Bgrb_Kbs.Kbs.Fact_Name) is
    begin
        Server.Delete (The_User_Object);
    end Delete;


    procedure Change (The_Fact : Bgrb_Kbs.Kbs.Fact_Name;
                      The_Slot : With_Slots;
                      To_Value : Slot.Object) is
    begin  
        Server.Change (The_Fact, The_Slot, To_Value);
    end Change;



    procedure Update is
    begin
        Server.Update;
    end Update;

end Bgrb_Generic_Fact_Base_Server;

E3 Meta Data

    nblk1=10
    nid=b
    hdr6=c
        [0x00] rec0=27 rec1=00 rec2=01 rec3=004
        [0x01] rec0=17 rec1=00 rec2=09 rec3=04a
        [0x02] rec0=11 rec1=00 rec2=02 rec3=022
        [0x03] rec0=11 rec1=00 rec2=0e rec3=01a
        [0x04] rec0=14 rec1=00 rec2=10 rec3=00c
        [0x05] rec0=25 rec1=00 rec2=08 rec3=000
        [0x06] rec0=12 rec1=00 rec2=08 rec3=02a
        [0x07] rec0=21 rec1=00 rec2=0b rec3=000
        [0x08] rec0=20 rec1=00 rec2=07 rec3=000
        [0x09] rec0=10 rec1=00 rec2=09 rec3=030
        [0x0a] rec0=1e rec1=00 rec2=08 rec3=01c
        [0x0b] rec0=01 rec1=00 rec2=0e rec3=000
        [0x0c] rec0=01 rec1=00 rec2=0e rec3=000
        [0x0d] rec0=0d rec1=00 rec2=08 rec3=000
        [0x0e] rec0=0d rec1=00 rec2=08 rec3=001
        [0x0f] rec0=00 rec1=00 rec2=00 rec3=000
    tail 0x2174fc1e4867a6859a74d 0x42a00088462063c03
Free Block Chain:
  0xb: 0000  00 04 00 8a 80 02 65 3b 02 00 00 00 00 00 00 00  ┆      e;        ┆
  0x4: 0000  00 07 00 04 80 01 6c 01 02 03 04 05 06 07 08 09  ┆      l         ┆
  0x7: 0000  00 0c 03 3d 80 0c 20 20 20 20 20 20 20 20 20 20  ┆   =            ┆
  0xc: 0000  00 06 03 fc 80 1e 65 5f 4f 70 65 72 61 74 69 6f  ┆      e_Operatio┆
  0x6: 0000  00 0a 00 11 80 0e 20 20 20 20 20 20 20 63 61 73  ┆             cas┆
  0xa: 0000  00 03 01 1b 80 39 20 20 20 20 20 20 20 20 20 20  ┆     9          ┆
  0x3: 0000  00 0d 01 e3 80 1b 74 65 20 64 6f 20 20 2d 2d 20  ┆      te do  -- ┆
  0xd: 0000  00 05 00 0e 80 0b 6d 65 73 2e 52 6f 62 6f 74 73  ┆      mes.Robots┆
  0x5: 0000  00 0f 00 46 80 1c 20 20 20 20 20 20 20 20 20 20  ┆   F            ┆
  0xf: 0000  00 00 03 fc 80 05 77 6e 20 3d 3e 05 00 19 20 20  ┆      wn =>     ┆