@@ -39,8 +39,8 @@ using namespace chip;
39
39
using namespace chip ::app;
40
40
using namespace chip ::app::Clusters;
41
41
using namespace chip ::app::Clusters::Messages;
42
- using chip::Protocols::InteractionModel::Status;
43
42
using chip::app::LogEvent;
43
+ using chip::Protocols::InteractionModel::Status;
44
44
45
45
static constexpr size_t kMessagesDelegateTableSize =
46
46
EMBER_AF_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT;
@@ -57,8 +57,7 @@ Delegate * GetDelegate(EndpointId endpoint)
57
57
{
58
58
ChipLogProgress (Zcl, " MessagesCluster NOT returning delegate for endpoint:%u" , endpoint);
59
59
60
- uint16_t ep =
61
- emberAfGetClusterServerEndpointIndex (endpoint, Messages::Id, EMBER_AF_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT);
60
+ uint16_t ep = emberAfGetClusterServerEndpointIndex (endpoint, Messages::Id, EMBER_AF_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT);
62
61
return (ep >= kMessagesDelegateTableSize ? nullptr : gDelegateTable [ep]);
63
62
}
64
63
@@ -73,16 +72,14 @@ bool isDelegateNull(Delegate * delegate, EndpointId endpoint)
73
72
}
74
73
} // namespace
75
74
76
-
77
75
namespace chip {
78
76
namespace app {
79
77
namespace Clusters {
80
78
namespace Messages {
81
79
82
80
void SetDefaultDelegate (EndpointId endpoint, Delegate * delegate)
83
81
{
84
- uint16_t ep = emberAfGetClusterServerEndpointIndex (endpoint, Messages::Id,
85
- EMBER_AF_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT);
82
+ uint16_t ep = emberAfGetClusterServerEndpointIndex (endpoint, Messages::Id, EMBER_AF_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT);
86
83
// if endpoint is found
87
84
if (ep < kMessagesDelegateTableSize )
88
85
{
@@ -104,7 +101,6 @@ bool Delegate::HasFeature(chip::EndpointId endpoint, Feature feature)
104
101
} // namespace app
105
102
} // namespace chip
106
103
107
-
108
104
// -----------------------------------------------------------------------------
109
105
// Attribute Accessor Implementation
110
106
@@ -164,7 +160,7 @@ CHIP_ERROR MessagesAttrAccess::Read(const app::ConcreteReadAttributePath & aPath
164
160
}
165
161
166
162
CHIP_ERROR MessagesAttrAccess::ReadFeatureFlagAttribute (EndpointId endpoint, app::AttributeValueEncoder & aEncoder,
167
- Delegate * delegate)
163
+ Delegate * delegate)
168
164
{
169
165
uint32_t featureFlag = delegate->GetFeatureMap (endpoint);
170
166
return aEncoder.Encode (featureFlag);
@@ -182,7 +178,6 @@ CHIP_ERROR MessagesAttrAccess::ReadActiveMessageIds(app::AttributeValueEncoder &
182
178
183
179
} // anonymous namespace
184
180
185
-
186
181
bool emberAfMessagesClusterPresentMessagesRequestCallback (
187
182
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
188
183
const chip::app::Clusters::Messages::Commands::PresentMessagesRequest::DecodableType & commandData)
@@ -191,19 +186,18 @@ bool emberAfMessagesClusterPresentMessagesRequestCallback(
191
186
EndpointId endpoint = commandPath.mEndpointId ;
192
187
Status status = Status::Success;
193
188
194
- auto & messageId = commandData.messageID ;
195
- auto & priority = commandData.priority ;
189
+ auto & messageId = commandData.messageID ;
190
+ auto & priority = commandData.priority ;
196
191
auto & messageControl = commandData.messageControl ;
197
- auto & startTime = commandData.startTime ;
198
- auto & duration = commandData.duration ;
199
- auto & messageText = commandData.messageText ;
200
- auto & responses = commandData.responses ;
192
+ auto & startTime = commandData.startTime ;
193
+ auto & duration = commandData.duration ;
194
+ auto & messageText = commandData.messageText ;
195
+ auto & responses = commandData.responses ;
201
196
202
197
Delegate * delegate = GetDelegate (endpoint);
203
198
VerifyOrExit (isDelegateNull (delegate, endpoint) != true , err = CHIP_ERROR_INCORRECT_STATE);
204
199
{
205
- delegate->HandlePresentMessagesRequest (messageId, priority, messageControl, startTime,
206
- duration, messageText, responses);
200
+ delegate->HandlePresentMessagesRequest (messageId, priority, messageControl, startTime, duration, messageText, responses);
207
201
}
208
202
209
203
exit :
0 commit comments