Anjay Lite
|
#include <core.h>
Data Fields | |
const char * | endpoint_name |
anj_connection_status_callback_t * | connection_status_cb |
void * | connection_status_cb_arg |
bool | queue_mode_enabled |
uint64_t | queue_mode_timeout_ms |
const anj_net_config_t * | net_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 |
Anjay Lite configuration. Provided in anj_core_init() function.
uint16_t bootstrap_retry_count |
The number of successive communication attempts before which a communication sequence to the Bootstrap Server is considered as failed.
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.
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.
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.
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.
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.
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.
const anj_net_config_t* net_socket_cfg |
Network socket configuration.
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.
uint64_t queue_mode_timeout_ms |
Specifies the timeout (in milliseconds) after which the client enters offline mode in Queue Mode.
const _anj_exchange_udp_tx_params_t* udp_tx_params |
UDP transmission parameters, for LwM2M client requests. If NULL, default values will be used.