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

branch
mpy_network
changeset 9871
4a302b8c4d28
parent 9866
0cf5dda5512f
child 10022
a95800b414b7
--- a/src/eric7/Documentation/Source/eric7.MicroPython.Devices.EspDevices.html	Fri Mar 10 18:09:24 2023 +0100
+++ b/src/eric7/Documentation/Source/eric7.MicroPython.Devices.EspDevices.html	Fri Mar 10 18:10:13 2023 +0100
@@ -220,6 +220,10 @@
 <td>Public method to check, if the device has its own flash menu entry.</td>
 </tr>
 <tr>
+<td><a href="#EspDevice.hasNetworkTime">hasNetworkTime</a></td>
+<td>Public method to check the availability of network time functions.</td>
+</tr>
+<tr>
 <td><a href="#EspDevice.hasWifi">hasWifi</a></td>
 <td>Public method to check the availability of WiFi.</td>
 </tr>
@@ -244,6 +248,10 @@
 <td>Public method to set the connection state.</td>
 </tr>
 <tr>
+<td><a href="#EspDevice.setNetworkTime">setNetworkTime</a></td>
+<td>Public method to set the time to the network time retrieved from an NTP server.</td>
+</tr>
+<tr>
 <td><a href="#EspDevice.startAccessPoint">startAccessPoint</a></td>
 <td>Public method to start the access point interface.</td>
 </tr>
@@ -885,6 +893,32 @@
 bool
 </dd>
 </dl>
+<a NAME="EspDevice.hasNetworkTime" ID="EspDevice.hasNetworkTime"></a>
+<h4>EspDevice.hasNetworkTime</h4>
+<b>hasNetworkTime</b>(<i></i>)
+
+<p>
+        Public method to check the availability of network time functions.
+</p>
+<dl>
+<dt>Return:</dt>
+<dd>
+flag indicating the availability of network time functions
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+bool
+</dd>
+</dl>
+<dl>
+
+<dt>Raises <b>OSError</b>:</dt>
+<dd>
+raised to indicate an issue with the device
+</dd>
+</dl>
 <a NAME="EspDevice.hasWifi" ID="EspDevice.hasWifi"></a>
 <h4>EspDevice.hasWifi</h4>
 <b>hasWifi</b>(<i></i>)
@@ -983,6 +1017,43 @@
 connection state
 </dd>
 </dl>
+<a NAME="EspDevice.setNetworkTime" ID="EspDevice.setNetworkTime"></a>
+<h4>EspDevice.setNetworkTime</h4>
+<b>setNetworkTime</b>(<i>server="0.pool.ntp.org", tzOffset=0, timeout=10</i>)
+
+<p>
+        Public method to set the time to the network time retrieved from an
+        NTP server.
+</p>
+<dl>
+
+<dt><i>server</i> (str (optional))</dt>
+<dd>
+name of the NTP server to get the network time from
+            (defaults to "0.pool.ntp.org")
+</dd>
+<dt><i>tzOffset</i> (int (optional))</dt>
+<dd>
+offset with respect to UTC (defaults to 0)
+</dd>
+<dt><i>timeout</i> (int)</dt>
+<dd>
+maximum time to wait for a server response in seconds
+            (defaults to 10)
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing a flag indicating success and an error string
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (bool, str)
+</dd>
+</dl>
 <a NAME="EspDevice.startAccessPoint" ID="EspDevice.startAccessPoint"></a>
 <h4>EspDevice.startAccessPoint</h4>
 <b>startAccessPoint</b>(<i>ssid, security=None, password=None, ifconfig=None</i>)

eric ide

mercurial