Skip to content
Commit 0d67f6a7 authored by Michael Scott's avatar Michael Scott Committed by Jukka Rissanen
Browse files

net: lwm2m: introduce FLAG_OPTIONAL to denote optional resources



This patch introduces several changes to support OPTIONAL resources.

The primary indicator for this behavior is to assign FLAG_OPTIONAL
to the object field's permission flags.

These resources are not setup by the LwM2M object code.  They are
left up to the user-based code for initialization via the following
functions:
lwm2m_engine_set_res_data()
lwm2m_engine_get_res_data()

When assigning const-based data as a data buffer, user-based code can
also specify the following data flag: LWM2M_RES_DATA_FLAG_RO

The FLAG_OPTIONAL flag also affects the LwM2M engine in the following
ways:
- CREATE operations won't generate an error if optional resources are
  not included.
- Object instance READ operations won't complain about missing
  optional resources.
- In the future, BOOTSTRAP operations can have different handling
  based on optional resources.

Signed-off-by: default avatarMichael Scott <michael@opensourcefoundries.com>
parent 0db9af5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment