23 |
23 |
24 |
24 |
25 class BaseDevice(QObject): |
25 class BaseDevice(QObject): |
26 """ |
26 """ |
27 Base class for the more specific MicroPython devices. |
27 Base class for the more specific MicroPython devices. |
|
28 |
|
29 It includes a list of commands for general use on the various boards. |
|
30 If a board needs special treatment, the command should be overwritten |
|
31 in the board specific subclass. Commands are provided to perform operations |
|
32 on the file system of a connected MicroPython device, for getting and setting |
|
33 the time on the board and getting board related data. Supported file system |
|
34 commands are: |
|
35 <ul> |
|
36 <li>ls: directory listing</li> |
|
37 <li>lls: directory listing with meta data</li> |
|
38 <li>cd: change directory</li> |
|
39 <li>pwd: get the current directory</li> |
|
40 <li>put: copy a file to the connected device</li> |
|
41 <li>putData: write data to a file of the connected device</li> |
|
42 <li>get: get a file from the connected device</li> |
|
43 <li>getData: read data of a file of the connected device</li> |
|
44 <li>rm: remove a file from the connected device</li> |
|
45 <li>rmrf: remove a file/directory recursively (like 'rm -rf' in bash) |
|
46 <li>mkdir: create a new directory</li> |
|
47 <li>rmdir: remove an empty directory</li> |
|
48 <li>fileSystemInfo: get information about the file system |
|
49 </ul> |
|
50 |
|
51 Supported non file system commands are: |
|
52 <ul> |
|
53 <li>getBoardData: get information about the connected board</li> |
|
54 <li>getDeviceData: get version info about MicroPython and some implementation |
|
55 information</li> |
|
56 <li>getModules: get a list of built-in modules</li> |
|
57 <li>getTime: get the current time</li> |
|
58 <li>syncTime: synchronize the time of the connected device</li> |
|
59 <li>showTime: show the current time of the connected device</li> |
|
60 </ul> |
28 """ |
61 """ |
29 |
62 |
30 def __init__(self, microPythonWidget, deviceType, parent=None): |
63 def __init__(self, microPythonWidget, deviceType, parent=None): |
31 """ |
64 """ |
32 Constructor |
65 Constructor |