Bluetooth: Mesh: Support for comp data page 2
Adds support for composition data page 2 & 130. In this implementation the responsibillity for filling the page 2 buffer is left to the application through the new comp page 2 cb API. Only the application can know/decide if the device is NLC compliant, and must thus be given the responsibillity for cheking the NLC profile requirements, defined in the NLC specs, and filling the response buffer for comp data page 2. Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
This commit is contained in:
parent
e68de5bacc
commit
9d849736ef
5 changed files with 121 additions and 4 deletions
|
@ -61,13 +61,19 @@ static int dev_comp_data_get(struct bt_mesh_model *model,
|
|||
|
||||
page = net_buf_simple_pull_u8(buf);
|
||||
|
||||
if (page >= 129U && IS_ENABLED(CONFIG_BT_MESH_COMP_PAGE_1) &&
|
||||
if (page >= 130U && IS_ENABLED(CONFIG_BT_MESH_COMP_PAGE_2) &&
|
||||
(atomic_test_bit(bt_mesh.flags, BT_MESH_COMP_DIRTY) ||
|
||||
IS_ENABLED(CONFIG_BT_MESH_RPR_SRV))) {
|
||||
page = 130U;
|
||||
} else if (page >= 129U && IS_ENABLED(CONFIG_BT_MESH_COMP_PAGE_1) &&
|
||||
(atomic_test_bit(bt_mesh.flags, BT_MESH_COMP_DIRTY) ||
|
||||
IS_ENABLED(CONFIG_BT_MESH_RPR_SRV))) {
|
||||
page = 129U;
|
||||
} else if (page >= 128U && (atomic_test_bit(bt_mesh.flags, BT_MESH_COMP_DIRTY) ||
|
||||
IS_ENABLED(CONFIG_BT_MESH_RPR_SRV))) {
|
||||
page = 128U;
|
||||
} else if (page >= 2U && IS_ENABLED(CONFIG_BT_MESH_COMP_PAGE_2)) {
|
||||
page = 2U;
|
||||
} else if (page >= 1U && IS_ENABLED(CONFIG_BT_MESH_COMP_PAGE_1)) {
|
||||
page = 1U;
|
||||
} else if (page != 0U) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue