df_BlockScanner Class Reference
[IVD Data format.]

#include <df.h>

List of all members.


Detailed Description

Definition at line 732 of file df.h.


Public Member Functions

 df_BlockScanner (UInt32_t a_blkType, UInt32_t a_blkSize)
virtual ~df_BlockScanner ()
df_BlockHeader_tSetBlock (UInt8_t *a_buf)
 Set current block.
df_RecCmn_tGetNextRecord ()
 Get next record in current block - returns NULL if no more records This method performs the following checks:
  • record magic cookie
  • record sequence number
  • record type sequence (records in correct order).

UInt8_tGetPosition () const
 Get pointer to current position in block - useful in case of error.
UInt32_t GetBlockLeft () const
 Get number of bytes left to the end of block (from current position).
void Reset ()
 Reset sequence counters and start from beginning.
UInt32_t GetNextBlkNum () const
UInt32_t GetNextRecNum () const
UInt64_t GetStreamLeft () const

Static Public Member Functions

static bool IsBlockCookie (const void *a_data)
static void GetVolumeID (UInt8_t *a_volHdrBlock_p, df_ECMAVolumeLabel_t *&a_ecmaVolHdr_p, df_RecVolHdr_t *&a_ivdVolHdr_p)
 This function parses the ECMA and IVD Volume IDs from the given input buffer.

Protected Attributes

UInt32_t m_blkType
UInt32_t m_blkSize
UInt8_tm_curBlock
UInt32_t m_curBlockPos
UInt32_t m_curBlockUsed
UInt32_t m_blkNum
 Current block number.
UInt32_t m_recNum
 Current record number & previous record type (for sequence checks).
UInt32_t m_prevRec
UInt32_t m_streamType
 Current stream info - used for handling RAW blocks.
string m_streamName
UInt64_t m_streamLeft

Private Attributes

 log_CLASSID_m

Constructor & Destructor Documentation

df_BlockScanner::df_BlockScanner ( UInt32_t  a_blkType,
UInt32_t  a_blkSize 
)

Definition at line 50 of file df_scanner.cpp.

References log_FUNC_m.

00051     : m_blkType(a_blkType),
00052       m_blkSize(a_blkSize),
00053       m_curBlock(NULL),
00054       m_curBlockPos(0),
00055       m_curBlockUsed(0),
00056       m_blkNum(0),
00057       m_recNum(0),
00058       m_prevRec(rec_NoRec_c),
00059       m_streamType(0),
00060       m_streamName(""),
00061       m_streamLeft(0) {
00062 
00063     log_FUNC_m(df_BlockScanner);
00064 }

df_BlockScanner::~df_BlockScanner (  )  [virtual]

Definition at line 66 of file df_scanner.cpp.

References log_FUNC_m.

00066                                   {
00067     log_FUNC_m(~df_BlockScanner);
00068 }


Member Function Documentation

bool df_BlockScanner::IsBlockCookie ( const void *  a_data  )  [static]

Definition at line 41 of file df_scanner.cpp.

References df_blkCookie_c, and df_BLKCOOKIE_SIZE_d.

Referenced by ReadOneBackupFromMedium(), and SetBlock().

00041                                                       {
00042     return (
00043         memcmp(
00044             a_data, df_blkCookie_c,
00045             df_BLKCOOKIE_SIZE_d) == 0);
00046 }

Here is the caller graph for this function:

void df_BlockScanner::GetVolumeID ( UInt8_t a_volHdrBlock_p,
df_ECMAVolumeLabel_t *&  a_ecmaVolHdr_p,
df_RecVolHdr_t *&  a_ivdVolHdr_p 
) [static]

This function parses the ECMA and IVD Volume IDs from the given input buffer.

Volume ID record has a predefined size df_VOLHDR_REC_SIZE_d.

Parameters:
a_volHdrBlock (in) input volume header block from a tape
a_ecmaVolHdr (out) ECMA volume header (NULL if not detected)
a_ivdVolHdr (out) IVD volume header (NULL if not detected)

Definition at line 79 of file df_scanner.cpp.

References cmn_Num2Str(), dbg_LOW, dbg_NORM, df_recCookie_c, ecma_ImplID_c, ecma_LblStdVer_c, ecma_VolID_c, df_ECMAVolumeLabel_t::ecmaHdr, df_ECMAVolumeLabel_t::first, ie_DF_HDRCORRUPT, df_ECMAFirstVolumeLabel_t::implID, IsRecordCookie(), df_ECMALblHdr_t::lblID, df_ECMAFirstVolumeLabel_t::lblStdVer, log_DBG_m, log_FUNC_m, df_RecCmn_t::magicCookie, NULL, df_ECMALblHdr_t::number, rec_VolHdr_c, and df_RecCmn_t::type.

Referenced by CheckIVDHeader(), ParseECMAHeader(), and bea_Volume::ReadVolInfoFromHeader().

00082                                              {
00083 
00084     log_FUNC_m(GetVolumeID);
00085 
00086     a_ecmaVolHdr_p = NULL;
00087     a_ivdVolHdr_p = NULL;
00088 
00089     // Try to detect ECMA volume header
00090     log_DBG_m(dbg_NORM, "Detecting ECMA volume header.");
00091 
00092     df_ECMAVolumeLabel_t *ecmaHdr_p =
00093         reinterpret_cast<df_ECMAVolumeLabel_t*>(a_volHdrBlock_p);
00094 
00095     if (memcmp(ecmaHdr_p->ecmaHdr.lblID, ecma_VolID_c,
00096             sizeof(ecmaHdr_p->ecmaHdr.lblID)) != 0) {
00097 
00098         log_DBG_m(dbg_NORM, "ECMA volume header not found.");
00099         return;
00100     }
00101 
00102     if (ecmaHdr_p->ecmaHdr.number == 0) {
00103         log_DBG_m(dbg_NORM, "ECMA volume number can't be 0.");
00104         return;
00105     }
00106     a_ecmaVolHdr_p = ecmaHdr_p;
00107 
00108     // Try to detect IVD volume header
00109     log_DBG_m(dbg_NORM, "Detecting HSM volume header.");
00110     if (ecmaHdr_p->ecmaHdr.number == 1) {
00111         if (ecmaHdr_p->first.lblStdVer != ecma_LblStdVer_c) {
00112             log_DBG_m(dbg_NORM, "ECMA version not correct: " +
00113                 cmn_Num2Str(ecmaHdr_p->first.lblStdVer));
00114             return;
00115         }
00116 
00117         string implIdShort(df_recCookie_c);
00118         string implOnHdrShort((char*)(ecmaHdr_p->first.implID), implIdShort.length());
00119         string implOnHdr((char*)(ecmaHdr_p->first.implID), ecma_ImplID_c.length());
00120         
00121         log_DBG_m(dbg_LOW, "ECMA implementation ID: " << implOnHdr);
00122         
00123         // Detect the data format type by checking the first part of the
00124         // Implementation ID
00125         if (implOnHdrShort != implIdShort) {
00126             log_DBG_m(dbg_NORM, "Invalid ECMA ImplID: " + implOnHdr);
00127             return;
00128         }
00129         else if (implOnHdr != ecma_ImplID_c) {
00130             // Compare the version part as well.
00131             log_DBG_m(dbg_LOW,
00132                 "Detected a volume with different data format version than " <<
00133                 ecma_ImplID_c);
00134         }
00135         
00136         // TODO: Use ecmaHdr_p->first.volID??
00137     }
00138 
00139     log_DBG_m(dbg_NORM, "Detecting HSM df_RecCmn_t.");
00140 
00141     df_RecCmn_t *recCmn_p =
00142         reinterpret_cast<df_RecCmn_t*>(a_volHdrBlock_p + sizeof(*ecmaHdr_p));
00143 
00144     if (!IsRecordCookie(recCmn_p->magicCookie)) {
00145         log_DBG_m(dbg_NORM, "Record magic cookie not found.");
00146         return;
00147     }
00148 
00149     if (recCmn_p->type != rec_VolHdr_c) {
00150         throw ivd_DFError(
00151             ie_DF_HDRCORRUPT, 0,
00152             "Detected HSM common record, but type is not rec_VolHdr_c.");
00153     }
00154 
00155     log_DBG_m(dbg_NORM, "Detected HSM df_RecVolHdr_t.");
00156 
00157     df_RecVolHdr_t *ivdHdr_p = 
00158         reinterpret_cast<df_RecVolHdr_t*>(
00159           a_volHdrBlock_p + sizeof(*ecmaHdr_p) + sizeof(*recCmn_p));
00160 
00161     a_ivdVolHdr_p = ivdHdr_p;
00162 }

