From d4f0f1f2c6ad11ae0c146deb77309186c5bc896c Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Sat, 3 Jul 2021 04:03:24 +0200 Subject: [PATCH] Use gen/ids into im_cluster_command_handler.cpp (#8069) * Use src/app/common/gen/ids/Clusters.h and src/app/common/gen/ids/Commands.h in src/app/zap-templates/templates/app/im-cluster-command-handler.zapt * Update generated gen/IMClusterCommandHandler.cpp --- .../gen/IMClusterCommandHandler.cpp | 342 +++++++++--------- .../gen/IMClusterCommandHandler.cpp | 117 +++--- .../gen/IMClusterCommandHandler.cpp | 117 +++--- .../gen/IMClusterCommandHandler.cpp | 93 +++-- .../gen/IMClusterCommandHandler.cpp | 123 ++++--- .../gen/IMClusterCommandHandler.cpp | 87 +++-- .../main/gen/IMClusterCommandHandler.cpp | 75 ++-- .../tv-common/gen/IMClusterCommandHandler.cpp | 216 +++++------ .../common/gen/IMClusterCommandHandler.cpp | 91 +++-- .../app/im-cluster-command-handler.zapt | 14 +- .../gen/IMClusterCommandHandler.cpp | 272 +++++++------- 11 files changed, 770 insertions(+), 777 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp b/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp index fc104551569448..e3aca391f4ac78 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_BARRIER_CONTROL_GO_TO_PERCENT_COMMAND_ID: { + case Clusters::BarrierControl::Commands::Ids::BarrierControlGoToPercent: { expectArgumentCount = 1; uint8_t percentOpen; bool argExists[1]; @@ -114,7 +114,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_BARRIER_CONTROL_STOP_COMMAND_ID: { + case Clusters::BarrierControl::Commands::Ids::BarrierControlStop: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfBarrierControlClusterBarrierControlStopCallback(apCommandObj); @@ -124,12 +124,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BARRIER_CONTROL_CLUSTER_ID, aCommandId, + Clusters::BarrierControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BARRIER_CONTROL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::BarrierControl::Id); return; } } @@ -139,7 +139,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BARRIER_CONTROL_CLUSTER_ID, aCommandId, + Clusters::BarrierControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -173,12 +173,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BASIC_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Basic::Id); return; } } @@ -188,7 +188,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -218,7 +218,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_BIND_COMMAND_ID: { + case Clusters::Binding::Commands::Ids::Bind: { expectArgumentCount = 4; chip::NodeId nodeId; chip::GroupId groupId; @@ -289,7 +289,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UNBIND_COMMAND_ID: { + case Clusters::Binding::Commands::Ids::Unbind: { expectArgumentCount = 4; chip::NodeId nodeId; chip::GroupId groupId; @@ -364,12 +364,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BINDING_CLUSTER_ID, aCommandId, + Clusters::Binding::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BINDING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Binding::Id); return; } } @@ -379,7 +379,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BINDING_CLUSTER_ID, aCommandId, + Clusters::Binding::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -409,7 +409,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MOVE_COLOR_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveColor: { expectArgumentCount = 4; int16_t rateX; int16_t rateY; @@ -480,7 +480,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveColorTemperature: { expectArgumentCount = 6; uint8_t moveMode; uint16_t rate; @@ -560,7 +560,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_HUE_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveHue: { expectArgumentCount = 4; uint8_t moveMode; uint8_t rate; @@ -631,7 +631,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_SATURATION_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveSaturation: { expectArgumentCount = 4; uint8_t moveMode; uint8_t rate; @@ -703,7 +703,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_COLOR_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveToColor: { expectArgumentCount = 5; uint16_t colorX; uint16_t colorY; @@ -779,7 +779,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_COLOR_TEMPERATURE_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveToColorTemperature: { expectArgumentCount = 4; uint16_t colorTemperature; uint16_t transitionTime; @@ -851,7 +851,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_HUE_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveToHue: { expectArgumentCount = 5; uint8_t hue; uint8_t direction; @@ -927,7 +927,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveToHueAndSaturation: { expectArgumentCount = 5; uint8_t hue; uint8_t saturation; @@ -1003,7 +1003,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_SATURATION_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::MoveToSaturation: { expectArgumentCount = 4; uint8_t saturation; uint16_t transitionTime; @@ -1075,7 +1075,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_COLOR_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::StepColor: { expectArgumentCount = 5; int16_t stepX; int16_t stepY; @@ -1151,7 +1151,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_COLOR_TEMPERATURE_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::StepColorTemperature: { expectArgumentCount = 7; uint8_t stepMode; uint16_t stepSize; @@ -1236,7 +1236,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_HUE_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::StepHue: { expectArgumentCount = 5; uint8_t stepMode; uint8_t stepSize; @@ -1312,7 +1312,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_SATURATION_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::StepSaturation: { expectArgumentCount = 5; uint8_t stepMode; uint8_t stepSize; @@ -1388,7 +1388,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_MOVE_STEP_COMMAND_ID: { + case Clusters::ColorControl::Commands::Ids::StopMoveStep: { expectArgumentCount = 2; uint8_t optionsMask; uint8_t optionsOverride; @@ -1455,12 +1455,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_COLOR_CONTROL_CLUSTER_ID, aCommandId, + Clusters::ColorControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_COLOR_CONTROL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::ColorControl::Id); return; } } @@ -1470,7 +1470,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_COLOR_CONTROL_CLUSTER_ID, aCommandId, + Clusters::ColorControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1500,7 +1500,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -1575,12 +1575,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -1590,7 +1590,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1620,19 +1620,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_CLEAR_ALL_PINS_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearAllPins: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfDoorLockClusterClearAllPinsCallback(apCommandObj); break; } - case ZCL_CLEAR_ALL_RFIDS_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearAllRfids: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfDoorLockClusterClearAllRfidsCallback(apCommandObj); break; } - case ZCL_CLEAR_HOLIDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearHolidaySchedule: { expectArgumentCount = 1; uint8_t scheduleId; bool argExists[1]; @@ -1691,7 +1691,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_PIN_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearPin: { expectArgumentCount = 1; uint16_t userId; bool argExists[1]; @@ -1750,7 +1750,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_RFID_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearRfid: { expectArgumentCount = 1; uint16_t userId; bool argExists[1]; @@ -1809,7 +1809,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_WEEKDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearWeekdaySchedule: { expectArgumentCount = 2; uint8_t scheduleId; uint16_t userId; @@ -1872,7 +1872,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_YEARDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearYeardaySchedule: { expectArgumentCount = 2; uint8_t scheduleId; uint16_t userId; @@ -1935,7 +1935,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_HOLIDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetHolidaySchedule: { expectArgumentCount = 1; uint8_t scheduleId; bool argExists[1]; @@ -1994,7 +1994,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LOG_RECORD_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetLogRecord: { expectArgumentCount = 1; uint16_t logIndex; bool argExists[1]; @@ -2053,7 +2053,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_PIN_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetPin: { expectArgumentCount = 1; uint16_t userId; bool argExists[1]; @@ -2112,7 +2112,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_RFID_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetRfid: { expectArgumentCount = 1; uint16_t userId; bool argExists[1]; @@ -2171,7 +2171,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_USER_TYPE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetUserType: { expectArgumentCount = 1; uint16_t userId; bool argExists[1]; @@ -2230,7 +2230,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_WEEKDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetWeekdaySchedule: { expectArgumentCount = 2; uint8_t scheduleId; uint16_t userId; @@ -2293,7 +2293,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_YEARDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetYeardaySchedule: { expectArgumentCount = 2; uint8_t scheduleId; uint16_t userId; @@ -2356,7 +2356,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_LOCK_DOOR_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::LockDoor: { expectArgumentCount = 1; const uint8_t * PIN; bool argExists[1]; @@ -2416,7 +2416,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_HOLIDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetHolidaySchedule: { expectArgumentCount = 4; uint8_t scheduleId; uint32_t localStartTime; @@ -2488,7 +2488,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_PIN_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetPin: { expectArgumentCount = 4; uint16_t userId; uint8_t userStatus; @@ -2561,7 +2561,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_RFID_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetRfid: { expectArgumentCount = 4; uint16_t userId; uint8_t userStatus; @@ -2634,7 +2634,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_USER_TYPE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetUserType: { expectArgumentCount = 2; uint16_t userId; uint8_t userType; @@ -2697,7 +2697,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_WEEKDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetWeekdaySchedule: { expectArgumentCount = 7; uint8_t scheduleId; uint16_t userId; @@ -2781,7 +2781,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_YEARDAY_SCHEDULE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetYeardaySchedule: { expectArgumentCount = 4; uint8_t scheduleId; uint16_t userId; @@ -2853,7 +2853,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UNLOCK_DOOR_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::UnlockDoor: { expectArgumentCount = 1; const uint8_t * PIN; bool argExists[1]; @@ -2913,7 +2913,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UNLOCK_WITH_TIMEOUT_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::UnlockWithTimeout: { expectArgumentCount = 2; uint16_t timeoutInSeconds; const uint8_t * pin; @@ -2982,12 +2982,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DOOR_LOCK_CLUSTER_ID, aCommandId, + Clusters::DoorLock::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DOOR_LOCK_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DoorLock::Id); return; } } @@ -2997,7 +2997,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DOOR_LOCK_CLUSTER_ID, aCommandId, + Clusters::DoorLock::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -3027,7 +3027,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -3095,13 +3095,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -3178,12 +3178,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -3193,7 +3193,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -3223,7 +3223,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_GROUP_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::AddGroup: { expectArgumentCount = 2; uint16_t groupId; const uint8_t * groupName; @@ -3287,7 +3287,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_GROUP_IF_IDENTIFYING_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::AddGroupIfIdentifying: { expectArgumentCount = 2; uint16_t groupId; const uint8_t * groupName; @@ -3352,7 +3352,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_GROUP_MEMBERSHIP_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::GetGroupMembership: { expectArgumentCount = 2; uint8_t groupCount; /* TYPE WARNING: array array defaults to */ uint8_t * groupList; @@ -3416,13 +3416,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_GROUPS_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::RemoveAllGroups: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGroupsClusterRemoveAllGroupsCallback(apCommandObj); break; } - case ZCL_REMOVE_GROUP_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::RemoveGroup: { expectArgumentCount = 1; uint16_t groupId; bool argExists[1]; @@ -3481,7 +3481,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_VIEW_GROUP_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::ViewGroup: { expectArgumentCount = 1; uint16_t groupId; bool argExists[1]; @@ -3544,12 +3544,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GROUPS_CLUSTER_ID, aCommandId, + Clusters::Groups::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GROUPS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Groups::Id); return; } } @@ -3559,7 +3559,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GROUPS_CLUSTER_ID, aCommandId, + Clusters::Groups::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -3589,7 +3589,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ZONE_ENROLL_RESPONSE_COMMAND_ID: { + case Clusters::IasZone::Commands::Ids::ZoneEnrollResponse: { expectArgumentCount = 2; uint8_t enrollResponseCode; uint8_t zoneId; @@ -3656,12 +3656,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_IAS_ZONE_CLUSTER_ID, aCommandId, + Clusters::IasZone::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_IAS_ZONE_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::IasZone::Id); return; } } @@ -3671,7 +3671,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_IAS_ZONE_CLUSTER_ID, aCommandId, + Clusters::IasZone::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -3701,7 +3701,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_IDENTIFY_COMMAND_ID: { + case Clusters::Identify::Commands::Ids::Identify: { expectArgumentCount = 1; uint16_t identifyTime; bool argExists[1]; @@ -3760,7 +3760,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_IDENTIFY_QUERY_COMMAND_ID: { + case Clusters::Identify::Commands::Ids::IdentifyQuery: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfIdentifyClusterIdentifyQueryCallback(apCommandObj); @@ -3770,12 +3770,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_IDENTIFY_CLUSTER_ID, aCommandId, + Clusters::Identify::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_IDENTIFY_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Identify::Id); return; } } @@ -3785,7 +3785,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_IDENTIFY_CLUSTER_ID, aCommandId, + Clusters::Identify::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -3815,7 +3815,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MOVE_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Move: { expectArgumentCount = 4; uint8_t moveMode; uint8_t rate; @@ -3886,7 +3886,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevel: { expectArgumentCount = 4; uint8_t level; uint16_t transitionTime; @@ -3958,7 +3958,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevelWithOnOff: { expectArgumentCount = 2; uint8_t level; uint16_t transitionTime; @@ -4021,7 +4021,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveWithOnOff: { expectArgumentCount = 2; uint8_t moveMode; uint8_t rate; @@ -4084,7 +4084,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Step: { expectArgumentCount = 5; uint8_t stepMode; uint8_t stepSize; @@ -4160,7 +4160,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StepWithOnOff: { expectArgumentCount = 3; uint8_t stepMode; uint8_t stepSize; @@ -4227,7 +4227,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Stop: { expectArgumentCount = 2; uint8_t optionMask; uint8_t optionOverride; @@ -4290,7 +4290,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StopWithOnOff: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj); @@ -4300,12 +4300,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::LevelControl::Id); return; } } @@ -4315,7 +4315,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -4345,7 +4345,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_SLEEP_COMMAND_ID: { + case Clusters::LowPower::Commands::Ids::Sleep: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfLowPowerClusterSleepCallback(apCommandObj); @@ -4355,12 +4355,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LOW_POWER_CLUSTER_ID, aCommandId, + Clusters::LowPower::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LOW_POWER_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::LowPower::Id); return; } } @@ -4370,7 +4370,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LOW_POWER_CLUSTER_ID, aCommandId, + Clusters::LowPower::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -4400,7 +4400,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -4471,7 +4471,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -4549,7 +4549,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -4620,7 +4620,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -4691,7 +4691,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -4750,7 +4750,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -4821,7 +4821,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -4891,7 +4891,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -4962,7 +4962,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -5044,12 +5044,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -5059,7 +5059,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -5089,7 +5089,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_APPLY_UPDATE_REQUEST_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::ApplyUpdateRequest: { expectArgumentCount = 2; chip::ByteSpan updateToken; uint32_t newVersion; @@ -5156,7 +5156,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_NOTIFY_UPDATE_APPLIED_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::NotifyUpdateApplied: { expectArgumentCount = 2; chip::ByteSpan updateToken; uint32_t currentVersion; @@ -5223,7 +5223,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_QUERY_IMAGE_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::QueryImage: { expectArgumentCount = 9; uint16_t vendorId; uint16_t productId; @@ -5325,12 +5325,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OTA_PROVIDER_CLUSTER_ID, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_OTA_PROVIDER_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id); return; } } @@ -5340,7 +5341,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OTA_PROVIDER_CLUSTER_ID, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -5370,19 +5371,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_OFF_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Off: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOffCallback(apCommandObj); break; } - case ZCL_ON_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::On: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOnCallback(apCommandObj); break; } - case ZCL_TOGGLE_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Toggle: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj); @@ -5392,12 +5393,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OnOff::Id); return; } } @@ -5407,7 +5408,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -5437,7 +5438,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -5515,7 +5516,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -5577,7 +5578,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -5639,13 +5640,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -5712,7 +5713,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -5775,7 +5776,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -5834,7 +5835,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -5899,13 +5900,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -5915,7 +5915,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -5945,7 +5945,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_SCENE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::AddScene: { expectArgumentCount = 5; uint16_t groupId; uint8_t sceneId; @@ -6023,7 +6023,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_SCENE_MEMBERSHIP_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::GetSceneMembership: { expectArgumentCount = 1; uint16_t groupId; bool argExists[1]; @@ -6082,7 +6082,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_RECALL_SCENE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::RecallScene: { expectArgumentCount = 3; uint16_t groupId; uint8_t sceneId; @@ -6149,7 +6149,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_SCENES_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::RemoveAllScenes: { expectArgumentCount = 1; uint16_t groupId; bool argExists[1]; @@ -6208,7 +6208,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_SCENE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::RemoveScene: { expectArgumentCount = 2; uint16_t groupId; uint8_t sceneId; @@ -6271,7 +6271,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STORE_SCENE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::StoreScene: { expectArgumentCount = 2; uint16_t groupId; uint8_t sceneId; @@ -6334,7 +6334,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_VIEW_SCENE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::ViewScene: { expectArgumentCount = 2; uint16_t groupId; uint8_t sceneId; @@ -6401,12 +6401,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_SCENES_CLUSTER_ID, aCommandId, + Clusters::Scenes::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_SCENES_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Scenes::Id); return; } } @@ -6416,7 +6416,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_SCENES_CLUSTER_ID, aCommandId, + Clusters::Scenes::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -6446,19 +6446,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_TEST_COMMAND_ID: { + case Clusters::TestCluster::Commands::Ids::Test: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfTestClusterClusterTestCallback(apCommandObj); break; } - case ZCL_TEST_NOT_HANDLED_COMMAND_ID: { + case Clusters::TestCluster::Commands::Ids::TestNotHandled: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfTestClusterClusterTestNotHandledCallback(apCommandObj); break; } - case ZCL_TEST_SPECIFIC_COMMAND_ID: { + case Clusters::TestCluster::Commands::Ids::TestSpecific: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfTestClusterClusterTestSpecificCallback(apCommandObj); @@ -6468,12 +6468,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TEST_CLUSTER_ID, aCommandId, + Clusters::TestCluster::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TEST_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::TestCluster::Id); return; } } @@ -6483,7 +6483,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TEST_CLUSTER_ID, aCommandId, + Clusters::TestCluster::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -6508,58 +6508,58 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_BARRIER_CONTROL_CLUSTER_ID: + case Clusters::BarrierControl::Id: clusters::BarrierControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_BASIC_CLUSTER_ID: + case Clusters::Basic::Id: clusters::Basic::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_BINDING_CLUSTER_ID: + case Clusters::Binding::Id: clusters::Binding::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_COLOR_CONTROL_CLUSTER_ID: + case Clusters::ColorControl::Id: clusters::ColorControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_DOOR_LOCK_CLUSTER_ID: + case Clusters::DoorLock::Id: clusters::DoorLock::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GROUPS_CLUSTER_ID: + case Clusters::Groups::Id: clusters::Groups::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_IAS_ZONE_CLUSTER_ID: + case Clusters::IasZone::Id: clusters::IasZone::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_IDENTIFY_CLUSTER_ID: + case Clusters::Identify::Id: clusters::Identify::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case Clusters::LevelControl::Id: clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_LOW_POWER_CLUSTER_ID: + case Clusters::LowPower::Id: clusters::LowPower::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OTA_PROVIDER_CLUSTER_ID: + case Clusters::OtaSoftwareUpdateProvider::Id: clusters::OtaSoftwareUpdateProvider::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_ON_OFF_CLUSTER_ID: + case Clusters::OnOff::Id: clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_SCENES_CLUSTER_ID: + case Clusters::Scenes::Id: clusters::Scenes::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_TEST_CLUSTER_ID: + case Clusters::TestCluster::Id: clusters::TestCluster::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp b/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp index 8fde99d23a1489..4555401e580e07 100644 --- a/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp +++ b/examples/bridge-app/bridge-common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -130,12 +130,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -145,7 +145,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -175,7 +175,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -243,13 +243,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -326,12 +326,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -341,7 +341,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -371,7 +371,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MOVE_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Move: { expectArgumentCount = 4; uint8_t moveMode; uint8_t rate; @@ -442,7 +442,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevel: { expectArgumentCount = 4; uint8_t level; uint16_t transitionTime; @@ -514,7 +514,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevelWithOnOff: { expectArgumentCount = 2; uint8_t level; uint16_t transitionTime; @@ -577,7 +577,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveWithOnOff: { expectArgumentCount = 2; uint8_t moveMode; uint8_t rate; @@ -640,7 +640,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Step: { expectArgumentCount = 5; uint8_t stepMode; uint8_t stepSize; @@ -716,7 +716,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StepWithOnOff: { expectArgumentCount = 3; uint8_t stepMode; uint8_t stepSize; @@ -783,7 +783,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Stop: { expectArgumentCount = 2; uint8_t optionMask; uint8_t optionOverride; @@ -846,7 +846,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StopWithOnOff: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj); @@ -856,12 +856,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::LevelControl::Id); return; } } @@ -871,7 +871,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -901,7 +901,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -972,7 +972,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1050,7 +1050,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -1121,7 +1121,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -1192,7 +1192,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -1251,7 +1251,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -1322,7 +1322,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -1392,7 +1392,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -1463,7 +1463,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1545,12 +1545,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -1560,7 +1560,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1590,19 +1590,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_OFF_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Off: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOffCallback(apCommandObj); break; } - case ZCL_ON_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::On: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOnCallback(apCommandObj); break; } - case ZCL_TOGGLE_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Toggle: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj); @@ -1612,12 +1612,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OnOff::Id); return; } } @@ -1627,7 +1627,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1657,7 +1657,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -1735,7 +1735,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -1797,7 +1797,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -1859,13 +1859,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -1932,7 +1932,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -1995,7 +1995,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -2054,7 +2054,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -2119,13 +2119,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -2135,7 +2134,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2160,22 +2159,22 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case Clusters::LevelControl::Id: clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_ON_OFF_CLUSTER_ID: + case Clusters::OnOff::Id: clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp b/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp index 8fde99d23a1489..4555401e580e07 100644 --- a/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp +++ b/examples/lighting-app/lighting-common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -130,12 +130,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -145,7 +145,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -175,7 +175,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -243,13 +243,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -326,12 +326,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -341,7 +341,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -371,7 +371,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MOVE_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Move: { expectArgumentCount = 4; uint8_t moveMode; uint8_t rate; @@ -442,7 +442,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevel: { expectArgumentCount = 4; uint8_t level; uint16_t transitionTime; @@ -514,7 +514,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevelWithOnOff: { expectArgumentCount = 2; uint8_t level; uint16_t transitionTime; @@ -577,7 +577,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveWithOnOff: { expectArgumentCount = 2; uint8_t moveMode; uint8_t rate; @@ -640,7 +640,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Step: { expectArgumentCount = 5; uint8_t stepMode; uint8_t stepSize; @@ -716,7 +716,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StepWithOnOff: { expectArgumentCount = 3; uint8_t stepMode; uint8_t stepSize; @@ -783,7 +783,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Stop: { expectArgumentCount = 2; uint8_t optionMask; uint8_t optionOverride; @@ -846,7 +846,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StopWithOnOff: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj); @@ -856,12 +856,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::LevelControl::Id); return; } } @@ -871,7 +871,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -901,7 +901,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -972,7 +972,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1050,7 +1050,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -1121,7 +1121,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -1192,7 +1192,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -1251,7 +1251,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -1322,7 +1322,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -1392,7 +1392,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -1463,7 +1463,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1545,12 +1545,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -1560,7 +1560,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1590,19 +1590,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_OFF_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Off: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOffCallback(apCommandObj); break; } - case ZCL_ON_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::On: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOnCallback(apCommandObj); break; } - case ZCL_TOGGLE_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Toggle: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj); @@ -1612,12 +1612,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OnOff::Id); return; } } @@ -1627,7 +1627,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1657,7 +1657,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -1735,7 +1735,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -1797,7 +1797,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -1859,13 +1859,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -1932,7 +1932,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -1995,7 +1995,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -2054,7 +2054,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -2119,13 +2119,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -2135,7 +2134,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2160,22 +2159,22 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case Clusters::LevelControl::Id: clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_ON_OFF_CLUSTER_ID: + case Clusters::OnOff::Id: clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp b/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp index 4e77593bb1124a..0e35ddb770b725 100644 --- a/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp +++ b/examples/lock-app/lock-common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -130,12 +130,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -145,7 +145,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -175,7 +175,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -243,13 +243,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -326,12 +326,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -341,7 +341,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -371,7 +371,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -442,7 +442,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -520,7 +520,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -591,7 +591,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -662,7 +662,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -721,7 +721,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -792,7 +792,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -862,7 +862,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -933,7 +933,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1015,12 +1015,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -1030,7 +1030,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1060,19 +1060,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_OFF_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Off: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOffCallback(apCommandObj); break; } - case ZCL_ON_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::On: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOnCallback(apCommandObj); break; } - case ZCL_TOGGLE_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Toggle: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj); @@ -1082,12 +1082,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OnOff::Id); return; } } @@ -1097,7 +1097,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1127,7 +1127,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -1205,7 +1205,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -1267,7 +1267,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -1329,13 +1329,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -1402,7 +1402,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -1465,7 +1465,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -1524,7 +1524,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -1589,13 +1589,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -1605,7 +1604,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1630,19 +1629,19 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_ON_OFF_CLUSTER_ID: + case Clusters::OnOff::Id: clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp b/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp index 22bacafaf78b79..11fed751ae1bc2 100644 --- a/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp +++ b/examples/pump-app/pump-common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -59,12 +59,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BASIC_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Basic::Id); return; } } @@ -74,7 +74,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -104,7 +104,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -179,12 +179,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -194,7 +194,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -224,7 +224,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -292,13 +292,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -375,12 +375,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -390,7 +390,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -420,7 +420,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MOVE_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Move: { expectArgumentCount = 4; uint8_t moveMode; uint8_t rate; @@ -491,7 +491,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevel: { expectArgumentCount = 4; uint8_t level; uint16_t transitionTime; @@ -563,7 +563,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevelWithOnOff: { expectArgumentCount = 2; uint8_t level; uint16_t transitionTime; @@ -626,7 +626,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveWithOnOff: { expectArgumentCount = 2; uint8_t moveMode; uint8_t rate; @@ -689,7 +689,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Step: { expectArgumentCount = 5; uint8_t stepMode; uint8_t stepSize; @@ -765,7 +765,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StepWithOnOff: { expectArgumentCount = 3; uint8_t stepMode; uint8_t stepSize; @@ -832,7 +832,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Stop: { expectArgumentCount = 2; uint8_t optionMask; uint8_t optionOverride; @@ -895,7 +895,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StopWithOnOff: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj); @@ -905,12 +905,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::LevelControl::Id); return; } } @@ -920,7 +920,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -950,7 +950,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -1021,7 +1021,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1099,7 +1099,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -1170,7 +1170,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -1241,7 +1241,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -1312,7 +1312,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -1382,7 +1382,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -1453,7 +1453,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1535,12 +1535,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -1550,7 +1550,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1580,19 +1580,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_OFF_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Off: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOffCallback(apCommandObj); break; } - case ZCL_ON_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::On: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOnCallback(apCommandObj); break; } - case ZCL_TOGGLE_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Toggle: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj); @@ -1602,12 +1602,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OnOff::Id); return; } } @@ -1617,7 +1617,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1647,7 +1647,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -1725,7 +1725,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -1787,7 +1787,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -1849,13 +1849,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -1922,7 +1922,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -1985,7 +1985,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -2044,7 +2044,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -2109,13 +2109,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -2125,7 +2124,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2150,25 +2149,25 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_BASIC_CLUSTER_ID: + case Clusters::Basic::Id: clusters::Basic::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case Clusters::LevelControl::Id: clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_ON_OFF_CLUSTER_ID: + case Clusters::OnOff::Id: clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp b/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp index c647760d5bffb1..626165db45299d 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp +++ b/examples/pump-controller-app/pump-controller-common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -59,12 +59,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BASIC_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Basic::Id); return; } } @@ -74,7 +74,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -104,7 +104,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -179,12 +179,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -194,7 +194,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -224,7 +224,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -292,13 +292,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -375,12 +375,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -390,7 +390,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -420,7 +420,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -491,7 +491,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -569,7 +569,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -640,7 +640,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -711,7 +711,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -770,7 +770,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -841,7 +841,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -911,7 +911,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -982,7 +982,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -1064,12 +1064,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -1079,7 +1079,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1109,7 +1109,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -1187,7 +1187,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -1249,7 +1249,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -1311,13 +1311,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -1384,7 +1384,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -1447,7 +1447,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -1506,7 +1506,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -1571,13 +1571,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -1587,7 +1586,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1612,19 +1611,19 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_BASIC_CLUSTER_ID: + case Clusters::Basic::Id: clusters::Basic::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp b/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp index 8dd624e5387f06..05a787947ba088 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -130,12 +130,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -145,7 +145,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -175,7 +175,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -243,13 +243,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -326,12 +326,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -341,7 +341,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -371,7 +371,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -449,7 +449,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -520,7 +520,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -591,7 +591,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -650,7 +650,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -721,7 +721,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -791,7 +791,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -873,12 +873,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -888,7 +888,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -918,7 +918,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -996,7 +996,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -1058,7 +1058,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -1120,13 +1120,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -1193,7 +1193,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -1256,7 +1256,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -1315,7 +1315,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -1380,13 +1380,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -1396,7 +1395,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1421,16 +1420,16 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp index 85d53f11da2d2c..9a7677f0c79fc2 100644 --- a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp +++ b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_CHANGE_STATUS_COMMAND_ID: { + case Clusters::ApplicationBasic::Commands::Ids::ChangeStatus: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -118,12 +118,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_APPLICATION_BASIC_CLUSTER_ID, aCommandId, + Clusters::ApplicationBasic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_APPLICATION_BASIC_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::ApplicationBasic::Id); return; } } @@ -133,7 +133,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_APPLICATION_BASIC_CLUSTER_ID, aCommandId, + Clusters::ApplicationBasic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -163,7 +163,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RENAME_OUTPUT_COMMAND_ID: { + case Clusters::AudioOutput::Commands::Ids::RenameOutput: { expectArgumentCount = 2; uint8_t index; const uint8_t * name; @@ -227,7 +227,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SELECT_OUTPUT_COMMAND_ID: { + case Clusters::AudioOutput::Commands::Ids::SelectOutput: { expectArgumentCount = 1; uint8_t index; bool argExists[1]; @@ -290,12 +290,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_AUDIO_OUTPUT_CLUSTER_ID, aCommandId, + Clusters::AudioOutput::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_AUDIO_OUTPUT_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::AudioOutput::Id); return; } } @@ -305,7 +305,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_AUDIO_OUTPUT_CLUSTER_ID, aCommandId, + Clusters::AudioOutput::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -339,12 +339,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BASIC_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Basic::Id); return; } } @@ -354,7 +354,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BASIC_CLUSTER_ID, aCommandId, + Clusters::Basic::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -384,7 +384,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_BIND_COMMAND_ID: { + case Clusters::Binding::Commands::Ids::Bind: { expectArgumentCount = 4; chip::NodeId nodeId; chip::GroupId groupId; @@ -455,7 +455,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UNBIND_COMMAND_ID: { + case Clusters::Binding::Commands::Ids::Unbind: { expectArgumentCount = 4; chip::NodeId nodeId; chip::GroupId groupId; @@ -530,12 +530,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BINDING_CLUSTER_ID, aCommandId, + Clusters::Binding::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_BINDING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Binding::Id); return; } } @@ -545,7 +545,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_BINDING_CLUSTER_ID, aCommandId, + Clusters::Binding::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -575,7 +575,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_LAUNCH_CONTENT_COMMAND_ID: { + case Clusters::ContentLauncher::Commands::Ids::LaunchContent: { expectArgumentCount = 2; uint8_t autoPlay; const uint8_t * data; @@ -640,7 +640,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_LAUNCH_URL_COMMAND_ID: { + case Clusters::ContentLauncher::Commands::Ids::LaunchURL: { expectArgumentCount = 2; const uint8_t * contentURL; const uint8_t * displayString; @@ -710,12 +710,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_CONTENT_LAUNCH_CLUSTER_ID, aCommandId, + Clusters::ContentLauncher::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_CONTENT_LAUNCH_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::ContentLauncher::Id); return; } } @@ -725,7 +725,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_CONTENT_LAUNCH_CLUSTER_ID, aCommandId, + Clusters::ContentLauncher::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -755,7 +755,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_RETRIEVE_LOGS_REQUEST_COMMAND_ID: { + case Clusters::DiagnosticLogs::Commands::Ids::RetrieveLogsRequest: { expectArgumentCount = 3; uint8_t intent; uint8_t requestedProtocol; @@ -830,12 +830,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DiagnosticLogs::Id); return; } } @@ -845,7 +845,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID, aCommandId, + Clusters::DiagnosticLogs::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -875,7 +875,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -943,13 +943,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -1026,12 +1026,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -1041,7 +1041,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1071,7 +1071,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MOVE_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Move: { expectArgumentCount = 4; uint8_t moveMode; uint8_t rate; @@ -1142,7 +1142,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevel: { expectArgumentCount = 4; uint8_t level; uint16_t transitionTime; @@ -1214,7 +1214,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_TO_LEVEL_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveToLevelWithOnOff: { expectArgumentCount = 2; uint8_t level; uint16_t transitionTime; @@ -1277,7 +1277,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::MoveWithOnOff: { expectArgumentCount = 2; uint8_t moveMode; uint8_t rate; @@ -1340,7 +1340,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Step: { expectArgumentCount = 5; uint8_t stepMode; uint8_t stepSize; @@ -1416,7 +1416,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STEP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StepWithOnOff: { expectArgumentCount = 3; uint8_t stepMode; uint8_t stepSize; @@ -1483,7 +1483,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::Stop: { expectArgumentCount = 2; uint8_t optionMask; uint8_t optionOverride; @@ -1546,7 +1546,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_WITH_ON_OFF_COMMAND_ID: { + case Clusters::LevelControl::Commands::Ids::StopWithOnOff: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfLevelControlClusterStopWithOnOffCallback(apCommandObj); @@ -1556,12 +1556,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_LEVEL_CONTROL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::LevelControl::Id); return; } } @@ -1571,7 +1571,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_LEVEL_CONTROL_CLUSTER_ID, aCommandId, + Clusters::LevelControl::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1601,43 +1601,43 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MEDIA_FAST_FORWARD_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaFastForward: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaFastForwardCallback(apCommandObj); break; } - case ZCL_MEDIA_NEXT_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaNext: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaNextCallback(apCommandObj); break; } - case ZCL_MEDIA_PAUSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaPause: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaPauseCallback(apCommandObj); break; } - case ZCL_MEDIA_PLAY_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaPlay: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaPlayCallback(apCommandObj); break; } - case ZCL_MEDIA_PREVIOUS_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaPrevious: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaPreviousCallback(apCommandObj); break; } - case ZCL_MEDIA_REWIND_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaRewind: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaRewindCallback(apCommandObj); break; } - case ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaSkipBackward: { expectArgumentCount = 1; uint64_t deltaPositionMilliseconds; bool argExists[1]; @@ -1696,7 +1696,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_SKIP_FORWARD_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaSkipForward: { expectArgumentCount = 1; uint64_t deltaPositionMilliseconds; bool argExists[1]; @@ -1755,7 +1755,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_SKIP_SEEK_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaSkipSeek: { expectArgumentCount = 1; uint64_t position; bool argExists[1]; @@ -1814,13 +1814,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_START_OVER_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaStartOver: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaStartOverCallback(apCommandObj); break; } - case ZCL_MEDIA_STOP_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaStop: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfMediaPlaybackClusterMediaStopCallback(apCommandObj); @@ -1830,12 +1830,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_MEDIA_PLAYBACK_CLUSTER_ID, aCommandId, + Clusters::MediaPlayback::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_MEDIA_PLAYBACK_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::MediaPlayback::Id); return; } } @@ -1845,7 +1845,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_MEDIA_PLAYBACK_CLUSTER_ID, aCommandId, + Clusters::MediaPlayback::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1875,7 +1875,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -1946,7 +1946,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -2024,7 +2024,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -2095,7 +2095,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -2166,7 +2166,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -2225,7 +2225,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -2296,7 +2296,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -2366,7 +2366,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -2437,7 +2437,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -2519,12 +2519,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -2534,7 +2534,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2564,7 +2564,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_APPLY_UPDATE_REQUEST_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::ApplyUpdateRequest: { expectArgumentCount = 2; chip::ByteSpan updateToken; uint32_t newVersion; @@ -2631,7 +2631,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_NOTIFY_UPDATE_APPLIED_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::NotifyUpdateApplied: { expectArgumentCount = 2; chip::ByteSpan updateToken; uint32_t currentVersion; @@ -2698,7 +2698,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_QUERY_IMAGE_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::QueryImage: { expectArgumentCount = 9; uint16_t vendorId; uint16_t productId; @@ -2800,12 +2800,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OTA_PROVIDER_CLUSTER_ID, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_OTA_PROVIDER_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id); return; } } @@ -2815,7 +2816,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OTA_PROVIDER_CLUSTER_ID, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2845,19 +2846,19 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_OFF_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Off: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOffCallback(apCommandObj); break; } - case ZCL_ON_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::On: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterOnCallback(apCommandObj); break; } - case ZCL_TOGGLE_COMMAND_ID: { + case Clusters::OnOff::Commands::Ids::Toggle: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj); @@ -2867,12 +2868,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ON_OFF_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OnOff::Id); return; } } @@ -2882,7 +2883,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ON_OFF_CLUSTER_ID, aCommandId, + Clusters::OnOff::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2912,7 +2913,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -2990,7 +2991,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -3052,7 +3053,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -3114,13 +3115,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -3187,7 +3188,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -3250,7 +3251,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -3309,7 +3310,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -3374,13 +3375,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -3390,7 +3390,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -3415,43 +3415,43 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_APPLICATION_BASIC_CLUSTER_ID: + case Clusters::ApplicationBasic::Id: clusters::ApplicationBasic::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_AUDIO_OUTPUT_CLUSTER_ID: + case Clusters::AudioOutput::Id: clusters::AudioOutput::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_BASIC_CLUSTER_ID: + case Clusters::Basic::Id: clusters::Basic::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_BINDING_CLUSTER_ID: + case Clusters::Binding::Id: clusters::Binding::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_CONTENT_LAUNCH_CLUSTER_ID: + case Clusters::ContentLauncher::Id: clusters::ContentLauncher::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: + case Clusters::DiagnosticLogs::Id: clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: + case Clusters::LevelControl::Id: clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: + case Clusters::MediaPlayback::Id: clusters::MediaPlayback::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OTA_PROVIDER_CLUSTER_ID: + case Clusters::OtaSoftwareUpdateProvider::Id: clusters::OtaSoftwareUpdateProvider::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_ON_OFF_CLUSTER_ID: + case Clusters::OnOff::Id: clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/examples/window-app/common/gen/IMClusterCommandHandler.cpp b/examples/window-app/common/gen/IMClusterCommandHandler.cpp index d400e8bf6994fa..948196b8ccab41 100644 --- a/examples/window-app/common/gen/IMClusterCommandHandler.cpp +++ b/examples/window-app/common/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafe: { expectArgumentCount = 3; uint16_t expiryLengthSeconds; uint64_t breadcrumb; @@ -123,13 +123,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningComplete: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); break; } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfig: { expectArgumentCount = 4; uint8_t location; const uint8_t * countryCode; @@ -206,12 +206,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -221,7 +221,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -251,7 +251,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -322,7 +322,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -400,7 +400,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -471,7 +471,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetwork: { expectArgumentCount = 3; chip::ByteSpan networkID; uint64_t breadcrumb; @@ -542,7 +542,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::GetLastNetworkCommissioningResult: { expectArgumentCount = 1; uint32_t timeoutMs; bool argExists[1]; @@ -601,7 +601,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetwork: { expectArgumentCount = 3; chip::ByteSpan NetworkID; uint64_t Breadcrumb; @@ -672,7 +672,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworks: { expectArgumentCount = 3; chip::ByteSpan ssid; uint64_t breadcrumb; @@ -742,7 +742,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetwork: { expectArgumentCount = 3; chip::ByteSpan operationalDataset; uint64_t breadcrumb; @@ -813,7 +813,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetwork: { expectArgumentCount = 4; chip::ByteSpan ssid; chip::ByteSpan credentials; @@ -895,12 +895,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -910,7 +910,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -940,7 +940,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_OP_CERT_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddOpCert: { expectArgumentCount = 4; chip::ByteSpan NOCArray; chip::ByteSpan IPKValue; @@ -1018,7 +1018,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::AddTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan RootCertificate; bool argExists[1]; @@ -1080,7 +1080,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CSR_REQUEST_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRRequest: { expectArgumentCount = 1; chip::ByteSpan CSRNonce; bool argExists[1]; @@ -1142,13 +1142,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_FABRICS_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveAllFabrics: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfOperationalCredentialsClusterRemoveAllFabricsCallback(apCommandObj); break; } - case ZCL_REMOVE_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveFabric: { expectArgumentCount = 3; chip::FabricId FabricId; chip::NodeId NodeId; @@ -1215,7 +1215,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_TRUSTED_ROOT_CERTIFICATE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::RemoveTrustedRootCertificate: { expectArgumentCount = 1; chip::ByteSpan TrustedRootIdentifier; bool argExists[1]; @@ -1278,7 +1278,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabric: { expectArgumentCount = 1; uint16_t VendorId; bool argExists[1]; @@ -1337,7 +1337,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_FABRIC_LABEL_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::UpdateFabricLabel: { expectArgumentCount = 1; const uint8_t * Label; bool argExists[1]; @@ -1402,13 +1402,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -1418,7 +1417,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1448,13 +1447,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_DOWN_OR_CLOSE_COMMAND_ID: { + case Clusters::WindowCovering::Commands::Ids::DownOrClose: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfWindowCoveringClusterDownOrCloseCallback(apCommandObj); break; } - case ZCL_GO_TO_LIFT_PERCENTAGE_COMMAND_ID: { + case Clusters::WindowCovering::Commands::Ids::GoToLiftPercentage: { expectArgumentCount = 2; uint8_t liftPercentageValue; uint16_t liftPercent100thsValue; @@ -1518,7 +1517,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GO_TO_LIFT_VALUE_COMMAND_ID: { + case Clusters::WindowCovering::Commands::Ids::GoToLiftValue: { expectArgumentCount = 1; uint16_t liftValue; bool argExists[1]; @@ -1577,7 +1576,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GO_TO_TILT_PERCENTAGE_COMMAND_ID: { + case Clusters::WindowCovering::Commands::Ids::GoToTiltPercentage: { expectArgumentCount = 2; uint8_t tiltPercentageValue; uint16_t tiltPercent100thsValue; @@ -1641,7 +1640,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GO_TO_TILT_VALUE_COMMAND_ID: { + case Clusters::WindowCovering::Commands::Ids::GoToTiltValue: { expectArgumentCount = 1; uint16_t tiltValue; bool argExists[1]; @@ -1700,13 +1699,13 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STOP_MOTION_COMMAND_ID: { + case Clusters::WindowCovering::Commands::Ids::StopMotion: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfWindowCoveringClusterStopMotionCallback(apCommandObj); break; } - case ZCL_UP_OR_OPEN_COMMAND_ID: { + case Clusters::WindowCovering::Commands::Ids::UpOrOpen: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. wasHandled = emberAfWindowCoveringClusterUpOrOpenCallback(apCommandObj); @@ -1716,12 +1715,12 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_WINDOW_COVERING_CLUSTER_ID, aCommandId, + Clusters::WindowCovering::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_WINDOW_COVERING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::WindowCovering::Id); return; } } @@ -1731,7 +1730,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_WINDOW_COVERING_CLUSTER_ID, aCommandId, + Clusters::WindowCovering::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1756,16 +1755,16 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_WINDOW_COVERING_CLUSTER_ID: + case Clusters::WindowCovering::Id: clusters::WindowCovering::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: diff --git a/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt b/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt index 7a0f532b7aa917..22786b8fe90710 100644 --- a/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt +++ b/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt @@ -4,8 +4,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "callback.h" #include "app/util/util.h" @@ -47,7 +47,7 @@ void Dispatch{{asCamelCased side false}}Command(app::Command * apCommandObj, Com {{#unless mfgCode}} {{#if (isStrEqual clusterName parent.name)}} {{#if (isCommandAvailable parent.side incoming outgoing commandSource name)}} - case ZCL_{{asDelimitedMacro name}}_COMMAND_ID: { + case Clusters::{{asUpperCamelCase parent.name}}::Commands::Ids::{{asUpperCamelCase name}}: { {{> im_command_handler_cluster_commands}} break; } @@ -59,12 +59,12 @@ void Dispatch{{asCamelCased side false}}Command(app::Command * apCommandObj, Com // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_{{asDelimitedMacro define}}_ID, + Clusters::{{asUpperCamelCase name}}::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_{{asDelimitedMacro define}}_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::{{asUpperCamelCase name}}::Id); return; } } @@ -74,7 +74,7 @@ void Dispatch{{asCamelCased side false}}Command(app::Command * apCommandObj, Com { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_{{asDelimitedMacro define}}_ID, + Clusters::{{asUpperCamelCase name}}::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, @@ -102,7 +102,7 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC { {{#all_user_clusters}} {{#if (user_cluster_has_enabled_command name side)}} - case ZCL_{{asDelimitedMacro define}}_ID : + case Clusters::{{asUpperCamelCase name}}::Id: clusters::{{asCamelCased name false}}::Dispatch{{asCamelCased side false}}Command(apCommandObj, aCommandId, aEndPointId, aReader); break; {{/if}} diff --git a/src/controller/data_model/gen/IMClusterCommandHandler.cpp b/src/controller/data_model/gen/IMClusterCommandHandler.cpp index d59ae6ad32bc48..9017384223f213 100644 --- a/src/controller/data_model/gen/IMClusterCommandHandler.cpp +++ b/src/controller/data_model/gen/IMClusterCommandHandler.cpp @@ -21,8 +21,8 @@ #include #include "app/common/gen/af-structs.h" -#include "app/common/gen/cluster-id.h" -#include "app/common/gen/command-id.h" +#include "app/common/gen/ids/Clusters.h" +#include "app/common/gen/ids/Commands.h" #include "app/util/util.h" #include "callback.h" @@ -55,7 +55,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_GET_SETUP_PIN_RESPONSE_COMMAND_ID: { + case Clusters::AccountLogin::Commands::Ids::GetSetupPINResponse: { expectArgumentCount = 1; const uint8_t * setupPIN; bool argExists[1]; @@ -119,12 +119,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ACCOUNT_LOGIN_CLUSTER_ID, aCommandId, + Clusters::AccountLogin::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_ACCOUNT_LOGIN_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::AccountLogin::Id); return; } } @@ -134,7 +134,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_ACCOUNT_LOGIN_CLUSTER_ID, aCommandId, + Clusters::AccountLogin::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -164,7 +164,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_LAUNCH_APP_RESPONSE_COMMAND_ID: { + case Clusters::ApplicationLauncher::Commands::Ids::LaunchAppResponse: { expectArgumentCount = 2; uint8_t status; const uint8_t * data; @@ -233,12 +233,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, aCommandId, + Clusters::ApplicationLauncher::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_APPLICATION_LAUNCHER_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::ApplicationLauncher::Id); return; } } @@ -248,7 +248,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_APPLICATION_LAUNCHER_CLUSTER_ID, aCommandId, + Clusters::ApplicationLauncher::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -278,7 +278,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_LAUNCH_CONTENT_RESPONSE_COMMAND_ID: { + case Clusters::ContentLauncher::Commands::Ids::LaunchContentResponse: { expectArgumentCount = 2; const uint8_t * data; uint8_t contentLaunchStatus; @@ -343,7 +343,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_LAUNCH_URL_RESPONSE_COMMAND_ID: { + case Clusters::ContentLauncher::Commands::Ids::LaunchURLResponse: { expectArgumentCount = 2; const uint8_t * data; uint8_t contentLaunchStatus; @@ -412,12 +412,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_CONTENT_LAUNCH_CLUSTER_ID, aCommandId, + Clusters::ContentLauncher::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_CONTENT_LAUNCH_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::ContentLauncher::Id); return; } } @@ -427,7 +427,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_CONTENT_LAUNCH_CLUSTER_ID, aCommandId, + Clusters::ContentLauncher::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -457,7 +457,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_CLEAR_ALL_PINS_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearAllPinsResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -516,7 +516,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_ALL_RFIDS_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearAllRfidsResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -575,7 +575,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_HOLIDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearHolidayScheduleResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -634,7 +634,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_PIN_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearPinResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -693,7 +693,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_RFID_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearRfidResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -752,7 +752,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_WEEKDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearWeekdayScheduleResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -811,7 +811,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_CLEAR_YEARDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::ClearYeardayScheduleResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -870,7 +870,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_HOLIDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetHolidayScheduleResponse: { expectArgumentCount = 5; uint8_t scheduleId; uint8_t status; @@ -946,7 +946,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_LOG_RECORD_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetLogRecordResponse: { expectArgumentCount = 7; uint16_t logEntryId; uint32_t timestamp; @@ -1031,7 +1031,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_PIN_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetPinResponse: { expectArgumentCount = 4; uint16_t userId; uint8_t userStatus; @@ -1104,7 +1104,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_RFID_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetRfidResponse: { expectArgumentCount = 4; uint16_t userId; uint8_t userStatus; @@ -1177,7 +1177,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_USER_TYPE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetUserTypeResponse: { expectArgumentCount = 2; uint16_t userId; uint8_t userType; @@ -1240,7 +1240,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_WEEKDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetWeekdayScheduleResponse: { expectArgumentCount = 8; uint8_t scheduleId; uint16_t userId; @@ -1328,7 +1328,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_YEARDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::GetYeardayScheduleResponse: { expectArgumentCount = 5; uint8_t scheduleId; uint16_t userId; @@ -1404,7 +1404,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_LOCK_DOOR_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::LockDoorResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1463,7 +1463,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_HOLIDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetHolidayScheduleResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1522,7 +1522,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_PIN_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetPinResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1581,7 +1581,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_RFID_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetRfidResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1640,7 +1640,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_USER_TYPE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetUserTypeResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1699,7 +1699,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_WEEKDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetWeekdayScheduleResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1758,7 +1758,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_YEARDAY_SCHEDULE_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::SetYeardayScheduleResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1817,7 +1817,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UNLOCK_DOOR_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::UnlockDoorResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1876,7 +1876,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UNLOCK_WITH_TIMEOUT_RESPONSE_COMMAND_ID: { + case Clusters::DoorLock::Commands::Ids::UnlockWithTimeoutResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -1939,12 +1939,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DOOR_LOCK_CLUSTER_ID, aCommandId, + Clusters::DoorLock::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_DOOR_LOCK_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::DoorLock::Id); return; } } @@ -1954,7 +1954,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_DOOR_LOCK_CLUSTER_ID, aCommandId, + Clusters::DoorLock::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -1984,7 +1984,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ARM_FAIL_SAFE_RESPONSE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::ArmFailSafeResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -2049,7 +2049,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_COMMISSIONING_COMPLETE_RESPONSE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::CommissioningCompleteResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -2114,7 +2114,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_REGULATORY_CONFIG_RESPONSE_COMMAND_ID: { + case Clusters::GeneralCommissioning::Commands::Ids::SetRegulatoryConfigResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -2183,12 +2183,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::GeneralCommissioning::Id); return; } } @@ -2198,7 +2198,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::GeneralCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2228,7 +2228,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_GROUP_RESPONSE_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::AddGroupResponse: { expectArgumentCount = 2; uint8_t status; uint16_t groupId; @@ -2291,7 +2291,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_GROUP_MEMBERSHIP_RESPONSE_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::GetGroupMembershipResponse: { expectArgumentCount = 3; uint8_t capacity; uint8_t groupCount; @@ -2359,7 +2359,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_GROUP_RESPONSE_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::RemoveGroupResponse: { expectArgumentCount = 2; uint8_t status; uint16_t groupId; @@ -2422,7 +2422,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_VIEW_GROUP_RESPONSE_COMMAND_ID: { + case Clusters::Groups::Commands::Ids::ViewGroupResponse: { expectArgumentCount = 3; uint8_t status; uint16_t groupId; @@ -2495,12 +2495,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GROUPS_CLUSTER_ID, aCommandId, + Clusters::Groups::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_GROUPS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Groups::Id); return; } } @@ -2510,7 +2510,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_GROUPS_CLUSTER_ID, aCommandId, + Clusters::Groups::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2540,7 +2540,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_IDENTIFY_QUERY_RESPONSE_COMMAND_ID: { + case Clusters::Identify::Commands::Ids::IdentifyQueryResponse: { expectArgumentCount = 1; uint16_t timeout; bool argExists[1]; @@ -2603,12 +2603,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_IDENTIFY_CLUSTER_ID, aCommandId, + Clusters::Identify::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_IDENTIFY_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Identify::Id); return; } } @@ -2618,7 +2618,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_IDENTIFY_CLUSTER_ID, aCommandId, + Clusters::Identify::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2648,7 +2648,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_SEND_KEY_RESPONSE_COMMAND_ID: { + case Clusters::KeypadInput::Commands::Ids::SendKeyResponse: { expectArgumentCount = 1; uint8_t status; bool argExists[1]; @@ -2711,12 +2711,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_KEYPAD_INPUT_CLUSTER_ID, aCommandId, + Clusters::KeypadInput::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_KEYPAD_INPUT_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::KeypadInput::Id); return; } } @@ -2726,7 +2726,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_KEYPAD_INPUT_CLUSTER_ID, aCommandId, + Clusters::KeypadInput::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -2756,7 +2756,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_MEDIA_FAST_FORWARD_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaFastForwardResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -2815,7 +2815,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_NEXT_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaNextResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -2874,7 +2874,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_PAUSE_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaPauseResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -2933,7 +2933,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_PLAY_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaPlayResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -2992,7 +2992,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_PREVIOUS_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaPreviousResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -3051,7 +3051,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_REWIND_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaRewindResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -3110,7 +3110,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_SKIP_BACKWARD_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaSkipBackwardResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -3169,7 +3169,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_SKIP_FORWARD_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaSkipForwardResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -3228,7 +3228,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_SKIP_SEEK_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaSkipSeekResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -3287,7 +3287,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_START_OVER_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaStartOverResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -3346,7 +3346,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MEDIA_STOP_RESPONSE_COMMAND_ID: { + case Clusters::MediaPlayback::Commands::Ids::MediaStopResponse: { expectArgumentCount = 1; uint8_t mediaPlaybackStatus; bool argExists[1]; @@ -3409,12 +3409,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_MEDIA_PLAYBACK_CLUSTER_ID, aCommandId, + Clusters::MediaPlayback::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_MEDIA_PLAYBACK_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::MediaPlayback::Id); return; } } @@ -3424,7 +3424,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_MEDIA_PLAYBACK_CLUSTER_ID, aCommandId, + Clusters::MediaPlayback::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -3454,7 +3454,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_THREAD_NETWORK_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddThreadNetworkResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -3519,7 +3519,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ADD_WI_FI_NETWORK_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::AddWiFiNetworkResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -3584,7 +3584,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_DISABLE_NETWORK_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::DisableNetworkResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -3649,7 +3649,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_ENABLE_NETWORK_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::EnableNetworkResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -3714,7 +3714,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::RemoveNetworkResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -3779,7 +3779,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SCAN_NETWORKS_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::ScanNetworksResponse: { expectArgumentCount = 4; uint8_t errorCode; const uint8_t * debugText; @@ -3854,7 +3854,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_THREAD_NETWORK_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateThreadNetworkResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -3919,7 +3919,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_UPDATE_WI_FI_NETWORK_RESPONSE_COMMAND_ID: { + case Clusters::NetworkCommissioning::Commands::Ids::UpdateWiFiNetworkResponse: { expectArgumentCount = 2; uint8_t errorCode; const uint8_t * debugText; @@ -3988,12 +3988,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::NetworkCommissioning::Id); return; } } @@ -4003,7 +4003,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_NETWORK_COMMISSIONING_CLUSTER_ID, aCommandId, + Clusters::NetworkCommissioning::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -4033,7 +4033,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_APPLY_UPDATE_REQUEST_RESPONSE_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::ApplyUpdateRequestResponse: { expectArgumentCount = 2; uint8_t action; uint32_t delayedActionTime; @@ -4097,7 +4097,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_QUERY_IMAGE_RESPONSE_COMMAND_ID: { + case Clusters::OtaSoftwareUpdateProvider::Commands::Ids::QueryImageResponse: { expectArgumentCount = 7; uint8_t status; uint32_t delayedActionTime; @@ -4193,12 +4193,13 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OTA_PROVIDER_CLUSTER_ID, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_OTA_PROVIDER_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id); return; } } @@ -4208,7 +4209,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OTA_PROVIDER_CLUSTER_ID, aCommandId, + Clusters::OtaSoftwareUpdateProvider::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -4238,7 +4239,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_OP_CSR_RESPONSE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCSRResponse: { expectArgumentCount = 6; chip::ByteSpan CSR; chip::ByteSpan CSRNonce; @@ -4336,7 +4337,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_OP_CERT_RESPONSE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::OpCertResponse: { expectArgumentCount = 3; uint8_t StatusCode; uint64_t FabricIndex; @@ -4405,7 +4406,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_SET_FABRIC_RESPONSE_COMMAND_ID: { + case Clusters::OperationalCredentials::Commands::Ids::SetFabricResponse: { expectArgumentCount = 1; chip::FabricId FabricId; bool argExists[1]; @@ -4468,13 +4469,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::OperationalCredentials::Id); return; } } @@ -4484,7 +4484,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID, aCommandId, + Clusters::OperationalCredentials::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -4514,7 +4514,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_ADD_SCENE_RESPONSE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::AddSceneResponse: { expectArgumentCount = 3; uint8_t status; uint16_t groupId; @@ -4581,7 +4581,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_GET_SCENE_MEMBERSHIP_RESPONSE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::GetSceneMembershipResponse: { expectArgumentCount = 5; uint8_t status; uint8_t capacity; @@ -4658,7 +4658,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_ALL_SCENES_RESPONSE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::RemoveAllScenesResponse: { expectArgumentCount = 2; uint8_t status; uint16_t groupId; @@ -4721,7 +4721,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_SCENE_RESPONSE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::RemoveSceneResponse: { expectArgumentCount = 3; uint8_t status; uint16_t groupId; @@ -4788,7 +4788,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_STORE_SCENE_RESPONSE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::StoreSceneResponse: { expectArgumentCount = 3; uint8_t status; uint16_t groupId; @@ -4855,7 +4855,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_VIEW_SCENE_RESPONSE_COMMAND_ID: { + case Clusters::Scenes::Commands::Ids::ViewSceneResponse: { expectArgumentCount = 6; uint8_t status; uint16_t groupId; @@ -4941,12 +4941,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_SCENES_CLUSTER_ID, aCommandId, + Clusters::Scenes::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_SCENES_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::Scenes::Id); return; } } @@ -4956,7 +4956,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_SCENES_CLUSTER_ID, aCommandId, + Clusters::Scenes::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -4986,7 +4986,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_CHANGE_CHANNEL_RESPONSE_COMMAND_ID: { + case Clusters::TvChannel::Commands::Ids::ChangeChannelResponse: { expectArgumentCount = 2; /* TYPE WARNING: array array defaults to */ uint8_t * ChannelMatch; uint8_t ErrorType; @@ -5054,12 +5054,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TV_CHANNEL_CLUSTER_ID, aCommandId, + Clusters::TvChannel::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TV_CHANNEL_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::TvChannel::Id); return; } } @@ -5069,7 +5069,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TV_CHANNEL_CLUSTER_ID, aCommandId, + Clusters::TvChannel::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -5099,7 +5099,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_NAVIGATE_TARGET_RESPONSE_COMMAND_ID: { + case Clusters::TargetNavigator::Commands::Ids::NavigateTargetResponse: { expectArgumentCount = 2; uint8_t status; const uint8_t * data; @@ -5168,12 +5168,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TARGET_NAVIGATOR_CLUSTER_ID, aCommandId, + Clusters::TargetNavigator::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TARGET_NAVIGATOR_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::TargetNavigator::Id); return; } } @@ -5183,7 +5183,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TARGET_NAVIGATOR_CLUSTER_ID, aCommandId, + Clusters::TargetNavigator::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -5213,7 +5213,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_TEST_SPECIFIC_RESPONSE_COMMAND_ID: { + case Clusters::TestCluster::Commands::Ids::TestSpecificResponse: { expectArgumentCount = 1; uint8_t returnValue; bool argExists[1]; @@ -5276,12 +5276,12 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TEST_CLUSTER_ID, aCommandId, + Clusters::TestCluster::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, ZCL_TEST_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx32 " for cluster %" PRIx32, aCommandId, Clusters::TestCluster::Id); return; } } @@ -5291,7 +5291,7 @@ void DispatchClientCommand(app::Command * apCommandObj, CommandId aCommandId, En { chip::app::CommandPathParams returnStatusParam = { aEndpointId, 0, // GroupId - ZCL_TEST_CLUSTER_ID, aCommandId, + Clusters::TestCluster::Id, aCommandId, (chip::app::CommandPathFlags::kEndpointIdValid) }; apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); @@ -5316,52 +5316,52 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { - case ZCL_ACCOUNT_LOGIN_CLUSTER_ID: + case Clusters::AccountLogin::Id: clusters::AccountLogin::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_APPLICATION_LAUNCHER_CLUSTER_ID: + case Clusters::ApplicationLauncher::Id: clusters::ApplicationLauncher::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_CONTENT_LAUNCH_CLUSTER_ID: + case Clusters::ContentLauncher::Id: clusters::ContentLauncher::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_DOOR_LOCK_CLUSTER_ID: + case Clusters::DoorLock::Id: clusters::DoorLock::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + case Clusters::GeneralCommissioning::Id: clusters::GeneralCommissioning::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_GROUPS_CLUSTER_ID: + case Clusters::Groups::Id: clusters::Groups::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_IDENTIFY_CLUSTER_ID: + case Clusters::Identify::Id: clusters::Identify::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_KEYPAD_INPUT_CLUSTER_ID: + case Clusters::KeypadInput::Id: clusters::KeypadInput::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: + case Clusters::MediaPlayback::Id: clusters::MediaPlayback::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: + case Clusters::NetworkCommissioning::Id: clusters::NetworkCommissioning::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OTA_PROVIDER_CLUSTER_ID: + case Clusters::OtaSoftwareUpdateProvider::Id: clusters::OtaSoftwareUpdateProvider::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: + case Clusters::OperationalCredentials::Id: clusters::OperationalCredentials::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_SCENES_CLUSTER_ID: + case Clusters::Scenes::Id: clusters::Scenes::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_TV_CHANNEL_CLUSTER_ID: + case Clusters::TvChannel::Id: clusters::TvChannel::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: + case Clusters::TargetNavigator::Id: clusters::TargetNavigator::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_TEST_CLUSTER_ID: + case Clusters::TestCluster::Id: clusters::TestCluster::DispatchClientCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; default: