diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index e0410a398bb083..297d8135d5253e 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -595,35 +595,6 @@ client cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; - - request struct AddGroupRequest { - INT16U groupId = 0; - CHAR_STRING groupName = 1; - } - - request struct AddGroupIfIdentifyingRequest { - INT16U groupId = 0; - CHAR_STRING groupName = 1; - } - - request struct GetGroupMembershipRequest { - INT16U groupList[] = 0; - } - - request struct RemoveGroupRequest { - INT16U groupId = 0; - } - - request struct ViewGroupRequest { - INT16U groupId = 0; - } - - command AddGroup(AddGroupRequest): AddGroupResponse = 0; - command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command RemoveAllGroups(): DefaultSuccess = 4; - command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; - command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; } client cluster Identify = 3 { @@ -993,10 +964,6 @@ client cluster OnOff = 6 { readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; - - command Off(): DefaultSuccess = 0; - command On(): DefaultSuccess = 1; - command Toggle(): DefaultSuccess = 2; } server cluster OperationalCredentials = 62 { @@ -1126,91 +1093,6 @@ client cluster Scenes = 5 { readonly attribute bitmap8 nameSupport = 4; readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - INT16U transitionTime = 2; - CHAR_STRING sceneName = 3; - SceneExtensionFieldSet extensionFieldSets[] = 4; - } - - request struct GetSceneMembershipRequest { - INT16U groupId = 0; - } - - request struct RecallSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - INT16U transitionTime = 2; - } - - request struct RemoveAllScenesRequest { - INT16U groupId = 0; - } - - request struct RemoveSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - } - - request struct StoreSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - } - - request struct ViewSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - } - - response struct AddSceneResponse { - ENUM8 status = 0; - INT16U groupId = 1; - INT8U sceneId = 2; - } - - response struct GetSceneMembershipResponse { - ENUM8 status = 0; - INT8U capacity = 1; - INT16U groupId = 2; - INT8U sceneCount = 3; - INT8U sceneList[] = 4; - } - - response struct RemoveAllScenesResponse { - ENUM8 status = 0; - INT16U groupId = 1; - } - - response struct RemoveSceneResponse { - ENUM8 status = 0; - INT16U groupId = 1; - INT8U sceneId = 2; - } - - response struct StoreSceneResponse { - ENUM8 status = 0; - INT16U groupId = 1; - INT8U sceneId = 2; - } - - response struct ViewSceneResponse { - ENUM8 status = 0; - INT16U groupId = 1; - INT8U sceneId = 2; - INT16U transitionTime = 3; - CHAR_STRING sceneName = 4; - SceneExtensionFieldSet extensionFieldSets[] = 5; - } - - command AddScene(AddSceneRequest): AddSceneResponse = 0; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; } server cluster SoftwareDiagnostics = 52 { @@ -1524,3 +1406,4 @@ endpoint 1 { binding cluster OnOff; binding cluster Scenes; } + diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index ce3e592eeeac09..7205881efc82d5 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1043,6 +1043,24 @@ client cluster OnOff = 6 { attribute enum8 startUpOnOff = 16387; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectId = 0; + OnOffDelayedAllOffEffectVariant effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command On(): DefaultSuccess = 1; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; + command Toggle(): DefaultSuccess = 2; } server cluster OnOff = 6 { @@ -1072,24 +1090,6 @@ server cluster OnOff = 6 { attribute enum8 startUpOnOff = 16387; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; - - request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; - OnOffDelayedAllOffEffectVariant effectVariant = 1; - } - - request struct OnWithTimedOffRequest { - OnOffControl onOffControl = 0; - int16u onTime = 1; - int16u offWaitTime = 2; - } - - command Off(): DefaultSuccess = 0; - command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; - command On(): DefaultSuccess = 1; - command OnWithRecallGlobalScene(): DefaultSuccess = 65; - command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; - command Toggle(): DefaultSuccess = 2; } server cluster OnOffSwitchConfiguration = 7 { diff --git a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp index 8c53fc9504b063..eb87fd9261480c 100644 --- a/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/lighting-app/zap-generated/IMClusterCommandHandler.cpp @@ -807,80 +807,9 @@ namespace OnOff { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::Off::Id: { - Commands::Off::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOffCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::OffWithEffect::Id: { - Commands::OffWithEffect::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOffWithEffectCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::On::Id: { - Commands::On::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOnCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::OnWithRecallGlobalScene::Id: { - Commands::OnWithRecallGlobalScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOnWithRecallGlobalSceneCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::OnWithTimedOff::Id: { - Commands::OnWithTimedOff::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterOnWithTimedOffCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::Toggle::Id: { - Commands::Toggle::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfOnOffClusterToggleCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); } } // namespace OnOff