Here is the call graph for this function:

Here is the caller graph for this function:

df_BlockHeader_t * df_BlockScanner::SetBlock ( UInt8_t a_buf  ) 

Set current block.

Returns NULL if raw block. This method performs the following checks:

  • block magic cookie (unless the block is raw)
  • block sequence number

Definition at line 170 of file df_scanner.cpp.

References df_BlockHeader_t::blkCookie, cmn_Num2Str(), dbg_DETAIL, df_BF_CONTINUED, df_BlockHeader_t::flags, ie_DF_INV_BLK, ie_DF_INVBLKCOOKIE, ie_DF_INVBLKSEQNUM, IsBlockCookie(), log_DBG_m, log_FUNC_m, m_blkNum, m_blkSize, m_blkType, m_curBlock, m_curBlockPos, m_curBlockUsed, m_prevRec, m_recNum, m_streamLeft, ntoh(), NULL, rec_Data_c, df_BlockHeader_t::seqNum, df_BlockHeader_t::type, and df_BlockHeader_t::used.

Referenced by df_FRI::BlockScan(), df_Unpacker::GetNextBlock(), and ParseBlock().

00170                                                           {
00171 
00172     log_FUNC_m(SetBlock);
00173 
00174     m_curBlock      = a_buf;
00175     m_curBlockPos   = 0;
00176 
00177     // if RAW block
00178     if (m_streamLeft >= m_blkSize) {
00179         m_curBlockUsed  = 0;
00180 
00181         log_DBG_m(dbg_DETAIL, "RAW block: blkNum=" << m_blkNum);
00182         m_blkNum++; // RAW block does not have seqNum, but it is counted
00183         m_prevRec = rec_Data_c;     // mark that we read data
00184 
00185         m_streamLeft   -= m_blkSize; // RAW block is always full of stream data
00186 
00187         return NULL;
00188     }
00189 
00190     df_BlockHeader_t *blkHdr_p = 
00191         reinterpret_cast<df_BlockHeader_t*>(m_curBlock);
00192  
00193     if (!IsBlockCookie(blkHdr_p->blkCookie)) {
00194         throw ivd_DFError(
00195             ie_DF_INVBLKCOOKIE, 0,
00196             "Got=" + string((char*)blkHdr_p->blkCookie, 
00197                              sizeof(blkHdr_p->blkCookie)));
00198     }
00199 
00200     if (blkHdr_p->type != m_blkType) {
00201         throw ivd_DFError(
00202             ie_DF_INV_BLK, 0,
00203             "Invalid block type \"" + 
00204             string((char*)&blkHdr_p->type, sizeof(blkHdr_p->type)) +
00205             "\" - expected \"" + 
00206             string((char*)&m_blkType, sizeof(m_blkType)) + "\"");
00207     }
00208 
00209     // Check that current block number matches
00210     UInt32_t curBlkNum = ntoh(blkHdr_p->seqNum); 
00211 
00212 
00213     // if this is first block we got (or continuation)- set blkNum appropriately
00214     UInt32_t blkFlags = ntoh(blkHdr_p->flags);
00215     if (!m_blkNum || (blkFlags & df_BF_CONTINUED)) {
00216         m_blkNum = curBlkNum;
00217     } 
00218 
00219     // if this is first block from new stream - restart counting
00220     if (curBlkNum == 1) {
00221         m_blkNum = 1;
00222         m_recNum = 1;
00223     }
00224 
00225     if (curBlkNum != m_blkNum) {
00226         throw ivd_DFError(
00227             ie_DF_INVBLKSEQNUM, 0,
00228             "Got=" + cmn_Num2Str(curBlkNum) + 
00229             ", expected=" + cmn_Num2Str(m_blkNum));
00230     }
00231 
00232     m_curBlockUsed = ntoh(blkHdr_p->used);
00233 
00234     // if first record position is above block used size -> very strange! 
00235     if (m_curBlockUsed > m_blkSize) {
00236         throw ivd_DFError(
00237             ie_DF_INV_BLK, 0,
00238             "Block Used=" + cmn_Num2Str(m_curBlockUsed) +
00239             " larger than specified Block Size=" + 
00240             cmn_Num2Str(m_blkSize));
00241     }
00242 
00243     // if first record position is above block used size -> very strange! 
00244     if (sizeof(df_BlockHeader_t) > m_curBlockUsed) {
00245         throw ivd_DFError(
00246             ie_DF_INV_BLK, 0,
00247             "Block Used=" + cmn_Num2Str(m_curBlockUsed) +
00248             ", First Rec=" + 
00249             cmn_Num2Str(sizeof(df_BlockHeader_t)));
00250     }
00251 
00252     log_DBG_m(dbg_DETAIL, "HSM block: blkNum=" << m_blkNum << " flags=" << 
00253               cmn_Num2Str(blkFlags, true));
00254 
00255     m_blkNum++;
00256     m_curBlockPos = sizeof(df_BlockHeader_t); // TODO: align to record boundary
00257 
00258     return blkHdr_p;
00259 }

