This PR provides extra types for the Root endpoint which are generified by the type of operational network.
It also provides a simple implementation of the Wifi NW Diagnostics cluster (next to the existing Eth NW diagnostics one)
The existing types/struct which were actually hard-coded for Ethernet are now type-aliased / delegate to the new types and are renamed as follows:
root_endpont::CLUSTERS -> root_endpoint::ETH_CLUSTERS (and there's also WIFI_CLUSTERS now)
root_endpoint::endpoint takes an extra parameter - OperNwType
RootEndpointHandler type -> EthRootEndpointHandler type, and there is a newly-introduced RootEndpointHandler which is generified by NWCOMM and NWDIAG
root_endpoint::handler -> root_endpoint::eth_handler. Here also, newly introduced more generic root_endpoint::handler fn which takes extra parameters
... Looking at the "on off" example actually shows the API-visible changes. Minor breakage to backward compatibility - users just need to prefix a few things with eth_ now.
I've now opened this as I feel that rather than fixing stuff "on the spot" (and thus maybe actually introducing even more inconsistencies), we should have an ongoing task to fix our abbreviations throughout the code base.
(A follow up on https://github.com/project-chip/rs-matter/pull/167 , as promised there.)
The existing types/struct which were actually hard-coded for Ethernet are now type-aliased / delegate to the new types and are renamed as follows:
root_endpont::CLUSTERS
->root_endpoint::ETH_CLUSTERS
(and there's alsoWIFI_CLUSTERS
now)root_endpoint::endpoint
takes an extra parameter -OperNwType
RootEndpointHandler
type ->EthRootEndpointHandler
type, and there is a newly-introducedRootEndpointHandler
which is generified byNWCOMM
andNWDIAG
root_endpoint::handler
->root_endpoint::eth_handler
. Here also, newly introduced more genericroot_endpoint::handler
fn which takes extra parameters... Looking at the "on off" example actually shows the API-visible changes. Minor breakage to backward compatibility - users just need to prefix a few things with
eth_
now.