net: lwm2m: Deprecate Kconfig for LwM2M RD Client
RD-Client is essential part of LwM2M specification and it can't be disabled from LwM2M engine. This commit deprecates Kconfig variable CONFIG_LWM2M_RD_CLIENT_SUPPORT and removes all usages if it. Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
This commit is contained in:
parent
5751f90185
commit
c7a5f7fda7
|
@ -15,10 +15,6 @@ zephyr_library_sources(
|
|||
lwm2m_rw_link_format.c
|
||||
lwm2m_rw_plain_text.c
|
||||
lwm2m_util.c
|
||||
)
|
||||
|
||||
# LWM2M RD Client Support
|
||||
zephyr_library_sources_ifdef(CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
lwm2m_rd_client.c
|
||||
)
|
||||
|
||||
|
|
|
@ -192,16 +192,14 @@ config LWM2M_TLS_SESSION_CACHING
|
|||
|
||||
config LWM2M_RD_CLIENT_SUSPEND_SOCKET_AT_IDLE
|
||||
bool "Socket close is skipped at RX_ON_IDLE state"
|
||||
depends on LWM2M_RD_CLIENT_SUPPORT
|
||||
help
|
||||
This config suspend socket handler which skip socket polling process.
|
||||
|
||||
config LWM2M_RD_CLIENT_SUPPORT
|
||||
bool "support for LWM2M client bootstrap/registration state machine"
|
||||
default y
|
||||
select DEPRECATED
|
||||
help
|
||||
Client will use registration state machine to locate and connect to
|
||||
LWM2M servers (including bootstrap server support)
|
||||
Deprecated flag. RD state machine is always part of engine. It cannot be disabled.
|
||||
|
||||
config LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP
|
||||
bool "Bootstrap support"
|
||||
|
@ -210,7 +208,6 @@ config LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP
|
|||
|
||||
config LWM2M_RD_CLIENT_ENDPOINT_NAME_MAX_LENGTH
|
||||
int "Maximum length of client endpoint name"
|
||||
depends on LWM2M_RD_CLIENT_SUPPORT
|
||||
default 33
|
||||
help
|
||||
Default: room for 32 hexadecimal digits (UUID) + NULL
|
||||
|
@ -245,7 +242,6 @@ config LWM2M_SERVER_DEFAULT_SSID
|
|||
|
||||
config LWM2M_PEER_PORT
|
||||
int "LWM2M server port"
|
||||
depends on LWM2M_RD_CLIENT_SUPPORT
|
||||
default 5683
|
||||
help
|
||||
This is the default server port to connect to for LWM2M communication.
|
||||
|
|
|
@ -47,6 +47,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include "lwm2m_rw_oma_tlv.h"
|
||||
#include "lwm2m_rw_plain_text.h"
|
||||
#include "lwm2m_util.h"
|
||||
#include "lwm2m_rd_client.h"
|
||||
#if defined(CONFIG_LWM2M_RW_SENML_JSON_SUPPORT)
|
||||
#include "lwm2m_rw_senml_json.h"
|
||||
#endif
|
||||
|
@ -59,9 +60,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#ifdef CONFIG_LWM2M_RW_SENML_CBOR_SUPPORT
|
||||
#include "lwm2m_rw_senml_cbor.h"
|
||||
#endif
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
#include "lwm2m_rd_client.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NET_TC_THREAD_COOPERATIVE)
|
||||
/* Lowest priority cooperative thread */
|
||||
|
@ -689,16 +687,12 @@ static void socket_loop(void)
|
|||
while (1) {
|
||||
/* Check is Thread Suspend Requested */
|
||||
if (suspend_engine_thread) {
|
||||
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
lwm2m_rd_client_pause();
|
||||
#endif
|
||||
suspend_engine_thread = false;
|
||||
active_engine_thread = false;
|
||||
k_thread_suspend(engine_thread_id);
|
||||
active_engine_thread = true;
|
||||
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
lwm2m_rd_client_resume();
|
||||
#endif
|
||||
}
|
||||
|
||||
timestamp = k_uptime_get();
|
||||
|
|
|
@ -49,6 +49,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include "lwm2m_rw_oma_tlv.h"
|
||||
#include "lwm2m_rw_plain_text.h"
|
||||
#include "lwm2m_util.h"
|
||||
#include "lwm2m_rd_client.h"
|
||||
#if defined(CONFIG_LWM2M_RW_SENML_JSON_SUPPORT)
|
||||
#include "lwm2m_rw_senml_json.h"
|
||||
#endif
|
||||
|
@ -61,9 +62,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#ifdef CONFIG_LWM2M_RW_SENML_CBOR_SUPPORT
|
||||
#include "lwm2m_rw_senml_cbor.h"
|
||||
#endif
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
#include "lwm2m_rd_client.h"
|
||||
#endif
|
||||
|
||||
/* TODO: figure out what's correct value */
|
||||
#define TIMEOUT_BLOCKWISE_TRANSFER_MS (MSEC_PER_SEC * 30)
|
||||
|
||||
|
@ -398,7 +397,7 @@ cleanup:
|
|||
|
||||
int lwm2m_send_message_async(struct lwm2m_message *msg)
|
||||
{
|
||||
#if defined(CONFIG_LWM2M_QUEUE_MODE_ENABLED) && defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
#if defined(CONFIG_LWM2M_QUEUE_MODE_ENABLED)
|
||||
int ret;
|
||||
|
||||
ret = lwm2m_rd_client_connection_resume(msg->ctx);
|
||||
|
@ -409,8 +408,7 @@ int lwm2m_send_message_async(struct lwm2m_message *msg)
|
|||
#endif
|
||||
sys_slist_append(&msg->ctx->pending_sends, &msg->node);
|
||||
|
||||
if (IS_ENABLED(CONFIG_LWM2M_RD_CLIENT_SUPPORT) &&
|
||||
IS_ENABLED(CONFIG_LWM2M_QUEUE_MODE_ENABLED)) {
|
||||
if (IS_ENABLED(CONFIG_LWM2M_QUEUE_MODE_ENABLED)) {
|
||||
engine_update_tx_time();
|
||||
}
|
||||
return 0;
|
||||
|
@ -418,7 +416,7 @@ int lwm2m_send_message_async(struct lwm2m_message *msg)
|
|||
|
||||
int lwm2m_information_interface_send(struct lwm2m_message *msg)
|
||||
{
|
||||
#if defined(CONFIG_LWM2M_QUEUE_MODE_ENABLED) && defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
#if defined(CONFIG_LWM2M_QUEUE_MODE_ENABLED)
|
||||
int ret;
|
||||
|
||||
ret = lwm2m_rd_client_connection_resume(msg->ctx);
|
||||
|
@ -1260,11 +1258,9 @@ static int lwm2m_delete_handler(struct lwm2m_message *msg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
if (!msg->ctx->bootstrap_mode) {
|
||||
engine_trigger_update(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -16,9 +16,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
|
||||
#include "lwm2m_object.h"
|
||||
#include "lwm2m_engine.h"
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
#include "lwm2m_rd_client.h"
|
||||
#endif
|
||||
|
||||
#define SERVER_VERSION_MAJOR 1
|
||||
#if defined(CONFIG_LWM2M_SERVER_OBJECT_VERSION_1_1)
|
||||
|
@ -141,23 +139,15 @@ static int disable_cb(uint16_t obj_inst_id, uint8_t *args, uint16_t args_len)
|
|||
static int update_trigger_cb(uint16_t obj_inst_id,
|
||||
uint8_t *args, uint16_t args_len)
|
||||
{
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
engine_trigger_update(false);
|
||||
return 0;
|
||||
#else
|
||||
return -EPERM;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(CONFIG_LWM2M_SERVER_OBJECT_VERSION_1_1)
|
||||
static int bootstrap_trigger_cb(uint16_t obj_inst_id,
|
||||
uint8_t *args, uint16_t args_len)
|
||||
{
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
return engine_trigger_bootstrap();
|
||||
#else
|
||||
return -EPERM;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool lwm2m_server_get_mute_send(uint16_t obj_inst_id)
|
||||
|
@ -187,12 +177,8 @@ static int lifetime_write_cb(uint16_t obj_inst_id, uint16_t res_id,
|
|||
ARG_UNUSED(last_block);
|
||||
ARG_UNUSED(total_size);
|
||||
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
engine_trigger_update(false);
|
||||
return 0;
|
||||
#else
|
||||
return -EPERM;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int32_t server_get_instance_s32(uint16_t obj_inst_id, int32_t *data,
|
||||
|
|
|
@ -21,6 +21,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include "lwm2m_engine.h"
|
||||
#include "lwm2m_object.h"
|
||||
#include "lwm2m_util.h"
|
||||
#include "lwm2m_rd_client.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
@ -39,9 +40,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
#include "lwm2m_rd_client.h"
|
||||
#endif
|
||||
#if defined(CONFIG_LWM2M_RW_SENML_JSON_SUPPORT)
|
||||
#include "lwm2m_rw_senml_json.h"
|
||||
#endif
|
||||
|
@ -54,9 +52,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#ifdef CONFIG_LWM2M_RW_SENML_CBOR_SUPPORT
|
||||
#include "lwm2m_rw_senml_cbor.h"
|
||||
#endif
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
#include "lwm2m_rd_client.h"
|
||||
#endif
|
||||
|
||||
#define OBSERVE_COUNTER_START 0U
|
||||
|
||||
|
|
|
@ -35,9 +35,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include <zephyr/types.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
#include "lwm2m_rd_client.h"
|
||||
#endif
|
||||
|
||||
#define BINDING_OPT_MAX_LEN 3 /* "UQ" */
|
||||
#define QUEUE_OPT_MAX_LEN 2 /* "Q" */
|
||||
|
@ -308,9 +306,7 @@ int lwm2m_engine_create_obj_inst(const char *pathstr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
engine_trigger_update(true);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -338,9 +334,7 @@ int lwm2m_engine_delete_obj_inst(const char *pathstr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
engine_trigger_update(true);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1405,11 +1399,9 @@ int lwm2m_get_or_create_engine_obj(struct lwm2m_message *msg,
|
|||
*created = 1U;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_LWM2M_RD_CLIENT_SUPPORT)
|
||||
if (!msg->ctx->bootstrap_mode) {
|
||||
engine_trigger_update(true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -69,9 +69,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
|
||||
#include "lwm2m_rw_oma_tlv.h"
|
||||
#include "lwm2m_engine.h"
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
#include "lwm2m_rd_client.h"
|
||||
#endif
|
||||
#include "lwm2m_util.h"
|
||||
|
||||
enum {
|
||||
|
@ -1003,11 +1001,9 @@ int do_write_op_tlv(struct lwm2m_message *msg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LWM2M_RD_CLIENT_SUPPORT
|
||||
if (!msg->ctx->bootstrap_mode) {
|
||||
engine_trigger_update(true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
while (pos < tlv.length &&
|
||||
|
|
|
@ -279,7 +279,6 @@ CONFIG_LWM2M_DTLS_SUPPORT=y
|
|||
CONFIG_LWM2M_DNS_SUPPORT=y
|
||||
CONFIG_LWM2M_CANCEL_OBSERVE_BY_PATH=y
|
||||
CONFIG_LWM2M_QUEUE_MODE_ENABLED=y
|
||||
CONFIG_LWM2M_RD_CLIENT_SUPPORT=y
|
||||
CONFIG_LWM2M_CONN_MON_OBJ_SUPPORT=y
|
||||
CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT=y
|
||||
CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT=y
|
||||
|
|
Loading…
Reference in a new issue