Public Member Functions | Private Attributes

cdb_ModeSense Class Reference
[SCSI Library]

SCSI Mode Sense command. More...

#include <cdb.h>

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

List of all members.

Public Member Functions

 cdb_ModeSense (data_Mode &a_mode)
virtual ~cdb_ModeSense ()
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_ModeGetData () const

Private Attributes

 log_CLASSID_m
cdb_ModeSense_t m_modeSenseCmd
data_Modem_data

Detailed Description

SCSI Mode Sense command.

Definition at line 430 of file cdb.h.


Constructor & Destructor Documentation

cdb_ModeSense::cdb_ModeSense ( data_Mode a_mode  ) 

Definition at line 33 of file cdb_modesense.cpp.

References cdb_ModeSense_t::alocLen, cdb_ModeSense_t::dbd, GetBufferSize(), data_Mode::GetPage(), m_data, m_modeSenseCmd, cdb_ModeSense_t::opcode, and cdb_ModeSense_t::page.

    : m_data(a_mode) {

    memset (&m_modeSenseCmd, 0, sizeof(m_modeSenseCmd));
    m_modeSenseCmd.opcode   = op_MODE_SENSE;

    // !!! Do not disable block descriptors !!!
    m_modeSenseCmd.dbd      = 0;
    m_modeSenseCmd.page     = (UInt8_t)(m_data.GetPage());

    m_modeSenseCmd.alocLen = static_cast<UInt8_t>(GetBufferSize());
}

Here is the call graph for this function:

cdb_ModeSense::~cdb_ModeSense (  )  [virtual]

Definition at line 46 of file cdb_modesense.cpp.

                             {
}


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 49 of file cdb_modesense.cpp.

References data_Mode::GetModeStruct(), and m_data.

                                               {
    return reinterpret_cast<UInt8_t*>(
        const_cast<data_Mode_t*>(&(m_data.GetModeStruct())) );
}

Here is the call graph for this function:

UInt32_t cdb_ModeSense::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 54 of file cdb_modesense.cpp.

References data_Mode::GetModeStruct(), and m_data.

Referenced by cdb_ModeSense().

                                            {
    return sizeof(m_data.GetModeStruct());
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from scsi_CDB.

Definition at line 58 of file cdb_modesense.cpp.

References m_modeSenseCmd.

                                                  {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_ModeSense_t*>(&m_modeSenseCmd) );
}

UInt32_t cdb_ModeSense::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 63 of file cdb_modesense.cpp.

References m_modeSenseCmd.

                                         {
    return sizeof(m_modeSenseCmd);
}

const data_Mode & cdb_ModeSense::GetData (  )  const

Definition at line 71 of file cdb_modesense.cpp.

References m_data.

                                              {
    return m_data;
}

Direction_e cdb_ModeSense::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 67 of file cdb_modesense.cpp.

                                                      {
    return TRANSFER_IN;
}


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 446 of file cdb.h.

Definition at line 449 of file cdb.h.

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

Definition at line 448 of file cdb.h.

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


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