Public Member Functions | Private Attributes

cdb_LogSelect Class Reference
[SCSI Library]

SCSI Log Select command. More...

#include <cdb.h>

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

List of all members.

Public Member Functions

 cdb_LogSelect (data_Log &a_log)
virtual ~cdb_LogSelect ()
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_LogSelect_t m_logSelectCmd
data_Logm_data

Detailed Description

SCSI Log Select command.

Definition at line 511 of file cdb.h.


Constructor & Destructor Documentation

cdb_LogSelect::cdb_LogSelect ( data_Log a_log  ) 

Definition at line 47 of file cdb_logselect.cpp.

References dbg_NORM, GetBufferSize(), hton(), log_DBG_m, log_FUNC_m, m_logSelectCmd, cdb_LogSelect_t::opcode, cdb_LogSelect_t::paramLen, and cdb_LogSelect_t::pc.

    : m_data(a_log) {

    log_FUNC_m(cdb_LogSelect);

    memset(&m_logSelectCmd, 0, sizeof(m_logSelectCmd));
    m_logSelectCmd.opcode    = op_LOG_SELECT;

    // Get parameters for CDB from the data

    UInt16_t paramLen = static_cast<UInt16_t>(GetBufferSize());
    m_logSelectCmd.paramLen  = hton(paramLen);

    // 
    // WARNING: page control bits must be set to currunt cumulative
    // values if the parameter length is != 0!!
    // 
    if (paramLen > 0) {
        m_logSelectCmd.pc = data_Log::pc_CURCUMUL;
    };

    log_DBG_m(dbg_NORM, "LOG SELECT: Parameter length: " << paramLen);
}

Here is the call graph for this function:

cdb_LogSelect::~cdb_LogSelect (  )  [virtual]

Definition at line 71 of file cdb_logselect.cpp.

                             {
}


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 74 of file cdb_logselect.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_LogSelect::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 79 of file cdb_logselect.cpp.

References data_Log::GetSize(), and m_data.

Referenced by cdb_LogSelect().

                                            {
    return m_data.GetSize();
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from scsi_CDB.

Definition at line 83 of file cdb_logselect.cpp.

References m_logSelectCmd.

                                                  {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_LogSelect_t*>(&m_logSelectCmd) );
}

UInt32_t cdb_LogSelect::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 88 of file cdb_logselect.cpp.

References m_logSelectCmd.

                                         {
    return sizeof(m_logSelectCmd);
}

const data_Log & cdb_LogSelect::GetData (  )  const

Definition at line 96 of file cdb_logselect.cpp.

References m_data.

                                             {
    return m_data;
}

Direction_e cdb_LogSelect::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 92 of file cdb_logselect.cpp.

                                                      {
    return TRANSFER_OUT;
}


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 527 of file cdb.h.

Definition at line 530 of file cdb.h.

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

Definition at line 529 of file cdb.h.

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


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