Functions
Functions
BLE Services » Throughput Service (THS)

## Functions
sdk_err_t | ths_service_init (ths_init_t *p_ths_init)
| Initialize a Throughput Service instance and add in the DB. More...
sdk_err_t | ths_data_send (uint8_t conn_idx, uint8_t *p_data, uint16_t length)
| Send data to peer device. More...
sdk_err_t | ths_settings_notify (uint8_t conn_idx, uint8_t *p_settings, uint16_t length)
| Notify the peer device of the change of settings. More...
ths_transport_mode_t | ths_transport_mode_get (void)
| Get current transport mode of device. More...

## Detailed Description

## Function Documentation

## ◆ ths_data_send()

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

Send data to peer device.

Parameters

  [in] | conn_idx | Connection index
  [in] | p_data | The Pointer of sent value
  [in] | length | The Length of sent value

Returns
  Result of notify and indicate value

## ◆ ths_service_init()

sdk_err_t ths_service_init | ( | ths_init_t * | p_ths_init | ) |

Initialize a Throughput Service instance and add in the DB.

Parameters

  [in] | p_ths_init | Throughput Service initialization variable

Returns
  Result of service initialization.

## ◆ ths_settings_notify()

sdk_err_t ths_settings_notify | ( | uint8_t | conn_idx,
|  | uint8_t * | p_settings,
|  | uint16_t | length
| ) |  |

Notify the peer device of the change of settings.

Parameters

  [in] | conn_idx | Connection index.
  [in] | p_settings | Pointer to the value of new settings.
  [in] | length | The Length of the value of new settings.

Returns
  Result of notify and indicate value

## ◆ ths_transport_mode_get()

ths_transport_mode_t ths_transport_mode_get | ( | void |  | ) |

Get current transport mode of device.

Returns
  Current transport mode.