22 from .MicroPythonSerialPort import MicroPythonSerialPort |
22 from .MicroPythonSerialPort import MicroPythonSerialPort |
23 |
23 |
24 |
24 |
25 class MicroPythonDeviceInterface(QObject): |
25 class MicroPythonDeviceInterface(QObject): |
26 """ |
26 """ |
27 Class implementing some file system commands for MicroPython. |
27 Class implementing an interface to talk to a connected MicroPython device. |
28 |
|
29 Commands are provided to perform operations on the file system of a |
|
30 connected MicroPython device. Supported commands are: |
|
31 <ul> |
|
32 <li>ls: directory listing</li> |
|
33 <li>lls: directory listing with meta data</li> |
|
34 <li>cd: change directory</li> |
|
35 <li>pwd: get the current directory</li> |
|
36 <li>put: copy a file to the connected device</li> |
|
37 <li>putData: write data to a file of the connected device</li> |
|
38 <li>get: get a file from the connected device</li> |
|
39 <li>getData: read data of a file of the connected device</li> |
|
40 <li>rm: remove a file from the connected device</li> |
|
41 <li>rmrf: remove a file/directory recursively (like 'rm -rf' in bash) |
|
42 <li>mkdir: create a new directory</li> |
|
43 <li>rmdir: remove an empty directory</li> |
|
44 <li>fileSystemInfo: get information about the file system |
|
45 </ul> |
|
46 |
|
47 There are additional non file systemcommands. |
|
48 <ul> |
|
49 <li>getBoardData: get information about the connected board</li> |
|
50 <li>getDeviceData: get version info about MicroPython and some implementation |
|
51 information</li> |
|
52 <li>getModules: get a list of built-in modules</li> |
|
53 <li>getTime: get the current time</li> |
|
54 <li>syncTime: synchronize the time of the connected device</li> |
|
55 <li>showTime: show the current time of the connected device</li> |
|
56 </ul> |
|
57 |
28 |
58 @signal executeAsyncFinished() emitted to indicate the end of an |
29 @signal executeAsyncFinished() emitted to indicate the end of an |
59 asynchronously executed list of commands (e.g. a script) |
30 asynchronously executed list of commands (e.g. a script) |
60 @signal dataReceived(data) emitted to send data received via the serial |
31 @signal dataReceived(data) emitted to send data received via the serial |
61 connection for further processing |
32 connection for further processing |