SNTP
This module includes functions that control SNTP communication.
Summary
Typedefs |
|
---|---|
otSntpQuery
|
typedefstruct otSntpQuery
Implements SNTP Query parameters. |
otSntpResponseHandler)(void *aContext, uint64_t aTime, otError aResult)
|
typedefvoid(*
Pointer is called when a SNTP response is received. |
Functions |
|
---|---|
otSntpClientQuery(otInstance *aInstance, const otSntpQuery *aQuery, otSntpResponseHandler aHandler, void *aContext)
|
Sends a SNTP query.
|
otSntpClientSetUnixEra(otInstance *aInstance, uint32_t aUnixEra)
|
void
Sets the unix era number.
|
Macros |
|
---|---|
OT_SNTP_DEFAULT_SERVER_IP "2001:4860:4806:8::"
|
Defines default SNTP Server address - Google NTP Server.
|
OT_SNTP_DEFAULT_SERVER_PORT 123
|
Defines default SNTP Server port.
|
Structs |
|
---|---|
otSntpQuery |
Implements SNTP Query parameters. |
Typedefs
otSntpResponseHandler
void(* otSntpResponseHandler)(void *aContext, uint64_t aTime, otError aResult)
Pointer is called when a SNTP response is received.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
Functions
otSntpClientQuery
otError otSntpClientQuery( otInstance *aInstance, const otSntpQuery *aQuery, otSntpResponseHandler aHandler, void *aContext )
Sends a SNTP query.
Is available only if feature OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
is enabled.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otSntpClientSetUnixEra
void otSntpClientSetUnixEra( otInstance *aInstance, uint32_t aUnixEra )
Sets the unix era number.
The default value of unix era is set to 0. The subsequent eras start after year 2106.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
Macros
OT_SNTP_DEFAULT_SERVER_IP
OT_SNTP_DEFAULT_SERVER_IP "2001:4860:4806:8::"
Defines default SNTP Server address - Google NTP Server.
OT_SNTP_DEFAULT_SERVER_PORT
OT_SNTP_DEFAULT_SERVER_PORT 123
Defines default SNTP Server port.
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.