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

⟦ded80bcb4⟧ Ada Source

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

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 Text_Io;
with Bounded_String;
with Record_Tables;

package body Orb_Tools is

    Mess_Error : My_Message.My_String;


    procedure Initialize_Data_Structures is
    begin
        Record_Tables.Initialize_Data_Structures;
    end Initialize_Data_Structures;


    procedure Reply_Error (Message : My_Message.Object;
                           Mess_Error : My_Message.My_String) is
        New_Message : My_Message.Object;
    begin
        New_Message := My_Message.Initialize
                          (Op => My_Message.Reply_Error,
                           Cont => Mess_Error,
                           Req_I => My_Message.Get_Request_Identifier (Message),
                           L_I => My_Message.Get_Local_Identifier (Message));
        My_Message.Send (New_Message,
                         My_Message.Get_Local_Identifier (Message));
    end Reply_Error;


    procedure Registrate (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type REGISTRATION has been received");
        if not (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Fill_In (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is already registrated !");
            Reply_Error (Message, Mess_Error);
        end if;  
    end Registrate;


    procedure Unregistrate (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type UNREGISTRATION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Delete (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Unregistrate;


    procedure Require (Message : My_Message.Object) is
        New_Message : My_Message.Object := Message;
    begin
        Text_Io.Put_Line ("Message of type REQUEST has been received");  
        if (Record_Tables.Client_Is_Registrate (Message)) then
            if (Record_Tables.Request_Exists (Message)) then
                My_Message.Send
                   (New_Message,
                    Record_Tables.Extract_Rem_Id_For_Request (Message));
            else
                Bounded_String.Copy (Mess_Error,
                                     "Request does not exists not !");
                Reply_Error (Message, Mess_Error);
            end if;
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Require;


    procedure Notify (Message : My_Message.Object) is

    begin
        Text_Io.Put_Line ("Message of type NOTIFICATION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Send_To_All (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Notify;


    procedure Forwards (Message : My_Message.Object) is
        New_Message : My_Message.Object := Message;
    begin
        Text_Io.Put_Line ("Message of type FORWARD has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            My_Message.Send (New_Message,
                             My_Message.Get_Remote_Identifier (Message));
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Forwards;


    procedure Publicate (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type PUBLICATION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Record_Of_Publication (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Publicate;


    procedure Unpublicate (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type UNPUBLICATION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Unrecord_Of_Publication (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Unpublicate;


    procedure Subscript (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type SUBSCRIPTION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Set_Subscription (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;

    end Subscript;

    procedure Unsubscript (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type UNSUBSCRIPTION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Reset_Subscription (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Unsubscript;

    procedure Filtrate (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type FILTRATION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Set_Filter (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Filtrate;

    procedure Unfiltrate (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type UNFILTRATION has been received");
        if (Record_Tables.Client_Is_Registrate (Message)) then
            Record_Tables.Reset_Filter (Message);
        else
            Bounded_String.Copy (Mess_Error, "Client is not  registrated !");
            Reply_Error (Message, Mess_Error);
        end if;
    end Unfiltrate;

    procedure Query (Message : My_Message.Object) is
    begin
        Text_Io.Put_Line ("Message of type QUERY has been received");
    end Query;

    procedure Reply (Message : My_Message.Object) is
        New_Message : My_Message.Object := Message;
    begin
        Text_Io.Put_Line ("Message of type REPLY has been received");
        My_Message.Send (New_Message,
                         Record_Tables.Extract_Rem_Id_For_Reply (Message));
    end Reply;

end Orb_Tools;

E3 Meta Data

    nblk1=8
    nid=5
    hdr6=e
        [0x00] rec0=21 rec1=00 rec2=01 rec3=010
        [0x01] rec0=19 rec1=00 rec2=02 rec3=06c
        [0x02] rec0=19 rec1=00 rec2=04 rec3=04a
        [0x03] rec0=1a rec1=00 rec2=03 rec3=02c
        [0x04] rec0=19 rec1=00 rec2=08 rec3=036
        [0x05] rec0=1b rec1=00 rec2=07 rec3=04c
        [0x06] rec0=19 rec1=00 rec2=06 rec3=000
        [0x07] rec0=16 rec1=00 rec2=04 rec3=001
    tail 0x2154d073887b6776fabe0 0x42a00088462060003
Free Block Chain:
  0x5: 0000  00 00 00 11 80 0b 20 4f 72 62 5f 54 6f 6f 6c 73  ┆       Orb_Tools┆