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

⟦8552fe03b⟧ TextFile

    Length: 3277 (0xccd)
    Types: TextFile
    Notes: R1k Text-file segment

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦e3ce8806c⟧ 
            └─⟦this⟧ 

TextFile

with Interchange;
with Transport_Stream;

package Rpc is

    type Version_Number is new Interchange.Short_Integer;

    type Version_Range is
        record
            First, Last : Version_Number;
        end record;

    type Transaction_Id is new Interchange.Short_Integer;

    type Program_Number is new Interchange.Integer;

    type Procedure_Number is new Interchange.Short_Integer;


    type Error_Type is 
        (Error_Other, Error_Constraint, Error_Numeric, 
         Error_Program, Error_Storage, Error_Tasking, 
         Status_Error, Mode_Error, Name_Error, 
         Use_Error, Device_Error, End_Error, 
         Data_Error, Layout_Error, Error_Server_Defined);

    for Error_Type use (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);



    type Reject_Kind is 
        (Rej_No_Such_Program, 
         Rej_No_Such_Version, 
         Rej_No_Such_Procedure, 
         Rej_Invalid_Argument);

    for Reject_Kind use (0, 1, 2, 3);



    type Reject_Details (Kind : Reject_Kind := Rej_Invalid_Argument) is
        record
            case Kind is
                when Rej_No_Such_Version => 
                    Supported : Version_Range;
                when others => 
                    null;
            end case;
        end record;


    type Message_Kind is 
        (Call_Message, Reject_Message, Return_Message, Abort_Message);

    for Message_Kind use (0, 1, 2, 3);



    type Message_Header (Kind : Message_Kind := Return_Message) is
        record
            Id : Transaction_Id := 0;
            case Kind is
                when Call_Message => 
                    Program : Program_Number;
                    Version : Version_Number;
                    Proc    : Procedure_Number;
                     -- argument values follow
                when Reject_Message => 
                    Details : Reject_Details;
                when Return_Message => 
                    null;
                     -- result values follow
                when Abort_Message => 
                    Error : Error_Type;
            end case;
        end record;


    -- Interchange operations on the above types:

    subtype Stream_Id is Transport_Stream.Stream_Id;

    procedure Put (Into : Stream_Id; Data : Version_Range);
    procedure Get (From : Stream_Id; Data : out Version_Range);

    procedure Put_Message (Into : Stream_Id; Data : Message_Header);
    function Get_Message (From : Stream_Id) return Message_Header;

    -- This last procedure is a little unusual.  If the gotten value
    -- is OK, it returns it, otherwise it raises the corresponding
    -- exception.  In a sense, an exception (or lack thereof) is a
    -- possible return value.

    Protocol_Error       : exception;
    No_Such_Program      : exception;
    No_Such_Version      : exception;
    No_Such_Procedure    : exception;
    Other_Error          : exception;
    Invalid_Argument     : exception;
    Server_Defined_Error : exception;


    type Exception_Number is new Interchange.Integer;

    procedure Put (Into : Stream_Id; Data : Exception_Number);
    procedure Get (From : Stream_Id; Data : out Exception_Number);


    function Overlaps (X, Y : Version_Range) return Boolean;
    -- Return true if x and y have some versions in common.

end Rpc;