7#ifndef BT_CTS_CLIENT_H_
8#define BT_CTS_CLIENT_H_
18#include <zephyr/bluetooth/gatt.h>
19#include <zephyr/bluetooth/conn.h>
void(* bt_cts_notify_cb)(struct bt_cts_client *cts_c, struct bt_cts_current_time *current_time)
Value notification callback.
Definition cts_client.h:74
int bt_cts_subscribe_current_time(struct bt_cts_client *cts_c, bt_cts_notify_cb func)
Subscribe to the current time value change notification.
int bt_cts_client_init(struct bt_cts_client *cts_c)
Function for initializing the Current Time Service client.
int bt_cts_read_current_time(struct bt_cts_client *cts_c, bt_cts_read_cb func)
Function for reading the peer's Current Time Service Current Time characteristic.
void(* bt_cts_read_cb)(struct bt_cts_client *cts_c, struct bt_cts_current_time *current_time, int err)
Read complete callback.
Definition cts_client.h:62
int bt_cts_handles_assign(struct bt_gatt_dm *dm, struct bt_cts_client *cts_c)
Function for assigning handles to this instance of cts_c.
int bt_cts_unsubscribe_current_time(struct bt_cts_client *cts_c)
Remove the subscription.
uint8_t external_reference_time_update
Definition cts_client.h:41
uint8_t manual_time_update
Definition cts_client.h:40
uint8_t change_of_time_zone
Definition cts_client.h:42
uint8_t change_of_daylight_savings_time
Definition cts_client.h:43
"Adjust Reason" field of the Current Time characteristic.
Definition cts_client.h:39
bt_cts_read_cb read_cb
Definition cts_client.h:98
struct bt_gatt_read_params read_params
Definition cts_client.h:92
uint16_t handle_ct_ccc
Definition cts_client.h:86
bt_cts_notify_cb notify_cb
Definition cts_client.h:101
struct bt_gatt_subscribe_params notify_params
Definition cts_client.h:95
struct bt_conn * conn
Definition cts_client.h:80
atomic_t state
Definition cts_client.h:89
uint16_t handle_ct
Definition cts_client.h:83
Current Time Service client structure. This structure contains status information for the client.
Definition cts_client.h:78
struct bt_cts_exact_time_256 exact_time_256
Definition cts_client.h:48
struct bt_cts_adjust_reason adjust_reason
Definition cts_client.h:49
Data structure for the Current Time characteristic.
Definition cts_client.h:47
uint8_t fractions256
Definition cts_client.h:35
uint8_t day_of_week
Definition cts_client.h:34
uint8_t seconds
Definition cts_client.h:33
uint8_t day
Definition cts_client.h:30
uint8_t hours
Definition cts_client.h:31
uint8_t month
Definition cts_client.h:29
uint16_t year
Definition cts_client.h:28
uint8_t minutes
Definition cts_client.h:32
"Exact Time 256" field of the Current Time characteristic.
Definition cts_client.h:27