#include <data.h>


Definition at line 97 of file data.h.
Public Member Functions | |
| data_Density () | |
| virtual | ~data_Density () |
| const data_ReportDensitySupport_t & | GetDensityStruct () const |
| UInt16_t | GetDensityCount () const |
| UInt8_t | GetPrimaryCode (UInt16_t a_index=0) const |
| UInt8_t | GetSecondaryCode (UInt16_t a_index=0) const |
| UInt32_t | GetBitsPerMM (UInt16_t a_index=0) const |
| UInt16_t | GetMediaWidth (UInt16_t a_index=0) const |
| UInt16_t | GetTracks (UInt16_t a_index=0) const |
| UInt32_t | GetCapacity (UInt16_t a_index=0) const |
| string | GetAssigningOrg (UInt16_t a_index=0) const |
| string | GetDensityName (UInt16_t a_index=0) const |
| string | GetDescription (UInt16_t a_index=0) const |
Private Attributes | |
| log_CLASSID_m | |
| data_ReportDensitySupport_t | m_density |
| data_Density::data_Density | ( | ) |
| data_Density::~data_Density | ( | ) | [virtual] |
| const data_ReportDensitySupport_t & data_Density::GetDensityStruct | ( | ) | const |
Definition at line 41 of file data_density.cpp.
References m_density.
Referenced by cdb_ReportDensity::GetBufferPointer(), and cdb_ReportDensity::GetBufferSize().
00041 { 00042 return m_density; 00043 }

| UInt16_t data_Density::GetDensityCount | ( | ) | const |
Definition at line 45 of file data_density.cpp.
References data_ReportDensitySupport_t::hdr, data_RDSHdr_t::length, m_density, and ntoh().
Referenced by Dens(), GetAssigningOrg(), GetBitsPerMM(), GetCapacity(), GetCapacityInfo(), GetDensityName(), GetDescription(), GetMediaWidth(), GetPrimaryCode(), GetSecondaryCode(), GetTracks(), and bea_TapeMedium::RefreshTapeInfo().
00045 { 00046 return static_cast<UInt32_t>(ntoh(m_density.hdr.length) - 2) / sizeof(data_RDSDescriptor_t); 00047 }


Definition at line 49 of file data_density.cpp.
References data_ReportDensitySupport_t::density, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_density, and data_RDSDescriptor_t::primaryCode.
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00049 { 00050 if (a_index >= GetDensityCount()) { 00051 log_FUNC_m(GetPrimaryCode); 00052 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00053 } 00054 return m_density.density[a_index].primaryCode; 00055 }


Definition at line 57 of file data_density.cpp.
References data_ReportDensitySupport_t::density, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_density, and data_RDSDescriptor_t::secondaryCode.
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00057 { 00058 if (a_index >= GetDensityCount()) { 00059 log_FUNC_m(GetSecondaryCode); 00060 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00061 } 00062 return m_density.density[a_index].secondaryCode; 00063 }


Definition at line 65 of file data_density.cpp.
References data_RDSDescriptor_t::bitsPerMM, data_ReportDensitySupport_t::density, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_density, and ntoh24().
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00065 { 00066 if (a_index >= GetDensityCount()) { 00067 log_FUNC_m(GetBitsPerMM); 00068 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00069 } 00070 return ntoh24(m_density.density[a_index].bitsPerMM); 00071 }


Definition at line 73 of file data_density.cpp.
References data_ReportDensitySupport_t::density, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_density, data_RDSDescriptor_t::mediaWidth, and ntoh().
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00073 { 00074 if (a_index >= GetDensityCount()) { 00075 log_FUNC_m(GetMediaWidth); 00076 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00077 } 00078 return ntoh(m_density.density[a_index].mediaWidth); 00079 }


