Skip to content

Commit 05e8621

Browse files
Fix build errors
1 parent 6efd031 commit 05e8621

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

examples/energy-management-app/energy-management-common/src/MeterIdentificationDelegate.cpp

+4-14
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ using namespace chip::app::Clusters::MeterIdentification;
2929
using namespace chip::app::Clusters::MeterIdentification::Attributes;
3030
using namespace chip::app::Clusters::MeterIdentification::Structs;
3131

32+
using chip::app::Clusters::MeterIdentification::MeterTypeEnum;
33+
using chip::app::Clusters::MeterIdentification::PowerThresholdSourceEnum;
34+
35+
3236
CHIP_ERROR MeterIdentificationInstance::Init()
3337
{
3438
return Instance::Init();
@@ -97,20 +101,6 @@ CHIP_ERROR MeterIdentificationDelegate::SetPointOfDelivery(CharSpan &newValue)
97101
return CHIP_NO_ERROR;
98102
}
99103

100-
CHIP_ERROR MeterIdentificationDelegate::SetPointOfDelivery(CharSpan &newValue)
101-
{
102-
CharSpan oldValue = mPointOfDelivery;
103-
104-
mPointOfDelivery = newValue;
105-
if (oldValue != newValue)
106-
{
107-
// We won't log raw values since these could change frequently
108-
MatterReportingAttributeChangeCallback(mEndpointId, MeterIdentification::Id, PointOfDelivery::Id);
109-
}
110-
111-
return CHIP_NO_ERROR;
112-
}
113-
114104
CHIP_ERROR MeterIdentificationDelegate::SetPowerThreshold(DataModel::Nullable<uint64_t> newValue)
115105
{
116106
DataModel::Nullable<uint64_t> oldValue = mPowerThreshold;

src/app/clusters/meter-identification-server/meter-identification-server.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ using namespace chip::app::Clusters::MeterIdentification::Structs;
3535

3636
using chip::Protocols::InteractionModel::Status;
3737

38-
namespace chip::app::Clusters::MeterIdentification {
38+
namespace chip {
39+
namespace app {
40+
namespace Clusters {
41+
namespace MeterIdentification {
3942

4043
CHIP_ERROR Instance::Init()
4144
{
@@ -112,4 +115,7 @@ CHIP_ERROR Instance::Write(const ConcreteReadAttributePath & aPath, AttributeVal
112115
return CHIP_NO_ERROR;
113116
}
114117

115-
} // namespace chip::app::Clusters::MeterIdentification
118+
} // namespace MeterIdentification
119+
} // namespace Clusters
120+
} // namespace app
121+
} // namespace chip

src/app/clusters/meter-identification-server/meter-identification-server.h

+14-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,21 @@
1919

2020
#include <stddef.h>
2121

22+
#include <lib/core/Optional.h>
23+
2224
#include <app-common/zap-generated/cluster-enums.h>
2325
#include <app-common/zap-generated/cluster-objects.h>
2426
#include <app/util/basic-types.h>
2527
#include <lib/core/CHIPError.h>
2628

27-
namespace chip::app::Clusters::MeterIdentification {
29+
using chip::app::Clusters::MeterIdentification::MeterTypeEnum;
30+
using chip::app::Clusters::MeterIdentification::PowerThresholdSourceEnum;
31+
using Feature = chip::app::Clusters::MeterIdentification::Feature;
32+
33+
namespace chip {
34+
namespace app {
35+
namespace Clusters {
36+
namespace MeterIdentification {
2837

2938
struct Delegate
3039
{
@@ -72,4 +81,7 @@ class Instance : public AttributeAccessInterface
7281
CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override;
7382
};
7483

75-
} // namespace chip::app::Clusters::MeterIdentification
84+
} // namespace MeterIdentification
85+
} // namespace Clusters
86+
} // namespace app
87+
} // namespace chip

0 commit comments

Comments
 (0)