mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[sntp] clean up and improve Sntp::Client (#13114)
This commit refactors and improves the `Sntp::Client` class by adopting common OpenThread patterns and simplifying the logic. Key changes: - Introduced `Sntp::Client::QueryInfo` core class to wrap the public `otSntpQuery` structure. - Added `Timestamp` class to handle SNTP timestamps, simplifying the `Header` structure. - Renamed methods and variables to be more concise and consistent (e.g., `FinalizeSntpTransaction` to `Finalize`, `mRetransmissionTimer` to `mTimer`). - Simplified the `HandleUdpReceive` logic by splitting response processing into `ProcessResponse`. This change improves code readability and maintainability of the SNTP client module.
This commit is contained in:
committed by
GitHub
parent
86b8bf6de4
commit
64c4124bd1
@@ -199,6 +199,8 @@
|
||||
|
||||
#define OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_DEFAULT_MODE 0
|
||||
|
||||
#define OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE 1
|
||||
|
||||
#define OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 1
|
||||
|
||||
#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 1
|
||||
|
||||
Reference in New Issue
Block a user