Anjay Lite
Loading...
Searching...
No Matches
LwM2M Send error codes

Macros

#define ANJ_SEND_SUCCESS   0
 
#define ANJ_SEND_ERR_TIMEOUT   -1
 
#define ANJ_SEND_ERR_ABORT   -2
 
#define ANJ_SEND_ERR_REJECTED   -3
 
#define ANJ_SEND_ERR_NETWORK   -4
 
#define ANJ_SEND_ERR_INTERNAL   -5
 
#define ANJ_SEND_ERR_NO_REQUEST_FOUND   -6
 
#define ANJ_SEND_ERR_NO_SPACE   -7
 
#define ANJ_SEND_ERR_NOT_ALLOWED   -8
 
#define ANJ_SEND_ERR_DATA_NOT_VALID   -9
 

Detailed Description

Error and result values reported by the Send API.

Macro Definition Documentation

◆ ANJ_SEND_ERR_ABORT

#define ANJ_SEND_ERR_ABORT   -2

Delivery aborted.

Possible causes include:

  • Explicit cancellation via anj_send_abort,
  • Network error,
  • Value of Mute Send Resource is set to true,
  • Registration session ended.

◆ ANJ_SEND_ERR_DATA_NOT_VALID

#define ANJ_SEND_ERR_DATA_NOT_VALID   -9

anj_send_new_request : provided data is invalid.

◆ ANJ_SEND_ERR_INTERNAL

#define ANJ_SEND_ERR_INTERNAL   -5

anj_send_finished_handler_t : Internal error occurred while sending the message.

◆ ANJ_SEND_ERR_NETWORK

#define ANJ_SEND_ERR_NETWORK   -4

anj_send_finished_handler_t : Network error occurred while sending the message.

◆ ANJ_SEND_ERR_NO_REQUEST_FOUND

#define ANJ_SEND_ERR_NO_REQUEST_FOUND   -6

anj_send_abort : no request with the given ID was found.

◆ ANJ_SEND_ERR_NO_SPACE

#define ANJ_SEND_ERR_NO_SPACE   -7

◆ ANJ_SEND_ERR_NOT_ALLOWED

#define ANJ_SEND_ERR_NOT_ALLOWED   -8

anj_send_new_request : request cannot be sent in the current state:

◆ ANJ_SEND_ERR_REJECTED

#define ANJ_SEND_ERR_REJECTED   -3

Delivery failed due to a CoAP-level error.

Returned when the exchange completes with a non-success CoAP status (e.g., server responds 4.xx/5.xx, sends RST), or when the client's processing produces a CoAP error code (e.g., failure while preparing or handling the payload that maps to a CoAP error). Not used for timeouts or explicit aborts; those are reported as ANJ_SEND_ERR_TIMEOUT and ANJ_SEND_ERR_ABORT respectively.

◆ ANJ_SEND_ERR_TIMEOUT

#define ANJ_SEND_ERR_TIMEOUT   -1

Timed out.

This error indicates that the Send request could not be completed within the expected time window. It may occur in two situations:

  • The Server did not acknowledge or respond within the retransmission limits defined by the CoAP transmission parameters.
  • The Client could not hand off the request to the transport layer within an implementation-defined processing delay (e.g., due to a blocked or unresponsive network stack). In this case, the message may never have been sent to the Server.

In both cases, the Send operation is considered failed.

◆ ANJ_SEND_SUCCESS

#define ANJ_SEND_SUCCESS   0

Delivery succeeded (acknowledged by the Server).