Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Current Time Service callback structure. More...

#include <zephyr/bluetooth/services/cts.h>

Data Fields

void(* notification_changed )(bool enabled)
 Current Time Service notifications changed.
int(* cts_time_write )(struct bt_cts_time_format *cts_time)
 The Current Time has been requested to update by a peer.
int(* fill_current_cts_time )(struct bt_cts_time_format *cts_time)
 Callback to get current time.
int(* cts_local_time_write )(const struct bt_cts_local_time *cts_local_time)
 The Local Time Information has been requested to update by a peer.
int(* fill_current_cts_local_time )(struct bt_cts_local_time *local_time)
 Request to get current local time.

Detailed Description

Current Time Service callback structure.

Field Documentation

◆ cts_local_time_write

int(* bt_cts_cb::cts_local_time_write) (const struct bt_cts_local_time *cts_local_time)

The Local Time Information has been requested to update by a peer.

It is the responsibility of the application to store the new Local time.

Parameters
[in]local_timeRequested local time to write
Returns
0 if written successfully, negative error code on failure

◆ cts_time_write

int(* bt_cts_cb::cts_time_write) (struct bt_cts_time_format *cts_time)

The Current Time has been requested to update by a peer.

It is the responsibility of the application to store the new time.

Parameters
[in]cts_timeRequested time to write
Returns
0 if written successfully, negative error code on failure

◆ fill_current_cts_local_time

int(* bt_cts_cb::fill_current_cts_local_time) (struct bt_cts_local_time *local_time)

Request to get current local time.

CTS uses this callback to retrieve local time information from application. Application must implement it and provide cts local time information

Parameters
[out]local_timeCurrent local time struct to be filled
Returns
0 if filled successfully, negative error code on failure

◆ fill_current_cts_time

int(* bt_cts_cb::fill_current_cts_time) (struct bt_cts_time_format *cts_time)

Callback to get current time.

When current time Read request or notification is triggered, CTS uses this callback to retrieve current time information from application. Application must implement it and provide cts formatted current time information

Parameters
[out]cts_timeCurrent time for the application to be filled
Returns
0 if filled successfully, negative error code on failure

◆ notification_changed

void(* bt_cts_cb::notification_changed) (bool enabled)

Current Time Service notifications changed.

Parameters
enabledTrue if notifications are enabled, false if disabled

The documentation for this struct was generated from the following file:
  • zephyr/bluetooth/services/cts.h