Bluetooth: Mesh: access tx msg randomizer

Commit adds implementation of the specification
recommendations regarding randomization of
responses on the access layer.
3.7.3.1 Transmitting an Access messages

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
Aleksandr Khromykh 2023-11-20 16:43:25 +01:00 committed by Carles Cufí
commit d175ac0572
12 changed files with 460 additions and 0 deletions

View file

@ -628,6 +628,41 @@ config BT_MESH_LABEL_NO_RECOVER
unprovisioned before upgrading to the version with this option). The option is marked as
deprecated to remove the recovery code eventually.
menuconfig BT_MESH_ACCESS_DELAYABLE_MSG
bool "Access layer tx delayable message"
help
Enable following of the message transmitting recommendations, the Access layer
specification. The recommendations are optional.
However, they are strictly recommended if the device participates in the network with
intensive communication where the device receives a lot of requests that require responses.
if BT_MESH_ACCESS_DELAYABLE_MSG
config BT_MESH_ACCESS_DELAYABLE_MSG_COUNT
int "Number of simultaneously delayed messages"
default 4
help
The maximum number of messages the Access layer can manage to delay
at the same time. The number of messages can be handled only if the Access layer
has a sufficient amount of memory to store the model payload for them.
config BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_SIZE
int "Maximum delayable message storage chunk"
default 20
help
Size of memory that Access layer uses to split model message to. It allocates
a sufficient number of these chunks from the pool to store the full model payload.
config BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_COUNT
int "Maximum number of available chunks"
default 20
help
The maximum number of available chunks the Access layer allocates to store model payload.
It is recommended to keep chunk size equal to the reasonable small value to prevent
unnecessary memory wasting.
endif # BT_MESH_ACCESS_DELAYABLE_MSG
endmenu # Access layer
menu "Models"