thscps.h
Go to the documentation of this file.
1 /**
2 *****************************************************************************************
3 *
4 * @file thscps.h
5 *
6 * @brief Throughput Control Point Service API
7 *
8 *****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 *****************************************************************************************
36 */
37
38 /**
39 * @addtogroup BLE_SRV BLE Services
40 * @{
41 * @brief Definitions and prototypes for the BLE Service Interface.
42 */
43
44 /**
45 * @defgroup BLE_SDK_THSCPS Throughput Control Point Client (THSCPS)
46 * @{
47 * @brief THS Control Point Interface module.
48 *
49 * @details The Throughput Control Point Service contains the APIs and types, which can be used by the
50 * application to perform throughput parameters set.
51 *
52 * After \ref thscps_evt_handler_t variable is initialized, the application must call \ref thscps_service_init()
53 * to add the Throughput Control Point Service and THS Control Point, THS Control Point Response characteristics
54 * to the BLE Stack database.
55 */
56
57 #ifndef __THSCPS_H__
58 #define __THSCPS_H__
59
60 #include "ble_prf_types.h"
61 #include "gr_includes.h"
62 #include "custom_config.h"
63
64 /**
65 * @defgroup THSCPS_MACRO Defines
66 * @{
67 */
68 #define THSCPS_CONNECTION_MAX 10 /**< Maximum number of THSCPS connections. */
69 #define THSCPS_CTRL_PT_VAL_LEN 20 /**< Length of the value of Control Point characteristic. */
70 #define THSCPS_TEST_SETTING_VAL_LEN 20 /**< Length of the value of Test Setting characteristic. */
71 #define THSCPS_TEST_INFO_VAL_LEN 20 /**< Length of the value of Test Information characteristic. */
72 #define THSCPS_CONN_INFO_VAL_LEN 20 /**< Length of the value of Connection Information characteristic. */
73 #define THSCPS_SERVICE_UUID 0x1B, 0xD7, 0x90, 0xEC, 0xE8, 0xB9, 0x75, 0x80,\
74 0x0A, 0x46, 0x44, 0xD3, 0x01, 0x07, 0xED, 0xA6 /**< The UUID of THS Control Point Control Point Service for setting advertising data. */
75 #define THSCPS_ACTION_ON 0x01 /**< Start the action. */
76 #define THSCPS_ACTION_OFF 0x00 /**< Stop the action. */
77 #define THSCPS_CTRL_PT_RSP_CODE 0xff /**< Response code. */
78 /** @} */
79
80 /**
81 * @defgroup THSCPS_ENUM Enumerations
82 * @{
83 */
84 /**@brief Local device GAP Role Type. */
85 typedef enum
86 {
87 THSCPS_TEST_ROLE_INVALID, /**< Test role: Invalid. */
88 THSCPS_TEST_ROLE_SLAVE, /**< Test role: Slave. */
89 THSCPS_TEST_ROLE_MASTER, /**< Test role: Master. */
90 } thscps_test_role_t;
91
92 /**
93 * @brief Specify PHY. */
94 typedef enum
95 {
96 THSCPS_LEGACY_ADV_PHY, /**< Undefined LE PHY. */
97 THSCPS_1MBPS_PHY, /**< LE 1M PHY. */
98 THSCPS_CODED_PHY , /**< LE Coded PHY. */
99 } thscps_adv_phy_t;
100
101 /**@brief Throughput Test State. */
102 typedef enum
103 {
104 THSCPS_TEST_STOP, /**< Throughput Test is not ongoing. */
105 THSCPS_TEST_STARTED, /**< Throughput Test is ongoing. */
106 } thscps_test_state_t;
107
108 /**@brief THS Control Point Service Control Point IDs. */
109 typedef enum
110 {
111 THSCPS_CTRL_PT_INVALID, /**< Invalid cmd id. */
112 THSCPS_CTRL_PT_TEST_ROLE, /**< Test role set. */
113 THSCPS_CTRL_PT_ADV_PARAM, /**< Advertising parameters set. */
114 THSCPS_CTRL_PT_ADV_ACTION, /**< Advertiding action. */
115 THSCPS_CTRL_PT_SCAN_ACTION, /**< Scan action. */
116 THSCPS_CTRL_PT_TEST_READY, /**< Ready for test. */
117 THSCPS_CTRL_PT_SETTING,
118 } thscps_ctrl_pt_id_t;
119
120 /**@brief Throughput service settings types. */
121 typedef enum
122 {
123 THSCPS_SETTINGS_TYPE_CI, /**< BLE Connection Interval parameter. */
124 THSCPS_SETTINGS_TYPE_MTU, /**< MTU Size. */
125 THSCPS_SETTINGS_TYPE_PDU, /**< PDU Size. */
126 THSCPS_SETTINGS_TYPE_PHY, /**< Radio Phy mode, 1M, 2M, Encoded. */
127 THSCPS_SETTINGS_TYPE_TRANS_MODE, /**< Data transmission mode. */
128 THSCPS_SETTINGS_TYPE_TX_POWER, /**< Connect Tx power. */
129 THSCPS_SETTINGS_TYPE_TOGGLE, /**< Throughput toggle state of sending the data. */
130 }thscps_settings_type_t;
131
132 /**@brief THS Control Point Response Types. */
133 typedef enum
134 {
135 THSCPS_RSP_ID_SUCCESS, /**< Success. */
136 THSCPS_RSP_ID_UNSUPPORT, /**< Failed because of unsupport command. */
137 THSCPS_RSP_ID_STATUS_ERR, /**< Failed because of disallowed status. */
138 THSCPS_RSP_ID_PARAM_ERR, /**< Failed because of parameter error. */
139 THSCPS_RSP_ID_TEST_ROLE_ERR, /**< Failed becaude of Test role error. */
140 THSCPS_RSP_ID_SDK_ERR, /**< Failed becaude of SDK error Size. */
141 } thscps_status_rsp_t;
142
143 /**@brief THS Control Point Service Event Type. */
144 typedef enum
145 {
146 THSCPS_EVT_INVALID, /**< Throughput Control Point Service invalid event. */
147 THSCPS_EVT_CTRL_PT_IND_ENABLE, /**< THS Control Point indicaiton is enabled. */
148 THSCPS_EVT_CTRL_PT_IND_DISABLE, /**< THS Control Point indicaiton is disabled. */
149 THSCPS_EVT_TSET_SET_NTF_ENABLE, /**< THS Test Information notification is enabled. */
150 THSCPS_EVT_TSET_SET_NTF_DISABLE, /**< THS Test Information notification is disabled. */
151 THSCPS_EVT_TSET_INFO_NTF_ENABLE, /**< THS Test Information notification is enabled. */
152 THSCPS_EVT_TSET_INFO_NTF_DISABLE, /**< THS Test Information notification is disabled. */
153 THSCPS_EVT_CONN_INFO_NTF_ENABLE, /**< THS Connection Information notification is enabled. */
154 THSCPS_EVT_CONN_INFO_NTF_DISABLE, /**< THS Connection Information notification is disabled. */
155 THSCPS_EVT_TEST_ROLE_SET, /**< Set Test role. */
156 THSCPS_EVT_ADV_PRAM_SET, /**< Set advertising parameters. */
157 THSCPS_EVT_ADV_ACTION, /**< Set advertising action. */
158 THSCPS_EVT_SCAN_ACTION, /**< Set scan action. */
159 THSCPS_EVT_SETTING_SET, /**< Throughput setting. */
160 } thscps_evt_type_t;
161 /** @} */
162
163 /**
164 * @defgroup THSCPS_STRUCT Structures
165 * @{
166 */
167 /**@brief THS Setting Information value. */
168 typedef struct
169 {
170 uint16_t length; /**< THS Setting Information length. */
171 const uint8_t *p_data; /**< THS Setting Information data. */
172 } thscps_setting_t;
173
174 /**@brief THS Test Information value. */
175 typedef struct
176 {
177 int8_t rssi; /**< RX rssi. */
178 uint8_t right_rate; /**< RX right rate. */
179 uint16_t instant_val; /**< Instant throughput value. */
180 uint16_t average_val; /**< Average throughput value. */
181 uint16_t packets_val; /**< Recieved Packects value. */
182 } thscps_test_info_t;
183
184 /**@brief THS connect Information value. */
185 typedef struct
186 {
187 uint16_t ci; /**< Connect Interval. */
188 uint16_t pdu; /**< PDU. */
189 uint16_t mtu; /**< MTU. */
190 uint8_t tx_phy; /**< TX PHY. */
191 uint8_t rx_phy; /**< RX PHY. */
192 int8_t tx_power; /**< TX Power. */
193 uint8_t ths_mode; /**< THS Mode. */
194 } thscps_test_conn_info_t;
195
196 /**@brief THS Control Point Advertising Parameters. */
197 typedef struct
198 {
199 thscps_adv_phy_t phy; /**< Specify what PHY the Controller has changed for TX/RX. */
200 uint16_t interval; /**< Advertising interval. */
201 uint16_t duration; /**< Advertising duration. */
202 int8_t tx_power; /**< Advertising tx power. */
203 } thscps_adv_param_t;
204
205 /**@brief THS Control Point Response value. */
206 typedef struct
207 {
208 uint8_t cmd_id; /**< Commander ID. */
209 thscps_status_rsp_t status; /**< Status. */
210 uint8_t conn_idx; /**< Connection of cmd set. */
211 } thscps_rsp_val_t;
212
213 /**@brief THS Control Point Service event. */
214 typedef struct
215 {
216 uint8_t conn_idx; /**< The connection index. */
217 thscps_evt_type_t evt_type; /**< THS client event type. */
218 union
219 {
220 uint8_t action_set; /**< Set action. */
221 thscps_test_role_t test_role; /**< GAP role type. */
222 thscps_adv_param_t adv_param; /**< Advertising parameters. */
223 thscps_setting_t setting_info; /**< Setting infomation. */
224 } param; /**< Event parameters. */
225 } thscps_evt_t;
226 /** @} */
227
228 /**
229 * @defgroup THSCPS_TYPEDEF Typedefs
230 * @{
231 */
232 /**@brief THS Control Point Service event handler type. */
233 typedef void (*thscps_evt_handler_t)(thscps_evt_t *p_evt);
234 /** @} */
235
236 /**
237 * @defgroup THSCPS_FUNCTION Functions
238 * @{
239 */
240 /**
241 *****************************************************************************************
242 * @brief Initialize a THS Control Point Service instance and add in the DB.
243 *
244 * @param[in] evt_handler: THS Control Point Service event handler.
245 *
246 * @return Result of service initialization.
247 *****************************************************************************************
248 */
249 sdk_err_t thscps_service_init(thscps_evt_handler_t evt_handler);
250
251 /**
252 *****************************************************************************************
253 * @brief Send Control Point Response if its indicaiton has been enabled.
254 *
255 * @param[in] conn_idx: Connnection index.
256 * @param[in] p_rsp_val: Pointer to Response value.
257 *
258 * @return Result of indicate value.
259 *****************************************************************************************
260 */
261 sdk_err_t thscps_ctrl_pt_rsp_send(uint8_t conn_idx, thscps_rsp_val_t *p_rsp_val);
262
263 /**
264 *****************************************************************************************
265 * @brief Send Settings Response if its notification has been enabled.
266 *
267 * @param[in] conn_idx: Connnection index.
268 * @param[in] p_rsp_val: Pointer to Response value.
269 *
270 * @return Result of indicate value.
271 *****************************************************************************************
272 */
273 sdk_err_t thscps_test_setting_rsp_send(uint8_t conn_idx, thscps_rsp_val_t *p_rsp_val);
274
275 /**
276 *****************************************************************************************
277 * @brief Send Throughput Test Information if its notification has been enabled.
278 *
279 * @param[in] conn_idx: Connnection index.
280 * @param[in] p_test_info: Pointer to test information value.
281 *
282 * @return Result of notify value.
283 *****************************************************************************************
284 */
285 sdk_err_t thscps_test_info_send(uint8_t conn_idx, thscps_test_info_t *p_test_info);
286
287 /**
288 *****************************************************************************************
289 * @brief Send Throughput Test Connect Information if its notification has been enabled.
290 *
291 * @param[in] conn_idx: Connnection index.
292 * @param[in] p_conn_info: Pointer to connection information value.
293 *
294 * @return Result of notify value.
295 *****************************************************************************************
296 */
297 sdk_err_t thscps_conn_info_send(uint8_t conn_idx, thscps_test_conn_info_t *p_conn_info);
298
299 /**
300 *****************************************************************************************
301 * @brief Set throughput state set.
302 *
303 * @param[in] test_state: Throughput Test state.
304 *****************************************************************************************
305 */
306 void thscps_test_state_set(thscps_test_state_t test_state);
307 /** @} */
308 #endif
309 /** @} */
310 /** @} */
THSCPS_EVT_CTRL_PT_IND_ENABLE
@ THSCPS_EVT_CTRL_PT_IND_ENABLE
THS Control Point indicaiton is enabled.
Definition: thscps.h:147
thscps_evt_t::setting_info
thscps_setting_t setting_info
Setting infomation.
Definition: thscps.h:223
thscps_conn_info_send
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.
thscps_adv_param_t::tx_power
int8_t tx_power
Advertising tx power.
Definition: thscps.h:202
thscps_adv_param_t::duration
uint16_t duration
Advertising duration.
Definition: thscps.h:201
THSCPS_TEST_ROLE_MASTER
@ THSCPS_TEST_ROLE_MASTER
Test role: Master.
Definition: thscps.h:89
thscps_service_init
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
@ THSCPS_LEGACY_ADV_PHY
Undefined LE PHY.
Definition: thscps.h:96
thscps_adv_phy_t
thscps_adv_phy_t
Specify PHY.
Definition: thscps.h:95
thscps_setting_t::p_data
const uint8_t * p_data
THS Setting Information data.
Definition: thscps.h:171
THSCPS_EVT_TSET_INFO_NTF_ENABLE
@ THSCPS_EVT_TSET_INFO_NTF_ENABLE
THS Test Information notification is enabled.
Definition: thscps.h:151
thscps_test_info_t::right_rate
uint8_t right_rate
RX right rate.
Definition: thscps.h:178
thscps_adv_param_t::interval
uint16_t interval
Advertising interval.
Definition: thscps.h:200
thscps_evt_t
THS Control Point Service event.
Definition: thscps.h:215
THSCPS_SETTINGS_TYPE_PHY
@ THSCPS_SETTINGS_TYPE_PHY
Radio Phy mode, 1M, 2M, Encoded.
Definition: thscps.h:126
THSCPS_CTRL_PT_SCAN_ACTION
@ THSCPS_CTRL_PT_SCAN_ACTION
Scan action.
Definition: thscps.h:115
thscps_test_state_t
thscps_test_state_t
Throughput Test State.
Definition: thscps.h:103
thscps_test_setting_rsp_send
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.
thscps_test_conn_info_t::ci
uint16_t ci
Connect Interval.
Definition: thscps.h:187
THSCPS_EVT_TSET_SET_NTF_DISABLE
@ THSCPS_EVT_TSET_SET_NTF_DISABLE
THS Test Information notification is disabled.
Definition: thscps.h:150
thscps_evt_t::test_role
thscps_test_role_t test_role
GAP role type.
Definition: thscps.h:221
thscps_test_conn_info_t
THS connect Information value.
Definition: thscps.h:186
thscps_evt_t::adv_param
thscps_adv_param_t adv_param
Advertising parameters.
Definition: thscps.h:222
thscps_ctrl_pt_rsp_send
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
@ THSCPS_1MBPS_PHY
LE 1M PHY.
Definition: thscps.h:97
thscps_test_state_set
void thscps_test_state_set(thscps_test_state_t test_state)
Set throughput state set.
thscps_test_info_t::rssi
int8_t rssi
RX rssi.
Definition: thscps.h:177
gr_includes.h
Include Files API.
THSCPS_EVT_TEST_ROLE_SET
@ THSCPS_EVT_TEST_ROLE_SET
Set Test role.
Definition: thscps.h:155
thscps_rsp_val_t::status
thscps_status_rsp_t status
Status.
Definition: thscps.h:209
THSCPS_EVT_ADV_PRAM_SET
@ THSCPS_EVT_ADV_PRAM_SET
Set advertising parameters.
Definition: thscps.h:156
THSCPS_RSP_ID_SDK_ERR
@ THSCPS_RSP_ID_SDK_ERR
Failed becaude of SDK error Size.
Definition: thscps.h:140
thscps_status_rsp_t
thscps_status_rsp_t
THS Control Point Response Types.
Definition: thscps.h:134
THSCPS_SETTINGS_TYPE_PDU
@ THSCPS_SETTINGS_TYPE_PDU
PDU Size.
Definition: thscps.h:125
thscps_adv_param_t
THS Control Point Advertising Parameters.
Definition: thscps.h:198
THSCPS_SETTINGS_TYPE_TX_POWER
@ THSCPS_SETTINGS_TYPE_TX_POWER
Connect Tx power.
Definition: thscps.h:128
thscps_test_info_send
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.
thscps_test_info_t
THS Test Information value.
Definition: thscps.h:176
thscps_setting_t::length
uint16_t length
THS Setting Information length.
Definition: thscps.h:170
thscps_test_info_t::average_val
uint16_t average_val
Average throughput value.
Definition: thscps.h:180
THSCPS_RSP_ID_STATUS_ERR
@ THSCPS_RSP_ID_STATUS_ERR
Failed because of disallowed status.
Definition: thscps.h:137
THSCPS_RSP_ID_PARAM_ERR
@ THSCPS_RSP_ID_PARAM_ERR
Failed because of parameter error.
Definition: thscps.h:138
thscps_evt_t::action_set
uint8_t action_set
Set action.
Definition: thscps.h:220
THSCPS_SETTINGS_TYPE_CI
@ THSCPS_SETTINGS_TYPE_CI
BLE Connection Interval parameter.
Definition: thscps.h:123
thscps_test_info_t::instant_val
uint16_t instant_val
Instant throughput value.
Definition: thscps.h:179
THSCPS_CTRL_PT_TEST_READY
@ THSCPS_CTRL_PT_TEST_READY
Ready for test.
Definition: thscps.h:116
THSCPS_CTRL_PT_SETTING
@ THSCPS_CTRL_PT_SETTING
Definition: thscps.h:117
THSCPS_RSP_ID_SUCCESS
@ THSCPS_RSP_ID_SUCCESS
Success.
Definition: thscps.h:135
THSCPS_EVT_SCAN_ACTION
@ THSCPS_EVT_SCAN_ACTION
Set scan action.
Definition: thscps.h:158
thscps_test_conn_info_t::mtu
uint16_t mtu
MTU.
Definition: thscps.h:189
thscps_setting_t
THS Setting Information value.
Definition: thscps.h:169
ble_prf_types.h
Profile/Service Common Types.
THSCPS_CTRL_PT_TEST_ROLE
@ THSCPS_CTRL_PT_TEST_ROLE
Test role set.
Definition: thscps.h:112
THSCPS_EVT_TSET_INFO_NTF_DISABLE
@ THSCPS_EVT_TSET_INFO_NTF_DISABLE
THS Test Information notification is disabled.
Definition: thscps.h:152
thscps_settings_type_t
thscps_settings_type_t
Throughput service settings types.
Definition: thscps.h:122
THSCPS_EVT_CONN_INFO_NTF_ENABLE
@ THSCPS_EVT_CONN_INFO_NTF_ENABLE
THS Connection Information notification is enabled.
Definition: thscps.h:153
THSCPS_CODED_PHY
@ THSCPS_CODED_PHY
LE Coded PHY.
Definition: thscps.h:98
thscps_evt_type_t
thscps_evt_type_t
THS Control Point Service Event Type.
Definition: thscps.h:145
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:274
thscps_test_role_t
thscps_test_role_t
Local device GAP Role Type.
Definition: thscps.h:86
THSCPS_EVT_SETTING_SET
@ THSCPS_EVT_SETTING_SET
Throughput setting.
Definition: thscps.h:159
THSCPS_RSP_ID_UNSUPPORT
@ THSCPS_RSP_ID_UNSUPPORT
Failed because of unsupport command.
Definition: thscps.h:136
thscps_test_conn_info_t::ths_mode
uint8_t ths_mode
THS Mode.
Definition: thscps.h:193
thscps_adv_param_t::phy
thscps_adv_phy_t phy
Specify what PHY the Controller has changed for TX/RX.
Definition: thscps.h:199
thscps_test_conn_info_t::rx_phy
uint8_t rx_phy
RX PHY.
Definition: thscps.h:191
THSCPS_EVT_CTRL_PT_IND_DISABLE
@ THSCPS_EVT_CTRL_PT_IND_DISABLE
THS Control Point indicaiton is disabled.
Definition: thscps.h:148
THSCPS_RSP_ID_TEST_ROLE_ERR
@ THSCPS_RSP_ID_TEST_ROLE_ERR
Failed becaude of Test role error.
Definition: thscps.h:139
THSCPS_CTRL_PT_ADV_PARAM
@ THSCPS_CTRL_PT_ADV_PARAM
Advertising parameters set.
Definition: thscps.h:113
THSCPS_SETTINGS_TYPE_TRANS_MODE
@ THSCPS_SETTINGS_TYPE_TRANS_MODE
Data transmission mode.
Definition: thscps.h:127
thscps_test_conn_info_t::tx_phy
uint8_t tx_phy
TX PHY.
Definition: thscps.h:190
thscps_test_conn_info_t::tx_power
int8_t tx_power
TX Power.
Definition: thscps.h:192
thscps_rsp_val_t::conn_idx
uint8_t conn_idx
Connection of cmd set.
Definition: thscps.h:210
thscps_ctrl_pt_id_t
thscps_ctrl_pt_id_t
THS Control Point Service Control Point IDs.
Definition: thscps.h:110
THSCPS_EVT_TSET_SET_NTF_ENABLE
@ THSCPS_EVT_TSET_SET_NTF_ENABLE
THS Test Information notification is enabled.
Definition: thscps.h:149
THSCPS_CTRL_PT_INVALID
@ THSCPS_CTRL_PT_INVALID
Invalid cmd id.
Definition: thscps.h:111
thscps_evt_t::evt_type
thscps_evt_type_t evt_type
THS client event type.
Definition: thscps.h:217
THSCPS_TEST_STOP
@ THSCPS_TEST_STOP
Throughput Test is not ongoing.
Definition: thscps.h:104
thscps_evt_handler_t
void(* thscps_evt_handler_t)(thscps_evt_t *p_evt)
THS Control Point Service event handler type.
Definition: thscps.h:233
thscps_evt_t::conn_idx
uint8_t conn_idx
The connection index.
Definition: thscps.h:216
THSCPS_SETTINGS_TYPE_TOGGLE
@ THSCPS_SETTINGS_TYPE_TOGGLE
Throughput toggle state of sending the data.
Definition: thscps.h:129
THSCPS_SETTINGS_TYPE_MTU
@ THSCPS_SETTINGS_TYPE_MTU
MTU Size.
Definition: thscps.h:124
THSCPS_TEST_ROLE_SLAVE
@ THSCPS_TEST_ROLE_SLAVE
Test role: Slave.
Definition: thscps.h:88
thscps_test_conn_info_t::pdu
uint16_t pdu
PDU.
Definition: thscps.h:188
THSCPS_EVT_CONN_INFO_NTF_DISABLE
@ THSCPS_EVT_CONN_INFO_NTF_DISABLE
THS Connection Information notification is disabled.
Definition: thscps.h:154
THSCPS_CTRL_PT_ADV_ACTION
@ THSCPS_CTRL_PT_ADV_ACTION
Advertiding action.
Definition: thscps.h:114
thscps_rsp_val_t
THS Control Point Response value.
Definition: thscps.h:207
thscps_test_info_t::packets_val
uint16_t packets_val
Recieved Packects value.
Definition: thscps.h:181
THSCPS_EVT_INVALID
@ THSCPS_EVT_INVALID
Throughput Control Point Service invalid event.
Definition: thscps.h:146
thscps_rsp_val_t::cmd_id
uint8_t cmd_id
Commander ID.
Definition: thscps.h:208
THSCPS_EVT_ADV_ACTION
@ THSCPS_EVT_ADV_ACTION
Set advertising action.
Definition: thscps.h:157
THSCPS_TEST_ROLE_INVALID
@ THSCPS_TEST_ROLE_INVALID
Test role: Invalid.
Definition: thscps.h:87
THSCPS_TEST_STARTED
@ THSCPS_TEST_STARTED
Throughput Test is ongoing.
Definition: thscps.h:105