Function anjay_get_server_last_communication_time

Function Documentation

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

Gets the time at which the client has communicated with a given LwM2M Server for the last time.

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 last communication attempt 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 the last communication happened, or AVS_TIME_REAL_INVALID if there was no communication attempt with a given server.

Returns:

AVS_OK on success, or an error code.