Bluetooth: Mesh: Add API to manually store pending RPL entries
The current approach with storing RPL by timeout doesn't solve all issues as the node may loss power before the timer is fired. In addition to that this may wear out flash quickly if short timeout is used. This change adds an API to store the pending RPL entry upon user request. Additional Kconfig option allows to completely disable timer so that the whole storing relies on the user. The mesh stack still stays responsible for outdating RPL entries in case of IV Index update as this happens implicitly for the user. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
10abdcc962
commit
65f798a00a
7 changed files with 101 additions and 24 deletions
|
@ -666,6 +666,19 @@ struct bt_mesh_friend_cb {
|
|||
*/
|
||||
int bt_mesh_friend_terminate(uint16_t lpn_addr);
|
||||
|
||||
/** @brief Store pending RPL entry(ies) in the persistent storage.
|
||||
*
|
||||
* This API allows the user to store pending RPL entry(ies) in the persistent
|
||||
* storage without waiting for the timeout.
|
||||
*
|
||||
* @note When flash is used as the persistent storage, calling this API too
|
||||
* frequently may wear it out.
|
||||
*
|
||||
* @param addr Address of the node which RPL entry needs to be stored or
|
||||
* @ref BT_MESH_ADDR_ALL_NODES to store all pending RPL entries.
|
||||
*/
|
||||
void bt_mesh_rpl_pending_store(uint16_t addr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue