TCPIP_SNTP_EVENT_HANDLER Type

C

typedef void (* TCPIP_SNTP_EVENT_HANDLER)(TCPIP_SNTP_EVENT evType, const void* evParam);

Description

Prototype of a SNTP event handler. Clients can register a handler with the SNTP service. Once an SNTP event occurs, the SNTP service will call the registered handler. The handler has to be short and fast. It is meant for setting an event flag, not for lengthy processing.

  • If evType < 0 (an error event - TCPIP_SNTP_EVENT_DNS_ERROR ... TCPIP_SNTP_EVENT_SYNC_ERROR): evParam represents the 32 bit system tick when the event occurred.

  • If evType == TCPIP_SNTP_EVENT_TSTAMP_OK: evParam represents a const pointer to a TCPIP_SNTP_EVENT_TIME_DATA describing the timestamp received.