Public Member Functions | Private Attributes

cdb_ReportDensity Class Reference
[SCSI Library]

Get capacity infor from the medium/tape drive. More...

#include <cdb.h>

Inheritance diagram for cdb_ReportDensity:
Inheritance graph
[legend]
Collaboration diagram for cdb_ReportDensity:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 cdb_ReportDensity (data_Density &a_density, bool a_loadedMedium=true)
virtual ~cdb_ReportDensity ()
virtual const UInt8_tGetCmdPointer () const
virtual UInt32_t GetCmdSize () const
virtual Direction_e GetTransferDirection () const
virtual UInt8_tGetBufferPointer () const
virtual UInt32_t GetBufferSize () const
data_Position GetPosition ()

Private Attributes

 log_CLASSID_m
cdb_ReportDensity_t m_reportDensityCmd
data_Densitym_density

Detailed Description

Get capacity infor from the medium/tape drive.

Definition at line 325 of file cdb.h.


Constructor & Destructor Documentation

cdb_ReportDensity::cdb_ReportDensity ( data_Density a_density,
bool  a_loadedMedium = true 
)

Definition at line 45 of file cdb_reportdensity.cpp.

References cdb_ReportDensity_t::alocLen, dbg_DETAIL, GetBufferSize(), hton(), log_DBG_m, log_FUNC_m, m_reportDensityCmd, cdb_ReportDensity_t::media, cdb_ReportDensity_t::opcode, and size.

    : m_density(a_density) {

    log_FUNC_m(cdb_ReportDensity);

    memset(&m_reportDensityCmd, 0, sizeof(m_reportDensityCmd));
    m_reportDensityCmd.opcode = op_REPORT_DENSITY_SUPPORT;
    if (a_loadedMedium) {
        m_reportDensityCmd.media = 1;
    }
    UInt16_t size = static_cast<UInt16_t>(GetBufferSize());
    log_DBG_m(dbg_DETAIL, "size: " << size << " " << hton(size));
    m_reportDensityCmd.alocLen = hton(size);
}

Here is the call graph for this function:

cdb_ReportDensity::~cdb_ReportDensity (  )  [virtual]

Definition at line 60 of file cdb_reportdensity.cpp.

                                     {
}


Member Function Documentation

UInt8_t * cdb_ReportDensity::GetBufferPointer (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 76 of file cdb_reportdensity.cpp.

References data_Density::GetDensityStruct(), and m_density.

                                                   {
    return reinterpret_cast<UInt8_t*>(
        const_cast<data_ReportDensitySupport_t*>(&(m_density.GetDensityStruct()) ) );
}

Here is the call graph for this function:

UInt32_t cdb_ReportDensity::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 81 of file cdb_reportdensity.cpp.

References data_Density::GetDensityStruct(), and m_density.

Referenced by cdb_ReportDensity().

                                                {
    return sizeof(m_density.GetDensityStruct());
}

Here is the call graph for this function:

Here is the caller graph for this function:

UInt8_t const * cdb_ReportDensity::GetCmdPointer (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 63 of file cdb_reportdensity.cpp.

References m_reportDensityCmd.

                                                      {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_ReportDensity_t*>(&m_reportDensityCmd) );
}

UInt32_t cdb_ReportDensity::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 68 of file cdb_reportdensity.cpp.

References m_reportDensityCmd.

                                             {
    return sizeof(m_reportDensityCmd);
}

data_Position cdb_ReportDensity::GetPosition (  ) 
Direction_e cdb_ReportDensity::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 72 of file cdb_reportdensity.cpp.

                                                          {
    return TRANSFER_IN;
}


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 340 of file cdb.h.

Definition at line 343 of file cdb.h.

Referenced by GetBufferPointer(), and GetBufferSize().

Definition at line 342 of file cdb.h.

Referenced by cdb_ReportDensity(), GetCmdPointer(), and GetCmdSize().


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