Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Scan Parameters Service Client

This is the client for the Scan Parameters Service. More...

Detailed Description

This is the client for the Scan Parameters Service.

Data Structures

struct  st_ble_scpc_evt_data_t
 Scan Parameters Service Client event data. More...
 
struct  st_ble_scpc_hdls_t
 Scan Parameters Service attribute handles. More...
 
struct  st_ble_scpc_init_param_t
 Scan Parameters Service initialization parameters. More...
 
struct  st_ble_scpc_connect_param_t
 Scan Parameters Service Client connection parameters. More...
 
struct  st_ble_scpc_disconnect_param_t
 Scan Parameters Service disconnection parameters. More...
 
struct  st_ble_scpc_scan_interval_window_t
 Scan Interval Window characteristic parameters. More...
 
struct  st_ble_scpc_scan_refresh_client_characteristic_configuration_t
 Scan Refresh Client Characteristic Configuration descriptor parameters. More...
 

Macros

#define BLE_SCPC_SCAN_INTERVAL_WINDOW_LEN   (4)
 Scan Interval Window characteristic value length. More...
 
#define BLE_SCPC_SCAN_REFRESH_LEN   (1)
 Scan Refresh characteristic value length. More...
 

Typedefs

typedef void(* ble_scpc_app_cb_t) (uint16_t type, ble_status_t result, st_ble_scpc_evt_data_t *p_data)
 Scan Parameters Service Client event callback. More...
 

Enumerations

enum  e_ble_scpc_event_t {
  BLE_SCPC_EVENT_SCAN_REFRESH_HDL_VAL_NTF,
  BLE_SCPC_EVENT_CLI_CNFG_WRITE_RSP,
  BLE_SCPC_EVENT_ERROR_RSP
}
 Scan Parameters Service Client event type. More...
 
enum  e_ble_scpc_scan_refresh_t { BLE_SCPC_SCAN_REFRESH_SCAN_REFRESH_VALUE_SERVER_REQUIRES_REFRESH = 0 }
 Scan Refresh Value enumeration. More...
 

Functions

ble_status_t R_BLE_SCPC_Init (const st_ble_scpc_init_param_t *p_param)
 Initialize Scan Parameters Service Client. More...
 
ble_status_t R_BLE_SCPC_Connect (uint16_t conn_hdl, const st_ble_scpc_connect_param_t *p_param)
 Perform Scan Parameters Service Client connection settings. More...
 
ble_status_t R_BLE_SCPC_Disconnect (uint16_t conn_hdl, st_ble_scpc_disconnect_param_t *p_param)
 Retrieve Scan Parameters Service Client connection specific settings before disconnection. More...
 
ble_status_t R_BLE_SCPC_WriteWithoutRspScanIntervalWindow (uint16_t conn_hdl, const st_ble_scpc_scan_interval_window_t *p_app_value)
 Write Scan Interval Window characteristic value without response to remote GATT database. More...
 
ble_status_t R_BLE_SCPC_SetScanRefreshCliCnfg (uint16_t conn_hdl, uint16_t cli_cnfg)
 Set Scan Refresh characteristic cli cnfg. More...
 
void R_BLE_SCPC_ServDiscCb (uint16_t conn_hdl, uint8_t idx, uint16_t type, void *p_param)
 
uint32_t R_BLE_SCPC_GetVersion (void)
 Return version of the SCPC service client. More...
 

Variables

const uint8_t BLE_SCPC_UUID [BLE_GATT_16_BIT_UUID_SIZE]
 Scan Parameters Service UUID. More...
 
const uint8_t BLE_SCPC_SCAN_INTERVAL_WINDOW_UUID [BLE_GATT_16_BIT_UUID_SIZE]
 Scan Interval Window characteristic UUID. More...
 
const uint8_t BLE_SCPC_SCAN_REFRESH_UUID [BLE_GATT_16_BIT_UUID_SIZE]
 Scan Refresh characteristic UUID. More...
 

Macro Definition Documentation

◆ BLE_SCPC_SCAN_INTERVAL_WINDOW_LEN

#define BLE_SCPC_SCAN_INTERVAL_WINDOW_LEN   (4)

