home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 498b.lha / BTNtape_v2.0 / tapemon.doc < prev    next >
Text File  |  1991-04-08  |  7KB  |  133 lines

  1. ****    TapeMon:  a monitor program for BTNtape handler           ****
  2. ****       Version 2.0   03/29/91                                 ****
  3. ****       Freeware by Bob Rethemeyer   (DrBob@cup.portal.com)    ****
  4. ****      (c) Copyright 1990,1991 Robert Rethemeyer               ****
  5.  
  6. TapeMon is an optional companion program to the BTNtape SCSIdirect
  7. tape handler.  Since the handler cannot directly inform you of what
  8. it is doing,  TapeMon, running in a separate CLI, communicates with
  9. the handler and prints information for you.  Think of it as a window
  10. into the handler.
  11.  
  12. To run TapeMon, bring up a separate CLI window.  Enter "TapeMon" or
  13. "TapeMon [name]", where [name] is the name of the handler device process.
  14. If you do not enter the name, the monitor will default to using "TAPE:".
  15.  
  16. The handler must be loaded and running for TapeMon to work, otherwise
  17. it prints a message and immediately quits.  If you have mounted the
  18. tape handler but not accessed the tape yet, the handler is not yet loaded,
  19. and TapeMon will give up.  To avoid this, invoke TapeMon after starting
  20. tape access, or use "Mount = 1" in your mountlist entry.
  21.  
  22. Once the handler is loaded and running, you may invoke or terminate
  23. the monitor at any time (but only one TapeMon may run at a time).
  24. To terminate the monitor, enter control-C from the TapeMon CLI window,
  25. or send a BREAK command from another CLI.
  26.  
  27. If the handler encounters a tape error, it remembers the data returned
  28. by SENSE.  When TapeMon is started, it prints the retained sense data.
  29. So if you weren't running TapeMon at the time an error occurs, you can
  30. still see the sense data by starting TapeMon after the fact.
  31.  
  32. TapeMon accepts a second command line argument as a flag to print all
  33. the sense information when a sense occurs.  The value of the second
  34. argument is ignored, but if it is present, complete sense is printed.
  35. Example:  TAPEMON TAPE: XYZ
  36. The presense of the XYZ will cause the sense message to also print
  37. 32 bytes of hex sense information as it is returned from the drive.
  38.  
  39. TapeMon output is to stdout, so you may redirect it if you like.
  40. Example:   TAPEMON >filename
  41.  
  42.  
  43. MESSAGES
  44.  
  45. The following summarizes the messages from the handler/monitor:
  46.  
  47.   Drive: ............       shows the manufacturer, model, and ROM version
  48.                             of the drive.  This is the data returned by the
  49.                             drive with the SCSI INQUIRY command.
  50.  
  51.   Sequential Access         One of the first two messages is printed to show
  52.   Direct Access             which type of drive you have.  The third message
  53.   BAD LOGICAL UNIT NUMBER   is printed if you use the wrong LU number.
  54.  
  55.   TAPE: Opened at block x   printed when the TAPE: file is opened by DOS.
  56.                             x is the first block number of the file.
  57.                             For sequential tapes, block numbers are relative
  58.                             to the beginning of the file (not necessarily
  59.                             the beginning of the tape).
  60.  
  61.   Closed at block x         printed when the TAPE: file is closed by DOS.
  62.                             x is the next available block.
  63.  
  64.   Writing block x * n       printed when a tape write is started by the
  65.                             handler. x = block number. n = number of blocks
  66.                             (fixed block mode, VB-0), or number of bytes
  67.                             (variable block mode, VB-1).
  68.  
  69.   Reading block x * n       printed when a tape read is started by the handler.
  70.  
  71.   Writing filemark          printed when TAPE: is closed in write mode,
  72.                             sequential drives only.
  73.  
  74.   Unsupported_pkt= x        printed when DOS sends a packet which the handler
  75.                             rejects.  Example: 25 for the INFO command.
  76.  
  77.   Function/mode error       the application attempted a Read() while opened
  78.                             in write mode, or a Write() while in read mode.
  79.  
  80.   Rewinding                 printed when handler starts a tape rewind
  81.  
  82.   Skipping n file(s)        printed when TAPE:num form is used to skip over
  83.                             filemarks (sequential drives only).
  84.  
  85.   Raw command               printed when handler receives a raw command request
  86.  
  87.   Mode Select block size x  printed when handler detects that drive block size
  88.                             is not equal to BS, and a Mode Select is issued
  89.                             to correct it.
  90.  
  91.   User Mode-Select          printed when handler passes the user mode-select
  92.                             request on to the drive.
  93.  
  94.   Sense: ????? other=yy,zz  printed when the handler issues SENSE to the tape
  95.                             drive due to a "check condition" (error).
  96.                             ????? is the sense key meaning.  Filemark and
  97.                             end-of-tape are identified separately. yy,zz is the
  98.                             additional sense code from bytes 12 and 13 of the
  99.                             sense data (some drives provide this). If complete
  100.                             sense was selected by TapeMon arg2, 32 additional
  101.                             bytes will be printed representing the exact data
  102.                             returned by the drive for the sense.
  103.  
  104.   Last sense= ?????, yy,zz  retained sense data printed at TapeMon startup
  105.  
  106.   ERROR(S) IN STARTUP       printed when the handler detects an unrecognized
  107.                             parameter in the mountlist Startup statement.
  108.  
  109.   SCSI ????? ERROR          printed when the scsidirect driver detects an
  110.                             error (io_Error != 0). ????? is the error meaning.
  111.  
  112.   Capacity: xxxx blocks     (for the 3M drive only) printed at Open() time
  113.                             to show the number of blocks available on the
  114.                             tape volume.  If this number is huge, your
  115.                             3M drive may not support the READ_CAPACITY
  116.                             command- don't worry about it.
  117.  
  118.   Time to insert tape# x    printed when EOT requester is displayed
  119.  
  120.   Can't get memory for tape buffers   printed for Open() attempts when not
  121.                                       enough memory is available for buffers.
  122.                                       Try a smaller number for NB.
  123.  
  124.  
  125. HOW IT WORKS
  126.  
  127. TapeMon finds the tape handler process and locates a common
  128. data structure attached to it.  The monitor waits for signals from the
  129. handler.  The handler detects the presence of the monitor and signals
  130. it when a message needs to be printed.  A break signal causes the monitor
  131. to disconnect itself from the handler and terminate.
  132.  
  133.