mirror of
https://github.com/espressif/openthread.git
synced 2026-08-03 09:27:47 +00:00
[border-agent] move TXT data management to TxtData class (#12120)
Moves the management of MeshCoP service TXT data from the `BorderAgent::Manager` class into the `TxtData` class. This change improves separation of concerns by isolating all TXT data-related logic, including vendor TXT data, change callbacks, and notifier event handling, within the `TxtData` class. The `BorderAgent::Manager` is simplified and its responsibilities are more focused. A new public method, `Refresh()`, is introduced on `TxtData` to provide a clear API for other modules to signal that the MeshCoP service TXT data needs to be re-evaluated and updated.
This commit is contained in:
@@ -106,14 +106,19 @@ void TestTasklet(void)
|
||||
sInstance = static_cast<Instance *>(testInitInstance());
|
||||
VerifyOrQuit(sInstance != nullptr);
|
||||
|
||||
sInstance->Get<Tasklet::Scheduler>().ProcessQueuedTasklets();
|
||||
|
||||
{
|
||||
Tasklet::Scheduler &scheduler = sInstance->Get<Tasklet::Scheduler>();
|
||||
Tasklet task1(*sInstance, HandleTask1);
|
||||
Tasklet task2(*sInstance, HandleTask2);
|
||||
Tasklet task3(*sInstance, HandleTask3);
|
||||
|
||||
Log("Process all initially posted tasks after `Instance` initialization");
|
||||
|
||||
while (scheduler.AreTaskletsPending())
|
||||
{
|
||||
scheduler.ProcessQueuedTasklets();
|
||||
}
|
||||
|
||||
VerifyOrQuit(!task1.IsPosted());
|
||||
VerifyOrQuit(!task2.IsPosted());
|
||||
VerifyOrQuit(!task3.IsPosted());
|
||||
|
||||
Reference in New Issue
Block a user