You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
ZAP backend functions include Matter-specific logic, such as handling featureMap shown below, which contains Matter terminology from Matter spec and is irrelevant to Zigbee. However, these functions support both Zigbee and Matter.
Solution:
All Matter-specific code should be encapsulated into functions and moved to a separate file for improved modularity and maintainability.
// Looking for the feature map attribute in matter and setting it as per
// the device types if default value is 0
if (
staticAttribute.code == 0xfffc &&
staticAttribute.name == 'FeatureMap' &&
staticAttribute.defaultValue == 0
) {
let featureMapDefaultValue = staticAttribute.defaultValue
let featuresOnEndpointTypeAndCluster =
await queryDeviceType.selectDeviceTypeFeaturesByEndpointTypeIdAndClusterId(
db,
endpointTypeId,
clusterRef
)
// only set featureMap bit to 1 for mandatory features
let featureMapBitsToBeEnabled = featuresOnEndpointTypeAndCluster
.filter((f) => f.conformance == 'M')
.map((f) => f.featureBit)
featureMapBitsToBeEnabled.forEach(
(featureBit) =>
(featureMapDefaultValue = featureMapDefaultValue | (1 << featureBit))
)
staticAttribute.defaultValue = featureMapDefaultValue
}
The text was updated successfully, but these errors were encountered:
Issue:
ZAP backend functions include Matter-specific logic, such as handling featureMap shown below, which contains Matter terminology from Matter spec and is irrelevant to Zigbee. However, these functions support both Zigbee and Matter.
Solution:
All Matter-specific code should be encapsulated into functions and moved to a separate file for improved modularity and maintainability.
The text was updated successfully, but these errors were encountered: