Function anj_send_new_request
Defined in File lwm2m_send.h
Function Documentation
-
int anj_send_new_request(anj_t *anj, const anj_send_request_t *send_request, uint16_t *out_send_id)
Queue a new LwM2M Send request.
If this function returns 0, the request is queued and the finish handler will be called with the final result. The request is processed when:
a registration session is active, and
no higher-priority CoAP exchange is in progress.
When multiple requests are queued, they are processed FIFO; only one Send request is processed at a time.
Note
Timestamps: Only SenML CBOR supports timestamps. In non-SenML formats, timestamp is ignored.
Note
Duplicate paths when using LwM2M CBOR: LwM2M CBOR uses a CBOR map keyed by paths; keys must be unique. A request with duplicate paths is invalid, even if timestamps differ.
Note
The
send_requestobject is not copied. All referenced memory (including the records array) must remain valid and unchanged until the operation completes and the finish handler returns.- Parameters:
anj – Anjay object.
send_request – Description of the message to send (must remain valid until completion).
out_send_id – [out] If non-NULL, receives the assigned Send request ID (valid until the finish handler is invoked).
- Returns:
0 on success, otherwise one of LwM2M Send error codes :