Skip to content

Commit 1b6af28

Browse files
committed
Code review notes fixes
1 parent dd87462 commit 1b6af28

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace chip {
4444
enum class MeterIdentificationTrigger : uint64_t
4545
{
4646
// Scenarios
47-
// Attributes Value Update Test Event | Increment attribute values
47+
// Attributes Value Update Test Event | Increment all attributes values
4848
kAttributesValueUpdate = 0x0b06000000000000,
4949
// Attributes Value Test Event Clear | Return the device to pre-test status
5050
kAttributesValueUpdateClear = 0x0b06000000000001,

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

-20
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ bool Instance::HasFeature(const Feature & aFeature) const
5656
return mFeature.Has(aFeature);
5757
}
5858

59-
// static CHIP_ERROR EncodeStringOnSuccess(CHIP_ERROR status, AttributeValueEncoder & encoder, const char * buf, size_t maxBufSize)
60-
//{
61-
// ReturnErrorOnFailure(status);
62-
// return encoder.Encode(chip::CharSpan(buf, strnlen(buf, maxBufSize)));
63-
// }
64-
6559
// AttributeAccessInterface
6660
CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder)
6761
{
@@ -98,20 +92,6 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu
9892
return CHIP_NO_ERROR;
9993
}
10094

101-
CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder)
102-
{
103-
/*
104-
105-
switch (aPath.mAttributeId)
106-
{
107-
108-
default:
109-
break;
110-
}
111-
*/
112-
return CHIP_NO_ERROR;
113-
}
114-
11595
} // namespace MeterIdentification
11696
} // namespace Clusters
11797
} // namespace app

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

+2-7
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@
2727
#include <app/util/basic-types.h>
2828
#include <lib/core/CHIPError.h>
2929

30-
using chip::app::Clusters::MeterIdentification::MeterTypeEnum;
31-
using Feature = chip::app::Clusters::MeterIdentification::Feature;
32-
3330
namespace chip {
3431
namespace app {
3532
namespace Clusters {
3633
namespace MeterIdentification {
3734

3835
struct Delegate
3936
{
37+
EndpointId mEndpointId = 0;
38+
4039
public:
4140
virtual ~Delegate() = default;
4241

@@ -47,9 +46,6 @@ struct Delegate
4746
virtual DataModel::Nullable<CharSpan> GetMeterSerialNumber() = 0;
4847
virtual DataModel::Nullable<CharSpan> GetProtocolVersion() = 0;
4948
virtual DataModel::Nullable<Structs::PowerThresholdStruct::Type> GetPowerThreshold() = 0;
50-
51-
protected:
52-
EndpointId mEndpointId = 0;
5349
};
5450

5551
class Instance : public AttributeAccessInterface
@@ -74,7 +70,6 @@ class Instance : public AttributeAccessInterface
7470

7571
// AttributeAccessInterface
7672
CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override;
77-
CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override;
7873
};
7974

8075
} // namespace MeterIdentification

0 commit comments

Comments
 (0)