diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 4d25f93d11f4d4..dff6d6779890f7 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 5fe59d98097a7b..869e7eb9865a25 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -111,7 +111,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -9097,7 +9097,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index c8b2e9a4333e14..8f32c8d0d5664b 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -48,6 +48,7 @@ #endif using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; using namespace ::chip::System; @@ -73,17 +74,17 @@ void OnIdentifyTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -96,7 +97,7 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; @@ -104,7 +105,7 @@ Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; diff --git a/examples/all-clusters-app/ameba/main/include/IdentifyCommand.h b/examples/all-clusters-app/ameba/main/include/IdentifyCommand.h index ab93460a84a300..472b66e44397cf 100644 --- a/examples/all-clusters-app/ameba/main/include/IdentifyCommand.h +++ b/examples/all-clusters-app/ameba/main/include/IdentifyCommand.h @@ -96,8 +96,8 @@ void ProcessIdentifyUnicastBindingCommand(BindingCommandData * data, const Ember break; case Clusters::Identify::Commands::TriggerEffect::Id: - triggerEffectCommand.effectIdentifier = static_cast(data->args[0]); - triggerEffectCommand.effectVariant = static_cast(data->args[1]); + triggerEffectCommand.effectIdentifier = static_cast(data->args[0]); + triggerEffectCommand.effectVariant = static_cast(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, triggerEffectCommand, onSuccess, onFailure); break; @@ -119,8 +119,8 @@ void ProcessIdentifyGroupBindingCommand(BindingCommandData * data, const EmberBi break; case Clusters::Identify::Commands::TriggerEffect::Id: - triggerEffectCommand.effectIdentifier = static_cast(data->args[0]); - triggerEffectCommand.effectVariant = static_cast(data->args[1]); + triggerEffectCommand.effectIdentifier = static_cast(data->args[0]); + triggerEffectCommand.effectVariant = static_cast(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, triggerEffectCommand); break; } diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp index 17922c679e2135..df12e131ca069a 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ClusterManager.cpp @@ -29,6 +29,7 @@ #endif using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Inet; using namespace ::chip::System; using namespace ::chip::DeviceLayer; @@ -45,17 +46,17 @@ void OnIdentifyTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: PLAT_LOG("No identifier effect"); @@ -68,7 +69,7 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { PLAT_LOG("onIdentifyStart"); }, [](Identify *) { PLAT_LOG("onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; @@ -76,7 +77,7 @@ Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { PLAT_LOG("onIdentifyStart"); }, [](Identify *) { PLAT_LOG("onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; diff --git a/examples/all-clusters-app/cc13x4_26x4/main/ClusterManager.cpp b/examples/all-clusters-app/cc13x4_26x4/main/ClusterManager.cpp index 7e6173a5a5b6a1..bf5176fc060ae9 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/ClusterManager.cpp +++ b/examples/all-clusters-app/cc13x4_26x4/main/ClusterManager.cpp @@ -28,6 +28,7 @@ #endif using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Inet; using namespace ::chip::System; using namespace ::chip::DeviceLayer; @@ -44,17 +45,17 @@ void OnIdentifyTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - PLAT_LOG("EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: PLAT_LOG("No identifier effect"); @@ -67,7 +68,7 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { PLAT_LOG("onIdentifyStart"); }, [](Identify *) { PLAT_LOG("onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; @@ -75,7 +76,7 @@ Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { PLAT_LOG("onIdentifyStart"); }, [](Identify *) { PLAT_LOG("onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; diff --git a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp index 277cdb28cacbf6..271dc3711e3c15 100644 --- a/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceCallbacks.cpp @@ -54,18 +54,18 @@ void OnIdentifyTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: statusLED1.Blink(kIdentifyTimerDelayMS * 2); - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -78,7 +78,7 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; @@ -86,7 +86,7 @@ Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index dcce3f14ad12d5..4c22561146b237 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -77,17 +77,17 @@ void OnTriggerEffect(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -96,11 +96,13 @@ void OnTriggerEffect(::Identify * identify) } static Identify gIdentify0 = { - chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; static Identify gIdentify1 = { - chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; // Network commissioning diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index 05103f4c87f25d..a5fbf9b1e95d09 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -71,7 +71,7 @@ k_timer sFunctionTimer; chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; Identify sIdentify = { kIdentifyEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; LEDWidget sStatusLED; LEDWidget sIdentifyLED; diff --git a/examples/all-clusters-app/telink/Readme.md b/examples/all-clusters-app/telink/Readme.md index 719656cbcb8484..ececcdb4a1fd0b 100644 --- a/examples/all-clusters-app/telink/Readme.md +++ b/examples/all-clusters-app/telink/Readme.md @@ -83,14 +83,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | ### CHIP tool commands diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 7570f498ab177a..02bd957ba4145c 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 8bb9653d973323..ad57bb3ccb1c7e 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -111,7 +111,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8568,7 +8568,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -24952,5 +24952,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp index 306d9c36717e00..870870bbf41999 100644 --- a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp @@ -54,6 +54,7 @@ #endif using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; @@ -80,14 +81,14 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, }; Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, }; #ifdef CONFIG_PLATFORM_8721D diff --git a/examples/all-clusters-minimal-app/esp32/README.md b/examples/all-clusters-minimal-app/esp32/README.md deleted file mode 120000 index ded193451e596c..00000000000000 --- a/examples/all-clusters-minimal-app/esp32/README.md +++ /dev/null @@ -1 +0,0 @@ -../../all-clusters-app/esp32/README.md \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/esp32/README.md b/examples/all-clusters-minimal-app/esp32/README.md new file mode 100644 index 00000000000000..6cb3f9093da13b --- /dev/null +++ b/examples/all-clusters-minimal-app/esp32/README.md @@ -0,0 +1,51 @@ +# CHIP ESP32 All Clusters Example + +A prototype application that demonstrates device commissioning and cluster +control. + +Please +[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +and refer +[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +guides to get started. + +--- + +- [Cluster control](#cluster-control) +- [Matter OTA guide](../../../docs/guides/esp32/ota.md) +- [RPC console and Device Tracing](../../../docs/guides/esp32/rpc_console.md) + +--- + +### Cluster control + +#### onoff + +To use the Client to send Matter commands, run the built executable and pass it +the target cluster name, the target command name as well as an endpoint id. + +``` +$ ./out/debug/chip-tool onoff on +``` + +The client will send a single command packet and then exit. + +#### levelcontrol + +```bash +Usage: + $ ./out/debug/chip-tool levelcontrol move-to-level Level=10 TransitionTime=0 OptionMask=0 OptionOverride=0 +``` + +--- + +This demo app illustrates controlling OnOff cluster (Server) attributes of an +endpoint. For `ESP32-DevKitC`, `ESP32-WROVER-KIT_V4.1` and `ESP32C3-DevKitM`, a +GPIO (configurable through `STATUS_LED_GPIO_NUM` in `main/main.cpp`) is updated +through the on/off/toggle commands from the `python-controller`. For `M5Stack`, +a virtual Green LED on the display is used for the same. + +If you wish to see the actual effect of the commands on `ESP32-DevKitC`, +`ESP32-WROVER-KIT_V4.1`, you will have to connect an external LED to GPIO +`STATUS_LED_GPIO_NUM`. For `ESP32C3-DevKitM`, the on-board LED will show the +actual effect of the commands. diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp index 333ec5886baba4..cff72337968ef4 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp @@ -53,18 +53,18 @@ void OnIdentifyTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: statusLED1.Blink(kIdentifyTimerDelayMS * 2); - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -77,7 +77,7 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; @@ -85,7 +85,7 @@ Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; diff --git a/examples/all-clusters-minimal-app/linux/main-common.cpp b/examples/all-clusters-minimal-app/linux/main-common.cpp index 7ff4635b7ce9ed..fadc7fc7246ab8 100644 --- a/examples/all-clusters-minimal-app/linux/main-common.cpp +++ b/examples/all-clusters-minimal-app/linux/main-common.cpp @@ -56,17 +56,17 @@ void OnTriggerEffect(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -75,11 +75,13 @@ void OnTriggerEffect(::Identify * identify) } static Identify gIdentify0 = { - chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; static Identify gIdentify1 = { - chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; // Network commissioning diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index ed6bebe65f7cdc..32b8d2ebc54668 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index c7a564c170d996..920ea1722e4c65 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -5112,7 +5112,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/bridge-app/telink/README.md b/examples/bridge-app/telink/README.md index 67ded6c90e751f..bec1790828de37 100644 --- a/examples/bridge-app/telink/README.md +++ b/examples/bridge-app/telink/README.md @@ -160,14 +160,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | ### CHIP tool commands diff --git a/examples/chef/ameba/main/chipinterface.cpp b/examples/chef/ameba/main/chipinterface.cpp index f68fca04254cf7..7e52ae210e3ded 100644 --- a/examples/chef/ameba/main/chipinterface.cpp +++ b/examples/chef/ameba/main/chipinterface.cpp @@ -50,6 +50,7 @@ #endif using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; @@ -76,14 +77,14 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, }; Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, }; #ifdef CONFIG_PLATFORM_8721D diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index ec26c6d289f836..87a82162e811a4 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 11db4cf94852b9..f031d3d9433850 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -5503,7 +5503,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 4c0cf67d49861e..7d148c4f7c884a 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 1d2267832de754..3443a88d64a262 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -5488,7 +5488,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 4e8886b0e945cc..0f00306bb151d9 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index f05fe65bac80e1..1a347ec67f7d14 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 050111d48e9347..a5dfc6f6755969 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index d4ecb08bca1b5e..771cfe79ea257c 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -5528,7 +5528,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 30c65abc414fc6..2b23b97657da04 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index a2cd89f065ea4c..a398cfeb508adf 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 4f557933a3e284..385a6adceeceda 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 5642a98fd0b985..a6df9196a26fe8 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index b32ad8e492896a..d89740666008ab 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 681c6579d1e907..0e21ca5c62cd29 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -5536,7 +5536,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index b8d2ee4fc454eb..5481f14fc6b2b3 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 2908b675400a0c..ff13ace51cf8cb 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index faf4f582fc2585..dce6707393cb12 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index dd990192c3d258..8f9676e852e8ca 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 5ddb1843d34113..786ffa050e7f61 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 109f2bafcaef2e..aac331b52eeb5b 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index b4ef5d3bcb7fa6..3820a6ab9047c5 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 7df712650db095..a321d2b57dfc8d 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 3e0244a0d80d73..ced95fbbf73b2d 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index dbfe3e859d505f..c19b17b01fe861 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index d1e2a0497c9502..b061252daa615f 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 6f2c666c4af6e2..6f557a2971aad9 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 534be03fc13ba4..6975bc607bd689 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 97a00a606ab014..a351b6a168e6d2 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 5313ccd0c651c1..116b20a3fd8635 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index d3cd82ce6e7e42..2d1328ac9ee5cd 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index c74e00682b9e17..5e25edb265d61b 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 43b4f4dc2cbba9..45d9a0226eaded 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 7a6dcd907e19bb..23bc7c11a29833 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index b24bf3edb878cb..af6d2602a5281a 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -6309,7 +6309,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index a854dc73e79ded..a52f5c0902c5df 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index a6a959c141a0e0..6e54444375e979 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 3f1ab70c806713..98ee9f3aa4344a 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 7460448b508fc5..c205b1d68d4574 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 3c40b497258e03..17d0226399062d 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index e8db2a4ca92aa5..32bc098ba3d18d 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -5528,7 +5528,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 504db5ebf7a234..70cbdc183183d6 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index fdf59014dc482d..fac7b92e7d549b 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -5480,7 +5480,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/silabs/src/AppTask.cpp b/examples/chef/silabs/src/AppTask.cpp index d166243033cdd6..fca7a76ab22431 100644 --- a/examples/chef/silabs/src/AppTask.cpp +++ b/examples/chef/silabs/src/AppTask.cpp @@ -54,19 +54,20 @@ #define APP_FUNCTION_BUTTON 0 using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; namespace { #ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; #endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER namespace { #ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; } #endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER } // namespace @@ -76,29 +77,29 @@ void OnTriggerIdentifyEffect(Identify * identify) { sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -111,7 +112,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerIdentifyEffect, }; #endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 0b2f62333f6861..f917642c646937 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index 36ab94f1311d9f..990672ee1d0346 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -5479,7 +5479,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, 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 c4332dfe0cbdee..3630e581ba9954 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -82,11 +82,12 @@ extern "C" void K32WUartProcess(void); using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace chip; +using namespace chip::app; AppTask AppTask::sAppTask; static Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::OnIdentifyStart, AppTask::OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; /* OTA related variables */ #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR @@ -723,7 +724,7 @@ void AppTask::OnStateChanged(ContactSensorManager::State aState) void AppTask::OnIdentifyStart(Identify * identify) { - if (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK == identify->mCurrentEffectIdentifier) + if (Clusters::Identify::EffectIdentifierEnum::kBlink == identify->mCurrentEffectIdentifier) { if (Function::kNoneSelected != sAppTask.mFunction) { @@ -741,7 +742,7 @@ void AppTask::OnIdentifyStart(Identify * identify) void AppTask::OnIdentifyStop(Identify * identify) { - if (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK == identify->mCurrentEffectIdentifier) + if (Clusters::Identify::EffectIdentifierEnum::kBlink == identify->mCurrentEffectIdentifier) { K32W_LOG("Identify process has stopped."); sAppTask.mFunction = Function::kNoneSelected; diff --git a/examples/contact-sensor-app/telink/README.md b/examples/contact-sensor-app/telink/README.md index d6c8bd7c307133..d8d60e627d8875 100755 --- a/examples/contact-sensor-app/telink/README.md +++ b/examples/contact-sensor-app/telink/README.md @@ -81,14 +81,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | #### Indicate current state of Contact Sensor diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index fe52398b9742b8..b10efb5b7ddf62 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap index c6fab6ce6afca3..4b3a07cd0c4618 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap @@ -5110,7 +5110,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/light-switch-app/ameba/main/chipinterface.cpp b/examples/light-switch-app/ameba/main/chipinterface.cpp index 7bc5c3efae4416..81cb25a2db011c 100644 --- a/examples/light-switch-app/ameba/main/chipinterface.cpp +++ b/examples/light-switch-app/ameba/main/chipinterface.cpp @@ -48,6 +48,7 @@ #endif using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; using namespace ::chip::System; @@ -73,14 +74,14 @@ Identify gIdentify0 = { chip::EndpointId{ 0 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, }; Identify gIdentify1 = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, }; #ifdef CONFIG_PLATFORM_8721D diff --git a/examples/light-switch-app/infineon/cyw30739/src/main.cpp b/examples/light-switch-app/infineon/cyw30739/src/main.cpp index c828788574a40a..dbfdb81b875b3f 100644 --- a/examples/light-switch-app/infineon/cyw30739/src/main.cpp +++ b/examples/light-switch-app/infineon/cyw30739/src/main.cpp @@ -46,6 +46,7 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace ::chip::Shell; +using namespace ::chip::app; constexpr chip::EndpointId kLightDimmerSwitchEndpointId = 1; @@ -72,17 +73,17 @@ void OnIdentifyTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -95,7 +96,7 @@ static Identify gIdentify = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE, + Clusters::Identify::IdentifyTypeEnum::kNone, OnIdentifyTriggerEffect, }; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index c7ce01828f8ce4..83f73393327354 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ client cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ client cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ client cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } /** Command description for Identify */ @@ -61,7 +61,7 @@ client cluster Identify = 3 { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -70,21 +70,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -97,8 +97,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index b4c5116c63d177..674a2b2b610f66 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -5461,7 +5461,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8109,7 +8109,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index e77184a6a6c355..9bc8422328d88a 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -73,7 +73,7 @@ constexpr size_t kAppEventQueueSize = 10; K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), kAppEventQueueSize, alignof(AppEvent)); Identify sIdentify = { kLightEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; // NOTE! This key is for test/certification only and should not be available in production devices! // If CONFIG_CHIP_FACTORY_DATA is enabled, this value is read from the factory data. diff --git a/examples/light-switch-app/silabs/src/AppTask.cpp b/examples/light-switch-app/silabs/src/AppTask.cpp index 38dea28cc6abd8..7274ae552712ac 100644 --- a/examples/light-switch-app/silabs/src/AppTask.cpp +++ b/examples/light-switch-app/silabs/src/AppTask.cpp @@ -67,6 +67,7 @@ constexpr chip::EndpointId kGenericSwitchEndpoint = 2; } // namespace using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Silabs; @@ -76,7 +77,7 @@ namespace { * Variable declarations *********************************************************/ -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; /********************************************************** * Identify Callbacks @@ -86,7 +87,7 @@ namespace { void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 AppTask::GetAppTask().StopStatusLEDTimer(); @@ -99,11 +100,11 @@ void OnTriggerIdentifyEffect(Identify * identify) ChipLogProgress(Zcl, "Trigger Identify Effect"); sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 @@ -112,20 +113,20 @@ void OnTriggerIdentifyEffect(Identify * identify) switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -136,7 +137,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::GetAppTask().OnIdentifyStart, AppTask::GetAppTask().OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerIdentifyEffect, }; diff --git a/examples/light-switch-app/telink/README.md b/examples/light-switch-app/telink/README.md index 865f482b9f093b..bca98378dd8e6f 100755 --- a/examples/light-switch-app/telink/README.md +++ b/examples/light-switch-app/telink/README.md @@ -86,14 +86,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | ### CHIP tool commands diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index e9ef017c97861a..4b342b4b413578 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -46,6 +46,7 @@ #endif using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; using namespace ::chip::System; @@ -92,17 +93,17 @@ void OnTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -111,7 +112,8 @@ void OnTriggerEffect(Identify * identify) } static Identify gIdentify1 = { - chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; static void InitServer(intptr_t context) diff --git a/examples/lighting-app/beken/main/chipinterface.cpp b/examples/lighting-app/beken/main/chipinterface.cpp index 79ab24778347cd..8ad5a5c45ced1a 100644 --- a/examples/lighting-app/beken/main/chipinterface.cpp +++ b/examples/lighting-app/beken/main/chipinterface.cpp @@ -52,6 +52,7 @@ using chip::Transport::PeerAddress; using namespace chip::Messaging; using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; @@ -72,17 +73,17 @@ void OnTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -91,7 +92,8 @@ void OnTriggerEffect(Identify * identify) } static Identify gIdentify1 = { - chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; // Warkaround for ld error:undefined reference to '__sync_synchronize' diff --git a/examples/lighting-app/bouffalolab/common/AppTask.cpp b/examples/lighting-app/bouffalolab/common/AppTask.cpp index 8b88e6892d0ca2..100e8792a59e42 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.cpp +++ b/examples/lighting-app/bouffalolab/common/AppTask.cpp @@ -61,6 +61,15 @@ extern "C" { #include "AppTask.h" +using namespace ::chip; +using namespace ::chip::app; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceLayer; + +#if CONFIG_ENABLE_CHIP_SHELL +using namespace chip::Shell; +#endif + namespace { #if defined(BL706_NIGHT_LIGHT) || defined(BL602_NIGHT_LIGHT) @@ -73,20 +82,11 @@ Identify sIdentify = { APP_LIGHT_ENDPOINT_ID, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LIGHT, + Clusters::Identify::IdentifyTypeEnum::kLightOutput, }; } // namespace -using namespace ::chip; -using namespace ::chip::app; -using namespace ::chip::Credentials; -using namespace ::chip::DeviceLayer; - -#if CONFIG_ENABLE_CHIP_SHELL -using namespace chip::Shell; -#endif - AppTask AppTask::sAppTask; StackType_t AppTask::appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; StaticTask_t AppTask::appTaskStruct; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index b859292889aed1..976e85afbb1f97 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 085744fbc30a5c..dbf0663ffb543a 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -5516,7 +5516,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index ad6be5d5c92b1d..d535e9438f8773 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index 9afac339440bf6..819a1096f730d4 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -5516,7 +5516,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/cc13x2x7_26x2x7/src/AppTask.cpp b/examples/lighting-app/cc13x2x7_26x2x7/src/AppTask.cpp index 945679b5e1e853..c9e8845a4f7323 100644 --- a/examples/lighting-app/cc13x2x7_26x2x7/src/AppTask.cpp +++ b/examples/lighting-app/cc13x2x7_26x2x7/src/AppTask.cpp @@ -69,6 +69,7 @@ static uint32_t identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_FINISH_STOP; #define LIGHTING_APPLICATION_IDENTIFY_ENDPOINT 1 using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -104,7 +105,7 @@ void InitializeOTARequestor(void) #endif ::Identify stIdentify = { LIGHTING_APPLICATION_IDENTIFY_ENDPOINT, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -506,30 +507,30 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_BLINK; IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Starting breathe identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_BREATHE; IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Starting okay identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_OKAY; IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_FINISH_STOP; IdentifyStopHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_FINISH_STOP; IdentifyStopHandler(identify); diff --git a/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp b/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp index d7b45b5b54e6bc..b6cce74ca13aae 100644 --- a/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp +++ b/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp @@ -68,6 +68,7 @@ static uint32_t identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_FINISH_STOP; #define LIGHTING_APPLICATION_IDENTIFY_ENDPOINT 1 using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -103,7 +104,7 @@ void InitializeOTARequestor(void) #endif ::Identify stIdentify = { LIGHTING_APPLICATION_IDENTIFY_ENDPOINT, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -505,30 +506,30 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_BLINK; IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Starting breathe identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_BREATHE; IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Starting okay identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_OKAY; IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_FINISH_STOP; IdentifyStopHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); identify_trigger_effect = IDENTIFY_TRIGGER_EFFECT_FINISH_STOP; IdentifyStopHandler(identify); diff --git a/examples/lighting-app/infineon/cyw30739/src/main.cpp b/examples/lighting-app/infineon/cyw30739/src/main.cpp index f1b28060f5d73f..14730252de08b3 100644 --- a/examples/lighting-app/infineon/cyw30739/src/main.cpp +++ b/examples/lighting-app/infineon/cyw30739/src/main.cpp @@ -46,6 +46,7 @@ using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace ::chip::Shell; +using namespace ::chip::app; static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; static FactoryDataProvider sFactoryDataProvider; @@ -71,17 +72,17 @@ void OnIdentifyTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -94,7 +95,7 @@ static Identify gIdentify = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE, + Clusters::Identify::IdentifyTypeEnum::kNone, OnIdentifyTriggerEffect, }; diff --git a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp index bcbb79461dd4a2..987213e84073e1 100644 --- a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp @@ -103,6 +103,7 @@ OTAImageProcessorImpl gImageProcessor; } // namespace using namespace ::chip; +using namespace ::chip::app; using namespace chip::TLV; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -134,7 +135,7 @@ static Identify gIdentify1 = { chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE, + Clusters::Identify::IdentifyTypeEnum::kNone, }; static void InitServer(intptr_t context) diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 69852e768f7717..580e84183ff551 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 1f563a5f100f0d..d799c8d0bb3d13 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -5516,7 +5516,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 3b4d1a020de535..5ff0c6a59ea3ca 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -79,7 +79,7 @@ K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), kAppEventQueueSize, alignof(AppE k_timer sFunctionTimer; Identify sIdentify = { kLightEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; LEDWidget sStatusLED; LEDWidget sIdentifyLED; diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index c609786f64fe23..2298c42c4c395c 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -84,6 +84,7 @@ extern "C" void K32WUartProcess(void); using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace chip; +using namespace chip::app; AppTask AppTask::sAppTask; @@ -93,11 +94,11 @@ uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; static Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::OnIdentifyStart, AppTask::OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::OnTriggerEffect, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::OnTriggerEffect, // Use invalid value for identifiers to enable TriggerEffect command // to stop Identify command for each effect - (EmberAfIdentifyEffectIdentifier)(EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT - 0x10), - EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT }; + Clusters::Identify::EffectIdentifierEnum::kUnknownEnumValue, + Clusters::Identify::EffectVariantEnum::kDefault }; /* OTA related variables */ #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR @@ -770,11 +771,9 @@ void AppTask::OnTriggerEffectComplete(chip::System::Layer * systemLayer, void * // TriggerEffect finished - reset identifiers // Use invalid value for identifiers to enable TriggerEffect command // to stop Identify command for each effect - gIdentify.mCurrentEffectIdentifier = - (EmberAfIdentifyEffectIdentifier)(EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT - 0x10); - gIdentify.mTargetEffectIdentifier = - (EmberAfIdentifyEffectIdentifier)(EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT - 0x10); - gIdentify.mEffectVariant = EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT; + gIdentify.mCurrentEffectIdentifier = Clusters::Identify::EffectIdentifierEnum::kUnknownEnumValue; + gIdentify.mTargetEffectIdentifier = Clusters::Identify::EffectIdentifierEnum::kUnknownEnumValue; + gIdentify.mEffectVariant = Clusters::Identify::EffectVariantEnum::kDefault; RestoreLightingState(); } @@ -796,29 +795,30 @@ void AppTask::OnTriggerEffect(Identify * identify) switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: timerDelay = 2; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: timerDelay = 15; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: timerDelay = 4; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "Channel Change effect not supported, using effect %d", EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Channel Change effect not supported, using effect %d", + to_underlying(Clusters::Identify::EffectIdentifierEnum::kBlink)); timerDelay = 2; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerEffectComplete, identify); timerDelay = 1; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerEffectComplete, identify); OnTriggerEffectComplete(&chip::DeviceLayer::SystemLayer(), identify); break; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 5b6589c1912c37..5d2e33735e97d8 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index e42e030d0a242d..0706d84dc0ba7d 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -5580,7 +5580,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -9113,5 +9113,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index a1b8db694c1b81..93d2ae3d78dcf4 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -90,7 +90,7 @@ StaticQueue_t sAppEventQueueStruct; StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; StaticTask_t appTaskStruct; -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; /********************************************************** @@ -100,7 +100,7 @@ chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; namespace { void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; } } // namespace @@ -108,34 +108,34 @@ void OnTriggerIdentifyEffect(Identify * identify) { sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect variant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: SystemLayer().ScheduleLambda([identify] { (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); }); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: SystemLayer().ScheduleLambda([identify] { (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, identify); }); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: SystemLayer().ScheduleLambda( [identify] { (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); }); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -146,7 +146,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerIdentifyEffect, }; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index f6ea5f41581d15..ff264ca31c0942 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index f47568b86219af..55f8020de42f72 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -6484,7 +6484,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 4f1be06178d2f3..e761595d1b69b4 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 596c95c3110925..8b08a3f5f18bb0 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -5623,7 +5623,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index ab7999f8a6127e..9ab75d756817d7 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index c119cc3e31bbda..808f47d5f92916 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -5369,7 +5369,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lighting-app/silabs/src/AppTask.cpp b/examples/lighting-app/silabs/src/AppTask.cpp index f40e13a7c01135..9194f4a1e9de08 100644 --- a/examples/lighting-app/silabs/src/AppTask.cpp +++ b/examples/lighting-app/silabs/src/AppTask.cpp @@ -50,6 +50,7 @@ #define APP_LIGHT_SWITCH 1 using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Silabs; @@ -57,7 +58,7 @@ namespace { LEDWidget sLightLED; -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; /********************************************************** * Identify Callbacks @@ -67,7 +68,7 @@ namespace { void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 AppTask::GetAppTask().StopStatusLEDTimer(); @@ -79,11 +80,11 @@ void OnTriggerIdentifyEffect(Identify * identify) { sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 @@ -92,20 +93,20 @@ void OnTriggerIdentifyEffect(Identify * identify) switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -116,7 +117,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::GetAppTask().OnIdentifyStart, AppTask::GetAppTask().OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerIdentifyEffect, }; diff --git a/examples/lighting-app/telink/README.md b/examples/lighting-app/telink/README.md index e0594e2bb84198..e9c4c5a104780c 100644 --- a/examples/lighting-app/telink/README.md +++ b/examples/lighting-app/telink/README.md @@ -84,14 +84,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | #### Indicate current state of lightbulb diff --git a/examples/lock-app/cc13x2x7_26x2x7/src/AppTask.cpp b/examples/lock-app/cc13x2x7_26x2x7/src/AppTask.cpp index 772070fc7a0eab..d4e3d8f17f42db 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/src/AppTask.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/src/AppTask.cpp @@ -59,6 +59,7 @@ #define APP_EVENT_QUEUE_SIZE 10 using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace ::chip::app::Clusters::DoorLock; @@ -95,7 +96,7 @@ void InitializeOTARequestor(void) #endif ::Identify stIdentify = { 0, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -535,23 +536,23 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Breathe identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Okay identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); IdentifyStopHandler(identify); break; diff --git a/examples/lock-app/cc13x4_26x4/src/AppTask.cpp b/examples/lock-app/cc13x4_26x4/src/AppTask.cpp index 5880c270030efa..c73fd1f3909100 100644 --- a/examples/lock-app/cc13x4_26x4/src/AppTask.cpp +++ b/examples/lock-app/cc13x4_26x4/src/AppTask.cpp @@ -58,6 +58,7 @@ #define APP_EVENT_QUEUE_SIZE 10 using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace ::chip::app::Clusters::DoorLock; @@ -94,7 +95,7 @@ void InitializeOTARequestor(void) #endif ::Identify stIdentify = { 0, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -534,23 +535,23 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Breathe identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Okay identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); IdentifyStopHandler(identify); break; diff --git a/examples/lock-app/infineon/cyw30739/src/main.cpp b/examples/lock-app/infineon/cyw30739/src/main.cpp index 551fc31e2e3052..76fa8484ce74eb 100644 --- a/examples/lock-app/infineon/cyw30739/src/main.cpp +++ b/examples/lock-app/infineon/cyw30739/src/main.cpp @@ -51,6 +51,7 @@ using chip::app::Clusters::DoorLock::OperationErrorEnum; using chip::app::Clusters::DoorLock::OperationSourceEnum; using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::Credentials; @@ -92,7 +93,7 @@ static Identify gIdentify = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, }; APPLICATION_START() diff --git a/examples/lock-app/infineon/psoc6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp index b5bd7a4edf2dcf..14d5aba533d2b1 100644 --- a/examples/lock-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -64,6 +64,7 @@ using chip::DeviceLayer::OTAImageProcessorImpl; using chip::System::Layer; using namespace ::chip; +using namespace ::chip::app; using namespace chip::TLV; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -108,6 +109,7 @@ OTAImageProcessorImpl gImageProcessor; } // namespace using namespace ::chip; +using namespace ::chip::app; using namespace chip::TLV; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -141,7 +143,7 @@ static Identify gIdentify1 = { chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE, + Clusters::Identify::IdentifyTypeEnum::kNone, }; static void InitServer(intptr_t context) diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 8106b7ef775297..1dff883478c1fd 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 47ab38a82b29bf..74a1d270b6307b 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -5479,7 +5479,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 9e59b86fcdcc4e..8acf7d6b56d325 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -79,7 +79,7 @@ K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), kAppEventQueueSize, alignof(AppE k_timer sFunctionTimer; Identify sIdentify = { kLockEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; LEDWidget sStatusLED; LEDWidget sLockLED; diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 16b6442cf56c08..7b739d821da1aa 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 7b715d27db9025..e136bca373d466 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -5580,7 +5580,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6720,5 +6720,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index 7ffd23a34d83c7..839e3b9aa8b169 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -88,7 +88,7 @@ namespace { constexpr int extDiscTimeoutSecs = 20; } -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; /********************************************************** * Identify Callbacks @@ -97,7 +97,7 @@ EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDEN namespace { void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; } } // namespace @@ -105,34 +105,34 @@ void OnTriggerIdentifyEffect(Identify * identify) { sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect variant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: SystemLayer().ScheduleLambda([identify] { (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); }); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: SystemLayer().ScheduleLambda([identify] { (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, identify); }); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: SystemLayer().ScheduleLambda( [identify] { (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); }); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -143,7 +143,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerIdentifyEffect, }; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index ba31725d568299..1e11358706766c 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index e2bea244291e8b..d12fbedf01ad1a 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -6423,7 +6423,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/lock-app/silabs/src/AppTask.cpp b/examples/lock-app/silabs/src/AppTask.cpp index cf3d1f5e40cfcc..9677a81662c88b 100644 --- a/examples/lock-app/silabs/src/AppTask.cpp +++ b/examples/lock-app/silabs/src/AppTask.cpp @@ -63,6 +63,7 @@ using chip::app::Clusters::DoorLock::OperationErrorEnum; using chip::app::Clusters::DoorLock::OperationSourceEnum; using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Silabs; using namespace ::chip::DeviceLayer::Internal; @@ -71,7 +72,7 @@ using namespace EFR32DoorLock::LockInitParams; namespace { LEDWidget sLockLED; -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; } // namespace /********************************************************** * Identify Callbacks @@ -81,7 +82,7 @@ namespace { void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 AppTask::GetAppTask().StopStatusLEDTimer(); @@ -92,11 +93,11 @@ void OnTriggerIdentifyEffect(Identify * identify) { sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 @@ -105,20 +106,20 @@ void OnTriggerIdentifyEffect(Identify * identify) switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -129,7 +130,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::GetAppTask().OnIdentifyStart, AppTask::GetAppTask().OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerIdentifyEffect, }; diff --git a/examples/lock-app/telink/README.md b/examples/lock-app/telink/README.md index 0729dfb108933e..8905d996d7f666 100755 --- a/examples/lock-app/telink/README.md +++ b/examples/lock-app/telink/README.md @@ -84,14 +84,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | #### Indicate current Lock state diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index c5cd44ecc88f36..6a99553a571ba7 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index b3801d761d70c9..f94041e2180f7f 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -5152,7 +5152,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/ota-requestor-app/telink/Readme.md b/examples/ota-requestor-app/telink/Readme.md index 7a38eb4a014bf2..00ed51bbb4182d 100755 --- a/examples/ota-requestor-app/telink/Readme.md +++ b/examples/ota-requestor-app/telink/Readme.md @@ -77,14 +77,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | ### CHIP tool commands diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 314ffe37b3b9fb..b7b0c5fbd4151d 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index e9e3dc0cfb6bc4..02c19e69b624ec 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -10987,7 +10987,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index f4482dda91563f..0f3d9c42f424b1 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 988f4171a5b6fc..843b76828465d8 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -11271,7 +11271,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/platform/silabs/SiWx917/BaseApplication.cpp b/examples/platform/silabs/SiWx917/BaseApplication.cpp index 7b0bae137b2ecd..db6ddc1b6b0bd2 100644 --- a/examples/platform/silabs/SiWx917/BaseApplication.cpp +++ b/examples/platform/silabs/SiWx917/BaseApplication.cpp @@ -71,6 +71,7 @@ #define APP_STATE_LED 0 using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Silabs; @@ -102,7 +103,7 @@ bool sHaveBLEConnections = false; #endif // CHIP_DEVICE_CONFIG_ENABLE_SED -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; StaticQueue_t sAppEventQueueStruct; @@ -306,17 +307,17 @@ void BaseApplication::LightEventHandler() { sStatusLED.Blink(250, 250); } - else if (sIdentifyEffect != EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) + else if (sIdentifyEffect != Clusters::Identify::EffectIdentifierEnum::kStopEffect) { - if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) + if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBlink) { sStatusLED.Blink(50, 50); } - if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) + if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBreathe) { sStatusLED.Blink(1000, 1000); } - if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) + if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kOkay) { sStatusLED.Blink(300, 700); } diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/efr32/BaseApplication.cpp index baf16e78cc2510..b37a3eef94704c 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/efr32/BaseApplication.cpp @@ -80,6 +80,7 @@ #define APP_FUNCTION_BUTTON 0 using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Silabs; @@ -112,7 +113,7 @@ bool sIsAttached = false; bool sHaveBLEConnections = false; #endif // CHIP_DEVICE_CONFIG_ENABLE_SED -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; StaticQueue_t sAppEventQueueStruct; @@ -342,21 +343,21 @@ void BaseApplication::LightEventHandler() sStatusLED.Blink(250, 250); #endif // ENABLE_WSTK_LEDS } - else if (sIdentifyEffect != EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) + else if (sIdentifyEffect != Clusters::Identify::EffectIdentifierEnum::kStopEffect) { - if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) + if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBlink) { #if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(50, 50); #endif // ENABLE_WSTK_LEDS } - if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) + if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBreathe) { #if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(1000, 1000); #endif // ENABLE_WSTK_LEDS } - if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) + if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kOkay) { #if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) sStatusLED.Blink(300, 700); diff --git a/examples/platform/telink/common/include/AppTaskCommon.h b/examples/platform/telink/common/include/AppTaskCommon.h index 01e02087687e08..97b87f0d3e300d 100644 --- a/examples/platform/telink/common/include/AppTaskCommon.h +++ b/examples/platform/telink/common/include/AppTaskCommon.h @@ -62,7 +62,7 @@ class AppTaskCommon CHIP_ERROR StartApp(); void PostEvent(AppEvent * event); - static void IdentifyEffectHandler(EmberAfIdentifyEffectIdentifier aEffect); + static void IdentifyEffectHandler(Clusters::Identify::EffectIdentifierEnum aEffect); protected: CHIP_ERROR InitCommonParts(void); diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index c49222db1a782e..4297d3ae3d4bad 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -38,6 +38,8 @@ #include #endif +using namespace chip::app; + LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); namespace { @@ -98,7 +100,7 @@ Identify sIdentify = { kExampleEndpointId, [](Identify *) { ChipLogProgress(Zcl, "OnIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "OnIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnIdentifyTriggerEffect, }; #endif @@ -346,45 +348,45 @@ void AppTaskCommon::UpdateIdentifyStateEventHandler(AppEvent * aEvent) GetAppTask().mPwmIdentifyLed.UpdateAction(); } -void AppTaskCommon::IdentifyEffectHandler(EmberAfIdentifyEffectIdentifier aEffect) +void AppTaskCommon::IdentifyEffectHandler(Clusters::Identify::EffectIdentifierEnum aEffect) { AppEvent event; event.Type = AppEvent::kEventType_IdentifyStart; switch (aEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); event.Handler = [](AppEvent *) { GetAppTask().mPwmIdentifyLed.InitiateBlinkAction(kIdentifyBlinkRateMs, kIdentifyBlinkRateMs); }; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); event.Handler = [](AppEvent *) { GetAppTask().mPwmIdentifyLed.InitiateBreatheAction(PWMDevice::kBreatheType_Both, kIdentifyBreatheRateMs); }; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); event.Handler = [](AppEvent *) { GetAppTask().mPwmIdentifyLed.InitiateBlinkAction(kIdentifyOkayOnRateMs, kIdentifyOkayOffRateMs); }; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); event.Handler = [](AppEvent *) { GetAppTask().mPwmIdentifyLed.InitiateBlinkAction(kIdentifyChannelChangeRateMs, kIdentifyChannelChangeRateMs); }; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT"); + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kFinishEffect"); event.Handler = [](AppEvent *) { GetAppTask().mPwmIdentifyLed.InitiateBlinkAction(kIdentifyFinishOnRateMs, kIdentifyFinishOffRateMs); }; break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT"); + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kStopEffect"); event.Handler = [](AppEvent *) { GetAppTask().mPwmIdentifyLed.StopAction(); }; event.Type = AppEvent::kEventType_IdentifyStop; break; diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index 4514cd7cd8b8d8..2dfecb65a11bc0 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -105,7 +105,7 @@ static const chip::EndpointId sIdentifyEndpointId = 0; static const uint32_t sIdentifyBlinkRateMs = 500; ::Identify stIdentify = { sIdentifyEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -649,23 +649,23 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Breathe identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Okay identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); IdentifyStopHandler(identify); break; diff --git a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp index 8b03138ae7513c..b5be215216a4bf 100644 --- a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp @@ -106,7 +106,7 @@ static const chip::EndpointId sIdentifyEndpointId = 0; static const uint32_t sIdentifyBlinkRateMs = 500; ::Identify stIdentify = { sIdentifyEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -650,23 +650,23 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Breathe identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Okay identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); IdentifyStopHandler(identify); break; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 452de8a05b5fac..c1791c3fdfbe72 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 4e72e203996556..de1eb19e862422 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -93,7 +93,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5722,7 +5722,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7985,5 +7985,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-app/telink/README.md b/examples/pump-app/telink/README.md index 1281b6972ccdb6..b1e923856b2588 100755 --- a/examples/pump-app/telink/README.md +++ b/examples/pump-app/telink/README.md @@ -85,14 +85,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | #### Indicate current Pump state diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp index 8c4e51f44431fd..fa5d85eaa6e42e 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -56,6 +56,7 @@ #define APP_EVENT_QUEUE_SIZE 10 using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -93,7 +94,7 @@ static const chip::EndpointId sIdentifyEndpointId = 0; static const uint32_t sIdentifyBlinkRateMs = 500; ::Identify stIdentify = { sIdentifyEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -435,23 +436,23 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Breathe identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Okay identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); IdentifyStopHandler(identify); break; diff --git a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp index e2470d3375ab45..51ef817cff14ac 100644 --- a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp @@ -56,6 +56,7 @@ #define APP_EVENT_QUEUE_SIZE 10 using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -93,7 +94,7 @@ static const chip::EndpointId sIdentifyEndpointId = 0; static const uint32_t sIdentifyBlinkRateMs = 500; ::Identify stIdentify = { sIdentifyEndpointId, AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, AppTask::TriggerIdentifyEffectHandler }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, AppTask::TriggerIdentifyEffectHandler }; int AppTask::StartAppTask() { @@ -435,23 +436,23 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case Clusters::Identify::EffectIdentifierEnum::kBlink: PLAT_LOG("Starting blink identifier effect"); IdentifyStartHandler(identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: PLAT_LOG("Breathe identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kOkay: PLAT_LOG("Okay identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: PLAT_LOG("Channel Change identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: PLAT_LOG("Finish identifier effect not implemented"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: PLAT_LOG("Stop identifier effect"); IdentifyStopHandler(identify); break; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index b25fd06a2c89e4..a5f22c5343be9f 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index de7f015f0e2614..2c493074d018fe 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -111,7 +111,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5670,7 +5670,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6813,5 +6813,6 @@ "endpointVersion": 1, "deviceIdentifier": 772 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-controller-app/telink/README.md b/examples/pump-controller-app/telink/README.md index 3ea6b0413e241b..1f3cd0130f248a 100755 --- a/examples/pump-controller-app/telink/README.md +++ b/examples/pump-controller-app/telink/README.md @@ -86,14 +86,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | #### Indicate current Pump state diff --git a/examples/thermostat/linux/main.cpp b/examples/thermostat/linux/main.cpp index 16b6dadec9e175..34c4cc9777dd16 100644 --- a/examples/thermostat/linux/main.cpp +++ b/examples/thermostat/linux/main.cpp @@ -50,17 +50,17 @@ void OnTriggerEffect(Identify * identify) { switch (identify->mCurrentEffectIdentifier) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK"); + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE"); + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY"); + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - ChipLogProgress(Zcl, "EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE"); + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -69,11 +69,13 @@ void OnTriggerEffect(Identify * identify) } static Identify gIdentify0 = { - chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 0 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; static Identify gIdentify1 = { - chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, OnTriggerEffect, + chip::EndpointId{ 1 }, OnIdentifyStart, OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerEffect, }; void ApplicationInit() diff --git a/examples/thermostat/silabs/src/AppTask.cpp b/examples/thermostat/silabs/src/AppTask.cpp index 2e506d1658223c..b191874bdf799e 100644 --- a/examples/thermostat/silabs/src/AppTask.cpp +++ b/examples/thermostat/silabs/src/AppTask.cpp @@ -60,6 +60,7 @@ #define MODE_TIMER 1000 // 1s timer period using namespace chip; +using namespace chip::app; using namespace chip::TLV; using namespace ::chip::DeviceLayer; @@ -67,8 +68,7 @@ using namespace ::chip::DeviceLayer; * Variable declarations *********************************************************/ namespace { -EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; - +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; } /********************************************************** * Identify Callbacks @@ -78,7 +78,7 @@ namespace { void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) { ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 AppTask::GetAppTask().StopStatusLEDTimer(); @@ -90,11 +90,11 @@ void OnTriggerIdentifyEffect(Identify * identify) ChipLogProgress(Zcl, "Trigger Identify Effect"); sIdentifyEffect = identify->mCurrentEffectIdentifier; - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } #if CHIP_DEVICE_CONFIG_ENABLE_SED == 1 @@ -103,20 +103,20 @@ void OnTriggerIdentifyEffect(Identify * identify) switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; break; default: ChipLogProgress(Zcl, "No identifier effect"); @@ -127,7 +127,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::GetAppTask().OnIdentifyStart, AppTask::GetAppTask().OnIdentifyStop, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerIdentifyEffect, }; diff --git a/examples/thermostat/telink/Readme.md b/examples/thermostat/telink/Readme.md index bba0bb64e465b3..c8c306bda9d73b 100755 --- a/examples/thermostat/telink/Readme.md +++ b/examples/thermostat/telink/Readme.md @@ -81,14 +81,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | ### CHIP tool commands diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index d41bcfa773637d..a314a026656bec 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ client cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ client cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ client cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } /** Command description for Identify */ @@ -61,7 +61,7 @@ client cluster Identify = 3 { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -70,21 +70,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -97,8 +97,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index ac3396126e097f..38a43665b9817b 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -7707,7 +7707,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index f7fca99f362288..3e6fd12e239eec 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 4e5d9b9a91f062..1f4e5c2ce8a36b 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -7130,7 +7130,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index 9adafad1e28357..788917be683f03 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -25,8 +25,10 @@ #include #include +using namespace chip; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; +using namespace chip::app; using namespace chip::app::Clusters::WindowCovering; inline void OnTriggerEffectCompleted(chip::System::Layer * systemLayer, void * appState) @@ -36,27 +38,27 @@ inline void OnTriggerEffectCompleted(chip::System::Layer * systemLayer, void * a void OnTriggerEffect(Identify * identify) { - EmberAfIdentifyEffectIdentifier sIdentifyEffect = identify->mCurrentEffectIdentifier; + Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = identify->mCurrentEffectIdentifier; ChipLogProgress(Zcl, "IDENTFY OnTriggerEffect"); - if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + if (identify->mCurrentEffectIdentifier == Clusters::Identify::EffectIdentifierEnum::kChannelChange) { ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect varriant %d", - identify->mEffectVariant); - sIdentifyEffect = static_cast(identify->mEffectVariant); + to_underlying(identify->mEffectVariant)); + sIdentifyEffect = static_cast(identify->mEffectVariant); } switch (sIdentifyEffect) { - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: WindowApp::Instance().PostEvent(WindowApp::EventId::WinkOn); (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerEffectCompleted, identify); break; - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerEffectCompleted, identify); break; default: @@ -68,7 +70,7 @@ Identify gIdentify = { chip::EndpointId{ 1 }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, OnTriggerEffect, }; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index ce1cc426719bff..9b19d19aba3980 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ server cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ server cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 0a1727bf24b0af..d01a811832ce27 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -111,7 +111,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6305,7 +6305,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7841,7 +7841,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index 280f63316a669c..fca63e3176a409 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -46,6 +46,7 @@ LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); using namespace ::chip; +using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; namespace { @@ -62,7 +63,7 @@ uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; Identify sIdentify = { WindowCovering::Endpoint(), AppTask::IdentifyStartHandler, AppTask::IdentifyStopHandler, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED }; + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; LEDWidget sStatusLED; LEDWidget sIdentifyLED; diff --git a/examples/window-app/telink/README.md b/examples/window-app/telink/README.md index b2e7d3df219243..a19defc822f1a4 100644 --- a/examples/window-app/telink/README.md +++ b/examples/window-app/telink/README.md @@ -89,14 +89,14 @@ following states: Identify command of the Identify cluster is received. The command's argument can be used to specify the the effect. It is able to be in following effects: -| Effect | Description | -| :------------------------------ | :------------------------------------------------------------------- | -| Blinks (200 ms on/200 ms off) | Blink (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) | -| Breathe (during 1000 ms) | Breathe (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) | -| Blinks (50 ms on/950 ms off) | Okay (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) | -| Blinks (1000 ms on/1000 ms off) | Channel Change (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) | -| Blinks (950 ms on/50 ms off) | Finish (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT) | -| LED off | Stop (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT) | +| Effect | Description | +| :------------------------------ | :--------------------------------------------------------------------------- | +| Blinks (200 ms on/200 ms off) | Blink (`Clusters::Identify::EffectIdentifierEnum::kBlink`) | +| Breathe (during 1000 ms) | Breathe (`Clusters::Identify::EffectIdentifierEnum::kBreathe`) | +| Blinks (50 ms on/950 ms off) | Okay (`Clusters::Identify::EffectIdentifierEnum::kOkay`) | +| Blinks (1000 ms on/1000 ms off) | Channel Change ( `Clusters::Identify::EffectIdentifierEnum::kChannelChange`) | +| Blinks (950 ms on/50 ms off) | Finish ( `Clusters::Identify::EffectIdentifierEnum::kFinishEffect`) | +| LED off | Stop (`Clusters::Identify::EffectIdentifierEnum::kStopEffect`) | ### CHIP tool commands diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index cab21dcfae2818..10fad2786a1a60 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -111,7 +111,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8801,7 +8801,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -24919,5 +24919,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index af9592fe1d6539..13b609841cc616 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -5484,7 +5484,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8309,5 +8309,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/src/app/clusters/identify-server/identify-server.cpp b/src/app/clusters/identify-server/identify-server.cpp index 15da36a48077fa..e60b89d7d6931b 100644 --- a/src/app/clusters/identify-server/identify-server.cpp +++ b/src/app/clusters/identify-server/identify-server.cpp @@ -18,7 +18,6 @@ #include "identify-server.h" #include -#include #include #include #include @@ -37,10 +36,6 @@ #error "identify requrires a device layer" #endif -#ifndef emberAfIdentifyClusterPrintln -#define emberAfIdentifyClusterPrintln(...) ChipLogProgress(Zcl, __VA_ARGS__); -#endif - using namespace chip; using namespace chip::app; using namespace chip::app::Clusters::Identify; @@ -96,7 +91,7 @@ void emberAfIdentifyClusterServerInitCallback(EndpointId endpoint) Identify * identify = inst(endpoint); if (identify != nullptr) { - (void) Clusters::Identify::Attributes::IdentifyType::Set(endpoint, identify->mIdentifyType); + (void) Attributes::IdentifyType::Set(endpoint, identify->mIdentifyType); } } @@ -109,13 +104,12 @@ static void onIdentifyClusterTick(chip::System::Layer * systemLayer, void * appS { EndpointId endpoint = identify->mEndpoint; - if (EMBER_ZCL_STATUS_SUCCESS == Clusters::Identify::Attributes::IdentifyTime::Get(endpoint, &identifyTime) && - 0 != identifyTime) + if (EMBER_ZCL_STATUS_SUCCESS == Attributes::IdentifyTime::Get(endpoint, &identifyTime) && 0 != identifyTime) { identifyTime = static_cast(identifyTime == 0 ? 0 : identifyTime - 1); // This tick writes the new attribute, which will trigger the Attribute // Changed callback. - (void) Clusters::Identify::Attributes::IdentifyTime::Set(endpoint, identifyTime); + (void) Attributes::IdentifyTime::Set(endpoint, identifyTime); } } } @@ -140,7 +134,7 @@ static inline void identify_deactivate(Identify * identify) void MatterIdentifyClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath) { - if (attributePath.mAttributeId == Clusters::Identify::Attributes::IdentifyTime::Id) + if (attributePath.mAttributeId == Attributes::IdentifyTime::Id) { EndpointId endpoint = attributePath.mEndpointId; Identify * identify = inst(endpoint); @@ -151,7 +145,7 @@ void MatterIdentifyClusterServerAttributeChangedCallback(const app::ConcreteAttr return; } - if (EMBER_ZCL_STATUS_SUCCESS == Clusters::Identify::Attributes::IdentifyTime::Get(endpoint, &identifyTime)) + if (EMBER_ZCL_STATUS_SUCCESS == Attributes::IdentifyTime::Get(endpoint, &identifyTime)) { /* effect identifier changed during identify */ if (identify->mTargetEffectIdentifier != identify->mCurrentEffectIdentifier) @@ -159,21 +153,21 @@ void MatterIdentifyClusterServerAttributeChangedCallback(const app::ConcreteAttr identify->mCurrentEffectIdentifier = identify->mTargetEffectIdentifier; /* finish identify process */ - if (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT == identify->mCurrentEffectIdentifier && identifyTime > 0) + if (EffectIdentifierEnum::kFinishEffect == identify->mCurrentEffectIdentifier && identifyTime > 0) { - Clusters::Identify::Attributes::IdentifyTime::Set(endpoint, 1); + Attributes::IdentifyTime::Set(endpoint, 1); } /* stop identify process */ - if (EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT == identify->mCurrentEffectIdentifier && identifyTime > 0) + if (EffectIdentifierEnum::kStopEffect == identify->mCurrentEffectIdentifier && identifyTime > 0) { - Clusters::Identify::Attributes::IdentifyTime::Set(endpoint, 0); + Attributes::IdentifyTime::Set(endpoint, 0); identify_deactivate(identify); } /* change from e.g. Breathe to Blink during identify */ else { /* cancel identify */ - Clusters::Identify::Attributes::IdentifyTime::Set(endpoint, 0); + Attributes::IdentifyTime::Set(endpoint, 0); identify_deactivate(identify); /* trigger effect identifier callback */ @@ -199,7 +193,7 @@ void MatterIdentifyClusterServerAttributeChangedCallback(const app::ConcreteAttr } } -bool emberAfIdentifyClusterIdentifyCallback(CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, +bool emberAfIdentifyClusterIdentifyCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::Identify::DecodableType & commandData) { auto & identifyTime = commandData.identifyTime; @@ -210,7 +204,7 @@ bool emberAfIdentifyClusterIdentifyCallback(CommandHandler * commandObj, const a return true; } -bool emberAfIdentifyClusterTriggerEffectCallback(CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, +bool emberAfIdentifyClusterTriggerEffectCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::TriggerEffect::DecodableType & commandData) { auto & effectIdentifier = commandData.effectIdentifier; @@ -219,23 +213,23 @@ bool emberAfIdentifyClusterTriggerEffectCallback(CommandHandler * commandObj, co EndpointId endpoint = commandPath.mEndpointId; // cmd TriggerEffect - Identify * identify = inst(endpoint); - uint16_t identifyTime = 0; - EmberAfIdentifyEffectIdentifier effectId = static_cast(effectIdentifier); + Identify * identify = inst(endpoint); + uint16_t identifyTime = 0; - emberAfIdentifyClusterPrintln("RX identify:trigger effect 0x%X variant 0x%X", effectId, effectVariant); + ChipLogProgress(Zcl, "RX identify:trigger effect identifier 0x%X variant 0x%X", to_underlying(effectIdentifier), + to_underlying(effectVariant)); if (identify == nullptr) { return false; } - identify->mTargetEffectIdentifier = effectId; + identify->mTargetEffectIdentifier = effectIdentifier; identify->mEffectVariant = effectVariant; /* only call the callback if no identify is in progress */ if (nullptr != identify->mOnEffectIdentifier && - EMBER_ZCL_STATUS_SUCCESS == Clusters::Identify::Attributes::IdentifyTime::Get(endpoint, &identifyTime) && 0 == identifyTime) + EMBER_ZCL_STATUS_SUCCESS == Attributes::IdentifyTime::Get(endpoint, &identifyTime) && 0 == identifyTime) { identify->mCurrentEffectIdentifier = identify->mTargetEffectIdentifier; identify->mOnEffectIdentifier(identify); @@ -245,13 +239,13 @@ bool emberAfIdentifyClusterTriggerEffectCallback(CommandHandler * commandObj, co return true; } -Identify::Identify(chip::EndpointId endpoint, onIdentifyStartCb onIdentifyStart, onIdentifyStopCb onIdentifyStop, - EmberAfIdentifyIdentifyType identifyType, onEffectIdentifierCb onEffectIdentifier, - EmberAfIdentifyEffectIdentifier effectIdentifier, EmberAfIdentifyEffectVariant effectVariant) : +Identify::Identify(EndpointId endpoint, onIdentifyStartCb onIdentifyStart, onIdentifyStopCb onIdentifyStop, + IdentifyTypeEnum identifyType, onEffectIdentifierCb onEffectIdentifier, EffectIdentifierEnum effectIdentifier, + EffectVariantEnum effectVariant) : mEndpoint(endpoint), mOnIdentifyStart(onIdentifyStart), mOnIdentifyStop(onIdentifyStop), mIdentifyType(identifyType), mOnEffectIdentifier(onEffectIdentifier), mCurrentEffectIdentifier(effectIdentifier), mTargetEffectIdentifier(effectIdentifier), - mEffectVariant(static_cast(effectVariant)) + mEffectVariant(effectVariant) { reg(this); }; diff --git a/src/app/clusters/identify-server/identify-server.h b/src/app/clusters/identify-server/identify-server.h index 355c59914e42b5..8ada9e2f80ae36 100644 --- a/src/app/clusters/identify-server/identify-server.h +++ b/src/app/clusters/identify-server/identify-server.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include struct Identify @@ -45,19 +45,21 @@ struct Identify * @param effectVariant if supported by the app, initial effect variant */ Identify(chip::EndpointId endpoint, onIdentifyStartCb onIdentifyStart, onIdentifyStopCb onIdentifyStop, - EmberAfIdentifyIdentifyType identifyType, onEffectIdentifierCb onEffectIdentifier = nullptr, - EmberAfIdentifyEffectIdentifier effectIdentifier = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK, - EmberAfIdentifyEffectVariant effectVariant = EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT); + chip::app::Clusters::Identify::IdentifyTypeEnum identifyType, onEffectIdentifierCb onEffectIdentifier = nullptr, + chip::app::Clusters::Identify::EffectIdentifierEnum effectIdentifier = + chip::app::Clusters::Identify::EffectIdentifierEnum::kBlink, + chip::app::Clusters::Identify::EffectVariantEnum effectVariant = + chip::app::Clusters::Identify::EffectVariantEnum::kDefault); ~Identify(); chip::EndpointId mEndpoint; onIdentifyStartCb mOnIdentifyStart = nullptr; onIdentifyStopCb mOnIdentifyStop = nullptr; - EmberAfIdentifyIdentifyType mIdentifyType; + chip::app::Clusters::Identify::IdentifyTypeEnum mIdentifyType; onEffectIdentifierCb mOnEffectIdentifier; - EmberAfIdentifyEffectIdentifier mCurrentEffectIdentifier; - EmberAfIdentifyEffectIdentifier mTargetEffectIdentifier; - uint8_t mEffectVariant; + chip::app::Clusters::Identify::EffectIdentifierEnum mCurrentEffectIdentifier; + chip::app::Clusters::Identify::EffectIdentifierEnum mTargetEffectIdentifier; + chip::app::Clusters::Identify::EffectVariantEnum mEffectVariant; bool mActive = false; Identify * nextIdentify = nullptr; diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index 91350c656263d4..1d73fff9b0bcfe 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -6,9 +6,6 @@ WeakEnums: - ColorControlOptions - ColorMode - EnhancedColorMode - - IdentifyEffectIdentifier - - IdentifyEffectVariant - - IdentifyIdentifyType - InterfaceTypeEnum - MoveMode - NetworkFaultEnum diff --git a/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml index f2b4ab7728197d..3348e15ce25731 100644 --- a/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml @@ -17,17 +17,17 @@ limitations under the License. - + - - + + - + @@ -37,22 +37,24 @@ limitations under the License. - + - Identify General - Attributes and commands for putting a device into Identification mode (e.g. flashing a light). + Identify 0x0003 IDENTIFY_CLUSTER + Attributes and commands for putting a device into Identification mode (e.g. flashing a light). true true + IdentifyTime - IdentifyType + IdentifyType + Command description for Identify @@ -64,8 +66,8 @@ limitations under the License. Command description for TriggerEffect - - + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 38e18118dda02e..c05b40f65022c3 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -13,7 +13,7 @@ struct LabelStruct { /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ client cluster Identify = 3 { - enum IdentifyEffectIdentifier : ENUM8 { + enum EffectIdentifierEnum : ENUM8 { kBlink = 0; kBreathe = 1; kOkay = 2; @@ -22,21 +22,21 @@ client cluster Identify = 3 { kStopEffect = 255; } - enum IdentifyEffectVariant : ENUM8 { + enum EffectVariantEnum : ENUM8 { kDefault = 0; } - enum IdentifyIdentifyType : ENUM8 { + enum IdentifyTypeEnum : ENUM8 { kNone = 0; - kVisibleLight = 1; - kVisibleLED = 2; + kLightOutput = 1; + kVisibleIndicator = 2; kAudibleBeep = 3; kDisplay = 4; kActuator = 5; } attribute int16u identifyTime = 0; - readonly attribute enum8 identifyType = 1; + readonly attribute IdentifyTypeEnum identifyType = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -49,8 +49,8 @@ client cluster Identify = 3 { } request struct TriggerEffectRequest { - IdentifyEffectIdentifier effectIdentifier = 0; - IdentifyEffectVariant effectVariant = 1; + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; } /** Command description for Identify */ diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 3b756b734ab327..e57bcc59fae969 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -111,7 +111,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index e2af6586dda469..da4acdf1eeb54d 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -68,7 +68,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + static_cast(cppValue), value); return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index be562eb2bb5956..4960641ad7c615 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -46,7 +46,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="identifyTime", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="identifyType", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="identifyType", Tag=0x00000001, Type=Identify.Enums.IdentifyTypeEnum), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -56,7 +56,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) identifyTime: 'uint' = None - identifyType: 'uint' = None + identifyType: 'Identify.Enums.IdentifyTypeEnum' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -65,7 +65,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class IdentifyEffectIdentifier(MatterIntEnum): + class EffectIdentifierEnum(MatterIntEnum): kBlink = 0x00 kBreathe = 0x01 kOkay = 0x02 @@ -78,7 +78,7 @@ class IdentifyEffectIdentifier(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 3, - class IdentifyEffectVariant(MatterIntEnum): + class EffectVariantEnum(MatterIntEnum): kDefault = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only @@ -86,10 +86,10 @@ class IdentifyEffectVariant(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 1, - class IdentifyIdentifyType(MatterIntEnum): + class IdentifyTypeEnum(MatterIntEnum): kNone = 0x00 - kVisibleLight = 0x01 - kVisibleLED = 0x02 + kLightOutput = 0x01 + kVisibleIndicator = 0x02 kAudibleBeep = 0x03 kDisplay = 0x04 kActuator = 0x05 @@ -127,12 +127,12 @@ class TriggerEffect(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="effectIdentifier", Tag=0, Type=Identify.Enums.IdentifyEffectIdentifier), - ClusterObjectFieldDescriptor(Label="effectVariant", Tag=1, Type=Identify.Enums.IdentifyEffectVariant), + ClusterObjectFieldDescriptor(Label="effectIdentifier", Tag=0, Type=Identify.Enums.EffectIdentifierEnum), + ClusterObjectFieldDescriptor(Label="effectVariant", Tag=1, Type=Identify.Enums.EffectVariantEnum), ]) - effectIdentifier: 'Identify.Enums.IdentifyEffectIdentifier' = 0 - effectVariant: 'Identify.Enums.IdentifyEffectVariant' = 0 + effectIdentifier: 'Identify.Enums.EffectIdentifierEnum' = 0 + effectVariant: 'Identify.Enums.EffectVariantEnum' = 0 class Attributes: @dataclass @@ -163,9 +163,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=Identify.Enums.IdentifyTypeEnum) - value: 'uint' = 0 + value: 'Identify.Enums.IdentifyTypeEnum' = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 0fb1ae655d04a1..e8c48538eebe59 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -52,7 +52,7 @@ static id _Nullable DecodeAttributeValueForIdentifyCluster(AttributeId aAttribut return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index e391f1af69cc02..d03181eea53726 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -29980,26 +29980,26 @@ MTR_DEPRECATED("Please use MTRBaseClusterUnitTesting", ios(16.1, 16.4), macos(13 @end typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { - MTRIdentifyEffectIdentifierBlink API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRIdentifyEffectIdentifierBreathe API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRIdentifyEffectIdentifierOkay API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRIdentifyEffectIdentifierChannelChange API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRIdentifyEffectIdentifierFinishEffect API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFE, - MTRIdentifyEffectIdentifierStopEffect API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRIdentifyEffectIdentifierBlink MTR_NEWLY_AVAILABLE = 0x00, + MTRIdentifyEffectIdentifierBreathe MTR_NEWLY_AVAILABLE = 0x01, + MTRIdentifyEffectIdentifierOkay MTR_NEWLY_AVAILABLE = 0x02, + MTRIdentifyEffectIdentifierChannelChange MTR_NEWLY_AVAILABLE = 0x0B, + MTRIdentifyEffectIdentifierFinishEffect MTR_NEWLY_AVAILABLE = 0xFE, + MTRIdentifyEffectIdentifierStopEffect MTR_NEWLY_AVAILABLE = 0xFF, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRIdentifyEffectVariant) { - MTRIdentifyEffectVariantDefault API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRIdentifyEffectVariantDefault MTR_NEWLY_AVAILABLE = 0x00, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRIdentifyType) { - MTRIdentifyTypeNone API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRIdentifyTypeVisibleLight API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRIdentifyTypeVisibleLED API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRIdentifyTypeAudibleBeep API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRIdentifyTypeDisplay API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRIdentifyTypeActuator API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRIdentifyTypeNone MTR_NEWLY_AVAILABLE = 0x00, + MTRIdentifyTypeLightOutput MTR_NEWLY_AVAILABLE = 0x01, + MTRIdentifyTypeVisibleIndicator MTR_NEWLY_AVAILABLE = 0x02, + MTRIdentifyTypeAudibleBeep MTR_NEWLY_AVAILABLE = 0x03, + MTRIdentifyTypeDisplay MTR_NEWLY_AVAILABLE = 0x04, + MTRIdentifyTypeActuator MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRGroupsFeature) { MTRGroupsFeatureGroupNames MTR_NEWLY_AVAILABLE = 0x1, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 7fc1afd8491358..4664c58f278284 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -217,7 +217,7 @@ - (void)readAttributeIdentifyTypeWithCompletion:(void (^)(NSNumber * _Nullable v { MTRReadParams * params = [[MTRReadParams alloc] init]; using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - return MTRReadAttribute( + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -226,8 +226,8 @@ - (void)subscribeAttributeIdentifyTypeWithParams:(MTRSubscribeParams * _Nonnull) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -236,9 +236,9 @@ + (void)readAttributeIdentifyTypeWithClusterStateCache:(MTRClusterStateCacheCont queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(IdentifyClusterIdentifyTypeEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index f83676e20b7686..7affdabb92dffc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -138,16 +138,15 @@ typedef void (*UnitTestingClusterTestEmitTestEventResponseCallbackType)( typedef void (*UnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackType)( void *, const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType &); -typedef void (*IdentifyClusterIdentifyEffectIdentifierAttributeCallback)(void *, - chip::app::Clusters::Identify::IdentifyEffectIdentifier); -typedef void (*NullableIdentifyClusterIdentifyEffectIdentifierAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*IdentifyClusterIdentifyEffectVariantAttributeCallback)(void *, chip::app::Clusters::Identify::IdentifyEffectVariant); -typedef void (*NullableIdentifyClusterIdentifyEffectVariantAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); -typedef void (*IdentifyClusterIdentifyIdentifyTypeAttributeCallback)(void *, chip::app::Clusters::Identify::IdentifyIdentifyType); -typedef void (*NullableIdentifyClusterIdentifyIdentifyTypeAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*IdentifyClusterEffectIdentifierEnumAttributeCallback)(void *, chip::app::Clusters::Identify::EffectIdentifierEnum); +typedef void (*NullableIdentifyClusterEffectIdentifierEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*IdentifyClusterEffectVariantEnumAttributeCallback)(void *, chip::app::Clusters::Identify::EffectVariantEnum); +typedef void (*NullableIdentifyClusterEffectVariantEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*IdentifyClusterIdentifyTypeEnumAttributeCallback)(void *, chip::app::Clusters::Identify::IdentifyTypeEnum); +typedef void (*NullableIdentifyClusterIdentifyTypeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*OnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallback)( void *, chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant); typedef void (*NullableOnOffClusterOnOffDelayedAllOffEffectVariantAttributeCallback)( @@ -22582,202 +22581,202 @@ class MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseCallbackBridge const chip::app::Clusters::UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data); }; -class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyEffectIdentifier value); + static void OnSuccessFn(void * context, chip::app::Clusters::Identify::EffectIdentifierEnum value); }; -class MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge - : public MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge +class MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge + : public MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, handler, action), + MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnDone; + using MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge - : public MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge +class MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge + : public MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge( + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge(queue, handler, action), + MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnDone; + using MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyEffectVariant value); + static void OnSuccessFn(void * context, chip::app::Clusters::Identify::EffectVariantEnum value); }; -class MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge - : public MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge +class MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge + : public MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge { public: - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, handler, action), + MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnDone; + using MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge - : public MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge +class MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge + : public MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge( + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge(queue, handler, action), + MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnDone; + using MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyIdentifyType value); + static void OnSuccessFn(void * context, chip::app::Clusters::Identify::IdentifyTypeEnum value); }; -class MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge - : public MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge +class MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge + : public MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge { public: - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, handler, action), + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnDone; + using MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + const chip::app::DataModel::Nullable & value); }; -class MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge - : public MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge +class MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge { public: - MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge( + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge(queue, handler, action), + MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnDone; + using MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 0af7803ae6db98..c830740e0e732a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -22779,15 +22779,15 @@ DispatchSuccess(context, response); }; -void MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Identify::IdentifyEffectIdentifier value) +void MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Identify::EffectIdentifierEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22802,8 +22802,8 @@ } } -void MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22814,7 +22814,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIdentifyClusterIdentifyEffectIdentifierAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableIdentifyClusterEffectIdentifierEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22829,15 +22829,15 @@ } } -void MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Identify::IdentifyEffectVariant value) +void MTRIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Identify::EffectVariantEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22852,8 +22852,8 @@ } } -void MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22864,7 +22864,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIdentifyClusterIdentifyEffectVariantAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableIdentifyClusterEffectVariantEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22879,15 +22879,15 @@ } } -void MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::Identify::IdentifyIdentifyType value) +void MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::Identify::IdentifyTypeEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTRIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -22902,8 +22902,8 @@ } } -void MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::Nullable & value) +void MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -22914,7 +22914,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableIdentifyClusterIdentifyIdentifyTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableIdentifyClusterIdentifyTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 8ea0385f104205..ac7008e0f93553 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -71,9 +71,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace IdentifyType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Identify::Id, Id, readable, sizeof(temp)); @@ -85,9 +85,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index e416ce78df48a7..8885bdcfb3694c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -42,8 +42,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace IdentifyTime namespace IdentifyType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum * value); // IdentifyTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value); } // namespace IdentifyType namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 834e4d55d93e62..221d18e5e7b70d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -24,72 +24,44 @@ namespace chip { namespace app { namespace Clusters { -static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::IdentifyEffectIdentifier val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::EffectIdentifierEnum val) { - using EnumType = Identify::IdentifyEffectIdentifier; + using EnumType = Identify::EffectIdentifierEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kBlink: case EnumType::kBreathe: case EnumType::kOkay: case EnumType::kChannelChange: case EnumType::kFinishEffect: case EnumType::kStopEffect: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: - case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(3); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::IdentifyEffectVariant val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::EffectVariantEnum val) { - using EnumType = Identify::IdentifyEffectVariant; + using EnumType = Identify::EffectVariantEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kDefault: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(1); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::IdentifyIdentifyType val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Identify::IdentifyTypeEnum val) { - using EnumType = Identify::IdentifyIdentifyType; + using EnumType = Identify::IdentifyTypeEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kNone: - case EnumType::kVisibleLight: - case EnumType::kVisibleLED: + case EnumType::kLightOutput: + case EnumType::kVisibleIndicator: case EnumType::kAudibleBeep: case EnumType::kDisplay: case EnumType::kActuator: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE: - case EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LIGHT: - case EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED: - case EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_AUDIBLE_BEEP: - case EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_DISPLAY: - case EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_ACTUATOR: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(6); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index fb54bf04129adf..2f371669f1657a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -29,11 +29,8 @@ namespace Clusters { namespace Identify { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for IdentifyEffectIdentifier -enum class IdentifyEffectIdentifier : uint8_t +// Enum for EffectIdentifierEnum +enum class EffectIdentifierEnum : uint8_t { kBlink = 0x00, kBreathe = 0x01, @@ -47,17 +44,9 @@ enum class IdentifyEffectIdentifier : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 3, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyEffectIdentifier = EmberAfIdentifyEffectIdentifier; -static IdentifyEffectIdentifier __attribute__((unused)) kIdentifyEffectIdentifierkUnknownEnumValue = - static_cast(3); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for IdentifyEffectVariant -enum class IdentifyEffectVariant : uint8_t +// Enum for EffectVariantEnum +enum class EffectVariantEnum : uint8_t { kDefault = 0x00, // All received enum values that are not listed above will be mapped @@ -66,34 +55,22 @@ enum class IdentifyEffectVariant : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 1, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyEffectVariant = EmberAfIdentifyEffectVariant; -static IdentifyEffectVariant __attribute__((unused)) kIdentifyEffectVariantkUnknownEnumValue = - static_cast(1); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -// Enum for IdentifyIdentifyType -enum class IdentifyIdentifyType : uint8_t +// Enum for IdentifyTypeEnum +enum class IdentifyTypeEnum : uint8_t { - kNone = 0x00, - kVisibleLight = 0x01, - kVisibleLED = 0x02, - kAudibleBeep = 0x03, - kDisplay = 0x04, - kActuator = 0x05, + kNone = 0x00, + kLightOutput = 0x01, + kVisibleIndicator = 0x02, + kAudibleBeep = 0x03, + kDisplay = 0x04, + kActuator = 0x05, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. kUnknownEnumValue = 6, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyIdentifyType = EmberAfIdentifyIdentifyType; -static IdentifyIdentifyType __attribute__((unused)) kIdentifyIdentifyTypekUnknownEnumValue = static_cast(6); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM } // namespace Identify namespace Groups { @@ -209,8 +186,8 @@ enum class MoveMode : uint8_t kUnknownEnumValue = 2, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MoveMode = EmberAfMoveMode; -static MoveMode __attribute__((unused)) kMoveModekUnknownEnumValue = static_cast(2); +using MoveMode = EmberAfMoveMode; +static MoveMode __attribute__((unused)) kMoveModekUnknownEnumValue = static_cast(2); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Need to convert consumers to using the new enum classes, so we @@ -228,8 +205,8 @@ enum class StepMode : uint8_t kUnknownEnumValue = 2, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using StepMode = EmberAfStepMode; -static StepMode __attribute__((unused)) kStepModekUnknownEnumValue = static_cast(2); +using StepMode = EmberAfStepMode; +static StepMode __attribute__((unused)) kStepModekUnknownEnumValue = static_cast(2); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature @@ -1035,8 +1012,8 @@ enum class InterfaceTypeEnum : uint8_t kUnknownEnumValue = 5, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using InterfaceTypeEnum = EmberAfInterfaceTypeEnum; -static InterfaceTypeEnum __attribute__((unused)) kInterfaceTypeEnumkUnknownEnumValue = static_cast(5); +using InterfaceTypeEnum = EmberAfInterfaceTypeEnum; +static InterfaceTypeEnum __attribute__((unused)) kInterfaceTypeEnumkUnknownEnumValue = static_cast(5); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Need to convert consumers to using the new enum classes, so we @@ -1056,8 +1033,8 @@ enum class NetworkFaultEnum : uint8_t kUnknownEnumValue = 4, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NetworkFaultEnum = EmberAfNetworkFaultEnum; -static NetworkFaultEnum __attribute__((unused)) kNetworkFaultEnumkUnknownEnumValue = static_cast(4); +using NetworkFaultEnum = EmberAfNetworkFaultEnum; +static NetworkFaultEnum __attribute__((unused)) kNetworkFaultEnumkUnknownEnumValue = static_cast(4); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Need to convert consumers to using the new enum classes, so we @@ -1080,8 +1057,8 @@ enum class RadioFaultEnum : uint8_t kUnknownEnumValue = 7, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RadioFaultEnum = EmberAfRadioFaultEnum; -static RadioFaultEnum __attribute__((unused)) kRadioFaultEnumkUnknownEnumValue = static_cast(7); +using RadioFaultEnum = EmberAfRadioFaultEnum; +static RadioFaultEnum __attribute__((unused)) kRadioFaultEnumkUnknownEnumValue = static_cast(7); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM } // namespace GeneralDiagnostics @@ -1142,8 +1119,8 @@ enum class RoutingRole : uint8_t kUnknownEnumValue = 7, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RoutingRole = EmberAfRoutingRole; -static RoutingRole __attribute__((unused)) kRoutingRolekUnknownEnumValue = static_cast(7); +using RoutingRole = EmberAfRoutingRole; +static RoutingRole __attribute__((unused)) kRoutingRolekUnknownEnumValue = static_cast(7); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature @@ -1250,8 +1227,8 @@ enum class PHYRateEnum : uint8_t kUnknownEnumValue = 10, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PHYRateEnum = EmberAfPHYRateEnum; -static PHYRateEnum __attribute__((unused)) kPHYRateEnumkUnknownEnumValue = static_cast(10); +using PHYRateEnum = EmberAfPHYRateEnum; +static PHYRateEnum __attribute__((unused)) kPHYRateEnumkUnknownEnumValue = static_cast(10); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature @@ -2965,8 +2942,8 @@ enum class ColorMode : uint8_t kUnknownEnumValue = 3, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorMode = EmberAfColorMode; -static ColorMode __attribute__((unused)) kColorModekUnknownEnumValue = static_cast(3); +using ColorMode = EmberAfColorMode; +static ColorMode __attribute__((unused)) kColorModekUnknownEnumValue = static_cast(3); #endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for HueDirection diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 1a2c01df326277..9f54830f4b4766 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -233,8 +233,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::TriggerEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - IdentifyEffectIdentifier effectIdentifier = static_cast(0); - IdentifyEffectVariant effectVariant = static_cast(0); + EffectIdentifierEnum effectIdentifier = static_cast(0); + EffectVariantEnum effectVariant = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -249,8 +249,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::TriggerEffect::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } - IdentifyEffectIdentifier effectIdentifier = static_cast(0); - IdentifyEffectVariant effectVariant = static_cast(0); + EffectIdentifierEnum effectIdentifier = static_cast(0); + EffectVariantEnum effectVariant = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace TriggerEffect @@ -273,9 +273,9 @@ struct TypeInfo namespace IdentifyType { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Identify::IdentifyTypeEnum; + using DecodableType = chip::app::Clusters::Identify::IdentifyTypeEnum; + using DecodableArgType = chip::app::Clusters::Identify::IdentifyTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::IdentifyType::Id; } @@ -328,7 +328,8 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::IdentifyTime::TypeInfo::DecodableType identifyTime = static_cast(0); - Attributes::IdentifyType::TypeInfo::DecodableType identifyType = static_cast(0); + Attributes::IdentifyType::TypeInfo::DecodableType identifyType = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 1d4e9928b33b0c..6e843b5bcd3804 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -63,34 +63,6 @@ enum EmberAfEnhancedColorMode : uint8_t EMBER_ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION = 3, }; -// Enum for IdentifyEffectIdentifier -enum EmberAfIdentifyEffectIdentifier : uint8_t -{ - EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK = 0, - EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE = 1, - EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY = 2, - EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE = 11, - EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT = 254, - EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT = 255, -}; - -// Enum for IdentifyEffectVariant -enum EmberAfIdentifyEffectVariant : uint8_t -{ - EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, -}; - -// Enum for IdentifyIdentifyType -enum EmberAfIdentifyIdentifyType : uint8_t -{ - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE = 0, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LIGHT = 1, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED = 2, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_AUDIBLE_BEEP = 3, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_DISPLAY = 4, - EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_ACTUATOR = 5, -}; - // Enum for InterfaceTypeEnum enum EmberAfInterfaceTypeEnum : uint8_t { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a86d949b6c042f..ab0969124923b5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -10464,8 +10464,8 @@ void registerClusterIdentify(Commands & commands, CredentialIssuerCommands * cre make_unique>(Id, credsIssuerConfig), // make_unique>(Id, "identify-time", 0, UINT16_MAX, Attributes::IdentifyTime::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "identify-type", 0, UINT8_MAX, Attributes::IdentifyType::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "identify-type", 0, UINT8_MAX, Attributes::IdentifyType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 8b133c397549ab..4ca14a7cb6736d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -4724,7 +4724,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("IdentifyTime", 1, value); } case Identify::Attributes::IdentifyType::Id: { - uint8_t value; + chip::app::Clusters::Identify::IdentifyTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("IdentifyType", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index e6e5489a34f679..636d4b970ae1d4 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -28278,7 +28278,7 @@ class Test_TC_I_2_1Suite : public TestCommand case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::Identify::IdentifyTypeEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); @@ -28668,8 +28668,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(0); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(0); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28692,8 +28692,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(1); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(1); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28716,8 +28716,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(2); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(2); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28740,8 +28740,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(11); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(11); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28764,8 +28764,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(1); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(1); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28788,8 +28788,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(254); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(254); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28812,8 +28812,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(1); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(1); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28836,8 +28836,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(255); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(255); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28860,8 +28860,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(0); - value.effectVariant = static_cast(66); + value.effectIdentifier = static_cast(0); + value.effectVariant = static_cast(66); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional @@ -28884,8 +28884,8 @@ class Test_TC_I_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("I.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type value; - value.effectIdentifier = static_cast(255); - value.effectVariant = static_cast(0); + value.effectIdentifier = static_cast(255); + value.effectVariant = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::TriggerEffect::Id, value, chip::NullOptional