Skip to content

Commit

Permalink
Replace legacy cluster id constants with namespaced ones. (#23833)
Browse files Browse the repository at this point in the history
Large parts of this were generated by running:

perl -pi -e 'BEGIN { sub recombine { my ($str) = @_; my @split = split /_/,$str; return join("", map { ucfirst lc $_ } @split); } } s/ZCL_([A-Z_]*)_CLUSTER_ID/"app::Clusters::".recombine($1)."::Id"/e'

on various files.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Aug 21, 2023
1 parent 4a5b4f1 commit 8296737
Show file tree
Hide file tree
Showing 116 changed files with 459 additions and 777 deletions.
6 changes: 3 additions & 3 deletions examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "DeviceCallbacks.h"
#include "CHIPDeviceManager.h"
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/util/af.h>
Expand Down Expand Up @@ -91,11 +91,11 @@ void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Cluster
{
switch (clusterId)
{
case ZCL_ON_OFF_CLUSTER_ID:
case app::Clusters::OnOff::Id:
OnOnOffPostAttributeChangeCallback(endpointId, attributeId, value);
break;

case ZCL_IDENTIFY_CLUSTER_ID:
case app::Clusters::Identify::Id:
OnIdentifyPostAttributeChangeCallback(endpointId, attributeId, value);
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/CommandHandler.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/util/basic-types.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "ClusterManager.h"

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
Expand Down
6 changes: 3 additions & 3 deletions examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <lib/dnssd/Advertiser.h>

#if CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#endif

static const char * TAG = "app-devicecallbacks";
Expand Down Expand Up @@ -165,13 +165,13 @@ void AppDeviceCallbacks::OnColorControlAttributeChangeCallback(EndpointId endpoi
if (attributeId == ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID)
{
hue = *value;
emberAfReadServerAttribute(endpointId, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID,
emberAfReadServerAttribute(endpointId, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID,
&saturation, sizeof(uint8_t));
}
else
{
saturation = *value;
emberAfReadServerAttribute(endpointId, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue,
emberAfReadServerAttribute(endpointId, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue,
sizeof(uint8_t));
}
statusLED1.SetColor(hue, saturation);
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "DeviceWithDisplay.h"
#include <app-common/zap-generated/cluster-enums.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>

#if CONFIG_HAVE_DISPLAY
Expand Down Expand Up @@ -322,7 +323,7 @@ class EditAttributeListModel : public TouchesMatterStackModel
{
value = (value == "On") ? "Off" : "On";
uint8_t attributeValue = (value == "On") ? 1 : 0;
emberAfWriteServerAttribute(endpointIndex + 1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID,
emberAfWriteServerAttribute(endpointIndex + 1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID,
(uint8_t *) &attributeValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/clusters/door-lock-server/door-lock-server.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
Expand Down Expand Up @@ -409,7 +409,7 @@ void AppTask::OnOffUpdateClusterState(intptr_t context)

// write the new on/off value
EmberAfStatus status =
emberAfWriteServerAttribute(2, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
emberAfWriteServerAttribute(2, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE);

if (status != EMBER_ZCL_STATUS_SUCCESS)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "LEDWidget.h"
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/util/basic-types.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "ClusterManager.h"

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/util/af-types.h>
Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/ota-requestor/OTATestEventTriggerDelegate.h>
#include <app/util/attribute-storage.h>
Expand Down
20 changes: 10 additions & 10 deletions examples/all-clusters-app/nxp/mw320/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

//#include <lib/support/RandUtils.h> //==> rm from TE7.5
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <app/util/af-types.h>
Expand Down Expand Up @@ -288,7 +288,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
{
PRINTF("====> emberAfExternalAttributeReadCallback\r\n");
if(clusterId == ZCL_SWITCH_CLUSTER_ID) {
if(clusterId == Clusters::Switch::Id) {
*buffer = g_ButtonPress;
}
return EMBER_ZCL_STATUS_SUCCESS;
Expand Down Expand Up @@ -1144,12 +1144,12 @@ void task_test_main(void * param)
value = (uint16_t) is_on;
// sync-up the switch attribute:
PRINTF("--> update ZCL_CURRENT_POSITION_ATTRIBUTE_ID [%d] \r\n", value);
emAfWriteAttribute(1, ZCL_SWITCH_CLUSTER_ID, ZCL_CURRENT_POSITION_ATTRIBUTE_ID, (uint8_t *) &value, sizeof(value), true,
emAfWriteAttribute(1, Clusters::Switch::Id, ZCL_CURRENT_POSITION_ATTRIBUTE_ID, (uint8_t *) &value, sizeof(value), true,
false);
#ifdef SUPPORT_MANUAL_CTRL
// sync-up the Light attribute (for test event, OO.M.ManuallyControlled)
PRINTF("--> update [ZCL_ON_OFF_CLUSTER_ID]: ZCL_ON_OFF_ATTRIBUTE_ID [%d] \r\n", value);
emAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &value, sizeof(value), true, false);
PRINTF("--> update [Clusters::Switch::Id]: ZCL_ON_OFF_ATTRIBUTE_ID [%d] \r\n", value);
emAfWriteAttribute(1, Clusters::Switch::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &value, sizeof(value), true, false);
#endif // SUPPORT_MANUAL_CTRL

need2sync_sw_attr = false;
Expand Down Expand Up @@ -1529,7 +1529,7 @@ static void OnSwitchAttributeChangeCallback(EndpointId endpointId, AttributeId a
}
}
if (do_sendrpt == true) {
ConcreteEventPath event_path(endpointId, ZCL_SWITCH_CLUSTER_ID, 0);
ConcreteEventPath event_path(endpointId, Clusters::Switch::Id, 0);
pimEngine->GetReportingEngine().ScheduleEventDelivery(event_path, chip::app::EventOptions::Type::kUrgent,
sizeof(uint16_t));
}
Expand All @@ -1554,7 +1554,7 @@ void IdentifyTimerHandler(System::Layer * systemLayer, void * appState)
if (pidt->identifyTimerCount)
{
pidt->identifyTimerCount--;
emAfWriteAttribute(pidt->ep, ZCL_IDENTIFY_CLUSTER_ID, ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, (uint8_t *) &pidt->identifyTimerCount,
emAfWriteAttribute(pidt->ep, Clusters::Identify::Id, ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, (uint8_t *) &pidt->identifyTimerCount,
sizeof(identifyTimerCount), true, false);
DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), IdentifyTimerHandler, pidt);
}
Expand Down Expand Up @@ -1587,16 +1587,16 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath &
// path.mEndpointId, path.mClusterId, path.mAttributeId, mask, type, size, value
switch (path.mClusterId)
{
case ZCL_ON_OFF_CLUSTER_ID:
case Clusters::OnOff::Id:
OnOnOffPostAttributeChangeCallback(path.mEndpointId, path.mAttributeId, value);
break;
case ZCL_SWITCH_CLUSTER_ID:
case Clusters::Switch::Id:
OnSwitchAttributeChangeCallback(path.mEndpointId, path.mAttributeId, value);
// SwitchToggleOnOff();
// Trigger to send on/off/toggle command to the bound devices
chip::BindingManager::GetInstance().NotifyBoundClusterChanged(1, chip::app::Clusters::OnOff::Id, nullptr);
break;
case ZCL_IDENTIFY_CLUSTER_ID:
case Clusters::Identify::Id:
OnIdentifyPostAttributeChangeCallback(path.mEndpointId, path.mAttributeId, value);
break;
default:
Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/util/attribute-storage.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "CHIPDeviceManager.h"
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/util/af.h>
Expand Down Expand Up @@ -79,11 +79,11 @@ void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Cluster
{
switch (clusterId)
{
case ZCL_ON_OFF_CLUSTER_ID:
case app::Clusters::OnOff::Id:
OnOnOffPostAttributeChangeCallback(endpointId, attributeId, value);
break;

case ZCL_IDENTIFY_CLUSTER_ID:
case app::Clusters::Identify::Id:
OnIdentifyPostAttributeChangeCallback(endpointId, attributeId, value);
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/CommandHandler.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/util/basic-types.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "ClusterManager.h"

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <lib/dnssd/Advertiser.h>

#if CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#endif

static const char * TAG = "app-devicecallbacks";
Expand Down Expand Up @@ -165,13 +165,13 @@ void AppDeviceCallbacks::OnColorControlAttributeChangeCallback(EndpointId endpoi
if (attributeId == ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID)
{
hue = *value;
emberAfReadServerAttribute(endpointId, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID,
emberAfReadServerAttribute(endpointId, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID,
&saturation, sizeof(uint8_t));
}
else
{
saturation = *value;
emberAfReadServerAttribute(endpointId, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue,
emberAfReadServerAttribute(endpointId, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue,
sizeof(uint8_t));
}
statusLED1.SetColor(hue, saturation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include "DeviceWithDisplay.h"
#include <app-common/zap-generated/ids/Clusters.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>

#if CONFIG_HAVE_DISPLAY
Expand Down Expand Up @@ -232,7 +233,7 @@ class EditAttributeListModel : public TouchesMatterStackModel
{
value = (value == "On") ? "Off" : "On";
uint8_t attributeValue = (value == "On") ? 1 : 0;
emberAfWriteServerAttribute(endpointIndex + 1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID,
emberAfWriteServerAttribute(endpointIndex + 1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID,
(uint8_t *) &attributeValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/clusters/door-lock-server/door-lock-server.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
Expand Down Expand Up @@ -409,7 +409,7 @@ void AppTask::OnOffUpdateClusterState(intptr_t context)

// write the new on/off value
EmberAfStatus status =
emberAfWriteServerAttribute(2, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE);
emberAfWriteServerAttribute(2, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE);

if (status != EMBER_ZCL_STATUS_SUCCESS)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "LEDWidget.h"
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/util/basic-types.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "ClusterManager.h"

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/util/af-types.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/util/attribute-storage.h>

#include <credentials/DeviceAttestationCredsProvider.h>
Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-minimal-app/telink/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/attribute-type.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app/util/attribute-storage.h>

#include <credentials/DeviceAttestationCredsProvider.h>
Expand Down
15 changes: 7 additions & 8 deletions examples/bridge-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "nvs_flash.h"
#include <app-common/zap-generated/af-structs.h>
#include <app-common/zap-generated/attribute-id.h>
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/ConcreteAttributePath.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/reporting/reporting.h>
Expand Down Expand Up @@ -136,10 +136,9 @@ constexpr CommandId onOffIncomingCommands[] = {
};

DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedLightClusters)
DECLARE_DYNAMIC_CLUSTER(ZCL_ON_OFF_CLUSTER_ID, onOffAttrs, onOffIncomingCommands, nullptr),
DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr),
DECLARE_DYNAMIC_CLUSTER(ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, bridgedDeviceBasicAttrs, nullptr,
nullptr) DECLARE_DYNAMIC_CLUSTER_LIST_END;
DECLARE_DYNAMIC_CLUSTER(OnOff::Id, onOffAttrs, onOffIncomingCommands, nullptr),
DECLARE_DYNAMIC_CLUSTER(Descriptor::Id, descriptorAttrs, nullptr, nullptr),
DECLARE_DYNAMIC_CLUSTER(BridgedDeviceBasic::Id, bridgedDeviceBasicAttrs, nullptr, nullptr) DECLARE_DYNAMIC_CLUSTER_LIST_END;

// Declare Bridged Light endpoint
DECLARE_DYNAMIC_ENDPOINT(bridgedLightEndpoint, bridgedLightClusters);
Expand Down Expand Up @@ -278,11 +277,11 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
{
Device * dev = gDevices[endpointIndex];

if (clusterId == ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID)
if (clusterId == BridgedDeviceBasic::Id)
{
return HandleReadBridgedDeviceBasicAttribute(dev, attributeMetadata->attributeId, buffer, maxReadLength);
}
else if (clusterId == ZCL_ON_OFF_CLUSTER_ID)
else if (clusterId == OnOff::Id)
{
return HandleReadOnOffAttribute(dev, attributeMetadata->attributeId, buffer, maxReadLength);
}
Expand All @@ -300,7 +299,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster
{
Device * dev = gDevices[endpointIndex];

if ((dev->IsReachable()) && (clusterId == ZCL_ON_OFF_CLUSTER_ID))
if ((dev->IsReachable()) && (clusterId == OnOff::Id))
{
return HandleWriteOnOffAttribute(dev, attributeMetadata->attributeId, buffer);
}
Expand Down
Loading

0 comments on commit 8296737

Please sign in to comment.