Public Member Functions | Private Attributes

cdb_Locate Class Reference
[SCSI Library]

SCSI command for positioning (also used to change partition). More...

#include <cdb.h>

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

List of all members.

Public Member Functions

 cdb_Locate ()
 cdb_Locate (UInt32_t a_blockNumber, UInt32_t a_partitionNumber)
 cdb_Locate (UInt32_t a_blockNumber)
virtual ~cdb_Locate ()
void SetBlockNum (UInt32_t a_blkNum)
void SetPartitionNum (UInt8_t a_partNum)
virtual const UInt8_tGetCmdPointer () const
virtual UInt32_t GetCmdSize () const
virtual Direction_e GetTransferDirection () const

Private Attributes

 log_CLASSID_m
cdb_Locate_t m_locateCmd

Detailed Description

SCSI command for positioning (also used to change partition).

Definition at line 223 of file cdb.h.


Constructor & Destructor Documentation

cdb_Locate::cdb_Locate (  ) 

Definition at line 32 of file cdb_locate.cpp.

References m_locateCmd, and cdb_Locate_t::opcode.

                       {
    memset (&m_locateCmd, 0, sizeof(m_locateCmd));
    m_locateCmd.opcode = op_LOCATE;
}

cdb_Locate::cdb_Locate ( UInt32_t  a_blockNumber,
UInt32_t  a_partitionNumber 
)

Definition at line 37 of file cdb_locate.cpp.

References cdb_Locate_t::addr, cdb_Locate_t::changePartition, hton(), m_locateCmd, cdb_Locate_t::opcode, and cdb_Locate_t::partition.

                                                                         {
    memset (&m_locateCmd, 0, sizeof(m_locateCmd));
    m_locateCmd.opcode = op_LOCATE;

    m_locateCmd.changePartition = 1;
    m_locateCmd.partition = a_partitionNumber;
    m_locateCmd.addr = hton(a_blockNumber);
}

Here is the call graph for this function:

cdb_Locate::cdb_Locate ( UInt32_t  a_blockNumber  ) 

Definition at line 46 of file cdb_locate.cpp.

References cdb_Locate_t::addr, hton(), m_locateCmd, and cdb_Locate_t::opcode.

                                             {
    memset (&m_locateCmd, 0, sizeof(m_locateCmd));
    m_locateCmd.opcode = op_LOCATE;

    m_locateCmd.addr = hton(a_blockNumber);
}

Here is the call graph for this function:

cdb_Locate::~cdb_Locate (  )  [virtual]

Definition at line 53 of file cdb_locate.cpp.

                        {
}


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 66 of file cdb_locate.cpp.

References m_locateCmd.

                                               {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_Locate_t*>(&m_locateCmd) );
}

UInt32_t cdb_Locate::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 71 of file cdb_locate.cpp.

References m_locateCmd.

                                      {
    return sizeof(m_locateCmd);
}

Direction_e cdb_Locate::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 75 of file cdb_locate.cpp.

                                                   {
    return TRANSFER_NONE;
}

void cdb_Locate::SetBlockNum ( UInt32_t  a_blkNum  ) 

Definition at line 56 of file cdb_locate.cpp.

References cdb_Locate_t::addr, hton(), and m_locateCmd.

Referenced by bea_TapeMedium::ChangeVolume(), ParseTapeMediumVolume(), and bea_TapeVolume::SeekBlock().

                                              {
    m_locateCmd.addr = hton(a_blkNum);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cdb_Locate::SetPartitionNum ( UInt8_t  a_partNum  ) 

Definition at line 60 of file cdb_locate.cpp.

References cdb_Locate_t::changePartition, m_locateCmd, and cdb_Locate_t::partition.

Referenced by bea_TapeMedium::ChangeVolume(), and ParseTapeMediumVolume().

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 239 of file cdb.h.

Definition at line 241 of file cdb.h.

Referenced by cdb_Locate(), GetCmdPointer(), GetCmdSize(), SetBlockNum(), and SetPartitionNum().


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