Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and erwinpan1 committed Dec 11, 2023
1 parent ec16361 commit 6786acf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
26 changes: 14 additions & 12 deletions src/app/clusters/sample-mei-server/sample-mei-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SampleMeiContent::SampleMeiContent() : SampleMeiContent(kInvalidEndpointId) {}

SampleMeiContent::SampleMeiContent(EndpointId aEndpoint)
{
endpoint = aEndpoint;
endpoint = aEndpoint;
pingCount = 10000;

// Attribute default values
Expand All @@ -83,17 +83,19 @@ void SampleMeiServer::InvokeCommand(HandlerContext & ctxt)
switch (ctxt.mRequestPath.mCommandId)
{
case Commands::Ping::Id:
HandleCommand<Commands::Ping::DecodableType>(ctxt, [this, endpoint, fabricIndex, endpointIndex, ctxt](HandlerContext & ctx, const auto & req) {
ChipLogProgress(Zcl, "Ping Command on Ep %d", endpoint);
Events::PingCountEvent::Type event{ .count = content[endpointIndex].pingCount++, .fabricIndex = fabricIndex };
chip::EventNumber placeholderEventNumber;
CHIP_ERROR err = LogEvent(event, endpoint, placeholderEventNumber);
if (CHIP_NO_ERROR != err)
{
ChipLogError(Zcl, "Failed to record event on endpoint %d: %" CHIP_ERROR_FORMAT, static_cast<int>(endpoint), err.Format());
}
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::Success);
});
HandleCommand<Commands::Ping::DecodableType>(
ctxt, [this, endpoint, fabricIndex, endpointIndex, ctxt](HandlerContext & ctx, const auto & req) {
ChipLogProgress(Zcl, "Ping Command on Ep %d", endpoint);
Events::PingCountEvent::Type event{ .count = content[endpointIndex].pingCount++, .fabricIndex = fabricIndex };
chip::EventNumber placeholderEventNumber;
CHIP_ERROR err = LogEvent(event, endpoint, placeholderEventNumber);
if (CHIP_NO_ERROR != err)
{
ChipLogError(Zcl, "Failed to record event on endpoint %d: %" CHIP_ERROR_FORMAT, static_cast<int>(endpoint),
err.Format());
}
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::Success);
});
return;
case Commands::AddArguments::Id:
HandleCommand<Commands::AddArguments::DecodableType>(ctxt, [endpoint](HandlerContext & ctx, const auto & req) {
Expand Down
1 change: 0 additions & 1 deletion src/app/clusters/sample-mei-server/sample-mei-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class SampleMeiContent
// Attribute List
bool flipflop; /* Attributes::FlipFlop::Id */


SampleMeiContent(EndpointId endpoint);
SampleMeiContent();
};
Expand Down

0 comments on commit 6786acf

Please sign in to comment.