Functions
Functions
BLE Services » Current Time Service Client (CTS_C)
Collaboration diagram for Functions:

## Functions
sdk_err_t | cts_client_init (cts_c_evt_handler_t evt_handler)
| Register CTS Client event handler. More...
sdk_err_t | cts_c_disc_srvc_start (uint8_t conn_idx)
| Discovery Current Time Service on peer. More...
sdk_err_t | cts_c_cur_time_notify_set (uint8_t conn_idx, bool is_enable)
| Enable or disable peer Current Time characteristic notify. More...
sdk_err_t | cts_c_cur_time_read (uint8_t conn_idx)
| Read Current Time characteristic value. More...
sdk_err_t | cts_c_loc_time_info_read (uint8_t conn_idx)
| Read Local Time Information characteristic value. More...
sdk_err_t | cts_c_ref_time_info_read (uint8_t conn_idx)
| Read Reference Time Information characteristic value. More...
sdk_err_t | cts_c_cur_time_set (uint8_t conn_idx, cts_c_cur_time_t *p_cur_time)
| Set Current Time characteristic value. More...
sdk_err_t | cts_c_loc_time_info_set (uint8_t conn_idx, cts_c_loc_time_info_t *p_loc_time_info)
| Set Local Time Information characteristic value. More...
void | cts_c_data_parse (uint8_t *p_data, uint16_t length)
| Data accepts data and processing functions. More...

## Detailed Description

## Function Documentation

## ◆ cts_c_cur_time_notify_set()

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

Enable or disable peer Current Time characteristic notify.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | is_enable | True or false.

Returns
  Operation result.

## ◆ cts_c_cur_time_read()

sdk_err_t cts_c_cur_time_read | ( | uint8_t | conn_idx | ) |

Read Current Time characteristic value.

Parameters

  [in] | conn_idx | Index of connection.

Returns
  Operation result.

## ◆ cts_c_cur_time_set()

sdk_err_t cts_c_cur_time_set | ( | uint8_t | conn_idx,
|  | cts_c_cur_time_t * | p_cur_time
| ) |  |

Set Current Time characteristic value.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | p_cur_time | Pointer to current time value set.

Returns
  Operation result.

## ◆ cts_c_data_parse()

void cts_c_data_parse | ( | uint8_t * | p_data,
|  | uint16_t | length
| ) |  |

Data accepts data and processing functions.

Parameters

  [in] | p_data | Serial port data.
  [in] | length | Data length.

## ◆ cts_c_disc_srvc_start()

sdk_err_t cts_c_disc_srvc_start | ( | uint8_t | conn_idx | ) |

Discovery Current Time Service on peer.

Parameters

  [in] | conn_idx | Index of connection.

Returns
  Operation result.

## ◆ cts_c_loc_time_info_read()

sdk_err_t cts_c_loc_time_info_read | ( | uint8_t | conn_idx | ) |

Read Local Time Information characteristic value.

Parameters

  [in] | conn_idx | Index of connection.

Returns
  Operation result.

## ◆ cts_c_loc_time_info_set()

sdk_err_t cts_c_loc_time_info_set | ( | uint8_t | conn_idx,
|  | cts_c_loc_time_info_t * | p_loc_time_info
| ) |  |

Set Local Time Information characteristic value.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | p_loc_time_info | Pointer to local time information value set.

Returns
  Operation result.

## ◆ cts_c_ref_time_info_read()

sdk_err_t cts_c_ref_time_info_read | ( | uint8_t | conn_idx | ) |

Read Reference Time Information characteristic value.

Parameters

  [in] | conn_idx | Index of connection.

Returns
  Operation result.

## ◆ cts_client_init()

sdk_err_t cts_client_init | ( | cts_c_evt_handler_t | evt_handler | ) |

Register CTS Client event handler.

Parameters

  [in] | evt_handler | Current Time Service Client event handler.

Returns
  Result of initialization.