Exemple #1
0
	// This is virtual to support a different linux format.
	// *NOTE:Mani - I didn't want to screw up server use of this data...
	virtual std::string getCPUFeatureDescription() const 
	{
		std::ostringstream out;
		out << std::endl << std::endl;
		out << "// CPU General Information" << std::endl;
		out << "//////////////////////////" << std::endl;
		out << "Processor Name:   " << getCPUBrandName() << std::endl;
		out << "Frequency:        " << getCPUFrequency() << " MHz" << std::endl;
		out << "Vendor:			  " << getInfo(eVendor, "Unknown").asString() << std::endl;
		out << "Family:           " << getCPUFamilyName() << " (" << getInfo(eFamily, 0) << ")" << std::endl;
		out << "Extended family:  " << getInfo(eExtendedFamily, 0) << std::endl;
		out << "Model:            " << getInfo(eModel, 0) << std::endl;
		out << "Extended model:   " << getInfo(eExtendedModel, 0) << std::endl;
		out << "Type:             " << getInfo(eType, 0) << std::endl;
		out << "Brand ID:         " << getInfo(eBrandID, 0) << std::endl;
		out << std::endl;
		out << "// CPU Configuration" << std::endl;
		out << "//////////////////////////" << std::endl;
		
		// Iterate through the dictionary of configuration options.
		LLSD configs = mProcessorInfo["config"];
		for(LLSD::map_const_iterator cfgItr = configs.beginMap(); cfgItr != configs.endMap(); ++cfgItr)
		{
			out << cfgItr->first << " = " << cfgItr->second << std::endl;
		}
		out << std::endl;
		
		out << "// CPU Extensions" << std::endl;
		out << "//////////////////////////" << std::endl;
		
		for(LLSD::map_const_iterator itr = mProcessorInfo["extension"].beginMap(); itr != mProcessorInfo["extension"].endMap(); ++itr)
		{
			out << "  " << itr->first << std::endl;			
		}
		return out.str(); 
	}
NxU64       getClockSpeed(void)     // report the clock speed of the processor.
{
	return getCPUFrequency(10);
}