NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
mesh_priv.h
1/* Bluetooth Mesh */
2
3/*
4 * Copyright (c) 2017 Intel Corporation
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8#ifndef __MESH_PRIV_H
9#define __MESH_PRIV_H
10
11#include <stdbool.h>
12#include <stdint.h>
13
14#define BT_MESH_KEY_PRIMARY 0x0000
15#define BT_MESH_KEY_ANY 0xffff
16
17enum bt_mesh_key_evt {
18 BT_MESH_KEY_ADDED, /* New key added */
19 BT_MESH_KEY_DELETED, /* Existing key deleted */
20 BT_MESH_KEY_UPDATED, /* KR phase 1, second key added */
21 BT_MESH_KEY_SWAPPED, /* KR phase 2, now sending on second key */
22 BT_MESH_KEY_REVOKED, /* KR phase 3, old key removed */
23};
24
27 void (*evt_handler)(uint16_t app_idx, uint16_t net_idx,
28 enum bt_mesh_key_evt evt);
29};
30
31struct bt_mesh_net;
32int bt_mesh_start(void);
33
34#define OP_GEN_ONOFF_GET BT_MESH_MODEL_OP_2(0x82, 0x01)
35#define OP_GEN_ONOFF_SET BT_MESH_MODEL_OP_2(0x82, 0x02)
36#define OP_GEN_ONOFF_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x03)
37#define OP_GEN_ONOFF_STATUS BT_MESH_MODEL_OP_2(0x82, 0x04)
38#define OP_GEN_LEVEL_GET BT_MESH_MODEL_OP_2(0x82, 0x05)
39#define OP_GEN_LEVEL_SET BT_MESH_MODEL_OP_2(0x82, 0x06)
40#define OP_GEN_LEVEL_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x07)
41#define OP_GEN_LEVEL_STATUS BT_MESH_MODEL_OP_2(0x82, 0x08)
42#define OP_GEN_DELTA_SET BT_MESH_MODEL_OP_2(0x82, 0x09)
43#define OP_GEN_DELTA_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x0a)
44#define OP_GEN_MOVE_SET BT_MESH_MODEL_OP_2(0x82, 0x0b)
45#define OP_GEN_MOVE_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x0c)
46#define OP_LIGHT_LIGHTNESS_GET BT_MESH_MODEL_OP_2(0x82, 0x4b)
47#define OP_LIGHT_LIGHTNESS_SET BT_MESH_MODEL_OP_2(0x82, 0x4c)
48#define OP_LIGHT_LIGHTNESS_SET_UNACK BT_MESH_MODEL_OP_2(0x82, 0x4d)
49#define OP_LIGHT_LIGHTNESS_STATUS BT_MESH_MODEL_OP_2(0x82, 0x4e)
50
51bool bt_mesh_is_provisioned(void);
52
53#endif
bool bt_mesh_is_provisioned(void)
Check if the local node has been provisioned.
Definition mesh_priv.h:26