30
30
31
31
// #include <lib/support/RandUtils.h> //==> rm from TE7.5
32
32
#include < app-common/zap-generated/attribute-id.h>
33
- #include < app-common/zap-generated/cluster-id .h>
33
+ #include < app-common/zap-generated/ids/Clusters .h>
34
34
#include < app/server/Dnssd.h>
35
35
#include < app/server/Server.h>
36
36
#include < app/util/af-types.h>
@@ -288,7 +288,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
288
288
{
289
289
PRINTF("====> emberAfExternalAttributeReadCallback\r\n");
290
290
291
- if(clusterId == ZCL_SWITCH_CLUSTER_ID ) {
291
+ if(clusterId == Clusters::Switch::Id ) {
292
292
*buffer = g_ButtonPress;
293
293
}
294
294
return EMBER_ZCL_STATUS_SUCCESS;
@@ -1144,12 +1144,12 @@ void task_test_main(void * param)
1144
1144
value = (uint16_t ) is_on;
1145
1145
// sync-up the switch attribute:
1146
1146
PRINTF (" --> update ZCL_CURRENT_POSITION_ATTRIBUTE_ID [%d] \r\n " , value);
1147
- emAfWriteAttribute (1 , ZCL_SWITCH_CLUSTER_ID , ZCL_CURRENT_POSITION_ATTRIBUTE_ID, (uint8_t *) &value, sizeof (value), true ,
1147
+ emAfWriteAttribute (1 , Clusters::Switch::Id , ZCL_CURRENT_POSITION_ATTRIBUTE_ID, (uint8_t *) &value, sizeof (value), true ,
1148
1148
false );
1149
1149
#ifdef SUPPORT_MANUAL_CTRL
1150
1150
// sync-up the Light attribute (for test event, OO.M.ManuallyControlled)
1151
- PRINTF (" --> update [ZCL_ON_OFF_CLUSTER_ID ]: ZCL_ON_OFF_ATTRIBUTE_ID [%d] \r\n " , value);
1152
- emAfWriteAttribute (1 , ZCL_ON_OFF_CLUSTER_ID , ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &value, sizeof (value), true , false );
1151
+ PRINTF (" --> update [Clusters::Switch::Id ]: ZCL_ON_OFF_ATTRIBUTE_ID [%d] \r\n " , value);
1152
+ emAfWriteAttribute (1 , Clusters::Switch::Id , ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &value, sizeof (value), true , false );
1153
1153
#endif // SUPPORT_MANUAL_CTRL
1154
1154
1155
1155
need2sync_sw_attr = false ;
@@ -1529,7 +1529,7 @@ static void OnSwitchAttributeChangeCallback(EndpointId endpointId, AttributeId a
1529
1529
}
1530
1530
}
1531
1531
if (do_sendrpt == true) {
1532
- ConcreteEventPath event_path(endpointId, ZCL_SWITCH_CLUSTER_ID , 0);
1532
+ ConcreteEventPath event_path(endpointId, Clusters::Switch::Id , 0);
1533
1533
pimEngine->GetReportingEngine().ScheduleEventDelivery(event_path, chip::app::EventOptions::Type::kUrgent,
1534
1534
sizeof(uint16_t));
1535
1535
}
@@ -1554,7 +1554,7 @@ void IdentifyTimerHandler(System::Layer * systemLayer, void * appState)
1554
1554
if (pidt->identifyTimerCount )
1555
1555
{
1556
1556
pidt->identifyTimerCount --;
1557
- emAfWriteAttribute (pidt->ep , ZCL_IDENTIFY_CLUSTER_ID , ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, (uint8_t *) &pidt->identifyTimerCount ,
1557
+ emAfWriteAttribute (pidt->ep , Clusters::Identify::Id , ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, (uint8_t *) &pidt->identifyTimerCount ,
1558
1558
sizeof (identifyTimerCount), true , false );
1559
1559
DeviceLayer::SystemLayer ().StartTimer (System::Clock::Seconds16 (1 ), IdentifyTimerHandler, pidt);
1560
1560
}
@@ -1587,16 +1587,16 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
1587
1587
// path.mEndpointId, path.mClusterId, path.mAttributeId, mask, type, size, value
1588
1588
switch (path.mClusterId )
1589
1589
{
1590
- case ZCL_ON_OFF_CLUSTER_ID :
1590
+ case Clusters::OnOff::Id :
1591
1591
OnOnOffPostAttributeChangeCallback (path.mEndpointId , path.mAttributeId , value);
1592
1592
break ;
1593
- case ZCL_SWITCH_CLUSTER_ID :
1593
+ case Clusters::Switch::Id :
1594
1594
OnSwitchAttributeChangeCallback (path.mEndpointId , path.mAttributeId , value);
1595
1595
// SwitchToggleOnOff();
1596
1596
// Trigger to send on/off/toggle command to the bound devices
1597
1597
chip::BindingManager::GetInstance ().NotifyBoundClusterChanged (1 , chip::app::Clusters::OnOff::Id, nullptr );
1598
1598
break ;
1599
- case ZCL_IDENTIFY_CLUSTER_ID :
1599
+ case Clusters::Identify::Id :
1600
1600
OnIdentifyPostAttributeChangeCallback (path.mEndpointId , path.mAttributeId , value);
1601
1601
break ;
1602
1602
default :
0 commit comments