Lines Matching refs:cli

22 static struct bt_mesh_sar_cfg_cli *cli;  variable
30 if (!bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_SAR_CFG_TX_STATUS, in transmitter_status()
43 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in transmitter_status()
58 if (!bt_mesh_msg_ack_ctx_match(&cli->ack_ctx, OP_SAR_CFG_RX_STATUS, in receiver_status()
69 bt_mesh_msg_ack_ctx_rx(&cli->ack_ctx); in receiver_status()
82 return cli->timeout; in bt_mesh_sar_cfg_cli_timeout_get()
87 cli->timeout = timeout; in bt_mesh_sar_cfg_cli_timeout_set()
102 cli = model->rt->user_data; in bt_mesh_sar_cfg_cli_init()
103 cli->model = model; in bt_mesh_sar_cfg_cli_init()
104 cli->timeout = 2 * MSEC_PER_SEC; in bt_mesh_sar_cfg_cli_init()
109 bt_mesh_msg_ack_ctx_init(&cli->ack_ctx); in bt_mesh_sar_cfg_cli_init()
135 err = bt_mesh_msg_ack_ctx_prepare(&cli->ack_ctx, OP_SAR_CFG_TX_STATUS, addr, rsp); in bt_mesh_sar_cfg_cli_transmitter_get()
142 err = bt_mesh_model_send(cli->model, &ctx, &msg, NULL, NULL); in bt_mesh_sar_cfg_cli_transmitter_get()
145 bt_mesh_msg_ack_ctx_clear(&cli->ack_ctx); in bt_mesh_sar_cfg_cli_transmitter_get()
149 return bt_mesh_msg_ack_ctx_wait(&cli->ack_ctx, K_MSEC(cli->timeout)); in bt_mesh_sar_cfg_cli_transmitter_get()
160 err = bt_mesh_msg_ack_ctx_prepare(&cli->ack_ctx, OP_SAR_CFG_TX_STATUS, addr, rsp); in bt_mesh_sar_cfg_cli_transmitter_set()
168 err = bt_mesh_model_send(cli->model, &ctx, &msg, NULL, NULL); in bt_mesh_sar_cfg_cli_transmitter_set()
171 bt_mesh_msg_ack_ctx_clear(&cli->ack_ctx); in bt_mesh_sar_cfg_cli_transmitter_set()
175 return bt_mesh_msg_ack_ctx_wait(&cli->ack_ctx, K_MSEC(cli->timeout)); in bt_mesh_sar_cfg_cli_transmitter_set()
185 err = bt_mesh_msg_ack_ctx_prepare(&cli->ack_ctx, OP_SAR_CFG_RX_STATUS, addr, rsp); in bt_mesh_sar_cfg_cli_receiver_get()
192 err = bt_mesh_model_send(cli->model, &ctx, &msg, NULL, NULL); in bt_mesh_sar_cfg_cli_receiver_get()
195 bt_mesh_msg_ack_ctx_clear(&cli->ack_ctx); in bt_mesh_sar_cfg_cli_receiver_get()
199 return bt_mesh_msg_ack_ctx_wait(&cli->ack_ctx, K_MSEC(cli->timeout)); in bt_mesh_sar_cfg_cli_receiver_get()
210 err = bt_mesh_msg_ack_ctx_prepare(&cli->ack_ctx, OP_SAR_CFG_RX_STATUS, addr, rsp); in bt_mesh_sar_cfg_cli_receiver_set()
218 err = bt_mesh_model_send(cli->model, &ctx, &msg, NULL, NULL); in bt_mesh_sar_cfg_cli_receiver_set()
221 bt_mesh_msg_ack_ctx_clear(&cli->ack_ctx); in bt_mesh_sar_cfg_cli_receiver_set()
225 return bt_mesh_msg_ack_ctx_wait(&cli->ack_ctx, K_MSEC(cli->timeout)); in bt_mesh_sar_cfg_cli_receiver_set()