Lines Matching full:model
34 int (*const init)(struct bt_mesh_model *model, bool primary);
62 struct bt_mesh_model *model = &elem->models[j]; in bt_mesh_model_foreach() local
64 func(model, elem, false, i == 0, user_data); in bt_mesh_model_foreach()
68 struct bt_mesh_model *model = &elem->vnd_models[j]; in bt_mesh_model_foreach() local
70 func(model, elem, true, i == 0, user_data); in bt_mesh_model_foreach()
263 BT_ERR("Invalid vendor model index %u", mod_idx); in bt_mesh_model_get()
270 BT_ERR("Invalid SIG model index %u", mod_idx); in bt_mesh_model_get()
373 struct bt_mesh_model *model; in bt_mesh_elem_find_group() local
378 model = &elem->models[i]; in bt_mesh_elem_find_group()
380 match = bt_mesh_model_find_group(model, group_addr); in bt_mesh_elem_find_group()
382 return model; in bt_mesh_elem_find_group()
387 model = &elem->vnd_models[i]; in bt_mesh_elem_find_group()
389 match = bt_mesh_model_find_group(model, group_addr); in bt_mesh_elem_find_group()
391 return model; in bt_mesh_elem_find_group()
439 struct bt_mesh_model **model) in find_op() argument
446 *model = &models[i]; in find_op()
450 if (!bt_mesh_model_find_group(*model, dst)) { in find_op()
455 if (!model_has_key(*model, app_idx)) { in find_op()
459 for (op = (*model)->op; op->func; op++) { in find_op()
466 *model = NULL; in find_op()
524 struct bt_mesh_model *models, *model; in bt_mesh_model_recv() local
550 /* find_op() will do proper model/group matching */ in bt_mesh_model_recv()
558 * we only need to do the lookup in one of the model lists. in bt_mesh_model_recv()
569 opcode, &model); in bt_mesh_model_recv()
584 op->func(model, &rx->ctx, buf); in bt_mesh_model_recv()
614 static int model_send(struct bt_mesh_model *model, in model_send() argument
638 if (!implicit_bind && !model_has_key(model, tx->ctx->app_idx)) { in model_send()
639 BT_ERR("Model not bound to AppKey 0x%04x", tx->ctx->app_idx); in model_send()
646 int bt_mesh_model_send(struct bt_mesh_model *model, in bt_mesh_model_send() argument
654 .src = bt_mesh_model_elem(model)->addr, in bt_mesh_model_send()
659 return model_send(model, &tx, false, msg, cb, cb_data); in bt_mesh_model_send()
662 int bt_mesh_model_publish(struct bt_mesh_model *model) in bt_mesh_model_publish() argument
665 struct bt_mesh_model_pub *pub = model->pub; in bt_mesh_model_publish()
671 .src = bt_mesh_model_elem(model)->addr, in bt_mesh_model_publish()
721 err = model_send(model, &tx, true, sdu, &pub_sent_cb, model); in bt_mesh_model_publish()