Lines Matching refs:models

134             mesh_model = ble_mesh_dev.init.comp->elem[model->elem_idx].models;  in mesh_op_cb()
281 …struct bt_mesh_model *models = (struct bt_mesh_model *) malloc(sizeof(struct bt_mesh_model) * elem… in ble_stack_mesh_init() local
283 if (models == NULL) { in ble_stack_mesh_init()
287 memset(models, 0, sizeof(struct bt_mesh_model) * elems->model_count); in ble_stack_mesh_init()
288 elems->models = models; in ble_stack_mesh_init()
290 for (j = 0; j < elems->model_count; j++, models++) { in ble_stack_mesh_init()
291 memset(models->keys, 0xFF, sizeof(models->keys)); in ble_stack_mesh_init()
293 if (param->comp->elem[i].models[j].id == MESH_MODEL_ID_CFG_SRV) { in ble_stack_mesh_init()
294 mesh_cfg_srv_t *cfg_srv = param->comp->elem[i].models[j].user_data; in ble_stack_mesh_init()
303 models->id = BT_MESH_MODEL_ID_CFG_SRV; in ble_stack_mesh_init()
304 models->op = bt_mesh_cfg_srv_op; in ble_stack_mesh_init()
305 models->pub = NULL; in ble_stack_mesh_init()
306 models->user_data = &bt_cfg_srv; in ble_stack_mesh_init()
307 } else if (param->comp->elem[i].models[j].id == MESH_MODEL_ID_CFG_CLI) { in ble_stack_mesh_init()
309 models->id = BT_MESH_MODEL_ID_CFG_CLI; in ble_stack_mesh_init()
310 models->op = bt_mesh_cfg_cli_op; in ble_stack_mesh_init()
311 models->pub = NULL; in ble_stack_mesh_init()
312 models->user_data = &bt_cfg_cli; in ble_stack_mesh_init()
313 } else if (param->comp->elem[i].models[j].id == MESH_MODEL_ID_HEALTH_SRV) { in ble_stack_mesh_init()
328 … uint8_t *msg_data = (uint8_t *)malloc(param->comp->elem[i].models[j].pub_mesh_len + 1 + 3); in ble_stack_mesh_init()
338 srv_data->msg.size = param->comp->elem[i].models[j].pub_mesh_len + 1 + 3; in ble_stack_mesh_init()
343 models->id = BT_MESH_MODEL_ID_HEALTH_SRV; in ble_stack_mesh_init()
344 models->op = bt_mesh_health_srv_op; in ble_stack_mesh_init()
345 models->pub = &srv_data->bt_pub; in ble_stack_mesh_init()
346 models->user_data = &srv_data->srv; in ble_stack_mesh_init()
347 } else if (param->comp->elem[i].models[j].id == MESH_MODEL_ID_HEALTH_CLI) { in ble_stack_mesh_init()
355 models->id = BT_MESH_MODEL_ID_HEALTH_CLI; in ble_stack_mesh_init()
356 models->op = bt_mesh_health_cli_op; in ble_stack_mesh_init()
357 models->pub = NULL; in ble_stack_mesh_init()
358 models->user_data = bt_health_cli; in ble_stack_mesh_init()
360 …del_op *op = malloc(sizeof(struct bt_mesh_model_op) * (param->comp->elem[i].models[j].op_num + 1)); in ble_stack_mesh_init()
366 … memset(op, 0, sizeof(struct bt_mesh_model_op) * param->comp->elem[i].models[j].op_num); in ble_stack_mesh_init()
369 for (k = 0; k < param->comp->elem[i].models[j].op_num; k++) { in ble_stack_mesh_init()
370 op[k].opcode = param->comp->elem[i].models[j].op_list[k].op; in ble_stack_mesh_init()
389 … uint8_t *msg_data = (uint8_t *)malloc(param->comp->elem[i].models[j].pub_mesh_len + 1 + 3); in ble_stack_mesh_init()
397 pub_data->msg.size = param->comp->elem[i].models[j].pub_mesh_len + 1 + 3; in ble_stack_mesh_init()
402 models->id = param->comp->elem[i].models[j].id; in ble_stack_mesh_init()
403 models->op = op; in ble_stack_mesh_init()
404 models->pub = &pub_data->bt_pub; in ble_stack_mesh_init()
405 models->user_data = &param->comp->elem[i].models[j]; in ble_stack_mesh_init()
411 …struct bt_mesh_model *models = (struct bt_mesh_model *) malloc(sizeof(struct bt_mesh_model) * elem… in ble_stack_mesh_init() local
413 if (models == NULL) { in ble_stack_mesh_init()
417 memset(models, 0, sizeof(struct bt_mesh_model) * elems->vnd_model_count); in ble_stack_mesh_init()
418 elems->vnd_models = models; in ble_stack_mesh_init()
420 for (j = 0; j < elems->vnd_model_count; j++, models++) { in ble_stack_mesh_init()
421 memset(models->keys, 0xFF, sizeof(models->keys)); in ble_stack_mesh_init()
469 models->id = param->comp->elem[i].vnd_models[j].id; in ble_stack_mesh_init()
470 models->op = op; in ble_stack_mesh_init()
471 models->pub = &pub_data->bt_pub; in ble_stack_mesh_init()
472 models->user_data = &param->comp->elem[i].vnd_models[j]; in ble_stack_mesh_init()
545 model = &ble_mesh_dev.comp->elem[elem_id].models[mod_id]; in ble_stack_mesh_send()
582 model = &ble_mesh_dev.comp->elem[elem_id].models[mod_id]; in ble_stack_mesh_pub()