533 lines
14 KiB
C#
533 lines
14 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_PhysicalMemory.cs
|
|
//
|
|
// Contents: PhysicalMemory is a subclass of CIM_Chip, representing low level memory devices - SIMMS, DIMMs, raw memory chips, etc.
|
|
// This file was automatically generated from CIM_PhysicalMemory.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>
|
|
///PhysicalMemory is a subclass of CIM_Chip, representing low level memory devices - SIMMS, DIMMs, raw memory chips, etc.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PhysicalMemory")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_PhysicalMemory", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PhysicalMemory", IsNullable=false)]
|
|
public class CIM_PhysicalMemory : CIM_Chip
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_PhysicalMemory() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_PhysicalMemory(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_PhysicalMemory(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove BankLabel field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveBankLabel()
|
|
{
|
|
RemoveField("BankLabel");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field BankLabel exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool BankLabelExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("BankLabel");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A string identifying the physically labeled bank where the Memory is located - for example, 'Bank 0' or 'Bank A'.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string BankLabel
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("BankLabel")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("BankLabel",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Capacity field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveCapacity()
|
|
{
|
|
RemoveField("Capacity");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Capacity exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool CapacityExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Capacity");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The total capacity of this PhysicalMemory, in bytes.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ulong Capacity
|
|
{
|
|
get
|
|
{
|
|
return ulong.Parse(this["Capacity"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Capacity",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove ConfiguredMemoryClockSpeed field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveConfiguredMemoryClockSpeed()
|
|
{
|
|
RemoveField("ConfiguredMemoryClockSpeed");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ConfiguredMemoryClockSpeed exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ConfiguredMemoryClockSpeedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ConfiguredMemoryClockSpeed");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The configured clock speed (in MHz) of PhysicalMemory.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint ConfiguredMemoryClockSpeed
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["ConfiguredMemoryClockSpeed"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ConfiguredMemoryClockSpeed",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, Data width of the PhysicalMemory, in bits. A data width of 0 and a TotalWidth of 8 would indicate that the Memory is solely used to provide error correction 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 FormFactor field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public override void RemoveFormFactor()
|
|
{
|
|
RemoveField("FormFactor");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field FormFactor exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public override bool FormFactorExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("FormFactor");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional,
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public override ushort FormFactor
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["FormFactor"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("FormFactor",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove InterleavePosition field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveInterleavePosition()
|
|
{
|
|
RemoveField("InterleavePosition");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field InterleavePosition exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool InterleavePositionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("InterleavePosition");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The position of this PhysicalMemory in an interleave. 0 indicates non-interleaved. 1 indicates the first position, 2 the second position and so on. For example, in a 2:1 interleave, a value of '1' would indicate that the Memory is in the 'even' position.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint InterleavePosition
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["InterleavePosition"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("InterleavePosition",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove IsSpeedInMhz field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveIsSpeedInMhz()
|
|
{
|
|
RemoveField("IsSpeedInMhz");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field IsSpeedInMhz exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool IsSpeedInMhzExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("IsSpeedInMhz");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The IsSpeedInMHz property is used to indicate if the Speed property or the MaxMemorySpeed contains the value of the memory speed. A value of TRUE shall indicate that the speed is represented by the MaxMemorySpeed property. A value of FALSE shall indicate that the speed is represented by the Speed property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual bool IsSpeedInMhz
|
|
{
|
|
get
|
|
{
|
|
return bool.Parse(this["IsSpeedInMhz"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("IsSpeedInMhz",value.ToString().ToLower(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove MaxMemorySpeed field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveMaxMemorySpeed()
|
|
{
|
|
RemoveField("MaxMemorySpeed");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field MaxMemorySpeed exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool MaxMemorySpeedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("MaxMemorySpeed");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The maximum speed (in MHz) of PhysicalMemory.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint MaxMemorySpeed
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["MaxMemorySpeed"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("MaxMemorySpeed",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove MemoryType field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveMemoryType()
|
|
{
|
|
RemoveField("MemoryType");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field MemoryType exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool MemoryTypeExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("MemoryType");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The type of PhysicalMemory. Synchronous DRAM is also known as SDRAM Cache DRAM is also known as CDRAM CDRAM is also known as Cache DRAM SDRAM is also known as Synchronous DRAM BRAM is also known as Block RAM
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort MemoryType
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["MemoryType"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("MemoryType",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove PositionInRow field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemovePositionInRow()
|
|
{
|
|
RemoveField("PositionInRow");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field PositionInRow exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool PositionInRowExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("PositionInRow");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Specifies the position of the PhysicalMemory in a 'row'. For example, if it takes two 8-bit memory devices to form a 16- bit row, then a value of '2'means that this Memory is the second device. 0 is an invalid value for this property.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint PositionInRow
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["PositionInRow"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("PositionInRow",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove Speed field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveSpeed()
|
|
{
|
|
RemoveField("Speed");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field Speed exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool SpeedExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("Speed");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The speed of the PhysicalMemory, in nanoseconds.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint Speed
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["Speed"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("Speed",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove TotalWidth field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveTotalWidth()
|
|
{
|
|
RemoveField("TotalWidth");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field TotalWidth exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool TotalWidthExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("TotalWidth");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Total width, in bits, of the PhysicalMemory, including check or error correction bits. If there are no error correction bits, the value in this property should match that specified for DataWidth.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort TotalWidth
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["TotalWidth"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("TotalWidth",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PhysicalMemory 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_PhysicalMemory objects</returns>
|
|
public static new Collection<CIM_PhysicalMemory> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_PhysicalMemory> ret = CimBase.Enumerate<CIM_PhysicalMemory>(client, cimKeys);
|
|
return new Collection<CIM_PhysicalMemory>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_PhysicalMemory class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_PhysicalMemory objects</returns>
|
|
public static new Collection<CIM_PhysicalMemory> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_PhysicalMemory> ret = CimBase.Enumerate<CIM_PhysicalMemory>(client);
|
|
return new Collection<CIM_PhysicalMemory>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_PhysicalMemory 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_PhysicalMemory>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_PhysicalMemory class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_Chip.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|