#include <cdb.h>


Definition at line 470 of file cdb.h.
Public Member Functions | |
| cdb_LogSense (data_Log &a_log) | |
| virtual | ~cdb_LogSense () |
| virtual const UInt8_t * | GetCmdPointer () const |
| virtual UInt32_t | GetCmdSize () const |
| virtual Direction_e | GetTransferDirection () const |
| virtual UInt8_t * | GetBufferPointer () const |
| virtual UInt32_t | GetBufferSize () const |
| const data_Log & | GetData () const |
Private Attributes | |
| log_CLASSID_m | |
| cdb_LogSense_t | m_logSenseCmd |
| data_Log & | m_data |
| 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 }

| cdb_LogSense::~cdb_LogSense | ( | ) | [virtual] |
| 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 }

| 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().


| 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 }
cdb_LogSense::log_CLASSID_m [private] |
cdb_LogSense_t cdb_LogSense::m_logSenseCmd [private] |
Definition at line 488 of file cdb.h.
Referenced by cdb_LogSense(), GetCmdPointer(), and GetCmdSize().
data_Log& cdb_LogSense::m_data [private] |
Definition at line 489 of file cdb.h.
Referenced by cdb_LogSense(), GetBufferPointer(), GetBufferSize(), and GetData().
1.5.6