Function anjay_server_object_set_lifetime

Function Documentation

int anjay_server_object_set_lifetime(anjay_t *anjay, anjay_iid_t iid, int32_t lifetime)

Sets the Lifetime value for the specified Server Instance ID.

NOTE: Calling this function MAY trigger sending LwM2M Update message to an associated LwM2M Server.

Parameters:
  • anjay – Anjay instance for which the Server Object is installed.

  • iid – Server Object Instance for which the Lifetime shall be altered.

  • lifetime – New value of the Lifetime Resource. MUST BE strictly positive.

Returns:

0 on success, negative value in case of an error. If an error is returned, the Lifetime value remains unchanged.