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