Skip to content

Commit

Permalink
Merge branch 'master' into update_attribute_persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Nov 28, 2024
2 parents 240f04c + 7805664 commit c49c192
Show file tree
Hide file tree
Showing 100 changed files with 3,581 additions and 2,009 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ static std::unique_ptr<EnergyEvseDelegate> gDelegate;
static std::unique_ptr<EvseTargetsDelegate> gEvseTargetsDelegate;
static std::unique_ptr<EnergyEvseManager> gInstance;

EndpointId GetEnergyDeviceEndpointId()
{
return chip::EndpointId(1);
}

void emberAfEnergyEvseClusterInitCallback(chip::EndpointId endpointId)
{
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/linux/main-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp3TagList[] = { {
.tag = kTagSwitchesUp } };
const Clusters::Descriptor::Structs::SemanticTagStruct::Type gEp4TagList[] = { { .namespaceID = kNamespaceSwitches,
.tag = kTagSwitchesDown } };

} // namespace

#ifdef MATTER_DM_PLUGIN_DISHWASHER_ALARM_SERVER
Expand Down Expand Up @@ -256,7 +257,7 @@ void ApplicationInit()
Clusters::ValveConfigurationAndControl::SetDefaultDelegate(chip::EndpointId(1), &sValveDelegate);
Clusters::TimeSynchronization::SetDefaultDelegate(&sTimeSyncDelegate);

Clusters::WaterHeaterManagement::WhmApplicationInit();
Clusters::WaterHeaterManagement::WhmApplicationInit(chip::EndpointId(1));

SetTagList(/* endpoint= */ 0, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp0TagList));
SetTagList(/* endpoint= */ 1, Span<const Clusters::Descriptor::Structs::SemanticTagStruct::Type>(gEp1TagList));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
*
* 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.
*/

#pragma once

#include <DeviceEnergyManagementDelegateImpl.h>
#include <DeviceEnergyManagementManager.h>
#include <ElectricalPowerMeasurementDelegate.h>
#include <PowerTopologyDelegate.h>
#include <lib/core/CHIPError.h>

// This app is configured by default with EP1 for EVSE and EP2 for WaterHeater, with only one endpoint
// enabled. On linux, there's a command line argument (--application) to dynamically enable
// "evse|water-heater", i.e. EP1 or EP2. On other platforms, it's a build time definition (#define).
chip::EndpointId GetEnergyDeviceEndpointId();

// The DEM Delegate is used for the TestEventTriggers
chip::app::Clusters::DeviceEnergyManagement::DeviceEnergyManagementDelegate * GetDEMDelegate();

void EvseApplicationInit();
void EvseApplicationShutdown();

void WaterHeaterApplicationInit();
void WaterHeaterApplicationShutdown();
Loading

0 comments on commit c49c192

Please sign in to comment.