zephyr/include/bluetooth/mesh
Trond Einar Snekvik 820cfc52ad Bluetooth: Mesh: Rework publication timer
Periodic publication would previously build and send the first
publication inside the bt_mesh_model_pub() function, before cancelling
and rescheduling the next publication. The timer handler would only
handle retransmissions, and would abandon the rest of the publication
event if one of the packets failed to send.

This design has three issues:
- If the initial timer cancel fails, the publication would interfer with
  the periodic publication management, which might skip an event or
  send too many packets.
- If any of the messages fail to publish, the full publication event
  would be abandoned. This is not predictable or expected from the API.
- bt_mesh_model_pub() required 384 bytes of stack to build the message,
  which has to be factored into all calling threads.

This patch moves all transmission into the publication timer by
replacing k_work_cancel with a single k_work_reschedule(K_NO_WAIT). It
also changes the error recovery behavior to attempt to finish the full
publication event even if some of the transmissions fail.

Split out from #33782.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-04-15 20:31:44 +02:00
..
access.h Bluetooth: Mesh: Rework publication timer 2021-04-15 20:31:44 +02:00
cdb.h Bluetooth: Mesh: Add CDB handle key refresh phase 2021-03-04 14:10:56 +02:00
cfg.h Bluetooth: Mesh: Add CDB handle key refresh phase 2021-03-04 14:10:56 +02:00
cfg_cli.h Bluetooth: Mesh: Introduce acknowledged message API 2021-04-08 13:44:24 +02:00
cfg_srv.h
health_cli.h Bluetooth: Mesh: Introduce acknowledged message API 2021-04-08 13:44:24 +02:00
health_faults.h
health_srv.h bluetooth: mesh: health_srv: update k_work API 2021-03-10 15:18:10 +02:00
heartbeat.h
main.h Bluetooth: Mesh: Add poll callback for friend role 2021-03-12 16:14:58 +02:00
msg.h Bluetooth: Mesh: Introduce acknowledged message API 2021-04-08 13:44:24 +02:00
proxy.h Bluetooth: Mesh: Add Proxy callback structure 2021-03-17 11:28:46 +01:00