Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a Counter class that can manages counters that cannot rollover #33175

Open
mkardous-silabs opened this issue Apr 25, 2024 · 0 comments

Comments

@mkardous-silabs
Copy link
Contributor

Description

PersistedCounter and MonotonicallyIncreasingCounter are used as types for counters that are allowed to rollover and counters that are not allowed to rollover.

This implementation was done in such a way that it allowed the underlying counter to rollover but would systematically return an error once the counter value reached its maximum value due to this check :
VerifyOrReturnError(MonotonicallyIncreasingCounter<T>::GetValue() < mNextEpoch, CHIP_ERROR_INTERNAL);

See #33174 for the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant