mirror of
https://github.com/espressif/openthread.git
synced 2026-08-23 02:39:52 +00:00
[takelet] add template TaskeltIn to simplify handler functions (#8064)
This class adds a template sub-class of `Tasklet` which allows us to directly specify an `Owner` of tasklet along with handler callback as a member method of `Owner`. This helps simplify the use of `Tasklet` in core module.
This commit is contained in:
@@ -54,7 +54,7 @@ RegisterLogModule("DuaManager");
|
||||
|
||||
DuaManager::DuaManager(Instance &aInstance)
|
||||
: InstanceLocator(aInstance)
|
||||
, mRegistrationTask(aInstance, DuaManager::HandleRegistrationTask)
|
||||
, mRegistrationTask(aInstance)
|
||||
, mDuaNotification(UriPath::kDuaRegistrationNotify, &DuaManager::HandleDuaNotification, this)
|
||||
, mIsDuaPending(false)
|
||||
#if OPENTHREAD_CONFIG_DUA_ENABLE
|
||||
@@ -402,11 +402,6 @@ void DuaManager::HandleTimeTick(void)
|
||||
UpdateTimeTickerRegistration();
|
||||
}
|
||||
|
||||
void DuaManager::HandleRegistrationTask(Tasklet &aTasklet)
|
||||
{
|
||||
aTasklet.Get<DuaManager>().PerformNextRegistration();
|
||||
}
|
||||
|
||||
void DuaManager::UpdateTimeTickerRegistration(void)
|
||||
{
|
||||
if (mDelay.mValue == 0)
|
||||
|
||||
Reference in New Issue
Block a user