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

⟦31dc705cb⟧ TextFile

    Length: 9392 (0x24b0)
    Types: TextFile
    Names: »V«

Derivation

└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦9b46a407a⟧ 
            └─⟦12c68c704⟧ 
                └─⟦this⟧ 
└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS 
    └─ ⟦91c658230⟧ »DATA« 
        └─⟦458657fb6⟧ 
            └─⟦220843204⟧ 
                └─⟦this⟧ 

TextFile

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;