windows-nt/Source/XPSP1/NT/base/busdrv/acpi/wmiacpi/sample/wmi-acpi.htm
2020-09-26 16:20:57 +08:00

1805 lines
114 KiB
HTML
Raw Blame History

<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<style>
<!--
p.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Times New Roman";
margin-left:0in; margin-right:0in; margin-top:0in}
table.MsoNormalTable
{mso-style-parent:"";
font-size:10.0pt;
font-family:"Times New Roman"}
p.Tt
{mso-style-parent:"";
margin-top:1.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
line-height:11.0pt;
page-break-after:avoid;
font-size:9.5pt;
font-family:Arial;
font-weight:bold;
font-style:italic;
}
p.Ch
{mso-style-parent:"";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:27.0pt;
margin-left:0in;
line-height:27.0pt;
page-break-after:avoid;
font-size:22.0pt;
font-family:Arial;
}
p.Tr
{mso-style-parent:"";
margin-bottom:.0001pt;
text-align:right;
line-height:1.0pt;
page-break-after:avoid;
border:medium none;
padding:0in;
font-size:4.0pt;
font-family:"Times New Roman";
margin-left:0in; margin-right:0in; margin-top:0in}
p.Le
{margin-bottom:.0001pt;
text-align:right;
line-height:8.0pt;
font-size:6.0pt;
font-family:"Times New Roman";
margin-left:0in; margin-right:0in; margin-top:0in}
p.Tpf
{margin-top:1.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
line-height:11.0pt;
tab-stops:14.0pt 28.0pt;
font-size:9.5pt;
font-family:"Times New Roman";
}
p.MsoToc1
{margin-bottom:.0001pt;
line-height:11.0pt;
page-break-after:avoid;
tab-stops:right dotted 6.0in;
font-size:9.5pt;
font-family:"Times New Roman";
margin-left:0in; margin-right:0in; margin-top:0in}
p.MsoToc2
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:14.0pt;
margin-bottom:.0001pt;
line-height:11.0pt;
tab-stops:right dotted 6.0in;
font-size:9.5pt;
font-family:"Times New Roman";
}
h1
{mso-style-parent:"";
margin-top:10.0pt;
margin-right:0in;
margin-bottom:4.0pt;
margin-left:0in;
line-height:22.0pt;
page-break-after:avoid;
border:medium none;
padding:0in;
font-size:20.0pt;
font-family:Arial;
font-weight:normal}
p.MsoListBullet
{margin-top:0in;
margin-right:0in;
margin-bottom:4.0pt;
margin-left:.25in;
text-indent:-.25in;
tab-stops:list blank .25in;
font-size:10.0pt;
font-family:"Times New Roman";
}
p.Ex
{mso-style-parent:"";
margin-bottom:.0001pt;
line-height:11.0pt;
tab-stops:19.5pt 39.0pt 58.5pt 78.0pt 97.5pt 117.0pt 136.5pt 156.0pt 175.5pt 195.0pt 214.5pt 3.25in 253.5pt 273.0pt 292.5pt 312.0pt 331.5pt;
font-size:8.0pt;
font-family:"Courier New";
margin-left:0in; margin-right:0in; margin-top:0in}
p.Thf
{margin-top:1.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
line-height:11.0pt;
page-break-after:avoid;
font-size:9.5pt;
font-family:"Times New Roman";
font-weight:bold;
}
p.Th
{margin-top:1.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:12.0pt;
line-height:11.0pt;
page-break-after:avoid;
font-size:9.5pt;
font-family:"Times New Roman";
font-weight:bold;
}
p.Tp
{margin-top:1.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:12.0pt;
line-height:11.0pt;
tab-stops:14.0pt 28.0pt;
font-size:9.5pt;
font-family:"Times New Roman";
}
p.Lp1
{margin-top:0in;
margin-right:0in;
margin-bottom:4.0pt;
margin-left:.25in;
font-size:10.0pt;
font-family:"Times New Roman";
}
p.Term1
{mso-style-parent:"";
margin-bottom:.0001pt;
line-height:12.0pt;
page-break-after:avoid;
font-size:10.0pt;
font-family:"Times New Roman";
font-weight:bold;
margin-left:0in; margin-right:0in; margin-top:0in}
p.Def1
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:10.0pt;
font-size:10.0pt;
font-family:"Times New Roman";
}
h2
{margin-top:7.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
line-height:19.0pt;
page-break-after:avoid;
font-size:17.0pt;
font-family:Arial;
font-weight:normal}
-->
</style>
</head>
<body>
<div style="border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.5pt solid windowtext; padding-left: 0in; padding-right: 0in; padding-top: 0in; padding-bottom: 1.0pt">
<p class="MsoNormal" style="border: medium none; padding: 0in"><b>
<span style="font-size: 30.0pt; font-family: Arial Black">WinHEC 99 White
Paper </span></b>
</div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td width="295" valign="top" style="width: 221.4pt; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="Tt">Windows<span style="font-size: 8.0pt"><EFBFBD></span> Hardware
Engineering Conference:<br>
Advancing the Platform</td>
<td width="304" valign="top" style="width: 228.0pt; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" align="right" style="text-align: right">&nbsp;</td>
</tr>
</table>
<p class="Ch"><a name="_Toc441982198">Windows&nbsp;2000 Instrumentation: WMI and ACPI</a></p>
<p class="Tt">Abstract</p>
<div style="mso-border-top-alt: solid windowtext .75pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding: 0in">
<p class="Tr">&nbsp;</div>
<p class="MsoNormal">This paper describes the process that system manufacturers
(OEMs) can use to provide instrumentation information by including ACPI objects
in the systems they build that will be recognized by Microsoft<66> Windows<77>
Management Instrumentation (WMI). This information applies for Windows&nbsp;2000 and
Windows&nbsp;98 OSR 1. By including ACPI objects in the systems they build, OEMs can
take advantage of a generic mapping driver that allows WMI to make the
information available to the instrumentation consumers.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The ACPI subsystem contains a wealth of instrumentation
information; OEMs are encouraged to use ACPI to add additional platform specific
instrumentation information. However, ACPI objects are not readily accessible by
instrumentation data consumers such as Web-Based Enterprise Management (WBEM).
</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">This paper assumes the reader is familiar with driver
mapping under Windows operating systems and the Data Block GUID Mapping control
method for WMI. References for background and details are cited at
http://www.microsoft.com/hwdev/manageability/; ACPI implementation information
is available at http://www.teleport.com/~acpi/.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><!--[if supportFields]>&nbsp;DATE \@ &quot;MMMM d, yyyy&quot; \*
MERGEFORMAT <![endif]-->March 12, 1999<!--[if supportFields]><![endif]--></p>
<p class="Le">&nbsp;</p>
<p class="Le">&nbsp;</p>
<p class="Tt">Disclaimer and Copyright</p>
<div style="mso-border-top-alt: solid windowtext .75pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding: 0in">
<p class="Tr">&nbsp;</div>
<p class="Tpf" style="line-height: 9.0pt"><b><span style="font-size: 8.0pt">
Microsoft Disclaimer: </span></b><span style="font-size: 7.0pt">This document is
for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR
IMPLIED, IN THIS DOCUMENT.</span></p>
<p class="Tpf" style="line-height: 9.0pt"><span style="font-size: 7.0pt">
Microsoft Corporation may have patents or pending patent applications,
trademarks, copyrights, or other intellectual property rights covering subject
matter in this document. The furnishing of this document does not give you any
license to the patents, trademarks, copyrights, or other intellectual property
rights except as expressly provided in any written license agreement from
Microsoft Corporation. </span></p>
<p class="Tpf" style="line-height: 9.0pt"><span style="font-size: 7.0pt">
Microsoft does not make any representation or warranty regarding specifications
in this document or any product or item developed based on these specifications.
Microsoft disclaims all express and implied warranties, including but not
limited to the implied warranties or merchantability, fitness for a particular
purpose and freedom from infringement. Without limiting the generality of the
foregoing, Microsoft does not make any warranty of any kind that any item
developed based on these specifications, or any portion of a specification, will
not infringe any copyright, patent, trade secret or other intellectual property
right of any person or entity in any country. It is your responsibility to seek
licenses for such intellectual property rights where appropriate. Microsoft
shall not be liable for any damages arising out of or in connection with the use
of these specifications, including liability for lost profit, business
interruption, or any other damages whatsoever. Some states do not allow the
exclusion or limitation of liability or consequential or incidental damages; the
above limitation may not apply to you. </span></p>
<p class="Tpf" style="line-height: normal"><span style="font-size: 7.0pt">
Microsoft, DirectX, MS&#8209;DOS, Win32, Windows, and Windows&nbsp;NT are registered
trademarks of Microsoft Corporation. Other product and company names mentioned
herein may be the trademarks of their respective owners.</span></p>
<p class="Tpf" style="line-height: normal"><span style="font-size: 7.0pt"><EFBFBD> 1999
Microsoft Corporation. All rights reserved.</span></p>
<p class="Tt">&nbsp;</p>
<p class="Tt">Contents</p>
<div style="mso-border-top-alt: solid windowtext .75pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding: 0in">
<p class="Tr">&nbsp;</div>
<p class="MsoToc1"><!--[if supportFields]>&nbsp;TOC \o &quot;1-2&quot; <![endif]-->Technology
Overview for Windows&nbsp;2000
Instrumentation.......................................................................................
<!--[if supportFields]>PAGEREF _Toc445868966 \h <![endif]-->3<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900360036000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc1">WMI Overview for Windows&nbsp;2000
Instrumentation...................................................................................................
<!--[if supportFields]>PAGEREF _Toc445868967 \h <![endif]-->3<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900360037000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc1">ACPI-to-WMI Mapper Goals for Windows&nbsp;2000
Instrumentation...........................................................................
<!--[if supportFields]>PAGEREF _Toc445868968 \h <![endif]-->4<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900360038000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc1">ACPI Control Method Naming Conventions and Functionality for
Windows&nbsp;2000 Instrumentation................ <!--[if supportFields]>PAGEREF
_Toc445868969 \h <![endif]-->5<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900360039000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc1">Data Block Design for Windows&nbsp;2000
Instrumentation.............................................................................................
<!--[if supportFields]>PAGEREF _Toc445868970 \h <![endif]-->8<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900370030000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc1">FAQ about WMI and ACPI for Windows&nbsp;2000
Instrumentation...........................................................................
<!--[if supportFields]>PAGEREF _Toc445868971 \h <![endif]-->11<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900370031000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc1"><span style="layout-grid-mode: line">ASL Methods and Sample
Code</span>..................................................................................................................................
<!--[if supportFields]>PAGEREF _Toc445868972 \h <![endif]-->11<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900370032000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc2"><span style="layout-grid-mode: line">ASL Sample Code for an
Event and Initiating Method</span>......................................................................................
<!--[if supportFields]>PAGEREF _Toc445868973 \h <![endif]-->12<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900370033000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc2">Sample ASL Code Embedding MOD Data in ASL..............................................................................................
<!--[if supportFields]>PAGEREF _Toc445868974 \h <![endif]-->14<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900370034000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="MsoToc2">Sample .Mof
File.......................................................................................................................................................
<!--[if supportFields]>PAGEREF _Toc445868975 \h <![endif]-->17<!--[if gte mso 9]><xml>
<w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003400340035003800360038003900370035000000</w:data>
</xml><![endif]--><!--[if supportFields]><![endif]--></p>
<p class="Le"><!--[if supportFields]><![endif]-->&nbsp;</p>
<p><span style="font-size: 20.0pt; font-family: Arial">
<br clear="all" style="page-break-before: always">
&nbsp;</span></p>
<div style="mso-border-top-alt: solid windowtext .5pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding-left: 0in; padding-right: 0in; padding-top: 1.0pt; padding-bottom: 0in">
<h1><a name="_Toc440694666">Technology Overview</a> for Windows&nbsp;2000
Instrumentation</h1>
</div>
<p class="MsoNormal">The ACPI-to-WMI mapping functionality is achieved by means
of two device drivers provided with the Windows&nbsp;2000 and Windows&nbsp;98 OSR1
operating systems: </p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Acpi.sys is the regular ACPI device driver with some
modifications. </p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Wmiacpi.sys registers with Plug and Play ID PNP0c14. </p>
<p class="Le">&nbsp;</p>
<p class="MsoNormal">OEMs can differentiate their PC system capabilities by
writing ACPI Source Language (ASL) code and a Managed Object Format (.mof or MOF)
file. The .mof file can be in the BIOS or on disk. For more information about
MOF, see the <20>MOF Data Types<65> section later in this paper.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">ASL code is never executed directly by the Wmiacpi.sys
driver. ASL code is always executed by the Acpi.sys driver (see the ASL
information at http://www.teleport.com/~acpi/). Wmiacpi.sys will invoke Acpi.sys
to call control methods that access the management data exposed by the mapping
driver.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Microsoft does not ship a .mof file that is associated with
the Wmiacpi.sys driver. The only information surfaced through ACPI is the
temperature zone information, which is surfaced through and associated with the
Acpi.sys device driver. </p>
<p class="MsoNormal">&nbsp;</p>
<div style="mso-border-top-alt: solid windowtext .5pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding-left: 0in; padding-right: 0in; padding-top: 1.0pt; padding-bottom: 0in">
<h1><a name="_Toc440694667">WMI Overview</a> for Windows&nbsp;2000 Instrumentation</h1>
</div>
<p class="MsoNormal">WMI organizes individual data items (properties) into data
blocks (structures) that contain related information. Data blocks may have one
or more data items. Each data item has a unique index within the data block, and
each data block is named by a globally unique 128-bit number called a globally
unique identifier (GUID). WMI can provide notifications to the data producer as
to when to start and stop collecting the data items that compose a data block.
WMI has no knowledge of the data format for individual data blocks.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">WMI functionality allows for querying all instances of a
data block or a single instance of a data block. It also allows for setting all
data items in an instance of a data block or a single data item within a single
instance of a data block.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">In addition to queries and sets, WMI allows WMI method
calls, which are functionally equivalent to an I/O control (IOCTL) call to a
device. Each WMI method call is identified by a GUID and a method index for that
GUID. All WMI method calls use one buffer for input and output parameters. WMI
allows notifications of significant events to be delivered to interested
user-mode applications. Each type of event is uniquely named by a GUID. Events
may also carry a data block with additional information about the event. WMI can
provide notifications to the event generator about when to enable and disable an
event type.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">WMI is an open architecture that allows OEMs to define
their own data blocks, methods, and events. Along with the data that composes
the custom data block, the OEM must also provide a description that generally
represents how a data block or WMI method is mapped to a 2-character ID. This
2&#8209;character ID is part of the names of the control methods that act upon the
data block. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">For example, when a call is made to query about the data
block represented by a WMI GUID, the mapper will evaluate the WQ<i>xx</i>
control method (where <i>xx</i> is the 2-character ID mapped to that GUID).
These mappings are defined by the ACPI code and obtained by the mapper
evaluating the _WDG control method. For more information, see <20>ACPI Control
Method Naming Conventions and Functionality<74> later in this paper.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The mapping process is similar for events. The _WDG control
method provides a mapping between the WMI event GUID that represents the event
and the notification code specified in the ASL notify instruction. For example,
when ACPI provides a callback to the mapper that a control method executed a <b>
notify(mapper-device, 0x81)</b><i> </i>function<i>,</i> the mapper will look up
the WMI GUID mapped to 0x81 and use this WMI GUID in building the WMI event.
Before launching the WMI event, the mapper will evaluate _WED to retrieve any
additional data that belongs with the event.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc409597061"><b>Loading the Mapping Driver</b></a><b>.
</b>The Plug and Play ID PNP0c14 is assigned as the WMI-mapping pseudo device;
the operating system device INFs (Plug and Play ID-to-device driver lookup
table) point this Plug and Play ID to the ACPI-to-WMI mapping driver. To cause
the ACPI-to-WMI mapping driver to load, an ACPI system needs to define one or
more devices with that Plug and Play ID in the ACPI device tree. Each device
declared in the ACPI device tree would have its own operating system device
object with its own set of mappings. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">In this way, different sets of data blocks can be organized
in the appropriate place within the device tree. This organization allows the
different devices and their corresponding data blocks to come and go from the
ACPI device tree. Note that if there are multiple WMI-mapping pseudo devices in
the ACPI device tree, each device must have a unique value for its _UID.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc409597062"><b>Mapping Driver Functionality</b></a><b>.
</b>Essentially the mapping driver will do the following:</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Manage all registration and unregistration with WMI and other
interactions with the operating system. This registration of data and data
blocks is done when the mapper gets the IRP_MN_REGINFO IRP.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>At WMI initialization time, the mapping driver will query an ACPI
method for the list of data block, event, and method GUIDs it supports, as well
as the mapping from the GUID to control method IDs. With this information, the
mapping driver will register those GUIDs with WMI.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Translate data block queries, sets, and method call I/O IRPs into
the appropriate ACPI control method call.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Receive notifications from the ACPI event handler control methods
and relaunch them as WMI events.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Translate strings between ASCIZ and UNICODE for data blocks marked
as wholly composed of a string.</p>
<p class="Le">&nbsp;</p>
<div style="mso-border-top-alt: solid windowtext .5pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding-left: 0in; padding-right: 0in; padding-top: 1.0pt; padding-bottom: 0in">
<h1><a name="_Toc440694668">ACPI-to-WMI Mapper Goals</a> for Windows&nbsp;2000
Instrumentation</h1>
</div>
<p class="MsoNormal">The following list describes the goals for the ACPI-to-WMI
mapper:</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Expose data maintained by the hardware or firmware and accessible
through ACPI to user-mode instrumentation data consumers, such as WBEM or DMI.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Allow specific ACPI control methods to be called from a user-mode
instrumentation data consumer or hardware configuration application<6F>for example,
from a control panel applet.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Deliver specific ACPI events to all user-mode callers that request
notification of that particular event.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Allow OEMs to include OEM-specific data blocks, user-mode<64>callable
ACPI control methods, and events without requiring any changes to the
ACPI-to-WMI mapper.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Allow general-purpose data consumer applications<6E>those written
without any special knowledge of the data blocks exposed by a particular
machine<EFBFBD>to be able to access and understand the data blocks, user-mode<64>callable
ACPI control methods, and events being mapped<65>including those that are OEM
specific.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Define standard data block formats, user-mode<64>callable ACPI
control methods, events and their WMI GUID mappings for common data blocks, and
callable control methods and events expected to be provided by all OEMs. This
can include dynamic data and functions identified by the industry in the SMBIOS
specification and other specifications.</p>
<p class="Le">&nbsp;</p>
<p class="MsoNormal">These goals are achieved by having supporting code in the
ACPI-to-WMI mapper (Wmiacpi.sys) as well as in the core ACPI code itself (Acpi.sys).</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The following are <i>not</i> goals for the ACPI-to-WMI
mapper:</p>
<p class="MsoListBullet" style="page-break-after: avoid">
<span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>To have specific knowledge about any data block that passes
through the mapper.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>To provide interfaces specifically for SMBIOS data and functions.
The mapper is an open architecture that is not restricted to SMBIOS data and
functionality.</p>
<p class="Le">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc440962623"><b>How SMBIOS-provided information
is handled</b></a><b>. </b>Vendors who want to provide OEM and system-specific
instrumentation data may choose to use SMBIOS as the mechanism. To use the
capabilities of the WMI infrastructure to surface this SMBIOS data, they must
conform to any SMBIOS version between 2.0 and 2.2. (Microsoft intends to support
future revisions of SMBIOS as and when they appear. To date, we have only one
SMBIOS 2.2 machine for testing). This allows the Microsoft Win32<span style="font-size: 8.0pt"><EFBFBD></span>
provider<EFBFBD>which is shipped with Windows&nbsp;2000 and future versions of Windows and
is available as an update to Windows&nbsp;98<EFBFBD>to populate almost all of the SMBIOS-provided
information into the CIMv2 namespace. In particular, almost all of the
information is put into Win32 classes. Some of these Win32 classes are derived
from the CIMv2.1 physical MOF. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The one exception where SMBIOS information will not be
automatically populated by the Win32 provider into the CIMv2 namespace is SMBIOS
vendor-specific data. Such SMBIOS vendor-defined data will be placed in a
<EFBFBD>VendorBucket<EFBFBD> class in a <20>Root\VendorDefined<65> namespace, and will not be
available in the CIMv2 namespace by default. Any system vendor who wants to
provide such data must write a provider that will interpret this data.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The SMBIOS data is read only once, either at boot time in
Windows&nbsp;2000 or post boot on Windows&nbsp;98. Dynamic updates that are made to the
SMBIOS data after it has been read will not be reflected in the namespaces in
this implementation. Microsoft is working with the industry to define standard
ACPI methods for dynamic updates.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The SMBIOS raw data will be available as a WMI data block
in Windows&nbsp;2000 and as a flat file in Windows&nbsp;98. This data will be interpreted
and populated into the namespaces by the Win32 provider.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><b>Note:</b> The Win32 provider capabilities used to read
and populate SMBIOS data as described above will be available in Windows&nbsp;2000
Beta 3.</p>
<p class="MsoNormal">&nbsp;</p>
<div style="mso-border-top-alt: solid windowtext .5pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding-left: 0in; padding-right: 0in; padding-top: 1.0pt; padding-bottom: 0in">
<h1><a name="_Toc409597063">ACPI Control Method Naming Conventions and
Functionality</a> for Windows&nbsp;2000 Instrumentation</h1>
</div>
<p class="MsoNormal">The <a name="_Toc409597064">Data Block GUID Mapping control
method</a> named _WDG evaluates to a buffer that has the GUID mapping
information for data blocks, events, and WMI methods. The result of the
evaluation is a buffer containing an array of the following structure. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="Ex" style="page-break-after: avoid">typedef struct</p>
<p class="Ex" style="page-break-after: avoid">{</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp; GUID guid;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
GUID that names data block</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp; union</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CHAR ObjectId[2];&nbsp; //
2-character ACPI ID&nbsp; (Data Blocks and Methods)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct </p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -42.0pt">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UCHAR NotificationValue;&nbsp; // Byte value passed by event handler
control method</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UCHAR Reserved[1];</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } NotifyId;</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp; USHORT InstanceCount;&nbsp; //
Number of separate instances of data block</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp; USHORT Flags;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
Flags</p>
<p class="Ex">};</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">// Set this flag if the WCxx control method should be run to
whenever the first </p>
<p class="Ex">// data consumer is interested in collecting the data block and
whenever the last data </p>
<p class="Ex">// consumer is no longer interested.</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">#define WMIACPI_REGFLAG_EXPENSIVE&nbsp;&nbsp; 0x1</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">// Set this flag if the GUID represents a set of WMI method calls
and not a data block</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">#define WMIACPI_REGFLAG_METHOD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x2</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">// Set this flag if the data block is wholly composed of a string
and should be </p>
<p class="Ex">// translated from ASCIZ to UNICODE in returning queries and from
UNICODE to ASCIZ </p>
<p class="Ex">// when passing sets</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">#define WMIACPI_REGFLAG_STRING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x04</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">// Set this flag if the guid maps to an event rather than a data
block or method</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">#define WMIACPI_REGFLAG_EVENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x08</p>
<p class="Ex">&nbsp;</p>
<p class="Le">&nbsp;</p>
<p class="MsoNormal">Each element in the array describes the mapping of a WMI
data block GUID to a 2-letter ACPI method identifier used to compose the method
names that operate on the data block or on the notification value used in the
ASL <b>Notify</b> operation. Each element of the array also contains the number
of instances of the data block that exist and any flags that are set.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">This control method is required.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc409597067">The following table summarizes the
information for each control method described later in this section.</a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="Tt">Control Method Summary</p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td width="120" valign="top" style="width: 1.25in; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf">Control method</td>
<td width="96" valign="top" style="width: 1.0in; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Th">Object name</td>
<td width="103" valign="top" style="width: 77.4pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Th">Parameters</td>
<td width="281" valign="top" style="width: 210.6pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Th">Control method required</td>
</tr>
<tr>
<td width="120" valign="top" style="width: 1.25in; padding: 0in">
<p class="Tpf">Data Block Query</td>
<td width="96" valign="top" style="width: 1.0in; padding: 0in">
<p class="Th"><span style="font-weight: normal">WQ<i>xx</i></span></td>
<td width="103" valign="top" style="width: 77.4pt; padding: 0in">
<p class="Th"><span style="font-weight: normal">ULONG</span></td>
<td width="281" valign="top" style="width: 210.6pt; padding: 0in">
<p class="Th"><span style="font-weight: normal">Yes.</span></td>
</tr>
<tr>
<td width="120" valign="top" style="width: 1.25in; padding: 0in">
<p class="Tpf">Data Block Set</td>
<td width="96" valign="top" style="width: 1.0in; padding: 0in">
<p class="Tp">WS<i>xx</i></td>
<td width="103" valign="top" style="width: 77.4pt; padding: 0in">
<p class="Tp">ULONG, buffer</td>
<td width="281" valign="top" style="width: 210.6pt; padding: 0in">
<p class="Tp">No. Not required for data blocks that are read&nbsp;only.</td>
</tr>
<tr>
<td width="120" valign="top" style="width: 1.25in; padding: 0in">
<p class="Tpf">Data Item Set</td>
<td width="96" valign="top" style="width: 1.0in; padding: 0in">
<p class="Tp">Not supported</td>
<td width="103" valign="top" style="width: 77.4pt; padding: 0in">
<p class="Tp">&nbsp;</td>
<td width="281" valign="top" style="width: 210.6pt; padding: 0in">
<p class="Tp">&nbsp;</td>
</tr>
<tr>
<td width="120" valign="top" style="width: 1.25in; padding: 0in">
<p class="Tpf">Method Execution</td>
<td width="96" valign="top" style="width: 1.0in; padding: 0in">
<p class="Tp">WM<i>xx</i></td>
<td width="103" valign="top" style="width: 77.4pt; padding: 0in">
<p class="Tp">ULONG, method&nbsp;ID, <br>
buffer</td>
<td width="281" valign="top" style="width: 210.6pt; padding: 0in">
<p class="Tp">Yes. Required for data blocks specified in the data block GUID
mapping array and that have the WMIACPI_REG_METHOD flag set.</td>
</tr>
</table>
<p class="MsoNormal">&nbsp;</p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td width="120" valign="top" style="width: 1.25in; padding: 0in">
<p class="Tpf">Event Enable and Disable</td>
<td width="96" valign="top" style="width: 1.0in; padding: 0in">
<p class="Tp">WE<i>xx</i></td>
<td width="103" valign="top" style="width: 77.4pt; padding: 0in">
<p class="Tp">UCHAR</td>
<td width="281" valign="top" style="width: 210.6pt; padding: 0in">
<p class="Tp">No. Support only when keeping the event enabled incurs
significant overhead.</td>
</tr>
<tr>
<td width="120" valign="top" style="width: 1.25in; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tpf">Data Collection <br>
Enable and Disable</td>
<td width="96" valign="top" style="width: 1.0in; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tp">WC<i>xx</i></td>
<td width="103" valign="top" style="width: 77.4pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tp">UCHAR</td>
<td width="281" valign="top" style="width: 210.6pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tp">No. Support only when data collecting for the data block
incurs significant overhead.</td>
</tr>
</table>
<p class="Le">&nbsp;</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b>Data Block Query Control Method. </b>If the Data Block GUID
Mapping control method describes a data block that does not have the
WMIACPI_REG_METHOD flag set, there needs to be a control method that evaluates
to the contents of an instance of the data block. </p>
<p class="Lp1">By convention, the name of the object is WQ<i>xx</i>, where <i>xx</i>
is the 2-character ID that maps to the GUID being queried. One parameter is
passed to the method<6F>the index of the instance, which is of type ULONG. Data
blocks registered with only a single instance can ignore the parameter. If the
result of the evaluation of the WQ<i>xx</i> method is a string, then the mapper
will convert that string to UNICODE so that it can be understood by WMI. </p>
<p class="Lp1">This control method is required.</p>
<p class="MsoListBullet"><a name="_Toc409597068">
<span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b>Data Block Set Control Method</b></a><b>. </b>If the Data Block
GUID Mapping control method describes a data block that does not have the
WMIACPI_REG_METHOD flag set, there needs to be a control method that evaluates
to the contents of an instance of the data block. </p>
<p class="Lp1">By convention, the name of the object is WS<i>xx</i>, where <i>xx</i>
is the 2-character ID that maps to the GUID being set. Two parameters are passed
to the method; one is a ULONG that is the index of the instance, and the other
is a buffer that contains the new values for the data block. </p>
<p class="Lp1">If the GUID for the data block is registered with the
WMIACPI_REGFLAG_STRING flag, then the mapper assumes that the data block passed
is wholly composed of a single string and will convert that string from UNICODE
to ASCIZ so that it can be understood by the WS<i>xx</i> control method. </p>
<p class="Lp1">This control method is not required for those data blocks that
are read only. </p>
<p class="Lp1">Because the mapper is unaware of the format of the data block
passed by the caller of the WMI method, it will pass the buffer as a single
buffer parameter to the WM<i>xx</i> control method. The control method can use
the ASL instructions <b>CreateBitField</b>, <b>CreateDWordField</b>, <b>
CreateField</b>, and <b>CreateWordField</b> to break up the buffer into its
parts</p>
<p class="MsoListBullet"><a name="_Toc409597069">
<span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b>Data Item Set Control Method</b></a><b>. </b>Setting of
individual data items within a data block is not supported. Typically, data
items that can be modified should be placed in their own data block or the
entire data block should be modified.</p>
<p class="MsoListBullet"><a name="_Toc409597070">
<span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b>Method Execution Control Method</b></a><b>. </b>If the Data
Block GUID Mapping control method describes a data block that does have the
WMIACPI_REG_METHOD flag set, there needs to be a control method that performs
the action required of the method. </p>
<p class="Lp1">By convention, the name of the control method is WM<i>xx</i>,
where <i>xx</i> is the 2-character ID that maps to the GUID. This method call
has three parameters; the first is a ULONG that has the instance index being
executed; the second contains the method ID for the method being executed; and
the third is a buffer that contains the input for the method call. </p>
<p class="Lp1">If the GUID for the WMI method is registered with the
WMIACPI_REGFLAG_STRING flag, then the mapper assumes that buffer passed in is a
string. The mapper will convert the incoming string from UNICODE to ASCIZ. </p>
<p class="Lp1">If the result of the WM<i>xx</i> control method is a string, the
mapper will convert the result string from ASCIZ to UNICODE. The return value of
the WM<i>xx</i> method should be a buffer with the result of the method call.
</p>
<p class="Lp1">This control method is<b> </b>required for those data blocks
specified in the Data Block GUID Mapping array that have the WMIACPI_REG_METHOD
flag set. </p>
<p class="Lp1">Because the mapper is unaware of the format of the data block
passed by the caller of the WMI method, it will pass the buffer as a single
buffer parameter to the WM<i>xx</i> control method. The control method can use
the ASL instructions <b>CreateBitField</b>, <b>CreateDWordField</b>, <b>
CreateField</b>, and <b>CreateWordField</b> to break the buffer into its parts.</p>
<p class="MsoListBullet"><a name="_Toc409597071">
<span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b>Event Enable and Disable Control Method</b></a><b>. </b>For
each event specified in the Event GUID Mapping control method that has the
WMIACPI_REG_EXPENSIVE flag set, there needs to be a control method that is
invoked whenever launching of the event should be enabled and disabled. </p>
<p class="Lp1">By convention, the control method is named WE<i>xx</i>, where <i>
xx</i> is the hex value of the notification code passed by the event handler
control method. This method has one parameter, a UCHAR that has a value of 0 if
the event is to be disabled or a nonzero value if it is to be enabled. </p>
<p class="Lp1">This method is optional and should only be supported if keeping
the event enabled incurs significant overhead.</p>
<p class="MsoListBullet"><a name="_Toc409597072">
<span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b>Data Collection Enable and Disabl</b></a><b>e Control Method.
</b>For each data block described in the Data Block GUID Mapping control method
that has the WMIACPI_REG_EXPENSIVE flag set, there needs to be a control method
that is invoked whenever collection of the data that composes the data block
should be enabled and disabled </p>
<p class="Lp1">By convention, the control method is named WC<i>xx</i>, where <i>
xx</i> is the 2-character ID that maps to the GUID. This method has one
parameter, a UCHAR that has a value of 0 if data block collection is to be
disabled or a nonzero value if it is to be enabled. </p>
<p class="Lp1">This method is optional and should only be supported if
collecting the data for the data block incurs significant overhead.</p>
<p class="MsoListBullet"><a name="_Toc409597073">
<span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><b>Additional Event Data</b></a><b>. </b>The _WED control method
is evaluated by the mapper in response to receiving a notification from a
control method. The results of the evaluation are passed as part of the WMI
event information. This mechanism allows additional data to be included with an
event. </p>
<p class="Lp1">The control method takes one parameter, which is the notification
code that caused the notification to occur. If the result of the _WED control
method is a string, then the string is converted from ASCIZ to UNICODE before
launching the WMI event.</p>
<p class="Le">&nbsp;</p>
<div style="mso-border-top-alt: solid windowtext .5pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding-left: 0in; padding-right: 0in; padding-top: 1.0pt; padding-bottom: 0in">
<h1><a name="_Toc409597075">Data Block Design </a>for Windows&nbsp;2000
Instrumentation </h1>
</div>
<p class="MsoNormal"><b>Design Considerations. </b>Consider the following in
designing data blocks for instrumentation under Windows&nbsp;2000:</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Data items that are read-only and are commonly used together
should be combined into a single data block.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Data items that are strings must be segregated into their own data
block and registered with the WMIACPI_REGFLAG_STRING flag set so that the mapper
can convert between ASCIZ and UNICODE.</p>
<p class="MsoListBullet"><span style="font-family: Symbol"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>Data items that can be set individually should be segregated into
their own data blocks. For example, a set of data items that must be set all at
the same time can be combined into a single data block.</p>
<p class="Le">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc409597076"><b>MOF</b></a><b> Data Types. </b>
The Managed Object Format (MOF) for the data blocks implemented can be supplied
as either a resource attached to a file or as the buffer that results from the
evaluation of a control method. To establish the former, either bind the
resource to the Wmiacpi.sys image or establish a REG_EXPAND_SZ registry value
named <b>MofImagePath</b> under the WMIACPI service key. The contents of the
value is a path to the image file that contains the resource. In either case,
the resource must be named <b>MofResourceName</b>.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The buffer resulting from the evaluation of the WQ<i>xx</i>
control method assigned to the binary MOF GUID describes all data blocks, WMI
methods, and events for the device in a compressed binary format. This binary
data is created by building a text file using the MOF language and compiling it
with the MOF compiler.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">MOF data types are very rich. MOF supports the basic data
types of 8-, 16-, 32-, and 64-bit signed and unsigned integers, Boolean terms,
floating points, strings, and UTC datetimes. Embedded classes<65>that is,
structures that can contain basic data types and other embedded classes<65>are also
supported. In addition, fixed and variable length arrays of basic data types and
embedded classes are supported. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The MOF language defines the data types shown in the
following table.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="Tt">MOF Data Types</p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td width="200" valign="top" style="width: 150.0pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf">Data types</td>
<td width="407" valign="top" style="width: 305.4pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf">Data format</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">String</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Null terminated ANSI string</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">sint32</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Signed 32-bit integer </td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">uint32</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Unsigned 32-bit integer</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">sint16 </td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Signed 16-bit integer </td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">uint16 </td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Unsigned 16-bit integer </td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">sint64</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Signed 64-bit integer</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">uint64</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Unsigned 64-bit integer</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">sint8</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Signed 8-bit character </td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">uint8</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Unsigned 8-bit integer</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">Datetime</td>
<td width="407" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">25-character string used to specify absolute dates or time
intervals. </td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tpf">Boolean</td>
<td width="407" valign="top" style="width: 305.4pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tpf">Byte where 0 is FALSE, != 0 is TRUE </td>
</tr>
</table>
<p class="Le">&nbsp;</p>
<p class="MsoNormal"><b>Important: </b>Because the MOF data types are much
richer than those for ACPI control methods, the control method must be careful
to pack the data blocks correctly within an ACPI buffer. The control method can
also restrict itself to using only common data types.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Each MOF class represents a data block and may contain one
or more properties that represent data items within the data block. A MOF class
would hold all information needed to parse a data block returned from the mapper.
In addition, the MOF language allows rich meta-data to be included as qualifiers
on properties and classes. Some qualifiers are required, but most are optional.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Class and data item qualifiers are defined in the following
table.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="Tt">Class and Data Item Qualifiers</p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse">
<tr>
<td width="200" valign="top" style="width: 150.0pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf">Qualifier</td>
<td width="400" valign="top" style="width: 300.0pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf">Description</td>
<td style="border: medium none; padding: 0in" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf">Class qualifiers:</td>
<td width="400" valign="top" style="width: 300.0pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf"><span style="font-size: 10.5pt">&nbsp;</span></td>
<td style="border: medium none; padding: 0in" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[guid(<28><i>guid-string</i><EFBFBD>)] </td>
<td width="400" valign="top" style="width: 300.0pt; padding: 0in">
<p class="Tpf">Declares the GUID that represents the class within WMI. This
qualifier is required.</td>
<td style="border: medium none; padding: 0in" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[Dynamic] </td>
<td width="400" valign="top" style="width: 300.0pt; padding: 0in">
<p class="Tpf">Required for WBEM.</td>
<td style="border: medium none; padding: 0in" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[WMI] </td>
<td width="400" valign="top" style="width: 300.0pt; padding: 0in">
<p class="Tpf">Required for WBEM.</td>
<td style="border: medium none; padding: 0in" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[Provider(<28>WmiProv<6F>)] </td>
<td width="400" valign="top" style="width: 300.0pt; padding: 0in">
<p class="Tpf">Required for WBEM.</td>
<td style="border: medium none; padding: 0in" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[Description(<i><EFBFBD>description-text<78>)</i>]<i> </i></td>
<td width="400" valign="top" style="width: 300.0pt; padding: 0in">
<p class="Tpf">Specifies description text for the class or property in the
locale specified for the locale qualifier.</td>
<td style="border: medium none; padding: 0in" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[WmiExpense(<i>expense-value</i>)] </td>
<td width="400" valign="top" style="width: 300.0pt; padding: 0in">
<p class="Tpf">Specifies the quantity of system resources required in order
to collect data in the data block; <i>expense-value</i> is defined to be the
average number of CPU cycles needed to collect the data block. If this
qualifier is not specified, then the <i>expense-value</i> is assumed to be
0.</td>
<td style="border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext" width="7">
<p class="MsoNormal">&nbsp;</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf">Data item qualifiers:</td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding: 0in; background: #CCCCCC">
<p class="Thf"><span style="font-size: 10.5pt">&nbsp;</span></td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[read] </td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Specifies that the data item may be read.</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[write] </td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Specifies that the data item may be written.</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[WmiDataID(<i>data-item-ID</i>)] </td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Specifies the data item ID for the data item. This qualifier
is required.</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf"><span style="layout-grid-mode: line">[WmiScale(<i>scale-factor</i>)]
</span></td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf"><span style="layout-grid-mode: line">Specifies the scaling
factor to use when displaying the data. Before displaying the data returned
from a query of the data item, it is multiplied by 10 to the power of <i>
scale-factor</i>. If this qualifier is not specified, then the <i>
scale-factor</i> is assumed to be 0.</span></td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[WmiComplexity(<28><i>complexity-category<72></i>)] </td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Specifies the level of detail associated with the counter. <i>
Complexity-category</i> can have the value of <20>Novice<63> for the information
that anyone can understand, <20>Advanced<65> for information that is useful for
advanced users, <20>Expert<72> for information that is useful to only expert
users, and <20>Wizard<72> for information that is useful for the data provider
designer. If this qualifier is not specified, then a <i>complexity-category</i>
of <20>Novice<63> is assumed.</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; padding: 0in">
<p class="Tpf">[WmiVolatility(<i>validity-interval</i>)] </td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; padding: 0in">
<p class="Tpf">Specifies how often this data item value is updated
internally. <i>Validity-interval</i> is defined in units of milliseconds, so
a <i>validity-interval</i> of 1000 would mean that the data item is updated
internally every second. Data consumers can use this measure to determine
how frequently it should poll for changes in a data item. If this qualifier
is not specified, then no assumption on the length of validity for a data
item can be made.</td>
</tr>
<tr>
<td width="200" valign="top" style="width: 150.0pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tpf">[WmiSizeIs(<28><i>property-name</i><EFBFBD>)] </td>
<td width="407" colspan="2" valign="top" style="width: 305.4pt; border-left: medium none; border-right: medium none; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding: 0in">
<p class="Tpf">Specifies the property within the current class that has the
count of the number of array elements (not bytes) contained in a variable
length array.</td>
</tr>
</table>
<p class="Le">&nbsp;</p>
<p class="MsoNormal" style="margin-right: -24.0pt">The order that the data items
are laid out in the data block is controlled by the data item ID. Data item IDs
must be allocated contiguously starting with data item ID 1. The data item order
specified in the MOF is not relevant. </p>
<p class="MsoNormal" style="margin-right: -24.0pt">&nbsp;</p>
<p class="MsoNormal" style="margin-right: -24.0pt">MOF supports arrays of the
basic types shown in the <20>MOF Data Types<65> table shown earlier. A variable sized
array must have a <b>WmiSizeIs()</b> qualifier that specifies the property that
has the number of elements in the array. </p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc409597077"><b>Data Block Format</b></a><b>.
</b>The format of the data block buffer returned from the query control method
and passed into the set control method must be consistent with the description
of it specified by the MOF for that data block with respect to the order and
size of the data items within the data block<span style="layout-grid-mode: line">.</span>
The Boolean data type is 1&nbsp;byte in length and has a value of 0 for FALSE and
non-zero value for TRUE. The string data type is a C-style ANSI null-terminated
string.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc409597078"><b>Standard Data Blocks, Methods,
and Events</b></a><b>. </b>Additional data blocks, events, and methods will be
defined in the future; they should be implemented by all OEMs in order to ensure
a minimum of functionality on all PCs. In the future, an industry standard will
be defined for the globally unique GUIDs to be assigned to the data blocks. The
WMI component within Windows will contain the MOF definition for these standard
data blocks so it does not need to be part of the result from the binary .mof
query.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a name="_Toc440694672"><b>Custom Data Blocks, Methods and
Events</b></a><b>. </b>Custom or OEM-specific data blocks, events, and methods
can be added by including them in the result of the _WDG method. The GUIDs that
are assigned must be globally unique so they can be generated by a tool such as
Guidgen or Uuidgen, which are provided with the WMI information in the Microsoft
Platform SDK.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The MOF definition for these custom data blocks must be
included in the results of the WQ<i>xx</i> method, where <i>xx</i> has been
mapped to the MOF Data GUID, which is the GUID that is queried and returns MOF
data<EFBFBD>in order for applications to be able to access the data blocks. Or the MOF
could be added as a resource to Wmiacpi.sys with a name of <b>MofResourceName</b>
and a type MOFDATA. It can also be a resource in another image file with same
name and type that is pointed to by the <b>MofImagePath </b>value in the
registry key HKLM\CurrentControlSet\Services\WmiAcpi</p>
<p class="MsoNormal">&nbsp;</p>
<div style="mso-border-top-alt: solid windowtext .5pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding-left: 0in; padding-right: 0in; padding-top: 1.0pt; padding-bottom: 0in">
<h1><a name="_Toc440694673">FAQ about WMI and ACPI</a> for Windows&nbsp;2000
Instrumentation</h1>
</div>
<p class="Term1">How does WMI find ACPI/ASL code?</p>
<p class="Def1"><span style="layout-grid-mode: line">In ASL, the developer
creates a device with an _HID of </span>PNP0c14<span style="layout-grid-mode: line">.
The operating system enumerates the device and loads the Wmiacpi.sys driver on
top of it.</span></p>
<p class="Term1"><span style="layout-grid-mode: line">How does the MOF
associated with ACPI BIOS get registered?</span></p>
<p class="Def1"><span style="layout-grid-mode: line">It is either a resource
attached to Wmiacpi.sys or another image file such as a resource-only DLL.
</span></p>
<p class="Term1"><span style="layout-grid-mode: line">How does a management
application discover the classes and properties provided by ASL instrumentation?</span></p>
<p class="Def1"><span style="layout-grid-mode: line">By looking in the WMI
namespace of the schema.</span></p>
<p class="Term1"><span style="layout-grid-mode: line">Is the following true?
Because very few ACPI standards exist for instrumentation, most of the ACPI
instrumented features will appear differently on each vendor<6F>s product, and
management applications will have to be <20>taught<68> to interpret the varying
classes and methods.</span></p>
<p class="Def1"><span style="layout-grid-mode: line">Microsoft is looking at
standardizing this. Any suggestions are appreciated.</span></p>
<p class="Term1"><span style="layout-grid-mode: line">Who provides the .mof
files for standard ACPI features such as thermal monitoring?</span></p>
<p class="Def1"><span style="layout-grid-mode: line">Windows&nbsp;2000 has a .mof
file for thermal zone temperature as part of the operating system and
instruments it within Acpi.sys, outside of the mapper.</span></p>
<p class="Def1"><span style="layout-grid-mode: line">Typically, .mof files are
compiled into .bmf files and attached to a driver as a resource. The .bmf files
can be in the ROM or on disk. WMI determines the location of the .mof
information by looking at the registry for the <b>MofImagePath</b> value under
the WMIACPI service. If this does not exist, then WMI looks at the <b>ImagePath</b>
value. If Wmiacpi.sys does not have a .mof resource, then WMI will query the
binary .mof GUID for the .mof information.</span></p>
<p class="Def1"><span style="layout-grid-mode: line">A driver may have a static
list of pre-built .mof files; if so, it can <20>dynamically<6C> report one of them.
The mechanism is to report the file using a predefined GUID that returns a
binary .mof.</span></p>
<p class="Def1"><span style="layout-grid-mode: line">To dynamically build a .mof
file, a driver would have to build a .mof file and then launch the .mof
compiler, which is difficult. Currently, to do this on the machine running
Wmiacpi.sys, the <b>mofcomp</b> command can be used to load the .mof file
directly into the CIMOM database. </span></p>
<div style="mso-border-top-alt: solid windowtext .5pt; border-left: medium none; border-right: medium none; border-top: 1.0pt solid windowtext; border-bottom: medium none; padding-left: 0in; padding-right: 0in; padding-top: 1.0pt; padding-bottom: 0in">
<h1><a name="_Toc440694675"><span style="layout-grid-mode: line">ASL Methods
and Sample Code</span></a></h1>
</div>
<p class="MsoNormal"><span style="layout-grid-mode: line">The following list
represents some of the ASL methods defined by the ACPI specification. These
methods are of particular interest for systems management. None of these methods
have been implemented yet within the WMI/ACPI mapper to date. </span>A BIOS
developer, for example, could use these methods to expose data using the mapper.
<span style="layout-grid-mode: line">These methods represent good opportunities
for OEMs to differentiate their products with minimal effort:</span></p>
<p class="MsoListBullet">
<span style="font-family: Symbol; layout-grid-mode: line"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="layout-grid-mode: line">_ACX <20> Temperature threshold
at which various degrees of active cooling are engaged</span></p>
<p class="MsoListBullet">
<span style="font-family: Symbol; layout-grid-mode: line"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="layout-grid-mode: line">_CRT <20> Critical temperature
at which system will shut down</span></p>
<p class="MsoListBullet">
<span style="font-family: Symbol; layout-grid-mode: line"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="layout-grid-mode: line">_PSV <20> Temperature at which
system will throttle CPU in order to cool system</span></p>
<p class="MsoListBullet">
<span style="font-family: Symbol; layout-grid-mode: line"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="layout-grid-mode: line">_LID <20> Status of the lid
(open or closed)</span></p>
<p class="MsoListBullet">
<span style="font-family: Symbol; layout-grid-mode: line"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="layout-grid-mode: line">_PSR<EFBFBD> Whether the machine
running on AC </span></p>
<p class="Le"><span style="layout-grid-mode: line">&nbsp;</span></p>
<p class="MsoNormal"><span style="layout-grid-mode: line">The same applies for
these method for Control Method Battery devices:</span></p>
<p class="MsoListBullet">
<span style="font-family: Symbol; layout-grid-mode: line"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="layout-grid-mode: line">_BIF <20> Battery information
such as model, serial number, design capacity, last full charge capacity,
technology, and battery capacity</span></p>
<p class="MsoListBullet">
<span style="font-family: Symbol; layout-grid-mode: line"><EFBFBD><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Times New Roman">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="layout-grid-mode: line">_BST <20> Battery state, battery
present rate, battery remaining capacity, and battery voltage present</span></p>
<p class="Le">&nbsp;</p>
<h2><a name="_Toc445868973"><span style="layout-grid-mode: line">ASL Sample Code
for an Event and Initiating Method</span></a></h2>
<p class="MsoNormal"><span style="layout-grid-mode: line">The following ASL code
implements an event and a method that can be called to initiate that event.</span></p>
<p class="Ex">Device(AMW0)</p>
<p class="Ex">{</p>
<p class="Ex">&nbsp;&nbsp; // pnp0c14 is Plug and Play ID assigned to WMI mapper</p>
<p class="Ex">&nbsp;&nbsp; Name(_HID, &quot;*pnp0c14&quot;)</p>
<p class="Ex">&nbsp;&nbsp; Name(_UID, 0x0)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp; // Description of data and events supported</p>
<p class="Ex">&nbsp;&nbsp; Name(_WDG, Buffer() {</p>
<p class="Ex" style="margin-right: -.75in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x6a, 0x0f, 0xBC, 0xAB, 0xa1,
0x8e, 0xd1, 0x11, 0x00, 0xa0, 0xc9, 0x06, 0x29, 0x10, 0, 0,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 66, 65,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object ID (BA)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x01,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags (WMIACPI_REGFLAG_EXPENSIVE)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="margin-right: -.75in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x6b, 0x0f, 0xBC, 0xAB, 0xa1,
0x8e, 0xd1, 0x11, 0x00, 0xa0, 0xc9, 0x06, 0x29, 0x10, 0, 0,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 66, 66,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object ID (BB)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x02,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags (WMIACPI_REGFLAG_METHOD)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="margin-right: -1.0in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x6c, 0x0f, 0xBC, 0xAB, 0xa1,
0x8e, 0xd1, 0x11, 0x00, 0xa0, 0xc9, 0x06, 0x29, 0x10, 0, 0,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xb0, 0,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Notification ID</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x08&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags (WMIACPI_REGFLAG_EVENT)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; })</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Storage for the 3 instances of BA</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name(STB0, Buffer(0x10) { </p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,0,0,0, 2,0,0,0, 3,0,0,0, 4,0,0,0</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name(STB1, Buffer(0x10) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,1,0,0, 0,2,0,0, 0,3,0,0, 0,4,0,0</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name(STB2, Buffer(0x10) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,0,1,0, 0,0,2,0, 0,0,3,0, 0,0,4,0</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Query data block</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Arg0 has the instance being queried</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(WQBA, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 0)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(STB0)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 1)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return(STB1)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 2)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(STB2)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; // Set Data Block</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; // Arg0 has the instance being
queried</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; // Arg1 has the new value for
the data block instance</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; Method(WSBA, 2) {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (LEqual(Arg0, 0)) {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(Arg1, STB0)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 1)) {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(Arg1, STB1)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 2)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(Arg1, STB2)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Storage for data block BB</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name(B0ED, Buffer(0x10) { </p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,0,0,1, 0,0,0,2, 0,0,0,3, 0,0,0,4</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Method Execution</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Arg0 is instance being queried</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Arg1 is the method ID</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Arg2 is the method data passed</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(WMBB, 3) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg1, 1))</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(Arg3, B0ED)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Notify(AMW0, 0xB0)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(Arg3)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(Arg1)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // More info about an event</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Arg0 is the event ID that was launched (<28>fired<65>)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(_WED, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 0xB0)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(B0ED)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">}</p>
<p class="Ex">&nbsp;</p>
<h2><a name="_Toc445868974">Sample ASL Code Embedding MOD Data in ASL</a></h2>
<p class="MsoNormal" style="page-break-after: avoid">The following&nbsp; sample ASL
code shows another example of implementing an event mechanism using ASL code.&nbsp;
It also provides an example of embedding MOF data into ASL.</p>
<p class="Ex" style="page-break-after: avoid">Device(AMW0)</p>
<p class="Ex" style="page-break-after: avoid">{</p>
<p class="Ex" style="page-break-after: avoid">//</p>
<p class="Ex" style="page-break-after: avoid">// pnp0c14 is the ID assigned by
Microsoft to the WMI to ACPI mapper</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp; Name(_HID, &quot;*pnp0c14&quot;)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp; Name(_UID, 0x0)</p>
<p class="Ex" style="page-break-after: avoid">//</p>
<p class="Ex" style="page-break-after: avoid">// _WDG evaluates to a data
structure that specifies the data blocks supported</p>
<p class="Ex" style="page-break-after: avoid">// by the ACPI device.</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -84.0pt">&nbsp;&nbsp;
Name(_WDG, Buffer() {</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x5a, 0x0f, 0xBC, 0xAB, 0xa1,
0x8e, 0xd1, 0x11, 0x00, 0xa0, 0xc9, 0x06, 0x29, 0x10, 0, 0,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 65, 65,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object ID (AA)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x01,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags WMIACPI_REGFLAG_EXPENSIVE</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x5b, 0x0f, 0xBC, 0xAB, 0xa1,
0x8e, 0xd1, 0x11, 0x00, 0xa0, 0xc9, 0x06, 0x29, 0x10, 0, 0,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 65, 66,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object ID (AB)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x02,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags WMIACPI_REGFLAG_METHOD</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="margin-right: -78.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x5c, 0x0f, 0xBC, 0xAB, 0xa1,
0x8e, 0xd1, 0x11, 0x00, 0xa0, 0xc9, 0x06, 0x29, 0x10, 0, 0,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xa0, 0,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Notification ID</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x08,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags (WMIACPI_REGFLAG_EVENT)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">//</p>
<p class="Ex">// This <span style="layout-grid-mode: line">GUID</span> for
returning the MOF data</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x21, 0x12, 0x90, 0x05, 0x66,
0xd5, 0xd1, 0x11, 0xb2, 0xf0, 0x00, 0xa0, 0xc9, 0x06, 0x29, 0x10,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 66, 65,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object ID (BA)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x00,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp; })</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">//</p>
<p class="Ex">// Collection control method. If Arg0 is not zero then collection
for the</p>
<p class="Ex">// data block is enabled. If Arg0 is zero then collection is
disabled. If </p>
<p class="Ex">// this method does not exist then it is assumed that collection
control is</p>
<p class="Ex">// not required. Collection control is only useful when collection
of the </p>
<p class="Ex">// data block causes overhead.</p>
<p class="Ex">&nbsp;&nbsp; Method(WCAA, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, Zero)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Disable collection of data</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Enable collection of data</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="page-break-after: avoid">//</p>
<p class="Ex" style="page-break-after: avoid">// Query method for data block AA.
Arg0 has the data block instance index</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp; Method(WQAA, 1) {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, Zero)) {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Query is for first
instance of data block</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0x10)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Query is for second
instance of data block</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(0x20)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">//</p>
<p class="Ex">// Set method for data block AA. If data block is read-only then
this method</p>
<p class="Ex">// does not need to exist. Arg0 has the instance index of the data
block,</p>
<p class="Ex">// Arg1 has the new value for the data block.</p>
<p class="Ex">&nbsp;&nbsp; Method(WSAA, 2) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, Zero)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set is for first instance of data block</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Set is for second instance of data block</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">//</p>
<p class="Ex">// Event enable/disable method. If event does not need to be
armed/disarmed</p>
<p class="Ex">// then this method is not needed. Arg0 is Zero if event is being
disarmed or</p>
<p class="Ex">// non zero if event is being armed.</p>
<p class="Ex">&nbsp;&nbsp; Name(ACEN, 0)</p>
<p class="Ex">&nbsp;&nbsp; Method(WEA0, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(Arg0, ACEN)</p>
<p class="Ex">&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">//</p>
<p class="Ex">// _WED is called in response to an event launching (<28>firing<6E>) to
gain additional </p>
<p class="Ex">// information about the event. Arg0 has the NotifyId for the
event launched.</p>
<p class="Ex">&nbsp;&nbsp; Method(_WED, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 0xA0)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(0x100)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp; }</p>
<p class="Ex">//</p>
<p class="Ex">// Evaluation of this method causes the event 0xA0 to be fired.
Since it is</p>
<p class="Ex">// defined by the _WDG method it is callable via WMI. Arg0 has the
instance</p>
<p class="Ex">// index and Arg1 has any input parameters.</p>
<p class="Ex">&nbsp;&nbsp; Method(WMAB, 3) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // If event was armed then launch it</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(ACEN, 1)) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Notify(AMW0, 0xa0)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(Arg1)</p>
<p class="Ex">&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp; Name(WQBA, Buffer(926) {</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x46,
0x4f, 0x4d, 0x42, 0x01, 0x00, 0x00, 0x00, 0x8e, 0x03, 0x00, 0x00, 0xf6, 0x0f,
0x00, 0x00,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x44,
0x53, 0x00, 0x01, 0x1a, 0x7d, 0xda, 0x54, 0x98, 0xdd, 0x87, 0x00, 0x01, 0x06,
0x18, 0x42,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x10,
0x0b, 0x10, 0x0a, 0x0b, 0x21, 0x02, 0xcb, 0x82, 0x50, 0x3c, 0x18, 0x14, 0xa0,
0x25, 0x41,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xc8,
0x05, 0x14, 0x55, 0x02, 0x21, 0xc3, 0x02, 0x14, 0x0b, 0x70, 0x2e, 0x40, 0xba,
0x00, 0xe5,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x28,
0x72, 0x0c, 0x22, 0x82, 0xfd, 0xfb, 0x07, 0xc1, 0x90, 0x02, 0x08, 0x29, 0x84,
0x90, 0x08,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x58,
0x2a, 0x04, 0x8d, 0x10, 0xf4, 0x2b, 0x00, 0xa1, 0x43, 0x01, 0x32, 0x05, 0x18,
0x14, 0xe0,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x14,
0x41, 0x04, 0x41, 0x62, 0x17, 0x2e, 0xc0, 0x34, 0x8c, 0x06, 0xd0, 0x36, 0x8a,
0x64, 0x0b,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xb0,
0x0c, 0x2e, 0x98, 0xa3, 0x08, 0x92, 0xa0, 0xc6, 0x09, 0xa0, 0xc4, 0x4c, 0x00,
0xa5, 0x13,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x5c,
0x36, 0x05, 0x58, 0xc4, 0x96, 0x50, 0x14, 0x0d, 0x22, 0x4a, 0x82, 0x13, 0xea,
0x1b, 0x41,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x13,
0x2a, 0x57, 0x80, 0x64, 0x78, 0x69, 0x1e, 0x81, 0xac, 0xcf, 0x41, 0x93, 0xf2,
0x04, 0xb8,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x9a,
0x05, 0x7a, 0x8c, 0x34, 0xff, 0x30, 0x41, 0x99, 0x14, 0x43, 0x0e, 0x20, 0x24,
0x71, 0x98,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xa0,
0x9d, 0x59, 0xed, 0x18, 0xd2, 0x3d, 0x07, 0x32, 0x4d, 0x60, 0x21, 0x70, 0x9e,
0xb8, 0x19,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xa0,
0xf0, 0x5b, 0x1d, 0x80, 0xe0, 0x2b, 0x1d, 0x15, 0xd2, 0xeb, 0x34, 0x64, 0x72,
0x46, 0x48,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xf8,
0xff, 0x7f, 0x02, 0x26, 0xe3, 0xb7, 0x60, 0x02, 0xa5, 0xd9, 0xb2, 0x82, 0x4b,
0x80, 0xc1,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x68,
0x00, 0x91, 0xa2, 0x69, 0xa3, 0xe6, 0xea, 0xf9, 0x36, 0x8f, 0xaf, 0x59, 0x7a,
0x9e, 0x47,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x7a,
0x34, 0x56, 0x36, 0x05, 0xd4, 0xf8, 0x3d, 0x9d, 0x93, 0xf3, 0x4c, 0x02, 0x1e,
0x9c, 0x61,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x4e,
0x87, 0x83, 0xf1, 0xb1, 0xb1, 0x51, 0x70, 0x74, 0x03, 0xb2, 0x31, 0x38, 0xc6,
0xb0, 0xd1,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x73,
0x39, 0x81, 0x47, 0x82, 0x43, 0x89, 0x7e, 0x0e, 0x6f, 0x00, 0x47, 0x17, 0xe3,
0x04, 0xce,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x27,
0xc1, 0x61, 0x06, 0x39, 0xe3, 0x33, 0xf4, 0x44, 0x2c, 0x68, 0xd6, 0x02, 0x0a,
0x62, 0xa4,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x58,
0xa7, 0xf5, 0x7c, 0x10, 0x8b, 0x41, 0x05, 0x8b, 0x11, 0xdb, 0x50, 0x87, 0x60,
0x18, 0x8b,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x46,
0x11, 0xc8, 0x49, 0x3c, 0x49, 0x30, 0x94, 0x40, 0x51, 0x0c, 0x12, 0xda, 0xc3,
0x36, 0x92,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x81,
0xcf, 0xdb, 0x20, 0xc7, 0x84, 0x51, 0x01, 0x21, 0xcf, 0xe3, 0xd0, 0x28, 0x4d,
0xd0, 0xfd,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x29,
0x40, 0x37, 0x8b, 0x08, 0x67, 0x54, 0xd8, 0x44, 0x64, 0x6d, 0x02, 0xb2, 0x25,
0x40, 0x1c,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xbe,
0x40, 0x1a, 0x43, 0x11, 0x44, 0x84, 0x98, 0x51, 0x8c, 0x19, 0x30, 0x82, 0x51,
0x0e, 0xa6,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x39,
0x10, 0x69, 0x13, 0x30, 0xf6, 0x20, 0xd1, 0x62, 0x31, 0x04, 0xdb, 0x9f, 0x83,
0x30, 0x0e,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x05,
0xa3, 0x03, 0x42, 0xe7, 0x84, 0xc3, 0x3b, 0x30, 0x9f, 0x1e, 0x4c, 0x70, 0xda,
0xcf, 0x07,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xaf,
0x0b, 0x21, 0x8b, 0x17, 0x20, 0x0d, 0x43, 0xf8, 0x09, 0x6a, 0x7d, 0x51, 0xe8,
0x5a, 0xe0,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x34,
0xe0, 0xa8, 0xeb, 0x82, 0x6f, 0x01, 0xbe, 0x01, 0x9c, 0xe0, 0xe3, 0x85, 0xf1,
0x83, 0x1c,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xc1,
0x01, 0x3c, 0x44, 0xbc, 0x1a, 0x78, 0x08, 0x9e, 0xc3, 0xfb, 0x05, 0x3b, 0x0f,
0x60, 0xff,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xff,
0x04, 0x5d, 0xe3, 0xe9, 0x92, 0x70, 0x02, 0x96, 0x83, 0x86, 0x1a, 0xac, 0x2f,
0x00, 0x27,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xe9,
0xc1, 0x1a, 0xae, 0xae, 0xd3, 0x06, 0x7a, 0xba, 0xa7, 0x72, 0x5a, 0xa5, 0x0a,
0x30, 0x7b,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x94,
0x20, 0x04, 0xcf, 0x1e, 0x6c, 0xde, 0x67, 0x73, 0xe6, 0x09, 0x9e, 0x14, 0x3c,
0x05, 0x3e,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x2d,
0xcf, 0xd2, 0x97, 0x0e, 0x5f, 0x09, 0x7c, 0x9f, 0x30, 0x41, 0xf4, 0x27, 0x17,
0x36, 0x1a,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xb8,
0xc3, 0xc6, 0x8d, 0x06, 0xce, 0xe5, 0xe0, 0xb1, 0xc3, 0x33, 0xf7, 0x5c, 0x4d,
0x50, 0xf3,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xe5,
0x42, 0x4e, 0x66, 0x83, 0xd2, 0x03, 0xa2, 0x01, 0x3f, 0x34, 0x60, 0xd0, 0x1f,
0x19, 0xb8,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xc8,
0x8b, 0x02, 0x95, 0x86, 0xac, 0xbf, 0x86, 0x45, 0x8d, 0x9b, 0x12, 0x58, 0xca,
0xa1, 0x82,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xdc, 0x33, 0x7c, 0x9e, 0x38,
0x8c, 0x57, 0x00, 0xcf, 0xe6, 0xa0, 0x7c, 0x73, 0x71, 0xba, 0x7b,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x05, 0x68, 0x66, 0x83, 0xbb,
0x51, 0x80, 0x05, 0xc3, 0xd7, 0x03, 0xdf, 0x30, 0xd8, 0xf1, 0xc3,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xd7, 0x0c, 0x36, 0x24, 0x83,
0x45, 0x89, 0x14, 0x9b, 0x4d, 0xca, 0x03, 0xc0, 0xe0, 0xbd, 0xd7,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xf8, 0x70, 0x61, 0x48, 0x9f,
0x31, 0xe0, 0x1e, 0x05, 0xe0, 0xfd, 0xff, 0xcf, 0x09, 0xe0, 0xb8,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x6d, 0xf8, 0x2a, 0x62, 0x67,
0xf7, 0x0b, 0x5d, 0x6f, 0xb0, 0xf7, 0x1d, 0x78, 0xf8, 0x87, 0x85,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xbb, 0x0b, 0x30, 0xb0, 0x13,
0xc5, 0x1c, 0x78, 0x80, 0xc7, 0x64, 0x1e, 0x78, 0xc0, 0x75, 0x96,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x82, 0x3d, 0x04, 0xae, 0xfa,
0xc0, 0x83, 0xca, 0xf1, 0x6a, 0xa0, 0x67, 0x1e, 0xc0, 0xec, 0xff,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xff, 0xcc, 0x03, 0x8c, 0xe0,
0x9f, 0x79, 0x80, 0x6b, 0xf4, 0x6b, 0x81, 0xde, 0x57, 0x3e, 0xf3,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x00, 0x7c, 0x50, 0x79, 0x33,
0x01, 0xcd, 0xff, 0xff, 0x66, 0x02, 0xe3, 0xe0, 0xe0, 0x83, 0x88,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xaf, 0x32, 0x3e, 0x11, 0x02,
0x93, 0xab, 0x09, 0x70, 0x09, 0x79, 0x27, 0xa2, 0x01, 0x07, 0x41,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xaf, 0x01, 0x5c, 0x0b, 0x88,
0x66, 0xc8, 0xa6, 0x89, 0x25, 0x98, 0xe5, 0x22, 0x40, 0xef, 0x8a,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x3e, 0x2a, 0xf1, 0x31, 0xfa,
0xa8, 0xc4, 0x70, 0xdf, 0x85, 0x8c, 0x7b, 0x7a, 0x67, 0xf7, 0xac,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x84, 0xb9, 0x04, 0xbc, 0x8f,
0x80, 0x65, 0xf2, 0xf8, 0xd3, 0x07, 0x47, 0xf4, 0x85, 0xc1, 0x77,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x23, 0x78, 0x04, 0xd5, 0x5f,
0x65, 0xa8, 0xfe, 0xbd, 0x48, 0x2f, 0x0c, 0xea, 0x2a, 0x03, 0x5c,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xff, 0xff, 0x57, 0x19, 0x36,
0xc8, 0x63, 0x05, 0xcb, 0xf9, 0x11, 0x33, 0xc7, 0xd3, 0x8c, 0xe2,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xa9, 0x78, 0xb8, 0xec, 0x62,
0x65, 0xef, 0x53, 0x25, 0xc7, 0x17, 0x5f, 0xab, 0xf0, 0x20, 0x8f,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x31, 0xbe, 0xc3, 0x80, 0x71,
0x04, 0xef, 0x30, 0xc0, 0x35, 0xf0, 0xcb, 0x41, 0xd7, 0x40, 0xc0,</p>
<p class="Ex" style="margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xf6, 0xff, 0xff, 0x0e, 0x03,
0x96, 0xe0, 0x10, 0xba, 0x06, 0xe2, 0x64, 0x1c, 0x5b, 0xc8, 0x4d,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xca,
0x53, 0x36, 0xc1, 0xa0, 0x13, 0xa6, 0x47, 0x40, 0xf0, 0xdc, 0x2b, 0x7c, 0x98,
0x00, 0xc7,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x48,
0x30, 0xe7, 0x08, 0x9f, 0x1f, 0x7c, 0x7d, 0x78, 0x93, 0x60, 0x37, 0x0e, 0xc3,
0xf8, 0xca,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0x07,
0x0f, 0xf2, 0x15, 0x8b, 0x5d, 0x26, 0xf8, 0x49, 0x0f, 0x6c, 0x17, 0x65, 0x70,
0xdc, 0x7f,</p>
<p class="Ex" style="page-break-after: avoid; margin-right: -1.25in">&nbsp;&nbsp;&nbsp; 0xe0,
0x5c, 0x94, 0x81, 0x11, 0xee, 0xe3, 0x0f, 0xf8, 0x0f, 0xcb, 0x70, 0xfe, 0xff</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;</p>
<h2><a name="_Toc445868975">Sample .Mof File</a></h2>
<p class="MsoNormal" style="page-break-after: avoid">This sample .mof file
complements the previous ASL code.</p>
<p class="Ex" style="page-break-after: avoid">[abstract]</p>
<p class="Ex" style="page-break-after: avoid">class AcpiSampleBase</p>
<p class="Ex" style="page-break-after: avoid">{</p>
<p class="Ex" style="page-break-after: avoid">};</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;</p>
<p class="Ex" style="page-break-after: avoid">[abstract]</p>
<p class="Ex" style="page-break-after: avoid">class AcpiSampleEvent : WMIEvent</p>
<p class="Ex" style="page-break-after: avoid">{</p>
<p class="Ex" style="page-break-after: avoid">};</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;</p>
<p class="Ex" style="page-break-after: avoid">[Dynamic, Provider(&quot;WMIProv&quot;),</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;WMI,</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;Description(&quot;Counter for number
of times the case has been hit&quot;),</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;<span style="layout-grid-mode: line">GUID</span>(&quot;{ABBC0f5a-8ea1-11d1-A000-c90629100000}&quot;),</p>
<p class="Ex">&nbsp;locale(&quot;MS\\0x409&quot;)]</p>
<p class="Ex">class MachineHitSensor : AcpiSampleBase</p>
<p class="Ex">{</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [key, read]</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp; string InstanceName;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [read] Boolean Active;</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [WmiDataId(1),</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp; Description(&quot;Number of times the case sensor determined that
the machine has been hit&quot;),</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp; read</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; ] uint32 NumberTimesHit;</p>
<p class="Ex">};</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">[Dynamic, Provider(&quot;WMIProv&quot;),</p>
<p class="Ex">&nbsp;WMI,</p>
<p class="Ex">&nbsp;Description(&quot;Counter for number of times the case has been hit&quot;),</p>
<p class="Ex">&nbsp;<span style="layout-grid-mode: line">GUID</span>(&quot;{ABBC0f5b-8ea1-11d1-A000-c90629100000}&quot;),</p>
<p class="Ex">&nbsp;locale(&quot;MS\\0x409&quot;)]</p>
<p class="Ex">class MachineHitSimulate : AcpiSampleBase</p>
<p class="Ex">{</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [key, read]</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp; string InstanceName;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [read] Boolean Active;</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [WmiMethodId(1),</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp; Description(&quot;Simulate hitting the machine&quot;)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; ] void HitMachine();</p>
<p class="Ex">};</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">[Dynamic, Provider(&quot;WMIProv&quot;),</p>
<p class="Ex">&nbsp;WMI,</p>
<p class="Ex">&nbsp;Description(&quot;Event generated when machine is hit&quot;),</p>
<p class="Ex">&nbsp;<span style="layout-grid-mode: line">GUID</span>(&quot;{ABBC0f5c-8ea1-11d1-A000-c90629100000}&quot;),</p>
<p class="Ex">&nbsp;locale(&quot;MS\\0x409&quot;)]</p>
<p class="Ex">class MachineHitEvent : AcpiSampleEvent</p>
<p class="Ex">{</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [key, read]</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp; string InstanceName;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [read] Boolean Active;</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; [WmiDataId(1),</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp; Description(&quot;Force with which the machine was hit&quot;)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; ] uint32 Force;</p>
<p class="Ex">};</p>
<p class="Ex">&nbsp;</p>
<p class="MsoNormal">Appendix C<>ASL sample code</p>
<p class="Ex">Device(WMI1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name (_HID, EISAID(&quot;PNP0Cxx&quot;))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Plug and Play ID for
mapping driver (TBD)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; _UID(1)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Data block and Wmi method to Object ID mappings</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name(_WDG, Buffer() {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object AA - {ABBC0F5A-8EA1-11d1-A53F-00A0C9062910}</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xABBC0F5A, 0x8ea1, 0x11d1, 0x00, 0xa0, 0xc9, 0x06,
0x29, 0x10,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `A','A',&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object ID</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x04,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags (WMIACPI_REGFLAG_STRING)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; </p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object AB - {ABBC0F5B-8EA1-11d1-A53F-00A0C9062910}</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xABBC0F5B, 0x8ea1, 0x11d1, 0x00, 0xa0, 0xc9, 0x06,
0x29, 0x10,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `A','B',&nbsp;&nbsp;&nbsp; // Object ID</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x01,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flag (WMIACPI_REGFLAG_EXPENSIVE)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Object AC - {ABBC0F5C-8EA1-11d1-A53F-00A0C9062910}</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xABBC0F5C, 0x8ea1, 0x11d1, 0x00, 0xa0, 0xc9, 0x06,
0x29, 0x10,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `A','C',&nbsp;&nbsp;&nbsp; // Object ID</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x06,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flag (WMIACPI_REGFLAG_METHOD |
_STRING)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Event 0x80 - {ABBC0F5D-8EA1-11d1-A53F-00A0C9062910}</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xABBC0F5D, 0x8ea1, 0x11d1, 0x00, 0xa0, 0xc9, 0x06,
0x29, 0x10,</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x80,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Notification value</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Reserved</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Instance Count (Not meaningful for
events)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;0x0D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Flags (WMIACPI_REGFLAG_EXPENSIVE |
_STRING |_EVENT)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; })</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // IO ports for configuration of Object AB</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; OperationRegion(CAB0, SystemIo, 0xf8, 1)&nbsp;&nbsp; // Instance 0</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; OperationRegion(CAB1, SystemIo, 0xfc, 1)&nbsp;&nbsp; // Instance 1</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; OperationRegion(CABC, SystemIo, 0xf4, 1)&nbsp;&nbsp; // Enable/Disable
Collection</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(WQAB, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Read value from IO space for instance</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, Zero) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(CAB0, Local0)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(CAB1, Local0)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // If any of the lower 3 bits are set then return TRUE,
else FALSE</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (And(Local0, 7))</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return( 0x00000001 )</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return( 0x00000000 )</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Set the values for object AB</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(WSAB, 2) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, Zero) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Change contents of first instance of data block
to </p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // values in buffer in Arg1</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Change contents of second instance of data block
to </p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // values in buffer in Arg1</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Collection notification for object AB</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(WCAB, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(Arg0, 1)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(One, CABC)&nbsp;&nbsp;&nbsp;&nbsp; // If enable, write all 1's to
port</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(Zero, CABC)&nbsp;&nbsp;&nbsp; // If disable, write all 0's to
port</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Storage for maintaining values for the AA method. </p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name(STAA, &quot;XYZZY&quot;)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(WQAA, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Only one instance for AA so no need to check arg</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(STAA);</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Data block mapped to Object AA does not support set so it
does not need</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // a WSAA method</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Storage for maintaining state of flag that determines
whether to fire (launch)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // the event or not. By default firing is disabled</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Name(FIRE, 0)</p>
<p class="Ex">&nbsp;</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; // This method will reset the
values for AA and send a notification of</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; // its occurrence</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp; Method(WMAC, 3) {</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(STAA, Local0)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(&quot;XYZZY&quot;, STAA)</p>
<p class="Ex" style="page-break-after: avoid">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (LEqual(FIRE, 1))</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Notify(WMI1, 0x80)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Return(Local0)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Additional information about event</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(_WED) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return(&quot;Fired&quot;)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">&nbsp;</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; //</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; // Event 0x80 Enable/Disable control method</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; Method(WE80, 1) {</p>
<p class="Ex">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Store(FIRE, Arg0)</p>
<p class="Ex">&nbsp;&nbsp;&nbsp; }</p>
<p class="Ex">)</p>
<p class="Ex">&nbsp;</p>
<p class="MsoNormal"><i>&nbsp;</i></p>
<p class="MsoNormal">&nbsp;</p>
</body>
</html>