Lines Matching refs:cli
43 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_fault_status() local
54 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, in health_fault_status()
80 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in health_fault_status()
84 if (cli->fault_status) { in health_fault_status()
85 cli->fault_status(cli, ctx->addr, test_id, cid, in health_fault_status()
96 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_current_status() local
108 if (cli->current_status) { in health_current_status()
109 cli->current_status(cli, ctx->addr, test_id, cid, in health_current_status()
124 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_period_status() local
133 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, in health_period_status()
140 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in health_period_status()
143 if (cli->period_status) { in health_period_status()
144 cli->period_status(cli, ctx->addr, divisor); in health_period_status()
158 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_attention_status() local
167 if (bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_ATTENTION_STATUS, in health_attention_status()
173 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in health_attention_status()
176 if (cli->attention_status) { in health_attention_status()
177 cli->attention_status(cli, ctx->addr, attention); in health_attention_status()
190 int bt_mesh_health_cli_attention_get(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, in bt_mesh_health_cli_attention_get() argument
201 .ack = &cli->ack_ctx, in bt_mesh_health_cli_attention_get()
207 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, attention ? &rsp : NULL); in bt_mesh_health_cli_attention_get()
210 int bt_mesh_health_cli_attention_set(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, in bt_mesh_health_cli_attention_set() argument
222 .ack = &cli->ack_ctx, in bt_mesh_health_cli_attention_set()
228 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, updated_attention ? &rsp : NULL); in bt_mesh_health_cli_attention_set()
231 int bt_mesh_health_cli_attention_set_unack(struct bt_mesh_health_cli *cli, in bt_mesh_health_cli_attention_set_unack() argument
239 return bt_mesh_msg_send(cli->model, ctx, &msg); in bt_mesh_health_cli_attention_set_unack()
242 int bt_mesh_health_cli_period_get(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, in bt_mesh_health_cli_period_get() argument
253 .ack = &cli->ack_ctx, in bt_mesh_health_cli_period_get()
259 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, divisor ? &rsp : NULL); in bt_mesh_health_cli_period_get()
262 int bt_mesh_health_cli_period_set(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, in bt_mesh_health_cli_period_set() argument
274 .ack = &cli->ack_ctx, in bt_mesh_health_cli_period_set()
280 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, updated_divisor ? &rsp : NULL); in bt_mesh_health_cli_period_set()
283 int bt_mesh_health_cli_period_set_unack(struct bt_mesh_health_cli *cli, in bt_mesh_health_cli_period_set_unack() argument
291 return bt_mesh_msg_send(cli->model, ctx, &msg); in bt_mesh_health_cli_period_set_unack()
294 int bt_mesh_health_cli_fault_test(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, in bt_mesh_health_cli_fault_test() argument
311 .ack = &cli->ack_ctx, in bt_mesh_health_cli_fault_test()
317 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, &rsp); in bt_mesh_health_cli_fault_test()
320 int bt_mesh_health_cli_fault_test_unack(struct bt_mesh_health_cli *cli, in bt_mesh_health_cli_fault_test_unack() argument
329 return bt_mesh_msg_send(cli->model, ctx, &msg); in bt_mesh_health_cli_fault_test_unack()
332 int bt_mesh_health_cli_fault_clear(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, in bt_mesh_health_cli_fault_clear() argument
348 .ack = &cli->ack_ctx, in bt_mesh_health_cli_fault_clear()
354 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, in bt_mesh_health_cli_fault_clear()
358 int bt_mesh_health_cli_fault_clear_unack(struct bt_mesh_health_cli *cli, in bt_mesh_health_cli_fault_clear_unack() argument
366 return bt_mesh_msg_send(cli->model, ctx, &msg); in bt_mesh_health_cli_fault_clear_unack()
369 int bt_mesh_health_cli_fault_get(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, in bt_mesh_health_cli_fault_get() argument
385 .ack = &cli->ack_ctx, in bt_mesh_health_cli_fault_get()
391 return bt_mesh_msg_ackd_send(cli->model, ctx, &msg, in bt_mesh_health_cli_fault_get()
407 struct bt_mesh_health_cli *cli = model->rt->user_data; in update_callback() local
409 if (cli->update) { in update_callback()
410 return cli->update(cli, &cli->pub_buf); in update_callback()
418 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_cli_init() local
422 if (!cli) { in health_cli_init()
427 cli->model = model; in health_cli_init()
430 cli->pub.msg = &cli->pub_buf; in health_cli_init()
431 cli->pub.update = update_callback; in health_cli_init()
432 net_buf_simple_init_with_data(&cli->pub_buf, cli->pub_data, sizeof(cli->pub_data)); in health_cli_init()
434 bt_mesh_msg_ack_ctx_init(&cli->ack_ctx); in health_cli_init()
440 struct bt_mesh_health_cli *cli = model->rt->user_data; in health_cli_reset() local
442 net_buf_simple_reset(cli->pub.msg); in health_cli_reset()