nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
14#ifndef BT_MESH_TIME_H__
15#define BT_MESH_TIME_H__
16
17#include <zephyr/types.h>
18#include <zephyr/bluetooth/mesh.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
36};
37
40 uint64_t sec:40,
42};
43
49 uint64_t uncertainty;
56};
57
61 int16_t new_offset;
63 uint64_t timestamp;
64};
65
72};
73
77 int16_t delta_new;
79 uint64_t timestamp;
80};
81
88};
89
91#define BT_MESH_TIME_OP_TIME_GET BT_MESH_MODEL_OP_2(0x82, 0x37)
92#define BT_MESH_TIME_OP_TIME_SET BT_MESH_MODEL_OP_1(0x5C)
93#define BT_MESH_TIME_OP_TIME_STATUS BT_MESH_MODEL_OP_1(0x5D)
94#define BT_MESH_TIME_OP_TIME_ROLE_GET BT_MESH_MODEL_OP_2(0x82, 0x38)
95#define BT_MESH_TIME_OP_TIME_ROLE_SET BT_MESH_MODEL_OP_2(0x82, 0x39)
96#define BT_MESH_TIME_OP_TIME_ROLE_STATUS BT_MESH_MODEL_OP_2(0x82, 0x3A)
97#define BT_MESH_TIME_OP_TIME_ZONE_GET BT_MESH_MODEL_OP_2(0x82, 0x3B)
98#define BT_MESH_TIME_OP_TIME_ZONE_SET BT_MESH_MODEL_OP_2(0x82, 0x3C)
99#define BT_MESH_TIME_OP_TIME_ZONE_STATUS BT_MESH_MODEL_OP_2(0x82, 0x3D)
100#define BT_MESH_TIME_OP_TAI_UTC_DELTA_GET BT_MESH_MODEL_OP_2(0x82, 0x3E)
101#define BT_MESH_TIME_OP_TAI_UTC_DELTA_SET BT_MESH_MODEL_OP_2(0x82, 0x3F)
102#define BT_MESH_TIME_OP_TAI_UTC_DELTA_STATUS BT_MESH_MODEL_OP_2(0x82, 0x40)
103
104#define BT_MESH_TIME_MSG_LEN_GET 0
105#define BT_MESH_TIME_MSG_LEN_TIME_SET 10
106#define BT_MESH_TIME_MSG_MINLEN_TIME_STATUS 5
107#define BT_MESH_TIME_MSG_MAXLEN_TIME_STATUS 10
108#define BT_MESH_TIME_MSG_LEN_TIME_ROLE_SET 1
109#define BT_MESH_TIME_MSG_LEN_TIME_ROLE_STATUS 1
110#define BT_MESH_TIME_MSG_LEN_TIME_ZONE_SET 6
111#define BT_MESH_TIME_MSG_LEN_TIME_ZONE_STATUS 7
112#define BT_MESH_TIME_MSG_LEN_TAI_UTC_DELTA_SET 7
113#define BT_MESH_TIME_MSG_LEN_TAI_UTC_DELTA_STATUS 9
114
117#ifdef __cplusplus
118}
119#endif
120
121#endif /* BT_MESH_TIME_H__ */
122
bt_mesh_time_role
Definition: time.h:25
@ BT_MESH_TIME_RELAY
Definition: time.h:33
@ BT_MESH_TIME_AUTHORITY
Definition: time.h:31
@ BT_MESH_TIME_NONE
Definition: time.h:27
@ BT_MESH_TIME_CLIENT
Definition: time.h:35
uint64_t uncertainty
Definition: time.h:49
bool is_authority
Definition: time.h:55
int16_t time_zone_offset
Definition: time.h:53
struct bt_mesh_time_tai tai
Definition: time.h:47
int16_t tai_utc_delta
Definition: time.h:51
Definition: time.h:45
int16_t delta_new
Definition: time.h:77
uint64_t timestamp
Definition: time.h:79
Definition: time.h:75
struct bt_mesh_time_tai_utc_change tai_utc_change
Definition: time.h:87
int16_t delta_current
Definition: time.h:85
uint64_t sec
Definition: time.h:40
uint64_t subsec
Definition: time.h:41
Definition: time.h:39
uint64_t timestamp
Definition: time.h:63
int16_t new_offset
Definition: time.h:61
Definition: time.h:59
struct bt_mesh_time_zone_change time_zone_change
Definition: time.h:71
int16_t current_offset
Definition: time.h:69
Definition: time.h:67