[mac] add build config for timeout for receiving a Data Frame (#8863)

This setting is targeted for SEDs which may need to decrease the
timeout for receiving a Data Frame (which follows an ACK with FP bit
set) for power saving reasons.

IEEE 802.15.4-2015 specification doesn't enforce a specific timeout
value for this parameter so the application should be able to
configure it.

Signed-off-by: Doru Gucea <[email protected]>
This commit is contained in:
doru91
2023-03-16 11:12:41 -07:00
committed by GitHub
parent 2542cabc20
commit 5a21384833
2 changed files with 14 additions and 2 deletions
+11
View File
@@ -521,4 +521,15 @@
#define OPENTHREAD_CONFIG_MAC_OUTGOING_BEACON_PAYLOAD_ENABLE 0
#endif
/**
* @def OPENTHREAD_CONFIG_MAC_DATA_POLL_TIMEOUT
*
* This setting specifies the timeout for receiving the Data Frame (in msec) - after an ACK with FP bit set was
* received.
*
*/
#ifndef OPENTHREAD_CONFIG_MAC_DATA_POLL_TIMEOUT
#define OPENTHREAD_CONFIG_MAC_DATA_POLL_TIMEOUT 100
#endif
#endif // CONFIG_MAC_H_
+3 -2
View File
@@ -71,8 +71,9 @@ class Neighbor;
namespace Mac {
constexpr uint32_t kDataPollTimeout = 100; ///< Timeout for receiving Data Frame (in msec).
constexpr uint32_t kSleepDelay = 300; ///< Max sleep delay when frame is pending (in msec).
constexpr uint32_t kDataPollTimeout =
OPENTHREAD_CONFIG_MAC_DATA_POLL_TIMEOUT; ///< Timeout for receiving Data Frame (in msec).
constexpr uint32_t kSleepDelay = 300; ///< Max sleep delay when frame is pending (in msec)
constexpr uint16_t kScanDurationDefault = OPENTHREAD_CONFIG_MAC_SCAN_DURATION; ///< Duration per channel (in msec).