Skip to content

Commit

Permalink
Add endpoint id to command callback handler's param list (#8644)
Browse files Browse the repository at this point in the history
* Add endpoint id to command handler's param list

* Update gen folders
  • Loading branch information
yufengwangca authored and pull[bot] committed Aug 31, 2021
1 parent 71d99d9 commit f6ae8fc
Show file tree
Hide file tree
Showing 50 changed files with 1,858 additions and 2,061 deletions.

Large diffs are not rendered by default.

131 changes: 53 additions & 78 deletions examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

228 changes: 92 additions & 136 deletions examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

100 changes: 40 additions & 60 deletions examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

127 changes: 51 additions & 76 deletions examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfDiagnosticLogsClusterRetrieveLogsRequestCallback(apCommandObj, intent, requestedProtocol,
transferFileDesignator);
wasHandled = emberAfDiagnosticLogsClusterRetrieveLogsRequestCallback(aEndpointId, apCommandObj, intent,
requestedProtocol, transferFileDesignator);
}
break;
}
Expand Down Expand Up @@ -299,16 +298,14 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled =
emberAfGeneralCommissioningClusterArmFailSafeCallback(apCommandObj, expiryLengthSeconds, breadcrumb, timeoutMs);
wasHandled = emberAfGeneralCommissioningClusterArmFailSafeCallback(aEndpointId, apCommandObj, expiryLengthSeconds,
breadcrumb, timeoutMs);
}
break;
}
case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: {

// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj);
wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(aEndpointId, apCommandObj);
break;
}
case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: {
Expand Down Expand Up @@ -378,9 +375,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(
apCommandObj, location, const_cast<uint8_t *>(countryCode), breadcrumb, timeoutMs);
aEndpointId, apCommandObj, location, const_cast<uint8_t *>(countryCode), breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -504,9 +500,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfNetworkCommissioningClusterAddThreadNetworkCallback(apCommandObj, operationalDataset,
breadcrumb, timeoutMs);
wasHandled = emberAfNetworkCommissioningClusterAddThreadNetworkCallback(aEndpointId, apCommandObj,
operationalDataset, breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -582,9 +577,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfNetworkCommissioningClusterAddWiFiNetworkCallback(apCommandObj, ssid, credentials, breadcrumb,
timeoutMs);
wasHandled = emberAfNetworkCommissioningClusterAddWiFiNetworkCallback(aEndpointId, apCommandObj, ssid, credentials,
breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -653,9 +647,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled =
emberAfNetworkCommissioningClusterDisableNetworkCallback(apCommandObj, networkID, breadcrumb, timeoutMs);
wasHandled = emberAfNetworkCommissioningClusterDisableNetworkCallback(aEndpointId, apCommandObj, networkID,
breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -724,9 +717,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled =
emberAfNetworkCommissioningClusterEnableNetworkCallback(apCommandObj, networkID, breadcrumb, timeoutMs);
wasHandled = emberAfNetworkCommissioningClusterEnableNetworkCallback(aEndpointId, apCommandObj, networkID,
breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -784,8 +776,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfNetworkCommissioningClusterGetLastNetworkCommissioningResultCallback(apCommandObj, timeoutMs);
wasHandled = emberAfNetworkCommissioningClusterGetLastNetworkCommissioningResultCallback(aEndpointId, apCommandObj,
timeoutMs);
}
break;
}
Expand Down Expand Up @@ -854,9 +846,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled =
emberAfNetworkCommissioningClusterRemoveNetworkCallback(apCommandObj, NetworkID, Breadcrumb, TimeoutMs);
wasHandled = emberAfNetworkCommissioningClusterRemoveNetworkCallback(aEndpointId, apCommandObj, NetworkID,
Breadcrumb, TimeoutMs);
}
break;
}
Expand Down Expand Up @@ -925,8 +916,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfNetworkCommissioningClusterScanNetworksCallback(apCommandObj, ssid, breadcrumb, timeoutMs);
wasHandled =
emberAfNetworkCommissioningClusterScanNetworksCallback(aEndpointId, apCommandObj, ssid, breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -995,9 +986,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfNetworkCommissioningClusterUpdateThreadNetworkCallback(apCommandObj, operationalDataset,
breadcrumb, timeoutMs);
wasHandled = emberAfNetworkCommissioningClusterUpdateThreadNetworkCallback(
aEndpointId, apCommandObj, operationalDataset, breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -1073,9 +1063,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfNetworkCommissioningClusterUpdateWiFiNetworkCallback(apCommandObj, ssid, credentials,
breadcrumb, timeoutMs);
wasHandled = emberAfNetworkCommissioningClusterUpdateWiFiNetworkCallback(aEndpointId, apCommandObj, ssid,
credentials, breadcrumb, timeoutMs);
}
break;
}
Expand Down Expand Up @@ -1206,9 +1195,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfOperationalCredentialsClusterAddOpCertCallback(apCommandObj, NOCArray, IPKValue, CaseAdminNode,
AdminVendorId);
wasHandled = emberAfOperationalCredentialsClusterAddOpCertCallback(aEndpointId, apCommandObj, NOCArray, IPKValue,
CaseAdminNode, AdminVendorId);
}
break;
}
Expand Down Expand Up @@ -1269,8 +1257,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback(apCommandObj, RootCertificate);
wasHandled = emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback(aEndpointId, apCommandObj,
RootCertificate);
}
break;
}
Expand Down Expand Up @@ -1331,15 +1319,13 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfOperationalCredentialsClusterOpCSRRequestCallback(apCommandObj, CSRNonce);
wasHandled = emberAfOperationalCredentialsClusterOpCSRRequestCallback(aEndpointId, apCommandObj, CSRNonce);
}
break;
}
case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: {

// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj);
wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(aEndpointId, apCommandObj);
break;
}
case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: {
Expand Down Expand Up @@ -1404,8 +1390,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfOperationalCredentialsClusterRemoveFabricCallback(apCommandObj, FabricId, NodeId, VendorId);
wasHandled =
emberAfOperationalCredentialsClusterRemoveFabricCallback(aEndpointId, apCommandObj, FabricId, NodeId, VendorId);
}
break;
}
Expand Down Expand Up @@ -1466,9 +1452,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled =
emberAfOperationalCredentialsClusterRemoveTrustedRootCertificateCallback(apCommandObj, TrustedRootIdentifier);
wasHandled = emberAfOperationalCredentialsClusterRemoveTrustedRootCertificateCallback(aEndpointId, apCommandObj,
TrustedRootIdentifier);
}
break;
}
Expand Down Expand Up @@ -1526,8 +1511,7 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled = emberAfOperationalCredentialsClusterSetFabricCallback(apCommandObj, VendorId);
wasHandled = emberAfOperationalCredentialsClusterSetFabricCallback(aEndpointId, apCommandObj, VendorId);
}
break;
}
Expand Down Expand Up @@ -1586,9 +1570,8 @@ void DispatchServerCommand(app::CommandHandler * apCommandObj, CommandId aComman

if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
wasHandled =
emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(apCommandObj, const_cast<uint8_t *>(Label));
wasHandled = emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(aEndpointId, apCommandObj,
const_cast<uint8_t *>(Label));
}
break;
}
Expand Down
Loading

0 comments on commit f6ae8fc

Please sign in to comment.