diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md index 5a4027e3dc7278..97f0f76b3b0436 100644 --- a/docs/QUICK_START.md +++ b/docs/QUICK_START.md @@ -19,7 +19,7 @@ combination listed below. |
Border Router
|
Node
| Description | | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [**ot-br**](https://openthread.io/guides/border-router/build)
Thread Border Router
  • RasPi
  • BeagleBone | **lighting-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/efr32/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. | +| [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lighting-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/silabs/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. | | [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lock-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nxp/k32w/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md)
  • [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. | ## Controllers diff --git a/docs/guides/silabs_efr32_software_update.md b/docs/guides/silabs_efr32_software_update.md index ec57cc4acaa372..9f94753aa7d29f 100644 --- a/docs/guides/silabs_efr32_software_update.md +++ b/docs/guides/silabs_efr32_software_update.md @@ -8,7 +8,7 @@ all of the EFR32 example applications. ## Running the OTA Download scenario - For Matter with OpenThread: Bring up the OpenThread Border Router as - discussed in examples/lighting-app/efr32/README.md and get its operational + discussed in examples/lighting-app/silabs/README.md and get its operational dataset. - On a Linux or Darwin platform build the chip-tool and the ota-provider-app diff --git a/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h b/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h index 23c82787b0203e..f950121b5a22b2 100644 --- a/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h +++ b/examples/air-purifier-app/air-purifier-common/include/relative-humidity-sensor-manager.h @@ -19,6 +19,7 @@ #pragma once #include +#include namespace chip { namespace app { @@ -31,19 +32,20 @@ class RelativeHumiditySensorManager void Init() { - EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MinMeasuredValue attribute")); status = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 10000); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MaxMeasuredValue attribute")); }; void OnHumidityChangeHandler(uint16_t newValue) { - EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = + RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MeasuredValue attribute")); ChipLogDetail(NotSpecified, "The new RelativeHumidityMeasurement value: %d", newValue); } diff --git a/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h b/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h index 339d02588f52bc..f7061393d76cb6 100644 --- a/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h +++ b/examples/air-purifier-app/air-purifier-common/include/temperature-sensor-manager.h @@ -19,6 +19,7 @@ #pragma once #include +#include namespace chip { namespace app { @@ -31,19 +32,19 @@ class TemperatureSensorManager void Init() { - EmberAfStatus status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -500); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -500); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MinMeasuredValue attribute")); status = TemperatureMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 6000); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MaxMeasuredValue attribute")); } void OnTemperatureChangeHandler(int16_t newValue) { - EmberAfStatus status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MeasuredValue attribute")); ChipLogDetail(NotSpecified, "The new TemperatureMeasurement value: %d", newValue); } diff --git a/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp b/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp index 3b3065e5e843de..22e938ddfa4023 100644 --- a/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp +++ b/examples/air-purifier-app/air-purifier-common/src/air-purifier-manager.cpp @@ -196,12 +196,13 @@ void AirPurifierManager::PercentSettingWriteCallback(uint8_t aNewPercentSetting) if (aNewPercentSetting != percentCurrent) { ChipLogDetail(NotSpecified, "AirPurifierManager::PercentSettingWriteCallback: %d", aNewPercentSetting); - percentCurrent = aNewPercentSetting; - EmberAfStatus status = FanControl::Attributes::PercentCurrent::Set(mEndpointId, percentCurrent); - if (status != EMBER_ZCL_STATUS_SUCCESS) + percentCurrent = aNewPercentSetting; + Status status = FanControl::Attributes::PercentCurrent::Set(mEndpointId, percentCurrent); + if (status != Status::Success) { ChipLogError(NotSpecified, - "AirPurifierManager::PercentSettingWriteCallback: failed to set PercentCurrent attribute: %d", status); + "AirPurifierManager::PercentSettingWriteCallback: failed to set PercentCurrent attribute: %d", + to_underlying(status)); } } } @@ -211,12 +212,12 @@ void AirPurifierManager::SpeedSettingWriteCallback(uint8_t aNewSpeedSetting) if (aNewSpeedSetting != speedCurrent) { ChipLogDetail(NotSpecified, "AirPurifierManager::SpeedSettingWriteCallback: %d", aNewSpeedSetting); - speedCurrent = aNewSpeedSetting; - EmberAfStatus status = FanControl::Attributes::SpeedCurrent::Set(mEndpointId, speedCurrent); - if (status != EMBER_ZCL_STATUS_SUCCESS) + speedCurrent = aNewSpeedSetting; + Status status = FanControl::Attributes::SpeedCurrent::Set(mEndpointId, speedCurrent); + if (status != Status::Success) { ChipLogError(NotSpecified, "AirPurifierManager::SpeedSettingWriteCallback: failed to set SpeedCurrent attribute: %d", - status); + to_underlying(status)); } // Determine if the speed change should also change the fan mode @@ -299,10 +300,11 @@ void AirPurifierManager::SetSpeedSetting(DataModel::Nullable aNewSpeedS if (aNewSpeedSetting.Value() != speedCurrent) { - EmberAfStatus status = FanControl::Attributes::SpeedSetting::Set(mEndpointId, aNewSpeedSetting); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Status status = FanControl::Attributes::SpeedSetting::Set(mEndpointId, aNewSpeedSetting); + if (status != Status::Success) { - ChipLogError(NotSpecified, "AirPurifierManager::SetSpeedSetting: failed to set SpeedSetting attribute: %d", status); + ChipLogError(NotSpecified, "AirPurifierManager::SetSpeedSetting: failed to set SpeedSetting attribute: %d", + to_underlying(status)); } } } @@ -310,11 +312,12 @@ void AirPurifierManager::SetSpeedSetting(DataModel::Nullable aNewSpeedS DataModel::Nullable AirPurifierManager::GetSpeedSetting() { DataModel::Nullable speedSetting; - EmberAfStatus status = FanControl::Attributes::SpeedSetting::Get(mEndpointId, speedSetting); + Status status = FanControl::Attributes::SpeedSetting::Get(mEndpointId, speedSetting); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Status::Success) { - ChipLogError(NotSpecified, "AirPurifierManager::GetSpeedSetting: failed to get SpeedSetting attribute: %d", status); + ChipLogError(NotSpecified, "AirPurifierManager::GetSpeedSetting: failed to get SpeedSetting attribute: %d", + to_underlying(status)); } return speedSetting; @@ -323,11 +326,12 @@ DataModel::Nullable AirPurifierManager::GetSpeedSetting() DataModel::Nullable AirPurifierManager::GetPercentSetting() { DataModel::Nullable percentSetting; - EmberAfStatus status = FanControl::Attributes::PercentSetting::Get(mEndpointId, percentSetting); + Status status = FanControl::Attributes::PercentSetting::Get(mEndpointId, percentSetting); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Status::Success) { - ChipLogError(NotSpecified, "AirPurifierManager::GetPercentSetting: failed to get PercentSetting attribute: %d", status); + ChipLogError(NotSpecified, "AirPurifierManager::GetPercentSetting: failed to get PercentSetting attribute: %d", + to_underlying(status)); } return percentSetting; diff --git a/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp b/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp index c2536e4d99e38b..8d511d24e550dc 100644 --- a/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp +++ b/examples/air-purifier-app/air-purifier-common/src/thermostat-manager.cpp @@ -17,6 +17,9 @@ */ #include "thermostat-manager.h" +#include + +using chip::Protocols::InteractionModel::Status; using namespace chip; using namespace chip::app; @@ -26,19 +29,19 @@ void ThermostatManager::Init() { BitMask FeatureMap; FeatureMap.Set(Thermostat::Feature::kHeating); - EmberAfStatus status = Thermostat::Attributes::FeatureMap::Set(mEndpointId, FeatureMap.Raw()); + Status status = Thermostat::Attributes::FeatureMap::Set(mEndpointId, FeatureMap.Raw()); status = Thermostat::Attributes::ControlSequenceOfOperation::Set(mEndpointId, Thermostat::ControlSequenceOfOperationEnum::kHeatingOnly); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set Thermostat ControlSequenceOfOperation attribute")); status = Thermostat::Attributes::AbsMinHeatSetpointLimit::Set(mEndpointId, 500); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set Thermostat MinHeatSetpointLimit attribute")); status = Thermostat::Attributes::AbsMaxHeatSetpointLimit::Set(mEndpointId, 3000); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set Thermostat MaxHeatSetpointLimit attribute")); } @@ -46,8 +49,8 @@ void ThermostatManager::HeatingSetpointWriteCallback(int16_t newValue) { ChipLogDetail(NotSpecified, "ThermostatManager::HeatingSetpointWriteCallback: %d", newValue); Thermostat::SystemModeEnum systemMode; - EmberAfStatus status = Thermostat::Attributes::SystemMode::Get(mEndpointId, &systemMode); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to get Thermostat SystemMode attribute")); + Status status = Thermostat::Attributes::SystemMode::Get(mEndpointId, &systemMode); + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to get Thermostat SystemMode attribute")); // A new setpoint has been set, so we shall infer that the we want to be in Heating mode if (systemMode == Thermostat::SystemModeEnum::kOff) @@ -58,7 +61,7 @@ void ThermostatManager::HeatingSetpointWriteCallback(int16_t newValue) // Check the current temperature and turn on the heater if needed DataModel::Nullable localTemperature; status = Thermostat::Attributes::LocalTemperature::Get(mEndpointId, localTemperature); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to get TemperatureMeasurement MeasuredValue attribute")); if (localTemperature.Value() < newValue) @@ -81,14 +84,13 @@ void ThermostatManager::SystemModeWriteCallback(uint8_t newValue) else if ((Thermostat::SystemModeEnum) newValue == Thermostat::SystemModeEnum::kHeat) { DataModel::Nullable localTemperature; - EmberAfStatus status = Thermostat::Attributes::LocalTemperature::Get(mEndpointId, localTemperature); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Status status = Thermostat::Attributes::LocalTemperature::Get(mEndpointId, localTemperature); + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to get TemperatureMeasurement MeasuredValue attribute")); int16_t heatingSetpoint; status = Thermostat::Attributes::OccupiedHeatingSetpoint::Get(mEndpointId, &heatingSetpoint); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, - ChipLogError(NotSpecified, "Failed to get Thermostat HeatingSetpoint attribute")); + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to get Thermostat HeatingSetpoint attribute")); if (localTemperature.Value() < heatingSetpoint) { @@ -99,8 +101,8 @@ void ThermostatManager::SystemModeWriteCallback(uint8_t newValue) void ThermostatManager::OnLocalTemperatureChangeCallback(int16_t temperature) { - EmberAfStatus status = Thermostat::Attributes::LocalTemperature::Set(mEndpointId, temperature); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Status status = Thermostat::Attributes::LocalTemperature::Set(mEndpointId, temperature); + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MeasuredValue attribute")); } @@ -122,14 +124,13 @@ void ThermostatManager::SetHeating(bool isHeating) runningState.Clear(Thermostat::RelayStateBitmap::kHeat); } - EmberAfStatus status = Thermostat::Attributes::ThermostatRunningState::Set(mEndpointId, runningState); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, - ChipLogError(NotSpecified, "Failed to set Thermostat RunningState attribute")); + Status status = Thermostat::Attributes::ThermostatRunningState::Set(mEndpointId, runningState); + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set Thermostat RunningState attribute")); } void ThermostatManager::SetHeatMode(bool heat) { - EmberAfStatus status = Thermostat::Attributes::SystemMode::Set( + Status status = Thermostat::Attributes::SystemMode::Set( mEndpointId, heat ? Thermostat::SystemModeEnum::kHeat : Thermostat::SystemModeEnum::kOff); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set Thermostat SystemMode attribute")); + VerifyOrReturn(Status::Success == status, ChipLogError(NotSpecified, "Failed to set Thermostat SystemMode attribute")); } diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h b/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h index 4759f6096c84fc..0de2fa76e5ba61 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/include/relative-humidity-sensor-manager.h @@ -1,4 +1,5 @@ #include +#include #pragma once @@ -11,19 +12,20 @@ class RelativeHumiditySensorManager public: RelativeHumiditySensorManager(EndpointId aEndpointId) : mEndpointId(aEndpointId) { - EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MinMeasuredValue attribute")); status = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 100); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MaxMeasuredValue attribute")); }; void OnHumidityChangeHandler(uint16_t newValue) { - EmberAfStatus status = RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = + RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set RelativeHumidityMeasurement MeasuredValue attribute")); ChipLogDetail(NotSpecified, "The new RelativeHumidityMeasurement value: %d", newValue); } diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h b/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h index 3a0fc0cd0f4646..37f26e1412a886 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/include/temperature-sensor-manager.h @@ -1,6 +1,8 @@ -#include #pragma once +#include + +#include namespace chip { namespace app { @@ -11,19 +13,19 @@ class TemperatureSensorManager public: TemperatureSensorManager(EndpointId aEndpointId) : mEndpointId(aEndpointId) { - EmberAfStatus status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -5); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MinMeasuredValue::Set(mEndpointId, -5); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MinMeasuredValue attribute")); status = TemperatureMeasurement::Attributes::MaxMeasuredValue::Set(mEndpointId, 60); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MaxMeasuredValue attribute")); }; void OnTemperatureChangeHandler(int16_t newValue) { - EmberAfStatus status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, + Protocols::InteractionModel::Status status = TemperatureMeasurement::Attributes::MeasuredValue::Set(mEndpointId, newValue); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, ChipLogError(NotSpecified, "Failed to set TemperatureMeasurement MeasuredValue attribute")); ChipLogDetail(NotSpecified, "The new TemperatureMeasurement value: %d", newValue); } diff --git a/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h b/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h index c1a37be41d385a..0d87a0eefcf828 100644 --- a/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h +++ b/examples/all-clusters-app/ameba/main/include/ManualDishWasherAlarmCommand.h @@ -19,6 +19,7 @@ #include "controller/InvokeInteraction.h" #include "controller/ReadInteraction.h" #include +#include #if CONFIG_ENABLE_CHIP_SHELL #include "lib/shell/Engine.h" @@ -65,7 +66,7 @@ CHIP_ERROR ManualDishWasherAlarmSetRaiseCommandHandler(int argc, char ** argv) } CHIP_ERROR err = CHIP_NO_ERROR; - EmberAfStatus status; + Protocols::InteractionModel::Status status; DishwasherAlarmServer & serverInstance = DishwasherAlarmServer::Instance(); BitMask supported; // Set dishwasher alarm supported value @@ -88,21 +89,21 @@ CHIP_ERROR ManualDishWasherAlarmSetRaiseCommandHandler(int argc, char ** argv) state.SetField(AlarmMap::kTempTooLow, 1); // 0x08, 8 status = serverInstance.SetSupportedValue(1, supported); // 0x2F, 47 - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetMaskValue(1, mask); // 0x2F, 47 - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetStateValue(1, state); // 0x0E, 14 - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; @@ -124,7 +125,7 @@ CHIP_ERROR ManualDishWasherAlarmSetLowerCommandHandler(int argc, char ** argv) } CHIP_ERROR err = CHIP_NO_ERROR; - EmberAfStatus status; + Protocols::InteractionModel::Status status; DishwasherAlarmServer & serverInstance = DishwasherAlarmServer::Instance(); BitMask supported; // Set dishwasher alarm supported value @@ -142,21 +143,21 @@ CHIP_ERROR ManualDishWasherAlarmSetLowerCommandHandler(int argc, char ** argv) mask.SetField(AlarmMap::kWaterLevelError, 1); // 0x20, 32 status = serverInstance.SetSupportedValue(1, supported); // 0x2F, 47 - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetMaskValue(1, mask); // 0x2F, 47 - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetStateValue(1, 0); // Set dishwasher alarm state value 0x00, 0 - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; diff --git a/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h b/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h index d2ec4224a5332f..b4f8974d123a55 100644 --- a/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h +++ b/examples/all-clusters-app/ameba/main/include/ManualRefrigeratorAlarmCommand.h @@ -16,9 +16,12 @@ * limitations under the License. */ +#pragma once + #include "controller/InvokeInteraction.h" #include "controller/ReadInteraction.h" #include +#include #if CONFIG_ENABLE_CHIP_SHELL #include "lib/shell/Engine.h" @@ -60,25 +63,25 @@ CHIP_ERROR ManualRefrigeratorAlarmCommandHandler(int argc, char ** argv) CHIP_ERROR ManualRefrigeratorAlarmDoorOpenCommandHandler(int argc, char ** argv) { CHIP_ERROR err = CHIP_NO_ERROR; - EmberAfStatus status; + Protocols::InteractionModel::Status status; RefrigeratorAlarmServer & serverInstance = RefrigeratorAlarmServer::Instance(); status = serverInstance.SetMaskValue(1, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetStateValue(1, 1); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetSupportedValue(1, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; @@ -96,25 +99,25 @@ CHIP_ERROR ManualRefrigeratorAlarmDoorOpenCommandHandler(int argc, char ** argv) CHIP_ERROR ManualRefrigeratorAlarmDoorCloseCommandHandler(int argc, char ** argv) { CHIP_ERROR err = CHIP_NO_ERROR; - EmberAfStatus status; + Protocols::InteractionModel::Status status; RefrigeratorAlarmServer & serverInstance = RefrigeratorAlarmServer::Instance(); status = serverInstance.SetMaskValue(1, 1); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetStateValue(1, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetSupportedValue(1, 1); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; @@ -132,18 +135,18 @@ CHIP_ERROR ManualRefrigeratorAlarmDoorCloseCommandHandler(int argc, char ** argv CHIP_ERROR ManualRefrigeratorAlarmSuppressCommandHandler(int argc, char ** argv) { CHIP_ERROR err = CHIP_NO_ERROR; - EmberAfStatus status; + Protocols::InteractionModel::Status status; RefrigeratorAlarmServer & serverInstance = RefrigeratorAlarmServer::Instance(); status = serverInstance.SetSupportedValue(1, 1); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; } status = serverInstance.SetStateValue(1, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { err = CHIP_ERROR_INTERNAL; goto exit; diff --git a/examples/all-clusters-app/asr/src/AppTask.cpp b/examples/all-clusters-app/asr/src/AppTask.cpp old mode 100755 new mode 100644 index 3f16789c40e69f..069954f7adf70d --- a/examples/all-clusters-app/asr/src/AppTask.cpp +++ b/examples/all-clusters-app/asr/src/AppTask.cpp @@ -38,10 +38,13 @@ #include #include #include +#include #include #include #include +using chip::Protocols::InteractionModel::Status; + using namespace ::chip; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; @@ -265,9 +268,9 @@ void AppTask::OnOffUpdateClusterState(void) uint8_t onoff = sLightLED.Get(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(1, onoff); + Status status = app::Clusters::OnOff::Attributes::OnOff::Set(1, onoff); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Status::Success) { ASR_LOG("ERR: updating on/off %x", status); } diff --git a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp index e9f9dc1a171484..e14bf5ac6278ba 100644 --- a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp @@ -409,9 +409,9 @@ void AppTask::OnOffUpdateClusterState(intptr_t context) uint8_t onoff = sLightLED.Get(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff); + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { P6_LOG("ERR: updating on/off %x", status); } diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 6a49d475f8acd7..b2fe3a90b59f3f 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -304,8 +304,9 @@ void AllClustersAppCommandHandler::OnSwitchLatchedHandler(uint8_t newPosition) { EndpointId endpoint = 1; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); @@ -315,8 +316,9 @@ void AllClustersAppCommandHandler::OnSwitchInitialPressedHandler(uint8_t newPosi { EndpointId endpoint = 1; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); @@ -326,8 +328,9 @@ void AllClustersAppCommandHandler::OnSwitchLongPressedHandler(uint8_t newPositio { EndpointId endpoint = 1; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); @@ -340,8 +343,9 @@ void AllClustersAppCommandHandler::OnSwitchShortReleasedHandler(uint8_t previous { EndpointId endpoint = 1; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", previousPosition); @@ -352,8 +356,9 @@ void AllClustersAppCommandHandler::OnSwitchLongReleasedHandler(uint8_t previousP { EndpointId endpoint = 1; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released after having been " "pressed for a long time:%d", @@ -366,8 +371,9 @@ void AllClustersAppCommandHandler::OnSwitchMultiPressOngoingHandler(uint8_t newP { EndpointId endpoint = 1; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", newPosition); ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); @@ -379,8 +385,9 @@ void AllClustersAppCommandHandler::OnSwitchMultiPressCompleteHandler(uint8_t pre { EndpointId endpoint = 1; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", previousPosition); ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); diff --git a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp index 2d3a6e4e32f270..8f741fcb83b7c3 100644 --- a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp +++ b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp @@ -55,8 +55,8 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) // Set FeatureMap to 0, default is: // (kUser|kAccessSchedules|kRfidCredential|kPinCredential) 0x113 - EmberAfStatus status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0); + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Updating feature map %x", status); } diff --git a/examples/all-clusters-app/nxp/mw320/main.cpp b/examples/all-clusters-app/nxp/mw320/main.cpp index b778d95fc4430b..5f2df7b501e88d 100644 --- a/examples/all-clusters-app/nxp/mw320/main.cpp +++ b/examples/all-clusters-app/nxp/mw320/main.cpp @@ -286,7 +286,7 @@ void GPIO_IRQHandler(void) #endif /* __cplusplus */ /* -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, +Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength, int32_t index) { @@ -295,7 +295,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI if(clusterId == Clusters::Switch::Id) { *buffer = g_ButtonPress; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } */ @@ -1616,20 +1616,21 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & return; } -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { PRINTF("====> %s() \r\n", __FUNCTION__); - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) { // Added for the pairing of TE9 to report the commission_info // default function (in callback-stub.cpp) // PRINTF("-> %s()\n\r", __FUNCTION__); - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } diff --git a/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp index 2d3a6e4e32f270..8f741fcb83b7c3 100644 --- a/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp +++ b/examples/all-clusters-app/telink/src/ZclDoorLockCallbacks.cpp @@ -55,8 +55,8 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) // Set FeatureMap to 0, default is: // (kUser|kAccessSchedules|kRfidCredential|kPinCredential) 0x113 - EmberAfStatus status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0); + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Updating feature map %x", status); } diff --git a/examples/all-clusters-minimal-app/asr/src/AppTask.cpp b/examples/all-clusters-minimal-app/asr/src/AppTask.cpp index ac9dfe7ba5d8d0..b97900d7533bd3 100644 --- a/examples/all-clusters-minimal-app/asr/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/asr/src/AppTask.cpp @@ -221,9 +221,9 @@ void AppTask::OnOffUpdateClusterState(void) uint8_t onoff = sLightLED.Get(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff); + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ASR_LOG("ERR: updating on/off %x", status); } diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp index 3fcbc365fbc426..dd43df8ec5f03f 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp @@ -406,9 +406,9 @@ void AppTask::OnOffUpdateClusterState(intptr_t context) uint8_t onoff = sLightLED.Get(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff); + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(2, onoff); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { P6_LOG("ERR: updating on/off %x", status); } diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp index 72fbcc663d8582..ab0f2ef3b707a1 100644 --- a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp +++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp @@ -103,8 +103,8 @@ CHIP_ERROR RemoveDeviceEndpoint(SubDevice * dev) return CHIP_ERROR_INTERNAL; } -EmberAfStatus HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength) { using namespace BridgedDeviceBasicInformation::Attributes; ChipLogProgress(DeviceLayer, "HandleReadBridgedDeviceBasicAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, @@ -125,13 +125,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::Attri } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleReadOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer, + uint16_t maxReadLength) { ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, maxReadLength); @@ -145,24 +146,25 @@ EmberAfStatus HandleReadOnOffAttribute(SubDevice * dev, chip::AttributeId attrib } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleWriteOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer) +Protocols::InteractionModel::Status HandleWriteOnOffAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer) { ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId); - ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), EMBER_ZCL_STATUS_FAILURE); + ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), + Protocols::InteractionModel::Status::Failure); dev->SetOnOff(*buffer == 1); - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -181,11 +183,12 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } } - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -199,7 +202,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster } } - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } namespace { diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.h b/examples/bridge-app/asr/subdevice/SubDeviceManager.h index 3a91527f33e99c..29ce5067fe7faf 100644 --- a/examples/bridge-app/asr/subdevice/SubDeviceManager.h +++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.h @@ -68,8 +68,8 @@ extern "C" { int AddDeviceEndpoint(SubDevice * dev, EmberAfEndpointType * ep, const Span & deviceTypeList, const Span & dataVersionStorage, chip::EndpointId parentEndpointId); CHIP_ERROR RemoveDeviceEndpoint(SubDevice * dev); -EmberAfStatus HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength); +Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(SubDevice * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength); void HandleDeviceStatusChanged(SubDevice * dev, SubDevice::Changed_t itemChangedMask); void Init_Bridge_Endpoint(); #ifdef __cplusplus diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 92298a488c3186..27cdb3c5e2dab5 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -213,8 +213,8 @@ CHIP_ERROR RemoveDeviceEndpoint(Device * dev) return CHIP_ERROR_INTERNAL; } -EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength) { using namespace BridgedDeviceBasicInformation::Attributes; ChipLogProgress(DeviceLayer, "HandleReadBridgedDeviceBasicAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, @@ -236,13 +236,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, + uint16_t maxReadLength) { ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, maxReadLength); @@ -257,24 +258,25 @@ EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attribute } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer) +Protocols::InteractionModel::Status HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer) { ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId); - ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), EMBER_ZCL_STATUS_FAILURE); + ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), + Protocols::InteractionModel::Status::Failure); dev->SetOnOff(*buffer == 1); - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -292,11 +294,12 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } } - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -310,7 +313,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster } } - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } namespace { diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 2c825fe8e5e010..80c8b17b7fbed5 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -436,8 +436,8 @@ void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSenso } } -EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength) { using namespace BridgedDeviceBasicInformation::Attributes; @@ -464,13 +464,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleReadOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer, + uint16_t maxReadLength) { ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%d, maxReadLength=%d", attributeId, maxReadLength); @@ -485,13 +486,13 @@ EmberAfStatus HandleReadOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attr } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleWriteOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer) +Protocols::InteractionModel::Status HandleWriteOnOffAttribute(DeviceOnOff * dev, chip::AttributeId attributeId, uint8_t * buffer) { ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%d", attributeId); @@ -508,14 +509,14 @@ EmberAfStatus HandleWriteOnOffAttribute(DeviceOnOff * dev, chip::AttributeId att } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength) { using namespace TemperatureMeasurement::Attributes; @@ -546,19 +547,19 @@ EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::A } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE; + Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Failure; if ((endpointIndex < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) && (gDevices[endpointIndex] != nullptr)) { @@ -643,12 +644,13 @@ class BridgedPowerSourceAttrAccess : public AttributeAccessInterface BridgedPowerSourceAttrAccess gPowerAttrAccess; -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE; + Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Failure; // ChipLogProgress(DeviceLayer, "emberAfExternalAttributeWriteCallback: ep=%d", endpoint); diff --git a/examples/bridge-app/telink/src/AppTask.cpp b/examples/bridge-app/telink/src/AppTask.cpp index 3b4066bd87c2c7..2f6f273cc0cbad 100644 --- a/examples/bridge-app/telink/src/AppTask.cpp +++ b/examples/bridge-app/telink/src/AppTask.cpp @@ -36,8 +36,8 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span & dataVersionStorage, chip::EndpointId parentEndpointId); CHIP_ERROR RemoveDeviceEndpoint(Device * dev); void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSensor::Changed_t itemChangedMask); -EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength); +Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength); static const int kNodeLabelSize = 32; // Current ZCL implementation of Struct uses a max-size array of 254 bytes @@ -236,8 +236,8 @@ CHIP_ERROR RemoveDeviceEndpoint(Device * dev) return CHIP_ERROR_INTERNAL; } -EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength) { using namespace chip::app::Clusters::BridgedDeviceBasicInformation::Attributes; ChipLogProgress(DeviceLayer, "HandleReadBridgedDeviceBasicAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, @@ -264,13 +264,14 @@ EmberAfStatus HandleReadBridgedDeviceBasicAttribute(Device * dev, chip::Attribut } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer, + uint16_t maxReadLength) { ChipLogProgress(DeviceLayer, "HandleReadOnOffAttribute: attrId=%" PRIu32 ", maxReadLength=%u", attributeId, maxReadLength); @@ -285,24 +286,25 @@ EmberAfStatus HandleReadOnOffAttribute(Device * dev, chip::AttributeId attribute } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer) +Protocols::InteractionModel::Status HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attributeId, uint8_t * buffer) { ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId); - ReturnErrorCodeIf((attributeId != Clusters::OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), EMBER_ZCL_STATUS_FAILURE); + ReturnErrorCodeIf((attributeId != Clusters::OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), + Protocols::InteractionModel::Status::Failure); dev->SetOnOff(*buffer == 1); - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) { using namespace Clusters; @@ -327,11 +329,12 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } } - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -345,7 +348,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster } } - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } namespace { @@ -488,8 +491,8 @@ void HandleDeviceTempSensorStatusChanged(DeviceTempSensor * dev, DeviceTempSenso } } -EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::AttributeId attributeId, + uint8_t * buffer, uint16_t maxReadLength) { using namespace Clusters::TemperatureMeasurement::Attributes; @@ -520,10 +523,10 @@ EmberAfStatus HandleReadTempMeasurementAttribute(DeviceTempSensor * dev, chip::A } else { - return EMBER_ZCL_STATUS_FAILURE; + return Protocols::InteractionModel::Status::Failure; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } void AppTask::LightingActionEventHandler(AppEvent * aEvent) @@ -590,15 +593,15 @@ void AppTask::UpdateClusterState(void) bool isTurnedOn = sAppTask.mPwmRgbBlueLed.IsTurnedOn(); // write the new on/off value - EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(kExampleEndpointId, isTurnedOn); + Protocols::InteractionModel::Status status = Clusters::OnOff::Attributes::OnOff::Set(kExampleEndpointId, isTurnedOn); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Update OnOff fail: %x", status); } uint8_t setLevel = sAppTask.mPwmRgbBlueLed.GetLevel(); status = Clusters::LevelControl::Attributes::CurrentLevel::Set(kExampleEndpointId, setLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Update CurrentLevel fail: %x", status); } diff --git a/examples/bridge-app/telink/src/ZclCallbacks.cpp b/examples/bridge-app/telink/src/ZclCallbacks.cpp index b6f5ed558c584e..e83993165acb51 100644 --- a/examples/bridge-app/telink/src/ZclCallbacks.cpp +++ b/examples/bridge-app/telink/src/ZclCallbacks.cpp @@ -43,12 +43,12 @@ using namespace chip::app::Clusters::OnOff; */ void emberAfOnOffClusterInitCallback(EndpointId endpoint) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; bool storedValue; // Read storedValue on/off value status = Attributes::OnOff::Get(1, &storedValue); - if (status == EMBER_ZCL_STATUS_SUCCESS) + if (status == Protocols::InteractionModel::Status::Success) { // Set actual state to stored before reboot GetAppTask().GetPWMDevice().Set(storedValue); diff --git a/examples/chef/common/chef-air-quality.cpp b/examples/chef/common/chef-air-quality.cpp index 0770d0c185aa0c..eafff42d538fb6 100644 --- a/examples/chef/common/chef-air-quality.cpp +++ b/examples/chef/common/chef-air-quality.cpp @@ -40,15 +40,16 @@ void emberAfAirQualityClusterInitCallback(chip::EndpointId endpointId) gAirQualityClusterInstance[endpointId] = clusterInstance; } -EmberAfStatus chefAirQualityWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status chefAirQualityWriteCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { - EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS; + Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success; if (gAirQualityClusterInstance.find(endpoint) == gAirQualityClusterInstance.end()) { ChipLogError(DeviceLayer, "Invalid Endpoind ID: %d", endpoint); - return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT; + return Protocols::InteractionModel::Status::UnsupportedEndpoint; } Instance * clusterInstance = gAirQualityClusterInstance[endpoint]; @@ -63,12 +64,12 @@ EmberAfStatus chefAirQualityWriteCallback(EndpointId endpoint, ClusterId cluster { break; } - ret = EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; + ret = Protocols::InteractionModel::Status::UnsupportedWrite; ChipLogError(DeviceLayer, "Invalid Attribute Update status: %d", static_cast(status)); } break; default: - ret = EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE; + ret = Protocols::InteractionModel::Status::UnsupportedAttribute; ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast(attributeId)); break; } @@ -76,11 +77,11 @@ EmberAfStatus chefAirQualityWriteCallback(EndpointId endpoint, ClusterId cluster return ret; } -EmberAfStatus chefAirQualityReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status chefAirQualityReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) { - EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS; + Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success; return ret; } diff --git a/examples/chef/common/chef-air-quality.h b/examples/chef/common/chef-air-quality.h index 39019b03fbb781..2eaf3ef28fdf66 100644 --- a/examples/chef/common/chef-air-quality.h +++ b/examples/chef/common/chef-air-quality.h @@ -22,9 +22,10 @@ #include #ifdef MATTER_DM_PLUGIN_AIR_QUALITY_SERVER -EmberAfStatus chefAirQualityWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer); -EmberAfStatus chefAirQualityReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength); +Protocols::InteractionModel::Status chefAirQualityWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer); +Protocols::InteractionModel::Status chefAirQualityReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength); #endif diff --git a/examples/chef/common/chef-concentration-measurement.cpp b/examples/chef/common/chef-concentration-measurement.cpp index 395d6604582edf..2d8b65ba2cad19 100644 --- a/examples/chef/common/chef-concentration-measurement.cpp +++ b/examples/chef/common/chef-concentration-measurement.cpp @@ -55,19 +55,19 @@ static std::map *> template -EmberAfStatus chefConcentrationMeasurementWriteCallback( +Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback( std::map *> & map, AttributeId measuredValueId, chip::EndpointId endpoint, chip::ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { - EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS; + Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success; if (map.find(endpoint) == map.end()) { ChipLogError(DeviceLayer, "Invalid Endpoind ID: %d", endpoint); - return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT; + return Protocols::InteractionModel::Status::UnsupportedEndpoint; } Instance(attributeId)); } return ret; } -EmberAfStatus chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { - EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS; + Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success; switch (clusterId) { @@ -174,11 +175,11 @@ EmberAfStatus chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoin return ret; } -EmberAfStatus chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) { - EmberAfStatus ret = EMBER_ZCL_STATUS_SUCCESS; + Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Success; return ret; } diff --git a/examples/chef/common/chef-concentration-measurement.h b/examples/chef/common/chef-concentration-measurement.h index ddd004ebd7047e..9b8fc571872c6b 100644 --- a/examples/chef/common/chef-concentration-measurement.h +++ b/examples/chef/common/chef-concentration-measurement.h @@ -31,9 +31,10 @@ defined(MATTER_DM_PLUGIN_PM10_CONCENTRATION_MEASUREMENT_SERVER) || \ defined(MATTER_DM_PLUGIN_TOTAL_VOLATILE_ORGANIC_COMPOUNDS_CONCENTRATION_MEASUREMENT_SERVER) || \ defined(MATTER_DM_PLUGIN_RADON_CONCENTRATION_MEASUREMENT_SERVER) -EmberAfStatus chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer); -EmberAfStatus chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength); +Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer); +Protocols::InteractionModel::Status chefConcentrationMeasurementReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength); #endif diff --git a/examples/chef/common/chef-fan-control-manager.cpp b/examples/chef/common/chef-fan-control-manager.cpp index 35d3579adf3439..998491d4a61aeb 100644 --- a/examples/chef/common/chef-fan-control-manager.cpp +++ b/examples/chef/common/chef-fan-control-manager.cpp @@ -56,9 +56,9 @@ CHIP_ERROR ChefFanControlManager::ReadPercentCurrent(AttributeValueEncoder & aEn { // Return PercentSetting attribute value for now DataModel::Nullable percentSetting; - EmberAfStatus status = PercentSetting::Get(mEndpoint, percentSetting); + Protocols::InteractionModel::Status status = PercentSetting::Get(mEndpoint, percentSetting); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, CHIP_ERROR_READ_FAILED); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, CHIP_ERROR_READ_FAILED); return aEncoder.Encode(percentSetting.ValueOr(0)); } @@ -67,9 +67,9 @@ CHIP_ERROR ChefFanControlManager::ReadSpeedCurrent(AttributeValueEncoder & aEnco { // Return SpeedCurrent attribute value for now DataModel::Nullable speedSetting; - EmberAfStatus status = SpeedSetting::Get(mEndpoint, speedSetting); + Protocols::InteractionModel::Status status = SpeedSetting::Get(mEndpoint, speedSetting); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, CHIP_ERROR_READ_FAILED); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, CHIP_ERROR_READ_FAILED); return aEncoder.Encode(speedSetting.ValueOr(0)); } @@ -81,19 +81,19 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra VerifyOrReturnError(aDirection != StepDirectionEnum::kUnknownEnumValue, Status::InvalidCommand); - EmberAfStatus status; + Protocols::InteractionModel::Status status; uint8_t speedMax; status = SpeedMax::Get(mEndpoint, &speedMax); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, Status::InvalidCommand); uint8_t speedCurrent; status = SpeedCurrent::Get(mEndpoint, &speedCurrent); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, Status::InvalidCommand); DataModel::Nullable speedSetting; status = SpeedSetting::Get(mEndpoint, speedSetting); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, Status::InvalidCommand); uint8_t newSpeedSetting = speedSetting.ValueOr(0); uint8_t speedValue = speedSetting.ValueOr(speedCurrent); diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 483919c1c9a952..cff7ffdee4679f 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -23,9 +23,9 @@ using chip::app::DataModel::Nullable; using namespace chip; -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) +Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer, uint16_t maxReadLength) { switch (clusterId) { @@ -58,7 +58,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI default: break; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } /* @@ -71,8 +71,9 @@ Thread 3 "rootnode_airqua" hit Breakpoint 1, emberAfExternalAttributeWriteCallba 48 '0', mask = 16 '\020'} (gdb) */ -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) +Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, + uint8_t * buffer) { switch (clusterId) { @@ -105,7 +106,7 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster default: break; } - return EMBER_ZCL_STATUS_SUCCESS; + return Protocols::InteractionModel::Status::Success; } // Include door lock callbacks only when the server is enabled diff --git a/examples/common/imgui_ui/windows/light.cpp b/examples/common/imgui_ui/windows/light.cpp index 24f88212ae23a1..a2dd030c218bec 100644 --- a/examples/common/imgui_ui/windows/light.cpp +++ b/examples/common/imgui_ui/windows/light.cpp @@ -70,11 +70,11 @@ void Light::UpdateState() { if (mTargetLightIsOn.HasValue()) { - EmberAfStatus status = OnOffServer::Instance().setOnOffValue( + chip::Protocols::InteractionModel::Status status = OnOffServer::Instance().setOnOffValue( mEndpointId, mTargetLightIsOn.Value() ? OnOff::Commands::On::Id : OnOff::Commands::Off::Id, false /* initiatedByLevelChange */); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != chip::Protocols::InteractionModel::Status::Success) { ChipLogError(AppServer, "Failed to set on/off value: %d", status); } diff --git a/examples/common/pigweed/rpc_services/internal/StatusUtils.h b/examples/common/pigweed/rpc_services/internal/StatusUtils.h index f92ee66afc44bb..3ea14d3f88923e 100644 --- a/examples/common/pigweed/rpc_services/internal/StatusUtils.h +++ b/examples/common/pigweed/rpc_services/internal/StatusUtils.h @@ -36,15 +36,15 @@ namespace chip { namespace rpc { -constexpr pw::Status ToPwStatus(EmberAfStatus ember_status) +constexpr pw::Status ToPwStatus(Protocols::InteractionModel::Status ember_status) { switch (ember_status) { - case EMBER_ZCL_STATUS_SUCCESS: + case Protocols::InteractionModel::Status::Success: return pw::OkStatus(); - case EMBER_ZCL_STATUS_NOT_FOUND: + case Protocols::InteractionModel::Status::NotFound: return pw::Status::NotFound(); - case EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS: + case Protocols::InteractionModel::Status::UnsupportedAccess: return pw::Status::PermissionDenied(); default: return pw::Status::Unknown(); 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 5c942db19b3af5..fd4a449d68d7b9 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -892,8 +892,8 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) uint8_t newValue = ContactSensorMgr().IsContactClosed(); // write the new on/off value - EmberAfStatus status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating boolean status value %x", status); } diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp index c7acba0f3ee1cb..aa448bf454f2cb 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w1/main/AppTask.cpp @@ -794,9 +794,9 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) uint8_t newValue = ContactSensorMgr().IsContactClosed(); // write the new on/off value - EmberAfStatus status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue); + Protocols::InteractionModel::Status status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating boolean status value %x", status); } diff --git a/examples/contact-sensor-app/telink/src/AppTask.cpp b/examples/contact-sensor-app/telink/src/AppTask.cpp index ba6a8d8118a897..0c4072d6b8e21e 100644 --- a/examples/contact-sensor-app/telink/src/AppTask.cpp +++ b/examples/contact-sensor-app/telink/src/AppTask.cpp @@ -95,8 +95,8 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) ChipLogProgress(NotSpecified, "StateValue::Set : %d", newValue); // write the new boolean state value - EmberAfStatus status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = app::Clusters::BooleanState::Attributes::StateValue::Set(1, newValue); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating boolean status value %x", status); } diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt index 3e45d62323cfec..e0a95d584130eb 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImReadCommand.kt @@ -10,6 +10,7 @@ import chip.devicecontroller.model.ChipPathId import chip.devicecontroller.model.DataVersionFilter import chip.devicecontroller.model.EventState import chip.devicecontroller.model.NodeState +import chip.devicecontroller.model.Status import com.matter.controller.commands.common.CredentialsIssuer import java.util.logging.Level import java.util.logging.Logger @@ -34,13 +35,6 @@ class PairOnNetworkLongImReadCommand( eventPath: ChipEventPath?, e: Exception ) { - if (attributePath != null && attributePath.clusterId.getId() == UNIT_TEST_CLUSTER) { - logger.log( - Level.INFO, - "TODO: skip the error check for unit test cluster that covers most error result" - ) - return - } logger.log(Level.INFO, "Read receive onError") setFailure("read failure") } @@ -72,11 +66,20 @@ class PairOnNetworkLongImReadCommand( return cluster.equals(expected) } + fun checkUnitTestClusterGeneralStatus(status: Status): Boolean = + (status.getStatus() == CLUSTER_ID_TEST_GENERAL_ERROR_STATUS) && + !status.getClusterStatus().isPresent() + + fun checkUnitTestClusterClusterStatus(status: Status): Boolean = + (status.getStatus() == CLUSTER_ID_TEST_CLUSTER_ERROR_STATUS) && + status.getClusterStatus().isPresent() && + status.getClusterStatus().get() == CLUSTER_ID_TEST_CLUSTER_ERROR_CLUSTER_STATUS + private fun validateResponse(nodeState: NodeState) { val endpointZero = requireNotNull(nodeState.getEndpointState(0)) { "Endpoint zero not found." } - val endpointOne = requireNotNull(nodeState.getEndpointState(0)) { "Endpoint one not found." } + val endpointOne = requireNotNull(nodeState.getEndpointState(1)) { "Endpoint one not found." } val basicCluster = requireNotNull(endpointZero.getClusterState(CLUSTER_ID_BASIC)) { @@ -93,6 +96,11 @@ class PairOnNetworkLongImReadCommand( "No local config disabled attribute found." } + val unitTestCluster = + requireNotNull(endpointOne.getClusterState(UNIT_TEST_CLUSTER)) { + "Unit test cluster not found." + } + val startUpEvents = requireNotNull(basicCluster.getEventState(EVENT_ID_START_UP)) { "No start up event found." } @@ -122,6 +130,22 @@ class PairOnNetworkLongImReadCommand( require(checkAllAttributesJsonForFixedLabel(clusterAttributes)) { "Invalid fixed label cluster attributes Json ${clusterAttributes}" } + + require( + checkUnitTestClusterGeneralStatus( + unitTestCluster.getAttributeStatuses()[CLUSTER_ID_TEST_GENERAL_ERROR_BOOLEAN]!! + ) + ) { + "Invalid unit test cluster generalStatus check ${unitTestCluster}" + } + + require( + checkUnitTestClusterClusterStatus( + unitTestCluster.getAttributeStatuses()[CLUSTER_ID_TEST_CLUSTER_ERROR_BOOLEAN]!! + ) + ) { + "Invalid unit test cluster clusterStatus check ${unitTestCluster}" + } } override fun onReport(nodeState: NodeState) { @@ -212,10 +236,15 @@ class PairOnNetworkLongImReadCommand( private const val MATTER_PORT = 5540 private const val CLUSTER_ID_BASIC = 0x0028L private const val FIXED_LABEL_CLUSTER = 0x0040L - private const val UNIT_TEST_CLUSTER = 0xfff1fc05 + private const val UNIT_TEST_CLUSTER = 0xfff1fc05L private const val ATTR_ID_LOCAL_CONFIG_DISABLED = 16L private const val EVENT_ID_START_UP = 0L private const val GLOBAL_ATTRIBUTE_LIST = 65531L private const val CLUSTER_ID_BASIC_VERSION = 0L + private const val CLUSTER_ID_TEST_GENERAL_ERROR_BOOLEAN = 0x0031L + private const val CLUSTER_ID_TEST_CLUSTER_ERROR_BOOLEAN = 0x0032L + private const val CLUSTER_ID_TEST_GENERAL_ERROR_STATUS = 0x8d + private const val CLUSTER_ID_TEST_CLUSTER_ERROR_STATUS = 1 + private const val CLUSTER_ID_TEST_CLUSTER_ERROR_CLUSTER_STATUS = 17 } } diff --git a/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp b/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp index 852295fffcd23b..a8e252719ae791 100644 --- a/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp +++ b/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp @@ -33,7 +33,8 @@ void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attrib if (attributePath.mAttributeId == Identify::Attributes::IdentifyTime::Id) { uint16_t identifyTime; - if (EMBER_ZCL_STATUS_SUCCESS == Identify::Attributes::IdentifyTime::Get(attributePath.mEndpointId, &identifyTime)) + if (Protocols::InteractionModel::Status::Success == + Identify::Attributes::IdentifyTime::Get(attributePath.mEndpointId, &identifyTime)) { ChipLogProgress(Zcl, "IdentifyTime %u", identifyTime); return; diff --git a/examples/light-switch-app/qpg/src/AppTask.cpp b/examples/light-switch-app/qpg/src/AppTask.cpp index f02823b178220d..91579d7937ef9e 100644 --- a/examples/light-switch-app/qpg/src/AppTask.cpp +++ b/examples/light-switch-app/qpg/src/AppTask.cpp @@ -495,9 +495,10 @@ void AppTask::UpdateClusterState(void) /* write the new attribute value based on attribute setter API. example API usage of on-off attribute: - EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(QPG_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); + Protocols::InteractionModel::Status status = Clusters::OnOff::Attributes::OnOff::Set(QPG_LIGHT_ENDPOINT_ID, + LightingMgr().IsTurnedOn()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); } diff --git a/examples/light-switch-app/silabs/README.md b/examples/light-switch-app/silabs/README.md index 615b27c7bc3cd9..401e9b88b41fac 100644 --- a/examples/light-switch-app/silabs/README.md +++ b/examples/light-switch-app/silabs/README.md @@ -254,22 +254,30 @@ combination with JLinkRTTClient as follows: [SVR] Copy/paste the below URL in a browser to see the QR Code: [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 - **LED 0** shows the overall state of the device and its connectivity. The - following states are possible: + **LED 0** - - Short Flash On (50 ms on/950 ms off): The device is in the + - ICD Configuration (Default) - LED is only active under two circumstances: + + 1. Factory reset sequence - LED will blink when initiated upon press and hold of + Button 0 after 3 seconds + 2. An Identify command was received + + - Non-ICD Configuration - shows the overall state of the device and its connectivity. The + following states are possible: + + Short Flash On (50 ms on/950 ms off): The device is in the unprovisioned (unpaired) state and is waiting for a commissioning application to connect. - - Rapid Even Flashing (100 ms on/100 ms off): The device is in the + Rapid Even Flashing (100 ms on/100 ms off): The device is in the unprovisioned state and a commissioning application is connected through Bluetooth LE. - - Short Flash Off (950ms on/50ms off): The device is fully + Short Flash Off (950ms on/50ms off): The device is fully provisioned, but does not yet have full Thread network or service connectivity. - - Solid On: The device is fully provisioned and has full Thread + Solid On: The device is fully provisioned and has full Thread network and service connectivity. **Push Button 0** diff --git a/examples/lighting-app/asr/src/AppTask.cpp b/examples/lighting-app/asr/src/AppTask.cpp index e9467d294ef136..0889f49e8f686f 100755 --- a/examples/lighting-app/asr/src/AppTask.cpp +++ b/examples/lighting-app/asr/src/AppTask.cpp @@ -82,11 +82,11 @@ CHIP_ERROR AppTask::StartAppTask() bool IsLightOn() { - EmberAfStatus status; + Protocols::InteractionModel::Status status; bool on = true; status = app::Clusters::OnOff::Attributes::OnOff::Get(1, &on); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ASR_LOG("Error Read OnOff Attribute 0x%02x\n", status); } @@ -96,12 +96,12 @@ bool IsLightOn() uint8_t GetLightLevel() { - EmberAfStatus status; + Protocols::InteractionModel::Status status; app::DataModel::Nullable currentLevel; status = app::Clusters::LevelControl::Attributes::CurrentLevel::Get(1, currentLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ASR_LOG("Error Read CurrentLevel Attribute 0x%02x\n", status); return -1; diff --git a/examples/lighting-app/bouffalolab/common/AppTask.cpp b/examples/lighting-app/bouffalolab/common/AppTask.cpp index a0eb17fd747eec..fafc9943e24890 100644 --- a/examples/lighting-app/bouffalolab/common/AppTask.cpp +++ b/examples/lighting-app/bouffalolab/common/AppTask.cpp @@ -252,22 +252,25 @@ void AppTask::LightingUpdate(app_event_t status) { do { - if (EMBER_ZCL_STATUS_SUCCESS != Clusters::OnOff::Attributes::OnOff::Get(endpoint, &onoff)) + if (Protocols::InteractionModel::Status::Success != Clusters::OnOff::Attributes::OnOff::Get(endpoint, &onoff)) { break; } - if (EMBER_ZCL_STATUS_SUCCESS != Clusters::LevelControl::Attributes::CurrentLevel::Get(endpoint, v)) + if (Protocols::InteractionModel::Status::Success != + Clusters::LevelControl::Attributes::CurrentLevel::Get(endpoint, v)) { break; } - if (EMBER_ZCL_STATUS_SUCCESS != Clusters::ColorControl::Attributes::CurrentHue::Get(endpoint, &hue)) + if (Protocols::InteractionModel::Status::Success != + Clusters::ColorControl::Attributes::CurrentHue::Get(endpoint, &hue)) { break; } - if (EMBER_ZCL_STATUS_SUCCESS != Clusters::ColorControl::Attributes::CurrentSaturation::Get(endpoint, &sat)) + if (Protocols::InteractionModel::Status::Success != + Clusters::ColorControl::Attributes::CurrentSaturation::Get(endpoint, &sat)) { break; } diff --git a/examples/lighting-app/esp32/main/AppTask.cpp b/examples/lighting-app/esp32/main/AppTask.cpp index 33b1505aafc581..cfbc87eeb3adf9 100644 --- a/examples/lighting-app/esp32/main/AppTask.cpp +++ b/examples/lighting-app/esp32/main/AppTask.cpp @@ -189,9 +189,9 @@ void AppTask::UpdateClusterState() { ESP_LOGI(TAG, "Writing to OnOff cluster"); // write the new on/off value - EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(kLightEndpointId, AppLED.IsTurnedOn()); + Protocols::InteractionModel::Status status = Clusters::OnOff::Attributes::OnOff::Set(kLightEndpointId, AppLED.IsTurnedOn()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ESP_LOGE(TAG, "Updating on/off cluster failed: %x", status); } @@ -199,7 +199,7 @@ void AppTask::UpdateClusterState() ESP_LOGI(TAG, "Writing to Current Level cluster"); status = Clusters::LevelControl::Attributes::CurrentLevel::Set(kLightEndpointId, AppLED.GetLevel()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ESP_LOGE(TAG, "Updating level cluster failed: %x", status); } diff --git a/examples/lighting-app/genio/src/ZclCallbacks.cpp b/examples/lighting-app/genio/src/ZclCallbacks.cpp index 9d0a4d97c09e9b..30faa57990ba7f 100644 --- a/examples/lighting-app/genio/src/ZclCallbacks.cpp +++ b/examples/lighting-app/genio/src/ZclCallbacks.cpp @@ -55,7 +55,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & } else if (clusterId == ColorControl::Id) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; /* ignore several attributes that are currently not processed */ if ((attributeId == ColorControl::Attributes::RemainingTime::Id) || (attributeId == ColorControl::Attributes::EnhancedColorMode::Id) || diff --git a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp index b7fa437127bacb..ce37a3184e85be 100644 --- a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp +++ b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp @@ -49,10 +49,10 @@ bool LightingManager::IsActionInProgress() bool LightingManager::IsLightOn(void) { - bool on = true; - const EmberAfStatus status = OnOff::Attributes::OnOff::Get(1, &on); + bool on = true; + const Protocols::InteractionModel::Status status = OnOff::Attributes::OnOff::Get(1, &on); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { printf("Error ReadServerAttribute 0x%02x\n", status); } @@ -99,9 +99,9 @@ bool LightingManager::InitiateAction(Actor_t aActor, Action_t aAction, uint8_t v void LightingManager::WriteClusterState(uint8_t value) { - const EmberAfStatus status = OnOff::Attributes::OnOff::Set(1, value); + const Protocols::InteractionModel::Status status = OnOff::Attributes::OnOff::Set(1, value); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { printf("Error WriteServerAttribute 0x%02x\n", status); } @@ -109,9 +109,9 @@ void LightingManager::WriteClusterState(uint8_t value) void LightingManager::WriteClusterLevel(uint8_t value) { - const EmberAfStatus status = LevelControl::Attributes::CurrentLevel::Set(1, value); + const Protocols::InteractionModel::Status status = LevelControl::Attributes::CurrentLevel::Set(1, value); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { printf("Error WriteServerAttribute 0x%02x\n", status); } diff --git a/examples/lighting-app/infineon/cyw30739/src/ZclCallbacks.cpp b/examples/lighting-app/infineon/cyw30739/src/ZclCallbacks.cpp index 4f0222ca740ca3..0b00eaec57687a 100644 --- a/examples/lighting-app/infineon/cyw30739/src/ZclCallbacks.cpp +++ b/examples/lighting-app/infineon/cyw30739/src/ZclCallbacks.cpp @@ -53,7 +53,8 @@ void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attrib if (attributePath.mAttributeId == Identify::Attributes::IdentifyTime::Id) { uint16_t identifyTime; - if (EMBER_ZCL_STATUS_SUCCESS == Identify::Attributes::IdentifyTime::Get(attributePath.mEndpointId, &identifyTime)) + if (Protocols::InteractionModel::Status::Success == + Identify::Attributes::IdentifyTime::Get(attributePath.mEndpointId, &identifyTime)) { ChipLogProgress(Zcl, "IdentifyTime %u", identifyTime); return; diff --git a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp index 2315086b246594..c7c8cded19ebb7 100644 --- a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp @@ -555,8 +555,8 @@ void AppTask::UpdateClusterState(intptr_t context) uint8_t newValue = LightMgr().IsLightOn(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); + if (status != Protocols::InteractionModel::Status::Success) { P6_LOG("ERR: updating on/off %x", status); } diff --git a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp index cafc1df1161359..e6ac7b3970c148 100644 --- a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp +++ b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp @@ -259,8 +259,9 @@ void LightingAppCommandHandler::OnSwitchLatchedHandler(uint8_t newPosition) { EndpointId endpoint = 0; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); @@ -270,8 +271,9 @@ void LightingAppCommandHandler::OnSwitchInitialPressedHandler(uint8_t newPositio { EndpointId endpoint = 0; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); @@ -281,8 +283,9 @@ void LightingAppCommandHandler::OnSwitchLongPressedHandler(uint8_t newPosition) { EndpointId endpoint = 0; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); @@ -292,8 +295,9 @@ void LightingAppCommandHandler::OnSwitchShortReleasedHandler(uint8_t previousPos { EndpointId endpoint = 0; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", previousPosition); @@ -304,8 +308,9 @@ void LightingAppCommandHandler::OnSwitchLongReleasedHandler(uint8_t previousPosi { EndpointId endpoint = 0; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released after having been " "pressed for a long time:%d", @@ -318,8 +323,9 @@ void LightingAppCommandHandler::OnSwitchMultiPressOngoingHandler(uint8_t newPosi { EndpointId endpoint = 0; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", newPosition); ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); @@ -331,8 +337,9 @@ void LightingAppCommandHandler::OnSwitchMultiPressCompleteHandler(uint8_t previo { EndpointId endpoint = 0; - EmberAfStatus status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", previousPosition); ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); diff --git a/examples/lighting-app/mbed/main/AppTask.cpp b/examples/lighting-app/mbed/main/AppTask.cpp index fdbe8ea0cce291..27dba42b12b566 100644 --- a/examples/lighting-app/mbed/main/AppTask.cpp +++ b/examples/lighting-app/mbed/main/AppTask.cpp @@ -462,8 +462,8 @@ void AppTask::UpdateClusterState() uint8_t onoff = LightingMgr().IsTurnedOn(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(1, onoff); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(1, onoff); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "Updating on/off cluster failed: %x", status); } @@ -472,7 +472,7 @@ void AppTask::UpdateClusterState() status = app::Clusters::LevelControl::Attributes::CurrentLevel::Set(1, level); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "Updating level cluster failed: %x", status); } diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 494095e04de9dc..12cdbd9db3bfda 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -689,9 +689,10 @@ void AppTask::UpdateClusterState() { SystemLayer().ScheduleLambda([this] { // write the new on/off value - EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(kLightEndpointId, mPWMDevice.IsTurnedOn()); + Protocols::InteractionModel::Status status = + Clusters::OnOff::Attributes::OnOff::Set(kLightEndpointId, mPWMDevice.IsTurnedOn()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Updating on/off cluster failed: %x", status); } @@ -699,7 +700,7 @@ void AppTask::UpdateClusterState() // write the current level status = Clusters::LevelControl::Attributes::CurrentLevel::Set(kLightEndpointId, mPWMDevice.GetLevel()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Updating level cluster failed: %x", status); } diff --git a/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp b/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp index eeb83262bfb804..b872a1c8416d49 100644 --- a/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp +++ b/examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp @@ -73,12 +73,12 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfOnOffClusterInitCallback(EndpointId endpoint) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; bool storedValue; // Read storedValue on/off value status = Attributes::OnOff::Get(endpoint, &storedValue); - if (status == EMBER_ZCL_STATUS_SUCCESS) + if (status == Protocols::InteractionModel::Status::Success) { // Set actual state to the cluster state that was last persisted AppTask::Instance().GetPWMDevice().InitiateAction(storedValue ? PWMDevice::ON_ACTION : PWMDevice::OFF_ACTION, diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index b1fc51c7c29360..1c8130177e18d1 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -955,8 +955,8 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) uint8_t newValue = !LightingMgr().IsTurnedOff(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); } diff --git a/examples/lighting-app/nxp/k32w/k32w1/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w1/main/AppTask.cpp index 7150003f599588..4851e8d33432b3 100644 --- a/examples/lighting-app/nxp/k32w/k32w1/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w1/main/AppTask.cpp @@ -838,8 +838,8 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) uint8_t newValue = !LightingMgr().IsTurnedOff(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); } diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 4dafde6ac41960..a6574f709024db 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -642,16 +642,17 @@ void AppTask::UpdateClusterState(void) ChipLogProgress(NotSpecified, "UpdateClusterState"); // Write the new on/off value - EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(QPG_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); + Protocols::InteractionModel::Status status = + Clusters::OnOff::Attributes::OnOff::Set(QPG_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); } // Write new level value status = Clusters::LevelControl::Attributes::CurrentLevel::Set(QPG_LIGHT_ENDPOINT_ID, LightingMgr().GetLevel()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating level %x", status); } diff --git a/examples/lighting-app/qpg/src/ZclCallbacks.cpp b/examples/lighting-app/qpg/src/ZclCallbacks.cpp index 0b75837a64a8cc..e2255bd4e76684 100644 --- a/examples/lighting-app/qpg/src/ZclCallbacks.cpp +++ b/examples/lighting-app/qpg/src/ZclCallbacks.cpp @@ -78,15 +78,15 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & { xy.x = *reinterpret_cast(value); // get Y from cluster value storage - EmberAfStatus status = ColorControl::Attributes::CurrentY::Get(endpoint, &xy.y); - assert(status == EMBER_ZCL_STATUS_SUCCESS); + Protocols::InteractionModel::Status status = ColorControl::Attributes::CurrentY::Get(endpoint, &xy.y); + assert(status == Protocols::InteractionModel::Status::Success); } if (attributeId == ColorControl::Attributes::CurrentY::Id) { xy.y = *reinterpret_cast(value); // get X from cluster value storage - EmberAfStatus status = ColorControl::Attributes::CurrentX::Get(endpoint, &xy.x); - assert(status == EMBER_ZCL_STATUS_SUCCESS); + Protocols::InteractionModel::Status status = ColorControl::Attributes::CurrentX::Get(endpoint, &xy.x); + assert(status == Protocols::InteractionModel::Status::Success); } ChipLogProgress(Zcl, "New XY color: %u|%u", xy.x, xy.y); @@ -108,22 +108,22 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & // We only support 8-bit hue. Assuming hue is linear, normalize 16-bit to 8-bit. hsv.h = (uint8_t) ((*reinterpret_cast(value)) >> 8); // get saturation from cluster value storage - EmberAfStatus status = ColorControl::Attributes::CurrentSaturation::Get(endpoint, &hsv.s); - assert(status == EMBER_ZCL_STATUS_SUCCESS); + Protocols::InteractionModel::Status status = ColorControl::Attributes::CurrentSaturation::Get(endpoint, &hsv.s); + assert(status == Protocols::InteractionModel::Status::Success); } else if (attributeId == ColorControl::Attributes::CurrentHue::Id) { hsv.h = *value; // get saturation from cluster value storage - EmberAfStatus status = ColorControl::Attributes::CurrentSaturation::Get(endpoint, &hsv.s); - assert(status == EMBER_ZCL_STATUS_SUCCESS); + Protocols::InteractionModel::Status status = ColorControl::Attributes::CurrentSaturation::Get(endpoint, &hsv.s); + assert(status == Protocols::InteractionModel::Status::Success); } else if (attributeId == ColorControl::Attributes::CurrentSaturation::Id) { hsv.s = *value; // get hue from cluster value storage - EmberAfStatus status = ColorControl::Attributes::CurrentHue::Get(endpoint, &hsv.h); - assert(status == EMBER_ZCL_STATUS_SUCCESS); + Protocols::InteractionModel::Status status = ColorControl::Attributes::CurrentHue::Get(endpoint, &hsv.h); + assert(status == Protocols::InteractionModel::Status::Success); } ChipLogProgress(Zcl, "New HSV color: %u|%u", hsv.h, hsv.s); LightingMgr().InitiateAction(LightingManager::COLOR_ACTION_HSV, 0, sizeof(hsv), (uint8_t *) &hsv); @@ -164,11 +164,11 @@ void emberAfOnOffClusterInitCallback(EndpointId endpoint) XyColor_t xy; bool onOffValue = false; app::DataModel::Nullable currentLevel; - EmberAfStatus status; + Protocols::InteractionModel::Status status; status = OnOff::Attributes::OnOff::Get(1, &onOffValue); - if (status == EMBER_ZCL_STATUS_SUCCESS) + if (status == Protocols::InteractionModel::Status::Success) { LightingMgr().InitiateAction(onOffValue ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION, 0, 1, (uint8_t *) onOffValue); @@ -176,7 +176,7 @@ void emberAfOnOffClusterInitCallback(EndpointId endpoint) /* restore values saved by DeferredAttributePersistenceProvider */ status = LevelControl::Attributes::CurrentLevel::Get(endpoint, currentLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS || currentLevel.IsNull()) + if (status != Protocols::InteractionModel::Status::Success || currentLevel.IsNull()) { return; } @@ -184,12 +184,12 @@ void emberAfOnOffClusterInitCallback(EndpointId endpoint) levelValue = currentLevel.Value(); status = ColorControl::Attributes::CurrentY::Get(endpoint, &xy.y); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { return; } status = ColorControl::Attributes::CurrentX::Get(endpoint, &xy.x); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { return; } diff --git a/examples/lighting-app/silabs/src/AppTask.cpp b/examples/lighting-app/silabs/src/AppTask.cpp index 542dc2fbfd55c8..2dc310b2684039 100644 --- a/examples/lighting-app/silabs/src/AppTask.cpp +++ b/examples/lighting-app/silabs/src/AppTask.cpp @@ -246,9 +246,9 @@ void AppTask::UpdateClusterState(intptr_t context) uint8_t newValue = LightMgr().IsLightOn(); // write the new on/off value - EmberAfStatus status = OnOffServer::Instance().setOnOffValue(1, newValue, false); + Protocols::InteractionModel::Status status = OnOffServer::Instance().setOnOffValue(1, newValue, false); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { SILABS_LOG("ERR: updating on/off %x", status); } diff --git a/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp b/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp index 4b9d5427adc8f4..415da294ae8259 100644 --- a/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp +++ b/examples/lighting-app/stm32/src/STM32WB5/AppTask.cpp @@ -444,15 +444,16 @@ void AppTask::UpdateClusterState(void) { ChipLogProgress(NotSpecified, "UpdateClusterState"); // Write the new on/off value - EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(STM32_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = + Clusters::OnOff::Attributes::OnOff::Set(STM32_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating on/off %x", status); } // Write new level value status = Clusters::LevelControl::Attributes::CurrentLevel::Set(STM32_LIGHT_ENDPOINT_ID, LightingMgr().GetLevel()); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating level %x", status); } diff --git a/examples/lighting-app/telink/src/AppTask.cpp b/examples/lighting-app/telink/src/AppTask.cpp index fde4a836c90886..edcb3004d2454c 100644 --- a/examples/lighting-app/telink/src/AppTask.cpp +++ b/examples/lighting-app/telink/src/AppTask.cpp @@ -204,7 +204,7 @@ void AppTask::ActionCompleted(PWMDevice::Action_t aAction, int32_t aActor) void AppTask::UpdateClusterState(void) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; bool isTurnedOn; uint8_t setLevel; @@ -240,13 +240,13 @@ void AppTask::UpdateClusterState(void) // write the new on/off value status = Clusters::OnOff::Attributes::OnOff::Set(kExampleEndpointId, isTurnedOn); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Update OnOff fail: %x", status); } status = Clusters::LevelControl::Attributes::CurrentLevel::Set(kExampleEndpointId, setLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Update CurrentLevel fail: %x", status); } diff --git a/examples/lighting-app/telink/src/ZclCallbacks.cpp b/examples/lighting-app/telink/src/ZclCallbacks.cpp index 53649639507142..7aebb1ba69bae1 100644 --- a/examples/lighting-app/telink/src/ZclCallbacks.cpp +++ b/examples/lighting-app/telink/src/ZclCallbacks.cpp @@ -130,12 +130,12 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfOnOffClusterInitCallback(EndpointId endpoint) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; bool storedValue; // Read storedValue on/off value status = Attributes::OnOff::Get(1, &storedValue); - if (status == EMBER_ZCL_STATUS_SUCCESS) + if (status == Protocols::InteractionModel::Status::Success) { // Set actual state to stored before reboot GetAppTask().GetLightingDevice().Set(storedValue); diff --git a/examples/lighting-app/tizen/src/DBusInterface.cpp b/examples/lighting-app/tizen/src/DBusInterface.cpp index 7c6e29d6a1cc38..0332f6f82b4933 100644 --- a/examples/lighting-app/tizen/src/DBusInterface.cpp +++ b/examples/lighting-app/tizen/src/DBusInterface.cpp @@ -206,7 +206,8 @@ void DBusInterface::InitOnOff() { bool isOn = false; auto status = Clusters::OnOff::Attributes::OnOff::Get(mEndpointId, &isOn); - VerifyOrReturn(status == EMBER_ZCL_STATUS_SUCCESS, ChipLogError(NotSpecified, "Error getting OnOff: 0x%x", status)); + VerifyOrReturn(status == Protocols::InteractionModel::Status::Success, + ChipLogError(NotSpecified, "Error getting OnOff: 0x%x", status)); light_app_on_off_set_on_off(mIfaceOnOff, isOn); } @@ -215,13 +216,14 @@ void DBusInterface::InitColor() { uint8_t value = 0; auto status = Clusters::ColorControl::Attributes::ColorMode::Get(mEndpointId, &value); - VerifyOrReturn(status == EMBER_ZCL_STATUS_SUCCESS, ChipLogError(NotSpecified, "Error getting ColorMode: 0x%x", status)); + VerifyOrReturn(status == Protocols::InteractionModel::Status::Success, + ChipLogError(NotSpecified, "Error getting ColorMode: 0x%x", status)); light_app_color_control_set_color_mode(mIfaceColorControl, value); } { uint16_t value = 0; auto status = Clusters::ColorControl::Attributes::ColorTemperatureMireds::Get(mEndpointId, &value); - VerifyOrReturn(status == EMBER_ZCL_STATUS_SUCCESS, + VerifyOrReturn(status == Protocols::InteractionModel::Status::Success, ChipLogError(NotSpecified, "Error getting ColorTemperatureMireds: 0x%x", status)); light_app_color_control_set_color_temperature_mireds(mIfaceColorControl, value); } diff --git a/examples/lighting-app/tizen/src/LedManager.cpp b/examples/lighting-app/tizen/src/LedManager.cpp index 0848675c7c0fef..a19f49c3f322ea 100644 --- a/examples/lighting-app/tizen/src/LedManager.cpp +++ b/examples/lighting-app/tizen/src/LedManager.cpp @@ -62,7 +62,8 @@ void LedManager::InitOnOff() { bool isOn = false; auto status = Clusters::OnOff::Attributes::OnOff::Get(mEndpointId, &isOn); - VerifyOrReturn(status == EMBER_ZCL_STATUS_SUCCESS, ChipLogError(NotSpecified, "Error getting OnOff: 0x%x", status)); + VerifyOrReturn(status == Protocols::InteractionModel::Status::Success, + ChipLogError(NotSpecified, "Error getting OnOff: 0x%x", status)); SetOnOff(isOn); } diff --git a/examples/lit-icd-app/silabs/README.md b/examples/lit-icd-app/silabs/README.md index f359eacbd23cf4..07ec9c320bcb36 100644 --- a/examples/lit-icd-app/silabs/README.md +++ b/examples/lit-icd-app/silabs/README.md @@ -241,22 +241,30 @@ combination with JLinkRTTClient as follows: [SVR] Copy/paste the below URL in a browser to see the QR Code: [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 - **LED 0** shows the overall state of the device and its connectivity. The - following states are possible: + **LED 0** - - Short Flash On (50 ms on/950 ms off): The device is in the + - ICD Configuration (Default) - LED is only active under two circumstances: + + 1. Factory reset sequence - LED will blink when initiated upon press and hold of + Button 0 after 3 seconds + 2. An Identify command was received + + - Non-ICD Configuration - shows the overall state of the device and its connectivity. The + following states are possible: + + Short Flash On (50 ms on/950 ms off): The device is in the unprovisioned (unpaired) state and is waiting for a commissioning application to connect. - - Rapid Even Flashing (100 ms on/100 ms off): The device is in the + Rapid Even Flashing (100 ms on/100 ms off): The device is in the unprovisioned state and a commissioning application is connected through Bluetooth LE. - - Short Flash Off (950ms on/50ms off): The device is fully + Short Flash Off (950ms on/50ms off): The device is fully provisioned, but does not yet have full Thread network or service connectivity. - - Solid On: The device is fully provisioned and has full Thread + Solid On: The device is fully provisioned and has full Thread network and service connectivity. **Push Button 0** diff --git a/examples/lock-app/asr/src/AppTask.cpp b/examples/lock-app/asr/src/AppTask.cpp old mode 100755 new mode 100644 index 36d53399a991f1..b71ca5b84418ae --- a/examples/lock-app/asr/src/AppTask.cpp +++ b/examples/lock-app/asr/src/AppTask.cpp @@ -480,9 +480,10 @@ void AppTask::UpdateCluster(intptr_t context) OperationSourceEnum source = OperationSourceEnum::kUnspecified; // write the new lock value - EmberAfStatus status = - DoorLockServer::Instance().SetLockState(1, newState, source) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = DoorLockServer::Instance().SetLockState(1, newState, source) + ? Protocols::InteractionModel::Status::Success + : Protocols::InteractionModel::Status::Failure; + if (status != Protocols::InteractionModel::Status::Success) { ASR_LOG("ERR: updating lock state %x", status); } diff --git a/examples/lock-app/esp32/main/AppTask.cpp b/examples/lock-app/esp32/main/AppTask.cpp index e6a8519b782c18..d9f7e1d27df8eb 100644 --- a/examples/lock-app/esp32/main/AppTask.cpp +++ b/examples/lock-app/esp32/main/AppTask.cpp @@ -468,8 +468,8 @@ void AppTask::UpdateClusterState(intptr_t context) uint8_t newValue = !BoltLockMgr().IsUnlocked(); // write the new on/off value - EmberAfStatus status = chip::app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = chip::app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); + if (status != Protocols::InteractionModel::Status::Success) { ESP_LOGI(TAG, "ERR: updating on/off %x", status); } diff --git a/examples/lock-app/genio/src/AppTask.cpp b/examples/lock-app/genio/src/AppTask.cpp index 2b331d3cfafd33..c4e9290d6922b2 100644 --- a/examples/lock-app/genio/src/AppTask.cpp +++ b/examples/lock-app/genio/src/AppTask.cpp @@ -596,10 +596,11 @@ void AppTask::UpdateClusterState(intptr_t context) OperationSourceEnum source = OperationSourceEnum::kUnspecified; // write the new lock value - EmberAfStatus status = - DoorLockServer::Instance().SetLockState(1, newState, source) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; + Protocols::InteractionModel::Status status = DoorLockServer::Instance().SetLockState(1, newState, source) + ? Protocols::InteractionModel::Status::Success + : Protocols::InteractionModel::Status::Failure; - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { MT793X_LOG("ERR: updating lock state %x", status); } diff --git a/examples/lock-app/genio/src/ZclCallbacks.cpp b/examples/lock-app/genio/src/ZclCallbacks.cpp index 12688358f0feee..20c51773000224 100644 --- a/examples/lock-app/genio/src/ZclCallbacks.cpp +++ b/examples/lock-app/genio/src/ZclCallbacks.cpp @@ -61,34 +61,34 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & */ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; status = DoorLock::Attributes::LockType::Set(endpoint, DlLockType::kDeadBolt); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set LockType %x", status); } status = DoorLock::Attributes::NumberOfTotalUsersSupported::Set(endpoint, CONFIG_LOCK_NUM_USERS); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set number of users %x", status); } status = DoorLock::Attributes::NumberOfPINUsersSupported::Set(endpoint, CONFIG_LOCK_NUM_USERS); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set number of PIN users %x", status); } status = DoorLock::Attributes::NumberOfRFIDUsersSupported::Set(endpoint, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set number of RFID users %x", status); } status = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Set(endpoint, CONFIG_LOCK_NUM_CREDENTIALS_PER_USER); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set number of credentials per user %x", status); } @@ -97,7 +97,7 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) // at the same time. // Set FeatureMap to (kUser|kPinCredential) status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0x101); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set number of credentials per user %x", status); } diff --git a/examples/lock-app/infineon/cyw30739/src/main.cpp b/examples/lock-app/infineon/cyw30739/src/main.cpp index a0a92487a807bc..10beef22c153e6 100644 --- a/examples/lock-app/infineon/cyw30739/src/main.cpp +++ b/examples/lock-app/infineon/cyw30739/src/main.cpp @@ -324,10 +324,11 @@ void UpdateClusterState(intptr_t context) OperationSourceEnum source = OperationSourceEnum::kUnspecified; // write the new lock value - EmberAfStatus status = - DoorLockServer::Instance().SetLockState(1, newState, source) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; + Protocols::InteractionModel::Status status = DoorLockServer::Instance().SetLockState(1, newState, source) + ? Protocols::InteractionModel::Status::Success + : Protocols::InteractionModel::Status::Failure; - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "ERR: updating lock state %x", status); } diff --git a/examples/lock-app/infineon/psoc6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp index e3be287e024442..b69a114c2f9ddb 100644 --- a/examples/lock-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -660,9 +660,10 @@ void AppTask::UpdateCluster(intptr_t context) OperationSourceEnum source = OperationSourceEnum::kUnspecified; // write the new lock value - EmberAfStatus status = - DoorLockServer::Instance().SetLockState(1, newState, source) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = DoorLockServer::Instance().SetLockState(1, newState, source) + ? Protocols::InteractionModel::Status::Success + : Protocols::InteractionModel::Status::Failure; + if (status != Protocols::InteractionModel::Status::Success) { P6_LOG("ERR: updating lock state %x", status); } diff --git a/examples/lock-app/mbed/main/AppTask.cpp b/examples/lock-app/mbed/main/AppTask.cpp index 4e1d0c70e943cc..eaa48d34a711ba 100644 --- a/examples/lock-app/mbed/main/AppTask.cpp +++ b/examples/lock-app/mbed/main/AppTask.cpp @@ -461,8 +461,8 @@ void AppTask::UpdateClusterState() uint8_t newValue = !BoltLockMgr().IsUnlocked(); // write the new on/off value - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = app::Clusters::OnOff::Attributes::OnOff::Set(1, newValue); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ZCL update failed: %lx", status); } diff --git a/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp b/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp index 99ea77ee21adb9..ec7871f2d6f92d 100644 --- a/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp +++ b/examples/lock-app/nrfconnect/main/ZclCallbacks.cpp @@ -112,8 +112,8 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) { DoorLockServer::Instance().InitServer(endpoint); - const auto logOnFailure = [](EmberAfStatus status, const char * attributeName) { - if (status != EMBER_ZCL_STATUS_SUCCESS) + const auto logOnFailure = [](Protocols::InteractionModel::Status status, const char * attributeName) { + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set DoorLock %s: %x", attributeName, status); } diff --git a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp index 130569791e2e8e..6e8a62e3d00716 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -777,9 +777,9 @@ void AppTask::UpdateClusterStateInternal(intptr_t arg) } // write the new door lock state - EmberAfStatus status = Attributes::LockState::Set(1, newValue); + chip::Protocols::InteractionModel::Status status = Attributes::LockState::Set(1, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != chip::Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating door lock state %x", status); } diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index 54a4b2a5d2a3f3..74e22e5892a977 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -622,8 +622,8 @@ void AppTask::UpdateClusterState(void) if (currentLockState.IsNull()) { - EmberAfStatus status = DoorLock::Attributes::LockState::Set(QPG_LOCK_ENDPOINT_ID, newValue); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = DoorLock::Attributes::LockState::Set(QPG_LOCK_ENDPOINT_ID, newValue); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: updating DoorLock %x", status); } diff --git a/examples/lock-app/qpg/src/ZclCallbacks.cpp b/examples/lock-app/qpg/src/ZclCallbacks.cpp index 51751c43ed4058..e633c8eea16f0f 100644 --- a/examples/lock-app/qpg/src/ZclCallbacks.cpp +++ b/examples/lock-app/qpg/src/ZclCallbacks.cpp @@ -114,8 +114,8 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) { DoorLockServer::Instance().InitServer(endpoint); - const auto logOnFailure = [](EmberAfStatus status, const char * attributeName) { - if (status != EMBER_ZCL_STATUS_SUCCESS) + const auto logOnFailure = [](Protocols::InteractionModel::Status status, const char * attributeName) { + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set DoorLock %s: %x", attributeName, status); } diff --git a/examples/lock-app/silabs/README.md b/examples/lock-app/silabs/README.md index 1bce8c431bee54..447fe3b9949995 100644 --- a/examples/lock-app/silabs/README.md +++ b/examples/lock-app/silabs/README.md @@ -262,22 +262,30 @@ combination with JLinkRTTClient as follows: [SVR] Copy/paste the below URL in a browser to see the QR Code: [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 - **LED 0** shows the overall state of the device and its connectivity. The - following states are possible: + **LED 0** - - _Short Flash On (50 ms on/950 ms off)_ ; The device is in the + - ICD Configuration (Default) - LED is only active under two circumstances: + + 1. Factory reset sequence - LED will blink when initiated upon press and hold of + Button 0 after 3 seconds + 2. An Identify command was received + + - Non-ICD Configuration - shows the overall state of the device and its connectivity. The + following states are possible: + + Short Flash On (50 ms on/950 ms off): The device is in the unprovisioned (unpaired) state and is waiting for a commissioning application to connect. - - _Rapid Even Flashing_ ; (100 ms on/100 ms off)_ — The device is in the + Rapid Even Flashing (100 ms on/100 ms off): The device is in the unprovisioned state and a commissioning application is connected through Bluetooth LE. - - _Short Flash Off_ ; (950ms on/50ms off)_ — The device is fully + Short Flash Off (950ms on/50ms off): The device is fully provisioned, but does not yet have full Thread network or service connectivity. - - _Solid On_ ; The device is fully provisioned and has full Thread + Solid On: The device is fully provisioned and has full Thread network and service connectivity. **LED 1** Simulates the Lock The following states are possible: diff --git a/examples/lock-app/silabs/src/AppTask.cpp b/examples/lock-app/silabs/src/AppTask.cpp index 4e8527f4f4fa1a..c5bc828beaea5f 100644 --- a/examples/lock-app/silabs/src/AppTask.cpp +++ b/examples/lock-app/silabs/src/AppTask.cpp @@ -353,10 +353,11 @@ void AppTask::UpdateClusterState(intptr_t context) DlLockState newState = unlocked ? DlLockState::kUnlocked : DlLockState::kLocked; // write the new lock value - EmberAfStatus status = - DoorLockServer::Instance().SetLockState(1, newState) ? EMBER_ZCL_STATUS_SUCCESS : EMBER_ZCL_STATUS_FAILURE; + Protocols::InteractionModel::Status status = DoorLockServer::Instance().SetLockState(1, newState) + ? Protocols::InteractionModel::Status::Success + : Protocols::InteractionModel::Status::Failure; - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { SILABS_LOG("ERR: updating lock state %x", status); } diff --git a/examples/platform/asr/shell/matter_shell.cpp b/examples/platform/asr/shell/matter_shell.cpp index dcd412af5f033e..f8abff11e9ebf7 100644 --- a/examples/platform/asr/shell/matter_shell.cpp +++ b/examples/platform/asr/shell/matter_shell.cpp @@ -83,10 +83,10 @@ void asr_matter_onoff(int value) { ChipLogProgress(Zcl, "updating on/off = %d", value); - EmberAfStatus status = chip::app::Clusters::OnOff::Attributes::OnOff::Set( + Protocols::InteractionModel::Status status = chip::app::Clusters::OnOff::Attributes::OnOff::Set( /* endpoint ID */ 1, (uint8_t *) &value); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogProgress(Zcl, "ERR: updating on/off %x", status); } diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 99be69fbbc9b14..bbfeee1fa679e1 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -32,7 +32,7 @@ declare_args() { sl_wfx_config_scan = true # Argument to force enable WPA3 security on rs91x - rs91x_wpa3_transition = false + rs91x_wpa3_transition = true # use commissionable data for SiWx917 siwx917_commissionable_data = false diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index effbe038389f06..02f1317f55b643 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -32,7 +32,7 @@ declare_args() { sl_wfx_config_scan = true # Argument to force enable WPA3 security on rs91x - rs91x_wpa3_transition = false + rs91x_wpa3_transition = true #default WiFi SSID chip_default_wifi_ssid = "" diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index 31f0846c412008..4bfb9afb9713cb 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -459,13 +459,13 @@ void AppTask::DispatchEvent(AppEvent * aEvent) void AppTask::InitOnOffClusterState() { - EmberAfStatus status; + Protocols::InteractionModel::Status status; ChipLogProgress(NotSpecified, "Init On/Off clusterstate"); // Write false as pump always boots in stopped mode status = OnOff::Attributes::OnOff::Set(ONOFF_CLUSTER_ENDPOINT, false); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Init On/Off state %x", status); } @@ -482,7 +482,7 @@ void AppTask::UpdateClusterState(void) void AppTask::UpdateCluster(intptr_t context) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; BitMask pumpStatus; ChipLogProgress(NotSpecified, "Update Cluster State"); @@ -501,25 +501,25 @@ void AppTask::UpdateCluster(intptr_t context) status = PumpConfigurationAndControl::Attributes::ControlMode::Set(PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Flow error %x", status); } status = PumpConfigurationAndControl::Attributes::ControlMode::Set( PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantPressure); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Pressure error %x", status); } status = PumpConfigurationAndControl::Attributes::ControlMode::Set( PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Speed error %x", status); } status = PumpConfigurationAndControl::Attributes::ControlMode::Set( PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantTemperature); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Temperature error %x", status); } @@ -527,98 +527,98 @@ void AppTask::UpdateCluster(intptr_t context) // Write the new values bool onOffState = !PumpMgr().IsStopped(); status = OnOff::Attributes::OnOff::Set(ONOFF_CLUSTER_ENDPOINT, onOffState); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating On/Off state %x", status); } int16_t maxPressure = PumpMgr().GetMaxPressure(); status = PumpConfigurationAndControl::Attributes::MaxPressure::Set(PCC_CLUSTER_ENDPOINT, maxPressure); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxPressure %x", status); } uint16_t maxSpeed = PumpMgr().GetMaxSpeed(); status = PumpConfigurationAndControl::Attributes::MaxSpeed::Set(PCC_CLUSTER_ENDPOINT, maxSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxSpeed %x", status); } uint16_t maxFlow = PumpMgr().GetMaxFlow(); status = PumpConfigurationAndControl::Attributes::MaxFlow::Set(PCC_CLUSTER_ENDPOINT, maxFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxFlow %x", status); } int16_t minConstPress = PumpMgr().GetMinConstPressure(); status = PumpConfigurationAndControl::Attributes::MinConstPressure::Set(PCC_CLUSTER_ENDPOINT, minConstPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstPressure %x", status); } int16_t maxConstPress = PumpMgr().GetMaxConstPressure(); status = PumpConfigurationAndControl::Attributes::MaxConstPressure::Set(PCC_CLUSTER_ENDPOINT, maxConstPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstPressure %x", status); } int16_t minCompPress = PumpMgr().GetMinCompPressure(); status = PumpConfigurationAndControl::Attributes::MinCompPressure::Set(PCC_CLUSTER_ENDPOINT, minCompPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinCompPressure %x", status); } int16_t maxCompPress = PumpMgr().GetMaxCompPressure(); status = PumpConfigurationAndControl::Attributes::MaxCompPressure::Set(PCC_CLUSTER_ENDPOINT, maxCompPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxCompPressure %x", status); } uint16_t minConstSpeed = PumpMgr().GetMinConstSpeed(); status = PumpConfigurationAndControl::Attributes::MinConstSpeed::Set(PCC_CLUSTER_ENDPOINT, minConstSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstSpeed %x", status); } uint16_t maxConstSpeed = PumpMgr().GetMaxConstSpeed(); status = PumpConfigurationAndControl::Attributes::MaxConstSpeed::Set(PCC_CLUSTER_ENDPOINT, maxConstSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstSpeed %x", status); } uint16_t minConstFlow = PumpMgr().GetMinConstFlow(); status = PumpConfigurationAndControl::Attributes::MinConstFlow::Set(PCC_CLUSTER_ENDPOINT, minConstFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstFlow %x", status); } uint16_t maxConstFlow = PumpMgr().GetMaxConstFlow(); status = PumpConfigurationAndControl::Attributes::MaxConstFlow::Set(PCC_CLUSTER_ENDPOINT, maxConstFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstFlow %x", status); } int16_t minConstTemp = PumpMgr().GetMinConstTemp(); status = PumpConfigurationAndControl::Attributes::MinConstTemp::Set(PCC_CLUSTER_ENDPOINT, minConstTemp); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstTemp %x", status); } int16_t maxConstTemp = PumpMgr().GetMaxConstTemp(); status = PumpConfigurationAndControl::Attributes::MaxConstTemp::Set(PCC_CLUSTER_ENDPOINT, maxConstTemp); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstTemp %x", status); } diff --git a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp index c98e99be1cb487..5c5e93919263d9 100644 --- a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp @@ -456,13 +456,13 @@ void AppTask::DispatchEvent(AppEvent * aEvent) void AppTask::InitOnOffClusterState() { - EmberAfStatus status; + Protocols::InteractionModel::Status status; ChipLogProgress(NotSpecified, "Init On/Off clusterstate"); // Write false as pump always boots in stopped mode status = OnOff::Attributes::OnOff::Set(ONOFF_CLUSTER_ENDPOINT, false); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Init On/Off state %x", status); } @@ -479,7 +479,7 @@ void AppTask::UpdateClusterState(void) void AppTask::UpdateCluster(intptr_t context) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; BitMask pumpStatus; ChipLogProgress(NotSpecified, "Update Cluster State"); @@ -498,25 +498,25 @@ void AppTask::UpdateCluster(intptr_t context) status = PumpConfigurationAndControl::Attributes::ControlMode::Set(PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Flow error %x", status); } status = PumpConfigurationAndControl::Attributes::ControlMode::Set( PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantPressure); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Pressure error %x", status); } status = PumpConfigurationAndControl::Attributes::ControlMode::Set( PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Speed error %x", status); } status = PumpConfigurationAndControl::Attributes::ControlMode::Set( PCC_CLUSTER_ENDPOINT, PumpConfigurationAndControl::ControlModeEnum::kConstantTemperature); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Constant Temperature error %x", status); } @@ -524,98 +524,98 @@ void AppTask::UpdateCluster(intptr_t context) // Write the new values bool onOffState = !PumpMgr().IsStopped(); status = OnOff::Attributes::OnOff::Set(ONOFF_CLUSTER_ENDPOINT, onOffState); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating On/Off state %x", status); } int16_t maxPressure = PumpMgr().GetMaxPressure(); status = PumpConfigurationAndControl::Attributes::MaxPressure::Set(PCC_CLUSTER_ENDPOINT, maxPressure); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxPressure %x", status); } uint16_t maxSpeed = PumpMgr().GetMaxSpeed(); status = PumpConfigurationAndControl::Attributes::MaxSpeed::Set(PCC_CLUSTER_ENDPOINT, maxSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxSpeed %x", status); } uint16_t maxFlow = PumpMgr().GetMaxFlow(); status = PumpConfigurationAndControl::Attributes::MaxFlow::Set(PCC_CLUSTER_ENDPOINT, maxFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxFlow %x", status); } int16_t minConstPress = PumpMgr().GetMinConstPressure(); status = PumpConfigurationAndControl::Attributes::MinConstPressure::Set(PCC_CLUSTER_ENDPOINT, minConstPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstPressure %x", status); } int16_t maxConstPress = PumpMgr().GetMaxConstPressure(); status = PumpConfigurationAndControl::Attributes::MaxConstPressure::Set(PCC_CLUSTER_ENDPOINT, maxConstPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstPressure %x", status); } int16_t minCompPress = PumpMgr().GetMinCompPressure(); status = PumpConfigurationAndControl::Attributes::MinCompPressure::Set(PCC_CLUSTER_ENDPOINT, minCompPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinCompPressure %x", status); } int16_t maxCompPress = PumpMgr().GetMaxCompPressure(); status = PumpConfigurationAndControl::Attributes::MaxCompPressure::Set(PCC_CLUSTER_ENDPOINT, maxCompPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxCompPressure %x", status); } uint16_t minConstSpeed = PumpMgr().GetMinConstSpeed(); status = PumpConfigurationAndControl::Attributes::MinConstSpeed::Set(PCC_CLUSTER_ENDPOINT, minConstSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstSpeed %x", status); } uint16_t maxConstSpeed = PumpMgr().GetMaxConstSpeed(); status = PumpConfigurationAndControl::Attributes::MaxConstSpeed::Set(PCC_CLUSTER_ENDPOINT, maxConstSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstSpeed %x", status); } uint16_t minConstFlow = PumpMgr().GetMinConstFlow(); status = PumpConfigurationAndControl::Attributes::MinConstFlow::Set(PCC_CLUSTER_ENDPOINT, minConstFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstFlow %x", status); } uint16_t maxConstFlow = PumpMgr().GetMaxConstFlow(); status = PumpConfigurationAndControl::Attributes::MaxConstFlow::Set(PCC_CLUSTER_ENDPOINT, maxConstFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstFlow %x", status); } int16_t minConstTemp = PumpMgr().GetMinConstTemp(); status = PumpConfigurationAndControl::Attributes::MinConstTemp::Set(PCC_CLUSTER_ENDPOINT, minConstTemp); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstTemp %x", status); } int16_t maxConstTemp = PumpMgr().GetMaxConstTemp(); status = PumpConfigurationAndControl::Attributes::MaxConstTemp::Set(PCC_CLUSTER_ENDPOINT, maxConstTemp); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstTemp %x", status); } diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 1426977d5028ec..893c5dfd31794e 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -562,7 +562,7 @@ void AppTask::DispatchEvent(const AppEvent & event) void AppTask::UpdateClusterState() { - EmberAfStatus status; + Protocols::InteractionModel::Status status; ChipLogProgress(NotSpecified, "UpdateClusterState"); @@ -571,98 +571,98 @@ void AppTask::UpdateClusterState() bool onOffState = !PumpMgr().IsStopped(); status = OnOff::Attributes::OnOff::Set(kOnOffClusterEndpoint, onOffState); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating On/Off state %x", status); } int16_t maxPressure = PumpMgr().GetMaxPressure(); status = PumpConfigurationAndControl::Attributes::MaxPressure::Set(kPccClusterEndpoint, maxPressure); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxPressure %x", status); } uint16_t maxSpeed = PumpMgr().GetMaxSpeed(); status = PumpConfigurationAndControl::Attributes::MaxSpeed::Set(kPccClusterEndpoint, maxSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxSpeed %x", status); } uint16_t maxFlow = PumpMgr().GetMaxFlow(); status = PumpConfigurationAndControl::Attributes::MaxFlow::Set(kPccClusterEndpoint, maxFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxFlow %x", status); } int16_t minConstPress = PumpMgr().GetMinConstPressure(); status = PumpConfigurationAndControl::Attributes::MinConstPressure::Set(kPccClusterEndpoint, minConstPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstPressure %x", status); } int16_t maxConstPress = PumpMgr().GetMaxConstPressure(); status = PumpConfigurationAndControl::Attributes::MaxConstPressure::Set(kPccClusterEndpoint, maxConstPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstPressure %x", status); } int16_t minCompPress = PumpMgr().GetMinCompPressure(); status = PumpConfigurationAndControl::Attributes::MinCompPressure::Set(kPccClusterEndpoint, minCompPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinCompPressure %x", status); } int16_t maxCompPress = PumpMgr().GetMaxCompPressure(); status = PumpConfigurationAndControl::Attributes::MaxCompPressure::Set(kPccClusterEndpoint, maxCompPress); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxCompPressure %x", status); } uint16_t minConstSpeed = PumpMgr().GetMinConstSpeed(); status = PumpConfigurationAndControl::Attributes::MinConstSpeed::Set(kPccClusterEndpoint, minConstSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstSpeed %x", status); } uint16_t maxConstSpeed = PumpMgr().GetMaxConstSpeed(); status = PumpConfigurationAndControl::Attributes::MaxConstSpeed::Set(kPccClusterEndpoint, maxConstSpeed); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstSpeed %x", status); } uint16_t minConstFlow = PumpMgr().GetMinConstFlow(); status = PumpConfigurationAndControl::Attributes::MinConstFlow::Set(kPccClusterEndpoint, minConstFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstFlow %x", status); } uint16_t maxConstFlow = PumpMgr().GetMaxConstFlow(); status = PumpConfigurationAndControl::Attributes::MaxConstFlow::Set(kPccClusterEndpoint, maxConstFlow); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstFlow %x", status); } int16_t minConstTemp = PumpMgr().GetMinConstTemp(); status = PumpConfigurationAndControl::Attributes::MinConstTemp::Set(kPccClusterEndpoint, minConstTemp); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MinConstTemp %x", status); } int16_t maxConstTemp = PumpMgr().GetMaxConstTemp(); status = PumpConfigurationAndControl::Attributes::MaxConstTemp::Set(kPccClusterEndpoint, maxConstTemp); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating MaxConstTemp %x", status); } diff --git a/examples/pump-app/silabs/src/AppTask.cpp b/examples/pump-app/silabs/src/AppTask.cpp index 5b46641cd58dbc..588cd02001b9e8 100644 --- a/examples/pump-app/silabs/src/AppTask.cpp +++ b/examples/pump-app/silabs/src/AppTask.cpp @@ -242,10 +242,10 @@ void AppTask::ActionCompleted(PumpManager::Action_t aAction, int32_t aActor) void AppTask::UpdateClusterState(intptr_t context) { // Set On/Off state - EmberAfStatus status; + Protocols::InteractionModel::Status status; bool onOffState = !PumpMgr().IsStopped(); status = chip::app::Clusters::OnOff::Attributes::OnOff::Set(PCC_CLUSTER_ENDPOINT, onOffState); - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(NotSpecified, "ERR: Updating On/Off state %x", status); } diff --git a/examples/pump-app/telink/src/AppTask.cpp b/examples/pump-app/telink/src/AppTask.cpp index 4b443464879146..f2832b2b3e6699 100644 --- a/examples/pump-app/telink/src/AppTask.cpp +++ b/examples/pump-app/telink/src/AppTask.cpp @@ -131,8 +131,8 @@ void AppTask::UpdateClusterState() // Write the new values bool onOffState = !PumpMgr().IsStopped(); - EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(kOnOffClusterEndpoint, onOffState); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = Clusters::OnOff::Attributes::OnOff::Set(kOnOffClusterEndpoint, onOffState); + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("ERR: Updating On/Off state %x", status); } diff --git a/examples/thermostat/qpg/src/ThermostaticRadiatorValveManager.cpp b/examples/thermostat/qpg/src/ThermostaticRadiatorValveManager.cpp index f8f2c348cc2558..55173272977964 100644 --- a/examples/thermostat/qpg/src/ThermostaticRadiatorValveManager.cpp +++ b/examples/thermostat/qpg/src/ThermostaticRadiatorValveManager.cpp @@ -304,7 +304,7 @@ void ThermostaticRadiatorValveManager::UpdateLocalTemperature(int16_t aLocalTemp { SystemLayer().ScheduleLambda([aLocalTemperature] { ChipLogProgress(NotSpecified, "UpdateLocalTemperature with value (0.01 degC) %u", aLocalTemperature); - if (EMBER_ZCL_STATUS_SUCCESS != + if (Protocols::InteractionModel::Status::Success != Thermostat::Attributes::LocalTemperature::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aLocalTemperature)) { ChipLogProgress(NotSpecified, "UpdateLocalTemperature failure"); diff --git a/examples/thermostat/qpg/src/ZclCallbacks.cpp b/examples/thermostat/qpg/src/ZclCallbacks.cpp index 4551a0d0bedb2f..0232634dd2effd 100644 --- a/examples/thermostat/qpg/src/ZclCallbacks.cpp +++ b/examples/thermostat/qpg/src/ZclCallbacks.cpp @@ -56,8 +56,8 @@ void emberAfThermostatClusterInitCallback(EndpointId endpoint) { // Temp. code for testing purpose, need to be updated - const auto logOnFailure = [](EmberAfStatus status, const char * attributeName) { - if (status != EMBER_ZCL_STATUS_SUCCESS) + const auto logOnFailure = [](Protocols::InteractionModel::Status status, const char * attributeName) { + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set DoorLock %s: %x", attributeName, status); } diff --git a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp index 2151dd63920f74..b3160b2ec2fd8b 100644 --- a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp @@ -112,7 +112,8 @@ uint16_t AccountLoginManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "AccountLoginManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp index 31745a93c42fce..86eabb83f99066 100644 --- a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp +++ b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp @@ -174,7 +174,8 @@ uint16_t AppContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "AppContentLauncherManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp index 39e364d60e4148..087f1742c355a0 100644 --- a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp +++ b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp @@ -292,7 +292,8 @@ uint16_t AppMediaPlaybackManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "AppMediaPlaybackManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp index cb22e9fd9b8abf..23cf8058bab068 100644 --- a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp @@ -154,7 +154,8 @@ uint16_t TargetNavigatorManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "TargetNavigatorManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/android/java/ChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp index 997f041b78982f..3c0efcab9f8cdc 100644 --- a/examples/tv-app/android/java/ChannelManager.cpp +++ b/examples/tv-app/android/java/ChannelManager.cpp @@ -761,7 +761,8 @@ uint16_t ChannelManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "ChannelManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index 53136c23e5a596..3963140d1b5e65 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -41,7 +41,7 @@ using LaunchResponseType = chip::app::Clusters::ContentLauncher::Command using PlaybackResponseType = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type; using NavigateTargetResponseType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type; using GetSetupPINResponseType = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Type; -using Status = Protocols::InteractionModel::Status; +using Status = chip::Protocols::InteractionModel::Status; const std::string FAILURE_KEY = "PlatformError"; const std::string FAILURE_STATUS_KEY = "Status"; @@ -60,7 +60,7 @@ void ContentAppCommandDelegate::InvokeCommand(CommandHandlerInterface::HandlerCo { handlerContext.SetCommandHandled(); handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, - Protocols::InteractionModel::Status::InvalidCommand); + chip::Protocols::InteractionModel::Status::InvalidCommand); return; } @@ -112,7 +112,7 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust if (!mContentAppEndpointManager.HasValidObjectRef()) { - return Protocols::InteractionModel::Status::Failure; + return chip::Protocols::InteractionModel::Status::Failure; } jstring resp = @@ -133,7 +133,7 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust if (!reader.parse(respStr.c_str(), value)) { env->DeleteLocalRef(resp); - return Protocols::InteractionModel::Status::Failure; + return chip::Protocols::InteractionModel::Status::Failure; } } env->DeleteLocalRef(resp); @@ -146,15 +146,15 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust { return static_cast(value[FAILURE_STATUS_KEY].asUInt()); } - return Protocols::InteractionModel::Status::Failure; + return chip::Protocols::InteractionModel::Status::Failure; } - return Protocols::InteractionModel::Status::UnsupportedEndpoint; + return chip::Protocols::InteractionModel::Status::UnsupportedEndpoint; } else { commandHandled = false; - return Protocols::InteractionModel::Status::UnsupportedEndpoint; + return chip::Protocols::InteractionModel::Status::UnsupportedEndpoint; } } @@ -178,7 +178,7 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand handlerContext.mRequestPath, static_cast(value[FAILURE_STATUS_KEY].asUInt())); return; } - handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Protocols::InteractionModel::Status::Failure); + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, chip::Protocols::InteractionModel::Status::Failure); return; } @@ -187,7 +187,7 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand case app::Clusters::ContentLauncher::Id: { Status status; LaunchResponseType launchResponse = FormatContentLauncherResponse(value, status); - if (status != Protocols::InteractionModel::Status::Success) + if (status != chip::Protocols::InteractionModel::Status::Success) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, status); } @@ -201,7 +201,7 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand case app::Clusters::TargetNavigator::Id: { Status status; NavigateTargetResponseType navigateTargetResponse = FormatNavigateTargetResponse(value, status); - if (status != Protocols::InteractionModel::Status::Success) + if (status != chip::Protocols::InteractionModel::Status::Success) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, status); } @@ -215,7 +215,7 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand case app::Clusters::MediaPlayback::Id: { Status status; PlaybackResponseType playbackResponse = FormatMediaPlaybackResponse(value, status); - if (status != Protocols::InteractionModel::Status::Success) + if (status != chip::Protocols::InteractionModel::Status::Success) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, status); } @@ -234,7 +234,7 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand } Status status; GetSetupPINResponseType getSetupPINresponse = FormatGetSetupPINResponse(value, status); - if (status != Protocols::InteractionModel::Status::Success) + if (status != chip::Protocols::InteractionModel::Status::Success) { handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, status); } @@ -251,13 +251,13 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand LaunchResponseType ContentAppCommandDelegate::FormatContentLauncherResponse(Json::Value value, Status & status) { - status = Protocols::InteractionModel::Status::Success; + status = chip::Protocols::InteractionModel::Status::Success; LaunchResponseType launchResponse; std::string statusFieldId = std::to_string(to_underlying(app::Clusters::ContentLauncher::Commands::LauncherResponse::Fields::kStatus)); if (value[statusFieldId].empty()) { - status = Protocols::InteractionModel::Status::Failure; + status = chip::Protocols::InteractionModel::Status::Failure; return launchResponse; } else @@ -275,13 +275,13 @@ LaunchResponseType ContentAppCommandDelegate::FormatContentLauncherResponse(Json NavigateTargetResponseType ContentAppCommandDelegate::FormatNavigateTargetResponse(Json::Value value, Status & status) { - status = Protocols::InteractionModel::Status::Success; + status = chip::Protocols::InteractionModel::Status::Success; NavigateTargetResponseType navigateTargetResponse; std::string statusFieldId = std::to_string(to_underlying(app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Fields::kStatus)); if (value[statusFieldId].empty()) { - status = Protocols::InteractionModel::Status::Failure; + status = chip::Protocols::InteractionModel::Status::Failure; return navigateTargetResponse; } else @@ -299,13 +299,13 @@ NavigateTargetResponseType ContentAppCommandDelegate::FormatNavigateTargetRespon PlaybackResponseType ContentAppCommandDelegate::FormatMediaPlaybackResponse(Json::Value value, Status & status) { - status = Protocols::InteractionModel::Status::Success; + status = chip::Protocols::InteractionModel::Status::Success; PlaybackResponseType playbackResponse; std::string statusFieldId = std::to_string(to_underlying(app::Clusters::MediaPlayback::Commands::PlaybackResponse::Fields::kStatus)); if (value[statusFieldId].empty()) { - status = Protocols::InteractionModel::Status::Failure; + status = chip::Protocols::InteractionModel::Status::Failure; return playbackResponse; } else @@ -323,7 +323,7 @@ PlaybackResponseType ContentAppCommandDelegate::FormatMediaPlaybackResponse(Json GetSetupPINResponseType ContentAppCommandDelegate::FormatGetSetupPINResponse(Json::Value value, Status & status) { - status = Protocols::InteractionModel::Status::Success; + status = chip::Protocols::InteractionModel::Status::Success; GetSetupPINResponseType getSetupPINresponse; std::string setupPINFieldId = std::to_string(to_underlying(app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Fields::kSetupPIN)); diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.h b/examples/tv-app/android/java/ContentAppCommandDelegate.h index a896e55b4ce035..750aff6d34853c 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.h +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.h @@ -34,7 +34,7 @@ namespace chip { namespace AppPlatform { using CommandHandlerInterface = chip::app::CommandHandlerInterface; -using Status = Protocols::InteractionModel::Status; +using Status = chip::Protocols::InteractionModel::Status; using LaunchResponseType = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Type; using PlaybackResponseType = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Type; using NavigateTargetResponseType = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Type; diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index 25e5659b4f6703..caa14b04f9e938 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -295,7 +295,8 @@ uint16_t ContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "ContentLauncherManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/android/java/LevelManager.cpp b/examples/tv-app/android/java/LevelManager.cpp index f8e3dab6aa7773..b79f150c7ae20e 100644 --- a/examples/tv-app/android/java/LevelManager.cpp +++ b/examples/tv-app/android/java/LevelManager.cpp @@ -83,9 +83,9 @@ void LevelManager::PostLevelChanged(chip::EndpointId endpoint, uint8_t value) jboolean LevelManager::SetLevel(jint endpoint, jint value) { - EmberAfStatus status = app::Clusters::LevelControl::Attributes::CurrentLevel::Set(static_cast(endpoint), - static_cast(value)); - return status == EMBER_ZCL_STATUS_SUCCESS; + chip::Protocols::InteractionModel::Status status = app::Clusters::LevelControl::Attributes::CurrentLevel::Set( + static_cast(endpoint), static_cast(value)); + return status == chip::Protocols::InteractionModel::Status::Success; } CHIP_ERROR LevelManager::InitializeWithObjects(jobject managerObject) diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 8da71d5a533193..62abeb12ec30eb 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -614,7 +614,8 @@ uint16_t MediaPlaybackManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "MediaPlaybackManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/android/java/OnOffManager.cpp b/examples/tv-app/android/java/OnOffManager.cpp index c05c20700eabd0..9a330754aa4a16 100644 --- a/examples/tv-app/android/java/OnOffManager.cpp +++ b/examples/tv-app/android/java/OnOffManager.cpp @@ -84,8 +84,9 @@ void OnOffManager::PostOnOffChanged(chip::EndpointId endpoint, bool value) jboolean OnOffManager::SetOnOff(jint endpoint, bool value) { chip::DeviceLayer::StackLock stack; - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(static_cast(endpoint), value); - return status == EMBER_ZCL_STATUS_SUCCESS; + chip::Protocols::InteractionModel::Status status = + app::Clusters::OnOff::Attributes::OnOff::Set(static_cast(endpoint), value); + return status == chip::Protocols::InteractionModel::Status::Success; } CHIP_ERROR OnOffManager::InitializeWithObjects(jobject managerObject) diff --git a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp index 532986f7ba4eea..0f3e5b5036e081 100644 --- a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp @@ -74,7 +74,8 @@ uint16_t AccountLoginManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "AccountLoginManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp b/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp index 82a278b827cd6a..75bb07b5438dd1 100644 --- a/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp +++ b/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp @@ -347,7 +347,8 @@ uint16_t ChannelManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "ChannelManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp index 572209a44d11c3..b062c64b95efd6 100644 --- a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp @@ -214,7 +214,8 @@ uint16_t ContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "ContentLauncherManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp index f97a2e98630e01..456aba87b61b3a 100644 --- a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp +++ b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp @@ -335,7 +335,8 @@ uint16_t MediaPlaybackManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "MediaPlaybackManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp index 0d3a15578b861d..9b907339df02e4 100644 --- a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp @@ -76,7 +76,8 @@ uint16_t TargetNavigatorManager::GetClusterRevision(chip::EndpointId endpoint) } uint16_t clusterRevision = 0; - bool success = (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == EMBER_ZCL_STATUS_SUCCESS); + bool success = + (Attributes::ClusterRevision::Get(endpoint, &clusterRevision) == chip::Protocols::InteractionModel::Status::Success); if (!success) { ChipLogError(Zcl, "TargetNavigatorManager::GetClusterRevision error reading cluster revision"); diff --git a/examples/virtual-device-app/android/java/DoorLockManager.cpp b/examples/virtual-device-app/android/java/DoorLockManager.cpp index 5e85ffc817b4c9..96c66d6bc5bd34 100644 --- a/examples/virtual-device-app/android/java/DoorLockManager.cpp +++ b/examples/virtual-device-app/android/java/DoorLockManager.cpp @@ -49,8 +49,8 @@ void emberAfDoorLockClusterInitCallback(EndpointId endpoint) ChipLogProgress(Zcl, "Device App::DoorLock::PostClusterInit"); DeviceAppJNIMgr().PostClusterInit(chip::app::Clusters::DoorLock::Id, endpoint); DoorLockServer::Instance().InitServer(endpoint); - EmberAfStatus status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0); - if (status != EMBER_ZCL_STATUS_SUCCESS) + Protocols::InteractionModel::Status status = DoorLock::Attributes::FeatureMap::Set(endpoint, 0); + if (status != Protocols::InteractionModel::Status::Success) { ChipLogProgress(Zcl, "Device App::DoorLock::emberAfDoorLockClusterInitCallback()::Updating feature map %x", status); } @@ -104,9 +104,9 @@ DoorLockManager * GetDoorLockManager(EndpointId endpoint) jboolean DoorLockManager::SetLockType(jint endpoint, jint value) { - EmberAfStatus status = app::Clusters::DoorLock::Attributes::LockType::Set( + Protocols::InteractionModel::Status status = app::Clusters::DoorLock::Attributes::LockType::Set( static_cast(endpoint), static_cast(value)); - return status == EMBER_ZCL_STATUS_SUCCESS; + return status == Protocols::InteractionModel::Status::Success; } jboolean DoorLockManager::SetLockState(jint endpoint, jint value) @@ -127,16 +127,16 @@ jboolean DoorLockManager::SetAutoRelockTime(jint endpoint, jint value) jboolean DoorLockManager::SetOperatingMode(jint endpoint, jint value) { - EmberAfStatus status = app::Clusters::DoorLock::Attributes::OperatingMode::Set( + Protocols::InteractionModel::Status status = app::Clusters::DoorLock::Attributes::OperatingMode::Set( static_cast(endpoint), static_cast(value)); - return status == EMBER_ZCL_STATUS_SUCCESS; + return status == Protocols::InteractionModel::Status::Success; } jboolean DoorLockManager::SetSupportedOperatingModes(jint endpoint, jint value) { - EmberAfStatus status = app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Set( + Protocols::InteractionModel::Status status = app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Set( static_cast(endpoint), static_cast(value)); - return status == EMBER_ZCL_STATUS_SUCCESS; + return status == Protocols::InteractionModel::Status::Success; } jboolean DoorLockManager::SendLockAlarmEvent(jint endpoint) diff --git a/examples/virtual-device-app/android/java/OnOffManager.cpp b/examples/virtual-device-app/android/java/OnOffManager.cpp index 2dcede64a8bce5..c058e99a91c111 100644 --- a/examples/virtual-device-app/android/java/OnOffManager.cpp +++ b/examples/virtual-device-app/android/java/OnOffManager.cpp @@ -82,8 +82,9 @@ void OnOffManager::PostOnOffChanged(chip::EndpointId endpoint, bool value) jboolean OnOffManager::SetOnOff(jint endpoint, bool value) { - EmberAfStatus status = app::Clusters::OnOff::Attributes::OnOff::Set(static_cast(endpoint), value); - return status == EMBER_ZCL_STATUS_SUCCESS; + Protocols::InteractionModel::Status status = + app::Clusters::OnOff::Attributes::OnOff::Set(static_cast(endpoint), value); + return status == Protocols::InteractionModel::Status::Success; } CHIP_ERROR OnOffManager::InitializeWithObjects(jobject managerObject) diff --git a/examples/virtual-device-app/android/java/PowerSourceManager.cpp b/examples/virtual-device-app/android/java/PowerSourceManager.cpp index afbdcca23bacb7..e71a5bb1eec692 100644 --- a/examples/virtual-device-app/android/java/PowerSourceManager.cpp +++ b/examples/virtual-device-app/android/java/PowerSourceManager.cpp @@ -83,13 +83,13 @@ jboolean PowerSourceManager::SetBatPercentRemaining(jint endpoint, jint value) { using namespace chip::app::Clusters; using namespace chip::DeviceLayer; - EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; + Protocols::InteractionModel::Status status = Protocols::InteractionModel::Status::Success; status = PowerSource::Attributes::BatPercentRemaining::Set(static_cast(endpoint), static_cast(value * 2)); ChipLogDetail(Zcl, "Device App::PowerSource::SetBatPercentRemaining: endpoint:%d, percent:%d", endpoint, value); - return status == EMBER_ZCL_STATUS_SUCCESS; + return status == Protocols::InteractionModel::Status::Success; } CHIP_ERROR PowerSourceManager::InitializeWithObjects(jobject managerObject) diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index 11d49b7e34ed20..aa0e2654a5e4d3 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -455,7 +455,7 @@ void WindowApp::Cover::Finish() void WindowApp::Cover::LiftStepToward(OperationalState direction) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; chip::Percent100ths percent100ths; NPercent100ths current; @@ -463,7 +463,7 @@ void WindowApp::Cover::LiftStepToward(OperationalState direction) status = Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, current); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { percent100ths = ComputePercent100thsStep(direction, current.Value(), LIFT_DELTA); } @@ -519,7 +519,7 @@ void WindowApp::Cover::LiftUpdate(bool newTarget) void WindowApp::Cover::TiltStepToward(OperationalState direction) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; chip::Percent100ths percent100ths; NPercent100ths current; @@ -527,7 +527,7 @@ void WindowApp::Cover::TiltStepToward(OperationalState direction) status = Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, current); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { percent100ths = ComputePercent100thsStep(direction, current.Value(), TILT_DELTA); } @@ -595,7 +595,7 @@ void WindowApp::Cover::StepToward(OperationalState direction, bool isTilt) void WindowApp::Cover::UpdateTargetPosition(OperationalState direction, bool isTilt) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; NPercent100ths current; chip::Percent100ths target; @@ -604,7 +604,7 @@ void WindowApp::Cover::UpdateTargetPosition(OperationalState direction, bool isT if (isTilt) { status = Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, current); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { target = ComputePercent100thsStep(direction, current.Value(), TILT_DELTA); @@ -614,7 +614,7 @@ void WindowApp::Cover::UpdateTargetPosition(OperationalState direction, bool isT else { status = Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, current); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { target = ComputePercent100thsStep(direction, current.Value(), LIFT_DELTA); diff --git a/examples/window-app/nrfconnect/main/WindowCovering.cpp b/examples/window-app/nrfconnect/main/WindowCovering.cpp index f2d078838a427b..4d200ffa3c919e 100644 --- a/examples/window-app/nrfconnect/main/WindowCovering.cpp +++ b/examples/window-app/nrfconnect/main/WindowCovering.cpp @@ -59,8 +59,10 @@ void WindowCovering::DriveCurrentLiftPosition(intptr_t) NPercent100ths target{}; NPercent100ths positionToSet{}; - VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); - VerifyOrReturn(Attributes::TargetPositionLiftPercent100ths::Get(Endpoint(), target) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == + Protocols::InteractionModel::Status::Success); + VerifyOrReturn(Attributes::TargetPositionLiftPercent100ths::Get(Endpoint(), target) == + Protocols::InteractionModel::Status::Success); OperationalState state = ComputeOperationalState(target, current); UpdateOperationalStatus(MoveType::LIFT, state); @@ -85,7 +87,8 @@ void WindowCovering::DriveCurrentLiftPosition(intptr_t) // assume single move completed Instance().mInLiftMove = false; - VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == + Protocols::InteractionModel::Status::Success); if (!TargetCompleted(MoveType::LIFT, current, target)) { @@ -101,7 +104,7 @@ void WindowCovering::DriveCurrentLiftPosition(intptr_t) chip::Percent100ths WindowCovering::CalculateNextPosition(MoveType aMoveType) { - EmberAfStatus status{}; + Protocols::InteractionModel::Status status{}; chip::Percent100ths percent100ths{}; NPercent100ths current{}; OperationalState opState{}; @@ -117,7 +120,7 @@ chip::Percent100ths WindowCovering::CalculateNextPosition(MoveType aMoveType) opState = OperationalStateGet(Endpoint(), OperationalStatus::kTilt); } - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { static constexpr auto sPercentDelta{ WC_PERCENT100THS_MAX_CLOSED / 20 }; percent100ths = ComputePercent100thsStep(opState, current.Value(), sPercentDelta); @@ -168,8 +171,10 @@ void WindowCovering::DriveCurrentTiltPosition(intptr_t) NPercent100ths target{}; NPercent100ths positionToSet{}; - VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); - VerifyOrReturn(Attributes::TargetPositionTiltPercent100ths::Get(Endpoint(), target) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == + Protocols::InteractionModel::Status::Success); + VerifyOrReturn(Attributes::TargetPositionTiltPercent100ths::Get(Endpoint(), target) == + Protocols::InteractionModel::Status::Success); OperationalState state = ComputeOperationalState(target, current); UpdateOperationalStatus(MoveType::TILT, state); @@ -194,7 +199,8 @@ void WindowCovering::DriveCurrentTiltPosition(intptr_t) // assume single move completed Instance().mInTiltMove = false; - VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == + Protocols::InteractionModel::Status::Success); if (!TargetCompleted(MoveType::TILT, current, target)) { @@ -256,7 +262,7 @@ void WindowCovering::UpdateOperationalStatus(MoveType aMoveType, OperationalStat void WindowCovering::SetTargetPosition(OperationalState aDirection, chip::Percent100ths aPosition) { - EmberAfStatus status{}; + Protocols::InteractionModel::Status status{}; if (Instance().mCurrentUIMoveType == MoveType::LIFT) { status = Attributes::TargetPositionLiftPercent100ths::Set(Endpoint(), aPosition); @@ -266,7 +272,7 @@ void WindowCovering::SetTargetPosition(OperationalState aDirection, chip::Percen status = Attributes::TargetPositionTiltPercent100ths::Set(Endpoint(), aPosition); } - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != Protocols::InteractionModel::Status::Success) { LOG_ERR("Cannot set the target position. Error: %d", static_cast(status)); } @@ -274,13 +280,13 @@ void WindowCovering::SetTargetPosition(OperationalState aDirection, chip::Percen void WindowCovering::PositionLEDUpdate(MoveType aMoveType) { - EmberAfStatus status{}; + Protocols::InteractionModel::Status status{}; NPercent100ths currentPosition{}; if (aMoveType == MoveType::LIFT) { status = Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), currentPosition); - if (EMBER_ZCL_STATUS_SUCCESS == status && !currentPosition.IsNull()) + if (Protocols::InteractionModel::Status::Success == status && !currentPosition.IsNull()) { Instance().SetBrightness(MoveType::LIFT, currentPosition.Value()); } @@ -288,7 +294,7 @@ void WindowCovering::PositionLEDUpdate(MoveType aMoveType) else if (aMoveType == MoveType::TILT) { status = Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), currentPosition); - if (EMBER_ZCL_STATUS_SUCCESS == status && !currentPosition.IsNull()) + if (Protocols::InteractionModel::Status::Success == status && !currentPosition.IsNull()) { Instance().SetBrightness(MoveType::TILT, currentPosition.Value()); } @@ -343,4 +349,6 @@ void WindowCovering::DoPostAttributeChange(intptr_t aArg) VerifyOrReturn(data != nullptr); PostAttributeChange(data->mEndpoint, data->mAttributeId); + + chip::Platform::Delete(data); } diff --git a/examples/window-app/nrfconnect/main/ZclCallbacks.cpp b/examples/window-app/nrfconnect/main/ZclCallbacks.cpp index 63b9b10d32b852..428d488ceadc0c 100644 --- a/examples/window-app/nrfconnect/main/ZclCallbacks.cpp +++ b/examples/window-app/nrfconnect/main/ZclCallbacks.cpp @@ -82,8 +82,8 @@ void MatterWindowCoveringClusterServerAttributeChangedCallback(const app::Concre void emberAfWindowCoveringClusterInitCallback(chip::EndpointId endpoint) { - const auto logOnFailure = [](EmberAfStatus status, const char * attributeName) { - if (status != EMBER_ZCL_STATUS_SUCCESS) + const auto logOnFailure = [](Protocols::InteractionModel::Status status, const char * attributeName) { + if (status != Protocols::InteractionModel::Status::Success) { ChipLogError(Zcl, "Failed to set WindowCovering %s: %x", attributeName, status); } @@ -92,7 +92,7 @@ void emberAfWindowCoveringClusterInitCallback(chip::EndpointId endpoint) app::DataModel::Nullable currentPercent100ths; app::DataModel::Nullable targetPercent100ths; app::DataModel::Nullable currentPercentage; - EmberAfStatus status; + Protocols::InteractionModel::Status status; status = Attributes::CurrentPositionLiftPercentage::Get(endpoint, currentPercentage); if (currentPercentage.IsNull()) diff --git a/examples/window-app/silabs/src/WindowManager.cpp b/examples/window-app/silabs/src/WindowManager.cpp index 309fb393565990..58716b82af4a52 100644 --- a/examples/window-app/silabs/src/WindowManager.cpp +++ b/examples/window-app/silabs/src/WindowManager.cpp @@ -275,7 +275,7 @@ void WindowManager::Cover::Init(chip::EndpointId endpoint) void WindowManager::Cover::LiftStepToward(OperationalState direction) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; chip::Percent100ths percent100ths; NPercent100ths current; @@ -283,7 +283,7 @@ void WindowManager::Cover::LiftStepToward(OperationalState direction) status = Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, current); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { percent100ths = ComputePercent100thsStep(direction, current.Value(), LIFT_DELTA); } @@ -339,7 +339,7 @@ void WindowManager::Cover::LiftUpdate(bool newTarget) void WindowManager::Cover::TiltStepToward(OperationalState direction) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; chip::Percent100ths percent100ths; NPercent100ths current; @@ -347,7 +347,7 @@ void WindowManager::Cover::TiltStepToward(OperationalState direction) status = Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, current); chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { percent100ths = ComputePercent100thsStep(direction, current.Value(), TILT_DELTA); } @@ -403,7 +403,7 @@ void WindowManager::Cover::TiltUpdate(bool newTarget) void WindowManager::Cover::UpdateTargetPosition(OperationalState direction, bool isTilt) { - EmberAfStatus status; + Protocols::InteractionModel::Status status; NPercent100ths current; chip::Percent100ths target; @@ -412,7 +412,7 @@ void WindowManager::Cover::UpdateTargetPosition(OperationalState direction, bool if (isTilt) { status = Attributes::CurrentPositionTiltPercent100ths::Get(mEndpoint, current); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { target = ComputePercent100thsStep(direction, current.Value(), TILT_DELTA); (void) Attributes::TargetPositionTiltPercent100ths::Set(mEndpoint, target); @@ -421,7 +421,7 @@ void WindowManager::Cover::UpdateTargetPosition(OperationalState direction, bool else { status = Attributes::CurrentPositionLiftPercent100ths::Get(mEndpoint, current); - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == Protocols::InteractionModel::Status::Success) && !current.IsNull()) { target = ComputePercent100thsStep(direction, current.Value(), LIFT_DELTA); (void) Attributes::TargetPositionLiftPercent100ths::Set(mEndpoint, target); diff --git a/examples/window-app/telink/src/WindowCovering.cpp b/examples/window-app/telink/src/WindowCovering.cpp index a8cae9d37e597b..5c1b8d10559c33 100644 --- a/examples/window-app/telink/src/WindowCovering.cpp +++ b/examples/window-app/telink/src/WindowCovering.cpp @@ -59,8 +59,10 @@ void WindowCovering::DriveCurrentLiftPosition(intptr_t) NPercent100ths target{}; NPercent100ths positionToSet{}; - VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); - VerifyOrReturn(Attributes::TargetPositionLiftPercent100ths::Get(Endpoint(), target) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == + chip::Protocols::InteractionModel::Status::Success); + VerifyOrReturn(Attributes::TargetPositionLiftPercent100ths::Get(Endpoint(), target) == + chip::Protocols::InteractionModel::Status::Success); UpdateOperationalStatus(WindowCoveringType::Lift, ComputeOperationalState(target, current)); @@ -70,7 +72,8 @@ void WindowCovering::DriveCurrentLiftPosition(intptr_t) // assume single move completed Instance().mInLiftMove = false; - VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), current) == + chip::Protocols::InteractionModel::Status::Success); if (!TargetCompleted(WindowCoveringType::Lift, current, target)) { @@ -86,7 +89,7 @@ void WindowCovering::DriveCurrentLiftPosition(intptr_t) chip::Percent100ths WindowCovering::CalculateSingleStep(WindowCoveringType aMoveType) { - EmberAfStatus status{}; + chip::Protocols::InteractionModel::Status status{}; chip::Percent100ths percent100ths{}; NPercent100ths current{}; OperationalState opState = OperationalState::Stall; @@ -102,7 +105,7 @@ chip::Percent100ths WindowCovering::CalculateSingleStep(WindowCoveringType aMove opState = OperationalStateGet(Endpoint(), OperationalStatus::kTilt); } - if ((status == EMBER_ZCL_STATUS_SUCCESS) && !current.IsNull()) + if ((status == chip::Protocols::InteractionModel::Status::Success) && !current.IsNull()) { percent100ths = ComputePercent100thsStep(opState, current.Value(), sPercentDelta); } @@ -152,8 +155,10 @@ void WindowCovering::DriveCurrentTiltPosition(intptr_t) NPercent100ths target{}; NPercent100ths positionToSet{}; - VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); - VerifyOrReturn(Attributes::TargetPositionTiltPercent100ths::Get(Endpoint(), target) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == + chip::Protocols::InteractionModel::Status::Success); + VerifyOrReturn(Attributes::TargetPositionTiltPercent100ths::Get(Endpoint(), target) == + chip::Protocols::InteractionModel::Status::Success); UpdateOperationalStatus(WindowCoveringType::Lift, ComputeOperationalState(target, current)); @@ -163,7 +168,8 @@ void WindowCovering::DriveCurrentTiltPosition(intptr_t) // assume single move completed Instance().mInTiltMove = false; - VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == EMBER_ZCL_STATUS_SUCCESS); + VerifyOrReturn(Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), current) == + chip::Protocols::InteractionModel::Status::Success); if (!TargetCompleted(WindowCoveringType::Tilt, current, target)) { @@ -225,7 +231,7 @@ void WindowCovering::UpdateOperationalStatus(WindowCoveringType aMoveType, Opera void WindowCovering::SetTargetPosition(OperationalState aDirection, chip::Percent100ths aPosition) { - EmberAfStatus status{}; + chip::Protocols::InteractionModel::Status status{}; if (Instance().mCurrentUIMoveType == WindowCoveringType::Lift) { status = Attributes::TargetPositionLiftPercent100ths::Set(Endpoint(), aPosition); @@ -235,7 +241,7 @@ void WindowCovering::SetTargetPosition(OperationalState aDirection, chip::Percen status = Attributes::TargetPositionTiltPercent100ths::Set(Endpoint(), aPosition); } - if (status != EMBER_ZCL_STATUS_SUCCESS) + if (status != chip::Protocols::InteractionModel::Status::Success) { LOG_ERR("Cannot set the target position. Error: %d", static_cast(status)); } @@ -243,13 +249,13 @@ void WindowCovering::SetTargetPosition(OperationalState aDirection, chip::Percen void WindowCovering::PositionLEDUpdate(WindowCoveringType aMoveType) { - EmberAfStatus status{}; + chip::Protocols::InteractionModel::Status status{}; NPercent100ths currentPosition{}; if (aMoveType == WindowCoveringType::Lift) { status = Attributes::CurrentPositionLiftPercent100ths::Get(Endpoint(), currentPosition); - if (EMBER_ZCL_STATUS_SUCCESS == status && !currentPosition.IsNull()) + if (chip::Protocols::InteractionModel::Status::Success == status && !currentPosition.IsNull()) { Instance().SetBrightness(WindowCoveringType::Lift, currentPosition.Value()); } @@ -257,7 +263,7 @@ void WindowCovering::PositionLEDUpdate(WindowCoveringType aMoveType) else if (aMoveType == WindowCoveringType::Tilt) { status = Attributes::CurrentPositionTiltPercent100ths::Get(Endpoint(), currentPosition); - if (EMBER_ZCL_STATUS_SUCCESS == status && !currentPosition.IsNull()) + if (chip::Protocols::InteractionModel::Status::Success == status && !currentPosition.IsNull()) { Instance().SetBrightness(WindowCoveringType::Tilt, currentPosition.Value()); } diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index c69f9d495fa975..9f7314c14010ad 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -48,7 +48,7 @@ if [ "$#" == "0" ]; then $USAGE - Root Location of the app e.g: examples/lighting-app/efr32/ + Root Location of the app e.g: examples/lighting-app/silabs/ Desired location for the output files diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index 88bbf9844c9407..9e3e3e966c20d3 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -55,22 +55,6 @@ CHIP_ERROR CreateChipAttributePath(JNIEnv * env, const app::ConcreteDataAttribut return CHIP_NO_ERROR; } -CHIP_ERROR ReportCallback::CreateChipEventPath(JNIEnv * env, const app::ConcreteEventPath & aPath, jobject & outObj) -{ - jclass eventPathCls = nullptr; - ReturnErrorOnFailure( - JniReferences::GetInstance().GetLocalClassRef(env, "chip/devicecontroller/model/ChipEventPath", eventPathCls)); - - jmethodID eventPathCtor = - env->GetStaticMethodID(eventPathCls, "newInstance", "(IJJ)Lchip/devicecontroller/model/ChipEventPath;"); - VerifyOrReturnError(eventPathCtor != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); - - outObj = env->CallStaticObjectMethod(eventPathCls, eventPathCtor, static_cast(aPath.mEndpointId), - static_cast(aPath.mClusterId), static_cast(aPath.mEventId)); - VerifyOrReturnError(outObj != nullptr, CHIP_JNI_ERROR_NULL_OBJECT); - return CHIP_NO_ERROR; -} - GetConnectedDeviceCallback::GetConnectedDeviceCallback(jobject wrapperCallback, jobject javaCallback) : mOnSuccess(OnDeviceConnectedFn, this), mOnFailure(OnDeviceConnectionFailureFn, this) { @@ -270,6 +254,30 @@ CHIP_ERROR ConvertReportTlvToJson(const uint32_t id, TLV::TLVReader & data, std: return TlvToJson(readerForJson, json); } +static CHIP_ERROR CreateStatus(JNIEnv * env, const app::StatusIB & aStatus, jobject & outObj) +{ + jclass statusCls = nullptr; + ReturnErrorOnFailure(JniReferences::GetInstance().GetLocalClassRef(env, "chip/devicecontroller/model/Status", statusCls)); + jmethodID statusCtor = nullptr; + if (aStatus.mClusterStatus.HasValue()) + { + statusCtor = env->GetStaticMethodID(statusCls, "newInstance", "(II)Lchip/devicecontroller/model/Status;"); + VerifyOrReturnError(!env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); + VerifyOrReturnError(statusCtor != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + outObj = env->CallStaticObjectMethod(statusCls, statusCtor, static_cast(aStatus.mStatus), + static_cast(aStatus.mClusterStatus.Value())); + } + else + { + statusCtor = env->GetStaticMethodID(statusCls, "newInstance", "(I)Lchip/devicecontroller/model/Status;"); + VerifyOrReturnError(!env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); + VerifyOrReturnError(statusCtor != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + outObj = env->CallStaticObjectMethod(statusCls, statusCtor, static_cast(aStatus.mStatus)); + } + VerifyOrReturnError(outObj != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + return CHIP_NO_ERROR; +} + void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPath, TLV::TLVReader * apData, const app::StatusIB & aStatus) { @@ -277,14 +285,28 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); VerifyOrReturn(env != nullptr, ChipLogError(Controller, "Could not get JNIEnv for current thread")); JniLocalReferenceScope scope(env); - - jobject attributePathObj = nullptr; - err = CreateChipAttributePath(env, aPath, attributePathObj); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Unable to create Java ChipAttributePath: %s", ErrorStr(err))); - VerifyOrReturn(!aPath.IsListItemOperation(), ChipLogError(Controller, "Expect non-list item operation"); aPath.LogPath()); - VerifyOrReturn(aStatus.IsSuccess(), ChipLogError(Controller, "Receive bad status %s", ErrorStr(aStatus.ToChipError())); - aPath.LogPath()); + + jobject nodeState = mNodeStateObj.ObjectRef(); + if (aStatus.IsFailure()) + { + ChipLogError(Controller, "Receive bad status %s", ErrorStr(aStatus.ToChipError())); + jobject statusObj = nullptr; + err = CreateStatus(env, aStatus, statusObj); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Controller, "Fail to create status with error %" CHIP_ERROR_FORMAT, err.Format())); + // Add Attribute Status to NodeState + jmethodID addAttributeStatusMethod = nullptr; + err = JniReferences::GetInstance().FindMethod(env, nodeState, "addAttributeStatus", + "(IJJLchip/devicecontroller/model/Status;)V", &addAttributeStatusMethod); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Controller, "Could not find addAttributeStatus method with error %" CHIP_ERROR_FORMAT, err.Format())); + env->CallVoidMethod(nodeState, addAttributeStatusMethod, static_cast(aPath.mEndpointId), + static_cast(aPath.mClusterId), static_cast(aPath.mAttributeId), statusObj); + VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe()); + return; + } VerifyOrReturn(apData != nullptr, ChipLogError(Controller, "Receive empty apData"); aPath.LogPath()); TLV::TLVReader readerForJavaTLV; @@ -345,7 +367,6 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat VerifyOrReturn(attributeStateObj != nullptr, ChipLogError(Controller, "Could not create AttributeState object"); aPath.LogPath()); - jobject nodeState = mNodeStateObj.ObjectRef(); // Add AttributeState to NodeState jmethodID addAttributeMethod; err = JniReferences::GetInstance().FindMethod(env, nodeState, "addAttribute", @@ -401,10 +422,28 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); VerifyOrReturn(env != nullptr, ChipLogError(Controller, "Could not get JNIEnv for current thread")); - jobject eventPathObj = nullptr; - err = CreateChipEventPath(env, aEventHeader.mPath, eventPathObj); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Unable to create Java ChipEventPath: %s", ErrorStr(err))); + jobject nodeState = mNodeStateObj.ObjectRef(); + if (apStatus != nullptr && apStatus->IsFailure()) + { + ChipLogError(Controller, "Receive bad status %s", ErrorStr(apStatus->ToChipError())); + jobject statusObj = nullptr; + err = CreateStatus(env, *apStatus, statusObj); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Controller, "Fail to create status with error %" CHIP_ERROR_FORMAT, err.Format())); + // Add Event Status to NodeState + jmethodID addEventStatusMethod; + err = JniReferences::GetInstance().FindMethod(env, nodeState, "addEventStatus", + "(IJJLchip/devicecontroller/model/Status;)V", &addEventStatusMethod); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Controller, "Could not find addEventStatus method with error %" CHIP_ERROR_FORMAT, err.Format())); + env->CallVoidMethod(nodeState, addEventStatusMethod, static_cast(aEventHeader.mPath.mEndpointId), + static_cast(aEventHeader.mPath.mClusterId), static_cast(aEventHeader.mPath.mEventId), + statusObj); + VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe()); + return; + } VerifyOrReturn(apData != nullptr, ChipLogError(Controller, "Receive empty apData"); aEventHeader.LogPath()); TLV::TLVReader readerForJavaTLV; @@ -484,7 +523,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV // Add EventState to NodeState jmethodID addEventMethod; - jobject nodeState = mNodeStateObj.ObjectRef(); + err = JniReferences::GetInstance().FindMethod(env, nodeState, "addEvent", "(IJJLchip/devicecontroller/model/EventState;)V", &addEventMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find addEvent method with error %s", ErrorStr(err)); diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 0f68fcebb6ed6e..0e5beda7115ae6 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -482,6 +482,7 @@ android_library("java") { "src/chip/devicecontroller/model/EventState.java", "src/chip/devicecontroller/model/InvokeElement.java", "src/chip/devicecontroller/model/NodeState.java", + "src/chip/devicecontroller/model/Status.java", ] if (matter_enable_tlv_decoder_api) { diff --git a/src/controller/java/src/chip/devicecontroller/model/ClusterState.java b/src/controller/java/src/chip/devicecontroller/model/ClusterState.java index 4c575f1a41df66..6ebe40e99fe0a2 100644 --- a/src/controller/java/src/chip/devicecontroller/model/ClusterState.java +++ b/src/controller/java/src/chip/devicecontroller/model/ClusterState.java @@ -32,12 +32,19 @@ public final class ClusterState { private static final String TAG = "ClusterState"; private Map attributes; private Map> events; + private Map attributeStatuses; + private Map> eventStatuses; private Optional dataVersion; - public ClusterState( - Map attributes, Map> events) { + protected ClusterState( + Map attributes, + Map> events, + Map attributeStatuses, + Map> eventStatuses) { this.attributes = attributes; this.events = events; + this.attributeStatuses = attributeStatuses; + this.eventStatuses = eventStatuses; this.dataVersion = Optional.empty(); } @@ -45,10 +52,18 @@ public Map getAttributeStates() { return attributes; } + public Map getAttributeStatuses() { + return attributeStatuses; + } + public Map> getEventStates() { return events; } + public Map> getEventStatuses() { + return eventStatuses; + } + public void setDataVersion(long version) { dataVersion = Optional.of(version); } @@ -130,6 +145,25 @@ public String toString() { builder.append("\n"); }); }); + attributeStatuses.forEach( + (attributeId, status) -> { + builder.append("Attribute Status "); + builder.append(attributeId); + builder.append(": "); + builder.append(status.toString()); + builder.append("\n"); + }); + eventStatuses.forEach( + (eventId, status) -> { + status.forEach( + (eventState) -> { + builder.append("Event Status"); + builder.append(eventId); + builder.append(": "); + builder.append(status.toString()); + builder.append("\n"); + }); + }); return builder.toString(); } } diff --git a/src/controller/java/src/chip/devicecontroller/model/NodeState.java b/src/controller/java/src/chip/devicecontroller/model/NodeState.java index decd9782f5369a..f77097b5452f62 100644 --- a/src/controller/java/src/chip/devicecontroller/model/NodeState.java +++ b/src/controller/java/src/chip/devicecontroller/model/NodeState.java @@ -55,10 +55,15 @@ private void addAttribute( ClusterState clusterState = endpointState.getClusterState(clusterId); if (clusterState == null) { - clusterState = new ClusterState(new HashMap<>(), new HashMap<>()); + clusterState = + new ClusterState(new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>()); endpointState.getClusterStates().put(clusterId, clusterState); } + if (clusterState.getAttributeStatuses().containsKey(attributeId)) { + clusterState.getAttributeStatuses().remove(attributeId); + } + // This will overwrite previous attributes. clusterState.getAttributeStates().put(attributeId, attributeStateToAdd); } @@ -72,16 +77,70 @@ private void addEvent(int endpointId, long clusterId, long eventId, EventState e ClusterState clusterState = endpointState.getClusterState(clusterId); if (clusterState == null) { - clusterState = new ClusterState(new HashMap<>(), new HashMap<>()); + clusterState = + new ClusterState(new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>()); endpointState.getClusterStates().put(clusterId, clusterState); } if (!clusterState.getEventStates().containsKey(eventId)) { clusterState.getEventStates().put(eventId, new ArrayList()); } + + if (clusterState.getEventStatuses().containsKey(eventId)) { + clusterState.getEventStatuses().remove(eventId); + } + clusterState.getEventStates().get(eventId).add(eventStateToAdd); } + // Called from native code only, which ignores access modifiers. + private void addAttributeStatus( + int endpointId, long clusterId, long attributeId, Status statusToAdd) { + EndpointState endpointState = getEndpointState(endpointId); + if (endpointState == null) { + endpointState = new EndpointState(new HashMap<>()); + getEndpointStates().put(endpointId, endpointState); + } + + ClusterState clusterState = endpointState.getClusterState(clusterId); + if (clusterState == null) { + clusterState = + new ClusterState(new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>()); + endpointState.getClusterStates().put(clusterId, clusterState); + } + + if (clusterState.getAttributeStates().containsKey(attributeId)) { + clusterState.getAttributeStates().remove(attributeId); + } + + clusterState.getAttributeStatuses().put(attributeId, statusToAdd); + } + + private void addEventStatus(int endpointId, long clusterId, long eventId, Status statusToAdd) { + EndpointState endpointState = getEndpointState(endpointId); + if (endpointState == null) { + endpointState = new EndpointState(new HashMap<>()); + getEndpointStates().put(endpointId, endpointState); + } + + ClusterState clusterState = endpointState.getClusterState(clusterId); + if (clusterState == null) { + clusterState = + new ClusterState(new HashMap<>(), new HashMap<>(), new HashMap<>(), new HashMap<>()); + endpointState.getClusterStates().put(clusterId, clusterState); + } + + if (!clusterState.getEventStatuses().containsKey(eventId)) { + clusterState.getEventStatuses().put(eventId, new ArrayList()); + } + + if (clusterState.getEventStates().containsKey(eventId)) { + clusterState.getEventStates().remove(eventId); + } + + clusterState.getEventStatuses().get(eventId).add(statusToAdd); + } + @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/src/controller/java/src/chip/devicecontroller/model/Status.java b/src/controller/java/src/chip/devicecontroller/model/Status.java new file mode 100644 index 00000000000000..7391f9a312f3f7 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/model/Status.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package chip.devicecontroller.model; + +import java.util.Locale; +import java.util.Optional; + +public final class Status { + private Integer status; + private Optional clusterStatus; + + private Status(int status, Optional clusterStatus) { + this.status = status; + this.clusterStatus = clusterStatus; + } + + // Getters + public Integer getStatus() { + return status; + } + + public Optional getClusterStatus() { + return clusterStatus; + } + + public String toString() { + return String.format( + Locale.ENGLISH, + "status %s, clusterStatus %s", + String.valueOf(status), + clusterStatus.isPresent() ? String.valueOf(clusterStatus.get()) : "None"); + } + + public static Status newInstance(int status, int clusterStatus) { + return new Status(status, Optional.of(clusterStatus)); + } + + public static Status newInstance(int status) { + return new Status(status, Optional.empty()); + } +} diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 24b9efcec73ff2..91191285701e33 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -8608,6 +8608,10 @@ # for now just start doing that for new additions to it. - TestDifferentVendorMeiRequest - TestDifferentVendorMeiResponse + GeneralDiagnostics: + # Targeting Spring 2024 Matter release + - PayloadTestRequest + - PayloadTestResponse structs: Thermostat: # Targeting Spring 2024 Matter release @@ -8651,6 +8655,9 @@ - PresetTypeFeaturesBitmap - ScheduleTypeFeaturesBitmap - TemperatureSetpointHoldPolicyBitmap + GeneralDiagnostics: + # Targeting Spring 2024 Matter release + - Feature bitmap values: DoorLock: Feature: