Modules#
SNTP#
This module includes functions that control SNTP communication.
Typedefs#
This structure implements SNTP Query parameters.
This function pointer is called when a SNTP response is received.
Functions#
This function sends a SNTP query.
This function sets the unix era number.
Macros#
Defines default SNTP Server address - Google NTP Server.
Defines default SNTP Server port.
Typedef Documentation#
otSntpQuery#
typedef struct otSntpQuery otSntpQuery
This structure implements SNTP Query parameters.
66
of file include/openthread/sntp.h
otSntpResponseHandler#
typedef void(* otSntpResponseHandler) (void *aContext, uint64_t aTime, otError aResult) )(void *aContext, uint64_t aTime, otError aResult)
This function pointer is called when a SNTP response is received.
[in] | aContext | A pointer to application-specific context. |
[in] | aTime | Specifies the time at the server when the response left for the client, in UNIX time. |
[in] | aResult | A result of the SNTP transaction. |
83
of file include/openthread/sntp.h
Function Documentation#
otSntpClientQuery#
otError otSntpClientQuery (otInstance * aInstance, const otSntpQuery * aQuery, otSntpResponseHandler aHandler, void * aContext)
This function sends a SNTP query.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aQuery | A pointer to specify SNTP query parameters. |
[in] | aHandler | A function pointer that shall be called on response reception or time-out. |
[in] | aContext | A pointer to arbitrary context information. |
This function is available only if feature OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
is enabled.
96
of file include/openthread/sntp.h
otSntpClientSetUnixEra#
void otSntpClientSetUnixEra (otInstance * aInstance, uint32_t aUnixEra)
This function sets the unix era number.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aUnixEra | Unix era number. |
The default value of unix era is set to 0. The subsequent eras start after year 2106.
110
of file include/openthread/sntp.h
Macro Definition Documentation#
OT_SNTP_DEFAULT_SERVER_IP#
#define OT_SNTP_DEFAULT_SERVER_IPValue:
"2001:4860:4806:8::"
Defines default SNTP Server address - Google NTP Server.
56
of file include/openthread/sntp.h
OT_SNTP_DEFAULT_SERVER_PORT#
#define OT_SNTP_DEFAULT_SERVER_PORTValue:
123
Defines default SNTP Server port.
57
of file include/openthread/sntp.h