src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html

branch
eric7
changeset 11190
f5ffdf0164ab
parent 11186
c2d18aefef6b
child 11238
ddb3c3b4d679
diff -r 289c7150ec4b -r f5ffdf0164ab src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html
--- a/src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html	Mon Mar 24 14:16:32 2025 +0100
+++ b/src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html	Wed Mar 26 19:46:41 2025 +0100
@@ -147,6 +147,10 @@
 <td>Private method to get some essential data for the connected board.</td>
 </tr>
 <tr>
+<td><a href="#BaseDevice.__supportsHash">__supportsHash</a></td>
+<td>Private method to sheck, if the connected device supports hashing with the hashlib module and the given algorithm.</td>
+</tr>
+<tr>
 <td><a href="#BaseDevice._boardInformationCommands">_boardInformationCommands</a></td>
 <td>Protected method defining the list of commands to be execute on the board for determining information about the board.</td>
 </tr>
@@ -391,6 +395,10 @@
 <td>Public method to check, if the device (potentially) has support to set the WiFi country.</td>
 </tr>
 <tr>
+<td><a href="#BaseDevice.hash">hash</a></td>
+<td>Public method to calculate the hash value of a file on the connected device.</td>
+</tr>
+<tr>
 <td><a href="#BaseDevice.isLanConnected">isLanConnected</a></td>
 <td>Public method to check the LAN connection status.</td>
 </tr>
@@ -539,6 +547,10 @@
 <td>Public method to set the time of the connected device to the local computer's time.</td>
 </tr>
 <tr>
+<td><a href="#BaseDevice.touch">touch</a></td>
+<td>Public method to touch a file on the connected device.</td>
+</tr>
+<tr>
 <td><a href="#BaseDevice.upipInstall">upipInstall</a></td>
 <td>Public method to install packages using 'upip'.</td>
 </tr>
@@ -606,6 +618,33 @@
 raised to indicate an issue with the device
 </dd>
 </dl>
+<a NAME="BaseDevice.__supportsHash" ID="BaseDevice.__supportsHash"></a>
+<h4>BaseDevice.__supportsHash</h4>
+<b>__supportsHash</b>(<i>algorithm</i>)
+<p>
+        Private method to sheck, if the connected device supports hashing with
+        the hashlib module and the given algorithm.
+</p>
+
+<dl>
+
+<dt><i>algorithm</i> (str)</dt>
+<dd>
+hashing algorithm to be used
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+flag indicating hashing support
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
 <a NAME="BaseDevice._boardInformationCommands" ID="BaseDevice._boardInformationCommands"></a>
 <h4>BaseDevice._boardInformationCommands</h4>
 <b>_boardInformationCommands</b>(<i></i>)
@@ -1934,6 +1973,48 @@
 bool
 </dd>
 </dl>
+<a NAME="BaseDevice.hash" ID="BaseDevice.hash"></a>
+<h4>BaseDevice.hash</h4>
+<b>hash</b>(<i>deviceFileName, algorithm="sha256", chunkSize=256</i>)
+<p>
+        Public method to calculate the hash value of a file on the connected device.
+</p>
+
+<dl>
+
+<dt><i>deviceFileName</i> (str)</dt>
+<dd>
+name of the file to be touched
+</dd>
+<dt><i>algorithm</i> (str (optional))</dt>
+<dd>
+hashing algorithm to be used (defaults to "sha256")
+</dd>
+<dt><i>chunkSize</i> (int (optional))</dt>
+<dd>
+size of data chunks to be sent to the algorithm
+            (defaults to 256)
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+calculate hash digest
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bytes
+</dd>
+</dl>
+<dl>
+
+<dt>Raises <b>OSError</b>:</dt>
+<dd>
+raised to indicate an issue with the device
+</dd>
+</dl>
 <a NAME="BaseDevice.isLanConnected" ID="BaseDevice.isLanConnected"></a>
 <h4>BaseDevice.isLanConnected</h4>
 <b>isLanConnected</b>(<i></i>)
@@ -2798,6 +2879,27 @@
 raised to indicate an issue with the device
 </dd>
 </dl>
+<a NAME="BaseDevice.touch" ID="BaseDevice.touch"></a>
+<h4>BaseDevice.touch</h4>
+<b>touch</b>(<i>deviceFileName</i>)
+<p>
+        Public method to touch a file on the connected device.
+</p>
+
+<dl>
+
+<dt><i>deviceFileName</i> (str)</dt>
+<dd>
+name of the file to be touched
+</dd>
+</dl>
+<dl>
+
+<dt>Raises <b>OSError</b>:</dt>
+<dd>
+raised to indicate an issue with the device
+</dd>
+</dl>
 <a NAME="BaseDevice.upipInstall" ID="BaseDevice.upipInstall"></a>
 <h4>BaseDevice.upipInstall</h4>
 <b>upipInstall</b>(<i>packages</i>)

eric ide

mercurial