Function anjay_lwm2m_gateway_send_batch_add_objlnk

Function Documentation

int anjay_lwm2m_gateway_send_batch_add_objlnk(anjay_send_batch_builder_t *builder, anjay_iid_t gateway_iid, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, anjay_oid_t objlnk_oid, anjay_iid_t objlnk_iid)

Adds an Object Link to batch builder. This function is intended to be used with LwM2M Gateway End Device objects.

IMPORTANT NOTE: If timestamp is earlier than 1978-07-04 21:24:16 UTC (2**28 seconds since Unix epoch), then it’s assumed to be relative to some arbitrary point in time, and will be encoded as relative to “now”. Otherwise, the time is assumed to be an Unix timestamp, and encoded as time since Unix epoch. See also: RFC 8428, “Requirements and Design Goals”

Parameters:
  • builder – Pointer to batch builder

  • gateway_iid – End Device Instance ID, MUST NOT be UINT16_MAX

  • oid – Object ID, MUST NOT be UINT16_MAX

  • iid – Instance ID, MUST NOT be UINT16_MAX

  • rid – Resource ID, MUST NOT be UINT16_MAX

  • riid – Resource Instance ID, UINT16_MAX for no RIID

  • timestamp – Time related to Object Link being send (e.g. when the measurement corresponding to the passed Object Link was made)

  • objlnk_oid – OID of Object Link

  • objlnk_iid – IID of Object Link

Returns:

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