#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] | conn | Connection Object that already has an associated RREQ context. |
| [in] | ranging_data_out | Simple buffer to store received ranging data. |
| [in] | data_received_cb | Callback called when complete ranging data is received. |
- Return values
-
| 0 | If the operation was successful. Otherwise, a negative error code is returned. |