#include <cfg_rm.h>


Definition at line 43 of file cfg_rm.h.
Public Member Functions | |
| cfg_RMDrive () | |
| cfg_RMDrive (const pf_File &a_parsedFile) | |
| virtual | ~cfg_RMDrive () |
| void | Refresh (const pf_File &a_parsedFile) |
| virtual void | ConvertGroup (const string &a_grpName, const pf_Group &a_group) |
Public Attributes | |
| string | name |
| string | library |
| vector< val_Element < ivd_DriveCapab_e > > | capabilities |
| vector< val_Element< string > > | options |
| UInt32_t | driveIndex |
| UInt32_t | dataThroughput |
| UInt32_t | loadTime |
| UInt32_t | unLoadTime |
| UInt32_t | aveSeekTime |
| UInt32_t | rewindTime |
| vector< cfg_RMHost > | hosts |
| ivd_MediaFamily_e | mediaFamily |
Private Attributes | |
| log_CLASSID_m | |
| cfg_RMDrive::cfg_RMDrive | ( | ) |
| cfg_RMDrive::cfg_RMDrive | ( | const pf_File & | a_parsedFile | ) |
Definition at line 48 of file cfg_rmdrive.cpp.
References log_FUNC_m, and Refresh().
00049 :driveIndex(0), 00050 dataThroughput(0), 00051 loadTime(0), 00052 unLoadTime(0), 00053 aveSeekTime(0), 00054 rewindTime(0), 00055 mediaFamily(mf_UNKNOWN) 00056 { 00057 log_FUNC_m(cfg_RMDrive); 00058 Refresh(a_parsedFile); 00059 }

