Skip to content

Commit 2563698

Browse files
Merge 50fb815 into a7ee9d4
2 parents a7ee9d4 + 50fb815 commit 2563698

File tree

22 files changed

+2950
-795
lines changed

22 files changed

+2950
-795
lines changed

examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ static std::unique_ptr<EnergyEvseDelegate> gDelegate;
2626
static std::unique_ptr<EvseTargetsDelegate> gEvseTargetsDelegate;
2727
static std::unique_ptr<EnergyEvseManager> gInstance;
2828

29+
EndpointId GetEnergyDeviceEndpointId()
30+
{
31+
return chip::EndpointId(1);
32+
}
33+
2934
void emberAfEnergyEvseClusterInitCallback(chip::EndpointId endpointId)
3035
{
3136
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.

examples/all-clusters-app/linux/main-common.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp3TagList[] = { {
124124
.tag = kTagSwitchesUp } };
125125
const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp4TagList[] = { { .namespaceID = kNamespaceSwitches,
126126
.tag = kTagSwitchesDown } };
127+
127128
} // namespace
128129

129130
#ifdef MATTER_DM_PLUGIN_DISHWASHER_ALARM_SERVER
@@ -256,7 +257,7 @@ void ApplicationInit()
256257
Clusters::ValveConfigurationAndControl::SetDefaultDelegate(chip::EndpointId(1), &sValveDelegate);
257258
Clusters::TimeSynchronization::SetDefaultDelegate(&sTimeSyncDelegate);
258259

259-
Clusters::WaterHeaterManagement::WhmApplicationInit();
260+
Clusters::WaterHeaterManagement::WhmApplicationInit(chip::EndpointId(1));
260261

261262
SetTagList(/* endpoint= */ 0, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp0TagList));
262263
SetTagList(/* endpoint= */ 1, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp1TagList));
+16
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,21 @@
1919
#pragma once
2020

2121
#include <DeviceEnergyManagementDelegateImpl.h>
22+
#include <DeviceEnergyManagementManager.h>
23+
#include <ElectricalPowerMeasurementDelegate.h>
24+
#include <PowerTopologyDelegate.h>
25+
#include <lib/core/CHIPError.h>
2226

27+
// This app is configured by default with EP1 for EVSE and EP2 for WaterHeater, with only one endpoint
28+
// enabled. On linux, there's a command line argument (--application) to dynamically enable
29+
// "evse|water-heater", i.e. EP1 or EP2. On other platforms, it's a build time definition (#define).
30+
chip::EndpointId GetEnergyDeviceEndpointId();
31+
32+
// The DEM Delegate is used for the TestEventTriggers
2333
chip::app::Clusters::DeviceEnergyManagement::DeviceEnergyManagementDelegate * GetDEMDelegate();
34+
35+
void EvseApplicationInit();
36+
void EvseApplicationShutdown();
37+
38+
void WaterHeaterApplicationInit();
39+
void WaterHeaterApplicationShutdown();

0 commit comments

Comments
 (0)