2222
2323#include < AppConfig.h>
2424
25+ #include " OvenManager.h"
2526#include < app-common/zap-generated/attributes/Accessors.h>
2627#include < app-common/zap-generated/callback.h>
2728#include < app-common/zap-generated/cluster-objects.h>
@@ -36,11 +37,24 @@ using namespace ::chip;
3637void MatterPostAttributeChangeCallback (const app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size,
3738 uint8_t * value)
3839{
39- switch (attributePath.mClusterId )
40+ ClusterId clusterId = attributePath.mClusterId ;
41+ AttributeId attributeId = attributePath.mAttributeId ;
42+ switch (clusterId)
4043 {
4144 case app::Clusters::Identify::Id:
4245 ChipLogProgress (Zcl, " Identify cluster ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u" ,
43- ChipLogValueMEI (attributePath.mAttributeId ), type, *value, size);
46+ ChipLogValueMEI (attributeId), type, *value, size);
47+ break ;
48+ case app::Clusters::OnOff::Id:
49+ ChipLogProgress (Zcl, " OnOff cluster ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u" ,
50+ ChipLogValueMEI (attributeId), type, *value, size);
51+ ChipLogProgress (Zcl, " OnOff received for endpoint: %d" , attributePath.mEndpointId );
52+ OvenManager::GetInstance ().OnOffAttributeChangeHandler (attributePath.mEndpointId , attributeId, value, size);
53+ break ;
54+ case app::Clusters::TemperatureControl::Id:
55+ ChipLogProgress (Zcl, " TemperatureControl cluster ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u" ,
56+ ChipLogValueMEI (attributeId), type, *value, size);
57+ OvenManager::GetInstance ().TempCtrlAttributeChangeHandler (attributePath.mEndpointId , attributeId, value, size);
4458 break ;
4559 default :
4660 break ;
0 commit comments