|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.MicroPython.GenericMicroPythonDevices</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.MicroPython.GenericMicroPythonDevices</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the device interface class for generic MicroPython devices |
|
27 (i.e. those devices not specifically supported yet). |
|
28 </p> |
|
29 <h3>Global Attributes</h3> |
|
30 |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Classes</h3> |
|
35 |
|
36 <table> |
|
37 |
|
38 <tr> |
|
39 <td><a href="#GenericMicroPythonDevice">GenericMicroPythonDevice</a></td> |
|
40 <td>Class implementing the device interface for generic MicroPython boards.</td> |
|
41 </tr> |
|
42 </table> |
|
43 <h3>Functions</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <hr /> |
|
49 <hr /> |
|
50 <a NAME="GenericMicroPythonDevice" ID="GenericMicroPythonDevice"></a> |
|
51 <h2>GenericMicroPythonDevice</h2> |
|
52 |
|
53 <p> |
|
54 Class implementing the device interface for generic MicroPython boards. |
|
55 </p> |
|
56 <h3>Derived from</h3> |
|
57 MicroPythonDevice |
|
58 <h3>Class Attributes</h3> |
|
59 |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Class Methods</h3> |
|
64 |
|
65 <table> |
|
66 <tr><td>None</td></tr> |
|
67 </table> |
|
68 <h3>Methods</h3> |
|
69 |
|
70 <table> |
|
71 |
|
72 <tr> |
|
73 <td><a href="#GenericMicroPythonDevice.__init__">GenericMicroPythonDevice</a></td> |
|
74 <td>Constructor</td> |
|
75 </tr> |
|
76 <tr> |
|
77 <td><a href="#GenericMicroPythonDevice.__deviceVolumeMounted">__deviceVolumeMounted</a></td> |
|
78 <td>Private method to check, if the device volume is mounted.</td> |
|
79 </tr> |
|
80 <tr> |
|
81 <td><a href="#GenericMicroPythonDevice.__findWorkspace">__findWorkspace</a></td> |
|
82 <td>Private method to find the workspace directory.</td> |
|
83 </tr> |
|
84 <tr> |
|
85 <td><a href="#GenericMicroPythonDevice.canRunScript">canRunScript</a></td> |
|
86 <td>Public method to determine, if a script can be executed.</td> |
|
87 </tr> |
|
88 <tr> |
|
89 <td><a href="#GenericMicroPythonDevice.canStartFileManager">canStartFileManager</a></td> |
|
90 <td>Public method to determine, if a File Manager can be started.</td> |
|
91 </tr> |
|
92 <tr> |
|
93 <td><a href="#GenericMicroPythonDevice.canStartPlotter">canStartPlotter</a></td> |
|
94 <td>Public method to determine, if a Plotter can be started.</td> |
|
95 </tr> |
|
96 <tr> |
|
97 <td><a href="#GenericMicroPythonDevice.canStartRepl">canStartRepl</a></td> |
|
98 <td>Public method to determine, if a REPL can be started.</td> |
|
99 </tr> |
|
100 <tr> |
|
101 <td><a href="#GenericMicroPythonDevice.deviceName">deviceName</a></td> |
|
102 <td>Public method to get the name of the device.</td> |
|
103 </tr> |
|
104 <tr> |
|
105 <td><a href="#GenericMicroPythonDevice.getWorkspace">getWorkspace</a></td> |
|
106 <td>Public method to get the workspace directory.</td> |
|
107 </tr> |
|
108 <tr> |
|
109 <td><a href="#GenericMicroPythonDevice.runScript">runScript</a></td> |
|
110 <td>Public method to run the given Python script.</td> |
|
111 </tr> |
|
112 <tr> |
|
113 <td><a href="#GenericMicroPythonDevice.setButtons">setButtons</a></td> |
|
114 <td>Public method to enable the supported action buttons.</td> |
|
115 </tr> |
|
116 <tr> |
|
117 <td><a href="#GenericMicroPythonDevice.supportsLocalFileAccess">supportsLocalFileAccess</a></td> |
|
118 <td>Public method to indicate file access via a local directory.</td> |
|
119 </tr> |
|
120 </table> |
|
121 <h3>Static Methods</h3> |
|
122 |
|
123 <table> |
|
124 <tr><td>None</td></tr> |
|
125 </table> |
|
126 |
|
127 <a NAME="GenericMicroPythonDevice.__init__" ID="GenericMicroPythonDevice.__init__"></a> |
|
128 <h4>GenericMicroPythonDevice (Constructor)</h4> |
|
129 <b>GenericMicroPythonDevice</b>(<i>microPythonWidget, deviceType, vid, pid, parent=None</i>) |
|
130 |
|
131 <p> |
|
132 Constructor |
|
133 </p> |
|
134 <dl> |
|
135 |
|
136 <dt><i>microPythonWidget</i> (MicroPythonWidget)</dt> |
|
137 <dd> |
|
138 reference to the main MicroPython widget |
|
139 </dd> |
|
140 <dt><i>deviceType</i> (str)</dt> |
|
141 <dd> |
|
142 device type assigned to this device interface |
|
143 </dd> |
|
144 <dt><i>vid</i> (int)</dt> |
|
145 <dd> |
|
146 vendor ID |
|
147 </dd> |
|
148 <dt><i>pid</i> (int)</dt> |
|
149 <dd> |
|
150 product ID |
|
151 </dd> |
|
152 <dt><i>parent</i> (QObject)</dt> |
|
153 <dd> |
|
154 reference to the parent object |
|
155 </dd> |
|
156 </dl> |
|
157 <a NAME="GenericMicroPythonDevice.__deviceVolumeMounted" ID="GenericMicroPythonDevice.__deviceVolumeMounted"></a> |
|
158 <h4>GenericMicroPythonDevice.__deviceVolumeMounted</h4> |
|
159 <b>__deviceVolumeMounted</b>(<i></i>) |
|
160 |
|
161 <p> |
|
162 Private method to check, if the device volume is mounted. |
|
163 </p> |
|
164 <dl> |
|
165 <dt>Return:</dt> |
|
166 <dd> |
|
167 flag indicated a mounted device |
|
168 </dd> |
|
169 </dl> |
|
170 <dl> |
|
171 <dt>Return Type:</dt> |
|
172 <dd> |
|
173 bool |
|
174 </dd> |
|
175 </dl> |
|
176 <a NAME="GenericMicroPythonDevice.__findWorkspace" ID="GenericMicroPythonDevice.__findWorkspace"></a> |
|
177 <h4>GenericMicroPythonDevice.__findWorkspace</h4> |
|
178 <b>__findWorkspace</b>(<i>silent=False</i>) |
|
179 |
|
180 <p> |
|
181 Private method to find the workspace directory. |
|
182 </p> |
|
183 <dl> |
|
184 |
|
185 <dt><i>silent</i> (bool)</dt> |
|
186 <dd> |
|
187 flag indicating silent operations |
|
188 </dd> |
|
189 </dl> |
|
190 <dl> |
|
191 <dt>Return:</dt> |
|
192 <dd> |
|
193 workspace directory used for saving files |
|
194 </dd> |
|
195 </dl> |
|
196 <dl> |
|
197 <dt>Return Type:</dt> |
|
198 <dd> |
|
199 str |
|
200 </dd> |
|
201 </dl> |
|
202 <a NAME="GenericMicroPythonDevice.canRunScript" ID="GenericMicroPythonDevice.canRunScript"></a> |
|
203 <h4>GenericMicroPythonDevice.canRunScript</h4> |
|
204 <b>canRunScript</b>(<i></i>) |
|
205 |
|
206 <p> |
|
207 Public method to determine, if a script can be executed. |
|
208 </p> |
|
209 <dl> |
|
210 <dt>Return:</dt> |
|
211 <dd> |
|
212 tuple containing a flag indicating it is safe to start a |
|
213 Plotter and a reason why it cannot. |
|
214 </dd> |
|
215 </dl> |
|
216 <dl> |
|
217 <dt>Return Type:</dt> |
|
218 <dd> |
|
219 tuple of (bool, str) |
|
220 </dd> |
|
221 </dl> |
|
222 <a NAME="GenericMicroPythonDevice.canStartFileManager" ID="GenericMicroPythonDevice.canStartFileManager"></a> |
|
223 <h4>GenericMicroPythonDevice.canStartFileManager</h4> |
|
224 <b>canStartFileManager</b>(<i></i>) |
|
225 |
|
226 <p> |
|
227 Public method to determine, if a File Manager can be started. |
|
228 </p> |
|
229 <dl> |
|
230 <dt>Return:</dt> |
|
231 <dd> |
|
232 tuple containing a flag indicating it is safe to start a |
|
233 File Manager and a reason why it cannot. |
|
234 </dd> |
|
235 </dl> |
|
236 <dl> |
|
237 <dt>Return Type:</dt> |
|
238 <dd> |
|
239 tuple of (bool, str) |
|
240 </dd> |
|
241 </dl> |
|
242 <a NAME="GenericMicroPythonDevice.canStartPlotter" ID="GenericMicroPythonDevice.canStartPlotter"></a> |
|
243 <h4>GenericMicroPythonDevice.canStartPlotter</h4> |
|
244 <b>canStartPlotter</b>(<i></i>) |
|
245 |
|
246 <p> |
|
247 Public method to determine, if a Plotter can be started. |
|
248 </p> |
|
249 <dl> |
|
250 <dt>Return:</dt> |
|
251 <dd> |
|
252 tuple containing a flag indicating it is safe to start a |
|
253 Plotter and a reason why it cannot. |
|
254 </dd> |
|
255 </dl> |
|
256 <dl> |
|
257 <dt>Return Type:</dt> |
|
258 <dd> |
|
259 tuple of (bool, str) |
|
260 </dd> |
|
261 </dl> |
|
262 <a NAME="GenericMicroPythonDevice.canStartRepl" ID="GenericMicroPythonDevice.canStartRepl"></a> |
|
263 <h4>GenericMicroPythonDevice.canStartRepl</h4> |
|
264 <b>canStartRepl</b>(<i></i>) |
|
265 |
|
266 <p> |
|
267 Public method to determine, if a REPL can be started. |
|
268 </p> |
|
269 <dl> |
|
270 <dt>Return:</dt> |
|
271 <dd> |
|
272 tuple containing a flag indicating it is safe to start a REPL |
|
273 and a reason why it cannot. |
|
274 </dd> |
|
275 </dl> |
|
276 <dl> |
|
277 <dt>Return Type:</dt> |
|
278 <dd> |
|
279 tuple of (bool, str) |
|
280 </dd> |
|
281 </dl> |
|
282 <a NAME="GenericMicroPythonDevice.deviceName" ID="GenericMicroPythonDevice.deviceName"></a> |
|
283 <h4>GenericMicroPythonDevice.deviceName</h4> |
|
284 <b>deviceName</b>(<i></i>) |
|
285 |
|
286 <p> |
|
287 Public method to get the name of the device. |
|
288 </p> |
|
289 <dl> |
|
290 <dt>Return:</dt> |
|
291 <dd> |
|
292 name of the device |
|
293 </dd> |
|
294 </dl> |
|
295 <dl> |
|
296 <dt>Return Type:</dt> |
|
297 <dd> |
|
298 str |
|
299 </dd> |
|
300 </dl> |
|
301 <a NAME="GenericMicroPythonDevice.getWorkspace" ID="GenericMicroPythonDevice.getWorkspace"></a> |
|
302 <h4>GenericMicroPythonDevice.getWorkspace</h4> |
|
303 <b>getWorkspace</b>(<i>silent=False</i>) |
|
304 |
|
305 <p> |
|
306 Public method to get the workspace directory. |
|
307 </p> |
|
308 <dl> |
|
309 |
|
310 <dt><i>silent</i> (bool)</dt> |
|
311 <dd> |
|
312 flag indicating silent operations |
|
313 </dd> |
|
314 </dl> |
|
315 <dl> |
|
316 <dt>Return:</dt> |
|
317 <dd> |
|
318 workspace directory used for saving files |
|
319 </dd> |
|
320 </dl> |
|
321 <dl> |
|
322 <dt>Return Type:</dt> |
|
323 <dd> |
|
324 str |
|
325 </dd> |
|
326 </dl> |
|
327 <a NAME="GenericMicroPythonDevice.runScript" ID="GenericMicroPythonDevice.runScript"></a> |
|
328 <h4>GenericMicroPythonDevice.runScript</h4> |
|
329 <b>runScript</b>(<i>script</i>) |
|
330 |
|
331 <p> |
|
332 Public method to run the given Python script. |
|
333 </p> |
|
334 <dl> |
|
335 |
|
336 <dt><i>script</i> (str)</dt> |
|
337 <dd> |
|
338 script to be executed |
|
339 </dd> |
|
340 </dl> |
|
341 <a NAME="GenericMicroPythonDevice.setButtons" ID="GenericMicroPythonDevice.setButtons"></a> |
|
342 <h4>GenericMicroPythonDevice.setButtons</h4> |
|
343 <b>setButtons</b>(<i></i>) |
|
344 |
|
345 <p> |
|
346 Public method to enable the supported action buttons. |
|
347 </p> |
|
348 <a NAME="GenericMicroPythonDevice.supportsLocalFileAccess" ID="GenericMicroPythonDevice.supportsLocalFileAccess"></a> |
|
349 <h4>GenericMicroPythonDevice.supportsLocalFileAccess</h4> |
|
350 <b>supportsLocalFileAccess</b>(<i></i>) |
|
351 |
|
352 <p> |
|
353 Public method to indicate file access via a local directory. |
|
354 </p> |
|
355 <dl> |
|
356 <dt>Return:</dt> |
|
357 <dd> |
|
358 flag indicating file access via local directory |
|
359 </dd> |
|
360 </dl> |
|
361 <dl> |
|
362 <dt>Return Type:</dt> |
|
363 <dd> |
|
364 bool |
|
365 </dd> |
|
366 </dl> |
|
367 <div align="right"><a href="#top">Up</a></div> |
|
368 <hr /> |
|
369 </body></html> |