|
AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
|
Classes | |
| class | AckTracker |
| struct | DeliveryResult |
| class | MessageAckPackage |
| struct | PendingAck |
Typedefs | |
| typedef std::function< void(uint32_t nodeId, bool delivered, uint32_t latencyMs)> | deliveryCallback_t |
Per-message delivery confirmation (issue #379)
When a delivery callback is passed to Mesh::sendSingle() or Mesh::sendBroadcast(), the outgoing package is tagged with a unique msgId. Receiving nodes automatically reply with a MessageAckPackage (type 630) and the sender's AckTracker matches the reply to the pending message, firing the callback with the measured round-trip latency. Messages that are not acknowledged within their timeout fire the callback with delivered = false.
| typedef std::function<void(uint32_t nodeId, bool delivered, uint32_t latencyMs)> painlessmesh::ack::deliveryCallback_t |
Callback type for delivery confirmation
| nodeId | The destination node this result refers to |
| delivered | True when the node acknowledged the message, false when the acknowledgment timed out |
| latencyMs | Round-trip time in ms when delivered, otherwise the configured timeout |