nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
time_srv.h File Reference

Go to the source code of this file.

Data Structures

struct  bt_mesh_time_srv_data
 
struct  bt_mesh_time_srv
 

Macros

#define BT_MESH_TIME_SRV_INIT(_time_update_cb)
 Initialization parameters for a Time Server model instance.
 
#define BT_MESH_MODEL_TIME_SRV(_srv, ...)
 Time Server model composition data entry.
 
#define BT_MESH_CLOCK_ACCURACY_METADATA_ID   0x0007
 
#define BT_MESH_TIMEKEEPING_RESERVE_METADATA_ID   0x0008
 
#define BT_MESH_CLOCK_ACCURACY_METADATA(clock_accuracy)
 
#define BT_MESH_TIMEKEEPING_RESERVE_METADATA(timekeeping_reserve)
 

Enumerations

enum  bt_mesh_time_update_types { BT_MESH_TIME_SRV_STATUS_UPDATE , BT_MESH_TIME_SRV_SET_UPDATE , BT_MESH_TIME_SRV_ZONE_UPDATE , BT_MESH_TIME_SRV_UTC_UPDATE }
 

Functions

int bt_mesh_time_srv_time_status_send (struct bt_mesh_time_srv *srv, struct bt_mesh_msg_ctx *ctx)
 Publish an unsolicited Time Status message.
 
int bt_mesh_time_srv_status (struct bt_mesh_time_srv *srv, uint64_t uptime, struct bt_mesh_time_status *status)
 Get the time status at a given uptime.
 
int64_t bt_mesh_time_srv_mktime (struct bt_mesh_time_srv *srv, struct tm *timeptr)
 Get the device uptime at a given local time.
 
struct tm * bt_mesh_time_srv_localtime_r (struct bt_mesh_time_srv *srv, int64_t uptime, struct tm *timeptr)
 Get the device local time at a given uptime.
 
struct tm * bt_mesh_time_srv_localtime (struct bt_mesh_time_srv *srv, int64_t uptime)
 Get the device local time at a given uptime.
 
uint64_t bt_mesh_time_srv_uncertainty_get (struct bt_mesh_time_srv *srv, int64_t uptime)
 Get the device time uncertainty at a given uptime.
 
void bt_mesh_time_srv_time_set (struct bt_mesh_time_srv *srv, int64_t uptime, const struct bt_mesh_time_status *status)
 Set the TAI status parameters for the server.
 
void bt_mesh_time_srv_time_zone_change_set (struct bt_mesh_time_srv *srv, const struct bt_mesh_time_zone_change *data)
 Set the zone change parameters for the server.
 
void bt_mesh_time_srv_tai_utc_change_set (struct bt_mesh_time_srv *srv, const struct bt_mesh_time_tai_utc_change *data)
 Set the TAI UTC change parameters for the server.
 
void bt_mesh_time_srv_role_set (struct bt_mesh_time_srv *srv, enum bt_mesh_time_role role)
 Set the role parameter for the server.