df_TCMMedium_t Struct Reference
[IVD Data format.]

#include <df_types.h>

List of all members.


Detailed Description

name Tape cartridge memory (e.g.

Sony MIC) structures

Definition at line 572 of file df_types.h.


Public Member Functions

 df_TCMMedium_t ()
 serial # of the tape drive
 ~df_TCMMedium_t ()
bool CheckCookie () const
 Check if the magic cookie is valid.
void NetToHost ()
 In-place conversion to host format.
void HostToNet ()
 In-place conversion to net format.
void Erase ()

Public Attributes

UInt8_t magicCookie [df_BLKCOOKIE_SIZE_d]
UInt16_t verMajor
 IVD block magic cookie.
UInt16_t verMinor
 IVD data format version major number.
UInt16_t mediumNoteSize
 IVD data format version minor number.
UInt16_t medVolNoteSize
 Size of the medium note when written to MIC.
UInt32_t loadCount
 Size of medium volume note when written to MIC.
UInt8_t barcode [32]
UInt8_t vendorID [8]
 barcode at the time of format
UInt8_t productID [16]
 vendor ID of the tape drive that did the format
UInt8_t revisionID [4]
 product ID of the tape drive that did the format
UInt8_t serialNumber [128]
 firmware revision of the tape drive

Constructor & Destructor Documentation

df_TCMMedium_t::df_TCMMedium_t (  ) 

serial # of the tape drive

Definition at line 31 of file df_mic.cpp.

References Erase().

00031                                {
00032     Erase();
00033 }

Here is the call graph for this function:

df_TCMMedium_t::~df_TCMMedium_t (  )  [inline]

Definition at line 588 of file df_types.h.

00588                       {
00589     };  // data size 208


Member Function Documentation

bool df_TCMMedium_t::CheckCookie (  )  const

Check if the magic cookie is valid.

Returns:
true if the cookie is valid.

Definition at line 35 of file df_mic.cpp.

References df_blkCookie_c, df_BLKCOOKIE_SIZE_d, log_FUNC_m, and magicCookie.

Referenced by bea_MediumMemory::IsValid().

00035                                        {
00036     log_FUNC_m(CheckCookie);
00037     if (memcmp(this->magicCookie, df_blkCookie_c, df_BLKCOOKIE_SIZE_d) != 0) {
00038         return false;
00039     }
00040     else {
00041         return true;
00042     }
00043 }

Here is the caller graph for this function:

void df_TCMMedium_t::NetToHost (  ) 

In-place conversion to host format.

Definition at line 49 of file df_mic.cpp.

References loadCount, and ntoh().

Referenced by bea_MediumMemory::GetMediumRecord().

00049                                {
00050     this->loadCount = ntoh(loadCount);
00051 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_TCMMedium_t::HostToNet (  ) 

In-place conversion to net format.

Definition at line 45 of file df_mic.cpp.

References hton(), and loadCount.

Referenced by Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().

00045                                {
00046     this->loadCount = hton(loadCount);
00047 }

Here is the call graph for this function:

Here is the caller graph for this function:

void df_TCMMedium_t::Erase (  ) 

Definition at line 53 of file df_mic.cpp.

References df_blkCookie_c, df_verMaj_c, df_verMin_c, magicCookie, mediumNoteSize, medVolNoteSize, verMajor, and verMinor.

Referenced by bea_MediumMemory::ClearRecords(), and df_TCMMedium_t().

00053                            {
00054     memset(this, 0, sizeof(*this));
00055 
00056     memcpy(&(this->verMajor), df_verMaj_c, sizeof(this->verMajor));
00057     memcpy(&(this->verMinor), df_verMin_c, sizeof(this->verMinor));
00058     memcpy(this->magicCookie, df_blkCookie_c, sizeof(this->magicCookie));
00059     
00060     this->mediumNoteSize = sizeof(df_TCMMedium_t);
00061     this->medVolNoteSize = sizeof(df_TCMMediaVolume_t);
00062 }

Here is the caller graph for this function:


Member Data Documentation

UInt8_t df_TCMMedium_t::magicCookie[df_BLKCOOKIE_SIZE_d]

Definition at line 573 of file df_types.h.

Referenced by CheckCookie(), and Erase().

IVD block magic cookie.

Definition at line 574 of file df_types.h.

Referenced by Erase(), Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().

IVD data format version major number.

Definition at line 575 of file df_types.h.

Referenced by Erase(), Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().

IVD data format version minor number.

Definition at line 577 of file df_types.h.

Referenced by Erase(), bea_MediumMemory::IsValid(), Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().

Size of the medium note when written to MIC.

Definition at line 578 of file df_types.h.

Referenced by Erase(), Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().

Size of medium volume note when written to MIC.

Definition at line 580 of file df_types.h.

Referenced by bea_TapeMedium::Format(), HostToNet(), bea_MediumMemory::IncLoadCount(), Mamwmedinfo(), NetToHost(), and bea_MediumMemory::UpdateMediumRecord().

barcode at the time of format

Definition at line 582 of file df_types.h.

Referenced by bea_TapeMedium::Format(), Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().

vendor ID of the tape drive that did the format

Definition at line 583 of file df_types.h.

Referenced by bea_TapeMedium::Format(), Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().

product ID of the tape drive that did the format

Definition at line 584 of file df_types.h.

Referenced by bea_TapeMedium::Format(), and bea_MediumMemory::UpdateMediumRecord().

firmware revision of the tape drive

Definition at line 585 of file df_types.h.

Referenced by bea_TapeMedium::Format(), Mamwmedinfo(), and bea_MediumMemory::UpdateMediumRecord().


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

Generated on Mon Feb 27 19:13:47 2012 for OPENARCHIVE by  doxygen 1.5.6