cdb_LogSense Class Reference
[SCSI Library]

#include <cdb.h>

Inheritance diagram for cdb_LogSense:

Inheritance graph
[legend]
Collaboration diagram for cdb_LogSense:

Collaboration graph
[legend]

List of all members.


Detailed Description

SCSI Log Sense command.

Definition at line 470 of file cdb.h.


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

Constructor & Destructor Documentation

cdb_LogSense::cdb_LogSense ( data_Log a_log  ) 

Definition at line 19 of file cdb_logsense.cpp.

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

00020     : m_data(a_log) {
00021 
00022     memset(&m_logSenseCmd, 0, sizeof(m_logSenseCmd));
00023     m_logSenseCmd.opcode    = op_LOG_SENSE;
00024 
00025     // Get parameters for CDB from the data
00026     m_logSenseCmd.page      = (UInt8_t)(m_data.GetPage());
00027     m_logSenseCmd.paramPtr  = hton(m_data.GetParam());
00028     m_logSenseCmd.alocLen   = hton(
00029         static_cast<UInt16_t>(GetBufferSize()) );
00030 
00031     if (a_log.GetPage() == data_Log::pg_TAPECAP) {
00032         // Get current cumulative values for tape capacity page.
00033         // Standard specifies that this values should be used to get
00034         // proper information, but some drives ignore this and return
00035         // the same info for any value specified.
00036         m_logSenseCmd.pc = data_Log::pc_CURCUMUL;
00037     }
00038 }

Here is the call graph for this function:

cdb_LogSense::~cdb_LogSense (  )  [virtual]

Definition at line 40 of file cdb_logsense.cpp.

00040                            {
00041 }


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 52 of file cdb_logsense.cpp.

References m_logSenseCmd.

00052                                                  {
00053     return reinterpret_cast<UInt8_t*>(
00054         const_cast<cdb_LogSense_t*>(&m_logSenseCmd) );
00055 }

UInt32_t cdb_LogSense::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 57 of file cdb_logsense.cpp.

References m_logSenseCmd.

00057                                         {
00058     return sizeof(m_logSenseCmd);
00059 }

Direction_e cdb_LogSense::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 61 of file cdb_logsense.cpp.

References TRANSFER_IN.

00061                                                      {
00062     return TRANSFER_IN;
00063 }

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

Reimplemented from scsi_CDB.

Definition at line 43 of file cdb_logsense.cpp.

References data_Log::GetLogStruct(), and m_data.

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

Here is the call graph for this function:

UInt32_t cdb_LogSense::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 48 of file cdb_logsense.cpp.

References data_Log::GetSize(), and m_data.

Referenced by cdb_LogSense().

00048                                            {
00049     return m_data.GetSize();
00050 }

Here is the call graph for this function:

Here is the caller graph for this function:

const data_Log & cdb_LogSense::GetData (  )  const

Definition at line 65 of file cdb_logsense.cpp.

References m_data.

00065                                             {
00066     return m_data;
00067 }


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 486 of file cdb.h.

Definition at line 488 of file cdb.h.

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

Definition at line 489 of file cdb.h.

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


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

Generated on Mon Feb 27 19:02:26 2012 for OPENARCHIVE by  doxygen 1.5.6