Commit f2d8774d authored by Eric Cano's avatar Eric Cano
Browse files

Updates to documentation.

Finished the fisrt version of the Tape::Drive interface.
parent 15016b8d
......@@ -336,7 +336,7 @@ The SCSI commands and st driver's functions used in previous software (CAStor's
\end{itemize}
\item st driver's commands, leading to internal variables setting or SCSI actions:
\begin{itemize}
\item Get internal driver state via the MTIOGET ioctl (for drive ready, write protection,
\item Get internal driver state via the MTIOCGET ioctl (for drive ready, write protection,
get some error condition, when MTIOSENSE failed, to get the EOD, BOT bits (readlbl)).
This functionality is covered by \verb#Drive::getDriveStatus#.
\item Try and get the sense data for the last-ish command with MTIOSENSE. This
......@@ -369,9 +369,11 @@ The SCSI commands and st driver's functions used in previous software (CAStor's
\item Unload the tape (MTIOCTOP/MTOFFL, in unldtape).
\item Write synchronous file mark(s) (tape marks in CAStor jargon) (MTIOCTOP/MTWEOF, in wrttpmrk).
\item Write immediate (asynchronous file marks (MTIOCTOP/MTWEOFI, also in wrttpmrk).
\item Clear the EOT condition by calling MTIOGET. This is done in wrttrllbl, 3 times.
In MTIOGET, indeed, a member of the scsi\_tape structure called recover\_reg is reset to 0.
This clearing is used to properly report errors in label wrinting functions.
\item Clear the EOT condition by calling MTIOCGET. This is done in wrttrllbl, 3 times.
In MTIOCGET, indeed, a member of the scsi\_tape structure called recover\_reg is reset to 0.
This clearing is used to properly report errors in label writing functions.
The usefulness of this function is dubious and it is not included in the current
API.
\item Write is used in 2 places only : twrite and writelbl (which is a specialized
function to write 80 bytes blocks). twrite is not checking the size of blocks,
which is determined in the calling functions.
......
......@@ -452,15 +452,87 @@ namespace Tape {
/**
* Jump to end of media. This will use setSTFastMTEOM() to disable MT_ST_FAST_MTEOM.
* (See TapeServer's handbook for details).
* (See TapeServer's handbook for details). This is used to rebuild the MIR (StorageTek)
* or tape directory (IBM).
* Tape directory rebuild is described only for IBM but currently applied to
* all tape drives.
* TODO: synchronous? Timeout?
*/
virtual void jumpToEOM(void) throw (Exception) { throw Exception("Not implemented"); }
virtual void fastSpaceToEOM(void) throw (Exception) { throw Exception("Not implemented"); }
/**
*
* Rewind tape.
*/
virtual void rewind(void) throw (Exception) { throw Exception("Not implemented"); }
/**
* Jump to end of data. EOM in ST driver jargon, end of data (which is more accurate)
* in SCSI terminology).
*/
virtual void spaceToEOM(void) throw (Exception) { throw Exception("Not implemented"); }
/**
* Space count files backwards.
* @param count
*/
virtual void spaceFilesBackward(size_t count) throw (Exception) { throw Exception("Not implemented"); }
/**
* Space count files forward.
* @param count
*/
virtual void spaceFilesForward(size_t count) throw (Exception) { throw Exception("Not implemented"); }
/**
* Space count blocks backwards.
* @param count
*/
virtual void spaceBlocksBackwards(size_t count) throw (Exception) { throw Exception("Not implemented"); }
/**
* Space count blocks forward.
* @param count
*/
virtual void spaceBlocksForward(size_t count) throw (Exception) { throw Exception("Not implemented"); }
/**
* Unload the tape.
*/
virtual void unloadTape(void) throw (Exception) { throw Exception("Not implemented"); }
/**
* Synch call to the tape drive. This function will not return before the
* data in the drive's buffer is actually comitted to the medium.
*/
virtual void sync(void) throw (Exception) { throw Exception("Not implemented"); }
/**
* Write count file marks. The function does not return before the file marks
* are committed to medium.
* @param count
*/
virtual void writeSyncFileMarks(size_t count) throw (Exception) { throw Exception("Not implemented"); }
/**
* Write count file marks asynchronously. The file marks are just added to the drive's
* buffer and the function return immediately.
* @param count
*/
virtual void writeImmediateFileMarks(size_t count) throw (Exception) { throw Exception("Not implemented"); }
/**
* Write a data block to tape.
* @param data pointer the the data block
* @param count size of the data block
*/
virtual void writeBlock(const unsigned char * data, size_t count) throw (Exception) { throw Exception("Not implemented"); }
/**
* Read a data block from tape.
* @param data pointer the the data block
* @param count size of the data block
*/
virtual void readBlock(unsigned char * data, size_t count) throw (Exception) { throw Exception("Not implemented"); }
virtual ~Drive() {
if(-1 != m_tapeFD)
m_sysWrapper.close(m_tapeFD);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment