Time models
The Time models allow network-wide time and date synchronization with a granularity of 3.9 ms (1/256th second), and provide services for converting timestamps to and from time zone adjusted UTC time (Coordinated Universal Time). The time is measured based on the International Atomic Time (TAI).
The Time models also feature their own common types, listed below. For types common to all models, see Bluetooth mesh models.
Common types
This section lists the types common to the Time mesh models.
include/bluetooth/mesh/time.h
- group bt_mesh_time
API for the Time models.
Enums
-
enum bt_mesh_time_role
Time Role states
Values:
-
enumerator BT_MESH_TIME_NONE
Does not participate in propagation of time information.
-
enumerator BT_MESH_TIME_AUTHORITY
Publishes Time Status messages but does not process received Time Status messages.
-
enumerator BT_MESH_TIME_RELAY
Processes received and publishes Time Status messages.
-
enumerator BT_MESH_TIME_CLIENT
Does not publish but processes received Time Status messages.
-
enumerator BT_MESH_TIME_NONE
-
struct bt_mesh_time_tai
- #include <time.h>
TAI time.
-
struct bt_mesh_time_status
- #include <time.h>
Parameters for the Time Status message.
Public Members
-
struct bt_mesh_time_tai tai
TAI time.
-
uint64_t uncertainty
Accumulated uncertainty of the mesh Timestamp in milliseconds.
-
int16_t tai_utc_delta
Current TAI-UTC Delta (leap seconds).
-
int16_t time_zone_offset
Current zone offset in 15-minute increments.
-
bool is_authority
Reliable TAI source flag.
-
struct bt_mesh_time_tai tai
-
struct bt_mesh_time_zone_change
- #include <time.h>
Time zone change.
-
struct bt_mesh_time_zone_status
- #include <time.h>
Parameters for the Time Zone Status message.
Public Members
-
int16_t current_offset
Current zone offset in 15-minute increments.
-
struct bt_mesh_time_zone_change time_zone_change
New zone update context
-
int16_t current_offset
-
struct bt_mesh_time_tai_utc_change
- #include <time.h>
Time UTC Delta change.
-
struct bt_mesh_time_tai_utc_delta_status
- #include <time.h>
Parameters for the Time Zone UTC delta Status message.
Public Members
-
int16_t delta_current
Current TAI-UTC Delta (leap seconds).
-
struct bt_mesh_time_tai_utc_change tai_utc_change
New TAI-UTC update context
-
int16_t delta_current
-
enum bt_mesh_time_role