Skip to content

Commit

Permalink
Remove unused SetupEmberAfCommandSender function. (#15945)
Browse files Browse the repository at this point in the history
We have not been using this since we stopped going through generic dispatch for CommandSender.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Sep 22, 2023
1 parent dd59c59 commit 1215008
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
27 changes: 0 additions & 27 deletions src/app/util/ember-compatibility-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,33 +146,6 @@ EmberAfAttributeType BaseType(EmberAfAttributeType type)

} // namespace

void SetupEmberAfCommandSender(CommandSender * command, const ConcreteCommandPath & commandPath)
{
Messaging::ExchangeContext * commandExchangeCtx = command->GetExchangeContext();

imCompatibilityEmberApsFrame.clusterId = commandPath.mClusterId;
imCompatibilityEmberApsFrame.destinationEndpoint = commandPath.mEndpointId;
imCompatibilityEmberApsFrame.sourceEndpoint = 1; // source endpoint is fixed to 1 for now.
imCompatibilityEmberApsFrame.sequence =
(commandExchangeCtx != nullptr ? static_cast<uint8_t>(commandExchangeCtx->GetExchangeId() & 0xFF) : 0);

if (commandExchangeCtx->IsGroupExchangeContext())
{
imCompatibilityEmberAfCluster.type = EMBER_INCOMING_MULTICAST;
}
else
{
imCompatibilityEmberAfCluster.type = EMBER_INCOMING_UNICAST;
}

imCompatibilityEmberAfCluster.commandId = commandPath.mCommandId;
imCompatibilityEmberAfCluster.apsFrame = &imCompatibilityEmberApsFrame;
imCompatibilityEmberAfCluster.interPanHeader = &imCompatibilityInterpanHeader;
imCompatibilityEmberAfCluster.source = commandExchangeCtx;

emAfCurrentCommand = &imCompatibilityEmberAfCluster;
}

void SetupEmberAfCommandHandler(CommandHandler * command, const ConcreteCommandPath & commandPath)
{
Messaging::ExchangeContext * commandExchangeCtx = command->GetExchangeContext();
Expand Down
1 change: 0 additions & 1 deletion src/app/util/ember-compatibility-functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ namespace chip {
namespace app {
namespace Compatibility {

void SetupEmberAfCommandSender(CommandSender * command, const ConcreteCommandPath & commandPath);
void SetupEmberAfCommandHandler(CommandHandler * command, const ConcreteCommandPath & commandPath);
bool IMEmberAfSendDefaultResponseWithCallback(EmberAfStatus status);
void ResetEmberAfObjects();
Expand Down

0 comments on commit 1215008

Please sign in to comment.