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: ┃ T V

⟦ce1951668⟧ TextFile

    Length: 6951 (0x1b27)
    Types: TextFile
    Names: »V«

Derivation

└─⟦5829e5ed5⟧ Bits:30000534 8mm tape, Rational 1000, RCI 2_0_5
    └─ ⟦c9a165082⟧ »DATA« 
        └─⟦c3895f76e⟧ 
            └─⟦this⟧ 

TextFile

with Simple_Status;
package Telnet_Characteristics is

    type Pattern_Item is private;  
    type Pattern_List is array (Natural range <>) of Pattern_Item;
    -- Error or warning patterns type

    type Object is private;
    -- Type of the telnet characteristics object

    Null_Object : constant Object;

    -- Exceptions

    Target_Is_Registered : exception;
    Target_Not_Initialized : exception;
    Invalid_Access : exception;
    -- Raised if a Get is attempted on an object that was never built

    function Build (Pattern_String : String := ""; For_Target : String)
                   return Pattern_Item;

    function Build (Username_Prompt : String := "";  
                    Username_Failure : String := "";
                    -- Telnet remote username prompt and username
                    -- failure string

                    Password_Prompt : String := "";
                    Password_Failure : String := "";
                    -- Remote password prompt and password
                    -- failure string

                    Command_Prompt : String := "";
                    -- Remote command prompt

                    Prompt1 : String := "";
                    Prompt2 : String := "";
                    Prompt3 : String := "";
                    Prompt4 : String := "";
                    -- Extra prompts . Can be used incase
                    -- remote compilers have prompts that
                    -- need to be responded to.

                    Check_Status_Of_Commands : Boolean := True;
                    -- This flag determines how we check the
                    -- status of a remote command. If this flag
                    -- is true we issue a status command to
                    -- check status of previous command

                    Status_Command : String := "";  
                    Status_Code_Offset : Integer := 1;
                    Status_Code_Length : Integer := 1;
                    -- The status commnand specifies the
                    -- remote command to echo status
                    -- Offset and length determine how
                    -- to extract the status code from
                    -- the output of the status comamnd

                    Dir_Command : String := "";
                    -- The remote directory command

                    Initial_Command : String := "";
                    -- This command is issued immediately after
                    -- logging in to the remote machine.

                    Transmit_Before_Login : String := "";
                    -- Stream of characters to be transmitted
                    -- after connecting to a remote machine
                    -- (typically CRs)

                    Transmit_After_Login : String := "";
                    -- Stream of characters to be transmitted
                    -- after connecting to a remote machine
                    -- (typically CRs)

                    Error_Pattern_List : Pattern_List;
                    -- List of patterns that are to be matched
                    -- against a remote command's output to determine
                    -- if it has produced errors

                    Warning_Pattern_List : Pattern_List;
                    -- List of patterns that are to be matched against
                    -- a remote command's output to determine if it has
                    -- produced warnings.

                    Telnet_Protocol_Local_Echo : Boolean := False;
                    -- If this value is false then the local
                    -- TELNET clinet will not echo back packets received
                    -- from the remote TELNET server.

                    For_Target : String) return Object;

    procedure Check (The_Object : Object;
                     Status : in out Simple_Status.Condition);
    procedure Display (The_Object : Object);


    -- Prompts

    function Get_User_Name_Prompt (The_Object : Object) return String;
    function Get_Password_Prompt (The_Object : Object) return String;
    function Get_Command_Prompt (The_Object : Object) return String;
    function Get_Password_Failure (The_Object : Object) return String;

    -- Patterns

    function Get_Error_Patterns (The_Object : Object) return Pattern_List;
    function Get_Error_Patterns_Count (The_Object : Object) return Integer;
    function Get_Warning_Patterns (The_Object : Object) return Pattern_List;
    function Get_Warning_Patterns_Count (The_Object : Object) return Integer;

    -- Commands

    function Get_Status_Command (The_Object : Object) return String;
    function Get_Status_Code_Start (The_Object : Object) return Integer;
    function Get_Status_Code_Length (The_Object : Object) return Integer;
    function Get_Dir_Command (The_Object : Object) return String;
    function Initial_Command_Specified (The_Object : Object) return Boolean;
    function Get_Initial_Command (The_Object : Object) return String;
    function Check_Command_Status (The_Object : Object) return Boolean;

    function Get_Transmit_Before_Login (The_Object : Object) return String;
    function Get_Transmit_After_Login (The_Object : Object) return String;

    function Get_Pattern (Item : Pattern_Item) return String;
    function Get_Telnet_Protocol_Local_Echo
                (The_Object : Object) return Boolean;

    pragma Module_Name (4, 4145);
    pragma Bias_Key (32);


private

    type String_Ptr is access String;
    pragma Segmented_Heap (String_Ptr);

    type Pattern_Rec (Length : Integer) is
        record
            Pattern : String (1 .. Length);
        end record;

    type Pattern_Item is access Pattern_Rec;
    pragma Segmented_Heap (Pattern_Item);

    Null_Pattern_Item : Pattern_Item := null;

    type Pattern_List_Ptr is access Pattern_List;
    pragma Segmented_Heap (Pattern_List_Ptr);

    Null_Pattern_List : Pattern_List_Ptr := null;

    type Object_Rec is
        record
            Username_Prompt : String_Ptr;
            Username_Failure : String_Ptr;
            Password_Prompt : String_Ptr;
            Password_Failure : String_Ptr;
            Command_Prompt : String_Ptr;
            Prompt1 : String_Ptr;
            Prompt2 : String_Ptr;
            Prompt3 : String_Ptr;
            Prompt4 : String_Ptr;

            Check_Status_Of_Commands : Boolean;
            Status_Command : String_Ptr;  
            Status_Code_Offset : Integer;
            Status_Code_Length : Integer;
            Dir_Command : String_Ptr;
            Initial_Command : String_Ptr;
            Transmit_Before_Login : String_Ptr;
            Transmit_After_Login : String_Ptr;

            Error_Pattern_List : Pattern_List_Ptr;
            Warning_Pattern_List : Pattern_List_Ptr;
            Telnet_Protocol_Local_Echo : Boolean;
        end record;

    type Object is access Object_Rec;
    pragma Segmented_Heap (Object);

    Null_Object : constant Object := null;

end Telnet_Characteristics;