diff --git a/docs/software/plugins/store-forward.md b/docs/software/plugins/store-forward.md index 1d40cbfe..6cd0385e 100644 --- a/docs/software/plugins/store-forward.md +++ b/docs/software/plugins/store-forward.md @@ -129,6 +129,43 @@ Story: The Store & Forward Router sends a periodic message onto the network. Thi * * * StoreAndForward.heartbeat.Period = 120 // Expect a heartbeat every 2 minutes * * * StoreAndForward.heartbeat.Secondary = false // If true, this is a secondary "backup" S&F node. Will be (eventually) used for router election in the event there are multiple S&F Routers. +## Meshpacket + +To support functionality of Store and Forward, a new enum has been added to the MeshPacket. + +``` +typedef enum _MeshPacket_Delayed { + MeshPacket_Delayed_NO_DELAY = 0, + MeshPacket_Delayed_DELAYED_BROADCAST = 1, + MeshPacket_Delayed_DELAYED_DIRECT = 2 +} MeshPacket_Delayed; +``` + +* NO_DELAY - The packet was set in real time. Store and Forward had no hand in this message. This is the default case. +* DELAYED_BROADCAST - This is a delayed message. The 'to' of the packet has been directed at a named user but was previously a broadcast packet. +* DELAYED_DIRECT - This is a delayed message. The 'to' of the packet has been directed at a named user but was previously a direct packet. + +As a reminder, broadcast messages are messages where the "to" of a payload is directed at NODENUM_BROADCAST or (0xFFFFFFFF). + +Example Cases: + +* Real time :: BROADCAST +* * Delayed = MeshPacket_Delayed_NO_DELAY +* * From: Ann +* * To: BROADCAST +* Real time :: Direct +* * Delayed = MeshPacket_Delayed_NO_DELAY +* * From: Ann +* * To: Bob +* Delayed :: BROADCAST +* * Delayed = MeshPacket_Delayed_DELAYED_BROADCAST +* * From: Ann +* * To: Bob +* Delayed :: Direct +* * Delayed = MeshPacket_Delayed_DELAYED_DIRECT +* * From: Ann +* * To: Bob + ## Developer TODO Not necessarily in this order: