1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.internal.platform.linux_based_platform_backend</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.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.platform.html"><font color="#ffffff">platform</font></a>.linux_based_platform_backend</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/internal/platform/linux_based_platform_backend.py">telemetry/internal/platform/linux_based_platform_backend.py</a></font></td></tr></table>
13    <p><tt>#&nbsp;Copyright&nbsp;2013&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.decorators.html">telemetry.decorators</a><br>
24<a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br>
25</td><td width="25%" valign=top><a href="telemetry.internal.platform.platform_backend.html">telemetry.internal.platform.platform_backend</a><br>
26<a href="re.html">re</a><br>
27</td><td width="25%" valign=top><a href="resource.html">resource</a><br>
28</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
29<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
30<tr bgcolor="#ee77aa">
31<td colspan=3 valign=bottom>&nbsp;<br>
32<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
33
34<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
35<td width="100%"><dl>
36<dt><font face="helvetica, arial"><a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBackend</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
37</font></dt><dd>
38<dl>
39<dt><font face="helvetica, arial"><a href="telemetry.internal.platform.linux_based_platform_backend.html#LinuxBasedPlatformBackend">LinuxBasedPlatformBackend</a>
40</font></dt></dl>
41</dd>
42</dl>
43 <p>
44<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
45<tr bgcolor="#ffc8d8">
46<td colspan=3 valign=bottom>&nbsp;<br>
47<font color="#000000" face="helvetica, arial"><a name="LinuxBasedPlatformBackend">class <strong>LinuxBasedPlatformBackend</strong></a>(<a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBackend</a>)</font></td></tr>
48
49<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
50<td colspan=2><tt>Abstract&nbsp;platform&nbsp;containing&nbsp;functionality&nbsp;shared&nbsp;by&nbsp;all&nbsp;Linux&nbsp;based&nbsp;OSes.<br>
51&nbsp;<br>
52This&nbsp;includes&nbsp;Android&nbsp;and&nbsp;ChromeOS.<br>
53&nbsp;<br>
54Subclasses&nbsp;must&nbsp;implement&nbsp;RunCommand,&nbsp;GetFileContents,&nbsp;GetPsOutput,&nbsp;and<br>
55ParseCStateSample.<br>&nbsp;</tt></td></tr>
56<tr><td>&nbsp;</td>
57<td width="100%"><dl><dt>Method resolution order:</dt>
58<dd><a href="telemetry.internal.platform.linux_based_platform_backend.html#LinuxBasedPlatformBackend">LinuxBasedPlatformBackend</a></dd>
59<dd><a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBackend</a></dd>
60<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
61</dl>
62<hr>
63Methods defined here:<br>
64<dl><dt><a name="LinuxBasedPlatformBackend-GetClockTicks"><strong>GetClockTicks</strong></a>(*args, **kwargs)</dt><dd><tt>Returns&nbsp;the&nbsp;number&nbsp;of&nbsp;clock&nbsp;ticks&nbsp;per&nbsp;second.<br>
65&nbsp;<br>
66The&nbsp;proper&nbsp;way&nbsp;is&nbsp;to&nbsp;call&nbsp;os.sysconf('SC_CLK_TCK')&nbsp;but&nbsp;that&nbsp;is&nbsp;not&nbsp;easy&nbsp;to<br>
67do&nbsp;on&nbsp;Android/CrOS.&nbsp;In&nbsp;practice,&nbsp;nearly&nbsp;all&nbsp;Linux&nbsp;machines&nbsp;have&nbsp;a&nbsp;USER_HZ<br>
68of&nbsp;100,&nbsp;so&nbsp;just&nbsp;return&nbsp;that.</tt></dd></dl>
69
70<dl><dt><a name="LinuxBasedPlatformBackend-GetCpuStats"><strong>GetCpuStats</strong></a>(self, pid)</dt></dl>
71
72<dl><dt><a name="LinuxBasedPlatformBackend-GetCpuTimestamp"><strong>GetCpuTimestamp</strong></a>(self)</dt></dl>
73
74<dl><dt><a name="LinuxBasedPlatformBackend-GetFileContents"><strong>GetFileContents</strong></a>(self, filename)</dt></dl>
75
76<dl><dt><a name="LinuxBasedPlatformBackend-GetMemoryStats"><strong>GetMemoryStats</strong></a>(self, pid)</dt></dl>
77
78<dl><dt><a name="LinuxBasedPlatformBackend-GetPsOutput"><strong>GetPsOutput</strong></a>(self, columns, pid<font color="#909090">=None</font>)</dt></dl>
79
80<dl><dt><a name="LinuxBasedPlatformBackend-GetSystemCommitCharge"><strong>GetSystemCommitCharge</strong></a>(self)</dt><dd><tt>#&nbsp;Get&nbsp;the&nbsp;commit&nbsp;charge&nbsp;in&nbsp;kB.</tt></dd></dl>
81
82<dl><dt><a name="LinuxBasedPlatformBackend-GetSystemTotalPhysicalMemory"><strong>GetSystemTotalPhysicalMemory</strong></a>(*args, **kwargs)</dt></dl>
83
84<dl><dt><a name="LinuxBasedPlatformBackend-RunCommand"><strong>RunCommand</strong></a>(self, cmd)</dt><dd><tt>Runs&nbsp;the&nbsp;specified&nbsp;command.<br>
85&nbsp;<br>
86Args:<br>
87&nbsp;&nbsp;&nbsp;&nbsp;cmd:&nbsp;A&nbsp;list&nbsp;of&nbsp;program&nbsp;arguments&nbsp;or&nbsp;the&nbsp;path&nbsp;string&nbsp;of&nbsp;the&nbsp;program.<br>
88Returns:<br>
89&nbsp;&nbsp;&nbsp;&nbsp;A&nbsp;string&nbsp;whose&nbsp;content&nbsp;is&nbsp;the&nbsp;output&nbsp;of&nbsp;the&nbsp;command.</tt></dd></dl>
90
91<hr>
92Static methods defined here:<br>
93<dl><dt><a name="LinuxBasedPlatformBackend-ParseCStateSample"><strong>ParseCStateSample</strong></a>(sample)</dt><dd><tt>Parse&nbsp;a&nbsp;single&nbsp;c-state&nbsp;residency&nbsp;sample.<br>
94&nbsp;<br>
95&nbsp;&nbsp;&nbsp;&nbsp;Args:<br>
96&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sample:&nbsp;A&nbsp;sample&nbsp;of&nbsp;c-state&nbsp;residency&nbsp;times&nbsp;to&nbsp;be&nbsp;parsed.&nbsp;Organized&nbsp;as<br>
97&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;dictionary&nbsp;mapping&nbsp;CPU&nbsp;name&nbsp;to&nbsp;a&nbsp;string&nbsp;containing&nbsp;all&nbsp;c-state<br>
98&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;names,&nbsp;the&nbsp;times&nbsp;in&nbsp;each&nbsp;state,&nbsp;the&nbsp;latency&nbsp;of&nbsp;each&nbsp;state,&nbsp;and&nbsp;the<br>
99&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time&nbsp;at&nbsp;which&nbsp;the&nbsp;sample&nbsp;was&nbsp;taken&nbsp;all&nbsp;separated&nbsp;by&nbsp;newlines.<br>
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ex:&nbsp;{'cpu0':&nbsp;'C0<br>
101C1<br>
1025000<br>
1032000<br>
10420<br>
10530<br>
1061406673171'}<br>
107&nbsp;<br>
108&nbsp;&nbsp;&nbsp;&nbsp;Returns:<br>
109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dictionary&nbsp;associating&nbsp;a&nbsp;c-state&nbsp;with&nbsp;a&nbsp;time.</tt></dd></dl>
110
111<hr>
112Methods inherited from <a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBackend</a>:<br>
113<dl><dt><a name="LinuxBasedPlatformBackend-CanCaptureVideo"><strong>CanCaptureVideo</strong></a>(self)</dt></dl>
114
115<dl><dt><a name="LinuxBasedPlatformBackend-CanFlushIndividualFilesFromSystemCache"><strong>CanFlushIndividualFilesFromSystemCache</strong></a>(self)</dt></dl>
116
117<dl><dt><a name="LinuxBasedPlatformBackend-CanLaunchApplication"><strong>CanLaunchApplication</strong></a>(self, application)</dt></dl>
118
119<dl><dt><a name="LinuxBasedPlatformBackend-CanMeasurePerApplicationPower"><strong>CanMeasurePerApplicationPower</strong></a>(self)</dt></dl>
120
121<dl><dt><a name="LinuxBasedPlatformBackend-CanMonitorNetworkData"><strong>CanMonitorNetworkData</strong></a>(self)</dt></dl>
122
123<dl><dt><a name="LinuxBasedPlatformBackend-CanMonitorPower"><strong>CanMonitorPower</strong></a>(self)</dt></dl>
124
125<dl><dt><a name="LinuxBasedPlatformBackend-CanMonitorThermalThrottling"><strong>CanMonitorThermalThrottling</strong></a>(self)</dt></dl>
126
127<dl><dt><a name="LinuxBasedPlatformBackend-CanTakeScreenshot"><strong>CanTakeScreenshot</strong></a>(self)</dt></dl>
128
129<dl><dt><a name="LinuxBasedPlatformBackend-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>
130&nbsp;<br>
131Currently&nbsp;this&nbsp;is&nbsp;only&nbsp;implemented&nbsp;on&nbsp;Windows.&nbsp;See<br>
132crbug.com/424024&nbsp;for&nbsp;background&nbsp;on&nbsp;why&nbsp;it&nbsp;was&nbsp;added.<br>
133&nbsp;<br>
134Args:<br>
135&nbsp;&nbsp;proc:&nbsp;a&nbsp;process&nbsp;object&nbsp;returned&nbsp;from&nbsp;subprocess.Popen.<br>
136&nbsp;&nbsp;app_name:&nbsp;on&nbsp;Windows,&nbsp;is&nbsp;the&nbsp;prefix&nbsp;of&nbsp;the&nbsp;application's&nbsp;window<br>
137&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>
138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that&nbsp;only&nbsp;the&nbsp;application's&nbsp;windows&nbsp;are&nbsp;closed.<br>
139&nbsp;<br>
140Returns&nbsp;True&nbsp;if&nbsp;it&nbsp;is&nbsp;believed&nbsp;the&nbsp;attempt&nbsp;succeeded.</tt></dd></dl>
141
142<dl><dt><a name="LinuxBasedPlatformBackend-DidCreateBrowser"><strong>DidCreateBrowser</strong></a>(self, browser, browser_backend)</dt></dl>
143
144<dl><dt><a name="LinuxBasedPlatformBackend-DidStartBrowser"><strong>DidStartBrowser</strong></a>(self, browser, browser_backend)</dt></dl>
145
146<dl><dt><a name="LinuxBasedPlatformBackend-FlushDnsCache"><strong>FlushDnsCache</strong></a>(self)</dt></dl>
147
148<dl><dt><a name="LinuxBasedPlatformBackend-FlushEntireSystemCache"><strong>FlushEntireSystemCache</strong></a>(self)</dt></dl>
149
150<dl><dt><a name="LinuxBasedPlatformBackend-FlushSystemCacheForDirectory"><strong>FlushSystemCacheForDirectory</strong></a>(self, directory)</dt></dl>
151
152<dl><dt><a name="LinuxBasedPlatformBackend-GetArchName"><strong>GetArchName</strong></a>(self)</dt></dl>
153
154<dl><dt><a name="LinuxBasedPlatformBackend-GetChildPids"><strong>GetChildPids</strong></a>(self, pid)</dt></dl>
155
156<dl><dt><a name="LinuxBasedPlatformBackend-GetCommandLine"><strong>GetCommandLine</strong></a>(self, pid)</dt></dl>
157
158<dl><dt><a name="LinuxBasedPlatformBackend-GetDeviceTypeName"><strong>GetDeviceTypeName</strong></a>(self)</dt></dl>
159
160<dl><dt><a name="LinuxBasedPlatformBackend-GetNetworkData"><strong>GetNetworkData</strong></a>(self, browser)</dt></dl>
161
162<dl><dt><a name="LinuxBasedPlatformBackend-GetOSName"><strong>GetOSName</strong></a>(self)</dt></dl>
163
164<dl><dt><a name="LinuxBasedPlatformBackend-GetOSVersionName"><strong>GetOSVersionName</strong></a>(self)</dt></dl>
165
166<dl><dt><a name="LinuxBasedPlatformBackend-GetRemotePort"><strong>GetRemotePort</strong></a>(self, port)</dt></dl>
167
168<dl><dt><a name="LinuxBasedPlatformBackend-HasBeenThermallyThrottled"><strong>HasBeenThermallyThrottled</strong></a>(self)</dt></dl>
169
170<dl><dt><a name="LinuxBasedPlatformBackend-InitPlatformBackend"><strong>InitPlatformBackend</strong></a>(self)</dt></dl>
171
172<dl><dt><a name="LinuxBasedPlatformBackend-InstallApplication"><strong>InstallApplication</strong></a>(self, application)</dt></dl>
173
174<dl><dt><a name="LinuxBasedPlatformBackend-IsApplicationRunning"><strong>IsApplicationRunning</strong></a>(self, application)</dt></dl>
175
176<dl><dt><a name="LinuxBasedPlatformBackend-IsCooperativeShutdownSupported"><strong>IsCooperativeShutdownSupported</strong></a>(self)</dt><dd><tt>Indicates&nbsp;whether&nbsp;CooperativelyShutdown,&nbsp;below,&nbsp;is&nbsp;supported.<br>
177It&nbsp;is&nbsp;not&nbsp;necessary&nbsp;to&nbsp;implement&nbsp;it&nbsp;on&nbsp;all&nbsp;platforms.</tt></dd></dl>
178
179<dl><dt><a name="LinuxBasedPlatformBackend-IsDisplayTracingSupported"><strong>IsDisplayTracingSupported</strong></a>(self)</dt></dl>
180
181<dl><dt><a name="LinuxBasedPlatformBackend-IsThermallyThrottled"><strong>IsThermallyThrottled</strong></a>(self)</dt></dl>
182
183<dl><dt><a name="LinuxBasedPlatformBackend-LaunchApplication"><strong>LaunchApplication</strong></a>(self, application, parameters<font color="#909090">=None</font>, elevate_privilege<font color="#909090">=False</font>)</dt></dl>
184
185<dl><dt><a name="LinuxBasedPlatformBackend-PathExists"><strong>PathExists</strong></a>(self, path, timeout<font color="#909090">=None</font>, retries<font color="#909090">=None</font>)</dt><dd><tt>Tests&nbsp;whether&nbsp;the&nbsp;given&nbsp;path&nbsp;exists&nbsp;on&nbsp;the&nbsp;target&nbsp;platform.<br>
186Args:<br>
187&nbsp;&nbsp;path:&nbsp;path&nbsp;in&nbsp;request.<br>
188&nbsp;&nbsp;timeout:&nbsp;timeout.<br>
189&nbsp;&nbsp;retries:&nbsp;num&nbsp;of&nbsp;retries.<br>
190Return:<br>
191&nbsp;&nbsp;Whether&nbsp;the&nbsp;path&nbsp;exists&nbsp;on&nbsp;the&nbsp;target&nbsp;platform.</tt></dd></dl>
192
193<dl><dt><a name="LinuxBasedPlatformBackend-PurgeUnpinnedMemory"><strong>PurgeUnpinnedMemory</strong></a>(self)</dt></dl>
194
195<dl><dt><a name="LinuxBasedPlatformBackend-ReadMsr"><strong>ReadMsr</strong></a>(self, msr_number, start<font color="#909090">=0</font>, length<font color="#909090">=64</font>)</dt><dd><tt>Read&nbsp;a&nbsp;CPU&nbsp;model-specific&nbsp;register&nbsp;(MSR).<br>
196&nbsp;<br>
197Which&nbsp;MSRs&nbsp;are&nbsp;available&nbsp;depends&nbsp;on&nbsp;the&nbsp;CPU&nbsp;model.<br>
198On&nbsp;systems&nbsp;with&nbsp;multiple&nbsp;CPUs,&nbsp;this&nbsp;function&nbsp;may&nbsp;run&nbsp;on&nbsp;any&nbsp;CPU.<br>
199&nbsp;<br>
200Args:<br>
201&nbsp;&nbsp;msr_number:&nbsp;The&nbsp;number&nbsp;of&nbsp;the&nbsp;register&nbsp;to&nbsp;read.<br>
202&nbsp;&nbsp;start:&nbsp;The&nbsp;least&nbsp;significant&nbsp;bit&nbsp;to&nbsp;read,&nbsp;zero-indexed.<br>
203&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Said&nbsp;another&nbsp;way,&nbsp;the&nbsp;number&nbsp;of&nbsp;bits&nbsp;to&nbsp;right-shift&nbsp;the&nbsp;MSR&nbsp;value.)<br>
204&nbsp;&nbsp;length:&nbsp;The&nbsp;number&nbsp;of&nbsp;bits&nbsp;to&nbsp;read.&nbsp;MSRs&nbsp;are&nbsp;64&nbsp;bits,&nbsp;even&nbsp;on&nbsp;32-bit&nbsp;CPUs.</tt></dd></dl>
205
206<dl><dt><a name="LinuxBasedPlatformBackend-SetFullPerformanceModeEnabled"><strong>SetFullPerformanceModeEnabled</strong></a>(self, enabled)</dt></dl>
207
208<dl><dt><a name="LinuxBasedPlatformBackend-SetPlatform"><strong>SetPlatform</strong></a>(self, platform)</dt></dl>
209
210<dl><dt><a name="LinuxBasedPlatformBackend-StartDisplayTracing"><strong>StartDisplayTracing</strong></a>(self)</dt><dd><tt>Start&nbsp;gathering&nbsp;a&nbsp;trace&nbsp;with&nbsp;frame&nbsp;timestamps&nbsp;close&nbsp;to&nbsp;physical<br>
211display.</tt></dd></dl>
212
213<dl><dt><a name="LinuxBasedPlatformBackend-StartMonitoringPower"><strong>StartMonitoringPower</strong></a>(self, browser)</dt></dl>
214
215<dl><dt><a name="LinuxBasedPlatformBackend-StartVideoCapture"><strong>StartVideoCapture</strong></a>(self, min_bitrate_mbps)</dt></dl>
216
217<dl><dt><a name="LinuxBasedPlatformBackend-StopDisplayTracing"><strong>StopDisplayTracing</strong></a>(self)</dt><dd><tt>Stop&nbsp;gathering&nbsp;a&nbsp;trace&nbsp;with&nbsp;frame&nbsp;timestamps&nbsp;close&nbsp;to&nbsp;physical&nbsp;display.<br>
218&nbsp;<br>
219Returns&nbsp;a&nbsp;raw&nbsp;tracing&nbsp;events&nbsp;that&nbsp;contains&nbsp;the&nbsp;timestamps&nbsp;of&nbsp;physical<br>
220display.</tt></dd></dl>
221
222<dl><dt><a name="LinuxBasedPlatformBackend-StopMonitoringPower"><strong>StopMonitoringPower</strong></a>(self)</dt></dl>
223
224<dl><dt><a name="LinuxBasedPlatformBackend-StopVideoCapture"><strong>StopVideoCapture</strong></a>(self)</dt></dl>
225
226<dl><dt><a name="LinuxBasedPlatformBackend-TakeScreenshot"><strong>TakeScreenshot</strong></a>(self, file_path)</dt></dl>
227
228<dl><dt><a name="LinuxBasedPlatformBackend-WillCloseBrowser"><strong>WillCloseBrowser</strong></a>(self, browser, browser_backend)</dt></dl>
229
230<dl><dt><a name="LinuxBasedPlatformBackend-__init__"><strong>__init__</strong></a>(self, device<font color="#909090">=None</font>)</dt><dd><tt>Initalize&nbsp;an&nbsp;instance&nbsp;of&nbsp;<a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">PlatformBackend</a>&nbsp;from&nbsp;a&nbsp;device&nbsp;optionally.<br>
231Call&nbsp;sites&nbsp;need&nbsp;to&nbsp;use&nbsp;SupportsDevice&nbsp;before&nbsp;intialization&nbsp;to&nbsp;check<br>
232whether&nbsp;this&nbsp;platform&nbsp;backend&nbsp;supports&nbsp;the&nbsp;device.<br>
233If&nbsp;device&nbsp;is&nbsp;None,&nbsp;this&nbsp;constructor&nbsp;returns&nbsp;the&nbsp;host&nbsp;platform&nbsp;backend<br>
234which&nbsp;telemetry&nbsp;is&nbsp;running&nbsp;on.<br>
235&nbsp;<br>
236Args:<br>
237&nbsp;&nbsp;device:&nbsp;an&nbsp;instance&nbsp;of&nbsp;telemetry.core.platform.device.Device.</tt></dd></dl>
238
239<hr>
240Class methods inherited from <a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBackend</a>:<br>
241<dl><dt><a name="LinuxBasedPlatformBackend-CreatePlatformForDevice"><strong>CreatePlatformForDevice</strong></a>(cls, device, finder_options)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl>
242
243<dl><dt><a name="LinuxBasedPlatformBackend-IsPlatformBackendForHost"><strong>IsPlatformBackendForHost</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Returns&nbsp;whether&nbsp;this&nbsp;platform&nbsp;backend&nbsp;is&nbsp;the&nbsp;platform&nbsp;backend&nbsp;to&nbsp;be&nbsp;used<br>
244for&nbsp;the&nbsp;host&nbsp;device&nbsp;which&nbsp;telemetry&nbsp;is&nbsp;running&nbsp;on.</tt></dd></dl>
245
246<dl><dt><a name="LinuxBasedPlatformBackend-SupportsDevice"><strong>SupportsDevice</strong></a>(cls, device)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>Returns&nbsp;whether&nbsp;this&nbsp;platform&nbsp;backend&nbsp;supports&nbsp;intialization&nbsp;from&nbsp;the<br>
247device.</tt></dd></dl>
248
249<hr>
250Data descriptors inherited from <a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBackend</a>:<br>
251<dl><dt><strong>__dict__</strong></dt>
252<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
253</dl>
254<dl><dt><strong>__weakref__</strong></dt>
255<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
256</dl>
257<dl><dt><strong>forwarder_factory</strong></dt>
258</dl>
259<dl><dt><strong>is_host_platform</strong></dt>
260</dl>
261<dl><dt><strong>is_video_capture_running</strong></dt>
262</dl>
263<dl><dt><strong>network_controller_backend</strong></dt>
264</dl>
265<dl><dt><strong>platform</strong></dt>
266</dl>
267<dl><dt><strong>running_browser_backends</strong></dt>
268</dl>
269<dl><dt><strong>tracing_controller_backend</strong></dt>
270</dl>
271<dl><dt><strong>wpr_ca_cert_path</strong></dt>
272</dl>
273<dl><dt><strong>wpr_http_device_port</strong></dt>
274</dl>
275<dl><dt><strong>wpr_https_device_port</strong></dt>
276</dl>
277</td></tr></table></td></tr></table>
278</body></html>