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

⟦59438a462⟧ Ada Source

    Length: 12288 (0x3000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Tape_Specific, pragma Module_Name 4 3214, pragma Subsystem Input_Output, seg_01287d

Derivation

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

E3 Source Code



with Device_Independent_Io;
with System;

package Tape_Specific is

    subtype File_Type   is Device_Independent_Io.File_Type;
    subtype Byte_Range  is Natural range 0 .. 4096;
    subtype Pipe_Range  is Natural range 0 .. 8;
    subtype Byte_String is System.Byte_String;

    type On_Off is (On, Off);

    procedure Set_Block_Size (File : File_Type; Size : Byte_Range);
    -- default is Recommended_Max_Block_Length

    procedure Set_Streaming_Mode (File : File_Type; Mode : On_Off);
    -- on = true turns streaming mode on
    -- on = false turns streaming mode off
    -- default is off

    procedure Set_Pipeline_Size (File : File_Type; Size : Pipe_Range);
    -- pipeline size to use if in streaming mode
    -- default is Recommended_Pipeline_Size


    procedure Unload (File : File_Type);
    -- the "file" is closed
    -- the tape drive unloads the tape

    procedure Rewind (File : File_Type);
    -- the tape is put at beginning of tape

    type Skip_Records_Obstacles is
       (None,                       -- No obstacle encountered
        Tape_Mark,                  -- Tape mark encountered,
        Bot                         -- Beginning of tape was encountered while
                                    --   while skipping backwards
        );

    type Skip_Marks_Obstacles is
       (None,                     -- No obstacle encountered
        Double_Tape_Mark,         -- 2 consecutive tape marks were encountered
        --   while skipping forward
        Bot                       -- Beginning of tape was encountered while
                                  --   while skipping backwards
        );

    type Error_Status is
       (Success,                -- No error encountered
        Record_Length_Long,     -- Record on tape was longer than parameter
        Not_On_Line,            -- Drive was offline
        Retry_Count_Exhausted,  -- Record/tape mark can't be read/written
        Unexpected_Tape_Error,  -- Tape position lost, rewind or unload it
        Unit_Is_Bad);           -- Call Field Service


    -- The following procedures that do not return an error status will have
    -- the exception DATA_ERROR raised if RECORD_LENGTH_LONG would have been
    -- returned.  DEVICE_ERROR is raised for all other non-SUCCESS statuses.

    procedure Unload (File : File_Type; Status : out Error_Status);
    -- the "file" is closed
    -- the tape drive unloads the tape

    procedure Rewind (File : File_Type; Status : out Error_Status);
    -- the tape is put at beginning of tape

    -- The following should NOT be intermingled with the Read and Write
    -- procedures in Device_Independent_IO for the same file.

    -- The READ procedures return the next record of data on the tape.
    -- COUNT returns the actual size of the physical tape record in bytes.
    -- Only the first COUNT elements of RECRD are valid.
    -- If RECORD_LENGTH_LONG is returned as the error status, then RECRD
    -- contains the first RECRD'LENGTH bytes of the physical tape record and
    -- COUNT = RECRD'LENGTH.  If a tape mark was read, then COUNT = 0.

    procedure Read (File  :     File_Type;
                    Recrd : out Byte_String;
                    Count : out Natural);

    procedure Read (File   :     File_Type;
                    Recrd  : out Byte_String;
                    Count  : out Natural;
                    Status : out Error_Status);

    procedure Read (File : File_Type; Recrd : out String; Count : out Natural);

    procedure Read (File   :     File_Type;
                    Recrd  : out String;
                    Count  : out Natural;
                    Status : out Error_Status);


    -- The two IS_MARK subprograms return whether the next tape record to be
    -- read is a tape mark.  These subprograms should only be used while in
    -- streaming mode otherwise they will raise USE_ERROR.  They will raise
    -- MODE_ERROR if the file is not open for input.

    function Is_Mark (File : File_Type) return Boolean;

    procedure Is_Mark (File   :     File_Type;
                       Result : out Boolean;
                       Status : out Error_Status);


    -- The WRITE procedures write the contents of RECRD on the tape as a
    -- physical tape record.  RECRD'LENGTH must be greater than or equal to 18
    -- and less than or equal to the ABSOLUTE_MAX_BLOCK_LENGTH (currently
    -- 4096) otherwise USE_ERROR will be raised.

    -- PAST_EOT_MARKER indicates that the area beyond the reflective EOT marker
    -- on the tape is now being written.  Users are cautioned that tape
    -- standards specify that there is at least 25 ft. of tape from the marker
    -- to the end of the reel, but only the first 10 ft. are useable.  It
    -- is OK to write in this 10 ft. area but writing beyond that runs the
    -- risk of running the tape off its reel.

    procedure Write (File            :     File_Type;
                     Recrd           :     Byte_String;
                     Past_Eot_Marker : out Boolean);

    procedure Write (File            :     File_Type;
                     Recrd           :     Byte_String;
                     Past_Eot_Marker : out Boolean;
                     Status          : out Error_Status);

    procedure Write (File            :     File_Type;
                     Recrd           :     String;
                     Past_Eot_Marker : out Boolean);

    procedure Write (File            :     File_Type;
                     Recrd           :     String;
                     Past_Eot_Marker : out Boolean;
                     Status          : out Error_Status);


    -- The WRITE_MARK procedures cause a tape mark to be written to the tape.

    procedure Write_Mark (File : File_Type; Past_Eot_Marker : out Boolean);

    procedure Write_Mark (File            :     File_Type;
                          Past_Eot_Marker : out Boolean;
                          Status          : out Error_Status);


    -- The SKIP_RECORDS procedures position the tape either forward
    -- or backward until ABS (NUM_RECORDS_TO_SKIP) have been skipped or
    -- an obstacle has been encountered.  A positive NUM_RECORDS_TO_SKIP
    -- implies skipping forward; negative implies skipping backward; zero
    -- implies no movement.  If a tape mark is encountered as an obstacle,
    -- the position of the tape is on the "other side" of the tape mark; i.e.,
    -- when skipping backward, the next item read would be that same tape mark
    -- or when skipping forward, the next item read would be the record or
    -- tape mark beyond the obstacle tape mark.  The RECORDS_SKIPPED does
    -- not include the tape mark.  If the Beginning-Of-Tape reflective marker
    -- is encountered while skipping backward, the position of the tape will
    -- be at the beginning of the tape, ready to read the first record.
    -- MODE_ERROR is raised if the file is not open for reading.  USE_ERROR
    -- is raised if the file is in streaming mode.

    procedure Skip_Records (File                :     File_Type;
                            Num_Records_To_Skip :     Integer;
                            Obstacle            : out Skip_Records_Obstacles;
                            Records_Skipped     : out Natural);

    procedure Skip_Records (File                :     File_Type;
                            Num_Records_To_Skip :     Integer;
                            Obstacle            : out Skip_Records_Obstacles;
                            Records_Skipped     : out Natural;
                            Status              : out Error_Status);


    -- The SKIP_TAPE_MARKS procedures position the tape either forward or
    -- backward until ABS (NUM_MARKS_TO_SKIP) have been skipped or
    -- an obstacle has been encountered.  A positive NUM_MARKS_TO_SKIP
    -- implies skipping forward; negative implies skipping backward; zero
    -- implies no movement.  Two consecutive tape marks (a double tape mark)
    -- is only an obstacle while skipping forward; in which case neither of
    -- the tape marks is counted in MARKS_SKIPPED.  If two consecutive tape
    -- marks are encountered while skipping backward, it is not an obstacle
    -- and they are treated as individual tape marks in MARKS_SKIPPED.  If
    -- the Beginning-Of-Tape reflective marker is encountered while skipping
    -- backward, the position of the tape will be at the beginning of the
    -- tape, ready to read the first record.  If no obstacle was encountered,
    -- the position of the tape is on the "other side" of the last tape mark.
    -- MODE_ERROR is raised if the file is not open for reading.  USE_ERROR
    -- is raised if the file is in streaming mode.

    procedure Skip_Tape_Marks (File              :     File_Type;
                               Num_Marks_To_Skip :     Integer;
                               Obstacle          : out Skip_Marks_Obstacles;
                               Marks_Skipped     : out Natural);

    procedure Skip_Tape_Marks (File              :     File_Type;
                               Num_Marks_To_Skip :     Integer;
                               Obstacle          : out Skip_Marks_Obstacles;
                               Marks_Skipped     : out Natural;
                               Status            : out Error_Status);

    pragma Subsystem (Input_Output);
    pragma Module_Name (4, 3214);

end Tape_Specific;

E3 Meta Data

    nblk1=b
    nid=0
    hdr6=16
        [0x00] rec0=20 rec1=00 rec2=01 rec3=04e
        [0x01] rec0=00 rec1=00 rec2=0b rec3=008
        [0x02] rec0=16 rec1=00 rec2=02 rec3=016
        [0x03] rec0=15 rec1=00 rec2=03 rec3=048
        [0x04] rec0=17 rec1=00 rec2=04 rec3=07c
        [0x05] rec0=15 rec1=00 rec2=05 rec3=000
        [0x06] rec0=18 rec1=00 rec2=06 rec3=06c
        [0x07] rec0=10 rec1=00 rec2=07 rec3=044
        [0x08] rec0=12 rec1=00 rec2=08 rec3=07e
        [0x09] rec0=0f rec1=00 rec2=09 rec3=030
        [0x0a] rec0=0e rec1=00 rec2=0a rec3=000
    tail 0x2150d8d3a82b082368521 0x42a00088462065003