Here is the call graph for this function:

Here is the caller graph for this function:

df_RecCmn_t * df_BlockScanner::GetNextRecord (  ) 

Get next record in current block - returns NULL if no more records This method performs the following checks:

  • record magic cookie
  • record sequence number
  • record type sequence (records in correct order).

For BSSt, we need to save stream size in order to count how many bytes to stream end (decreased by EDta record and RAW block)

Definition at line 269 of file df_scanner.cpp.

References blk_FRI_c, cmn_Num2Str(), df_RecEmbeddedData_t::data, dbg_NORM, df_IsValidPredecessor(), df_RF_CONTINUED, df_RF_SPLITTED, df_ST_ALTDATA, df_RecCmn_t::flags, df_RecFile_t::idFile, df_RecFile_t::idMig, ie_DF_INV_BLK, ie_DF_INVRECCOOKIE, ie_DF_INVRECSEQNUM, ie_DF_INVSEQ, ie_DF_INVSTREAMFMT, IsRecordCookie(), ivd_Error, log_DBG_m, log_ERR_m, log_FUNC_m, log_MARKLINE_m, m_blkType, m_curBlock, m_curBlockPos, m_curBlockUsed, m_prevRec, m_recNum, m_streamLeft, m_streamName, m_streamType, df_RecCmn_t::magicCookie, ntoh(), NULL, rec_BSEnd_c, rec_BSStart_c, rec_EmbData_c, rec_FileHdr_c, rec_NoRec_c, df_RecCmn_t::seqNum, df_RecCmn_t::size, ivd_VarData_t::size, df_RecByteStreamStart_t::streamOffset, df_RecByteStreamStart_t::streamSize, df_RecByteStreamStart_t::streamSplitSize, df_RecByteStreamEnd_t::streamType, df_RecEmbeddedData_t::streamType, df_RecByteStreamStart_t::streamType, and df_RecCmn_t::type.

Referenced by df_FRI::BlockScan(), df_Unpacker::GetNextRecord(), and ParseBlock().

00269                                             {
00270 
00271     log_FUNC_m(GetNextRecord);
00272 
00273     // check if there are more records in the block
00274     if (m_curBlockPos == m_curBlockUsed) {
00275         return NULL;
00276     }
00277 
00278     df_RecCmn_t *recCmn_p = 
00279         reinterpret_cast<df_RecCmn_t*>(m_curBlock + m_curBlockPos);
00280 
00281     if (!IsRecordCookie(recCmn_p->magicCookie)) {
00282         throw ivd_Error(
00283             ie_DF_INVRECCOOKIE, 
00284             "Got=" + string((char*)recCmn_p->magicCookie,
00285                             sizeof(recCmn_p->magicCookie)));
00286     }
00287 
00288 
00289     // if this is first record (or continuation)- set recNum appropriately
00290     UInt32_t recFlags = ntoh(recCmn_p->flags);
00291     UInt32_t recNum   = ntoh(recCmn_p->seqNum);
00292     if (m_recNum == 0 || (recFlags & df_RF_CONTINUED)) {
00293         m_recNum = recNum;
00294         m_prevRec = rec_NoRec_c;
00295     }
00296     else if (recNum == 1) {
00297         // Beginning of new migration/FRI section
00298         m_recNum = recNum;
00299         m_prevRec = rec_NoRec_c;
00300     }
00301 
00302     if (recNum != m_recNum) {
00303         log_MARKLINE_m;
00304         throw ivd_DFError(
00305             ie_DF_INVRECSEQNUM, 0,
00306             "Got=" + cmn_Num2Str(recNum) + 
00307             ", expected=" + cmn_Num2Str(m_recNum));
00308     }
00309 
00310     if (m_prevRec != rec_NoRec_c
00311         && !df_IsValidPredecessor(m_blkType, m_prevRec, recCmn_p->type)) {
00312         string prevStr = string((char*)(&m_prevRec), sizeof(m_prevRec));
00313 
00314         string curStr =
00315             (recCmn_p->type == rec_NoRec_c)
00316             ? string("NULL REC")
00317             : string((char*)(&recCmn_p->type), sizeof(recCmn_p->type));
00318 
00319         throw ivd_DFError(ie_DF_INVSEQ, 0,
00320             "Record " + prevStr + " can't be followed by " + curStr);
00321     }
00322 
00327     if (recCmn_p->type == rec_BSStart_c) {
00328         if (m_streamType != 0) {
00329             throw ivd_DFError(ie_DF_INVSTREAMFMT, 0,
00330                               "BSStart, previous stream not complete:" 
00331                               " strType=" + cmn_Num2Str(m_streamType) + 
00332                               ", strName=" + m_streamName +
00333                               ", strLeft=" + cmn_Num2Str(m_streamLeft));
00334         }
00335 
00336         df_RecByteStreamStart_t *bss_p =
00337             reinterpret_cast<df_RecByteStreamStart_t*>(m_curBlock + 
00338                                                        m_curBlockPos +
00339                                                        sizeof(df_RecCmn_t));
00340 
00341         m_streamType = ntoh(bss_p->streamType);
00342         
00343         UInt64_t streamSize = ntoh(bss_p->streamSize);
00344         UInt64_t streamOffset = ntoh(bss_p->streamOffset);
00345         UInt64_t streamSplitSize = ntoh(bss_p->streamSplitSize);
00346 
00347         log_DBG_m(dbg_NORM, "StreamSize      : " << streamSize);
00348         log_DBG_m(dbg_NORM, "StreamOffset    : " << streamOffset);
00349         log_DBG_m(dbg_NORM, "StreamSplitSize : " << streamSplitSize);
00350         
00351         m_streamLeft = streamSize - streamOffset;
00352         
00353         if (  streamSplitSize > 0
00354            || ntoh(recCmn_p->flags) & df_RF_SPLITTED) {
00355             if (m_streamLeft < streamSplitSize) {
00356                 log_ERR_m(
00357                     "StreamSplitSize > (StreamSize - StreamOffset): " <<
00358                     "Possible internal error!!");
00359             }
00360             
00361             m_streamLeft = streamSplitSize;
00362         }
00363         if (    m_blkType == blk_FRI_c
00364             && m_streamType == df_ST_ALTDATA) {
00365 
00366             log_DBG_m(dbg_NORM, "ADS in FRI. Only name is stored in FRI.");
00367             m_streamLeft = 0;
00368         }
00369 
00370         log_DBG_m(dbg_NORM, "StreamLeft : " << m_streamLeft);
00371 
00372         if (m_streamType == 0) {
00373             throw ivd_DFError(ie_DF_INVSTREAMFMT, 0,
00374                               "BSStart, but invalid streamType:" 
00375                               " strType=" + cmn_Num2Str(m_streamType) + 
00376                               ", strName=" + m_streamName +
00377                               ", strLeft=" + cmn_Num2Str(m_streamLeft));
00378         }
00379 
00380     }
00381     else if (recCmn_p->type == rec_EmbData_c) {
00382         df_RecEmbeddedData_t *eData_p =
00383             reinterpret_cast<df_RecEmbeddedData_t*>(m_curBlock +
00384                                                     m_curBlockPos +
00385                                                     sizeof(df_RecCmn_t));
00386 
00387         if (m_streamType != 0) {
00388             if (ntoh(eData_p->streamType) != m_streamType) {
00389                 throw ivd_DFError(ie_DF_INVSTREAMFMT, 0,
00390                                   "EDta, but not from current stream:" 
00391                                   " strType=" + cmn_Num2Str(m_streamType) + 
00392                                   ", strName=" + m_streamName +
00393                                   ", strLeft=" + cmn_Num2Str(m_streamLeft));
00394             }
00395             UInt32_t embSize = ntoh(eData_p->data.size);
00396             if (embSize == 0 || embSize > m_streamLeft) {
00397                 throw ivd_DFError(ie_DF_INVSTREAMFMT, 0,
00398                                   "EDta - less/more embedded than expected:" 
00399                                   " embSize=" + cmn_Num2Str(embSize) + 
00400                                   ", strLeft=" + cmn_Num2Str(m_streamLeft));
00401             }
00402 
00403             m_streamLeft -= embSize;
00404         }
00405 
00406     }
00407     else if (recCmn_p->type == rec_BSEnd_c) {
00408         df_RecByteStreamEnd_t *bse_p =
00409             reinterpret_cast<df_RecByteStreamEnd_t*>(m_curBlock +
00410                                                      m_curBlockPos +
00411                                                      sizeof(df_RecCmn_t));
00412 
00413         if (m_streamType != 0) {
00414             if (ntoh(bse_p->streamType) != m_streamType) {
00415                 throw ivd_DFError(ie_DF_INVSTREAMFMT, 0,
00416                                   "BSEnd, but not from current stream:" 
00417                                   " strType=" + cmn_Num2Str(m_streamType) + 
00418                                   ", strName=" + m_streamName +
00419                                   ", strLeft=" + cmn_Num2Str(m_streamLeft));
00420             }
00421             if (m_streamLeft > 0) {
00422                 throw ivd_DFError(ie_DF_INVSTREAMFMT, 0,
00423                                   "BSEnd, but we expect more data:" 
00424                                   " strLeft=" + cmn_Num2Str(m_streamLeft));
00425             }
00426 
00427             m_streamType = 0;
00428             m_streamName = string("");
00429         }
00430     }
00431     else if (recCmn_p->type == rec_FileHdr_c) {
00432         df_RecFile_t *fh_p =
00433             reinterpret_cast<df_RecFile_t*>(
00434                 m_curBlock + m_curBlockPos + sizeof(df_RecCmn_t));
00435 
00436         ivd_MigrationID migID(ntoh(fh_p->idMig));
00437         log_DBG_m(dbg_NORM,
00438             "Start of file ID: " << ntoh(fh_p->idFile) <<
00439             ", migID" << migID);
00440     }
00441 
00442 
00443     UInt32_t recSize= ntoh(recCmn_p->size);
00444     // if next record position is above blocke used size -> very strange! 
00445     if (m_curBlockPos + recSize > m_curBlockUsed) {
00446         throw ivd_DFError(ie_DF_INV_BLK, 0,
00447                           "Block Used=" + cmn_Num2Str(m_curBlockUsed) +
00448                           ", Record End=" + cmn_Num2Str(m_curBlockPos
00449                                                         + recSize));
00450     }
00451 
00452     m_recNum++;
00453     m_prevRec = recCmn_p->type;
00454     m_curBlockPos += recSize; // TODO: align to record boundary 
00455 
00456     return recCmn_p;
00457 }

