CS Ranging Service#

Channel Sounding (CS) Ranging Service (RAS) is used for parsing RAS GATT messages as well as creating RAS GATT responses.

Modules#

ras_control_point_parse_result

Enumerations#

enum
CS_RAS_OPCODE_RANGING_DATA_READY_INDICATION = 0x00
CS_RAS_OPCODE_RANGING_DATA_OVERWRITTEN_INDICATION = 0x01
CS_RAS_OPCODE_RANGING_DATA_GET_COMMAND = 0x02
CS_RAS_OPCODE_RANGING_DATA_DELETE_COMMAND = 0x04
CS_RAS_OPCODE_INVALID = 0xFF
}

Functions#

sl_status_t
cs_ras_convert_data(cs_ras_subevent_header_t *ras_subevent_header, cs_ras_ranging_header_t *ras_header, const sl_bt_msg_t *cs_res, bool continue_evt)
typedef(struct { uint8_t opcode;uint16_t procedure_index;uint8_t number_of_subevents;uint16_t subevent_index;uint16_t subevent_index_data_size;}) ras_ranging_data_ready_indication_t
typedef(struct { uint8_t opcode;uint16_t procedure_index;uint8_t subevent_index;uint16_t subevent_ranging_data_offset;uint8_t max_number_of_notifications;uint8_t keep_notification;uint8_t antenna_path_index_filter;}) ras_ranging_data_get_command_t
sl_status_t
cs_ras_create_control_point_response(uint8_t *data, uint8_t len, bool enable_periodic_notification_mode, ras_ranging_data_get_command_t *cmd)

Macros#

#define
RAS_SERVICE_UUID undefined
#define
RAS_CONTROL_POINT_CHARACTERISTIC_UUID undefined
#define
RAS_PROCEDURE_ENABLE_DATA_CHARACTERISTIC_UUID undefined
#define
RAS_SE_RANGING_DATA_CHARACTERISTIC_UUID undefined

Enumeration Documentation#

ras_opcode_t#

ras_opcode_t
Enumerator
CS_RAS_OPCODE_RANGING_DATA_READY_INDICATION
CS_RAS_OPCODE_RANGING_DATA_OVERWRITTEN_INDICATION
CS_RAS_OPCODE_RANGING_DATA_GET_COMMAND
CS_RAS_OPCODE_RANGING_DATA_DELETE_COMMAND
CS_RAS_OPCODE_INVALID

Definition at line 70 of file common/cs_ras/cs_ras.h

Function Documentation#

cs_ras_convert_data#

sl_status_t cs_ras_convert_data (cs_ras_subevent_header_t * ras_subevent_header, cs_ras_ranging_header_t * ras_header, const sl_bt_msg_t * cs_res, bool continue_evt)
Parameters
TypeDirectionArgument NameDescription
cs_ras_subevent_header_t *[in]ras_subevent_header

CS result data.

cs_ras_ranging_header_t *[out]ras_header

The connection handle.

const sl_bt_msg_t *[out]cs_res

Filter pattern.

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.


Definition at line 52 of file common/cs_ras/common/inc/cs_ras_format_converter.h

typedef#

typedef (struct { uint8_t opcode;uint16_t procedure_index;uint8_t number_of_subevents;uint16_t subevent_index;uint16_t subevent_index_data_size;} )
Parameters
TypeDirectionArgument NameDescription
struct { uint8_t opcode;uint16_t procedure_index;uint8_t number_of_subevents;uint16_t subevent_index;uint16_t subevent_index_data_size;}N/A

Definition at line 83 of file common/cs_ras/cs_ras.h

typedef#

typedef (struct { uint8_t opcode;uint16_t procedure_index;uint8_t subevent_index;uint16_t subevent_ranging_data_offset;uint8_t max_number_of_notifications;uint8_t keep_notification;uint8_t antenna_path_index_filter;} )
Parameters
TypeDirectionArgument NameDescription
struct { uint8_t opcode;uint16_t procedure_index;uint8_t subevent_index;uint16_t subevent_ranging_data_offset;uint8_t max_number_of_notifications;uint8_t keep_notification;uint8_t antenna_path_index_filter;}N/A

Definition at line 91 of file common/cs_ras/cs_ras.h

cs_ras_periodic_notification_mode_set_enabled#

void cs_ras_periodic_notification_mode_set_enabled (bool state)
Parameters
TypeDirectionArgument NameDescription
bool[in]state

bool value to set/disable notification mode

CS RAS set periodic notification.


Definition at line 108 of file common/cs_ras/cs_ras.h

cs_ras_periodic_notification_mode_enabled#

bool cs_ras_periodic_notification_mode_enabled (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

CS RAS get periodic notification state. Returns

  • notification state


Definition at line 114 of file common/cs_ras/cs_ras.h

cs_ras_parse_control_point_message#

ras_control_point_parse_result cs_ras_parse_control_point_message (uint8_t * message, uint8_t message_len)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]message

pointer to the RAS message

uint8_t[in]message_len

length of the message

Parse a RAS control point message and extract the payload contents. The opcode in the result structure will indicate whether the parsing was successful.

Returns


Definition at line 125 of file common/cs_ras/cs_ras.h

cs_ras_create_control_point_response#

sl_status_t cs_ras_create_control_point_response (uint8_t * data, uint8_t len, bool enable_periodic_notification_mode, ras_ranging_data_get_command_t * cmd)
Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]data

pointer to the data received in the Control Point

uint8_t[in]len

length of the data received in the Control Point

bool[in]enable_periodic_notification_mode

set to true to enable periodic notifications in the response

ras_ranging_data_get_command_t *[out]cmd

pointer to the response message to be filled

Creates a response message to the data received in the RAS control point characteristic

Returns

  • status code


Definition at line 139 of file common/cs_ras/cs_ras.h