Definition at line 81 of file data_density.cpp.
References data_ReportDensitySupport_t::density, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_density, ntoh(), and data_RDSDescriptor_t::tracks.
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00081 { 00082 if (a_index >= GetDensityCount()) { 00083 log_FUNC_m(GetTracks); 00084 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00085 } 00086 return ntoh(m_density.density[a_index].tracks); 00087 }


Definition at line 93 of file data_density.cpp.
References data_RDSDescriptor_t::capacity, data_ReportDensitySupport_t::density, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, m_density, ntoh(), and size.
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00093 { 00094 if (a_index >= GetDensityCount()) { 00095 log_FUNC_m(GetCapacity); 00096 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00097 } 00098 00099 UInt64_t size = (ntoh(m_density.density[a_index].capacity)*1000)/1024; 00100 00101 return static_cast<UInt32_t>(size); 00102 }


| string data_Density::GetAssigningOrg | ( | UInt16_t | a_index = 0 |
) | const |
Definition at line 104 of file data_density.cpp.
References data_RDSDescriptor_t::assigningOrg, data_ReportDensitySupport_t::density, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, and m_density.
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00104 { 00105 if (a_index >= GetDensityCount()) { 00106 log_FUNC_m(GetAssigningOrg); 00107 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00108 } 00109 const char* ao = 00110 reinterpret_cast<const char*>( 00111 &(m_density.density[a_index].assigningOrg[0]) ); 00112 00113 UInt32_t aolen = strlen(ao); 00114 UInt32_t maxlen = sizeof(m_density.density[a_index].assigningOrg); 00115 if (aolen < maxlen) { 00116 return string(ao); 00117 } 00118 else { 00119 return string(ao, maxlen); 00120 }; 00121 }


| string data_Density::GetDensityName | ( | UInt16_t | a_index = 0 |
) | const |
Definition at line 123 of file data_density.cpp.
References data_ReportDensitySupport_t::density, data_RDSDescriptor_t::densityName, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, and m_density.
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00123 { 00124 if (a_index >= GetDensityCount()) { 00125 log_FUNC_m(GetDensityName); 00126 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00127 } 00128 const char* dn = 00129 reinterpret_cast<const char*>( 00130 &(m_density.density[a_index].densityName[0]) ); 00131 00132 UInt32_t dnlen = strlen(dn); 00133 UInt32_t maxlen = sizeof(m_density.density[a_index].densityName); 00134 if (dnlen < maxlen) { 00135 return string(dn); 00136 } 00137 else { 00138 return string(dn, maxlen); 00139 }; 00140 }


| string data_Density::GetDescription | ( | UInt16_t | a_index = 0 |
) | const |
Definition at line 142 of file data_density.cpp.
References data_ReportDensitySupport_t::density, data_RDSDescriptor_t::description, GetDensityCount(), ie_INVALID_ARG, ivd_Error, log_FUNC_m, and m_density.
Referenced by Dens(), GetCapacityInfo(), ParseTapeMedium(), and bea_TapeMedium::RefreshTapeInfo().
00142 { 00143 if (a_index >= GetDensityCount()) { 00144 log_FUNC_m(GetDescription); 00145 throw ivd_Error(ie_INVALID_ARG, "Density index overflow."); 00146 } 00147 const char* dd = 00148 reinterpret_cast<const char*>( 00149 &(m_density.density[a_index].description[0]) ); 00150 00151 UInt32_t ddlen = strlen(dd); 00152 UInt32_t maxlen = sizeof(m_density.density[a_index].description); 00153 if (ddlen < maxlen) { 00154 return string(dd); 00155 } 00156 else { 00157 return string(dd, maxlen); 00158 }; 00159 }


data_Density::log_CLASSID_m [private] |
Definition at line 118 of file data.h.
Referenced by data_Density(), GetAssigningOrg(), GetBitsPerMM(), GetCapacity(), GetDensityCount(), GetDensityName(), GetDensityStruct(), GetDescription(), GetMediaWidth(), GetPrimaryCode(), GetSecondaryCode(), and GetTracks().
1.5.6