Home
last modified time | relevance | path

Searched refs:obj_inst (Results 1 – 25 of 30) sorted by relevance

12

/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_registry.c168 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 …]
Dlwm2m_rw_opaque.c138 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()
Dlwm2m_registry.h21 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,
Dlwm2m_message_handling.c834 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 …]
Dlwm2m_rw_cbor.c231 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()
Dlwm2m_rw_plain_text.c176 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()
Dlwm2m_obj_access_control.c170 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()
Dlwm2m_obj_event_log.c83 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()
Dlwm2m_obj_location.c94 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()
Dlwm2m_rw_link_format.c243 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()
Dlwm2m_engine.c270 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()
Dlwm2m_observation.c223 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 …]
Dlwm2m_rw_oma_tlv.c568 ((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()
Dlwm2m_obj_connmon.c201 struct lwm2m_engine_obj_inst *obj_inst = NULL; in lwm2m_connmon_init() local
217 0, &obj_inst); in lwm2m_connmon_init()
Dlwm2m_rw_senml_cbor.c511 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()
Dlwm2m_message_handling.h72 int lwm2m_write_handler(struct lwm2m_engine_obj_inst *obj_inst, struct lwm2m_engine_res *res,
Dlwm2m_rw_json.c243 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()
Dlwm2m_engine.h104 struct lwm2m_engine_obj_inst *obj_inst,
Dlwm2m_obj_security.c242 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()
Dlwm2m_obj_device.c352 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()
Dlwm2m_obj_firmware.c475 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/
Dmain.c283 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/
Dtest_obj.c93 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()
Dlwm2m_registry.c151 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/
Dmain.c53 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()

12