Here is the call graph for this function:

Here is the caller graph for this function:

UInt8_t * df_BlockScanner::GetPosition (  )  const

Get pointer to current position in block - useful in case of error.

Definition at line 460 of file df_scanner.cpp.

References m_curBlock, and m_curBlockPos.

Referenced by ParseBlock().

00460                                    {
00461     return (UInt8_t*)(m_curBlock + m_curBlockPos);
00462 }

Here is the caller graph for this function:

UInt32_t df_BlockScanner::GetBlockLeft (  )  const

Get number of bytes left to the end of block (from current position).

Definition at line 465 of file df_scanner.cpp.

References m_blkSize, and m_curBlockPos.

Referenced by ParseBlock().

00465                                     {
00466     return (m_blkSize - m_curBlockPos);
00467 }

Here is the caller graph for this function:

void df_BlockScanner::Reset (  ) 

Reset sequence counters and start from beginning.

Definition at line 470 of file df_scanner.cpp.

References m_blkNum, m_curBlock, m_curBlockPos, m_curBlockUsed, m_prevRec, m_recNum, m_streamLeft, m_streamName, m_streamType, NULL, and rec_NoRec_c.

Referenced by df_FRI::MediumVolumeStart(), and ParseBlock().

00470                        {
00471 
00472     // reset block - caller need to call SetBlock again
00473     m_curBlock      = NULL;
00474     m_curBlockPos   = 0;
00475     m_curBlockUsed  = 0;
00476 
00477     // reset sequence numbers
00478     m_blkNum        = 0;
00479     m_recNum        = 0;
00480 
00481     // reset info about previous record and stream
00482     m_prevRec       = rec_NoRec_c;
00483     m_streamType    = 0;
00484     m_streamName    = "";
00485     m_streamLeft    = 0; 
00486 }

