public ZclCluster GetClusterClass(ushort clusterId) { ZclClusterType clusterType = ZclClusterType.GetValueById(clusterId); if (clusterType == null) { // Unsupported cluster Log.Debug("{Endpoint}: Unsupported cluster {Cluster} - using ZclCustomCluster", GetEndpointAddress(), clusterId); return(new ZclCustomCluster(this, clusterId)); } // Create a cluster class return(clusterType.ClusterFactory(this)); }
public ZclCluster GetClusterClass(ushort clusterId) { ZclClusterType clusterType = ZclClusterType.GetValueById(clusterId); if (clusterType == null) { // Unsupported cluster Log.Debug("{Endpoint}: Unsupported cluster {Cluster}", GetEndpointAddress(), clusterId); return(null); } // Create a cluster class //if (clusterType.ClusterClass != null) // return (ZclCluster)Activator.CreateInstance(clusterType.ClusterClass, this); //else // return null; return(clusterType.ClusterFactory(this)); }