Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Running Speed and Cadence Service Client

This is the client for the Running Speed and Cadence Service . More...

Detailed Description

This is the client for the Running Speed and Cadence Service .

This is the client for the Running Speed and Cadence Service Service.

Data Structures

struct  st_ble_rscc_rsc_measurement_t
 RSC Measurement value structure. More...
 
struct  st_ble_rscc_rsc_measurement_attr_hdl_t
 RSC Measurement attribute handle value. More...
 
struct  st_ble_rscc_rsc_feature_t
 
struct  st_ble_rscc_rsc_feature_attr_hdl_t
 RSC Feature attribute handle value. More...
 
struct  st_ble_rscc_sensor_location_attr_hdl_t
 Sensor Location attribute handle value. More...
 
struct  st_ble_rscc_sc_control_point_t
 SC Control Point value structure. More...
 
struct  st_ble_rscc_sc_control_point_attr_hdl_t
 SC Control Point attribute handle value. More...
 
struct  st_ble_rscc_evt_data_t
 Running Speed and Cadence Service client event data. More...
 

Macros

#define UNUSED_ARG(arg)   (void)(arg)
 
#define BLE_RSCC_PRV_RSC_MEASUREMENT_LEN   (10)
 RSC Measurement characteristic value length. More...
 
#define BLE_RSCC_PRV_RSC_FEATURE_LEN   (2)
 RSC Feature characteristic value length. More...
 
#define BLE_RSCC_PRV_SENSOR_LOCATION_LEN   (1)
 Sensor Location characteristic value length. More...
 
#define BLE_RSCC_PRV_SC_CONTROL_POINT_LEN   (20)
 SC Control Point characteristic value length. More...
 
#define BLE_RSCC_PRV_RSC_MEASUREMENT_FLAGS_INSTANTANEOUS_STRIDE_LENGTH_PRESENT   (1 << 0)
 
#define BLE_RSCC_PRV_RSC_MEASUREMENT_FLAGS_TOTAL_DISTANCE_PRESENT   (1 << 1)
 Total Distance Present bit. More...
 
#define BLE_RSCC_PRV_RSC_MEASUREMENT_FLAGS_WALKING_OR_RUNNING_STATUS_BITS   (1 << 2)
 Walking or Running Status bits. More...
 
#define BLE_RSCC_PRV_RSC_FEATURE_INSTANTANEOUS_STRIDE_LENGTH_MEASUREMENT_SUPPORTED   (1 << 0)
 
#define BLE_RSCC_PRV_RSC_FEATURE_TOTAL_DISTANCE_MEASUREMENT_SUPPORTED   (1 << 1)
 Total Distance Measurement Supported bit. More...
 
#define BLE_RSCC_PRV_RSC_FEATURE_WALKING_OR_RUNNING_STATUS_SUPPORTED   (1 << 2)
 
#define BLE_RSCC_PRV_RSC_FEATURE_CALIBRATION_PROCEDURE_SUPPORTED   (1 << 3)
 
#define BLE_RSCC_PRV_RSC_FEATURE_MULTIPLE_SENSOR_LOCATIONS_SUPPORTED   (1 << 4)
 Multiple Sensor Locations Supported bit. More...
 
#define BLE_RSCC_SC_CONTROL_POINT_RESPONSE_PARAMETER_LEN   (17)
 Response Parameter length . More...
 
#define BLE_RSCC_RSC_MEASUREMENT_UUID   (0x2A53)
 
#define BLE_RSCC_RSC_MEASUREMENT_LEN   (10)
 
#define BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_UUID   (0x2902)
 
#define BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_LEN   (2)
 
#define BLE_RSCC_RSC_FEATURE_UUID   (0x2A54)
 RSC Feature value structure. More...
 
#define BLE_RSCC_RSC_FEATURE_LEN   (2)
 
#define BLE_RSCC_SENSOR_LOCATION_UUID   (0x2A5D)
 
#define BLE_RSCC_SENSOR_LOCATION_LEN   (1)
 
#define BLE_RSCC_SC_CONTROL_POINT_UUID   (0x2A55)
 
#define BLE_RSCC_SC_CONTROL_POINT_LEN   (20)
 
#define BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_UUID   (0x2902)
 
#define BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_LEN   (2)
 
#define BLE_RSCC_PROCEDURE_ALREADY_IN_PROGRESS_ERROR   (BLE_ERR_GROUP_GATT | 0x80)
 A SC Control Point request cannot be serviced because a previously triggered SCCP operation is still in progress. More...
 
#define BLE_RSCC_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED_ERROR   (BLE_ERR_GROUP_GATT | 0x81)
 The Client Characteristic Configuration descriptor is not configured according to the requirements of the service. More...
 

Enumerations

enum  e_ble_rscc_sensor_location_sensor_location_t {
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_OTHER = 0,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_TOP_OF_SHOE = 1,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_IN_SHOE = 2,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_HIP = 3,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_WHEEL = 4,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_CRANK = 5,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_CRANK = 6,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_PEDAL = 7,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_PEDAL = 8,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_HUB = 9,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_REAR_DROPOUT = 10,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_CHAINSTAY = 11,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_REAR_WHEEL = 12,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_REAR_HUB = 13,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_CHEST = 14,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_SPIDER = 15,
  BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_CHAIN_RING = 16
}
 Sensor Location Sensor Location enumeration. More...
 
enum  e_ble_rscc_sc_control_point_op_code_t {
  BLE_RSCC_SC_CONTROL_POINT_OP_CODE_RESERVED_FOR_FUTURE_USE = 0,
  BLE_RSCC_SC_CONTROL_POINT_OP_CODE_SET_CUMULATIVE_VALUE = 1,
  BLE_RSCC_SC_CONTROL_POINT_OP_CODE_START_SENSOR_CALIBRATION = 2,
  BLE_RSCC_SC_CONTROL_POINT_OP_CODE_UPDATE_SENSOR_LOCATION = 3,
  BLE_RSCC_SC_CONTROL_POINT_OP_CODE_REQUEST_SUPPORTED_SENSOR_LOCATIONS = 4,
  BLE_RSCC_SC_CONTROL_POINT_OP_CODE_RESPONSE_CODE = 16
}
 SC Control Point Op Code enumeration. More...
 
enum  e_ble_rscc_sc_control_point_response_value_t {
  BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_RESERVED_FOR_FUTURE_USE__RESPONSE_PARAMETER__N_A_ = 0,
  BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_SUCCESS__RESPONSE_PARAMETER__NONE_EXCEPT_FOR_OP_CODE_0X04_SEE_NOTE_BELOW_ = 1,
  BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED__RESPONSE_PARAMETER__N_A_ = 2,
  BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_INVALID_PARAMETER__RESPONSE_PARAMETER__NONE_ = 3,
  BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_OPERATION_FAILED__RESPONSE_PARAMETER__NONE_ = 4
}
 SC Control Point Response Value enumeration. More...
 
enum  e_ble_rscc_char_idx_t {
  BLE_RSCC_RSC_MEASUREMENT_IDX,
  BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_IDX,
  BLE_RSCC_RSC_FEATURE_IDX,
  BLE_RSCC_SENSOR_LOCATION_IDX,
  BLE_RSCC_SC_CONTROL_POINT_IDX,
  BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_IDX
}
 Running Speed and Cadence Service characteristic ID. More...
 
enum  e_ble_rscc_event_t {
  BLE_RSCC_EVENT_RSC_MEASUREMENT_HDL_VAL_NTF = BLE_SERVC_ATTR_EVENT(BLE_RSCC_RSC_MEASUREMENT_IDX, BLE_SERVC_HDL_VAL_NTF),
  BLE_RSCC_EVENT_RSC_MEASUREMENT_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVC_READ_RSP),
  BLE_RSCC_EVENT_RSC_MEASUREMENT_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP),
  BLE_RSCC_EVENT_RSC_FEATURE_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_RSCC_RSC_FEATURE_IDX, BLE_SERVC_READ_RSP),
  BLE_RSCC_EVENT_SENSOR_LOCATION_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_RSCC_SENSOR_LOCATION_IDX, BLE_SERVC_READ_RSP),
  BLE_RSCC_EVENT_SC_CONTROL_POINT_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_RSCC_SC_CONTROL_POINT_IDX, BLE_SERVC_WRITE_RSP),
  BLE_RSCC_EVENT_SC_CONTROL_POINT_HDL_VAL_IND = BLE_SERVC_ATTR_EVENT(BLE_RSCC_SC_CONTROL_POINT_IDX, BLE_SERVC_HDL_VAL_IND),
  BLE_RSCC_EVENT_SC_CONTROL_POINT_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVC_READ_RSP),
  BLE_RSCC_EVENT_SC_CONTROL_POINT_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP)
}
 Running Speed and Cadence Service client event type. More...
 

