353 lines
11 KiB
C#
353 lines
11 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_Watchdog.cs
|
|
//
|
|
// Contents: CIM_Watchdog is a timer that is implemented in the system hardware. It allows the hardware to monitor the state of the Operating System, BIOS, or a software component that is installed on the System. If the monitored component fails to re-arm the timer before its expiration, the hardware assumes that the System is in a critical state, and could reset the ComputerSystem. This feature can also be used as an application watchdog timer for a mission-critical application. In this case, the application would assume responsibility for re-arming the timer before expiration.
|
|
// This file was automatically generated from CIM_Watchdog.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>
|
|
///CIM_Watchdog is a timer that is implemented in the system hardware. It allows the hardware to monitor the state of the Operating System, BIOS, or a software component that is installed on the System. If the monitored component fails to re-arm the timer before its expiration, the hardware assumes that the System is in a critical state, and could reset the ComputerSystem. This feature can also be used as an application watchdog timer for a mission-critical application. In this case, the application would assume responsibility for re-arming the timer before expiration.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Watchdog")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_Watchdog", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Watchdog", IsNullable=false)]
|
|
public class CIM_Watchdog : CIM_LogicalDevice
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_Watchdog() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_Watchdog(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_Watchdog(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Remove ActionOnExpiration field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveActionOnExpiration()
|
|
{
|
|
RemoveField("ActionOnExpiration");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field ActionOnExpiration exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool ActionOnExpirationExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("ActionOnExpiration");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The action that should happen upon the expiry of the watchdog.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort ActionOnExpiration
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["ActionOnExpiration"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("ActionOnExpiration",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove MonitoredEntity field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveMonitoredEntity()
|
|
{
|
|
RemoveField("MonitoredEntity");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field MonitoredEntity exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool MonitoredEntityExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("MonitoredEntity");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The entity that is currently being monitored by the WatchDog. This property is used to identify the module that is responsible for re-arming, or whose information is used to re-arm, the watchdog at periodic intervals.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort MonitoredEntity
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["MonitoredEntity"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("MonitoredEntity",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove MonitoredEntityDescription field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveMonitoredEntityDescription()
|
|
{
|
|
RemoveField("MonitoredEntityDescription");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field MonitoredEntityDescription exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool MonitoredEntityDescriptionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("MonitoredEntityDescription");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A string that describes more textual information about the monitored entity.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual string MonitoredEntityDescription
|
|
{
|
|
get
|
|
{
|
|
return this.GetField("MonitoredEntityDescription")[0];
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("MonitoredEntityDescription",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove MonitoredEntityOnLastExpiration field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveMonitoredEntityOnLastExpiration()
|
|
{
|
|
RemoveField("MonitoredEntityOnLastExpiration");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field MonitoredEntityOnLastExpiration exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool MonitoredEntityOnLastExpirationExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("MonitoredEntityOnLastExpiration");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Monitored entity at the time of last timer expiry.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual ushort MonitoredEntityOnLastExpiration
|
|
{
|
|
get
|
|
{
|
|
return ushort.Parse(this["MonitoredEntityOnLastExpiration"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("MonitoredEntityOnLastExpiration",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove TimeOfLastExpiration field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveTimeOfLastExpiration()
|
|
{
|
|
RemoveField("TimeOfLastExpiration");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field TimeOfLastExpiration exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool TimeOfLastExpirationExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("TimeOfLastExpiration");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The time of the last timer expiry.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual CimDateTime TimeOfLastExpiration
|
|
{
|
|
get
|
|
{
|
|
return CimDateTime.Parse(this["TimeOfLastExpiration"][0]);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("TimeOfLastExpiration",value.ToString());
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove TimeoutInterval field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveTimeoutInterval()
|
|
{
|
|
RemoveField("TimeoutInterval");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field TimeoutInterval exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool TimeoutIntervalExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("TimeoutInterval");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The timeout interval that is used by the watchdog, in MicroSeconds.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint TimeoutInterval
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["TimeoutInterval"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("TimeoutInterval",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Remove TimerResolution field.
|
|
/// Note: This method will succeed only if this field is optional in the concrete object.
|
|
/// </summary>
|
|
public virtual void RemoveTimerResolution()
|
|
{
|
|
RemoveField("TimerResolution");
|
|
}
|
|
|
|
/// <summary>
|
|
/// Is true if the field TimerResolution exists in the current object,
|
|
/// otherwise is false.
|
|
/// </summary>
|
|
public virtual bool TimerResolutionExist
|
|
{
|
|
get
|
|
{
|
|
return ContainsField("TimerResolution");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Resolution of the timer. For example, if this value is 100, then the timer can expire anytime between (TimeoutInterval- 100) microseconds or (TimeoutInterval+100) microseconds.
|
|
/// </summary>
|
|
[CimField(false, false)]
|
|
public virtual uint TimerResolution
|
|
{
|
|
get
|
|
{
|
|
return uint.Parse(this["TimerResolution"][0], CultureInfo.InvariantCulture);
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("TimerResolution",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Watchdog 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_Watchdog objects</returns>
|
|
public static new Collection<CIM_Watchdog> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_Watchdog> ret = CimBase.Enumerate<CIM_Watchdog>(client, cimKeys);
|
|
return new Collection<CIM_Watchdog>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_Watchdog class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_Watchdog objects</returns>
|
|
public static new Collection<CIM_Watchdog> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_Watchdog> ret = CimBase.Enumerate<CIM_Watchdog>(client);
|
|
return new Collection<CIM_Watchdog>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_Watchdog 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_Watchdog>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_Watchdog class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_LogicalDevice.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|