nRF Connect SDK API
2.8.99
Loading...
Searching...
No Matches
dm_srv.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Nordic Semiconductor ASA
3
*
4
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5
*/
6
14
#ifndef BT_MESH_DM_SRV_H__
15
#define BT_MESH_DM_SRV_H__
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
21
#include <
bluetooth/mesh/models.h
>
22
#include <zephyr/bluetooth/addr.h>
23
#include <zephyr/sys/slist.h>
24
#include <zephyr/bluetooth/mesh/access.h>
25
#include "
dm_common.h
"
26
28
struct
bt_mesh_dm_srv
{
30
struct
bt_mesh_tid_ctx
prev_transaction
;
32
const
struct
bt_mesh_model *
model
;
34
bool
is_busy
;
36
struct
bt_mesh_dm_cfg
cfg
;
38
struct
k_sem
dm_ready_sem
;
40
uint16_t
target_addr
;
42
struct
bt_mesh_msg_ctx
rsp_ctx
;
44
enum
dm_dev_role
current_role
;
46
struct
k_work_delayable
timeout
;
47
48
struct
{
50
struct
bt_mesh_dm_res_entry
*
res
;
52
uint8_t
entry_cnt
;
54
uint8_t
last_entry_idx
;
56
uint8_t
available_entries
;
57
}
results
;
58
};
59
68
#define BT_MESH_MODEL_DM_SRV_INIT(_mem, _cnt) \
69
{ \
70
.results.res = _mem, \
71
.results.entry_cnt = _cnt, \
72
.cfg.ttl = CONFIG_BT_MESH_DEFAULT_TTL, \
73
.cfg.timeout = CONFIG_BT_MESH_DM_SRV_DEFAULT_TIMEOUT, \
74
.cfg.delay = CONFIG_BT_MESH_DM_SRV_REFLECTOR_DELAY, \
75
.results.last_entry_idx = 0, \
76
.results.available_entries = 0, \
77
}
78
85
#define BT_MESH_MODEL_DM_SRV(_srv) \
86
BT_MESH_MODEL_VND_CB(BT_MESH_VENDOR_COMPANY_ID, BT_MESH_MODEL_ID_DM_SRV, \
87
_bt_mesh_dm_srv_op, NULL, \
88
BT_MESH_MODEL_USER_DATA(struct bt_mesh_dm_srv, _srv), \
89
&_bt_mesh_dm_srv_cb)
90
93
extern
const
struct
bt_mesh_model_op _bt_mesh_dm_srv_op[];
94
extern
const
struct
bt_mesh_model_cb _bt_mesh_dm_srv_cb;
95
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif
/* BT_MESH_DM_SRV_H__ */
103
dm_common.h
dm_dev_role
dm_dev_role
Role definition.
Definition
dm.h:28
models.h
bt_mesh_dm_cfg
Definition
dm_common.h:59
bt_mesh_dm_res_entry
Definition
dm_common.h:29
bt_mesh_dm_srv::results
struct bt_mesh_dm_srv::@170 results
bt_mesh_dm_srv::entry_cnt
uint8_t entry_cnt
Definition
dm_srv.h:52
bt_mesh_dm_srv::target_addr
uint16_t target_addr
Definition
dm_srv.h:40
bt_mesh_dm_srv::model
const struct bt_mesh_model * model
Definition
dm_srv.h:32
bt_mesh_dm_srv::res
struct bt_mesh_dm_res_entry * res
Definition
dm_srv.h:50
bt_mesh_dm_srv::cfg
struct bt_mesh_dm_cfg cfg
Definition
dm_srv.h:36
bt_mesh_dm_srv::available_entries
uint8_t available_entries
Definition
dm_srv.h:56
bt_mesh_dm_srv::last_entry_idx
uint8_t last_entry_idx
Definition
dm_srv.h:54
bt_mesh_dm_srv::prev_transaction
struct bt_mesh_tid_ctx prev_transaction
Definition
dm_srv.h:30
bt_mesh_dm_srv::timeout
struct k_work_delayable timeout
Definition
dm_srv.h:46
bt_mesh_dm_srv::is_busy
bool is_busy
Definition
dm_srv.h:34
bt_mesh_dm_srv::dm_ready_sem
struct k_sem dm_ready_sem
Definition
dm_srv.h:38
bt_mesh_dm_srv::current_role
enum dm_dev_role current_role
Definition
dm_srv.h:44
bt_mesh_dm_srv::rsp_ctx
struct bt_mesh_msg_ctx rsp_ctx
Definition
dm_srv.h:42
bt_mesh_dm_srv
Definition
dm_srv.h:28
bt_mesh_tid_ctx
Definition
model_types.h:46
include
bluetooth
mesh
vnd
dm_srv.h
Generated on Tue Nov 5 2024 16:02:08 for nRF Connect SDK API by
1.12.0