Skip to content

Commit

Permalink
Run Codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
erjiaqing committed Apr 14, 2021
1 parent 2a06383 commit 3179c42
Show file tree
Hide file tree
Showing 35 changed files with 1,638 additions and 1,327 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

232 changes: 129 additions & 103 deletions examples/all-clusters-app/all-clusters-common/gen/callback.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@
{ 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(0) }, /* Descriptor (server): device list */ \
{ 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(254) }, /* Descriptor (server): server list */ \
{ 0x0002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* Descriptor (server): client list */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Descriptor (server): cluster revision */ \
{ 0x0003, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(762) }, /* Descriptor (server): parts list */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* Descriptor (server): cluster revision */ \
{ 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \
ZAP_SIMPLE_DEFAULT(3) }, /* Basic (server): cluster revision */ \
{ 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), \
Expand Down
42 changes: 22 additions & 20 deletions examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfLevelControlClusterMoveCallback(moveMode, rate, optionMask, optionOverride);
emberAfLevelControlClusterMoveCallback(apCommandObj, moveMode, rate, optionMask, optionOverride);
}
else
{
Expand Down Expand Up @@ -264,7 +264,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfLevelControlClusterMoveToLevelCallback(level, transitionTime, optionMask, optionOverride);
emberAfLevelControlClusterMoveToLevelCallback(apCommandObj, level, transitionTime, optionMask, optionOverride);
}
else
{
Expand Down Expand Up @@ -347,7 +347,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfLevelControlClusterMoveToLevelWithOnOffCallback(level, transitionTime);
emberAfLevelControlClusterMoveToLevelWithOnOffCallback(apCommandObj, level, transitionTime);
}
else
{
Expand Down Expand Up @@ -430,7 +430,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfLevelControlClusterMoveWithOnOffCallback(moveMode, rate);
emberAfLevelControlClusterMoveWithOnOffCallback(apCommandObj, moveMode, rate);
}
else
{
Expand Down Expand Up @@ -561,7 +561,8 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 5 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfLevelControlClusterStepCallback(stepMode, stepSize, transitionTime, optionMask, optionOverride);
emberAfLevelControlClusterStepCallback(apCommandObj, stepMode, stepSize, transitionTime, optionMask,
optionOverride);
}
else
{
Expand Down Expand Up @@ -660,7 +661,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfLevelControlClusterStepWithOnOffCallback(stepMode, stepSize, transitionTime);
emberAfLevelControlClusterStepWithOnOffCallback(apCommandObj, stepMode, stepSize, transitionTime);
}
else
{
Expand Down Expand Up @@ -743,7 +744,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount)
{
// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfLevelControlClusterStopCallback(optionMask, optionOverride);
emberAfLevelControlClusterStopCallback(apCommandObj, optionMask, optionOverride);
}
else
{
Expand All @@ -758,7 +759,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: {

// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfLevelControlClusterStopWithOnOffCallback();
emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj);
break;
}
default: {
Expand Down Expand Up @@ -872,7 +873,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterAddThreadNetworkCallback(operationalDataset, breadcrumb, timeoutMs);
emberAfNetworkCommissioningClusterAddThreadNetworkCallback(apCommandObj, operationalDataset, breadcrumb, timeoutMs);
}
else
{
Expand Down Expand Up @@ -995,7 +996,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterAddWiFiNetworkCallback(ssid, credentials, breadcrumb, timeoutMs);
emberAfNetworkCommissioningClusterAddWiFiNetworkCallback(apCommandObj, ssid, credentials, breadcrumb, timeoutMs);
}
else
{
Expand Down Expand Up @@ -1098,7 +1099,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterDisableNetworkCallback(networkID, breadcrumb, timeoutMs);
emberAfNetworkCommissioningClusterDisableNetworkCallback(apCommandObj, networkID, breadcrumb, timeoutMs);
}
else
{
Expand Down Expand Up @@ -1201,7 +1202,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterEnableNetworkCallback(networkID, breadcrumb, timeoutMs);
emberAfNetworkCommissioningClusterEnableNetworkCallback(apCommandObj, networkID, breadcrumb, timeoutMs);
}
else
{
Expand Down Expand Up @@ -1268,7 +1269,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterGetLastNetworkCommissioningResultCallback(timeoutMs);
emberAfNetworkCommissioningClusterGetLastNetworkCommissioningResultCallback(apCommandObj, timeoutMs);
}
else
{
Expand Down Expand Up @@ -1371,7 +1372,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterRemoveNetworkCallback(NetworkID, Breadcrumb, TimeoutMs);
emberAfNetworkCommissioningClusterRemoveNetworkCallback(apCommandObj, NetworkID, Breadcrumb, TimeoutMs);
}
else
{
Expand Down Expand Up @@ -1474,7 +1475,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterScanNetworksCallback(ssid, breadcrumb, timeoutMs);
emberAfNetworkCommissioningClusterScanNetworksCallback(apCommandObj, ssid, breadcrumb, timeoutMs);
}
else
{
Expand Down Expand Up @@ -1577,7 +1578,8 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterUpdateThreadNetworkCallback(operationalDataset, breadcrumb, timeoutMs);
emberAfNetworkCommissioningClusterUpdateThreadNetworkCallback(apCommandObj, operationalDataset, breadcrumb,
timeoutMs);
}
else
{
Expand Down Expand Up @@ -1700,7 +1702,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
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.
emberAfNetworkCommissioningClusterUpdateWiFiNetworkCallback(ssid, credentials, breadcrumb, timeoutMs);
emberAfNetworkCommissioningClusterUpdateWiFiNetworkCallback(apCommandObj, ssid, credentials, breadcrumb, timeoutMs);
}
else
{
Expand Down Expand Up @@ -1735,19 +1737,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En
case ZCL_OFF_COMMAND_ID: {

// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfOnOffClusterOffCallback();
emberAfOnOffClusterOffCallback(apCommandObj);
break;
}
case ZCL_ON_COMMAND_ID: {

// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfOnOffClusterOnCallback();
emberAfOnOffClusterOnCallback(apCommandObj);
break;
}
case ZCL_TOGGLE_COMMAND_ID: {

// TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks.
emberAfOnOffClusterToggleCallback();
emberAfOnOffClusterToggleCallback(apCommandObj);
break;
}
default: {
Expand Down
Loading

0 comments on commit 3179c42

Please sign in to comment.