Skip to content

Commit abbe8ab

Browse files
Fix build errors
1 parent 6efd031 commit abbe8ab

File tree

7 files changed

+31
-23
lines changed

7 files changed

+31
-23
lines changed

data_model/clusters/MeterIdentification.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (C) Connectivity Standards Alliance (2023). All rights reserved.
3+
Copyright (C) Connectivity Standards Alliance (2024). All rights reserved.
44
The information within this document is the property of the Connectivity
55
Standards Alliance and its use and disclosure are restricted, except as
66
expressly set forth herein.

examples/all-clusters-app/all-clusters-common/src/meter-identification-stub.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (c) 2023 Project CHIP Authors
3+
* Copyright (c) 2024 Project CHIP Authors
44
* All rights reserved.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,6 +21,7 @@
2121
using namespace chip;
2222
using namespace chip::app::Clusters;
2323
using namespace chip::app::Clusters::MeterIdentification;
24+
using Feature = chip::app::Clusters::MeterIdentification::Feature;
2425

2526
static std::unique_ptr<MeterIdentificationDelegate> gMIDelegate;
2627
static std::unique_ptr<MeterIdentificationInstance> gMIInstance;
@@ -38,7 +39,5 @@ void emberAfMeterIdentificationClusterInitCallback(chip::EndpointId endpointId)
3839
BitMask<Feature, uint32_t>(Feature::kPowerThreshold));
3940

4041
gMIInstance->Init();
41-
42-
gMIDelegate->SetPowerMode(PowerModeEnum::kAc);
4342
}
4443
}

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

src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (c) 2023 Project CHIP Authors
3+
Copyright (c) 2024 Project CHIP Authors
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at

src/app/zap-templates/zcl/zcl.json

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
"window-covering.xml",
130130
"matter-devices.xml",
131131
"sample-mei-cluster.xml",
132+
"meter-identification-cluster.xml",
132133
"types/door-lock.xml",
133134
"types/occupancy-sensing.xml",
134135
"types/thermostat-user-interface-configuration.xml"

0 commit comments

Comments
 (0)