diff --git a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp index 028dc7ca2a6370..4817cfb5f99e03 100644 --- a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp @@ -26,7 +26,7 @@ #include "DeviceCallbacks.h" #include "CHIPDeviceManager.h" #include -#include +#include #include #include #include @@ -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; diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp index 40661af8cd7c7d..1a07e18c72c3de 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp index 0524dc7578fd23..4d14d56f8f0d6f 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp @@ -28,7 +28,6 @@ #include "ClusterManager.h" #include -#include #include #include #include diff --git a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp index 52d632f7fa5afa..82917c28ef26b5 100644 --- a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp @@ -37,7 +37,7 @@ #include #if CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM -#include +#include #endif static const char * TAG = "app-devicecallbacks"; @@ -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); diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index d413072f671db1..967431efa8fc5f 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -18,6 +18,7 @@ #include "DeviceWithDisplay.h" #include +#include #include #if CONFIG_HAVE_DISPLAY @@ -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); } diff --git a/examples/all-clusters-app/esp32/main/include/DeviceWithDisplay.h b/examples/all-clusters-app/esp32/main/include/DeviceWithDisplay.h index 99e53e9be9dc4f..7a283fe7546ef5 100644 --- a/examples/all-clusters-app/esp32/main/include/DeviceWithDisplay.h +++ b/examples/all-clusters-app/esp32/main/include/DeviceWithDisplay.h @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp index 54cc0a74a29635..4c871b546bacd5 100644 --- a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -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) { diff --git a/examples/all-clusters-app/infineon/psoc6/src/ClusterManager.cpp b/examples/all-clusters-app/infineon/psoc6/src/ClusterManager.cpp index 4d550f8c4fdaf8..a3ae6a44190c75 100644 --- a/examples/all-clusters-app/infineon/psoc6/src/ClusterManager.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/ClusterManager.cpp @@ -26,7 +26,6 @@ #include "LEDWidget.h" #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/infineon/psoc6/src/ZclCallbacks.cpp b/examples/all-clusters-app/infineon/psoc6/src/ZclCallbacks.cpp index 32ba951b52cfc6..f3fd7cf6689a70 100644 --- a/examples/all-clusters-app/infineon/psoc6/src/ZclCallbacks.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/ZclCallbacks.cpp @@ -27,7 +27,6 @@ #include "ClusterManager.h" #include -#include #include #include #include diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index f8646a19f7bd94..b42b7b41ccd8ad 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/nxp/mw320/main.cpp b/examples/all-clusters-app/nxp/mw320/main.cpp index 6f865b9c4fb75e..a7f6478b1af9f7 100644 --- a/examples/all-clusters-app/nxp/mw320/main.cpp +++ b/examples/all-clusters-app/nxp/mw320/main.cpp @@ -30,7 +30,7 @@ //#include //==> rm from TE7.5 #include -#include +#include #include #include #include @@ -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; @@ -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; @@ -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)); } @@ -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); } @@ -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: diff --git a/examples/all-clusters-app/telink/src/AppTask.cpp b/examples/all-clusters-app/telink/src/AppTask.cpp index f0daf281889d5f..f00236e08ff707 100644 --- a/examples/all-clusters-app/telink/src/AppTask.cpp +++ b/examples/all-clusters-app/telink/src/AppTask.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #include diff --git a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp index 502057c88ae215..f4a7ab2d076c2f 100644 --- a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp @@ -26,7 +26,7 @@ #include "CHIPDeviceManager.h" #include -#include +#include #include #include #include @@ -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; diff --git a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ClusterManager.cpp b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ClusterManager.cpp index 40661af8cd7c7d..1a07e18c72c3de 100644 --- a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ClusterManager.cpp +++ b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ClusterManager.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp index 0524dc7578fd23..4d14d56f8f0d6f 100644 --- a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp +++ b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp @@ -28,7 +28,6 @@ #include "ClusterManager.h" #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp index 52d632f7fa5afa..82917c28ef26b5 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp @@ -37,7 +37,7 @@ #include #if CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM -#include +#include #endif static const char * TAG = "app-devicecallbacks"; @@ -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); diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp index 9557c97851d08e..9146fe465e12e9 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp @@ -17,6 +17,7 @@ */ #include "DeviceWithDisplay.h" +#include #include #if CONFIG_HAVE_DISPLAY @@ -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); } diff --git a/examples/all-clusters-minimal-app/esp32/main/include/DeviceWithDisplay.h b/examples/all-clusters-minimal-app/esp32/main/include/DeviceWithDisplay.h index 99e53e9be9dc4f..7a283fe7546ef5 100644 --- a/examples/all-clusters-minimal-app/esp32/main/include/DeviceWithDisplay.h +++ b/examples/all-clusters-minimal-app/esp32/main/include/DeviceWithDisplay.h @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp index a6d17539331230..35af6870006185 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -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) { diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/src/ClusterManager.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/ClusterManager.cpp index 4d550f8c4fdaf8..a3ae6a44190c75 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/src/ClusterManager.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/ClusterManager.cpp @@ -26,7 +26,6 @@ #include "LEDWidget.h" #include #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/src/ZclCallbacks.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/ZclCallbacks.cpp index 32ba951b52cfc6..f3fd7cf6689a70 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/src/ZclCallbacks.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/ZclCallbacks.cpp @@ -27,7 +27,6 @@ #include "ClusterManager.h" #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp index 25c4190544a18a..a2a149a9e01d50 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include diff --git a/examples/all-clusters-minimal-app/telink/src/AppTask.cpp b/examples/all-clusters-minimal-app/telink/src/AppTask.cpp index a08d81bf5b1a39..e6c684c5ff85b1 100644 --- a/examples/all-clusters-minimal-app/telink/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/telink/src/AppTask.cpp @@ -30,7 +30,6 @@ #include #include -#include #include #include diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index fe3cb2e9da11fc..dd06b095a17cf7 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -21,7 +21,7 @@ #include "nvs_flash.h" #include #include -#include +#include #include #include #include @@ -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); @@ -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); } @@ -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); } diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index a1b54c5101f73f..22dbeb1ac9f522 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -142,10 +142,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); @@ -196,9 +195,9 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_POWER_SOURCE_BAT_CHARGE_LEVEL_ATTRIBUTE_ID, ENUM8, DECLARE_DYNAMIC_ATTRIBUTE(ZCL_POWER_SOURCE_DESCRIPTION_ATTRIBUTE_ID, CHAR_STRING, 32, 0), DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedPowerSourceClusters) -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(ZCL_POWER_SOURCE_CLUSTER_ID, powerSourceAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END; +DECLARE_DYNAMIC_CLUSTER(Descriptor::Id, descriptorAttrs, nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(BridgedDeviceBasic::Id, bridgedDeviceBasicAttrs, nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(PowerSource::Id, powerSourceAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END; DECLARE_DYNAMIC_ENDPOINT(bridgedPowerSourceEndpoint, bridgedPowerSourceClusters); @@ -216,10 +215,9 @@ DECLARE_DYNAMIC_ATTRIBUTE(ZCL_TEMP_MEASURED_VALUE_ATTRIBUTE_ID, INT16S, 2, 0), // - Descriptor // - Bridged Device Basic DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedTempSensorClusters) -DECLARE_DYNAMIC_CLUSTER(ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID, tempSensorAttrs, nullptr, 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(TemperatureMeasurement::Id, tempSensorAttrs, nullptr, 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(bridgedTempSensorEndpoint, bridgedTempSensorClusters); @@ -234,9 +232,8 @@ DataVersion gTempSensor2DataVersions[ArraySize(bridgedTempSensorClusters)]; // Composed Device Configuration DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedComposedDeviceClusters) -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(Descriptor::Id, descriptorAttrs, nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(BridgedDeviceBasic::Id, bridgedDeviceBasicAttrs, nullptr, nullptr), DECLARE_DYNAMIC_CLUSTER_LIST_END; DECLARE_DYNAMIC_ENDPOINT(bridgedComposedDeviceEndpoint, bridgedComposedDeviceClusters); DataVersion gComposedDeviceDataVersions[ArraySize(bridgedComposedDeviceClusters)]; @@ -602,11 +599,11 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI { Device * dev = gDevices[endpointIndex]; - if (clusterId == ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID) + if (clusterId == BridgedDeviceBasic::Id) { ret = HandleReadBridgedDeviceBasicAttribute(dev, attributeMetadata->attributeId, buffer, maxReadLength); } - else if (clusterId == ZCL_ON_OFF_CLUSTER_ID) + else if (clusterId == OnOff::Id) { ret = HandleReadOnOffAttribute(static_cast(dev), attributeMetadata->attributeId, buffer, maxReadLength); } @@ -638,7 +635,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)) { ret = HandleWriteOnOffAttribute(static_cast(dev), attributeMetadata->attributeId, buffer); } diff --git a/examples/chef/ameba/main/DeviceCallbacks.cpp b/examples/chef/ameba/main/DeviceCallbacks.cpp index 259ff3d726f529..8e6b1192b96dd8 100644 --- a/examples/chef/ameba/main/DeviceCallbacks.cpp +++ b/examples/chef/ameba/main/DeviceCallbacks.cpp @@ -26,7 +26,7 @@ #include "CHIPDeviceManager.h" #include -#include +#include #include #include #include @@ -90,11 +90,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; diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 7672a41ea9904d..f170d306ff9ff3 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include // Include door lock callbacks only when the server is enabled diff --git a/examples/chef/efr32/src/AppTask.cpp b/examples/chef/efr32/src/AppTask.cpp index 0eb2b9ec492268..3de9bff17a49f9 100644 --- a/examples/chef/efr32/src/AppTask.cpp +++ b/examples/chef/efr32/src/AppTask.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp index e5db9238832af0..225815f8043b70 100644 --- a/examples/chef/esp32/main/main.cpp +++ b/examples/chef/esp32/main/main.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/common/pigweed/rpc_services/Attributes.h b/examples/common/pigweed/rpc_services/Attributes.h index 298df264a682ec..abc9dd1268b6fa 100644 --- a/examples/common/pigweed/rpc_services/Attributes.h +++ b/examples/common/pigweed/rpc_services/Attributes.h @@ -23,7 +23,6 @@ #include "pigweed/rpc_services/internal/StatusUtils.h" #include #include -#include #include #include #include diff --git a/examples/common/pigweed/rpc_services/Lighting.h b/examples/common/pigweed/rpc_services/Lighting.h index e8a96c6f4bdec3..533267a54c59bd 100644 --- a/examples/common/pigweed/rpc_services/Lighting.h +++ b/examples/common/pigweed/rpc_services/Lighting.h @@ -23,7 +23,7 @@ #include "pigweed/rpc_services/internal/StatusUtils.h" #include #include -#include +#include #include namespace chip { @@ -42,12 +42,12 @@ class Lighting : public pw_rpc::nanopb::Lighting::Service uint8_t on = request.on; RETURN_STATUS_IF_NOT_OK( - emberAfWriteServerAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &on, ZCL_BOOLEAN_ATTRIBUTE_ID)); + emberAfWriteServerAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &on, ZCL_BOOLEAN_ATTRIBUTE_ID)); if (mSupportLevel && request.has_level) { // Clip level to max uint8_t level = std::min(request.level, static_cast(std::numeric_limits::max())); - RETURN_STATUS_IF_NOT_OK(emberAfWriteServerAttribute(kEndpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, + RETURN_STATUS_IF_NOT_OK(emberAfWriteServerAttribute(kEndpoint, app::Clusters::LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, &level, ZCL_INT8U_ATTRIBUTE_TYPE)); } @@ -58,8 +58,8 @@ class Lighting : public pw_rpc::nanopb::Lighting::Service uint8_t hue = std::min(request.color.hue, kColorMax); uint8_t saturation = std::min(request.color.saturation, kColorMax); RETURN_STATUS_IF_NOT_OK(emberAfWriteServerAttribute( - 1, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue, ZCL_INT8U_ATTRIBUTE_TYPE)); - RETURN_STATUS_IF_NOT_OK(emberAfWriteServerAttribute(kEndpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, + 1, app::Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue, ZCL_INT8U_ATTRIBUTE_TYPE)); + RETURN_STATUS_IF_NOT_OK(emberAfWriteServerAttribute(kEndpoint, app::Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, &saturation, ZCL_INT8U_ATTRIBUTE_TYPE)); } @@ -74,22 +74,22 @@ class Lighting : public pw_rpc::nanopb::Lighting::Service uint8_t level; uint8_t hue; uint8_t saturation; - RETURN_STATUS_IF_NOT_OK(emberAfReadServerAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &on, sizeof(on))); + RETURN_STATUS_IF_NOT_OK(emberAfReadServerAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &on, sizeof(on))); response.on = on; if (mSupportLevel) { - RETURN_STATUS_IF_NOT_OK( - emberAfReadServerAttribute(1, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, &level, sizeof(level))); + RETURN_STATUS_IF_NOT_OK(emberAfReadServerAttribute(1, app::Clusters::LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, + &level, sizeof(level))); response.level = level; response.has_level = true; } if (mSupportColor) { - RETURN_STATUS_IF_NOT_OK(emberAfReadServerAttribute(kEndpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, + RETURN_STATUS_IF_NOT_OK(emberAfReadServerAttribute(kEndpoint, app::Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue, sizeof(hue))); - RETURN_STATUS_IF_NOT_OK(emberAfReadServerAttribute(kEndpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, + RETURN_STATUS_IF_NOT_OK(emberAfReadServerAttribute(kEndpoint, app::Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, &saturation, sizeof(saturation))); response.color.hue = hue; diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp index 437573fc215cf1..ef070c33c64273 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include /* OTA related includes */ @@ -854,7 +854,7 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) uint8_t newValue = ContactSensorMgr().IsContactClosed(); // write the new on/off value - EmberAfStatus status = emberAfWriteAttribute(1, ZCL_BOOLEAN_STATE_CLUSTER_ID, ZCL_STATE_VALUE_ATTRIBUTE_ID, + EmberAfStatus status = emberAfWriteAttribute(1, app::Clusters::BooleanState::Id, ZCL_STATE_VALUE_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { @@ -873,7 +873,8 @@ void AppTask::UpdateDeviceStateInternal(intptr_t arg) bool stateValueAttrValue = 0; /* get onoff attribute value */ - (void) emberAfReadAttribute(1, ZCL_BOOLEAN_STATE_CLUSTER_ID, ZCL_STATE_VALUE_ATTRIBUTE_ID, (uint8_t *) &stateValueAttrValue, 1); + (void) emberAfReadAttribute(1, app::Clusters::BooleanState::Id, ZCL_STATE_VALUE_ATTRIBUTE_ID, (uint8_t *) &stateValueAttrValue, + 1); #if !cPWR_UsePowerDownMode /* set the device state */ sContactSensorLED.Set(stateValueAttrValue); diff --git a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp b/examples/dynamic-bridge-app/linux/DynamicDevice.cpp index 9f0ca3951e8ce0..e9b99c94b0537a 100644 --- a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp +++ b/examples/dynamic-bridge-app/linux/DynamicDevice.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include "DynamicDevice.h" @@ -55,7 +55,7 @@ Device DynamicDevice::CreateDevice() // Force a default descriptor cluster to be present. mClusterDecls.emplace_back( - EmberAfCluster DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr)); + EmberAfCluster DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr)); return Device(chip::Span(mVersions.data(), mVersions.size()), chip::Span(mClusterDecls.data(), mClusterDecls.size()), diff --git a/examples/dynamic-bridge-app/linux/bridge_service.h b/examples/dynamic-bridge-app/linux/bridge_service.h index d2e05416a0a74f..faa744e7fba228 100644 --- a/examples/dynamic-bridge-app/linux/bridge_service.h +++ b/examples/dynamic-bridge-app/linux/bridge_service.h @@ -23,7 +23,6 @@ #include "pigweed/rpc_services/internal/StatusUtils.h" #include #include -#include #include namespace chip { diff --git a/examples/dynamic-bridge-app/linux/main.cpp b/examples/dynamic-bridge-app/linux/main.cpp index efb339582e3085..1c6ed2300771c7 100644 --- a/examples/dynamic-bridge-app/linux/main.cpp +++ b/examples/dynamic-bridge-app/linux/main.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp index f1776a46a71426..679faf925f5873 100644 --- a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp @@ -26,7 +26,6 @@ #include "CHIPDeviceManager.h" #include -#include #include #include #include diff --git a/examples/light-switch-app/efr32/src/AppTask.cpp b/examples/light-switch-app/efr32/src/AppTask.cpp index 3a3b2434b416dd..e1bbc8d782c888 100644 --- a/examples/light-switch-app/efr32/src/AppTask.cpp +++ b/examples/light-switch-app/efr32/src/AppTask.cpp @@ -40,7 +40,6 @@ #include #include -#include #include #include #include diff --git a/examples/light-switch-app/genio/src/AppTask.cpp b/examples/light-switch-app/genio/src/AppTask.cpp index 9f12f221846739..4fd88497239959 100644 --- a/examples/light-switch-app/genio/src/AppTask.cpp +++ b/examples/light-switch-app/genio/src/AppTask.cpp @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/examples/light-switch-app/telink/src/AppTask.cpp b/examples/light-switch-app/telink/src/AppTask.cpp index 7e1c792018b885..2bbd510217b7c3 100644 --- a/examples/light-switch-app/telink/src/AppTask.cpp +++ b/examples/light-switch-app/telink/src/AppTask.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp b/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp index c164e20609c497..951b4033e33077 100644 --- a/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp @@ -35,8 +35,8 @@ #include #include -#include #include +#include #include #include #include @@ -96,7 +96,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & ClusterId clusterId = attributePath.mClusterId; AttributeId attributeId = attributePath.mAttributeId; - if (clusterId == ZCL_ON_OFF_CLUSTER_ID) + if (clusterId == app::Clusters::OnOff::Id) { if (attributeId != ZCL_ON_OFF_ATTRIBUTE_ID) { @@ -106,7 +106,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & statusLED1.Set(*value); } - else if (clusterId == ZCL_LEVEL_CONTROL_CLUSTER_ID) + else if (clusterId == app::Clusters::LevelControl::Id) { if (attributeId != ZCL_CURRENT_LEVEL_ATTRIBUTE_ID) { @@ -122,7 +122,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & ChipLogError(Zcl, "wrong length for level: %d\n", size); } } - else if (clusterId == ZCL_COLOR_CONTROL_CLUSTER_ID) + else if (clusterId == app::Clusters::ColorControl::Id) { uint8_t hue, saturation; @@ -136,18 +136,18 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & 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, - &saturation, sizeof(uint8_t)); + emberAfReadServerAttribute(endpointId, app::Clusters::ColorControl::Id, + ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, &saturation, sizeof(uint8_t)); } if (attributeId == ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID) { saturation = *value; - emberAfReadServerAttribute(endpointId, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue, - sizeof(uint8_t)); + emberAfReadServerAttribute(endpointId, app::Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, + &hue, sizeof(uint8_t)); } ChipLogProgress(Zcl, "New hue: %d, New saturation: %d ", hue, saturation); } - else if (clusterId == ZCL_IDENTIFY_CLUSTER_ID) + else if (clusterId == app::Clusters::Identify::Id) { if (attributeId == ZCL_IDENTIFY_TIME_ATTRIBUTE_ID) { diff --git a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp index 5cf63d6ba41faa..d2f99168e97515 100644 --- a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp @@ -26,7 +26,7 @@ #include "CHIPDeviceManager.h" #include -#include +#include #include #include #include @@ -123,7 +123,7 @@ void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Cluster { switch (clusterId) { - case ZCL_IDENTIFY_CLUSTER_ID: + case app::Clusters::Identify::Id: OnIdentifyPostAttributeChangeCallback(endpointId, attributeId, value); break; diff --git a/examples/lighting-app/beken/main/DeviceCallbacks.cpp b/examples/lighting-app/beken/main/DeviceCallbacks.cpp index ff9362486a08c0..52da67d1253ecf 100644 --- a/examples/lighting-app/beken/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/beken/main/DeviceCallbacks.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include @@ -56,11 +56,11 @@ void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Clus { 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; diff --git a/examples/lighting-app/bouffalolab/common/AppTask.cpp b/examples/lighting-app/bouffalolab/common/AppTask.cpp index d0e2e582c187ba..cae6be58e7dd75 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.cpp +++ b/examples/lighting-app/bouffalolab/common/AppTask.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include @@ -469,26 +469,25 @@ void AppTask::LightingUpdate(app_event_t event) do { if (EMBER_ZCL_STATUS_SUCCESS != - emberAfReadAttribute(endpoint, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, sizeof(onoff))) + emberAfReadAttribute(endpoint, Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, sizeof(onoff))) { break; } if (EMBER_ZCL_STATUS_SUCCESS != - emberAfReadAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, &v, sizeof(v))) + emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, &v, sizeof(v))) { break; } if (EMBER_ZCL_STATUS_SUCCESS != - emberAfReadAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue, - sizeof(v))) + emberAfReadAttribute(endpoint, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, &hue, sizeof(v))) { break; } if (EMBER_ZCL_STATUS_SUCCESS != - emberAfReadAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, &sat, + emberAfReadAttribute(endpoint, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, &sat, sizeof(v))) { break; @@ -516,10 +515,10 @@ void AppTask::LightingSetOnoff(uint8_t bonoff) EndpointId endpoint = GetAppTask().GetEndpointId(); // write the new on/off value - emberAfWriteAttribute(endpoint, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, + emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); newValue = 254; - emberAfWriteAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &newValue, + emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -531,20 +530,20 @@ void AppTask::LightingSetStatus(app_event_t status) if (APP_EVENT_SYS_LIGHT_TOGGLE == status) { - emberAfReadAttribute(endpoint, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &onoff, + emberAfReadAttribute(endpoint, Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE); onoff = 1 - onoff; } else if (APP_EVENT_SYS_BLE_ADV == status) { hue = 35; - emberAfWriteAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, (uint8_t *) &hue, + emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, (uint8_t *) &hue, ZCL_INT8U_ATTRIBUTE_TYPE); sat = 254; - emberAfWriteAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, + emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, (uint8_t *) &sat, ZCL_INT8U_ATTRIBUTE_TYPE); level = 254; - emberAfWriteAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &level, + emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &level, ZCL_INT8U_ATTRIBUTE_TYPE); isProvisioned = false; @@ -557,14 +556,14 @@ void AppTask::LightingSetStatus(app_event_t status) } isProvisioned = true; sat = 0; - emberAfWriteAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, + emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, (uint8_t *) &sat, ZCL_INT8U_ATTRIBUTE_TYPE); level = 254; - emberAfWriteAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &level, + emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &level, ZCL_INT8U_ATTRIBUTE_TYPE); } - emberAfWriteAttribute(endpoint, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } bool AppTask::StartTimer(void) diff --git a/examples/lighting-app/esp32/main/AppTask.cpp b/examples/lighting-app/esp32/main/AppTask.cpp index 1af833792d0f71..434d98396efc64 100644 --- a/examples/lighting-app/esp32/main/AppTask.cpp +++ b/examples/lighting-app/esp32/main/AppTask.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #define APP_TASK_NAME "APP" #define APP_EVENT_QUEUE_SIZE 10 diff --git a/examples/lighting-app/genio/src/AppTask.cpp b/examples/lighting-app/genio/src/AppTask.cpp index e681d28a22169a..3542e1adca1381 100644 --- a/examples/lighting-app/genio/src/AppTask.cpp +++ b/examples/lighting-app/genio/src/AppTask.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp index dc11429fc65cd0..f8719aa64850ec 100644 --- a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp +++ b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp index 89605fc8a9c6e6..6bbc62708117cf 100644 --- a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp @@ -24,7 +24,7 @@ #include "LEDWidget.h" #include #include -#include +#include #include #include #include @@ -554,8 +554,8 @@ void AppTask::UpdateClusterState(intptr_t context) uint8_t newValue = LightMgr().IsLightOn(); // write the new on/off value - EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + EmberAfStatus status = emberAfWriteAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { P6_LOG("ERR: updating on/off %x", status); diff --git a/examples/lighting-app/mbed/main/AppTask.cpp b/examples/lighting-app/mbed/main/AppTask.cpp index 78ec859903b205..3cdf03a03edcec 100644 --- a/examples/lighting-app/mbed/main/AppTask.cpp +++ b/examples/lighting-app/mbed/main/AppTask.cpp @@ -35,7 +35,7 @@ // ZAP -- ZCL Advanced Platform #include #include -#include +#include #include #ifdef CAPSENSE_ENABLED @@ -464,7 +464,7 @@ void AppTask::UpdateClusterState() // write the new on/off value EmberAfStatus status = - emberAfWriteServerAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + emberAfWriteServerAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &onoff, ZCL_BOOLEAN_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogError(NotSpecified, "Updating on/off cluster failed: %x", status); @@ -472,7 +472,7 @@ void AppTask::UpdateClusterState() uint8_t level = LightingMgr().GetLevel(); - status = emberAfWriteServerAttribute(1, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, &level, + status = emberAfWriteServerAttribute(1, app::Clusters::LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, &level, ZCL_INT8U_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 15ab885139e20b..26a90b858eaf64 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index ab05f79d417c4e..4e45106161348e 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include @@ -922,8 +922,8 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) uint8_t newValue = !LightingMgr().IsTurnedOff(); // write the new on/off value - EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + EmberAfStatus status = emberAfWriteAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); @@ -940,7 +940,7 @@ void AppTask::UpdateDeviceStateInternal(intptr_t arg) bool onoffAttrValue = 0; /* get onoff attribute value */ - (void) emberAfReadAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &onoffAttrValue, 1); + (void) emberAfReadAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &onoffAttrValue, 1); /* set the device state */ sLightLED.Set(onoffAttrValue); diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index d7dd3c282791f6..145bee65d6c6be 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/silabs/SiWx917/src/AppTask.cpp b/examples/lighting-app/silabs/SiWx917/src/AppTask.cpp index 850649df25e27d..9abc9e17750f52 100644 --- a/examples/lighting-app/silabs/SiWx917/src/AppTask.cpp +++ b/examples/lighting-app/silabs/SiWx917/src/AppTask.cpp @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/examples/lighting-app/silabs/efr32/src/AppTask.cpp b/examples/lighting-app/silabs/efr32/src/AppTask.cpp index 850649df25e27d..9abc9e17750f52 100644 --- a/examples/lighting-app/silabs/efr32/src/AppTask.cpp +++ b/examples/lighting-app/silabs/efr32/src/AppTask.cpp @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index a310bdb1907560..a90dc1f89a3156 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lock-app/cc32xx/main/AppTask.cpp b/examples/lock-app/cc32xx/main/AppTask.cpp index 79da0749349665..cff1e73bf8d0cf 100644 --- a/examples/lock-app/cc32xx/main/AppTask.cpp +++ b/examples/lock-app/cc32xx/main/AppTask.cpp @@ -21,7 +21,7 @@ #include "AppConfig.h" #include "AppEvent.h" #include -#include +#include #include #include @@ -263,7 +263,7 @@ void AppTask::ActionCompleted(BoltLockManager::Action_t aAction) LED_setOff(gLedRedHandle); state = 0; } - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &state, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + emberAfWriteAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &state, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } void AppTask::DispatchEvent(AppEvent * aEvent) diff --git a/examples/lock-app/efr32/src/AppTask.cpp b/examples/lock-app/efr32/src/AppTask.cpp index 55003936dc515e..89f033a10231c6 100644 --- a/examples/lock-app/efr32/src/AppTask.cpp +++ b/examples/lock-app/efr32/src/AppTask.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index bedaf75b6946e2..c7ebacf0f334f5 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -23,7 +23,7 @@ #include "esp_log.h" #include #include -#include +#include #include #include #include @@ -467,8 +467,8 @@ void AppTask::UpdateClusterState(chip::System::Layer *, void * context) uint8_t newValue = !BoltLockMgr().IsUnlocked(); // write the new on/off value - EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + EmberAfStatus status = emberAfWriteAttribute(1, chip::app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { ESP_LOGI(TAG, "ERR: updating on/off %x", status); diff --git a/examples/lock-app/esp32/main/DeviceCallbacks.cpp b/examples/lock-app/esp32/main/DeviceCallbacks.cpp index a7e12754e7cb4d..7a073be32e1e53 100644 --- a/examples/lock-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/lock-app/esp32/main/DeviceCallbacks.cpp @@ -28,7 +28,7 @@ #include "BoltLockManager.h" #include -#include +#include static const char * TAG = "lock-devicecallbacks"; @@ -45,7 +45,7 @@ void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Clus switch (clusterId) { - case ZCL_ON_OFF_CLUSTER_ID: + case app::Clusters::OnOff::Id: OnOnOffPostAttributeChangeCallback(endpointId, attributeId, value); break; diff --git a/examples/lock-app/genio/src/AppTask.cpp b/examples/lock-app/genio/src/AppTask.cpp index 6c3e284991a9f2..05455f579ad1d3 100644 --- a/examples/lock-app/genio/src/AppTask.cpp +++ b/examples/lock-app/genio/src/AppTask.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lock-app/infineon/psoc6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp index d9d46398ee8afa..db2725170740f8 100644 --- a/examples/lock-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/examples/lock-app/mbed/main/AppTask.cpp b/examples/lock-app/mbed/main/AppTask.cpp index d9fc7e6dab8a13..8e2b98dac5b3f2 100644 --- a/examples/lock-app/mbed/main/AppTask.cpp +++ b/examples/lock-app/mbed/main/AppTask.cpp @@ -35,7 +35,7 @@ // ZAP -- ZCL Advanced Platform #include #include -#include +#include #include #ifdef CAPSENSE_ENABLED @@ -463,7 +463,7 @@ void AppTask::UpdateClusterState() // write the new on/off value EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + emberAfWriteAttribute(1, app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogError(NotSpecified, "ZCL update failed: %lx", status); diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 4f5c18d869a73e..f767e5d52c6615 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp index cb78aef83ee0cd..deba6a5c63772d 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include "Keyboard.h" @@ -763,8 +763,8 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) uint8_t newValue = !BoltLockMgr().IsUnlocked(); // write the new on/off value - EmberAfStatus status = - emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + EmberAfStatus status = emberAfWriteAttribute(1, chip::app::Clusters::OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, (uint8_t *) &newValue, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index bc24d7fbbe8b46..3306379bbe41da 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp index 259ff3d726f529..8e6b1192b96dd8 100644 --- a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp @@ -26,7 +26,7 @@ #include "CHIPDeviceManager.h" #include -#include +#include #include #include #include @@ -90,11 +90,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; diff --git a/examples/ota-requestor-app/telink/src/AppTask.cpp b/examples/ota-requestor-app/telink/src/AppTask.cpp index 314e228772899b..9c8bb471a4317b 100644 --- a/examples/ota-requestor-app/telink/src/AppTask.cpp +++ b/examples/ota-requestor-app/telink/src/AppTask.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include diff --git a/examples/platform/beken/common/CommonDeviceCallbacks.cpp b/examples/platform/beken/common/CommonDeviceCallbacks.cpp index 23677ad7342406..990c381cfe2df6 100644 --- a/examples/platform/beken/common/CommonDeviceCallbacks.cpp +++ b/examples/platform/beken/common/CommonDeviceCallbacks.cpp @@ -18,7 +18,6 @@ #include "CommonDeviceCallbacks.h" #include -#include #include #include #include diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp index 081c591fb4e670..929fc26052f801 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp @@ -32,7 +32,6 @@ #include "esp_log.h" #include "route_hook/esp_route_hook.h" #include -#include #include #include #include diff --git a/examples/platform/silabs/SiWx917/BaseApplication.cpp b/examples/platform/silabs/SiWx917/BaseApplication.cpp index 85748b35359d3f..a9ecfc63bb0c60 100644 --- a/examples/platform/silabs/SiWx917/BaseApplication.cpp +++ b/examples/platform/silabs/SiWx917/BaseApplication.cpp @@ -40,7 +40,6 @@ #include "EFR32DeviceDataProvider.h" #include #include -#include #include #include #include diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/efr32/BaseApplication.cpp index 85748b35359d3f..a9ecfc63bb0c60 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/efr32/BaseApplication.cpp @@ -40,7 +40,6 @@ #include "EFR32DeviceDataProvider.h" #include #include -#include #include #include #include diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp index 5fc2be33ce6910..73c9e1621b46f0 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp @@ -28,7 +28,6 @@ #include "PumpManager.h" #include -#include #include #include #include diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 209eaa0805b666..14ea81f628e2d6 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 248b39255cbd51..1e59d9bd6affbe 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp b/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp index 0ceec53420993b..47c5f4d62b44b8 100644 --- a/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/shell/nxp/k32w/k32w0/main/AppTask.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #include "Keyboard.h" diff --git a/examples/thermostat/efr32/src/AppTask.cpp b/examples/thermostat/efr32/src/AppTask.cpp index 073a52ba392001..40418341d8b697 100644 --- a/examples/thermostat/efr32/src/AppTask.cpp +++ b/examples/thermostat/efr32/src/AppTask.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/thermostat/genio/src/AppTask.cpp b/examples/thermostat/genio/src/AppTask.cpp index bc948d6a947743..8630aad9fbf2ba 100644 --- a/examples/thermostat/genio/src/AppTask.cpp +++ b/examples/thermostat/genio/src/AppTask.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/examples/thermostat/telink/src/AppTask.cpp b/examples/thermostat/telink/src/AppTask.cpp index 40d78abb7ed402..df25ef8cfb4c19 100644 --- a/examples/thermostat/telink/src/AppTask.cpp +++ b/examples/thermostat/telink/src/AppTask.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/tv-app/android/include/cluster-init.cpp b/examples/tv-app/android/include/cluster-init.cpp index 3c83bef42afd9c..45bc21a45f4ee8 100644 --- a/examples/tv-app/android/include/cluster-init.cpp +++ b/examples/tv-app/android/include/cluster-init.cpp @@ -22,7 +22,6 @@ #include "target-navigator/TargetNavigatorManager.h" #include -#include #include #include #include diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index d03ebc2c908e52..90fc6b5d50d991 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -24,7 +24,6 @@ #include "ContentAppAttributeDelegate.h" #include "ContentAppCommandDelegate.h" #include -#include #include #include #include @@ -227,21 +226,21 @@ constexpr CommandId channelOutgoingCommands[] = { }; // Declare Cluster List for Content App endpoint DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(contentAppClusters) -DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr), - DECLARE_DYNAMIC_CLUSTER(ZCL_APPLICATION_BASIC_CLUSTER_ID, applicationBasicAttrs, nullptr, nullptr), - DECLARE_DYNAMIC_CLUSTER(ZCL_KEYPAD_INPUT_CLUSTER_ID, keypadInputAttrs, keypadInputIncomingCommands, +DECLARE_DYNAMIC_CLUSTER(app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(app::Clusters::ApplicationBasic::Id, applicationBasicAttrs, nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(app::Clusters::KeypadInput::Id, keypadInputAttrs, keypadInputIncomingCommands, keypadInputOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, applicationLauncherAttrs, applicationLauncherIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::ApplicationLauncher::Id, applicationLauncherAttrs, applicationLauncherIncomingCommands, applicationLauncherOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_ACCOUNT_LOGIN_CLUSTER_ID, accountLoginAttrs, accountLoginIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::AccountLogin::Id, accountLoginAttrs, accountLoginIncomingCommands, accountLoginOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_CONTENT_LAUNCHER_CLUSTER_ID, contentLauncherAttrs, contentLauncherIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::ContentLauncher::Id, contentLauncherAttrs, contentLauncherIncomingCommands, contentLauncherOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_MEDIA_PLAYBACK_CLUSTER_ID, mediaPlaybackAttrs, mediaPlaybackIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::MediaPlayback::Id, mediaPlaybackAttrs, mediaPlaybackIncomingCommands, mediaPlaybackOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_TARGET_NAVIGATOR_CLUSTER_ID, targetNavigatorAttrs, targetNavigatorIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::TargetNavigator::Id, targetNavigatorAttrs, targetNavigatorIncomingCommands, targetNavigatorOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_CHANNEL_CLUSTER_ID, channelAttrs, channelIncomingCommands, channelOutgoingCommands), + DECLARE_DYNAMIC_CLUSTER(app::Clusters::Channel::Id, channelAttrs, channelIncomingCommands, channelOutgoingCommands), DECLARE_DYNAMIC_CLUSTER_LIST_END; // Declare Content App endpoint diff --git a/examples/tv-app/android/java/DeviceCallbacks.cpp b/examples/tv-app/android/java/DeviceCallbacks.cpp index 07673ffae1acfa..cf61e191385317 100644 --- a/examples/tv-app/android/java/DeviceCallbacks.cpp +++ b/examples/tv-app/android/java/DeviceCallbacks.cpp @@ -25,7 +25,6 @@ #include "DeviceCallbacks.h" #include -#include #include #include #include diff --git a/examples/tv-app/linux/AppImpl.cpp b/examples/tv-app/linux/AppImpl.cpp index 544dbb8509e8f6..d6496acdb1ad9e 100644 --- a/examples/tv-app/linux/AppImpl.cpp +++ b/examples/tv-app/linux/AppImpl.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -386,21 +385,21 @@ constexpr CommandId channelOutgoingCommands[] = { }; // Declare Cluster List for Content App endpoint DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(contentAppClusters) -DECLARE_DYNAMIC_CLUSTER(ZCL_DESCRIPTOR_CLUSTER_ID, descriptorAttrs, nullptr, nullptr), - DECLARE_DYNAMIC_CLUSTER(ZCL_APPLICATION_BASIC_CLUSTER_ID, applicationBasicAttrs, nullptr, nullptr), - DECLARE_DYNAMIC_CLUSTER(ZCL_KEYPAD_INPUT_CLUSTER_ID, keypadInputAttrs, keypadInputIncomingCommands, +DECLARE_DYNAMIC_CLUSTER(app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(app::Clusters::ApplicationBasic::Id, applicationBasicAttrs, nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(app::Clusters::KeypadInput::Id, keypadInputAttrs, keypadInputIncomingCommands, keypadInputOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, applicationLauncherAttrs, applicationLauncherIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::ApplicationLauncher::Id, applicationLauncherAttrs, applicationLauncherIncomingCommands, applicationLauncherOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_ACCOUNT_LOGIN_CLUSTER_ID, accountLoginAttrs, accountLoginIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::AccountLogin::Id, accountLoginAttrs, accountLoginIncomingCommands, accountLoginOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_CONTENT_LAUNCHER_CLUSTER_ID, contentLauncherAttrs, contentLauncherIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::ContentLauncher::Id, contentLauncherAttrs, contentLauncherIncomingCommands, contentLauncherOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_MEDIA_PLAYBACK_CLUSTER_ID, mediaPlaybackAttrs, mediaPlaybackIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::MediaPlayback::Id, mediaPlaybackAttrs, mediaPlaybackIncomingCommands, mediaPlaybackOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_TARGET_NAVIGATOR_CLUSTER_ID, targetNavigatorAttrs, targetNavigatorIncomingCommands, + DECLARE_DYNAMIC_CLUSTER(app::Clusters::TargetNavigator::Id, targetNavigatorAttrs, targetNavigatorIncomingCommands, targetNavigatorOutgoingCommands), - DECLARE_DYNAMIC_CLUSTER(ZCL_CHANNEL_CLUSTER_ID, channelAttrs, channelIncomingCommands, channelOutgoingCommands), + DECLARE_DYNAMIC_CLUSTER(app::Clusters::Channel::Id, channelAttrs, channelIncomingCommands, channelOutgoingCommands), DECLARE_DYNAMIC_CLUSTER_LIST_END; // Declare Content App endpoint diff --git a/examples/tv-app/linux/include/cluster-init.cpp b/examples/tv-app/linux/include/cluster-init.cpp index bbb889d264404d..ea56403a7df4c6 100644 --- a/examples/tv-app/linux/include/cluster-init.cpp +++ b/examples/tv-app/linux/include/cluster-init.cpp @@ -26,7 +26,6 @@ #include "wake-on-lan/WakeOnLanManager.h" #include -#include #include #include #include diff --git a/examples/tv-app/linux/include/level-control/LevelControl.cpp b/examples/tv-app/linux/include/level-control/LevelControl.cpp index 278c42f8737ed1..6390707e97418e 100644 --- a/examples/tv-app/linux/include/level-control/LevelControl.cpp +++ b/examples/tv-app/linux/include/level-control/LevelControl.cpp @@ -21,8 +21,8 @@ #include #include #include -#include #include +#include using namespace chip; using namespace chip::app::Clusters; @@ -40,7 +40,7 @@ static EmberAfLevelControlState stateTable[EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER static EmberAfLevelControlState * getState(EndpointId endpoint) { - uint8_t ep = emberAfFindClusterServerEndpointIndex(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID); + uint8_t ep = emberAfFindClusterServerEndpointIndex(endpoint, LevelControl::Id); return (ep == 0xFF ? NULL : &stateTable[ep]); } @@ -118,7 +118,7 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, } send_default_response: - if (emberAfCurrentCommand()->apsFrame->clusterId == ZCL_LEVEL_CONTROL_CLUSTER_ID) + if (emberAfCurrentCommand()->apsFrame->clusterId == LevelControl::Id) { emberAfSendImmediateDefaultResponse(status); } diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index 311640093e35c0..212a3c8ce3e302 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/scripts/idl/generators/bridge/BridgeClustersGlobalStructs.jinja b/scripts/idl/generators/bridge/BridgeClustersGlobalStructs.jinja index 26a8dfa2ec4d81..0fcee9b1efe45d 100644 --- a/scripts/idl/generators/bridge/BridgeClustersGlobalStructs.jinja +++ b/scripts/idl/generators/bridge/BridgeClustersGlobalStructs.jinja @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/scripts/idl/generators/bridge/BridgeClustersHeader.jinja b/scripts/idl/generators/bridge/BridgeClustersHeader.jinja index 3ad37a63ed5821..66aebf7d9d02cd 100644 --- a/scripts/idl/generators/bridge/BridgeClustersHeader.jinja +++ b/scripts/idl/generators/bridge/BridgeClustersHeader.jinja @@ -1,4 +1,3 @@ -#include #include #include diff --git a/scripts/idl/generators/cpp/application/CallbackStubSource.jinja b/scripts/idl/generators/cpp/application/CallbackStubSource.jinja index e17cb3b6fca286..cd800400dc4d10 100644 --- a/scripts/idl/generators/cpp/application/CallbackStubSource.jinja +++ b/scripts/idl/generators/cpp/application/CallbackStubSource.jinja @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -11,7 +11,7 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) switch (clusterId) { {%- for name in clusters | sort(attribute='name') | map(attribute='name') | unique %} - case ZCL_{{name | normalize_acronyms | constcase}}_CLUSTER_ID: + case app::Clusters::{{name}}::Id: emberAf{{name}}ClusterInitCallback(endpoint); break; {%- endfor %} diff --git a/scripts/idl/tests/outputs/cluster_struct_attribute/bridge/BridgeGlobalStructs.h b/scripts/idl/tests/outputs/cluster_struct_attribute/bridge/BridgeGlobalStructs.h index d2a3def71c2189..3b56a6f868b109 100644 --- a/scripts/idl/tests/outputs/cluster_struct_attribute/bridge/BridgeGlobalStructs.h +++ b/scripts/idl/tests/outputs/cluster_struct_attribute/bridge/BridgeGlobalStructs.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/scripts/idl/tests/outputs/global_struct_attribute/bridge/BridgeGlobalStructs.h b/scripts/idl/tests/outputs/global_struct_attribute/bridge/BridgeGlobalStructs.h index a85ccfa9ad2cd4..4b67ca9cbaeefe 100644 --- a/scripts/idl/tests/outputs/global_struct_attribute/bridge/BridgeGlobalStructs.h +++ b/scripts/idl/tests/outputs/global_struct_attribute/bridge/BridgeGlobalStructs.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/scripts/idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp b/scripts/idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp index 7ed6c62053575d..a0bc3f39be80be 100644 --- a/scripts/idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp +++ b/scripts/idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -10,196 +10,196 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) { switch (clusterId) { - case ZCL_ACCESS_CONTROL_CLUSTER_ID: + case app::Clusters::AccessControl::Id: emberAfAccessControlClusterInitCallback(endpoint); break; - case ZCL_ACCOUNT_LOGIN_CLUSTER_ID: + case app::Clusters::AccountLogin::Id: emberAfAccountLoginClusterInitCallback(endpoint); break; - case ZCL_ACTIONS_CLUSTER_ID: + case app::Clusters::Actions::Id: emberAfActionsClusterInitCallback(endpoint); break; - case ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID: + case app::Clusters::AdministratorCommissioning::Id: emberAfAdministratorCommissioningClusterInitCallback(endpoint); break; - case ZCL_APPLICATION_BASIC_CLUSTER_ID: + case app::Clusters::ApplicationBasic::Id: emberAfApplicationBasicClusterInitCallback(endpoint); break; - case ZCL_APPLICATION_LAUNCHER_CLUSTER_ID: + case app::Clusters::ApplicationLauncher::Id: emberAfApplicationLauncherClusterInitCallback(endpoint); break; - case ZCL_AUDIO_OUTPUT_CLUSTER_ID: + case app::Clusters::AudioOutput::Id: emberAfAudioOutputClusterInitCallback(endpoint); break; - case ZCL_BARRIER_CONTROL_CLUSTER_ID: + case app::Clusters::BarrierControl::Id: emberAfBarrierControlClusterInitCallback(endpoint); break; - case ZCL_BASIC_CLUSTER_ID: + case app::Clusters::Basic::Id: emberAfBasicClusterInitCallback(endpoint); break; - case ZCL_BINARY_INPUT_BASIC_CLUSTER_ID: + case app::Clusters::BinaryInputBasic::Id: emberAfBinaryInputBasicClusterInitCallback(endpoint); break; - case ZCL_BINDING_CLUSTER_ID: + case app::Clusters::Binding::Id: emberAfBindingClusterInitCallback(endpoint); break; - case ZCL_BOOLEAN_STATE_CLUSTER_ID: + case app::Clusters::BooleanState::Id: emberAfBooleanStateClusterInitCallback(endpoint); break; - case ZCL_CHANNEL_CLUSTER_ID: + case app::Clusters::Channel::Id: emberAfChannelClusterInitCallback(endpoint); break; - case ZCL_COLOR_CONTROL_CLUSTER_ID: + case app::Clusters::ColorControl::Id: emberAfColorControlClusterInitCallback(endpoint); break; - case ZCL_CONTENT_LAUNCHER_CLUSTER_ID: + case app::Clusters::ContentLauncher::Id: emberAfContentLauncherClusterInitCallback(endpoint); break; - case ZCL_DESCRIPTOR_CLUSTER_ID: + case app::Clusters::Descriptor::Id: emberAfDescriptorClusterInitCallback(endpoint); break; - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case app::Clusters::DiagnosticLogs::Id: emberAfDiagnosticLogsClusterInitCallback(endpoint); break; - case ZCL_DOOR_LOCK_CLUSTER_ID: + case app::Clusters::DoorLock::Id: emberAfDoorLockClusterInitCallback(endpoint); break; - case ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID: + case app::Clusters::ElectricalMeasurement::Id: emberAfElectricalMeasurementClusterInitCallback(endpoint); break; - case ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::EthernetNetworkDiagnostics::Id: emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_FAN_CONTROL_CLUSTER_ID: + case app::Clusters::FanControl::Id: emberAfFanControlClusterInitCallback(endpoint); break; - case ZCL_FAULT_INJECTION_CLUSTER_ID: + case app::Clusters::FaultInjection::Id: emberAfFaultInjectionClusterInitCallback(endpoint); break; - case ZCL_FIXED_LABEL_CLUSTER_ID: + case app::Clusters::FixedLabel::Id: emberAfFixedLabelClusterInitCallback(endpoint); break; - case ZCL_FLOW_MEASUREMENT_CLUSTER_ID: + case app::Clusters::FlowMeasurement::Id: emberAfFlowMeasurementClusterInitCallback(endpoint); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case app::Clusters::GeneralCommissioning::Id: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; - case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::GeneralDiagnostics::Id: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID: + case app::Clusters::GroupKeyManagement::Id: emberAfGroupKeyManagementClusterInitCallback(endpoint); break; - case ZCL_GROUPS_CLUSTER_ID: + case app::Clusters::Groups::Id: emberAfGroupsClusterInitCallback(endpoint); break; - case ZCL_IDENTIFY_CLUSTER_ID: + case app::Clusters::Identify::Id: emberAfIdentifyClusterInitCallback(endpoint); break; - case ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID: + case app::Clusters::IlluminanceMeasurement::Id: emberAfIlluminanceMeasurementClusterInitCallback(endpoint); break; - case ZCL_KEYPAD_INPUT_CLUSTER_ID: + case app::Clusters::KeypadInput::Id: emberAfKeypadInputClusterInitCallback(endpoint); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case app::Clusters::LevelControl::Id: emberAfLevelControlClusterInitCallback(endpoint); break; - case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + case app::Clusters::LocalizationConfiguration::Id: emberAfLocalizationConfigurationClusterInitCallback(endpoint); break; - case ZCL_LOW_POWER_CLUSTER_ID: + case app::Clusters::LowPower::Id: emberAfLowPowerClusterInitCallback(endpoint); break; - case ZCL_MEDIA_INPUT_CLUSTER_ID: + case app::Clusters::MediaInput::Id: emberAfMediaInputClusterInitCallback(endpoint); break; - case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: + case app::Clusters::MediaPlayback::Id: emberAfMediaPlaybackClusterInitCallback(endpoint); break; - case ZCL_MODE_SELECT_CLUSTER_ID: + case app::Clusters::ModeSelect::Id: emberAfModeSelectClusterInitCallback(endpoint); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case app::Clusters::NetworkCommissioning::Id: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; - case ZCL_OCCUPANCY_SENSING_CLUSTER_ID: + case app::Clusters::OccupancySensing::Id: emberAfOccupancySensingClusterInitCallback(endpoint); break; - case ZCL_ON_OFF_CLUSTER_ID: + case app::Clusters::OnOff::Id: emberAfOnOffClusterInitCallback(endpoint); break; - case ZCL_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_ID: + case app::Clusters::OnOffSwitchConfiguration::Id: emberAfOnOffSwitchConfigurationClusterInitCallback(endpoint); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case app::Clusters::OperationalCredentials::Id: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; - case ZCL_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_ID: + case app::Clusters::OtaSoftwareUpdateProvider::Id: emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); break; - case ZCL_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_ID: + case app::Clusters::OtaSoftwareUpdateRequestor::Id: emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); break; - case ZCL_POWER_SOURCE_CLUSTER_ID: + case app::Clusters::PowerSource::Id: emberAfPowerSourceClusterInitCallback(endpoint); break; - case ZCL_POWER_SOURCE_CONFIGURATION_CLUSTER_ID: + case app::Clusters::PowerSourceConfiguration::Id: emberAfPowerSourceConfigurationClusterInitCallback(endpoint); break; - case ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID: + case app::Clusters::PressureMeasurement::Id: emberAfPressureMeasurementClusterInitCallback(endpoint); break; - case ZCL_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_ID: + case app::Clusters::PumpConfigurationAndControl::Id: emberAfPumpConfigurationAndControlClusterInitCallback(endpoint); break; - case ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID: + case app::Clusters::RelativeHumidityMeasurement::Id: emberAfRelativeHumidityMeasurementClusterInitCallback(endpoint); break; - case ZCL_SCENES_CLUSTER_ID: + case app::Clusters::Scenes::Id: emberAfScenesClusterInitCallback(endpoint); break; - case ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::SoftwareDiagnostics::Id: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_SWITCH_CLUSTER_ID: + case app::Clusters::Switch::Id: emberAfSwitchClusterInitCallback(endpoint); break; - case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: + case app::Clusters::TargetNavigator::Id: emberAfTargetNavigatorClusterInitCallback(endpoint); break; - case ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID: + case app::Clusters::TemperatureMeasurement::Id: emberAfTemperatureMeasurementClusterInitCallback(endpoint); break; - case ZCL_THERMOSTAT_CLUSTER_ID: + case app::Clusters::Thermostat::Id: emberAfThermostatClusterInitCallback(endpoint); break; - case ZCL_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_ID: + case app::Clusters::ThermostatUserInterfaceConfiguration::Id: emberAfThermostatUserInterfaceConfigurationClusterInitCallback(endpoint); break; - case ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::ThreadNetworkDiagnostics::Id: emberAfThreadNetworkDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_TIME_FORMAT_LOCALIZATION_CLUSTER_ID: + case app::Clusters::TimeFormatLocalization::Id: emberAfTimeFormatLocalizationClusterInitCallback(endpoint); break; - case ZCL_UNIT_LOCALIZATION_CLUSTER_ID: + case app::Clusters::UnitLocalization::Id: emberAfUnitLocalizationClusterInitCallback(endpoint); break; - case ZCL_UNIT_TESTING_CLUSTER_ID: + case app::Clusters::UnitTesting::Id: emberAfUnitTestingClusterInitCallback(endpoint); break; - case ZCL_USER_LABEL_CLUSTER_ID: + case app::Clusters::UserLabel::Id: emberAfUserLabelClusterInitCallback(endpoint); break; - case ZCL_WAKE_ON_LAN_CLUSTER_ID: + case app::Clusters::WakeOnLan::Id: emberAfWakeOnLanClusterInitCallback(endpoint); break; - case ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::WiFiNetworkDiagnostics::Id: emberAfWiFiNetworkDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_WINDOW_COVERING_CLUSTER_ID: + case app::Clusters::WindowCovering::Id: emberAfWindowCoveringClusterInitCallback(endpoint); break; default: diff --git a/scripts/idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp b/scripts/idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp index 57934f7f40ec20..54955e5a834a06 100644 --- a/scripts/idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp +++ b/scripts/idl/tests/outputs/large_lighting_app/cpp-app/callback-stub.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -10,85 +10,85 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) { switch (clusterId) { - case ZCL_ACCESS_CONTROL_CLUSTER_ID: + case app::Clusters::AccessControl::Id: emberAfAccessControlClusterInitCallback(endpoint); break; - case ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID: + case app::Clusters::AdministratorCommissioning::Id: emberAfAdministratorCommissioningClusterInitCallback(endpoint); break; - case ZCL_BASIC_CLUSTER_ID: + case app::Clusters::Basic::Id: emberAfBasicClusterInitCallback(endpoint); break; - case ZCL_COLOR_CONTROL_CLUSTER_ID: + case app::Clusters::ColorControl::Id: emberAfColorControlClusterInitCallback(endpoint); break; - case ZCL_DESCRIPTOR_CLUSTER_ID: + case app::Clusters::Descriptor::Id: emberAfDescriptorClusterInitCallback(endpoint); break; - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case app::Clusters::DiagnosticLogs::Id: emberAfDiagnosticLogsClusterInitCallback(endpoint); break; - case ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::EthernetNetworkDiagnostics::Id: emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_FIXED_LABEL_CLUSTER_ID: + case app::Clusters::FixedLabel::Id: emberAfFixedLabelClusterInitCallback(endpoint); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case app::Clusters::GeneralCommissioning::Id: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; - case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::GeneralDiagnostics::Id: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID: + case app::Clusters::GroupKeyManagement::Id: emberAfGroupKeyManagementClusterInitCallback(endpoint); break; - case ZCL_GROUPS_CLUSTER_ID: + case app::Clusters::Groups::Id: emberAfGroupsClusterInitCallback(endpoint); break; - case ZCL_IDENTIFY_CLUSTER_ID: + case app::Clusters::Identify::Id: emberAfIdentifyClusterInitCallback(endpoint); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case app::Clusters::LevelControl::Id: emberAfLevelControlClusterInitCallback(endpoint); break; - case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: + case app::Clusters::LocalizationConfiguration::Id: emberAfLocalizationConfigurationClusterInitCallback(endpoint); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case app::Clusters::NetworkCommissioning::Id: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; - case ZCL_OCCUPANCY_SENSING_CLUSTER_ID: + case app::Clusters::OccupancySensing::Id: emberAfOccupancySensingClusterInitCallback(endpoint); break; - case ZCL_ON_OFF_CLUSTER_ID: + case app::Clusters::OnOff::Id: emberAfOnOffClusterInitCallback(endpoint); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case app::Clusters::OperationalCredentials::Id: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; - case ZCL_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_ID: + case app::Clusters::OtaSoftwareUpdateProvider::Id: emberAfOtaSoftwareUpdateProviderClusterInitCallback(endpoint); break; - case ZCL_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_ID: + case app::Clusters::OtaSoftwareUpdateRequestor::Id: emberAfOtaSoftwareUpdateRequestorClusterInitCallback(endpoint); break; - case ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::SoftwareDiagnostics::Id: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_SWITCH_CLUSTER_ID: + case app::Clusters::Switch::Id: emberAfSwitchClusterInitCallback(endpoint); break; - case ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::ThreadNetworkDiagnostics::Id: emberAfThreadNetworkDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_TIME_FORMAT_LOCALIZATION_CLUSTER_ID: + case app::Clusters::TimeFormatLocalization::Id: emberAfTimeFormatLocalizationClusterInitCallback(endpoint); break; - case ZCL_USER_LABEL_CLUSTER_ID: + case app::Clusters::UserLabel::Id: emberAfUserLabelClusterInitCallback(endpoint); break; - case ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID: + case app::Clusters::WiFiNetworkDiagnostics::Id: emberAfWiFiNetworkDiagnosticsClusterInitCallback(endpoint); break; default: diff --git a/scripts/idl/tests/outputs/several_clusters/bridge/BridgeGlobalStructs.h b/scripts/idl/tests/outputs/several_clusters/bridge/BridgeGlobalStructs.h index d2a3def71c2189..3b56a6f868b109 100644 --- a/scripts/idl/tests/outputs/several_clusters/bridge/BridgeGlobalStructs.h +++ b/scripts/idl/tests/outputs/several_clusters/bridge/BridgeGlobalStructs.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/scripts/idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp b/scripts/idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp index 4b92f0e3989ca6..d603013606d835 100644 --- a/scripts/idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp +++ b/scripts/idl/tests/outputs/several_clusters/cpp-app/callback-stub.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -10,13 +10,13 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) { switch (clusterId) { - case ZCL_FIRST_CLUSTER_ID: + case app::Clusters::First::Id: emberAfFirstClusterInitCallback(endpoint); break; - case ZCL_SECOND_CLUSTER_ID: + case app::Clusters::Second::Id: emberAfSecondClusterInitCallback(endpoint); break; - case ZCL_THIRD_CLUSTER_ID: + case app::Clusters::Third::Id: emberAfThirdClusterInitCallback(endpoint); break; default: diff --git a/scripts/idl/tests/outputs/simple_attribute/bridge/BridgeGlobalStructs.h b/scripts/idl/tests/outputs/simple_attribute/bridge/BridgeGlobalStructs.h index d2a3def71c2189..3b56a6f868b109 100644 --- a/scripts/idl/tests/outputs/simple_attribute/bridge/BridgeGlobalStructs.h +++ b/scripts/idl/tests/outputs/simple_attribute/bridge/BridgeGlobalStructs.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/src/app/app-platform/ContentApp.cpp b/src/app/app-platform/ContentApp.cpp index cd7e8bdd0d4cd3..571561454162ac 100644 --- a/src/app/app-platform/ContentApp.cpp +++ b/src/app/app-platform/ContentApp.cpp @@ -19,8 +19,6 @@ * @file Contains functions relating to Content App of the Video Player. */ -#include -#include #include #include #include diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 736cf164fdfede..0b03dc22f8e262 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -19,8 +19,6 @@ * @file Contains functions relating to Content App platform of the Video Player. */ -#include -#include #include #include #include diff --git a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp index c3d59d66db159d..40b8e84443ce4e 100644 --- a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp +++ b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include #include diff --git a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h index beb7721d5d66d5..91348717c481c5 100644 --- a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h +++ b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h @@ -18,7 +18,6 @@ #pragma once -#include #include #include #include diff --git a/src/app/clusters/door-lock-server/door-lock-server-callback.cpp b/src/app/clusters/door-lock-server/door-lock-server-callback.cpp index c9c38f3fb23b5d..77c38d1f9d5d9f 100644 --- a/src/app/clusters/door-lock-server/door-lock-server-callback.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server-callback.cpp @@ -24,7 +24,6 @@ #include "door-lock-server.h" #include #include -#include #include #include #include diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index a1e5307b66169d..a3c75c4818ff9c 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -24,7 +24,7 @@ #include "door-lock-server.h" #include #include -#include +#include #include #include #include diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index e14e8fd3af7f0c..6d35ea2512a1bd 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 4912062aa9c516..0ccf5c4c34eeb5 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -21,9 +21,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/src/app/clusters/ias-zone-client/ias-zone-client.cpp b/src/app/clusters/ias-zone-client/ias-zone-client.cpp index 58eb813316a99e..7619a983986fb6 100644 --- a/src/app/clusters/ias-zone-client/ias-zone-client.cpp +++ b/src/app/clusters/ias-zone-client/ias-zone-client.cpp @@ -16,6 +16,7 @@ */ #include "ias-zone-client.h" +#include #include #include @@ -280,7 +281,7 @@ bool emberAfIasZoneClusterZoneEnrollRequestCallback(app::CommandHandler * comman zoneId = serverIndex; setServerZoneId(serverIndex, zoneId); } - emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), ZCL_IAS_ZONE_CLUSTER_ID, + emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), app::Clusters::IasZone::Id, ZCL_ZONE_ENROLL_RESPONSE_COMMAND_ID, "uu", responseCode, zoneId); // Need to send this command with our source EUI because the server will // check our EUI64 against his CIE Address to see if we're his CIE. @@ -355,7 +356,7 @@ static void setCieAddress(EmberNodeId destAddress) 0, // ieee (filled in later) }; emberAfGetEui64(&writeAttributes[3]); - emberAfFillExternalBuffer((ZCL_GLOBAL_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), ZCL_IAS_ZONE_CLUSTER_ID, + emberAfFillExternalBuffer((ZCL_GLOBAL_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), app::Clusters::IasZone::Id, ZCL_WRITE_ATTRIBUTES_COMMAND_ID, "b", writeAttributes, sizeof(writeAttributes)); emberAfIasZoneClusterPrintln("Writing CIE Address to IAS Zone Server"); if (EMBER_SUCCESS == sendCommand(destAddress)) @@ -404,7 +405,7 @@ static void checkForIasZoneServer(EmberNodeId emberNodeId, uint8_t * ieeeAddress return; } - EmberStatus status = emberAfFindDevicesByCluster(emberNodeId, ZCL_IAS_ZONE_CLUSTER_ID, + EmberStatus status = emberAfFindDevicesByCluster(emberNodeId, app::Clusters::IasZone::Id, true, // server cluster? iasZoneClientServiceDiscoveryCallback); @@ -434,7 +435,7 @@ void readIasZoneServerAttributes(EmberNodeId nodeId) EMBER_LOW_BYTE(ZCL_ZONE_STATUS_ATTRIBUTE_ID), EMBER_HIGH_BYTE(ZCL_ZONE_STATUS_ATTRIBUTE_ID), }; - emberAfFillExternalBuffer((ZCL_GLOBAL_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), ZCL_IAS_ZONE_CLUSTER_ID, + emberAfFillExternalBuffer((ZCL_GLOBAL_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), app::Clusters::IasZone::Id, ZCL_READ_ATTRIBUTES_COMMAND_ID, "b", iasZoneAttributeIds, sizeof(iasZoneAttributeIds)); if (EMBER_SUCCESS == sendCommand(nodeId)) { @@ -448,7 +449,7 @@ void readIasZoneServerCieAddress(EmberNodeId nodeId) EMBER_LOW_BYTE(ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID), EMBER_HIGH_BYTE(ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID), }; - emberAfFillExternalBuffer((ZCL_GLOBAL_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), ZCL_IAS_ZONE_CLUSTER_ID, + emberAfFillExternalBuffer((ZCL_GLOBAL_COMMAND | ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), app::Clusters::IasZone::Id, ZCL_READ_ATTRIBUTES_COMMAND_ID, "b", iasZoneAttributeIds, sizeof(iasZoneAttributeIds)); if (EMBER_SUCCESS == sendCommand(nodeId)) { @@ -458,7 +459,7 @@ void readIasZoneServerCieAddress(EmberNodeId nodeId) void emberAfPluginIasZoneClientWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { - if (clusterId == ZCL_IAS_ZONE_CLUSTER_ID && iasZoneClientState == IAS_ZONE_CLIENT_STATE_SET_CIE_ADDRESS && + if (clusterId == app::Clusters::IasZone::Id && iasZoneClientState == IAS_ZONE_CLIENT_STATE_SET_CIE_ADDRESS && buffer[0] == EMBER_ZCL_STATUS_SUCCESS) { readIasZoneServerCieAddress(emberAfCurrentCommand()->source); @@ -470,7 +471,7 @@ void emberAfPluginIasZoneClientWriteAttributesResponseCallback(ClusterId cluster void emberAfPluginIasZoneClientReadAttributesResponseCallback(ClusterId clusterId, uint8_t * buffer, uint16_t bufLen) { uint8_t zoneStatus, zoneType, zoneState; - if (clusterId == ZCL_IAS_ZONE_CLUSTER_ID && + if (clusterId == app::Clusters::IasZone::Id && (iasZoneClientState == IAS_ZONE_CLIENT_STATE_READ_ATTRIBUTES || iasZoneClientState == IAS_ZONE_CLIENT_STATE_READ_CIE_ADDRESS)) { diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index fa774254801edd..b9eed2bb889d52 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -20,9 +20,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -170,7 +170,7 @@ static EmberStatus sendToClient(EndpointId endpoint) static void enrollWithClient(EndpointId endpoint) { EmberStatus status; - emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), ZCL_IAS_ZONE_CLUSTER_ID, + emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), IasZone::Id, ZCL_ZONE_ENROLL_REQUEST_COMMAND_ID, "vv", EMBER_AF_PLUGIN_IAS_ZONE_SERVER_ZONE_TYPE, EMBER_AF_MANUFACTURER_CODE); status = sendToClient(endpoint); @@ -213,7 +213,7 @@ MatterIasZoneClusterServerPreAttributeChangedCallback(const app::ConcreteAttribu // currently existing in the field. bindingEntry.type = EMBER_UNICAST_BINDING; bindingEntry.local = endpoint; - bindingEntry.clusterId = MakeOptional(ZCL_IAS_ZONE_CLUSTER_ID); + bindingEntry.clusterId = MakeOptional(IasZone::Id); bindingEntry.remote = emberAfCurrentCommand()->apsFrame->sourceEndpoint; bindingEntry.nodeId = destNodeId; @@ -238,7 +238,7 @@ MatterIasZoneClusterServerPreAttributeChangedCallback(const app::ConcreteAttribu } zeroAddress = true; - emberAfReadServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, (uint8_t *) ieeeAddress, 8); + emberAfReadServerAttribute(endpoint, IasZone::Id, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, (uint8_t *) ieeeAddress, 8); for (i = 0; i < 8; i++) { if (ieeeAddress[i] != 0) @@ -255,8 +255,7 @@ MatterIasZoneClusterServerPreAttributeChangedCallback(const app::ConcreteAttribu // at this point because then the Write Attributes response will not // be sent. But we also delay to give the client time to configure us. emberAfIasZoneClusterPrintln("Sending enrollment after %d ms", DELAY_TIMER_MS); - emberAfScheduleServerTickExtended(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, DELAY_TIMER_MS, EMBER_AF_SHORT_POLL, - EMBER_AF_STAY_AWAKE); + emberAfScheduleServerTickExtended(endpoint, IasZone::Id, DELAY_TIMER_MS, EMBER_AF_SHORT_POLL, EMBER_AF_STAY_AWAKE); } return Protocols::InteractionModel::Status::Success; @@ -299,9 +298,8 @@ bool emberAfIasZoneClusterAmIEnrolled(EndpointId endpoint) { EmberAfIasZoneState zoneState = EMBER_ZCL_IAS_ZONE_STATE_NOT_ENROLLED; // Clear this out completely. EmberAfStatus status; - status = - emberAfReadServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATE_ATTRIBUTE_ID, (unsigned char *) &zoneState, - 1); // uint8_t size + status = emberAfReadServerAttribute(endpoint, IasZone::Id, ZCL_ZONE_STATE_ATTRIBUTE_ID, (unsigned char *) &zoneState, + 1); // uint8_t size return (status == EMBER_ZCL_STATUS_SUCCESS && zoneState == EMBER_ZCL_IAS_ZONE_STATE_ENROLLED); } @@ -310,7 +308,7 @@ static void updateEnrollState(EndpointId endpoint, bool enrolled) { EmberAfIasZoneState zoneState = (enrolled ? EMBER_ZCL_IAS_ZONE_STATE_ENROLLED : EMBER_ZCL_IAS_ZONE_STATE_NOT_ENROLLED); - emberAfWriteServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATE_ATTRIBUTE_ID, (uint8_t *) &zoneState, + emberAfWriteServerAttribute(endpoint, IasZone::Id, ZCL_ZONE_STATE_ATTRIBUTE_ID, (uint8_t *) &zoneState, ZCL_INT8U_ATTRIBUTE_TYPE); emberAfIasZoneClusterPrintln("IAS Zone Server State: %pEnrolled", (enrolled ? "" : "NOT ")); } @@ -326,7 +324,7 @@ bool emberAfIasZoneClusterZoneEnrollResponseCallback(app::CommandHandler * comma EmberAfStatus status; endpoint = emberAfCurrentEndpoint(); - status = emberAfReadServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, &epZoneId, sizeof(uint8_t)); + status = emberAfReadServerAttribute(endpoint, IasZone::Id, ZCL_ZONE_ID_ATTRIBUTE_ID, &epZoneId, sizeof(uint8_t)); if (status == EMBER_ZCL_STATUS_SUCCESS) { if (enrollResponseCode == EMBER_ZCL_IAS_ENROLL_RESPONSE_CODE_SUCCESS) @@ -355,7 +353,7 @@ static EmberStatus sendZoneUpdate(uint16_t zoneStatus, uint16_t timeSinceStatusO { return EMBER_INVALID_CALL; } - emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), ZCL_IAS_ZONE_CLUSTER_ID, + emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), IasZone::Id, ZCL_ZONE_STATUS_CHANGE_NOTIFICATION_COMMAND_ID, "vuuv", zoneStatus, 0 /*extended status, must be zero per spec*/, emberAfPluginIasZoneServerGetZoneId(endpoint), timeSinceStatusOccurredQs /* called "delay" in the spec */); @@ -382,7 +380,7 @@ EmberStatus emberAfPluginIasZoneServerUpdateZoneStatus(EndpointId endpoint, uint #endif EmberStatus sendStatus = EMBER_SUCCESS; - emberAfWriteServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATUS_ATTRIBUTE_ID, (uint8_t *) &newStatus, + emberAfWriteServerAttribute(endpoint, IasZone::Id, ZCL_ZONE_STATUS_ATTRIBUTE_ID, (uint8_t *) &newStatus, ZCL_INT16U_ATTRIBUTE_TYPE); if (enrollmentMethod == EMBER_ZCL_IAS_ZONE_ENROLLMENT_MODE_TRIP_TO_PAIR) @@ -390,7 +388,7 @@ EmberStatus emberAfPluginIasZoneServerUpdateZoneStatus(EndpointId endpoint, uint // If unenrolled, send Zone Enroll Request command. if (!emberAfIasZoneClusterAmIEnrolled(endpoint)) { - emberAfScheduleServerTick(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, DELAY_TIMER_MS); + emberAfScheduleServerTick(endpoint, IasZone::Id, DELAY_TIMER_MS); // Don't send the zone status update since not enrolled. return EMBER_SUCCESS; } @@ -525,8 +523,7 @@ void emberAfIasZoneClusterServerInitCallback(EndpointId endpoint) #endif zoneType = (EmberAfIasZoneType) EMBER_AF_PLUGIN_IAS_ZONE_SERVER_ZONE_TYPE; - emberAfWriteAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_TYPE_ATTRIBUTE_ID, (uint8_t *) &zoneType, - ZCL_INT16U_ATTRIBUTE_TYPE); + emberAfWriteAttribute(endpoint, IasZone::Id, ZCL_ZONE_TYPE_ATTRIBUTE_ID, (uint8_t *) &zoneType, ZCL_INT16U_ATTRIBUTE_TYPE); emberAfPluginIasZoneServerUpdateZoneStatus(endpoint, 0, // status: All alarms cleared @@ -541,7 +538,7 @@ void emberAfIasZoneClusterServerTickCallback(EndpointId endpoint) uint8_t emberAfPluginIasZoneServerGetZoneId(EndpointId endpoint) { uint8_t zoneId = UNDEFINED_ZONE_ID; - emberAfReadServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, &zoneId, + emberAfReadServerAttribute(endpoint, IasZone::Id, ZCL_ZONE_ID_ATTRIBUTE_ID, &zoneId, emberAfGetDataSize(ZCL_INT8U_ATTRIBUTE_TYPE)); return zoneId; } @@ -569,7 +566,7 @@ static bool areZoneServerAttributesNonVolatile(EndpointId endpoint) static void setZoneId(EndpointId endpoint, uint8_t zoneId) { emberAfIasZoneClusterPrintln("IAS Zone Server Zone ID: 0x%X", zoneId); - emberAfWriteServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, &zoneId, ZCL_INT8U_ATTRIBUTE_TYPE); + emberAfWriteServerAttribute(endpoint, IasZone::Id, ZCL_ZONE_ID_ATTRIBUTE_ID, &zoneId, ZCL_INT8U_ATTRIBUTE_TYPE); } static void unenrollSecurityDevice(EndpointId endpoint) @@ -577,10 +574,10 @@ static void unenrollSecurityDevice(EndpointId endpoint) uint8_t ieeeAddress[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; uint16_t zoneType = EMBER_AF_PLUGIN_IAS_ZONE_SERVER_ZONE_TYPE; - emberAfWriteServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, (uint8_t *) ieeeAddress, + emberAfWriteServerAttribute(endpoint, IasZone::Id, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, (uint8_t *) ieeeAddress, ZCL_NODE_ID_ATTRIBUTE_TYPE); - emberAfWriteServerAttribute(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_TYPE_ATTRIBUTE_ID, (uint8_t *) &zoneType, + emberAfWriteServerAttribute(endpoint, IasZone::Id, ZCL_ZONE_TYPE_ATTRIBUTE_ID, (uint8_t *) &zoneType, ZCL_INT16U_ATTRIBUTE_TYPE); setZoneId(endpoint, UNDEFINED_ZONE_ID); @@ -601,7 +598,7 @@ void emberAfPluginIasZoneServerStackStatusCallback(EmberStatus status) for (uint16_t i = 0; i < emberAfEndpointCount(); i++) { endpoint = emberAfEndpointFromIndex(i); - if (emberAfContainsServer(endpoint, ZCL_IAS_ZONE_CLUSTER_ID)) + if (emberAfContainsServer(endpoint, IasZone::Id)) { unenrollSecurityDevice(endpoint); } diff --git a/src/app/clusters/identify-server/identify-server.cpp b/src/app/clusters/identify-server/identify-server.cpp index 89720ad41fb502..5d749c951a7a85 100644 --- a/src/app/clusters/identify-server/identify-server.cpp +++ b/src/app/clusters/identify-server/identify-server.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index b26bde015707e1..58369e8eb11837 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -19,9 +19,9 @@ #include "app/util/common.h" #include #include -#include #include #include +#include #include #include #include @@ -35,6 +35,7 @@ #endif using namespace chip; +using namespace chip::app::Clusters; using namespace chip::app::Clusters::Scenes; uint8_t emberAfPluginScenesServerEntriesInUse = 0; @@ -88,8 +89,8 @@ void emberAfScenesClusterServerInitCallback(EndpointId endpoint) { // The high bit of Name Support indicates whether scene names are supported. uint8_t nameSupport = EMBER_BIT(7); - writeServerAttribute(endpoint, ZCL_SCENES_CLUSTER_ID, ZCL_SCENE_NAME_SUPPORT_ATTRIBUTE_ID, "name support", - (uint8_t *) &nameSupport, ZCL_BITMAP8_ATTRIBUTE_TYPE); + writeServerAttribute(endpoint, Scenes::Id, ZCL_SCENE_NAME_SUPPORT_ATTRIBUTE_ID, "name support", (uint8_t *) &nameSupport, + ZCL_BITMAP8_ATTRIBUTE_TYPE); } #endif #if !defined(EMBER_AF_PLUGIN_SCENES_USE_TOKENS) || defined(EZSP_HOST) @@ -110,7 +111,7 @@ void emberAfScenesClusterServerInitCallback(EndpointId endpoint) EmberAfStatus emberAfScenesSetSceneCountAttribute(EndpointId endpoint, uint8_t newCount) { - return writeServerAttribute(endpoint, ZCL_SCENES_CLUSTER_ID, ZCL_SCENE_COUNT_ATTRIBUTE_ID, "scene count", (uint8_t *) &newCount, + return writeServerAttribute(endpoint, Scenes::Id, ZCL_SCENE_COUNT_ATTRIBUTE_ID, "scene count", (uint8_t *) &newCount, ZCL_INT8U_ATTRIBUTE_TYPE); } @@ -120,22 +121,22 @@ EmberAfStatus emberAfScenesMakeValid(EndpointId endpoint, uint8_t sceneId, Group bool valid = true; // scene ID - status = writeServerAttribute(endpoint, ZCL_SCENES_CLUSTER_ID, ZCL_CURRENT_SCENE_ATTRIBUTE_ID, "current scene", - (uint8_t *) &sceneId, ZCL_INT8U_ATTRIBUTE_TYPE); + status = writeServerAttribute(endpoint, Scenes::Id, ZCL_CURRENT_SCENE_ATTRIBUTE_ID, "current scene", (uint8_t *) &sceneId, + ZCL_INT8U_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { return status; } // group ID - status = writeServerAttribute(endpoint, ZCL_SCENES_CLUSTER_ID, ZCL_CURRENT_GROUP_ATTRIBUTE_ID, "current group", - (uint8_t *) &groupId, ZCL_INT16U_ATTRIBUTE_TYPE); + status = writeServerAttribute(endpoint, Scenes::Id, ZCL_CURRENT_GROUP_ATTRIBUTE_ID, "current group", (uint8_t *) &groupId, + ZCL_INT16U_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { return status; } - status = writeServerAttribute(endpoint, ZCL_SCENES_CLUSTER_ID, ZCL_SCENE_VALID_ATTRIBUTE_ID, "scene valid", (uint8_t *) &valid, + status = writeServerAttribute(endpoint, Scenes::Id, ZCL_SCENE_VALID_ATTRIBUTE_ID, "scene valid", (uint8_t *) &valid, ZCL_BOOLEAN_ATTRIBUTE_TYPE); return status; } @@ -143,7 +144,7 @@ EmberAfStatus emberAfScenesMakeValid(EndpointId endpoint, uint8_t sceneId, Group EmberAfStatus emberAfScenesClusterMakeInvalidCallback(EndpointId endpoint) { bool valid = false; - return writeServerAttribute(endpoint, ZCL_SCENES_CLUSTER_ID, ZCL_SCENE_VALID_ATTRIBUTE_ID, "scene valid", (uint8_t *) &valid, + return writeServerAttribute(endpoint, Scenes::Id, ZCL_SCENE_VALID_ATTRIBUTE_ID, "scene valid", (uint8_t *) &valid, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } @@ -259,8 +260,7 @@ bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, c if (emberAfCurrentCommand()->type == EMBER_INCOMING_UNICAST || emberAfCurrentCommand()->type == EMBER_INCOMING_UNICAST_REPLY) { { - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, - ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID }; + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(path)); VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); @@ -312,8 +312,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandOb if (emberAfCurrentCommand()->type == EMBER_INCOMING_UNICAST || emberAfCurrentCommand()->type == EMBER_INCOMING_UNICAST_REPLY) { { - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, - ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID }; + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(path)); VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); @@ -347,8 +346,7 @@ bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, co if (emberAfCurrentCommand()->type == EMBER_INCOMING_UNICAST || emberAfCurrentCommand()->type == EMBER_INCOMING_UNICAST_REPLY) { { - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, - ZCL_STORE_SCENE_RESPONSE_COMMAND_ID }; + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_STORE_SCENE_RESPONSE_COMMAND_ID }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(path)); VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); @@ -443,8 +441,7 @@ bool emberAfScenesClusterGetSceneMembershipCallback(app::CommandHandler * comman } { - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, - ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID }; + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID }; TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(path)); VerifyOrExit((writer = commandObj->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); @@ -502,69 +499,64 @@ EmberAfStatus emberAfScenesClusterStoreCurrentSceneCallback(chip::FabricIndex fa // When creating a new entry or refreshing an existing one, the extension // fields are updated with the current state of other clusters on the device. #ifdef ZCL_USING_ON_OFF_CLUSTER_SERVER - entry.hasOnOffValue = readServerAttribute(endpoint, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, "on/off", - (uint8_t *) &entry.onOffValue, sizeof(entry.onOffValue)); + entry.hasOnOffValue = readServerAttribute(endpoint, OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, "on/off", (uint8_t *) &entry.onOffValue, + sizeof(entry.onOffValue)); #endif #ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER - entry.hasCurrentLevelValue = - readServerAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, "current level", - (uint8_t *) &entry.currentLevelValue, sizeof(entry.currentLevelValue)); + entry.hasCurrentLevelValue = readServerAttribute(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, "current level", + (uint8_t *) &entry.currentLevelValue, sizeof(entry.currentLevelValue)); #endif #ifdef ZCL_USING_THERMOSTAT_CLUSTER_SERVER - entry.hasOccupiedCoolingSetpointValue = readServerAttribute( - endpoint, ZCL_THERMOSTAT_CLUSTER_ID, ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID, "occupied cooling setpoint", - (uint8_t *) &entry.occupiedCoolingSetpointValue, sizeof(entry.occupiedCoolingSetpointValue)); - entry.hasOccupiedHeatingSetpointValue = readServerAttribute( - endpoint, ZCL_THERMOSTAT_CLUSTER_ID, ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID, "occupied heating setpoint", - (uint8_t *) &entry.occupiedHeatingSetpointValue, sizeof(entry.occupiedHeatingSetpointValue)); - entry.hasSystemModeValue = readServerAttribute(endpoint, ZCL_THERMOSTAT_CLUSTER_ID, ZCL_SYSTEM_MODE_ATTRIBUTE_ID, "system mode", + entry.hasOccupiedCoolingSetpointValue = + readServerAttribute(endpoint, Thermostat::Id, ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID, "occupied cooling setpoint", + (uint8_t *) &entry.occupiedCoolingSetpointValue, sizeof(entry.occupiedCoolingSetpointValue)); + entry.hasOccupiedHeatingSetpointValue = + readServerAttribute(endpoint, Thermostat::Id, ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID, "occupied heating setpoint", + (uint8_t *) &entry.occupiedHeatingSetpointValue, sizeof(entry.occupiedHeatingSetpointValue)); + entry.hasSystemModeValue = readServerAttribute(endpoint, Thermostat::Id, ZCL_SYSTEM_MODE_ATTRIBUTE_ID, "system mode", (uint8_t *) &entry.systemModeValue, sizeof(entry.systemModeValue)); #endif #ifdef ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER - entry.hasCurrentXValue = readServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_ID, - "current x", (uint8_t *) &entry.currentXValue, sizeof(entry.currentXValue)); - entry.hasCurrentYValue = readServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_ID, - "current y", (uint8_t *) &entry.currentYValue, sizeof(entry.currentYValue)); - entry.hasEnhancedCurrentHueValue = readServerAttribute( - endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_ENHANCED_CURRENT_HUE_ATTRIBUTE_ID, "enhanced current hue", - (uint8_t *) &entry.enhancedCurrentHueValue, sizeof(entry.enhancedCurrentHueValue)); + entry.hasCurrentXValue = readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_ID, "current x", + (uint8_t *) &entry.currentXValue, sizeof(entry.currentXValue)); + entry.hasCurrentYValue = readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_ID, "current y", + (uint8_t *) &entry.currentYValue, sizeof(entry.currentYValue)); + entry.hasEnhancedCurrentHueValue = + readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_ENHANCED_CURRENT_HUE_ATTRIBUTE_ID, "enhanced current hue", + (uint8_t *) &entry.enhancedCurrentHueValue, sizeof(entry.enhancedCurrentHueValue)); entry.hasCurrentSaturationValue = - readServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, - "current saturation", (uint8_t *) &entry.currentSaturationValue, sizeof(entry.currentSaturationValue)); + readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, "current saturation", + (uint8_t *) &entry.currentSaturationValue, sizeof(entry.currentSaturationValue)); entry.hasColorLoopActiveValue = - readServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_LOOP_ACTIVE_ATTRIBUTE_ID, - "color loop active", (uint8_t *) &entry.colorLoopActiveValue, sizeof(entry.colorLoopActiveValue)); - entry.hasColorLoopDirectionValue = readServerAttribute( - endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_LOOP_DIRECTION_ATTRIBUTE_ID, "color loop direction", - (uint8_t *) &entry.colorLoopDirectionValue, sizeof(entry.colorLoopDirectionValue)); + readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_LOOP_ACTIVE_ATTRIBUTE_ID, "color loop active", + (uint8_t *) &entry.colorLoopActiveValue, sizeof(entry.colorLoopActiveValue)); + entry.hasColorLoopDirectionValue = + readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_LOOP_DIRECTION_ATTRIBUTE_ID, "color loop direction", + (uint8_t *) &entry.colorLoopDirectionValue, sizeof(entry.colorLoopDirectionValue)); entry.hasColorLoopTimeValue = - readServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_LOOP_TIME_ATTRIBUTE_ID, - "color loop time", (uint8_t *) &entry.colorLoopTimeValue, sizeof(entry.colorLoopTimeValue)); - entry.hasColorTemperatureMiredsValue = readServerAttribute( - endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_TEMPERATURE_ATTRIBUTE_ID, "color temp mireds", - (uint8_t *) &entry.colorTemperatureMiredsValue, sizeof(entry.colorTemperatureMiredsValue)); + readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_LOOP_TIME_ATTRIBUTE_ID, "color loop time", + (uint8_t *) &entry.colorLoopTimeValue, sizeof(entry.colorLoopTimeValue)); + entry.hasColorTemperatureMiredsValue = + readServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_TEMPERATURE_ATTRIBUTE_ID, "color temp mireds", + (uint8_t *) &entry.colorTemperatureMiredsValue, sizeof(entry.colorTemperatureMiredsValue)); #endif // ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER #ifdef ZCL_USING_DOOR_LOCK_CLUSTER_SERVER - entry.hasLockStateValue = readServerAttribute(endpoint, ZCL_DOOR_LOCK_CLUSTER_ID, ZCL_LOCK_STATE_ATTRIBUTE_ID, "lock state", + entry.hasLockStateValue = readServerAttribute(endpoint, DoorLock::Id, ZCL_LOCK_STATE_ATTRIBUTE_ID, "lock state", (uint8_t *) &entry.lockStateValue, sizeof(entry.lockStateValue)); #endif #ifdef ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER - entry.hasCurrentPositionLiftPercentageValue = - readServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, ZCL_WC_CURRENT_POSITION_LIFT_PERCENTAGE_ATTRIBUTE_ID, - "currentPositionLiftPercentage", (uint8_t *) &entry.currentPositionLiftPercentageValue, - sizeof(entry.currentPositionLiftPercentageValue)); - entry.hasCurrentPositionTiltPercentageValue = - readServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, ZCL_WC_CURRENT_POSITION_TILT_PERCENTAGE_ATTRIBUTE_ID, - "currentPositionTiltPercentage", (uint8_t *) &entry.currentPositionTiltPercentageValue, - sizeof(entry.currentPositionTiltPercentageValue)); - entry.hasTargetPositionLiftPercent100thsValue = - readServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, ZCL_WC_TARGET_POSITION_LIFT_PERCENT100_THS_ATTRIBUTE_ID, - "targetPositionLiftPercent100ths", (uint8_t *) &entry.targetPositionLiftPercent100thsValue, - sizeof(entry.targetPositionLiftPercent100thsValue)); - entry.hasTargetPositionTiltPercent100thsValue = - readServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, ZCL_WC_TARGET_POSITION_TILT_PERCENT100_THS_ATTRIBUTE_ID, - "targetPositionTiltPercent100ths", (uint8_t *) &entry.targetPositionTiltPercent100thsValue, - sizeof(entry.targetPositionTiltPercent100thsValue)); + entry.hasCurrentPositionLiftPercentageValue = readServerAttribute( + endpoint, WindowCovering::Id, ZCL_WC_CURRENT_POSITION_LIFT_PERCENTAGE_ATTRIBUTE_ID, "currentPositionLiftPercentage", + (uint8_t *) &entry.currentPositionLiftPercentageValue, sizeof(entry.currentPositionLiftPercentageValue)); + entry.hasCurrentPositionTiltPercentageValue = readServerAttribute( + endpoint, WindowCovering::Id, ZCL_WC_CURRENT_POSITION_TILT_PERCENTAGE_ATTRIBUTE_ID, "currentPositionTiltPercentage", + (uint8_t *) &entry.currentPositionTiltPercentageValue, sizeof(entry.currentPositionTiltPercentageValue)); + entry.hasTargetPositionLiftPercent100thsValue = readServerAttribute( + endpoint, WindowCovering::Id, ZCL_WC_TARGET_POSITION_LIFT_PERCENT100_THS_ATTRIBUTE_ID, "targetPositionLiftPercent100ths", + (uint8_t *) &entry.targetPositionLiftPercent100thsValue, sizeof(entry.targetPositionLiftPercent100thsValue)); + entry.hasTargetPositionTiltPercent100thsValue = readServerAttribute( + endpoint, WindowCovering::Id, ZCL_WC_TARGET_POSITION_TILT_PERCENT100_THS_ATTRIBUTE_ID, "targetPositionTiltPercent100ths", + (uint8_t *) &entry.targetPositionTiltPercent100thsValue, sizeof(entry.targetPositionTiltPercent100thsValue)); #endif // When creating a new entry, the name is set to the null string (i.e., the @@ -610,76 +602,76 @@ EmberAfStatus emberAfScenesClusterRecallSavedSceneCallback(chip::FabricIndex fab #ifdef ZCL_USING_ON_OFF_CLUSTER_SERVER if (entry.hasOnOffValue) { - writeServerAttribute(endpoint, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, "on/off", - (uint8_t *) &entry.onOffValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + writeServerAttribute(endpoint, OnOff::Id, ZCL_ON_OFF_ATTRIBUTE_ID, "on/off", (uint8_t *) &entry.onOffValue, + ZCL_BOOLEAN_ATTRIBUTE_TYPE); } #endif #ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER if (entry.hasCurrentLevelValue) { - writeServerAttribute(endpoint, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, "current level", + writeServerAttribute(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, "current level", (uint8_t *) &entry.currentLevelValue, ZCL_INT8U_ATTRIBUTE_TYPE); } #endif #ifdef ZCL_USING_THERMOSTAT_CLUSTER_SERVER if (entry.hasOccupiedCoolingSetpointValue) { - writeServerAttribute(endpoint, ZCL_THERMOSTAT_CLUSTER_ID, ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID, + writeServerAttribute(endpoint, Thermostat::Id, ZCL_OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID, "occupied cooling setpoint", (uint8_t *) &entry.occupiedCoolingSetpointValue, ZCL_INT16S_ATTRIBUTE_TYPE); } if (entry.hasOccupiedHeatingSetpointValue) { - writeServerAttribute(endpoint, ZCL_THERMOSTAT_CLUSTER_ID, ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID, + writeServerAttribute(endpoint, Thermostat::Id, ZCL_OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID, "occupied heating setpoint", (uint8_t *) &entry.occupiedHeatingSetpointValue, ZCL_INT16S_ATTRIBUTE_TYPE); } if (entry.hasSystemModeValue) { - writeServerAttribute(endpoint, ZCL_THERMOSTAT_CLUSTER_ID, ZCL_SYSTEM_MODE_ATTRIBUTE_ID, "system mode", + writeServerAttribute(endpoint, Thermostat::Id, ZCL_SYSTEM_MODE_ATTRIBUTE_ID, "system mode", (uint8_t *) &entry.systemModeValue, ZCL_INT8U_ATTRIBUTE_TYPE); } #endif #ifdef ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER if (entry.hasCurrentXValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_ID, "current x", + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_X_ATTRIBUTE_ID, "current x", (uint8_t *) &entry.currentXValue, ZCL_INT16U_ATTRIBUTE_TYPE); } if (entry.hasCurrentYValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_ID, "current y", + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_Y_ATTRIBUTE_ID, "current y", (uint8_t *) &entry.currentYValue, ZCL_INT16U_ATTRIBUTE_TYPE); } if (entry.hasEnhancedCurrentHueValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_ENHANCED_CURRENT_HUE_ATTRIBUTE_ID, + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_ENHANCED_CURRENT_HUE_ATTRIBUTE_ID, "enhanced current hue", (uint8_t *) &entry.enhancedCurrentHueValue, ZCL_INT16U_ATTRIBUTE_TYPE); } if (entry.hasCurrentSaturationValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, "current saturation", (uint8_t *) &entry.currentSaturationValue, ZCL_INT8U_ATTRIBUTE_TYPE); } if (entry.hasColorLoopActiveValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_LOOP_ACTIVE_ATTRIBUTE_ID, + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_LOOP_ACTIVE_ATTRIBUTE_ID, "color loop active", (uint8_t *) &entry.colorLoopActiveValue, ZCL_INT8U_ATTRIBUTE_TYPE); } if (entry.hasColorLoopDirectionValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_LOOP_DIRECTION_ATTRIBUTE_ID, + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_LOOP_DIRECTION_ATTRIBUTE_ID, "color loop direction", (uint8_t *) &entry.colorLoopDirectionValue, ZCL_INT8U_ATTRIBUTE_TYPE); } if (entry.hasColorLoopTimeValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_LOOP_TIME_ATTRIBUTE_ID, - "color loop time", (uint8_t *) &entry.colorLoopTimeValue, ZCL_INT16U_ATTRIBUTE_TYPE); + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_LOOP_TIME_ATTRIBUTE_ID, "color loop time", + (uint8_t *) &entry.colorLoopTimeValue, ZCL_INT16U_ATTRIBUTE_TYPE); } if (entry.hasColorTemperatureMiredsValue) { - writeServerAttribute(endpoint, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_COLOR_TEMPERATURE_ATTRIBUTE_ID, + writeServerAttribute(endpoint, ColorControl::Id, ZCL_COLOR_CONTROL_COLOR_TEMPERATURE_ATTRIBUTE_ID, "color temp mireds", (uint8_t *) &entry.colorTemperatureMiredsValue, ZCL_INT16U_ATTRIBUTE_TYPE); } @@ -687,34 +679,34 @@ EmberAfStatus emberAfScenesClusterRecallSavedSceneCallback(chip::FabricIndex fab #ifdef ZCL_USING_DOOR_LOCK_CLUSTER_SERVER if (entry.hasLockStateValue) { - writeServerAttribute(endpoint, ZCL_DOOR_LOCK_CLUSTER_ID, ZCL_LOCK_STATE_ATTRIBUTE_ID, "lock state", + writeServerAttribute(endpoint, DoorLock::Id, ZCL_LOCK_STATE_ATTRIBUTE_ID, "lock state", (uint8_t *) &entry.lockStateValue, ZCL_INT8U_ATTRIBUTE_TYPE); } #endif #ifdef ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER if (entry.hasCurrentPositionLiftPercentageValue) { - writeServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, ZCL_WC_CURRENT_POSITION_LIFT_PERCENTAGE_ATTRIBUTE_ID, + writeServerAttribute(endpoint, WindowCovering::Id, ZCL_WC_CURRENT_POSITION_LIFT_PERCENTAGE_ATTRIBUTE_ID, "CurrentPositionLiftPercentage", (uint8_t *) &entry.currentPositionLiftPercentageValue, ZCL_INT8U_ATTRIBUTE_TYPE); } if (entry.hasCurrentPositionTiltPercentageValue) { - writeServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, ZCL_WC_CURRENT_POSITION_TILT_PERCENTAGE_ATTRIBUTE_ID, + writeServerAttribute(endpoint, WindowCovering::Id, ZCL_WC_CURRENT_POSITION_TILT_PERCENTAGE_ATTRIBUTE_ID, "CurrentPositionTiltPercentage", (uint8_t *) &entry.currentPositionTiltPercentageValue, ZCL_INT8U_ATTRIBUTE_TYPE); } if (entry.hasTargetPositionLiftPercent100thsValue) { - writeServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, - ZCL_WC_TARGET_POSITION_LIFT_PERCENT100_THS_ATTRIBUTE_ID, "TargetPositionLiftPercent100ths", - (uint8_t *) &entry.targetPositionLiftPercent100thsValue, ZCL_INT16U_ATTRIBUTE_TYPE); + writeServerAttribute(endpoint, WindowCovering::Id, ZCL_WC_TARGET_POSITION_LIFT_PERCENT100_THS_ATTRIBUTE_ID, + "TargetPositionLiftPercent100ths", (uint8_t *) &entry.targetPositionLiftPercent100thsValue, + ZCL_INT16U_ATTRIBUTE_TYPE); } if (entry.hasTargetPositionTiltPercent100thsValue) { - writeServerAttribute(endpoint, ZCL_WINDOW_COVERING_CLUSTER_ID, - ZCL_WC_TARGET_POSITION_TILT_PERCENT100_THS_ATTRIBUTE_ID, "TargetPositionTiltPercent100ths", - (uint8_t *) &entry.targetPositionTiltPercent100thsValue, ZCL_INT16U_ATTRIBUTE_TYPE); + writeServerAttribute(endpoint, WindowCovering::Id, ZCL_WC_TARGET_POSITION_TILT_PERCENT100_THS_ATTRIBUTE_ID, + "TargetPositionTiltPercent100ths", (uint8_t *) &entry.targetPositionTiltPercent100thsValue, + ZCL_INT16U_ATTRIBUTE_TYPE); } #endif emberAfScenesMakeValid(endpoint, sceneId, groupId); @@ -837,7 +829,7 @@ bool emberAfPluginScenesServerParseAddScene( { #if 0 #ifdef ZCL_USING_ON_OFF_CLUSTER_SERVER - case ZCL_ON_OFF_CLUSTER_ID: + case OnOff::Id: // We only know of one extension for the On/Off cluster and it is just one // byte, which means we can skip some logic for this cluster. If other // extensions are added in this cluster, more logic will be needed here. @@ -846,7 +838,7 @@ bool emberAfPluginScenesServerParseAddScene( break; #endif #ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case LevelControl::Id: // We only know of one extension for the Level Control cluster and it is // just one byte, which means we can skip some logic for this cluster. If // other extensions are added in this cluster, more logic will be needed @@ -856,7 +848,7 @@ bool emberAfPluginScenesServerParseAddScene( break; #endif #ifdef ZCL_USING_THERMOSTAT_CLUSTER_SERVER - case ZCL_THERMOSTAT_CLUSTER_ID: + case Thermostat::Id: if (length < 2) { break; @@ -886,7 +878,7 @@ bool emberAfPluginScenesServerParseAddScene( break; #endif #ifdef ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER - case ZCL_COLOR_CONTROL_CLUSTER_ID: + case ColorControl::Id: if (length < 2) { break; @@ -960,7 +952,7 @@ bool emberAfPluginScenesServerParseAddScene( break; #endif // ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER #ifdef ZCL_USING_DOOR_LOCK_CLUSTER_SERVER - case ZCL_DOOR_LOCK_CLUSTER_ID: + case DoorLock::Id: // We only know of one extension for the Door Lock cluster and it is just // one byte, which means we can skip some logic for this cluster. If // other extensions are added in this cluster, more logic will be needed @@ -970,7 +962,7 @@ bool emberAfPluginScenesServerParseAddScene( break; #endif #ifdef ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER - case ZCL_WINDOW_COVERING_CLUSTER_ID: + case WindowCovering::Id: // If we're here, we know we have at least one byte, so we can skip the // length check for the first field. entry.hasCurrentPositionLiftPercentageValue = true; @@ -1041,10 +1033,10 @@ bool emberAfPluginScenesServerParseAddScene( return true; } { - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, ZCL_ADD_SCENE_RESPONSE_COMMAND_ID }; + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_ADD_SCENE_RESPONSE_COMMAND_ID }; if (enhanced) { - path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, ZCL_ENHANCED_ADD_SCENE_RESPONSE_COMMAND_ID }; + path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_ENHANCED_ADD_SCENE_RESPONSE_COMMAND_ID }; } TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(path)); @@ -1097,10 +1089,10 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c // The status, group id, and scene id are always included in the response, but // the transition time, name, and extension fields are only included if the // scene was found. - app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID }; + app::ConcreteCommandPath path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID }; if (enhanced) { - path = { emberAfCurrentEndpoint(), ZCL_SCENES_CLUSTER_ID, ZCL_ENHANCED_VIEW_SCENE_RESPONSE_COMMAND_ID }; + path = { emberAfCurrentEndpoint(), Scenes::Id, ZCL_ENHANCED_VIEW_SCENE_RESPONSE_COMMAND_ID }; } TLV::TLVWriter * writer = nullptr; SuccessOrExit(err = commandObj->PrepareCommand(path)); @@ -1135,7 +1127,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c #ifdef ZCL_USING_ON_OFF_CLUSTER_SERVER if (entry.hasOnOffValue) { - emberAfPutInt16uInResp(ZCL_ON_OFF_CLUSTER_ID); + emberAfPutInt16uInResp(OnOff::Id); emberAfPutInt8uInResp(1); // length emberAfPutInt8uInResp(entry.onOffValue); } @@ -1143,7 +1135,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c #ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER if (entry.hasCurrentLevelValue) { - emberAfPutInt16uInResp(ZCL_LEVEL_CONTROL_CLUSTER_ID); + emberAfPutInt16uInResp(LevelControl::Id); emberAfPutInt8uInResp(1); // length emberAfPutInt8uInResp(entry.currentLevelValue); } @@ -1152,7 +1144,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c if (entry.hasOccupiedCoolingSetpointValue) { uint8_t * length; - emberAfPutInt16uInResp(ZCL_THERMOSTAT_CLUSTER_ID); + emberAfPutInt16uInResp(Thermostat::Id); length = &appResponseData[appResponseLength]; emberAfPutInt8uInResp(0); // temporary length emberAfPutInt16sInResp(entry.occupiedCoolingSetpointValue); @@ -1173,7 +1165,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c if (entry.hasCurrentXValue) { uint8_t * length; - emberAfPutInt16uInResp(ZCL_COLOR_CONTROL_CLUSTER_ID); + emberAfPutInt16uInResp(ColorControl::Id); length = &appResponseData[appResponseLength]; emberAfPutInt8uInResp(0); // temporary length emberAfPutInt16uInResp(entry.currentXValue); @@ -1221,7 +1213,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c #ifdef ZCL_USING_DOOR_LOCK_CLUSTER_SERVER if (entry.hasLockStateValue) { - emberAfPutInt16uInResp(ZCL_DOOR_LOCK_CLUSTER_ID); + emberAfPutInt16uInResp(DoorLock::Id); emberAfPutInt8uInResp(1); // length emberAfPutInt8uInResp(entry.lockStateValue); } @@ -1230,7 +1222,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c if (entry.hasCurrentPositionLiftPercentageValue) { uint8_t * length; - emberAfPutInt16uInResp(ZCL_WINDOW_COVERING_CLUSTER_ID); + emberAfPutInt16uInResp(WindowCovering::Id); length = &appResponseData[appResponseLength]; emberAfPutInt8uInResp(0); // temporary length emberAfPutInt8uInResp(entry.currentPositionLiftPercentageValue); diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index c133e1514ca7de..fdb65b21c33fe0 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp index 5759a1fe65c4e9..b737888cc3e73d 100644 --- a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp +++ b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index 65237ba9b1211f..e32d75daeea49a 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index ea4ae8f0a22417..03327d0469b013 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -58,11 +58,6 @@ "name": "ZCL callback header", "output": "callback.h" }, - { - "path": "../../zap-templates/templates/app/cluster-id.zapt", - "name": "ZCL cluster-id header", - "output": "cluster-id.h" - }, { "path": "../../zap-templates/templates/app/command-id.zapt", "name": "ZCL command-id header", diff --git a/src/app/util/generic-callback-stubs.cpp b/src/app/util/generic-callback-stubs.cpp index 768ffb03871fea..ba8ee45b766ed5 100644 --- a/src/app/util/generic-callback-stubs.cpp +++ b/src/app/util/generic-callback-stubs.cpp @@ -16,7 +16,7 @@ */ #include -#include +#include #include #include diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 20e7122d1eaaab..c0a7e48e94f898 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -18,8 +18,8 @@ #include "app/util/common.h" #include #include -#include #include +#include #include #include #include @@ -51,8 +51,8 @@ uint32_t afNumPktsSent; #endif const EmberAfClusterName zclClusterNames[] = { - CLUSTER_IDS_TO_NAMES // defined in print-cluster.h - { ZCL_NULL_CLUSTER_ID, nullptr }, // terminator + CLUSTER_IDS_TO_NAMES // defined in print-cluster.h + { kInvalidClusterId, nullptr }, // terminator }; // A pointer to the current command being processed @@ -93,7 +93,7 @@ void emberAfSetDeviceEnabled(EndpointId endpoint, bool enabled) afDeviceEnabled[index] = enabled; } #ifdef ZCL_USING_BASIC_CLUSTER_DEVICE_ENABLED_ATTRIBUTE - emberAfWriteServerAttribute(endpoint, ZCL_BASIC_CLUSTER_ID, ZCL_DEVICE_ENABLED_ATTRIBUTE_ID, (uint8_t *) &enabled, + emberAfWriteServerAttribute(endpoint, app::Clusters::Basic::Id, ZCL_DEVICE_ENABLED_ATTRIBUTE_ID, (uint8_t *) &enabled, ZCL_BOOLEAN_ATTRIBUTE_TYPE); #endif } @@ -103,7 +103,7 @@ bool emberAfIsDeviceIdentifying(EndpointId endpoint) { #ifdef ZCL_USING_IDENTIFY_CLUSTER_SERVER uint16_t identifyTime; - EmberAfStatus status = emberAfReadServerAttribute(endpoint, ZCL_IDENTIFY_CLUSTER_ID, ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, + EmberAfStatus status = emberAfReadServerAttribute(endpoint, app::Clusters::Identify::Id, ZCL_IDENTIFY_TIME_ATTRIBUTE_ID, (uint8_t *) &identifyTime, sizeof(identifyTime)); return (status == EMBER_ZCL_STATUS_SUCCESS && 0 < identifyTime); #else @@ -230,7 +230,7 @@ uint16_t emberAfFindClusterNameIndex(ClusterId cluster) { static_assert(sizeof(ClusterId) == 4, "May need to adjust our index type or somehow define it in terms of cluster id type"); uint16_t index = 0; - while (zclClusterNames[index].id != ZCL_NULL_CLUSTER_ID) + while (zclClusterNames[index].id != kInvalidClusterId) { if (zclClusterNames[index].id == cluster) { diff --git a/src/app/util/util.h b/src/app/util/util.h index 54a2a224a2b1bd..0949aea7afef9b 100644 --- a/src/app/util/util.h +++ b/src/app/util/util.h @@ -50,8 +50,6 @@ typedef struct extern const EmberAfClusterName zclClusterNames[]; -#define ZCL_NULL_CLUSTER_ID 0xFFFF - #include // Override APS retry: 0 - don't touch, 1 - always set, 2 - always unset diff --git a/src/app/zap-templates/templates/app/print-cluster.zapt b/src/app/zap-templates/templates/app/print-cluster.zapt index c5d56577a31228..3d1a17d764d224 100644 --- a/src/app/zap-templates/templates/app/print-cluster.zapt +++ b/src/app/zap-templates/templates/app/print-cluster.zapt @@ -3,13 +3,15 @@ // Prevent multiple inclusion #pragma once +#include + // This is the mapping of IDs to cluster names assuming a format according // to the "EmberAfClusterName" defined in the ZCL header. // The names of clusters that are not present, are removed. {{#zcl_clusters}} #if defined(ZCL_USING_{{asDelimitedMacro this.define}}_SERVER) || defined(ZCL_USING_{{asDelimitedMacro this.define}}_CLIENT) - #define CHIP_PRINTCLUSTER_{{asDelimitedMacro this.define}} {ZCL_{{asDelimitedMacro this.define}}_ID, "{{this.label}}" }, + #define CHIP_PRINTCLUSTER_{{asDelimitedMacro this.define}} { chip::app::Clusters::{{asUpperCamelCase this.label}}::Id, "{{this.label}}" }, #else #define CHIP_PRINTCLUSTER_{{asDelimitedMacro this.define}} #endif diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h b/zzz_generated/app-common/app-common/zap-generated/cluster-id.h deleted file mode 100644 index 5833b9fadd0453..00000000000000 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-id.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -#include - -// Definitions for cluster: Identify -static constexpr chip::ClusterId ZCL_IDENTIFY_CLUSTER_ID = 0x0003; - -// Definitions for cluster: Groups -static constexpr chip::ClusterId ZCL_GROUPS_CLUSTER_ID = 0x0004; - -// Definitions for cluster: Scenes -static constexpr chip::ClusterId ZCL_SCENES_CLUSTER_ID = 0x0005; - -// Definitions for cluster: On/Off -static constexpr chip::ClusterId ZCL_ON_OFF_CLUSTER_ID = 0x0006; - -// Definitions for cluster: On/off Switch Configuration -static constexpr chip::ClusterId ZCL_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_ID = 0x0007; - -// Definitions for cluster: Level Control -static constexpr chip::ClusterId ZCL_LEVEL_CONTROL_CLUSTER_ID = 0x0008; - -// Definitions for cluster: Binary Input (Basic) -static constexpr chip::ClusterId ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 0x000F; - -// Definitions for cluster: Pulse Width Modulation -static constexpr chip::ClusterId ZCL_PWM_CLUSTER_ID = 0x001C; - -// Definitions for cluster: Descriptor -static constexpr chip::ClusterId ZCL_DESCRIPTOR_CLUSTER_ID = 0x001D; - -// Definitions for cluster: Binding -static constexpr chip::ClusterId ZCL_BINDING_CLUSTER_ID = 0x001E; - -// Definitions for cluster: Access Control -static constexpr chip::ClusterId ZCL_ACCESS_CONTROL_CLUSTER_ID = 0x001F; - -// Definitions for cluster: Actions -static constexpr chip::ClusterId ZCL_ACTIONS_CLUSTER_ID = 0x0025; - -// Definitions for cluster: Basic -static constexpr chip::ClusterId ZCL_BASIC_CLUSTER_ID = 0x0028; - -// Definitions for cluster: OTA Software Update Provider -static constexpr chip::ClusterId ZCL_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_ID = 0x0029; - -// Definitions for cluster: OTA Software Update Requestor -static constexpr chip::ClusterId ZCL_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_ID = 0x002A; - -// Definitions for cluster: Localization Configuration -static constexpr chip::ClusterId ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID = 0x002B; - -// Definitions for cluster: Time Format Localization -static constexpr chip::ClusterId ZCL_TIME_FORMAT_LOCALIZATION_CLUSTER_ID = 0x002C; - -// Definitions for cluster: Unit Localization -static constexpr chip::ClusterId ZCL_UNIT_LOCALIZATION_CLUSTER_ID = 0x002D; - -// Definitions for cluster: Power Source Configuration -static constexpr chip::ClusterId ZCL_POWER_SOURCE_CONFIGURATION_CLUSTER_ID = 0x002E; - -// Definitions for cluster: Power Source -static constexpr chip::ClusterId ZCL_POWER_SOURCE_CLUSTER_ID = 0x002F; - -// Definitions for cluster: General Commissioning -static constexpr chip::ClusterId ZCL_GENERAL_COMMISSIONING_CLUSTER_ID = 0x0030; - -// Definitions for cluster: Network Commissioning -static constexpr chip::ClusterId ZCL_NETWORK_COMMISSIONING_CLUSTER_ID = 0x0031; - -// Definitions for cluster: Diagnostic Logs -static constexpr chip::ClusterId ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID = 0x0032; - -// Definitions for cluster: General Diagnostics -static constexpr chip::ClusterId ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID = 0x0033; - -// Definitions for cluster: Software Diagnostics -static constexpr chip::ClusterId ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID = 0x0034; - -// Definitions for cluster: Thread Network Diagnostics -static constexpr chip::ClusterId ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0035; - -// Definitions for cluster: WiFi Network Diagnostics -static constexpr chip::ClusterId ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0036; - -// Definitions for cluster: Ethernet Network Diagnostics -static constexpr chip::ClusterId ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0037; - -// Definitions for cluster: Time Synchronization -static constexpr chip::ClusterId ZCL_TIME_SYNCHRONIZATION_CLUSTER_ID = 0x0038; - -// Definitions for cluster: Bridged Device Basic -static constexpr chip::ClusterId ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID = 0x0039; - -// Definitions for cluster: Switch -static constexpr chip::ClusterId ZCL_SWITCH_CLUSTER_ID = 0x003B; - -// Definitions for cluster: AdministratorCommissioning -static constexpr chip::ClusterId ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID = 0x003C; - -// Definitions for cluster: Operational Credentials -static constexpr chip::ClusterId ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID = 0x003E; - -// Definitions for cluster: Group Key Management -static constexpr chip::ClusterId ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID = 0x003F; - -// Definitions for cluster: Fixed Label -static constexpr chip::ClusterId ZCL_FIXED_LABEL_CLUSTER_ID = 0x0040; - -// Definitions for cluster: User Label -static constexpr chip::ClusterId ZCL_USER_LABEL_CLUSTER_ID = 0x0041; - -// Definitions for cluster: Proxy Configuration -static constexpr chip::ClusterId ZCL_PROXY_CONFIGURATION_CLUSTER_ID = 0x0042; - -// Definitions for cluster: Proxy Discovery -static constexpr chip::ClusterId ZCL_PROXY_DISCOVERY_CLUSTER_ID = 0x0043; - -// Definitions for cluster: Proxy Valid -static constexpr chip::ClusterId ZCL_PROXY_VALID_CLUSTER_ID = 0x0044; - -// Definitions for cluster: Boolean State -static constexpr chip::ClusterId ZCL_BOOLEAN_STATE_CLUSTER_ID = 0x0045; - -// Definitions for cluster: Mode Select -static constexpr chip::ClusterId ZCL_MODE_SELECT_CLUSTER_ID = 0x0050; - -// Definitions for cluster: Door Lock -static constexpr chip::ClusterId ZCL_DOOR_LOCK_CLUSTER_ID = 0x0101; - -// Definitions for cluster: Window Covering -static constexpr chip::ClusterId ZCL_WINDOW_COVERING_CLUSTER_ID = 0x0102; - -// Definitions for cluster: Barrier Control -static constexpr chip::ClusterId ZCL_BARRIER_CONTROL_CLUSTER_ID = 0x0103; - -// Definitions for cluster: Pump Configuration and Control -static constexpr chip::ClusterId ZCL_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_ID = 0x0200; - -// Definitions for cluster: Thermostat -static constexpr chip::ClusterId ZCL_THERMOSTAT_CLUSTER_ID = 0x0201; - -// Definitions for cluster: Fan Control -static constexpr chip::ClusterId ZCL_FAN_CONTROL_CLUSTER_ID = 0x0202; - -// Definitions for cluster: Thermostat User Interface Configuration -static constexpr chip::ClusterId ZCL_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_ID = 0x0204; - -// Definitions for cluster: Color Control -static constexpr chip::ClusterId ZCL_COLOR_CONTROL_CLUSTER_ID = 0x0300; - -// Definitions for cluster: Ballast Configuration -static constexpr chip::ClusterId ZCL_BALLAST_CONFIGURATION_CLUSTER_ID = 0x0301; - -// Definitions for cluster: Illuminance Measurement -static constexpr chip::ClusterId ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID = 0x0400; - -// Definitions for cluster: Temperature Measurement -static constexpr chip::ClusterId ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID = 0x0402; - -// Definitions for cluster: Pressure Measurement -static constexpr chip::ClusterId ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID = 0x0403; - -// Definitions for cluster: Flow Measurement -static constexpr chip::ClusterId ZCL_FLOW_MEASUREMENT_CLUSTER_ID = 0x0404; - -// Definitions for cluster: Relative Humidity Measurement -static constexpr chip::ClusterId ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID = 0x0405; - -// Definitions for cluster: Occupancy Sensing -static constexpr chip::ClusterId ZCL_OCCUPANCY_SENSING_CLUSTER_ID = 0x0406; - -// Definitions for cluster: Wake on LAN -static constexpr chip::ClusterId ZCL_WAKE_ON_LAN_CLUSTER_ID = 0x0503; - -// Definitions for cluster: Channel -static constexpr chip::ClusterId ZCL_CHANNEL_CLUSTER_ID = 0x0504; - -// Definitions for cluster: Target Navigator -static constexpr chip::ClusterId ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 0x0505; - -// Definitions for cluster: Media Playback -static constexpr chip::ClusterId ZCL_MEDIA_PLAYBACK_CLUSTER_ID = 0x0506; - -// Definitions for cluster: Media Input -static constexpr chip::ClusterId ZCL_MEDIA_INPUT_CLUSTER_ID = 0x0507; - -// Definitions for cluster: Low Power -static constexpr chip::ClusterId ZCL_LOW_POWER_CLUSTER_ID = 0x0508; - -// Definitions for cluster: Keypad Input -static constexpr chip::ClusterId ZCL_KEYPAD_INPUT_CLUSTER_ID = 0x0509; - -// Definitions for cluster: Content Launcher -static constexpr chip::ClusterId ZCL_CONTENT_LAUNCHER_CLUSTER_ID = 0x050A; - -// Definitions for cluster: Audio Output -static constexpr chip::ClusterId ZCL_AUDIO_OUTPUT_CLUSTER_ID = 0x050B; - -// Definitions for cluster: Application Launcher -static constexpr chip::ClusterId ZCL_APPLICATION_LAUNCHER_CLUSTER_ID = 0x050C; - -// Definitions for cluster: Application Basic -static constexpr chip::ClusterId ZCL_APPLICATION_BASIC_CLUSTER_ID = 0x050D; - -// Definitions for cluster: Account Login -static constexpr chip::ClusterId ZCL_ACCOUNT_LOGIN_CLUSTER_ID = 0x050E; - -// Definitions for cluster: Electrical Measurement -static constexpr chip::ClusterId ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04; - -// Definitions for cluster: Unit Testing -static constexpr chip::ClusterId ZCL_UNIT_TESTING_CLUSTER_ID = 0xFFF1FC05; - -// Definitions for cluster: Fault Injection -static constexpr chip::ClusterId ZCL_FAULT_INJECTION_CLUSTER_ID = 0xFFF1FC06; diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 4ab05c73ae61de..c12c9c4da68c77 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -20,92 +20,94 @@ // Prevent multiple inclusion #pragma once +#include + // This is the mapping of IDs to cluster names assuming a format according // to the "EmberAfClusterName" defined in the ZCL header. // The names of clusters that are not present, are removed. #if defined(ZCL_USING_IDENTIFY_CLUSTER_SERVER) || defined(ZCL_USING_IDENTIFY_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_IDENTIFY_CLUSTER { ZCL_IDENTIFY_CLUSTER_ID, "Identify" }, +#define CHIP_PRINTCLUSTER_IDENTIFY_CLUSTER { chip::app::Clusters::Identify::Id, "Identify" }, #else #define CHIP_PRINTCLUSTER_IDENTIFY_CLUSTER #endif #if defined(ZCL_USING_GROUPS_CLUSTER_SERVER) || defined(ZCL_USING_GROUPS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_GROUPS_CLUSTER { ZCL_GROUPS_CLUSTER_ID, "Groups" }, +#define CHIP_PRINTCLUSTER_GROUPS_CLUSTER { chip::app::Clusters::Groups::Id, "Groups" }, #else #define CHIP_PRINTCLUSTER_GROUPS_CLUSTER #endif #if defined(ZCL_USING_SCENES_CLUSTER_SERVER) || defined(ZCL_USING_SCENES_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_SCENES_CLUSTER { ZCL_SCENES_CLUSTER_ID, "Scenes" }, +#define CHIP_PRINTCLUSTER_SCENES_CLUSTER { chip::app::Clusters::Scenes::Id, "Scenes" }, #else #define CHIP_PRINTCLUSTER_SCENES_CLUSTER #endif #if defined(ZCL_USING_ON_OFF_CLUSTER_SERVER) || defined(ZCL_USING_ON_OFF_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_ON_OFF_CLUSTER { ZCL_ON_OFF_CLUSTER_ID, "On/Off" }, +#define CHIP_PRINTCLUSTER_ON_OFF_CLUSTER { chip::app::Clusters::OnOff::Id, "On/Off" }, #else #define CHIP_PRINTCLUSTER_ON_OFF_CLUSTER #endif #if defined(ZCL_USING_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_ON_OFF_SWITCH_CONFIGURATION_CLUSTER \ - { ZCL_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_ID, "On/off Switch Configuration" }, + { chip::app::Clusters::OnOffSwitchConfiguration::Id, "On/off Switch Configuration" }, #else #define CHIP_PRINTCLUSTER_ON_OFF_SWITCH_CONFIGURATION_CLUSTER #endif #if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_LEVEL_CONTROL_CLUSTER { ZCL_LEVEL_CONTROL_CLUSTER_ID, "Level Control" }, +#define CHIP_PRINTCLUSTER_LEVEL_CONTROL_CLUSTER { chip::app::Clusters::LevelControl::Id, "Level Control" }, #else #define CHIP_PRINTCLUSTER_LEVEL_CONTROL_CLUSTER #endif #if defined(ZCL_USING_BINARY_INPUT_BASIC_CLUSTER_SERVER) || defined(ZCL_USING_BINARY_INPUT_BASIC_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BINARY_INPUT_BASIC_CLUSTER { ZCL_BINARY_INPUT_BASIC_CLUSTER_ID, "Binary Input (Basic)" }, +#define CHIP_PRINTCLUSTER_BINARY_INPUT_BASIC_CLUSTER { chip::app::Clusters::BinaryInputBasic::Id, "Binary Input (Basic)" }, #else #define CHIP_PRINTCLUSTER_BINARY_INPUT_BASIC_CLUSTER #endif #if defined(ZCL_USING_PWM_CLUSTER_SERVER) || defined(ZCL_USING_PWM_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_PWM_CLUSTER { ZCL_PWM_CLUSTER_ID, "Pulse Width Modulation" }, +#define CHIP_PRINTCLUSTER_PWM_CLUSTER { chip::app::Clusters::PulseWidthModulation::Id, "Pulse Width Modulation" }, #else #define CHIP_PRINTCLUSTER_PWM_CLUSTER #endif #if defined(ZCL_USING_DESCRIPTOR_CLUSTER_SERVER) || defined(ZCL_USING_DESCRIPTOR_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_DESCRIPTOR_CLUSTER { ZCL_DESCRIPTOR_CLUSTER_ID, "Descriptor" }, +#define CHIP_PRINTCLUSTER_DESCRIPTOR_CLUSTER { chip::app::Clusters::Descriptor::Id, "Descriptor" }, #else #define CHIP_PRINTCLUSTER_DESCRIPTOR_CLUSTER #endif #if defined(ZCL_USING_BINDING_CLUSTER_SERVER) || defined(ZCL_USING_BINDING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BINDING_CLUSTER { ZCL_BINDING_CLUSTER_ID, "Binding" }, +#define CHIP_PRINTCLUSTER_BINDING_CLUSTER { chip::app::Clusters::Binding::Id, "Binding" }, #else #define CHIP_PRINTCLUSTER_BINDING_CLUSTER #endif #if defined(ZCL_USING_ACCESS_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_ACCESS_CONTROL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_ACCESS_CONTROL_CLUSTER { ZCL_ACCESS_CONTROL_CLUSTER_ID, "Access Control" }, +#define CHIP_PRINTCLUSTER_ACCESS_CONTROL_CLUSTER { chip::app::Clusters::AccessControl::Id, "Access Control" }, #else #define CHIP_PRINTCLUSTER_ACCESS_CONTROL_CLUSTER #endif #if defined(ZCL_USING_ACTIONS_CLUSTER_SERVER) || defined(ZCL_USING_ACTIONS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_ACTIONS_CLUSTER { ZCL_ACTIONS_CLUSTER_ID, "Actions" }, +#define CHIP_PRINTCLUSTER_ACTIONS_CLUSTER { chip::app::Clusters::Actions::Id, "Actions" }, #else #define CHIP_PRINTCLUSTER_ACTIONS_CLUSTER #endif #if defined(ZCL_USING_BASIC_CLUSTER_SERVER) || defined(ZCL_USING_BASIC_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BASIC_CLUSTER { ZCL_BASIC_CLUSTER_ID, "Basic" }, +#define CHIP_PRINTCLUSTER_BASIC_CLUSTER { chip::app::Clusters::Basic::Id, "Basic" }, #else #define CHIP_PRINTCLUSTER_BASIC_CLUSTER #endif #if defined(ZCL_USING_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER) || defined(ZCL_USING_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER \ - { ZCL_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_ID, "OTA Software Update Provider" }, + { chip::app::Clusters::OtaSoftwareUpdateProvider::Id, "OTA Software Update Provider" }, #else #define CHIP_PRINTCLUSTER_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER #endif @@ -113,186 +115,189 @@ #if defined(ZCL_USING_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_SERVER) || \ defined(ZCL_USING_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER \ - { ZCL_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_ID, "OTA Software Update Requestor" }, + { chip::app::Clusters::OtaSoftwareUpdateRequestor::Id, "OTA Software Update Requestor" }, #else #define CHIP_PRINTCLUSTER_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER #endif #if defined(ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_LOCALIZATION_CONFIGURATION_CLUSTER \ - { ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID, "Localization Configuration" }, + { chip::app::Clusters::LocalizationConfiguration::Id, "Localization Configuration" }, #else #define CHIP_PRINTCLUSTER_LOCALIZATION_CONFIGURATION_CLUSTER #endif #if defined(ZCL_USING_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER) || defined(ZCL_USING_TIME_FORMAT_LOCALIZATION_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_TIME_FORMAT_LOCALIZATION_CLUSTER { ZCL_TIME_FORMAT_LOCALIZATION_CLUSTER_ID, "Time Format Localization" }, +#define CHIP_PRINTCLUSTER_TIME_FORMAT_LOCALIZATION_CLUSTER \ + { chip::app::Clusters::TimeFormatLocalization::Id, "Time Format Localization" }, #else #define CHIP_PRINTCLUSTER_TIME_FORMAT_LOCALIZATION_CLUSTER #endif #if defined(ZCL_USING_UNIT_LOCALIZATION_CLUSTER_SERVER) || defined(ZCL_USING_UNIT_LOCALIZATION_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_UNIT_LOCALIZATION_CLUSTER { ZCL_UNIT_LOCALIZATION_CLUSTER_ID, "Unit Localization" }, +#define CHIP_PRINTCLUSTER_UNIT_LOCALIZATION_CLUSTER { chip::app::Clusters::UnitLocalization::Id, "Unit Localization" }, #else #define CHIP_PRINTCLUSTER_UNIT_LOCALIZATION_CLUSTER #endif #if defined(ZCL_USING_POWER_SOURCE_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_POWER_SOURCE_CONFIGURATION_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_POWER_SOURCE_CONFIGURATION_CLUSTER \ - { ZCL_POWER_SOURCE_CONFIGURATION_CLUSTER_ID, "Power Source Configuration" }, + { chip::app::Clusters::PowerSourceConfiguration::Id, "Power Source Configuration" }, #else #define CHIP_PRINTCLUSTER_POWER_SOURCE_CONFIGURATION_CLUSTER #endif #if defined(ZCL_USING_POWER_SOURCE_CLUSTER_SERVER) || defined(ZCL_USING_POWER_SOURCE_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_POWER_SOURCE_CLUSTER { ZCL_POWER_SOURCE_CLUSTER_ID, "Power Source" }, +#define CHIP_PRINTCLUSTER_POWER_SOURCE_CLUSTER { chip::app::Clusters::PowerSource::Id, "Power Source" }, #else #define CHIP_PRINTCLUSTER_POWER_SOURCE_CLUSTER #endif #if defined(ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER { ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, "General Commissioning" }, +#define CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER { chip::app::Clusters::GeneralCommissioning::Id, "General Commissioning" }, #else #define CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER #endif #if defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, "Network Commissioning" }, +#define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER { chip::app::Clusters::NetworkCommissioning::Id, "Network Commissioning" }, #else #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif #if defined(ZCL_USING_DIAGNOSTIC_LOGS_CLUSTER_SERVER) || defined(ZCL_USING_DIAGNOSTIC_LOGS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_DIAGNOSTIC_LOGS_CLUSTER { ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, "Diagnostic Logs" }, +#define CHIP_PRINTCLUSTER_DIAGNOSTIC_LOGS_CLUSTER { chip::app::Clusters::DiagnosticLogs::Id, "Diagnostic Logs" }, #else #define CHIP_PRINTCLUSTER_DIAGNOSTIC_LOGS_CLUSTER #endif #if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, "General Diagnostics" }, +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { chip::app::Clusters::GeneralDiagnostics::Id, "General Diagnostics" }, #else #define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER #endif #if defined(ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_SOFTWARE_DIAGNOSTICS_CLUSTER { ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID, "Software Diagnostics" }, +#define CHIP_PRINTCLUSTER_SOFTWARE_DIAGNOSTICS_CLUSTER { chip::app::Clusters::SoftwareDiagnostics::Id, "Software Diagnostics" }, #else #define CHIP_PRINTCLUSTER_SOFTWARE_DIAGNOSTICS_CLUSTER #endif #if defined(ZCL_USING_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_THREAD_NETWORK_DIAGNOSTICS_CLUSTER \ - { ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID, "Thread Network Diagnostics" }, + { chip::app::Clusters::ThreadNetworkDiagnostics::Id, "Thread Network Diagnostics" }, #else #define CHIP_PRINTCLUSTER_THREAD_NETWORK_DIAGNOSTICS_CLUSTER #endif #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, "WiFi Network Diagnostics" }, +#define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ + { chip::app::Clusters::WiFiNetworkDiagnostics::Id, "WiFi Network Diagnostics" }, #else #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER #endif #if defined(ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER \ - { ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID, "Ethernet Network Diagnostics" }, + { chip::app::Clusters::EthernetNetworkDiagnostics::Id, "Ethernet Network Diagnostics" }, #else #define CHIP_PRINTCLUSTER_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER #endif #if defined(ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_SERVER) || defined(ZCL_USING_TIME_SYNCHRONIZATION_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_TIME_SYNCHRONIZATION_CLUSTER { ZCL_TIME_SYNCHRONIZATION_CLUSTER_ID, "Time Synchronization" }, +#define CHIP_PRINTCLUSTER_TIME_SYNCHRONIZATION_CLUSTER { chip::app::Clusters::TimeSynchronization::Id, "Time Synchronization" }, #else #define CHIP_PRINTCLUSTER_TIME_SYNCHRONIZATION_CLUSTER #endif #if defined(ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_SERVER) || defined(ZCL_USING_BRIDGED_DEVICE_BASIC_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BRIDGED_DEVICE_BASIC_CLUSTER { ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID, "Bridged Device Basic" }, +#define CHIP_PRINTCLUSTER_BRIDGED_DEVICE_BASIC_CLUSTER { chip::app::Clusters::BridgedDeviceBasic::Id, "Bridged Device Basic" }, #else #define CHIP_PRINTCLUSTER_BRIDGED_DEVICE_BASIC_CLUSTER #endif #if defined(ZCL_USING_SWITCH_CLUSTER_SERVER) || defined(ZCL_USING_SWITCH_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_SWITCH_CLUSTER { ZCL_SWITCH_CLUSTER_ID, "Switch" }, +#define CHIP_PRINTCLUSTER_SWITCH_CLUSTER { chip::app::Clusters::Switch::Id, "Switch" }, #else #define CHIP_PRINTCLUSTER_SWITCH_CLUSTER #endif #if defined(ZCL_USING_ADMINISTRATOR_COMMISSIONING_CLUSTER_SERVER) || defined(ZCL_USING_ADMINISTRATOR_COMMISSIONING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_ADMINISTRATOR_COMMISSIONING_CLUSTER \ - { ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID, "AdministratorCommissioning" }, + { chip::app::Clusters::AdministratorCommissioning::Id, "AdministratorCommissioning" }, #else #define CHIP_PRINTCLUSTER_ADMINISTRATOR_COMMISSIONING_CLUSTER #endif #if defined(ZCL_USING_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER) || defined(ZCL_USING_OPERATIONAL_CREDENTIALS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER { ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, "Operational Credentials" }, +#define CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ + { chip::app::Clusters::OperationalCredentials::Id, "Operational Credentials" }, #else #define CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER #endif #if defined(ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER) || defined(ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_GROUP_KEY_MANAGEMENT_CLUSTER { ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID, "Group Key Management" }, +#define CHIP_PRINTCLUSTER_GROUP_KEY_MANAGEMENT_CLUSTER { chip::app::Clusters::GroupKeyManagement::Id, "Group Key Management" }, #else #define CHIP_PRINTCLUSTER_GROUP_KEY_MANAGEMENT_CLUSTER #endif #if defined(ZCL_USING_FIXED_LABEL_CLUSTER_SERVER) || defined(ZCL_USING_FIXED_LABEL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER { ZCL_FIXED_LABEL_CLUSTER_ID, "Fixed Label" }, +#define CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER { chip::app::Clusters::FixedLabel::Id, "Fixed Label" }, #else #define CHIP_PRINTCLUSTER_FIXED_LABEL_CLUSTER #endif #if defined(ZCL_USING_USER_LABEL_CLUSTER_SERVER) || defined(ZCL_USING_USER_LABEL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_USER_LABEL_CLUSTER { ZCL_USER_LABEL_CLUSTER_ID, "User Label" }, +#define CHIP_PRINTCLUSTER_USER_LABEL_CLUSTER { chip::app::Clusters::UserLabel::Id, "User Label" }, #else #define CHIP_PRINTCLUSTER_USER_LABEL_CLUSTER #endif #if defined(ZCL_USING_PROXY_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_PROXY_CONFIGURATION_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_PROXY_CONFIGURATION_CLUSTER { ZCL_PROXY_CONFIGURATION_CLUSTER_ID, "Proxy Configuration" }, +#define CHIP_PRINTCLUSTER_PROXY_CONFIGURATION_CLUSTER { chip::app::Clusters::ProxyConfiguration::Id, "Proxy Configuration" }, #else #define CHIP_PRINTCLUSTER_PROXY_CONFIGURATION_CLUSTER #endif #if defined(ZCL_USING_PROXY_DISCOVERY_CLUSTER_SERVER) || defined(ZCL_USING_PROXY_DISCOVERY_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_PROXY_DISCOVERY_CLUSTER { ZCL_PROXY_DISCOVERY_CLUSTER_ID, "Proxy Discovery" }, +#define CHIP_PRINTCLUSTER_PROXY_DISCOVERY_CLUSTER { chip::app::Clusters::ProxyDiscovery::Id, "Proxy Discovery" }, #else #define CHIP_PRINTCLUSTER_PROXY_DISCOVERY_CLUSTER #endif #if defined(ZCL_USING_PROXY_VALID_CLUSTER_SERVER) || defined(ZCL_USING_PROXY_VALID_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_PROXY_VALID_CLUSTER { ZCL_PROXY_VALID_CLUSTER_ID, "Proxy Valid" }, +#define CHIP_PRINTCLUSTER_PROXY_VALID_CLUSTER { chip::app::Clusters::ProxyValid::Id, "Proxy Valid" }, #else #define CHIP_PRINTCLUSTER_PROXY_VALID_CLUSTER #endif #if defined(ZCL_USING_BOOLEAN_STATE_CLUSTER_SERVER) || defined(ZCL_USING_BOOLEAN_STATE_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER { ZCL_BOOLEAN_STATE_CLUSTER_ID, "Boolean State" }, +#define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER { chip::app::Clusters::BooleanState::Id, "Boolean State" }, #else #define CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER #endif #if defined(ZCL_USING_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_MODE_SELECT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER { ZCL_MODE_SELECT_CLUSTER_ID, "Mode Select" }, +#define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER { chip::app::Clusters::ModeSelect::Id, "Mode Select" }, #else #define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER #endif #if defined(ZCL_USING_DOOR_LOCK_CLUSTER_SERVER) || defined(ZCL_USING_DOOR_LOCK_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER { ZCL_DOOR_LOCK_CLUSTER_ID, "Door Lock" }, +#define CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER { chip::app::Clusters::DoorLock::Id, "Door Lock" }, #else #define CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER #endif #if defined(ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER) || defined(ZCL_USING_WINDOW_COVERING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER { ZCL_WINDOW_COVERING_CLUSTER_ID, "Window Covering" }, +#define CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER { chip::app::Clusters::WindowCovering::Id, "Window Covering" }, #else #define CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER #endif #if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BARRIER_CONTROL_CLUSTER { ZCL_BARRIER_CONTROL_CLUSTER_ID, "Barrier Control" }, +#define CHIP_PRINTCLUSTER_BARRIER_CONTROL_CLUSTER { chip::app::Clusters::BarrierControl::Id, "Barrier Control" }, #else #define CHIP_PRINTCLUSTER_BARRIER_CONTROL_CLUSTER #endif @@ -300,19 +305,19 @@ #if defined(ZCL_USING_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER) || \ defined(ZCL_USING_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER \ - { ZCL_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_ID, "Pump Configuration and Control" }, + { chip::app::Clusters::PumpConfigurationAndControl::Id, "Pump Configuration and Control" }, #else #define CHIP_PRINTCLUSTER_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER #endif #if defined(ZCL_USING_THERMOSTAT_CLUSTER_SERVER) || defined(ZCL_USING_THERMOSTAT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_THERMOSTAT_CLUSTER { ZCL_THERMOSTAT_CLUSTER_ID, "Thermostat" }, +#define CHIP_PRINTCLUSTER_THERMOSTAT_CLUSTER { chip::app::Clusters::Thermostat::Id, "Thermostat" }, #else #define CHIP_PRINTCLUSTER_THERMOSTAT_CLUSTER #endif #if defined(ZCL_USING_FAN_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_FAN_CONTROL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_FAN_CONTROL_CLUSTER { ZCL_FAN_CONTROL_CLUSTER_ID, "Fan Control" }, +#define CHIP_PRINTCLUSTER_FAN_CONTROL_CLUSTER { chip::app::Clusters::FanControl::Id, "Fan Control" }, #else #define CHIP_PRINTCLUSTER_FAN_CONTROL_CLUSTER #endif @@ -320,43 +325,45 @@ #if defined(ZCL_USING_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_SERVER) || \ defined(ZCL_USING_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER \ - { ZCL_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_ID, "Thermostat User Interface Configuration" }, + { chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id, "Thermostat User Interface Configuration" }, #else #define CHIP_PRINTCLUSTER_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER #endif #if defined(ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_COLOR_CONTROL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_COLOR_CONTROL_CLUSTER { ZCL_COLOR_CONTROL_CLUSTER_ID, "Color Control" }, +#define CHIP_PRINTCLUSTER_COLOR_CONTROL_CLUSTER { chip::app::Clusters::ColorControl::Id, "Color Control" }, #else #define CHIP_PRINTCLUSTER_COLOR_CONTROL_CLUSTER #endif #if defined(ZCL_USING_BALLAST_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_BALLAST_CONFIGURATION_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_BALLAST_CONFIGURATION_CLUSTER { ZCL_BALLAST_CONFIGURATION_CLUSTER_ID, "Ballast Configuration" }, +#define CHIP_PRINTCLUSTER_BALLAST_CONFIGURATION_CLUSTER { chip::app::Clusters::BallastConfiguration::Id, "Ballast Configuration" }, #else #define CHIP_PRINTCLUSTER_BALLAST_CONFIGURATION_CLUSTER #endif #if defined(ZCL_USING_ILLUMINANCE_MEASUREMENT_CLUSTER_SERVER) || defined(ZCL_USING_ILLUMINANCE_MEASUREMENT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_ILLUMINANCE_MEASUREMENT_CLUSTER { ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID, "Illuminance Measurement" }, +#define CHIP_PRINTCLUSTER_ILLUMINANCE_MEASUREMENT_CLUSTER \ + { chip::app::Clusters::IlluminanceMeasurement::Id, "Illuminance Measurement" }, #else #define CHIP_PRINTCLUSTER_ILLUMINANCE_MEASUREMENT_CLUSTER #endif #if defined(ZCL_USING_TEMPERATURE_MEASUREMENT_CLUSTER_SERVER) || defined(ZCL_USING_TEMPERATURE_MEASUREMENT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_TEMPERATURE_MEASUREMENT_CLUSTER { ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID, "Temperature Measurement" }, +#define CHIP_PRINTCLUSTER_TEMPERATURE_MEASUREMENT_CLUSTER \ + { chip::app::Clusters::TemperatureMeasurement::Id, "Temperature Measurement" }, #else #define CHIP_PRINTCLUSTER_TEMPERATURE_MEASUREMENT_CLUSTER #endif #if defined(ZCL_USING_PRESSURE_MEASUREMENT_CLUSTER_SERVER) || defined(ZCL_USING_PRESSURE_MEASUREMENT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_PRESSURE_MEASUREMENT_CLUSTER { ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID, "Pressure Measurement" }, +#define CHIP_PRINTCLUSTER_PRESSURE_MEASUREMENT_CLUSTER { chip::app::Clusters::PressureMeasurement::Id, "Pressure Measurement" }, #else #define CHIP_PRINTCLUSTER_PRESSURE_MEASUREMENT_CLUSTER #endif #if defined(ZCL_USING_FLOW_MEASUREMENT_CLUSTER_SERVER) || defined(ZCL_USING_FLOW_MEASUREMENT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_FLOW_MEASUREMENT_CLUSTER { ZCL_FLOW_MEASUREMENT_CLUSTER_ID, "Flow Measurement" }, +#define CHIP_PRINTCLUSTER_FLOW_MEASUREMENT_CLUSTER { chip::app::Clusters::FlowMeasurement::Id, "Flow Measurement" }, #else #define CHIP_PRINTCLUSTER_FLOW_MEASUREMENT_CLUSTER #endif @@ -364,103 +371,104 @@ #if defined(ZCL_USING_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_SERVER) || \ defined(ZCL_USING_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER \ - { ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID, "Relative Humidity Measurement" }, + { chip::app::Clusters::RelativeHumidityMeasurement::Id, "Relative Humidity Measurement" }, #else #define CHIP_PRINTCLUSTER_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER #endif #if defined(ZCL_USING_OCCUPANCY_SENSING_CLUSTER_SERVER) || defined(ZCL_USING_OCCUPANCY_SENSING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_OCCUPANCY_SENSING_CLUSTER { ZCL_OCCUPANCY_SENSING_CLUSTER_ID, "Occupancy Sensing" }, +#define CHIP_PRINTCLUSTER_OCCUPANCY_SENSING_CLUSTER { chip::app::Clusters::OccupancySensing::Id, "Occupancy Sensing" }, #else #define CHIP_PRINTCLUSTER_OCCUPANCY_SENSING_CLUSTER #endif #if defined(ZCL_USING_WAKE_ON_LAN_CLUSTER_SERVER) || defined(ZCL_USING_WAKE_ON_LAN_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_WAKE_ON_LAN_CLUSTER { ZCL_WAKE_ON_LAN_CLUSTER_ID, "Wake on LAN" }, +#define CHIP_PRINTCLUSTER_WAKE_ON_LAN_CLUSTER { chip::app::Clusters::WakeOnLan::Id, "Wake on LAN" }, #else #define CHIP_PRINTCLUSTER_WAKE_ON_LAN_CLUSTER #endif #if defined(ZCL_USING_CHANNEL_CLUSTER_SERVER) || defined(ZCL_USING_CHANNEL_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_CHANNEL_CLUSTER { ZCL_CHANNEL_CLUSTER_ID, "Channel" }, +#define CHIP_PRINTCLUSTER_CHANNEL_CLUSTER { chip::app::Clusters::Channel::Id, "Channel" }, #else #define CHIP_PRINTCLUSTER_CHANNEL_CLUSTER #endif #if defined(ZCL_USING_TARGET_NAVIGATOR_CLUSTER_SERVER) || defined(ZCL_USING_TARGET_NAVIGATOR_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_TARGET_NAVIGATOR_CLUSTER { ZCL_TARGET_NAVIGATOR_CLUSTER_ID, "Target Navigator" }, +#define CHIP_PRINTCLUSTER_TARGET_NAVIGATOR_CLUSTER { chip::app::Clusters::TargetNavigator::Id, "Target Navigator" }, #else #define CHIP_PRINTCLUSTER_TARGET_NAVIGATOR_CLUSTER #endif #if defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_SERVER) || defined(ZCL_USING_MEDIA_PLAYBACK_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER { ZCL_MEDIA_PLAYBACK_CLUSTER_ID, "Media Playback" }, +#define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER { chip::app::Clusters::MediaPlayback::Id, "Media Playback" }, #else #define CHIP_PRINTCLUSTER_MEDIA_PLAYBACK_CLUSTER #endif #if defined(ZCL_USING_MEDIA_INPUT_CLUSTER_SERVER) || defined(ZCL_USING_MEDIA_INPUT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_MEDIA_INPUT_CLUSTER { ZCL_MEDIA_INPUT_CLUSTER_ID, "Media Input" }, +#define CHIP_PRINTCLUSTER_MEDIA_INPUT_CLUSTER { chip::app::Clusters::MediaInput::Id, "Media Input" }, #else #define CHIP_PRINTCLUSTER_MEDIA_INPUT_CLUSTER #endif #if defined(ZCL_USING_LOW_POWER_CLUSTER_SERVER) || defined(ZCL_USING_LOW_POWER_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_LOW_POWER_CLUSTER { ZCL_LOW_POWER_CLUSTER_ID, "Low Power" }, +#define CHIP_PRINTCLUSTER_LOW_POWER_CLUSTER { chip::app::Clusters::LowPower::Id, "Low Power" }, #else #define CHIP_PRINTCLUSTER_LOW_POWER_CLUSTER #endif #if defined(ZCL_USING_KEYPAD_INPUT_CLUSTER_SERVER) || defined(ZCL_USING_KEYPAD_INPUT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_KEYPAD_INPUT_CLUSTER { ZCL_KEYPAD_INPUT_CLUSTER_ID, "Keypad Input" }, +#define CHIP_PRINTCLUSTER_KEYPAD_INPUT_CLUSTER { chip::app::Clusters::KeypadInput::Id, "Keypad Input" }, #else #define CHIP_PRINTCLUSTER_KEYPAD_INPUT_CLUSTER #endif #if defined(ZCL_USING_CONTENT_LAUNCHER_CLUSTER_SERVER) || defined(ZCL_USING_CONTENT_LAUNCHER_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_CONTENT_LAUNCHER_CLUSTER { ZCL_CONTENT_LAUNCHER_CLUSTER_ID, "Content Launcher" }, +#define CHIP_PRINTCLUSTER_CONTENT_LAUNCHER_CLUSTER { chip::app::Clusters::ContentLauncher::Id, "Content Launcher" }, #else #define CHIP_PRINTCLUSTER_CONTENT_LAUNCHER_CLUSTER #endif #if defined(ZCL_USING_AUDIO_OUTPUT_CLUSTER_SERVER) || defined(ZCL_USING_AUDIO_OUTPUT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_AUDIO_OUTPUT_CLUSTER { ZCL_AUDIO_OUTPUT_CLUSTER_ID, "Audio Output" }, +#define CHIP_PRINTCLUSTER_AUDIO_OUTPUT_CLUSTER { chip::app::Clusters::AudioOutput::Id, "Audio Output" }, #else #define CHIP_PRINTCLUSTER_AUDIO_OUTPUT_CLUSTER #endif #if defined(ZCL_USING_APPLICATION_LAUNCHER_CLUSTER_SERVER) || defined(ZCL_USING_APPLICATION_LAUNCHER_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_APPLICATION_LAUNCHER_CLUSTER { ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, "Application Launcher" }, +#define CHIP_PRINTCLUSTER_APPLICATION_LAUNCHER_CLUSTER { chip::app::Clusters::ApplicationLauncher::Id, "Application Launcher" }, #else #define CHIP_PRINTCLUSTER_APPLICATION_LAUNCHER_CLUSTER #endif #if defined(ZCL_USING_APPLICATION_BASIC_CLUSTER_SERVER) || defined(ZCL_USING_APPLICATION_BASIC_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_APPLICATION_BASIC_CLUSTER { ZCL_APPLICATION_BASIC_CLUSTER_ID, "Application Basic" }, +#define CHIP_PRINTCLUSTER_APPLICATION_BASIC_CLUSTER { chip::app::Clusters::ApplicationBasic::Id, "Application Basic" }, #else #define CHIP_PRINTCLUSTER_APPLICATION_BASIC_CLUSTER #endif #if defined(ZCL_USING_ACCOUNT_LOGIN_CLUSTER_SERVER) || defined(ZCL_USING_ACCOUNT_LOGIN_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER { ZCL_ACCOUNT_LOGIN_CLUSTER_ID, "Account Login" }, +#define CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER { chip::app::Clusters::AccountLogin::Id, "Account Login" }, #else #define CHIP_PRINTCLUSTER_ACCOUNT_LOGIN_CLUSTER #endif #if defined(ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_SERVER) || defined(ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER { ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID, "Electrical Measurement" }, +#define CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER \ + { chip::app::Clusters::ElectricalMeasurement::Id, "Electrical Measurement" }, #else #define CHIP_PRINTCLUSTER_ELECTRICAL_MEASUREMENT_CLUSTER #endif #if defined(ZCL_USING_UNIT_TESTING_CLUSTER_SERVER) || defined(ZCL_USING_UNIT_TESTING_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER { ZCL_UNIT_TESTING_CLUSTER_ID, "Unit Testing" }, +#define CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER { chip::app::Clusters::UnitTesting::Id, "Unit Testing" }, #else #define CHIP_PRINTCLUSTER_UNIT_TESTING_CLUSTER #endif #if defined(ZCL_USING_FAULT_INJECTION_CLUSTER_SERVER) || defined(ZCL_USING_FAULT_INJECTION_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER { ZCL_FAULT_INJECTION_CLUSTER_ID, "Fault Injection" }, +#define CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER { chip::app::Clusters::FaultInjection::Id, "Fault Injection" }, #else #define CHIP_PRINTCLUSTER_FAULT_INJECTION_CLUSTER #endif