cdb_Read Class Reference
[SCSI Library]

#include <cdb.h>

Inheritance diagram for cdb_Read:

Inheritance graph
[legend]
Collaboration diagram for cdb_Read:

Collaboration graph
[legend]

List of all members.


Detailed Description

SCSI read command.

Definition at line 357 of file cdb.h.


Public Member Functions

 cdb_Read ()
 cdb_Read (UInt8_t *a_dataPtr, UInt32_t a_dataSize)
virtual ~cdb_Read ()
void SetBuffer (UInt8_t *a_dataPtr, UInt32_t a_dataSize)
void SetSILI (bool a_sili)
virtual const UInt8_tGetCmdPointer () const
virtual UInt32_t GetCmdSize () const
virtual Direction_e GetTransferDirection () const
virtual UInt8_tGetBufferPointer () const
virtual UInt32_t GetBufferSize () const

Private Attributes

 log_CLASSID_m
cdb_Read_t m_readCmd
UInt8_tm_dataPtr
UInt32_t m_dataSize

Constructor & Destructor Documentation

cdb_Read::cdb_Read (  ) 

Definition at line 32 of file cdb_read.cpp.

References m_readCmd, op_READ_6, and cdb_Read_t::opcode.

00033     : m_dataPtr(NULL),
00034       m_dataSize(0) {
00035 
00036     memset (&m_readCmd, 0, sizeof(m_readCmd));
00037     m_readCmd.opcode = op_READ_6;
00038 }

cdb_Read::cdb_Read ( UInt8_t a_dataPtr,
UInt32_t  a_dataSize 
)

Definition at line 40 of file cdb_read.cpp.

References hton24(), m_readCmd, op_READ_6, cdb_Read_t::opcode, and cdb_Read_t::size.

00041     : m_dataPtr(a_dataPtr),
00042       m_dataSize(a_dataSize) {
00043 
00044     memset (&m_readCmd, 0, sizeof(m_readCmd));
00045     m_readCmd.opcode = op_READ_6;
00046     m_readCmd.size = hton24(a_dataSize);
00047 }

Here is the call graph for this function:

cdb_Read::~cdb_Read (  )  [virtual]

Definition at line 49 of file cdb_read.cpp.

00049                    {
00050   //void
00051 }


Member Function Documentation

void cdb_Read::SetBuffer ( UInt8_t a_dataPtr,
UInt32_t  a_dataSize 
)

Definition at line 53 of file cdb_read.cpp.

References hton24(), m_dataPtr, m_dataSize, m_readCmd, and cdb_Read_t::size.

Referenced by bea_TapeVolume::ReadRaw().

00053                                                                 {
00054     m_dataPtr = a_dataPtr;
00055     m_dataSize = a_dataSize;
00056     m_readCmd.size = hton24(a_dataSize);
00057 }

Here is the call graph for this function:

Here is the caller graph for this function:

void cdb_Read::SetSILI ( bool  a_sili  ) 

Definition at line 59 of file cdb_read.cpp.

References m_readCmd, and cdb_Read_t::sili.

Referenced by ParseTapeMediumVolumeHeader().

00059                                   {
00060     if (a_sili) {
00061         m_readCmd.sili = 1;
00062     }
00063     else {
00064         m_readCmd.sili = 0;
00065     }
00066 }

Here is the caller graph for this function:

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

Reimplemented from scsi_CDB.

Definition at line 81 of file cdb_read.cpp.

References m_readCmd.

00081                                              {
00082     return reinterpret_cast<UInt8_t*>(
00083         const_cast<cdb_Read_t*>(&m_readCmd) );
00084 }

UInt32_t cdb_Read::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 86 of file cdb_read.cpp.

References m_readCmd.

00086                                     {
00087     return sizeof(m_readCmd);
00088 }

Direction_e cdb_Read::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 90 of file cdb_read.cpp.

References TRANSFER_IN.

00090                                                  {
00091     return TRANSFER_IN;
00092 }

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

Reimplemented from scsi_CDB.

Definition at line 69 of file cdb_read.cpp.

References m_dataPtr.

00069                                           {
00070     return m_dataPtr;
00071 }

UInt32_t cdb_Read::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 73 of file cdb_read.cpp.

References log_ERR_m, log_FUNC_m, and m_dataSize.

00073                                        {
00074     if (m_dataSize == 0) {
00075         log_FUNC_m(GetBufferSize);
00076         log_ERR_m("Request for zero bytes SCSI read.");
00077     }
00078     return m_dataSize;
00079 }


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 375 of file cdb.h.

Definition at line 377 of file cdb.h.

Referenced by cdb_Read(), GetCmdPointer(), GetCmdSize(), SetBuffer(), and SetSILI().

Definition at line 378 of file cdb.h.

Referenced by GetBufferPointer(), and SetBuffer().

Definition at line 379 of file cdb.h.

Referenced by GetBufferSize(), and SetBuffer().


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

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