Public Types | Public Member Functions | Private Attributes

cdb_ReadAttribute Class Reference
[SCSI Library]

Read MAM attributes. More...

#include <cdb.h>

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

List of all members.

Public Types

enum  srvcAction_e { saATTRVAL = 0x0, saATTRLIST = 0x1 }

Public Member Functions

 cdb_ReadAttribute (data_Attribute &a_dataAttr)
 cdb_ReadAttribute (data_Attribute &a_dataAttr, srvcAction_e a_srvAction)
virtual ~cdb_ReadAttribute ()
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_ReadAttribute_t m_attributeCmd
data_Attributem_attribute

Detailed Description

Read MAM attributes.

Author:
Andrej Jamsek

Definition at line 617 of file cdb.h.


Member Enumeration Documentation

Enumerator:
saATTRVAL 
saATTRLIST 

Definition at line 620 of file cdb.h.

                      {
        saATTRVAL           = 0x0,
        saATTRLIST          = 0x1
    };


Constructor & Destructor Documentation

cdb_ReadAttribute::cdb_ReadAttribute ( data_Attribute a_dataAttr  ) 
cdb_ReadAttribute::cdb_ReadAttribute ( data_Attribute a_dataAttr,
srvcAction_e  a_srvAction 
)

Definition at line 57 of file cdb_readattribute.cpp.

References cdb_ReadAttribute_t::allocLen, hton(), m_attributeCmd, cdb_ReadAttribute_t::opcode, saATTRLIST, and cdb_ReadAttribute_t::srvcAction.

    : m_attribute(a_dataAttr) {
        memset (&m_attributeCmd, 0, sizeof(m_attributeCmd));
        m_attributeCmd.srvcAction=a_srvAction;
        if (a_srvAction == saATTRLIST) {
            m_attributeCmd.allocLen=hton((UInt32_t)160);
        }
        m_attributeCmd.opcode=op_READ_ATTRIBUTE;
    }

Here is the call graph for this function:

cdb_ReadAttribute::~cdb_ReadAttribute (  )  [virtual]

Definition at line 68 of file cdb_readattribute.cpp.

                                     {
  //void
}


Member Function Documentation

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

Reimplemented from scsi_CDB.

Definition at line 85 of file cdb_readattribute.cpp.

References data_Attribute::GetAttributeData(), and m_attribute.

                                                   {
    return reinterpret_cast<UInt8_t*>(
        const_cast<data_Attribute_t *>(
            &(m_attribute.GetAttributeData()) ) );
}

Here is the call graph for this function:

UInt32_t cdb_ReadAttribute::GetBufferSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 91 of file cdb_readattribute.cpp.

References data_Attribute::GetAttrIDListLength(), and m_attribute.

Here is the call graph for this function:

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

Reimplemented from scsi_CDB.

Definition at line 72 of file cdb_readattribute.cpp.

References m_attributeCmd.

                                                      {
    return reinterpret_cast<UInt8_t*>(
        const_cast<cdb_ReadAttribute_t*>(&m_attributeCmd));
}

UInt32_t cdb_ReadAttribute::GetCmdSize (  )  const [virtual]

Reimplemented from scsi_CDB.

Definition at line 77 of file cdb_readattribute.cpp.

References m_attributeCmd.

                                             {
    return sizeof(m_attributeCmd);
}

Direction_e cdb_ReadAttribute::GetTransferDirection (  )  const [virtual]

Implements scsi_CDB.

Definition at line 81 of file cdb_readattribute.cpp.

                                                          {
    return TRANSFER_IN;
}


Member Data Documentation

Reimplemented from scsi_CDB.

Definition at line 637 of file cdb.h.

Definition at line 639 of file cdb.h.

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

Definition at line 638 of file cdb.h.

Referenced by cdb_ReadAttribute(), GetCmdPointer(), and GetCmdSize().


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