Functions

ble_status_t R_BLE_RSCC_WriteRscMeasCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Write RSC Measurement characteristic Client Characteristic Configuration descriptor value to remote GATT database. More...
 
ble_status_t R_BLE_RSCC_ReadRscMeasCliCnfg (uint16_t conn_hdl)
 Read RSC Measurement characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More...
 
static ble_status_t decode_st_ble_rscc_rsc_meas_t (st_ble_rscc_rsc_measurement_t *p_app_value, const st_ble_gatt_value_t *p_gatt_value)
 
static ble_status_t encode_st_ble_rscc_rsc_meas_t (const st_ble_rscc_rsc_measurement_t *p_app_value, st_ble_gatt_value_t *p_gatt_value)
 
void R_BLE_RSCC_GetRscMeasAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_rscc_rsc_measurement_attr_hdl_t *p_hdl)
 Get RSC Measurement attribute handles. More...
 
static ble_status_t decode_st_ble_rscc_rsc_feat_t (st_ble_rscc_rsc_feature_t *p_app_value, const st_ble_gatt_value_t *p_gatt_value)
 
static ble_status_t encode_st_ble_rscc_rsc_feat_t (const st_ble_rscc_rsc_feature_t *p_app_value, st_ble_gatt_value_t *p_gatt_value)
 
ble_status_t R_BLE_RSCC_ReadRscFeat (uint16_t conn_hdl)
 Read RSC Feature characteristic value from the remote GATT database. More...
 
void R_BLE_RSCC_GetRscFeatAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_rscc_rsc_feature_attr_hdl_t *p_hdl)
 Get RSC Feature attribute handles. More...
 
ble_status_t R_BLE_RSCC_ReadSenLoc (uint16_t conn_hdl)
 Read Sensor Location characteristic value from the remote GATT database. More...
 
void R_BLE_RSCC_GetSenLocAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_rscc_sensor_location_attr_hdl_t *p_hdl)
 Get Sensor Location attribute handles. More...
 
ble_status_t R_BLE_RSCC_WriteScCPCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Write SC Control Point characteristic Client Characteristic Configuration descriptor value to remote GATT database. More...
 
ble_status_t R_BLE_RSCC_ReadScCPCliCnfg (uint16_t conn_hdl)
 Read SC Control Point characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More...
 
static ble_status_t decode_st_ble_rscc_sc_cp_t (st_ble_rscc_sc_control_point_t *p_app_value, const st_ble_gatt_value_t *p_gatt_value)
 
static ble_status_t encode_st_ble_rscc_sc_cp_t (const st_ble_rscc_sc_control_point_t *p_app_value, st_ble_gatt_value_t *p_gatt_value)
 
ble_status_t R_BLE_RSCC_WriteScCP (uint16_t conn_hdl, const st_ble_rscc_sc_control_point_t *p_value)
 Write SC Control Point characteristic value to remote GATT database. More...
 
void R_BLE_RSCC_GetScCPAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_rscc_sc_control_point_attr_hdl_t *p_hdl)
 Get SC Control Point attribute handles. More...
 
ble_status_t R_BLE_RSCC_Init (ble_servc_app_cb_t cb)
 Initialize Running Speed and Cadence Service client. More...
 
void R_BLE_RSCC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param)
 Running Speed and Cadence Service client discovery callback. More...
 
void R_BLE_RSCC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl)
 Get Running Speed and Cadence Service client attribute handle. More...
 

Variables

static st_ble_servc_info_t gs_client_info
 
static uint16_t gs_rsc_meas_cli_cnfg_desc_hdls [BLE_SERVC_MAX_NUM_OF_SAVED]
 
static const st_ble_servc_desc_info_t gs_rsc_measurement_cli_cnfg
 
static st_ble_gatt_hdl_range_t gs_rsc_measurement_char_ranges [BLE_SERVC_MAX_NUM_OF_SAVED]
 
static const st_ble_servc_desc_info_tgspp_rsc_measurement_descs []
 
const st_ble_servc_char_info_t gs_rsc_measurement_char
 
static st_ble_gatt_hdl_range_t gs_rsc_feature_char_ranges [BLE_SERVC_MAX_NUM_OF_SAVED]
 
const st_ble_servc_char_info_t gs_rsc_feature_char
 
static st_ble_gatt_hdl_range_t gs_sensor_location_char_ranges [BLE_SERVC_MAX_NUM_OF_SAVED]
 
static const st_ble_servc_char_info_t gs_sensor_location_char
 
static uint16_t gs_sc_cp_cli_cnfg_desc_hdls [BLE_SERVC_MAX_NUM_OF_SAVED]
 
static const st_ble_servc_desc_info_t gs_sc_control_point_cli_cnfg
 
static st_ble_gatt_hdl_range_t gs_sc_control_point_char_ranges [BLE_SERVC_MAX_NUM_OF_SAVED]
 
static const st_ble_servc_desc_info_tgspp_sc_control_point_descs []
 
static const st_ble_servc_char_info_t gs_sc_control_point_char
 
static st_ble_gatt_hdl_range_t gs_rscc_ranges [BLE_SERVC_MAX_NUM_OF_SAVED]
 
const st_ble_servc_char_info_tgspp_rscc_chars []
 

Macro Definition Documentation

◆ BLE_RSCC_PRV_RSC_MEASUREMENT_LEN

#define BLE_RSCC_PRV_RSC_MEASUREMENT_LEN   (10)

RSC Measurement characteristic value length.

◆ BLE_RSCC_PRV_RSC_FEATURE_LEN

#define BLE_RSCC_PRV_RSC_FEATURE_LEN   (2)

RSC Feature characteristic value length.

◆ BLE_RSCC_PRV_SENSOR_LOCATION_LEN

#define BLE_RSCC_PRV_SENSOR_LOCATION_LEN   (1)

Sensor Location characteristic value length.

◆ BLE_RSCC_PRV_SC_CONTROL_POINT_LEN

#define BLE_RSCC_PRV_SC_CONTROL_POINT_LEN   (20)

SC Control Point characteristic value length.

◆ BLE_RSCC_PRV_RSC_MEASUREMENT_FLAGS_TOTAL_DISTANCE_PRESENT

#define BLE_RSCC_PRV_RSC_MEASUREMENT_FLAGS_TOTAL_DISTANCE_PRESENT   (1 << 1)

Total Distance Present bit.

◆ BLE_RSCC_PRV_RSC_MEASUREMENT_FLAGS_WALKING_OR_RUNNING_STATUS_BITS

#define BLE_RSCC_PRV_RSC_MEASUREMENT_FLAGS_WALKING_OR_RUNNING_STATUS_BITS   (1 << 2)

Walking or Running Status bits.

◆ BLE_RSCC_PRV_RSC_FEATURE_TOTAL_DISTANCE_MEASUREMENT_SUPPORTED

#define BLE_RSCC_PRV_RSC_FEATURE_TOTAL_DISTANCE_MEASUREMENT_SUPPORTED   (1 << 1)

Total Distance Measurement Supported bit.

◆ BLE_RSCC_PRV_RSC_FEATURE_MULTIPLE_SENSOR_LOCATIONS_SUPPORTED

#define BLE_RSCC_PRV_RSC_FEATURE_MULTIPLE_SENSOR_LOCATIONS_SUPPORTED   (1 << 4)

Multiple Sensor Locations Supported bit.

◆ BLE_RSCC_SC_CONTROL_POINT_RESPONSE_PARAMETER_LEN

#define BLE_RSCC_SC_CONTROL_POINT_RESPONSE_PARAMETER_LEN   (17)

