Extraction from MatterDevice and MatterController
Most of this involves moving logic out of MatterDevice into topical components. Modifies MatterController along the same lines though mostly focused on logic that could be shared with MatterDevice.
New components include:
- DeviceCommissioner - server-side equivalent to ControllerCommissioner
- DeviceAdvertiser - probably deserves additional cleanup but handles MDNS and BLE announcement for devices
- NodeFinder - currently focused on operational discover but could also add commissioning discovery
- Subscription - base class for client/server subscriptions (including ServerSubscription, previously SubscriptionHandler)
- TransportInterfaceSet/NetInterfaceSet - collections of network connections with a handful of utility methods
Existing components also receive a variety of changes. Mostly to make them interface directly without requiring a than relying on a higher-level coordinater like MatterDevice.
Used a few code patterns to support this:
- Replaced more callbacks with events. This allows interested parties to subscribe independently
- In several places eventing comes via a mutable/observable set, so e.g. "session.subscriptions.added"
- Many of the components now take a "context" as input that includes component dependencies
- The classes generally include an (optional) static method that extracts components from an Environment
- Moved async initialization from some classes from an "initialize" method into a construction field
There should be minimal breaking changes at the MatterDevice/MatterController level. Lower levels do have breaking changes.
Also includes early development of controller/binding implementation for Node API. This is related to above but including only because developed in tandem and doesn't affect existing API.