src/eric7/Documentation/Source/eric7.MicroPython.MicroPythonDeviceInterface.html

branch
mpy_network
changeset 9799
a79430a8811d
parent 9766
f0e22f3a5878
child 9989
286c2a21f36f
diff -r 4402d76c5fa9 -r a79430a8811d src/eric7/Documentation/Source/eric7.MicroPython.MicroPythonDeviceInterface.html
--- a/src/eric7/Documentation/Source/eric7.MicroPython.MicroPythonDeviceInterface.html	Fri Feb 24 18:36:43 2023 +0100
+++ b/src/eric7/Documentation/Source/eric7.MicroPython.MicroPythonDeviceInterface.html	Sat Feb 25 19:18:07 2023 +0100
@@ -57,7 +57,7 @@
 <h3>Class Attributes</h3>
 
 <table>
-<tr><td>None</td></tr>
+<tr><td>PasteModePrompt</td></tr><tr><td>TracebackMarker</td></tr>
 </table>
 <h3>Class Methods</h3>
 
@@ -73,6 +73,22 @@
 <td>Constructor</td>
 </tr>
 <tr>
+<td><a href="#MicroPythonDeviceInterface.__execute_paste">__execute_paste</a></td>
+<td>Private method to send commands to the connected device using 'paste' mode and return the result.</td>
+</tr>
+<tr>
+<td><a href="#MicroPythonDeviceInterface.__execute_raw">__execute_raw</a></td>
+<td>Private method to send commands to the connected device using 'raw REPL' mode and return the result.</td>
+</tr>
+<tr>
+<td><a href="#MicroPythonDeviceInterface.__pasteOff">__pasteOff</a></td>
+<td>Private method to switch 'paste' mode off.</td>
+</tr>
+<tr>
+<td><a href="#MicroPythonDeviceInterface.__pasteOn">__pasteOn</a></td>
+<td>Private method to switch the connected device to 'paste' mode.</td>
+</tr>
+<tr>
 <td><a href="#MicroPythonDeviceInterface.__rawOff">__rawOff</a></td>
 <td>Private method to switch 'raw' mode off.</td>
 </tr>
@@ -101,6 +117,10 @@
 <td>Public method to execute a series of commands over a period of time without returning any result (asynchronous execution).</td>
 </tr>
 <tr>
+<td><a href="#MicroPythonDeviceInterface.executeAsyncPaste">executeAsyncPaste</a></td>
+<td>Public method to execute a series of commands over a period of time without returning any result (asynchronous execution).</td>
+</tr>
+<tr>
 <td><a href="#MicroPythonDeviceInterface.handlePreferencesChanged">handlePreferencesChanged</a></td>
 <td>Public slot to handle a change of the preferences.</td>
 </tr>
@@ -137,6 +157,105 @@
 reference to the parent object
 </dd>
 </dl>