Response Parameter length .

◆ BLE_RSCC_RSC_FEATURE_UUID

#define BLE_RSCC_RSC_FEATURE_UUID   (0x2A54)

RSC Feature value structure.

◆ BLE_RSCC_PROCEDURE_ALREADY_IN_PROGRESS_ERROR

#define BLE_RSCC_PROCEDURE_ALREADY_IN_PROGRESS_ERROR   (BLE_ERR_GROUP_GATT | 0x80)

A SC Control Point request cannot be serviced because a previously triggered SCCP operation is still in progress.

◆ BLE_RSCC_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED_ERROR

#define BLE_RSCC_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED_ERROR   (BLE_ERR_GROUP_GATT | 0x81)

The Client Characteristic Configuration descriptor is not configured according to the requirements of the service.

Enumeration Type Documentation

◆ e_ble_rscc_sensor_location_sensor_location_t

Sensor Location Sensor Location enumeration.

Enumerator
BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_OTHER 

Other

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_TOP_OF_SHOE 

Top of shoe

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_IN_SHOE 

In shoe

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_HIP 

Hip

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_WHEEL 

Front Wheel

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_CRANK 

Left Crank

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_CRANK 

Right Crank

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_PEDAL 

Left Pedal

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_PEDAL 

Right Pedal

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_HUB 

Front Hub

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_REAR_DROPOUT 

Rear Dropout

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_CHAINSTAY 

Chainstay

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_REAR_WHEEL 

Rear Wheel

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_REAR_HUB 

Rear Hub

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_CHEST 

Chest

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_SPIDER 

Spider

BLE_RSCC_SENSOR_LOCATION_SENSOR_LOCATION_CHAIN_RING 

Chain Ring

◆ e_ble_rscc_sc_control_point_op_code_t

SC Control Point Op Code enumeration.

Enumerator
BLE_RSCC_SC_CONTROL_POINT_OP_CODE_RESERVED_FOR_FUTURE_USE 

Reserved for future use

BLE_RSCC_SC_CONTROL_POINT_OP_CODE_SET_CUMULATIVE_VALUE 

Set Cumulative Value

BLE_RSCC_SC_CONTROL_POINT_OP_CODE_START_SENSOR_CALIBRATION 

Start Sensor Calibration

BLE_RSCC_SC_CONTROL_POINT_OP_CODE_UPDATE_SENSOR_LOCATION 

Update Sensor Location

BLE_RSCC_SC_CONTROL_POINT_OP_CODE_REQUEST_SUPPORTED_SENSOR_LOCATIONS 

Request Supported Sensor Locations

BLE_RSCC_SC_CONTROL_POINT_OP_CODE_RESPONSE_CODE 

Response Code

◆ e_ble_rscc_sc_control_point_response_value_t

SC Control Point Response Value enumeration.

Enumerator
BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_RESERVED_FOR_FUTURE_USE__RESPONSE_PARAMETER__N_A_ 

Reserved For Future Use (Response Parameter: N/A)

BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_SUCCESS__RESPONSE_PARAMETER__NONE_EXCEPT_FOR_OP_CODE_0X04_SEE_NOTE_BELOW_ 

Success>

BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED__RESPONSE_PARAMETER__N_A_ 

Op Code not supported (Response Parameter: N/A)

BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_INVALID_PARAMETER__RESPONSE_PARAMETER__NONE_ 

Invalid Parameter (Response Parameter: None)

BLE_RSCC_SC_CONTROL_POINT_RESPONSE_VALUE_OPERATION_FAILED__RESPONSE_PARAMETER__NONE_ 

Operation Failed (Response Parameter: None)

◆ e_ble_rscc_char_idx_t

Running Speed and Cadence Service characteristic ID.

◆ e_ble_rscc_event_t

Running Speed and Cadence Service client event type.

Function Documentation

◆ R_BLE_RSCC_WriteRscMeasCliCnfg()

ble_status_t R_BLE_RSCC_WriteRscMeasCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Write RSC Measurement characteristic Client Characteristic Configuration descriptor value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]P_valuepointer to RSC Measurement characteristic Client Characteristic Configuration descriptor value to write.
Returns
ble_status_t

