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

[events] Added generating BootReason event #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kkasperczyk-no
Copy link
Owner

@kkasperczyk-no kkasperczyk-no commented Feb 18, 2022

Problem

Zephyr platform doesn't support generating all mandatory events from Basic and General Diagnostics clusters.

Change overview

Generic changes:

  • Added generating BootReason event
  • Added Server::FactoryReset method to dispatch
    necessary events and flush pending events before
    factory reset
  • Added dispatching shutdown event on factory
    reset
  • Added DeleteAllFabrics in FactoryReset to emit
    Leave event.
  • Added flushing events on factory reset
  • Added for all examples to call Server FactoryReset
    instead of platform InitiateFactoryReset

Zephyr platform changes:

  • Fixed bug in persisted storage read
    implementation that returned wrong error code
    and it resulted in PersistedCounter initialization
    failure.
  • Added calling Shutdown after factory reset

Zephyr platform doesn't support generating
all mandatory events from Basic and General
Diagnostics clusters.

Generic changes:
* Added generating BootReason event
* Added Server::FactoryReset method to dispatch
necessary events and flush pending events before
factory reset
* Added dispatching shutdown event on factory
reset
* Added DeleteAllFabrics in FactoryReset to emit
Leave event.
* Added flushing events on factory reset
* Added for all examples to call Server FactoryReset
instead of platform InitiateFactoryReset

Zephyr platform changes:
* Fixed bug in persisted storage read
implementation that returned wrong error code
and it resulted in PersistedCounter initialization
failure.
* Added calling Shutdown after factory reset

WIP
@@ -204,9 +202,7 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
ThreadStackMgr().ErasePersistentInfo();
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD

#if CONFIG_REBOOT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I guess this change isn't that necessary since we will probably need to support some custom reboot mechanism (to send the shutdown event in any case).

src/app/server/Server.cpp Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants