nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ bt_ras_rreq_realtime_rd_subscribe()

int bt_ras_rreq_realtime_rd_subscribe ( struct bt_conn * conn,
struct net_buf_simple * ranging_data_out,
bt_ras_rreq_ranging_data_received_t data_received_cb )

#include <include/bluetooth/services/ras.h>

Subscribe to real-time ranging data notifications.

Note
Calling from BT RX thread may return an error as bt_gatt_subscribe will not block if there are no available TX buffers.
The ranging_data_out buffer is automatically reset after the data_received_cb callback.
On-Demand and Real-time ranging data are not compatible and attempting to subscribe to both at the same time will be rejected by the RAS server.
The data callback will be called many times (for as long as the RRSP continues to send notifications).
Parameters
[in]connConnection Object that already has an associated RREQ context.
[in]ranging_data_outSimple buffer to store received ranging data.
[in]data_received_cbCallback called when complete ranging data is received.
Return values
0If the operation was successful. Otherwise, a negative error code is returned.