Anjay Lite
|
#include <core.h>
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.
anj_time_duration_t bootstrap_retry_timeout |
The delay 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.
anj_time_duration_t bootstrap_timeout |
Timeout 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 for default CoAP transmission parameters.
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.
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.
anj_time_duration_t exchange_request_timeout |
Time to wait for the next block of the LwM2M Server request. If not set, the default value of ANJ_EXCHANGE_SERVER_REQUEST_TIMEOUT is used.
const anj_net_socket_configuration_t* net_socket_cfg |
Network socket configuration.
bool queue_mode_enabled |
Enables Queue Mode — a 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 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.
anj_time_duration_t queue_mode_timeout |
Specifies the timeout 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
, the default value of ANJ_EXCHANGE_UDP_TX_PARAMS_DEFAULT is used.