mirror of
https://github.com/espressif/openthread.git
synced 2026-07-05 20:00:23 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user