23
23
#include < app-common/zap-generated/callback.h>
24
24
#include < app-common/zap-generated/cluster-objects.h>
25
25
#include < app-common/zap-generated/ids/Attributes.h>
26
- #include < app/ConcreteAttributePath.h>
27
26
#include < app/AttributeAccessInterface.h> // added in case we ever don't need app/util/attribute-storage.h at some point.
27
+ #include < app/ConcreteAttributePath.h>
28
28
#include < lib/core/CHIPEncoding.h>
29
29
30
30
using namespace chip ;
@@ -54,8 +54,8 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
54
54
VerifyOrDie (aPath.mClusterId == EnergyPreference::Id);
55
55
EndpointId endpoint = aPath.mEndpointId ;
56
56
uint32_t ourFeatureMap;
57
- const bool featureMapIsGood = FeatureMap::Get (aPath.mEndpointId , &ourFeatureMap) == EMBER_ZCL_STATUS_SUCCESS;
58
- const bool balanceSupported = featureMapIsGood && ((ourFeatureMap & to_underlying (Feature::kEnergyBalance )) != 0 );
57
+ const bool featureMapIsGood = FeatureMap::Get (aPath.mEndpointId , &ourFeatureMap) == EMBER_ZCL_STATUS_SUCCESS;
58
+ const bool balanceSupported = featureMapIsGood && ((ourFeatureMap & to_underlying (Feature::kEnergyBalance )) != 0 );
59
59
const bool lowPowerSupported = featureMapIsGood && ((ourFeatureMap & to_underlying (Feature::kLowPowerModeSensitivity )) != 0 );
60
60
61
61
switch (aPath.mAttributeId )
@@ -144,8 +144,7 @@ CHIP_ERROR EnergyPrefAttrAccess::Read(const ConcreteReadAttributePath & aPath, A
144
144
145
145
} // anonymous namespace
146
146
147
- namespace chip ::app::Clusters::EnergyPreference
148
- {
147
+ namespace chip ::app::Clusters::EnergyPreference {
149
148
150
149
void SetDelegate (Delegate * aDelegate)
151
150
{
@@ -157,17 +156,17 @@ Delegate * GetDelegate()
157
156
return gsDelegate;
158
157
}
159
158
160
- } // Set matter energy preferences delegate
159
+ } // namespace chip::app::Clusters::EnergyPreference
161
160
162
- Status
163
- MatterEnergyPreferenceClusterServerPreAttributeChangedCallback ( const ConcreteAttributePath & attributePath ,
164
- EmberAfAttributeType attributeType, uint16_t size, uint8_t * value)
161
+ Status MatterEnergyPreferenceClusterServerPreAttributeChangedCallback ( const ConcreteAttributePath & attributePath,
162
+ EmberAfAttributeType attributeType, uint16_t size ,
163
+ uint8_t * value)
165
164
{
166
- EndpointId endpoint = attributePath.mEndpointId ;
165
+ EndpointId endpoint = attributePath.mEndpointId ;
167
166
Delegate * delegate = GetDelegate ();
168
167
uint32_t ourFeatureMap;
169
- const bool featureMapIsGood = FeatureMap::Get (attributePath.mEndpointId , &ourFeatureMap) == EMBER_ZCL_STATUS_SUCCESS;
170
- const bool balanceSupported = featureMapIsGood && ((ourFeatureMap & to_underlying (Feature::kEnergyBalance )) != 0 );
168
+ const bool featureMapIsGood = FeatureMap::Get (attributePath.mEndpointId , &ourFeatureMap) == EMBER_ZCL_STATUS_SUCCESS;
169
+ const bool balanceSupported = featureMapIsGood && ((ourFeatureMap & to_underlying (Feature::kEnergyBalance )) != 0 );
171
170
const bool lowPowerSupported = featureMapIsGood && ((ourFeatureMap & to_underlying (Feature::kLowPowerModeSensitivity )) != 0 );
172
171
173
172
if (delegate == nullptr )
0 commit comments