Function anjay_send_batch_add_string
Defined in File lwm2m_send.h
Function Documentation
-
int anjay_send_batch_add_string(anjay_send_batch_builder_t *builder, anjay_oid_t oid, anjay_iid_t iid, anjay_rid_t rid, anjay_riid_t riid, avs_time_real_t timestamp, const char *str)
Adds a string to batch builder.
IMPORTANT NOTE: If
timestampis 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
oid – Object ID, MUST NOT be
UINT16_MAXiid – Instance ID, MUST NOT be
UINT16_MAXrid – Resource ID, MUST NOT be
UINT16_MAXriid – Resource Instance ID,
UINT16_MAXfor no RIIDtimestamp – Time related to string being send (e.g. when the measurement corresponding to the passed string was made)
str – Pointer to a NULL-terminated string. Must not be NULL. No longer required by batch builder after call to this function, because internal copy is made.
- Returns:
0 on success, negative value otherwise. In case of failure, the
builderis left unchanged.