[mle] add API to configure the store frame counter ahead (#10576)

Currently the OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD
is hard-coded in the OT core, yet sometimes it is
desired to modify this value which requires
re-building of the OT libraries and forces
re-certification of the end product.

Implement `otThreadSetStoreFrameCounterAhead`
and `otThreadGetStoreFrameCounterAhead` to allow
API clients to configure the store frame counter
ahead parameter at run-time. This extension offloads
product makers from the need of re-certification
in case the store frame counter ahead must be tuned.

Signed-off-by: Marcin Kajor <marcin.kajor@nordicsemi.no>
This commit is contained in:
Marcin Kajor
2024-09-10 21:33:27 +02:00
committed by GitHub
parent 7673194af6
commit 07a1b7bd98
7 changed files with 82 additions and 9 deletions
+12
View File
@@ -510,6 +510,18 @@ otError otThreadDetachGracefully(otInstance *aInstance, otDetachGracefullyCallba
return AsCoreType(aInstance).Get<Mle::MleRouter>().DetachGracefully(aCallback, aContext);
}
#if OPENTHREAD_CONFIG_DYNAMIC_STORE_FRAME_AHEAD_COUNTER_ENABLE
void otThreadSetStoreFrameCounterAhead(otInstance *aInstance, uint32_t aStoreFrameCounterAhead)
{
return AsCoreType(aInstance).Get<Mle::Mle>().SetStoreFrameCounterAhead(aStoreFrameCounterAhead);
}
uint32_t otThreadGetStoreFrameCounterAhead(otInstance *aInstance)
{
return AsCoreType(aInstance).Get<Mle::Mle>().GetStoreFrameCounterAhead();
}
#endif
#endif // OPENTHREAD_FTD || OPENTHREAD_MTD
#if OPENTHREAD_CONFIG_UPTIME_ENABLE