Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Current Time Service callback structure. More...

#include <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 updated by a peer.
 
int(* fill_current_cts_time )(struct bt_cts_time_format *cts_time)
 When current time Read request or notification is triggered, CTS uses this callback to retrieve current time information from application.
 

Detailed Description

Current Time Service callback structure.

Field Documentation

◆ cts_time_write

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

The Current Time has been updated by a peer.

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

Parameters
cts_time[IN] updated time
Returns
0 application has decoded it successfully
negative error codes on failure

◆ fill_current_cts_time

int(* bt_cts_cb::fill_current_cts_time) (struct bt_cts_time_format *cts_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

Note
this callback is mandatory
Parameters
cts_time[IN] updated time
Returns
0 application has encoded it successfully
negative error codes 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: