nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
gen_prop.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
14#ifndef BT_MESH_GEN_PROP_H__
15#define BT_MESH_GEN_PROP_H__
16
17#include <zephyr/bluetooth/mesh.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
35};
36
47};
48
52 uint16_t id;
55};
56
60 size_t size;
61 uint8_t *value;
62};
63
65#define BT_MESH_PROP_OP_MFR_PROPS_GET BT_MESH_MODEL_OP_2(0x82, 0x2A)
66#define BT_MESH_PROP_OP_MFR_PROPS_STATUS BT_MESH_MODEL_OP_1(0x43)
67#define BT_MESH_PROP_OP_MFR_PROP_GET BT_MESH_MODEL_OP_2(0x82, 0x2B)
68#define BT_MESH_PROP_OP_MFR_PROP_SET BT_MESH_MODEL_OP_1(0x44)
69#define BT_MESH_PROP_OP_MFR_PROP_SET_UNACK BT_MESH_MODEL_OP_1(0x45)
70#define BT_MESH_PROP_OP_MFR_PROP_STATUS BT_MESH_MODEL_OP_1(0x46)
71#define BT_MESH_PROP_OP_ADMIN_PROPS_GET BT_MESH_MODEL_OP_2(0x82, 0x2C)
72#define BT_MESH_PROP_OP_ADMIN_PROPS_STATUS BT_MESH_MODEL_OP_1(0x47)
73#define BT_MESH_PROP_OP_ADMIN_PROP_GET BT_MESH_MODEL_OP_2(0x82, 0x2D)
74#define BT_MESH_PROP_OP_ADMIN_PROP_SET BT_MESH_MODEL_OP_1(0x48)
75#define BT_MESH_PROP_OP_ADMIN_PROP_SET_UNACK BT_MESH_MODEL_OP_1(0x49)
76#define BT_MESH_PROP_OP_ADMIN_PROP_STATUS BT_MESH_MODEL_OP_1(0x4A)
77#define BT_MESH_PROP_OP_USER_PROPS_GET BT_MESH_MODEL_OP_2(0x82, 0x2E)
78#define BT_MESH_PROP_OP_USER_PROPS_STATUS BT_MESH_MODEL_OP_1(0x4B)
79#define BT_MESH_PROP_OP_USER_PROP_GET BT_MESH_MODEL_OP_2(0x82, 0x2F)
80#define BT_MESH_PROP_OP_USER_PROP_SET BT_MESH_MODEL_OP_1(0x4C)
81#define BT_MESH_PROP_OP_USER_PROP_SET_UNACK BT_MESH_MODEL_OP_1(0x4D)
82#define BT_MESH_PROP_OP_USER_PROP_STATUS BT_MESH_MODEL_OP_1(0x4E)
83#define BT_MESH_PROP_OP_CLIENT_PROPS_GET BT_MESH_MODEL_OP_1(0x4F)
84#define BT_MESH_PROP_OP_CLIENT_PROPS_STATUS BT_MESH_MODEL_OP_1(0x50)
85
86#ifndef CONFIG_BT_MESH_PROP_MAXSIZE
87#define CONFIG_BT_MESH_PROP_MAXSIZE 0
88#endif
89
90#ifndef CONFIG_BT_MESH_PROP_MAXCOUNT
91#define CONFIG_BT_MESH_PROP_MAXCOUNT 0
92#endif
93
94#define BT_MESH_PROP_MSG_LEN_PROPS_GET 0
95#define BT_MESH_PROP_MSG_LEN_CLIENT_PROPS_GET 2
96#define BT_MESH_PROP_MSG_MINLEN_PROPS_STATUS 0
97#define BT_MESH_PROP_MSG_MAXLEN_PROPS_STATUS (2 * CONFIG_BT_MESH_PROP_MAXCOUNT)
98#define BT_MESH_PROP_MSG_LEN_PROP_GET 2
99#define BT_MESH_PROP_MSG_MINLEN_PROP_STATUS 3
100#define BT_MESH_PROP_MSG_MAXLEN_PROP_STATUS (3 + CONFIG_BT_MESH_PROP_MAXSIZE)
101#define BT_MESH_PROP_MSG_LEN_MFR_PROP_SET 3
102#define BT_MESH_PROP_MSG_MINLEN_ADMIN_PROP_SET 3
103#define BT_MESH_PROP_MSG_MAXLEN_ADMIN_PROP_SET (3 + CONFIG_BT_MESH_PROP_MAXSIZE)
104#define BT_MESH_PROP_MSG_MINLEN_USER_PROP_SET 2
105#define BT_MESH_PROP_MSG_MAXLEN_USER_PROP_SET (2 + CONFIG_BT_MESH_PROP_MAXSIZE)
106#define BT_MESH_PROP_MSG_MAXLEN(_prop_cnt) \
107 MAX(BT_MESH_MODEL_BUF_LEN(BT_MESH_PROP_OP_MFR_PROP_STATUS, \
108 BT_MESH_PROP_MSG_MAXLEN_PROP_STATUS), \
109 BT_MESH_MODEL_BUF_LEN(BT_MESH_PROP_OP_MFR_PROPS_STATUS, \
110 2 * (_prop_cnt)))
114#ifdef __cplusplus
115}
116#endif
117
118#endif /* BT_MESH_GEN_PROP_H__ */
119
bt_mesh_prop_access
Definition: gen_prop.h:25
@ BT_MESH_PROP_ACCESS_WRITE
Definition: gen_prop.h:31
@ BT_MESH_PROP_ACCESS_PROHIBITED
Definition: gen_prop.h:27
@ BT_MESH_PROP_ACCESS_READ
Definition: gen_prop.h:29
@ BT_MESH_PROP_ACCESS_READ_WRITE
Definition: gen_prop.h:33
bt_mesh_prop_srv_kind
Definition: gen_prop.h:38
@ BT_MESH_PROP_SRV_KIND_CLIENT
Definition: gen_prop.h:46
@ BT_MESH_PROP_SRV_KIND_USER
Definition: gen_prop.h:44
@ BT_MESH_PROP_SRV_KIND_ADMIN
Definition: gen_prop.h:42
@ BT_MESH_PROP_SRV_KIND_MFR
Definition: gen_prop.h:40
uint8_t * value
Definition: gen_prop.h:61
struct bt_mesh_prop meta
Definition: gen_prop.h:59
size_t size
Definition: gen_prop.h:60
Definition: gen_prop.h:58
uint16_t id
Definition: gen_prop.h:52
enum bt_mesh_prop_access user_access
Definition: gen_prop.h:54
Definition: gen_prop.h:50