14#ifndef BT_MESH_GEN_PROP_H__
15#define BT_MESH_GEN_PROP_H__
17#include <zephyr/bluetooth/mesh.h>
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)
86#ifndef CONFIG_BT_MESH_PROP_MAXSIZE
87#define CONFIG_BT_MESH_PROP_MAXSIZE 0
90#ifndef CONFIG_BT_MESH_PROP_MAXCOUNT
91#define CONFIG_BT_MESH_PROP_MAXCOUNT 0
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, \
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
uint16_t id
Definition gen_prop.h:52
enum bt_mesh_prop_access user_access
Definition gen_prop.h:54