Go to the documentation of this file.
62 #include "custom_config.h"
75 #define THS_C_CONNECTION_MAX 10
76 #define THS_SVC_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
77 0x0A, 0x46, 0x44, 0xD3, 0x01, 0x03, 0xED, 0xA6}
78 #define THS_TX_CHAR_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
79 0x0A, 0x46, 0x44, 0xD3, 0x02, 0x03, 0xED, 0xA6}
80 #define THS_RX_CHAR_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
81 0x0A, 0x46, 0x44, 0xD3, 0x03, 0x03, 0xED, 0xA6}
82 #define THS_SETTING_CHAR_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
83 0x0A, 0x46, 0x44, 0xD3, 0x04, 0x03, 0xED, 0xA6}
84 #define THS_TOGGLE_CHAR_UUID {0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
85 0x0A, 0x46, 0x44, 0xD3, 0x05, 0x03, 0xED, 0xA6}
@ THS_C_EVT_SETTING_NTF_SET_SUCCESS
THS Client has set peer Settings notify.
@ THS_C_EVT_PARAM_SET_SUCCESS
THS Client has set parameter for connection and transport mode.
uint16_t length
Length of event data.
uint8_t conn_idx
The connection index.
uint16_t ths_srvc_start_handle
THS Service start handle.
@ THS_C_SLAVE_NOTIFY_MODE
Handles on the connected peer device needed to interact with it.
ths_c_evt_type_t evt_type
THS client event type.
@ THS_C_EVT_TOGGLE_SET_SUCCESS
THS Client has set toggle no.
@ THS_C_SETTINGS_TYPE_TX_POWER
Connect Tx power.
@ THS_C_SETTINGS_TYPE_MTU
MTU Size.
@ THS_C_SETTINGS_TYPE_TRANS_MODE
Data transmission mode.
sdk_err_t ths_c_setting_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer THS setting characteristic notify.
@ THS_C_EVT_INVALID
THS Client invalid event.
@ THS_C_EVT_DISCOVERY_COMPLETE
THS Client has found THS service and its characteristics.
void(* ths_c_evt_handler_t)(ths_c_evt_t *p_evt)
Throughput Service Client event handler type.
@ THS_C_EVT_TX_SUCCESS
THS Client has sent something to a peer successfully.
uint16_t ths_rx_handle
THS Rx characteristic handle which has been got from peer.
@ THS_C_SETTINGS_TYPE_RANGING_PARAM
@ THS_C_EVT_SETTING_RSP_RECEIVE
THS CLient has received response of parameter set.
Throughput Service Client event.
uint16_t ths_setting_handle
THS setting characteristic handle which has been got from peer.
sdk_err_t ths_client_init(ths_c_evt_handler_t evt_handler)
Register THS Client event handler.
uint16_t ths_srvc_end_handle
THS Service end handle.
uint16_t ths_tx_cccd_handle
THS Tx characteristic CCCD handle which has been got from peer.
uint8_t * p_data
Pointer to event data.
ths_c_evt_type_t
Throughput Service Client event type.
uint16_t ths_setting_cccd_handle
THS setting characteristic CCCD handle which has been got from peer.
uint16_t ths_toggle_handle
THS toggle characteristic handle which has been got from peer.
@ THS_C_EVT_THRP_DATA_RECEIVE
THS Client has received throughput data from peer.
Profile/Service Common Types.
sdk_err_t ths_c_comm_param_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send communication parameter to peer.
@ THS_C_SETTINGS_TYPE_PHY
Radio Phy mode, 1M, 2M, Encoded.
@ THS_C_EVT_DISCOVERY_FAIL
THS Client found THS service failed because of invalid operation or no found at the peer.
uint16_t sdk_err_t
SDK API result type.
@ THS_C_SETTINGS_TYPE_PDU
PDU Size.
@ THS_C_DOUBLE_MODE
The device writes data to the peer.
@ THS_C_MASTER_WRITE_MODE
The device recieves data from the peer via notify.
sdk_err_t ths_c_disc_srvc_start(uint8_t conn_idx)
Discovery THS on peer.
ths_c_transport_mode_t
Throughput Service Client data transport mode.
sdk_err_t ths_c_toggle_set(uint8_t conn_idx, bool is_enable)
Set Throughput service toggle state of sending the data.
uint16_t ths_tx_handle
THS Tx characteristic handle which has been got from peer.
@ THS_C_EVT_WRITE_OP_ERR
Error occured when THS Client writen to peer.
@ THS_C_SETTINGS_TYPE_CI
BLE Connection Interval parameter.
sdk_err_t ths_c_tx_data_send(uint8_t conn_idx, uint8_t *p_data, uint16_t length)
Send data to peer.
sdk_err_t ths_c_tx_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer THS Tx characteristic notify.
ths_c_settings_type_t
Throughput service settings types.
@ THS_C_EVT_TX_NTF_SET_SUCCESS
THS Client has set peer Tx notify.