84 <td><a href="#MicroPythonWebreplDeviceInterface.disconnectFromDevice">disconnectFromDevice</a></td> |
84 <td><a href="#MicroPythonWebreplDeviceInterface.disconnectFromDevice">disconnectFromDevice</a></td> |
85 <td>Public slot to disconnect from the device.</td> |
85 <td>Public slot to disconnect from the device.</td> |
86 </tr> |
86 </tr> |
87 <tr> |
87 <tr> |
88 <td><a href="#MicroPythonWebreplDeviceInterface.execute">execute</a></td> |
88 <td><a href="#MicroPythonWebreplDeviceInterface.execute">execute</a></td> |
89 <td>Public method to send commands to the connected device and return the result.</td> |
89 <td></td> |
90 </tr> |
90 </tr> |
91 <tr> |
91 <tr> |
92 <td><a href="#MicroPythonWebreplDeviceInterface.executeAsync">executeAsync</a></td> |
92 <td><a href="#MicroPythonWebreplDeviceInterface.executeAsync">executeAsync</a></td> |
93 <td>Public method to execute a series of commands over a period of time without returning any result (asynchronous execution).</td> |
93 <td></td> |
94 </tr> |
94 </tr> |
95 <tr> |
95 <tr> |
96 <td><a href="#MicroPythonWebreplDeviceInterface.handlePreferencesChanged">handlePreferencesChanged</a></td> |
96 <td><a href="#MicroPythonWebreplDeviceInterface.handlePreferencesChanged">handlePreferencesChanged</a></td> |
97 <td>Public slot to handle a change of the preferences.</td> |
97 <td>Public slot to handle a change of the preferences.</td> |
98 </tr> |
98 </tr> |
209 </p> |
209 </p> |
210 <a NAME="MicroPythonWebreplDeviceInterface.execute" ID="MicroPythonWebreplDeviceInterface.execute"></a> |
210 <a NAME="MicroPythonWebreplDeviceInterface.execute" ID="MicroPythonWebreplDeviceInterface.execute"></a> |
211 <h4>MicroPythonWebreplDeviceInterface.execute</h4> |
211 <h4>MicroPythonWebreplDeviceInterface.execute</h4> |
212 <b>execute</b>(<i>commands, *, mode="raw", timeout=0</i>) |
212 <b>execute</b>(<i>commands, *, mode="raw", timeout=0</i>) |
213 |
213 |
214 <p> |
|
215 Public method to send commands to the connected device and return the |
|
216 result. |
|
217 </p> |
|
218 <dl> |
|
219 |
|
220 <dt><i>commands</i> (str or list of str)</dt> |
|
221 <dd> |
|
222 list of commands to be executed |
|
223 </dd> |
|
224 <dt><i>mode=</i> (str)</dt> |
|
225 <dd> |
|
226 submit mode to be used (one of 'raw' or 'paste') (defaults to |
|
227 'raw'). This is ignored because webrepl always uses 'paste' mode. |
|
228 </dd> |
|
229 <dt><i>timeout=</i> (int (optional))</dt> |
|
230 <dd> |
|
231 per command timeout in milliseconds (0 for configured default) |
|
232 (defaults to 0) |
|
233 </dd> |
|
234 </dl> |
|
235 <dl> |
|
236 <dt>Return:</dt> |
|
237 <dd> |
|
238 tuple containing stdout and stderr output of the device |
|
239 </dd> |
|
240 </dl> |
|
241 <dl> |
|
242 <dt>Return Type:</dt> |
|
243 <dd> |
|
244 tuple of (bytes, bytes) |
|
245 </dd> |
|
246 </dl> |
|
247 <a NAME="MicroPythonWebreplDeviceInterface.executeAsync" ID="MicroPythonWebreplDeviceInterface.executeAsync"></a> |
214 <a NAME="MicroPythonWebreplDeviceInterface.executeAsync" ID="MicroPythonWebreplDeviceInterface.executeAsync"></a> |
248 <h4>MicroPythonWebreplDeviceInterface.executeAsync</h4> |
215 <h4>MicroPythonWebreplDeviceInterface.executeAsync</h4> |
249 <b>executeAsync</b>(<i>commandsList, submitMode</i>) |
216 <b>executeAsync</b>(<i>commandsList, submitMode</i>) |
250 |
217 |
251 <p> |
|
252 Public method to execute a series of commands over a period of time |
|
253 without returning any result (asynchronous execution). |
|
254 </p> |
|
255 <dl> |
|
256 |
|
257 <dt><i>commandsList</i> (list of str)</dt> |
|
258 <dd> |
|
259 list of commands to be execute on the device |
|
260 </dd> |
|
261 <dt><i>submitMode</i> (str (one of 'raw' or 'paste'))</dt> |
|
262 <dd> |
|
263 mode to be used to submit the commands |
|
264 </dd> |
|
265 </dl> |
|
266 <a NAME="MicroPythonWebreplDeviceInterface.handlePreferencesChanged" ID="MicroPythonWebreplDeviceInterface.handlePreferencesChanged"></a> |
218 <a NAME="MicroPythonWebreplDeviceInterface.handlePreferencesChanged" ID="MicroPythonWebreplDeviceInterface.handlePreferencesChanged"></a> |
267 <h4>MicroPythonWebreplDeviceInterface.handlePreferencesChanged</h4> |
219 <h4>MicroPythonWebreplDeviceInterface.handlePreferencesChanged</h4> |
268 <b>handlePreferencesChanged</b>(<i></i>) |
220 <b>handlePreferencesChanged</b>(<i></i>) |
269 |
221 |
270 <p> |
222 <p> |