mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-06 22:57:22 +00:00
mesh: Encapsulate feature config
Moves mesh feature configuration to a separate module, deprecating the bt_mesh_cfg_srv structure. The initial values for the features should now be enabled through KConfig, where new config entries have been added for each feature. This removes the upward dependency on the config server from the core stack, and makes the config server a pure frontend for the configuration states, as all spec mandated behavior around the feature states is now encapsulated. this is port of ad2fd44d7ad915e66765ba17ce53d4c5829a0efb
This commit is contained in:
committed by
Łukasz Rymanowski
parent
c06a03adfc
commit
011dbfda65
@@ -36,31 +36,6 @@
|
||||
#include "state_binding.h"
|
||||
#include "transition.h"
|
||||
|
||||
static struct bt_mesh_cfg_srv cfg_srv = {
|
||||
.relay = BT_MESH_RELAY_ENABLED,
|
||||
.beacon = BT_MESH_BEACON_ENABLED,
|
||||
|
||||
#if defined(CONFIG_BT_MESH_FRIEND)
|
||||
.frnd = BT_MESH_FRIEND_ENABLED,
|
||||
#else
|
||||
.frnd = BT_MESH_FRIEND_NOT_SUPPORTED,
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_MESH_GATT_PROXY)
|
||||
.gatt_proxy = BT_MESH_GATT_PROXY_ENABLED,
|
||||
#else
|
||||
.gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
|
||||
#endif
|
||||
|
||||
.default_ttl = 7,
|
||||
|
||||
/* 2 transmissions with 20ms interval */
|
||||
.net_transmit = BT_MESH_TRANSMIT(2, 20),
|
||||
|
||||
/* 3 transmissions with 20ms interval */
|
||||
.relay_retransmit = BT_MESH_TRANSMIT(3, 20),
|
||||
};
|
||||
|
||||
static struct bt_mesh_health_srv health_srv = {
|
||||
};
|
||||
|
||||
@@ -2689,7 +2664,7 @@ static const struct bt_mesh_model_op vnd_ops[] = {
|
||||
};
|
||||
|
||||
struct bt_mesh_model root_models[] = {
|
||||
BT_MESH_MODEL_CFG_SRV(&cfg_srv),
|
||||
BT_MESH_MODEL_CFG_SRV,
|
||||
BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
|
||||
|
||||
BT_MESH_MODEL(BT_MESH_MODEL_ID_GEN_ONOFF_SRV,
|
||||
|
||||
Reference in New Issue
Block a user