mirror of
https://github.com/espressif/openthread.git
synced 2026-09-06 09:10:04 +00:00
[mle] update DelayedSender to keep the tx schedule (#10846)
This commit updates how `Mle::DelayedSender` sends MLE messages after
a delay.
Previously, a delayed message was fully prepared and placed in a
queue, waiting for its delay duration to expire. In the new model, a
delayed message is prepared when the requested delay time expires and
the message transmission time is reached. The message is constructed
right before transmission. This ensures that the delayed message
includes the most up-to-date information and simplifies the methods
that prepare and send different types of MLE messages.
`DelayedSender` now keeps track of the message type and the
specific information required to construct the message later. For
example, for a delayed Parent Response to a Parent Request, the
extended address and the `RxChallenge` of the child are saved.
This new model makes it easier to implement the desired behavior when
similar messages are already scheduled to the same destination. For
example:
- For Data Request, if one is already scheduled, a new request can
be skipped, as the earlier Data Request will be valid.
- For Parent Response, Link Accept, and Data Response, a new
schedule request replaces an earlier one.
- For Discovery Response, multiple schedules are allowed.
This commit is contained in:
@@ -225,6 +225,8 @@ void InitTest(void)
|
||||
|
||||
void FinalizeTest(void)
|
||||
{
|
||||
AdvanceTime(30 * 1000);
|
||||
|
||||
SuccessOrQuit(otIp6SetEnabled(sInstance, false));
|
||||
SuccessOrQuit(otThreadSetEnabled(sInstance, false));
|
||||
// Make sure there is no message/buffer leak
|
||||
|
||||
Reference in New Issue
Block a user