Scan Interval Window characteristic value length.

◆ BLE_SCPC_SCAN_REFRESH_LEN

#define BLE_SCPC_SCAN_REFRESH_LEN   (1)

Scan Refresh characteristic value length.

Typedef Documentation

◆ ble_scpc_app_cb_t

typedef void(* ble_scpc_app_cb_t) (uint16_t type, ble_status_t result, st_ble_scpc_evt_data_t *p_data)

Scan Parameters Service Client event callback.

Enumeration Type Documentation

◆ e_ble_scpc_event_t

Scan Parameters Service Client event type.

Enumerator
BLE_SCPC_EVENT_SCAN_REFRESH_HDL_VAL_NTF 

Scan Refresh characteristic handle value notification event

BLE_SCPC_EVENT_CLI_CNFG_WRITE_RSP 

Cli Cnfig write response

BLE_SCPC_EVENT_ERROR_RSP 

error response

◆ e_ble_scpc_scan_refresh_t

Scan Refresh Value enumeration.

Enumerator
BLE_SCPC_SCAN_REFRESH_SCAN_REFRESH_VALUE_SERVER_REQUIRES_REFRESH 

TODO

Function Documentation

◆ R_BLE_SCPC_Init()

ble_status_t R_BLE_SCPC_Init ( const st_ble_scpc_init_param_t p_param)

Initialize Scan Parameters Service Client.

This function shall be called once at startup.

Parameters
[in]paramScan Parameters Service Client initialization parameters.
Returns
ble_status_t

◆ R_BLE_SCPC_Connect()

ble_status_t R_BLE_SCPC_Connect ( uint16_t  conn_hdl,
const st_ble_scpc_connect_param_t p_param 
)

Perform Scan Parameters Service Client connection settings.

This function shall be called on each connection establishment.

Parameters
[in]conn_hdlConnection handle.
[in]paramConnection parameters.
Returns
ble_status_t

◆ R_BLE_SCPC_Disconnect()

ble_status_t R_BLE_SCPC_Disconnect ( uint16_t  conn_hdl,
st_ble_scpc_disconnect_param_t p_param 
)

Retrieve Scan Parameters Service Client connection specific settings before disconnection.

This function shall be called on each disconnection.

Parameters
[in]conn_hdlConnection handle.
[in]paramDisconnection parameters.
Returns
ble_status_t

◆ R_BLE_SCPC_WriteWithoutRspScanIntervalWindow()

ble_status_t R_BLE_SCPC_WriteWithoutRspScanIntervalWindow ( uint16_t  conn_hdl,
const st_ble_scpc_scan_interval_window_t p_app_value 
)

Write Scan Interval Window characteristic value without response to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]app_valueScan Interval Window characteristic value to write.
Returns
ble_status_t

◆ R_BLE_SCPC_SetScanRefreshCliCnfg()

ble_status_t R_BLE_SCPC_SetScanRefreshCliCnfg ( uint16_t  conn_hdl,
uint16_t  cli_cnfg 
)

Set Scan Refresh characteristic cli cnfg.

Parameters
[in]conn_hdlConnection handle.
[in]cli_cnfgScan Refresh characteristic cli cnfg to set.
Returns
ble_status_t

◆ R_BLE_SCPC_GetVersion()

uint32_t R_BLE_SCPC_GetVersion ( void  )

Return version of the SCPC service client.

Returns
version

Variable Documentation

◆ BLE_SCPC_UUID

const uint8_t BLE_SCPC_UUID[BLE_GATT_16_BIT_UUID_SIZE]

Scan Parameters Service UUID.

◆ BLE_SCPC_SCAN_INTERVAL_WINDOW_UUID

const uint8_t BLE_SCPC_SCAN_INTERVAL_WINDOW_UUID[BLE_GATT_16_BIT_UUID_SIZE]

Scan Interval Window characteristic UUID.

◆ BLE_SCPC_SCAN_REFRESH_UUID

const uint8_t BLE_SCPC_SCAN_REFRESH_UUID[BLE_GATT_16_BIT_UUID_SIZE]

Scan Refresh characteristic UUID.