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