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

branch
eric7
changeset 11190
f5ffdf0164ab
parent 11186
c2d18aefef6b
child 11238
ddb3c3b4d679
equal deleted inserted replaced
11189:289c7150ec4b 11190:f5ffdf0164ab
145 <tr> 145 <tr>
146 <td><a href="#BaseDevice.__getDeviceData">__getDeviceData</a></td> 146 <td><a href="#BaseDevice.__getDeviceData">__getDeviceData</a></td>
147 <td>Private method to get some essential data for the connected board.</td> 147 <td>Private method to get some essential data for the connected board.</td>
148 </tr> 148 </tr>
149 <tr> 149 <tr>
150 <td><a href="#BaseDevice.__supportsHash">__supportsHash</a></td>
151 <td>Private method to sheck, if the connected device supports hashing with the hashlib module and the given algorithm.</td>
152 </tr>
153 <tr>
150 <td><a href="#BaseDevice._boardInformationCommands">_boardInformationCommands</a></td> 154 <td><a href="#BaseDevice._boardInformationCommands">_boardInformationCommands</a></td>
151 <td>Protected method defining the list of commands to be execute on the board for determining information about the board.</td> 155 <td>Protected method defining the list of commands to be execute on the board for determining information about the board.</td>
152 </tr> 156 </tr>
153 <tr> 157 <tr>
154 <td><a href="#BaseDevice._getSetTimeCode">_getSetTimeCode</a></td> 158 <td><a href="#BaseDevice._getSetTimeCode">_getSetTimeCode</a></td>
389 <tr> 393 <tr>
390 <td><a href="#BaseDevice.hasWifiCountry">hasWifiCountry</a></td> 394 <td><a href="#BaseDevice.hasWifiCountry">hasWifiCountry</a></td>
391 <td>Public method to check, if the device (potentially) has support to set the WiFi country.</td> 395 <td>Public method to check, if the device (potentially) has support to set the WiFi country.</td>
392 </tr> 396 </tr>
393 <tr> 397 <tr>
398 <td><a href="#BaseDevice.hash">hash</a></td>
399 <td>Public method to calculate the hash value of a file on the connected device.</td>
400 </tr>
401 <tr>
394 <td><a href="#BaseDevice.isLanConnected">isLanConnected</a></td> 402 <td><a href="#BaseDevice.isLanConnected">isLanConnected</a></td>
395 <td>Public method to check the LAN connection status.</td> 403 <td>Public method to check the LAN connection status.</td>
396 </tr> 404 </tr>
397 <tr> 405 <tr>
398 <td><a href="#BaseDevice.isMicrobit">isMicrobit</a></td> 406 <td><a href="#BaseDevice.isMicrobit">isMicrobit</a></td>
535 <td>Public method to check, if the device supports renaming of files.</td> 543 <td>Public method to check, if the device supports renaming of files.</td>
536 </tr> 544 </tr>
537 <tr> 545 <tr>
538 <td><a href="#BaseDevice.syncTime">syncTime</a></td> 546 <td><a href="#BaseDevice.syncTime">syncTime</a></td>
539 <td>Public method to set the time of the connected device to the local computer's time.</td> 547 <td>Public method to set the time of the connected device to the local computer's time.</td>
548 </tr>
549 <tr>
550 <td><a href="#BaseDevice.touch">touch</a></td>
551 <td>Public method to touch a file on the connected device.</td>
540 </tr> 552 </tr>
541 <tr> 553 <tr>
542 <td><a href="#BaseDevice.upipInstall">upipInstall</a></td> 554 <td><a href="#BaseDevice.upipInstall">upipInstall</a></td>
543 <td>Public method to install packages using 'upip'.</td> 555 <td>Public method to install packages using 'upip'.</td>
544 </tr> 556 </tr>
604 <dt>Raises <b>OSError</b>:</dt> 616 <dt>Raises <b>OSError</b>:</dt>
605 <dd> 617 <dd>
606 raised to indicate an issue with the device 618 raised to indicate an issue with the device
607 </dd> 619 </dd>
608 </dl> 620 </dl>
621 <a NAME="BaseDevice.__supportsHash" ID="BaseDevice.__supportsHash"></a>
622 <h4>BaseDevice.__supportsHash</h4>
623 <b>__supportsHash</b>(<i>algorithm</i>)
624 <p>
625 Private method to sheck, if the connected device supports hashing with
626 the hashlib module and the given algorithm.
627 </p>
628
629 <dl>
630
631 <dt><i>algorithm</i> (str)</dt>
632 <dd>
633 hashing algorithm to be used
634 </dd>
635 </dl>
636 <dl>
637 <dt>Return:</dt>
638 <dd>
639 flag indicating hashing support
640 </dd>
641 </dl>
642 <dl>
643 <dt>Return Type:</dt>
644 <dd>
645 bool
646 </dd>
647 </dl>
609 <a NAME="BaseDevice._boardInformationCommands" ID="BaseDevice._boardInformationCommands"></a> 648 <a NAME="BaseDevice._boardInformationCommands" ID="BaseDevice._boardInformationCommands"></a>
610 <h4>BaseDevice._boardInformationCommands</h4> 649 <h4>BaseDevice._boardInformationCommands</h4>
611 <b>_boardInformationCommands</b>(<i></i>) 650 <b>_boardInformationCommands</b>(<i></i>)
612 <p> 651 <p>
613 Protected method defining the list of commands to be execute on the board 652 Protected method defining the list of commands to be execute on the board
1930 </dl> 1969 </dl>
1931 <dl> 1970 <dl>
1932 <dt>Return Type:</dt> 1971 <dt>Return Type:</dt>
1933 <dd> 1972 <dd>
1934 bool 1973 bool
1974 </dd>
1975 </dl>
1976 <a NAME="BaseDevice.hash" ID="BaseDevice.hash"></a>
1977 <h4>BaseDevice.hash</h4>
1978 <b>hash</b>(<i>deviceFileName, algorithm="sha256", chunkSize=256</i>)
1979 <p>
1980 Public method to calculate the hash value of a file on the connected device.
1981 </p>
1982
1983 <dl>
1984
1985 <dt><i>deviceFileName</i> (str)</dt>
1986 <dd>
1987 name of the file to be touched
1988 </dd>
1989 <dt><i>algorithm</i> (str (optional))</dt>
1990 <dd>
1991 hashing algorithm to be used (defaults to "sha256")
1992 </dd>
1993 <dt><i>chunkSize</i> (int (optional))</dt>
1994 <dd>
1995 size of data chunks to be sent to the algorithm
1996 (defaults to 256)
1997 </dd>
1998 </dl>
1999 <dl>
2000 <dt>Return:</dt>
2001 <dd>
2002 calculate hash digest
2003 </dd>
2004 </dl>
2005 <dl>
2006 <dt>Return Type:</dt>
2007 <dd>
2008 bytes
2009 </dd>
2010 </dl>
2011 <dl>
2012
2013 <dt>Raises <b>OSError</b>:</dt>
2014 <dd>
2015 raised to indicate an issue with the device
1935 </dd> 2016 </dd>
1936 </dl> 2017 </dl>
1937 <a NAME="BaseDevice.isLanConnected" ID="BaseDevice.isLanConnected"></a> 2018 <a NAME="BaseDevice.isLanConnected" ID="BaseDevice.isLanConnected"></a>
1938 <h4>BaseDevice.isLanConnected</h4> 2019 <h4>BaseDevice.isLanConnected</h4>
1939 <b>isLanConnected</b>(<i></i>) 2020 <b>isLanConnected</b>(<i></i>)
2796 <dt>Raises <b>OSError</b>:</dt> 2877 <dt>Raises <b>OSError</b>:</dt>
2797 <dd> 2878 <dd>
2798 raised to indicate an issue with the device 2879 raised to indicate an issue with the device
2799 </dd> 2880 </dd>
2800 </dl> 2881 </dl>
2882 <a NAME="BaseDevice.touch" ID="BaseDevice.touch"></a>
2883 <h4>BaseDevice.touch</h4>
2884 <b>touch</b>(<i>deviceFileName</i>)
2885 <p>
2886 Public method to touch a file on the connected device.
2887 </p>
2888
2889 <dl>
2890
2891 <dt><i>deviceFileName</i> (str)</dt>
2892 <dd>
2893 name of the file to be touched
2894 </dd>
2895 </dl>
2896 <dl>
2897
2898 <dt>Raises <b>OSError</b>:</dt>
2899 <dd>
2900 raised to indicate an issue with the device
2901 </dd>
2902 </dl>
2801 <a NAME="BaseDevice.upipInstall" ID="BaseDevice.upipInstall"></a> 2903 <a NAME="BaseDevice.upipInstall" ID="BaseDevice.upipInstall"></a>
2802 <h4>BaseDevice.upipInstall</h4> 2904 <h4>BaseDevice.upipInstall</h4>
2803 <b>upipInstall</b>(<i>packages</i>) 2905 <b>upipInstall</b>(<i>packages</i>)
2804 <p> 2906 <p>
2805 Public method to install packages using 'upip'. 2907 Public method to install packages using 'upip'.

eric ide

mercurial