Bluetooth: Mesh: Add poll callback for friend role
Adds a "polled" function to the friend callback structure, that gets called every time the friend receives a poll message. The polled callback is called before the establish callback, to match the LPN behavior. Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
This commit is contained in:
parent
ac55c63f08
commit
243e29cc29
2 changed files with 19 additions and 0 deletions
|
@ -610,6 +610,19 @@ struct bt_mesh_friend_cb {
|
|||
* @param lpn_addr Low Power Node address.
|
||||
*/
|
||||
void (*terminated)(uint16_t net_idx, uint16_t lpn_addr);
|
||||
|
||||
/** @brief Friend Poll Request.
|
||||
*
|
||||
* This callback notifies the application that the low power node has
|
||||
* polled the friend node.
|
||||
*
|
||||
* This callback will be called before @ref bt_mesh_friend_cb::established
|
||||
* when attempting to establish a friendship.
|
||||
*
|
||||
* @param net_idx NetKeyIndex used during friendship establishment.
|
||||
* @param lpn_addr LPN address.
|
||||
*/
|
||||
void (*polled)(uint16_t net_idx, uint16_t lpn_addr);
|
||||
};
|
||||
|
||||
/** @def BT_MESH_FRIEND_CB_DEFINE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue