NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
access.h
1/* Bluetooth Mesh */
2
3/*
4 * Copyright (c) 2017 Intel Corporation
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
9#ifndef __ACCESS_H__
10#define __ACCESS_H__
11
12#include "../include/mesh/mesh.h"
13
14/* Tree walk return codes */
15enum bt_mesh_walk {
16 BT_MESH_WALK_STOP,
17 BT_MESH_WALK_CONTINUE,
18};
19
20void bt_mesh_elem_register(struct bt_mesh_elem *elem, uint8_t count);
21
22uint8_t bt_mesh_elem_count(void);
23
24/* Find local element based on unicast address */
25struct bt_mesh_elem *bt_mesh_elem_find(uint16_t addr);
26
27bool bt_mesh_has_addr(uint16_t addr);
28bool bt_mesh_model_has_key(struct bt_mesh_model *mod, uint16_t key);
29
30void bt_mesh_model_extensions_walk(struct bt_mesh_model *root,
31 enum bt_mesh_walk (*cb)(struct bt_mesh_model *mod,
32 void *user_data),
33 void *user_data);
34
35uint16_t *bt_mesh_model_find_group(struct bt_mesh_model **mod, uint16_t addr);
36
37void bt_mesh_model_foreach(void (*func)(struct bt_mesh_model *mod,
38 struct bt_mesh_elem *elem,
39 bool vnd, bool primary,
40 void *user_data),
41 void *user_data);
42
43int32_t bt_mesh_model_pub_period_get(struct bt_mesh_model *mod);
44
45void bt_mesh_comp_provision(uint16_t addr);
46void bt_mesh_comp_unprovision(void);
47
48uint16_t bt_mesh_primary_addr(void);
49
50const struct bt_mesh_comp *bt_mesh_comp_get(void);
51
52struct bt_mesh_model *bt_mesh_model_get(bool vnd, uint8_t elem_idx, uint8_t mod_idx);
53
54void bt_mesh_model_recv(struct bt_mesh_net_rx *rx, struct os_mbuf *buf);
55
56int bt_mesh_comp_register(const struct bt_mesh_comp *comp);
57
58void bt_mesh_model_pending_store(void);
59void bt_mesh_model_bind_store(struct bt_mesh_model *mod);
60void bt_mesh_model_sub_store(struct bt_mesh_model *mod);
61void bt_mesh_model_pub_store(struct bt_mesh_model *mod);
62void bt_mesh_model_settings_commit(void);
63
71void bt_mesh_msg_cb_set(void (*cb)(uint32_t opcode, struct bt_mesh_msg_ctx *ctx,
72 struct os_mbuf *buf));
73
84int bt_mesh_msg_send(struct bt_mesh_msg_ctx *ctx, struct os_mbuf *buf, uint16_t src_addr,
85 const struct bt_mesh_send_cb *cb, void *cb_data);
86
87void bt_mesh_access_init(void);
88#endif
Definition access.h:611
Definition access.h:70
Definition access.h:444
Definition msg.h:80
Definition os_mbuf.h:86