Lines Matching full:model
103 static void health_fault_get(struct bt_mesh_model *model, in health_fault_get() argument
114 health_get_registered(model, company_id, sdu); in health_fault_get()
116 if (bt_mesh_model_send(model, ctx, sdu, NULL, NULL)) { in health_fault_get()
123 static void health_fault_clear_unrel(struct bt_mesh_model *model, in health_fault_clear_unrel() argument
127 struct bt_mesh_health_srv *srv = model->user_data; in health_fault_clear_unrel()
135 srv->cb->fault_clear(model, company_id); in health_fault_clear_unrel()
139 static void health_fault_clear(struct bt_mesh_model *model, in health_fault_clear() argument
144 struct bt_mesh_health_srv *srv = model->user_data; in health_fault_clear()
152 srv->cb->fault_clear(model, company_id); in health_fault_clear()
155 health_get_registered(model, company_id, sdu); in health_fault_clear()
157 if (bt_mesh_model_send(model, ctx, sdu, NULL, NULL)) { in health_fault_clear()
164 static void health_fault_test_unrel(struct bt_mesh_model *model, in health_fault_test_unrel() argument
168 struct bt_mesh_health_srv *srv = model->user_data; in health_fault_test_unrel()
178 srv->cb->fault_test(model, test_id, company_id); in health_fault_test_unrel()
182 static void health_fault_test(struct bt_mesh_model *model, in health_fault_test() argument
187 struct bt_mesh_health_srv *srv = model->user_data; in health_fault_test()
201 err = srv->cb->fault_test(model, test_id, company_id); in health_fault_test()
208 health_get_registered(model, company_id, sdu); in health_fault_test()
210 if (bt_mesh_model_send(model, ctx, sdu, NULL, NULL)) { in health_fault_test()
218 static void send_attention_status(struct bt_mesh_model *model, in send_attention_status() argument
223 struct bt_mesh_health_srv *srv = model->user_data; in send_attention_status()
233 if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) { in send_attention_status()
240 static void attention_get(struct bt_mesh_model *model, in attention_get() argument
246 send_attention_status(model, ctx); in attention_get()
249 static void attention_set_unrel(struct bt_mesh_model *model, in attention_set_unrel() argument
259 bt_mesh_attention(model, time); in attention_set_unrel()
262 static void attention_set(struct bt_mesh_model *model, in attention_set() argument
268 attention_set_unrel(model, ctx, buf); in attention_set()
270 send_attention_status(model, ctx); in attention_set()
273 static void send_health_period_status(struct bt_mesh_model *model, in send_health_period_status() argument
281 net_buf_simple_add_u8(msg, model->pub->period_div); in send_health_period_status()
283 if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) { in send_health_period_status()
290 static void health_period_get(struct bt_mesh_model *model, in health_period_get() argument
296 send_health_period_status(model, ctx); in health_period_get()
299 static void health_period_set_unrel(struct bt_mesh_model *model, in health_period_set_unrel() argument
313 model->pub->period_div = period; in health_period_set_unrel()
316 static void health_period_set(struct bt_mesh_model *model, in health_period_set() argument
322 health_period_set_unrel(model, ctx, buf); in health_period_set()
324 send_health_period_status(model, ctx); in health_period_set()
375 srv->cb->attn_off(srv->model); in attention_off()
379 int bt_mesh_health_srv_init(struct bt_mesh_model *model, bool primary) in bt_mesh_health_srv_init() argument
381 struct bt_mesh_health_srv *srv = model->user_data; in bt_mesh_health_srv_init()
392 if (!model->pub) { in bt_mesh_health_srv_init()
397 model->pub->update = health_pub_update, in bt_mesh_health_srv_init()
402 srv->model = model; in bt_mesh_health_srv_init()
411 void bt_mesh_attention(struct bt_mesh_model *model, u8_t time) in bt_mesh_attention() argument
416 if (!model) { in bt_mesh_attention()
423 model = srv->model; in bt_mesh_attention()
425 srv = model->user_data; in bt_mesh_attention()
430 srv->cb->attn_on(model); in bt_mesh_attention()
438 srv->cb->attn_off(model); in bt_mesh_attention()