Lines Matching refs:model
38 static int model1_init(const struct bt_mesh_model *model);
39 static int model2_init(const struct bt_mesh_model *model);
40 static int model3_init(const struct bt_mesh_model *model);
41 static int model4_init(const struct bt_mesh_model *model);
42 static int model5_init(const struct bt_mesh_model *model);
43 static int test_msg_handler(const struct bt_mesh_model *model,
46 static int test_msg_ne_handler(const struct bt_mesh_model *model,
103 static int model1_update(const struct bt_mesh_model *model) in model1_update() argument
109 model->pub->msg->data[1]++; in model1_update()
110 LOG_DBG("New pub: n: %d t: %d", model->pub->msg->data[1], k_uptime_get_32()); in model1_update()
116 static int test_msgf_handler(const struct bt_mesh_model *model, in test_msgf_handler() argument
254 static int model1_init(const struct bt_mesh_model *model) in model1_init() argument
259 static int model2_init(const struct bt_mesh_model *model) in model2_init() argument
264 static int model3_init(const struct bt_mesh_model *model) in model3_init() argument
266 ASSERT_OK(bt_mesh_model_extend(model, model - 2)); in model3_init()
267 ASSERT_OK(bt_mesh_model_extend(model, model - 1)); in model3_init()
269 if (model->rt->elem_idx == 1) { in model3_init()
270 ASSERT_OK(bt_mesh_model_extend(model, &models[4])); in model3_init()
276 static int model4_init(const struct bt_mesh_model *model) in model4_init() argument
278 ASSERT_OK(bt_mesh_model_extend(model, model - 1)); in model4_init()
283 static int model5_init(const struct bt_mesh_model *model) in model5_init() argument
285 ASSERT_OK(bt_mesh_model_extend(model, model - 4)); in model5_init()
290 static int test_msg_handler(const struct bt_mesh_model *model, in test_msg_handler() argument
294 LOG_DBG("msg rx model id: %u", model->id); in test_msg_handler()
295 k_poll_signal_raise(&model_pub_signal, model->id); in test_msg_handler()
300 static int test_msg_ne_handler(const struct bt_mesh_model *model, in test_msg_ne_handler() argument
304 FAIL("Model %#4x on neighbor element received msg", model->id); in test_msg_ne_handler()
523 const struct bt_mesh_model *model = &models[2]; in msgf_publish() local
525 bt_mesh_model_msg_init(model->pub->msg, TEST_MESSAGE_OP_F); in msgf_publish()
526 net_buf_simple_add_u8(model->pub->msg, 1); in msgf_publish()
527 bt_mesh_model_publish(model); in msgf_publish()
685 const struct bt_mesh_model *model = &models[2]; in tx_period() local
694 model->pub->delayable = delayable; in tx_period()
699 model->pub->fast_period = test_period[i].div > 0; in tx_period()
700 model->pub->period_div = test_period[i].div; in tx_period()
771 const struct bt_mesh_model *model = &models[2]; in tx_transmit() local
795 model->pub->retr_update = true; in tx_transmit()
796 model->pub->delayable = delayable; in tx_transmit()
872 const struct bt_mesh_model *model = &models[2]; in test_tx_cancel() local
882 model->pub->retr_update = true; in test_tx_cancel()