Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes

bea_Drive Class Reference
[IVD Back-End Agent]

#include <bea_drive.h>

Inheritance diagram for bea_Drive:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Definition at line 40 of file bea_drive.h.


Constructor & Destructor Documentation

bea_Drive::bea_Drive (  ) 

Definition at line 50 of file bea_drive.cpp.

References log_FUNC_m.

bea_Drive::~bea_Drive (  )  [virtual]

Definition at line 55 of file bea_drive.cpp.

References log_FUNC_m.


Member Function Documentation

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:

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

Definition at line 95 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().

                                                      {

    log_FUNC_A_m(CreateDrive, "family: " << a_medFamily);

    switch (a_medFamily) {
        case mf_DDS:
        case mf_AIT:
        case mf_LTO:
        case mf_VXA:
        case mf_SAIT:
            return new bea_TapeDrive();
        case mf_DISK:
            return new bea_DiskDrive();
        default:
            log_DBG_m(dbg_LOW, "Yet unknown medium family. Will try bea_TapeDrive().");
            return new bea_TapeDrive();
    }
}

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 65 of file bea_drive.h.

{ return 0; };

UInt64_t bea_Drive::GetJobID (  )  const

Definition at line 70 of file bea_drive.cpp.

References m_medium_ap.

Referenced by bea_TapeDrive::Open().

                                   {
    if (m_medium_ap.get() != NULL) {
        return m_medium_ap->GetJobID();
    }
    else {
        return 0;
    }
}

Here is the caller graph for this function:

bea_Medium * bea_Drive::GetMedium (  )  const
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 string bea_Drive::GetSCSIID (  )  const [inline, virtual]

Reimplemented in bea_TapeDrive.

Definition at line 56 of file bea_drive.h.

{ return ""; };

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

Implemented in bea_DiskDrive, and bea_TapeDrive.

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

Implemented in bea_DiskDrive, and bea_TapeDrive.

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.

void bea_Drive::SetJobID ( UInt64_t  a_jobID  ) 

Definition at line 63 of file bea_drive.cpp.

References log_FUNC_m, and m_medium_ap.

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

                                         {
    log_FUNC_m(SetJobID);
    if (m_medium_ap.get() != NULL) {
        m_medium_ap->SetJobID(a_jobID);
    }
}

Here is the caller graph for this function:

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

Definition at line 84 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().

                                                    {
    log_FUNC_m(SetMedium);

    // Deallocates previous contents
    // and saves pointer to heap-allocated a_medium
    m_medium_ap.reset(a_medium);
}

Here is the caller graph for this function:

bool bea_Drive::WasMediumChanged (  )  const [virtual]

Reimplemented in bea_TapeDrive.

Definition at line 59 of file bea_drive.cpp.

Referenced by bea_MigrationThread::PrepareVolume().

                                       {
    return false;
}

Here is the caller graph for this function:


Member Data Documentation

Reimplemented in bea_DiskDrive, and bea_TapeDrive.

Definition at line 71 of file bea_drive.h.

auto_ptr<bea_Medium> bea_Drive::m_medium_ap [private]

Definition at line 73 of file bea_drive.h.

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


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