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

branch
mpy_network
changeset 9871
4a302b8c4d28
parent 9860
d34667faa686
child 9878
a82014a9e57b
--- a/src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html	Fri Mar 10 18:09:24 2023 +0100
+++ b/src/eric7/Documentation/Source/eric7.MicroPython.Devices.DeviceBase.html	Fri Mar 10 18:10:13 2023 +0100
@@ -306,6 +306,10 @@
 <td>Public method to check, if the device has its own flash menu entry.</td>
 </tr>
 <tr>
+<td><a href="#BaseDevice.hasNetworkTime">hasNetworkTime</a></td>
+<td>Public method to check the availability of network time functions.</td>
+</tr>
+<tr>
 <td><a href="#BaseDevice.hasTimeCommands">hasTimeCommands</a></td>
 <td>Public method to check, if the device supports time commands.</td>
 </tr>
@@ -386,6 +390,10 @@
 <td>Public method to set the File Manager status and dependent status.</td>
 </tr>
 <tr>
+<td><a href="#BaseDevice.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="#BaseDevice.setPlotter">setPlotter</a></td>
 <td>Public method to set the Plotter status and dependent status.</td>
 </tr>
@@ -1447,6 +1455,25 @@
 bool
 </dd>
 </dl>
+<a NAME="BaseDevice.hasNetworkTime" ID="BaseDevice.hasNetworkTime"></a>
+<h4>BaseDevice.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>
 <a NAME="BaseDevice.hasTimeCommands" ID="BaseDevice.hasTimeCommands"></a>
 <h4>BaseDevice.hasTimeCommands</h4>
 <b>hasTimeCommands</b>(<i></i>)
@@ -1932,6 +1959,43 @@
 flag indicating the active status
 </dd>
 </dl>
+<a NAME="BaseDevice.setNetworkTime" ID="BaseDevice.setNetworkTime"></a>
+<h4>BaseDevice.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="BaseDevice.setPlotter" ID="BaseDevice.setPlotter"></a>
 <h4>BaseDevice.setPlotter</h4>
 <b>setPlotter</b>(<i>on</i>)

eric ide

mercurial