/Zephyr-latest/subsys/net/lib/lwm2m/ |
D | lwm2m_registry.c | 168 static void engine_register_obj_inst(struct lwm2m_engine_obj_inst *obj_inst) in engine_register_obj_inst() argument 175 access_control_add(obj_inst->obj->obj_id, obj_inst->obj_inst_id, server_obj_inst_id); in engine_register_obj_inst() 178 sys_slist_append(&engine_obj_inst_list, &obj_inst->node); in engine_register_obj_inst() 181 static void engine_unregister_obj_inst(struct lwm2m_engine_obj_inst *obj_inst) in engine_unregister_obj_inst() argument 184 access_control_remove(obj_inst->obj->obj_id, obj_inst->obj_inst_id); in engine_unregister_obj_inst() 186 engine_remove_observer_by_id(obj_inst->obj->obj_id, obj_inst->obj_inst_id); in engine_unregister_obj_inst() 187 sys_slist_find_and_remove(&engine_obj_inst_list, &obj_inst->node); in engine_unregister_obj_inst() 192 struct lwm2m_engine_obj_inst *obj_inst; in get_engine_obj_inst() local 194 SYS_SLIST_FOR_EACH_CONTAINER(&engine_obj_inst_list, obj_inst, node) { in get_engine_obj_inst() 195 if (obj_inst->obj->obj_id == obj_id && obj_inst->obj_inst_id == obj_inst_id) { in get_engine_obj_inst() [all …]
|
D | lwm2m_rw_opaque.c | 138 struct lwm2m_engine_obj_inst *obj_inst = NULL; in do_write_op_opaque() local 145 ret = lwm2m_get_or_create_engine_obj(msg, &obj_inst, &created); in do_write_op_opaque() 150 ret = lwm2m_engine_validate_write_access(msg, obj_inst, &obj_field); in do_write_op_opaque() 164 return lwm2m_write_handler(obj_inst, res, res_inst, obj_field, msg); in do_write_op_opaque()
|
D | lwm2m_registry.h | 21 struct lwm2m_engine_obj_inst **obj_inst); 42 struct lwm2m_engine_obj_inst **obj_inst, uint8_t *created); 147 int path_to_objs(const struct lwm2m_obj_path *path, struct lwm2m_engine_obj_inst **obj_inst,
|
D | lwm2m_message_handling.c | 834 struct lwm2m_engine_obj_inst *obj_inst; in lwm2m_register_payload_handler() local 864 SYS_SLIST_FOR_EACH_CONTAINER(engine_obj_inst_list, obj_inst, node) { in lwm2m_register_payload_handler() 865 if (obj_inst->obj->obj_id == obj->obj_id) { in lwm2m_register_payload_handler() 868 &LWM2M_OBJ(obj_inst->obj->obj_id, obj_inst->obj_inst_id)); in lwm2m_register_payload_handler() 989 static int lwm2m_write_handler_opaque(struct lwm2m_engine_obj_inst *obj_inst, in lwm2m_write_handler_opaque() argument 1033 ret = res->validate_cb(obj_inst->obj_inst_id, res->res_id, in lwm2m_write_handler_opaque() 1048 obj_inst->obj_inst_id, res->res_id, res_inst->res_inst_id, data_ptr, in lwm2m_write_handler_opaque() 1067 int lwm2m_write_handler(struct lwm2m_engine_obj_inst *obj_inst, struct lwm2m_engine_res *res, in lwm2m_write_handler() argument 1084 if (!obj_inst || !res || !res_inst || !obj_field || !msg) { in lwm2m_write_handler() 1098 data_ptr = res->pre_write_cb(obj_inst->obj_inst_id, res->res_id, in lwm2m_write_handler() [all …]
|
D | lwm2m_rw_cbor.c | 231 snprintk(objlnk, sizeof(objlnk), "%" PRIu16 ":%" PRIu16 "", value->obj_id, value->obj_inst); in put_objlnk() 455 value->obj_inst = LWM2M_OBJLNK_MAX_ID; in get_objlnk() 477 value->obj_inst = id; in get_objlnk() 482 if (value->obj_inst != LWM2M_OBJLNK_MAX_ID && (value->obj_inst == LWM2M_OBJLNK_MAX_ID)) { in get_objlnk() 528 struct lwm2m_engine_obj_inst *obj_inst = NULL; in do_write_op_cbor() local 535 ret = lwm2m_get_or_create_engine_obj(msg, &obj_inst, &created); in do_write_op_cbor() 540 ret = lwm2m_engine_validate_write_access(msg, obj_inst, &obj_field); in do_write_op_cbor() 554 return lwm2m_write_handler(obj_inst, res, res_inst, obj_field, msg); in do_write_op_cbor()
|
D | lwm2m_rw_plain_text.c | 176 value->obj_inst); in put_objlnk() 368 value->obj_inst = (uint16_t)tmp; in get_objlnk() 413 struct lwm2m_engine_obj_inst *obj_inst = NULL; in do_write_op_plain_text() local 420 ret = lwm2m_get_or_create_engine_obj(msg, &obj_inst, &created); in do_write_op_plain_text() 425 ret = lwm2m_engine_validate_write_access(msg, obj_inst, &obj_field); in do_write_op_plain_text() 439 return lwm2m_write_handler(obj_inst, res, res_inst, obj_field, msg); in do_write_op_plain_text()
|
D | lwm2m_obj_access_control.c | 170 struct lwm2m_engine_obj_inst *obj_inst = NULL; in access_control_add() local 172 lwm2m_create_obj_inst(AC_OBJ_ID, ac_obj_inst_id, &obj_inst); in access_control_add() 331 struct lwm2m_engine_obj_inst *obj_inst; in add_existing_objects() local 333 SYS_SLIST_FOR_EACH_CONTAINER(lwm2m_engine_obj_inst_list(), obj_inst, node) { in add_existing_objects() 334 access_control_add(obj_inst->obj->obj_id, obj_inst->obj_inst_id, -1); in add_existing_objects()
|
D | lwm2m_obj_event_log.c | 83 struct lwm2m_engine_obj_inst *obj_inst = NULL; in lwm2m_event_log_init() local 98 ret = lwm2m_create_obj_inst(LWM2M_OBJECT_EVENT_LOG_ID, 0, &obj_inst); in lwm2m_event_log_init()
|
D | lwm2m_obj_location.c | 94 struct lwm2m_engine_obj_inst *obj_inst = NULL; in ipso_location_init() local 107 ret = lwm2m_create_obj_inst(LWM2M_OBJECT_LOCATION_ID, 0, &obj_inst); in ipso_location_init()
|
D | lwm2m_rw_link_format.c | 243 struct lwm2m_engine_obj_inst *obj_inst = lwm2m_engine_get_obj_inst(path); in put_corelink_attributes_resource() local 246 if (obj == NULL || obj_inst == NULL || res == NULL) { in put_corelink_attributes_resource() 251 get_attributes(obj_inst, attrs); in put_corelink_attributes_resource() 418 struct lwm2m_engine_obj_inst *obj_inst = in put_obj_inst_corelink() local 421 if (obj_inst == NULL) { in put_obj_inst_corelink() 425 ret = put_corelink_attributes(out, obj_inst, obj_buf, in put_obj_inst_corelink()
|
D | lwm2m_engine.c | 270 struct lwm2m_engine_obj_inst *obj_inst, in lwm2m_engine_validate_write_access() argument 275 o_f = lwm2m_get_engine_obj_field(obj_inst->obj, msg->path.res_id); in lwm2m_engine_validate_write_access() 287 if (!obj_inst->resources || obj_inst->resource_count == 0U) { in lwm2m_engine_validate_write_access() 321 struct lwm2m_engine_obj_inst *obj_inst, *tmp; in bootstrap_delete() local 343 SYS_SLIST_FOR_EACH_CONTAINER_SAFE(engine_obj_inst_list, obj_inst, tmp, node) { in bootstrap_delete() 344 if (msg->path.level == 1 && obj_inst->obj->obj_id != msg->path.obj_id) { in bootstrap_delete() 348 if (!bootstrap_delete_allowed(obj_inst->obj->obj_id, obj_inst->obj_inst_id)) { in bootstrap_delete() 352 ret = lwm2m_delete_obj_inst(obj_inst->obj->obj_id, obj_inst->obj_inst_id); in bootstrap_delete()
|
D | lwm2m_observation.c | 223 struct lwm2m_engine_obj_inst *obj_inst = NULL; in engine_observe_get_attributes() local 246 obj_inst = get_engine_obj_inst(path->obj_id, path->obj_inst_id); in engine_observe_get_attributes() 247 if (!obj_inst) { in engine_observe_get_attributes() 253 ret = update_attrs(obj_inst, attrs); in engine_observe_get_attributes() 261 for (i = 0; i < obj_inst->resource_count; i++) { in engine_observe_get_attributes() 262 if (obj_inst->resources[i].res_id == path->res_id) { in engine_observe_get_attributes() 267 if (i == obj_inst->resource_count) { in engine_observe_get_attributes() 274 obj_field = lwm2m_get_engine_obj_field(obj, obj_inst->resources[i].res_id); in engine_observe_get_attributes() 286 ret = update_attrs(&obj_inst->resources[i], attrs); in engine_observe_get_attributes() 982 struct lwm2m_engine_obj_inst *obj_inst; in lwm2m_get_path_reference_ptr() local [all …]
|
D | lwm2m_rw_oma_tlv.c | 568 ((value->obj_id) << 16) | value->obj_inst); in put_objlnk() 774 value->obj_inst = value_s32 & 0xFFFF; in get_objlnk() 837 struct lwm2m_engine_obj_inst *obj_inst = NULL; in do_write_op_tlv_item() local 844 ret = lwm2m_get_or_create_engine_obj(msg, &obj_inst, &created); in do_write_op_tlv_item() 849 ret = lwm2m_engine_validate_write_access(msg, obj_inst, &obj_field); in do_write_op_tlv_item() 869 ret = lwm2m_write_handler(obj_inst, res, res_inst, obj_field, msg); in do_write_op_tlv_item() 978 struct lwm2m_engine_obj_inst *obj_inst = NULL; in do_write_op_tlv() local 1021 &obj_inst); in do_write_op_tlv()
|
D | lwm2m_obj_connmon.c | 201 struct lwm2m_engine_obj_inst *obj_inst = NULL; in lwm2m_connmon_init() local 217 0, &obj_inst); in lwm2m_connmon_init()
|
D | lwm2m_rw_senml_cbor.c | 511 snprintk(objlink_buf, fd->objlnk_sz, "%u:%u", value->obj_id, value->obj_inst); in put_objlnk() 669 value->obj_inst = LWM2M_OBJLNK_MAX_ID; in get_objlnk() 691 value->obj_inst = id; in get_objlnk() 696 if (value->obj_inst != LWM2M_OBJLNK_MAX_ID && (value->obj_id == LWM2M_OBJLNK_MAX_ID)) { in get_objlnk() 721 struct lwm2m_engine_obj_inst *obj_inst = NULL; in do_write_op_item() local 759 ret = lwm2m_get_or_create_engine_obj(msg, &obj_inst, &created); in do_write_op_item() 764 ret = lwm2m_engine_validate_write_access(msg, obj_inst, &obj_field); in do_write_op_item() 783 ret = lwm2m_write_handler(obj_inst, res, res_inst, obj_field, msg); in do_write_op_item()
|
D | lwm2m_message_handling.h | 72 int lwm2m_write_handler(struct lwm2m_engine_obj_inst *obj_inst, struct lwm2m_engine_res *res,
|
D | lwm2m_rw_json.c | 243 return snprintk(pt_buffer, sizeof(pt_buffer), "%u:%u", value->obj_id, value->obj_inst); in objlnk_to_string() 854 value->obj_inst = (uint16_t)tmp; in get_objlnk() 902 struct lwm2m_engine_obj_inst *obj_inst = NULL; in do_write_op_json() local 994 ret = lwm2m_get_or_create_engine_obj(msg, &obj_inst, &created); in do_write_op_json() 999 ret = lwm2m_engine_validate_write_access(msg, obj_inst, &obj_field); in do_write_op_json() 1010 ret = lwm2m_write_handler(obj_inst, res, res_inst, obj_field, msg); in do_write_op_json()
|
D | lwm2m_engine.h | 104 struct lwm2m_engine_obj_inst *obj_inst,
|
D | lwm2m_obj_security.c | 242 struct lwm2m_engine_obj_inst *obj_inst = NULL; in lwm2m_security_init() local 256 ret = lwm2m_create_obj_inst(LWM2M_OBJECT_SECURITY_ID, 0, &obj_inst); in lwm2m_security_init()
|
D | lwm2m_obj_device.c | 352 struct lwm2m_engine_obj_inst *obj_inst = NULL; in lwm2m_device_init() local 371 ret = lwm2m_create_obj_inst(LWM2M_OBJECT_DEVICE_ID, 0, &obj_inst); in lwm2m_device_init()
|
D | lwm2m_obj_firmware.c | 475 struct lwm2m_engine_obj_inst *obj_inst = NULL; in lwm2m_firmware_init() local 502 ret = lwm2m_create_obj_inst(LWM2M_OBJECT_FIRMWARE_ID, idx, &obj_inst); in lwm2m_firmware_init()
|
/Zephyr-latest/tests/net/lib/lwm2m/lwm2m_engine/src/ |
D | main.c | 283 struct lwm2m_engine_obj_inst obj_inst; in ZTEST() local 291 obj_inst.resources = &resources; in ZTEST() 292 obj_inst.resource_count = 1U; in ZTEST() 293 ret = lwm2m_engine_validate_write_access(&msg, &obj_inst, &obj_field); in ZTEST() 296 obj_inst.resource_count = 0U; in ZTEST() 297 ret = lwm2m_engine_validate_write_access(&msg, &obj_inst, &obj_field); in ZTEST() 301 ret = lwm2m_engine_validate_write_access(&msg, &obj_inst, &obj_field); in ZTEST()
|
/Zephyr-latest/tests/net/lib/lwm2m/lwm2m_registry/src/ |
D | test_obj.c | 93 struct lwm2m_engine_obj_inst *obj_inst = NULL; in obj_init() local 106 return lwm2m_create_obj_inst(TEST_OBJ_ID, 0, &obj_inst); in obj_init()
|
D | lwm2m_registry.c | 151 struct lwm2m_objlnk objl = {.obj_id = 1, .obj_inst = 2}; in ZTEST() 195 memcmp(&objl, &(struct lwm2m_objlnk){.obj_id = 1, .obj_inst = 2}, sizeof(objl)), 0); in ZTEST() 538 struct lwm2m_objlnk objl = {.obj_id = 10, .obj_inst = 20}; in ZTEST() 588 zassert_equal(memcmp(&objl, &(struct lwm2m_objlnk){.obj_id = 10, .obj_inst = 20}, in ZTEST()
|
/Zephyr-latest/tests/net/lib/lwm2m/content_link_format/src/ |
D | main.c | 53 struct lwm2m_engine_obj_inst *obj_inst = NULL; in test_obj_init() local 65 (void)lwm2m_create_obj_inst(TEST_OBJ_ID, TEST_OBJ_INST_ID, &obj_inst); in test_obj_init()
|