CS Reflector#
Channel Sounding (CS) Reflector role implementation for all BLE Channel Sounding apps.
Modules#
Functions#
Macros#
Function Documentation#
SL_ENUM#
SL_ENUM (cs_sync_antenna_t )
Type | Direction | Argument Name | Description |
---|---|---|---|
cs_sync_antenna_t | N/A |
45
of file common/cs_reflector/config/cs_reflector_config.h
typedef#
typedef (struct { int8_t max_tx_power_dbm;uint8_t cs_sync_antenna;} )
Type | Direction | Argument Name | Description |
---|---|---|---|
struct { int8_t max_tx_power_dbm;uint8_t cs_sync_antenna;} | N/A |
44
of file common/cs_reflector/cs_reflector.h
cs_reflector_identify#
bool cs_reflector_identify (uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | conn_handle | the connection handle to identify |
Determine whether a connection handle has a reflector associated to it
Returns
true
if the handle has an associated reflector instance,false
otherwise
57
of file common/cs_reflector/cs_reflector.h
cs_reflector_create#
sl_status_t cs_reflector_create (uint8_t conn_handle, cs_reflector_config_t * reflector_config)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | conn_handle | the connection handle for which to create the reflector |
cs_reflector_config_t * | [in] | reflector_config | reflector configuration parameters |
Create a reflector for the given connection handle
Returns
status of the operation
67
of file common/cs_reflector/cs_reflector.h
cs_reflector_get_active_instance_count#
uint8_t cs_reflector_get_active_instance_count (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Get the number of active reflector instances
Returns
the number of active reflector instances
75
of file common/cs_reflector/cs_reflector.h
cs_reflector_delete#
sl_status_t cs_reflector_delete (uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | conn_handle | the connection handle for which to delete the reflector |
Delete the reflector associated with the given connection handle
Returns
status of the operation
84
of file common/cs_reflector/cs_reflector.h
cs_reflector_on_bt_event#
bool cs_reflector_on_bt_event (sl_bt_msg_t * evt)
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_bt_msg_t * | [in] | evt | the Bluetooth stack event to handle |
Handle a Bluetooth stack event
Returns
true to forward the message to the host in NCP case
93
of file common/cs_reflector/cs_reflector.h
cs_rcm_get_connection_ctx#
connection_ctx_t * cs_rcm_get_connection_ctx (const uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint8_t | [in] | conn_handle | the connection handle to search for |
Find the pointer to a connection context which belongs to the provided connection handle.
Returns
the pointer of the context corresponding to the provided connection handle, NULL if not found
63
of file common/cs_reflector/cs_reflector_connmanager.h
cs_rcm_add_new_initiator_connection#
sl_status_t cs_rcm_add_new_initiator_connection (const uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint8_t | [in] | conn_handle | the connection handle to register |
Register a new initiator connection with the provided handle.
Returns
status of the operation
72
of file common/cs_reflector/cs_reflector_connmanager.h
cs_rcm_remove_initiator_connection#
void cs_rcm_remove_initiator_connection (const uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint8_t | [in] | conn_handle | the connection handle to remove |
Remove an initiator connection with the provided handle.
79
of file common/cs_reflector/cs_reflector_connmanager.h
cs_rcm_can_accept_new_connection#
bool cs_rcm_can_accept_new_connection (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Tell whether an additional connection can be accepted.
Returns
true if an additional connection can be accepted, false otherwise
86
of file common/cs_reflector/cs_reflector_connmanager.h
cs_rcm_get_number_of_connections#
uint8_t cs_rcm_get_number_of_connections (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Show the number of active connections.
Returns
the number of active connections
93
of file common/cs_reflector/cs_reflector_connmanager.h
cs_reflector_event_buf_clear#
void cs_reflector_event_buf_clear (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Clear all data from the CS event buffer.
60
of file common/cs_reflector/cs_reflector_event_buf.h
cs_reflector_event_buf_get_free_space#
uint32_t cs_reflector_event_buf_get_free_space (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Tell the number of free slots available in the CS event buffer.
Returns
the number of free slots available in the CS event buffer
67
of file common/cs_reflector/cs_reflector_event_buf.h
cs_reflector_event_buf_purge_data#
void cs_reflector_event_buf_purge_data (const uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint8_t | [in] | conn_handle | the connection handle to erase all data for |
Purge any data from the CS event buffer associated with a connection. Useful when an initiator disconnects and we don't want any leftover measurement data in the buffer.
76
of file common/cs_reflector/cs_reflector_event_buf.h
cs_reflector_event_buf_get_element_for_write#
cs_event_data_t * cs_reflector_event_buf_get_element_for_write (void )
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
Find a pointer to a buffer element which is free to write, yields NULL if no writable elements are available.
Returns
pointer to a free buffer element, NULL if none available
84
of file common/cs_reflector/cs_reflector_event_buf.h
cs_reflector_event_buf_get_next_element#
cs_event_data_t * cs_reflector_event_buf_get_next_element (const uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint8_t | [in] | conn_handle | the connection handle for which the data is requested |
Provide a pointer to the next available data for a given connection, yields NULL if no next data is available.
Returns
pointer to the next available data, NULL if none available
94
of file common/cs_reflector/cs_reflector_event_buf.h
cs_reflector_event_buf_find#
cs_event_data_t * cs_reflector_event_buf_find (const uint8_t conn_handle, const uint16_t procedure_index, const uint16_t subevent_index)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint8_t | [in] | conn_handle | the connection handle for which the data is requested |
const uint16_t | [in] | procedure_index | procedure index of requested the result |
const uint16_t | [in] | subevent_index | subevent index of requested the result |
Find and return an exact result from the CS event buffer.
Returns
pointer to the result if available, NULL if not found
105
of file common/cs_reflector/cs_reflector_event_buf.h
cs_reflector_event_buf_get_next_unindicated#
cs_event_data_t * cs_reflector_event_buf_get_next_unindicated (const uint8_t conn_handle)
Type | Direction | Argument Name | Description |
---|---|---|---|
const uint8_t | [in] | conn_handle | the connection handle for which the data is requested |
Find a pointer to the next available data which we haven't sent an indication about for a given connection.
Returns
pointer to the result if available, NULL if none available
117
of file common/cs_reflector/cs_reflector_event_buf.h