CS Ranging Service#
Channel Sounding (CS) Ranging Service (RAS) is used for parsing RAS GATT messages as well as creating RAS GATT responses.
Functions#
Macros#
Function Documentation#
cs_ras_format_convert_header#
sl_status_t cs_ras_format_convert_header (cs_ras_subevent_header_t * ras_subevent_header, cs_ras_ranging_header_t * ras_header, const sl_bt_msg_t * cs_res, uint8_t antenna_config, bool continue_evt)
Type | Direction | Argument Name | Description |
---|---|---|---|
cs_ras_subevent_header_t * | [out] | ras_subevent_header | The connection handle. |
cs_ras_ranging_header_t * | [out] | ras_header | Filter pattern. |
const sl_bt_msg_t * | [in] | cs_res | CS result data. |
uint8_t | [in] | antenna_config | CS antenna configuration. |
bool | [in] | continue_evt | True, if this is a continuation event. |
Convert from event data to RAS format as specified by the SIG standard.
Returns
status of the operation.
cs_ras_format_get_first_subevent_header#
sl_status_t cs_ras_format_get_first_subevent_header (uint8_t * data, uint8_t * data_end, cs_ras_subevent_header_t ** subevent_header_out)
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t * | [in] | data | Data pointer. |
uint8_t * | [in] | data_end | End of the data. |
cs_ras_subevent_header_t ** | [out] | subevent_header_out | Subevent header output. |
Get first subevent header in RAS data
Returns
status of the operation.
Return values
SL_STATUS_OK: First subevent header was found.
SL_STATUS_WOULD_OVERFLOW: First subevent header does not fit in data.
SL_STATUS_NULL_POINTER: At least one input pointer is NULL.
cs_ras_format_get_next_subevent_header#
sl_status_t cs_ras_format_get_next_subevent_header (cs_ras_subevent_header_t * subevent_header, uint8_t * data_end, bool is_initiator, uint8_t antenna_path_num, cs_ras_subevent_header_t ** subevent_header_out)
Type | Direction | Argument Name | Description |
---|---|---|---|
cs_ras_subevent_header_t * | [in] | subevent_header | Subevent header pointer. |
uint8_t * | [in] | data_end | True for initiator. |
bool | [in] | is_initiator | Number of antenna paths. |
uint8_t | [out] | antenna_path_num | Subevent header output. |
cs_ras_subevent_header_t ** | N/A | subevent_header_out |
Get next subevent header in RAS data
Returns
status of the operation.
Return values
SL_STATUS_OK: Next subevent header was found.
SL_STATUS_NOT_FOUND: next Subevent header was not found in data.
SL_STATUS_WOULD_OVERFLOW: Subevent data parsing overflow.
SL_STATUS_NULL_POINTER: Subevent header, output or data_end is NULL.
SL_STATUS_INVALID_PARAMETER: Invalid antenna path number specified.
SL_STATUS_INVALID_MODE: Invalid step mode found in the data.