20
20
#include < app-common/zap-generated/attribute-id.h>
21
21
#include < app-common/zap-generated/attribute-type.h>
22
22
#include < app-common/zap-generated/cluster-objects.h>
23
- #include < app-common/zap-generated/command-id.h>
24
23
#include < app-common/zap-generated/ids/Clusters.h>
24
+ #include < app-common/zap-generated/ids/Commands.h>
25
25
#include < app/CommandHandler.h>
26
26
#include < app/ConcreteCommandPath.h>
27
27
#include < app/util/af.h>
37
37
using namespace chip ;
38
38
using namespace chip ::app::Clusters;
39
39
using namespace chip ::app::Clusters::Scenes;
40
+ using namespace chip ::app::Clusters::Scenes::Commands;
40
41
41
42
uint8_t emberAfPluginScenesServerEntriesInUse = 0 ;
42
43
#if !defined(EMBER_AF_PLUGIN_SCENES_USE_TOKENS) || defined(EZSP_HOST)
@@ -260,7 +261,7 @@ bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, c
260
261
if (emberAfCurrentCommand ()->type == EMBER_INCOMING_UNICAST || emberAfCurrentCommand ()->type == EMBER_INCOMING_UNICAST_REPLY)
261
262
{
262
263
{
263
- app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID };
264
+ app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, RemoveSceneResponse::Id };
264
265
TLV::TLVWriter * writer = nullptr ;
265
266
SuccessOrExit (err = commandObj->PrepareCommand (path));
266
267
VerifyOrExit ((writer = commandObj->GetCommandDataIBTLVWriter ()) != nullptr , err = CHIP_ERROR_INCORRECT_STATE);
@@ -312,7 +313,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandOb
312
313
if (emberAfCurrentCommand ()->type == EMBER_INCOMING_UNICAST || emberAfCurrentCommand ()->type == EMBER_INCOMING_UNICAST_REPLY)
313
314
{
314
315
{
315
- app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID };
316
+ app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, RemoveAllScenesResponse::Id };
316
317
TLV::TLVWriter * writer = nullptr ;
317
318
SuccessOrExit (err = commandObj->PrepareCommand (path));
318
319
VerifyOrExit ((writer = commandObj->GetCommandDataIBTLVWriter ()) != nullptr , err = CHIP_ERROR_INCORRECT_STATE);
@@ -346,7 +347,7 @@ bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, co
346
347
if (emberAfCurrentCommand ()->type == EMBER_INCOMING_UNICAST || emberAfCurrentCommand ()->type == EMBER_INCOMING_UNICAST_REPLY)
347
348
{
348
349
{
349
- app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_STORE_SCENE_RESPONSE_COMMAND_ID };
350
+ app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, StoreSceneResponse::Id };
350
351
TLV::TLVWriter * writer = nullptr ;
351
352
SuccessOrExit (err = commandObj->PrepareCommand (path));
352
353
VerifyOrExit ((writer = commandObj->GetCommandDataIBTLVWriter ()) != nullptr , err = CHIP_ERROR_INCORRECT_STATE);
@@ -441,7 +442,7 @@ bool emberAfScenesClusterGetSceneMembershipCallback(app::CommandHandler * comman
441
442
}
442
443
443
444
{
444
- app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID };
445
+ app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, GetSceneMembershipResponse::Id };
445
446
TLV::TLVWriter * writer = nullptr ;
446
447
SuccessOrExit (err = commandObj->PrepareCommand (path));
447
448
VerifyOrExit ((writer = commandObj->GetCommandDataIBTLVWriter ()) != nullptr , err = CHIP_ERROR_INCORRECT_STATE);
@@ -724,7 +725,7 @@ bool emberAfPluginScenesServerParseAddScene(
724
725
CHIP_ERROR err = CHIP_NO_ERROR;
725
726
EmberAfSceneTableEntry entry;
726
727
EmberAfStatus status;
727
- bool enhanced = (cmd->commandId == ZCL_ENHANCED_ADD_SCENE_COMMAND_ID );
728
+ bool enhanced = (cmd->commandId == EnhancedAddScene::Id );
728
729
auto fabricIndex = commandObj->GetAccessingFabricIndex ();
729
730
EndpointId endpoint = cmd->apsFrame ->destinationEndpoint ;
730
731
uint8_t i, index = EMBER_AF_SCENE_TABLE_NULL_INDEX;
@@ -1033,10 +1034,10 @@ bool emberAfPluginScenesServerParseAddScene(
1033
1034
return true ;
1034
1035
}
1035
1036
{
1036
- app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_ADD_SCENE_RESPONSE_COMMAND_ID };
1037
+ app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, AddSceneResponse::Id };
1037
1038
if (enhanced)
1038
1039
{
1039
- path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_ENHANCED_ADD_SCENE_RESPONSE_COMMAND_ID };
1040
+ path = { emberAfCurrentEndpoint (), Scenes::Id, EnhancedAddSceneResponse::Id };
1040
1041
}
1041
1042
TLV::TLVWriter * writer = nullptr ;
1042
1043
SuccessOrExit (err = commandObj->PrepareCommand (path));
@@ -1061,7 +1062,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c
1061
1062
CHIP_ERROR err = CHIP_NO_ERROR;
1062
1063
EmberAfSceneTableEntry entry = {};
1063
1064
EmberAfStatus status = EMBER_ZCL_STATUS_NOT_FOUND;
1064
- bool enhanced = (cmd->commandId == ZCL_ENHANCED_VIEW_SCENE_COMMAND_ID );
1065
+ bool enhanced = (cmd->commandId == EnhancedViewScene::Id );
1065
1066
FabricIndex fabricIndex = commandObj->GetAccessingFabricIndex ();
1066
1067
EndpointId endpoint = cmd->apsFrame ->destinationEndpoint ;
1067
1068
@@ -1089,10 +1090,10 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c
1089
1090
// The status, group id, and scene id are always included in the response, but
1090
1091
// the transition time, name, and extension fields are only included if the
1091
1092
// scene was found.
1092
- app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID };
1093
+ app::ConcreteCommandPath path = { emberAfCurrentEndpoint (), Scenes::Id, ViewSceneResponse::Id };
1093
1094
if (enhanced)
1094
1095
{
1095
- path = { emberAfCurrentEndpoint (), Scenes::Id, ZCL_ENHANCED_VIEW_SCENE_RESPONSE_COMMAND_ID };
1096
+ path = { emberAfCurrentEndpoint (), Scenes::Id, EnhancedViewSceneResponse::Id };
1096
1097
}
1097
1098
TLV::TLVWriter * writer = nullptr ;
1098
1099
SuccessOrExit (err = commandObj->PrepareCommand (path));
0 commit comments