hwdet::Processor Class Reference

Storage class for all CPU related data. More...

#include <Processor.h>

Inheritance diagram for hwdet::Processor:

hwdet::XMLElement

Public Member Functions

 Processor (void)
 Default ctor.
 Processor (const String &model_name, const String &vendor_name, unsigned long cache_size, unsigned long cpu_speed)
 Constructor.
String GetModelName (void) const
 Get model name of CPU.
void SetModelName (const String &value)
 Set new model name.
String GetVendorName (void) const
 Get ID of the vendor.
void SetVendorName (const String &value)
 Set new name of the vendor.
unsigned long GetCacheSize (void) const
 Get size of the L2 cache in kB.
void SetCacheSize (unsigned long value)
 Set new cache size.
unsigned long GetSpeed (void) const
 Get speed of the CPU in MHz.
void SetSpeed (unsigned long value)
 Set new speed.

Private Attributes

XMLValueElement< String > * model
 Model name.
XMLValueElement< String > * vendor
 Vendor ID string.
XMLValueElement< unsigned
long > * 
speed
 Speed in MHz.
XMLValueElement< unsigned
long > * 
cache
 L2 cache size.

Detailed Description

Storage class for all CPU related data.


Constructor & Destructor Documentation

hwdet::Processor::Processor ( void   ) 

Default ctor.

hwdet::Processor::Processor ( const String model_name,
const String vendor_name,
unsigned long  cache_size,
unsigned long  cpu_speed 
)

Constructor.

Parameters:
model_name Model name of the CPU.
vendor_name Vendor identification string (12 characters).
cache_size Size of the L2 cache in kB.
cpu_speed Speed of the processor in MHz.


Member Function Documentation

unsigned long hwdet::Processor::GetCacheSize ( void   )  const

Get size of the L2 cache in kB.

Returns:
Size of the integrated L2 cache in kB.

String hwdet::Processor::GetModelName ( void   )  const

Get model name of CPU.

Returns:
Model identification string. It is the string which is displayed during the POST of the computer.

unsigned long hwdet::Processor::GetSpeed ( void   )  const

Get speed of the CPU in MHz.

Returns:
Speed of the CPU in MHz.

String hwdet::Processor::GetVendorName ( void   )  const

Get ID of the vendor.

Returns:
Identification string of the CPU vendor. This string is always 12 characters long.

void hwdet::Processor::SetCacheSize ( unsigned long  value  ) 

Set new cache size.

Parameters:
value New size of the cache in kB.

void hwdet::Processor::SetModelName ( const String value  ) 

Set new model name.

Parameters:
value New model name of the processor.

void hwdet::Processor::SetSpeed ( unsigned long  value  ) 

Set new speed.

Parameters:
value New speed of the processor in MHz.

void hwdet::Processor::SetVendorName ( const String value  ) 

Set new name of the vendor.

Parameters:
value New name of the CPU vendor.


Field Documentation

XMLValueElement< unsigned long >* hwdet::Processor::cache [private]

L2 cache size.

XMLValueElement< String >* hwdet::Processor::model [private]

Model name.

XMLValueElement< unsigned long >* hwdet::Processor::speed [private]

Speed in MHz.

XMLValueElement< String >* hwdet::Processor::vendor [private]

Vendor ID string.


The documentation for this class was generated from the following files:
Generated on Tue Dec 19 17:43:51 2006 for Detector for Linux by  doxygen 1.4.7