Public Member Functions | Private Attributes

cdb_ReadElementStatus Class Reference
[SCSI Library]

SCSI READ ELEMENT STATUS command. More...

#include <cdb.h>

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

List of all members.

Public Member Functions

 cdb_ReadElementStatus (data_ElementStatus &a_elem)
virtual ~cdb_ReadElementStatus ()
virtual const UInt8_tGetCmdPointer () const
virtual UInt32_t GetCmdSize () const
virtual Direction_e GetTransferDirection () const
virtual UInt8_tGetBufferPointer () const
virtual UInt32_t GetBufferSize () const
void SetType (data_ElementStatus::ElemType_t a_type)
void SetStartAddr (UInt16_t a_start)
void SetElementNum (UInt16_t a_num)
void SetDeviceId (bool a_dvcid)
void SetCurData (bool a_curdata)
void SetVolTag (bool a_voltag)

Private Attributes

 log_CLASSID_m
data_ElementStatusm_data
cdb_ReadElemStatus_t m_readStatusCmd

Detailed Description

SCSI READ ELEMENT STATUS command.

Definition at line 563 of file cdb.h.


Constructor & Destructor Documentation

cdb_ReadElementStatus::cdb_ReadElementStatus ( data_ElementStatus a_elem  ) 

Definition at line 48 of file cdb_readelementstatus.cpp.

References cdb_ReadElemStatus_t::allocLen, data_ElementStatus::GetBufferSize(), hton24(), m_data, m_readStatusCmd, and cdb_ReadElemStatus_t::opcode.

    : m_data(a_elem) {

    memset (&m_readStatusCmd, 0, sizeof(m_readStatusCmd));
    m_readStatusCmd.opcode   = op_READ_ELEMENT_STATUS;
    m_readStatusCmd.allocLen = hton24(m_data.GetBufferSize());
}

Here is the call graph for this function:

cdb_ReadElementStatus::~cdb_ReadElementStatus (  )  [virtual]

Definition at line 56 of file cdb_readelementstatus.cpp.

                                              {
}


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 59 of file cdb_readelementstatus.cpp.

References data_ElementStatus::GetBuffer(), and m_data.

                                                       {
    return m_data.GetBuffer();
}

Here is the call graph for this function:

UInt32_t cdb_ReadElementStatus::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 63 of file cdb_readelementstatus.cpp.

References data_ElementStatus::GetBufferSize(), and m_data.

                                                    {
    return m_data.GetBufferSize();
}

Here is the call graph for this function:

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

Reimplemented from scsi_CDB.

Definition at line 67 of file cdb_readelementstatus.cpp.

References m_readStatusCmd.

                                                          {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_ReadElemStatus_t*>(&m_readStatusCmd) );
}

UInt32_t cdb_ReadElementStatus::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 72 of file cdb_readelementstatus.cpp.

References m_readStatusCmd.

                                                 {
    return sizeof(m_readStatusCmd);
}

Direction_e cdb_ReadElementStatus::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 76 of file cdb_readelementstatus.cpp.

                                                              {
    return TRANSFER_IN;
}

void cdb_ReadElementStatus::SetCurData ( bool  a_curdata  ) 

Definition at line 101 of file cdb_readelementstatus.cpp.

References cdb_ReadElemStatus_t::curData, and m_readStatusCmd.

Referenced by la_SCSILibrary::Status(), and Status().

                                                     {
    if (a_curdata) {
        m_readStatusCmd.curData = 1;
    }
    else {
        m_readStatusCmd.curData = 0;
    }
}

Here is the caller graph for this function:

void cdb_ReadElementStatus::SetDeviceId ( bool  a_dvcid  ) 

Definition at line 92 of file cdb_readelementstatus.cpp.

References cdb_ReadElemStatus_t::dvcId, and m_readStatusCmd.

Referenced by la_SCSILibrary::Status(), and Status().

                                                    {
    if (a_dvcid) {
        m_readStatusCmd.dvcId = 1;
    }
    else {
        m_readStatusCmd.dvcId = 0;
    }
}

Here is the caller graph for this function:

void cdb_ReadElementStatus::SetElementNum ( UInt16_t  a_num  ) 

Definition at line 88 of file cdb_readelementstatus.cpp.

References cdb_ReadElemStatus_t::elemNum, hton(), and m_readStatusCmd.

Referenced by la_SCSILibrary::Status(), and Status().

                                                        {
    m_readStatusCmd.elemNum = hton(a_num);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cdb_ReadElementStatus::SetStartAddr ( UInt16_t  a_start  ) 

Definition at line 84 of file cdb_readelementstatus.cpp.

References hton(), m_readStatusCmd, and cdb_ReadElemStatus_t::startAddr.

Referenced by la_SCSILibrary::Status(), and Status().

                                                         {
    m_readStatusCmd.startAddr = hton(a_start);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cdb_ReadElementStatus::SetType ( data_ElementStatus::ElemType_t  a_type  ) 

Definition at line 80 of file cdb_readelementstatus.cpp.

References cdb_ReadElemStatus_t::elemType, and m_readStatusCmd.

Referenced by la_SCSILibrary::Status(), and Status().

                                                                       {
    m_readStatusCmd.elemType = a_type;
}

Here is the caller graph for this function:

void cdb_ReadElementStatus::SetVolTag ( bool  a_voltag  ) 

Definition at line 110 of file cdb_readelementstatus.cpp.

References m_readStatusCmd, and cdb_ReadElemStatus_t::volTag.

Referenced by la_SCSILibrary::Status(), and Status().

                                                   {
    if (a_voltag) {
        m_readStatusCmd.volTag = 1;
    }
    else {
        m_readStatusCmd.volTag = 0;
    }
}

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 585 of file cdb.h.

Definition at line 587 of file cdb.h.

Referenced by cdb_ReadElementStatus(), GetBufferPointer(), and GetBufferSize().


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