bea_Drive Class Reference
[IVD Back-End Agent]

#include <bea_drive.h>

Inheritance diagram for bea_Drive:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 26 of file bea_drive.h.


Public Member Functions

 bea_Drive ()
virtual ~bea_Drive ()
virtual void Open (const string &a_deviceID, const string &a_barcode, UInt64_t a_jobID)=0
virtual void Close ()=0
virtual const string & GetVendorID () const =0
virtual const string & GetProductID () const =0
virtual const string & GetProductRevision () const =0
virtual const string & GetSerialNumber () const =0
virtual string GetSCSIID () const
virtual bool WasMediumChanged () const
void SetJobID (UInt64_t a_jobID)
UInt64_t GetJobID () const
bea_MediumGetMedium () const
virtual UInt64_t GetDefaultSeekThreshold () const

Static Public Member Functions

static bea_DriveCreateDrive (UInt32_t a_medFamily)

Protected Member Functions

void SetMedium (bea_Medium *const a_medium)

Private Attributes

 log_CLASSID_m
auto_ptr< bea_Mediumm_medium_ap

Constructor & Destructor Documentation

bea_Drive::bea_Drive (  ) 

Definition at line 36 of file bea_drive.cpp.

References log_FUNC_m.

00036                      {
00037 
00038     log_FUNC_m(bea_Drive);
00039 }

bea_Drive::~bea_Drive (  )  [virtual]

Definition at line 41 of file bea_drive.cpp.

References log_FUNC_m.

00041                       {
00042     log_FUNC_m(~bea_Drive);
00043 }


Member Function Documentation

virtual void bea_Drive::Open ( const string &  a_deviceID,
const string &  a_barcode,
UInt64_t  a_jobID 
) [pure virtual]

Implemented in bea_DiskDrive, and bea_TapeDrive.

virtual void bea_Drive::Close (  )  [pure virtual]

Implemented in bea_DiskDrive, and bea_TapeDrive.

Referenced by bea_MigrationThread::~bea_MigrationThread(), and bea_RecallThread::~bea_RecallThread().

Here is the caller graph for this function:

virtual const string& bea_Drive::GetVendorID (  )  const [pure virtual]

Implemented in bea_DiskDrive, and bea_TapeDrive.

virtual const string& bea_Drive::GetProductID (  )  const [pure virtual]

Implemented in bea_DiskDrive, and bea_TapeDrive.

virtual const string& bea_Drive::GetProductRevision (  )  const [pure virtual]

Implemented in bea_DiskDrive, and bea_TapeDrive.

virtual const string& bea_Drive::GetSerialNumber (  )  const [pure virtual]

Implemented in bea_DiskDrive, and bea_TapeDrive.

virtual string bea_Drive::GetSCSIID (  )  const [inline, virtual]

Reimplemented in bea_TapeDrive.

Definition at line 42 of file bea_drive.h.

00042 { return ""; };

bool bea_Drive::WasMediumChanged (  )  const [virtual]

Reimplemented in bea_TapeDrive.

Definition at line 45 of file bea_drive.cpp.

Referenced by bea_MigrationThread::PrepareVolume().

00045                                        {
00046     return false;
00047 }

Here is the caller graph for this function:

void bea_Drive::SetJobID ( UInt64_t  a_jobID  ) 

Definition at line 49 of file bea_drive.cpp.

References log_FUNC_m, m_medium_ap, and NULL.

Referenced by bea_TapeDrive::Open(), and bea_DiskDrive::Open().

00049                                          {
00050     log_FUNC_m(SetJobID);
00051     if (m_medium_ap.get() != NULL) {
00052         m_medium_ap->SetJobID(a_jobID);
00053     }
00054 }

Here is the caller graph for this function:

UInt64_t bea_Drive::GetJobID (  )  const

Definition at line 56 of file bea_drive.cpp.

References m_medium_ap, and NULL.

Referenced by bea_TapeDrive::Open().

00056                                    {
00057     if (m_medium_ap.get() != NULL) {
00058         return m_medium_ap->GetJobID();
00059     }
00060     else {
00061         return 0;
00062     }
00063 }

Here is the caller graph for this function:

bea_Medium * bea_Drive::GetMedium (  )  const

bea_Drive * bea_Drive::CreateDrive ( UInt32_t  a_medFamily  )  [static]

Definition at line 81 of file bea_drive.cpp.

References dbg_LOW, log_DBG_m, log_FUNC_A_m, mf_AIT, mf_DDS, mf_DISK, mf_LTO, mf_SAIT, and mf_VXA.

Referenced by i_BackEndAgent_i::UseResources().

00081                                                       {
00082 
00083     log_FUNC_A_m(CreateDrive, "family: " << a_medFamily);
00084 
00085     switch (a_medFamily) {
00086         case mf_DDS:
00087         case mf_AIT:
00088         case mf_LTO:
00089         case mf_VXA:
00090         case mf_SAIT:
00091             return new bea_TapeDrive();
00092         case mf_DISK:
00093             return new bea_DiskDrive();
00094         default:
00095             log_DBG_m(dbg_LOW, "Yet unknown medium family. Will try bea_TapeDrive().");
00096             return new bea_TapeDrive();
00097     }
00098 }

Here is the caller graph for this function:

virtual UInt64_t bea_Drive::GetDefaultSeekThreshold (  )  const [inline, virtual]

Reimplemented in bea_DiskDrive, and bea_TapeDrive.

Definition at line 51 of file bea_drive.h.

00051 { return 0; };

void bea_Drive::SetMedium ( bea_Medium *const   a_medium  )  [protected]

Definition at line 70 of file bea_drive.cpp.

References log_FUNC_m, and m_medium_ap.

Referenced by bea_TapeDrive::Close(), bea_DiskDrive::Close(), bea_TapeDrive::Open(), and bea_DiskDrive::Open().

00070                                                     {
00071     log_FUNC_m(SetMedium);
00072 
00073     // Deallocates previous contents
00074     // and saves pointer to heap-allocated a_medium
00075     m_medium_ap.reset(a_medium);
00076 }

Here is the caller graph for this function:


Member Data Documentation

Reimplemented in bea_DiskDrive, and bea_TapeDrive.

Definition at line 57 of file bea_drive.h.

auto_ptr<bea_Medium> bea_Drive::m_medium_ap [private]

Definition at line 59 of file bea_drive.h.

Referenced by GetJobID(), GetMedium(), SetJobID(), and SetMedium().


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

Generated on Mon Feb 27 18:58:20 2012 for OPENARCHIVE by  doxygen 1.5.6