void CHZDLReport::GenList() { DeviceList.clear(); PAIRLIST getDevList; PAIRLIST::iterator getDevItem; DeviceItem tmpDevItem; float tmpCPUUtilization = 0; float tmpMemoryUtilization = 0; bool tmpCPU = false; bool tmpMemory = false; tmpDevItem.sIP = "无IP"; if(GetAllEntitysInfo(getDevList, "sv_name")) { for(getDevItem = getDevList.begin(); getDevItem != getDevList.end(); getDevItem++) { tmpDevItem.sName = getDevItem->value; GetData(getDevItem->name, tmpDevItem.sIP, tmpCPU, tmpMemory, tmpCPUUtilization, tmpMemoryUtilization); if (tmpCPU || tmpMemory) { tmpDevItem.hasCPU = tmpCPU; tmpDevItem.hasMemory = tmpMemory; tmpDevItem.CPUUtilization = tmpCPUUtilization; tmpDevItem.MemoryUtilization = tmpMemoryUtilization; DeviceList.push_back(tmpDevItem); } } getDevList.clear(); } }