Lines Matching refs:index

327 	int index, i = 0, j = 0;  in server_create()  local
330 for (index = 0; index < MAX_INSTANCE_COUNT; index++) { in server_create()
331 if (inst[index].obj && inst[index].obj_inst_id == obj_inst_id) { in server_create()
338 for (index = 0; index < MAX_INSTANCE_COUNT; index++) { in server_create()
339 if (!inst[index].obj) { in server_create()
344 if (index >= MAX_INSTANCE_COUNT) { in server_create()
351 disabled_until[index] = sys_timepoint_calc(K_NO_WAIT); in server_create()
352 server_flag_store_notify[index] = 0U; in server_create()
353 server_id[index] = index + 1; in server_create()
354 lifetime[index] = CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME; in server_create()
355 default_min_period[index] = CONFIG_LWM2M_SERVER_DEFAULT_PMIN; in server_create()
356 default_max_period[index] = CONFIG_LWM2M_SERVER_DEFAULT_PMAX; in server_create()
357 disabled_timeout[index] = 86400U; in server_create()
358 boostrap_on_fail[index] = true; in server_create()
360 lwm2m_engine_get_binding(transport_binding[index]); in server_create()
362 (void)memset(res[index], 0, in server_create()
363 sizeof(res[index][0]) * ARRAY_SIZE(res[index])); in server_create()
364 init_res_instance(res_inst[index], ARRAY_SIZE(res_inst[index])); in server_create()
367 INIT_OBJ_RES_DATA(SERVER_SHORT_SERVER_ID, res[index], i, in server_create()
368 res_inst[index], j, in server_create()
369 &server_id[index], sizeof(*server_id)); in server_create()
370 INIT_OBJ_RES(SERVER_LIFETIME_ID, res[index], i, res_inst[index], j, in server_create()
371 1U, false, true, &lifetime[index], sizeof(*lifetime), in server_create()
373 INIT_OBJ_RES_DATA(SERVER_DEFAULT_MIN_PERIOD_ID, res[index], i, in server_create()
374 res_inst[index], j, in server_create()
375 &default_min_period[index], in server_create()
377 INIT_OBJ_RES_DATA(SERVER_DEFAULT_MAX_PERIOD_ID, res[index], i, in server_create()
378 res_inst[index], j, in server_create()
379 &default_max_period[index], in server_create()
381 INIT_OBJ_RES_EXECUTE(SERVER_DISABLE_ID, res[index], i, disable_cb); in server_create()
382 INIT_OBJ_RES_DATA(SERVER_DISABLE_TIMEOUT_ID, res[index], i, in server_create()
383 res_inst[index], j, in server_create()
384 &disabled_timeout[index], in server_create()
386 INIT_OBJ_RES_DATA(SERVER_STORE_NOTIFY_ID, res[index], i, in server_create()
387 res_inst[index], j, in server_create()
388 &server_flag_store_notify[index], in server_create()
391 INIT_OBJ_RES_DATA_LEN(SERVER_TRANSPORT_BINDING_ID, res[index], i, res_inst[index], j, in server_create()
392 transport_binding[index], TRANSPORT_BINDING_LEN, in server_create()
393 strlen(transport_binding[index]) + 1); in server_create()
394 INIT_OBJ_RES_EXECUTE(SERVER_REG_UPDATE_TRIGGER_ID, res[index], i, update_trigger_cb); in server_create()
397 mute_send[index] = false; in server_create()
398 priority[index] = 0; in server_create()
399 INIT_OBJ_RES_EXECUTE(SERVER_BOOTSTRAP_UPDATE_TRIGGER_ID, res[index], i, in server_create()
401 INIT_OBJ_RES_OPTDATA(SERVER_APN_LINK_ID, res[index], i, res_inst[index], j); in server_create()
402 INIT_OBJ_RES_OPTDATA(SERVER_TLS_DTLS_ALERT_CODE_ID, res[index], i, res_inst[index], in server_create()
404 INIT_OBJ_RES_OPTDATA(SERVER_LAST_BOOTSTRAPPED_ID, res[index], i, res_inst[index], in server_create()
406 INIT_OBJ_RES_DATA(SERVER_REGISTRATION_PRIORITY_ORDER_ID, res[index], i, in server_create()
407 res_inst[index], j, &priority[index], sizeof(uint8_t)); in server_create()
408 INIT_OBJ_RES_OPTDATA(SERVER_INITIAL_REGISTRATION_DELAY_TIMER_ID, res[index], i, in server_create()
409 res_inst[index], j); in server_create()
410 INIT_OBJ_RES_OPTDATA(SERVER_REGISTRATION_FAILURE_BLOCK_ID, res[index], i, in server_create()
411 res_inst[index], j); in server_create()
412 INIT_OBJ_RES_DATA(SERVER_BOOTSTRAP_ON_REGISTRATION_FAILURE_ID, res[index], i, in server_create()
413 res_inst[index], j, &boostrap_on_fail[index], sizeof(bool)); in server_create()
414 INIT_OBJ_RES_OPTDATA(SERVER_COMMUNICATION_RETRY_COUNT_ID, res[index], i, in server_create()
415 res_inst[index], j); in server_create()
416 INIT_OBJ_RES_OPTDATA(SERVER_COMMUNICATION_RETRY_TIMER_ID, res[index], i, in server_create()
417 res_inst[index], j); in server_create()
418 INIT_OBJ_RES_OPTDATA(SERVER_COMMUNICATION_SEQUENCE_DELAY_TIMER_ID, res[index], i, in server_create()
419 res_inst[index], j); in server_create()
420 INIT_OBJ_RES_OPTDATA(SERVER_COMMUNICATION_SEQUENCE_RETRY_TIMER_ID, res[index], i, in server_create()
421 res_inst[index], j); in server_create()
422 INIT_OBJ_RES_OPTDATA(SERVER_SMS_TRIGGER_ID, res[index], i, res_inst[index], j); in server_create()
423 INIT_OBJ_RES_OPTDATA(SERVER_PREFERRED_TRANSPORT_ID, res[index], i, res_inst[index], in server_create()
425 INIT_OBJ_RES_DATA(SERVER_MUTE_SEND_ID, res[index], i, res_inst[index], j, in server_create()
426 &mute_send[index], sizeof(bool)); in server_create()
429 inst[index].resources = res[index]; in server_create()
430 inst[index].resource_count = i; in server_create()
432 return &inst[index]; in server_create()