Skip to content

Commit

Permalink
Remove EmberAfClusterCommand and a bunch of things it entrained. (#25145
Browse files Browse the repository at this point in the history
)
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jun 29, 2023
1 parent ea35d73 commit 2902338
Show file tree
Hide file tree
Showing 31 changed files with 26 additions and 3,002 deletions.
1 change: 0 additions & 1 deletion examples/bridge-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/ConcreteAttributePath.h>
#include <app/EventLogging.h>
#include <app/chip-zcl-zpro-codec.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/reporting/reporting.h>
#include <app/util/af-types.h>
Expand Down
1 change: 0 additions & 1 deletion examples/dynamic-bridge-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <app-common/zap-generated/attribute-type.h>
#include <app/ConcreteAttributePath.h>
#include <app/EventLogging.h>
#include <app/chip-zcl-zpro-codec.h>
#include <app/reporting/reporting.h>
#include <app/util/af-types.h>
#include <app/util/af.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/TypeTraits.h>

// Currently we need some work to keep compatible with ember lib.
#include <app/util/ember-compatibility-functions.h>

namespace chip {
namespace app {

Expand Down Expand Up @@ -2052,8 +2049,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP

void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj)
{
Compatibility::SetupEmberAfCommandHandler(apCommandObj, aCommandPath);

switch (aCommandPath.mClusterId)
{
case Clusters::AdministratorCommissioning::Id:
Expand Down Expand Up @@ -2148,8 +2143,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV:
apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCluster);
break;
}

Compatibility::ResetEmberAfObjects();
}

} // namespace app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/TypeTraits.h>

// Currently we need some work to keep compatible with ember lib.
#include <app/util/ember-compatibility-functions.h>

namespace chip {
namespace app {

Expand Down Expand Up @@ -1179,8 +1176,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP

void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj)
{
Compatibility::SetupEmberAfCommandHandler(apCommandObj, aCommandPath);

switch (aCommandPath.mClusterId)
{
case Clusters::AdministratorCommissioning::Id:
Expand Down Expand Up @@ -1239,8 +1234,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV:
apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCluster);
break;
}

Compatibility::ResetEmberAfObjects();
}

} // namespace app
Expand Down
44 changes: 0 additions & 44 deletions src/app/chip-zcl-zpro-codec.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
#endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT

// This initializes clusters, so should come after lower level initialization.
InitDataModelHandler(&mExchangeMgr);
InitDataModelHandler();

#if defined(CHIP_APP_USE_ECHO)
err = InitEchoHandler(&mExchangeMgr);
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/TestCommissionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ using chip::CommissioningWindowManager;
using chip::Server;

// Mock function for linking
void InitDataModelHandler(chip::Messaging::ExchangeManager * exchangeMgr) {}
void InitDataModelHandler() {}

namespace {
bool sAdminFabricIndexDirty = false;
Expand Down
4 changes: 2 additions & 2 deletions src/app/util/DataModelHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@

using namespace ::chip;

void InitDataModelHandler(chip::Messaging::ExchangeManager * exchangeManager)
void InitDataModelHandler()
{
#ifdef USE_ZAP_CONFIG
ChipLogProgress(Zcl, "Using ZAP configuration...");
emberAfEndpointConfigure();
emberAfInit(exchangeManager);
emberAfInit();
#endif
}
2 changes: 1 addition & 1 deletion src/app/util/DataModelHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
* data model messages.
*
*/
void InitDataModelHandler(chip::Messaging::ExchangeManager * exchangeMgr);
void InitDataModelHandler();
Loading

0 comments on commit 2902338

Please sign in to comment.