◆ R_BLE_RSCC_ReadRscMeasCliCnfg()

ble_status_t R_BLE_RSCC_ReadRscMeasCliCnfg ( uint16_t  conn_hdl)

Read RSC Measurement characteristic Client Characteristic Configuration descriptor value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_RSCC_GetRscMeasAttrHdl()

void R_BLE_RSCC_GetRscMeasAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_rscc_rsc_measurement_attr_hdl_t p_hdl 
)

Get RSC Measurement attribute handles.

Parameters
[in]P_addrBluetooth device address for the attribute handles.
[out]P_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_RSCC_ReadRscFeat()

ble_status_t R_BLE_RSCC_ReadRscFeat ( uint16_t  conn_hdl)

Read RSC Feature characteristic value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_RSCC_GetRscFeatAttrHdl()

void R_BLE_RSCC_GetRscFeatAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_rscc_rsc_feature_attr_hdl_t p_hdl 
)

Get RSC Feature attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]P_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_RSCC_ReadSenLoc()

ble_status_t R_BLE_RSCC_ReadSenLoc ( uint16_t  conn_hdl)

Read Sensor Location characteristic value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_RSCC_GetSenLocAttrHdl()

void R_BLE_RSCC_GetSenLocAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_rscc_sensor_location_attr_hdl_t p_hdl 
)

Get Sensor Location attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_RSCC_WriteScCPCliCnfg()

ble_status_t R_BLE_RSCC_WriteScCPCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Write SC Control Point characteristic Client Characteristic Configuration descriptor value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]P_valuepointer to SC Control Point characteristic Client Characteristic Configuration descriptor value to write.
Returns
ble_status_t

◆ R_BLE_RSCC_ReadScCPCliCnfg()

ble_status_t R_BLE_RSCC_ReadScCPCliCnfg ( uint16_t  conn_hdl)

Read SC Control Point characteristic Client Characteristic Configuration descriptor value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_RSCC_WriteScCP()

ble_status_t R_BLE_RSCC_WriteScCP ( uint16_t  conn_hdl,
const st_ble_rscc_sc_control_point_t p_value 
)

Write SC Control Point characteristic value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]P_valuepointer to SC Control Point characteristic value to write.
Returns
ble_status_t

◆ R_BLE_RSCC_GetScCPAttrHdl()

void R_BLE_RSCC_GetScCPAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_rscc_sc_control_point_attr_hdl_t p_hdl 
)

Get SC Control Point attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]P_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_RSCC_Init()

ble_status_t R_BLE_RSCC_Init ( ble_servc_app_cb_t  cb)

Initialize Running Speed and Cadence Service client.

Parameters
[in]cbClient callback.
Returns
ble_status_t

◆ R_BLE_RSCC_ServDiscCb()

void R_BLE_RSCC_ServDiscCb ( uint16_t  conn_hdl,
uint8_t  serv_idx,
uint16_t  type,
void *  p_param 
)

Running Speed and Cadence Service client discovery callback.

Parameters
[in]conn_hdlConnection handle
[in]serv_idxService instance index.
[in]typeService discovery event type.
[out]P_parampointer to Service discovery event parameter.
Returns
ble_status_t

◆ R_BLE_RSCC_GetServAttrHdl()

void R_BLE_RSCC_GetServAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_gatt_hdl_range_t p_hdl 
)

Get Running Speed and Cadence Service client attribute handle.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.

Variable Documentation

◆ gs_client_info

static st_ble_servc_info_t gs_client_info
static
Initial value:
=
{
.pp_chars = gspp_rscc_chars,
.num_of_chars = ARRAY_SIZE(gspp_rscc_chars),
.p_attr_hdls = gs_rscc_ranges,
}

◆ gs_rsc_measurement_cli_cnfg

const st_ble_servc_desc_info_t gs_rsc_measurement_cli_cnfg
static
Initial value:
=
{
.uuid_16 = BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_UUID,
.app_size = sizeof(uint16_t),
.db_size = BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_LEN,
.desc_idx = BLE_RSCC_RSC_MEASUREMENT_CLI_CNFG_IDX,
.p_attr_hdls = gs_rsc_meas_cli_cnfg_desc_hdls,
}

