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)

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
[in]ras_subevent_header

CS result data.

[out]ras_header

The connection handle.

[out]cs_res

Filter pattern.

[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
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
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
[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
N/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
[in]message

pointer to the RAS message

[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
[in]data

pointer to the data received in the Control Point

[in]len

length of the data received in the Control Point

[in]enable_periodic_notification_mode

set to true to enable periodic notifications in the response

[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

Macro Definition Documentation#

RAS_SERVICE_UUID#

#define RAS_SERVICE_UUID
Value:
{ 0xf3, 0x20, 0x18, 0xc7, 0x32, 0x2d, 0xc7, 0xab, \
0xcf, 0x46, 0xf7, 0xff, 0x70, 0x9e, 0xb9, 0xbb }

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

RAS_CONTROL_POINT_CHARACTERISTIC_UUID#

#define RAS_CONTROL_POINT_CHARACTERISTIC_UUID
Value:
{ 0x89, 0xbe, 0x18, 0xa4, 0x22, 0x3c, 0x49, 0x9b, \
0x03, 0x43, 0x91, 0x13, 0xec, 0x95, 0x9f, 0x92 }

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

RAS_PROCEDURE_ENABLE_DATA_CHARACTERISTIC_UUID#

#define RAS_PROCEDURE_ENABLE_DATA_CHARACTERISTIC_UUID
Value:
{ 0x90, 0xbe, 0x18, 0xa4, 0x22, 0x3c, 0x49, 0x9b, \
0x03, 0x43, 0x91, 0x13, 0xec, 0x95, 0x9f, 0x92 }

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

RAS_SE_RANGING_DATA_CHARACTERISTIC_UUID#

#define RAS_SE_RANGING_DATA_CHARACTERISTIC_UUID
Value:
{ 0x91, 0xbe, 0x18, 0xa4, 0x22, 0x3c, 0x49, 0x9b, \
0x03, 0x43, 0x91, 0x13, 0xec, 0x95, 0x9f, 0x92 }

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