Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
lwm2m_ctx Struct Reference

LwM2M context structure to maintain information for a single LwM2M connection. More...

#include <lwm2m.h>

Data Fields

struct sockaddr remote_addr
 
struct coap_pending pendings [CONFIG_LWM2M_ENGINE_MAX_PENDING]
 
struct coap_reply replies [CONFIG_LWM2M_ENGINE_MAX_REPLIES]
 
sys_slist_t pending_sends
 
sys_slist_t observer
 
voidprocessed_req
 
bool use_dtls
 
int sec_obj_inst
 
int srv_obj_inst
 
bool bootstrap_mode
 
int sock_fd
 
lwm2m_socket_fault_cb_t fault_cb
 
lwm2m_notify_timeout_cb_t notify_timeout_cb
 
uint8_t validate_buf [CONFIG_LWM2M_ENGINE_VALIDATION_BUFFER_SIZE]
 

Detailed Description

LwM2M context structure to maintain information for a single LwM2M connection.

Field Documentation

◆ bootstrap_mode

bool lwm2m_ctx::bootstrap_mode

Flag to enable BOOTSTRAP interface. See Section 5.2 "Bootstrap Interface" of LwM2M Technical Specification 1.0.2 for more information.

◆ fault_cb

lwm2m_socket_fault_cb_t lwm2m_ctx::fault_cb

Socket fault callback. LwM2M processing thread will call this callback in case of socket errors on receive.

◆ notify_timeout_cb

lwm2m_notify_timeout_cb_t lwm2m_ctx::notify_timeout_cb

Notify Timeout Callback. LwM2M processing thread will call this callback in case of notify timeout.

◆ observer

sys_slist_t lwm2m_ctx::observer

◆ pending_sends

sys_slist_t lwm2m_ctx::pending_sends

◆ pendings

struct coap_pending lwm2m_ctx::pendings[CONFIG_LWM2M_ENGINE_MAX_PENDING]

Private CoAP and networking structures

◆ processed_req

void* lwm2m_ctx::processed_req

A pointer to currently processed request, for internal LwM2M engine use. The underlying type is struct lwm2m_message, but since it's declared in a private header and not exposed to the application, it's stored as a void pointer.

◆ remote_addr

struct sockaddr lwm2m_ctx::remote_addr

Destination address storage

◆ replies

struct coap_reply lwm2m_ctx::replies[CONFIG_LWM2M_ENGINE_MAX_REPLIES]

◆ sec_obj_inst

int lwm2m_ctx::sec_obj_inst

Current index of Security Object used for server credentials

◆ sock_fd

int lwm2m_ctx::sock_fd

Socket File Descriptor

◆ srv_obj_inst

int lwm2m_ctx::srv_obj_inst

Current index of Server Object used in this context.

◆ use_dtls

bool lwm2m_ctx::use_dtls

Flag to indicate if context should use DTLS. Enabled via the use of coaps:// protocol prefix in connection information. NOTE: requires CONFIG_LWM2M_DTLS_SUPPORT=y

◆ validate_buf

uint8_t lwm2m_ctx::validate_buf[CONFIG_LWM2M_ENGINE_VALIDATION_BUFFER_SIZE]

Validation buffer. Used as a temporary buffer to decode the resource value before validation. On successful validation, its content is copied into the actual resource buffer.


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