38 #ifndef OPENAPI_SNTP_H_INCLUDED
39 #define OPENAPI_SNTP_H_INCLUDED
43 #define OPEN_SNTP_BUFFER_SIZE 256
44 #define OPEN_SECS_PER_MIN 60
45 #define OPEN_SNTP_DATE_STRING_SIZE 21
169 uint32_t *priorityMax);
242 uint32_t *maxSntpServers);
283 uint32_t *sntpServerAddrLen);
366 uint16_t *serverPriority);
386 uint16_t *serverVersion);
406 uint16_t *serverPort);
555 uint32_t *refStrLen);
589 uint32_t *currEntries);
685 uint32_t *numRequests);
709 uint32_t *numFailedRequests);
open_error_t openapiActiveSntpServerModeGet(openapiClientHandle_t *client_handle, OPEN_SNTP_SERVER_MODE_t *serverMode)
Get the mode of the SNTP server from which last packet is received.
OPEN_SNTP_SUPPORTED_MODE_t
OpEN uses this enumeration to define SNTP supported client modes.
SNTP client broadcast mode.
Kiss of Death as Rate Exceeded.
SNTP client unicast mode.
SNTP client unicast mode.
open_error_t openapiSntpClientSupportedModeGet(openapiClientHandle_t *client_handle, OPEN_SNTP_SUPPORTED_MODE_t *sntpClientSupportedMode)
Get the SNTP client supported mode.
OPEN_SNTP_SERVER_MODE_t
OpEN uses this enumeration to define SNTP server modes.
open_error_t openapiSntpServerReferenceStringLengthGet(openapiClientHandle_t *client_handle, uint32_t *refStrLen)
Get the maximum length of the SNTP reference ID string.
open_error_t openapiSntpServerPortGet(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint16_t *serverPort)
Get the SNTP server port.
open_error_t openapiSntpServerVersionGet(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint16_t *serverVersion)
Get the SNTP server version.
open_error_t openapiSntpServersMaxSupportedGet(openapiClientHandle_t *client_handle, uint32_t *maxSntpServers)
Get the maximum number of SNTP servers supported.
open_error_t openapiSntpServerDelete(openapiClientHandle_t *client_handle, open_buffdesc *ipAddr)
Delete an SNTP server.
open_error_t
OPEN uses these enumerators to indicate the error codes.
OPEN_SNTP_CLIENT_MODE_t
OpEN uses this enumeration to define SNTP client modes.
open_error_t openapiSntpServerVersionSet(openapiClientHandle_t *client_handle, open_buffdesc *ipAddr, uint16_t version)
Set SNTP server version.
open_error_t openapiSntpServerAddressTypeGet(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, OPEN_SNTP_ADDRESS_TYPE_t *sntpServerAddrType)
Get the SNTP server address type.
SNTP client mode disabled.
open_error_t openapiSntpClientModeSet(openapiClientHandle_t *client_handle, OPEN_SNTP_CLIENT_MODE_t mode)
Set the SNTP client mode.
open_error_t openapiSntpServerAdd(openapiClientHandle_t *client_handle, open_buffdesc *ipAddr)
Add an SNTP server.
SNTP client unicast and broadcast modes.
open_error_t openapiSntpServerNextGet(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, open_buffdesc *nextSntpServer)
Get the next SNTP server.
open_error_t openapiSntpServerMaxAddrLenGet(openapiClientHandle_t *client_handle, uint32_t *sntpServerAddrLen)
Get the maximum length of SNTP server address.
OPEN_SNTP_PACKET_STATUS_t
open_error_t openapiSntpServerPrioritySet(openapiClientHandle_t *client_handle, open_buffdesc *ipAddr, uint16_t priority)
Set priority to the SNTP server.
open_error_t openapiActiveSntpServerAddressTypeGet(openapiClientHandle_t *client_handle, OPEN_SNTP_ADDRESS_TYPE_t *type)
Get the active SNTP server address type from which last packet is received.
open_error_t openapiActiveSntpServerStratumGet(openapiClientHandle_t *client_handle, uint32_t *stratum)
Get the stratum of the SNTP server from which last packet is received.
open_error_t openapiSntpServerPortSet(openapiClientHandle_t *client_handle, open_buffdesc *ipAddr, uint16_t port)
Set SNTP server port.
open_error_t openapiSntpServerNumRequests(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint32_t *numRequests)
Get the SNTP server number of requests.
SNTP client broadcast mode.
open_error_t openapiSntpServerLastAttemptTime(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, open_buffdesc *sntpLastAttemptTime)
Get the SNTP server last attempt time.
open_error_t openapiSntpServerPriorityMaxGet(openapiClientHandle_t *client_handle, uint32_t *priorityMax)
Get the maximum SNTP priority.
open_error_t openapiSntpServerFirstGet(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer)
Get the first SNTP server.
open_error_t openapiSntpServerLastUpdatedTime(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, open_buffdesc *sntpLastUpdatedTime)
Get the SNTP server last updated time.
OPEN_SNTP_ADDRESS_TYPE_t
OpEN uses this enumeration to define SNTP address types.
open_error_t openapiSntpServerLastAttemptStatus(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, OPEN_SNTP_PACKET_STATUS_t *sntpLastAttemptStatus)
Get the SNTP server last attempt status.
open_error_t openapiActiveSntpServerIpAddressGet(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer)
Get the active SNTP server from which last packet is received.
open_error_t openapiActiveSntpServerReferenceIdGet(openapiClientHandle_t *client_handle, open_buffdesc *reference)
Get the SNTP server reference identifier from which last packet is received.
open_error_t openapiSntpServerNumFailedRequests(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint32_t *numFailedRequests)
Get the SNTP server number of failed requests.
open_error_t openapiSntpServerCurrentEntriesGet(openapiClientHandle_t *client_handle, uint32_t *currEntries)
Get number of SNTP servers configured.
SNTP client mode disabled.
open_error_t openapiSntpServerPriorityGet(openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint16_t *serverPriority)
Get the SNTP server priority.
open_error_t openapiSntpClientModeGet(openapiClientHandle_t *client_handle, OPEN_SNTP_CLIENT_MODE_t *sntpClientMode)
Get the SNTP client mode.