◆ gspp_rsc_measurement_descs

const st_ble_servc_desc_info_t* gspp_rsc_measurement_descs[]
static
Initial value:
=
{
&gs_rsc_measurement_cli_cnfg,
}

◆ gs_rsc_measurement_char

const st_ble_servc_char_info_t gs_rsc_measurement_char
Initial value:
=
{
.uuid_16 = BLE_RSCC_RSC_MEASUREMENT_UUID,
.app_size = sizeof(st_ble_rscc_rsc_measurement_t),
.db_size = BLE_RSCC_RSC_MEASUREMENT_LEN,
.char_idx = BLE_RSCC_RSC_MEASUREMENT_IDX,
.p_attr_hdls = gs_rsc_measurement_char_ranges,
.decode = (ble_servc_attr_decode_t)decode_st_ble_rscc_rsc_meas_t,
.encode = (ble_servc_attr_encode_t)encode_st_ble_rscc_rsc_meas_t,
.num_of_descs = ARRAY_SIZE(gspp_rsc_measurement_descs),
.pp_descs = gspp_rsc_measurement_descs,
}

◆ gs_rsc_feature_char

const st_ble_servc_char_info_t gs_rsc_feature_char
Initial value:
=
{
.app_size = sizeof(st_ble_rscc_rsc_feature_t),
.db_size = BLE_RSCC_RSC_FEATURE_LEN,
.char_idx = BLE_RSCC_RSC_FEATURE_IDX,
.p_attr_hdls = gs_rsc_feature_char_ranges,
.decode = (ble_servc_attr_decode_t)decode_st_ble_rscc_rsc_feat_t,
.encode = (ble_servc_attr_encode_t)encode_st_ble_rscc_rsc_feat_t,
}

◆ gs_sensor_location_char

const st_ble_servc_char_info_t gs_sensor_location_char
static
Initial value:
=
{
.uuid_16 = BLE_RSCC_SENSOR_LOCATION_UUID,
.app_size = sizeof(uint8_t),
.db_size = BLE_RSCC_SENSOR_LOCATION_LEN,
.char_idx = BLE_RSCC_SENSOR_LOCATION_IDX,
.p_attr_hdls = gs_sensor_location_char_ranges,
}

◆ gs_sc_control_point_cli_cnfg

const st_ble_servc_desc_info_t gs_sc_control_point_cli_cnfg
static
Initial value:
=
{
.uuid_16 = BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_UUID,
.app_size = sizeof(uint16_t),
.db_size = BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_LEN,
.desc_idx = BLE_RSCC_SC_CONTROL_POINT_CLI_CNFG_IDX,
.p_attr_hdls = gs_sc_cp_cli_cnfg_desc_hdls,
}

◆ gspp_sc_control_point_descs

const st_ble_servc_desc_info_t* gspp_sc_control_point_descs[]
static
Initial value:
=
{
&gs_sc_control_point_cli_cnfg,
}

◆ gs_sc_control_point_char

const st_ble_servc_char_info_t gs_sc_control_point_char
static
Initial value:
=
{
.uuid_16 = BLE_RSCC_SC_CONTROL_POINT_UUID,
.app_size = sizeof(st_ble_rscc_sc_control_point_t),
.db_size = BLE_RSCC_SC_CONTROL_POINT_LEN,
.char_idx = BLE_RSCC_SC_CONTROL_POINT_IDX,
.p_attr_hdls = gs_sc_control_point_char_ranges,
.decode = (ble_servc_attr_decode_t)decode_st_ble_rscc_sc_cp_t,
.encode = (ble_servc_attr_encode_t)encode_st_ble_rscc_sc_cp_t,
.num_of_descs = ARRAY_SIZE(gspp_sc_control_point_descs),
.pp_descs = gspp_sc_control_point_descs,
}

◆ gspp_rscc_chars

const st_ble_servc_char_info_t* gspp_rscc_chars[]
Initial value:
=
{
&gs_rsc_measurement_char,
&gs_rsc_feature_char,
&gs_sensor_location_char,
&gs_sc_control_point_char,
}