Anjay Lite
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
anjay_configuration_struct Struct Reference

#include <core.h>

Data Fields

const char * endpoint_name
 
anj_connection_status_callback_tconnection_status_cb
 
void * connection_status_cb_arg
 
bool queue_mode_enabled
 
uint64_t queue_mode_timeout_ms
 
const anj_net_config_tnet_socket_cfg
 
const _anj_exchange_udp_tx_params_t * udp_tx_params
 
uint64_t exchange_request_timeout_ms
 
uint16_t bootstrap_retry_count
 
uint32_t bootstrap_retry_timeout
 
uint32_t bootstrap_timeout
 

Detailed Description

Anjay Lite configuration. Provided in anj_core_init() function.

Field Documentation

◆ bootstrap_retry_count

uint16_t bootstrap_retry_count

The number of successive communication attempts before which a communication sequence to the Bootstrap Server is considered as failed.

◆ bootstrap_retry_timeout

uint32_t bootstrap_retry_timeout

The delay, in seconds, between successive communication attempts in a communication sequence to the Bootstrap Server. This value is multiplied by two to the power of the communication retry attempt minus one (2**(retry attempt-1)) to create an exponential back-off.

◆ bootstrap_timeout

uint32_t bootstrap_timeout

Timeout (in seconds) for the Bootstrap process.

This timeout defines the maximum period of inactivity allowed during the Bootstrap phase. If no message is received from the Bootstrap Server within this time, the bootstrap process will be considered failed.

If not set, a default value of 247 seconds is used, which corresponds to the CoAP EXCHANGE_LIFETIME value.

◆ connection_status_cb

anj_connection_status_callback_t* connection_status_cb

Optional callback for monitoring connection status changes.

If provided, this callback will be invoked by the library whenever the client transitions between connection states, check anj_connection_status_callback_t for details.

◆ connection_status_cb_arg

void* connection_status_cb_arg

Opaque argument that will be passed to the function configured in the connection_status_cb field.

If connection_status_cb is NULL, this field is ignored.

◆ endpoint_name

const char* endpoint_name

Endpoint name as presented to the LwM2M server. Must be non-NULL.

NOTE: Endpoint name must stay valid for the whole lifetime of the Anjay.

◆ exchange_request_timeout_ms

uint64_t exchange_request_timeout_ms

Time to wait for the next block of the LwM2M Server request. If not set, the default internal value of _ANJ_EXCHANGE_SERVER_REQUEST_TIMEOUT_MS is used.

◆ net_socket_cfg

const anj_net_config_t* net_socket_cfg

Network socket configuration.

◆ queue_mode_enabled

bool queue_mode_enabled

Enables Queue Mode — an LwM2M feature that allows the client to close its transport connection (e.g., UDP socket) to reduce power consumption in constrained environments.

When enabled, the client enters offline mode after a configurable period of inactivity — that is, when no message exchange with the server has occurred for queue_mode_timeout_ms time.

The client exits offline mode only when sending a Registration Update, a Send message, or a Notification.

While the client is in offline mode, the LwM2M Server is expected to refrain from sending any requests to the client.

◆ queue_mode_timeout_ms

uint64_t queue_mode_timeout_ms

Specifies the timeout (in milliseconds) after which the client enters offline mode in Queue Mode.

Note
If not set, the default is based on the CoAP MAX_TRANSMIT_WAIT, which is derived from CoAP transmission parameters (see udp_tx_params).

◆ udp_tx_params

const _anj_exchange_udp_tx_params_t* udp_tx_params

UDP transmission parameters, for LwM2M client requests. If NULL, default values will be used.


The documentation for this struct was generated from the following file: