10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_ACCESS_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_ACCESS_H_
18#define BT_MESH_KEY_UNUSED_ELT_(IDX, _) BT_MESH_KEY_UNUSED
19#define BT_MESH_ADDR_UNASSIGNED_ELT_(IDX, _) BT_MESH_ADDR_UNASSIGNED
20#define BT_MESH_UUID_UNASSIGNED_ELT_(IDX, _) NULL
21#define BT_MESH_MODEL_KEYS_UNUSED(_keys) \
22 { LISTIFY(_keys, BT_MESH_KEY_UNUSED_ELT_, (,)) }
23#define BT_MESH_MODEL_GROUPS_UNASSIGNED(_grps) \
24 { LISTIFY(_grps, BT_MESH_ADDR_UNASSIGNED_ELT_, (,)) }
25#if CONFIG_BT_MESH_LABEL_COUNT > 0
26#define BT_MESH_MODEL_UUIDS_UNASSIGNED() \
27 .uuids = (const uint8_t *[]){ LISTIFY(CONFIG_BT_MESH_LABEL_COUNT, \
28 BT_MESH_UUID_UNASSIGNED_ELT_, (,)) },
30#define BT_MESH_MODEL_UUIDS_UNASSIGNED()
48#define BT_MESH_ADDR_UNASSIGNED 0x0000
49#define BT_MESH_ADDR_ALL_NODES 0xffff
50#define BT_MESH_ADDR_RELAYS 0xfffe
51#define BT_MESH_ADDR_FRIENDS 0xfffd
52#define BT_MESH_ADDR_PROXIES 0xfffc
53#define BT_MESH_ADDR_DFW_NODES 0xfffb
54#define BT_MESH_ADDR_IP_NODES 0xfffa
55#define BT_MESH_ADDR_IP_BR_ROUTERS 0xfff9
64#define BT_MESH_KEY_UNUSED 0xffff
65#define BT_MESH_KEY_ANY 0xffff
66#define BT_MESH_KEY_DEV 0xfffe
67#define BT_MESH_KEY_DEV_LOCAL BT_MESH_KEY_DEV
68#define BT_MESH_KEY_DEV_REMOTE 0xfffd
69#define BT_MESH_KEY_DEV_ANY 0xfffc
77#define BT_MESH_ADDR_IS_UNICAST(addr) ((addr) && (addr) < 0x8000)
81#define BT_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) < 0xff00)
85#define BT_MESH_ADDR_IS_FIXED_GROUP(addr) ((addr) >= 0xff00 && (addr) < 0xffff)
89#define BT_MESH_ADDR_IS_VIRTUAL(addr) ((addr) >= 0x8000 && (addr) < 0xc000)
93#define BT_MESH_ADDR_IS_RFU(addr) ((addr) >= 0xff00 && (addr) <= 0xfff8)
98#define BT_MESH_IS_DEV_KEY(key) (key == BT_MESH_KEY_DEV_LOCAL || \
99 key == BT_MESH_KEY_DEV_REMOTE)
102#define BT_MESH_APP_SEG_SDU_MAX 12
105#define BT_MESH_APP_UNSEG_SDU_MAX 15
108#if defined(CONFIG_BT_MESH_RX_SEG_MAX)
109#define BT_MESH_RX_SEG_MAX CONFIG_BT_MESH_RX_SEG_MAX
111#define BT_MESH_RX_SEG_MAX 0
115#if defined(CONFIG_BT_MESH_TX_SEG_MAX)
116#define BT_MESH_TX_SEG_MAX CONFIG_BT_MESH_TX_SEG_MAX
118#define BT_MESH_TX_SEG_MAX 0
122#define BT_MESH_TX_SDU_MAX MAX((BT_MESH_TX_SEG_MAX * \
123 BT_MESH_APP_SEG_SDU_MAX), \
124 BT_MESH_APP_UNSEG_SDU_MAX)
127#define BT_MESH_RX_SDU_MAX MAX((BT_MESH_RX_SEG_MAX * \
128 BT_MESH_APP_SEG_SDU_MAX), \
129 BT_MESH_APP_UNSEG_SDU_MAX)
140#define BT_MESH_ELEM(_loc, _mods, _vnd_mods) \
143 .model_count = ARRAY_SIZE(_mods), \
144 .vnd_model_count = ARRAY_SIZE(_vnd_mods), \
146 .vnd_models = (_vnd_mods), \
172#define BT_MESH_MODEL_ID_CFG_SRV 0x0000
174#define BT_MESH_MODEL_ID_CFG_CLI 0x0001
176#define BT_MESH_MODEL_ID_HEALTH_SRV 0x0002
178#define BT_MESH_MODEL_ID_HEALTH_CLI 0x0003
180#define BT_MESH_MODEL_ID_REMOTE_PROV_SRV 0x0004
182#define BT_MESH_MODEL_ID_REMOTE_PROV_CLI 0x0005
184#define BT_MESH_MODEL_ID_PRIV_BEACON_SRV 0x000a
186#define BT_MESH_MODEL_ID_PRIV_BEACON_CLI 0x000b
188#define BT_MESH_MODEL_ID_SAR_CFG_SRV 0x000e
190#define BT_MESH_MODEL_ID_SAR_CFG_CLI 0x000f
192#define BT_MESH_MODEL_ID_OP_AGG_SRV 0x0010
194#define BT_MESH_MODEL_ID_OP_AGG_CLI 0x0011
196#define BT_MESH_MODEL_ID_LARGE_COMP_DATA_SRV 0x0012
198#define BT_MESH_MODEL_ID_LARGE_COMP_DATA_CLI 0x0013
200#define BT_MESH_MODEL_ID_SOL_PDU_RPL_SRV 0x0014
202#define BT_MESH_MODEL_ID_SOL_PDU_RPL_CLI 0x0015
204#define BT_MESH_MODEL_ID_ON_DEMAND_PROXY_SRV 0x000c
206#define BT_MESH_MODEL_ID_ON_DEMAND_PROXY_CLI 0x000d
216#define BT_MESH_MODEL_ID_GEN_ONOFF_SRV 0x1000
218#define BT_MESH_MODEL_ID_GEN_ONOFF_CLI 0x1001
220#define BT_MESH_MODEL_ID_GEN_LEVEL_SRV 0x1002
222#define BT_MESH_MODEL_ID_GEN_LEVEL_CLI 0x1003
224#define BT_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_SRV 0x1004
226#define BT_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_CLI 0x1005
228#define BT_MESH_MODEL_ID_GEN_POWER_ONOFF_SRV 0x1006
230#define BT_MESH_MODEL_ID_GEN_POWER_ONOFF_SETUP_SRV 0x1007
232#define BT_MESH_MODEL_ID_GEN_POWER_ONOFF_CLI 0x1008
234#define BT_MESH_MODEL_ID_GEN_POWER_LEVEL_SRV 0x1009
236#define BT_MESH_MODEL_ID_GEN_POWER_LEVEL_SETUP_SRV 0x100a
238#define BT_MESH_MODEL_ID_GEN_POWER_LEVEL_CLI 0x100b
240#define BT_MESH_MODEL_ID_GEN_BATTERY_SRV 0x100c
242#define BT_MESH_MODEL_ID_GEN_BATTERY_CLI 0x100d
244#define BT_MESH_MODEL_ID_GEN_LOCATION_SRV 0x100e
246#define BT_MESH_MODEL_ID_GEN_LOCATION_SETUPSRV 0x100f
248#define BT_MESH_MODEL_ID_GEN_LOCATION_CLI 0x1010
250#define BT_MESH_MODEL_ID_GEN_ADMIN_PROP_SRV 0x1011
252#define BT_MESH_MODEL_ID_GEN_MANUFACTURER_PROP_SRV 0x1012
254#define BT_MESH_MODEL_ID_GEN_USER_PROP_SRV 0x1013
256#define BT_MESH_MODEL_ID_GEN_CLIENT_PROP_SRV 0x1014
258#define BT_MESH_MODEL_ID_GEN_PROP_CLI 0x1015
260#define BT_MESH_MODEL_ID_SENSOR_SRV 0x1100
262#define BT_MESH_MODEL_ID_SENSOR_SETUP_SRV 0x1101
264#define BT_MESH_MODEL_ID_SENSOR_CLI 0x1102
266#define BT_MESH_MODEL_ID_TIME_SRV 0x1200
268#define BT_MESH_MODEL_ID_TIME_SETUP_SRV 0x1201
270#define BT_MESH_MODEL_ID_TIME_CLI 0x1202
272#define BT_MESH_MODEL_ID_SCENE_SRV 0x1203
274#define BT_MESH_MODEL_ID_SCENE_SETUP_SRV 0x1204
276#define BT_MESH_MODEL_ID_SCENE_CLI 0x1205
278#define BT_MESH_MODEL_ID_SCHEDULER_SRV 0x1206
280#define BT_MESH_MODEL_ID_SCHEDULER_SETUP_SRV 0x1207
282#define BT_MESH_MODEL_ID_SCHEDULER_CLI 0x1208
284#define BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_SRV 0x1300
286#define BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_SETUP_SRV 0x1301
288#define BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_CLI 0x1302
290#define BT_MESH_MODEL_ID_LIGHT_CTL_SRV 0x1303
292#define BT_MESH_MODEL_ID_LIGHT_CTL_SETUP_SRV 0x1304
294#define BT_MESH_MODEL_ID_LIGHT_CTL_CLI 0x1305
296#define BT_MESH_MODEL_ID_LIGHT_CTL_TEMP_SRV 0x1306
298#define BT_MESH_MODEL_ID_LIGHT_HSL_SRV 0x1307
300#define BT_MESH_MODEL_ID_LIGHT_HSL_SETUP_SRV 0x1308
302#define BT_MESH_MODEL_ID_LIGHT_HSL_CLI 0x1309
304#define BT_MESH_MODEL_ID_LIGHT_HSL_HUE_SRV 0x130a
306#define BT_MESH_MODEL_ID_LIGHT_HSL_SAT_SRV 0x130b
308#define BT_MESH_MODEL_ID_LIGHT_XYL_SRV 0x130c
310#define BT_MESH_MODEL_ID_LIGHT_XYL_SETUP_SRV 0x130d
312#define BT_MESH_MODEL_ID_LIGHT_XYL_CLI 0x130e
314#define BT_MESH_MODEL_ID_LIGHT_LC_SRV 0x130f
316#define BT_MESH_MODEL_ID_LIGHT_LC_SETUPSRV 0x1310
318#define BT_MESH_MODEL_ID_LIGHT_LC_CLI 0x1311
328#define BT_MESH_MODEL_ID_BLOB_SRV 0x1400
330#define BT_MESH_MODEL_ID_BLOB_CLI 0x1401
340#define BT_MESH_MODEL_ID_DFU_SRV 0x1402
342#define BT_MESH_MODEL_ID_DFU_CLI 0x1403
344#define BT_MESH_MODEL_ID_DFD_SRV 0x1404
346#define BT_MESH_MODEL_ID_DFD_CLI 0x1405
378#define BT_MESH_MODEL_OP_1(b0) (b0)
379#define BT_MESH_MODEL_OP_2(b0, b1) (((b0) << 8) | (b1))
380#define BT_MESH_MODEL_OP_3(b0, cid) ((((b0) << 16) | 0xc00000) | (cid))
383#define BT_MESH_LEN_EXACT(len) (-len)
385#define BT_MESH_LEN_MIN(len) (len)
388#define BT_MESH_MODEL_OP_END { 0, 0, NULL }
390#if !defined(__cplusplus) || defined(__DOXYGEN__)
397#define BT_MESH_MODEL_NO_OPS ((struct bt_mesh_model_op []) \
398 { BT_MESH_MODEL_OP_END })
406#define BT_MESH_MODEL_NONE ((struct bt_mesh_model []){})
425#define BT_MESH_MODEL_CNT_CB(_id, _op, _pub, _user_data, _keys, _grps, _cb) \
429 .keys = (uint16_t []) BT_MESH_MODEL_KEYS_UNUSED(_keys), \
431 .groups = (uint16_t []) BT_MESH_MODEL_GROUPS_UNASSIGNED(_grps), \
432 .groups_cnt = _grps, \
433 BT_MESH_MODEL_UUIDS_UNASSIGNED() \
436 .user_data = _user_data, \
457#define BT_MESH_MODEL_CNT_VND_CB(_company, _id, _op, _pub, _user_data, _keys, _grps, _cb) \
459 .vnd.company = (_company), \
463 .keys = (uint16_t []) BT_MESH_MODEL_KEYS_UNUSED(_keys), \
465 .groups = (uint16_t []) BT_MESH_MODEL_GROUPS_UNASSIGNED(_grps), \
466 .groups_cnt = _grps, \
467 BT_MESH_MODEL_UUIDS_UNASSIGNED() \
468 .user_data = _user_data, \
484#define BT_MESH_MODEL_CB(_id, _op, _pub, _user_data, _cb) \
485 BT_MESH_MODEL_CNT_CB(_id, _op, _pub, _user_data, \
486 CONFIG_BT_MESH_MODEL_KEY_COUNT, \
487 CONFIG_BT_MESH_MODEL_GROUP_COUNT, _cb)
504#if defined(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV)
505#define BT_MESH_MODEL_METADATA_CB(_id, _op, _pub, _user_data, _cb, _metadata) \
509 .keys = (uint16_t []) BT_MESH_MODEL_KEYS_UNUSED(CONFIG_BT_MESH_MODEL_KEY_COUNT), \
510 .keys_cnt = CONFIG_BT_MESH_MODEL_KEY_COUNT, \
511 .groups = (uint16_t []) BT_MESH_MODEL_GROUPS_UNASSIGNED(CONFIG_BT_MESH_MODEL_GROUP_COUNT), \
512 .groups_cnt = CONFIG_BT_MESH_MODEL_GROUP_COUNT, \
513 BT_MESH_MODEL_UUIDS_UNASSIGNED() \
516 .user_data = _user_data, \
517 .metadata = _metadata, \
520#define BT_MESH_MODEL_METADATA_CB(_id, _op, _pub, _user_data, _cb, _metadata) \
521 BT_MESH_MODEL_CB(_id, _op, _pub, _user_data, _cb)
538#define BT_MESH_MODEL_VND_CB(_company, _id, _op, _pub, _user_data, _cb) \
539 BT_MESH_MODEL_CNT_VND_CB(_company, _id, _op, _pub, _user_data, \
540 CONFIG_BT_MESH_MODEL_KEY_COUNT, \
541 CONFIG_BT_MESH_MODEL_GROUP_COUNT, _cb)
558#define BT_MESH_MODEL_VND_METADATA_CB(_company, _id, _op, _pub, _user_data, _cb, _metadata) \
560 .vnd.company = (_company), \
564 .keys = (uint16_t []) BT_MESH_MODEL_KEYS_UNUSED(CONFIG_BT_MESH_MODEL_KEY_COUNT), \
565 .keys_cnt = CONFIG_BT_MESH_MODEL_KEY_COUNT, \
566 .groups = (uint16_t []) BT_MESH_MODEL_GROUPS_UNASSIGNED(CONFIG_BT_MESH_MODEL_GROUP_COUNT), \
567 .groups_cnt = CONFIG_BT_MESH_MODEL_GROUP_COUNT, \
568 BT_MESH_MODEL_UUIDS_UNASSIGNED() \
569 .user_data = _user_data, \
571 .metadata = _metadata, \
585#define BT_MESH_MODEL(_id, _op, _pub, _user_data) \
586 BT_MESH_MODEL_CB(_id, _op, _pub, _user_data, NULL)
600#define BT_MESH_MODEL_VND(_company, _id, _op, _pub, _user_data) \
601 BT_MESH_MODEL_VND_CB(_company, _id, _op, _pub, _user_data, NULL)
614#define BT_MESH_TRANSMIT(count, int_ms) ((count) | (((int_ms / 10) - 1) << 3))
623#define BT_MESH_TRANSMIT_COUNT(transmit) (((transmit) & (uint8_t)BIT_MASK(3)))
632#define BT_MESH_TRANSMIT_INT(transmit) ((((transmit) >> 3) + 1) * 10)
644#define BT_MESH_PUB_TRANSMIT(count, int_ms) BT_MESH_TRANSMIT(count, \
654#define BT_MESH_PUB_TRANSMIT_COUNT(transmit) BT_MESH_TRANSMIT_COUNT(transmit)
663#define BT_MESH_PUB_TRANSMIT_INT(transmit) ((((transmit) >> 3) + 1) * 50)
673#define BT_MESH_PUB_MSG_TOTAL(pub) (BT_MESH_PUB_TRANSMIT_COUNT((pub)->retransmit) + 1)
684#define BT_MESH_PUB_MSG_NUM(pub) (BT_MESH_PUB_TRANSMIT_COUNT((pub)->retransmit) + 1 - (pub)->count)
751#define BT_MESH_MODEL_PUB_DEFINE(_name, _update, _msg_len) \
752 NET_BUF_SIMPLE_DEFINE_STATIC(bt_mesh_pub_msg_##_name, _msg_len); \
753 static struct bt_mesh_model_pub _name = { \
754 .msg = &bt_mesh_pub_msg_##_name, \
782#define BT_MESH_MODELS_METADATA_ENTRY(_len, _id, _data) \
784 .len = (_len), .id = _id, .data = _data, \
788#define BT_MESH_MODELS_METADATA_NONE NULL
791#define BT_MESH_MODELS_METADATA_END { 0, 0, NULL }
809 const char *name,
size_t len_rd,
896#if (CONFIG_BT_MESH_LABEL_COUNT > 0) || defined(__DOXYGEN__)
907#ifdef CONFIG_BT_MESH_MODEL_EXTENSIONS
912#if defined(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV) || defined(__DOXYGEN__)
935 void (*
end)(
int err,
void *cb_data);
940#define BT_MESH_TTL_DEFAULT 0xff
943#define BT_MESH_TTL_MAX 0x7f
1043 const char *name,
const void *data,
bool bt_mesh_model_is_extended(struct bt_mesh_model *model)
Check if model is extended by another model.
#define BT_MESH_PUB_TRANSMIT_COUNT(transmit)
Decode Publish Retransmit count from a given value.
Definition: access.h:654
struct bt_mesh_elem * bt_mesh_model_elem(struct bt_mesh_model *mod)
Get the element that a model belongs to.
static bool bt_mesh_model_pub_is_retransmission(const struct bt_mesh_model *model)
Check if a message is being retransmitted.
Definition: access.h:984
void bt_mesh_model_data_store_schedule(struct bt_mesh_model *mod)
Schedule the model's user data store in persistent storage.
int bt_mesh_models_metadata_change_prepare(void)
Indicate that the metadata will change on next bootup.
struct bt_mesh_model * bt_mesh_model_find_vnd(const struct bt_mesh_elem *elem, uint16_t company, uint16_t id)
Find a vendor model.
int bt_mesh_model_publish(struct bt_mesh_model *model)
Send a model publication message.
int bt_mesh_comp2_register(const struct bt_mesh_comp2 *comp2)
Register composition data page 2 of the device.
int bt_mesh_comp_change_prepare(void)
Indicate that the composition data will change on next bootup.
int bt_mesh_model_correspond(struct bt_mesh_model *corresponding_mod, struct bt_mesh_model *base_mod)
Let a model correspond to another.
struct bt_mesh_model * bt_mesh_model_find(const struct bt_mesh_elem *elem, uint16_t id)
Find a SIG model.
static bool bt_mesh_model_in_primary(const struct bt_mesh_model *mod)
Get whether the model is in the primary element of the device.
Definition: access.h:1026
int bt_mesh_model_data_store(struct bt_mesh_model *mod, bool vnd, const char *name, const void *data, size_t data_len)
Immediately store the model's user data in persistent storage.
int bt_mesh_model_extend(struct bt_mesh_model *extending_mod, struct bt_mesh_model *base_mod)
Let a model extend another.
int bt_mesh_model_send(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *msg, const struct bt_mesh_send_cb *cb, void *cb_data)
Send an Access Layer message.
ssize_t(* settings_read_cb)(void *cb_arg, void *data, size_t len)
Function used to read the data from the settings storage in h_set handler implementations.
Definition: settings.h:59
__SIZE_TYPE__ ssize_t
Definition: types.h:28
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Composition data page 2 record.
Definition: access.h:1145
uint16_t id
Mesh profile ID.
Definition: access.h:1147
struct bt_mesh_comp2_record::@83 version
Mesh Profile Version.
uint8_t y
Minor version.
Definition: access.h:1153
uint8_t x
Major version.
Definition: access.h:1151
const uint8_t * elem_offset
Element offset list.
Definition: access.h:1160
uint16_t data_len
Length of additional data.
Definition: access.h:1162
uint8_t z
Z version.
Definition: access.h:1155
const void * data
Additional data.
Definition: access.h:1164
uint8_t elem_offset_cnt
Element offset count.
Definition: access.h:1158
Node Composition data page 2.
Definition: access.h:1168
size_t record_cnt
The number of Mesh Profile records on a device.
Definition: access.h:1170
const struct bt_mesh_comp2_record * record
List of records.
Definition: access.h:1172
Node Composition.
Definition: access.h:1135
uint16_t pid
Product ID.
Definition: access.h:1137
uint16_t cid
Company ID.
Definition: access.h:1136
uint16_t vid
Version ID.
Definition: access.h:1138
struct bt_mesh_elem * elem
List of elements.
Definition: access.h:1141
size_t elem_count
The number of elements in this device.
Definition: access.h:1140
Abstraction that describes a Mesh Element.
Definition: access.h:150
struct bt_mesh_model *const models
The list of SIG models in this element.
Definition: access.h:162
const uint16_t loc
Location Descriptor (GATT Bluetooth Namespace Descriptors)
Definition: access.h:155
const uint8_t model_count
The number of SIG models in this element.
Definition: access.h:157
struct bt_mesh_model *const vnd_models
The list of vendor models in this element.
Definition: access.h:164
uint16_t addr
Unicast Address.
Definition: access.h:152
const uint8_t vnd_model_count
The number of vendor models in this element.
Definition: access.h:159
Vendor model ID.
Definition: access.h:864
uint16_t company
Vendor's company ID.
Definition: access.h:866
uint16_t id
Model ID.
Definition: access.h:868
Model callback functions.
Definition: access.h:794
int(*const settings_set)(struct bt_mesh_model *model, const char *name, size_t len_rd, settings_read_cb read_cb, void *cb_arg)
Set value handler of user data tied to the model.
Definition: access.h:808
void(*const reset)(struct bt_mesh_model *model)
Model reset callback.
Definition: access.h:850
void(*const pending_store)(struct bt_mesh_model *model)
Callback used to store pending model's user data.
Definition: access.h:860
int(*const start)(struct bt_mesh_model *model)
Callback called when the mesh is started.
Definition: access.h:824
int(*const init)(struct bt_mesh_model *model)
Model init callback.
Definition: access.h:838
Model opcode handler.
Definition: access.h:352
const uint32_t opcode
OpCode encoded using the BT_MESH_MODEL_OP_* macros.
Definition: access.h:354
const ssize_t len
Message length.
Definition: access.h:362
int(*const func)(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf)
Handler function for this opcode.
Definition: access.h:373
Model publication context.
Definition: access.h:691
uint16_t key
Publish AppKey Index.
Definition: access.h:697
uint16_t retr_update
Call update callback on every retransmission.
Definition: access.h:701
int(* update)(struct bt_mesh_model *mod)
Callback for updating the publication buffer.
Definition: access.h:738
uint16_t cred
Friendship Credentials Flag.
Definition: access.h:698
uint8_t retransmit
Retransmit Count & Interval Steps.
Definition: access.h:704
uint16_t addr
Publish Address.
Definition: access.h:695
uint8_t count
Transmissions left.
Definition: access.h:707
uint8_t period_div
Divisor for the Period.
Definition: access.h:706
struct net_buf_simple * msg
Publication buffer, containing the publication message.
Definition: access.h:718
struct bt_mesh_model * mod
The model the context belongs to.
Definition: access.h:693
uint8_t ttl
Publish Time to Live.
Definition: access.h:703
uint32_t period_start
Start of the current period.
Definition: access.h:709
uint16_t send_rel
Force reliable sending (segment acks)
Definition: access.h:699
uint16_t fast_period
Use FastPeriodDivisor.
Definition: access.h:700
const uint8_t * uuid
Label UUID if Publish Address is Virtual Address.
Definition: access.h:696
uint8_t period
Publish Period.
Definition: access.h:705
struct k_work_delayable timer
Publish Period Timer.
Definition: access.h:741
Abstraction that describes a Mesh Model instance.
Definition: access.h:872
uint8_t elem_idx
Definition: access.h:881
const uint8_t **const uuids
List of Label UUIDs the model is subscribed to.
Definition: access.h:898
const struct bt_mesh_mod_id_vnd vnd
Vendor model ID.
Definition: access.h:877
uint16_t *const groups
Subscription List (group or virtual addresses)
Definition: access.h:893
const struct bt_mesh_model_op *const op
Opcode handler list.
Definition: access.h:902
uint16_t *const keys
AppKey List.
Definition: access.h:889
void * user_data
Model-specific user data.
Definition: access.h:918
const struct bt_mesh_model_cb *const cb
Model callback structure.
Definition: access.h:905
uint16_t flags
Definition: access.h:883
const uint16_t keys_cnt
Definition: access.h:890
const uint16_t id
SIG model ID.
Definition: access.h:875
uint8_t mod_idx
Definition: access.h:882
struct bt_mesh_models_metadata_entry ** metadata
Definition: access.h:914
struct bt_mesh_model * next
Definition: access.h:909
const uint16_t groups_cnt
Definition: access.h:894
struct bt_mesh_model_pub *const pub
Model Publication.
Definition: access.h:886
Models Metadata Entry struct.
Definition: access.h:763
const uint16_t len
Definition: access.h:765
void * data
Definition: access.h:771
const uint16_t id
Definition: access.h:768
Message sending context.
Definition: msg.h:76
Callback structure for monitoring model message sending.
Definition: access.h:922
void(* start)(uint16_t duration, int err, void *cb_data)
Handler called at the start of the transmission.
Definition: access.h:929
void(* end)(int err, void *cb_data)
Handler called at the end of the transmission.
Definition: access.h:935
A structure used to submit work after a delay.
Definition: kernel.h:3893
Simple network buffer representation.
Definition: buf.h:83