| virtual cfg_RMDrive::~cfg_RMDrive | ( | ) | [inline, virtual] |
| void cfg_RMDrive::Refresh | ( | const pf_File & | a_parsedFile | ) |
Definition at line 62 of file cfg_rmdrive.cpp.
References val_RuleVec::Add(), capabilities, cfg_MAX_CAPABILITIES_NAME, cfg_MAX_DRIVE_NAME, cfg_MAX_DRIVEIDX, cfg_MAX_LIBRARY_NAME, cfg_MAX_MEDIAFAMILY_NAME, cfg_MAX_OPTION_NAME, cfg_MIN_CAPABILITIES_NAME, cfg_MIN_DRIVE_NAME, cfg_MIN_DRIVEIDX, cfg_MIN_MEDIAFAMILY_NAME, cfg_MIN_OPTION_NAME, cfg_Base::CheckMandatory(), cfg_Base::Convert(), cfg_Base::ConvertFileHeader(), driveIndex, library, log_FUNC_m, pf_File::m_common, pf_File::m_sections, pf_SectionList::m_vec, mediaFamily, name, options, and pf_SectionList::size().
Referenced by cfg_RMDrive().
00062 { 00063 log_FUNC_m(Refresh); 00064 00065 static const string c_name ("Name"); 00066 static const string c_library ("Library"); 00067 static const string c_mediaFamily ("mediaFamily"); 00068 static const string c_capabilities ("Capabilities"); 00069 static const string c_options ("Options"); 00070 static const string c_driveIndex ("DriveIndex"); 00071 00072 static const string c_dataThroughput("dataThroughput"); 00073 static const string c_loadTime ("loadTime"); 00074 static const string c_unLoadTime ("unLoadTime"); 00075 static const string c_aveSeekTime ("aveSeekTime"); 00076 static const string c_rewindTime ("rewindTime"); 00077 00078 00079 00080 ConvertFileHeader(a_parsedFile); 00081 val_RuleVec rules; 00082 00083 00084 //common section 00085 rules.Add( 00086 new val_ObjectName( c_name, 00087 val_Limit(cfg_MIN_DRIVE_NAME, cfg_MAX_DRIVE_NAME), 00088 1, 00089 1), 00090 this->name); 00091 00092 rules.Add( 00093 new val_StrictString( c_library, 00094 val_Limit(1, cfg_MAX_LIBRARY_NAME ), 00095 0, 00096 1), 00097 this->library); 00098 00099 rules.Add( 00100 new val_MediaFamilyType( c_mediaFamily, 00101 val_Limit(cfg_MIN_MEDIAFAMILY_NAME, cfg_MAX_MEDIAFAMILY_NAME), 00102 1, 00103 1), 00104 this->mediaFamily 00105 ); 00106 00107 rules.Add( 00108 new val_DriveCapabList( c_capabilities, 00109 val_Limit(cfg_MIN_CAPABILITIES_NAME, cfg_MAX_CAPABILITIES_NAME), 00110 1, 00111 1), 00112 this->capabilities); 00113 00114 rules.Add( 00115 new val_StrictStringList( c_options, 00116 val_Limit(cfg_MIN_OPTION_NAME, cfg_MAX_OPTION_NAME ), 00117 0, 00118 1), 00119 this->options); 00120 00121 rules.Add( 00122 new val_Integer( c_driveIndex, 00123 val_Limit(cfg_MIN_DRIVEIDX, cfg_MAX_DRIVEIDX ), 00124 1, 00125 1), 00126 this->driveIndex); 00127 00128 // //Performance 00129 // rules.Add( 00130 // new val_Integer( c_dataThroughput, 00131 // val_Limit(cfg_MIN_DATATHRPUT, cfg_MAX_DATATHRPUT ), 00132 // 1, 00133 // 1), 00134 // this->dataThroughput); 00135 // 00136 // rules.Add( 00137 // new val_Integer( c_loadTime, 00138 // val_Limit(cfg_MIN_LOADTIME, cfg_MAX_LOADTIME ), 00139 // 1, 00140 // 1), 00141 // this->loadTime); 00142 // 00143 // rules.Add( 00144 // new val_Integer( c_unLoadTime, 00145 // val_Limit(cfg_MIN_UNLOADTIME, cfg_MAX_UNLOADTIME ), 00146 // 1, 00147 // 1), 00148 // this->unLoadTime); 00149 // rules.Add( 00150 // new val_Integer( c_aveSeekTime, 00151 // val_Limit(cfg_MIN_AVESEEKTIME, cfg_MAX_AVESEEKTIME ), 00152 // 1, 00153 // 1), 00154 // this->aveSeekTime); 00155 // rules.Add( 00156 // new val_Integer( c_rewindTime, 00157 // val_Limit(cfg_MIN_REWINDTIME, cfg_MAX_REWINDTIME ), 00158 // 1, 00159 // 1), 00160 // this->rewindTime); 00161 // 00162 00163 //Validate and convert common section 00164 Convert(a_parsedFile.m_common, rules); 00165 00166 //Validate and convert other sections 00167 00168 for (unsigned int i = 0; i < a_parsedFile.m_sections.size(); i++) { 00169 // if section name is needed here it is: i->first 00170 Convert(a_parsedFile.m_sections.m_vec[i] , rules); 00171 }; 00172 CheckMandatory(rules); 00173 }


| void cfg_RMDrive::ConvertGroup | ( | const string & | a_grpName, | |
| const pf_Group & | a_group | |||
| ) | [virtual] |
Reimplemented from cfg_Base.
Definition at line 183 of file cfg_rmdrive.cpp.
References cfg_FindGroupByName(), pf_Group::grpType, hosts, log_FUNC_A_m, log_WRN_m, and strcasecmp.
00183 { 00184 log_FUNC_A_m(ConvertGroup, "grpType" << a_group.grpType << "a_grpName " << a_grpName); 00185 00186 static const string c_host ("Host"); 00187 00188 00189 if ( strcasecmp(a_group.grpType.c_str(), c_host.c_str()) == 0 ) { 00190 int i = cfg_FindGroupByName(this->hosts, a_grpName); 00191 cfg_RMHost host(a_grpName, a_group); 00192 if (i == -1) { 00193 this->hosts.push_back(host); 00194 } else { 00195 this->hosts[i] = host; 00196 }; 00197 } 00198 00199 else { 00200 log_WRN_m("Unknown group type: " << a_group.grpType); 00201 } 00202 }

| string cfg_RMDrive::name |
Definition at line 54 of file cfg_rm.h.
Referenced by i_ManagementInterface_i::AddDrive(), Refresh(), and i_ManagementInterface_i::UpdateDrive().
| string cfg_RMDrive::library |
Definition at line 55 of file cfg_rm.h.
Referenced by i_ManagementInterface_i::AddDrive(), Refresh(), and i_ManagementInterface_i::UpdateDrive().
Definition at line 57 of file cfg_rm.h.
Referenced by i_ManagementInterface_i::AddDrive(), Refresh(), and i_ManagementInterface_i::UpdateDrive().
| vector<val_Element<string> > cfg_RMDrive::options |
Definition at line 60 of file cfg_rm.h.
Referenced by i_ManagementInterface_i::AddDrive(), Refresh(), and i_ManagementInterface_i::UpdateDrive().
Definition at line 72 of file cfg_rm.h.
Referenced by i_ManagementInterface_i::AddDrive(), ConvertGroup(), and i_ManagementInterface_i::UpdateDrive().
Definition at line 74 of file cfg_rm.h.
Referenced by i_ManagementInterface_i::AddDrive(), Refresh(), and i_ManagementInterface_i::UpdateDrive().
cfg_RMDrive::log_CLASSID_m [private] |
1.5.6