Lines Matching refs:recv_state
177 if (listener->recv_state) { in bap_broadcast_assistant_recv_state_changed()
178 listener->recv_state(conn, err, state); in bap_broadcast_assistant_recv_state_changed()
225 struct bt_bap_scan_delegator_recv_state *recv_state) in parse_recv_state() argument
230 __ASSERT(recv_state, "NULL receive state"); in parse_recv_state()
245 (void)memset(recv_state, 0, sizeof(*recv_state)); in parse_recv_state()
247 recv_state->src_id = net_buf_simple_pull_u8(&buf); in parse_recv_state()
248 recv_state->addr.type = net_buf_simple_pull_u8(&buf); in parse_recv_state()
250 bt_addr_copy(&recv_state->addr.a, addr); in parse_recv_state()
251 recv_state->adv_sid = net_buf_simple_pull_u8(&buf); in parse_recv_state()
252 recv_state->broadcast_id = net_buf_simple_pull_le24(&buf); in parse_recv_state()
253 recv_state->pa_sync_state = net_buf_simple_pull_u8(&buf); in parse_recv_state()
254 recv_state->encrypt_state = net_buf_simple_pull_u8(&buf); in parse_recv_state()
255 if (recv_state->encrypt_state == BT_BAP_BIG_ENC_STATE_BAD_CODE) { in parse_recv_state()
257 const size_t minimum_size = sizeof(recv_state->bad_code) + in parse_recv_state()
258 sizeof(recv_state->num_subgroups); in parse_recv_state()
267 (void)memcpy(recv_state->bad_code, broadcast_code, in parse_recv_state()
268 sizeof(recv_state->bad_code)); in parse_recv_state()
271 recv_state->num_subgroups = net_buf_simple_pull_u8(&buf); in parse_recv_state()
272 if (recv_state->num_subgroups > CONFIG_BT_BAP_BASS_MAX_SUBGROUPS) { in parse_recv_state()
273 LOG_DBG("Cannot parse %u subgroups (max %d)", recv_state->num_subgroups, in parse_recv_state()
279 for (int i = 0; i < recv_state->num_subgroups; i++) { in parse_recv_state()
280 struct bt_bap_bass_subgroup *subgroup = &recv_state->subgroups[i]; in parse_recv_state()
335 struct bt_bap_scan_delegator_recv_state *recv_state) in parse_and_send_recv_state() argument
345 err = parse_recv_state(data, length, recv_state); in parse_and_send_recv_state()
359 inst->recv_states[index].src_id = recv_state->src_id; in parse_and_send_recv_state()
360 inst->recv_states[index].past_avail = past_available(conn, &recv_state->addr, in parse_and_send_recv_state()
361 recv_state->adv_sid); in parse_and_send_recv_state()
363 bap_broadcast_assistant_recv_state_changed(conn, 0, recv_state); in parse_and_send_recv_state()
372 struct bt_bap_scan_delegator_recv_state recv_state; in broadcast_assistant_bap_ntf_read_func() local
415 parse_and_send_recv_state(conn, handle, att_buf.data, data_length, &recv_state); in broadcast_assistant_bap_ntf_read_func()
480 struct bt_bap_scan_delegator_recv_state recv_state; in notify_handler() local
537 return parse_and_send_recv_state(conn, handle, data, length, &recv_state); in notify_handler()
560 struct bt_bap_scan_delegator_recv_state recv_state; in read_recv_state_cb() local
577 cb_err = parse_recv_state(data, length, &recv_state); in read_recv_state_cb()
585 stored_state->src_id = recv_state.src_id; in read_recv_state_cb()
586 stored_state->adv_sid = recv_state.adv_sid; in read_recv_state_cb()
587 stored_state->broadcast_id = recv_state.broadcast_id; in read_recv_state_cb()
588 bt_addr_le_copy(&stored_state->addr, &recv_state.addr); in read_recv_state_cb()
590 past_available(conn, &recv_state.addr, in read_recv_state_cb()
591 recv_state.adv_sid); in read_recv_state_cb()
614 &recv_state : NULL); in read_recv_state_cb()