SNTP
이 모듈은 SNTP 통신을 제어하는 기능을 포함합니다.
요약
Typedef | |
---|---|
otSntpQuery | typedefstruct otSntpQuery 이 구조는 SNTP 쿼리 매개 변수를 구현합니다. |
otSntpResponseHandler )(void *aContext, uint64_t aTime, otError aResult) | typedefvoid(* 이 함수 포인터는 SNTP 응답이 수신 될 때 호출됩니다. |
기능 | |
---|---|
otSntpClientQuery ( otInstance *aInstance, const otSntpQuery *aQuery, otSntpResponseHandler aHandler, void *aContext) | 이 함수는 SNTP 쿼리를 보냅니다. |
otSntpClientSetUnixEra ( otInstance *aInstance, uint32_t aUnixEra) | void 이 함수는 유닉스 시대 번호를 설정합니다. |
구조체 | |
---|---|
otSntpQuery | 이 구조는 SNTP 쿼리 매개 변수를 구현합니다. |
Typedef
otSntpResponseHandler
void(* otSntpResponseHandler)(void *aContext, uint64_t aTime, otError aResult)
이 함수 포인터는 SNTP 응답이 수신 될 때 호출됩니다.
세부 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
매개 변수 |
| ||||||||||
반환 값 |
|
기능
otSntpClientQuery
otError otSntpClientQuery( otInstance *aInstance, const otSntpQuery *aQuery, otSntpResponseHandler aHandler, void *aContext )
이 함수는 SNTP 쿼리를 보냅니다.
이 기능은 OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE
기능이 활성화 된 경우에만 사용할 수 있습니다.
세부 | |||||||||
---|---|---|---|---|---|---|---|---|---|
매개 변수 |
|
otSntpClientSetUnixEra
void otSntpClientSetUnixEra( otInstance *aInstance, uint32_t aUnixEra )
이 함수는 유닉스 시대 번호를 설정합니다.
unix 시대의 기본값은 0으로 설정되어 있습니다. 이후 시대는 2106 년 이후에 시작됩니다.
세부 | |||||
---|---|---|---|---|---|
매개 변수 |
|
매크로
OT_SNTP_DEFAULT_SERVER_IP
OT_SNTP_DEFAULT_SERVER_IP "2001:4860:4806:8::"
기본 SNTP 서버 주소-Google NTP 서버를 정의합니다.
OT_SNTP_DEFAULT_SERVER_PORT
OT_SNTP_DEFAULT_SERVER_PORT 123
기본 SNTP 서버 포트를 정의합니다.