diff --git a/examples/all-clusters-app/all-clusters-common/include/EVSECallbacks.h b/examples/all-clusters-app/all-clusters-common/include/EVSECallbacks.h deleted file mode 100644 index 5bdac2f8e853d6..00000000000000 --- a/examples/all-clusters-app/all-clusters-common/include/EVSECallbacks.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ - -#pragma once - -namespace chip { -namespace app { -namespace Clusters { - -using namespace chip::app::Clusters::EnergyEvse; - -/* This callbacks mechanism is intended to allow different delegates to - * dispatch notifications that something has changed. - * - * This is not specific to the EnergyEVSE cluster, but includes DeviceEnergyManagement - * and potential future clusters. - */ -enum EVSECallbackType -{ - /* - * The State has changed (e.g. from Disabled to Charging, or vice-versa) - */ - StateChanged, - /* - * ChargeCurrent has changed - */ - ChargeCurrentChanged, - /* - * Charging Preferences have changed - */ - ChargingPreferencesChanged, - /* - * DeviceEnergyManagement has changed - */ - DeviceEnergyManagementChanged, -}; - -struct EVSECbInfo -{ - EVSECallbackType type; - - union - { - /* for type = StateChanged */ - struct - { - StateEnum state; - SupplyStateEnum supplyState; - } StateChange; - - /* for type = ChargeCurrentChanged */ - struct - { - int64_t maximumChargeCurrent; - } ChargingCurrent; - }; -}; - -typedef void (*EVSECallbackFunc)(const EVSECbInfo * cb, intptr_t arg); - -struct EVSECallbackWrapper -{ - EVSECallbackFunc handler; - intptr_t arg; -}; - -} // namespace Clusters -} // namespace app -} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/include/EnergyEvseDelegateImpl.h b/examples/all-clusters-app/all-clusters-common/include/EnergyEvseDelegateImpl.h deleted file mode 100644 index f3c003d081fc6e..00000000000000 --- a/examples/all-clusters-app/all-clusters-common/include/EnergyEvseDelegateImpl.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ - -#pragma once - -#include "app/clusters/energy-evse-server/energy-evse-server.h" -#include - -#include -#include -#include - -using chip::Protocols::InteractionModel::Status; -namespace chip { -namespace app { -namespace Clusters { -namespace EnergyEvse { - -/** - * The application delegate. - */ - -class EnergyEvseDelegate : public EnergyEvse::Delegate -{ -public: - ~EnergyEvseDelegate(); - - /** - * @brief Called when EVSE cluster receives Disable command - */ - Status Disable() override; - - /** - * @brief Called when EVSE cluster receives EnableCharging command - * - * @param chargingEnabledUntil - * @param minimumChargeCurrent (in mA) - * @param maximumChargeCurrent (in mA) - */ - Status EnableCharging(const DataModel::Nullable & chargingEnabledUntil, const int64_t & minimumChargeCurrent, - const int64_t & maximumChargeCurrent) override; - - /** - * @brief Called when EVSE cluster receives EnableDischarging command - * - * @param dischargingEnabledUntil - * @param maximumChargeCurrent (in mA) - */ - Status EnableDischarging(const DataModel::Nullable & dischargingEnabledUntil, - const int64_t & maximumDischargeCurrent) override; - - /** - * @brief Called when EVSE cluster receives StartDiagnostics command - */ - Status StartDiagnostics() override; - - /** - * @brief Called by EVSE Hardware to register a single callback handler - */ - Status HwRegisterEvseCallbackHandler(EVSECallbackFunc handler, intptr_t arg); - - // ----------------------------------------------------------------- - // Internal API to allow an EVSE to change its internal state etc - Status HwSetMaxHardwareCurrentLimit(int64_t currentmA); - Status HwSetCircuitCapacity(int64_t currentmA); - Status HwSetCableAssemblyLimit(int64_t currentmA); - Status HwSetState(StateEnum state); - Status HwSetFault(FaultStateEnum fault); - Status HwSetRFID(ByteSpan uid); - Status HwSetVehicleID(const CharSpan & vehID); - - // ------------------------------------------------------------------ - // Get attribute methods - StateEnum GetState() override; - CHIP_ERROR SetState(StateEnum); - - SupplyStateEnum GetSupplyState() override; - CHIP_ERROR SetSupplyState(SupplyStateEnum); - - FaultStateEnum GetFaultState() override; - CHIP_ERROR SetFaultState(FaultStateEnum); - - DataModel::Nullable GetChargingEnabledUntil() override; - CHIP_ERROR SetChargingEnabledUntil(uint32_t); - - DataModel::Nullable GetDischargingEnabledUntil() override; - CHIP_ERROR SetDischargingEnabledUntil(uint32_t); - - int64_t GetCircuitCapacity() override; - CHIP_ERROR SetCircuitCapacity(int64_t); - - int64_t GetMinimumChargeCurrent() override; - CHIP_ERROR SetMinimumChargeCurrent(int64_t); - - int64_t GetMaximumChargeCurrent() override; - CHIP_ERROR SetMaximumChargeCurrent(int64_t); - - int64_t GetMaximumDischargeCurrent() override; - CHIP_ERROR SetMaximumDischargeCurrent(int64_t); - - int64_t GetUserMaximumChargeCurrent() override; - CHIP_ERROR SetUserMaximumChargeCurrent(int64_t) override; - - uint32_t GetRandomizationDelayWindow() override; - CHIP_ERROR SetRandomizationDelayWindow(uint32_t) override; - - /* PREF attributes */ - uint8_t GetNumberOfWeeklyTargets() override; - uint8_t GetNumberOfDailyTargets() override; - DataModel::Nullable GetNextChargeStartTime() override; - DataModel::Nullable GetNextChargeTargetTime() override; - DataModel::Nullable GetNextChargeRequiredEnergy() override; - DataModel::Nullable GetNextChargeTargetSoC() override; - - DataModel::Nullable GetApproximateEVEfficiency() override; - CHIP_ERROR SetApproximateEVEfficiency(uint16_t) override; - - /* SOC attributes */ - DataModel::Nullable GetStateOfCharge() override; - DataModel::Nullable GetBatteryCapacity() override; - /* PNC attributes*/ - DataModel::Nullable GetVehicleID() override; - /* Session SESS attributes */ - DataModel::Nullable GetSessionID() override; - DataModel::Nullable GetSessionDuration() override; - DataModel::Nullable GetSessionEnergyCharged() override; - DataModel::Nullable GetSessionEnergyDischarged() override; - -private: - /* Constants */ - static constexpr int DEFAULT_MIN_CHARGE_CURRENT = 6000; /* 6A */ - static constexpr int DEFAULT_USER_MAXIMUM_CHARGE_CURRENT = kMaximumChargeCurrent; /* 80A */ - static constexpr int DEFAULT_RANDOMIZATION_DELAY_WINDOW = 600; /* 600s */ - static constexpr int kMaxVehicleIDBufSize = 32; - - /* private variables for controlling the hardware - these are not attributes */ - int64_t mMaxHardwareCurrentLimit = 0; /* Hardware current limit in mA */ - int64_t mCableAssemblyCurrentLimit = 0; /* Cable limit detected when cable is plugged in, in mA */ - int64_t mMaximumChargingCurrentLimitFromCommand = 0; /* Value of current maximum limit when charging enabled */ - int64_t mActualChargingCurrentLimit = 0; - StateEnum mHwState = StateEnum::kNotPluggedIn; /* Hardware state */ - - /* Callback related */ - EVSECallbackWrapper mCallbacks = { .handler = nullptr, .arg = 0 }; /* Wrapper to allow callbacks to be registered */ - Status NotifyApplicationCurrentLimitChange(int64_t maximumChargeCurrent); - Status NotifyApplicationStateChange(); - - /** - * @brief Helper function to work out the charge limit based on conditions and settings - */ - Status ComputeMaxChargeCurrentLimit(); - - /* Attributes */ - StateEnum mState = StateEnum::kNotPluggedIn; - SupplyStateEnum mSupplyState = SupplyStateEnum::kDisabled; - FaultStateEnum mFaultState = FaultStateEnum::kNoError; - DataModel::Nullable mChargingEnabledUntil; // TODO Default to 0 to indicate disabled - DataModel::Nullable mDischargingEnabledUntil; // TODO Default to 0 to indicate disabled - int64_t mCircuitCapacity = 0; - int64_t mMinimumChargeCurrent = DEFAULT_MIN_CHARGE_CURRENT; - int64_t mMaximumChargeCurrent = 0; - int64_t mMaximumDischargeCurrent = 0; - int64_t mUserMaximumChargeCurrent = DEFAULT_USER_MAXIMUM_CHARGE_CURRENT; // TODO update spec - uint32_t mRandomizationDelayWindow = DEFAULT_RANDOMIZATION_DELAY_WINDOW; - /* PREF attributes */ - uint8_t mNumberOfWeeklyTargets = 0; - uint8_t mNumberOfDailyTargets = 1; - DataModel::Nullable mNextChargeStartTime; - DataModel::Nullable mNextChargeTargetTime; - DataModel::Nullable mNextChargeRequiredEnergy; - DataModel::Nullable mNextChargeTargetSoC; - DataModel::Nullable mApproximateEVEfficiency; - - /* SOC attributes */ - DataModel::Nullable mStateOfCharge; - DataModel::Nullable mBatteryCapacity; - - /* PNC attributes*/ - DataModel::Nullable mVehicleID; - - /* Session SESS attributes */ - DataModel::Nullable mSessionID; - DataModel::Nullable mSessionDuration; - DataModel::Nullable mSessionEnergyCharged; - DataModel::Nullable mSessionEnergyDischarged; -}; - -} // namespace EnergyEvse -} // namespace Clusters -} // namespace app -} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/include/EnergyEvseManager.h b/examples/all-clusters-app/all-clusters-common/include/EnergyEvseManager.h deleted file mode 100644 index 9875c397990ef2..00000000000000 --- a/examples/all-clusters-app/all-clusters-common/include/EnergyEvseManager.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ - -#pragma once - -#include -#include -#include -#include - -namespace chip { -namespace app { -namespace Clusters { - -using namespace chip::app::Clusters::EnergyEvse; -class EnergyEvseManager : public Instance -{ -public: - EnergyEvseManager(EndpointId aEndpointId, EnergyEvseDelegate & aDelegate, Feature aFeature, OptionalAttributes aOptionalAttrs, - OptionalCommands aOptionalCmds) : - EnergyEvse::Instance(aEndpointId, aDelegate, aFeature, aOptionalAttrs, aOptionalCmds) - { - mDelegate = &aDelegate; - } - - // Delete copy constructor and assignment operator. - EnergyEvseManager(const EnergyEvseManager &) = delete; - EnergyEvseManager(const EnergyEvseManager &&) = delete; - EnergyEvseManager & operator=(const EnergyEvseManager &) = delete; - - CHIP_ERROR Init(); - void Shutdown(); - - EnergyEvseDelegate * GetDelegate() { return mDelegate; }; - -private: - EnergyEvseDelegate * mDelegate; -}; - -} // namespace Clusters -} // namespace app -} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp b/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp deleted file mode 100644 index 4cc83eaaf8a835..00000000000000 --- a/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp +++ /dev/null @@ -1,847 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ - -#include -#include -#include -#include - -using namespace chip; -using namespace chip::app; -using namespace chip::app::DataModel; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::EnergyEvse; -using namespace chip::app::Clusters::EnergyEvse::Attributes; - -using chip::app::LogEvent; -using chip::Protocols::InteractionModel::Status; - -EnergyEvseDelegate::~EnergyEvseDelegate() -{ - // TODO Fix this as part of issue #30993 refactoring - if (!mVehicleID.IsNull()) - { - ChipLogDetail(AppServer, "Freeing VehicleID"); - delete[] mVehicleID.Value().data(); - } -} - -/** - * @brief Called when EVSE cluster receives Disable command - */ -Status EnergyEvseDelegate::Disable() -{ - ChipLogProgress(AppServer, "EnergyEvseDelegate::Disable()"); - - /* Update State */ - switch (mHwState) - { - case StateEnum::kNotPluggedIn: - SetState(StateEnum::kNotPluggedIn); - break; - - case StateEnum::kPluggedInNoDemand: - SetState(StateEnum::kPluggedInNoDemand); - break; - - case StateEnum::kPluggedInDemand: - SetState(StateEnum::kPluggedInDemand); - break; - - default: - ChipLogError(AppServer, "Unexpected EVSE hardware state"); - SetState(StateEnum::kFault); - break; - } - - /* update SupplyState */ - SetSupplyState(SupplyStateEnum::kDisabled); - - /* update ChargingEnabledUntil & DischargingEnabledUntil to show 0 */ - SetChargingEnabledUntil(0); - SetDischargingEnabledUntil(0); - - /* update MinimumChargeCurrent & MaximumChargeCurrent to 0 */ - SetMinimumChargeCurrent(0); - SetMaximumChargeCurrent(0); - - /* update MaximumDischargeCurrent to 0 */ - SetMaximumDischargeCurrent(0); - - NotifyApplicationStateChange(); - // TODO: Generate events - - return Status::Success; -} - -/** - * @brief Called when EVSE cluster receives EnableCharging command - * - * @param chargingEnabledUntil (can be null to indefinite charging) - * @param minimumChargeCurrent (in mA) - * @param maximumChargeCurrent (in mA) - */ -Status EnergyEvseDelegate::EnableCharging(const DataModel::Nullable & chargingEnabledUntil, - const int64_t & minimumChargeCurrent, const int64_t & maximumChargeCurrent) -{ - ChipLogProgress(AppServer, "EnergyEvseDelegate::EnableCharging()"); - - if (maximumChargeCurrent < kMinimumChargeCurrent || maximumChargeCurrent > kMaximumChargeCurrent) - { - ChipLogError(AppServer, "Maximum Current outside limits"); - return Status::ConstraintError; - } - - if (minimumChargeCurrent < kMinimumChargeCurrent || minimumChargeCurrent > kMaximumChargeCurrent) - { - ChipLogError(AppServer, "Maximum Current outside limits"); - return Status::ConstraintError; - } - - if (minimumChargeCurrent > maximumChargeCurrent) - { - ChipLogError(AppServer, "Minium Current > Maximum Current!"); - return Status::ConstraintError; - } - - if (chargingEnabledUntil.IsNull()) - { - /* Charging enabled indefinitely */ - ChipLogError(AppServer, "Charging enabled indefinitely"); - } - else - { - /* check chargingEnabledUntil is in the future */ - ChipLogError(AppServer, "Charging enabled until: %lu", static_cast(chargingEnabledUntil.Value())); - // TODO - // if (checkChargingEnabled) - } - - /* Check current state isn't already enabled */ - - /* If charging is already enabled, check that the parameters may have - changed, these may override an existing charging command */ - switch (mHwState) - { - case StateEnum::kNotPluggedIn: - // TODO handle errors here - SetState(StateEnum::kNotPluggedIn); - break; - - case StateEnum::kPluggedInNoDemand: - // TODO handle errors here - // TODO REFACTOR per Andrei's comment in PR30857 - can we collapse this switch statement? - SetState(StateEnum::kPluggedInNoDemand); - break; - - case StateEnum::kPluggedInDemand: - /* If the EVSE is asking for demand then enable charging */ - SetState(StateEnum::kPluggedInCharging); - break; - - default: - ChipLogError(AppServer, "Unexpected EVSE hardware state"); - SetState(StateEnum::kFault); - break; - } - - /* update SupplyState to say that charging is now enabled */ - SetSupplyState(SupplyStateEnum::kChargingEnabled); - - /* If it looks ok, store the min & max charging current */ - mMaximumChargingCurrentLimitFromCommand = maximumChargeCurrent; - SetMinimumChargeCurrent(minimumChargeCurrent); - // TODO persist these to KVS - - // TODO: Generate events - - NotifyApplicationStateChange(); - - return this->ComputeMaxChargeCurrentLimit(); -} - -/** - * @brief Called when EVSE cluster receives EnableDischarging command - * - * @param dischargingEnabledUntil (can be null to indefinite discharging) - * @param maximumChargeCurrent (in mA) - */ -Status EnergyEvseDelegate::EnableDischarging(const DataModel::Nullable & dischargingEnabledUntil, - const int64_t & maximumDischargeCurrent) -{ - ChipLogProgress(AppServer, "EnergyEvseDelegate::EnableDischarging() called."); - - /* update SupplyState */ - SetSupplyState(SupplyStateEnum::kDischargingEnabled); - - // TODO: Generate events - - NotifyApplicationStateChange(); - - return Status::Success; -} - -/** - * @brief Called when EVSE cluster receives StartDiagnostics command - */ -Status EnergyEvseDelegate::StartDiagnostics() -{ - /* For EVSE manufacturers to customize */ - ChipLogProgress(AppServer, "EnergyEvseDelegate::StartDiagnostics()"); - - /* update SupplyState to indicate we are now in Diagnostics mode */ - SetSupplyState(SupplyStateEnum::kDisabledDiagnostics); - - // TODO: Generate events - - // TODO: Notify Application to implement Diagnostics - - NotifyApplicationStateChange(); - - return Status::Success; -} - -/* --------------------------------------------------------------------------- - * EVSE Hardware interface below - */ - -/** - * @brief Called by EVSE Hardware to register a callback handler mechanism - * - * This is normally called at start-up. - * - * @param EVSECallbackFunct - function pointer to call - * @param intptr_t - optional context to provide back to callback handler - */ -Status EnergyEvseDelegate::HwRegisterEvseCallbackHandler(EVSECallbackFunc handler, intptr_t arg) -{ - if (mCallbacks.handler != nullptr) - { - ChipLogError(AppServer, "Callback handler already initialized"); - return Status::Failure; - } - mCallbacks.handler = handler; - mCallbacks.arg = arg; - - return Status::Success; -} - -/** - * @brief Called by EVSE Hardware to notify the delegate of the maximum - * current limit supported by the hardware. - * - * This is normally called at start-up. - * - * @param currentmA - Maximum current limit supported by the hardware - */ -Status EnergyEvseDelegate::HwSetMaxHardwareCurrentLimit(int64_t currentmA) -{ - if (currentmA < kMinimumChargeCurrent || currentmA > kMaximumChargeCurrent) - { - return Status::ConstraintError; - } - - /* there is no attribute to store this so store in private variable */ - mMaxHardwareCurrentLimit = currentmA; - - return this->ComputeMaxChargeCurrentLimit(); -} - -/** - * @brief Called by EVSE Hardware to notify the delegate of maximum electrician - * set current limit. - * - * This is normally called at start-up when reading from DIP-switch - * settings. - * - * @param currentmA - Maximum current limit specified by electrician - */ -Status EnergyEvseDelegate::HwSetCircuitCapacity(int64_t currentmA) -{ - if (currentmA < kMinimumChargeCurrent || currentmA > kMaximumChargeCurrent) - { - return Status::ConstraintError; - } - - mCircuitCapacity = currentmA; - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, CircuitCapacity::Id); - - return this->ComputeMaxChargeCurrentLimit(); -} - -/** - * @brief Called by EVSE Hardware to notify the delegate of the cable assembly - * current limit. - * - * This is normally called when the EV is plugged into the EVSE and the - * PP voltage is measured by the EVSE. A pull-up resistor in the cable - * causes a voltage drop. Different current limits can be indicated - * using different resistors, which results in different voltages - * measured by the EVSE. - * - * @param currentmA - Maximum current limit detected from Cable assembly - */ -Status EnergyEvseDelegate::HwSetCableAssemblyLimit(int64_t currentmA) -{ - if (currentmA < kMinimumChargeCurrent || currentmA > kMaximumChargeCurrent) - { - return Status::ConstraintError; - } - - /* there is no attribute to store this so store in private variable */ - mCableAssemblyCurrentLimit = currentmA; - - return this->ComputeMaxChargeCurrentLimit(); -} - -/** - * @brief Called by EVSE Hardware to indicate if EV is detected - * - * The only allowed states that the EVSE hardware can set are: - * kNotPluggedIn - * kPluggedInNoDemand - * kPluggedInDemand - * - * @param StateEnum - the state of the EV being plugged in and asking for demand etc - */ -Status EnergyEvseDelegate::HwSetState(StateEnum state) -{ - switch (state) - { - case StateEnum::kNotPluggedIn: - // TODO - work out logic here - mHwState = state; - break; - case StateEnum::kPluggedInNoDemand: - // TODO - work out logic here - mHwState = state; - break; - case StateEnum::kPluggedInDemand: - // TODO - work out logic here - mHwState = state; - break; - - default: - /* All other states should be managed by the Delegate */ - // TODO (assert?) - break; - } - - return Status::Success; -} - -/** - * @brief Called by EVSE Hardware to indicate a fault - * - * @param FaultStateEnum - the fault condition detected - */ -Status EnergyEvseDelegate::HwSetFault(FaultStateEnum fault) -{ - ChipLogProgress(AppServer, "EnergyEvseDelegate::Fault()"); - - if (fault == FaultStateEnum::kNoError) - { - /* Update State to previous state */ - // TODO: need to work out the logic here! - - /* Update SupplyState to previous state */ - } - else - { - /* Update State & SupplyState */ - SetState(StateEnum::kFault); - SetSupplyState(SupplyStateEnum::kDisabledError); - } - - /* Update FaultState */ - SetFaultState(fault); - - // TODO: Generate events - - return Status::Success; -} - -/** - * @brief Called by EVSE Hardware to Send a RFID event - * - * @param ByteSpan RFID tag value (max 10 octets) - */ -Status EnergyEvseDelegate::HwSetRFID(ByteSpan uid) -{ - Events::Rfid::Type event{ .uid = uid }; - EventNumber eventNumber; - CHIP_ERROR error = LogEvent(event, mEndpointId, eventNumber); - if (CHIP_NO_ERROR != error) - { - ChipLogError(Zcl, "[Notify] Unable to send notify event: %s [endpointId=%d]", error.AsString(), mEndpointId); - return Status::Failure; - } - - return Status::Success; -} - -/** - * @brief Called by EVSE Hardware to share the VehicleID - * - * This routine will make a copy of the string so the callee doesn't - * have to hold onto it forever. - * - * @param CharSpan containing up to 32 chars. - */ -Status EnergyEvseDelegate::HwSetVehicleID(const CharSpan & newValue) -{ - // TODO this code to be refactored - See Issue #30993 - if (!mVehicleID.IsNull() && newValue.data_equal(mVehicleID.Value())) - { - return Status::Success; - } - - /* create a copy of the string so the callee doesn't have to keep it */ - char * destinationBuffer = new char[kMaxVehicleIDBufSize]; - - MutableCharSpan destinationString(destinationBuffer, kMaxVehicleIDBufSize); - CHIP_ERROR err = CopyCharSpanToMutableCharSpan(newValue, destinationString); - if (err != CHIP_NO_ERROR) - { - ChipLogError(AppServer, "HwSetVehicleID - could not copy vehicleID"); - delete[] destinationBuffer; - return Status::Failure; - } - - if (!mVehicleID.IsNull()) - { - delete[] mVehicleID.Value().data(); - } - - mVehicleID = MakeNullable(static_cast(destinationString)); - - ChipLogDetail(AppServer, "VehicleID updated %.*s", static_cast(mVehicleID.Value().size()), mVehicleID.Value().data()); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, VehicleID::Id); - - return Status::Success; -} - -/* --------------------------------------------------------------------------- - * Functions below are private helper functions internal to the delegate - */ - -/** - * @brief Called to compute the safe charging current limit - * - * mActualChargingCurrentLimit is the minimum of: - * - MaxHardwareCurrentLimit (of the hardware) - * - CircuitCapacity (set by the electrician - less than the hardware) - * - CableAssemblyLimit (detected when the cable is inserted) - * - MaximumChargeCurrent (from charging command) - * - UserMaximumChargeCurrent (could dynamically change) - * - */ -Status EnergyEvseDelegate::ComputeMaxChargeCurrentLimit() -{ - int64_t oldValue; - - oldValue = mActualChargingCurrentLimit; - mActualChargingCurrentLimit = mMaxHardwareCurrentLimit; - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mCircuitCapacity); - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mCableAssemblyCurrentLimit); - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mMaximumChargingCurrentLimitFromCommand); - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mUserMaximumChargeCurrent); - - /* Set the actual max charging current attribute */ - mMaximumChargeCurrent = mActualChargingCurrentLimit; - - if (oldValue != mMaximumChargeCurrent) - { - ChipLogDetail(AppServer, "MaximumChargeCurrent updated to %ld", static_cast(mMaximumChargeCurrent)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, MaximumChargeCurrent::Id); - - /* Call the EV Charger hardware current limit callback */ - NotifyApplicationCurrentLimitChange(mMaximumChargeCurrent); - } - return Status::Success; -} - -Status EnergyEvseDelegate::NotifyApplicationCurrentLimitChange(int64_t maximumChargeCurrent) -{ - EVSECbInfo cbInfo; - - cbInfo.type = EVSECallbackType::ChargeCurrentChanged; - cbInfo.ChargingCurrent.maximumChargeCurrent = maximumChargeCurrent; - - if (mCallbacks.handler != nullptr) - { - mCallbacks.handler(&cbInfo, mCallbacks.arg); - } - - return Status::Success; -} - -Status EnergyEvseDelegate::NotifyApplicationStateChange() -{ - EVSECbInfo cbInfo; - - cbInfo.type = EVSECallbackType::StateChanged; - cbInfo.StateChange.state = mState; - cbInfo.StateChange.supplyState = mSupplyState; - - if (mCallbacks.handler != nullptr) - { - mCallbacks.handler(&cbInfo, mCallbacks.arg); - } - - return Status::Success; -} - -/** - * Attribute methods - */ -/* State */ -StateEnum EnergyEvseDelegate::GetState() -{ - return mState; -} - -CHIP_ERROR EnergyEvseDelegate::SetState(StateEnum newValue) -{ - StateEnum oldValue = mState; - if (newValue >= StateEnum::kUnknownEnumValue) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mState = newValue; - if (oldValue != mState) - { - ChipLogDetail(AppServer, "State updated to %d", static_cast(mState)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, State::Id); - } - - return CHIP_NO_ERROR; -} - -/* SupplyState */ -SupplyStateEnum EnergyEvseDelegate::GetSupplyState() -{ - return mSupplyState; -} - -CHIP_ERROR EnergyEvseDelegate::SetSupplyState(SupplyStateEnum newValue) -{ - SupplyStateEnum oldValue = mSupplyState; - - if (newValue >= SupplyStateEnum::kUnknownEnumValue) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mSupplyState = newValue; - if (oldValue != mSupplyState) - { - ChipLogDetail(AppServer, "SupplyState updated to %d", static_cast(mSupplyState)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SupplyState::Id); - } - return CHIP_NO_ERROR; -} - -/* FaultState */ -FaultStateEnum EnergyEvseDelegate::GetFaultState() -{ - return mFaultState; -} - -CHIP_ERROR EnergyEvseDelegate::SetFaultState(FaultStateEnum newValue) -{ - FaultStateEnum oldValue = mFaultState; - - if (newValue >= FaultStateEnum::kUnknownEnumValue) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mFaultState = newValue; - if (oldValue != mFaultState) - { - ChipLogDetail(AppServer, "FaultState updated to %d", static_cast(mFaultState)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, FaultState::Id); - } - return CHIP_NO_ERROR; -} - -/* ChargingEnabledUntil */ -DataModel::Nullable EnergyEvseDelegate::GetChargingEnabledUntil() -{ - return mChargingEnabledUntil; -} - -CHIP_ERROR EnergyEvseDelegate::SetChargingEnabledUntil(uint32_t newValue) -{ - DataModel::Nullable oldValue = mChargingEnabledUntil; - - mChargingEnabledUntil = MakeNullable(newValue); - if ((oldValue.IsNull()) || (oldValue.Value() != newValue)) - { - ChipLogDetail(AppServer, "ChargingEnabledUntil updated to %lu", - static_cast(mChargingEnabledUntil.Value())); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, ChargingEnabledUntil::Id); - } - return CHIP_NO_ERROR; -} - -/* DischargingEnabledUntil */ -DataModel::Nullable EnergyEvseDelegate::GetDischargingEnabledUntil() -{ - return mDischargingEnabledUntil; -} - -CHIP_ERROR EnergyEvseDelegate::SetDischargingEnabledUntil(uint32_t newValue) -{ - DataModel::Nullable oldValue = mDischargingEnabledUntil; - - mDischargingEnabledUntil = MakeNullable(newValue); - if ((oldValue.IsNull()) || (oldValue.Value() != newValue)) - { - ChipLogDetail(AppServer, "DischargingEnabledUntil updated to %lu", - static_cast(mDischargingEnabledUntil.Value())); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, DischargingEnabledUntil::Id); - } - return CHIP_NO_ERROR; -} - -/* CircuitCapacity */ -int64_t EnergyEvseDelegate::GetCircuitCapacity() -{ - return mCircuitCapacity; -} - -CHIP_ERROR EnergyEvseDelegate::SetCircuitCapacity(int64_t newValue) -{ - int64_t oldValue = mCircuitCapacity; - - if (newValue >= kMaximumChargeCurrent) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mCircuitCapacity = newValue; - if (oldValue != mCircuitCapacity) - { - ChipLogDetail(AppServer, "CircuitCapacity updated to %ld", static_cast(mCircuitCapacity)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, CircuitCapacity::Id); - } - return CHIP_NO_ERROR; -} - -/* MinimumChargeCurrent */ -int64_t EnergyEvseDelegate::GetMinimumChargeCurrent() -{ - return mMinimumChargeCurrent; -} - -CHIP_ERROR EnergyEvseDelegate::SetMinimumChargeCurrent(int64_t newValue) -{ - int64_t oldValue = mMinimumChargeCurrent; - - if (newValue >= kMaximumChargeCurrent) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mMinimumChargeCurrent = newValue; - if (oldValue != mMinimumChargeCurrent) - { - ChipLogDetail(AppServer, "MinimumChargeCurrent updated to %ld", static_cast(mMinimumChargeCurrent)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, MinimumChargeCurrent::Id); - } - return CHIP_NO_ERROR; -} - -/* MaximumChargeCurrent */ -int64_t EnergyEvseDelegate::GetMaximumChargeCurrent() -{ - return mMaximumChargeCurrent; -} - -CHIP_ERROR EnergyEvseDelegate::SetMaximumChargeCurrent(int64_t newValue) -{ - int64_t oldValue = mMaximumChargeCurrent; - - if (newValue >= kMaximumChargeCurrent) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mMaximumChargeCurrent = newValue; - if (oldValue != mMaximumChargeCurrent) - { - ChipLogDetail(AppServer, "MaximumChargeCurrent updated to %ld", static_cast(mMaximumChargeCurrent)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, MaximumChargeCurrent::Id); - } - return CHIP_NO_ERROR; -} - -/* MaximumDischargeCurrent */ -int64_t EnergyEvseDelegate::GetMaximumDischargeCurrent() -{ - return mMaximumDischargeCurrent; -} - -CHIP_ERROR EnergyEvseDelegate::SetMaximumDischargeCurrent(int64_t newValue) -{ - int64_t oldValue = mMaximumDischargeCurrent; - - if (newValue >= kMaximumChargeCurrent) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mMaximumDischargeCurrent = newValue; - if (oldValue != mMaximumDischargeCurrent) - { - ChipLogDetail(AppServer, "MaximumDischargeCurrent updated to %ld", static_cast(mMaximumDischargeCurrent)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, MaximumDischargeCurrent::Id); - } - return CHIP_NO_ERROR; -} - -/* UserMaximumChargeCurrent */ -int64_t EnergyEvseDelegate::GetUserMaximumChargeCurrent() -{ - return mUserMaximumChargeCurrent; -} - -CHIP_ERROR EnergyEvseDelegate::SetUserMaximumChargeCurrent(int64_t newValue) -{ - if ((newValue < 0) || (newValue > kMaximumChargeCurrent)) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - int64_t oldValue = mUserMaximumChargeCurrent; - mUserMaximumChargeCurrent = newValue; - if (oldValue != newValue) - { - ChipLogDetail(AppServer, "UserMaximumChargeCurrent updated to %ld", static_cast(mUserMaximumChargeCurrent)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, UserMaximumChargeCurrent::Id); - } - - return CHIP_NO_ERROR; -} - -/* RandomizationDelayWindow */ -uint32_t EnergyEvseDelegate::GetRandomizationDelayWindow() -{ - return mRandomizationDelayWindow; -} - -CHIP_ERROR EnergyEvseDelegate::SetRandomizationDelayWindow(uint32_t newValue) -{ - uint32_t oldValue = mRandomizationDelayWindow; - if (newValue > kMaxRandomizationDelayWindow) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - - mRandomizationDelayWindow = newValue; - if (oldValue != newValue) - { - ChipLogDetail(AppServer, "RandomizationDelayWindow updated to %lu", - static_cast(mRandomizationDelayWindow)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, RandomizationDelayWindow::Id); - } - return CHIP_NO_ERROR; -} - -/* PREF attributes */ -uint8_t EnergyEvseDelegate::GetNumberOfWeeklyTargets() -{ - return mNumberOfWeeklyTargets; -} -uint8_t EnergyEvseDelegate::GetNumberOfDailyTargets() -{ - return mNumberOfDailyTargets; -} -DataModel::Nullable EnergyEvseDelegate::GetNextChargeStartTime() -{ - return mNextChargeStartTime; -} -DataModel::Nullable EnergyEvseDelegate::GetNextChargeTargetTime() -{ - return mNextChargeTargetTime; -} -DataModel::Nullable EnergyEvseDelegate::GetNextChargeRequiredEnergy() -{ - return mNextChargeRequiredEnergy; -} -DataModel::Nullable EnergyEvseDelegate::GetNextChargeTargetSoC() -{ - return mNextChargeTargetSoC; -} - -/* ApproximateEVEfficiency */ -DataModel::Nullable EnergyEvseDelegate::GetApproximateEVEfficiency() -{ - return mApproximateEVEfficiency; -} - -CHIP_ERROR EnergyEvseDelegate::SetApproximateEVEfficiency(uint16_t newValue) -{ - DataModel::Nullable oldValue = mApproximateEVEfficiency; - - mApproximateEVEfficiency = MakeNullable(newValue); - if ((oldValue.IsNull()) || (oldValue.Value() != newValue)) - { - ChipLogDetail(AppServer, "ApproximateEVEfficiency updated to %d", mApproximateEVEfficiency.Value()); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, ApproximateEVEfficiency::Id); - } - - return CHIP_NO_ERROR; -} - -/* SOC attributes */ -DataModel::Nullable EnergyEvseDelegate::GetStateOfCharge() -{ - return mStateOfCharge; -} -DataModel::Nullable EnergyEvseDelegate::GetBatteryCapacity() -{ - return mBatteryCapacity; -} - -/* PNC attributes*/ -DataModel::Nullable EnergyEvseDelegate::GetVehicleID() -{ - return mVehicleID; -} - -/* Session SESS attributes */ -DataModel::Nullable EnergyEvseDelegate::GetSessionID() -{ - return mSessionID; -} -DataModel::Nullable EnergyEvseDelegate::GetSessionDuration() -{ - return mSessionDuration; -} -DataModel::Nullable EnergyEvseDelegate::GetSessionEnergyCharged() -{ - return mSessionEnergyCharged; -} -DataModel::Nullable EnergyEvseDelegate::GetSessionEnergyDischarged() -{ - return mSessionEnergyDischarged; -} diff --git a/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp b/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp deleted file mode 100644 index 0d84d8856212e0..00000000000000 --- a/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ - -#include - -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::EnergyEvse; - -CHIP_ERROR EnergyEvseManager::Init() -{ - return Instance::Init(); -} - -void EnergyEvseManager::Shutdown() -{ - Instance::Shutdown(); -} diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index f3c6a54854c475..2ba95602857620 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -156,8 +156,6 @@ list( ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp - ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp - ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp @@ -176,6 +174,9 @@ list( ${chip_dir}/examples/all-clusters-app/ameba/main/ManualOperationCommand.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/SmokeCOAlarmManager.cpp + ${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp + ${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp + ${chip_dir}/examples/platform/ameba/route_hook/ameba_route_hook.c ${chip_dir}/examples/platform/ameba/route_hook/ameba_route_table.c @@ -220,6 +221,7 @@ target_include_directories( ${chip_dir}/zzz_generated/app-common ${chip_dir}/examples/all-clusters-app/all-clusters-common ${chip_dir}/examples/all-clusters-app/all-clusters-common/include + ${chip_dir}/examples/energy-management-app/energy-management-common/include ${chip_dir}/examples/all-clusters-app/ameba/main/include ${chip_dir}/examples/platform/ameba ${chip_dir}/examples/platform/ameba/route_hook diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index 75c4a3171cfd4a..4774d48e93952c 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -71,8 +71,6 @@ asr_executable("clusters_app") { output_name = "chip-asr-clusters-example.out" sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", @@ -82,6 +80,8 @@ asr_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${examples_plat_dir}/ButtonHandler.cpp", "${examples_plat_dir}/CHIPDeviceManager.cpp", "${examples_plat_dir}/LEDWidget.cpp", @@ -111,6 +111,7 @@ asr_executable("clusters_app") { "${examples_plat_dir}", "${asr_project_dir}/include", "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", "${chip_root}/src", "${chip_root}/src/lib", "${chip_root}/src/lib/support", diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn index ad07e2c7a0da32..dec41e71dc265c 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -75,8 +75,6 @@ ti_simplelink_executable("all-clusters-app") { output_name = "chip-${ti_simplelink_board}-all-clusters-example.out" sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", @@ -87,6 +85,8 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", "${project_dir}/main/AppTask.cpp", "${project_dir}/main/ClusterManager.cpp", @@ -112,6 +112,7 @@ ti_simplelink_executable("all-clusters-app") { "${project_dir}", "${project_dir}/main", "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", "${chip_root}/examples/providers/", ] diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index c35afae97aabba..0fd26ca07fdc5f 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -78,8 +78,6 @@ ti_simplelink_executable("all-clusters-app") { output_name = "chip-${ti_simplelink_board}-all-clusters-example.out" sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", @@ -90,6 +88,8 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", "${project_dir}/main/AppTask.cpp", "${project_dir}/main/ClusterManager.cpp", @@ -116,6 +116,7 @@ ti_simplelink_executable("all-clusters-app") { "${project_dir}", "${project_dir}/main", "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", "${chip_root}/examples/providers/", ] diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 5680634c786678..e8851aa5a4d3d5 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -18,6 +18,7 @@ # The list of src and include dirs must be in sync with that in all-clusters-app/esp32/main/component.mk set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index b99dc84405e841..f406b3ac5d6eab 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -107,8 +107,6 @@ psoc6_executable("clusters_app") { output_name = "chip-psoc6-clusters-example.out" sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", @@ -118,6 +116,8 @@ psoc6_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${examples_plat_dir}/LEDWidget.cpp", "${examples_plat_dir}/init_psoc6Platform.cpp", "src/AppTask.cpp", @@ -141,6 +141,7 @@ psoc6_executable("clusters_app") { "${examples_plat_dir}", "${psoc6_project_dir}/include", "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", ] defines = [] diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index b3eb61c29f875a..af9414529ca76e 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -21,8 +21,6 @@ import("${chip_root}/src/platform/device.gni") source_set("chip-all-clusters-common") { sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", @@ -41,6 +39,8 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "AllClustersCommandDelegate.cpp", "AppOptions.cpp", "WindowCoveringManager.cpp", @@ -57,8 +57,10 @@ source_set("chip-all-clusters-common") { "${chip_root}/third_party/jsoncpp", ] - include_dirs = - [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] + include_dirs = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", + ] cflags = [ "-Wconversion" ] diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 79a48c85938f78..7a240a57dc8424 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -7,6 +7,7 @@ get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) get_filename_component(ALL_CLUSTERS_COMMON ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common REALPATH) +get_filename_component(ENERGY_MANAGEMENT_COMMON ${CHIP_ROOT}/examples/energy-management-app/energy-management-common/ REALPATH) get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH) configure_file( @@ -49,6 +50,7 @@ target_include_directories(${APP_TARGET} PRIVATE main/include/ ${MBED_COMMON}/util/include ${ALL_CLUSTERS_COMMON}/include + ${ENERGY_MANAGEMENT_COMMON}/include ${GEN_DIR}/app-common ${GEN_DIR}/all-clusters-app ${NLIO_ROOT} @@ -63,13 +65,13 @@ target_sources(${APP_TARGET} PRIVATE ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp - ${ALL_CLUSTERS_COMMON}/src/EnergyEvseDelegateImpl.cpp - ${ALL_CLUSTERS_COMMON}/src/EnergyEvseManager.cpp ${ALL_CLUSTERS_COMMON}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp ${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-temperature-levels.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp ) chip_configure_data_model(${APP_TARGET} diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 72b93e0647724c..f9d635bdd2c3a9 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -19,6 +19,7 @@ get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connect get_filename_component(NRFCONNECT_COMMON ${CHIP_ROOT}/examples/platform/nrfconnect REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) get_filename_component(ALL_CLUSTERS_COMMON_DIR ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common REALPATH) +get_filename_component(ENERGY_MANAGEMENT_COMMON_DIR ${CHIP_ROOT}/examples/energy-management-app/energy-management-common/ REALPATH) include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake) @@ -49,6 +50,7 @@ include(${CHIP_ROOT}/src/app/chip_data_model.cmake) target_include_directories(app PRIVATE main/include ${ALL_CLUSTERS_COMMON_DIR}/include + ${ENERGY_MANAGEMENT_COMMON_DIR}/include ${GEN_DIR}/app-common ${GEN_DIR}/all-clusters-app ${NRFCONNECT_COMMON}/util/include) @@ -61,13 +63,13 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/EnergyEvseManager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index ab7be5a04d64c1..89c8b05b9a842e 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -71,11 +71,10 @@ mw320_executable("shell_mw320") { "${chip_root}/src", "${chip_root}/src/app/util", "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", "${chip_root}/examples/all-clusters-app/nxp/mw320/include", ] sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", @@ -85,6 +84,8 @@ mw320_executable("shell_mw320") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${chip_root}/src/lib/shell/streamer_mw320.cpp", "binding-handler.cpp", "include/CHIPProjectConfig.h", diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt index dce8295b300cb4..6f8b679f52a52b 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -20,6 +20,7 @@ get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) get_filename_component(OPEN_IOT_SDK_CONFIG ${CHIP_ROOT}/config/openiotsdk REALPATH) get_filename_component(OPEN_IOT_SDK_EXAMPLE_COMMON ${CHIP_ROOT}/examples/platform/openiotsdk REALPATH) get_filename_component(ALL_CLUSTERS_COMMON ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common REALPATH) +get_filename_component(ENERGY_MANAGEMENT_COMMON ${CHIP_ROOT}/examples/energy-management-app/energy-management-common/ REALPATH) list(APPEND CMAKE_MODULE_PATH ${OPEN_IOT_SDK_CONFIG}/cmake) @@ -47,6 +48,7 @@ target_include_directories(${APP_TARGET} PRIVATE main/include ${ALL_CLUSTERS_COMMON}/include + ${ENERGY_MANAGEMENT_COMMON}/include ) target_sources(${APP_TARGET} @@ -57,12 +59,12 @@ target_sources(${APP_TARGET} ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp - ${ALL_CLUSTERS_COMMON}/src/EnergyEvseDelegateImpl.cpp - ${ALL_CLUSTERS_COMMON}/src/EnergyEvseManager.cpp ${ALL_CLUSTERS_COMMON}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp ) target_link_libraries(${APP_TARGET} diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index fa279aa4c8a90f..7448fd76c4d91f 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -19,6 +19,7 @@ get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connect get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) get_filename_component(ALL_CLUSTERS_COMMON_DIR ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common REALPATH) +get_filename_component(ENERGY_MANAGEMENT_COMMON_DIR ${CHIP_ROOT}/examples/energy-management-app/energy-management-common/ REALPATH) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") set(LOCAL_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") @@ -65,6 +66,7 @@ target_compile_options(app PRIVATE -fpermissive) target_include_directories(app PRIVATE include ${ALL_CLUSTERS_COMMON_DIR}/include + ${ENERGY_MANAGEMENT_COMMON_DIR}/include ${GEN_DIR}/app-common ${GEN_DIR}/all-clusters-app ${TELINK_COMMON}/common/include @@ -84,10 +86,10 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp - ${ALL_CLUSTERS_COMMON_DIR}/src/EnergyEvseManager.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp ${TELINK_COMMON}/common/src/AppTaskCommon.cpp ${TELINK_COMMON}/util/src/LEDWidget.cpp diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index 6960ec6aa6d516..6af51a7f176b8a 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -23,8 +23,6 @@ assert(chip_build_tools) source_set("chip-all-clusters-common") { sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", @@ -35,6 +33,8 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", ] deps = [ @@ -43,8 +43,10 @@ source_set("chip-all-clusters-common") { "${chip_root}/src/lib/shell:shell_core", ] - include_dirs = - [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] + include_dirs = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", + ] } executable("chip-all-clusters-app") { diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index 33582927c19d26..cb38515a1a8770 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -19,6 +19,7 @@ # The list of src and include dirs must be in sync with that in all-clusters-minimal-app/esp32/main/component.mk set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/include" "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" @@ -80,6 +81,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" diff --git a/examples/shell/shell_common/BUILD.gn b/examples/shell/shell_common/BUILD.gn index b870628717d8e5..a54df29c798955 100644 --- a/examples/shell/shell_common/BUILD.gn +++ b/examples/shell/shell_common/BUILD.gn @@ -64,17 +64,19 @@ static_library("shell_common") { import("${chip_root}/src/app/chip_data_model.gni") sources += [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", ] - include_dirs = - [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] + include_dirs = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/energy-management-app/energy-management-common/include", + ] public_deps += [ "${chip_root}/examples/all-clusters-app/all-clusters-common" ]