#include <cdb.h>


Definition at line 603 of file cdb.h.
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_t * | GetCmdPointer () const |
| virtual UInt32_t | GetCmdSize () const |
| virtual Direction_e | GetTransferDirection () const |
| virtual UInt8_t * | GetBufferPointer () const |
| virtual UInt32_t | GetBufferSize () const |
Private Attributes | |
| log_CLASSID_m | |
| cdb_ReadAttribute_t | m_attributeCmd |
| data_Attribute & | m_attribute |
Definition at line 606 of file cdb.h.
00606 { 00607 saATTRVAL = 0x0, 00608 saATTRLIST = 0x1 00609 };
| cdb_ReadAttribute::cdb_ReadAttribute | ( | data_Attribute & | a_dataAttr | ) |
Definition at line 32 of file cdb_readattribute.cpp.
References cdb_ReadAttribute_t::allocLen, cdb_ReadAttribute_t::firstAttrId, data_Attribute::GetAttrIDListLength(), data_Attribute::GetId(), hton(), m_attribute, m_attributeCmd, op_READ_ATTRIBUTE, cdb_ReadAttribute_t::opcode, and data_Attribute::SetAvailableData().
00033 : m_attribute(a_dataAttr) { 00034 memset (&m_attributeCmd, 0, sizeof(m_attributeCmd)); 00035 m_attributeCmd.opcode=op_READ_ATTRIBUTE; 00036 m_attributeCmd.firstAttrId=hton(m_attribute.GetId()); 00037 m_attributeCmd.allocLen=hton(m_attribute.GetAttrIDListLength()); 00038 00039 // TODO: Bad design: setting other class' internal parameters. 00040 m_attribute.SetAvailableData(m_attribute.GetAttrIDListLength()); 00041 }

| cdb_ReadAttribute::cdb_ReadAttribute | ( | data_Attribute & | a_dataAttr, | |
| srvcAction_e | a_srvAction | |||
| ) |
Definition at line 43 of file cdb_readattribute.cpp.
References cdb_ReadAttribute_t::allocLen, hton(), m_attributeCmd, op_READ_ATTRIBUTE, cdb_ReadAttribute_t::opcode, saATTRLIST, and cdb_ReadAttribute_t::srvcAction.
00044 : m_attribute(a_dataAttr) { 00045 memset (&m_attributeCmd, 0, sizeof(m_attributeCmd)); 00046 m_attributeCmd.srvcAction=a_srvAction; 00047 if (a_srvAction == saATTRLIST) { 00048 m_attributeCmd.allocLen=hton((UInt32_t)160); 00049 } 00050 m_attributeCmd.opcode=op_READ_ATTRIBUTE; 00051 }

| cdb_ReadAttribute::~cdb_ReadAttribute | ( | ) | [virtual] |
| const UInt8_t * cdb_ReadAttribute::GetCmdPointer | ( | ) | const [virtual] |
Reimplemented from scsi_CDB.
Definition at line 58 of file cdb_readattribute.cpp.
References m_attributeCmd.
00058 { 00059 return reinterpret_cast<UInt8_t*>( 00060 const_cast<cdb_ReadAttribute_t*>(&m_attributeCmd)); 00061 }
| UInt32_t cdb_ReadAttribute::GetCmdSize | ( | ) | const [virtual] |
Reimplemented from scsi_CDB.
Definition at line 63 of file cdb_readattribute.cpp.
References m_attributeCmd.
00063 { 00064 return sizeof(m_attributeCmd); 00065 }
| Direction_e cdb_ReadAttribute::GetTransferDirection | ( | ) | const [virtual] |
Implements scsi_CDB.
Definition at line 67 of file cdb_readattribute.cpp.
References TRANSFER_IN.
00067 { 00068 return TRANSFER_IN; 00069 }
| UInt8_t * cdb_ReadAttribute::GetBufferPointer | ( | ) | const [virtual] |
Reimplemented from scsi_CDB.
Definition at line 71 of file cdb_readattribute.cpp.
References data_Attribute::GetAttributeData(), and m_attribute.
00071 { 00072 return reinterpret_cast<UInt8_t*>( 00073 const_cast<data_Attribute_t *>( 00074 &(m_attribute.GetAttributeData()) ) ); 00075 }

| UInt32_t cdb_ReadAttribute::GetBufferSize | ( | ) | const [virtual] |
Reimplemented from scsi_CDB.
Definition at line 77 of file cdb_readattribute.cpp.
References data_Attribute::GetAttrIDListLength(), and m_attribute.
00077 { 00078 return m_attribute.GetAttrIDListLength(); 00079 }

cdb_ReadAttribute::log_CLASSID_m [private] |
Definition at line 624 of file cdb.h.
Referenced by cdb_ReadAttribute(), GetCmdPointer(), and GetCmdSize().
data_Attribute& cdb_ReadAttribute::m_attribute [private] |
Definition at line 625 of file cdb.h.
Referenced by cdb_ReadAttribute(), GetBufferPointer(), and GetBufferSize().
1.5.6