+<a NAME="MicroPythonDeviceInterface.__execute_paste" ID="MicroPythonDeviceInterface.__execute_paste"></a>
+<h4>MicroPythonDeviceInterface.__execute_paste</h4>
+<b>__execute_paste</b>(<i>commands, timeout=0</i>)
+
+<p>
+        Private method to send commands to the connected device using 'paste' mode
+        and return the result.
+</p>
+<p>
+        If no serial connection is available, empty results will be returned.
+</p>
+<dl>
+
+<dt><i>commands</i> (str or list of str)</dt>
+<dd>
+list of commands to be executed
+</dd>
+<dt><i>timeout</i> (int (optional))</dt>
+<dd>
+per command timeout in milliseconds (0 for configured default)
+            (defaults to 0)
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing stdout and stderr output of the device
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (bytes, bytes)
+</dd>
+</dl>
+<a NAME="MicroPythonDeviceInterface.__execute_raw" ID="MicroPythonDeviceInterface.__execute_raw"></a>
+<h4>MicroPythonDeviceInterface.__execute_raw</h4>
+<b>__execute_raw</b>(<i>commands, timeout=0</i>)
+
+<p>
+        Private method to send commands to the connected device using 'raw REPL' mode
+        and return the result.
+</p>
+<p>
+        If no serial connection is available, empty results will be returned.
+</p>
+<dl>
+
+<dt><i>commands</i> (str or list of str)</dt>
+<dd>
+list of commands to be executed
+</dd>
+<dt><i>timeout</i> (int (optional))</dt>
+<dd>
+per command timeout in milliseconds (0 for configured default)
+            (defaults to 0)
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing stdout and stderr output of the device
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (bytes, bytes)
+</dd>
+</dl>
+<a NAME="MicroPythonDeviceInterface.__pasteOff" ID="MicroPythonDeviceInterface.__pasteOff"></a>
+<h4>MicroPythonDeviceInterface.__pasteOff</h4>
+<b>__pasteOff</b>(<i></i>)
+
+<p>
+        Private method to switch 'paste' mode off.
+</p>
+<a NAME="MicroPythonDeviceInterface.__pasteOn" ID="MicroPythonDeviceInterface.__pasteOn"></a>
+<h4>MicroPythonDeviceInterface.__pasteOn</h4>
+<b>__pasteOn</b>(<i></i>)
+
+<p>
+        Private method to switch the connected device to 'paste' mode.
+</p>
+<p>
+        Note: switching to paste mode is done with synchronous writes.
+</p>
+<dl>
+<dt>Return:</dt>
+<dd>
+flag indicating success
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
 <a NAME="MicroPythonDeviceInterface.__rawOff" ID="MicroPythonDeviceInterface.__rawOff"></a>
 <h4>MicroPythonDeviceInterface.__rawOff</h4>
 <b>__rawOff</b>(<i></i>)
@@ -158,7 +277,12 @@
 <dt>Return:</dt>
 <dd>
 flag indicating success
-@rtype bool
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
 </dd>
 </dl>
 <a NAME="MicroPythonDeviceInterface.__readSerial" ID="MicroPythonDeviceInterface.__readSerial"></a>
@@ -204,7 +328,7 @@
 </p>
 <a NAME="MicroPythonDeviceInterface.execute" ID="MicroPythonDeviceInterface.execute"></a>
 <h4>MicroPythonDeviceInterface.execute</h4>
-<b>execute</b>(<i>commands</i>)
+<b>execute</b>(<i>commands, *, mode="raw", timeout=0</i>)
 
 <p>
         Public method to send commands to the connected device and return the
@@ -219,6 +343,16 @@
 <dd>
 list of commands to be executed
 </dd>
+<dt><i>mode=</i> (str)</dt>
+<dd>
+submit mode to be used (one of 'raw' or 'paste') (defaults to
+            'raw')
+</dd>
+<dt><i>timeout=</i> (int (optional))</dt>
+<dd>
+per command timeout in milliseconds (0 for configured default)
+            (defaults to 0)
+</dd>
 </dl>
 <dl>
 <dt>Return:</dt>
@@ -232,6 +366,13 @@
 tuple of (bytes, bytes)
 </dd>
 </dl>
+<dl>
+
+<dt>Raises <b>ValueError</b>:</dt>
+<dd>
+raised in case of an unsupported submit mode
+</dd>
+</dl>
 <a NAME="MicroPythonDeviceInterface.executeAsync" ID="MicroPythonDeviceInterface.executeAsync"></a>
 <h4>MicroPythonDeviceInterface.executeAsync</h4>
 <b>executeAsync</b>(<i>commandsList</i>)
@@ -247,6 +388,21 @@
 list of commands to be execute on the device
 </dd>
 </dl>
+<a NAME="MicroPythonDeviceInterface.executeAsyncPaste" ID="MicroPythonDeviceInterface.executeAsyncPaste"></a>
+<h4>MicroPythonDeviceInterface.executeAsyncPaste</h4>
+<b>executeAsyncPaste</b>(<i>commandsList</i>)
+
+<p>
+        Public method to execute a series of commands over a period of time
+        without returning any result (asynchronous execution).
+</p>
+<dl>
+
+<dt><i>commandsList</i> (list of bytes)</dt>
+<dd>
+list of commands to be execute on the device
+</dd>
+</dl>
 <a NAME="MicroPythonDeviceInterface.handlePreferencesChanged" ID="MicroPythonDeviceInterface.handlePreferencesChanged"></a>
 <h4>MicroPythonDeviceInterface.handlePreferencesChanged</h4>
 <b>handlePreferencesChanged</b>(<i></i>)

eric ide

mercurial