UNIVERS
15.3
UNIVERS base processing software API
|
#include <TapeRead.hpp>
Public Member Functions | |
TapeRead (const char *szPath) | |
virtual | ~TapeRead () |
virtual void | set_max_block_size (int nSize) |
virtual int | get_max_block_size () const |
virtual void | set_max_errors (int nErrors) |
virtual int | get_max_errors () const |
virtual const char * | get_tape_name () const |
virtual unsigned char * | get_block_buffer () const |
virtual ErrCode | observe () |
virtual void | finish () |
virtual int | files_on_tape () const |
virtual int | size_of_tape () const |
virtual void | start_of_tape () |
virtual void | start_of_file (int iFile) |
virtual void | block_of_file (int iFile, int iBlock, const unsigned char *pBlockData, int nBlockSize) |
virtual void | end_of_block_sequence (int iFile, int iBlock1, int iBlock2, int nBlockSize) |
virtual void | end_of_file (int iFile, int nBlocks, int nFileSize) |
virtual void | end_of_tape () |
virtual void | final (bool bNormal) |
Protected Attributes | |
char * | szDataLocAddress |
int | nMaxBlockSize |
int | nMaxErrors |
unsigned char * | pBlockBuffer |
int | nFiles |
int | nTapeSize |
bool | bFinish |
Abstraction for magnetic tape reader device access.
TapeRead::TapeRead | ( | const char * | szPath | ) |
Create object for reading given tape (or other medium).
|
virtual |
Destroy the object and release all catched resources.
|
virtual |
Called on tape block was read. At least one block must exist in the file.
|
virtual |
Called on the end of tape block sequence iBlock1..iBlock2 with the same length nBlockSize.
|
virtual |
Called just after the last file's block was read. At least one tape file must exist on the tape.
|
virtual |
Called just after the last file on the tape was read.
|
virtual |
Number of files on the tape.
|
virtual |
Called just after end_of_tape() but is called even if finish() caused break of the observation process. True is passed in case of normal finish (after end_of_tape()) and false is passed in case of abnormal one (caoused by finish() call in any of event processing methods).
|
virtual |
Break the observation method.
|
virtual |
Get the pointer to block buffer.
|
virtual |
Get maximum tape block size.
|
virtual |
Get maximum number of reading errors.
|
virtual |
Get the data location (path).
|
virtual |
Iterate trough the whole tape contents raising events on the way. Statistics is reset at the start of observe() method.
|
virtual |
Setup maximum tape block size.
|
virtual |
Setup maximum number of reading errors.
|
virtual |
Total size of files on the tape.
|
virtual |
Called just before new tape file is read. At least one tape file must exist on the tape. Index of file on the tape is passed as an argument.
|
virtual |
Called just before tape is read.
|
protected |
Break the observing method.
|
protected |
Total number of files on the tape. Before observer() is equal to 0.
|
protected |
Maximum length of tape record.
|
protected |
Maximum allowed number of read errors.
|
protected |
Total tape size. Before observer() is equal to 0.
|
protected |
Preallocated buffer for the most long tape record.
|
protected |
Data location address. Usually path to the tape device.