Function anjay_advanced_fw_update_get_conflicting_instances

Function Documentation

int anjay_advanced_fw_update_get_conflicting_instances(anjay_t *anjay, anjay_iid_t iid, const anjay_iid_t **out_target_iids, size_t *out_target_iids_count)

Gets conflicting instances resource of Advance Firmware Update object instance.

When the download or update fails and the Update Result resource is set to ANJAY_ADVANCED_FW_UPDATE_RESULT_CONFLICTING_STATE or ANJAY_ADVANCED_FW_UPDATE_RESULT_DEPENDENCY_ERROR this resource MUST be present and contain references to the Advanced Firmware Update object instances that caused the conflict. See LwM2M specification for details.

NOTE: The returned array points directly into the internal structures of Anjay; however, it may only be modified by a call to anjay_advanced_fw_update_set_conflicting_instances . Nevertheless, if your code calls the “get” and “set” functions from different threads, the calls need to be additionally synchronized to achieve thread safety.

Parameters:
  • anjay – Anjay object to operate on.

  • iid – Instance ID of an Advanced Firmware Object.

  • out_target_iids – Points to memory where to write array of iids of conflicting instances.

  • out_target_iids_count – Point to memory where to write count of target iids in an array.

Returns:

0 on success, or a negative value in case of error.