Home | History | Annotate | Download | only in pydoc
      1 
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      3 <html><head><title>Python: module telemetry.core.platform</title>
      4 <meta charset="utf-8">
      5 </head><body bgcolor="#f0f0f8">
      6 
      7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
      8 <tr bgcolor="#7799ee">
      9 <td valign=bottom>&nbsp;<br>
     10 <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.core.html"><font color="#ffffff">core</font></a>.platform</strong></big></big></font></td
     11 ><td align=right valign=bottom
     12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/platform.py">telemetry/core/platform.py</a></font></td></tr></table>
     13     <p><tt>#&nbsp;Copyright&nbsp;2012&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
     14 #&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
     15 #&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
     16 <p>
     17 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     18 <tr bgcolor="#aa55cc">
     19 <td colspan=3 valign=bottom>&nbsp;<br>
     20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
     21     
     22 <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.discover.html">telemetry.core.discover</a><br>
     24 <a href="telemetry.core.local_server.html">telemetry.core.local_server</a><br>
     25 <a href="telemetry.core.memory_cache_http_server.html">telemetry.core.memory_cache_http_server</a><br>
     26 </td><td width="25%" valign=top><a href="telemetry.core.network_controller.html">telemetry.core.network_controller</a><br>
     27 <a href="os.html">os</a><br>
     28 <a href="telemetry.internal.platform.platform_backend.html">telemetry.internal.platform.platform_backend</a><br>
     29 </td><td width="25%" valign=top><a href="logging.html">logging</a><br>
     30 <a href="telemetry.core.tracing_controller.html">telemetry.core.tracing_controller</a><br>
     31 <a href="telemetry.core.util.html">telemetry.core.util</a><br>
     32 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
     33 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     34 <tr bgcolor="#ee77aa">
     35 <td colspan=3 valign=bottom>&nbsp;<br>
     36 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
     37     
     38 <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
     39 <td width="100%"><dl>
     40 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
     41 </font></dt><dd>
     42 <dl>
     43 <dt><font face="helvetica, arial"><a href="telemetry.core.platform.html#Platform">Platform</a>
     44 </font></dt></dl>
     45 </dd>
     46 </dl>
     47  <p>
     48 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
     49 <tr bgcolor="#ffc8d8">
     50 <td colspan=3 valign=bottom>&nbsp;<br>
     51 <font color="#000000" face="helvetica, arial"><a name="Platform">class <strong>Platform</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
     52     
     53 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
     54 <td colspan=2><tt>The&nbsp;platform&nbsp;that&nbsp;the&nbsp;target&nbsp;browser&nbsp;is&nbsp;running&nbsp;on.<br>
     55 &nbsp;<br>
     56 Provides&nbsp;a&nbsp;limited&nbsp;interface&nbsp;to&nbsp;interact&nbsp;with&nbsp;the&nbsp;platform&nbsp;itself,&nbsp;where<br>
     57 possible.&nbsp;It's&nbsp;important&nbsp;to&nbsp;note&nbsp;that&nbsp;platforms&nbsp;may&nbsp;not&nbsp;provide&nbsp;a&nbsp;specific<br>
     58 API,&nbsp;so&nbsp;check&nbsp;with&nbsp;IsFooBar()&nbsp;for&nbsp;availability.<br>&nbsp;</tt></td></tr>
     59 <tr><td>&nbsp;</td>
     60 <td width="100%">Methods defined here:<br>
     61 <dl><dt><a name="Platform-CanCaptureVideo"><strong>CanCaptureVideo</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;bool&nbsp;indicating&nbsp;whether&nbsp;the&nbsp;platform&nbsp;supports&nbsp;video&nbsp;capture.</tt></dd></dl>
     62 
     63 <dl><dt><a name="Platform-CanFlushIndividualFilesFromSystemCache"><strong>CanFlushIndividualFilesFromSystemCache</strong></a>(self)</dt><dd><tt>Returns&nbsp;true&nbsp;if&nbsp;the&nbsp;disk&nbsp;cache&nbsp;can&nbsp;be&nbsp;flushed&nbsp;for&nbsp;specific&nbsp;files.</tt></dd></dl>
     64 
     65 <dl><dt><a name="Platform-CanLaunchApplication"><strong>CanLaunchApplication</strong></a>(self, application)</dt><dd><tt>Returns&nbsp;whether&nbsp;the&nbsp;platform&nbsp;can&nbsp;launch&nbsp;the&nbsp;given&nbsp;application.</tt></dd></dl>
     66 
     67 <dl><dt><a name="Platform-CanMeasurePerApplicationPower"><strong>CanMeasurePerApplicationPower</strong></a>(self)</dt><dd><tt>Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;power&nbsp;monitor&nbsp;can&nbsp;measure&nbsp;power&nbsp;for&nbsp;the&nbsp;target<br>
     68 application&nbsp;in&nbsp;isolation.&nbsp;False&nbsp;if&nbsp;power&nbsp;measurement&nbsp;is&nbsp;for&nbsp;full&nbsp;system<br>
     69 energy&nbsp;consumption.</tt></dd></dl>
     70 
     71 <dl><dt><a name="Platform-CanMonitorNetworkData"><strong>CanMonitorNetworkData</strong></a>(self)</dt><dd><tt>Returns&nbsp;true&nbsp;if&nbsp;network&nbsp;data&nbsp;can&nbsp;be&nbsp;retrieved,&nbsp;false&nbsp;otherwise.</tt></dd></dl>
     72 
     73 <dl><dt><a name="Platform-CanMonitorPower"><strong>CanMonitorPower</strong></a>(self)</dt><dd><tt>Returns&nbsp;True&nbsp;iff&nbsp;power&nbsp;can&nbsp;be&nbsp;monitored&nbsp;asynchronously&nbsp;via<br>
     74 <a href="#Platform-StartMonitoringPower">StartMonitoringPower</a>()&nbsp;and&nbsp;<a href="#Platform-StopMonitoringPower">StopMonitoringPower</a>().</tt></dd></dl>
     75 
     76 <dl><dt><a name="Platform-CanMonitorThermalThrottling"><strong>CanMonitorThermalThrottling</strong></a>(self)</dt><dd><tt>Platforms&nbsp;may&nbsp;be&nbsp;able&nbsp;to&nbsp;detect&nbsp;thermal&nbsp;throttling.<br>
     77 &nbsp;<br>
     78 Some&nbsp;fan-less&nbsp;computers&nbsp;go&nbsp;into&nbsp;a&nbsp;reduced&nbsp;performance&nbsp;mode&nbsp;when&nbsp;their&nbsp;heat<br>
     79 exceeds&nbsp;a&nbsp;certain&nbsp;threshold.&nbsp;Performance&nbsp;tests&nbsp;in&nbsp;particular&nbsp;should&nbsp;use&nbsp;this<br>
     80 API&nbsp;to&nbsp;detect&nbsp;if&nbsp;this&nbsp;has&nbsp;happened&nbsp;and&nbsp;interpret&nbsp;results&nbsp;accordingly.</tt></dd></dl>
     81 
     82 <dl><dt><a name="Platform-CanTakeScreenshot"><strong>CanTakeScreenshot</strong></a>(self)</dt></dl>
     83 
     84 <dl><dt><a name="Platform-CooperativelyShutdown"><strong>CooperativelyShutdown</strong></a>(self, proc, app_name)</dt><dd><tt>Cooperatively&nbsp;shut&nbsp;down&nbsp;the&nbsp;given&nbsp;process&nbsp;from&nbsp;subprocess.Popen.<br>
     85 &nbsp;<br>
     86 Currently&nbsp;this&nbsp;is&nbsp;only&nbsp;implemented&nbsp;on&nbsp;Windows.&nbsp;See<br>
     87 crbug.com/424024&nbsp;for&nbsp;background&nbsp;on&nbsp;why&nbsp;it&nbsp;was&nbsp;added.<br>
     88 &nbsp;<br>
     89 Args:<br>
     90 &nbsp;&nbsp;proc:&nbsp;a&nbsp;process&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;returned&nbsp;from&nbsp;subprocess.Popen.<br>
     91 &nbsp;&nbsp;app_name:&nbsp;on&nbsp;Windows,&nbsp;is&nbsp;the&nbsp;prefix&nbsp;of&nbsp;the&nbsp;application's&nbsp;window<br>
     92 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class&nbsp;name&nbsp;that&nbsp;should&nbsp;be&nbsp;searched&nbsp;for.&nbsp;This&nbsp;helps&nbsp;ensure<br>
     93 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that&nbsp;only&nbsp;the&nbsp;application's&nbsp;windows&nbsp;are&nbsp;closed.<br>
     94 &nbsp;<br>
     95 Returns&nbsp;True&nbsp;if&nbsp;it&nbsp;is&nbsp;believed&nbsp;the&nbsp;attempt&nbsp;succeeded.</tt></dd></dl>
     96 
     97 <dl><dt><a name="Platform-FlushDnsCache"><strong>FlushDnsCache</strong></a>(self)</dt><dd><tt>Flushes&nbsp;the&nbsp;OS's&nbsp;DNS&nbsp;cache&nbsp;completely.<br>
     98 &nbsp;<br>
     99 This&nbsp;function&nbsp;may&nbsp;require&nbsp;root&nbsp;or&nbsp;administrator&nbsp;access.</tt></dd></dl>
    100 
    101 <dl><dt><a name="Platform-FlushEntireSystemCache"><strong>FlushEntireSystemCache</strong></a>(self)</dt><dd><tt>Flushes&nbsp;the&nbsp;OS's&nbsp;file&nbsp;cache&nbsp;completely.<br>
    102 &nbsp;<br>
    103 This&nbsp;function&nbsp;may&nbsp;require&nbsp;root&nbsp;or&nbsp;administrator&nbsp;access.</tt></dd></dl>
    104 
    105 <dl><dt><a name="Platform-FlushSystemCacheForDirectory"><strong>FlushSystemCacheForDirectory</strong></a>(self, directory)</dt><dd><tt>Flushes&nbsp;the&nbsp;OS's&nbsp;file&nbsp;cache&nbsp;for&nbsp;the&nbsp;specified&nbsp;directory.<br>
    106 &nbsp;<br>
    107 This&nbsp;function&nbsp;does&nbsp;not&nbsp;require&nbsp;root&nbsp;or&nbsp;administrator&nbsp;access.</tt></dd></dl>
    108 
    109 <dl><dt><a name="Platform-GetArchName"><strong>GetArchName</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;string&nbsp;description&nbsp;of&nbsp;the&nbsp;<a href="#Platform">Platform</a>&nbsp;architecture.<br>
    110 &nbsp;<br>
    111 Examples:&nbsp;x86_64&nbsp;(posix),&nbsp;AMD64&nbsp;(win),&nbsp;armeabi-v7a,&nbsp;x86</tt></dd></dl>
    112 
    113 <dl><dt><a name="Platform-GetDeviceTypeName"><strong>GetDeviceTypeName</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;string&nbsp;description&nbsp;of&nbsp;the&nbsp;<a href="#Platform">Platform</a>&nbsp;device,&nbsp;or&nbsp;None.<br>
    114 &nbsp;<br>
    115 Examples:&nbsp;Nexus&nbsp;7,&nbsp;Nexus&nbsp;6,&nbsp;Desktop</tt></dd></dl>
    116 
    117 <dl><dt><a name="Platform-GetNetworkData"><strong>GetNetworkData</strong></a>(self, browser)</dt><dd><tt>Get&nbsp;current&nbsp;network&nbsp;data.<br>
    118 Returns:<br>
    119 &nbsp;&nbsp;Tuple&nbsp;of&nbsp;(sent_data,&nbsp;received_data)&nbsp;in&nbsp;kb&nbsp;if&nbsp;data&nbsp;can&nbsp;be&nbsp;found,<br>
    120 &nbsp;&nbsp;None&nbsp;otherwise.</tt></dd></dl>
    121 
    122 <dl><dt><a name="Platform-GetOSName"><strong>GetOSName</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;string&nbsp;description&nbsp;of&nbsp;the&nbsp;<a href="#Platform">Platform</a>&nbsp;OS.<br>
    123 &nbsp;<br>
    124 Examples:&nbsp;WIN,&nbsp;MAC,&nbsp;LINUX,&nbsp;CHROMEOS</tt></dd></dl>
    125 
    126 <dl><dt><a name="Platform-GetOSVersionName"><strong>GetOSVersionName</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;logically&nbsp;sortable,&nbsp;string-like&nbsp;description&nbsp;of&nbsp;the&nbsp;<a href="#Platform">Platform</a>&nbsp;OS<br>
    127 version.<br>
    128 &nbsp;<br>
    129 Examples:&nbsp;VISTA,&nbsp;WIN7,&nbsp;LION,&nbsp;MOUNTAINLION</tt></dd></dl>
    130 
    131 <dl><dt><a name="Platform-GetOSVersionNumber"><strong>GetOSVersionNumber</strong></a>(self)</dt><dd><tt>Returns&nbsp;an&nbsp;integer&nbsp;description&nbsp;of&nbsp;the&nbsp;<a href="#Platform">Platform</a>&nbsp;OS&nbsp;major&nbsp;version.<br>
    132 &nbsp;<br>
    133 Examples:&nbsp;On&nbsp;Mac,&nbsp;13&nbsp;for&nbsp;Mavericks,&nbsp;14&nbsp;for&nbsp;Yosemite.</tt></dd></dl>
    134 
    135 <dl><dt><a name="Platform-HasBeenThermallyThrottled"><strong>HasBeenThermallyThrottled</strong></a>(self)</dt><dd><tt>Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;device&nbsp;has&nbsp;been&nbsp;thermally&nbsp;throttled.</tt></dd></dl>
    136 
    137 <dl><dt><a name="Platform-InstallApplication"><strong>InstallApplication</strong></a>(self, application)</dt><dd><tt>Installs&nbsp;the&nbsp;given&nbsp;application.</tt></dd></dl>
    138 
    139 <dl><dt><a name="Platform-IsApplicationRunning"><strong>IsApplicationRunning</strong></a>(self, application)</dt><dd><tt>Returns&nbsp;whether&nbsp;an&nbsp;application&nbsp;is&nbsp;currently&nbsp;running.</tt></dd></dl>
    140 
    141 <dl><dt><a name="Platform-IsCooperativeShutdownSupported"><strong>IsCooperativeShutdownSupported</strong></a>(self)</dt><dd><tt>Indicates&nbsp;whether&nbsp;CooperativelyShutdown,&nbsp;below,&nbsp;is&nbsp;supported.<br>
    142 It&nbsp;is&nbsp;not&nbsp;necessary&nbsp;to&nbsp;implement&nbsp;it&nbsp;on&nbsp;all&nbsp;platforms.</tt></dd></dl>
    143 
    144 <dl><dt><a name="Platform-IsMonitoringPower"><strong>IsMonitoringPower</strong></a>(self)</dt><dd><tt>Returns&nbsp;true&nbsp;if&nbsp;power&nbsp;is&nbsp;currently&nbsp;being&nbsp;monitored,&nbsp;false&nbsp;otherwise.</tt></dd></dl>
    145 
    146 <dl><dt><a name="Platform-IsThermallyThrottled"><strong>IsThermallyThrottled</strong></a>(self)</dt><dd><tt>Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;device&nbsp;is&nbsp;currently&nbsp;thermally&nbsp;throttled.</tt></dd></dl>
    147 
    148 <dl><dt><a name="Platform-LaunchApplication"><strong>LaunchApplication</strong></a>(self, application, parameters<font color="#909090">=None</font>, elevate_privilege<font color="#909090">=False</font>)</dt><dd><tt>"Launches&nbsp;the&nbsp;given&nbsp;|application|&nbsp;with&nbsp;a&nbsp;list&nbsp;of&nbsp;|parameters|&nbsp;on&nbsp;the&nbsp;OS.<br>
    149 &nbsp;<br>
    150 Set&nbsp;|elevate_privilege|&nbsp;to&nbsp;launch&nbsp;the&nbsp;application&nbsp;with&nbsp;root&nbsp;or&nbsp;admin&nbsp;rights.<br>
    151 &nbsp;<br>
    152 Returns:<br>
    153 &nbsp;&nbsp;A&nbsp;popen&nbsp;style&nbsp;process&nbsp;handle&nbsp;for&nbsp;host&nbsp;platforms.</tt></dd></dl>
    154 
    155 <dl><dt><a name="Platform-SetHTTPServerDirectories"><strong>SetHTTPServerDirectories</strong></a>(self, paths)</dt><dd><tt>Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;HTTP&nbsp;server&nbsp;was&nbsp;started,&nbsp;False&nbsp;otherwise.</tt></dd></dl>
    156 
    157 <dl><dt><a name="Platform-StartLocalServer"><strong>StartLocalServer</strong></a>(self, server)</dt><dd><tt>Starts&nbsp;a&nbsp;LocalServer&nbsp;and&nbsp;associates&nbsp;it&nbsp;with&nbsp;this&nbsp;platform.<br>
    158 |server.Close()|&nbsp;should&nbsp;be&nbsp;called&nbsp;manually&nbsp;to&nbsp;close&nbsp;the&nbsp;started&nbsp;server.</tt></dd></dl>
    159 
    160 <dl><dt><a name="Platform-StartMonitoringPower"><strong>StartMonitoringPower</strong></a>(self, browser)</dt><dd><tt>Starts&nbsp;monitoring&nbsp;power&nbsp;utilization&nbsp;statistics.<br>
    161 &nbsp;<br>
    162 Args:<br>
    163 &nbsp;&nbsp;browser:&nbsp;The&nbsp;browser&nbsp;to&nbsp;monitor.</tt></dd></dl>
    164 
    165 <dl><dt><a name="Platform-StartVideoCapture"><strong>StartVideoCapture</strong></a>(self, min_bitrate_mbps)</dt><dd><tt>Starts&nbsp;capturing&nbsp;video.<br>
    166 &nbsp;<br>
    167 Outer&nbsp;framing&nbsp;may&nbsp;be&nbsp;included&nbsp;(from&nbsp;the&nbsp;OS,&nbsp;browser&nbsp;window,&nbsp;and&nbsp;webcam).<br>
    168 &nbsp;<br>
    169 Args:<br>
    170 &nbsp;&nbsp;min_bitrate_mbps:&nbsp;The&nbsp;minimum&nbsp;capture&nbsp;bitrate&nbsp;in&nbsp;MegaBits&nbsp;Per&nbsp;Second.<br>
    171 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;platform&nbsp;is&nbsp;free&nbsp;to&nbsp;deliver&nbsp;a&nbsp;higher&nbsp;bitrate&nbsp;if&nbsp;it&nbsp;can&nbsp;do&nbsp;so<br>
    172 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;without&nbsp;increasing&nbsp;overhead.<br>
    173 &nbsp;<br>
    174 Raises:<br>
    175 &nbsp;&nbsp;ValueError&nbsp;if&nbsp;the&nbsp;required&nbsp;|min_bitrate_mbps|&nbsp;can't&nbsp;be&nbsp;achieved.</tt></dd></dl>
    176 
    177 <dl><dt><a name="Platform-StopAllLocalServers"><strong>StopAllLocalServers</strong></a>(self)</dt></dl>
    178 
    179 <dl><dt><a name="Platform-StopMonitoringPower"><strong>StopMonitoringPower</strong></a>(self)</dt><dd><tt>Stops&nbsp;monitoring&nbsp;power&nbsp;utilization&nbsp;and&nbsp;returns&nbsp;stats<br>
    180 &nbsp;<br>
    181 Returns:<br>
    182 &nbsp;&nbsp;None&nbsp;if&nbsp;power&nbsp;measurement&nbsp;failed&nbsp;for&nbsp;some&nbsp;reason,&nbsp;otherwise&nbsp;a&nbsp;dict&nbsp;of<br>
    183 &nbsp;&nbsp;power&nbsp;utilization&nbsp;statistics&nbsp;containing:&nbsp;{<br>
    184 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;An&nbsp;identifier&nbsp;for&nbsp;the&nbsp;data&nbsp;provider.&nbsp;Allows&nbsp;to&nbsp;evaluate&nbsp;the&nbsp;precision<br>
    185 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;of&nbsp;the&nbsp;data.&nbsp;Example&nbsp;values:&nbsp;monsoon,&nbsp;powermetrics,&nbsp;ds2784<br>
    186 &nbsp;&nbsp;&nbsp;&nbsp;'identifier':&nbsp;identifier,<br>
    187 &nbsp;<br>
    188 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;The&nbsp;instantaneous&nbsp;power&nbsp;(voltage&nbsp;*&nbsp;current)&nbsp;reading&nbsp;in&nbsp;milliwatts&nbsp;at<br>
    189 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;each&nbsp;sample.<br>
    190 &nbsp;&nbsp;&nbsp;&nbsp;'power_samples_mw':&nbsp;&nbsp;[mw0,&nbsp;mw1,&nbsp;...,&nbsp;mwN],<br>
    191 &nbsp;<br>
    192 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;The&nbsp;full&nbsp;system&nbsp;energy&nbsp;consumption&nbsp;during&nbsp;the&nbsp;sampling&nbsp;period&nbsp;in<br>
    193 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;milliwatt&nbsp;hours.&nbsp;May&nbsp;be&nbsp;estimated&nbsp;by&nbsp;integrating&nbsp;power&nbsp;samples&nbsp;or&nbsp;may<br>
    194 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;be&nbsp;exact&nbsp;on&nbsp;supported&nbsp;hardware.<br>
    195 &nbsp;&nbsp;&nbsp;&nbsp;'energy_consumption_mwh':&nbsp;mwh,<br>
    196 &nbsp;<br>
    197 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;The&nbsp;target&nbsp;application's&nbsp;energy&nbsp;consumption&nbsp;during&nbsp;the&nbsp;sampling&nbsp;period<br>
    198 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;in&nbsp;milliwatt&nbsp;hours.&nbsp;Should&nbsp;be&nbsp;returned&nbsp;iff<br>
    199 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;<a href="#Platform-CanMeasurePerApplicationPower">CanMeasurePerApplicationPower</a>()&nbsp;return&nbsp;true.<br>
    200 &nbsp;&nbsp;&nbsp;&nbsp;'application_energy_consumption_mwh':&nbsp;mwh,<br>
    201 &nbsp;<br>
    202 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;A&nbsp;platform-specific&nbsp;dictionary&nbsp;of&nbsp;additional&nbsp;details&nbsp;about&nbsp;the<br>
    203 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;utilization&nbsp;of&nbsp;individual&nbsp;hardware&nbsp;components.<br>
    204 &nbsp;&nbsp;&nbsp;&nbsp;component_utilization:&nbsp;{<br>
    205 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br>
    206 &nbsp;&nbsp;&nbsp;&nbsp;}<br>
    207 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;<a href="#Platform">Platform</a>-specific&nbsp;data&nbsp;not&nbsp;attributed&nbsp;to&nbsp;any&nbsp;particular&nbsp;hardware<br>
    208 &nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;component.<br>
    209 &nbsp;&nbsp;&nbsp;&nbsp;platform_info:&nbsp;{<br>
    210 &nbsp;<br>
    211 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Device-specific&nbsp;onboard&nbsp;temperature&nbsp;sensor.<br>
    212 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'average_temperature_c':&nbsp;c,<br>
    213 &nbsp;<br>
    214 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br>
    215 &nbsp;&nbsp;&nbsp;&nbsp;}<br>
    216 &nbsp;<br>
    217 &nbsp;&nbsp;}</tt></dd></dl>
    218 
    219 <dl><dt><a name="Platform-StopVideoCapture"><strong>StopVideoCapture</strong></a>(self)</dt><dd><tt>Stops&nbsp;capturing&nbsp;video.<br>
    220 &nbsp;<br>
    221 Returns:<br>
    222 &nbsp;&nbsp;A&nbsp;telemetry.core.video.Video&nbsp;<a href="__builtin__.html#object">object</a>.</tt></dd></dl>
    223 
    224 <dl><dt><a name="Platform-TakeScreenshot"><strong>TakeScreenshot</strong></a>(self, file_path)</dt><dd><tt>Takes&nbsp;a&nbsp;screenshot&nbsp;of&nbsp;the&nbsp;platform&nbsp;and&nbsp;save&nbsp;to&nbsp;|file_path|.<br>
    225 &nbsp;<br>
    226 Note&nbsp;that&nbsp;this&nbsp;method&nbsp;may&nbsp;not&nbsp;be&nbsp;supported&nbsp;on&nbsp;all&nbsp;platform,&nbsp;so&nbsp;check&nbsp;with<br>
    227 CanTakeScreenshot&nbsp;before&nbsp;calling&nbsp;this.<br>
    228 &nbsp;<br>
    229 Args:<br>
    230 &nbsp;&nbsp;file_path:&nbsp;Where&nbsp;to&nbsp;save&nbsp;the&nbsp;screenshot&nbsp;to.&nbsp;If&nbsp;the&nbsp;platform&nbsp;is&nbsp;remote,<br>
    231 &nbsp;&nbsp;&nbsp;&nbsp;|file_path|&nbsp;is&nbsp;the&nbsp;path&nbsp;on&nbsp;the&nbsp;host&nbsp;platform.<br>
    232 &nbsp;<br>
    233 Returns&nbsp;True&nbsp;if&nbsp;it&nbsp;is&nbsp;believed&nbsp;the&nbsp;attempt&nbsp;succeeded.</tt></dd></dl>
    234 
    235 <dl><dt><a name="Platform-__init__"><strong>__init__</strong></a>(self, platform_backend)</dt></dl>
    236 
    237 <hr>
    238 Data descriptors defined here:<br>
    239 <dl><dt><strong>__dict__</strong></dt>
    240 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
    241 </dl>
    242 <dl><dt><strong>__weakref__</strong></dt>
    243 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
    244 </dl>
    245 <dl><dt><strong>http_server</strong></dt>
    246 </dl>
    247 <dl><dt><strong>is_host_platform</strong></dt>
    248 </dl>
    249 <dl><dt><strong>local_servers</strong></dt>
    250 <dd><tt>Returns&nbsp;the&nbsp;currently&nbsp;running&nbsp;local&nbsp;servers.</tt></dd>
    251 </dl>
    252 <dl><dt><strong>network_controller</strong></dt>
    253 <dd><tt>Control&nbsp;network&nbsp;settings&nbsp;and&nbsp;servers&nbsp;to&nbsp;simulate&nbsp;the&nbsp;Web.</tt></dd>
    254 </dl>
    255 <dl><dt><strong>tracing_controller</strong></dt>
    256 </dl>
    257 </td></tr></table></td></tr></table><p>
    258 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
    259 <tr bgcolor="#eeaa77">
    260 <td colspan=3 valign=bottom>&nbsp;<br>
    261 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    262     
    263 <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
    264 <td width="100%"><dl><dt><a name="-GetHostPlatform"><strong>GetHostPlatform</strong></a>()</dt></dl>
    265  <dl><dt><a name="-GetPlatformForDevice"><strong>GetPlatformForDevice</strong></a>(device, finder_options, logging<font color="#909090">=&lt;module 'logging' from '/usr/lib/python2.7/logging/__init__.pyc'&gt;</font>)</dt><dd><tt>Returns&nbsp;a&nbsp;platform&nbsp;instance&nbsp;for&nbsp;the&nbsp;device.<br>
    266 Args:<br>
    267 &nbsp;&nbsp;device:&nbsp;a&nbsp;device.Device&nbsp;instance.</tt></dd></dl>
    268 </td></tr></table>
    269 </body></html>