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

branch
mpy_network
changeset 9871
4a302b8c4d28
parent 9866
0cf5dda5512f
child 9891
e58c3fadcacc
--- a/src/eric7/Documentation/Source/eric7.MicroPython.Devices.CircuitPythonDevices.html	Fri Mar 10 18:09:24 2023 +0100
+++ b/src/eric7/Documentation/Source/eric7.MicroPython.Devices.CircuitPythonDevices.html	Fri Mar 10 18:10:13 2023 +0100
@@ -211,6 +211,10 @@
 <td>Public method to check, if the device has its own flash menu entry.</td>
 </tr>
 <tr>
+<td><a href="#CircuitPythonDevice.hasNetworkTime">hasNetworkTime</a></td>
+<td>Public method to check the availability of network time functions.</td>
+</tr>
+<tr>
 <td><a href="#CircuitPythonDevice.hasWifi">hasWifi</a></td>
 <td>Public method to check the availability of WiFi.</td>
 </tr>
@@ -235,6 +239,10 @@
 <td>Public method to set the connection state.</td>
 </tr>
 <tr>
+<td><a href="#CircuitPythonDevice.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="#CircuitPythonDevice.showCircuitPythonVersions">showCircuitPythonVersions</a></td>
 <td>Public slot to show the CircuitPython version of a connected device and the latest available one (from Github).</td>
 </tr>
@@ -983,6 +991,32 @@
 bool
 </dd>
 </dl>
+<a NAME="CircuitPythonDevice.hasNetworkTime" ID="CircuitPythonDevice.hasNetworkTime"></a>
+<h4>CircuitPythonDevice.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="CircuitPythonDevice.hasWifi" ID="CircuitPythonDevice.hasWifi"></a>
 <h4>CircuitPythonDevice.hasWifi</h4>
 <b>hasWifi</b>(<i></i>)
@@ -1084,6 +1118,43 @@
 connection state
 </dd>
 </dl>
+<a NAME="CircuitPythonDevice.setNetworkTime" ID="CircuitPythonDevice.setNetworkTime"></a>
+<h4>CircuitPythonDevice.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="CircuitPythonDevice.showCircuitPythonVersions" ID="CircuitPythonDevice.showCircuitPythonVersions"></a>
 <h4>CircuitPythonDevice.showCircuitPythonVersions</h4>
 <b>showCircuitPythonVersions</b>(<i></i>)

eric ide

mercurial