Here is the caller graph for this function:

UInt32_t df_BlockScanner::GetNextBlkNum (  )  const [inline]

Definition at line 763 of file df.h.

Referenced by df_FRI::MediumVolumeStart().

00763 { return m_blkNum; }

Here is the caller graph for this function:

UInt32_t df_BlockScanner::GetNextRecNum (  )  const [inline]

Definition at line 764 of file df.h.

Referenced by df_FRI::MediumVolumeStart().

00764 { return m_recNum; }

Here is the caller graph for this function:

UInt64_t df_BlockScanner::GetStreamLeft (  )  const [inline]

Definition at line 765 of file df.h.

Referenced by df_FRI::MediumVolumeStart().

00765 { return m_streamLeft; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 770 of file df.h.

Referenced by GetNextRecord(), and SetBlock().

Definition at line 771 of file df.h.

Referenced by GetBlockLeft(), and SetBlock().

Definition at line 772 of file df.h.

Referenced by GetNextRecord(), GetPosition(), Reset(), and SetBlock().

Definition at line 773 of file df.h.

Referenced by GetBlockLeft(), GetNextRecord(), GetPosition(), Reset(), and SetBlock().

Definition at line 774 of file df.h.

Referenced by GetNextRecord(), Reset(), and SetBlock().

Current block number.

Warning:
Raw data blocks are not marked but they are counted.

Definition at line 780 of file df.h.

Referenced by Reset(), and SetBlock().

Current record number & previous record type (for sequence checks).

Definition at line 785 of file df.h.

Referenced by GetNextRecord(), Reset(), and SetBlock().

Definition at line 786 of file df.h.

Referenced by GetNextRecord(), Reset(), and SetBlock().

Current stream info - used for handling RAW blocks.

Definition at line 791 of file df.h.

Referenced by GetNextRecord(), and Reset().

string df_BlockScanner::m_streamName [protected]

Definition at line 792 of file df.h.

Referenced by GetNextRecord(), and Reset().

Definition at line 793 of file df.h.

Referenced by GetNextRecord(), Reset(), and SetBlock().

Definition at line 796 of file df.h.


The documentation for this class was generated from the following files:

Generated on Mon Feb 27 19:11:49 2012 for OPENARCHIVE by  doxygen 1.5.6