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

branch
mpy_network
changeset 9860
d34667faa686
parent 9853
080e060a0383
child 9871
4a302b8c4d28
equal deleted inserted replaced
9859:829c1edbf253 9860:d34667faa686
91 <li>startAccessPoint: start an access point</li> 91 <li>startAccessPoint: start an access point</li>
92 <li>stopAccessPoint: stop the access point</li> 92 <li>stopAccessPoint: stop the access point</li>
93 <li>getConnectedClients: get a list of connected WiFi clients</li> 93 <li>getConnectedClients: get a list of connected WiFi clients</li>
94 </ul> 94 </ul>
95 </p> 95 </p>
96 <p>
97 Supported Bluetooth commands are:
98 <ul>
99 <li>hasBluetooth: check, if the board has Bluetooth functionality</li>
100 <li>getBluetoothStatus: get Bluetooth status data</li>
101 <li>deactivateBluetoothInterface: deactivate a Bluetooth interface</li>
102 </ul>
103 </p>
96 <h3>Derived from</h3> 104 <h3>Derived from</h3>
97 QObject 105 QObject
98 <h3>Class Attributes</h3> 106 <h3>Class Attributes</h3>
99 107
100 <table> 108 <table>
124 <tr> 132 <tr>
125 <td><a href="#BaseDevice._shortError">_shortError</a></td> 133 <td><a href="#BaseDevice._shortError">_shortError</a></td>
126 <td>Protected method to create a shortened error message.</td> 134 <td>Protected method to create a shortened error message.</td>
127 </tr> 135 </tr>
128 <tr> 136 <tr>
137 <td><a href="#BaseDevice.activateBluetoothInterface">activateBluetoothInterface</a></td>
138 <td>Public method to activate the Bluetooth interface.</td>
139 </tr>
140 <tr>
141 <td><a href="#BaseDevice.addDeviceBluetoothEntries">addDeviceBluetoothEntries</a></td>
142 <td>Public method to add device specific entries to the given menu.</td>
143 </tr>
144 <tr>
129 <td><a href="#BaseDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td> 145 <td><a href="#BaseDevice.addDeviceMenuEntries">addDeviceMenuEntries</a></td>
130 <td>Public method to add device specific entries to the given menu.</td> 146 <td>Public method to add device specific entries to the given menu.</td>
131 </tr> 147 </tr>
132 <tr> 148 <tr>
133 <td><a href="#BaseDevice.addDeviceWifiEntries">addDeviceWifiEntries</a></td> 149 <td><a href="#BaseDevice.addDeviceWifiEntries">addDeviceWifiEntries</a></td>
134 <td>Public method to add device specific entries to the given menu.</td> 150 <td>Public method to add device specific entries to the given menu.</td>
135 </tr> 151 </tr>
136 <tr> 152 <tr>
153 <td><a href="#BaseDevice.bool2str">bool2str</a></td>
154 <td>Public method to generate a yes/no string given a truth value.</td>
155 </tr>
156 <tr>
137 <td><a href="#BaseDevice.canRunScript">canRunScript</a></td> 157 <td><a href="#BaseDevice.canRunScript">canRunScript</a></td>
138 <td>Public method to determine, if a script can be executed.</td> 158 <td>Public method to determine, if a script can be executed.</td>
139 </tr> 159 </tr>
140 <tr> 160 <tr>
141 <td><a href="#BaseDevice.canStartFileManager">canStartFileManager</a></td> 161 <td><a href="#BaseDevice.canStartFileManager">canStartFileManager</a></td>
164 <tr> 184 <tr>
165 <td><a href="#BaseDevice.connectWifi">connectWifi</a></td> 185 <td><a href="#BaseDevice.connectWifi">connectWifi</a></td>
166 <td>Public method to connect a device to a WiFi network.</td> 186 <td>Public method to connect a device to a WiFi network.</td>
167 </tr> 187 </tr>
168 <tr> 188 <tr>
189 <td><a href="#BaseDevice.deactivateBluetoothInterface">deactivateBluetoothInterface</a></td>
190 <td>Public method to deactivate the Bluetooth interface.</td>
191 </tr>
192 <tr>
169 <td><a href="#BaseDevice.deactivateInterface">deactivateInterface</a></td> 193 <td><a href="#BaseDevice.deactivateInterface">deactivateInterface</a></td>
170 <td>Public method to deactivate a given WiFi interface of the connected device.</td> 194 <td>Public method to deactivate a given WiFi interface of the connected device.</td>
171 </tr> 195 </tr>
172 <tr> 196 <tr>
173 <td><a href="#BaseDevice.deviceName">deviceName</a></td> 197 <td><a href="#BaseDevice.deviceName">deviceName</a></td>
196 <tr> 220 <tr>
197 <td><a href="#BaseDevice.get">get</a></td> 221 <td><a href="#BaseDevice.get">get</a></td>
198 <td>Public method to copy a file from the connected device.</td> 222 <td>Public method to copy a file from the connected device.</td>
199 </tr> 223 </tr>
200 <tr> 224 <tr>
225 <td><a href="#BaseDevice.getBluetoothStatus">getBluetoothStatus</a></td>
226 <td>Public method to get Bluetooth status data of the connected board.</td>
227 </tr>
228 <tr>
201 <td><a href="#BaseDevice.getBoardInformation">getBoardInformation</a></td> 229 <td><a href="#BaseDevice.getBoardInformation">getBoardInformation</a></td>
202 <td>Public method to get some information data of the connected board.</td> 230 <td>Public method to get some information data of the connected board.</td>
203 </tr> 231 </tr>
204 <tr> 232 <tr>
205 <td><a href="#BaseDevice.getConnectedClients">getConnectedClients</a></td> 233 <td><a href="#BaseDevice.getConnectedClients">getConnectedClients</a></td>
210 <td>Public method to read data from the connected device.</td> 238 <td>Public method to read data from the connected device.</td>
211 </tr> 239 </tr>
212 <tr> 240 <tr>
213 <td><a href="#BaseDevice.getDeviceData">getDeviceData</a></td> 241 <td><a href="#BaseDevice.getDeviceData">getDeviceData</a></td>
214 <td>Public method to get a copy of the determined device data.</td> 242 <td>Public method to get a copy of the determined device data.</td>
243 </tr>
244 <tr>
245 <td><a href="#BaseDevice.getDeviceScan">getDeviceScan</a></td>
246 <td>Public method to perform a Bluetooth device scan.</td>
215 </tr> 247 </tr>
216 <tr> 248 <tr>
217 <td><a href="#BaseDevice.getDeviceType">getDeviceType</a></td> 249 <td><a href="#BaseDevice.getDeviceType">getDeviceType</a></td>
218 <td>Public method to get the device type.</td> 250 <td>Public method to get the device type.</td>
219 </tr> 251 </tr>
491 <dt>Return Type:</dt> 523 <dt>Return Type:</dt>
492 <dd> 524 <dd>
493 str 525 str
494 </dd> 526 </dd>
495 </dl> 527 </dl>
528 <a NAME="BaseDevice.activateBluetoothInterface" ID="BaseDevice.activateBluetoothInterface"></a>
529 <h4>BaseDevice.activateBluetoothInterface</h4>
530 <b>activateBluetoothInterface</b>(<i></i>)
531
532 <p>
533 Public method to activate the Bluetooth interface.
534 </p>
535 <dl>
536 <dt>Return:</dt>
537 <dd>
538 flag indicating the new state of the Bluetooth interface
539 </dd>
540 </dl>
541 <dl>
542 <dt>Return Type:</dt>
543 <dd>
544 bool
545 </dd>
546 </dl>
547 <a NAME="BaseDevice.addDeviceBluetoothEntries" ID="BaseDevice.addDeviceBluetoothEntries"></a>
548 <h4>BaseDevice.addDeviceBluetoothEntries</h4>
549 <b>addDeviceBluetoothEntries</b>(<i>menu</i>)
550
551 <p>
552 Public method to add device specific entries to the given menu.
553 </p>
554 <dl>
555
556 <dt><i>menu</i> (QMenu)</dt>
557 <dd>
558 reference to the context menu
559 </dd>
560 </dl>
496 <a NAME="BaseDevice.addDeviceMenuEntries" ID="BaseDevice.addDeviceMenuEntries"></a> 561 <a NAME="BaseDevice.addDeviceMenuEntries" ID="BaseDevice.addDeviceMenuEntries"></a>
497 <h4>BaseDevice.addDeviceMenuEntries</h4> 562 <h4>BaseDevice.addDeviceMenuEntries</h4>
498 <b>addDeviceMenuEntries</b>(<i>menu</i>) 563 <b>addDeviceMenuEntries</b>(<i>menu</i>)
499 564
500 <p> 565 <p>
519 <dt><i>menu</i> (QMenu)</dt> 584 <dt><i>menu</i> (QMenu)</dt>
520 <dd> 585 <dd>
521 reference to the context menu 586 reference to the context menu
522 </dd> 587 </dd>
523 </dl> 588 </dl>
589 <a NAME="BaseDevice.bool2str" ID="BaseDevice.bool2str"></a>
590 <h4>BaseDevice.bool2str</h4>
591 <b>bool2str</b>(<i>val, capitalized=True</i>)
592
593 <p>
594 Public method to generate a yes/no string given a truth value.
595 </p>
596 <dl>
597
598 <dt><i>val</i> (bool)</dt>
599 <dd>
600 truth value to be converted
601 </dd>
602 <dt><i>capitalized</i> (bool)</dt>
603 <dd>
604 flag indicating a capitalized variant
605 </dd>
606 </dl>
607 <dl>
608 <dt>Return:</dt>
609 <dd>
610 string with 'yes' or 'no'
611 </dd>
612 </dl>
613 <dl>
614 <dt>Return Type:</dt>
615 <dd>
616 str
617 </dd>
618 </dl>
524 <a NAME="BaseDevice.canRunScript" ID="BaseDevice.canRunScript"></a> 619 <a NAME="BaseDevice.canRunScript" ID="BaseDevice.canRunScript"></a>
525 <h4>BaseDevice.canRunScript</h4> 620 <h4>BaseDevice.canRunScript</h4>
526 <b>canRunScript</b>(<i></i>) 621 <b>canRunScript</b>(<i></i>)
527 622
528 <p> 623 <p>
697 <dt>Return Type:</dt> 792 <dt>Return Type:</dt>
698 <dd> 793 <dd>
699 tuple of (bool, str) 794 tuple of (bool, str)
700 </dd> 795 </dd>
701 </dl> 796 </dl>
797 <a NAME="BaseDevice.deactivateBluetoothInterface" ID="BaseDevice.deactivateBluetoothInterface"></a>
798 <h4>BaseDevice.deactivateBluetoothInterface</h4>
799 <b>deactivateBluetoothInterface</b>(<i></i>)
800
801 <p>
802 Public method to deactivate the Bluetooth interface.
803 </p>
804 <dl>
805 <dt>Return:</dt>
806 <dd>
807 flag indicating the new state of the Bluetooth interface
808 </dd>
809 </dl>
810 <dl>
811 <dt>Return Type:</dt>
812 <dd>
813 bool
814 </dd>
815 </dl>
702 <a NAME="BaseDevice.deactivateInterface" ID="BaseDevice.deactivateInterface"></a> 816 <a NAME="BaseDevice.deactivateInterface" ID="BaseDevice.deactivateInterface"></a>
703 <h4>BaseDevice.deactivateInterface</h4> 817 <h4>BaseDevice.deactivateInterface</h4>
704 <b>deactivateInterface</b>(<i>interface</i>) 818 <b>deactivateInterface</b>(<i>interface</i>)
705 819
706 <p> 820 <p>
887 <dt>Raises <b>OSError</b>:</dt> 1001 <dt>Raises <b>OSError</b>:</dt>
888 <dd> 1002 <dd>
889 raised to indicate an issue with the device 1003 raised to indicate an issue with the device
890 </dd> 1004 </dd>
891 </dl> 1005 </dl>
1006 <a NAME="BaseDevice.getBluetoothStatus" ID="BaseDevice.getBluetoothStatus"></a>
1007 <h4>BaseDevice.getBluetoothStatus</h4>
1008 <b>getBluetoothStatus</b>(<i></i>)
1009
1010 <p>
1011 Public method to get Bluetooth status data of the connected board.
1012 </p>
1013 <dl>
1014 <dt>Return:</dt>
1015 <dd>
1016 list of tuples containing the translated status data label and
1017 the associated value
1018 </dd>
1019 </dl>
1020 <dl>
1021 <dt>Return Type:</dt>
1022 <dd>
1023 list of tuples of (str, str)
1024 </dd>
1025 </dl>
892 <a NAME="BaseDevice.getBoardInformation" ID="BaseDevice.getBoardInformation"></a> 1026 <a NAME="BaseDevice.getBoardInformation" ID="BaseDevice.getBoardInformation"></a>
893 <h4>BaseDevice.getBoardInformation</h4> 1027 <h4>BaseDevice.getBoardInformation</h4>
894 <b>getBoardInformation</b>(<i></i>) 1028 <b>getBoardInformation</b>(<i></i>)
895 1029
896 <p> 1030 <p>
990 </dl> 1124 </dl>
991 <dl> 1125 <dl>
992 <dt>Return Type:</dt> 1126 <dt>Return Type:</dt>
993 <dd> 1127 <dd>
994 dict 1128 dict
1129 </dd>
1130 </dl>
1131 <a NAME="BaseDevice.getDeviceScan" ID="BaseDevice.getDeviceScan"></a>
1132 <h4>BaseDevice.getDeviceScan</h4>
1133 <b>getDeviceScan</b>(<i>timeout=10</i>)
1134
1135 <p>
1136 Public method to perform a Bluetooth device scan.
1137 </p>
1138 <dl>
1139
1140 <dt><i>timeout</i> (int (optional))</dt>
1141 <dd>
1142 duration of the device scan in seconds (defaults
1143 to 10)
1144 </dd>
1145 </dl>
1146 <dl>
1147 <dt>Return:</dt>
1148 <dd>
1149 tuple containing a dictionary with the scan results and
1150 an error string
1151 </dd>
1152 </dl>
1153 <dl>
1154 <dt>Return Type:</dt>
1155 <dd>
1156 tuple of (dict, str)
995 </dd> 1157 </dd>
996 </dl> 1158 </dl>
997 <a NAME="BaseDevice.getDeviceType" ID="BaseDevice.getDeviceType"></a> 1159 <a NAME="BaseDevice.getDeviceType" ID="BaseDevice.getDeviceType"></a>
998 <h4>BaseDevice.getDeviceType</h4> 1160 <h4>BaseDevice.getDeviceType</h4>
999 <b>getDeviceType</b>(<i></i>) 1161 <b>getDeviceType</b>(<i></i>)

eric ide

mercurial