// Copyright (c) 1997-2008 Microsoft Corporation, All Rights Reserved

#pragma autorecover
#pragma classflags(64)
#pragma namespace("\\\\.\\root\\cimv2\\power")

Instance of __Win32Provider as $PowerMeterProvider
{
  Name = "PowerMeterProvider";
  HostingModel = "Decoupled:Com";
};

Instance of __InstanceProviderRegistration
{
  Provider = $PowerMeterProvider;
  SupportsGet = TRUE;
  SupportsPut = TRUE;
  SupportsDelete = TRUE;
  SupportsEnumeration = TRUE;
};

Instance of __EventProviderRegistration
{
  Provider = $PowerMeterProvider;
  EventQueryList = {"SELECT * FROM Win32_PowerMeterEvent"};
};

[Dynamic,Provider("PowerMeterProvider") : ToInstance ToSubclass,Locale(1033),UUID("{a94766cf-0670-45b6-8ba5-04bd664d6e79}") : ToInstance] 
class Win32_PowerMeter : CIM_NumericSensor
{
  [read] string Name;
  [read,key] string DeviceID;
  [BitMap{"0", "1", "2", "3", "8"},read] uint32 SupportCapabilities;
  [read] uint32 MeterType;
  [read] uint32 SamplingPeriod;
  [read] uint32 MinimumAveragingInterval;
  [read] uint32 MaximumAveragingInterval;
  [write] uint32 AveragingInterval;
  [read] uint32 MinOperatingBudget;
  [read] uint32 MaxOperatingBudget;
  [read] boolean BudgetWriteable;
  [write] boolean BudgetEnabled;
  [write] uint32 ConfiguredBudget;
  [read] uint16 BaseUnits;
  [read] sint32 UnitModifier;
  [read] uint32 Hysteresis;
};

[WMI,Dynamic,Provider("PowerMeterProvider"),Locale(1033),guid("3eab588a-a6eb-409e-a287-f18daff7ff26")] 
class Win32_PowerMeterEvent : __ExtrinsicEvent
{
  [read,key] CIM_PowerMeter Ref EventSource;
  [ValueType("index"),read,key] uint32 EventType;
};
#pragma autorecover
#pragma classflags(64)
#pragma namespace("\\\\.\\root\\cimv2\\power")
instance of __namespace{ name="ms_409";};
#pragma namespace("\\\\.\\root\\cimv2\\power\\ms_409")

[DisplayName("Power Meter") : Amended ToSubclass,Description("A power consumption meter representation with the capability to measure and control budgeting and thresholds of the underlying metering hardware on the system.") : Amended ToSubclass,AMENDMENT, LOCALE("ms_409")] 
class Win32_PowerMeter : CIM_NumericSensor
{
  [DisplayName("Name") : Amended ToSubclass,Description("The friendly name of the power meter device.") : Amended ToSubclass] string Name;
  [DisplayName("DeviceID") : Amended ToSubclass,Description("The unique identifier of the power meter device.") : Amended ToSubclass,key] string DeviceID;
  [DisplayName("Supported Capabilities") : Amended ToSubclass,Description("The capabilities this power meter supports.") : Amended ToSubclass,BitValues{"SupportMeasurement", "SupportThresholds", "SupportBudgeting", "SupportBudgetEvents", "SupportedOnlyWhenDischarging"} : Amended ToSubclass] uint32 SupportCapabilities;
  [DisplayName("Meter Type") : Amended ToSubclass,Description("The type power meter this is, i.e. input or output power.") : Amended ToSubclass,ValueMap{"0", "1"} : Amended ToSubclass,Values{"Input", "Output"} : Amended ToSubclass] uint32 MeterType;
  [DisplayName("Sampling Period") : Amended ToSubclass,Description("The sampling period of the measurement provided by the BMC, if available, in milliseconds.") : Amended ToSubclass] uint32 SamplingPeriod;
  [DisplayName("Minimum Averaging Interval") : Amended ToSubclass,Description("The minimum interval the power meter is able to average samples internally to produce the CurrentReading.") : Amended ToSubclass] uint32 MinimumAveragingInterval;
  [DisplayName("Maximum Averaging Interval") : Amended ToSubclass,Description("The maximum interval the power meter is able to average samples internally to produce the CurrentReading.") : Amended ToSubclass] uint32 MaximumAveragingInterval;
  [DisplayName("Averaging Interval") : Amended ToSubclass,Description("The currently configured averaging interval set in the BMC.") : Amended ToSubclass] uint32 AveragingInterval;
  [DisplayName("Minimum Operating Budget") : Amended ToSubclass,Description("The minimum power budget allowed by this power meter.") : Amended ToSubclass] uint32 MinOperatingBudget;
  [DisplayName("Maximum Operating Budget") : Amended ToSubclass,Description("The maximum power budget allowed by this power meter.") : Amended ToSubclass] uint32 MaxOperatingBudget;
  [DisplayName("Budget Writeable") : Amended ToSubclass,Description("Whether this power budget is writeable. If this is false, then saving an instance with a modified CurrentBudget will fail and currently configured budget will not be changed.") : Amended ToSubclass] boolean BudgetWriteable;
  [DisplayName("Budget Enabled") : Amended ToSubclass,Description("Whether the power budget configured in the BMC is enabled.") : Amended ToSubclass] boolean BudgetEnabled;
  [DisplayName("Configured Budget") : Amended ToSubclass,Description("The power budget currently configured in this power meter. This value is marked writable. The value will take effect when the instance is saved, but only if Writeable is set to TRUE. Otherwise the save will fail.") : Amended ToSubclass] uint32 ConfiguredBudget;
  [DisplayName("Base Units") : Amended ToSubclass,Description("The base unit of the measurements.") : Amended ToSubclass] uint16 BaseUnits;
  [DisplayName("Unit Modifier") : Amended ToSubclass,Description("The Unit Modifier which determines the magnitude of the unit. For example, -3 means the reading is 0.001 times of the base unit.") : Amended ToSubclass] sint32 UnitModifier;
  [DisplayName("Hysteresis") : Amended ToSubclass,Description("The hysteresis margin.") : Amended ToSubclass] uint32 Hysteresis;
};

[DisplayName("Power Meter Event") : Amended ToSubclass,Description("Power Meter Event") : Amended ToSubclass,AMENDMENT, LOCALE("ms_409")] 
class Win32_PowerMeterEvent : __ExtrinsicEvent
{
  [DisplayName("Event Source") : Amended ToSubclass,Description("The power meter this event originated from.") : Amended ToSubclass,key] CIM_PowerMeter Ref EventSource;
  [DisplayName("Event Type") : Amended ToSubclass,Description("The type of power meter event this is.") : Amended ToSubclass,ValueMap{"0", "1", "2", "3", "4"} : Amended ToSubclass,Values{"CapabilitiesChanged", "ThresholdCrossed", "ConfigurationChanged", "BudgetCrossed", "AveragingIntervalChanged"} : Amended ToSubclass,key] uint32 EventType;
};
