net: lwm2m: Add option to register in UDP queue mode

Add Kconfig option to enable Queue Mode binding. With this option
enabled, the LWM2M client will register with `UQ` binding, instead of
`U`.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2020-02-20 16:49:14 +01:00 committed by Jukka Rissanen
commit 842d4b220f
6 changed files with 42 additions and 4 deletions

View file

@ -1851,6 +1851,16 @@ int lwm2m_engine_get_resource(char *pathstr, struct lwm2m_engine_res **res)
return path_to_objs(&path, NULL, NULL, res, NULL);
}
void lwm2m_engine_get_binding(char *binding)
{
if (IS_ENABLED(CONFIG_LWM2M_QUEUE_MODE_ENABLED)) {
strcpy(binding, "UQ");
} else {
/* Defaults to UDP. */
strcpy(binding, "U");
}
}
int lwm2m_engine_create_res_inst(char *pathstr)
{
int ret, i;