Lines Matching refs:model
57 static int gen_onoff_set(const struct bt_mesh_model *model,
61 static int gen_onoff_set_unack(const struct bt_mesh_model *model,
65 static int gen_onoff_get(const struct bt_mesh_model *model,
69 static int gen_onoff_status(const struct bt_mesh_model *model,
284 static int gen_onoff_get(const struct bt_mesh_model *model, in gen_onoff_get() argument
289 struct led_onoff_state *onoff_state = model->rt->user_data; in gen_onoff_get()
292 bt_mesh_model_elem(model)->rt->addr, onoff_state->current); in gen_onoff_get()
296 if (bt_mesh_model_send(model, ctx, &msg, NULL, NULL)) { in gen_onoff_get()
303 static int gen_onoff_set_unack(const struct bt_mesh_model *model, in gen_onoff_set_unack() argument
307 struct net_buf_simple *msg = model->pub->msg; in gen_onoff_set_unack()
308 struct led_onoff_state *onoff_state = model->rt->user_data; in gen_onoff_set_unack()
313 bt_mesh_model_elem(model)->rt->addr, onoff_state->current); in gen_onoff_set_unack()
327 model->pub->addr != BT_MESH_ADDR_UNASSIGNED) { in gen_onoff_set_unack()
334 err = bt_mesh_model_publish(model); in gen_onoff_set_unack()
343 static int gen_onoff_set(const struct bt_mesh_model *model, in gen_onoff_set() argument
349 (void)gen_onoff_set_unack(model, ctx, buf); in gen_onoff_set()
350 (void)gen_onoff_get(model, ctx, buf); in gen_onoff_set()
355 static int gen_onoff_status(const struct bt_mesh_model *model, in gen_onoff_status() argument
364 bt_mesh_model_elem(model)->rt->addr, ctx->addr, state); in gen_onoff_status()