Function anj_ntp_init
Defined in File ntp.h
Function Documentation
-
int anj_ntp_init(anj_t *anj, anj_ntp_t *ntp, const anj_ntp_configuration_t *config)
Initializes NTP module internal state variable. Installs NTP object into Anjay instance.
Last time syncresource is initialized to the time of initialization.- Parameters:
anj – Anjay Lite instance.
ntp – Pointer to a variable that will hold the state of NTP module.
config – Configuration structure for the NTP module. Object pointed to by this pointer can be freed after this function returns, as it is copied internally.
- Returns:
0 on success, ANJ_NTP_ERR_CONFIGURATION if the provided configuration is invalid, ANJ_NTP_ERR_OBJECT_CREATION_FAILED if NTP object creation in Anjay instance failed.