Function anjay_send_batch_data_add_current

Function Documentation

int anjay_send_batch_data_add_current(anjay_send_batch_builder_t *builder, anjay_t *anjay, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid)

Reads value from data model of object anjay (without checking access privileges) and adds it to the builder with timestamp set to avs_time_real_now().

May possibly add multiple entries if /oid/iid/rid is a Multiple Resource.

Parameters:
  • builder – Pointer to batch builder, MUST NOT be NULL

  • anjay – Pointer to Anjay object, MUST NOT be NULL

  • oid – Object ID, MUST NOT be UINT16_MAX , 0 (Security object ID) or 21 (OSCORE object ID).

  • iid – Instance ID, MUST NOT be UINT16_MAX

  • rid – Resource ID, MUST NOT be UINT16_MAX

Returns:

0 on success, negative value otherwise. In case of failure, the builder is left unchanged.