net: lwm2m: Add dimension discovery support
Multi-instance resources shall report its dimension (number of resource instances) on discovery. Since it was not possible to tell simply on the instance count whether the resource is multi-instance or not (there could be a multi-instance resource with only one instance avaialble) add a new parameter to the structure representing resource, indicating whether it's multi-instance or not. Add dimension information to the discovery result. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
18cfc3761e
commit
366a2147cc
14 changed files with 69 additions and 36 deletions
|
@ -213,7 +213,7 @@ static struct lwm2m_engine_obj_inst *buzzer_create(uint16_t obj_inst_id)
|
|||
|
||||
/* initialize instance resource data */
|
||||
INIT_OBJ_RES(BUZZER_ON_OFF_ID, res[avail], i,
|
||||
res_inst[avail], j, 1, true,
|
||||
res_inst[avail], j, 1, false, true,
|
||||
&buzzer_data[avail].onoff,
|
||||
sizeof(buzzer_data[avail].onoff),
|
||||
NULL, NULL, onoff_post_write_cb, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue