Public Member Functions | Private Attributes

cdb_LogSense Class Reference
[SCSI Library]

SCSI Log Sense command. More...

#include <cdb.h>

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

List of all members.

Public Member Functions

 cdb_LogSense (data_Log &a_log)
virtual ~cdb_LogSense ()
virtual const UInt8_tGetCmdPointer () const
virtual UInt32_t GetCmdSize () const
virtual Direction_e GetTransferDirection () const
virtual UInt8_tGetBufferPointer () const
virtual UInt32_t GetBufferSize () const
const data_LogGetData () const

Private Attributes

 log_CLASSID_m
cdb_LogSense_t m_logSenseCmd
data_Logm_data

Detailed Description

SCSI Log Sense command.

Definition at line 484 of file cdb.h.


Constructor & Destructor Documentation

cdb_LogSense::cdb_LogSense ( data_Log a_log  ) 

Definition at line 33 of file cdb_logsense.cpp.

References cdb_LogSense_t::alocLen, GetBufferSize(), data_Log::GetPage(), data_Log::GetParam(), hton(), m_data, m_logSenseCmd, cdb_LogSense_t::opcode, cdb_LogSense_t::page, cdb_LogSense_t::paramPtr, and cdb_LogSense_t::pc.

    : m_data(a_log) {

    memset(&m_logSenseCmd, 0, sizeof(m_logSenseCmd));
    m_logSenseCmd.opcode    = op_LOG_SENSE;

    // Get parameters for CDB from the data
    m_logSenseCmd.page      = (UInt8_t)(m_data.GetPage());
    m_logSenseCmd.paramPtr  = hton(m_data.GetParam());
    m_logSenseCmd.alocLen   = hton(
        static_cast<UInt16_t>(GetBufferSize()) );

    if (a_log.GetPage() == data_Log::pg_TAPECAP) {
        // Get current cumulative values for tape capacity page.
        // Standard specifies that this values should be used to get
        // proper information, but some drives ignore this and return
        // the same info for any value specified.
        m_logSenseCmd.pc = data_Log::pc_CURCUMUL;
    }
}

Here is the call graph for this function:

cdb_LogSense::~cdb_LogSense (  )  [virtual]

Definition at line 54 of file cdb_logsense.cpp.

                           {
}


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 57 of file cdb_logsense.cpp.

References data_Log::GetLogStruct(), and m_data.

                                              {
    return reinterpret_cast<UInt8_t*>(
        const_cast<data_Log_t*>(&(m_data.GetLogStruct())) );
}

Here is the call graph for this function:

UInt32_t cdb_LogSense::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 62 of file cdb_logsense.cpp.

References data_Log::GetSize(), and m_data.

Referenced by cdb_LogSense().

                                           {
    return m_data.GetSize();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from scsi_CDB.

Definition at line 66 of file cdb_logsense.cpp.

References m_logSenseCmd.

                                                 {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_LogSense_t*>(&m_logSenseCmd) );
}

UInt32_t cdb_LogSense::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 71 of file cdb_logsense.cpp.

References m_logSenseCmd.

                                        {
    return sizeof(m_logSenseCmd);
}

const data_Log & cdb_LogSense::GetData (  )  const

Definition at line 79 of file cdb_logsense.cpp.

References m_data.

                                            {
    return m_data;
}

Direction_e cdb_LogSense::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 75 of file cdb_logsense.cpp.

                                                     {
    return TRANSFER_IN;
}


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 500 of file cdb.h.

Definition at line 503 of file cdb.h.

Referenced by cdb_LogSense(), GetBufferPointer(), GetBufferSize(), and GetData().

Definition at line 502 of file cdb.h.

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


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