Function anjay_get_server_next_update_time

Function Documentation

avs_error_t anjay_get_server_next_update_time(anjay_t *anjay, anjay_ssid_t ssid, avs_time_real_t *out_time)

Gets the time at which next registration update operation with a given LwM2M Server is scheduled.

NOTE: This function may internally perform conversion between time values attached to different clocks (real-time clock vs. monotonic clock), which depends on immediate readings of those clocks. For this reason, the calculated value may slightly change from call to call, even if no action was performed in between. This accuracy depends on the accuracy of the underlying clocks as well as CPU performance. It is generally expected to be accurate within single-digit milliseconds, but it is recommended to avoid code that would perform direct comparisons on those values.

Parameters:
  • anjay – Anjay object to operate on.

  • ssid – A Short Server ID of a single regular LwM2M Server for which to get the information, or ANJAY_SSID_ANY to get the time of the closes registration update operation to any known server.

  • out_time[out] Non-NULL pointer to an avs_time_real_t structure. The structure will be filled with information about a point in time according to the real-time clock at which next registration update operation is scheduled, or AVS_TIME_REAL_INVALID if a registration update operation isn’t scheduled for a given SSID.

Returns:

AVS_OK on success, or an error code.