@@ -141,8 +141,10 @@ class SwitchAttributeDelegate : public AttributeDelegate
141
141
public:
142
142
SwitchAttributeDelegate (ClusterId clusterId) : AttributeDelegate(clusterId) {}
143
143
144
- void PostAttributeChangeCallback (const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override ;
144
+ chip::Protocols::InteractionModel::Status PreAttributeChangeCallback (const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override ;
145
145
146
+ void PostAttributeChangeCallback (const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override ;
147
+
146
148
private:
147
149
};
148
150
@@ -156,6 +158,16 @@ SwitchEventHandler * GetSwitchEventHandler(EndpointId endpointId)
156
158
return gSwitchEventHandlers [endpointId];
157
159
}
158
160
161
+ chip::Protocols::InteractionModel::Status SwitchAttributeDelegate::PreAttributeChangeCallback (const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value)
162
+ {
163
+ chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success;
164
+ printf (" \033 [41m %s, %d \033 [0m \n " , __func__, __LINE__);
165
+ ChipLogProgress (Zcl, " SwitchAttributeDelegate::PostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI " , Type: %u, length %u" , attributePath.mEndpointId , ChipLogValueMEI (attributePath.mClusterId ), type, size);
166
+
167
+
168
+ return ret;
169
+ }
170
+
159
171
void SwitchAttributeDelegate::PostAttributeChangeCallback (const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value)
160
172
{
161
173
printf (" \033 [41m %s, %d \033 [0m \n " , __func__, __LINE__);
0 commit comments