Go to the documentation of this file.
62 #include "custom_config.h"
68 #define THSCPS_CONNECTION_MAX 10
69 #define THSCPS_CTRL_PT_VAL_LEN 20
70 #define THSCPS_TEST_SETTING_VAL_LEN 20
71 #define THSCPS_TEST_INFO_VAL_LEN 20
72 #define THSCPS_CONN_INFO_VAL_LEN 20
73 #define THSCPS_SERVICE_UUID 0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
74 0x0A, 0x46, 0x44, 0xD3, 0x01, 0x07, 0xED, 0xA6
75 #define THSCPS_ACTION_ON 0x01
76 #define THSCPS_ACTION_OFF 0x00
77 #define THSCPS_CTRL_PT_RSP_CODE 0xff
@ THSCPS_EVT_CTRL_PT_IND_ENABLE
THS Control Point indicaiton is enabled.
thscps_setting_t setting_info
Setting infomation.
sdk_err_t thscps_conn_info_send(uint8_t conn_idx, thscps_test_conn_info_t *p_conn_info)
Send Throughput Test Connect Information if its notification has been enabled.
int8_t tx_power
Advertising tx power.
uint16_t duration
Advertising duration.
@ THSCPS_TEST_ROLE_MASTER
Test role: Master.
sdk_err_t thscps_service_init(thscps_evt_handler_t evt_handler)
Initialize a THS Control Point Service instance and add in the DB.
@ THSCPS_LEGACY_ADV_PHY
Undefined LE PHY.
thscps_adv_phy_t
Specify PHY.
const uint8_t * p_data
THS Setting Information data.
@ THSCPS_EVT_TSET_INFO_NTF_ENABLE
THS Test Information notification is enabled.
uint8_t right_rate
RX right rate.
uint16_t interval
Advertising interval.
THS Control Point Service event.
@ THSCPS_SETTINGS_TYPE_PHY
Radio Phy mode, 1M, 2M, Encoded.
@ THSCPS_CTRL_PT_SCAN_ACTION
Scan action.
thscps_test_state_t
Throughput Test State.
sdk_err_t thscps_test_setting_rsp_send(uint8_t conn_idx, thscps_rsp_val_t *p_rsp_val)
Send Settings Response if its notification has been enabled.
uint16_t ci
Connect Interval.
@ THSCPS_EVT_TSET_SET_NTF_DISABLE
THS Test Information notification is disabled.
thscps_test_role_t test_role
GAP role type.
THS connect Information value.
thscps_adv_param_t adv_param
Advertising parameters.
sdk_err_t thscps_ctrl_pt_rsp_send(uint8_t conn_idx, thscps_rsp_val_t *p_rsp_val)
Send Control Point Response if its indicaiton has been enabled.
@ THSCPS_1MBPS_PHY
LE 1M PHY.
void thscps_test_state_set(thscps_test_state_t test_state)
Set throughput state set.
@ THSCPS_EVT_TEST_ROLE_SET
Set Test role.
thscps_status_rsp_t status
Status.
@ THSCPS_EVT_ADV_PRAM_SET
Set advertising parameters.
@ THSCPS_RSP_ID_SDK_ERR
Failed becaude of SDK error Size.
thscps_status_rsp_t
THS Control Point Response Types.
@ THSCPS_SETTINGS_TYPE_PDU
PDU Size.
THS Control Point Advertising Parameters.
@ THSCPS_SETTINGS_TYPE_TX_POWER
Connect Tx power.
sdk_err_t thscps_test_info_send(uint8_t conn_idx, thscps_test_info_t *p_test_info)
Send Throughput Test Information if its notification has been enabled.
THS Test Information value.
uint16_t length
THS Setting Information length.
uint16_t average_val
Average throughput value.
@ THSCPS_RSP_ID_STATUS_ERR
Failed because of disallowed status.
@ THSCPS_RSP_ID_PARAM_ERR
Failed because of parameter error.
uint8_t action_set
Set action.
@ THSCPS_SETTINGS_TYPE_CI
BLE Connection Interval parameter.
uint16_t instant_val
Instant throughput value.
@ THSCPS_CTRL_PT_TEST_READY
Ready for test.
@ THSCPS_RSP_ID_SUCCESS
Success.
@ THSCPS_EVT_SCAN_ACTION
Set scan action.
THS Setting Information value.
Profile/Service Common Types.
@ THSCPS_CTRL_PT_TEST_ROLE
Test role set.
@ THSCPS_EVT_TSET_INFO_NTF_DISABLE
THS Test Information notification is disabled.
thscps_settings_type_t
Throughput service settings types.
@ THSCPS_EVT_CONN_INFO_NTF_ENABLE
THS Connection Information notification is enabled.
@ THSCPS_CODED_PHY
LE Coded PHY.
thscps_evt_type_t
THS Control Point Service Event Type.
uint16_t sdk_err_t
SDK API result type.
thscps_test_role_t
Local device GAP Role Type.
@ THSCPS_EVT_SETTING_SET
Throughput setting.
@ THSCPS_RSP_ID_UNSUPPORT
Failed because of unsupport command.
uint8_t ths_mode
THS Mode.
thscps_adv_phy_t phy
Specify what PHY the Controller has changed for TX/RX.
@ THSCPS_EVT_CTRL_PT_IND_DISABLE
THS Control Point indicaiton is disabled.
@ THSCPS_RSP_ID_TEST_ROLE_ERR
Failed becaude of Test role error.
@ THSCPS_CTRL_PT_ADV_PARAM
Advertising parameters set.
@ THSCPS_SETTINGS_TYPE_TRANS_MODE
Data transmission mode.
uint8_t conn_idx
Connection of cmd set.
thscps_ctrl_pt_id_t
THS Control Point Service Control Point IDs.
@ THSCPS_EVT_TSET_SET_NTF_ENABLE
THS Test Information notification is enabled.
@ THSCPS_CTRL_PT_INVALID
Invalid cmd id.
thscps_evt_type_t evt_type
THS client event type.
@ THSCPS_TEST_STOP
Throughput Test is not ongoing.
void(* thscps_evt_handler_t)(thscps_evt_t *p_evt)
THS Control Point Service event handler type.
uint8_t conn_idx
The connection index.
@ THSCPS_SETTINGS_TYPE_TOGGLE
Throughput toggle state of sending the data.
@ THSCPS_SETTINGS_TYPE_MTU
MTU Size.
@ THSCPS_TEST_ROLE_SLAVE
Test role: Slave.
@ THSCPS_EVT_CONN_INFO_NTF_DISABLE
THS Connection Information notification is disabled.
@ THSCPS_CTRL_PT_ADV_ACTION
Advertiding action.
THS Control Point Response value.
uint16_t packets_val
Recieved Packects value.
@ THSCPS_EVT_INVALID
Throughput Control Point Service invalid event.
uint8_t cmd_id
Commander ID.
@ THSCPS_EVT_ADV_ACTION
Set advertising action.
@ THSCPS_TEST_ROLE_INVALID
Test role: Invalid.
@ THSCPS_TEST_STARTED
Throughput Test is ongoing.