Refactor Channel management (#902)
* Refactor Channel management
While checking for chip subscription test 3.6 it became clear that the current channel management was not correct according to the specification.
This change is adjusting this to correctly handle multiple channels per Fabric and not just one.
We also wire this with the capability Minimal value about concurrent CASE sessions per fabric.
Internally we still use Fabric AND Node, so in fact we have higher number of CASe sessions. The reason is that we need to validate the effect of limiting it when using controller. I left a TODO for this and add one to the project.
* Fixes - no need to remove entries, they are removed via callbacks when ready
* Expose Storage initialized status
We expose the initialized status via getter to allow check and prevent exceptions
* Untangle Fabric removal to worker
In order to prevent issues with fabric resets and sending the "removeFabric" response we can untangle that as a worker. That helps also in some testcases
* Adjustments to tests and small stuff
* Adjust Fabric removal again to make sure that in normal cases the fabric is gone before the response is sent
* change protected variable name
* Factory rest refactoring
We just wait after removal of last fabric until the last session is also correctly closed and then we do the factory reset. This makes sure that latest responses were also sent and such.
* Expire Fabric announcements when last Fabric got removed
When the last Fabric gets removed we expire all announcements directly. We do not reannounce because most likely a factory reset happens anyway.
* Adjust Session close reannounces
When a session gets closed, only reannounce when we still belong to at least a fabrics or if the session was not belonging to any fabric (PASE/commissioning CASE). This is to prevent to announce the device as commissionable on removal of last fabric wheich is then directly expired again because of factory reset
* Optimize Exchange closing
We can close the exchange already when we got the ack for the last sent message and also have no open message where we need an ack
* Changelog
* [execute-chiptests-long] Adjust tests