5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.MicroPython.EthernetDialogs.EthernetController</h1> |
9 <h1>eric7.MicroPython.EthernetDialogs.EthernetController</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the Ethernet related functionality. |
11 Module implementing the Ethernet related functionality. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
15 <table> |
16 <table> |
16 <tr><td>None</td></tr> |
17 <tr><td>None</td></tr> |
17 </table> |
18 </table> |
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#EthernetController">EthernetController</a></td> |
22 <td><a href="#EthernetController">EthernetController</a></td> |
25 <td>Class implementing the Ethernet related functionality.</td> |
23 <td>Class implementing the Ethernet related functionality.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
28 <table> |
30 <table> |
29 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
30 </table> |
32 </table> |
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="EthernetController" ID="EthernetController"></a> |
34 <a NAME="EthernetController" ID="EthernetController"></a> |
36 <h2>EthernetController</h2> |
35 <h2>EthernetController</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing the Ethernet related functionality. |
37 Class implementing the Ethernet related functionality. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 QObject |
41 QObject |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
43 <table> |
45 <table> |
44 <tr><td>None</td></tr> |
46 <tr><td>None</td></tr> |
45 </table> |
47 </table> |
46 |
48 <h3>Class Methods</h3> |
47 <h3>Class Methods</h3> |
49 |
48 <table> |
50 <table> |
49 <tr><td>None</td></tr> |
51 <tr><td>None</td></tr> |
50 </table> |
52 </table> |
51 |
53 <h3>Methods</h3> |
52 <h3>Methods</h3> |
54 |
53 <table> |
55 <table> |
|
56 |
|
57 <tr> |
54 <tr> |
58 <td><a href="#EthernetController.__init__">EthernetController</a></td> |
55 <td><a href="#EthernetController.__init__">EthernetController</a></td> |
59 <td>Constructor</td> |
56 <td>Constructor</td> |
60 </tr> |
57 </tr> |
61 <tr> |
58 <tr> |
101 <tr> |
98 <tr> |
102 <td><a href="#EthernetController.createMenu">createMenu</a></td> |
99 <td><a href="#EthernetController.createMenu">createMenu</a></td> |
103 <td>Public method to create the Ethernet submenu.</td> |
100 <td>Public method to create the Ethernet submenu.</td> |
104 </tr> |
101 </tr> |
105 </table> |
102 </table> |
|
103 |
106 <h3>Static Methods</h3> |
104 <h3>Static Methods</h3> |
107 |
105 <table> |
108 <table> |
106 <tr><td>None</td></tr> |
109 <tr><td>None</td></tr> |
107 </table> |
110 </table> |
108 |
111 |
109 |
112 <a NAME="EthernetController.__init__" ID="EthernetController.__init__"></a> |
110 <a NAME="EthernetController.__init__" ID="EthernetController.__init__"></a> |
113 <h4>EthernetController (Constructor)</h4> |
111 <h4>EthernetController (Constructor)</h4> |
114 <b>EthernetController</b>(<i>microPython, parent=None</i>) |
112 <b>EthernetController</b>(<i>microPython, parent=None</i>) |
115 |
|
116 <p> |
113 <p> |
117 Constructor |
114 Constructor |
118 </p> |
115 </p> |
|
116 |
119 <dl> |
117 <dl> |
120 |
118 |
121 <dt><i>microPython</i> (MicroPythonWidgep)</dt> |
119 <dt><i>microPython</i> (MicroPythonWidgep)</dt> |
122 <dd> |
120 <dd> |
123 reference to the MicroPython widget |
121 reference to the MicroPython widget |
128 </dd> |
126 </dd> |
129 </dl> |
127 </dl> |
130 <a NAME="EthernetController.__checkInternet" ID="EthernetController.__checkInternet"></a> |
128 <a NAME="EthernetController.__checkInternet" ID="EthernetController.__checkInternet"></a> |
131 <h4>EthernetController.__checkInternet</h4> |
129 <h4>EthernetController.__checkInternet</h4> |
132 <b>__checkInternet</b>(<i></i>) |
130 <b>__checkInternet</b>(<i></i>) |
133 |
|
134 <p> |
131 <p> |
135 Private slot to check the availability of an internet connection. |
132 Private slot to check the availability of an internet connection. |
136 </p> |
133 </p> |
|
134 |
137 <a NAME="EthernetController.__connectLan" ID="EthernetController.__connectLan"></a> |
135 <a NAME="EthernetController.__connectLan" ID="EthernetController.__connectLan"></a> |
138 <h4>EthernetController.__connectLan</h4> |
136 <h4>EthernetController.__connectLan</h4> |
139 <b>__connectLan</b>(<i>config, hostname</i>) |
137 <b>__connectLan</b>(<i>config, hostname</i>) |
140 |
|
141 <p> |
138 <p> |
142 Private method to connect the connected device to the LAN. |
139 Private method to connect the connected device to the LAN. |
143 </p> |
140 </p> |
|
141 |
144 <dl> |
142 <dl> |
145 |
143 |
146 <dt><i>config</i> (str of tuple of (str, str, str, str))</dt> |
144 <dt><i>config</i> (str of tuple of (str, str, str, str))</dt> |
147 <dd> |
145 <dd> |
148 configuration for the connection (either the string 'dhcp' |
146 configuration for the connection (either the string 'dhcp' |
154 </dd> |
152 </dd> |
155 </dl> |
153 </dl> |
156 <a NAME="EthernetController.__connectLanDhcp" ID="EthernetController.__connectLanDhcp"></a> |
154 <a NAME="EthernetController.__connectLanDhcp" ID="EthernetController.__connectLanDhcp"></a> |
157 <h4>EthernetController.__connectLanDhcp</h4> |
155 <h4>EthernetController.__connectLanDhcp</h4> |
158 <b>__connectLanDhcp</b>(<i></i>) |
156 <b>__connectLanDhcp</b>(<i></i>) |
159 |
|
160 <p> |
157 <p> |
161 Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode). |
158 Private slot to connect to the LAN with a dynamic IPv4 address (DHCP mode). |
162 </p> |
159 </p> |
|
160 |
163 <a NAME="EthernetController.__connectLanIp" ID="EthernetController.__connectLanIp"></a> |
161 <a NAME="EthernetController.__connectLanIp" ID="EthernetController.__connectLanIp"></a> |
164 <h4>EthernetController.__connectLanIp</h4> |
162 <h4>EthernetController.__connectLanIp</h4> |
165 <b>__connectLanIp</b>(<i></i>) |
163 <b>__connectLanIp</b>(<i></i>) |
166 |
|
167 <p> |
164 <p> |
168 Private slot to connect to the LAN with a fixed IPv4 address (fixed address |
165 Private slot to connect to the LAN with a fixed IPv4 address (fixed address |
169 mode). |
166 mode). |
170 </p> |
167 </p> |
|
168 |
171 <a NAME="EthernetController.__deactivateEthernet" ID="EthernetController.__deactivateEthernet"></a> |
169 <a NAME="EthernetController.__deactivateEthernet" ID="EthernetController.__deactivateEthernet"></a> |
172 <h4>EthernetController.__deactivateEthernet</h4> |
170 <h4>EthernetController.__deactivateEthernet</h4> |
173 <b>__deactivateEthernet</b>(<i></i>) |
171 <b>__deactivateEthernet</b>(<i></i>) |
174 |
|
175 <p> |
172 <p> |
176 Private slot to deactivate the Ethernet interface. |
173 Private slot to deactivate the Ethernet interface. |
177 </p> |
174 </p> |
|
175 |
178 <a NAME="EthernetController.__disconnectLan" ID="EthernetController.__disconnectLan"></a> |
176 <a NAME="EthernetController.__disconnectLan" ID="EthernetController.__disconnectLan"></a> |
179 <h4>EthernetController.__disconnectLan</h4> |
177 <h4>EthernetController.__disconnectLan</h4> |
180 <b>__disconnectLan</b>(<i></i>) |
178 <b>__disconnectLan</b>(<i></i>) |
181 |
|
182 <p> |
179 <p> |
183 Private slot to disconnect from the LAN. |
180 Private slot to disconnect from the LAN. |
184 </p> |
181 </p> |
|
182 |
185 <a NAME="EthernetController.__removeAutoConnect" ID="EthernetController.__removeAutoConnect"></a> |
183 <a NAME="EthernetController.__removeAutoConnect" ID="EthernetController.__removeAutoConnect"></a> |
186 <h4>EthernetController.__removeAutoConnect</h4> |
184 <h4>EthernetController.__removeAutoConnect</h4> |
187 <b>__removeAutoConnect</b>(<i></i>) |
185 <b>__removeAutoConnect</b>(<i></i>) |
188 |
|
189 <p> |
186 <p> |
190 Private slot to remove the boot time connect capability. |
187 Private slot to remove the boot time connect capability. |
191 </p> |
188 </p> |
192 <p> |
189 <p> |
193 This will not remove the auto-connect part of the boot script. This needs to be |
190 This will not remove the auto-connect part of the boot script. This needs to be |
194 done manually if desired. |
191 done manually if desired. |
195 </p> |
192 </p> |
|
193 |
196 <a NAME="EthernetController.__setNetworkTime" ID="EthernetController.__setNetworkTime"></a> |
194 <a NAME="EthernetController.__setNetworkTime" ID="EthernetController.__setNetworkTime"></a> |
197 <h4>EthernetController.__setNetworkTime</h4> |
195 <h4>EthernetController.__setNetworkTime</h4> |
198 <b>__setNetworkTime</b>(<i></i>) |
196 <b>__setNetworkTime</b>(<i></i>) |
199 |
|
200 <p> |
197 <p> |
201 Private slot to synchronize the device clock to network time. |
198 Private slot to synchronize the device clock to network time. |
202 </p> |
199 </p> |
|
200 |
203 <a NAME="EthernetController.__showEthernetStatus" ID="EthernetController.__showEthernetStatus"></a> |
201 <a NAME="EthernetController.__showEthernetStatus" ID="EthernetController.__showEthernetStatus"></a> |
204 <h4>EthernetController.__showEthernetStatus</h4> |
202 <h4>EthernetController.__showEthernetStatus</h4> |
205 <b>__showEthernetStatus</b>(<i></i>) |
203 <b>__showEthernetStatus</b>(<i></i>) |
206 |
|
207 <p> |
204 <p> |
208 Private slot to show a dialog with the WiFi status of the current device. |
205 Private slot to show a dialog with the WiFi status of the current device. |
209 </p> |
206 </p> |
|
207 |
210 <a NAME="EthernetController.__writeAutoConnect" ID="EthernetController.__writeAutoConnect"></a> |
208 <a NAME="EthernetController.__writeAutoConnect" ID="EthernetController.__writeAutoConnect"></a> |
211 <h4>EthernetController.__writeAutoConnect</h4> |
209 <h4>EthernetController.__writeAutoConnect</h4> |
212 <b>__writeAutoConnect</b>(<i></i>) |
210 <b>__writeAutoConnect</b>(<i></i>) |
213 |
|
214 <p> |
211 <p> |
215 Private slot to generate a script and associated configuration to connect the |
212 Private slot to generate a script and associated configuration to connect the |
216 device during boot time. |
213 device during boot time. |
217 </p> |
214 </p> |
218 <p> |
215 <p> |
219 This will also modify the boot script to perform the automatic connection. |
216 This will also modify the boot script to perform the automatic connection. |
220 </p> |
217 </p> |
|
218 |
221 <a NAME="EthernetController.createMenu" ID="EthernetController.createMenu"></a> |
219 <a NAME="EthernetController.createMenu" ID="EthernetController.createMenu"></a> |
222 <h4>EthernetController.createMenu</h4> |
220 <h4>EthernetController.createMenu</h4> |
223 <b>createMenu</b>(<i>menu</i>) |
221 <b>createMenu</b>(<i>menu</i>) |
224 |
|
225 <p> |
222 <p> |
226 Public method to create the Ethernet submenu. |
223 Public method to create the Ethernet submenu. |
227 </p> |
224 </p> |
|
225 |
228 <dl> |
226 <dl> |
229 |
227 |
230 <dt><i>menu</i> (QMenu)</dt> |
228 <dt><i>menu</i> (QMenu)</dt> |
231 <dd> |
229 <dd> |
232 reference to the parent menu |
230 reference to the parent menu |