679 lines
20 KiB
C#

//----------------------------------------------------------------------------
//
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
//
// File: CIM_Processor.cs
//
// Contents: Capabilities and management of the Processor LogicalDevice.
// This file was automatically generated from CIM_Processor.mof
//
//----------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Globalization;
using System.Xml.Serialization;
using System.IO;
using Intel.Manageability.WSManagement;
using Intel.Manageability.Cim.Untyped;
namespace Intel.Manageability.Cim.Typed
{
/// <summary>
///Capabilities and management of the Processor LogicalDevice.
/// </summary>
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Processor")]
[System.Xml.Serialization.XmlRootAttribute("CIM_Processor", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Processor", IsNullable=false)]
public class CIM_Processor : CIM_LogicalDevice
{
/// <summary>
/// Default constructor.
/// </summary>
public CIM_Processor() :base()
{
}
/// <summary>
/// Constructor that recieves an xml string for deserialization.
/// </summary>
/// <param name="xml">xml string to deserialize</param>
public CIM_Processor(string xml): base((IWSManClient)null)
{
this.Deserialize(xml);
}
/// <summary>
/// Constructor which recieves a Ws-Management client object.
/// </summary>
/// <param name="client">Ws-Management client</param>
public CIM_Processor(IWSManClient client): base(client)
{
}
/// <summary>
/// Remove AddressWidth field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveAddressWidth()
{
RemoveField("AddressWidth");
}
/// <summary>
/// Is true if the field AddressWidth exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool AddressWidthExist
{
get
{
return ContainsField("AddressWidth");
}
}
/// <summary>
/// Optional, Processor address width in bits.
/// </summary>
[CimField(false, false)]
public virtual ushort AddressWidth
{
get
{
return ushort.Parse(this["AddressWidth"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("AddressWidth",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove CPUStatus field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveCPUStatus()
{
RemoveField("CPUStatus");
}
/// <summary>
/// Is true if the field CPUStatus exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool CPUStatusExist
{
get
{
return ContainsField("CPUStatus");
}
}
/// <summary>
/// Optional, The CPUStatus property that indicates the current status of the Processor. For example, the Processor might be disabled by the user (value=2), or disabled due to a POST error (value=3). Information in this property can be obtained from SMBIOS, the Type 4 structure, and the Status attribute.
/// </summary>
[CimField(false, false)]
public virtual ushort CPUStatus
{
get
{
return ushort.Parse(this["CPUStatus"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("CPUStatus",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove Characteristics field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveCharacteristics()
{
RemoveField("Characteristics");
}
/// <summary>
/// Is true if the field Characteristics exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool CharacteristicsExist
{
get
{
return ContainsField("Characteristics");
}
}
/// <summary>
/// Optional, Array of enumerated values that describes the characteristics of the processor. The characteristics include certain features of the processor such as 64 bit support for data width of the processor. Note that if this property does not contain the value corresponding to a feature of the processor, than the feature either is not that some of the features of the processor may exist but may not be enabled. To find the the currently enabled features the processor, reffer to the EnabledProcessorCharacteristics property. Values specified in the enumeration may be obtained from SMBIOS v2.5 Type 4 offset 26h (Processor Characteristics Word). 32-bit Capable - describes whether the processor has the capability for 32 bits data width. 64-bit Capable - describes whether the processor has the capability for 64 bits data width. Enhanced Virtualization - describes whether the processor has the capability for executing enhanced virtualization instructions. Hardware Thread - indicates that the processor is capable of the hardware threading. NX-bit - describes whether the processor has capability to utilize non-execute bit and can differentiate the memory marked strictly for storage. Power/Performance Control - describes whether the processor has capability for load based power savings. Core Frequency Boosting - describes whether the processor has a capability for one processor core to increase its frequency whenever the other core has gone into an idle state.
/// </summary>
[CimField(false, false)]
public virtual ushort[] Characteristics
{
get
{
return CimTypesUtils.StringArrayToArray<ushort>(this["Characteristics"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray<ushort>(value);
this.SetOrAddField("Characteristics", arr);
}
}
/// <summary>
/// Remove CurrentClockSpeed field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveCurrentClockSpeed()
{
RemoveField("CurrentClockSpeed");
}
/// <summary>
/// Is true if the field CurrentClockSpeed exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool CurrentClockSpeedExist
{
get
{
return ContainsField("CurrentClockSpeed");
}
}
/// <summary>
/// Optional, The current speed (in MHz) of this Processor.
/// </summary>
[CimField(false, false)]
public virtual uint CurrentClockSpeed
{
get
{
return uint.Parse(this["CurrentClockSpeed"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("CurrentClockSpeed",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove DataWidth field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveDataWidth()
{
RemoveField("DataWidth");
}
/// <summary>
/// Is true if the field DataWidth exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool DataWidthExist
{
get
{
return ContainsField("DataWidth");
}
}
/// <summary>
/// Optional, Processor data width in bits.
/// </summary>
[CimField(false, false)]
public virtual ushort DataWidth
{
get
{
return ushort.Parse(this["DataWidth"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("DataWidth",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove EnabledProcessorCharacteristics field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveEnabledProcessorCharacteristics()
{
RemoveField("EnabledProcessorCharacteristics");
}
/// <summary>
/// Is true if the field EnabledProcessorCharacteristics exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool EnabledProcessorCharacteristicsExist
{
get
{
return ContainsField("EnabledProcessorCharacteristics");
}
}
/// <summary>
/// Optional, This property indicates the enabled states of the corresponding processor characteristics. The property array is indexed with ProcessorCharacteristics property array of the associated CIM_ProcessorCapabilities instance through the CIM_ElementCapabilities association. Each of the values in the ProcessorCharacteristics array property shall have its enabled state indicated in the corresponding element of this property array. For example; if the ProcessorCharacteristics array has value - NX-bit - for the first element of the array, then the first element of this property will contain the value for the enabled state of the NX-bit feature of the processor: whether the processor currently differentiates the dedicated storage memory based on the non-execute bit. Unknown - the processor feature is in unknown state. Enabled - the processor feature is enabled and could be used. Disabled - the processor feature is disabled and cannot be used. Not Applicable - the processor feature does not have state context.
/// </summary>
[CimField(false, false)]
public virtual ushort[] EnabledProcessorCharacteristics
{
get
{
return CimTypesUtils.StringArrayToArray<ushort>(this["EnabledProcessorCharacteristics"]);
}
set
{
string[] arr = CimTypesUtils.ArrayToStringArray<ushort>(value);
this.SetOrAddField("EnabledProcessorCharacteristics", arr);
}
}
/// <summary>
/// Remove ExternalBusClockSpeed field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveExternalBusClockSpeed()
{
RemoveField("ExternalBusClockSpeed");
}
/// <summary>
/// Is true if the field ExternalBusClockSpeed exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool ExternalBusClockSpeedExist
{
get
{
return ContainsField("ExternalBusClockSpeed");
}
}
/// <summary>
/// Optional, The speed (in MHz) of the external bus interface (also known as the front side bus).
/// </summary>
[CimField(false, false)]
public virtual uint ExternalBusClockSpeed
{
get
{
return uint.Parse(this["ExternalBusClockSpeed"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("ExternalBusClockSpeed",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove Family field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveFamily()
{
RemoveField("Family");
}
/// <summary>
/// Is true if the field Family exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool FamilyExist
{
get
{
return ContainsField("Family");
}
}
/// <summary>
/// Optional, The Processor family type. For example, values include "Pentium(R) processor with MMX(TM) technology" (value=14) and "68040" (value=96).
/// </summary>
[CimField(false, false)]
public virtual ushort Family
{
get
{
return ushort.Parse(this["Family"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("Family",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove LoadPercentage field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveLoadPercentage()
{
RemoveField("LoadPercentage");
}
/// <summary>
/// Is true if the field LoadPercentage exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool LoadPercentageExist
{
get
{
return ContainsField("LoadPercentage");
}
}
/// <summary>
/// Optional, Loading of this Processor, averaged over the last minute, in Percent.
/// </summary>
[CimField(false, false)]
public virtual ushort LoadPercentage
{
get
{
return ushort.Parse(this["LoadPercentage"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("LoadPercentage",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove MaxClockSpeed field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveMaxClockSpeed()
{
RemoveField("MaxClockSpeed");
}
/// <summary>
/// Is true if the field MaxClockSpeed exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool MaxClockSpeedExist
{
get
{
return ContainsField("MaxClockSpeed");
}
}
/// <summary>
/// Optional, The maximum speed (in MHz) of this Processor.
/// </summary>
[CimField(false, false)]
public virtual uint MaxClockSpeed
{
get
{
return uint.Parse(this["MaxClockSpeed"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("MaxClockSpeed",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove NumberOfEnabledCores field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveNumberOfEnabledCores()
{
RemoveField("NumberOfEnabledCores");
}
/// <summary>
/// Is true if the field NumberOfEnabledCores exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool NumberOfEnabledCoresExist
{
get
{
return ContainsField("NumberOfEnabledCores");
}
}
/// <summary>
/// Optional, Number of processor cores enabled for processor.
/// </summary>
[CimField(false, false)]
public virtual ushort NumberOfEnabledCores
{
get
{
return ushort.Parse(this["NumberOfEnabledCores"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("NumberOfEnabledCores",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Remove OtherFamilyDescription field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveOtherFamilyDescription()
{
RemoveField("OtherFamilyDescription");
}
/// <summary>
/// Is true if the field OtherFamilyDescription exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool OtherFamilyDescriptionExist
{
get
{
return ContainsField("OtherFamilyDescription");
}
}
/// <summary>
/// Optional, A string that describes the Processor Family type. It is used when the Family property is set to 1 ("Other"). This string should be set to NULL when the Family property is any value other than 1.
/// </summary>
[CimField(false, false)]
public virtual string OtherFamilyDescription
{
get
{
return this.GetField("OtherFamilyDescription")[0];
}
set
{
this.SetOrAddField("OtherFamilyDescription",value);
}
}
/// <summary>
/// Remove Role field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveRole()
{
RemoveField("Role");
}
/// <summary>
/// Is true if the field Role exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool RoleExist
{
get
{
return ContainsField("Role");
}
}
/// <summary>
/// Optional, A free-form string that describes the role of the Processor, for example, "Central Processor" or "Math Processor".
/// </summary>
[CimField(false, false)]
public virtual string Role
{
get
{
return this.GetField("Role")[0];
}
set
{
this.SetOrAddField("Role",value);
}
}
/// <summary>
/// Remove Stepping field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveStepping()
{
RemoveField("Stepping");
}
/// <summary>
/// Is true if the field Stepping exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool SteppingExist
{
get
{
return ContainsField("Stepping");
}
}
/// <summary>
/// Optional, Stepping is a free-form string that indicates the revision level of the Processor within the Processor.Family.
/// </summary>
[CimField(false, false)]
public virtual string Stepping
{
get
{
return this.GetField("Stepping")[0];
}
set
{
this.SetOrAddField("Stepping",value);
}
}
/// <summary>
/// Remove UniqueID field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveUniqueID()
{
RemoveField("UniqueID");
}
/// <summary>
/// Is true if the field UniqueID exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool UniqueIDExist
{
get
{
return ContainsField("UniqueID");
}
}
/// <summary>
/// Optional, A globally unique identifier for the Processor. This identifier can be unique only within a Processor Family.
/// </summary>
[CimField(false, false)]
public virtual string UniqueID
{
get
{
return this.GetField("UniqueID")[0];
}
set
{
this.SetOrAddField("UniqueID",value);
}
}
/// <summary>
/// Remove UpgradeMethod field.
/// Note: This method will succeed only if this field is optional in the concrete object.
/// </summary>
public virtual void RemoveUpgradeMethod()
{
RemoveField("UpgradeMethod");
}
/// <summary>
/// Is true if the field UpgradeMethod exists in the current object,
/// otherwise is false.
/// </summary>
public virtual bool UpgradeMethodExist
{
get
{
return ContainsField("UpgradeMethod");
}
}
/// <summary>
/// Optional, CPU socket information that includes data on how this Processor can be upgraded (if upgrades are supported). This property is an integer enumeration.
/// </summary>
[CimField(false, false)]
public virtual ushort UpgradeMethod
{
get
{
return ushort.Parse(this["UpgradeMethod"][0], CultureInfo.InvariantCulture);
}
set
{
this.SetOrAddField("UpgradeMethod",value.ToString(CultureInfo.InvariantCulture));
}
}
/// <summary>
/// Enumerate instances of CIM_Processor class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <param name="cimKeys">Keys for selecting the instances</param>
/// <returns>Collection of CIM_Processor objects</returns>
public static new Collection<CIM_Processor> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
{
List<CIM_Processor> ret = CimBase.Enumerate<CIM_Processor>(client, cimKeys);
return new Collection<CIM_Processor>(ret);
}
/// <summary>
/// Enumerate instances of CIM_Processor class at an endpoint.
/// </summary>
/// <param name="client">WS-Management client</param>
/// <returns>Collection of CIM_Processor objects</returns>
public static new Collection<CIM_Processor> Enumerate(IWSManClient client)
{
List<CIM_Processor> ret = CimBase.Enumerate<CIM_Processor>(client);
return new Collection<CIM_Processor>(ret);
}
/// <summary>
/// Delete the instance of CIM_Processor if it is singular.
/// Note: This method will succeed only if a single instance of the class exists.
/// </summary>
/// <param name="client">WS-Management client</param>
public static new void Delete(IWSManClient client)
{
CimBase.Delete<CIM_Processor>(client);
}
/// <summary>
/// Represents the keys of the CIM_Processor class.
/// </summary>
public new class CimKeys : CIM_LogicalDevice.CimKeys
{
}
}
}