Functions
Functions
BLE Services » Throughput Service Client (THS_C)
Collaboration diagram for Functions:

## Functions
sdk_err_t | ths_client_init (ths_c_evt_handler_t evt_handler)
| Register THS Client event handler. More...
sdk_err_t | ths_c_disc_srvc_start (uint8_t conn_idx)
| Discovery THS on peer. More...
sdk_err_t | ths_c_tx_notify_set (uint8_t conn_idx, bool is_enable)
| Enable or disable peer THS Tx characteristic notify. More...
sdk_err_t | ths_c_setting_notify_set (uint8_t conn_idx, bool is_enable)
| Enable or disable peer THS setting characteristic notify. More...
sdk_err_t | ths_c_comm_param_send (uint8_t conn_idx, uint8_t *p_data, uint16_t length)
| Send communication parameter to peer. More...
sdk_err_t | ths_c_toggle_set (uint8_t conn_idx, bool is_enable)
| Set Throughput service toggle state of sending the data. More...
sdk_err_t | ths_c_tx_data_send (uint8_t conn_idx, uint8_t *p_data, uint16_t length)
| Send data to peer. More...

## Detailed Description

## Function Documentation

## ◆ ths_c_comm_param_send()

sdk_err_t ths_c_comm_param_send | ( | uint8_t | conn_idx,
|  | uint8_t * | p_data,
|  | uint16_t | length
| ) |  |

Send communication parameter to peer.

Parameters

  [in] | conn_idx | Connection index.
  [in] | p_data | Pointer to communication parameter data need sent.
  [in] | length | Length of communication parameter data need sent.

Returns
  Operation result.

## ◆ ths_c_disc_srvc_start()

sdk_err_t ths_c_disc_srvc_start | ( | uint8_t | conn_idx | ) |

Discovery THS on peer.

Parameters

  [in] | conn_idx | Index of connection.

Returns
  Operation result.

## ◆ ths_c_setting_notify_set()

sdk_err_t ths_c_setting_notify_set | ( | uint8_t | conn_idx,
|  | bool | is_enable
| ) |  |

Enable or disable peer THS setting characteristic notify.

Parameters

  [in] | conn_idx | Connection index.
  [in] | is_enable | Enable or disable THS setting notify.

Returns
  Operation result.

## ◆ ths_c_toggle_set()

sdk_err_t ths_c_toggle_set | ( | uint8_t | conn_idx,
|  | bool | is_enable
| ) |  |

Set Throughput service toggle state of sending the data.

Parameters

  [in] | conn_idx | Connection index.
  [in] | is_enable | Enable or disable toggle.

Returns
  Operation result.

## ◆ ths_c_tx_data_send()

sdk_err_t ths_c_tx_data_send | ( | uint8_t | conn_idx,
|  | uint8_t * | p_data,
|  | uint16_t | length
| ) |  |

Send data to peer.

Parameters

  [in] | conn_idx | Connection index.
  [in] | p_data | Pointer to data need sent.
  [in] | length | Length of data need sent.

Returns
  Operation result.

## ◆ ths_c_tx_notify_set()

sdk_err_t ths_c_tx_notify_set | ( | uint8_t | conn_idx,
|  | bool | is_enable
| ) |  |

Enable or disable peer THS Tx characteristic notify.

Parameters

  [in] | conn_idx | Connection index.
  [in] | is_enable | Enable or disable THS Tx notify.

Returns
  Operation result.

## ◆ ths_client_init()

sdk_err_t ths_client_init | ( | ths_c_evt_handler_t | evt_handler | ) |

Register THS Client event handler.

Parameters

  [in] | evt_handler | Throughput Service Client event handler.

Returns
  Result of initialization.