From 196aeeac94d8881304164032b499738f1bf96200 Mon Sep 17 00:00:00 2001 From: gmag11 Date: Sun, 14 Feb 2021 13:29:22 +0100 Subject: [PATCH] Update docs --- docs/html/ESPNtpClient_8cpp.html | 2 +- docs/html/ESPNtpClient_8cpp_source.html | 14 +- docs/html/ESPNtpClient_8h.html | 6 +- docs/html/ESPNtpClient_8h_source.html | 222 +++++++++--------- docs/html/LICENSE_8md.html | 2 +- docs/html/NTPEventTypes_8h.html | 2 +- docs/html/NTPEventTypes_8h_source.html | 2 +- docs/html/TZdef_8h.html | 2 +- docs/html/TZdef_8h_source.html | 2 +- docs/html/advancedExample_8ino.html | 2 +- docs/html/advancedExample_8ino_source.html | 8 +- docs/html/annotated.html | 2 +- docs/html/basicExample_8ino.html | 2 +- docs/html/basicExample_8ino_source.html | 4 +- docs/html/classNTPClient-members.html | 125 +++++----- docs/html/classNTPClient.html | 111 ++++++--- docs/html/classes.html | 2 +- .../dir_0d6b40dbde7c6c9f2060803eac07ada5.html | 2 +- .../dir_4ca067c292177ffb05bf07af46c5153e.html | 2 +- .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 2 +- .../dir_85c1138c83e96e3b74bb52bc2e804813.html | 2 +- .../dir_d28a4824dc47e487b107a5db32ef43c4.html | 2 +- .../dir_d5c269f8312cfb5985e008c4866477dc.html | 2 +- docs/html/files.html | 2 +- docs/html/functions.html | 9 +- docs/html/functions_func.html | 9 +- docs/html/functions_vars.html | 2 +- docs/html/globals.html | 2 +- docs/html/globals_defs.html | 2 +- docs/html/globals_enum.html | 2 +- docs/html/globals_eval.html | 2 +- docs/html/globals_func.html | 2 +- docs/html/globals_type.html | 2 +- docs/html/globals_vars.html | 2 +- docs/html/index.html | 5 +- docs/html/ledFlasher_8ino.html | 2 +- docs/html/ledFlasher_8ino_source.html | 4 +- docs/html/main_8cpp.html | 2 +- docs/html/main_8cpp_source.html | 8 +- docs/html/md_LICENSE.html | 2 +- docs/html/pages.html | 2 +- docs/html/readme_8md.html | 2 +- docs/html/search/all_10.js | 20 +- docs/html/search/all_11.js | 6 +- docs/html/search/all_12.js | 4 +- docs/html/search/all_13.js | 2 +- docs/html/search/all_14.js | 4 +- docs/html/search/all_15.js | 2 +- docs/html/search/all_7.js | 11 +- docs/html/search/all_8.js | 8 +- docs/html/search/all_9.js | 20 +- docs/html/search/all_a.js | 18 +- docs/html/search/all_b.js | 48 ++-- docs/html/search/all_c.js | 18 +- docs/html/search/all_d.js | 18 +- docs/html/search/all_e.js | 24 +- docs/html/search/all_f.js | 66 +++--- docs/html/search/classes_0.js | 10 +- docs/html/search/classes_1.js | 4 +- docs/html/search/defines_0.js | 4 +- docs/html/search/defines_1.js | 2 +- docs/html/search/defines_2.js | 2 +- docs/html/search/defines_3.js | 2 +- docs/html/search/defines_4.js | 2 +- docs/html/search/defines_5.js | 4 +- docs/html/search/enums_0.js | 4 +- docs/html/search/enumvalues_0.js | 2 +- docs/html/search/enumvalues_1.js | 2 +- docs/html/search/enumvalues_2.js | 4 +- docs/html/search/enumvalues_3.js | 2 +- docs/html/search/enumvalues_4.js | 4 +- docs/html/search/enumvalues_5.js | 4 +- docs/html/search/enumvalues_6.js | 6 +- docs/html/search/enumvalues_7.js | 2 +- docs/html/search/enumvalues_8.js | 2 +- docs/html/search/files_0.js | 2 +- docs/html/search/files_1.js | 2 +- docs/html/search/files_2.js | 4 +- docs/html/search/files_3.js | 4 +- docs/html/search/files_4.js | 2 +- docs/html/search/files_5.js | 2 +- docs/html/search/files_6.js | 2 +- docs/html/search/files_7.js | 2 +- docs/html/search/functions_0.js | 2 +- docs/html/search/functions_1.js | 2 +- docs/html/search/functions_2.js | 2 +- docs/html/search/functions_3.js | 4 +- docs/html/search/functions_4.js | 6 +- docs/html/search/functions_5.js | 4 +- docs/html/search/functions_6.js | 31 +-- docs/html/search/functions_7.js | 2 +- docs/html/search/functions_8.js | 4 +- docs/html/search/functions_9.js | 2 +- docs/html/search/functions_a.js | 4 +- docs/html/search/functions_b.js | 6 +- docs/html/search/functions_c.js | 30 +-- docs/html/search/functions_d.js | 2 +- docs/html/search/pages_0.js | 2 +- docs/html/search/pages_1.html | 36 --- docs/html/search/pages_1.js | 4 - docs/html/search/typedefs_0.js | 2 +- docs/html/search/typedefs_1.js | 2 +- docs/html/search/variables_0.js | 2 +- docs/html/search/variables_1.js | 2 +- docs/html/search/variables_10.js | 2 +- docs/html/search/variables_2.js | 26 +- docs/html/search/variables_3.js | 2 +- docs/html/search/variables_4.js | 8 +- docs/html/search/variables_5.js | 4 +- docs/html/search/variables_6.js | 10 +- docs/html/search/variables_7.js | 12 +- docs/html/search/variables_8.js | 24 +- docs/html/search/variables_9.js | 10 +- docs/html/search/variables_a.js | 8 +- docs/html/search/variables_b.js | 18 +- docs/html/search/variables_c.js | 28 +-- docs/html/search/variables_d.js | 12 +- docs/html/search/variables_e.js | 4 +- docs/html/search/variables_f.js | 4 +- docs/html/structNTPEvent__t-members.html | 2 +- docs/html/structNTPEvent__t.html | 2 +- docs/html/structNTPFlags__t-members.html | 2 +- docs/html/structNTPFlags__t.html | 2 +- docs/html/structNTPPacket__t-members.html | 2 +- docs/html/structNTPPacket__t.html | 2 +- .../structNTPSyncEventInfo__t-members.html | 2 +- docs/html/structNTPSyncEventInfo__t.html | 2 +- docs/html/structtimestamp32__t-members.html | 2 +- docs/html/structtimestamp32__t.html | 2 +- docs/html/structtimestamp64__t-members.html | 2 +- docs/html/structtimestamp64__t.html | 2 +- docs/html/structtimestamp__t-members.html | 82 ------- docs/html/structtimestamp__t.html | 137 ----------- 133 files changed, 657 insertions(+), 845 deletions(-) delete mode 100644 docs/html/search/pages_1.html delete mode 100644 docs/html/search/pages_1.js delete mode 100644 docs/html/structtimestamp__t-members.html delete mode 100644 docs/html/structtimestamp__t.html diff --git a/docs/html/ESPNtpClient_8cpp.html b/docs/html/ESPNtpClient_8cpp.html index 1e65f02..456098e 100644 --- a/docs/html/ESPNtpClient_8cpp.html +++ b/docs/html/ESPNtpClient_8cpp.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/ESPNtpClient_8cpp_source.html b/docs/html/ESPNtpClient_8cpp_source.html index 4f39fc5..7ebe229 100644 --- a/docs/html/ESPNtpClient_8cpp_source.html +++ b/docs/html/ESPNtpClient_8cpp_source.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
@@ -1134,7 +1134,7 @@
1069  return result;
1070 }
-
time_t getLastNTPSync()
Gets last successful sync time in UNIX format.
Definition: ESPNtpClient.h:635
+
time_t getLastNTPSync()
Gets last successful sync time in UNIX format.
Definition: ESPNtpClient.h:644
@ unsyncd
Definition: ESPNtpClient.h:87
unsigned int shortInterval
Interval to set periodic time sync until first synchronization.
Definition: ESPNtpClient.h:234
uint32_t fraction
32-bit fraction field resolving 232 picoseconds (1/2^32)
@@ -1143,7 +1143,7 @@
constexpr auto SECS_PER_HOUR
Definition: ESPNtpClient.h:66
unsigned int longInterval
Interval to set periodic time sync.
Definition: ESPNtpClient.h:235
uint8_t refID[4]
32-bit code identifying the particular server or reference clock
Definition: ESPNtpClient.h:210
-
char * getTimeDateString()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:582
+
char * getTimeDateString()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:581
uint maxNumSyncRetry
Number of resync repetitions if minimum accuracy has not been reached.
Definition: ESPNtpClient.h:240
onSyncEvent_t onSyncEvent
Event handler callback.
Definition: ESPNtpClient.h:237
timeval origin
Time at the client when the request departed for the server.
Definition: ESPNtpClient.h:213
@@ -1175,11 +1175,11 @@
timeval reference
Time when the system clock was last set or corrected.
Definition: ESPNtpClient.h:212
uint maxDispersionErrors
Number of resync repetitions if server has a dispersion value bigger than offset absolute value.
Definition: ESPNtpClient.h:242
@ requestSent
Definition: NTPEventTypes.h:18
-
NTPStatus_t syncStatus()
Returns sync status.
Definition: ESPNtpClient.h:674
+
NTPStatus_t syncStatus()
Returns sync status.
Definition: ESPNtpClient.h:683
unsigned long uptime
Time since boot.
Definition: ESPNtpClient.h:233
int li
2-bit integer warning of an impending leap second to be inserted or deleted in the last minute of the...
Definition: ESPNtpClient.h:107
float dispersion
Total dispersion to the reference clock.
Definition: ESPNtpClient.h:166
-
int64_t millis()
Gets milliseconds since 1-Jan-1970 00:00 UTC.
Definition: ESPNtpClient.h:682
+
int64_t millis()
Gets milliseconds since 1-Jan-1970 00:00 UTC.
Definition: ESPNtpClient.h:691
NTPUndecodedPacket_t
long minSyncAccuracyUs
Timeout configuration to wait for NTP response.
Definition: ESPNtpClient.h:239
int16_t flipInt16(int16_t number)
@@ -1209,7 +1209,7 @@
int vers
3-bit integer representing the NTP version number, currently 4
Definition: ESPNtpClient.h:108
boolean sendNTPpacket()
Sends NTP request to server.
NTPClient class.
Definition: ESPNtpClient.h:226
-
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:591
+
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:590
int64_t offsetAve
Average calculated value.
Definition: ESPNtpClient.h:267
unsigned int port
Definition: NTPEventTypes.h:35
IPAddress ntpServerIPAddress
IP address of NTP server on Internet or LAN.
Definition: ESPNtpClient.h:248
@@ -1241,7 +1241,7 @@
int32_t secondsOffset
32-bit seconds field spanning 136 years since 1-Jan-1900 00:00 UTC
NTPClient NTP
Singleton NTPClient instance.
timeval lastSyncd
Stored time of last successful sync.
Definition: ESPNtpClient.h:229
-
time_t getUptime()
Gets uptime in UNIX format, time since MCU was last rebooted.
Definition: ESPNtpClient.h:649
+
time_t getUptime()
Gets uptime in UNIX format, time since MCU was last rebooted.
Definition: ESPNtpClient.h:658
static void s_recvPacket(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
Static method that calls recvPacket. Used in receiver task.
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32.
IPAddress serverAddress
Definition: NTPEventTypes.h:34
diff --git a/docs/html/ESPNtpClient_8h.html b/docs/html/ESPNtpClient_8h.html index a3edff4..8f05ddb 100644 --- a/docs/html/ESPNtpClient_8h.html +++ b/docs/html/ESPNtpClient_8h.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
@@ -197,8 +197,8 @@

Detailed Description

Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32.

-
Version
0.2.2
-
Date
13/12/2020
+
Version
0.2.3
+
Date
14/02/2021
Author
German Martin

Definition in file ESPNtpClient.h.

diff --git a/docs/html/ESPNtpClient_8h_source.html b/docs/html/ESPNtpClient_8h_source.html index c2202e9..019b453 100644 --- a/docs/html/ESPNtpClient_8h_source.html +++ b/docs/html/ESPNtpClient_8h_source.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
@@ -362,113 +362,115 @@
542  char* getTimeStr (time_t moment) {
543  tm* local_tm = localtime (&moment);
544  strftime (strBuffer, sizeof(strBuffer), "%H:%M:%S", local_tm);
-
545 
-
546  return strBuffer;
-
547  }
-
548 
-
553  char* getDateStr () {
-
554  time_t currentTime = time (NULL);
-
555  return getDateStr (currentTime);
-
556  }
-
557 
-
563  char* getDateStr (timeval moment) {
-
564  return getDateStr (moment.tv_sec);
-
565  }
-
566 
-
572  char* getDateStr (time_t moment) {
-
573  tm* local_tm = localtime (&moment);
-
574  strftime (strBuffer, sizeof (strBuffer), "%02d/%m/%04Y", local_tm);
-
575  return strBuffer;
-
576  }
-
577 
-
582  char* getTimeDateString () {
-
583  time_t currentTime = time (NULL);
-
584  return getTimeDateString (currentTime);
-
585  }
-
586 
- -
592  timeval currentTime;
-
593  gettimeofday (&currentTime, NULL);
-
594  return getTimeDateString (currentTime);
-
595  }
-
596 
-
602  char* getTimeDateString (timeval moment) {
-
603  tm* local_tm = localtime (&moment.tv_sec);
-
604  size_t index = strftime (strBuffer, sizeof (strBuffer), "%02d/%02m/%04Y %02H:%02M:%02S", local_tm);
-
605  index += snprintf (strBuffer + index, sizeof (strBuffer) - index, ".%06ld", moment.tv_usec);
-
606  strftime (strBuffer + index, sizeof (strBuffer) - index, " %Z", local_tm);
-
607  return strBuffer;
-
608  }
-
609 
-
615  char* getTimeDateString (time_t moment) {
-
616  tm* local_tm = localtime (&moment);
-
617  strftime (strBuffer, sizeof (strBuffer), "%02d/%02m/%04Y %02H:%02M:%02S", local_tm);
-
618 
-
619  return strBuffer;
-
620  }
-
621 
-
626  timeval getLastNTPSyncUs () {
-
627  return lastSyncd;
-
628  }
-
629 
+
545  return strBuffer;
+
546  }
+
547 
+
552  char* getDateStr () {
+
553  time_t currentTime = time (NULL);
+
554  return getDateStr (currentTime);
+
555  }
+
556 
+
562  char* getDateStr (timeval moment) {
+
563  return getDateStr (moment.tv_sec);
+
564  }
+
565 
+
571  char* getDateStr (time_t moment) {
+
572  tm* local_tm = localtime (&moment);
+
573  strftime (strBuffer, sizeof (strBuffer), "%02d/%m/%04Y", local_tm);
+
574  return strBuffer;
+
575  }
+
576 
+
581  char* getTimeDateString () {
+
582  time_t currentTime = time (NULL);
+
583  return getTimeDateString (currentTime);
+
584  }
+
585 
+ +
591  timeval currentTime;
+
592  gettimeofday (&currentTime, NULL);
+
593  return getTimeDateString (currentTime);
+
594  }
+
595 
+ +
601  return getTimeDateString (time (NULL), "%02m/%02d/%04Y %02H:%02M:%02S");
+
602  }
+
603 
+
610  char* getTimeDateString (timeval moment, const char* format = "%02d/%02m/%04Y %02H:%02M:%02S") {
+
611  tm* local_tm = localtime (&moment.tv_sec);
+
612  size_t index = strftime (strBuffer, sizeof (strBuffer), format, local_tm);
+
613  index += snprintf (strBuffer + index, sizeof (strBuffer) - index, ".%06ld", moment.tv_usec);
+
614  strftime (strBuffer + index, sizeof (strBuffer) - index, " %Z", local_tm);
+
615  return strBuffer;
+
616  }
+
617 
+
624  char* getTimeDateString (time_t moment, const char* format = "%02d/%02m/%04Y %02H:%02M:%02S") {
+
625  tm* local_tm = localtime (&moment);
+
626  strftime (strBuffer, sizeof (strBuffer), format, local_tm);
+
627 
+
628  return strBuffer;
+
629  }
630 
-
635  time_t getLastNTPSync (){
-
636  return lastSyncd.tv_sec;
+
635  timeval getLastNTPSyncUs () {
+
636  return lastSyncd;
637  }
638 
-
643  char* getUptimeString ();
-
644 
-
649  time_t getUptime () {
-
650  uptime = uptime + (::millis () - uptime);
-
651  return uptime / 1000;
-
652  }
+
639 
+
644  time_t getLastNTPSync (){
+
645  return lastSyncd.tv_sec;
+
646  }
+
647 
+
652  char* getUptimeString ();
653 
-
658  timeval getFirstSyncUs () {
-
659  return firstSync;
-
660  }
-
661 
-
666  time_t getFirstSync () {
-
667  return firstSync.tv_sec;
-
668  }
-
669 
- -
675  return status;
-
676  }
-
677 
-
682  int64_t millis () {
-
683  timeval currentTime;
-
684  gettimeofday (&currentTime, NULL);
-
685  int64_t milliseconds = (int64_t)currentTime.tv_sec * 1000L + (int64_t)currentTime.tv_usec / 1000L;
-
686  //Serial.printf ("timeval: %ld.%ld millis %lld\n", currentTime.tv_sec, currentTime.tv_usec, milliseconds);
-
687  return milliseconds;
-
688  }
-
689 
-
694  int64_t micros() {
-
695  timeval currentTime;
-
696  gettimeofday (&currentTime, NULL);
-
697  int64_t microseconds = (int64_t)currentTime.tv_sec * 1000000L + (int64_t)currentTime.tv_usec;
-
698  //Serial.printf ("timeval: %ld.%ld micros %lld\n", currentTime.tv_sec, currentTime.tv_usec, microseconds);
-
699  return microseconds;
-
700  }
-
701 
-
707  char* ntpEvent2str (NTPEvent_t e);
-
708 
-
709 
-
710 };
-
711 
-
712 extern NTPClient NTP;
-
713 
-
714 #endif // _NtpClientLib_h
+
658  time_t getUptime () {
+
659  uptime = uptime + (::millis () - uptime);
+
660  return uptime / 1000;
+
661  }
+
662 
+
667  timeval getFirstSyncUs () {
+
668  return firstSync;
+
669  }
+
670 
+
675  time_t getFirstSync () {
+
676  return firstSync.tv_sec;
+
677  }
+
678 
+ +
684  return status;
+
685  }
+
686 
+
691  int64_t millis () {
+
692  timeval currentTime;
+
693  gettimeofday (&currentTime, NULL);
+
694  int64_t milliseconds = (int64_t)currentTime.tv_sec * 1000L + (int64_t)currentTime.tv_usec / 1000L;
+
695  //Serial.printf ("timeval: %ld.%ld millis %lld\n", currentTime.tv_sec, currentTime.tv_usec, milliseconds);
+
696  return milliseconds;
+
697  }
+
698 
+
703  int64_t micros() {
+
704  timeval currentTime;
+
705  gettimeofday (&currentTime, NULL);
+
706  int64_t microseconds = (int64_t)currentTime.tv_sec * 1000000L + (int64_t)currentTime.tv_usec;
+
707  //Serial.printf ("timeval: %ld.%ld micros %lld\n", currentTime.tv_sec, currentTime.tv_usec, microseconds);
+
708  return microseconds;
+
709  }
+
710 
+
716  char* ntpEvent2str (NTPEvent_t e);
+
717 
+
718 
+
719 };
+
720 
+
721 extern NTPClient NTP;
+
722 
+
723 #endif // _NtpClientLib_h
-
time_t getLastNTPSync()
Gets last successful sync time in UNIX format.
Definition: ESPNtpClient.h:635
+
time_t getLastNTPSync()
Gets last successful sync time in UNIX format.
Definition: ESPNtpClient.h:644
constexpr auto DEFAULT_NTP_SERVER
Default international NTP server. I recommend you to select a closer server to get better accuracy.
Definition: ESPNtpClient.h:43
-
time_t getFirstSync()
Gets first successful synchronization time after boot.
Definition: ESPNtpClient.h:666
+
time_t getFirstSync()
Gets first successful synchronization time after boot.
Definition: ESPNtpClient.h:675
@ unsyncd
Definition: ESPNtpClient.h:87
constexpr auto DEFAULT_MIN_SYNC_ACCURACY_US
Minimum sync accuracy in us.
Definition: ESPNtpClient.h:51
Ticker loopTimer
Timer to trigger timesync.
Definition: ESPNtpClient.h:255
constexpr auto SECS_PER_HOUR
Definition: ESPNtpClient.h:66
-
char * getTimeDateString(time_t moment)
Converts given time and date to a char string.
Definition: ESPNtpClient.h:615
-
char * getTimeDateString()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:582
+
char * getTimeDateString()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:581
onSyncEvent_t onSyncEvent
Event handler callback.
Definition: ESPNtpClient.h:237
timeval origin
Time at the client when the request departed for the server.
Definition: ESPNtpClient.h:213
constexpr auto SECS_PER_DAY
Definition: ESPNtpClient.h:67
@@ -480,7 +482,7 @@
uint numDispersionErrors
Definition: ESPNtpClient.h:243
static char strBuffer[35]
Temporary buffer for time and date strings.
Definition: ESPNtpClient.h:221
char * getNtpServerName()
Gets NTP server name.
Definition: ESPNtpClient.h:411
-
char * getDateStr()
Converts current date to a char string.
Definition: ESPNtpClient.h:553
+
char * getDateStr()
Converts current date to a char string.
Definition: ESPNtpClient.h:552
timeval receive
Time at the server when the request arrived from the client.
Definition: ESPNtpClient.h:214
constexpr auto DEFAULT_NTP_TIMEOUT
Default NTP timeout ms.
Definition: ESPNtpClient.h:48
NTPClient NTP
Singleton NTPClient instance.
@@ -491,11 +493,11 @@
int64_t offsetSum
Sum of offsets for average calculation.
Definition: ESPNtpClient.h:266
constexpr auto DEFAULT_NUM_OFFSET_AVE_ROUNDS
Number of NTP request and response rounds to calculate offset average.
Definition: ESPNtpClient.h:58
timeval reference
Time when the system clock was last set or corrected.
Definition: ESPNtpClient.h:212
-
NTPStatus_t syncStatus()
Returns sync status.
Definition: ESPNtpClient.h:674
+
NTPStatus_t syncStatus()
Returns sync status.
Definition: ESPNtpClient.h:683
void setMaxNumSyncRetry(unsigned long maxRetry)
Sets max number of sync retrials if minimum accuracy has not been reached.
Definition: ESPNtpClient.h:496
int li
2-bit integer warning of an impending leap second to be inserted or deleted in the last minute of the...
Definition: ESPNtpClient.h:107
float dispersion
Total dispersion to the reference clock.
Definition: ESPNtpClient.h:166
-
int64_t millis()
Gets milliseconds since 1-Jan-1970 00:00 UTC.
Definition: ESPNtpClient.h:682
+
int64_t millis()
Gets milliseconds since 1-Jan-1970 00:00 UTC.
Definition: ESPNtpClient.h:691
char * getTimeStr(time_t moment)
Converts a time in UNIX format to a char string representing time.
Definition: ESPNtpClient.h:542
@ syncd
Definition: ESPNtpClient.h:86
double offset
Temporary offset storage for event notify.
Definition: ESPNtpClient.h:261
@@ -505,7 +507,7 @@
std::function< void(NTPEvent_t)> onSyncEvent_t
Event notifier callback.
Definition: ESPNtpClient.h:219
constexpr auto SECS_PER_YEAR
Definition: ESPNtpClient.h:70
constexpr auto SECS_PER_MIN
Definition: ESPNtpClient.h:65
-
timeval getLastNTPSyncUs()
Gets last successful sync time in UNIX format, with microseconds.
Definition: ESPNtpClient.h:626
+
timeval getLastNTPSyncUs()
Gets last successful sync time in UNIX format, with microseconds.
Definition: ESPNtpClient.h:635
Ticker responseTimer
Timer to trigger response timeout.
Definition: ESPNtpClient.h:259
char * getTimeStr()
Converts current time to a char string.
Definition: ESPNtpClient.h:520
int mode
3-bit integer representing the mode, with values defined in this table
Definition: ESPNtpClient.h:123
@@ -515,13 +517,15 @@
int getLongInterval()
Gets sync period.
Definition: ESPNtpClient.h:460
constexpr auto DEFAULT_NTP_INTERVAL
Default sync interval 30 minutes.
Definition: ESPNtpClient.h:45
enum NTPStatus NTPStatus_t
NTP client status code.
+
char * getTimeDateString(time_t moment, const char *format="%02d/%02m/%04Y %02H:%02M:%02S")
Converts given time and date to a char string.
Definition: ESPNtpClient.h:624
+
char * getTimeDateString(timeval moment, const char *format="%02d/%02m/%04Y %02H:%02M:%02S")
Converts given time and date to a char string.
Definition: ESPNtpClient.h:610
constexpr auto DEFAULT_NTP_PORT
Default local udp port. Select a different one if neccesary (usually not needed)
Definition: ESPNtpClient.h:44
int vers
3-bit integer representing the NTP version number, currently 4
Definition: ESPNtpClient.h:108
~NTPClient()
NTP client Class destructor.
Definition: ESPNtpClient.h:361
pbuf * lastNtpResponsePacket
Last response packet to be processed by receiver task.
Definition: ESPNtpClient.h:271
NTPClient class.
Definition: ESPNtpClient.h:226
-
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:591
+
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:590
int64_t offsetAve
Average calculated value.
Definition: ESPNtpClient.h:267
IPAddress ntpServerIPAddress
IP address of NTP server on Internet or LAN.
Definition: ESPNtpClient.h:248
constexpr auto MIN_NTP_TIMEOUT
Minumum admisible ntp timeout in ms.
Definition: ESPNtpClient.h:49
@@ -540,21 +544,21 @@
NTP packet structure.
Definition: ESPNtpClient.h:129
udp_pcb * udp
UDP connection object.
Definition: ESPNtpClient.h:228
@ partialSync
Definition: ESPNtpClient.h:88
-
char * getDateStr(timeval moment)
Converts a time in UNIX format to a char string representing its date.
Definition: ESPNtpClient.h:563
+
char * getDateStr(timeval moment)
Converts a time in UNIX format to a char string representing its date.
Definition: ESPNtpClient.h:562
void setTimeZone(const char *TZ)
Sets time zone for getting local time.
Definition: ESPNtpClient.h:510
timeval firstSync
Stored time of first successful sync after boot.
Definition: ESPNtpClient.h:230
-
timeval getFirstSyncUs()
Gets first successful synchronization time after boot.
Definition: ESPNtpClient.h:658
+
timeval getFirstSyncUs()
Gets first successful synchronization time after boot.
Definition: ESPNtpClient.h:667
float clockPrecission
8-bit signed integer representing the precision of the system clock, in log2 seconds
Definition: ESPNtpClient.h:162
constexpr auto SECS_YR_2000
The time at the start of y2k.
Definition: ESPNtpClient.h:71
uint numSyncRetry
Current resync repetition.
Definition: ESPNtpClient.h:241
-
char * getTimeDateString(timeval moment)
Converts given time and date to a char string.
Definition: ESPNtpClient.h:602
-
char * getDateStr(time_t moment)
Converts a time in UNIX format to a char string representing its date.
Definition: ESPNtpClient.h:572
+
char * getDateStr(time_t moment)
Converts a time in UNIX format to a char string representing its date.
Definition: ESPNtpClient.h:571
timeval lastSyncd
Stored time of last successful sync.
Definition: ESPNtpClient.h:229
-
time_t getUptime()
Gets uptime in UNIX format, time since MCU was last rebooted.
Definition: ESPNtpClient.h:649
+
time_t getUptime()
Gets uptime in UNIX format, time since MCU was last rebooted.
Definition: ESPNtpClient.h:658
int getInterval()
Gets sync period.
Definition: ESPNtpClient.h:444
void stop()
Cleans data and stops all tasks.
Definition: ESPNtpClient.h:368
Flags in NTP packet.
Definition: ESPNtpClient.h:94
-
int64_t micros()
Gets microseconds since 1-Jan-1970 00:00 UTC.
Definition: ESPNtpClient.h:694
+
char * getTimeDateStringForJS()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:600
+
int64_t micros()
Gets microseconds since 1-Jan-1970 00:00 UTC.
Definition: ESPNtpClient.h:703
uint8_t peerStratum
8-bit integer representing the stratum
Definition: ESPNtpClient.h:144
constexpr auto MIN_NTP_INTERVAL
Minumum NTP request interval in seconds.
Definition: ESPNtpClient.h:50
diff --git a/docs/html/LICENSE_8md.html b/docs/html/LICENSE_8md.html index 14b7053..28a6fa1 100644 --- a/docs/html/LICENSE_8md.html +++ b/docs/html/LICENSE_8md.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/NTPEventTypes_8h.html b/docs/html/NTPEventTypes_8h.html index f447c93..fa34541 100644 --- a/docs/html/NTPEventTypes_8h.html +++ b/docs/html/NTPEventTypes_8h.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/NTPEventTypes_8h_source.html b/docs/html/NTPEventTypes_8h_source.html index ea8c52f..732fc43 100644 --- a/docs/html/NTPEventTypes_8h_source.html +++ b/docs/html/NTPEventTypes_8h_source.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/TZdef_8h.html b/docs/html/TZdef_8h.html index cde52f7..026cec8 100644 --- a/docs/html/TZdef_8h.html +++ b/docs/html/TZdef_8h.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/TZdef_8h_source.html b/docs/html/TZdef_8h_source.html index fa522d5..60dd62e 100644 --- a/docs/html/TZdef_8h_source.html +++ b/docs/html/TZdef_8h_source.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/advancedExample_8ino.html b/docs/html/advancedExample_8ino.html index eed0890..1299ddc 100644 --- a/docs/html/advancedExample_8ino.html +++ b/docs/html/advancedExample_8ino.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/advancedExample_8ino_source.html b/docs/html/advancedExample_8ino_source.html index 5896ed3..b37bf33 100644 --- a/docs/html/advancedExample_8ino_source.html +++ b/docs/html/advancedExample_8ino_source.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
@@ -217,7 +217,7 @@
#define YOUR_WIFI_SSID
#define ONBOARDLED
double timedelay
-
char * getTimeDateString()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:582
+
char * getTimeDateString()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:581
void loop()
@ timeSyncd
Definition: NTPEventTypes.h:14
@ partlySync
Definition: NTPEventTypes.h:19
@@ -231,7 +231,7 @@
bool begin(const char *ntpServerName=DEFAULT_NTP_SERVER)
Starts time synchronization.
@ accuracyError
Definition: NTPEventTypes.h:24
#define NTP_TIMEOUT
-
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:591
+
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:590
const PROGMEM char * ntpServer
double offset
NTPEvent_t ntpEvent
@@ -240,7 +240,7 @@
#define SHOW_TIME_PERIOD
@ syncNotNeeded
Definition: NTPEventTypes.h:20
void setTimeZone(const char *TZ)
Sets time zone for getting local time.
Definition: ESPNtpClient.h:510
-
timeval getFirstSyncUs()
Gets first successful synchronization time after boot.
Definition: ESPNtpClient.h:658
+
timeval getFirstSyncUs()
Gets first successful synchronization time after boot.
Definition: ESPNtpClient.h:667
#define YOUR_WIFI_PASSWD
NTPClient NTP
Singleton NTPClient instance.
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32.
diff --git a/docs/html/annotated.html b/docs/html/annotated.html index f719ce1..6141749 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/basicExample_8ino.html b/docs/html/basicExample_8ino.html index b760d16..1a3b376 100644 --- a/docs/html/basicExample_8ino.html +++ b/docs/html/basicExample_8ino.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
diff --git a/docs/html/basicExample_8ino_source.html b/docs/html/basicExample_8ino_source.html index 9b6419b..329f2dc 100644 --- a/docs/html/basicExample_8ino_source.html +++ b/docs/html/basicExample_8ino_source.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
@@ -111,7 +111,7 @@
void setup()
#define YOUR_WIFI_SSID
bool begin(const char *ntpServerName=DEFAULT_NTP_SERVER)
Starts time synchronization.
-
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:591
+
char * getTimeDateStringUs()
Converts current time and date to a char string.
Definition: ESPNtpClient.h:590
#define YOUR_WIFI_PASSWD
void setTimeZone(const char *TZ)
Sets time zone for getting local time.
Definition: ESPNtpClient.h:510
void loop()
diff --git a/docs/html/classNTPClient-members.html b/docs/html/classNTPClient-members.html index b9809d8..f2dd9b9 100644 --- a/docs/html/classNTPClient-members.html +++ b/docs/html/classNTPClient-members.html @@ -23,7 +23,7 @@ Logo
ESPNtpClient -  0.2.2 +  0.2.3
Library to get system sync from a NTP server with microseconds accuracy in ESP8266 and ESP32
@@ -93,67 +93,68 @@ getShortInterval()NTPClientinline getTime()NTPClient getTimeDateString()NTPClientinline - getTimeDateString(timeval moment)NTPClientinline - getTimeDateString(time_t moment)NTPClientinline - getTimeDateStringUs()NTPClientinline - getTimeStr()NTPClientinline - getTimeStr(timeval moment)NTPClientinline - getTimeStr(time_t moment)NTPClientinline - getUptime()NTPClientinline - getUptimeString()NTPClient - isConnectedNTPClientprotected - lastNtpResponsePacketNTPClientprotected - lastSyncdNTPClientprotected - longIntervalNTPClientprotected - loopTimerNTPClient - maxDispersionErrorsNTPClientprotected - maxNumSyncRetryNTPClientprotected - micros()NTPClientinline - millis()NTPClientinline - minSyncAccuracyUsNTPClientprotected - ntpEvent2str(NTPEvent_t e)NTPClient - ntpRequestedNTPClientprotected - ntpServerIPAddressNTPClientprotected - ntpServerNameNTPClientprotected - ntpTimeoutNTPClientprotected - numAveRoundsNTPClientprotected - numDispersionErrorsNTPClientprotected - numSyncRetryNTPClientprotected - offsetNTPClientprotected - offsetAveNTPClientprotected - offsetSumNTPClientprotected - onNTPSyncEvent(onSyncEvent_t handler)NTPClientinline - onSyncEventNTPClientprotected - packetLastReceivedNTPClientprotected - processPacket(struct pbuf *p)NTPClientprotected - processRequestTimeout()NTPClientprotected - receiverTimerNTPClient - responsePacketValidNTPClientprotected - responseTimerNTPClientprotected - roundNTPClientprotected - s_getTimeloop(void *arg)NTPClientprotectedstatic - s_processRequestTimeout(void *arg)NTPClientprotectedstatic - s_receiverTask(void *arg)NTPClientprotectedstatic - s_recvPacket(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)NTPClientprotectedstatic - sendNTPpacket()NTPClientprotected - setInterval(int interval)NTPClient - setInterval(int shortInterval, int longInterval)NTPClient - setMaxNumSyncRetry(unsigned long maxRetry)NTPClientinline - setMinSyncAccuracy(long accuracy)NTPClientinline - setNtpServerName(const char *serverName)NTPClient - setNTPTimeout(uint16_t milliseconds)NTPClient - settimeSyncThreshold(long threshold)NTPClientinline - setTimeZone(const char *TZ)NTPClientinline - shortIntervalNTPClientprotected - statusNTPClientprotected - stop()NTPClientinline - syncStatus()NTPClientinline - timeSyncThresholdNTPClientprotected - timeZoneNTPClientprotected - tznameNTPClientprotected - udpNTPClientprotected - uptimeNTPClientprotected - ~NTPClient()NTPClientinline + getTimeDateString(timeval moment, const char *format="%02d/%02m/%04Y %02H:%02M:%02S")NTPClientinline + getTimeDateString(time_t moment, const char *format="%02d/%02m/%04Y %02H:%02M:%02S")NTPClientinline + getTimeDateStringForJS()NTPClientinline + getTimeDateStringUs()NTPClientinline + getTimeStr()NTPClientinline + getTimeStr(timeval moment)NTPClientinline + getTimeStr(time_t moment)NTPClientinline + getUptime()NTPClientinline + getUptimeString()NTPClient + isConnectedNTPClientprotected + lastNtpResponsePacketNTPClientprotected + lastSyncdNTPClientprotected + longIntervalNTPClientprotected + loopTimerNTPClient + maxDispersionErrorsNTPClientprotected + maxNumSyncRetryNTPClientprotected + micros()NTPClientinline + millis()NTPClientinline + minSyncAccuracyUsNTPClientprotected + ntpEvent2str(NTPEvent_t e)NTPClient + ntpRequestedNTPClientprotected + ntpServerIPAddressNTPClientprotected + ntpServerNameNTPClientprotected + ntpTimeoutNTPClientprotected + numAveRoundsNTPClientprotected + numDispersionErrorsNTPClientprotected + numSyncRetryNTPClientprotected + offsetNTPClientprotected + offsetAveNTPClientprotected + offsetSumNTPClientprotected + onNTPSyncEvent(onSyncEvent_t handler)NTPClientinline + onSyncEventNTPClientprotected + packetLastReceivedNTPClientprotected + processPacket(struct pbuf *p)NTPClientprotected + processRequestTimeout()NTPClientprotected + receiverTimerNTPClient + responsePacketValidNTPClientprotected + responseTimerNTPClientprotected + roundNTPClientprotected + s_getTimeloop(void *arg)NTPClientprotectedstatic + s_processRequestTimeout(void *arg)NTPClientprotectedstatic + s_receiverTask(void *arg)NTPClientprotectedstatic + s_recvPacket(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)NTPClientprotectedstatic + sendNTPpacket()NTPClientprotected + setInterval(int interval)NTPClient + setInterval(int shortInterval, int longInterval)NTPClient + setMaxNumSyncRetry(unsigned long maxRetry)NTPClientinline + setMinSyncAccuracy(long accuracy)NTPClientinline + setNtpServerName(const char *serverName)NTPClient + setNTPTimeout(uint16_t milliseconds)NTPClient + settimeSyncThreshold(long threshold)NTPClientinline + setTimeZone(const char *TZ)NTPClientinline + shortIntervalNTPClientprotected + statusNTPClientprotected + stop()NTPClientinline + syncStatus()NTPClientinline + timeSyncThresholdNTPClientprotected + timeZoneNTPClientprotected + tznameNTPClientprotected + udpNTPClientprotected + uptimeNTPClientprotected + ~NTPClient()NTPClientinline