Public Member Functions | Private Attributes

cdb_Read Class Reference
[SCSI Library]

SCSI read command. More...

#include <cdb.h>

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

List of all members.

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

Detailed Description

SCSI read command.

Definition at line 371 of file cdb.h.


Constructor & Destructor Documentation

cdb_Read::cdb_Read (  ) 

Definition at line 46 of file cdb_read.cpp.

References m_readCmd, and cdb_Read_t::opcode.

    : m_dataPtr(NULL),
      m_dataSize(0) {

    memset (&m_readCmd, 0, sizeof(m_readCmd));
    m_readCmd.opcode = op_READ_6;
}

cdb_Read::cdb_Read ( UInt8_t a_dataPtr,
UInt32_t  a_dataSize 
)

Definition at line 54 of file cdb_read.cpp.

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

    : m_dataPtr(a_dataPtr),
      m_dataSize(a_dataSize) {

    memset (&m_readCmd, 0, sizeof(m_readCmd));
    m_readCmd.opcode = op_READ_6;
    m_readCmd.size = hton24(a_dataSize);
}

Here is the call graph for this function:

cdb_Read::~cdb_Read (  )  [virtual]

Definition at line 63 of file cdb_read.cpp.

                   {
  //void
}


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 83 of file cdb_read.cpp.

References m_dataPtr.

                                          {
    return m_dataPtr;
}

UInt32_t cdb_Read::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 87 of file cdb_read.cpp.

References log_ERR_m, log_FUNC_m, and m_dataSize.

                                       {
    if (m_dataSize == 0) {
        log_FUNC_m(GetBufferSize);
        log_ERR_m("Request for zero bytes SCSI read.");
    }
    return m_dataSize;
}

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

Reimplemented from scsi_CDB.

Definition at line 95 of file cdb_read.cpp.

References m_readCmd.

                                             {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_Read_t*>(&m_readCmd) );
}

UInt32_t cdb_Read::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 100 of file cdb_read.cpp.

References m_readCmd.

                                    {
    return sizeof(m_readCmd);
}

Direction_e cdb_Read::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 104 of file cdb_read.cpp.

                                                 {
    return TRANSFER_IN;
}

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

Definition at line 67 of file cdb_read.cpp.

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

Referenced by bea_TapeVolume::ReadRaw().

                                                                {
    m_dataPtr = a_dataPtr;
    m_dataSize = a_dataSize;
    m_readCmd.size = hton24(a_dataSize);
}

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 73 of file cdb_read.cpp.

References m_readCmd, and cdb_Read_t::sili.

Referenced by ParseTapeMediumVolumeHeader().

                                  {
    if (a_sili) {
        m_readCmd.sili = 1;
    }
    else {
        m_readCmd.sili = 0;
    }
}

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 389 of file cdb.h.

Definition at line 392 of file cdb.h.

Referenced by GetBufferPointer(), and SetBuffer().

Definition at line 393 of file cdb.h.

Referenced by GetBufferSize(), and SetBuffer().

Definition at line 391 of file cdb.h.

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


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